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
53,500
strxmov
eloqsql/strings/strxmov.c
char *strxmov(char *dst,const char *src, ...) { va_list pvar; va_start(pvar,src); while (src != NullS) { while ((*dst++ = *src++)) ; dst--; src = va_arg(pvar, char *); } va_end(pvar); *dst = 0; /* there might have been no sources! */ return dst; }
O3
c
strxmov: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %eax, %r10d movq %rdi, %rax leaq -0xd0(%rbp), %rdi movq %rdx, 0x10(%rdi) movq %rcx, 0x18(%rdi) movq %r8, 0x20(%rdi) movq %r9, 0x28(%rdi) testb %r10b, %r10b je 0x5dfb0 movaps %xmm0, -0xa0(%rbp) movaps %xmm1, -0x90(%rbp) movaps %xmm2, -0x80(%rbp) movaps %xmm3, -0x70(%rbp) movaps %xmm4, -0x60(%rbp) movaps %xmm5, -0x50(%rbp) movaps %xmm6, -0x40(%rbp) movaps %xmm7, -0x30(%rbp) movq %rdi, -0x10(%rbp) leaq 0x10(%rbp), %rcx movq %rcx, -0x18(%rbp) movabsq $0x3000000010, %rcx # imm = 0x3000000010 movq %rcx, -0x20(%rbp) testq %rsi, %rsi je 0x5e01e movq -0x10(%rbp), %rcx movl -0x20(%rbp), %edx movq -0x18(%rbp), %rdi movq %rdi, %r8 movb (%rsi), %r9b movb %r9b, (%rax) testb %r9b, %r9b jne 0x5e016 cmpl $0x28, %edx ja 0x5dffe movq %r8, %r9 movl %edx, %r8d addq %rcx, %r8 addl $0x8, %edx movl %edx, -0x20(%rbp) jmp 0x5e009 leaq 0x8(%r8), %rdi movq %rdi, -0x18(%rbp) movq %rdi, %r9 movq (%r8), %rsi movq %r9, %r8 testq %rsi, %rsi jne 0x5dfdd jmp 0x5e01e incq %rax incq %rsi jmp 0x5dfda movb $0x0, (%rax) addq $0x50, %rsp popq %rbp retq nop
strxmov: push rbp mov rbp, rsp sub rsp, 50h mov r10d, eax mov rax, rdi lea rdi, [rbp+var_D0] mov [rdi+10h], rdx mov [rdi+18h], rcx mov [rdi+20h], r8 mov [rdi+28h], r9 test r10b, r10b jz short loc_5DFB0 movaps [rbp+var_A0], xmm0 movaps [rbp+var_90], xmm1 movaps [rbp+var_80], xmm2 movaps [rbp+var_70], xmm3 movaps [rbp+var_60], xmm4 movaps [rbp+var_50], xmm5 movaps [rbp+var_40], xmm6 movaps [rbp+var_30], xmm7 loc_5DFB0: mov [rbp+var_10], rdi lea rcx, [rbp+arg_0] mov [rbp+var_18], rcx mov rcx, 3000000010h mov [rbp+var_20], rcx test rsi, rsi jz short loc_5E01E mov rcx, [rbp+var_10] mov edx, dword ptr [rbp+var_20] mov rdi, [rbp+var_18] loc_5DFDA: mov r8, rdi loc_5DFDD: mov r9b, [rsi] mov [rax], r9b test r9b, r9b jnz short loc_5E016 cmp edx, 28h ; '(' ja short loc_5DFFE mov r9, r8 mov r8d, edx add r8, rcx add edx, 8 mov dword ptr [rbp+var_20], edx jmp short loc_5E009 loc_5DFFE: lea rdi, [r8+8] mov [rbp+var_18], rdi mov r9, rdi loc_5E009: mov rsi, [r8] mov r8, r9 test rsi, rsi jnz short loc_5DFDD jmp short loc_5E01E loc_5E016: inc rax inc rsi jmp short loc_5DFDA loc_5E01E: mov byte ptr [rax], 0 add rsp, 50h pop rbp retn
char *strxmov(char *a1, char *a2, ...) { char *result; // rax char *reg_save_area; // rcx unsigned int gp_offset; // edx char *overflow_arg_area; // rdi char *v6; // r8 char v7; // r9 char *v8; // r9 va_list va; // [rsp+B0h] [rbp-20h] BYREF result = a1; va_start(va, a2); if ( a2 ) { reg_save_area = (char *)va[0].reg_save_area; gp_offset = va[0].gp_offset; overflow_arg_area = (char *)va[0].overflow_arg_area; while ( 1 ) { v6 = overflow_arg_area; while ( 1 ) { v7 = *a2; *result = *a2; if ( v7 ) break; if ( gp_offset > 0x28 ) { overflow_arg_area = v6 + 8; va[0].overflow_arg_area = v6 + 8; v8 = v6 + 8; } else { v8 = v6; v6 = &reg_save_area[gp_offset]; gp_offset += 8; va[0].gp_offset = gp_offset; } a2 = *(char **)v6; v6 = v8; if ( !a2 ) goto LABEL_11; } ++result; ++a2; } } LABEL_11: *result = 0; return result; }
strxmov: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV R10D,EAX MOV RAX,RDI LEA RDI,[RBP + -0xd0] MOV qword ptr [RDI + 0x10],RDX MOV qword ptr [RDI + 0x18],RCX MOV qword ptr [RDI + 0x20],R8 MOV qword ptr [RDI + 0x28],R9 TEST R10B,R10B JZ 0x0015dfb0 MOVAPS xmmword ptr [RBP + -0xa0],XMM0 MOVAPS xmmword ptr [RBP + -0x90],XMM1 MOVAPS xmmword ptr [RBP + -0x80],XMM2 MOVAPS xmmword ptr [RBP + -0x70],XMM3 MOVAPS xmmword ptr [RBP + -0x60],XMM4 MOVAPS xmmword ptr [RBP + -0x50],XMM5 MOVAPS xmmword ptr [RBP + -0x40],XMM6 MOVAPS xmmword ptr [RBP + -0x30],XMM7 LAB_0015dfb0: MOV qword ptr [RBP + -0x10],RDI LEA RCX,[RBP + 0x10] MOV qword ptr [RBP + -0x18],RCX MOV RCX,0x3000000010 MOV qword ptr [RBP + -0x20],RCX TEST RSI,RSI JZ 0x0015e01e MOV RCX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x20] MOV RDI,qword ptr [RBP + -0x18] LAB_0015dfda: MOV R8,RDI LAB_0015dfdd: MOV R9B,byte ptr [RSI] MOV byte ptr [RAX],R9B TEST R9B,R9B JNZ 0x0015e016 CMP EDX,0x28 JA 0x0015dffe MOV R9,R8 MOV R8D,EDX ADD R8,RCX ADD EDX,0x8 MOV dword ptr [RBP + -0x20],EDX JMP 0x0015e009 LAB_0015dffe: LEA RDI,[R8 + 0x8] MOV qword ptr [RBP + -0x18],RDI MOV R9,RDI LAB_0015e009: MOV RSI,qword ptr [R8] MOV R8,R9 TEST RSI,RSI JNZ 0x0015dfdd JMP 0x0015e01e LAB_0015e016: INC RAX INC RSI JMP 0x0015dfda LAB_0015e01e: MOV byte ptr [RAX],0x0 ADD RSP,0x50 POP RBP RET
void strxmov(char *param_1,char *param_2) { char cVar1; int8 *puVar2; int8 *puVar3; ulong uVar4; int8 *puVar5; int8 local_d8 [22]; uint local_28; puVar2 = (int8 *)&stack0x00000008; if (param_2 != (char *)0x0) { local_28 = 0x10; puVar3 = puVar2; do { for (; cVar1 = *param_2, *param_1 = cVar1, cVar1 != '\0'; param_2 = param_2 + 1) { param_1 = param_1 + 1; puVar3 = puVar2; } if (local_28 < 0x29) { uVar4 = (ulong)local_28; local_28 = local_28 + 8; puVar5 = (int8 *)((long)local_d8 + uVar4); } else { puVar2 = puVar3 + 1; puVar5 = puVar3; puVar3 = puVar2; } param_2 = (char *)*puVar5; } while (param_2 != (char *)0x0); } *param_1 = '\0'; return; }
53,501
flux::common::Source::fromString(std::basic_string_view<char, std::char_traits<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, flux::common::Arena&)
kvthweatt[P]FluxLang/src/common/source.cpp
std::shared_ptr<Source> Source::fromString(std::string_view text, const std::string& name, Arena& arena) { // Copy text to arena size_t size = text.size(); char* buffer = arena.allocArray<char>(size + 1); std::memcpy(buffer, text.data(), size); buffer[size] = '\0'; // Null-terminate // Create source return std::make_shared<Source>(std::string_view(buffer, size), name, arena); }
O3
cpp
flux::common::Source::fromString(std::basic_string_view<char, std::char_traits<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, flux::common::Arena&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %rbx movq %rcx, %r15 movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %r14 incq %rsi movq %r8, %rdi callq 0x9644 movq %rax, %rbp movq %r12, %rdx incq %rdx je 0x9cb9 movq %rbp, %rdi xorl %esi, %esi callq 0x6150 movq %rbp, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x6220 movb $0x0, (%rbp,%r12) leaq 0x8(%rsp), %rcx movq %r12, (%rcx) movq %rbp, 0x8(%rcx) movq $0x0, (%r14) leaq 0x8(%r14), %rdi leaq 0x7(%rsp), %rdx movq %r14, %rsi movq %r15, %r8 movq %rbx, %r9 callq 0xa0ee movq %r14, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN4flux6common6Source10fromStringESt17basic_string_viewIcSt11char_traitsIcEERKNSt7__cxx1112basic_stringIcS4_SaIcEEERNS0_5ArenaE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, r8 mov r15, rcx mov r13, rdx mov r12, rsi mov r14, rdi inc rsi; unsigned __int64 mov rdi, r8; this call _ZN4flux6common5Arena8allocRawEm; flux::common::Arena::allocRaw(ulong) mov rbp, rax mov rdx, r12 inc rdx jz short loc_9CB9 mov rdi, rbp xor esi, esi call _memset loc_9CB9: mov rdi, rbp mov rsi, r13 mov rdx, r12 call _memcpy mov byte ptr [rbp+r12+0], 0 lea rcx, [rsp+48h+var_40] mov [rcx], r12 mov [rcx+8], rbp mov qword ptr [r14], 0 lea rdi, [r14+8] lea rdx, [rsp+48h+var_41] mov rsi, r14 mov r8, r15 mov r9, rbx call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEC2IN4flux6common6SourceESaIS6_EJSt17basic_string_viewIcSt11char_traitsIcEERKNSt7__cxx1112basic_stringIcSA_SaIcEEERNS5_5ArenaEEEERPT_St20_Sp_alloc_shared_tagIT0_EDpOT1_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<flux::common::Source,std::allocator<flux::common::Source>,std::string_view,std::string const&,flux::common::Arena &>(flux::common::Source *&,std::_Sp_alloc_shared_tag<std::allocator<flux::common::Source>>,std::string_view,std::string const&,flux::common::Arena &) mov rax, r14 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * flux::common::Source::fromString( _QWORD *a1, long long a2, long long a3, long long a4, flux::common::Arena *a5) { unsigned long long v8; // rax unsigned long long v9; // rbp char v11; // [rsp+7h] [rbp-41h] BYREF _QWORD v12[8]; // [rsp+8h] [rbp-40h] BYREF v8 = flux::common::Arena::allocRaw(a5, a2 + 1); v9 = v8; if ( a2 != -1 ) memset(v8, 0LL, a2 + 1); memcpy(v9, a3, a2); *(_BYTE *)(v9 + a2) = 0; v12[0] = a2; v12[1] = v9; *a1 = 0LL; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<flux::common::Source,std::allocator<flux::common::Source>,std::string_view,std::string const&,flux::common::Arena &>( a1 + 1, a1, &v11, v12, a4, a5); return a1; }
fromString: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,R8 MOV R15,RCX MOV R13,RDX MOV R12,RSI MOV R14,RDI INC RSI MOV RDI,R8 CALL 0x00109644 MOV RBP,RAX MOV RDX,R12 INC RDX JZ 0x00109cb9 MOV RDI,RBP XOR ESI,ESI CALL 0x00106150 LAB_00109cb9: MOV RDI,RBP MOV RSI,R13 MOV RDX,R12 CALL 0x00106220 MOV byte ptr [RBP + R12*0x1],0x0 LEA RCX,[RSP + 0x8] MOV qword ptr [RCX],R12 MOV qword ptr [RCX + 0x8],RBP MOV qword ptr [R14],0x0 LEA RDI,[R14 + 0x8] LEA RDX,[RSP + 0x7] MOV RSI,R14 MOV R8,R15 MOV R9,RBX CALL 0x0010a0ee MOV RAX,R14 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* flux::common::Source::fromString(std::basic_string_view<char, std::char_traits<char> >, std::__cxx11::string const&, flux::common::Arena&) */ int8 * flux::common::Source::fromString (int8 *param_1,size_t param_2,void *param_3,int8 param_4,Arena *param_5) { void *__s; int1 local_41; size_t local_40; void *local_38; __s = (void *)Arena::allocRaw(param_5,param_2 + 1); if (param_2 + 1 != 0) { memset(__s,0,param_2 + 1); } memcpy(__s,param_3,param_2); *(int1 *)((long)__s + param_2) = 0; *param_1 = 0; local_40 = param_2; local_38 = __s; std::__shared_count<(__gnu_cxx::_Lock_policy)2>:: __shared_count<flux::common::Source,std::allocator<flux::common::Source>,std::basic_string_view<char,std::char_traits<char>>,std::__cxx11::string_const&,flux::common::Arena&> ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(param_1 + 1),param_1,&local_41,&local_40 ,param_4,param_5); return param_1; }
53,502
minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&)
monkey531[P]llama/common/minja.hpp
SubscriptExpr(const Location & location, std::shared_ptr<Expression> && b, std::shared_ptr<Expression> && i) : Expression(location), base(std::move(b)), index(std::move(i)) {}
O2
cpp
minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&): pushq %r15 pushq %r14 pushq %rbx movq %rcx, %rbx movq %rdx, %r14 movq %rdi, %r15 callq 0x63d62 leaq 0x91c7a(%rip), %rax # 0xfd768 addq $0x10, %rax movq %rax, (%r15) andq $0x0, 0x28(%r15) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x20(%r15) andq $0x0, (%r14) andq $0x0, 0x38(%r15) movups (%rbx), %xmm0 andq $0x0, 0x8(%rbx) movups %xmm0, 0x30(%r15) andq $0x0, (%rbx) popq %rbx popq %r14 popq %r15 retq
_ZN5minja13SubscriptExprC2ERKNS_8LocationEOSt10shared_ptrINS_10ExpressionEES7_: push r15 push r14 push rbx mov rbx, rcx mov r14, rdx mov r15, rdi call _ZN5minja10ExpressionC2ERKNS_8LocationE; minja::Expression::Expression(minja::Location const&) lea rax, _ZTVN5minja13SubscriptExprE; `vtable for'minja::SubscriptExpr add rax, 10h mov [r15], rax and qword ptr [r15+28h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [r15+20h], xmm0 and qword ptr [r14], 0 and qword ptr [r15+38h], 0 movups xmm0, xmmword ptr [rbx] and qword ptr [rbx+8], 0 movups xmmword ptr [r15+30h], xmm0 and qword ptr [rbx], 0 pop rbx pop r14 pop r15 retn
long long * minja::SubscriptExpr::SubscriptExpr(long long a1, _QWORD *a2, __int128 *a3, __int128 *a4) { long long *result; // rax __int128 v7; // xmm0 __int128 v8; // xmm0 minja::Expression::Expression((_QWORD *)a1, a2); result = &`vtable for'minja::SubscriptExpr + 2; *(_QWORD *)a1 = &`vtable for'minja::SubscriptExpr + 2; *(_QWORD *)(a1 + 40) = 0LL; v7 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 32) = v7; *(_QWORD *)a3 = 0LL; *(_QWORD *)(a1 + 56) = 0LL; v8 = *a4; *((_QWORD *)a4 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v8; *(_QWORD *)a4 = 0LL; return result; }
SubscriptExpr: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RCX MOV R14,RDX MOV R15,RDI CALL 0x00163d62 LEA RAX,[0x1fd768] ADD RAX,0x10 MOV qword ptr [R15],RAX AND qword ptr [R15 + 0x28],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [R15 + 0x20],XMM0 AND qword ptr [R14],0x0 AND qword ptr [R15 + 0x38],0x0 MOVUPS XMM0,xmmword ptr [RBX] AND qword ptr [RBX + 0x8],0x0 MOVUPS xmmword ptr [R15 + 0x30],XMM0 AND qword ptr [RBX],0x0 POP RBX POP R14 POP R15 RET
/* minja::SubscriptExpr::SubscriptExpr(minja::Location const&, std::shared_ptr<minja::Expression>&&, std::shared_ptr<minja::Expression>&&) */ void __thiscall minja::SubscriptExpr::SubscriptExpr (SubscriptExpr *this,Location *param_1,shared_ptr *param_2,shared_ptr *param_3) { int8 uVar1; Expression::Expression((Expression *)this,param_1); *(int ***)this = &PTR_do_evaluate_001fd778; *(int8 *)(this + 0x28) = 0; uVar1 = *(int8 *)(param_2 + 8); *(int8 *)(param_2 + 8) = 0; *(int8 *)(this + 0x20) = *(int8 *)param_2; *(int8 *)(this + 0x28) = uVar1; *(int8 *)param_2 = 0; *(int8 *)(this + 0x38) = 0; uVar1 = *(int8 *)(param_3 + 8); *(int8 *)(param_3 + 8) = 0; *(int8 *)(this + 0x30) = *(int8 *)param_3; *(int8 *)(this + 0x38) = uVar1; *(int8 *)param_3 = 0; return; }
53,503
google::protobuf::ExtensionRangeOptions::ExtensionRangeOptions(google::protobuf::Arena*, bool)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.pb.cc
ExtensionRangeOptions::ExtensionRangeOptions(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned) : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { SharedCtor(arena, is_message_owned); // @@protoc_insertion_point(arena_constructor:google.protobuf.ExtensionRangeOptions) }
O3
cpp
google::protobuf::ExtensionRangeOptions::ExtensionRangeOptions(google::protobuf::Arena*, bool): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r15 movq %rdi, %rbx leaq 0x8(%rdi), %r14 movq %rsi, %rax orq $0x2, %rax testl %edx, %edx cmoveq %rsi, %rax movq %rax, 0x8(%rdi) leaq 0xb2be7(%rip), %rax # 0xfe7e0 movq %rax, (%rdi) addq $0x10, %rdi callq 0x93d62 movq %r15, 0x28(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movl $0x0, 0x40(%rbx) popq %rbx popq %r14 popq %r15 retq movq %rax, %r15 leaq 0xb56f9(%rip), %rax # 0x101320 addq $0x10, %rax movq %rax, (%rbx) movq %r14, %rdi callq 0x59494 movq %r15, %rdi callq 0xf570
_ZN6google8protobuf21ExtensionRangeOptionsC2EPNS0_5ArenaEb: push r15; Alternative name is 'google::protobuf::ExtensionRangeOptions::ExtensionRangeOptions(google::protobuf::Arena *, bool)' push r14 push rbx mov r15, rsi mov rbx, rdi lea r14, [rdi+8] mov rax, rsi or rax, 2 test edx, edx cmovz rax, rsi mov [rdi+8], rax lea rax, off_FE7E0 mov [rdi], rax add rdi, 10h call _ZN6google8protobuf8internal12ExtensionSetC2EPNS0_5ArenaE; google::protobuf::internal::ExtensionSet::ExtensionSet(google::protobuf::Arena *) mov [rbx+28h], r15 xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 mov dword ptr [rbx+40h], 0 pop rbx pop r14 pop r15 retn mov r15, rax lea rax, _ZTVN6google8protobuf11MessageLiteE; `vtable for'google::protobuf::MessageLite add rax, 10h mov [rbx], rax mov rdi, r14; this call _ZN6google8protobuf8internal16InternalMetadataD2Ev; google::protobuf::internal::InternalMetadata::~InternalMetadata() mov rdi, r15 call __Unwind_Resume
long long google::protobuf::ExtensionRangeOptions::ExtensionRangeOptions( google::protobuf::ExtensionRangeOptions *this, google::protobuf::Arena *a2, int a3) { google::protobuf::Arena *v3; // rax long long result; // rax v3 = (google::protobuf::Arena *)((unsigned long long)a2 | 2); if ( !a3 ) v3 = a2; *((_QWORD *)this + 1) = v3; *(_QWORD *)this = off_FE7E0; result = google::protobuf::internal::ExtensionSet::ExtensionSet( (google::protobuf::ExtensionRangeOptions *)((char *)this + 16), a2); *((_QWORD *)this + 5) = a2; *((_OWORD *)this + 3) = 0LL; *((_DWORD *)this + 16) = 0; return result; }
ExtensionRangeOptions: PUSH R15 PUSH R14 PUSH RBX MOV R15,RSI MOV RBX,RDI LEA R14,[RDI + 0x8] MOV RAX,RSI OR RAX,0x2 TEST EDX,EDX CMOVZ RAX,RSI MOV qword ptr [RDI + 0x8],RAX LEA RAX,[0x1fe7e0] MOV qword ptr [RDI],RAX ADD RDI,0x10 LAB_0014bc00: CALL 0x00193d62 LAB_0014bc05: MOV qword ptr [RBX + 0x28],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV dword ptr [RBX + 0x40],0x0 POP RBX POP R14 POP R15 RET
/* google::protobuf::ExtensionRangeOptions::ExtensionRangeOptions(google::protobuf::Arena*, bool) */ void __thiscall google::protobuf::ExtensionRangeOptions::ExtensionRangeOptions (ExtensionRangeOptions *this,Arena *param_1,bool param_2) { Arena *pAVar1; int3 in_register_00000011; pAVar1 = (Arena *)((ulong)param_1 | 2); if (CONCAT31(in_register_00000011,param_2) == 0) { pAVar1 = param_1; } *(Arena **)(this + 8) = pAVar1; *(int ***)this = &PTR__ExtensionRangeOptions_001fe7e0; /* try { // try from 0014bc00 to 0014bc04 has its CatchHandler @ 0014bc1d */ internal::ExtensionSet::ExtensionSet((ExtensionSet *)(this + 0x10),param_1); *(Arena **)(this + 0x28) = param_1; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int4 *)(this + 0x40) = 0; return; }
53,504
uf_intervall
eloqsql/storage/maria/ma_packrec.c
static void uf_intervall(MARIA_COLUMNDEF *rec, MARIA_BIT_BUFF *bit_buff, uchar *to, uchar *end) { reg1 uint field_length=(uint) (end-to); memcpy(to,rec->huff_tree->intervalls+field_length*decode_pos(bit_buff, rec->huff_tree), (size_t) field_length); }
O3
c
uf_intervall: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdx, %rbx movq %rsi, %r12 movq 0x30(%rdi), %rax movq (%rax), %r13 movq 0x10(%rax), %r15 movl 0x4(%rsi), %eax testl %eax, %eax je 0x3b0ff movl (%r12), %ecx decl %eax movl %eax, 0x4(%r12) btl %eax, %ecx jae 0x3b0ee addq $0x2, %r13 movswq (%r13), %rcx testq %rcx, %rcx js 0x3b11e leaq (%r13,%rcx,2), %r13 jmp 0x3b0d6 movq %r12, %rdi callq 0x3a37c movl $0x1f, 0x4(%r12) movl $0x1f, %eax cmpl $0x0, (%r12) jns 0x3b0ee jmp 0x3b0ea subq %rbx, %r14 andl $0x7fff, %ecx # imm = 0x7FFF imull %r14d, %ecx addq %rcx, %r15 movl %r14d, %edx movq %rbx, %rdi movq %r15, %rsi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x29080
uf_intervall: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rcx mov rbx, rdx mov r12, rsi mov rax, [rdi+30h] mov r13, [rax] mov r15, [rax+10h] mov eax, [rsi+4] loc_3B0D6: test eax, eax jz short loc_3B0FF mov ecx, [r12] dec eax mov [r12+4], eax bt ecx, eax jnb short loc_3B0EE loc_3B0EA: add r13, 2 loc_3B0EE: movsx rcx, word ptr [r13+0] test rcx, rcx js short loc_3B11E lea r13, [r13+rcx*2+0] jmp short loc_3B0D6 loc_3B0FF: mov rdi, r12 call fill_buffer mov dword ptr [r12+4], 1Fh mov eax, 1Fh cmp dword ptr [r12], 0 jns short loc_3B0EE jmp short loc_3B0EA loc_3B11E: sub r14, rbx and ecx, 7FFFh imul ecx, r14d add r15, rcx mov edx, r14d mov rdi, rbx mov rsi, r15 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _memcpy
long long uf_intervall(long long a1, int *a2, long long a3, int a4) { __int16 **v6; // rax __int16 *v7; // r13 __int16 *v8; // r15 unsigned int v9; // eax int v10; // ecx long long v11; // rcx v6 = *(__int16 ***)(a1 + 48); v7 = *v6; v8 = v6[2]; v9 = a2[1]; while ( 1 ) { if ( v9 ) { v10 = *a2; a2[1] = --v9; if ( !_bittest(&v10, v9) ) goto LABEL_5; LABEL_4: ++v7; goto LABEL_5; } fill_buffer((long long)a2); a2[1] = 31; v9 = 31; if ( *a2 < 0 ) goto LABEL_4; LABEL_5: v11 = *v7; if ( v11 < 0 ) return memcpy(a3, (char *)v8 + (a4 - (_DWORD)a3) * (unsigned int)(v11 & 0x7FFF), (unsigned int)(a4 - a3)); v7 += v11; } }
uf_intervall: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RCX MOV RBX,RDX MOV R12,RSI MOV RAX,qword ptr [RDI + 0x30] MOV R13,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x10] MOV EAX,dword ptr [RSI + 0x4] LAB_0013b0d6: TEST EAX,EAX JZ 0x0013b0ff MOV ECX,dword ptr [R12] DEC EAX MOV dword ptr [R12 + 0x4],EAX BT ECX,EAX JNC 0x0013b0ee LAB_0013b0ea: ADD R13,0x2 LAB_0013b0ee: MOVSX RCX,word ptr [R13] TEST RCX,RCX JS 0x0013b11e LEA R13,[R13 + RCX*0x2] JMP 0x0013b0d6 LAB_0013b0ff: MOV RDI,R12 CALL 0x0013a37c MOV dword ptr [R12 + 0x4],0x1f MOV EAX,0x1f CMP dword ptr [R12],0x0 JNS 0x0013b0ee JMP 0x0013b0ea LAB_0013b11e: SUB R14,RBX AND ECX,0x7fff IMUL ECX,R14D ADD R15,RCX MOV EDX,R14D MOV RDI,RBX MOV RSI,R15 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00129080
void uf_intervall(long param_1,uint *param_2,void *param_3,int param_4) { short sVar1; long lVar2; uint uVar3; short *psVar4; psVar4 = (short *)**(int8 **)(param_1 + 0x30); lVar2 = (*(int8 **)(param_1 + 0x30))[2]; uVar3 = param_2[1]; do { if (uVar3 == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar3 = 0x1f; if ((int)*param_2 < 0) goto LAB_0013b0ea; } else { uVar3 = uVar3 - 1; param_2[1] = uVar3; if ((*param_2 >> (uVar3 & 0x1f) & 1) != 0) { LAB_0013b0ea: psVar4 = psVar4 + 1; } } sVar1 = *psVar4; if ((long)sVar1 < 0) { uVar3 = param_4 - (int)param_3; memcpy(param_3,(void *)(lVar2 + (ulong)(((int)sVar1 & 0x7fffU) * uVar3)),(ulong)uVar3); return; } psVar4 = psVar4 + sVar1; } while( true ); }
53,505
my_uca_charcmp
eloqsql/strings/ctype-uca.c
static int my_uca_charcmp(CHARSET_INFO *cs, my_wc_t wc1, my_wc_t wc2) { uint num_level= cs->levels_for_order; int ret; uint i; for (i= 0; i != num_level; i++) { ret= my_uca_charcmp_onelevel(cs, wc1, wc2, i); if (ret) { return ret; } } return 0; }
O3
c
my_uca_charcmp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movzbl 0xb2(%rdi), %eax testq %rax, %rax je 0xe19e4 movq 0x60(%rdi), %r12 movl %esi, %edi movq %rsi, %r8 shrq $0x8, %r8 movl $0xffffff, %r9d # imm = 0xFFFFFF movq %r8, -0x78(%rbp) andq %r9, %r8 movl $0xff, %ecx movq %rsi, %r10 andq %rcx, %r10 movl %edx, %r11d movq %rdx, %rbx shrq $0x8, %rbx movq %rbx, -0x70(%rbp) andq %rbx, %r9 andq %rdx, %rcx movq %rcx, -0x80(%rbp) cmpq %rdx, %rsi movl $0x0, %esi setne %sil imulq $0x38, %rax, %rdx xorl %r13d, %r13d movq %rdi, -0x68(%rbp) movq %r9, -0x60(%rbp) movq %r8, -0x58(%rbp) movq %r10, -0x50(%rbp) movq %r11, -0x48(%rbp) movl %esi, -0x2c(%rbp) movq %rdx, -0x38(%rbp) movq (%r12,%r13), %rax cmpq %rdi, %rax jb 0xe18c3 movq 0x10(%r12,%r13), %rcx movq (%rcx,%r8,8), %rcx testq %rcx, %rcx je 0xe18c3 movq 0x8(%r12,%r13), %rdx movzbl (%rdx,%r8), %edx imull %r10d, %edx leaq (%rcx,%rdx,2), %r14 movq -0x38(%rbp), %rdx jmp 0xe18c6 xorl %r14d, %r14d movl %esi, %ebx cmpq %r11, %rax jb 0xe19d3 movq 0x10(%r12,%r13), %rax movq (%rax,%r9,8), %rax movl %esi, %ebx testq %rax, %rax je 0xe19d3 movl %esi, %ebx testq %r14, %r14 je 0xe19d3 movq 0x8(%r12,%r13), %rcx movzbl (%rcx,%r9), %edx imull -0x80(%rbp), %edx leaq (%rax,%rdx,2), %r15 movzwl (%r14), %eax movl $0x1, %ebx cmpw (%r15), %ax jne 0xe19e6 movq -0x78(%rbp), %rax movzbl (%rcx,%rax), %esi movq -0x70(%rbp), %rax movzbl (%rcx,%rax), %eax cmpb %al, %sil jbe 0xe196a movq %rax, -0x40(%rbp) leal (%rax,%rax), %edx movq %r14, %rdi movq %r15, %rsi callq 0x2b620 movl -0x2c(%rbp), %esi movq -0x48(%rbp), %r11 movq -0x50(%rbp), %r10 movq -0x58(%rbp), %r8 movq -0x60(%rbp), %r9 movq -0x68(%rbp), %rdi testl %eax, %eax movq -0x38(%rbp), %rdx jne 0xe19e6 movq -0x40(%rbp), %rax movzwl (%r14,%rax,2), %ebx jmp 0xe19d3 leal (%rsi,%rsi), %edx cmpb %al, %sil jae 0xe19ab movq %rsi, -0x40(%rbp) movq %r14, %rdi movq %r15, %rsi callq 0x2b620 testl %eax, %eax movq -0x68(%rbp), %rdi movq -0x60(%rbp), %r9 movq -0x58(%rbp), %r8 movq -0x50(%rbp), %r10 movq -0x48(%rbp), %r11 movl -0x2c(%rbp), %esi movq -0x38(%rbp), %rdx jne 0xe19e6 movq -0x40(%rbp), %rax movzwl (%r15,%rax,2), %ebx jmp 0xe19d3 movq %r14, %rdi movq %r15, %rsi callq 0x2ba40 movl %eax, %ebx movq -0x68(%rbp), %rdi movq -0x60(%rbp), %r9 movq -0x58(%rbp), %r8 movq -0x50(%rbp), %r10 movq -0x48(%rbp), %r11 movl -0x2c(%rbp), %esi movq -0x38(%rbp), %rdx testl %ebx, %ebx jne 0xe19e6 addq $0x38, %r13 cmpq %r13, %rdx jne 0xe1894 xorl %ebx, %ebx movl %ebx, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_uca_charcmp: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h movzx eax, byte ptr [rdi+0B2h] test rax, rax jz loc_E19E4 mov r12, [rdi+60h] mov edi, esi mov r8, rsi shr r8, 8 mov r9d, 0FFFFFFh mov [rbp+var_78], r8 and r8, r9 mov ecx, 0FFh mov r10, rsi and r10, rcx mov r11d, edx mov rbx, rdx shr rbx, 8 mov [rbp+var_70], rbx and r9, rbx and rcx, rdx mov [rbp+var_80], rcx cmp rsi, rdx mov esi, 0 setnz sil imul rdx, rax, 38h ; '8' xor r13d, r13d mov [rbp+var_68], rdi mov [rbp+var_60], r9 mov [rbp+var_58], r8 mov [rbp+var_50], r10 mov [rbp+var_48], r11 mov [rbp+var_2C], esi mov [rbp+var_38], rdx loc_E1894: mov rax, [r12+r13] cmp rax, rdi jb short loc_E18C3 mov rcx, [r12+r13+10h] mov rcx, [rcx+r8*8] test rcx, rcx jz short loc_E18C3 mov rdx, [r12+r13+8] movzx edx, byte ptr [rdx+r8] imul edx, r10d lea r14, [rcx+rdx*2] mov rdx, [rbp+var_38] jmp short loc_E18C6 loc_E18C3: xor r14d, r14d loc_E18C6: mov ebx, esi cmp rax, r11 jb loc_E19D3 mov rax, [r12+r13+10h] mov rax, [rax+r9*8] mov ebx, esi test rax, rax jz loc_E19D3 mov ebx, esi test r14, r14 jz loc_E19D3 mov rcx, [r12+r13+8] movzx edx, byte ptr [rcx+r9] imul edx, dword ptr [rbp+var_80] lea r15, [rax+rdx*2] movzx eax, word ptr [r14] mov ebx, 1 cmp ax, [r15] jnz loc_E19E6 mov rax, [rbp+var_78] movzx esi, byte ptr [rcx+rax] mov rax, [rbp+var_70] movzx eax, byte ptr [rcx+rax] cmp sil, al jbe short loc_E196A mov [rbp+var_40], rax lea edx, [rax+rax] mov rdi, r14 mov rsi, r15 call _bcmp mov esi, [rbp+var_2C] mov r11, [rbp+var_48] mov r10, [rbp+var_50] mov r8, [rbp+var_58] mov r9, [rbp+var_60] mov rdi, [rbp+var_68] test eax, eax mov rdx, [rbp+var_38] jnz loc_E19E6 mov rax, [rbp+var_40] movzx ebx, word ptr [r14+rax*2] jmp short loc_E19D3 loc_E196A: lea edx, [rsi+rsi] cmp sil, al jnb short loc_E19AB mov [rbp+var_40], rsi mov rdi, r14 mov rsi, r15 call _bcmp test eax, eax mov rdi, [rbp+var_68] mov r9, [rbp+var_60] mov r8, [rbp+var_58] mov r10, [rbp+var_50] mov r11, [rbp+var_48] mov esi, [rbp+var_2C] mov rdx, [rbp+var_38] jnz short loc_E19E6 mov rax, [rbp+var_40] movzx ebx, word ptr [r15+rax*2] jmp short loc_E19D3 loc_E19AB: mov rdi, r14 mov rsi, r15 call _memcmp mov ebx, eax mov rdi, [rbp+var_68] mov r9, [rbp+var_60] mov r8, [rbp+var_58] mov r10, [rbp+var_50] mov r11, [rbp+var_48] mov esi, [rbp+var_2C] mov rdx, [rbp+var_38] loc_E19D3: test ebx, ebx jnz short loc_E19E6 add r13, 38h ; '8' cmp rdx, r13 jnz loc_E1894 loc_E19E4: xor ebx, ebx loc_E19E6: mov eax, ebx add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_uca_charcmp(long long a1, unsigned long long a2, unsigned long long a3) { long long v3; // rax long long v4; // r12 unsigned long long v5; // rdi long long v6; // r8 int v7; // r10d unsigned long long v8; // r11 long long v9; // r9 BOOL v10; // esi long long v11; // rdx long long v12; // r13 unsigned long long v13; // rax long long v14; // rcx _WORD *v15; // r14 unsigned int v16; // ebx long long v17; // rax long long v18; // rcx _WORD *v19; // r15 int v20; // esi int v21; // eax int v22; // eax long long v23; // rdx int v24; // eax int v26; // [rsp+0h] [rbp-80h] unsigned long long v27; // [rsp+8h] [rbp-78h] unsigned long long v28; // [rsp+10h] [rbp-70h] unsigned long long v29; // [rsp+18h] [rbp-68h] long long v30; // [rsp+20h] [rbp-60h] long long v31; // [rsp+28h] [rbp-58h] int v32; // [rsp+30h] [rbp-50h] unsigned long long v33; // [rsp+38h] [rbp-48h] long long v34; // [rsp+40h] [rbp-40h] long long v35; // [rsp+40h] [rbp-40h] long long v36; // [rsp+48h] [rbp-38h] BOOL v37; // [rsp+54h] [rbp-2Ch] v3 = *(unsigned __int8 *)(a1 + 178); if ( *(_BYTE *)(a1 + 178) ) { v4 = *(_QWORD *)(a1 + 96); v5 = (unsigned int)a2; v27 = a2 >> 8; v6 = (unsigned int)a2 >> 8; v7 = (unsigned __int8)a2; v8 = (unsigned int)a3; v28 = a3 >> 8; v9 = (unsigned int)a3 >> 8; v26 = (unsigned __int8)a3; v10 = a2 != a3; v11 = 56 * v3; v12 = 0LL; v29 = v5; v30 = v9; v31 = v6; v32 = v7; v33 = v8; v37 = v10; v36 = 56 * v3; while ( 1 ) { v13 = *(_QWORD *)(v4 + v12); if ( v13 >= v5 && (v14 = *(_QWORD *)(*(_QWORD *)(v4 + v12 + 16) + 8 * v6)) != 0 ) { v15 = (_WORD *)(v14 + 2LL * v7 * (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(v4 + v12 + 8) + v6)); v11 = v36; } else { v15 = 0LL; } v16 = v10; if ( v13 >= v8 ) { v17 = *(_QWORD *)(*(_QWORD *)(v4 + v12 + 16) + 8 * v9); v16 = v10; if ( v17 ) { v16 = v10; if ( v15 ) { v18 = *(_QWORD *)(v4 + v12 + 8); v19 = (_WORD *)(v17 + 2LL * v26 * (unsigned int)*(unsigned __int8 *)(v18 + v9)); v16 = 1; if ( *v15 != *v19 ) return v16; v20 = *(unsigned __int8 *)(v18 + v27); v21 = *(unsigned __int8 *)(v18 + v28); if ( (unsigned __int8)v20 <= (unsigned __int8)v21 ) { v23 = (unsigned int)(2 * v20); if ( (unsigned __int8)v20 >= (unsigned __int8)v21 ) { v16 = memcmp(v15, v19, v23); v5 = v29; v9 = v30; v6 = v31; v7 = v32; v8 = v33; v10 = v37; v11 = v36; } else { v35 = *(unsigned __int8 *)(v18 + v27); v24 = bcmp(v15, v19, v23); v5 = v29; v9 = v30; v6 = v31; v7 = v32; v8 = v33; v10 = v37; v11 = v36; if ( v24 ) return v16; v16 = (unsigned __int16)v19[v35]; } } else { v34 = *(unsigned __int8 *)(v18 + v28); v22 = bcmp(v15, v19, (unsigned int)(2 * v21)); v10 = v37; v8 = v33; v7 = v32; v6 = v31; v9 = v30; v5 = v29; v11 = v36; if ( v22 ) return v16; v16 = (unsigned __int16)v15[v34]; } } } } if ( v16 ) break; v12 += 56LL; if ( v11 == v12 ) return 0; } } else { return 0; } return v16; }
my_uca_charcmp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOVZX EAX,byte ptr [RDI + 0xb2] TEST RAX,RAX JZ 0x001e19e4 MOV R12,qword ptr [RDI + 0x60] MOV EDI,ESI MOV R8,RSI SHR R8,0x8 MOV R9D,0xffffff MOV qword ptr [RBP + -0x78],R8 AND R8,R9 MOV ECX,0xff MOV R10,RSI AND R10,RCX MOV R11D,EDX MOV RBX,RDX SHR RBX,0x8 MOV qword ptr [RBP + -0x70],RBX AND R9,RBX AND RCX,RDX MOV qword ptr [RBP + -0x80],RCX CMP RSI,RDX MOV ESI,0x0 SETNZ SIL IMUL RDX,RAX,0x38 XOR R13D,R13D MOV qword ptr [RBP + -0x68],RDI MOV qword ptr [RBP + -0x60],R9 MOV qword ptr [RBP + -0x58],R8 MOV qword ptr [RBP + -0x50],R10 MOV qword ptr [RBP + -0x48],R11 MOV dword ptr [RBP + -0x2c],ESI MOV qword ptr [RBP + -0x38],RDX LAB_001e1894: MOV RAX,qword ptr [R12 + R13*0x1] CMP RAX,RDI JC 0x001e18c3 MOV RCX,qword ptr [R12 + R13*0x1 + 0x10] MOV RCX,qword ptr [RCX + R8*0x8] TEST RCX,RCX JZ 0x001e18c3 MOV RDX,qword ptr [R12 + R13*0x1 + 0x8] MOVZX EDX,byte ptr [RDX + R8*0x1] IMUL EDX,R10D LEA R14,[RCX + RDX*0x2] MOV RDX,qword ptr [RBP + -0x38] JMP 0x001e18c6 LAB_001e18c3: XOR R14D,R14D LAB_001e18c6: MOV EBX,ESI CMP RAX,R11 JC 0x001e19d3 MOV RAX,qword ptr [R12 + R13*0x1 + 0x10] MOV RAX,qword ptr [RAX + R9*0x8] MOV EBX,ESI TEST RAX,RAX JZ 0x001e19d3 MOV EBX,ESI TEST R14,R14 JZ 0x001e19d3 MOV RCX,qword ptr [R12 + R13*0x1 + 0x8] MOVZX EDX,byte ptr [RCX + R9*0x1] IMUL EDX,dword ptr [RBP + -0x80] LEA R15,[RAX + RDX*0x2] MOVZX EAX,word ptr [R14] MOV EBX,0x1 CMP AX,word ptr [R15] JNZ 0x001e19e6 MOV RAX,qword ptr [RBP + -0x78] MOVZX ESI,byte ptr [RCX + RAX*0x1] MOV RAX,qword ptr [RBP + -0x70] MOVZX EAX,byte ptr [RCX + RAX*0x1] CMP SIL,AL JBE 0x001e196a MOV qword ptr [RBP + -0x40],RAX LEA EDX,[RAX + RAX*0x1] MOV RDI,R14 MOV RSI,R15 CALL 0x0012b620 MOV ESI,dword ptr [RBP + -0x2c] MOV R11,qword ptr [RBP + -0x48] MOV R10,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x60] MOV RDI,qword ptr [RBP + -0x68] TEST EAX,EAX MOV RDX,qword ptr [RBP + -0x38] JNZ 0x001e19e6 MOV RAX,qword ptr [RBP + -0x40] MOVZX EBX,word ptr [R14 + RAX*0x2] JMP 0x001e19d3 LAB_001e196a: LEA EDX,[RSI + RSI*0x1] CMP SIL,AL JNC 0x001e19ab MOV qword ptr [RBP + -0x40],RSI MOV RDI,R14 MOV RSI,R15 CALL 0x0012b620 TEST EAX,EAX MOV RDI,qword ptr [RBP + -0x68] MOV R9,qword ptr [RBP + -0x60] MOV R8,qword ptr [RBP + -0x58] MOV R10,qword ptr [RBP + -0x50] MOV R11,qword ptr [RBP + -0x48] MOV ESI,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x38] JNZ 0x001e19e6 MOV RAX,qword ptr [RBP + -0x40] MOVZX EBX,word ptr [R15 + RAX*0x2] JMP 0x001e19d3 LAB_001e19ab: MOV RDI,R14 MOV RSI,R15 CALL 0x0012ba40 MOV EBX,EAX MOV RDI,qword ptr [RBP + -0x68] MOV R9,qword ptr [RBP + -0x60] MOV R8,qword ptr [RBP + -0x58] MOV R10,qword ptr [RBP + -0x50] MOV R11,qword ptr [RBP + -0x48] MOV ESI,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x38] LAB_001e19d3: TEST EBX,EBX JNZ 0x001e19e6 ADD R13,0x38 CMP RDX,R13 JNZ 0x001e1894 LAB_001e19e4: XOR EBX,EBX LAB_001e19e6: MOV EAX,EBX ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint my_uca_charcmp(long param_1,ulong param_2,ulong param_3) { short *__s2; byte bVar1; byte bVar2; byte bVar3; long lVar4; long lVar5; long lVar6; int iVar7; uint uVar8; ulong uVar9; ulong uVar10; long lVar11; short *__s1; uint local_88; bVar1 = *(byte *)(param_1 + 0xb2); if ((ulong)bVar1 != 0) { lVar4 = *(long *)(param_1 + 0x60); uVar9 = param_2 >> 8 & 0xffffff; uVar10 = param_3 >> 8 & 0xffffff; local_88 = (uint)param_3 & 0xff; lVar11 = 0; do { uVar8 = (uint)(param_2 != param_3); if ((*(ulong *)(lVar4 + lVar11) < (param_2 & 0xffffffff)) || (lVar5 = *(long *)(*(long *)(lVar4 + 0x10 + lVar11) + uVar9 * 8), lVar5 == 0)) { __s1 = (short *)0x0; } else { __s1 = (short *)(lVar5 + (ulong)((uint)*(byte *)(*(long *)(lVar4 + 8 + lVar11) + uVar9) * ((uint)param_2 & 0xff)) * 2); } if ((((param_3 & 0xffffffff) <= *(ulong *)(lVar4 + lVar11)) && (lVar5 = *(long *)(*(long *)(lVar4 + 0x10 + lVar11) + uVar10 * 8), lVar5 != 0)) && (__s1 != (short *)0x0)) { lVar6 = *(long *)(lVar4 + 8 + lVar11); __s2 = (short *)(lVar5 + (ulong)(*(byte *)(lVar6 + uVar10) * local_88) * 2); if (*__s1 != *__s2) { return 1; } bVar2 = *(byte *)(lVar6 + (param_2 >> 8)); bVar3 = *(byte *)(lVar6 + (param_3 >> 8)); if (bVar3 < bVar2) { iVar7 = bcmp(__s1,__s2,(ulong)((uint)bVar3 + (uint)bVar3)); if (iVar7 != 0) { return 1; } uVar8 = (uint)(ushort)__s1[bVar3]; } else if (bVar2 < bVar3) { iVar7 = bcmp(__s1,__s2,(ulong)((uint)bVar2 + (uint)bVar2)); if (iVar7 != 0) { return 1; } uVar8 = (uint)(ushort)__s2[bVar2]; } else { uVar8 = memcmp(__s1,__s2,(ulong)((uint)bVar2 + (uint)bVar2)); } } if (uVar8 != 0) { return uVar8; } lVar11 = lVar11 + 0x38; } while ((ulong)bVar1 * 0x38 != lVar11); } return 0; }
53,506
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>>::start_object(unsigned long)
monkey531[P]llama/common/json.hpp
bool start_object(std::size_t len) { ref_stack.push_back(handle_value(BasicJsonType::value_t::object)); if (JSON_HEDLEY_UNLIKELY(len != static_cast<std::size_t>(-1) && len > ref_stack.back()->max_size())) { JSON_THROW(out_of_range::create(408, concat("excessive object size: ", std::to_string(len)), ref_stack.back())); } return true; }
O0
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>>::start_object(unsigned long): subq $0x98, %rsp movq %rdi, 0x90(%rsp) movq %rsi, 0x88(%rsp) movq 0x90(%rsp), %rdi movq %rdi, 0x18(%rsp) movq %rdi, %rax addq $0x8, %rax movq %rax, 0x20(%rsp) movb $0x1, 0x7f(%rsp) leaq 0x7f(%rsp), %rsi callq 0xbab40 movq 0x20(%rsp), %rdi movq %rax, 0x80(%rsp) leaq 0x80(%rsp), %rsi callq 0xbab10 xorl %eax, %eax cmpq $-0x1, 0x88(%rsp) movb %al, 0x2a(%rsp) je 0xba49f movq 0x18(%rsp), %rdi movq 0x88(%rsp), %rax movq %rax, 0x10(%rsp) addq $0x8, %rdi callq 0xae1c0 movq (%rax), %rdi callq 0xae200 movq %rax, %rcx movq 0x10(%rsp), %rax cmpq %rcx, %rax seta %al movb %al, 0x2a(%rsp) movb 0x2a(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xba4b0 jmp 0xba58d movb $0x1, 0x2b(%rsp) movl $0x20, %edi callq 0x5a6a0 movq %rax, 0x8(%rsp) movq 0x88(%rsp), %rsi leaq 0x38(%rsp), %rdi callq 0xae4e0 jmp 0xba4d8 leaq 0x152e37(%rip), %rsi # 0x20d316 leaq 0x58(%rsp), %rdi leaq 0x38(%rsp), %rdx callq 0xae430 jmp 0xba4f0 movq 0x18(%rsp), %rdi addq $0x8, %rdi callq 0xae1c0 movq 0x8(%rsp), %rdi movq (%rax), %rcx movl $0x198, %esi # imm = 0x198 leaq 0x58(%rsp), %rdx callq 0xae280 jmp 0xba517 movq 0x8(%rsp), %rdi movb $0x0, 0x2b(%rsp) leaq 0x1e57e0(%rip), %rsi # 0x29fd08 leaq -0xcc9f(%rip), %rdx # 0xad890 callq 0x5ab00 jmp 0xba5a3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0xba578 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) jmp 0xba56e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x58(%rsp), %rdi callq 0x5b558 leaq 0x38(%rsp), %rdi callq 0x5b558 testb $0x1, 0x2b(%rsp) jne 0xba581 jmp 0xba58b movq 0x8(%rsp), %rdi callq 0x5af70 jmp 0xba599 movb $0x1, %al andb $0x1, %al addq $0x98, %rsp retq movq 0x30(%rsp), %rdi callq 0x5abc0 nopw %cs:(%rax,%rax) nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12start_objectEm: sub rsp, 98h mov qword ptr [rsp+98h+var_8], rdi; char mov [rsp+98h+var_10], rsi; int mov rdi, qword ptr [rsp+98h+var_8] mov qword ptr [rsp+98h+var_80], rdi; char mov rax, rdi add rax, 8 mov qword ptr [rsp+98h+var_78], rax; int mov [rsp+98h+var_19], 1 lea rsi, [rsp+98h+var_19] call _ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEEPSF_OT_; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t &&) mov rdi, qword ptr [rsp+98h+var_78] mov qword ptr [rsp+98h+var_18], rax; int lea rsi, [rsp+98h+var_18] call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE9push_backEOSE_; 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> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> *>>::push_back(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> *&&) xor eax, eax cmp [rsp+98h+var_10], 0FFFFFFFFFFFFFFFFh mov [rsp+98h+var_6E], al jz short loc_BA49F mov rdi, qword ptr [rsp+98h+var_80] mov rax, [rsp+98h+var_10] mov qword ptr [rsp+98h+var_88], rax; int add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; 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> *,std::allocator<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> *>>::back(void) mov rdi, [rax] call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8max_sizeEv; 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>::max_size(void) mov rcx, rax mov rax, qword ptr [rsp+98h+var_88] cmp rax, rcx setnbe al mov [rsp+98h+var_6E], al loc_BA49F: mov al, [rsp+98h+var_6E] xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_BA4B0 jmp loc_BA58D loc_BA4B0: mov [rsp+98h+var_6D], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov [rsp+98h+var_90], rax; int mov rsi, [rsp+98h+var_10]; unsigned __int64 lea rdi, [rsp+98h+var_60]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) jmp short $+2 loc_BA4D8: lea rsi, aExcessiveObjec; "excessive object size: " lea rdi, [rsp+98h+var_40] lea rdx, [rsp+98h+var_60] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA24_KcS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>(char const(&)[24],std::string &&) jmp short $+2 loc_BA4F0: mov rdi, qword ptr [rsp+98h+var_80] add rdi, 8 call _ZNSt6vectorIPN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISE_EE4backEv; 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> *,std::allocator<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> *>>::back(void) mov rdi, [rsp+98h+var_90]; int mov rcx, [rax] mov esi, 198h lea rdx, [rsp+98h+var_40] call _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ jmp short $+2 loc_BA517: mov rdi, [rsp+98h+var_90]; void * mov [rsp+98h+var_6D], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail12out_of_rangeE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail12out_of_rangeD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_BA5A3 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_BA578 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax jmp short loc_BA56E mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_BA56E: lea rdi, [rsp+arg_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_BA578: test [rsp+arg_23], 1 jnz short loc_BA581 jmp short loc_BA58B loc_BA581: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_BA58B: jmp short loc_BA599 loc_BA58D: mov al, 1 and al, 1 add rsp, 98h retn loc_BA599: mov rdi, [rsp+arg_28] call __Unwind_Resume loc_BA5A3: nop word ptr [rax+rax+00000000h] nop dword ptr [rax]
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>>::start_object( long long a1, unsigned long long a2) { long long *v2; // rax long long *v3; // rax nlohmann::json_abi_v3_11_3::detail::out_of_range *exception; // [rsp+8h] [rbp-90h] unsigned long long v6; // [rsp+10h] [rbp-88h] bool v7; // [rsp+2Ah] [rbp-6Eh] _BYTE v8[32]; // [rsp+38h] [rbp-60h] BYREF _BYTE v9[39]; // [rsp+58h] [rbp-40h] BYREF char v10; // [rsp+7Fh] [rbp-19h] BYREF int v11[2]; // [rsp+80h] [rbp-18h] BYREF unsigned long long v12; // [rsp+88h] [rbp-10h] char v13[8]; // [rsp+90h] [rbp-8h] *(_QWORD *)v13 = a1; v12 = a2; v10 = 1; *(_QWORD *)v11 = 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>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>( a1, &v10); std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *>>::push_back( a1 + 8, v11); v7 = 0; if ( v12 != -1LL ) { v6 = v12; v2 = (long long *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8); v7 = v6 > nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::max_size(*v2); } if ( v7 ) { exception = (nlohmann::json_abi_v3_11_3::detail::out_of_range *)__cxa_allocate_exception(0x20uLL); std::to_string((std::__cxx11 *)v8, v12); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[24],std::string>( (long long)v9, (long long)"excessive object size: ", (long long)v8); v3 = (long long *)std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> *,std::allocator<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> *>>::back(a1 + 8); ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 408, (long long)v9, *v3); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::out_of_range, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::out_of_range::~out_of_range); } return 1; }
start_object: SUB RSP,0x98 MOV qword ptr [RSP + 0x90],RDI MOV qword ptr [RSP + 0x88],RSI MOV RDI,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x18],RDI MOV RAX,RDI ADD RAX,0x8 MOV qword ptr [RSP + 0x20],RAX MOV byte ptr [RSP + 0x7f],0x1 LEA RSI,[RSP + 0x7f] CALL 0x001bab40 MOV RDI,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x80],RAX LEA RSI,[RSP + 0x80] CALL 0x001bab10 XOR EAX,EAX CMP qword ptr [RSP + 0x88],-0x1 MOV byte ptr [RSP + 0x2a],AL JZ 0x001ba49f MOV RDI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x10],RAX ADD RDI,0x8 CALL 0x001ae1c0 MOV RDI,qword ptr [RAX] CALL 0x001ae200 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x10] CMP RAX,RCX SETA AL MOV byte ptr [RSP + 0x2a],AL LAB_001ba49f: MOV AL,byte ptr [RSP + 0x2a] XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x001ba4b0 JMP 0x001ba58d LAB_001ba4b0: MOV byte ptr [RSP + 0x2b],0x1 MOV EDI,0x20 CALL 0x0015a6a0 MOV qword ptr [RSP + 0x8],RAX MOV RSI,qword ptr [RSP + 0x88] LAB_001ba4cc: LEA RDI,[RSP + 0x38] CALL 0x001ae4e0 JMP 0x001ba4d8 LAB_001ba4d8: LEA RSI,[0x30d316] LEA RDI,[RSP + 0x58] LEA RDX,[RSP + 0x38] CALL 0x001ae430 JMP 0x001ba4f0 LAB_001ba4f0: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x001ae1c0 MOV RDI,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX] LAB_001ba506: MOV ESI,0x198 LEA RDX,[RSP + 0x58] CALL 0x001ae280 JMP 0x001ba517 LAB_001ba517: MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x2b],0x0 LEA RSI,[0x39fd08] LEA RDX,[0x1ad890] CALL 0x0015ab00 LAB_001ba58d: MOV AL,0x1 AND AL,0x1 ADD RSP,0x98 RET
/* 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> >::start_object(unsigned long) */ 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>> ::start_object(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,ulong param_1) { bool bVar1; ulong uVar2; int8 *puVar3; ulong uVar4; int7 uVar6; int8 uVar5; __cxx11 local_60 [32]; detail local_40 [39]; value_t local_19; basic_json *local_18; ulong local_10; 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>> *local_8; local_19 = 1; local_10 = param_1; local_8 = this; local_18 = handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(this,&local_19); 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>*>> ::push_back((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>*>> *)(this + 8),&local_18); uVar2 = local_10; uVar6 = 0; bVar1 = false; if (local_10 != 0xffffffffffffffff) { puVar3 = (int8 *) 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>*>> ::back((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>*>> *)(this + 8)); uVar4 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::max_size((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)*puVar3); bVar1 = uVar4 < uVar2; uVar6 = (int7)(uVar2 >> 8); } if (!bVar1) { return CONCAT71(uVar6,1); } uVar5 = __cxa_allocate_exception(0x20); /* try { // try from 001ba4cc to 001ba4d5 has its CatchHandler @ 001ba536 */ std::__cxx11::to_string(local_60,local_10); /* try { // try from 001ba4d8 to 001ba4ed has its CatchHandler @ 001ba546 */ concat<std::__cxx11::string,char_const(&)[24],std::__cxx11::string> (local_40,"excessive object size: ",(string *)local_60); puVar3 = (int8 *) 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>*>> ::back((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>*>> *)(this + 8)); /* try { // try from 001ba506 to 001ba533 has its CatchHandler @ 001ba556 */ _ZN8nlohmann16json_abi_v3_11_36detail12out_of_range6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar5,0x198,local_40,*puVar3); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&out_of_range::typeinfo,out_of_range::~out_of_range); }
53,507
check_mb_ujis
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_ujis(const char *start, const char *end) { if (*(uchar*)start < 0x80) { return 0; /* invalid ujis character */ } if (valid_ujis(*(start)) && valid_ujis(*((start)+1))) { return 2; } if (valid_ujis_ss2(*(start)) && valid_ujis_kata(*((start)+1))) { return 2; } if (valid_ujis_ss3(*(start)) && (end-start) > 2 && valid_ujis(*((start)+1)) && valid_ujis(*((start)+2))) { return 3; } return 0; }
O3
c
check_mb_ujis: pushq %rbp movq %rsp, %rbp movb (%rdi), %cl xorl %eax, %eax testb %cl, %cl jns 0x2fba6 leal 0x1(%rcx), %eax cmpb $-0x5e, %al jae 0x2fb67 cmpb $-0x72, %cl jne 0x2fb78 movb 0x1(%rdi), %cl addb $0x5f, %cl movl $0x2, %eax cmpb $0x3f, %cl jae 0x2fba4 jmp 0x2fba6 movb 0x1(%rdi), %cl incb %cl movl $0x2, %eax cmpb $-0x5e, %cl jb 0x2fba4 jmp 0x2fba6 cmpb $-0x71, %cl setne %al subq %rdi, %rsi cmpq $0x3, %rsi setl %cl orb %al, %cl jne 0x2fba4 movb 0x1(%rdi), %al incb %al cmpb $-0x5e, %al jb 0x2fba4 movb 0x2(%rdi), %cl incb %cl movl $0x3, %eax cmpb $-0x5f, %cl ja 0x2fba6 xorl %eax, %eax popq %rbp retq
check_mb_ujis: push rbp mov rbp, rsp mov cl, [rdi] xor eax, eax test cl, cl jns short loc_2FBA6 lea eax, [rcx+1] cmp al, 0A2h jnb short loc_2FB67 cmp cl, 8Eh jnz short loc_2FB78 mov cl, [rdi+1] add cl, 5Fh ; '_' mov eax, 2 cmp cl, 3Fh ; '?' jnb short loc_2FBA4 jmp short loc_2FBA6 loc_2FB67: mov cl, [rdi+1] inc cl mov eax, 2 cmp cl, 0A2h jb short loc_2FBA4 jmp short loc_2FBA6 loc_2FB78: cmp cl, 8Fh setnz al sub rsi, rdi cmp rsi, 3 setl cl or cl, al jnz short loc_2FBA4 mov al, [rdi+1] inc al cmp al, 0A2h jb short loc_2FBA4 mov cl, [rdi+2] inc cl mov eax, 3 cmp cl, 0A1h ja short loc_2FBA6 loc_2FBA4: xor eax, eax loc_2FBA6: pop rbp retn
long long check_mb_ujis(char *a1, long long a2) { char v2; // cl long long result; // rax v2 = *a1; result = 0LL; if ( *a1 < 0 ) { if ( (unsigned __int8)(v2 + 1) >= 0xA2u ) { result = 2LL; if ( (unsigned __int8)(a1[1] + 1) < 0xA2u ) return 0LL; } else { if ( v2 == -114 ) { result = 2LL; if ( (unsigned __int8)(a1[1] + 95) < 0x3Fu ) return result; return 0LL; } if ( v2 != -113 || a2 - (long long)a1 < 3 ) return 0LL; if ( (unsigned __int8)(a1[1] + 1) < 0xA2u ) return 0LL; result = 3LL; if ( (unsigned __int8)(a1[2] + 1) <= 0xA1u ) return 0LL; } } return result; }
check_mb_ujis: PUSH RBP MOV RBP,RSP MOV CL,byte ptr [RDI] XOR EAX,EAX TEST CL,CL JNS 0x0012fba6 LEA EAX,[RCX + 0x1] CMP AL,0xa2 JNC 0x0012fb67 CMP CL,0x8e JNZ 0x0012fb78 MOV CL,byte ptr [RDI + 0x1] ADD CL,0x5f MOV EAX,0x2 CMP CL,0x3f JNC 0x0012fba4 JMP 0x0012fba6 LAB_0012fb67: MOV CL,byte ptr [RDI + 0x1] INC CL MOV EAX,0x2 CMP CL,0xa2 JC 0x0012fba4 JMP 0x0012fba6 LAB_0012fb78: CMP CL,0x8f SETNZ AL SUB RSI,RDI CMP RSI,0x3 SETL CL OR CL,AL JNZ 0x0012fba4 MOV AL,byte ptr [RDI + 0x1] INC AL CMP AL,0xa2 JC 0x0012fba4 MOV CL,byte ptr [RDI + 0x2] INC CL MOV EAX,0x3 CMP CL,0xa1 JA 0x0012fba6 LAB_0012fba4: XOR EAX,EAX LAB_0012fba6: POP RBP RET
int8 check_mb_ujis(char *param_1,long param_2) { char cVar1; int8 uVar2; cVar1 = *param_1; if (-1 < cVar1) { return 0; } if ((byte)(cVar1 + 1U) < 0xa2) { if (cVar1 == -0x72) { if (0x3e < (byte)(param_1[1] + 0x5fU)) { return 0; } return 2; } if (param_2 - (long)param_1 < 3 || cVar1 != -0x71) { return 0; } if ((byte)(param_1[1] + 1U) < 0xa2) { return 0; } cVar1 = param_1[2]; uVar2 = 3; } else { cVar1 = param_1[1]; uVar2 = 2; } if ((byte)(cVar1 + 1U) < 0xa2) { return 0; } return uVar2; }
53,508
my_vfprintf
eloqsql/strings/my_vsnprintf.c
int my_vfprintf(FILE *stream, const char* format, va_list args) { char cvtbuf[1024]; int alloc= 0; char *p= cvtbuf; size_t cur_len= sizeof(cvtbuf), actual; int ret; /* We do not know how much buffer we need. So start with a reasonably-sized stack-allocated buffer, and increase it exponentially until it is big enough. */ for (;;) { size_t new_len; actual= my_vsnprintf(p, cur_len, format, args); if (actual < cur_len - 1) break; /* Not enough space (or just enough with nothing to spare - but we cannot distinguish this case from the return value). Allocate a bigger buffer and try again. */ if (alloc) my_free(p); else alloc= 1; new_len= cur_len*2; if (new_len < cur_len) return 0; /* Overflow */ cur_len= new_len; p= my_malloc(PSI_INSTRUMENT_ME, cur_len, MYF(MY_FAE)); if (!p) return 0; } ret= (int) actual; if (fputs(p, stream) < 0) ret= -1; if (alloc) my_free(p); return ret; }
O0
c
my_vfprintf: pushq %rbp movq %rsp, %rbp subq $0x470, %rsp # imm = 0x470 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x420(%rbp) movq %rsi, -0x428(%rbp) movq %rdx, -0x430(%rbp) movl $0x0, -0x434(%rbp) leaq -0x410(%rbp), %rax movq %rax, -0x440(%rbp) movq $0x400, -0x448(%rbp) # imm = 0x400 movq -0x440(%rbp), %rdi movq -0x448(%rbp), %rsi movq -0x428(%rbp), %rdx movq -0x430(%rbp), %rcx callq 0x76980 movq %rax, -0x450(%rbp) movq -0x450(%rbp), %rax movq -0x448(%rbp), %rcx subq $0x1, %rcx cmpq %rcx, %rax jae 0x76b04 jmp 0x76b98 cmpl $0x0, -0x434(%rbp) je 0x76b1b movq -0x440(%rbp), %rdi callq 0x2f8e0 jmp 0x76b25 movl $0x1, -0x434(%rbp) movq -0x448(%rbp), %rax shlq %rax movq %rax, -0x460(%rbp) movq -0x460(%rbp), %rax cmpq -0x448(%rbp), %rax jae 0x76b55 movl $0x0, -0x414(%rbp) jmp 0x76be8 movq -0x460(%rbp), %rax movq %rax, -0x448(%rbp) movq -0x448(%rbp), %rsi xorl %edi, %edi movl $0x8, %edx callq 0x2f560 movq %rax, -0x440(%rbp) cmpq $0x0, -0x440(%rbp) jne 0x76b93 movl $0x0, -0x414(%rbp) jmp 0x76be8 jmp 0x76ac0 movq -0x450(%rbp), %rax movl %eax, -0x454(%rbp) movq -0x440(%rbp), %rdi movq -0x420(%rbp), %rsi callq 0x24330 cmpl $0x0, %eax jge 0x76bc7 movl $0xffffffff, -0x454(%rbp) # imm = 0xFFFFFFFF cmpl $0x0, -0x434(%rbp) je 0x76bdc movq -0x440(%rbp), %rdi callq 0x2f8e0 movl -0x454(%rbp), %eax movl %eax, -0x414(%rbp) movl -0x414(%rbp), %eax movl %eax, -0x464(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x76c15 movl -0x464(%rbp), %eax addq $0x470, %rsp # imm = 0x470 popq %rbp retq callq 0x24320 nopw (%rax,%rax)
my_vfprintf: push rbp mov rbp, rsp sub rsp, 470h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_420], rdi mov [rbp+var_428], rsi mov [rbp+var_430], rdx mov [rbp+var_434], 0 lea rax, [rbp+var_410] mov [rbp+var_440], rax mov [rbp+var_448], 400h loc_76AC0: mov rdi, [rbp+var_440] mov rsi, [rbp+var_448] mov rdx, [rbp+var_428] mov rcx, [rbp+var_430] call my_vsnprintf mov [rbp+var_450], rax mov rax, [rbp+var_450] mov rcx, [rbp+var_448] sub rcx, 1 cmp rax, rcx jnb short loc_76B04 jmp loc_76B98 loc_76B04: cmp [rbp+var_434], 0 jz short loc_76B1B mov rdi, [rbp+var_440] call my_free jmp short loc_76B25 loc_76B1B: mov [rbp+var_434], 1 loc_76B25: mov rax, [rbp+var_448] shl rax, 1 mov [rbp+var_460], rax mov rax, [rbp+var_460] cmp rax, [rbp+var_448] jnb short loc_76B55 mov [rbp+var_414], 0 jmp loc_76BE8 loc_76B55: mov rax, [rbp+var_460] mov [rbp+var_448], rax mov rsi, [rbp+var_448] xor edi, edi mov edx, 8 call my_malloc mov [rbp+var_440], rax cmp [rbp+var_440], 0 jnz short loc_76B93 mov [rbp+var_414], 0 jmp short loc_76BE8 loc_76B93: jmp loc_76AC0 loc_76B98: mov rax, [rbp+var_450] mov [rbp+var_454], eax mov rdi, [rbp+var_440] mov rsi, [rbp+var_420] call _fputs cmp eax, 0 jge short loc_76BC7 mov [rbp+var_454], 0FFFFFFFFh loc_76BC7: cmp [rbp+var_434], 0 jz short loc_76BDC mov rdi, [rbp+var_440] call my_free loc_76BDC: mov eax, [rbp+var_454] mov [rbp+var_414], eax loc_76BE8: mov eax, [rbp+var_414] mov [rbp+var_464], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_76C15 mov eax, [rbp+var_464] add rsp, 470h pop rbp retn loc_76C15: call ___stack_chk_fail
long long my_vfprintf(long long a1, char *a2, int *a3) { unsigned long long v4; // [rsp+10h] [rbp-460h] unsigned int v5; // [rsp+1Ch] [rbp-454h] _BYTE *v6; // [rsp+20h] [rbp-450h] unsigned long long i; // [rsp+28h] [rbp-448h] char *v8; // [rsp+30h] [rbp-440h] int v9; // [rsp+3Ch] [rbp-434h] char v12; // [rsp+60h] [rbp-410h] BYREF unsigned long long v13; // [rsp+468h] [rbp-8h] v13 = __readfsqword(0x28u); v9 = 0; v8 = &v12; for ( i = 1024LL; ; i *= 2LL ) { v6 = my_vsnprintf(v8, i, a2, a3); if ( (unsigned long long)v6 < i - 1 ) break; if ( v9 ) my_free((long long)v8); else v9 = 1; v4 = 2 * i; if ( 2 * i < i ) return 0; v8 = (char *)my_malloc(0, v4, 8); if ( !v8 ) return 0; } v5 = (unsigned int)v6; if ( (int)fputs(v8, a1) < 0 ) v5 = -1; if ( v9 ) my_free((long long)v8); return v5; }
my_vfprintf: PUSH RBP MOV RBP,RSP SUB RSP,0x470 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x420],RDI MOV qword ptr [RBP + -0x428],RSI MOV qword ptr [RBP + -0x430],RDX MOV dword ptr [RBP + -0x434],0x0 LEA RAX,[RBP + -0x410] MOV qword ptr [RBP + -0x440],RAX MOV qword ptr [RBP + -0x448],0x400 LAB_00176ac0: MOV RDI,qword ptr [RBP + -0x440] MOV RSI,qword ptr [RBP + -0x448] MOV RDX,qword ptr [RBP + -0x428] MOV RCX,qword ptr [RBP + -0x430] CALL 0x00176980 MOV qword ptr [RBP + -0x450],RAX MOV RAX,qword ptr [RBP + -0x450] MOV RCX,qword ptr [RBP + -0x448] SUB RCX,0x1 CMP RAX,RCX JNC 0x00176b04 JMP 0x00176b98 LAB_00176b04: CMP dword ptr [RBP + -0x434],0x0 JZ 0x00176b1b MOV RDI,qword ptr [RBP + -0x440] CALL 0x0012f8e0 JMP 0x00176b25 LAB_00176b1b: MOV dword ptr [RBP + -0x434],0x1 LAB_00176b25: MOV RAX,qword ptr [RBP + -0x448] SHL RAX,0x1 MOV qword ptr [RBP + -0x460],RAX MOV RAX,qword ptr [RBP + -0x460] CMP RAX,qword ptr [RBP + -0x448] JNC 0x00176b55 MOV dword ptr [RBP + -0x414],0x0 JMP 0x00176be8 LAB_00176b55: MOV RAX,qword ptr [RBP + -0x460] MOV qword ptr [RBP + -0x448],RAX MOV RSI,qword ptr [RBP + -0x448] XOR EDI,EDI MOV EDX,0x8 CALL 0x0012f560 MOV qword ptr [RBP + -0x440],RAX CMP qword ptr [RBP + -0x440],0x0 JNZ 0x00176b93 MOV dword ptr [RBP + -0x414],0x0 JMP 0x00176be8 LAB_00176b93: JMP 0x00176ac0 LAB_00176b98: MOV RAX,qword ptr [RBP + -0x450] MOV dword ptr [RBP + -0x454],EAX MOV RDI,qword ptr [RBP + -0x440] MOV RSI,qword ptr [RBP + -0x420] CALL 0x00124330 CMP EAX,0x0 JGE 0x00176bc7 MOV dword ptr [RBP + -0x454],0xffffffff LAB_00176bc7: CMP dword ptr [RBP + -0x434],0x0 JZ 0x00176bdc MOV RDI,qword ptr [RBP + -0x440] CALL 0x0012f8e0 LAB_00176bdc: MOV EAX,dword ptr [RBP + -0x454] MOV dword ptr [RBP + -0x414],EAX LAB_00176be8: MOV EAX,dword ptr [RBP + -0x414] MOV dword ptr [RBP + -0x464],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00176c15 MOV EAX,dword ptr [RBP + -0x464] ADD RSP,0x470 POP RBP RET LAB_00176c15: CALL 0x00124320
int4 my_vfprintf(FILE *param_1,int8 param_2,int8 param_3) { bool bVar1; int iVar2; ulong uVar3; long in_FS_OFFSET; int4 local_45c; ulong local_450; char *local_448; int4 local_41c; char local_418 [1032]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); bVar1 = false; local_448 = local_418; local_450 = 0x400; do { uVar3 = my_vsnprintf(local_448,local_450,param_2,param_3); if (uVar3 < local_450 - 1) { local_45c = (int4)uVar3; iVar2 = fputs(local_448,param_1); if (iVar2 < 0) { local_45c = 0xffffffff; } if (bVar1) { my_free(local_448); } local_41c = local_45c; goto LAB_00176be8; } if (bVar1) { my_free(local_448); } else { bVar1 = true; } uVar3 = local_450 << 1; if (uVar3 < local_450) { local_41c = 0; goto LAB_00176be8; } local_448 = (char *)my_malloc(0,uVar3,8); local_450 = uVar3; } while (local_448 != (char *)0x0); local_41c = 0; LAB_00176be8: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_41c; }
53,509
flush_cached_blocks
eloqsql/storage/maria/ma_pagecache.c
static int flush_cached_blocks(PAGECACHE *pagecache, PAGECACHE_FILE *file, PAGECACHE_BLOCK_LINK **cache, PAGECACHE_BLOCK_LINK **end, enum flush_type type, int *first_errno) { int rc= PCFLUSH_OK; my_bool error; uint count= (uint) (end-cache); DBUG_ENTER("flush_cached_blocks"); *first_errno= 0; /* Don't lock the cache during the flush */ pagecache_pthread_mutex_unlock(&pagecache->cache_lock); /* As all blocks referred in 'cache' are marked by PCBLOCK_IN_FLUSH we are guaranteed that no thread will change them */ qsort((uchar*) cache, count, sizeof(*cache), (qsort_cmp) cmp_sec_link); pagecache_pthread_mutex_lock(&pagecache->cache_lock); for (; cache != end; cache++) { PAGECACHE_BLOCK_LINK *block= *cache; /* In the case of non_transactional tables we want to flush also block pinned with reads. This is becasue we may have other threads reading the block during flush, as non transactional tables can have many readers while the one writer is doing the flush. We don't want to do flush pinned blocks during checkpoint. We detect the checkpoint case by checking if type is LAZY. */ if ((type == FLUSH_KEEP_LAZY && block->pins) || block->wlocks) { KEYCACHE_DBUG_PRINT("flush_cached_blocks", ("block: %u (%p) pinned", PCBLOCK_NUMBER(pagecache, block), block)); DBUG_PRINT("info", ("block: %u (%p) pinned", PCBLOCK_NUMBER(pagecache, block), block)); PCBLOCK_INFO(block); /* undo the mark put by flush_pagecache_blocks_int(): */ block->status&= ~PCBLOCK_IN_FLUSH; rc|= PCFLUSH_PINNED; DBUG_PRINT("warning", ("Page pinned")); unreg_request(pagecache, block, 1); if (!*first_errno) *first_errno= HA_ERR_INTERNAL_ERROR; continue; } if (make_lock_and_pin(pagecache, block, PAGECACHE_LOCK_READ, PAGECACHE_PIN, FALSE)) DBUG_ASSERT(0); KEYCACHE_PRINT("flush_cached_blocks", ("block: %u (%p) to be flushed", PCBLOCK_NUMBER(pagecache, block), block)); DBUG_PRINT("info", ("block: %u (%p) to be flushed", PCBLOCK_NUMBER(pagecache, block), block)); PCBLOCK_INFO(block); /** @todo IO If page is contiguous with next page to flush, group flushes in one single my_pwrite(). */ /** It is important to use block->hash_link->file below and not 'file', as the first one is right and the second may have different out-of-date content (see StaleFilePointersInFlush in ma_checkpoint.c). @todo change argument of functions to be File. */ pagecache_pthread_mutex_unlock(&pagecache->cache_lock); error= pagecache_fwrite(pagecache, &block->hash_link->file, block->buffer, block->hash_link->pageno, block->type, pagecache->readwrite_flags); pagecache_pthread_mutex_lock(&pagecache->cache_lock); if (make_lock_and_pin(pagecache, block, PAGECACHE_LOCK_READ_UNLOCK, PAGECACHE_UNPIN, FALSE)) DBUG_ASSERT(0); pagecache->global_cache_write++; if (error) { block->status|= PCBLOCK_ERROR; block->error= (int16) my_errno; my_debug_put_break_here(); if (!*first_errno) *first_errno= my_errno ? my_errno : -1; rc|= PCFLUSH_ERROR; } /* Let to proceed for possible waiting requests to write to the block page. It might happen only during an operation to resize the key cache. */ if (block->wqueue[COND_FOR_SAVED].last_thread) wqueue_release_queue(&block->wqueue[COND_FOR_SAVED]); /* type will never be FLUSH_IGNORE_CHANGED here */ if (! (type == FLUSH_KEEP || type == FLUSH_KEEP_LAZY || type == FLUSH_FORCE_WRITE)) { if (!free_block(pagecache, block, 1)) { pagecache->blocks_changed--; pagecache->global_blocks_changed--; } else { block->status&= ~PCBLOCK_IN_FLUSH; link_to_file_list(pagecache, block, file, 1); } } else { block->status&= ~PCBLOCK_IN_FLUSH; link_to_file_list(pagecache, block, file, 1); unreg_request(pagecache, block, 1); } } DBUG_RETURN(rc); }
O0
c
flush_cached_blocks: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) movl $0x0, -0x34(%rbp) movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax sarq $0x3, %rax movl %eax, -0x3c(%rbp) movq -0x30(%rbp), %rax movl $0x0, (%rax) movq -0x8(%rbp), %rdi addq $0xc8, %rdi callq 0x3bbd0 movq -0x18(%rbp), %rdi movl -0x3c(%rbp), %eax movl %eax, %esi movl $0x8, %edx leaq 0x2c8(%rip), %rcx # 0x41020 callq 0x2a580 movq -0x8(%rbp), %rdi addq $0xc8, %rdi leaq 0x1113d8(%rip), %rsi # 0x152147 movl $0x12a3, %edx # imm = 0x12A3 callq 0x3bb60 movq -0x18(%rbp), %rax cmpq -0x20(%rbp), %rax je 0x4100e movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x48(%rbp) cmpl $0x4, -0x24(%rbp) jne 0x40da2 movq -0x48(%rbp), %rax cmpl $0x0, 0x64(%rax) jne 0x40dac movq -0x48(%rbp), %rax cmpl $0x0, 0x68(%rax) je 0x40dfc jmp 0x40dae jmp 0x40db0 jmp 0x40db2 jmp 0x40db4 jmp 0x40db6 jmp 0x40db8 movq -0x48(%rbp), %rax movzwl 0x74(%rax), %ecx andl $-0x11, %ecx movw %cx, 0x74(%rax) movl -0x34(%rbp), %eax orl $0x2, %eax movl %eax, -0x34(%rbp) jmp 0x40dd2 movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rsi movl $0x1, %edx callq 0x3cac0 movq -0x30(%rbp), %rax cmpl $0x0, (%rax) jne 0x40df7 movq -0x30(%rbp), %rax movl $0x7a, (%rax) jmp 0x40ffd movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rsi movl $0x3, %edx movl $0x2, %ecx xorl %r8d, %r8d callq 0x3c920 cmpb $0x0, %al je 0x40e20 jmp 0x40e1c jmp 0x40e1e jmp 0x40e20 jmp 0x40e22 jmp 0x40e24 jmp 0x40e26 jmp 0x40e28 movq -0x8(%rbp), %rdi addq $0xc8, %rdi callq 0x3bbd0 movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rax movq 0x20(%rax), %rsi addq $0x18, %rsi movq -0x48(%rbp), %rax movq 0x30(%rax), %rdx movq -0x48(%rbp), %rax movq 0x20(%rax), %rax movq 0x60(%rax), %rcx movq -0x48(%rbp), %rax movl 0x7c(%rax), %r8d movq -0x8(%rbp), %rax movq 0x198(%rax), %r9 callq 0x3ed70 movb %al, -0x35(%rbp) movq -0x8(%rbp), %rdi addq $0xc8, %rdi leaq 0x1112be(%rip), %rsi # 0x152147 movl $0x12dd, %edx # imm = 0x12DD callq 0x3bb60 movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rsi movl $0x5, %edx movl $0x3, %ecx xorl %r8d, %r8d callq 0x3c920 cmpb $0x0, %al je 0x40eb7 jmp 0x40eb3 jmp 0x40eb5 jmp 0x40eb7 movq -0x8(%rbp), %rax movq 0x178(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x178(%rax) cmpb $0x0, -0x35(%rbp) je 0x40f31 movq -0x48(%rbp), %rax movzwl 0x74(%rax), %ecx orl $0x1, %ecx movw %cx, 0x74(%rax) callq 0xf6080 movl (%rax), %eax movw %ax, %cx movq -0x48(%rbp), %rax movw %cx, 0x76(%rax) jmp 0x40ef6 movq -0x30(%rbp), %rax cmpl $0x0, (%rax) jne 0x40f28 callq 0xf6080 cmpl $0x0, (%rax) je 0x40f15 callq 0xf6080 movl (%rax), %eax movl %eax, -0x4c(%rbp) jmp 0x40f1f movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %eax, -0x4c(%rbp) jmp 0x40f1f movl -0x4c(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, (%rax) movl -0x34(%rbp), %eax orl $0x1, %eax movl %eax, -0x34(%rbp) movq -0x48(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x40f4d movq -0x48(%rbp), %rdi addq $0x48, %rdi addq $0x8, %rdi callq 0xff640 cmpl $0x0, -0x24(%rbp) je 0x40fc4 cmpl $0x4, -0x24(%rbp) je 0x40fc4 cmpl $0x3, -0x24(%rbp) je 0x40fc4 movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rsi movl $0x1, %edx callq 0x400d0 cmpb $0x0, %al jne 0x40f9d movq -0x8(%rbp), %rax movq 0x58(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x58(%rax) movq -0x8(%rbp), %rax movq 0x168(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x168(%rax) jmp 0x40fc2 movq -0x48(%rbp), %rax movzwl 0x74(%rax), %ecx andl $-0x11, %ecx movw %cx, 0x74(%rax) movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x10(%rbp), %rdx movl $0x1, %ecx callq 0x40330 jmp 0x40ffb movq -0x48(%rbp), %rax movzwl 0x74(%rax), %ecx andl $-0x11, %ecx movw %cx, 0x74(%rax) movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x10(%rbp), %rdx movl $0x1, %ecx callq 0x40330 movq -0x8(%rbp), %rdi movq -0x48(%rbp), %rsi movl $0x1, %edx callq 0x3cac0 jmp 0x40ffd movq -0x18(%rbp), %rax addq $0x8, %rax movq %rax, -0x18(%rbp) jmp 0x40d79 jmp 0x41010 movl -0x34(%rbp), %eax movl %eax, -0x50(%rbp) movl -0x50(%rbp), %eax addq $0x50, %rsp popq %rbp retq nop
flush_cached_blocks: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 mov [rbp+var_34], 0 mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx sar rax, 3 mov [rbp+var_3C], eax mov rax, [rbp+var_30] mov dword ptr [rax], 0 mov rdi, [rbp+var_8] add rdi, 0C8h call inline_mysql_mutex_unlock_0 mov rdi, [rbp+var_18] mov eax, [rbp+var_3C] mov esi, eax mov edx, 8 lea rcx, cmp_sec_link call _qsort mov rdi, [rbp+var_8] add rdi, 0C8h lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 12A3h call inline_mysql_mutex_lock_0 loc_40D79: mov rax, [rbp+var_18] cmp rax, [rbp+var_20] jz loc_4100E mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_48], rax cmp [rbp+var_24], 4 jnz short loc_40DA2 mov rax, [rbp+var_48] cmp dword ptr [rax+64h], 0 jnz short loc_40DAC loc_40DA2: mov rax, [rbp+var_48] cmp dword ptr [rax+68h], 0 jz short loc_40DFC loc_40DAC: jmp short $+2 loc_40DAE: jmp short $+2 loc_40DB0: jmp short $+2 loc_40DB2: jmp short $+2 loc_40DB4: jmp short $+2 loc_40DB6: jmp short $+2 loc_40DB8: mov rax, [rbp+var_48] movzx ecx, word ptr [rax+74h] and ecx, 0FFFFFFEFh mov [rax+74h], cx mov eax, [rbp+var_34] or eax, 2 mov [rbp+var_34], eax jmp short $+2 loc_40DD2: mov rdi, [rbp+var_8] mov rsi, [rbp+var_48] mov edx, 1 call unreg_request mov rax, [rbp+var_30] cmp dword ptr [rax], 0 jnz short loc_40DF7 mov rax, [rbp+var_30] mov dword ptr [rax], 7Ah ; 'z' loc_40DF7: jmp loc_40FFD loc_40DFC: mov rdi, [rbp+var_8] mov rsi, [rbp+var_48] mov edx, 3 mov ecx, 2 xor r8d, r8d call make_lock_and_pin cmp al, 0 jz short loc_40E20 jmp short $+2 loc_40E1C: jmp short $+2 loc_40E1E: jmp short $+2 loc_40E20: jmp short $+2 loc_40E22: jmp short $+2 loc_40E24: jmp short $+2 loc_40E26: jmp short $+2 loc_40E28: mov rdi, [rbp+var_8] add rdi, 0C8h call inline_mysql_mutex_unlock_0 mov rdi, [rbp+var_8] mov rax, [rbp+var_48] mov rsi, [rax+20h] add rsi, 18h mov rax, [rbp+var_48] mov rdx, [rax+30h] mov rax, [rbp+var_48] mov rax, [rax+20h] mov rcx, [rax+60h] mov rax, [rbp+var_48] mov r8d, [rax+7Ch] mov rax, [rbp+var_8] mov r9, [rax+198h] call pagecache_fwrite mov [rbp+var_35], al mov rdi, [rbp+var_8] add rdi, 0C8h lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 12DDh call inline_mysql_mutex_lock_0 mov rdi, [rbp+var_8] mov rsi, [rbp+var_48] mov edx, 5 mov ecx, 3 xor r8d, r8d call make_lock_and_pin cmp al, 0 jz short loc_40EB7 jmp short $+2 loc_40EB3: jmp short $+2 loc_40EB5: jmp short $+2 loc_40EB7: mov rax, [rbp+var_8] mov rcx, [rax+178h] add rcx, 1 mov [rax+178h], rcx cmp [rbp+var_35], 0 jz short loc_40F31 mov rax, [rbp+var_48] movzx ecx, word ptr [rax+74h] or ecx, 1 mov [rax+74h], cx call _my_thread_var mov eax, [rax] mov cx, ax mov rax, [rbp+var_48] mov [rax+76h], cx jmp short $+2 loc_40EF6: mov rax, [rbp+var_30] cmp dword ptr [rax], 0 jnz short loc_40F28 call _my_thread_var cmp dword ptr [rax], 0 jz short loc_40F15 call _my_thread_var mov eax, [rax] mov [rbp+var_4C], eax jmp short loc_40F1F loc_40F15: mov eax, 0FFFFFFFFh mov [rbp+var_4C], eax jmp short $+2 loc_40F1F: mov ecx, [rbp+var_4C] mov rax, [rbp+var_30] mov [rax], ecx loc_40F28: mov eax, [rbp+var_34] or eax, 1 mov [rbp+var_34], eax loc_40F31: mov rax, [rbp+var_48] cmp qword ptr [rax+50h], 0 jz short loc_40F4D mov rdi, [rbp+var_48] add rdi, 48h ; 'H' add rdi, 8 call wqueue_release_queue loc_40F4D: cmp [rbp+var_24], 0 jz short loc_40FC4 cmp [rbp+var_24], 4 jz short loc_40FC4 cmp [rbp+var_24], 3 jz short loc_40FC4 mov rdi, [rbp+var_8] mov rsi, [rbp+var_48] mov edx, 1 call free_block cmp al, 0 jnz short loc_40F9D mov rax, [rbp+var_8] mov rcx, [rax+58h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+58h], rcx mov rax, [rbp+var_8] mov rcx, [rax+168h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+168h], rcx jmp short loc_40FC2 loc_40F9D: mov rax, [rbp+var_48] movzx ecx, word ptr [rax+74h] and ecx, 0FFFFFFEFh mov [rax+74h], cx mov rdi, [rbp+var_8] mov rsi, [rbp+var_48] mov rdx, [rbp+var_10] mov ecx, 1 call link_to_file_list loc_40FC2: jmp short loc_40FFB loc_40FC4: mov rax, [rbp+var_48] movzx ecx, word ptr [rax+74h] and ecx, 0FFFFFFEFh mov [rax+74h], cx mov rdi, [rbp+var_8] mov rsi, [rbp+var_48] mov rdx, [rbp+var_10] mov ecx, 1 call link_to_file_list mov rdi, [rbp+var_8] mov rsi, [rbp+var_48] mov edx, 1 call unreg_request loc_40FFB: jmp short $+2 loc_40FFD: mov rax, [rbp+var_18] add rax, 8 mov [rbp+var_18], rax jmp loc_40D79 loc_4100E: jmp short $+2 loc_41010: mov eax, [rbp+var_34] mov [rbp+var_50], eax mov eax, [rbp+var_50] add rsp, 50h pop rbp retn
long long flush_cached_blocks(_QWORD *a1, long long a2, long long *a3, long long *a4, int a5, int *a6) { int v7; // [rsp+4h] [rbp-4Ch] long long v8; // [rsp+8h] [rbp-48h] unsigned int v9; // [rsp+14h] [rbp-3Ch] char v10; // [rsp+1Bh] [rbp-35h] unsigned int v11; // [rsp+1Ch] [rbp-34h] long long *v15; // [rsp+38h] [rbp-18h] v15 = a3; v11 = 0; v9 = a4 - a3; *a6 = 0; inline_mysql_mutex_unlock_0((long long)(a1 + 25)); qsort(v15, v9, 8LL, cmp_sec_link); inline_mysql_mutex_lock_0( (long long)(a1 + 25), (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12A3u); while ( v15 != a4 ) { v8 = *v15; if ( a5 == 4 && *(_DWORD *)(v8 + 100) || *(_DWORD *)(v8 + 104) ) { *(_WORD *)(v8 + 116) &= ~0x10u; v11 |= 2u; unreg_request(a1, v8, 1); if ( !*a6 ) *a6 = 122; } else { make_lock_and_pin((long long)a1, v8, 3, 2, 0); inline_mysql_mutex_unlock_0((long long)(a1 + 25)); v10 = pagecache_fwrite( (long long)a1, *(_QWORD *)(v8 + 32) + 24LL, *(_QWORD *)(v8 + 48), *(_QWORD *)(*(_QWORD *)(v8 + 32) + 96LL), *(_DWORD *)(v8 + 124), a1[51]); inline_mysql_mutex_lock_0( (long long)(a1 + 25), (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12DDu); make_lock_and_pin((long long)a1, v8, 5, 3, 0); ++a1[47]; if ( v10 ) { *(_WORD *)(v8 + 116) |= 1u; *(_WORD *)(v8 + 118) = *(_DWORD *)my_thread_var(); if ( !*a6 ) { if ( *(_DWORD *)my_thread_var() ) v7 = *(_DWORD *)my_thread_var(); else v7 = -1; *a6 = v7; } v11 |= 1u; } if ( *(_QWORD *)(v8 + 80) ) wqueue_release_queue(v8 + 80); if ( !a5 || a5 == 4 || a5 == 3 ) { *(_WORD *)(v8 + 116) &= ~0x10u; link_to_file_list(a1, v8, a2, 1); unreg_request(a1, v8, 1); } else if ( free_block(a1, v8, 1) ) { *(_WORD *)(v8 + 116) &= ~0x10u; link_to_file_list(a1, v8, a2, 1); } else { --a1[11]; --a1[45]; } } ++v15; } return v11; }
flush_cached_blocks: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 MOV dword ptr [RBP + -0x34],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX SAR RAX,0x3 MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 CALL 0x0013bbd0 MOV RDI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x3c] MOV ESI,EAX MOV EDX,0x8 LEA RCX,[0x141020] CALL 0x0012a580 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 LEA RSI,[0x252147] MOV EDX,0x12a3 CALL 0x0013bb60 LAB_00140d79: MOV RAX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RBP + -0x20] JZ 0x0014100e MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX CMP dword ptr [RBP + -0x24],0x4 JNZ 0x00140da2 MOV RAX,qword ptr [RBP + -0x48] CMP dword ptr [RAX + 0x64],0x0 JNZ 0x00140dac LAB_00140da2: MOV RAX,qword ptr [RBP + -0x48] CMP dword ptr [RAX + 0x68],0x0 JZ 0x00140dfc LAB_00140dac: JMP 0x00140dae LAB_00140dae: JMP 0x00140db0 LAB_00140db0: JMP 0x00140db2 LAB_00140db2: JMP 0x00140db4 LAB_00140db4: JMP 0x00140db6 LAB_00140db6: JMP 0x00140db8 LAB_00140db8: MOV RAX,qword ptr [RBP + -0x48] MOVZX ECX,word ptr [RAX + 0x74] AND ECX,0xffffffef MOV word ptr [RAX + 0x74],CX MOV EAX,dword ptr [RBP + -0x34] OR EAX,0x2 MOV dword ptr [RBP + -0x34],EAX JMP 0x00140dd2 LAB_00140dd2: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,0x1 CALL 0x0013cac0 MOV RAX,qword ptr [RBP + -0x30] CMP dword ptr [RAX],0x0 JNZ 0x00140df7 MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],0x7a LAB_00140df7: JMP 0x00140ffd LAB_00140dfc: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,0x3 MOV ECX,0x2 XOR R8D,R8D CALL 0x0013c920 CMP AL,0x0 JZ 0x00140e20 JMP 0x00140e1c LAB_00140e1c: JMP 0x00140e1e LAB_00140e1e: JMP 0x00140e20 LAB_00140e20: JMP 0x00140e22 LAB_00140e22: JMP 0x00140e24 LAB_00140e24: JMP 0x00140e26 LAB_00140e26: JMP 0x00140e28 LAB_00140e28: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 CALL 0x0013bbd0 MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x48] MOV RSI,qword ptr [RAX + 0x20] ADD RSI,0x18 MOV RAX,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX + 0x60] MOV RAX,qword ptr [RBP + -0x48] MOV R8D,dword ptr [RAX + 0x7c] MOV RAX,qword ptr [RBP + -0x8] MOV R9,qword ptr [RAX + 0x198] CALL 0x0013ed70 MOV byte ptr [RBP + -0x35],AL MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0xc8 LEA RSI,[0x252147] MOV EDX,0x12dd CALL 0x0013bb60 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,0x5 MOV ECX,0x3 XOR R8D,R8D CALL 0x0013c920 CMP AL,0x0 JZ 0x00140eb7 JMP 0x00140eb3 LAB_00140eb3: JMP 0x00140eb5 LAB_00140eb5: JMP 0x00140eb7 LAB_00140eb7: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x178] ADD RCX,0x1 MOV qword ptr [RAX + 0x178],RCX CMP byte ptr [RBP + -0x35],0x0 JZ 0x00140f31 MOV RAX,qword ptr [RBP + -0x48] MOVZX ECX,word ptr [RAX + 0x74] OR ECX,0x1 MOV word ptr [RAX + 0x74],CX CALL 0x001f6080 MOV EAX,dword ptr [RAX] MOV CX,AX MOV RAX,qword ptr [RBP + -0x48] MOV word ptr [RAX + 0x76],CX JMP 0x00140ef6 LAB_00140ef6: MOV RAX,qword ptr [RBP + -0x30] CMP dword ptr [RAX],0x0 JNZ 0x00140f28 CALL 0x001f6080 CMP dword ptr [RAX],0x0 JZ 0x00140f15 CALL 0x001f6080 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4c],EAX JMP 0x00140f1f LAB_00140f15: MOV EAX,0xffffffff MOV dword ptr [RBP + -0x4c],EAX JMP 0x00140f1f LAB_00140f1f: MOV ECX,dword ptr [RBP + -0x4c] MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX],ECX LAB_00140f28: MOV EAX,dword ptr [RBP + -0x34] OR EAX,0x1 MOV dword ptr [RBP + -0x34],EAX LAB_00140f31: MOV RAX,qword ptr [RBP + -0x48] CMP qword ptr [RAX + 0x50],0x0 JZ 0x00140f4d MOV RDI,qword ptr [RBP + -0x48] ADD RDI,0x48 ADD RDI,0x8 CALL 0x001ff640 LAB_00140f4d: CMP dword ptr [RBP + -0x24],0x0 JZ 0x00140fc4 CMP dword ptr [RBP + -0x24],0x4 JZ 0x00140fc4 CMP dword ptr [RBP + -0x24],0x3 JZ 0x00140fc4 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,0x1 CALL 0x001400d0 CMP AL,0x0 JNZ 0x00140f9d MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x58] ADD RCX,-0x1 MOV qword ptr [RAX + 0x58],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x168] ADD RCX,-0x1 MOV qword ptr [RAX + 0x168],RCX JMP 0x00140fc2 LAB_00140f9d: MOV RAX,qword ptr [RBP + -0x48] MOVZX ECX,word ptr [RAX + 0x74] AND ECX,0xffffffef MOV word ptr [RAX + 0x74],CX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,0x1 CALL 0x00140330 LAB_00140fc2: JMP 0x00140ffb LAB_00140fc4: MOV RAX,qword ptr [RBP + -0x48] MOVZX ECX,word ptr [RAX + 0x74] AND ECX,0xffffffef MOV word ptr [RAX + 0x74],CX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,0x1 CALL 0x00140330 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x48] MOV EDX,0x1 CALL 0x0013cac0 LAB_00140ffb: JMP 0x00140ffd LAB_00140ffd: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x8 MOV qword ptr [RBP + -0x18],RAX JMP 0x00140d79 LAB_0014100e: JMP 0x00141010 LAB_00141010: MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x50],EAX MOV EAX,dword ptr [RBP + -0x50] ADD RSP,0x50 POP RBP RET
uint flush_cached_blocks(long param_1,int8 param_2,long *param_3,long *param_4,int param_5, int *param_6) { long lVar1; char cVar2; int4 *puVar3; int *piVar4; int local_54; uint local_3c; long *local_20; local_3c = 0; *param_6 = 0; inline_mysql_mutex_unlock(param_1 + 200); qsort(param_3,(long)param_4 - (long)param_3 >> 3 & 0xffffffff,8,cmp_sec_link); inline_mysql_mutex_lock (param_1 + 200,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12a3); for (local_20 = param_3; local_20 != param_4; local_20 = local_20 + 1) { lVar1 = *local_20; if (((param_5 == 4) && (*(int *)(lVar1 + 100) != 0)) || (*(int *)(lVar1 + 0x68) != 0)) { *(ushort *)(lVar1 + 0x74) = *(ushort *)(lVar1 + 0x74) & 0xffef; local_3c = local_3c | 2; unreg_request(param_1,lVar1,1); if (*param_6 == 0) { *param_6 = 0x7a; } } else { make_lock_and_pin(param_1,lVar1,3,2,0); inline_mysql_mutex_unlock(param_1 + 200); cVar2 = pagecache_fwrite(param_1,*(long *)(lVar1 + 0x20) + 0x18,*(int8 *)(lVar1 + 0x30), *(int8 *)(*(long *)(lVar1 + 0x20) + 0x60), *(int4 *)(lVar1 + 0x7c),*(int8 *)(param_1 + 0x198)); inline_mysql_mutex_lock (param_1 + 200, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c",0x12dd); make_lock_and_pin(param_1,lVar1,5,3,0); *(long *)(param_1 + 0x178) = *(long *)(param_1 + 0x178) + 1; if (cVar2 != '\0') { *(ushort *)(lVar1 + 0x74) = *(ushort *)(lVar1 + 0x74) | 1; puVar3 = (int4 *)_my_thread_var(); *(short *)(lVar1 + 0x76) = (short)*puVar3; if (*param_6 == 0) { piVar4 = (int *)_my_thread_var(); if (*piVar4 == 0) { local_54 = -1; } else { piVar4 = (int *)_my_thread_var(); local_54 = *piVar4; } *param_6 = local_54; } local_3c = local_3c | 1; } if (*(long *)(lVar1 + 0x50) != 0) { wqueue_release_queue(lVar1 + 0x50); } if (((param_5 == 0) || (param_5 == 4)) || (param_5 == 3)) { *(ushort *)(lVar1 + 0x74) = *(ushort *)(lVar1 + 0x74) & 0xffef; link_to_file_list(param_1,lVar1,param_2,1); unreg_request(param_1,lVar1,1); } else { cVar2 = free_block(param_1,lVar1,1); if (cVar2 == '\0') { *(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + -1; *(long *)(param_1 + 0x168) = *(long *)(param_1 + 0x168) + -1; } else { *(ushort *)(lVar1 + 0x74) = *(ushort *)(lVar1 + 0x74) & 0xffef; link_to_file_list(param_1,lVar1,param_2,1); } } } } return local_3c; }
53,510
flush_cached_blocks
eloqsql/storage/maria/ma_pagecache.c
static int flush_cached_blocks(PAGECACHE *pagecache, PAGECACHE_FILE *file, PAGECACHE_BLOCK_LINK **cache, PAGECACHE_BLOCK_LINK **end, enum flush_type type, int *first_errno) { int rc= PCFLUSH_OK; my_bool error; uint count= (uint) (end-cache); DBUG_ENTER("flush_cached_blocks"); *first_errno= 0; /* Don't lock the cache during the flush */ pagecache_pthread_mutex_unlock(&pagecache->cache_lock); /* As all blocks referred in 'cache' are marked by PCBLOCK_IN_FLUSH we are guaranteed that no thread will change them */ qsort((uchar*) cache, count, sizeof(*cache), (qsort_cmp) cmp_sec_link); pagecache_pthread_mutex_lock(&pagecache->cache_lock); for (; cache != end; cache++) { PAGECACHE_BLOCK_LINK *block= *cache; /* In the case of non_transactional tables we want to flush also block pinned with reads. This is becasue we may have other threads reading the block during flush, as non transactional tables can have many readers while the one writer is doing the flush. We don't want to do flush pinned blocks during checkpoint. We detect the checkpoint case by checking if type is LAZY. */ if ((type == FLUSH_KEEP_LAZY && block->pins) || block->wlocks) { KEYCACHE_DBUG_PRINT("flush_cached_blocks", ("block: %u (%p) pinned", PCBLOCK_NUMBER(pagecache, block), block)); DBUG_PRINT("info", ("block: %u (%p) pinned", PCBLOCK_NUMBER(pagecache, block), block)); PCBLOCK_INFO(block); /* undo the mark put by flush_pagecache_blocks_int(): */ block->status&= ~PCBLOCK_IN_FLUSH; rc|= PCFLUSH_PINNED; DBUG_PRINT("warning", ("Page pinned")); unreg_request(pagecache, block, 1); if (!*first_errno) *first_errno= HA_ERR_INTERNAL_ERROR; continue; } if (make_lock_and_pin(pagecache, block, PAGECACHE_LOCK_READ, PAGECACHE_PIN, FALSE)) DBUG_ASSERT(0); KEYCACHE_PRINT("flush_cached_blocks", ("block: %u (%p) to be flushed", PCBLOCK_NUMBER(pagecache, block), block)); DBUG_PRINT("info", ("block: %u (%p) to be flushed", PCBLOCK_NUMBER(pagecache, block), block)); PCBLOCK_INFO(block); /** @todo IO If page is contiguous with next page to flush, group flushes in one single my_pwrite(). */ /** It is important to use block->hash_link->file below and not 'file', as the first one is right and the second may have different out-of-date content (see StaleFilePointersInFlush in ma_checkpoint.c). @todo change argument of functions to be File. */ pagecache_pthread_mutex_unlock(&pagecache->cache_lock); error= pagecache_fwrite(pagecache, &block->hash_link->file, block->buffer, block->hash_link->pageno, block->type, pagecache->readwrite_flags); pagecache_pthread_mutex_lock(&pagecache->cache_lock); if (make_lock_and_pin(pagecache, block, PAGECACHE_LOCK_READ_UNLOCK, PAGECACHE_UNPIN, FALSE)) DBUG_ASSERT(0); pagecache->global_cache_write++; if (error) { block->status|= PCBLOCK_ERROR; block->error= (int16) my_errno; my_debug_put_break_here(); if (!*first_errno) *first_errno= my_errno ? my_errno : -1; rc|= PCFLUSH_ERROR; } /* Let to proceed for possible waiting requests to write to the block page. It might happen only during an operation to resize the key cache. */ if (block->wqueue[COND_FOR_SAVED].last_thread) wqueue_release_queue(&block->wqueue[COND_FOR_SAVED]); /* type will never be FLUSH_IGNORE_CHANGED here */ if (! (type == FLUSH_KEEP || type == FLUSH_KEEP_LAZY || type == FLUSH_FORCE_WRITE)) { if (!free_block(pagecache, block, 1)) { pagecache->blocks_changed--; pagecache->global_blocks_changed--; } else { block->status&= ~PCBLOCK_IN_FLUSH; link_to_file_list(pagecache, block, file, 1); } } else { block->status&= ~PCBLOCK_IN_FLUSH; link_to_file_list(pagecache, block, file, 1); unreg_request(pagecache, block, 1); } } DBUG_RETURN(rc); }
O3
c
flush_cached_blocks: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r9, %r14 movl %r8d, -0x2c(%rbp) movq %rdx, %r12 movq %rsi, -0x38(%rbp) movq %rdi, %r13 movq %rcx, -0x48(%rbp) movq %rcx, %rbx subq %rdx, %rbx shrq $0x3, %rbx movl $0x0, (%r9) leaq 0xc8(%rdi), %r15 movq 0x108(%rdi), %rdi testq %rdi, %rdi jne 0x3df2d movq %r15, %rdi callq 0x291c0 movl %ebx, %esi leaq 0x258(%rip), %rcx # 0x3df5b movl $0x8, %edx movq %r12, %rdi callq 0x295c0 cmpq $0x0, 0x108(%r13) jne 0x3df42 movq %r15, %rdi callq 0x29200 cmpq -0x48(%rbp), %r12 movl -0x2c(%rbp), %eax je 0x3df18 movq %r15, -0x50(%rbp) xorl %r15d, %r15d movq %r14, -0x40(%rbp) movq (%r12), %rbx cmpl $0x4, %eax jne 0x3dd4d cmpl $0x0, 0x64(%rbx) jne 0x3dd53 cmpl $0x0, 0x68(%rbx) je 0x3dd81 andb $-0x11, 0x74(%rbx) orl $0x2, %r15d movq %r13, %rdi movq %rbx, %rsi movl $0x1, %edx callq 0x3abd3 cmpl $0x0, (%r14) jne 0x3de9c movl $0x7a, (%r14) jmp 0x3de9c movl %r15d, -0x30(%rbp) movq %r13, %rdi movq %rbx, %rsi movl $0x3, %edx movl $0x2, %ecx callq 0x3aa63 movq 0x108(%r13), %rdi testq %rdi, %rdi jne 0x3deea movq -0x50(%rbp), %r15 movq %r15, %rdi callq 0x291c0 movq 0x20(%rbx), %rsi movq 0x30(%rbx), %rdx movq 0x60(%rsi), %rcx addq $0x18, %rsi movq 0x198(%r13), %r8 movq %r13, %rdi callq 0x3cbe4 movl %eax, %r14d cmpq $0x0, 0x108(%r13) jne 0x3deff movq %r15, %rdi callq 0x29200 movq %r13, %rdi movq %rbx, %rsi movl $0x5, %edx movl $0x3, %ecx callq 0x3aa63 incq 0x178(%r13) testb %r14b, %r14b movl -0x30(%rbp), %r15d je 0x3de40 orb $0x1, 0x74(%rbx) callq 0xa1b26 movzwl (%rax), %eax movw %ax, 0x76(%rbx) movq -0x40(%rbp), %r14 cmpl $0x0, (%r14) jne 0x3de4e callq 0xa1b26 cmpl $0x0, (%rax) je 0x3de46 callq 0xa1b26 movl (%rax), %eax jmp 0x3de4b movq -0x40(%rbp), %r14 jmp 0x3de52 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movl %eax, (%r14) orl $0x1, %r15d cmpq $0x0, 0x50(%rbx) je 0x3de62 leaq 0x50(%rbx), %rdi callq 0xa66e7 movl -0x2c(%rbp), %eax cmpl $0x4, %eax ja 0x3deaf movl $0x19, %ecx btl %eax, %ecx jae 0x3deaf andb $-0x11, 0x74(%rbx) movq %r13, %rdi movq %rbx, %rsi movq -0x38(%rbp), %rdx movl $0x1, %ecx callq 0x3d95e movq %r13, %rdi movq %rbx, %rsi movl $0x1, %edx callq 0x3abd3 movl -0x2c(%rbp), %eax addq $0x8, %r12 cmpq -0x48(%rbp), %r12 jne 0x3dd3e jmp 0x3df1b movq %r13, %rdi movq %rbx, %rsi movl $0x1, %edx callq 0x3d785 testb %al, %al je 0x3dedd andb $-0x11, 0x74(%rbx) movq %r13, %rdi movq %rbx, %rsi movq -0x38(%rbp), %rdx movl $0x1, %ecx callq 0x3d95e jmp 0x3de9c decq 0x58(%r13) decq 0x168(%r13) jmp 0x3de9c leaq 0x34811f(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x3ddaa movq %r15, %rdi leaq 0x9c23e(%rip), %rsi # 0xda147 movl $0x12dd, %edx # imm = 0x12DD callq 0x2eb6f jmp 0x3ddee xorl %r15d, %r15d movl %r15d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x3480dc(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x3dcf2 leaq 0x9c1fe(%rip), %rsi # 0xda147 movq %r15, %rdi movl $0x12a3, %edx # imm = 0x12A3 callq 0x2eb6f jmp 0x3dd26
flush_cached_blocks: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r14, r9 mov [rbp+var_2C], r8d mov r12, rdx mov [rbp+var_38], rsi mov r13, rdi mov [rbp+var_48], rcx mov rbx, rcx sub rbx, rdx shr rbx, 3 mov dword ptr [r9], 0 lea r15, [rdi+0C8h] mov rdi, [rdi+108h] test rdi, rdi jnz loc_3DF2D loc_3DCF2: mov rdi, r15 call _pthread_mutex_unlock mov esi, ebx lea rcx, cmp_sec_link mov edx, 8 mov rdi, r12 call _qsort cmp qword ptr [r13+108h], 0 jnz loc_3DF42 mov rdi, r15 call _pthread_mutex_lock loc_3DD26: cmp r12, [rbp+var_48] mov eax, [rbp+var_2C] jz loc_3DF18 mov [rbp+var_50], r15 xor r15d, r15d mov [rbp+var_40], r14 loc_3DD3E: mov rbx, [r12] cmp eax, 4 jnz short loc_3DD4D cmp dword ptr [rbx+64h], 0 jnz short loc_3DD53 loc_3DD4D: cmp dword ptr [rbx+68h], 0 jz short loc_3DD81 loc_3DD53: and byte ptr [rbx+74h], 0EFh or r15d, 2 mov rdi, r13 mov rsi, rbx mov edx, 1 call unreg_request cmp dword ptr [r14], 0 jnz loc_3DE9C mov dword ptr [r14], 7Ah ; 'z' jmp loc_3DE9C loc_3DD81: mov [rbp+var_30], r15d mov rdi, r13 mov rsi, rbx mov edx, 3 mov ecx, 2 call make_lock_and_pin mov rdi, [r13+108h] test rdi, rdi jnz loc_3DEEA loc_3DDAA: mov r15, [rbp+var_50] mov rdi, r15 call _pthread_mutex_unlock mov rsi, [rbx+20h] mov rdx, [rbx+30h] mov rcx, [rsi+60h] add rsi, 18h mov r8, [r13+198h] mov rdi, r13 call pagecache_fwrite mov r14d, eax cmp qword ptr [r13+108h], 0 jnz loc_3DEFF mov rdi, r15 call _pthread_mutex_lock loc_3DDEE: mov rdi, r13 mov rsi, rbx mov edx, 5 mov ecx, 3 call make_lock_and_pin inc qword ptr [r13+178h] test r14b, r14b mov r15d, [rbp+var_30] jz short loc_3DE40 or byte ptr [rbx+74h], 1 call _my_thread_var movzx eax, word ptr [rax] mov [rbx+76h], ax mov r14, [rbp+var_40] cmp dword ptr [r14], 0 jnz short loc_3DE4E call _my_thread_var cmp dword ptr [rax], 0 jz short loc_3DE46 call _my_thread_var mov eax, [rax] jmp short loc_3DE4B loc_3DE40: mov r14, [rbp+var_40] jmp short loc_3DE52 loc_3DE46: mov eax, 0FFFFFFFFh loc_3DE4B: mov [r14], eax loc_3DE4E: or r15d, 1 loc_3DE52: cmp qword ptr [rbx+50h], 0 jz short loc_3DE62 lea rdi, [rbx+50h] call wqueue_release_queue loc_3DE62: mov eax, [rbp+var_2C] cmp eax, 4 ja short loc_3DEAF mov ecx, 19h bt ecx, eax jnb short loc_3DEAF and byte ptr [rbx+74h], 0EFh mov rdi, r13 mov rsi, rbx mov rdx, [rbp+var_38] mov ecx, 1 call link_to_file_list mov rdi, r13 mov rsi, rbx mov edx, 1 call unreg_request loc_3DE9C: mov eax, [rbp+var_2C] add r12, 8 cmp r12, [rbp+var_48] jnz loc_3DD3E jmp short loc_3DF1B loc_3DEAF: mov rdi, r13 mov rsi, rbx mov edx, 1 call free_block test al, al jz short loc_3DEDD and byte ptr [rbx+74h], 0EFh mov rdi, r13 mov rsi, rbx mov rdx, [rbp+var_38] mov ecx, 1 call link_to_file_list jmp short loc_3DE9C loc_3DEDD: dec qword ptr [r13+58h] dec qword ptr [r13+168h] jmp short loc_3DE9C loc_3DEEA: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_3DDAA loc_3DEFF: mov rdi, r15 lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 12DDh call psi_mutex_lock jmp loc_3DDEE loc_3DF18: xor r15d, r15d loc_3DF1B: mov eax, r15d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3DF2D: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_3DCF2 loc_3DF42: lea rsi, aWorkspaceLlm4b_25; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov edx, 12A3h call psi_mutex_lock jmp loc_3DD26
long long flush_cached_blocks(_QWORD *a1, long long a2, long long *a3, long long *a4, unsigned int a5, int *a6) { int *v6; // r14 long long *v7; // r12 unsigned long long v8; // rbx long long v9; // r15 unsigned int v10; // eax unsigned int v11; // r15d long long v12; // rbx char v13; // r14 int v14; // eax int v15; // ecx long long v17; // [rsp+0h] [rbp-50h] int *v19; // [rsp+10h] [rbp-40h] v6 = a6; v7 = a3; v8 = (unsigned long long)((char *)a4 - (char *)a3) >> 3; *a6 = 0; v9 = (long long)(a1 + 25); if ( a1[33] ) PSI_server[44](); pthread_mutex_unlock(v9); qsort(v7, (unsigned int)v8, 8LL, cmp_sec_link); if ( a1[33] ) psi_mutex_lock(v9, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12A3u); else pthread_mutex_lock(v9); v10 = a5; if ( v7 == a4 ) { return 0; } else { v17 = (long long)(a1 + 25); v11 = 0; v19 = v6; do { v12 = *v7; if ( v10 == 4 && *(_DWORD *)(v12 + 100) || *(_DWORD *)(v12 + 104) ) { *(_BYTE *)(v12 + 116) &= ~0x10u; v11 |= 2u; unreg_request(a1, v12, 1); if ( !*v6 ) *v6 = 122; } else { make_lock_and_pin((long long)a1, v12, 3, 2); if ( a1[33] ) PSI_server[44](); pthread_mutex_unlock(v17); v13 = pagecache_fwrite( (long long)a1, *(_QWORD *)(v12 + 32) + 24LL, *(_QWORD *)(v12 + 48), *(_QWORD *)(*(_QWORD *)(v12 + 32) + 96LL), a1[51]); if ( a1[33] ) psi_mutex_lock(v17, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12DDu); else pthread_mutex_lock(v17); make_lock_and_pin((long long)a1, v12, 5, 3); ++a1[47]; if ( v13 ) { *(_BYTE *)(v12 + 116) |= 1u; *(_WORD *)(v12 + 118) = *(_WORD *)my_thread_var(a1); v6 = v19; if ( !*v19 ) { if ( *(_DWORD *)my_thread_var(a1) ) v14 = *(_DWORD *)my_thread_var(a1); else v14 = -1; *v19 = v14; } v11 |= 1u; } else { v6 = v19; } if ( *(_QWORD *)(v12 + 80) ) wqueue_release_queue(v12 + 80); if ( a5 <= 4 && (v15 = 25, _bittest(&v15, a5)) ) { *(_BYTE *)(v12 + 116) &= ~0x10u; link_to_file_list((long long)a1, v12, a2, 1); unreg_request(a1, v12, 1); } else if ( (unsigned __int8)free_block(a1, v12, 1) ) { *(_BYTE *)(v12 + 116) &= ~0x10u; link_to_file_list((long long)a1, v12, a2, 1); } else { --a1[11]; --a1[45]; } } v10 = a5; ++v7; } while ( v7 != a4 ); } return v11; }
flush_cached_blocks: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R14,R9 MOV dword ptr [RBP + -0x2c],R8D MOV R12,RDX MOV qword ptr [RBP + -0x38],RSI MOV R13,RDI MOV qword ptr [RBP + -0x48],RCX MOV RBX,RCX SUB RBX,RDX SHR RBX,0x3 MOV dword ptr [R9],0x0 LEA R15,[RDI + 0xc8] MOV RDI,qword ptr [RDI + 0x108] TEST RDI,RDI JNZ 0x0013df2d LAB_0013dcf2: MOV RDI,R15 CALL 0x001291c0 MOV ESI,EBX LEA RCX,[0x13df5b] MOV EDX,0x8 MOV RDI,R12 CALL 0x001295c0 CMP qword ptr [R13 + 0x108],0x0 JNZ 0x0013df42 MOV RDI,R15 CALL 0x00129200 LAB_0013dd26: CMP R12,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RBP + -0x2c] JZ 0x0013df18 MOV qword ptr [RBP + -0x50],R15 XOR R15D,R15D MOV qword ptr [RBP + -0x40],R14 LAB_0013dd3e: MOV RBX,qword ptr [R12] CMP EAX,0x4 JNZ 0x0013dd4d CMP dword ptr [RBX + 0x64],0x0 JNZ 0x0013dd53 LAB_0013dd4d: CMP dword ptr [RBX + 0x68],0x0 JZ 0x0013dd81 LAB_0013dd53: AND byte ptr [RBX + 0x74],0xef OR R15D,0x2 MOV RDI,R13 MOV RSI,RBX MOV EDX,0x1 CALL 0x0013abd3 CMP dword ptr [R14],0x0 JNZ 0x0013de9c MOV dword ptr [R14],0x7a JMP 0x0013de9c LAB_0013dd81: MOV dword ptr [RBP + -0x30],R15D MOV RDI,R13 MOV RSI,RBX MOV EDX,0x3 MOV ECX,0x2 CALL 0x0013aa63 MOV RDI,qword ptr [R13 + 0x108] TEST RDI,RDI JNZ 0x0013deea LAB_0013ddaa: MOV R15,qword ptr [RBP + -0x50] MOV RDI,R15 CALL 0x001291c0 MOV RSI,qword ptr [RBX + 0x20] MOV RDX,qword ptr [RBX + 0x30] MOV RCX,qword ptr [RSI + 0x60] ADD RSI,0x18 MOV R8,qword ptr [R13 + 0x198] MOV RDI,R13 CALL 0x0013cbe4 MOV R14D,EAX CMP qword ptr [R13 + 0x108],0x0 JNZ 0x0013deff MOV RDI,R15 CALL 0x00129200 LAB_0013ddee: MOV RDI,R13 MOV RSI,RBX MOV EDX,0x5 MOV ECX,0x3 CALL 0x0013aa63 INC qword ptr [R13 + 0x178] TEST R14B,R14B MOV R15D,dword ptr [RBP + -0x30] JZ 0x0013de40 OR byte ptr [RBX + 0x74],0x1 CALL 0x001a1b26 MOVZX EAX,word ptr [RAX] MOV word ptr [RBX + 0x76],AX MOV R14,qword ptr [RBP + -0x40] CMP dword ptr [R14],0x0 JNZ 0x0013de4e CALL 0x001a1b26 CMP dword ptr [RAX],0x0 JZ 0x0013de46 CALL 0x001a1b26 MOV EAX,dword ptr [RAX] JMP 0x0013de4b LAB_0013de40: MOV R14,qword ptr [RBP + -0x40] JMP 0x0013de52 LAB_0013de46: MOV EAX,0xffffffff LAB_0013de4b: MOV dword ptr [R14],EAX LAB_0013de4e: OR R15D,0x1 LAB_0013de52: CMP qword ptr [RBX + 0x50],0x0 JZ 0x0013de62 LEA RDI,[RBX + 0x50] CALL 0x001a66e7 LAB_0013de62: MOV EAX,dword ptr [RBP + -0x2c] CMP EAX,0x4 JA 0x0013deaf MOV ECX,0x19 BT ECX,EAX JNC 0x0013deaf AND byte ptr [RBX + 0x74],0xef MOV RDI,R13 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x38] MOV ECX,0x1 CALL 0x0013d95e MOV RDI,R13 MOV RSI,RBX MOV EDX,0x1 CALL 0x0013abd3 LAB_0013de9c: MOV EAX,dword ptr [RBP + -0x2c] ADD R12,0x8 CMP R12,qword ptr [RBP + -0x48] JNZ 0x0013dd3e JMP 0x0013df1b LAB_0013deaf: MOV RDI,R13 MOV RSI,RBX MOV EDX,0x1 CALL 0x0013d785 TEST AL,AL JZ 0x0013dedd AND byte ptr [RBX + 0x74],0xef MOV RDI,R13 MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x38] MOV ECX,0x1 CALL 0x0013d95e JMP 0x0013de9c LAB_0013dedd: DEC qword ptr [R13 + 0x58] DEC qword ptr [R13 + 0x168] JMP 0x0013de9c LAB_0013deea: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013ddaa LAB_0013deff: MOV RDI,R15 LEA RSI,[0x1da147] MOV EDX,0x12dd CALL 0x0012eb6f JMP 0x0013ddee LAB_0013df18: XOR R15D,R15D LAB_0013df1b: MOV EAX,R15D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013df2d: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0013dcf2 LAB_0013df42: LEA RSI,[0x1da147] MOV RDI,R15 MOV EDX,0x12a3 CALL 0x0012eb6f JMP 0x0013dd26
uint flush_cached_blocks(long param_1,int8 param_2,long *param_3,long *param_4,uint param_5, int *param_6) { pthread_mutex_t *__mutex; long lVar1; char cVar2; int iVar3; int2 *puVar4; int *piVar5; uint uVar6; *param_6 = 0; __mutex = (pthread_mutex_t *)(param_1 + 200); if (*(long *)(param_1 + 0x108) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); qsort(param_3,(ulong)((long)param_4 - (long)param_3) >> 3 & 0xffffffff,8,cmp_sec_link); if (*(long *)(param_1 + 0x108) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12a3); } if (param_3 == param_4) { uVar6 = 0; } else { uVar6 = 0; do { lVar1 = *param_3; if (((param_5 == 4) && (*(int *)(lVar1 + 100) != 0)) || (*(int *)(lVar1 + 0x68) != 0)) { *(byte *)(lVar1 + 0x74) = *(byte *)(lVar1 + 0x74) & 0xef; uVar6 = uVar6 | 2; unreg_request(param_1,lVar1,1); if (*param_6 == 0) { *param_6 = 0x7a; } } else { make_lock_and_pin(param_1,lVar1,3,2); if (*(long *)(param_1 + 0x108) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); cVar2 = pagecache_fwrite(param_1,*(long *)(lVar1 + 0x20) + 0x18, *(int8 *)(lVar1 + 0x30), *(int8 *)(*(long *)(lVar1 + 0x20) + 0x60), *(int8 *)(param_1 + 0x198)); if (*(long *)(param_1 + 0x108) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_pagecache.c", 0x12dd); } make_lock_and_pin(param_1,lVar1,5,3); *(long *)(param_1 + 0x178) = *(long *)(param_1 + 0x178) + 1; if (cVar2 != '\0') { *(byte *)(lVar1 + 0x74) = *(byte *)(lVar1 + 0x74) | 1; puVar4 = (int2 *)_my_thread_var(); *(int2 *)(lVar1 + 0x76) = *puVar4; if (*param_6 == 0) { piVar5 = (int *)_my_thread_var(); if (*piVar5 == 0) { iVar3 = -1; } else { piVar5 = (int *)_my_thread_var(); iVar3 = *piVar5; } *param_6 = iVar3; } uVar6 = uVar6 | 1; } if (*(long *)(lVar1 + 0x50) != 0) { wqueue_release_queue(lVar1 + 0x50); } if ((param_5 < 5) && ((0x19U >> (param_5 & 0x1f) & 1) != 0)) { *(byte *)(lVar1 + 0x74) = *(byte *)(lVar1 + 0x74) & 0xef; link_to_file_list(param_1,lVar1,param_2,1); unreg_request(param_1,lVar1,1); } else { cVar2 = free_block(param_1,lVar1,1); if (cVar2 == '\0') { *(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + -1; *(long *)(param_1 + 0x168) = *(long *)(param_1 + 0x168) + -1; } else { *(byte *)(lVar1 + 0x74) = *(byte *)(lVar1 + 0x74) & 0xef; link_to_file_list(param_1,lVar1,param_2,1); } } } param_3 = param_3 + 1; } while (param_3 != param_4); } return uVar6; }
53,511
LefDefParser::defiBlockage::addRect(int, int, int, int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiBlockage.cpp
void defiBlockage::addRect(int xl, int yl, int xh, int yh) { if (numRectangles_ == rectsAllocated_) { int i; int max = rectsAllocated_ = (rectsAllocated_ == 0) ? 2 : rectsAllocated_ * 2; int* newxl = (int*)malloc(sizeof(int)*max); int* newyl = (int*)malloc(sizeof(int)*max); int* newxh = (int*)malloc(sizeof(int)*max); int* newyh = (int*)malloc(sizeof(int)*max); for (i = 0; i < numRectangles_; i++) { newxl[i] = xl_[i]; newyl[i] = yl_[i]; newxh[i] = xh_[i]; newyh[i] = yh_[i]; } free((char*)(xl_)); free((char*)(yl_)); free((char*)(xh_)); free((char*)(yh_)); xl_ = newxl; yl_ = newyl; xh_ = newxh; yh_ = newyh; } xl_[numRectangles_] = xl; yl_[numRectangles_] = yl; xh_[numRectangles_] = xh; yh_[numRectangles_] = yh; numRectangles_ += 1; }
O3
cpp
LefDefParser::defiBlockage::addRect(int, int, int, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %r14 movl 0x50(%rdi), %r12d cmpl 0x54(%rdi), %r12d jne 0x2db3a movl %esi, 0x8(%rsp) movl %edx, 0xc(%rsp) movl %ecx, 0x10(%rsp) movl %r8d, 0x14(%rsp) leal (%r12,%r12), %eax testl %r12d, %r12d movl $0x2, %ecx cmovnel %eax, %ecx movl %ecx, 0x54(%r14) movslq %ecx, %r15 shlq $0x2, %r15 movq %r15, %rdi callq 0x7270 movq %rax, %r13 movq %r15, %rdi callq 0x7270 movq %rax, %rbx movq %r15, %rdi callq 0x7270 movq %rax, %rbp movq %r15, %rdi callq 0x7270 movq %rax, %r15 movq 0x60(%r14), %rdi testl %r12d, %r12d jle 0x2daf3 movq 0x68(%r14), %rax movq 0x70(%r14), %rcx movq 0x78(%r14), %rdx xorl %esi, %esi movl (%rdi,%rsi,4), %r8d movl %r8d, (%r13,%rsi,4) movl (%rax,%rsi,4), %r8d movl %r8d, (%rbx,%rsi,4) movl (%rcx,%rsi,4), %r8d movl %r8d, (%rbp,%rsi,4) movl (%rdx,%rsi,4), %r8d movl %r8d, (%r15,%rsi,4) incq %rsi cmpq %rsi, %r12 jne 0x2dac9 callq 0x7220 movq 0x68(%r14), %rdi callq 0x7220 movq 0x70(%r14), %rdi callq 0x7220 movq 0x78(%r14), %rdi callq 0x7220 movq %r13, 0x60(%r14) movq %rbx, 0x68(%r14) movq %rbp, 0x70(%r14) movq %r15, 0x78(%r14) movl 0x50(%r14), %r12d movl 0x14(%rsp), %r8d movl 0x10(%rsp), %ecx movl 0xc(%rsp), %edx movl 0x8(%rsp), %esi jmp 0x2db4a movq 0x60(%r14), %r13 movq 0x68(%r14), %rbx movq 0x70(%r14), %rbp movq 0x78(%r14), %r15 movslq %r12d, %rax movl %esi, (%r13,%rax,4) movslq 0x50(%r14), %rax movl %edx, (%rbx,%rax,4) movslq 0x50(%r14), %rax movl %ecx, (%rbp,%rax,4) movslq 0x50(%r14), %rax movl %r8d, (%r15,%rax,4) incl 0x50(%r14) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN12LefDefParser12defiBlockage7addRectEiiii: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rdi mov r12d, [rdi+50h] cmp r12d, [rdi+54h] jnz loc_2DB3A mov [rsp+48h+var_40], esi mov [rsp+48h+var_3C], edx mov [rsp+48h+var_38], ecx mov [rsp+48h+var_34], r8d lea eax, [r12+r12] test r12d, r12d mov ecx, 2 cmovnz ecx, eax mov [r14+54h], ecx movsxd r15, ecx shl r15, 2 mov rdi, r15 call _malloc mov r13, rax mov rdi, r15 call _malloc mov rbx, rax mov rdi, r15 call _malloc mov rbp, rax mov rdi, r15 call _malloc mov r15, rax mov rdi, [r14+60h] test r12d, r12d jle short loc_2DAF3 mov rax, [r14+68h] mov rcx, [r14+70h] mov rdx, [r14+78h] xor esi, esi loc_2DAC9: mov r8d, [rdi+rsi*4] mov [r13+rsi*4+0], r8d mov r8d, [rax+rsi*4] mov [rbx+rsi*4], r8d mov r8d, [rcx+rsi*4] mov [rbp+rsi*4+0], r8d mov r8d, [rdx+rsi*4] mov [r15+rsi*4], r8d inc rsi cmp r12, rsi jnz short loc_2DAC9 loc_2DAF3: call _free mov rdi, [r14+68h] call _free mov rdi, [r14+70h] call _free mov rdi, [r14+78h] call _free mov [r14+60h], r13 mov [r14+68h], rbx mov [r14+70h], rbp mov [r14+78h], r15 mov r12d, [r14+50h] mov r8d, [rsp+48h+var_34] mov ecx, [rsp+48h+var_38] mov edx, [rsp+48h+var_3C] mov esi, [rsp+48h+var_40] jmp short loc_2DB4A loc_2DB3A: mov r13, [r14+60h] mov rbx, [r14+68h] mov rbp, [r14+70h] mov r15, [r14+78h] loc_2DB4A: movsxd rax, r12d mov [r13+rax*4+0], esi movsxd rax, dword ptr [r14+50h] mov [rbx+rax*4], edx movsxd rax, dword ptr [r14+50h] mov [rbp+rax*4+0], ecx movsxd rax, dword ptr [r14+50h] mov [r15+rax*4], r8d inc dword ptr [r14+50h] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long LefDefParser::defiBlockage::addRect( LefDefParser::defiBlockage *this, int a2, int a3, int a4, int a5) { long long v6; // r12 int v7; // ecx unsigned long long v8; // r15 long long v9; // r13 long long v10; // rbx long long v11; // rbp long long v12; // r15 _DWORD *v13; // rdi long long v14; // rax long long v15; // rcx long long v16; // rdx long long i; // rsi long long result; // rax int v19; // [rsp+8h] [rbp-40h] int v20; // [rsp+Ch] [rbp-3Ch] int v21; // [rsp+10h] [rbp-38h] int v22; // [rsp+14h] [rbp-34h] v6 = *((unsigned int *)this + 20); if ( (_DWORD)v6 == *((_DWORD *)this + 21) ) { v19 = a2; v20 = a3; v21 = a4; v22 = a5; v7 = 2; if ( (_DWORD)v6 ) v7 = 2 * v6; *((_DWORD *)this + 21) = v7; v8 = 4LL * v7; v9 = malloc(v8); v10 = malloc(v8); v11 = malloc(v8); v12 = malloc(v8); v13 = (_DWORD *)*((_QWORD *)this + 12); if ( (int)v6 > 0 ) { v14 = *((_QWORD *)this + 13); v15 = *((_QWORD *)this + 14); v16 = *((_QWORD *)this + 15); for ( i = 0LL; i != v6; ++i ) { *(_DWORD *)(v9 + 4 * i) = v13[i]; *(_DWORD *)(v10 + 4 * i) = *(_DWORD *)(v14 + 4 * i); *(_DWORD *)(v11 + 4 * i) = *(_DWORD *)(v15 + 4 * i); *(_DWORD *)(v12 + 4 * i) = *(_DWORD *)(v16 + 4 * i); } } free(v13); free(*((void **)this + 13)); free(*((void **)this + 14)); free(*((void **)this + 15)); *((_QWORD *)this + 12) = v9; *((_QWORD *)this + 13) = v10; *((_QWORD *)this + 14) = v11; *((_QWORD *)this + 15) = v12; LODWORD(v6) = *((_DWORD *)this + 20); a5 = v22; a4 = v21; a3 = v20; a2 = v19; } else { v9 = *((_QWORD *)this + 12); v10 = *((_QWORD *)this + 13); v11 = *((_QWORD *)this + 14); v12 = *((_QWORD *)this + 15); } *(_DWORD *)(v9 + 4LL * (int)v6) = a2; *(_DWORD *)(v10 + 4LL * *((int *)this + 20)) = a3; *(_DWORD *)(v11 + 4LL * *((int *)this + 20)) = a4; result = *((int *)this + 20); *(_DWORD *)(v12 + 4 * result) = a5; ++*((_DWORD *)this + 20); return result; }
addRect: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RDI MOV R12D,dword ptr [RDI + 0x50] CMP R12D,dword ptr [RDI + 0x54] JNZ 0x0012db3a MOV dword ptr [RSP + 0x8],ESI MOV dword ptr [RSP + 0xc],EDX MOV dword ptr [RSP + 0x10],ECX MOV dword ptr [RSP + 0x14],R8D LEA EAX,[R12 + R12*0x1] TEST R12D,R12D MOV ECX,0x2 CMOVNZ ECX,EAX MOV dword ptr [R14 + 0x54],ECX MOVSXD R15,ECX SHL R15,0x2 MOV RDI,R15 CALL 0x00107270 MOV R13,RAX MOV RDI,R15 CALL 0x00107270 MOV RBX,RAX MOV RDI,R15 CALL 0x00107270 MOV RBP,RAX MOV RDI,R15 CALL 0x00107270 MOV R15,RAX MOV RDI,qword ptr [R14 + 0x60] TEST R12D,R12D JLE 0x0012daf3 MOV RAX,qword ptr [R14 + 0x68] MOV RCX,qword ptr [R14 + 0x70] MOV RDX,qword ptr [R14 + 0x78] XOR ESI,ESI LAB_0012dac9: MOV R8D,dword ptr [RDI + RSI*0x4] MOV dword ptr [R13 + RSI*0x4],R8D MOV R8D,dword ptr [RAX + RSI*0x4] MOV dword ptr [RBX + RSI*0x4],R8D MOV R8D,dword ptr [RCX + RSI*0x4] MOV dword ptr [RBP + RSI*0x4],R8D MOV R8D,dword ptr [RDX + RSI*0x4] MOV dword ptr [R15 + RSI*0x4],R8D INC RSI CMP R12,RSI JNZ 0x0012dac9 LAB_0012daf3: CALL 0x00107220 MOV RDI,qword ptr [R14 + 0x68] CALL 0x00107220 MOV RDI,qword ptr [R14 + 0x70] CALL 0x00107220 MOV RDI,qword ptr [R14 + 0x78] CALL 0x00107220 MOV qword ptr [R14 + 0x60],R13 MOV qword ptr [R14 + 0x68],RBX MOV qword ptr [R14 + 0x70],RBP MOV qword ptr [R14 + 0x78],R15 MOV R12D,dword ptr [R14 + 0x50] MOV R8D,dword ptr [RSP + 0x14] MOV ECX,dword ptr [RSP + 0x10] MOV EDX,dword ptr [RSP + 0xc] MOV ESI,dword ptr [RSP + 0x8] JMP 0x0012db4a LAB_0012db3a: MOV R13,qword ptr [R14 + 0x60] MOV RBX,qword ptr [R14 + 0x68] MOV RBP,qword ptr [R14 + 0x70] MOV R15,qword ptr [R14 + 0x78] LAB_0012db4a: MOVSXD RAX,R12D MOV dword ptr [R13 + RAX*0x4],ESI MOVSXD RAX,dword ptr [R14 + 0x50] MOV dword ptr [RBX + RAX*0x4],EDX MOVSXD RAX,dword ptr [R14 + 0x50] MOV dword ptr [RBP + RAX*0x4],ECX MOVSXD RAX,dword ptr [R14 + 0x50] MOV dword ptr [R15 + RAX*0x4],R8D INC dword ptr [R14 + 0x50] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* LefDefParser::defiBlockage::addRect(int, int, int, int) */ void __thiscall LefDefParser::defiBlockage::addRect (defiBlockage *this,int param_1,int param_2,int param_3,int param_4) { void *__ptr; long lVar1; long lVar2; long lVar3; void *pvVar4; void *pvVar5; void *pvVar6; void *pvVar7; int iVar8; ulong uVar9; uint uVar10; size_t __size; uVar10 = *(uint *)(this + 0x50); if (uVar10 == *(uint *)(this + 0x54)) { iVar8 = 2; if (uVar10 != 0) { iVar8 = uVar10 * 2; } *(int *)(this + 0x54) = iVar8; __size = (long)iVar8 << 2; pvVar4 = malloc(__size); pvVar5 = malloc(__size); pvVar6 = malloc(__size); pvVar7 = malloc(__size); __ptr = *(void **)(this + 0x60); if (0 < (int)uVar10) { lVar1 = *(long *)(this + 0x68); lVar2 = *(long *)(this + 0x70); lVar3 = *(long *)(this + 0x78); uVar9 = 0; do { *(int4 *)((long)pvVar4 + uVar9 * 4) = *(int4 *)((long)__ptr + uVar9 * 4); *(int4 *)((long)pvVar5 + uVar9 * 4) = *(int4 *)(lVar1 + uVar9 * 4); *(int4 *)((long)pvVar6 + uVar9 * 4) = *(int4 *)(lVar2 + uVar9 * 4); *(int4 *)((long)pvVar7 + uVar9 * 4) = *(int4 *)(lVar3 + uVar9 * 4); uVar9 = uVar9 + 1; } while (uVar10 != uVar9); } free(__ptr); free(*(void **)(this + 0x68)); free(*(void **)(this + 0x70)); free(*(void **)(this + 0x78)); *(void **)(this + 0x60) = pvVar4; *(void **)(this + 0x68) = pvVar5; *(void **)(this + 0x70) = pvVar6; *(void **)(this + 0x78) = pvVar7; uVar10 = *(uint *)(this + 0x50); } else { pvVar4 = *(void **)(this + 0x60); pvVar5 = *(void **)(this + 0x68); pvVar6 = *(void **)(this + 0x70); pvVar7 = *(void **)(this + 0x78); } *(int *)((long)pvVar4 + (long)(int)uVar10 * 4) = param_1; *(int *)((long)pvVar5 + (long)*(int *)(this + 0x50) * 4) = param_2; *(int *)((long)pvVar6 + (long)*(int *)(this + 0x50) * 4) = param_3; *(int *)((long)pvVar7 + (long)*(int *)(this + 0x50) * 4) = param_4; *(int *)(this + 0x50) = *(int *)(this + 0x50) + 1; return; }
53,512
my_strntoll_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static longlong my_strntoll_mb2_or_mb4(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative=0; int overflow; int cnv; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; register ulonglong cutoff; register unsigned int cutlim; register ulonglong res; register const uchar *s= (const uchar*) nptr; register const uchar *e= (const uchar*) nptr+l; const uchar *save; *err= 0; do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { switch (wc) { case ' ' : break; case '\t': break; case '-' : negative= !negative; break; case '+' : break; default : goto bs; } } else /* No more characters or bad multibyte sequence */ { if (endptr !=NULL ) *endptr = (char*)s; err[0] = (cnv==MY_CS_ILSEQ) ? EILSEQ : EDOM; return 0; } s+=cnv; } while (1); bs: overflow = 0; res = 0; save = s; cutoff = (~(ulonglong) 0) / (unsigned long int) base; cutlim = (uint) ((~(ulonglong) 0) % (unsigned long int) base); do { if ((cnv= mb_wc(cs, &wc, s, e)) > 0) { s+=cnv; if ( wc>='0' && wc<='9') wc -= '0'; else if ( wc>='A' && wc<='Z') wc = wc - 'A' + 10; else if ( wc>='a' && wc<='z') wc = wc - 'a' + 10; else break; if ((int)wc >= base) break; if (res > cutoff || (res == cutoff && wc > cutlim)) overflow = 1; else { res *= (ulonglong) base; res += wc; } } else if (cnv==MY_CS_ILSEQ) { if (endptr !=NULL ) *endptr = (char*)s; err[0]=EILSEQ; return 0; } else { /* No more characters */ break; } } while(1); if (endptr != NULL) *endptr = (char *) s; if (s == save) { err[0]=EDOM; return 0L; } if (negative) { if (res > (ulonglong) LONGLONG_MIN) overflow = 1; } else if (res > (ulonglong) LONGLONG_MAX) overflow = 1; if (overflow) { err[0]=ERANGE; return negative ? LONGLONG_MIN : LONGLONG_MAX; } return (negative ? -((longlong)res) : (longlong)res); }
O0
c
my_strntoll_mb2_or_mb4: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movl $0x0, -0x3c(%rbp) movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x58(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x80(%rbp) movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0x90bb1 movq -0x50(%rbp), %rax addq $-0x9, %rax movq %rax, -0x90(%rbp) subq $0x24, %rax ja 0x90bad movq -0x90(%rbp), %rax leaq 0x1589fd(%rip), %rcx # 0x1e9588 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0x90baf jmp 0x90baf cmpl $0x0, -0x3c(%rbp) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x3c(%rbp) jmp 0x90baf jmp 0x90baf jmp 0x90c08 jmp 0x90be9 cmpq $0x0, -0x30(%rbp) je 0x90bc3 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movl -0x44(%rbp), %edx movl $0x21, %ecx movl $0x54, %eax cmpl $0x0, %edx cmovel %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, (%rax) movq $0x0, -0x8(%rbp) jmp 0x90e41 movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) movb $0x1, %al testb $0x1, %al jne 0x90b4a jmp 0x90c06 jmp 0x90c08 movl $0x0, -0x40(%rbp) movq $0x0, -0x70(%rbp) movq -0x78(%rbp), %rax movq %rax, -0x88(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movq %rax, -0x60(%rbp) movslq -0x24(%rbp), %rcx movq $-0x1, %rax xorl %edx, %edx divq %rcx movl %edx, %eax movl %eax, -0x64(%rbp) movq -0x58(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x78(%rbp), %rdx movq -0x80(%rbp), %rcx leaq -0x50(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) cmpl $0x0, %eax jle 0x90d35 movl -0x44(%rbp), %ecx movq -0x78(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x78(%rbp) cmpq $0x30, -0x50(%rbp) jb 0x90c9a cmpq $0x39, -0x50(%rbp) ja 0x90c9a movq -0x50(%rbp), %rax subq $0x30, %rax movq %rax, -0x50(%rbp) jmp 0x90ce3 cmpq $0x41, -0x50(%rbp) jb 0x90cba cmpq $0x5a, -0x50(%rbp) ja 0x90cba movq -0x50(%rbp), %rax subq $0x41, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0x90ce1 cmpq $0x61, -0x50(%rbp) jb 0x90cda cmpq $0x7a, -0x50(%rbp) ja 0x90cda movq -0x50(%rbp), %rax subq $0x61, %rax addq $0xa, %rax movq %rax, -0x50(%rbp) jmp 0x90cdf jmp 0x90d74 jmp 0x90ce1 jmp 0x90ce3 movq -0x50(%rbp), %rax cmpl -0x24(%rbp), %eax jl 0x90cf1 jmp 0x90d74 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax ja 0x90d11 movq -0x70(%rbp), %rax cmpq -0x60(%rbp), %rax jne 0x90d1a movq -0x50(%rbp), %rax movl -0x64(%rbp), %ecx cmpq %rcx, %rax jbe 0x90d1a movl $0x1, -0x40(%rbp) jmp 0x90d33 movslq -0x24(%rbp), %rax imulq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x50(%rbp), %rax addq -0x70(%rbp), %rax movq %rax, -0x70(%rbp) jmp 0x90d66 cmpl $0x0, -0x44(%rbp) jne 0x90d64 cmpq $0x0, -0x30(%rbp) je 0x90d4d movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movl $0x54, (%rax) movq $0x0, -0x8(%rbp) jmp 0x90e41 jmp 0x90d74 jmp 0x90d68 movb $0x1, %al testb $0x1, %al jne 0x90c4b jmp 0x90d74 cmpq $0x0, -0x30(%rbp) je 0x90d86 movq -0x78(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq -0x78(%rbp), %rax cmpq -0x88(%rbp), %rax jne 0x90daa movq -0x38(%rbp), %rax movl $0x21, (%rax) movq $0x0, -0x8(%rbp) jmp 0x90e41 cmpl $0x0, -0x3c(%rbp) je 0x90dc9 movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 cmpq %rax, -0x70(%rbp) jbe 0x90dc7 movl $0x1, -0x40(%rbp) jmp 0x90de2 movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF cmpq %rax, -0x70(%rbp) jbe 0x90de0 movl $0x1, -0x40(%rbp) jmp 0x90de2 cmpl $0x0, -0x40(%rbp) je 0x90e16 movq -0x38(%rbp), %rax movl $0x22, (%rax) movl -0x3c(%rbp), %edx movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 cmpl $0x0, %edx cmovneq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x90e41 cmpl $0x0, -0x3c(%rbp) je 0x90e2b xorl %eax, %eax subq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x90e36 movq -0x70(%rbp), %rax movq %rax, -0x98(%rbp) movq -0x98(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nop
my_strntoll_mb2_or_mb4: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov [rbp+var_3C], 0 mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_58], rax mov rax, [rbp+var_18] mov [rbp+var_78], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_80], rax mov rax, [rbp+var_38] mov dword ptr [rax], 0 loc_90B4A: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle short loc_90BB1 mov rax, [rbp+var_50] add rax, 0FFFFFFFFFFFFFFF7h; switch 37 cases mov [rbp+var_90], rax sub rax, 24h ja short def_90B92; jumptable 0000000000090B92 default case, cases 10-31,33-42,44 mov rax, [rbp+var_90] lea rcx, jpt_90B92 movsxd rax, ds:(jpt_90B92 - 1E9588h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_90B94: jmp short loc_90BAF; jumptable 0000000000090B92 case 32 loc_90B96: jmp short loc_90BAF; jumptable 0000000000090B92 case 9 loc_90B98: cmp [rbp+var_3C], 0; jumptable 0000000000090B92 case 45 setnz al xor al, 0FFh and al, 1 movzx eax, al mov [rbp+var_3C], eax jmp short loc_90BAF loc_90BAB: jmp short loc_90BAF; jumptable 0000000000090B92 case 43 def_90B92: jmp short loc_90C08; jumptable 0000000000090B92 default case, cases 10-31,33-42,44 loc_90BAF: jmp short loc_90BE9 loc_90BB1: cmp [rbp+var_30], 0 jz short loc_90BC3 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_90BC3: mov edx, [rbp+var_44] mov ecx, 21h ; '!' mov eax, 54h ; 'T' cmp edx, 0 cmovz ecx, eax mov rax, [rbp+var_38] mov [rax], ecx mov [rbp+var_8], 0 jmp loc_90E41 loc_90BE9: mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax mov al, 1 test al, 1 jnz loc_90B4A jmp short $+2 loc_90C06: jmp short $+2 loc_90C08: mov [rbp+var_40], 0 mov [rbp+var_70], 0 mov rax, [rbp+var_78] mov [rbp+var_88], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov [rbp+var_60], rax movsxd rcx, [rbp+var_24] mov rax, 0FFFFFFFFFFFFFFFFh xor edx, edx div rcx mov eax, edx mov [rbp+var_64], eax loc_90C4B: mov rax, [rbp+var_58] mov rdi, [rbp+var_10] mov rdx, [rbp+var_78] mov rcx, [rbp+var_80] lea rsi, [rbp+var_50] call rax mov [rbp+var_44], eax cmp eax, 0 jle loc_90D35 mov ecx, [rbp+var_44] mov rax, [rbp+var_78] movsxd rcx, ecx add rax, rcx mov [rbp+var_78], rax cmp [rbp+var_50], 30h ; '0' jb short loc_90C9A cmp [rbp+var_50], 39h ; '9' ja short loc_90C9A mov rax, [rbp+var_50] sub rax, 30h ; '0' mov [rbp+var_50], rax jmp short loc_90CE3 loc_90C9A: cmp [rbp+var_50], 41h ; 'A' jb short loc_90CBA cmp [rbp+var_50], 5Ah ; 'Z' ja short loc_90CBA mov rax, [rbp+var_50] sub rax, 41h ; 'A' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_90CE1 loc_90CBA: cmp [rbp+var_50], 61h ; 'a' jb short loc_90CDA cmp [rbp+var_50], 7Ah ; 'z' ja short loc_90CDA mov rax, [rbp+var_50] sub rax, 61h ; 'a' add rax, 0Ah mov [rbp+var_50], rax jmp short loc_90CDF loc_90CDA: jmp loc_90D74 loc_90CDF: jmp short $+2 loc_90CE1: jmp short $+2 loc_90CE3: mov rax, [rbp+var_50] cmp eax, [rbp+var_24] jl short loc_90CF1 jmp loc_90D74 loc_90CF1: mov rax, [rbp+var_70] cmp rax, [rbp+var_60] ja short loc_90D11 mov rax, [rbp+var_70] cmp rax, [rbp+var_60] jnz short loc_90D1A mov rax, [rbp+var_50] mov ecx, [rbp+var_64] cmp rax, rcx jbe short loc_90D1A loc_90D11: mov [rbp+var_40], 1 jmp short loc_90D33 loc_90D1A: movsxd rax, [rbp+var_24] imul rax, [rbp+var_70] mov [rbp+var_70], rax mov rax, [rbp+var_50] add rax, [rbp+var_70] mov [rbp+var_70], rax loc_90D33: jmp short loc_90D66 loc_90D35: cmp [rbp+var_44], 0 jnz short loc_90D64 cmp [rbp+var_30], 0 jz short loc_90D4D mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_90D4D: mov rax, [rbp+var_38] mov dword ptr [rax], 54h ; 'T' mov [rbp+var_8], 0 jmp loc_90E41 loc_90D64: jmp short loc_90D74 loc_90D66: jmp short $+2 loc_90D68: mov al, 1 test al, 1 jnz loc_90C4B jmp short $+2 loc_90D74: cmp [rbp+var_30], 0 jz short loc_90D86 mov rcx, [rbp+var_78] mov rax, [rbp+var_30] mov [rax], rcx loc_90D86: mov rax, [rbp+var_78] cmp rax, [rbp+var_88] jnz short loc_90DAA mov rax, [rbp+var_38] mov dword ptr [rax], 21h ; '!' mov [rbp+var_8], 0 jmp loc_90E41 loc_90DAA: cmp [rbp+var_3C], 0 jz short loc_90DC9 mov rax, 8000000000000000h cmp [rbp+var_70], rax jbe short loc_90DC7 mov [rbp+var_40], 1 loc_90DC7: jmp short loc_90DE2 loc_90DC9: mov rax, 7FFFFFFFFFFFFFFFh cmp [rbp+var_70], rax jbe short loc_90DE0 mov [rbp+var_40], 1 loc_90DE0: jmp short $+2 loc_90DE2: cmp [rbp+var_40], 0 jz short loc_90E16 mov rax, [rbp+var_38] mov dword ptr [rax], 22h ; '"' mov edx, [rbp+var_3C] mov rax, 7FFFFFFFFFFFFFFFh mov rcx, 8000000000000000h cmp edx, 0 cmovnz rax, rcx mov [rbp+var_8], rax jmp short loc_90E41 loc_90E16: cmp [rbp+var_3C], 0 jz short loc_90E2B xor eax, eax sub rax, [rbp+var_70] mov [rbp+var_98], rax jmp short loc_90E36 loc_90E2B: mov rax, [rbp+var_70] mov [rbp+var_98], rax loc_90E36: mov rax, [rbp+var_98] mov [rbp+var_8], rax loc_90E41: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
unsigned long long my_strntoll_mb2_or_mb4(long long a1, long long a2, long long a3, int a4, _QWORD *a5, int *a6) { int v6; // ecx long long v7; // rax long long v10; // [rsp+18h] [rbp-88h] long long v11; // [rsp+20h] [rbp-80h] long long v12; // [rsp+28h] [rbp-78h] unsigned long long v13; // [rsp+30h] [rbp-70h] unsigned int v14; // [rsp+3Ch] [rbp-64h] unsigned long long v15; // [rsp+40h] [rbp-60h] long long ( *v16)(long long, unsigned long long *, long long, long long); // [rsp+48h] [rbp-58h] unsigned long long v17; // [rsp+50h] [rbp-50h] BYREF int v18; // [rsp+5Ch] [rbp-44h] int v19; // [rsp+60h] [rbp-40h] BOOL v20; // [rsp+64h] [rbp-3Ch] int *v21; // [rsp+68h] [rbp-38h] _QWORD *v22; // [rsp+70h] [rbp-30h] int v23; // [rsp+7Ch] [rbp-24h] long long v24; // [rsp+80h] [rbp-20h] long long v25; // [rsp+88h] [rbp-18h] long long v26; // [rsp+90h] [rbp-10h] v26 = a1; v25 = a2; v24 = a3; v23 = a4; v22 = a5; v21 = a6; v20 = 0; v16 = *(long long ( **)(long long, unsigned long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v12 = a2; v11 = a3 + a2; *a6 = 0; while ( 2 ) { v18 = v16(v26, &v17, v12, v11); if ( v18 <= 0 ) { if ( v22 ) *v22 = v12; v6 = 33; if ( !v18 ) v6 = 84; *v21 = v6; return 0LL; } else { switch ( v17 ) { case 9uLL: case 0x20uLL: case 0x2BuLL: goto LABEL_10; case 0x2DuLL: v20 = !v20; LABEL_10: v12 += v18; continue; default: v19 = 0; v13 = 0LL; v10 = v12; v15 = 0xFFFFFFFFFFFFFFFFLL / v23; v14 = 0xFFFFFFFFFFFFFFFFLL % v23; break; } while ( 1 ) { v18 = v16(v26, &v17, v12, v11); if ( v18 <= 0 ) break; v12 += v18; if ( v17 < 0x30 || v17 > 0x39 ) { if ( v17 < 0x41 || v17 > 0x5A ) { if ( v17 < 0x61 || v17 > 0x7A ) goto LABEL_33; v17 = v17 - 97 + 10; } else { v17 = v17 - 65 + 10; } } else { v17 -= 48LL; } if ( (int)v17 >= v23 ) goto LABEL_33; if ( v13 > v15 || v13 == v15 && v17 > v14 ) v19 = 1; else v13 = v13 * v23 + v17; } if ( v18 ) { LABEL_33: if ( v22 ) *v22 = v12; if ( v12 == v10 ) { *v21 = 33; return 0LL; } else { if ( v20 ) { if ( v13 > 0x8000000000000000LL ) v19 = 1; } else if ( v13 > 0x7FFFFFFFFFFFFFFFLL ) { v19 = 1; } if ( v19 ) { *v21 = 34; v7 = 0x7FFFFFFFFFFFFFFFLL; if ( v20 ) return 0x8000000000000000LL; return v7; } else if ( v20 ) { return -(long long)v13; } else { return v13; } } } if ( v22 ) *v22 = v12; *v21 = 84; return 0LL; } } }
my_strntoll_mb2_or_mb4: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV dword ptr [RBP + -0x3c],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 LAB_00190b4a: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x50] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 JLE 0x00190bb1 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,-0x9 MOV qword ptr [RBP + -0x90],RAX SUB RAX,0x24 JA 0x00190bad MOV RAX,qword ptr [RBP + -0x90] LEA RCX,[0x2e9588] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_20: JMP 0x00190baf caseD_9: JMP 0x00190baf caseD_2d: CMP dword ptr [RBP + -0x3c],0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x3c],EAX JMP 0x00190baf caseD_2b: JMP 0x00190baf caseD_a: JMP 0x00190c08 LAB_00190baf: JMP 0x00190be9 LAB_00190bb1: CMP qword ptr [RBP + -0x30],0x0 JZ 0x00190bc3 MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_00190bc3: MOV EDX,dword ptr [RBP + -0x44] MOV ECX,0x21 MOV EAX,0x54 CMP EDX,0x0 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],ECX MOV qword ptr [RBP + -0x8],0x0 JMP 0x00190e41 LAB_00190be9: MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x78] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX MOV AL,0x1 TEST AL,0x1 JNZ 0x00190b4a JMP 0x00190c06 LAB_00190c06: JMP 0x00190c08 LAB_00190c08: MOV dword ptr [RBP + -0x40],0x0 MOV qword ptr [RBP + -0x70],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV qword ptr [RBP + -0x88],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x60],RAX MOVSXD RCX,dword ptr [RBP + -0x24] MOV RAX,-0x1 XOR EDX,EDX DIV RCX MOV EAX,EDX MOV dword ptr [RBP + -0x64],EAX LAB_00190c4b: MOV RAX,qword ptr [RBP + -0x58] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x78] MOV RCX,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x50] CALL RAX MOV dword ptr [RBP + -0x44],EAX CMP EAX,0x0 JLE 0x00190d35 MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x78] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x78],RAX CMP qword ptr [RBP + -0x50],0x30 JC 0x00190c9a CMP qword ptr [RBP + -0x50],0x39 JA 0x00190c9a MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x30 MOV qword ptr [RBP + -0x50],RAX JMP 0x00190ce3 LAB_00190c9a: CMP qword ptr [RBP + -0x50],0x41 JC 0x00190cba CMP qword ptr [RBP + -0x50],0x5a JA 0x00190cba MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x41 ADD RAX,0xa MOV qword ptr [RBP + -0x50],RAX JMP 0x00190ce1 LAB_00190cba: CMP qword ptr [RBP + -0x50],0x61 JC 0x00190cda CMP qword ptr [RBP + -0x50],0x7a JA 0x00190cda MOV RAX,qword ptr [RBP + -0x50] SUB RAX,0x61 ADD RAX,0xa MOV qword ptr [RBP + -0x50],RAX JMP 0x00190cdf LAB_00190cda: JMP 0x00190d74 LAB_00190cdf: JMP 0x00190ce1 LAB_00190ce1: JMP 0x00190ce3 LAB_00190ce3: MOV RAX,qword ptr [RBP + -0x50] CMP EAX,dword ptr [RBP + -0x24] JL 0x00190cf1 JMP 0x00190d74 LAB_00190cf1: MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x60] JA 0x00190d11 MOV RAX,qword ptr [RBP + -0x70] CMP RAX,qword ptr [RBP + -0x60] JNZ 0x00190d1a MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RBP + -0x64] CMP RAX,RCX JBE 0x00190d1a LAB_00190d11: MOV dword ptr [RBP + -0x40],0x1 JMP 0x00190d33 LAB_00190d1a: MOVSXD RAX,dword ptr [RBP + -0x24] IMUL RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x50] ADD RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x70],RAX LAB_00190d33: JMP 0x00190d66 LAB_00190d35: CMP dword ptr [RBP + -0x44],0x0 JNZ 0x00190d64 CMP qword ptr [RBP + -0x30],0x0 JZ 0x00190d4d MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_00190d4d: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x54 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00190e41 LAB_00190d64: JMP 0x00190d74 LAB_00190d66: JMP 0x00190d68 LAB_00190d68: MOV AL,0x1 TEST AL,0x1 JNZ 0x00190c4b JMP 0x00190d74 LAB_00190d74: CMP qword ptr [RBP + -0x30],0x0 JZ 0x00190d86 MOV RCX,qword ptr [RBP + -0x78] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_00190d86: MOV RAX,qword ptr [RBP + -0x78] CMP RAX,qword ptr [RBP + -0x88] JNZ 0x00190daa MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x21 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00190e41 LAB_00190daa: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x00190dc9 MOV RAX,-0x8000000000000000 CMP qword ptr [RBP + -0x70],RAX JBE 0x00190dc7 MOV dword ptr [RBP + -0x40],0x1 LAB_00190dc7: JMP 0x00190de2 LAB_00190dc9: MOV RAX,0x7fffffffffffffff CMP qword ptr [RBP + -0x70],RAX JBE 0x00190de0 MOV dword ptr [RBP + -0x40],0x1 LAB_00190de0: JMP 0x00190de2 LAB_00190de2: CMP dword ptr [RBP + -0x40],0x0 JZ 0x00190e16 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x22 MOV EDX,dword ptr [RBP + -0x3c] MOV RAX,0x7fffffffffffffff MOV RCX,-0x8000000000000000 CMP EDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x00190e41 LAB_00190e16: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x00190e2b XOR EAX,EAX SUB RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x98],RAX JMP 0x00190e36 LAB_00190e2b: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x98],RAX LAB_00190e36: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x8],RAX LAB_00190e41: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x00190c04) */ /* WARNING: Removing unreachable block (ram,0x00190d72) */ ulong my_strntoll_mb2_or_mb4 (long param_1,long param_2,long param_3,int param_4,long *param_5, int4 *param_6) { code *pcVar1; int1 auVar2 [16]; int1 auVar3 [16]; long lVar4; ulong uVar5; int4 uVar6; ulong local_a0; long local_80; ulong local_78; ulong local_58; int local_4c; int local_48; uint local_44; int4 *local_40; long *local_38; int local_2c; long local_28; long local_20; long local_18; ulong local_10; local_44 = 0; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); *param_6 = 0; local_80 = param_2; local_40 = param_6; local_38 = param_5; local_2c = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; do { lVar4 = local_80; local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3); if (local_4c < 1) { if (local_38 != (long *)0x0) { *local_38 = local_80; } uVar6 = 0x21; if (local_4c == 0) { uVar6 = 0x54; } *local_40 = uVar6; return 0; } switch(local_58) { case 9: break; default: local_48 = 0; local_78 = 0; auVar2._8_8_ = 0; auVar2._0_8_ = (long)local_2c; uVar5 = SUB168((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) / auVar2,0); auVar3._8_8_ = 0; auVar3._0_8_ = (long)local_2c; goto LAB_00190c4b; case 0x20: break; case 0x2b: break; case 0x2d: local_44 = (uint)((local_44 != 0 ^ 0xffU) & 1); } local_80 = local_80 + local_4c; } while( true ); LAB_00190c4b: local_4c = (*pcVar1)(local_18,&local_58,local_80,param_2 + param_3); if (local_4c < 1) { if (local_4c == 0) { if (local_38 != (long *)0x0) { *local_38 = local_80; } *local_40 = 0x54; local_10 = 0; } else { LAB_00190d74: if (local_38 != (long *)0x0) { *local_38 = local_80; } if (local_80 == lVar4) { *local_40 = 0x21; local_10 = 0; } else { if (local_44 == 0) { if (0x7fffffffffffffff < local_78) { local_48 = 1; } } else if (0x8000000000000000 < local_78) { local_48 = 1; } if (local_48 == 0) { if (local_44 == 0) { local_a0 = local_78; } else { local_a0 = -local_78; } local_10 = local_a0; } else { *local_40 = 0x22; local_10 = 0x7fffffffffffffff; if (local_44 != 0) { local_10 = 0x8000000000000000; } } } } return local_10; } local_80 = local_80 + local_4c; if ((local_58 < 0x30) || (0x39 < local_58)) { if ((local_58 < 0x41) || (0x5a < local_58)) { if ((local_58 < 0x61) || (0x7a < local_58)) goto LAB_00190d74; local_58 = local_58 - 0x57; } else { local_58 = local_58 - 0x37; } } else { local_58 = local_58 - 0x30; } if (local_2c <= (int)local_58) goto LAB_00190d74; if ((uVar5 < local_78) || ((local_78 == uVar5 && (SUB164((ZEXT816(0) << 0x40 | ZEXT816(0xffffffffffffffff)) % auVar3,0) < local_58)))) { local_48 = 1; } else { local_78 = local_58 + (long)local_2c * local_78; } goto LAB_00190c4b; }
53,513
my_wc_mb_euc_jp
eloqsql/strings/ctype-ujis.c
static int my_wc_mb_euc_jp(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_eucjp[wc])) /* JIS-X-0208 */ { if (s + 2 > e) return MY_CS_TOOSMALL2; MY_PUT_MB2(s, jp); return 2; } if ((jp= unicode_to_jisx0212_eucjp[wc])) /* JIS-X-0212 */ { 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; }
O0
c
my_wc_mb_euc_jp: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x18(%rbp), %rax cmpl $0x80, %eax jge 0x760ed movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x760d5 movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x76215 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x76215 cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF jbe 0x76103 movl $0x0, -0x4(%rbp) jmp 0x76215 movq -0x18(%rbp), %rcx leaq 0x2cf3c2(%rip), %rax # 0x3454d0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax je 0x7615f movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x76134 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x76215 movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) jmp 0x76215 movq -0x18(%rbp), %rcx leaq 0x2ef366(%rip), %rax # 0x3654d0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax je 0x761c0 movq -0x20(%rbp), %rax addq $0x3, %rax cmpq -0x28(%rbp), %rax jbe 0x76190 movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x76215 movq -0x20(%rbp), %rax movb $-0x71, (%rax) movl -0x2c(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl -0x2c(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x2(%rax) movl $0x3, -0x4(%rbp) jmp 0x76215 cmpq $0xff61, -0x18(%rbp) # imm = 0xFF61 jb 0x7620e cmpq $0xff9f, -0x18(%rbp) # imm = 0xFF9F ja 0x7620e movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x761eb movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x76215 movq -0x20(%rbp), %rax movb $-0x72, (%rax) movq -0x18(%rbp), %rax subq $0xfec0, %rax # imm = 0xFEC0 movb %al, %cl movq -0x20(%rbp), %rax movb %cl, 0x1(%rax) movl $0x2, -0x4(%rbp) jmp 0x76215 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_wc_mb_euc_jp: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_18] cmp eax, 80h jge short loc_760ED mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_760D5 mov [rbp+var_4], 0FFFFFF9Bh jmp loc_76215 loc_760D5: mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp loc_76215 loc_760ED: cmp [rbp+var_18], 0FFFFh jbe short loc_76103 mov [rbp+var_4], 0 jmp loc_76215 loc_76103: mov rcx, [rbp+var_18] lea rax, unicode_to_jisx0208_eucjp movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jz short loc_7615F mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_76134 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_76215 loc_76134: mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 jmp loc_76215 loc_7615F: mov rcx, [rbp+var_18] lea rax, unicode_to_jisx0212_eucjp movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jz short loc_761C0 mov rax, [rbp+var_20] add rax, 3 cmp rax, [rbp+var_28] jbe short loc_76190 mov [rbp+var_4], 0FFFFFF99h jmp loc_76215 loc_76190: mov rax, [rbp+var_20] mov byte ptr [rax], 8Fh mov eax, [rbp+var_2C] sar eax, 8 mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov eax, [rbp+var_2C] and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax+2], cl mov [rbp+var_4], 3 jmp short loc_76215 loc_761C0: cmp [rbp+var_18], 0FF61h jb short loc_7620E cmp [rbp+var_18], 0FF9Fh ja short loc_7620E mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_761EB mov [rbp+var_4], 0FFFFFF9Ah jmp short loc_76215 loc_761EB: mov rax, [rbp+var_20] mov byte ptr [rax], 8Eh mov rax, [rbp+var_18] sub rax, 0FEC0h mov cl, al mov rax, [rbp+var_20] mov [rax+1], cl mov [rbp+var_4], 2 jmp short loc_76215 loc_7620E: mov [rbp+var_4], 0 loc_76215: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_euc_jp(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { __int16 v5; // [rsp+0h] [rbp-2Ch] __int16 v6; // [rsp+0h] [rbp-2Ch] if ( (int)a2 >= 128 ) { if ( a2 <= 0xFFFF ) { v5 = unicode_to_jisx0208_eucjp[a2]; if ( v5 ) { if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = HIBYTE(v5); a3[1] = v5; return 2; } else { return (unsigned int)-102; } } else { v6 = unicode_to_jisx0212_eucjp[a2]; if ( v6 ) { if ( (unsigned long long)(a3 + 3) <= a4 ) { *a3 = -113; a3[1] = HIBYTE(v6); a3[2] = v6; return 3; } else { return (unsigned int)-103; } } else if ( a2 < 0xFF61 || a2 > 0xFF9F ) { return 0; } else if ( (unsigned long long)(a3 + 2) <= a4 ) { *a3 = -114; a3[1] = a2 + 64; return 2; } else { return (unsigned int)-102; } } } else { return 0; } } else if ( (unsigned long long)a3 < a4 ) { *a3 = a2; return 1; } else { return (unsigned int)-101; } }
my_wc_mb_euc_jp: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x18] CMP EAX,0x80 JGE 0x001760ed MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x001760d5 MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x00176215 LAB_001760d5: MOV RAX,qword ptr [RBP + -0x18] MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x1 JMP 0x00176215 LAB_001760ed: CMP qword ptr [RBP + -0x18],0xffff JBE 0x00176103 MOV dword ptr [RBP + -0x4],0x0 JMP 0x00176215 LAB_00176103: MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x4454d0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JZ 0x0017615f MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00176134 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00176215 LAB_00176134: MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 JMP 0x00176215 LAB_0017615f: MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x4654d0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JZ 0x001761c0 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00176190 MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x00176215 LAB_00176190: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x8f MOV EAX,dword ptr [RBP + -0x2c] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x2c] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x2],CL MOV dword ptr [RBP + -0x4],0x3 JMP 0x00176215 LAB_001761c0: CMP qword ptr [RBP + -0x18],0xff61 JC 0x0017620e CMP qword ptr [RBP + -0x18],0xff9f JA 0x0017620e MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001761eb MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x00176215 LAB_001761eb: MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],0x8e MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0xfec0 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x1],CL MOV dword ptr [RBP + -0x4],0x2 JMP 0x00176215 LAB_0017620e: MOV dword ptr [RBP + -0x4],0x0 LAB_00176215: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_wc_mb_euc_jp(int8 param_1,ulong param_2,char *param_3,char *param_4) { short sVar1; int4 local_c; if ((int)param_2 < 0x80) { if (param_3 < param_4) { *param_3 = (char)param_2; local_c = 1; } else { local_c = 0xffffff9b; } } else if (param_2 < 0x10000) { sVar1 = *(short *)(unicode_to_jisx0208_eucjp + param_2 * 2); if (sVar1 == 0) { sVar1 = *(short *)(unicode_to_jisx0212_eucjp + param_2 * 2); if (sVar1 == 0) { if ((param_2 < 0xff61) || (0xff9f < param_2)) { local_c = 0; } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = -0x72; param_3[1] = (char)param_2 + '@'; local_c = 2; } } else if (param_4 < param_3 + 3) { local_c = 0xffffff99; } else { *param_3 = -0x71; param_3[1] = (char)((ushort)sVar1 >> 8); param_3[2] = (char)sVar1; local_c = 3; } } else if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else { *param_3 = (char)((ushort)sVar1 >> 8); param_3[1] = (char)sVar1; local_c = 2; } } else { local_c = 0; } return local_c; }
53,514
ft_nlq_find_relevance
eloqsql/storage/myisam/ft_nlq_search.c
float ft_nlq_find_relevance(FT_INFO *handler, uchar *record __attribute__((unused)), uint length __attribute__((unused))) { int a,b,c; FT_DOC *docs=handler->doc; my_off_t docid=handler->info->lastpos; if (docid == HA_POS_ERROR) return -5.0; /* Assuming docs[] is sorted by dpos... */ for (a=0, b=handler->ndocs, c=(a+b)/2; b-a>1; c=(a+b)/2) { if (docs[c].dpos > docid) b=c; else a=c; } /* bounds check to avoid accessing unallocated handler->doc */ if (a < handler->ndocs && docs[a].dpos == docid) return (float) docs[a].weight; else return 0.0; }
O0
c
ft_nlq_find_relevance: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x10(%rbp), %rax addq $0x18, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq 0x170(%rax), %rax movq %rax, -0x38(%rbp) cmpq $-0x1, -0x38(%rbp) jne 0xa2fd7 movss 0xaf047(%rip), %xmm0 # 0x152014 movss %xmm0, -0x4(%rbp) jmp 0xa308a movl $0x0, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x10(%rax), %eax movl %eax, -0x24(%rbp) movl -0x20(%rbp), %eax addl -0x24(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, -0x28(%rbp) movl -0x24(%rbp), %eax subl -0x20(%rbp), %eax cmpl $0x1, %eax jle 0xa303f movq -0x30(%rbp), %rax movslq -0x28(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rax cmpq -0x38(%rbp), %rax jbe 0xa3024 movl -0x28(%rbp), %eax movl %eax, -0x24(%rbp) jmp 0xa302a movl -0x28(%rbp), %eax movl %eax, -0x20(%rbp) jmp 0xa302c movl -0x20(%rbp), %eax addl -0x24(%rbp), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, -0x28(%rbp) jmp 0xa2ff9 movl -0x20(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x10(%rcx), %eax jge 0xa3082 movq -0x30(%rbp), %rax movslq -0x20(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rax cmpq -0x38(%rbp), %rax jne 0xa3082 movq -0x30(%rbp), %rax movslq -0x20(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movsd 0x8(%rax), %xmm0 cvtsd2ss %xmm0, %xmm0 movss %xmm0, -0x4(%rbp) jmp 0xa308a xorps %xmm0, %xmm0 movss %xmm0, -0x4(%rbp) movss -0x4(%rbp), %xmm0 popq %rbp retq nopw %cs:(%rax,%rax)
ft_nlq_find_relevance: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_10] add rax, 18h mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov rax, [rax+170h] mov [rbp+var_38], rax cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jnz short loc_A2FD7 movss xmm0, cs:dword_152014 movss [rbp+var_4], xmm0 jmp loc_A308A loc_A2FD7: mov [rbp+var_20], 0 mov rax, [rbp+var_10] mov eax, [rax+10h] mov [rbp+var_24], eax mov eax, [rbp+var_20] add eax, [rbp+var_24] mov ecx, 2 cdq idiv ecx mov [rbp+var_28], eax loc_A2FF9: mov eax, [rbp+var_24] sub eax, [rbp+var_20] cmp eax, 1 jle short loc_A303F mov rax, [rbp+var_30] movsxd rcx, [rbp+var_28] shl rcx, 4 add rax, rcx mov rax, [rax] cmp rax, [rbp+var_38] jbe short loc_A3024 mov eax, [rbp+var_28] mov [rbp+var_24], eax jmp short loc_A302A loc_A3024: mov eax, [rbp+var_28] mov [rbp+var_20], eax loc_A302A: jmp short $+2 loc_A302C: mov eax, [rbp+var_20] add eax, [rbp+var_24] mov ecx, 2 cdq idiv ecx mov [rbp+var_28], eax jmp short loc_A2FF9 loc_A303F: mov eax, [rbp+var_20] mov rcx, [rbp+var_10] cmp eax, [rcx+10h] jge short loc_A3082 mov rax, [rbp+var_30] movsxd rcx, [rbp+var_20] shl rcx, 4 add rax, rcx mov rax, [rax] cmp rax, [rbp+var_38] jnz short loc_A3082 mov rax, [rbp+var_30] movsxd rcx, [rbp+var_20] shl rcx, 4 add rax, rcx movsd xmm0, qword ptr [rax+8] cvtsd2ss xmm0, xmm0 movss [rbp+var_4], xmm0 jmp short loc_A308A loc_A3082: xorps xmm0, xmm0 movss [rbp+var_4], xmm0 loc_A308A: movss xmm0, [rbp+var_4] pop rbp retn
float ft_nlq_find_relevance(long long a1) { unsigned long long v3; // [rsp+0h] [rbp-38h] long long v4; // [rsp+8h] [rbp-30h] int v5; // [rsp+10h] [rbp-28h] int v6; // [rsp+14h] [rbp-24h] int v7; // [rsp+18h] [rbp-20h] v4 = a1 + 24; v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 368LL); if ( v3 == -1LL ) return -5.0; v7 = 0; v6 = *(_DWORD *)(a1 + 16); v5 = v6 / 2; while ( v6 - v7 > 1 ) { if ( *(_QWORD *)(16LL * v5 + v4) <= v3 ) v7 = v5; else v6 = v5; v5 = (v6 + v7) / 2; } if ( v7 >= *(_DWORD *)(a1 + 16) || *(_QWORD *)(16LL * v7 + v4) != v3 ) return 0.0; return *(double *)(16LL * v7 + v4 + 8); }
ft_nlq_find_relevance: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x18 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x170] MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],-0x1 JNZ 0x001a2fd7 MOVSS XMM0,dword ptr [0x00252014] MOVSS dword ptr [RBP + -0x4],XMM0 JMP 0x001a308a LAB_001a2fd7: MOV dword ptr [RBP + -0x20],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x20] ADD EAX,dword ptr [RBP + -0x24] MOV ECX,0x2 CDQ IDIV ECX MOV dword ptr [RBP + -0x28],EAX LAB_001a2ff9: MOV EAX,dword ptr [RBP + -0x24] SUB EAX,dword ptr [RBP + -0x20] CMP EAX,0x1 JLE 0x001a303f MOV RAX,qword ptr [RBP + -0x30] MOVSXD RCX,dword ptr [RBP + -0x28] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x38] JBE 0x001a3024 MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x24],EAX JMP 0x001a302a LAB_001a3024: MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x20],EAX LAB_001a302a: JMP 0x001a302c LAB_001a302c: MOV EAX,dword ptr [RBP + -0x20] ADD EAX,dword ptr [RBP + -0x24] MOV ECX,0x2 CDQ IDIV ECX MOV dword ptr [RBP + -0x28],EAX JMP 0x001a2ff9 LAB_001a303f: MOV EAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x10] JGE 0x001a3082 MOV RAX,qword ptr [RBP + -0x30] MOVSXD RCX,dword ptr [RBP + -0x20] SHL RCX,0x4 ADD RAX,RCX MOV RAX,qword ptr [RAX] CMP RAX,qword ptr [RBP + -0x38] JNZ 0x001a3082 MOV RAX,qword ptr [RBP + -0x30] MOVSXD RCX,dword ptr [RBP + -0x20] SHL RCX,0x4 ADD RAX,RCX MOVSD XMM0,qword ptr [RAX + 0x8] CVTSD2SS XMM0,XMM0 MOVSS dword ptr [RBP + -0x4],XMM0 JMP 0x001a308a LAB_001a3082: XORPS XMM0,XMM0 MOVSS dword ptr [RBP + -0x4],XMM0 LAB_001a308a: MOVSS XMM0,dword ptr [RBP + -0x4] POP RBP RET
float ft_nlq_find_relevance(long param_1) { ulong uVar1; long lVar2; int4 local_30; int4 local_2c; int4 local_28; int4 local_c; lVar2 = param_1 + 0x18; uVar1 = *(ulong *)(*(long *)(param_1 + 8) + 0x170); if (uVar1 == 0xffffffffffffffff) { local_c = DAT_00252014; } else { local_28 = 0; local_2c = *(int *)(param_1 + 0x10); local_30 = local_2c; while (local_30 = local_30 / 2, 1 < local_2c - local_28) { if (uVar1 < *(ulong *)(lVar2 + (long)local_30 * 0x10)) { local_2c = local_30; } else { local_28 = local_30; } local_30 = local_28 + local_2c; } if ((local_28 < *(int *)(param_1 + 0x10)) && (*(ulong *)(lVar2 + (long)local_28 * 0x10) == uVar1)) { local_c = (float)*(double *)(lVar2 + (long)local_28 * 0x10 + 8); } else { local_c = 0.0; } } return local_c; }
53,515
js_weakref_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_weakref_finalizer(JSRuntime *rt, JSValue val) { JSWeakRefData *wrd = JS_GetOpaque(val, JS_CLASS_WEAK_REF); if (!wrd || wrd == &js_weakref_sentinel) return; /* Delete weak ref */ JSWeakRefRecord **pwr, *wr; pwr = get_first_weak_ref(wrd->target); for(;;) { wr = *pwr; assert(wr != NULL); if (wr->kind == JS_WEAK_REF_KIND_WEAK_REF && wr->u.weak_ref_data == wrd) break; pwr = &wr->next_weak_ref; } *pwr = wr->next_weak_ref; js_free_rt(rt, wrd); js_free_rt(rt, wr); }
O0
c
js_weakref_finalizer: subq $0x38, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi movl $0x3a, %edx callq 0x38350 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) je 0xe5242 leaq 0x51425(%rip), %rax # 0x136660 cmpq %rax, 0x18(%rsp) jne 0xe5244 jmp 0xe52c2 movq 0x18(%rsp), %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x5c110 movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movq (%rax), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax cmpl $0x1, (%rax) jne 0xe5283 movq 0x8(%rsp), %rax movq 0x10(%rax), %rax cmpq 0x18(%rsp), %rax jne 0xe5283 jmp 0xe5293 movq 0x8(%rsp), %rax addq $0x8, %rax movq %rax, 0x10(%rsp) jmp 0xe525a movq 0x8(%rsp), %rax movq 0x8(%rax), %rcx movq 0x10(%rsp), %rax movq %rcx, (%rax) movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x21960 movq 0x20(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x21960 addq $0x38, %rsp retq nopw (%rax,%rax)
js_weakref_finalizer: sub rsp, 38h mov [rsp+38h+var_10], rsi mov [rsp+38h+var_8], rdx mov [rsp+38h+var_18], rdi mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_8] mov edx, 3Ah ; ':' call JS_GetOpaque mov [rsp+38h+var_20], rax cmp [rsp+38h+var_20], 0 jz short loc_E5242 lea rax, js_weakref_sentinel cmp [rsp+38h+var_20], rax jnz short loc_E5244 loc_E5242: jmp short loc_E52C2 loc_E5244: mov rax, [rsp+38h+var_20] mov rdi, [rax] mov rsi, [rax+8] call get_first_weak_ref mov [rsp+38h+var_28], rax loc_E525A: mov rax, [rsp+38h+var_28] mov rax, [rax] mov [rsp+38h+var_30], rax mov rax, [rsp+38h+var_30] cmp dword ptr [rax], 1 jnz short loc_E5283 mov rax, [rsp+38h+var_30] mov rax, [rax+10h] cmp rax, [rsp+38h+var_20] jnz short loc_E5283 jmp short loc_E5293 loc_E5283: mov rax, [rsp+38h+var_30] add rax, 8 mov [rsp+38h+var_28], rax jmp short loc_E525A loc_E5293: mov rax, [rsp+38h+var_30] mov rcx, [rax+8] mov rax, [rsp+38h+var_28] mov [rax], rcx mov rdi, [rsp+38h+var_18] mov rsi, [rsp+38h+var_20] call js_free_rt mov rdi, [rsp+38h+var_18] mov rsi, [rsp+38h+var_30] call js_free_rt loc_E52C2: add rsp, 38h retn
void js_weakref_finalizer(long long a1, long long a2, int a3) { _DWORD *v3; // [rsp+8h] [rbp-30h] char *i; // [rsp+10h] [rbp-28h] long long Opaque; // [rsp+18h] [rbp-20h] Opaque = JS_GetOpaque(a2, a3, 58); if ( Opaque && (_UNKNOWN *)Opaque != &js_weakref_sentinel ) { for ( i = (char *)get_first_weak_ref(*(const char **)Opaque, *(_QWORD *)(Opaque + 8)); ; i = (char *)(v3 + 2) ) { v3 = *(_DWORD **)i; if ( **(_DWORD **)i == 1 && *((_QWORD *)v3 + 2) == Opaque ) break; } *(_QWORD *)i = *((_QWORD *)v3 + 1); js_free_rt(a1, Opaque); js_free_rt(a1, (long long)v3); } }
js_weakref_finalizer: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] MOV EDX,0x3a CALL 0x00138350 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JZ 0x001e5242 LEA RAX,[0x236660] CMP qword ptr [RSP + 0x18],RAX JNZ 0x001e5244 LAB_001e5242: JMP 0x001e52c2 LAB_001e5244: MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x0015c110 MOV qword ptr [RSP + 0x10],RAX LAB_001e525a: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX],0x1 JNZ 0x001e5283 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RSP + 0x18] JNZ 0x001e5283 JMP 0x001e5293 LAB_001e5283: MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x8 MOV qword ptr [RSP + 0x10],RAX JMP 0x001e525a LAB_001e5293: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00121960 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x8] CALL 0x00121960 LAB_001e52c2: ADD RSP,0x38 RET
void js_weakref_finalizer(int8 param_1,int8 param_2,int8 param_3) { int *piVar1; int8 *puVar2; int *local_28; puVar2 = (int8 *)JS_GetOpaque(param_2,param_3,0x3a); if ((puVar2 != (int8 *)0x0) && (puVar2 != (int8 *)js_weakref_sentinel)) { local_28 = (int *)get_first_weak_ref(*puVar2,puVar2[1]); while ((piVar1 = *(int **)local_28, *piVar1 != 1 || (*(int8 **)(piVar1 + 4) != puVar2))) { local_28 = piVar1 + 2; } *(int8 *)local_28 = *(int8 *)(piVar1 + 2); js_free_rt(param_1,puVar2); js_free_rt(param_1,piVar1); } return; }
53,516
js_weakref_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_weakref_finalizer(JSRuntime *rt, JSValue val) { JSWeakRefData *wrd = JS_GetOpaque(val, JS_CLASS_WEAK_REF); if (!wrd || wrd == &js_weakref_sentinel) return; /* Delete weak ref */ JSWeakRefRecord **pwr, *wr; pwr = get_first_weak_ref(wrd->target); for(;;) { wr = *pwr; assert(wr != NULL); if (wr->kind == JS_WEAK_REF_KIND_WEAK_REF && wr->u.weak_ref_data == wrd) break; pwr = &wr->next_weak_ref; } *pwr = wr->next_weak_ref; js_free_rt(rt, wrd); js_free_rt(rt, wr); }
O1
c
js_weakref_finalizer: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq %rsi, 0x8(%rsp) cmpl $-0x1, %edx jne 0x84058 movq 0x8(%rsp), %rax cmpw $0x3a, 0x6(%rax) jne 0x84058 movq 0x30(%rax), %r14 jmp 0x8405b xorl %r14d, %r14d testq %r14, %r14 sete %al leaq 0x495a0(%rip), %rcx # 0xcd608 cmpq %rcx, %r14 sete %cl orb %al, %cl je 0x8407c addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movsd (%r14), %xmm0 movl 0x8(%r14), %eax movsd %xmm0, 0x8(%rsp) cmpl $-0x8, %eax je 0x840a4 cmpl $-0x1, %eax jne 0x8411e movq 0x8(%rsp), %rax addq $0x28, %rax jmp 0x840b6 movq 0x8(%rsp), %rax addq $0x10, %rax jmp 0x840b6 addq $0x8, %r15 movq %r15, %rax movq (%rax), %r15 cmpl $0x1, (%r15) jne 0x840af cmpq %r14, 0x10(%r15) jne 0x840af movq 0x8(%r15), %rcx movq %rcx, (%rax) decq 0x28(%rbx) movq %r14, %rdi callq *0x20(%rbx) movq 0x30(%rbx), %rcx movq 0x40(%rbx), %rdi subq %rax, %rcx addq $-0x8, %rcx movq %rcx, 0x30(%rbx) movq %r14, %rsi callq *0x10(%rbx) decq 0x28(%rbx) movq %r15, %rdi callq *0x20(%rbx) movq 0x10(%rbx), %rcx movq 0x30(%rbx), %rdx subq %rax, %rdx addq $-0x8, %rdx movq %rdx, 0x30(%rbx) movq 0x40(%rbx), %rdi movq %r15, %rsi addq $0x10, %rsp popq %rbx popq %r14 popq %r15 jmpq *%rcx callq 0xe090
js_weakref_finalizer: push r15 push r14 push rbx sub rsp, 10h mov rbx, rdi mov [rsp+28h+var_20], rsi cmp edx, 0FFFFFFFFh jnz short loc_84058 mov rax, [rsp+28h+var_20] cmp word ptr [rax+6], 3Ah ; ':' jnz short loc_84058 mov r14, [rax+30h] jmp short loc_8405B loc_84058: xor r14d, r14d loc_8405B: test r14, r14 setz al lea rcx, js_weakref_sentinel cmp r14, rcx setz cl or cl, al jz short loc_8407C add rsp, 10h pop rbx pop r14 pop r15 retn loc_8407C: movsd xmm0, qword ptr [r14] mov eax, [r14+8] movsd [rsp+28h+var_20], xmm0 cmp eax, 0FFFFFFF8h jz short loc_840A4 cmp eax, 0FFFFFFFFh jnz loc_8411E mov rax, [rsp+28h+var_20] add rax, 28h ; '(' jmp short loc_840B6 loc_840A4: mov rax, [rsp+28h+var_20] add rax, 10h jmp short loc_840B6 loc_840AF: add r15, 8 mov rax, r15 loc_840B6: mov r15, [rax] cmp dword ptr [r15], 1 jnz short loc_840AF cmp [r15+10h], r14 jnz short loc_840AF mov rcx, [r15+8] mov [rax], rcx dec qword ptr [rbx+28h] mov rdi, r14 call qword ptr [rbx+20h] mov rcx, [rbx+30h] mov rdi, [rbx+40h] sub rcx, rax add rcx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rcx mov rsi, r14 call qword ptr [rbx+10h] dec qword ptr [rbx+28h] mov rdi, r15 call qword ptr [rbx+20h] mov rcx, [rbx+10h] mov rdx, [rbx+30h] sub rdx, rax add rdx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rdx mov rdi, [rbx+40h] mov rsi, r15 add rsp, 10h pop rbx pop r14 pop r15 jmp rcx loc_8411E: call _abort
char js_weakref_finalizer(long long a1, long long a2, int a3) { _DWORD *v4; // r14 char result; // al int v6; // eax _QWORD *v7; // rax _DWORD *v8; // r15 long long v9; // rax long long v10; // rdi long long v11; // rax long long ( *v12)(_QWORD, _DWORD *); // rcx long long v13; // [rsp+8h] [rbp-20h] if ( a3 == -1 && *(_WORD *)(a2 + 6) == 58 ) v4 = *(_DWORD **)(a2 + 48); else v4 = 0LL; result = v4 == 0LL; if ( v4 != 0LL && v4 != (_DWORD *)&js_weakref_sentinel ) { v6 = v4[2]; v13 = *(_QWORD *)v4; if ( v6 == -8 ) { v7 = (_QWORD *)(v13 + 16); } else { if ( v6 != -1 ) abort((const char *)a1); v7 = (_QWORD *)(v13 + 40); } while ( 1 ) { v8 = (_DWORD *)*v7; if ( *(_DWORD *)*v7 == 1 && *((_DWORD **)v8 + 2) == v4 ) break; v7 = v8 + 2; } *v7 = *((_QWORD *)v8 + 1); --*(_QWORD *)(a1 + 40); v9 = (*(long long ( **)(_DWORD *))(a1 + 32))(v4); v10 = *(_QWORD *)(a1 + 64); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v9 - 8; (*(void ( **)(long long, _DWORD *))(a1 + 16))(v10, v4); --*(_QWORD *)(a1 + 40); v11 = (*(long long ( **)(_DWORD *))(a1 + 32))(v8); v12 = *(long long ( **)(_QWORD, _DWORD *))(a1 + 16); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v11 - 8; return v12(*(_QWORD *)(a1 + 64), v8); } return result; }
js_weakref_finalizer: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV qword ptr [RSP + 0x8],RSI CMP EDX,-0x1 JNZ 0x00184058 MOV RAX,qword ptr [RSP + 0x8] CMP word ptr [RAX + 0x6],0x3a JNZ 0x00184058 MOV R14,qword ptr [RAX + 0x30] JMP 0x0018405b LAB_00184058: XOR R14D,R14D LAB_0018405b: TEST R14,R14 SETZ AL LEA RCX,[0x1cd608] CMP R14,RCX SETZ CL OR CL,AL JZ 0x0018407c ADD RSP,0x10 POP RBX POP R14 POP R15 RET LAB_0018407c: MOVSD XMM0,qword ptr [R14] MOV EAX,dword ptr [R14 + 0x8] MOVSD qword ptr [RSP + 0x8],XMM0 CMP EAX,-0x8 JZ 0x001840a4 CMP EAX,-0x1 JNZ 0x0018411e MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x28 JMP 0x001840b6 LAB_001840a4: MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x10 JMP 0x001840b6 LAB_001840af: ADD R15,0x8 MOV RAX,R15 LAB_001840b6: MOV R15,qword ptr [RAX] CMP dword ptr [R15],0x1 JNZ 0x001840af CMP qword ptr [R15 + 0x10],R14 JNZ 0x001840af MOV RCX,qword ptr [R15 + 0x8] MOV qword ptr [RAX],RCX DEC qword ptr [RBX + 0x28] MOV RDI,R14 CALL qword ptr [RBX + 0x20] MOV RCX,qword ptr [RBX + 0x30] MOV RDI,qword ptr [RBX + 0x40] SUB RCX,RAX ADD RCX,-0x8 MOV qword ptr [RBX + 0x30],RCX MOV RSI,R14 CALL qword ptr [RBX + 0x10] DEC qword ptr [RBX + 0x28] MOV RDI,R15 CALL qword ptr [RBX + 0x20] MOV RCX,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x30] SUB RDX,RAX ADD RDX,-0x8 MOV qword ptr [RBX + 0x30],RDX MOV RDI,qword ptr [RBX + 0x40] MOV RSI,R15 ADD RSP,0x10 POP RBX POP R14 POP R15 JMP RCX LAB_0018411e: CALL 0x0010e090
void js_weakref_finalizer(long param_1,long param_2,int param_3) { int *piVar1; int *piVar2; long lVar3; long *plVar4; if ((param_3 == -1) && (*(short *)(param_2 + 6) == 0x3a)) { plVar4 = *(long **)(param_2 + 0x30); } else { plVar4 = (long *)0x0; } if (plVar4 == (long *)js_weakref_sentinel || plVar4 == (long *)0x0) { return; } if ((int)plVar4[1] == -8) { piVar2 = (int *)(*plVar4 + 0x10); } else { if ((int)plVar4[1] != -1) { /* WARNING: Subroutine does not return */ abort(); } piVar2 = (int *)(*plVar4 + 0x28); } while ((piVar1 = *(int **)piVar2, *piVar1 != 1 || (*(long **)(piVar1 + 4) != plVar4))) { piVar2 = piVar1 + 2; } *(int8 *)piVar2 = *(int8 *)(piVar1 + 2); *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1; lVar3 = (**(code **)(param_1 + 0x20))(plVar4); *(long *)(param_1 + 0x30) = (*(long *)(param_1 + 0x30) - lVar3) + -8; (**(code **)(param_1 + 0x10))(*(int8 *)(param_1 + 0x40),plVar4); *(long *)(param_1 + 0x28) = *(long *)(param_1 + 0x28) + -1; lVar3 = (**(code **)(param_1 + 0x20))(piVar1); lVar3 = (*(long *)(param_1 + 0x30) - lVar3) + -8; *(long *)(param_1 + 0x30) = lVar3; /* WARNING: Could not recover jumptable at 0x0018411c. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(param_1 + 0x10)) (*(int8 *)(param_1 + 0x40),piVar1,lVar3,*(code **)(param_1 + 0x10)); return; }
53,517
js_weakref_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_weakref_finalizer(JSRuntime *rt, JSValue val) { JSWeakRefData *wrd = JS_GetOpaque(val, JS_CLASS_WEAK_REF); if (!wrd || wrd == &js_weakref_sentinel) return; /* Delete weak ref */ JSWeakRefRecord **pwr, *wr; pwr = get_first_weak_ref(wrd->target); for(;;) { wr = *pwr; assert(wr != NULL); if (wr->kind == JS_WEAK_REF_KIND_WEAK_REF && wr->u.weak_ref_data == wrd) break; pwr = &wr->next_weak_ref; } *pwr = wr->next_weak_ref; js_free_rt(rt, wrd); js_free_rt(rt, wr); }
O2
c
js_weakref_finalizer: pushq %r15 pushq %r14 pushq %rbx cmpl $-0x1, %edx jne 0x6ed8d cmpw $0x3a, 0x6(%rsi) jne 0x6ed8d movq 0x30(%rsi), %r14 testq %r14, %r14 sete %al leaq 0x4c895(%rip), %rcx # 0xbb618 cmpq %rcx, %r14 sete %cl orb %al, %cl je 0x6ed93 popq %rbx popq %r14 popq %r15 retq movq %rdi, %rbx movq (%r14), %rdi movq 0x8(%r14), %rsi callq 0x34219 movq (%rax), %r15 cmpl $0x1, (%r15) jne 0x6edb1 cmpq %r14, 0x10(%r15) je 0x6edba addq $0x8, %r15 movq %r15, %rax jmp 0x6eda2 movq 0x8(%r15), %rcx movq %rcx, (%rax) movq %rbx, %rdi movq %r14, %rsi callq 0x170cb movq %rbx, %rdi movq %r15, %rsi popq %rbx popq %r14 popq %r15 jmp 0x170cb
js_weakref_finalizer: push r15 push r14 push rbx cmp edx, 0FFFFFFFFh jnz short loc_6ED8D cmp word ptr [rsi+6], 3Ah ; ':' jnz short loc_6ED8D mov r14, [rsi+30h] test r14, r14 setz al lea rcx, js_weakref_sentinel cmp r14, rcx setz cl or cl, al jz short loc_6ED93 loc_6ED8D: pop rbx pop r14 pop r15 retn loc_6ED93: mov rbx, rdi mov rdi, [r14] mov rsi, [r14+8] call get_first_weak_ref loc_6EDA2: mov r15, [rax] cmp dword ptr [r15], 1 jnz short loc_6EDB1 cmp [r15+10h], r14 jz short loc_6EDBA loc_6EDB1: add r15, 8 mov rax, r15 jmp short loc_6EDA2 loc_6EDBA: mov rcx, [r15+8] mov [rax], rcx mov rdi, rbx mov rsi, r14 call js_free_rt mov rdi, rbx mov rsi, r15 pop rbx pop r14 pop r15 jmp js_free_rt
void js_weakref_finalizer(long long a1, long long a2, int a3) { const char **v3; // r14 char *i; // rax _DWORD *v5; // r15 if ( a3 == -1 && *(_WORD *)(a2 + 6) == 58 ) { v3 = *(const char ***)(a2 + 48); if ( v3 != 0LL && v3 != (const char **)&js_weakref_sentinel ) { for ( i = (char *)get_first_weak_ref(*v3, (int)v3[1]); ; i = (char *)(v5 + 2) ) { v5 = *(_DWORD **)i; if ( **(_DWORD **)i == 1 && *((const char ***)v5 + 2) == v3 ) break; } *(_QWORD *)i = *((_QWORD *)v5 + 1); js_free_rt(a1, (long long)v3); js_free_rt(a1, (long long)v5); } } }
js_weakref_finalizer: PUSH R15 PUSH R14 PUSH RBX CMP EDX,-0x1 JNZ 0x0016ed8d CMP word ptr [RSI + 0x6],0x3a JNZ 0x0016ed8d MOV R14,qword ptr [RSI + 0x30] TEST R14,R14 SETZ AL LEA RCX,[0x1bb618] CMP R14,RCX SETZ CL OR CL,AL JZ 0x0016ed93 LAB_0016ed8d: POP RBX POP R14 POP R15 RET LAB_0016ed93: MOV RBX,RDI MOV RDI,qword ptr [R14] MOV RSI,qword ptr [R14 + 0x8] CALL 0x00134219 LAB_0016eda2: MOV R15,qword ptr [RAX] CMP dword ptr [R15],0x1 JNZ 0x0016edb1 CMP qword ptr [R15 + 0x10],R14 JZ 0x0016edba LAB_0016edb1: ADD R15,0x8 MOV RAX,R15 JMP 0x0016eda2 LAB_0016edba: MOV RCX,qword ptr [R15 + 0x8] MOV qword ptr [RAX],RCX MOV RDI,RBX MOV RSI,R14 CALL 0x001170cb MOV RDI,RBX MOV RSI,R15 POP RBX POP R14 POP R15 JMP 0x001170cb
void js_weakref_finalizer(int8 param_1,long param_2,int param_3) { int8 *puVar1; int *piVar2; int *piVar3; if ((param_3 == -1) && (*(short *)(param_2 + 6) == 0x3a)) { puVar1 = *(int8 **)(param_2 + 0x30); if (puVar1 != (int8 *)js_weakref_sentinel && puVar1 != (int8 *)0x0) { piVar3 = (int *)get_first_weak_ref(*puVar1,puVar1[1]); while ((piVar2 = *(int **)piVar3, *piVar2 != 1 || (*(int8 **)(piVar2 + 4) != puVar1))) { piVar3 = piVar2 + 2; } *(int8 *)piVar3 = *(int8 *)(piVar2 + 2); js_free_rt(param_1,puVar1); js_free_rt(param_1,piVar2); return; } } return; }
53,518
evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op_call<(evmone::Opcode)241>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&)
corpus-core[P]colibri-stateless/build_O3/_deps/evmone_external-src/lib/evmone/advanced_instructions.cpp
const Instruction* op_call(const Instruction* instr, AdvancedExecutionState& state) noexcept { const auto gas_left_correction = state.current_block_cost - instr->arg.number; state.gas_left += gas_left_correction; const auto status = instr::impl<Op>(state); if (status != EVMC_SUCCESS) return state.exit(status); if ((state.gas_left -= gas_left_correction) < 0) return state.exit(EVMC_OUT_OF_GAS); return ++instr; }
O3
cpp
evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op_call<(evmone::Opcode)241>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movl 0x230(%rsi), %r15d subq 0x8(%rdi), %r15 movq 0x220(%rsi), %rsi addq %r15, %rsi movq %rsi, 0x220(%r14) movq 0x228(%r14), %rdi movq %r14, %rdx callq 0x47054 movq %rdx, 0x220(%r14) addq $-0xc0, 0x228(%r14) testl %eax, %eax je 0x4fdfc movl %eax, 0x78(%r14) xorl %ebx, %ebx jmp 0x4fe0c subq %r15, %rdx movq %rdx, 0x220(%r14) js 0x4fe15 addq $0x10, %rbx movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq movl $0x3, 0x78(%r14) jmp 0x4fdf8
_ZN6evmone8advanced12_GLOBAL__N_17op_callILNS_6OpcodeE241EEEPKNS0_11InstructionES6_RNS0_22AdvancedExecutionStateE: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi mov r15d, [rsi+230h] sub r15, [rdi+8] mov rsi, [rsi+220h] add rsi, r15 mov [r14+220h], rsi mov rdi, [r14+228h] mov rdx, r14 call _ZN6evmone5instr4core9call_implILNS_6OpcodeE241EEENS_6ResultENS_8StackTopElRNS_14ExecutionStateE; evmone::instr::core::call_impl<(evmone::Opcode)241>(evmone::StackTop,long,evmone::ExecutionState &) mov [r14+220h], rdx add qword ptr [r14+228h], 0FFFFFFFFFFFFFF40h test eax, eax jz short loc_4FDFC mov [r14+78h], eax loc_4FDF8: xor ebx, ebx jmp short loc_4FE0C loc_4FDFC: sub rdx, r15 mov [r14+220h], rdx js short loc_4FE15 add rbx, 10h loc_4FE0C: mov rax, rbx pop rbx pop r14 pop r15 retn loc_4FE15: mov dword ptr [r14+78h], 3 jmp short loc_4FDF8
long long evmone::advanced::`anonymous namespace'::op_call<(evmone::Opcode)241>(long long a1, long long a2) { long long v3; // r15 long long v4; // rsi int v5; // eax long long v6; // rdx long long v8; // rdx v3 = *(unsigned int *)(a2 + 560) - *(_QWORD *)(a1 + 8); v4 = v3 + *(_QWORD *)(a2 + 544); *(_QWORD *)(a2 + 544) = v4; v5 = evmone::instr::core::call_impl<(evmone::Opcode)241>(*(const __m128i **)(a2 + 552), v4, a2); *(_QWORD *)(a2 + 544) = v6; *(_QWORD *)(a2 + 552) -= 192LL; if ( v5 ) { *(_DWORD *)(a2 + 120) = v5; } else { v8 = v6 - v3; *(_QWORD *)(a2 + 544) = v8; if ( v8 >= 0 ) return a1 + 16; *(_DWORD *)(a2 + 120) = 3; } return 0LL; }
op_call<(evmone::Opcode)241>: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV R15D,dword ptr [RSI + 0x230] SUB R15,qword ptr [RDI + 0x8] MOV RSI,qword ptr [RSI + 0x220] ADD RSI,R15 MOV qword ptr [R14 + 0x220],RSI MOV RDI,qword ptr [R14 + 0x228] MOV RDX,R14 CALL 0x00147054 MOV qword ptr [R14 + 0x220],RDX ADD qword ptr [R14 + 0x228],-0xc0 TEST EAX,EAX JZ 0x0014fdfc MOV dword ptr [R14 + 0x78],EAX LAB_0014fdf8: XOR EBX,EBX JMP 0x0014fe0c LAB_0014fdfc: SUB RDX,R15 MOV qword ptr [R14 + 0x220],RDX JS 0x0014fe15 ADD RBX,0x10 LAB_0014fe0c: MOV RAX,RBX POP RBX POP R14 POP R15 RET LAB_0014fe15: MOV dword ptr [R14 + 0x78],0x3 JMP 0x0014fdf8
/* evmone::advanced::Instruction const* evmone::advanced::(anonymous namespace)::op_call<(evmone::Opcode)241>(evmone::advanced::Instruction const*, evmone::advanced::AdvancedExecutionState&) */ Instruction * evmone::advanced::(anonymous_namespace)::op_call<(evmone::Opcode)241> (Instruction *param_1,AdvancedExecutionState *param_2) { uint uVar1; int iVar2; long extraout_RDX; long lVar3; long lVar4; uVar1 = *(uint *)(param_2 + 0x230); lVar3 = *(long *)(param_1 + 8); lVar4 = *(long *)(param_2 + 0x220) + ((ulong)uVar1 - lVar3); *(long *)(param_2 + 0x220) = lVar4; iVar2 = instr::core::call_impl<(evmone::Opcode)241> (*(int8 *)(param_2 + 0x228),lVar4,param_2); *(long *)(param_2 + 0x220) = extraout_RDX; *(long *)(param_2 + 0x228) = *(long *)(param_2 + 0x228) + -0xc0; if (iVar2 == 0) { lVar3 = extraout_RDX - ((ulong)uVar1 - lVar3); *(long *)(param_2 + 0x220) = lVar3; if (-1 < lVar3) { return param_1 + 0x10; } *(int4 *)(param_2 + 0x78) = 3; } else { *(int *)(param_2 + 0x78) = iVar2; } return (Instruction *)0x0; }
53,519
strmake_root
eloqsql/mysys/my_alloc.c
char *strmake_root(MEM_ROOT *root, const char *str, size_t len) { char *pos; if ((pos=alloc_root(root,len+1))) { if (len) memcpy(pos,str,len); pos[len]=0; } return pos; }
O0
c
strmake_root: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi addq $0x1, %rsi callq 0x36c00 movq %rax, -0x20(%rbp) cmpq $0x0, %rax je 0x37503 cmpq $0x0, -0x18(%rbp) je 0x374f7 movq -0x20(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x25230 movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx movb $0x0, (%rax,%rcx) movq -0x20(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax)
strmake_root: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] add rsi, 1 call alloc_root mov [rbp+var_20], rax cmp rax, 0 jz short loc_37503 cmp [rbp+var_18], 0 jz short loc_374F7 mov rdi, [rbp+var_20] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _memcpy loc_374F7: mov rax, [rbp+var_20] mov rcx, [rbp+var_18] mov byte ptr [rax+rcx], 0 loc_37503: mov rax, [rbp+var_20] add rsp, 20h pop rbp retn
char * strmake_root(_QWORD **a1, long long a2, long long a3) { char *v4; // [rsp+0h] [rbp-20h] v4 = alloc_root(a1, a3 + 1); if ( v4 ) { if ( a3 ) memcpy(v4, a2, a3); v4[a3] = 0; } return v4; }
strmake_root: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x1 CALL 0x00136c00 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JZ 0x00137503 CMP qword ptr [RBP + -0x18],0x0 JZ 0x001374f7 MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x00125230 LAB_001374f7: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + RCX*0x1],0x0 LAB_00137503: MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x20 POP RBP RET
void * strmake_root(int8 param_1,void *param_2,size_t param_3) { void *__dest; __dest = (void *)alloc_root(param_1,param_3 + 1); if (__dest != (void *)0x0) { if (param_3 != 0) { memcpy(__dest,param_2,param_3); } *(int1 *)((long)__dest + param_3) = 0; } return __dest; }
53,520
my_thread_global_init
eloqsql/mysys/my_thr_init.c
my_bool my_thread_global_init(void) { int pth_ret; /* Normally this should never be called twice */ DBUG_ASSERT(my_thread_global_init_done == 0); if (my_thread_global_init_done) return 0; my_thread_global_init_done= 1; /* THR_KEY_mysys is deleted in my_end() as DBUG libraries are using it even after my_thread_global_end() is called. my_thr_key_mysys_exist is used to protect against application like QT that calls my_thread_global_init() + my_thread_global_end() multiple times without calling my_init() + my_end(). */ if (!my_thr_key_mysys_exists && (pth_ret= pthread_key_create(&THR_KEY_mysys, NULL)) != 0) { fprintf(stderr, "Can't initialize threads: error %d\n", pth_ret); return 1; } my_thr_key_mysys_exists= 1; /* Mutex used by my_thread_init() and after my_thread_destroy_mutex() */ my_thread_init_internal_mutex(); if (my_thread_init()) return 1; my_thread_init_common_mutex(); return 0; }
O3
c
my_thread_global_init: cmpb $0x0, 0x36b9b9(%rip) # 0x3f1820 je 0x85e6c xorl %eax, %eax retq pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movb $0x1, 0x36b9a7(%rip) # 0x3f1820 leaq 0x36b6dc(%rip), %rbx # 0x3f155c cmpb $0x0, (%rbx) je 0x85ea3 movb $0x1, (%rbx) callq 0x85cbb callq 0x85edd movl %eax, %ecx movb $0x1, %al testb %cl, %cl jne 0x85ed6 callq 0x85b2e xorl %eax, %eax jmp 0x85ed6 leaq 0x36b97a(%rip), %rdi # 0x3f1824 xorl %esi, %esi callq 0x3aa80 testl %eax, %eax je 0x85e85 movq 0x2e6104(%rip), %rcx # 0x36bfc0 movq (%rcx), %rdi leaq 0x3b31f(%rip), %rdx # 0xc11e5 movl $0x1, %esi movl %eax, %ecx xorl %eax, %eax callq 0x3a2f0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %rbp retq
my_thread_global_init: cmp cs:my_thread_global_init_done, 0 jz short loc_85E6C xor eax, eax retn loc_85E6C: push rbp mov rbp, rsp push rbx push rax mov cs:my_thread_global_init_done, 1 lea rbx, my_thr_key_mysys_exists cmp byte ptr [rbx], 0 jz short loc_85EA3 loc_85E85: mov byte ptr [rbx], 1 call my_thread_init_internal_mutex call my_thread_init mov ecx, eax mov al, 1 test cl, cl jnz short loc_85ED6 call my_thread_init_common_mutex xor eax, eax jmp short loc_85ED6 loc_85EA3: lea rdi, THR_KEY_mysys xor esi, esi call _pthread_key_create test eax, eax jz short loc_85E85 mov rcx, cs:stderr_ptr mov rdi, [rcx] lea rdx, aCanTInitialize; "Can't initialize threads: error %d\n" mov esi, 1 mov ecx, eax xor eax, eax call ___fprintf_chk mov al, 1 loc_85ED6: add rsp, 8 pop rbx pop rbp retn
char my_thread_global_init(void *a1) { char result; // al char v2; // cl int v3; // eax if ( my_thread_global_init_done ) return 0; my_thread_global_init_done = 1; if ( my_thr_key_mysys_exists || (a1 = &THR_KEY_mysys, (v3 = pthread_key_create(&THR_KEY_mysys, 0LL)) == 0) ) { my_thr_key_mysys_exists = 1; my_thread_init_internal_mutex(); v2 = my_thread_init(a1); result = 1; if ( !v2 ) { my_thread_init_common_mutex(); return 0; } } else { __fprintf_chk(stderr, 1LL, "Can't initialize threads: error %d\n", v3); return 1; } return result; }
my_thread_global_init: CMP byte ptr [0x004f1820],0x0 JZ 0x00185e6c XOR EAX,EAX RET LAB_00185e6c: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV byte ptr [0x004f1820],0x1 LEA RBX,[0x4f155c] CMP byte ptr [RBX],0x0 JZ 0x00185ea3 LAB_00185e85: MOV byte ptr [RBX],0x1 CALL 0x00185cbb CALL 0x00185edd MOV ECX,EAX MOV AL,0x1 TEST CL,CL JNZ 0x00185ed6 CALL 0x00185b2e XOR EAX,EAX JMP 0x00185ed6 LAB_00185ea3: LEA RDI,[0x4f1824] XOR ESI,ESI CALL 0x0013aa80 TEST EAX,EAX JZ 0x00185e85 MOV RCX,qword ptr [0x0046bfc0] MOV RDI,qword ptr [RCX] LEA RDX,[0x1c11e5] MOV ESI,0x1 MOV ECX,EAX XOR EAX,EAX CALL 0x0013a2f0 MOV AL,0x1 LAB_00185ed6: ADD RSP,0x8 POP RBX POP RBP RET
bool my_thread_global_init(void) { char cVar1; int iVar2; if (my_thread_global_init_done != '\0') { return false; } my_thread_global_init_done = 1; if ((my_thr_key_mysys_exists == '\0') && (iVar2 = pthread_key_create(&THR_KEY_mysys,(__destr_function *)0x0), iVar2 != 0)) { __fprintf_chk(*(int8 *)PTR_stderr_0046bfc0,1,"Can\'t initialize threads: error %d\n",iVar2 ); return true; } my_thr_key_mysys_exists = 1; my_thread_init_internal_mutex(); cVar1 = my_thread_init(); if (cVar1 == '\0') { my_thread_init_common_mutex(); } return cVar1 != '\0'; }
53,521
inline_mysql_file_open
eloqsql/include/mysql/psi/mysql_file.h
static inline File inline_mysql_file_open( #ifdef HAVE_PSI_FILE_INTERFACE PSI_file_key key, const char *src_file, uint src_line, #endif const char *filename, int flags, myf myFlags) { File file; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_OPEN, filename, &locker); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); file= my_open(filename, flags, myFlags); PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); return file; } #endif file= my_open(filename, flags, myFlags); return file; }
O0
c
inline_mysql_file_open: pushq %rbp movq %rsp, %rbp subq $0x90, %rsp movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq %r9, -0x30(%rbp) leaq 0x1b9340(%rip), %rax # 0x1e3e98 movq (%rax), %rax movq 0x148(%rax), %rax movl -0x8(%rbp), %esi movq -0x20(%rbp), %rcx leaq -0x88(%rbp), %rdi movl $0x2, %edx leaq -0x40(%rbp), %r8 callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x2abf2 leaq 0x1b92f2(%rip), %rax # 0x1e3e98 movq (%rax), %rax movq 0x1f0(%rax), %rax movq -0x40(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq *%rax movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0x32c40 movl %eax, -0x34(%rbp) leaq 0x1b92c1(%rip), %rax # 0x1e3e98 movq (%rax), %rax movq 0x200(%rax), %rax movq -0x40(%rbp), %rdi movl -0x34(%rbp), %esi callq *%rax movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x2ac0b movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movq -0x30(%rbp), %rdx callq 0x32c40 movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x90, %rsp popq %rbp retq nopw (%rax,%rax)
inline_mysql_file_open: push rbp mov rbp, rsp sub rsp, 90h mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+148h] mov esi, [rbp+var_8] mov rcx, [rbp+var_20] lea rdi, [rbp+var_88] mov edx, 2 lea r8, [rbp+var_40] call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_2ABF2 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1F0h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call rax mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+200h] mov rdi, [rbp+var_40] mov esi, [rbp+var_34] call rax mov eax, [rbp+var_34] mov [rbp+var_4], eax jmp short loc_2AC0B loc_2ABF2: mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov rdx, [rbp+var_30] call my_open mov [rbp+var_34], eax mov eax, [rbp+var_34] mov [rbp+var_4], eax loc_2AC0B: mov eax, [rbp+var_4] add rsp, 90h pop rbp retn
long long inline_mysql_file_open( unsigned int a1, long long a2, unsigned int a3, long long a4, unsigned int a5, long long a6) { _BYTE v7[72]; // [rsp+8h] [rbp-88h] BYREF long long v8; // [rsp+50h] [rbp-40h] BYREF unsigned int v9; // [rsp+5Ch] [rbp-34h] long long v10; // [rsp+60h] [rbp-30h] unsigned int v11; // [rsp+6Ch] [rbp-24h] long long v12; // [rsp+70h] [rbp-20h] unsigned int v13; // [rsp+7Ch] [rbp-14h] long long v14; // [rsp+80h] [rbp-10h] unsigned int v15; // [rsp+88h] [rbp-8h] v15 = a1; v14 = a2; v13 = a3; v12 = a4; v11 = a5; v10 = a6; v8 = (*((long long ( **)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server + 41))(v7, a1, 2LL, a4, &v8); if ( v8 ) { (*((void ( **)(long long, long long, _QWORD))PSI_server + 62))(v8, v14, v13); v9 = my_open(v12, v11, v10); (*((void ( **)(long long, _QWORD))PSI_server + 64))(v8, v9); } else { return (unsigned int)my_open(v12, v11, v10); } return v9; }
inline_mysql_file_open: PUSH RBP MOV RBP,RSP SUB RSP,0x90 MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x2e3e98] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV ESI,dword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x88] MOV EDX,0x2 LEA R8,[RBP + -0x40] CALL RAX MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x40],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0012abf2 LEA RAX,[0x2e3e98] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1f0] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x00132c40 MOV dword ptr [RBP + -0x34],EAX LEA RAX,[0x2e3e98] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x200] MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x34] CALL RAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX JMP 0x0012ac0b LAB_0012abf2: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV RDX,qword ptr [RBP + -0x30] CALL 0x00132c40 MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0x4],EAX LAB_0012ac0b: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x90 POP RBP RET
int4 inline_mysql_file_open (int4 param_1,int8 param_2,int4 param_3,int8 param_4, int4 param_5,int8 param_6) { int1 local_90 [72]; long local_48; int4 local_3c; int8 local_38; int4 local_2c; int8 local_28; int4 local_1c; int8 local_18; int4 local_10; int4 local_c; local_38 = param_6; local_2c = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_48 = (**(code **)(PSI_server + 0x148))(local_90,param_1,2,param_4,&local_48); if (local_48 == 0) { local_c = my_open(local_28,local_2c,local_38); } else { (**(code **)(PSI_server + 0x1f0))(local_48,local_18,local_1c); local_3c = my_open(local_28,local_2c,local_38); (**(code **)(PSI_server + 0x200))(local_48,local_3c); local_c = local_3c; } return local_c; }
53,522
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
T& operator[](const key_type& key) { return emplace(key, T{}).first->second; }
O1
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rsi, %rbx movq %rdi, %r15 leaq 0x40(%rsp), %r14 movq $0x0, 0x8(%r14) xorps %xmm0, %xmm0 movaps %xmm0, -0x40(%r14) movaps %xmm0, -0x30(%r14) movaps %xmm0, -0x20(%r14) movaps %xmm0, -0x10(%r14) movb $0x0, (%r14) movq %r14, %rdi movl $0x1, %esi callq 0x65cc4 movq %r14, %rdi movl $0x1, %esi callq 0x65cc4 movq %rsp, %rdx movq %r15, %rdi movq %rbx, %rsi callq 0x9d1fc movq %rax, %rbx movq %r14, %rdi xorl %esi, %esi callq 0x65cc4 movq %r14, %rdi callq 0x6b4b0 movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x9d183 callq 0x7ae1c movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x9d192 callq 0x7ae1c movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x9d1a1 callq 0x7ae1c movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x9d1d7 movq 0x9fdce(%rip), %rax # 0x13cf80 cmpb $0x0, (%rax) je 0x9d1c2 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x9d1cc movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x9d1d7 movq (%rdi), %rax callq *0x18(%rax) addq $0x10, %rbx movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %rdi callq 0x9441e movq %rbx, %rdi callq 0x1c020 nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_: push r15 push r14 push rbx sub rsp, 50h mov rbx, rsi mov r15, rdi lea r14, [rsp+68h+var_28] mov qword ptr [r14+8], 0 xorps xmm0, xmm0 movaps xmmword ptr [r14-40h], xmm0 movaps xmmword ptr [r14-30h], xmm0 movaps xmmword ptr [r14-20h], xmm0 movaps xmmword ptr [r14-10h], xmm0 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) 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 rdx, rsp mov rdi, r15 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceERSJ_OSF_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::emplace(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,minja::Value&&) mov rbx, rax 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 rdi, [rsp+68h+var_30] test rdi, rdi jz short loc_9D183 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9D183: mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_9D192 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9D192: mov rdi, [rsp+68h+var_50] test rdi, rdi jz short loc_9D1A1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_9D1A1: mov rdi, [rsp+68h+var_60] test rdi, rdi jz short loc_9D1D7 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_9D1C2 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_9D1CC loc_9D1C2: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_9D1CC: cmp eax, 1 jnz short loc_9D1D7 mov rax, [rdi] call qword ptr [rax+18h] loc_9D1D7: add rbx, 10h mov rax, rbx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, rsp; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator[]( long long a1, long long a2) { long long v2; // rbx long long v3; // rdi signed __int32 v4; // eax __int128 v6; // [rsp+0h] [rbp-68h] BYREF __int128 v7; // [rsp+10h] [rbp-58h] __int128 v8; // [rsp+20h] [rbp-48h] __int128 v9; // [rsp+30h] [rbp-38h] char v10[8]; // [rsp+40h] [rbp-28h] BYREF long long v11; // [rsp+48h] [rbp-20h] v11 = 0LL; v6 = 0LL; v7 = 0LL; v8 = 0LL; v9 = 0LL; v10[0] = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10); 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(v10); v2 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::emplace( a1, a2, &v6); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v10); 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(v10); if ( *((_QWORD *)&v9 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v9 + 1)); if ( *((_QWORD *)&v8 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v8 + 1)); if ( *((_QWORD *)&v7 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v7 + 1)); v3 = *((_QWORD *)&v6 + 1); if ( *((_QWORD *)&v6 + 1) ) { if ( _libc_single_threaded ) { v4 = *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL); *(_DWORD *)(*((_QWORD *)&v6 + 1) + 12LL) = v4 - 1; } else { v4 = _InterlockedExchangeAdd((volatile signed __int32 *)(*((_QWORD *)&v6 + 1) + 12LL), 0xFFFFFFFF); } if ( v4 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v3 + 24LL))(v3, 0LL); } return v2 + 16; }
operator[]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RSI MOV R15,RDI LEA R14,[RSP + 0x40] MOV qword ptr [R14 + 0x8],0x0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [R14 + -0x40],XMM0 MOVAPS xmmword ptr [R14 + -0x30],XMM0 MOVAPS xmmword ptr [R14 + -0x20],XMM0 MOVAPS xmmword ptr [R14 + -0x10],XMM0 MOV byte ptr [R14],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x00165cc4 MOV RDI,R14 MOV ESI,0x1 CALL 0x00165cc4 LAB_0019d151: MOV RDX,RSP MOV RDI,R15 MOV RSI,RBX CALL 0x0019d1fc LAB_0019d15f: MOV RBX,RAX MOV RDI,R14 XOR ESI,ESI CALL 0x00165cc4 MOV RDI,R14 CALL 0x0016b4b0 MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x0019d183 CALL 0x0017ae1c LAB_0019d183: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0019d192 CALL 0x0017ae1c LAB_0019d192: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x0019d1a1 CALL 0x0017ae1c LAB_0019d1a1: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0019d1d7 MOV RAX,qword ptr [0x0023cf80] CMP byte ptr [RAX],0x0 JZ 0x0019d1c2 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0019d1cc LAB_0019d1c2: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0019d1cc: CMP EAX,0x1 JNZ 0x0019d1d7 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0019d1d7: ADD RBX,0x10 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ long __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::operator[](ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,basic_json *param_1) { int *piVar1; int iVar2; long lVar3; bool bVar4; int8 local_68; long *plStack_60; int8 local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_50; int8 local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_40; int8 local_38; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_30; data local_28 [8]; int8 local_20; local_20 = 0; local_68 = 0; plStack_60 = (long *)0x0; local_58 = 0; p_Stack_50 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_48 = 0; p_Stack_40 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_38 = 0; p_Stack_30 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; local_28[0] = (data)0x0; bVar4 = SUB81(local_28,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(bVar4); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar4); /* try { // try from 0019d151 to 0019d15e has its CatchHandler @ 0019d1e8 */ lVar3 = emplace(this,param_1,(Value *)&local_68); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar4); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_28); if (p_Stack_30 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_30); } if (p_Stack_40 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_40); } if (p_Stack_50 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_50); } if (plStack_60 != (long *)0x0) { if (*PTR___libc_single_threaded_0023cf80 == '\0') { LOCK(); piVar1 = (int *)((long)plStack_60 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)plStack_60 + 0xc); *(int *)((long)plStack_60 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*plStack_60 + 0x18))(); } } return lVar3 + 0x10; }
53,523
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
T& operator[](const key_type& key) { return emplace(key, T{}).first->second; }
O3
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq %rdi, %r14 movq %rsp, %r15 movb $0x0, (%r15) movq $0x0, 0x8(%r15) movq %r15, %rdi movl $0x1, %esi callq 0x66666 movq %r15, %rdi movl $0x1, %esi callq 0x66666 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x6d238 movq %rax, %rbx addq $0x20, %rbx movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x66666 movq %r14, %rdi callq 0x6bb54 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x66666 movq %r14, %rdi callq 0x6bb54 movq %rbx, %rdi callq 0x1c020 nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEEixERSH_: push r15 push r14 push rbx sub rsp, 10h mov rbx, rsi mov r14, rdi mov r15, rsp mov byte ptr [r15], 0 mov qword ptr [r15+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov rsi, rbx mov rdx, r15 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&) mov rbx, rax add rbx, 20h ; ' ' mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn mov rbx, rax mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator[]( long long a1, long long a2) { long long v2; // rbx char v4[8]; // [rsp+0h] [rbp-28h] BYREF long long v5; // [rsp+8h] [rbp-20h] v4[0] = 0; v5 = 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(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>::assert_invariant(v4); v2 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace( a1, a2, v4) + 32; 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(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; }
operator[]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV R14,RDI MOV R15,RSP MOV byte ptr [R15],0x0 MOV qword ptr [R15 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x00166666 MOV RDI,R15 MOV ESI,0x1 CALL 0x00166666 LAB_0016d1a4: MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x0016d238 LAB_0016d1b2: MOV RBX,RAX ADD RBX,0x20 MOV R14,RSP MOV RDI,R14 XOR ESI,ESI CALL 0x00166666 MOV RDI,R14 CALL 0x0016bb54 MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > >::operator[](std::__cxx11::string const&) */ long __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::operator[](ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *this,string *param_1) { long lVar1; bool bVar2; basic_json local_28 [8]; int8 local_20; local_28[0] = (basic_json)0x0; local_20 = 0; bVar2 = SUB81(local_28,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(bVar2); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar2); /* try { // try from 0016d1a4 to 0016d1b1 has its CatchHandler @ 0016d1db */ lVar1 = emplace(this,param_1,local_28); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar2); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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 lVar1 + 0x20; }
53,524
tbb::detail::r1::prolonged_pause()
aimrt_mujoco_sim/_deps/tbb-src/src/tbb/scheduler_common.h
inline void prolonged_pause() { #if __TBB_WAITPKG_INTRINSICS_PRESENT if (governor::wait_package_enabled()) { std::uint64_t time_stamp = machine_time_stamp(); // _tpause function directs the processor to enter an implementation-dependent optimized state // until the Time Stamp Counter reaches or exceeds the value specified in second parameter. // Constant "1000" is ticks to wait for. // TODO : Modify this parameter based on empirical study of benchmarks. // First parameter 0 selects between a lower power (cleared) or faster wakeup (set) optimized state. _tpause(0, time_stamp + 1000); } else #endif prolonged_pause_impl(); }
O0
c
tbb::detail::r1::prolonged_pause(): subq $0x18, %rsp callq 0x396d00 testb $0x1, %al jne 0x396caf jmp 0x396ce9 callq 0x396d10 movq %rax, (%rsp) movq (%rsp), %rax addq $0x3e8, %rax # imm = 0x3E8 movl $0x0, 0x14(%rsp) movq %rax, 0x8(%rsp) movl 0x14(%rsp), %ecx movq 0x8(%rsp), %rax shrq $0x20, %rax movl %eax, %edx movq 0x8(%rsp), %rax tpause %ecx jmp 0x396cee callq 0x396d30 addq $0x18, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN3tbb6detail2r115prolonged_pauseEv: sub rsp, 18h call _ZN3tbb6detail2r18governor20wait_package_enabledEv; tbb::detail::r1::governor::wait_package_enabled(void) test al, 1 jnz short loc_396CAF jmp short loc_396CE9 loc_396CAF: call _ZN3tbb6detail2r118machine_time_stampEv; tbb::detail::r1::machine_time_stamp(void) mov [rsp+18h+var_18], rax mov rax, [rsp+18h+var_18] add rax, 3E8h mov [rsp+18h+var_4], 0 mov [rsp+18h+var_10], rax mov ecx, [rsp+18h+var_4] mov rax, [rsp+18h+var_10] shr rax, 20h mov edx, eax mov rax, [rsp+18h+var_10] tpause ecx jmp short loc_396CEE loc_396CE9: call _ZN3tbb6detail2r120prolonged_pause_implEv; tbb::detail::r1::prolonged_pause_impl(void) loc_396CEE: add rsp, 18h retn
long long tbb::detail::r1::prolonged_pause(tbb::detail::r1 *this) { long long result; // rax long long v3; // [rsp+0h] [rbp-18h] if ( (tbb::detail::r1::governor::wait_package_enabled(this) & 1) == 0 ) return tbb::detail::r1::prolonged_pause_impl(this); v3 = tbb::detail::r1::machine_time_stamp(this); _ECX = 0; result = v3 + 1000; __asm { tpause ecx } return result; }
release: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RDI CALL 0x00396cf0 MOV RDI,qword ptr [RSP] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x8],RAX CALL 0x00396cf0 MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x18 RET
/* std::__uniq_ptr_impl<aimrt::runtime::core::rpc::RpcRegistry, std::default_delete<aimrt::runtime::core::rpc::RpcRegistry> >::release() */ int8 __thiscall std:: __uniq_ptr_impl<aimrt::runtime::core::rpc::RpcRegistry,std::default_delete<aimrt::runtime::core::rpc::RpcRegistry>> ::release(__uniq_ptr_impl<aimrt::runtime::core::rpc::RpcRegistry,std::default_delete<aimrt::runtime::core::rpc::RpcRegistry>> *this) { int8 uVar1; int8 *puVar2; puVar2 = (int8 *)_M_ptr(this); uVar1 = *puVar2; puVar2 = (int8 *)_M_ptr(this); *puVar2 = 0; return uVar1; }
53,525
delete_dynamic_record
eloqsql/storage/myisam/mi_dynrec.c
static int delete_dynamic_record(MI_INFO *info, my_off_t filepos, uint second_read) { uint length,b_type; MI_BLOCK_INFO block_info,del_block; int error; my_bool remove_next_block; DBUG_ENTER("delete_dynamic_record"); /* First add a link from the last block to the new one */ error= update_backward_delete_link(info, info->s->state.dellink, filepos); block_info.second_read=second_read; do { /* Remove block at 'filepos' */ if ((b_type=_mi_get_block_info(&block_info,info->dfile,filepos)) & (BLOCK_DELETED | BLOCK_ERROR | BLOCK_SYNC_ERROR | BLOCK_FATAL_ERROR) || (length=(uint) (block_info.filepos-filepos) +block_info.block_len) < MI_MIN_BLOCK_LENGTH) { my_errno=HA_ERR_WRONG_IN_RECORD; DBUG_RETURN(1); } /* Check if next block is a delete block */ del_block.second_read=0; remove_next_block=0; if (_mi_get_block_info(&del_block,info->dfile,filepos+length) & BLOCK_DELETED && del_block.block_len+length < MI_DYN_MAX_BLOCK_LENGTH) { /* We can't remove this yet as this block may be the head block */ remove_next_block=1; length+=del_block.block_len; } block_info.header[0]=0; mi_int3store(block_info.header+1,length); mi_sizestore(block_info.header+4,info->s->state.dellink); if (b_type & BLOCK_LAST) bfill(block_info.header+12,8,255); else mi_sizestore(block_info.header+12,block_info.next_filepos); if (info->s->file_write(info,(uchar*) block_info.header,20,filepos, MYF(MY_NABP))) DBUG_RETURN(1); info->s->state.dellink = filepos; info->state->del++; info->state->empty+=length; filepos=block_info.next_filepos; /* Now it's safe to unlink the deleted block directly after this one */ if (remove_next_block && unlink_deleted_block(info,&del_block)) error=1; } while (!(b_type & BLOCK_LAST)); DBUG_RETURN(error); }
O3
c
delete_dynamic_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movl %edx, %r13d movq %rsi, %r15 movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq (%rdi), %rax movq 0x58(%rax), %rsi movq %r15, %rdx callq 0x33702 movl %eax, -0xe4(%rbp) leaq -0x88(%rbp), %rax movl %r13d, 0x50(%rax) movl 0x1c0(%r14), %esi leaq -0x88(%rbp), %rdi movq %r15, %rdx callq 0x331fb cmpl $0x3, %eax ja 0x32ad3 movq -0x50(%rbp), %rbx subq %r15, %rbx addq -0x60(%rbp), %rbx cmpl $0x13, %ebx jbe 0x32ad3 movl %eax, %r13d movl $0x0, -0x90(%rbp) movl 0x1c0(%r14), %esi movq %r15, %rax movl %ebx, %r15d movq %rax, -0xf0(%rbp) leaq (%r15,%rax), %rdx leaq -0xe0(%rbp), %rdi callq 0x331fb testb $0x4, %al sete %al addq -0xb8(%rbp), %r15 cmpq $0xfffffc, %r15 # imm = 0xFFFFFC setae %r12b orb %al, %r12b jne 0x32a0c movq %r15, %rbx movb $0x0, -0x88(%rbp) movb %bl, -0x85(%rbp) movb %bh, -0x86(%rbp) movl %ebx, %eax shrl $0x10, %eax movb %al, -0x87(%rbp) movq (%r14), %rax movq 0x58(%rax), %rcx bswapq %rcx movq %rcx, -0x84(%rbp) cmpl $0x2, %r13d jae 0x32a4e movq -0x48(%rbp), %rcx bswapq %rcx movq %rcx, -0x7c(%rbp) jmp 0x32a56 movq $-0x1, -0x7c(%rbp) movq -0xf0(%rbp), %r15 movl $0x14, %edx movl $0x4, %r8d movq %r14, %rdi leaq -0x88(%rbp), %rsi movq %r15, %rcx callq *0x2e8(%rax) testq %rax, %rax jne 0x32ade movl %ebx, %eax movq (%r14), %rcx movq %r15, 0x58(%rcx) movq 0x8(%r14), %rcx incq 0x8(%rcx) movq 0x8(%r14), %rcx addq %rax, 0x10(%rcx) movq -0x48(%rbp), %r15 testb %r12b, %r12b jne 0x32ac7 movq %r14, %rdi leaq -0xe0(%rbp), %rsi callq 0x335d1 testb %al, %al movl -0xe4(%rbp), %eax movl $0x1, %ecx cmovnel %ecx, %eax movl %eax, -0xe4(%rbp) cmpl $0x2, %r13d jb 0x32989 jmp 0x32ae8 callq 0x624a2 movl $0x7f, (%rax) movl $0x1, -0xe4(%rbp) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x32b0f movl -0xe4(%rbp), %eax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x28470
delete_dynamic_record: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov r13d, edx mov r15, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_30], rax mov rax, [rdi] mov rsi, [rax+58h] mov rdx, r15 call update_backward_delete_link mov [rbp+var_E4], eax lea rax, [rbp+var_88] mov [rax+50h], r13d loc_32989: mov esi, [r14+1C0h] lea rdi, [rbp+var_88] mov rdx, r15 call _mi_get_block_info cmp eax, 3 ja loc_32AD3 mov rbx, [rbp+var_50] sub rbx, r15 add rbx, [rbp+var_60] cmp ebx, 13h jbe loc_32AD3 mov r13d, eax mov [rbp+var_90], 0 mov esi, [r14+1C0h] mov rax, r15 mov r15d, ebx mov [rbp+var_F0], rax lea rdx, [r15+rax] lea rdi, [rbp+var_E0] call _mi_get_block_info test al, 4 setz al add r15, [rbp+var_B8] cmp r15, 0FFFFFCh setnb r12b or r12b, al jnz short loc_32A0C mov rbx, r15 loc_32A0C: mov [rbp+var_88], 0 mov [rbp+var_85], bl mov [rbp+var_86], bh mov eax, ebx shr eax, 10h mov [rbp+var_87], al mov rax, [r14] mov rcx, [rax+58h] bswap rcx mov [rbp+var_84], rcx cmp r13d, 2 jnb short loc_32A4E mov rcx, [rbp+var_48] bswap rcx mov [rbp+var_7C], rcx jmp short loc_32A56 loc_32A4E: mov [rbp+var_7C], 0FFFFFFFFFFFFFFFFh loc_32A56: mov r15, [rbp+var_F0] mov edx, 14h mov r8d, 4 mov rdi, r14 lea rsi, [rbp+var_88] mov rcx, r15 call qword ptr [rax+2E8h] test rax, rax jnz short loc_32ADE mov eax, ebx mov rcx, [r14] mov [rcx+58h], r15 mov rcx, [r14+8] inc qword ptr [rcx+8] mov rcx, [r14+8] add [rcx+10h], rax mov r15, [rbp+var_48] test r12b, r12b jnz short loc_32AC7 mov rdi, r14 lea rsi, [rbp+var_E0] call unlink_deleted_block test al, al mov eax, [rbp+var_E4] mov ecx, 1 cmovnz eax, ecx mov [rbp+var_E4], eax loc_32AC7: cmp r13d, 2 jb loc_32989 jmp short loc_32AE8 loc_32AD3: call _my_thread_var mov dword ptr [rax], 7Fh loc_32ADE: mov [rbp+var_E4], 1 loc_32AE8: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_32B0F mov eax, [rbp+var_E4] add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_32B0F: call ___stack_chk_fail
long long delete_dynamic_record(unsigned int *a1, unsigned long long a2, int a3) { unsigned long long v4; // r15 long long v5; // rsi unsigned int block_info; // eax long long v7; // rdx unsigned int v8; // ebx unsigned int v9; // r13d char v10; // al bool v11; // r12 long long v12; // rax bool v13; // zf int v14; // eax unsigned int v16; // [rsp+Ch] [rbp-E4h] _BYTE v17[40]; // [rsp+10h] [rbp-E0h] BYREF long long v18; // [rsp+38h] [rbp-B8h] int v19; // [rsp+60h] [rbp-90h] _BYTE v20[4]; // [rsp+68h] [rbp-88h] BYREF unsigned long long v21; // [rsp+6Ch] [rbp-84h] unsigned long long v22; // [rsp+74h] [rbp-7Ch] long long v23; // [rsp+90h] [rbp-60h] long long v24; // [rsp+A0h] [rbp-50h] unsigned long long v25; // [rsp+A8h] [rbp-48h] int v26; // [rsp+B8h] [rbp-38h] unsigned long long v27; // [rsp+C0h] [rbp-30h] v4 = a2; v27 = __readfsqword(0x28u); v16 = update_backward_delete_link(a1, *(_QWORD *)(*(_QWORD *)a1 + 88LL), a2); v26 = a3; while ( 1 ) { v5 = a1[112]; block_info = mi_get_block_info(v20, v5, v4); if ( block_info > 3 ) break; v8 = v23 + v24 - v4; if ( v8 <= 0x13 ) break; v9 = block_info; v19 = 0; v10 = mi_get_block_info(v17, a1[112], v8 + v4); v11 = (v10 & 4) == 0 || v18 + (unsigned long long)v8 >= 0xFFFFFC; if ( !v11 ) v8 += v18; v20[0] = 0; v20[2] = BYTE1(v8); v20[3] = v8; v20[1] = BYTE2(v8); v12 = *(_QWORD *)a1; v21 = _byteswap_uint64(*(_QWORD *)(*(_QWORD *)a1 + 88LL)); if ( v9 >= 2 ) v22 = -1LL; else v22 = _byteswap_uint64(v25); if ( (*(long long ( **)(unsigned int *, _BYTE *, long long, unsigned long long, long long))(v12 + 744))( a1, v20, 20LL, v4, 4LL) ) { return 1; } *(_QWORD *)(*(_QWORD *)a1 + 88LL) = v4; ++*(_QWORD *)(*((_QWORD *)a1 + 1) + 8LL); *(_QWORD *)(*((_QWORD *)a1 + 1) + 16LL) += v8; v4 = v25; if ( !v11 ) { v13 = (unsigned __int8)unlink_deleted_block(a1, v17) == 0; v14 = v16; if ( !v13 ) v14 = 1; v16 = v14; } if ( v9 >= 2 ) return v16; } *(_DWORD *)my_thread_var(v20, v5, v7) = 127; return 1; }
delete_dynamic_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV R13D,EDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RAX + 0x58] MOV RDX,R15 CALL 0x00133702 MOV dword ptr [RBP + -0xe4],EAX LEA RAX,[RBP + -0x88] MOV dword ptr [RAX + 0x50],R13D LAB_00132989: MOV ESI,dword ptr [R14 + 0x1c0] LEA RDI,[RBP + -0x88] MOV RDX,R15 CALL 0x001331fb CMP EAX,0x3 JA 0x00132ad3 MOV RBX,qword ptr [RBP + -0x50] SUB RBX,R15 ADD RBX,qword ptr [RBP + -0x60] CMP EBX,0x13 JBE 0x00132ad3 MOV R13D,EAX MOV dword ptr [RBP + -0x90],0x0 MOV ESI,dword ptr [R14 + 0x1c0] MOV RAX,R15 MOV R15D,EBX MOV qword ptr [RBP + -0xf0],RAX LEA RDX,[R15 + RAX*0x1] LEA RDI,[RBP + -0xe0] CALL 0x001331fb TEST AL,0x4 SETZ AL ADD R15,qword ptr [RBP + -0xb8] CMP R15,0xfffffc SETNC R12B OR R12B,AL JNZ 0x00132a0c MOV RBX,R15 LAB_00132a0c: MOV byte ptr [RBP + -0x88],0x0 MOV byte ptr [RBP + -0x85],BL MOV byte ptr [RBP + -0x86],BH MOV EAX,EBX SHR EAX,0x10 MOV byte ptr [RBP + -0x87],AL MOV RAX,qword ptr [R14] MOV RCX,qword ptr [RAX + 0x58] BSWAP RCX MOV qword ptr [RBP + -0x84],RCX CMP R13D,0x2 JNC 0x00132a4e MOV RCX,qword ptr [RBP + -0x48] BSWAP RCX MOV qword ptr [RBP + -0x7c],RCX JMP 0x00132a56 LAB_00132a4e: MOV qword ptr [RBP + -0x7c],-0x1 LAB_00132a56: MOV R15,qword ptr [RBP + -0xf0] MOV EDX,0x14 MOV R8D,0x4 MOV RDI,R14 LEA RSI,[RBP + -0x88] MOV RCX,R15 CALL qword ptr [RAX + 0x2e8] TEST RAX,RAX JNZ 0x00132ade MOV EAX,EBX MOV RCX,qword ptr [R14] MOV qword ptr [RCX + 0x58],R15 MOV RCX,qword ptr [R14 + 0x8] INC qword ptr [RCX + 0x8] MOV RCX,qword ptr [R14 + 0x8] ADD qword ptr [RCX + 0x10],RAX MOV R15,qword ptr [RBP + -0x48] TEST R12B,R12B JNZ 0x00132ac7 MOV RDI,R14 LEA RSI,[RBP + -0xe0] CALL 0x001335d1 TEST AL,AL MOV EAX,dword ptr [RBP + -0xe4] MOV ECX,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0xe4],EAX LAB_00132ac7: CMP R13D,0x2 JC 0x00132989 JMP 0x00132ae8 LAB_00132ad3: CALL 0x001624a2 MOV dword ptr [RAX],0x7f LAB_00132ade: MOV dword ptr [RBP + -0xe4],0x1 LAB_00132ae8: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00132b0f MOV EAX,dword ptr [RBP + -0xe4] ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00132b0f: CALL 0x00128470
int4 delete_dynamic_record(long *param_1,ulong param_2,int4 param_3) { ulong uVar1; char cVar2; uint uVar3; ulong uVar4; long lVar5; int4 *puVar6; ulong uVar7; long in_FS_OFFSET; bool bVar8; int4 local_ec; int1 local_e8 [40]; long local_c0; int4 local_98; int1 local_90; int1 local_8f; int1 local_8e; int1 local_8d; ulong local_8c; ulong local_84; long local_68; long local_58; ulong local_50; int4 local_40; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); local_ec = update_backward_delete_link(param_1,*(int8 *)(*param_1 + 0x58),param_2); local_40 = param_3; do { uVar3 = _mi_get_block_info(&local_90,(int)param_1[0x38],param_2); if ((3 < uVar3) || (uVar7 = (local_58 - param_2) + local_68, (uint)uVar7 < 0x14)) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x7f; LAB_00132ade: local_ec = 1; break; } local_98 = 0; uVar4 = _mi_get_block_info(local_e8,(int)param_1[0x38],(uVar7 & 0xffffffff) + param_2); bVar8 = (uVar4 & 4) != 0; uVar4 = (uVar7 & 0xffffffff) + local_c0; if (uVar4 < 0xfffffc && bVar8) { uVar7 = uVar4; } local_90 = 0; local_8d = (int1)uVar7; local_8e = (int1)(uVar7 >> 8); local_8f = (int1)(uVar7 >> 0x10); uVar1 = *(ulong *)(*param_1 + 0x58); local_8c = uVar1 >> 0x38 | (uVar1 & 0xff000000000000) >> 0x28 | (uVar1 & 0xff0000000000) >> 0x18 | (uVar1 & 0xff00000000) >> 8 | (uVar1 & 0xff000000) << 8 | (uVar1 & 0xff0000) << 0x18 | (uVar1 & 0xff00) << 0x28 | uVar1 << 0x38; if (uVar3 < 2) { local_84 = local_50 >> 0x38 | (local_50 & 0xff000000000000) >> 0x28 | (local_50 & 0xff0000000000) >> 0x18 | (local_50 & 0xff00000000) >> 8 | (local_50 & 0xff000000) << 8 | (local_50 & 0xff0000) << 0x18 | (local_50 & 0xff00) << 0x28 | local_50 << 0x38; } else { local_84 = 0xffffffffffffffff; } lVar5 = (**(code **)(*param_1 + 0x2e8))(param_1,&local_90,0x14,param_2,4); uVar1 = local_50; if (lVar5 != 0) goto LAB_00132ade; *(ulong *)(*param_1 + 0x58) = param_2; *(long *)(param_1[1] + 8) = *(long *)(param_1[1] + 8) + 1; *(long *)(param_1[1] + 0x10) = *(long *)(param_1[1] + 0x10) + (uVar7 & 0xffffffff); if ((uVar4 < 0xfffffc && bVar8) && (cVar2 = unlink_deleted_block(param_1,local_e8), cVar2 != '\0')) { local_ec = 1; } param_2 = uVar1; } while (uVar3 < 2); if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_ec; }
53,526
evmone::advanced::find_jumpdest(evmone::advanced::AdvancedCodeAnalysis const&, int)
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/advanced_analysis.hpp
inline int find_jumpdest(const AdvancedCodeAnalysis& analysis, int offset) noexcept { const auto begin = std::begin(analysis.jumpdest_offsets); const auto end = std::end(analysis.jumpdest_offsets); const auto it = std::lower_bound(begin, end, offset); return (it != end && *it == offset) ? analysis.jumpdest_targets[static_cast<size_t>(it - begin)] : -1; }
O2
cpp
evmone::advanced::find_jumpdest(evmone::advanced::AdvancedCodeAnalysis const&, int): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx leaq 0xc(%rsp), %rdx movl %esi, (%rdx) movq 0x30(%rdi), %r14 movq 0x38(%rdi), %r15 movq %r14, %rdi movq %r15, %rsi callq 0x47f4b pushq $-0x1 popq %rcx cmpq %r15, %rax je 0x47f37 movl (%rax), %edx cmpl 0xc(%rsp), %edx jne 0x47f37 subq %r14, %rax movq 0x48(%rbx), %rcx movl (%rcx,%rax), %ecx movl %ecx, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rdi callq 0x2e859
_ZN6evmone8advanced13find_jumpdestERKNS0_20AdvancedCodeAnalysisEi: push r15 push r14 push rbx sub rsp, 10h mov rbx, rdi lea rdx, [rsp+28h+var_1C] mov [rdx], esi mov r14, [rdi+30h] mov r15, [rdi+38h] mov rdi, r14 mov rsi, r15 call _ZSt13__lower_boundIN9__gnu_cxx17__normal_iteratorIPKiSt6vectorIiSaIiEEEEiNS0_5__ops14_Iter_less_valEET_SA_SA_RKT0_T1_; std::__lower_bound<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,int,__gnu_cxx::__ops::_Iter_less_val>(__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,int const&,__gnu_cxx::__ops::_Iter_less_val) push 0FFFFFFFFFFFFFFFFh pop rcx cmp rax, r15 jz short loc_47F37 mov edx, [rax] cmp edx, [rsp+28h+var_1C] jnz short loc_47F37 sub rax, r14 mov rcx, [rbx+48h] mov ecx, [rcx+rax] loc_47F37: mov eax, ecx add rsp, 10h pop rbx pop r14 pop r15 retn mov rdi, rax call __clang_call_terminate
long long evmone::advanced::find_jumpdest( evmone::advanced *this, const evmone::advanced::AdvancedCodeAnalysis *a2) { long long v2; // r14 _DWORD *v3; // r15 _DWORD *v4; // rax unsigned int v5; // ecx v2 = *((_QWORD *)this + 6); v3 = (_DWORD *)*((_QWORD *)this + 7); v4 = (_DWORD *)std::__lower_bound<__gnu_cxx::__normal_iterator<int const*,std::vector<int>>,int,__gnu_cxx::__ops::_Iter_less_val>( v2, v3); v5 = -1; if ( v4 != v3 && *v4 == (_DWORD)a2 ) return *(unsigned int *)((char *)v4 + *((_QWORD *)this + 9) - v2); return v5; }
find_jumpdest: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDI LEA RDX,[RSP + 0xc] MOV dword ptr [RDX],ESI MOV R14,qword ptr [RDI + 0x30] MOV R15,qword ptr [RDI + 0x38] LAB_00147f12: MOV RDI,R14 MOV RSI,R15 CALL 0x00147f4b PUSH -0x1 POP RCX CMP RAX,R15 JZ 0x00147f37 MOV EDX,dword ptr [RAX] CMP EDX,dword ptr [RSP + 0xc] JNZ 0x00147f37 SUB RAX,R14 MOV RCX,qword ptr [RBX + 0x48] MOV ECX,dword ptr [RCX + RAX*0x1] LAB_00147f37: MOV EAX,ECX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* evmone::advanced::find_jumpdest(evmone::advanced::AdvancedCodeAnalysis const&, int) */ int4 evmone::advanced::find_jumpdest(AdvancedCodeAnalysis *param_1,int param_2) { long lVar1; int *piVar2; int *piVar3; int4 uVar4; lVar1 = *(long *)(param_1 + 0x30); piVar2 = *(int **)(param_1 + 0x38); /* try { // try from 00147f12 to 00147f1c has its CatchHandler @ 00147f43 */ piVar3 = (int *)std:: __lower_bound<__gnu_cxx::__normal_iterator<int_const*,std::vector<int,std::allocator<int>>>,int,__gnu_cxx::__ops::_Iter_less_val> (lVar1,piVar2); uVar4 = 0xffffffff; if ((piVar3 != piVar2) && (*piVar3 == param_2)) { uVar4 = *(int4 *)((long)piVar3 + (*(long *)(param_1 + 0x48) - lVar1)); } return uVar4; }
53,527
ma_write_clr
eloqsql/storage/maria/ma_key_recover.c
my_bool _ma_write_clr(MARIA_HA *info, LSN undo_lsn, enum translog_record_type undo_type, my_bool store_checksum, ha_checksum checksum, LSN *res_lsn, void *extra_msg) { uchar log_data[LSN_STORE_SIZE + FILEID_STORE_SIZE + CLR_TYPE_STORE_SIZE + HA_CHECKSUM_STORE_SIZE+ KEY_NR_STORE_SIZE + PAGE_STORE_SIZE]; uchar *log_pos; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; struct st_msg_to_write_hook_for_clr_end msg; my_bool res; DBUG_ENTER("_ma_write_clr"); /* undo_lsn must be first for compression to work */ lsn_store(log_data, undo_lsn); clr_type_store(log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE, undo_type); log_pos= log_data + LSN_STORE_SIZE + FILEID_STORE_SIZE + CLR_TYPE_STORE_SIZE; /* Extra_msg is handled in write_hook_for_clr_end() */ msg.undone_record_type= undo_type; msg.previous_undo_lsn= undo_lsn; msg.extra_msg= extra_msg; msg.checksum_delta= 0; if (store_checksum) { msg.checksum_delta= checksum; ha_checksum_store(log_pos, checksum); log_pos+= HA_CHECKSUM_STORE_SIZE; } else if (undo_type == LOGREC_UNDO_KEY_INSERT_WITH_ROOT || undo_type == LOGREC_UNDO_KEY_DELETE_WITH_ROOT) { /* Key root changed. Store new key root */ struct st_msg_to_write_hook_for_undo_key *undo_msg= extra_msg; pgcache_page_no_t page; key_nr_store(log_pos, undo_msg->keynr); page= (undo_msg->value == HA_OFFSET_ERROR ? IMPOSSIBLE_PAGE_NO : undo_msg->value / info->s->block_size); page_store(log_pos + KEY_NR_STORE_SIZE, page); log_pos+= KEY_NR_STORE_SIZE + PAGE_STORE_SIZE; } log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= (uint) (log_pos - log_data); /* We need intern_lock mutex for calling _ma_state_info_write in the trigger. We do it here to have the same sequence of mutexes locking everywhere (first intern_lock then transactional log buffer lock) */ if (undo_type == LOGREC_UNDO_BULK_INSERT) mysql_mutex_lock(&info->s->intern_lock); res= translog_write_record(res_lsn, LOGREC_CLR_END, info->trn, info, (translog_size_t) log_array[TRANSLOG_INTERNAL_PARTS + 0].length, TRANSLOG_INTERNAL_PARTS + 1, log_array, log_data + LSN_STORE_SIZE, &msg); if (undo_type == LOGREC_UNDO_BULK_INSERT) mysql_mutex_unlock(&info->s->intern_lock); DBUG_RETURN(res); }
O3
c
ma_write_clr: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x78, %rsp movq %r9, %r14 movq %rdi, %rbx movq 0x10(%rbp), %rax movq %fs:0x28, %rdi movq %rdi, -0x20(%rbp) movq %rsi, %rdi shrq $0x20, %rdi leaq -0x39(%rbp), %r15 movb %dil, -0x7(%r15) movq %rsi, %rdi shrq $0x28, %rdi movb %dil, -0x6(%r15) movq %rsi, %rdi shrq $0x30, %rdi movb %dil, -0x5(%r15) movl %esi, -0x4(%r15) movb %dl, 0x2(%r15) movl %edx, -0x50(%rbp) movq %rsi, -0x58(%rbp) movq %rax, -0x48(%rbp) movl $0x0, -0x4c(%rbp) testb %cl, %cl je 0x42dcb movl %r8d, -0x4c(%rbp) leaq -0x32(%rbp), %rax movl %r8d, -0x4(%rax) leaq -0x40(%rbp), %rcx movq %rcx, -0x70(%rbp) subq %rcx, %rax movl %eax, %ecx movq %rcx, -0x68(%rbp) cmpl $0x27, %edx jne 0x42df5 movq (%rbx), %rax leaq 0x8f0(%rax), %rdi cmpq $0x0, 0x930(%rax) jne 0x42ea9 callq 0x2a220 movq 0x8(%rbx), %rdx leaq -0x90(%rbp), %rax movl 0x28(%rax), %r8d subq $0x8, %rsp leaq -0x58(%rbp), %r10 movq %r14, %rdi movl $0x10, %esi movq %rbx, %rcx movl $0x3, %r9d pushq %r10 pushq %r15 pushq %rax callq 0x2ad24 addq $0x20, %rsp movl %eax, %r14d movq (%rbx), %rbx movq 0x930(%rbx), %rdi addq $0x8f0, %rbx # imm = 0x8F0 testq %rdi, %rdi jne 0x42ebf movq %rbx, %rdi callq 0x2a1e0 jmp 0x42e8c cmpl $0x18, %edx je 0x42dd5 cmpl $0x16, %edx jne 0x42e24 movb 0x10(%rax), %cl movb %cl, -0x36(%rbp) movq 0x8(%rax), %rax cmpq $-0x1, %rax je 0x42e2d movq (%rbx), %rcx movl 0x7bc(%rcx), %ecx xorl %edx, %edx divq %rcx jmp 0x42e37 movq 0x8(%rbx), %rdx subq $0x8, %rsp leaq -0x58(%rbp), %r10 leaq -0x90(%rbp), %r11 movq %r14, %rdi movl $0x10, %esi movq %rbx, %rcx movl %eax, %r8d movl $0x3, %r9d pushq %r10 pushq %r15 pushq %r11 jmp 0x42e80 leaq -0x36(%rbp), %rax jmp 0x42d34 movabsq $0xffffffffff, %rax # imm = 0xFFFFFFFFFF leaq -0x40(%rbp), %rcx movl %eax, 0xb(%rcx) shrq $0x20, %rax movb %al, 0xf(%rcx) leaq -0x90(%rbp), %rax movq %rcx, 0x20(%rax) movq $0x10, 0x28(%rax) movq 0x8(%rbx), %rdx subq $0x8, %rsp leaq -0x58(%rbp), %r10 movq %r14, %rdi movl $0x10, %esi movq %rbx, %rcx movl $0x10, %r8d movl $0x3, %r9d pushq %r10 pushq %r15 pushq %rax callq 0x2ad24 addq $0x20, %rsp movl %eax, %r14d movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x42ed4 movl %r14d, %eax addq $0x78, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x9edc8(%rip), %rsi # 0xe1c78 movl $0x86, %edx callq 0x30603 jmp 0x42d6b leaq 0x34c392(%rip), %rax # 0x38f258 movq (%rax), %rax callq *0x160(%rax) jmp 0x42dbe callq 0x2a270
_ma_write_clr: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 78h mov r14, r9 mov rbx, rdi mov rax, [rbp+arg_0] mov rdi, fs:28h mov [rbp+var_20], rdi mov rdi, rsi shr rdi, 20h lea r15, [rbp+var_39] mov [r15-7], dil mov rdi, rsi shr rdi, 28h mov [r15-6], dil mov rdi, rsi shr rdi, 30h mov [r15-5], dil mov [r15-4], esi mov [r15+2], dl mov [rbp+var_50], edx mov [rbp+var_58], rsi mov [rbp+var_48], rax mov [rbp+var_4C], 0 test cl, cl jz loc_42DCB mov [rbp+var_4C], r8d lea rax, [rbp+var_32] mov [rax-4], r8d loc_42D34: lea rcx, [rbp+var_40] mov [rbp+var_70], rcx sub rax, rcx mov ecx, eax mov [rbp+var_68], rcx cmp edx, 27h ; ''' jnz loc_42DF5 mov rax, [rbx] lea rdi, [rax+8F0h] cmp qword ptr [rax+930h], 0 jnz loc_42EA9 call _pthread_mutex_lock loc_42D6B: mov rdx, [rbx+8] lea rax, [rbp+var_90] mov r8d, [rax+28h] sub rsp, 8 lea r10, [rbp+var_58] mov rdi, r14 mov esi, 10h mov rcx, rbx mov r9d, 3 push r10 push r15 push rax call translog_write_record add rsp, 20h mov r14d, eax mov rbx, [rbx] mov rdi, [rbx+930h] add rbx, 8F0h test rdi, rdi jnz loc_42EBF loc_42DBE: mov rdi, rbx call _pthread_mutex_unlock jmp loc_42E8C loc_42DCB: cmp edx, 18h jz short loc_42DD5 cmp edx, 16h jnz short loc_42E24 loc_42DD5: mov cl, [rax+10h] mov [rbp+var_36], cl mov rax, [rax+8] cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_42E2D mov rcx, [rbx] mov ecx, [rcx+7BCh] xor edx, edx div rcx jmp short loc_42E37 loc_42DF5: mov rdx, [rbx+8] sub rsp, 8 lea r10, [rbp+var_58] lea r11, [rbp+var_90] mov rdi, r14 mov esi, 10h mov rcx, rbx mov r8d, eax mov r9d, 3 push r10 push r15 push r11 jmp short loc_42E80 loc_42E24: lea rax, [rbp+var_36] jmp loc_42D34 loc_42E2D: mov rax, 0FFFFFFFFFFh loc_42E37: lea rcx, [rbp+var_40] mov [rcx+0Bh], eax shr rax, 20h mov [rcx+0Fh], al lea rax, [rbp+var_90] mov [rax+20h], rcx mov qword ptr [rax+28h], 10h mov rdx, [rbx+8] sub rsp, 8 lea r10, [rbp+var_58] mov rdi, r14 mov esi, 10h mov rcx, rbx mov r8d, 10h mov r9d, 3 push r10 push r15 push rax loc_42E80: call translog_write_record add rsp, 20h mov r14d, eax loc_42E8C: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_42ED4 mov eax, r14d add rsp, 78h pop rbx pop r14 pop r15 pop rbp retn loc_42EA9: lea rsi, aWorkspaceLlm4b_29; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 86h call psi_mutex_lock jmp loc_42D6B loc_42EBF: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_42DBE loc_42ED4: call ___stack_chk_fail
long long ma_write_clr(long long *a1, long long a2, int a3, char a4, int a5, unsigned long long a6, long long a7) { _BYTE *v9; // rax long long v10; // rax long long v11; // rdi unsigned int v12; // r14d long long v13; // rbx long long v14; // rdi long long v15; // rbx unsigned long long v16; // rax unsigned long long v17; // rax _OWORD v20[2]; // [rsp+0h] [rbp-90h] BYREF _BYTE *v21; // [rsp+20h] [rbp-70h] long long v22; // [rsp+28h] [rbp-68h] long long v23; // [rsp+38h] [rbp-58h] BYREF int v24; // [rsp+40h] [rbp-50h] int v25; // [rsp+44h] [rbp-4Ch] long long v26; // [rsp+48h] [rbp-48h] _BYTE v27[3]; // [rsp+50h] [rbp-40h] BYREF int v28; // [rsp+53h] [rbp-3Dh] __int16 v29; // [rsp+57h] [rbp-39h] BYREF char v30; // [rsp+59h] [rbp-37h] _BYTE v31[5]; // [rsp+5Ah] [rbp-36h] BYREF char v32; // [rsp+5Fh] [rbp-31h] unsigned long long v33; // [rsp+70h] [rbp-20h] v33 = __readfsqword(0x28u); v27[0] = BYTE4(a2); v27[1] = BYTE5(a2); v27[2] = BYTE6(a2); v28 = a2; v30 = a3; v24 = a3; v23 = a2; v26 = a7; v25 = 0; if ( a4 ) { v25 = a5; v9 = &v31[4]; *(_DWORD *)v31 = a5; } else { if ( a3 == 24 || a3 == 22 ) { v31[0] = *(_BYTE *)(a7 + 16); v16 = *(_QWORD *)(a7 + 8); if ( v16 == -1LL ) v17 = 0xFFFFFFFFFFLL; else v17 = v16 / *(unsigned int *)(*a1 + 1980); *(_DWORD *)&v31[1] = v17; v32 = BYTE4(v17); v21 = v27; v22 = 16LL; return (unsigned int)translog_write_record(a6, &word_10, a1[1], a1, 0x10u, 3, v20, &v29, (long long)&v23); } v9 = v31; } v21 = v27; v10 = v9 - v27; v22 = (unsigned int)v10; if ( a3 != 39 ) return (unsigned int)translog_write_record(a6, &word_10, a1[1], a1, v10, 3, v20, &v29, (long long)&v23); v11 = *a1 + 2288; if ( *(_QWORD *)(*a1 + 2352) ) psi_mutex_lock(v11, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c", 0x86u); else pthread_mutex_lock(v11); v12 = translog_write_record(a6, &word_10, a1[1], a1, v22, 3, v20, &v29, (long long)&v23); v13 = *a1; v14 = *(_QWORD *)(v13 + 2352); v15 = v13 + 2288; if ( v14 ) PSI_server[44](); pthread_mutex_unlock(v15); return v12; }
_ma_write_clr: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x78 MOV R14,R9 MOV RBX,RDI MOV RAX,qword ptr [RBP + 0x10] MOV RDI,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RDI MOV RDI,RSI SHR RDI,0x20 LEA R15,[RBP + -0x39] MOV byte ptr [R15 + -0x7],DIL MOV RDI,RSI SHR RDI,0x28 MOV byte ptr [R15 + -0x6],DIL MOV RDI,RSI SHR RDI,0x30 MOV byte ptr [R15 + -0x5],DIL MOV dword ptr [R15 + -0x4],ESI MOV byte ptr [R15 + 0x2],DL MOV dword ptr [RBP + -0x50],EDX MOV qword ptr [RBP + -0x58],RSI MOV qword ptr [RBP + -0x48],RAX MOV dword ptr [RBP + -0x4c],0x0 TEST CL,CL JZ 0x00142dcb MOV dword ptr [RBP + -0x4c],R8D LEA RAX,[RBP + -0x32] MOV dword ptr [RAX + -0x4],R8D LAB_00142d34: LEA RCX,[RBP + -0x40] MOV qword ptr [RBP + -0x70],RCX SUB RAX,RCX MOV ECX,EAX MOV qword ptr [RBP + -0x68],RCX CMP EDX,0x27 JNZ 0x00142df5 MOV RAX,qword ptr [RBX] LEA RDI,[RAX + 0x8f0] CMP qword ptr [RAX + 0x930],0x0 JNZ 0x00142ea9 CALL 0x0012a220 LAB_00142d6b: MOV RDX,qword ptr [RBX + 0x8] LEA RAX,[RBP + -0x90] MOV R8D,dword ptr [RAX + 0x28] SUB RSP,0x8 LEA R10,[RBP + -0x58] MOV RDI,R14 MOV ESI,0x10 MOV RCX,RBX MOV R9D,0x3 PUSH R10 PUSH R15 PUSH RAX CALL 0x0012ad24 ADD RSP,0x20 MOV R14D,EAX MOV RBX,qword ptr [RBX] MOV RDI,qword ptr [RBX + 0x930] ADD RBX,0x8f0 TEST RDI,RDI JNZ 0x00142ebf LAB_00142dbe: MOV RDI,RBX CALL 0x0012a1e0 JMP 0x00142e8c LAB_00142dcb: CMP EDX,0x18 JZ 0x00142dd5 CMP EDX,0x16 JNZ 0x00142e24 LAB_00142dd5: MOV CL,byte ptr [RAX + 0x10] MOV byte ptr [RBP + -0x36],CL MOV RAX,qword ptr [RAX + 0x8] CMP RAX,-0x1 JZ 0x00142e2d MOV RCX,qword ptr [RBX] MOV ECX,dword ptr [RCX + 0x7bc] XOR EDX,EDX DIV RCX JMP 0x00142e37 LAB_00142df5: MOV RDX,qword ptr [RBX + 0x8] SUB RSP,0x8 LEA R10,[RBP + -0x58] LEA R11,[RBP + -0x90] MOV RDI,R14 MOV ESI,0x10 MOV RCX,RBX MOV R8D,EAX MOV R9D,0x3 PUSH R10 PUSH R15 PUSH R11 JMP 0x00142e80 LAB_00142e24: LEA RAX,[RBP + -0x36] JMP 0x00142d34 LAB_00142e2d: MOV RAX,0xffffffffff LAB_00142e37: LEA RCX,[RBP + -0x40] MOV dword ptr [RCX + 0xb],EAX SHR RAX,0x20 MOV byte ptr [RCX + 0xf],AL LEA RAX,[RBP + -0x90] MOV qword ptr [RAX + 0x20],RCX MOV qword ptr [RAX + 0x28],0x10 MOV RDX,qword ptr [RBX + 0x8] SUB RSP,0x8 LEA R10,[RBP + -0x58] MOV RDI,R14 MOV ESI,0x10 MOV RCX,RBX MOV R8D,0x10 MOV R9D,0x3 PUSH R10 PUSH R15 PUSH RAX LAB_00142e80: CALL 0x0012ad24 ADD RSP,0x20 MOV R14D,EAX LAB_00142e8c: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00142ed4 MOV EAX,R14D ADD RSP,0x78 POP RBX POP R14 POP R15 POP RBP RET LAB_00142ea9: LEA RSI,[0x1e1c78] MOV EDX,0x86 CALL 0x00130603 JMP 0x00142d6b LAB_00142ebf: LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00142dbe LAB_00142ed4: CALL 0x0012a270
int4 _ma_write_clr(long *param_1,int8 param_2,int param_3,char param_4,int4 param_5, int8 param_6,long param_7) { pthread_mutex_t *__mutex; int iVar1; uint uVar2; int4 uVar3; ulong uVar4; long lVar5; long in_FS_OFFSET; int1 local_98 [32]; int1 *local_78; ulong local_70; int8 local_60; int local_58; int4 local_54; long local_50; int1 local_48; int1 local_47; int1 local_46; int4 local_45; int1 local_41 [2]; int1 local_3f; int4 local_3e; int1 local_3a; int1 local_39; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); local_48 = (int1)((ulong)param_2 >> 0x20); local_47 = (int1)((ulong)param_2 >> 0x28); local_46 = (int1)((ulong)param_2 >> 0x30); local_45 = (int4)param_2; local_3f = (int1)param_3; local_50 = param_7; local_54 = 0; local_60 = param_2; local_58 = param_3; if (param_4 == '\0') { if ((param_3 != 0x18) && (param_3 != 0x16)) { iVar1 = (int)&local_3e; goto LAB_00142d34; } if (*(ulong *)(param_7 + 8) == 0xffffffffffffffff) { uVar4 = 0xffffffffff; } else { uVar4 = *(ulong *)(param_7 + 8) / (ulong)*(uint *)(*param_1 + 0x7bc); } local_3e = CONCAT31((int3)uVar4,*(int1 *)(param_7 + 0x10)); local_3a = (int1)(uVar4 >> 0x18); local_39 = (int1)(uVar4 >> 0x20); local_70 = 0x10; lVar5 = param_1[1]; uVar2 = 0x10; } else { iVar1 = (int)&local_3a; local_54 = param_5; local_3e = param_5; LAB_00142d34: local_78 = &local_48; uVar2 = iVar1 - (int)local_78; local_70 = (ulong)uVar2; if (param_3 == 0x27) { __mutex = (pthread_mutex_t *)(*param_1 + 0x8f0); if (*(long *)(*param_1 + 0x930) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_key_recover.c", 0x86); } uVar3 = translog_write_record (param_6,0x10,param_1[1],param_1,local_70 & 0xffffffff,3,local_98,local_41, &local_60); lVar5 = *param_1; if (*(long *)(lVar5 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)(lVar5 + 0x8f0)); goto LAB_00142e8c; } lVar5 = param_1[1]; } local_78 = &local_48; uVar3 = translog_write_record(param_6,0x10,lVar5,param_1,uVar2,3,local_98,local_41,&local_60); LAB_00142e8c: if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return uVar3; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
53,528
SET_list_cidr
xtate/src/xconf.c
static ConfRes SET_list_cidr(void *conf, const char *name, const char *value) { XConf *xconf = (XConf *)conf; if (xconf->echo) { return 0; } if (conf_parse_bool(value)) xconf->op = Op_ListCidr; return Conf_OK; }
O3
c
SET_list_cidr: cmpq $0x0, 0x2a8(%rdi) jne 0x593c8 pushq %rbx movq %rdi, %rbx movq %rdx, %rdi callq 0x52537 testb %al, %al je 0x593c7 movl $0x4, 0x6b0(%rbx) popq %rbx xorl %eax, %eax retq
SET_list_cidr: cmp qword ptr [rdi+2A8h], 0 jnz short loc_593C8 push rbx mov rbx, rdi mov rdi, rdx call conf_parse_bool test al, al jz short loc_593C7 mov dword ptr [rbx+6B0h], 4 loc_593C7: pop rbx loc_593C8: xor eax, eax retn
long long SET_list_cidr(long long a1, long long a2, char *a3, long long a4, long long a5) { if ( !*(_QWORD *)(a1 + 680) && (unsigned __int8)conf_parse_bool(a3, a2, (long long)a3, a4, a5) ) *(_DWORD *)(a1 + 1712) = 4; return 0LL; }
SET_list_cidr: CMP qword ptr [RDI + 0x2a8],0x0 JNZ 0x001593c8 PUSH RBX MOV RBX,RDI MOV RDI,RDX CALL 0x00152537 TEST AL,AL JZ 0x001593c7 MOV dword ptr [RBX + 0x6b0],0x4 LAB_001593c7: POP RBX LAB_001593c8: XOR EAX,EAX RET
int8 SET_list_cidr(long param_1,int8 param_2,int8 param_3) { char cVar1; if ((*(long *)(param_1 + 0x2a8) == 0) && (cVar1 = conf_parse_bool(param_3), cVar1 != '\0')) { *(int4 *)(param_1 + 0x6b0) = 4; } return 0; }
53,529
ma_sp_make_key
eloqsql/storage/maria/ma_sp_key.c
MARIA_KEY *_ma_sp_make_key(MARIA_HA *info, MARIA_KEY *ret_key, uint keynr, uchar *key, const uchar *record, my_off_t filepos, ulonglong trid) { HA_KEYSEG *keyseg; MARIA_KEYDEF *keyinfo = &info->s->keyinfo[keynr]; uint len = 0; const uchar *pos; uint dlen; uchar *dptr; double mbr[SPDIMS * 2]; uint i; DBUG_ENTER("_ma_sp_make_key"); keyseg = &keyinfo->seg[-1]; pos = record + keyseg->start; ret_key->data= key; dlen = _ma_calc_blob_length(keyseg->bit_start, pos); memcpy(&dptr, pos + keyseg->bit_start, sizeof(char*)); if (!dptr) { my_errno= HA_ERR_NULL_IN_SPATIAL; DBUG_RETURN(0); } sp_mbr_from_wkb(dptr + 4, dlen - 4, SPDIMS, mbr); /* SRID */ for (i = 0, keyseg = keyinfo->seg; keyseg->type; keyseg++, i++) { uint length = keyseg->length, start= keyseg->start; double val; DBUG_ASSERT(length == 8); DBUG_ASSERT(!(start % 8)); DBUG_ASSERT(start < sizeof(mbr)); DBUG_ASSERT(keyseg->type == HA_KEYTYPE_DOUBLE); val= mbr[start / sizeof (double)]; if (isnan(val)) { bzero(key, length); key+= length; len+= length; continue; } if (keyseg->flag & HA_SWAP_KEY) { mi_float8store(key, val); } else { float8store((uchar *)key, val); } key += length; len+= length; } _ma_dpointer(info->s, key, filepos); ret_key->keyinfo= keyinfo; ret_key->data_length= len; ret_key->ref_length= info->s->rec_reflength; ret_key->flag= 0; if (_ma_have_versioning(info) && trid) { ret_key->ref_length+= transid_store_packed(info, key + ret_key->ref_length, trid); } DBUG_EXECUTE("key", _ma_print_key(DBUG_FILE, ret_key);); DBUG_RETURN(ret_key); }
O3
c
ma_sp_make_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r9, -0x38(%rbp) movq %rcx, %r14 movq %rdi, -0x40(%rbp) movq (%rdi), %rax movq 0x570(%rax), %rbx movl %edx, %eax imulq $0x118, %rax, %r12 # imm = 0x118 movq 0xc0(%rbx,%r12), %r15 movl -0x18(%r15), %r13d addq %r8, %r13 movq %rsi, -0x48(%rbp) movq %rcx, (%rsi) movzbl -0x6(%r15), %edi movq %r13, %rsi callq 0x3e2a7 movzbl -0x6(%r15), %ecx movq (%rcx,%r13), %rcx testq %rcx, %rcx je 0x70ad5 addq %r12, %rbx leaq 0x4(%rcx), %rdx addl $-0x4, %eax leaq -0x50(%rbp), %rdi movq %rdx, (%rdi) movapd 0x68707(%rip), %xmm0 # 0xd90f0 leaq -0x70(%rbp), %rdx movapd %xmm0, (%rdx) movapd %xmm0, 0x10(%rdx) leaq (%rcx,%rax), %rsi addq $0x4, %rsi movl $0x1, %ecx callq 0x70b58 movq 0xc0(%rbx), %r12 cmpb $0x0, 0x18(%r12) movq %rbx, -0x30(%rbp) je 0x70ae4 addq $0x8, %r12 xorl %r15d, %r15d movzwl 0xc(%r12), %ebx movl (%r12), %eax andl $-0x8, %eax movsd -0x70(%rbp,%rax), %xmm0 ucomisd %xmm0, %xmm0 jp 0x70ac3 testb $0x40, 0xa(%r12) jne 0x70a52 movsd %xmm0, (%r14) jmp 0x70aa7 movq %xmm0, %rax movq %rax, %rcx shrq $0x38, %rcx movq %rax, %rdx shrq $0x30, %rdx movq %rax, %rsi shrq $0x28, %rsi movq %rax, %rdi shrq $0x20, %rdi movl %eax, %r8d shrl $0x18, %r8d movl %eax, %r9d shrl $0x10, %r9d movl %eax, %r10d shrl $0x8, %r10d movb %cl, (%r14) movb %dl, 0x1(%r14) movb %sil, 0x2(%r14) movb %dil, 0x3(%r14) movb %r8b, 0x4(%r14) movb %r9b, 0x5(%r14) movb %r10b, 0x6(%r14) movb %al, 0x7(%r14) movq %rbx, %r13 addq %r13, %r14 addl %ebx, %r15d cmpb $0x0, 0x30(%r12) leaq 0x20(%r12), %r12 jne 0x70a26 jmp 0x70ae7 movl %ebx, %r13d movq %r14, %rdi xorl %esi, %esi movq %r13, %rdx callq 0x292c0 jmp 0x70aaa callq 0xa1afa movl $0x9e, (%rax) xorl %ebx, %ebx jmp 0x70b46 xorl %r15d, %r15d movq -0x40(%rbp), %r12 movq (%r12), %rdi movq %r14, %rsi movq -0x38(%rbp), %rdx callq 0x57230 movq -0x48(%rbp), %rbx movq -0x30(%rbp), %rax movq %rax, 0x8(%rbx) movl %r15d, 0x10(%rbx) movq (%r12), %rax movl 0x740(%rax), %eax movl %eax, 0x14(%rbx) movl $0x0, 0x18(%rbx) movq 0x10(%rbp), %rdx testq %rdx, %rdx je 0x70b46 movl 0x618(%r12), %ecx andl $0x1, %ecx je 0x70b46 addq %rax, %r14 movq %r12, %rdi movq %r14, %rsi callq 0x36ab0 addl %eax, 0x14(%rbx) movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_sp_make_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rbp+var_38], r9 mov r14, rcx mov [rbp+var_40], rdi mov rax, [rdi] mov rbx, [rax+570h] mov eax, edx imul r12, rax, 118h mov r15, [rbx+r12+0C0h] mov r13d, [r15-18h] add r13, r8 mov [rbp+var_48], rsi mov [rsi], rcx movzx edi, byte ptr [r15-6] mov rsi, r13 call _ma_calc_blob_length movzx ecx, byte ptr [r15-6] mov rcx, [rcx+r13] test rcx, rcx jz loc_70AD5 add rbx, r12 lea rdx, [rcx+4] add eax, 0FFFFFFFCh lea rdi, [rbp+var_50] mov [rdi], rdx movapd xmm0, cs:xmmword_D90F0 lea rdx, [rbp+var_70] movapd xmmword ptr [rdx], xmm0 movapd xmmword ptr [rdx+10h], xmm0 lea rsi, [rcx+rax] add rsi, 4 mov ecx, 1 call sp_get_geometry_mbr mov r12, [rbx+0C0h] cmp byte ptr [r12+18h], 0 mov [rbp+var_30], rbx jz loc_70AE4 add r12, 8 xor r15d, r15d loc_70A26: movzx ebx, word ptr [r12+0Ch] mov eax, [r12] and eax, 0FFFFFFF8h movsd xmm0, [rbp+rax+var_70] ucomisd xmm0, xmm0 jp loc_70AC3 test byte ptr [r12+0Ah], 40h jnz short loc_70A52 movsd qword ptr [r14], xmm0 jmp short loc_70AA7 loc_70A52: movq rax, xmm0 mov rcx, rax shr rcx, 38h mov rdx, rax shr rdx, 30h mov rsi, rax shr rsi, 28h mov rdi, rax shr rdi, 20h mov r8d, eax shr r8d, 18h mov r9d, eax shr r9d, 10h mov r10d, eax shr r10d, 8 mov [r14], cl mov [r14+1], dl mov [r14+2], sil mov [r14+3], dil mov [r14+4], r8b mov [r14+5], r9b mov [r14+6], r10b mov [r14+7], al loc_70AA7: mov r13, rbx loc_70AAA: add r14, r13 add r15d, ebx cmp byte ptr [r12+30h], 0 lea r12, [r12+20h] jnz loc_70A26 jmp short loc_70AE7 loc_70AC3: mov r13d, ebx mov rdi, r14 xor esi, esi mov rdx, r13 call _memset jmp short loc_70AAA loc_70AD5: call _my_thread_var mov dword ptr [rax], 9Eh xor ebx, ebx jmp short loc_70B46 loc_70AE4: xor r15d, r15d loc_70AE7: mov r12, [rbp+var_40] mov rdi, [r12] mov rsi, r14 mov rdx, [rbp+var_38] call _ma_dpointer mov rbx, [rbp+var_48] mov rax, [rbp+var_30] mov [rbx+8], rax mov [rbx+10h], r15d mov rax, [r12] mov eax, [rax+740h] mov [rbx+14h], eax mov dword ptr [rbx+18h], 0 mov rdx, [rbp+arg_0] test rdx, rdx jz short loc_70B46 mov ecx, [r12+618h] and ecx, 1 jz short loc_70B46 add r14, rax mov rdi, r12 mov rsi, r14 call transid_store_packed add [rbx+14h], eax loc_70B46: mov rax, rbx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_QWORD * ma_sp_make_key( long long *a1, _QWORD *a2, unsigned int a3, _BYTE *a4, long long a5, long long a6, long long a7) { _BYTE *v7; // r14 long long v8; // rbx long long v9; // r12 long long v10; // r15 unsigned __int8 *v11; // r13 long long v12; // rdi int v13; // eax long long v14; // rcx long long v15; // rbx long long v16; // r12 bool v17; // zf long long v18; // r12 int v19; // r15d long long v20; // rbx long long v21; // xmm0_8 _QWORD *v22; // rbx long long *v23; // r12 long long v24; // rax _OWORD v26[2]; // [rsp+0h] [rbp-70h] BYREF long long v27; // [rsp+20h] [rbp-50h] BYREF _QWORD *v28; // [rsp+28h] [rbp-48h] long long *v29; // [rsp+30h] [rbp-40h] long long v30; // [rsp+38h] [rbp-38h] long long v31; // [rsp+40h] [rbp-30h] v30 = a6; v7 = a4; v29 = a1; v8 = *(_QWORD *)(*a1 + 1392); v9 = 280LL * a3; v10 = *(_QWORD *)(v8 + v9 + 192); v11 = (unsigned __int8 *)(a5 + *(unsigned int *)(v10 - 24)); v28 = a2; *a2 = a4; v12 = *(unsigned __int8 *)(v10 - 6); v13 = ma_calc_blob_length(v12, v11); v14 = *(_QWORD *)&v11[*(unsigned __int8 *)(v10 - 6)]; if ( v14 ) { v15 = v9 + v8; v27 = v14 + 4; v26[0] = xmmword_D90F0; v26[1] = xmmword_D90F0; ((void ( *)(long long *, long long, _OWORD *, long long))sp_get_geometry_mbr)( &v27, v14 + (unsigned int)(v13 - 4) + 4, v26, 1LL); v16 = *(_QWORD *)(v15 + 192); v17 = *(_BYTE *)(v16 + 24) == 0; v31 = v15; if ( v17 ) { v19 = 0; } else { v18 = v16 + 8; v19 = 0; do { v20 = *(unsigned __int16 *)(v18 + 12); v21 = *(_QWORD *)((char *)v26 + (*(_DWORD *)v18 & 0xFFFFFFF8)); if ( (*(_BYTE *)(v18 + 10) & 0x40) != 0 ) { *v7 = HIBYTE(v21); v7[1] = BYTE6(v21); v7[2] = BYTE5(v21); v7[3] = BYTE4(v21); v7[4] = BYTE3(v21); v7[5] = BYTE2(v21); v7[6] = BYTE1(v21); v7[7] = v21; } else { *(_QWORD *)v7 = v21; } v7 += v20; v19 += v20; v17 = *(_BYTE *)(v18 + 48) == 0; v18 += 32LL; } while ( !v17 ); } v23 = v29; ma_dpointer(*v29, (long long)v7, v30); v22 = v28; v28[1] = v31; *((_DWORD *)v22 + 4) = v19; v24 = *(unsigned int *)(*v23 + 1856); *(_QWORD *)((char *)v22 + 20) = (unsigned int)v24; if ( a7 && (v23[195] & 1) != 0 ) *((_DWORD *)v22 + 5) += transid_store_packed((long long)v23, &v7[v24], a7); } else { *(_DWORD *)my_thread_var(v12, (const char *)v11) = 158; return 0LL; } return v22; }
_ma_sp_make_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x38],R9 MOV R14,RCX MOV qword ptr [RBP + -0x40],RDI MOV RAX,qword ptr [RDI] MOV RBX,qword ptr [RAX + 0x570] MOV EAX,EDX IMUL R12,RAX,0x118 MOV R15,qword ptr [RBX + R12*0x1 + 0xc0] MOV R13D,dword ptr [R15 + -0x18] ADD R13,R8 MOV qword ptr [RBP + -0x48],RSI MOV qword ptr [RSI],RCX MOVZX EDI,byte ptr [R15 + -0x6] MOV RSI,R13 CALL 0x0013e2a7 MOVZX ECX,byte ptr [R15 + -0x6] MOV RCX,qword ptr [RCX + R13*0x1] TEST RCX,RCX JZ 0x00170ad5 ADD RBX,R12 LEA RDX,[RCX + 0x4] ADD EAX,-0x4 LEA RDI,[RBP + -0x50] MOV qword ptr [RDI],RDX MOVAPD XMM0,xmmword ptr [0x001d90f0] LEA RDX,[RBP + -0x70] MOVAPD xmmword ptr [RDX],XMM0 MOVAPD xmmword ptr [RDX + 0x10],XMM0 LEA RSI,[RCX + RAX*0x1] ADD RSI,0x4 MOV ECX,0x1 CALL 0x00170b58 MOV R12,qword ptr [RBX + 0xc0] CMP byte ptr [R12 + 0x18],0x0 MOV qword ptr [RBP + -0x30],RBX JZ 0x00170ae4 ADD R12,0x8 XOR R15D,R15D LAB_00170a26: MOVZX EBX,word ptr [R12 + 0xc] MOV EAX,dword ptr [R12] AND EAX,0xfffffff8 MOVSD XMM0,qword ptr [RBP + RAX*0x1 + -0x70] UCOMISD XMM0,XMM0 JP 0x00170ac3 TEST byte ptr [R12 + 0xa],0x40 JNZ 0x00170a52 MOVSD qword ptr [R14],XMM0 JMP 0x00170aa7 LAB_00170a52: MOVQ RAX,XMM0 MOV RCX,RAX SHR RCX,0x38 MOV RDX,RAX SHR RDX,0x30 MOV RSI,RAX SHR RSI,0x28 MOV RDI,RAX SHR RDI,0x20 MOV R8D,EAX SHR R8D,0x18 MOV R9D,EAX SHR R9D,0x10 MOV R10D,EAX SHR R10D,0x8 MOV byte ptr [R14],CL MOV byte ptr [R14 + 0x1],DL MOV byte ptr [R14 + 0x2],SIL MOV byte ptr [R14 + 0x3],DIL MOV byte ptr [R14 + 0x4],R8B MOV byte ptr [R14 + 0x5],R9B MOV byte ptr [R14 + 0x6],R10B MOV byte ptr [R14 + 0x7],AL LAB_00170aa7: MOV R13,RBX LAB_00170aaa: ADD R14,R13 ADD R15D,EBX CMP byte ptr [R12 + 0x30],0x0 LEA R12,[R12 + 0x20] JNZ 0x00170a26 JMP 0x00170ae7 LAB_00170ac3: MOV R13D,EBX MOV RDI,R14 XOR ESI,ESI MOV RDX,R13 CALL 0x001292c0 JMP 0x00170aaa LAB_00170ad5: CALL 0x001a1afa MOV dword ptr [RAX],0x9e XOR EBX,EBX JMP 0x00170b46 LAB_00170ae4: XOR R15D,R15D LAB_00170ae7: MOV R12,qword ptr [RBP + -0x40] MOV RDI,qword ptr [R12] MOV RSI,R14 MOV RDX,qword ptr [RBP + -0x38] CALL 0x00157230 MOV RBX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBX + 0x8],RAX MOV dword ptr [RBX + 0x10],R15D MOV RAX,qword ptr [R12] MOV EAX,dword ptr [RAX + 0x740] MOV dword ptr [RBX + 0x14],EAX MOV dword ptr [RBX + 0x18],0x0 MOV RDX,qword ptr [RBP + 0x10] TEST RDX,RDX JZ 0x00170b46 MOV ECX,dword ptr [R12 + 0x618] AND ECX,0x1 JZ 0x00170b46 ADD R14,RAX MOV RDI,R12 MOV RSI,R14 CALL 0x00136ab0 ADD dword ptr [RBX + 0x14],EAX LAB_00170b46: MOV RAX,RBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int8 * _ma_sp_make_key(long *param_1,int8 *param_2,ulong param_3,double *param_4,long param_5, int8 param_6,long param_7) { uint *puVar1; double dVar2; ushort uVar3; uint uVar4; long lVar5; long *plVar6; int4 *puVar7; long lVar8; int8 *puVar9; long lVar10; uint *puVar11; int iVar12; double local_78 [4]; long local_58; int8 *local_50; long *local_48; int8 local_40; long local_38; lVar8 = *(long *)(*param_1 + 0x570); lVar10 = (param_3 & 0xffffffff) * 0x118; lVar5 = *(long *)(lVar8 + 0xc0 + lVar10); param_5 = (ulong)*(uint *)(lVar5 + -0x18) + param_5; *param_2 = param_4; local_50 = param_2; local_48 = param_1; local_40 = param_6; _ma_calc_blob_length(*(int1 *)(lVar5 + -6),param_5); local_58 = *(long *)((ulong)*(byte *)(lVar5 + -6) + param_5); if (local_58 == 0) { puVar7 = (int4 *)_my_thread_var(); *puVar7 = 0x9e; puVar9 = (int8 *)0x0; } else { lVar8 = lVar8 + lVar10; local_58 = local_58 + 4; local_78[0] = _DAT_001d90f0; local_78[1] = (double)_UNK_001d90f8; local_78[2] = _DAT_001d90f0; local_78[3] = (double)_UNK_001d90f8; sp_get_geometry_mbr(); lVar5 = *(long *)(lVar8 + 0xc0); local_38 = lVar8; if (*(char *)(lVar5 + 0x18) == '\0') { iVar12 = 0; } else { puVar11 = (uint *)(lVar5 + 8); iVar12 = 0; do { uVar3 = (ushort)puVar11[3]; dVar2 = *(double *)((long)local_78 + (ulong)(*puVar11 & 0xfffffff8)); if (NAN(dVar2)) { memset(param_4,0,(ulong)uVar3); } else if ((*(byte *)((long)puVar11 + 10) & 0x40) == 0) { *param_4 = dVar2; } else { *(char *)param_4 = (char)((ulong)dVar2 >> 0x38); *(char *)((long)param_4 + 1) = (char)((ulong)dVar2 >> 0x30); *(char *)((long)param_4 + 2) = (char)((ulong)dVar2 >> 0x28); *(char *)((long)param_4 + 3) = (char)((ulong)dVar2 >> 0x20); *(char *)((long)param_4 + 4) = (char)((ulong)dVar2 >> 0x18); *(char *)((long)param_4 + 5) = (char)((ulong)dVar2 >> 0x10); *(char *)((long)param_4 + 6) = (char)((ulong)dVar2 >> 8); *(char *)((long)param_4 + 7) = SUB81(dVar2,0); } param_4 = (double *)((long)param_4 + (ulong)uVar3); iVar12 = iVar12 + (uint)uVar3; puVar1 = puVar11 + 0xc; puVar11 = puVar11 + 8; } while ((char)*puVar1 != '\0'); } plVar6 = local_48; _ma_dpointer(*local_48,param_4,local_40); puVar9 = local_50; local_50[1] = local_38; *(int *)(local_50 + 2) = iVar12; uVar4 = *(uint *)(*plVar6 + 0x740); *(uint *)((long)local_50 + 0x14) = uVar4; *(int4 *)(local_50 + 3) = 0; if ((param_7 != 0) && ((*(uint *)(plVar6 + 0xc3) & 1) != 0)) { iVar12 = transid_store_packed(plVar6,(long)param_4 + (ulong)uVar4); *(int *)((long)puVar9 + 0x14) = *(int *)((long)puVar9 + 0x14) + iVar12; } } return puVar9; }
53,530
ma_hashtbl_delete
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
my_bool ma_hashtbl_delete(MA_HASHTBL *hash,uchar *record) { uint blength,pos2,pos_hashnr,lastpos_hashnr,idx,empty_index; MA_HASHTBL_LINK *data,*lastpos,*gpos,*pos,*pos3,*empty; if (!hash->records) return(1); blength=hash->blength; data=dynamic_element(&hash->array,0,MA_HASHTBL_LINK*); /* Search after record with key */ pos=data+ hash_mask(rec_hashnr(hash,record),blength,hash->records); gpos = 0; while (pos->data != record) { gpos=pos; if (pos->next == NO_RECORD) return(1); /* Key not found */ pos=data+pos->next; } if ( --(hash->records) < hash->blength >> 1) hash->blength>>=1; hash->current_record= NO_RECORD; lastpos=data+hash->records; /* Remove link to record */ empty=pos; empty_index=(uint) (empty-data); if (gpos) gpos->next=pos->next; /* unlink current ptr */ else if (pos->next != NO_RECORD) { empty=data+(empty_index=pos->next); pos->data=empty->data; pos->next=empty->next; } if (empty == lastpos) /* last key at wrong pos or no next link */ goto exit; /* Move the last key (lastpos) */ lastpos_hashnr=rec_hashnr(hash,lastpos->data); /* pos is where lastpos should be */ pos=data+hash_mask(lastpos_hashnr,hash->blength,hash->records); if (pos == empty) /* Move to empty position. */ { empty[0]=lastpos[0]; goto exit; } pos_hashnr=rec_hashnr(hash,pos->data); /* pos3 is where the pos should be */ pos3= data+hash_mask(pos_hashnr,hash->blength,hash->records); if (pos != pos3) { /* pos is on wrong posit */ empty[0]=pos[0]; /* Save it here */ pos[0]=lastpos[0]; /* This should be here */ movelink(data,(uint) (pos-data),(uint) (pos3-data),empty_index); goto exit; } pos2= hash_mask(lastpos_hashnr,blength,hash->records+1); if (pos2 == hash_mask(pos_hashnr,blength,hash->records+1)) { /* Identical key-positions */ if (pos2 != hash->records) { empty[0]=lastpos[0]; movelink(data,(uint) (lastpos-data),(uint) (pos-data),empty_index); goto exit; } idx= (uint) (pos-data); /* Link pos->next after lastpos */ } else idx= NO_RECORD; /* Different positions merge */ empty[0]=lastpos[0]; movelink(data,idx,empty_index,pos->next); pos->next=empty_index; exit: ma_pop_dynamic(&hash->array); if (hash->free) (*hash->free)((uchar*) record); return(0); }
O0
c
ma_hashtbl_delete: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x8(%rax) jne 0x465e6 movb $0x1, -0x1(%rbp) jmp 0x46961 movq -0x10(%rbp), %rax movl 0xc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x46540 movl %eax, %edi movl -0x1c(%rbp), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx callq 0x45f60 movl %eax, %ecx movq -0x68(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movq $0x0, -0x48(%rbp) movq -0x50(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x18(%rbp), %rax je 0x4667c movq -0x50(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x50(%rbp), %rax cmpl $-0x1, (%rax) jne 0x46665 movb $0x1, -0x1(%rbp) jmp 0x46961 movq -0x38(%rbp), %rax movq -0x50(%rbp), %rcx movl (%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) jmp 0x4663d movq -0x10(%rbp), %rcx movl 0x8(%rcx), %eax addl $-0x1, %eax movl %eax, 0x8(%rcx) movq -0x10(%rbp), %rcx movl 0xc(%rcx), %ecx shrl %ecx cmpl %ecx, %eax jae 0x466a2 movq -0x10(%rbp), %rax movl 0xc(%rax), %ecx shrl %ecx movl %ecx, 0xc(%rax) movq -0x10(%rbp), %rax movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x8(%rcx), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, -0x30(%rbp) cmpq $0x0, -0x48(%rbp) je 0x466f2 movq -0x50(%rbp), %rax movl (%rax), %ecx movq -0x48(%rbp), %rax movl %ecx, (%rax) jmp 0x46733 movq -0x50(%rbp), %rax cmpl $-0x1, (%rax) je 0x46731 movq -0x38(%rbp), %rax movq -0x50(%rbp), %rcx movl (%rcx), %ecx movl %ecx, -0x30(%rbp) movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax movq 0x8(%rax), %rcx movq -0x50(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x60(%rbp), %rax movl (%rax), %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) jmp 0x46733 movq -0x60(%rbp), %rax cmpq -0x40(%rbp), %rax jne 0x46742 jmp 0x46937 movq -0x10(%rbp), %rdi movq -0x40(%rbp), %rax movq 0x8(%rax), %rsi callq 0x46540 movl %eax, -0x28(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x70(%rbp) movl -0x28(%rbp), %edi movq -0x10(%rbp), %rax movl 0xc(%rax), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx callq 0x45f60 movl %eax, %ecx movq -0x70(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movq -0x50(%rbp), %rax cmpq -0x60(%rbp), %rax jne 0x467ac movq -0x60(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) jmp 0x46937 movq -0x10(%rbp), %rdi movq -0x50(%rbp), %rax movq 0x8(%rax), %rsi callq 0x46540 movl %eax, -0x24(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x78(%rbp) movl -0x24(%rbp), %edi movq -0x10(%rbp), %rax movl 0xc(%rax), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx callq 0x45f60 movl %eax, %ecx movq -0x78(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax cmpq -0x58(%rbp), %rax je 0x4685a movq -0x60(%rbp), %rax movq -0x50(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x50(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rdi movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %esi movq -0x58(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %edx movl -0x30(%rbp), %ecx callq 0x46580 jmp 0x46937 movl -0x28(%rbp), %edi movl -0x1c(%rbp), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx addl $0x1, %edx callq 0x45f60 movl %eax, -0x20(%rbp) movl -0x20(%rbp), %eax movl %eax, -0x7c(%rbp) movl -0x24(%rbp), %edi movl -0x1c(%rbp), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx addl $0x1, %edx callq 0x45f60 movl %eax, %ecx movl -0x7c(%rbp), %eax cmpl %ecx, %eax jne 0x468fc movl -0x20(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x8(%rcx), %eax je 0x468e8 movq -0x60(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rdi movq -0x40(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %esi movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %edx movl -0x30(%rbp), %ecx callq 0x46580 jmp 0x46937 movq -0x50(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, -0x2c(%rbp) jmp 0x46903 movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF movq -0x60(%rbp), %rax movq -0x40(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rdi movl -0x2c(%rbp), %esi movl -0x30(%rbp), %edx movq -0x50(%rbp), %rax movl (%rax), %ecx callq 0x46580 movl -0x30(%rbp), %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) movq -0x10(%rbp), %rdi addq $0x18, %rdi callq 0x43f60 movq -0x10(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x4695d movq -0x10(%rbp), %rax movq 0x38(%rax), %rax movq -0x18(%rbp), %rdi callq *%rax movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x80, %rsp popq %rbp retq nopl (%rax)
ma_hashtbl_delete: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp dword ptr [rax+8], 0 jnz short loc_465E6 mov [rbp+var_1], 1 jmp loc_46961 loc_465E6: mov rax, [rbp+var_10] mov eax, [rax+0Ch] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_68], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call rec_hashnr mov edi, eax mov esi, [rbp+var_1C] mov rax, [rbp+var_10] mov edx, [rax+8] call hash_mask mov ecx, eax mov rax, [rbp+var_68] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_50], rax mov [rbp+var_48], 0 loc_4663D: mov rax, [rbp+var_50] mov rax, [rax+8] cmp rax, [rbp+var_18] jz short loc_4667C mov rax, [rbp+var_50] mov [rbp+var_48], rax mov rax, [rbp+var_50] cmp dword ptr [rax], 0FFFFFFFFh jnz short loc_46665 mov [rbp+var_1], 1 jmp loc_46961 loc_46665: mov rax, [rbp+var_38] mov rcx, [rbp+var_50] mov ecx, [rcx] shl rcx, 4 add rax, rcx mov [rbp+var_50], rax jmp short loc_4663D loc_4667C: mov rcx, [rbp+var_10] mov eax, [rcx+8] add eax, 0FFFFFFFFh mov [rcx+8], eax mov rcx, [rbp+var_10] mov ecx, [rcx+0Ch] shr ecx, 1 cmp eax, ecx jnb short loc_466A2 mov rax, [rbp+var_10] mov ecx, [rax+0Ch] shr ecx, 1 mov [rax+0Ch], ecx loc_466A2: mov rax, [rbp+var_10] mov dword ptr [rax+10h], 0FFFFFFFFh mov rax, [rbp+var_38] mov rcx, [rbp+var_10] mov ecx, [rcx+8] shl rcx, 4 add rax, rcx mov [rbp+var_40], rax mov rax, [rbp+var_50] mov [rbp+var_60], rax mov rax, [rbp+var_60] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov [rbp+var_30], eax cmp [rbp+var_48], 0 jz short loc_466F2 mov rax, [rbp+var_50] mov ecx, [rax] mov rax, [rbp+var_48] mov [rax], ecx jmp short loc_46733 loc_466F2: mov rax, [rbp+var_50] cmp dword ptr [rax], 0FFFFFFFFh jz short loc_46731 mov rax, [rbp+var_38] mov rcx, [rbp+var_50] mov ecx, [rcx] mov [rbp+var_30], ecx mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_60] mov rcx, [rax+8] mov rax, [rbp+var_50] mov [rax+8], rcx mov rax, [rbp+var_60] mov ecx, [rax] mov rax, [rbp+var_50] mov [rax], ecx loc_46731: jmp short $+2 loc_46733: mov rax, [rbp+var_60] cmp rax, [rbp+var_40] jnz short loc_46742 jmp loc_46937 loc_46742: mov rdi, [rbp+var_10] mov rax, [rbp+var_40] mov rsi, [rax+8] call rec_hashnr mov [rbp+var_28], eax mov rax, [rbp+var_38] mov [rbp+var_70], rax mov edi, [rbp+var_28] mov rax, [rbp+var_10] mov esi, [rax+0Ch] mov rax, [rbp+var_10] mov edx, [rax+8] call hash_mask mov ecx, eax mov rax, [rbp+var_70] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_50], rax mov rax, [rbp+var_50] cmp rax, [rbp+var_60] jnz short loc_467AC mov rax, [rbp+var_60] mov rcx, [rbp+var_40] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx jmp loc_46937 loc_467AC: mov rdi, [rbp+var_10] mov rax, [rbp+var_50] mov rsi, [rax+8] call rec_hashnr mov [rbp+var_24], eax mov rax, [rbp+var_38] mov [rbp+var_78], rax mov edi, [rbp+var_24] mov rax, [rbp+var_10] mov esi, [rax+0Ch] mov rax, [rbp+var_10] mov edx, [rax+8] call hash_mask mov ecx, eax mov rax, [rbp+var_78] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_50] cmp rax, [rbp+var_58] jz short loc_4685A mov rax, [rbp+var_60] mov rcx, [rbp+var_50] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rax, [rbp+var_50] mov rcx, [rbp+var_40] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_38] mov rax, [rbp+var_50] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov esi, eax mov rax, [rbp+var_58] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov edx, eax mov ecx, [rbp+var_30] call movelink jmp loc_46937 loc_4685A: mov edi, [rbp+var_28] mov esi, [rbp+var_1C] mov rax, [rbp+var_10] mov edx, [rax+8] add edx, 1 call hash_mask mov [rbp+var_20], eax mov eax, [rbp+var_20] mov [rbp+var_7C], eax mov edi, [rbp+var_24] mov esi, [rbp+var_1C] mov rax, [rbp+var_10] mov edx, [rax+8] add edx, 1 call hash_mask mov ecx, eax mov eax, [rbp+var_7C] cmp eax, ecx jnz short loc_468FC mov eax, [rbp+var_20] mov rcx, [rbp+var_10] cmp eax, [rcx+8] jz short loc_468E8 mov rax, [rbp+var_60] mov rcx, [rbp+var_40] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_38] mov rax, [rbp+var_40] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov esi, eax mov rax, [rbp+var_50] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov edx, eax mov ecx, [rbp+var_30] call movelink jmp short loc_46937 loc_468E8: mov rax, [rbp+var_50] mov rcx, [rbp+var_38] sub rax, rcx sar rax, 4 mov [rbp+var_2C], eax jmp short loc_46903 loc_468FC: mov [rbp+var_2C], 0FFFFFFFFh loc_46903: mov rax, [rbp+var_60] mov rcx, [rbp+var_40] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rdi, [rbp+var_38] mov esi, [rbp+var_2C] mov edx, [rbp+var_30] mov rax, [rbp+var_50] mov ecx, [rax] call movelink mov ecx, [rbp+var_30] mov rax, [rbp+var_50] mov [rax], ecx loc_46937: mov rdi, [rbp+var_10] add rdi, 18h call ma_pop_dynamic mov rax, [rbp+var_10] cmp qword ptr [rax+38h], 0 jz short loc_4695D mov rax, [rbp+var_10] mov rax, [rax+38h] mov rdi, [rbp+var_18] call rax loc_4695D: mov [rbp+var_1], 0 loc_46961: mov al, [rbp+var_1] add rsp, 80h pop rbp retn
char ma_hashtbl_delete(long long a1, long long a2) { unsigned int v2; // eax unsigned int v3; // eax _QWORD *v5; // [rsp+20h] [rbp-60h] long long v6; // [rsp+28h] [rbp-58h] unsigned int *v7; // [rsp+30h] [rbp-50h] long long v8; // [rsp+30h] [rbp-50h] _DWORD *v9; // [rsp+38h] [rbp-48h] _QWORD *v10; // [rsp+40h] [rbp-40h] long long v11; // [rsp+48h] [rbp-38h] unsigned int v12; // [rsp+50h] [rbp-30h] int v13; // [rsp+54h] [rbp-2Ch] unsigned int v14; // [rsp+58h] [rbp-28h] unsigned int v15; // [rsp+5Ch] [rbp-24h] int v16; // [rsp+60h] [rbp-20h] unsigned int v17; // [rsp+64h] [rbp-1Ch] if ( !*(_DWORD *)(a1 + 8) ) return 1; v17 = *(_DWORD *)(a1 + 12); v11 = *(_QWORD *)(a1 + 24); v2 = rec_hashnr(a1, a2); v7 = (unsigned int *)(16LL * (unsigned int)hash_mask(v2, v17, *(_DWORD *)(a1 + 8)) + v11); v9 = 0LL; while ( *((_QWORD *)v7 + 1) != a2 ) { v9 = v7; if ( *v7 == -1 ) return 1; v7 = (unsigned int *)(16LL * *v7 + v11); } v3 = *(_DWORD *)(a1 + 8) - 1; *(_DWORD *)(a1 + 8) = v3; if ( v3 < *(_DWORD *)(a1 + 12) >> 1 ) *(_DWORD *)(a1 + 12) >>= 1; *(_DWORD *)(a1 + 16) = -1; v10 = (_QWORD *)(16LL * *(unsigned int *)(a1 + 8) + v11); v5 = v7; v12 = ((long long)v7 - v11) >> 4; if ( v9 ) { *v9 = *v7; } else if ( *v7 != -1 ) { v12 = *v7; v5 = (_QWORD *)(16LL * *v7 + v11); *((_QWORD *)v7 + 1) = v5[1]; *v7 = *(_DWORD *)v5; } if ( v5 != v10 ) { v14 = rec_hashnr(a1, v10[1]); v8 = 16LL * (unsigned int)hash_mask(v14, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8)) + v11; if ( (_QWORD *)v8 == v5 ) { *v5 = *v10; v5[1] = v10[1]; } else { v15 = rec_hashnr(a1, *(_QWORD *)(v8 + 8)); v6 = 16LL * (unsigned int)hash_mask(v15, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8)) + v11; if ( v8 == v6 ) { v16 = hash_mask(v14, v17, *(_DWORD *)(a1 + 8) + 1); if ( v16 == (unsigned int)hash_mask(v15, v17, *(_DWORD *)(a1 + 8) + 1) ) { if ( v16 != *(_DWORD *)(a1 + 8) ) { *v5 = *v10; v5[1] = v10[1]; movelink(v11, ((long long)v10 - v11) >> 4, (v8 - v11) >> 4, v12); goto LABEL_25; } v13 = (v8 - v11) >> 4; } else { v13 = -1; } *v5 = *v10; v5[1] = v10[1]; movelink(v11, v13, v12, *(_DWORD *)v8); *(_DWORD *)v8 = v12; goto LABEL_25; } *v5 = *(_QWORD *)v8; v5[1] = *(_QWORD *)(v8 + 8); *(_QWORD *)v8 = *v10; *(_QWORD *)(v8 + 8) = v10[1]; movelink(v11, (v8 - v11) >> 4, (v6 - v11) >> 4, v12); } } LABEL_25: ma_pop_dynamic((long long *)(a1 + 24)); if ( *(_QWORD *)(a1 + 56) ) (*(void ( **)(long long))(a1 + 56))(a2); return 0; }
ma_hashtbl_delete: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x8],0x0 JNZ 0x001465e6 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00146961 LAB_001465e6: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00146540 MOV EDI,EAX MOV ESI,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] CALL 0x00145f60 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x68] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV qword ptr [RBP + -0x48],0x0 LAB_0014663d: MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x18] JZ 0x0014667c MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x50] CMP dword ptr [RAX],-0x1 JNZ 0x00146665 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00146961 LAB_00146665: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RCX] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX JMP 0x0014663d LAB_0014667c: MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x8] ADD EAX,-0x1 MOV dword ptr [RCX + 0x8],EAX MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0xc] SHR ECX,0x1 CMP EAX,ECX JNC 0x001466a2 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0xc] SHR ECX,0x1 MOV dword ptr [RAX + 0xc],ECX LAB_001466a2: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],0xffffffff MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x8] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV dword ptr [RBP + -0x30],EAX CMP qword ptr [RBP + -0x48],0x0 JZ 0x001466f2 MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x48] MOV dword ptr [RAX],ECX JMP 0x00146733 LAB_001466f2: MOV RAX,qword ptr [RBP + -0x50] CMP dword ptr [RAX],-0x1 JZ 0x00146731 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RCX] MOV dword ptr [RBP + -0x30],ECX MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_00146731: JMP 0x00146733 LAB_00146733: MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RBP + -0x40] JNZ 0x00146742 JMP 0x00146937 LAB_00146742: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00146540 MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x70],RAX MOV EDI,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] CALL 0x00145f60 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x60] JNZ 0x001467ac MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX JMP 0x00146937 LAB_001467ac: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00146540 MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x78],RAX MOV EDI,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] CALL 0x00145f60 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x78] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x58] JZ 0x0014685a MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV EDX,EAX MOV ECX,dword ptr [RBP + -0x30] CALL 0x00146580 JMP 0x00146937 LAB_0014685a: MOV EDI,dword ptr [RBP + -0x28] MOV ESI,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] ADD EDX,0x1 CALL 0x00145f60 MOV dword ptr [RBP + -0x20],EAX MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x7c],EAX MOV EDI,dword ptr [RBP + -0x24] MOV ESI,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] ADD EDX,0x1 CALL 0x00145f60 MOV ECX,EAX MOV EAX,dword ptr [RBP + -0x7c] CMP EAX,ECX JNZ 0x001468fc MOV EAX,dword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x8] JZ 0x001468e8 MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV EDX,EAX MOV ECX,dword ptr [RBP + -0x30] CALL 0x00146580 JMP 0x00146937 LAB_001468e8: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX SAR RAX,0x4 MOV dword ptr [RBP + -0x2c],EAX JMP 0x00146903 LAB_001468fc: MOV dword ptr [RBP + -0x2c],0xffffffff LAB_00146903: MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x2c] MOV EDX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x50] MOV ECX,dword ptr [RAX] CALL 0x00146580 MOV ECX,dword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_00146937: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x18 CALL 0x00143f60 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x38],0x0 JZ 0x0014695d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x38] MOV RDI,qword ptr [RBP + -0x18] CALL RAX LAB_0014695d: MOV byte ptr [RBP + -0x1],0x0 LAB_00146961: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x80 POP RBP RET
int1 ma_hashtbl_delete(long param_1,long param_2) { int4 uVar1; long lVar2; int4 uVar3; uint uVar4; int4 uVar5; int iVar6; int iVar7; uint *puVar8; uint *puVar9; uint *puVar10; uint *local_68; uint *local_58; uint *local_50; uint local_38; int4 local_34; if (*(int *)(param_1 + 8) == 0) { return 1; } uVar1 = *(int4 *)(param_1 + 0xc); lVar2 = *(long *)(param_1 + 0x18); uVar3 = rec_hashnr(param_1,param_2); uVar4 = hash_mask(uVar3,uVar1,*(int4 *)(param_1 + 8)); local_50 = (uint *)0x0; while (local_58 = (uint *)(lVar2 + (ulong)uVar4 * 0x10), *(long *)(local_58 + 2) != param_2) { local_50 = local_58; if (*local_58 == 0xffffffff) { return 1; } uVar4 = *local_58; } uVar4 = *(int *)(param_1 + 8) - 1; *(uint *)(param_1 + 8) = uVar4; if (uVar4 < *(uint *)(param_1 + 0xc) >> 1) { *(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) >> 1; } *(int4 *)(param_1 + 0x10) = 0xffffffff; puVar8 = (uint *)(lVar2 + (ulong)*(uint *)(param_1 + 8) * 0x10); local_68 = local_58; local_38 = (uint)((long)local_58 - lVar2 >> 4); if (local_50 == (uint *)0x0) { if (*local_58 != 0xffffffff) { local_38 = *local_58; local_68 = (uint *)(lVar2 + (ulong)local_38 * 0x10); *(int8 *)(local_58 + 2) = *(int8 *)(local_68 + 2); *local_58 = *local_68; } } else { *local_50 = *local_58; } if (local_68 != puVar8) { uVar3 = rec_hashnr(param_1,*(int8 *)(puVar8 + 2)); uVar4 = hash_mask(uVar3,*(int4 *)(param_1 + 0xc),*(int4 *)(param_1 + 8)); puVar9 = (uint *)(lVar2 + (ulong)uVar4 * 0x10); if (puVar9 == local_68) { *(int8 *)local_68 = *(int8 *)puVar8; *(int8 *)(local_68 + 2) = *(int8 *)(puVar8 + 2); } else { uVar5 = rec_hashnr(param_1,*(int8 *)(puVar9 + 2)); uVar4 = hash_mask(uVar5,*(int4 *)(param_1 + 0xc),*(int4 *)(param_1 + 8)); puVar10 = (uint *)(lVar2 + (ulong)uVar4 * 0x10); if (puVar9 == puVar10) { iVar6 = hash_mask(uVar3,uVar1,*(int *)(param_1 + 8) + 1); iVar7 = hash_mask(uVar5,uVar1,*(int *)(param_1 + 8) + 1); if (iVar6 == iVar7) { if (iVar6 != *(int *)(param_1 + 8)) { *(int8 *)local_68 = *(int8 *)puVar8; *(int8 *)(local_68 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,(long)puVar8 - lVar2 >> 4 & 0xffffffff, (long)puVar9 - lVar2 >> 4 & 0xffffffff,local_38); goto LAB_00146937; } local_34 = (int4)((long)puVar9 - lVar2 >> 4); } else { local_34 = 0xffffffff; } *(int8 *)local_68 = *(int8 *)puVar8; *(int8 *)(local_68 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,local_34,local_38,*puVar9); *puVar9 = local_38; } else { *(int8 *)local_68 = *(int8 *)puVar9; *(int8 *)(local_68 + 2) = *(int8 *)(puVar9 + 2); *(int8 *)puVar9 = *(int8 *)puVar8; *(int8 *)(puVar9 + 2) = *(int8 *)(puVar8 + 2); movelink(lVar2,(long)puVar9 - lVar2 >> 4 & 0xffffffff, (long)puVar10 - lVar2 >> 4 & 0xffffffff,local_38); } } } LAB_00146937: ma_pop_dynamic(param_1 + 0x18); if (*(long *)(param_1 + 0x38) != 0) { (**(code **)(param_1 + 0x38))(param_2); } return 0; }
53,531
nglog::tools::GetSectionHeaderByType(int, unsigned short, unsigned long, unsigned int, Elf64_Shdr*)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE bool GetSectionHeaderByType(const int fd, ElfW(Half) sh_num, const size_t sh_offset, ElfW(Word) type, ElfW(Shdr) * out) { // Read at most 16 section headers at a time to save read calls. ElfW(Shdr) buf[16]; for (size_t i = 0; i < sh_num;) { const size_t num_bytes_left = (sh_num - i) * sizeof(buf[0]); const size_t num_bytes_to_read = (sizeof(buf) > num_bytes_left) ? num_bytes_left : sizeof(buf); const ssize_t len = ReadFromOffset(fd, buf, num_bytes_to_read, sh_offset + i * sizeof(buf[0])); if (len == -1) { return false; } NGLOG_SAFE_ASSERT(static_cast<size_t>(len) % sizeof(buf[0]) == 0); const size_t num_headers_in_buf = static_cast<size_t>(len) / sizeof(buf[0]); NGLOG_SAFE_ASSERT(num_headers_in_buf <= sizeof(buf) / sizeof(buf[0])); for (size_t j = 0; j < num_headers_in_buf; ++j) { if (buf[j].sh_type == type) { *out = buf[j]; return true; } } i += num_headers_in_buf; } return false; }
O0
cpp
nglog::tools::GetSectionHeaderByType(int, unsigned short, unsigned long, unsigned int, Elf64_Shdr*): pushq %rbp movq %rsp, %rbp subq $0x470, %rsp # imm = 0x470 movw %si, %ax movl %edi, -0x8(%rbp) movw %ax, -0xa(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq %r8, -0x28(%rbp) movq $0x0, -0x438(%rbp) movq -0x438(%rbp), %rax movzwl -0xa(%rbp), %ecx cmpq %rcx, %rax jae 0x4d6ad movzwl -0xa(%rbp), %eax subq -0x438(%rbp), %rax shlq $0x6, %rax movq %rax, -0x440(%rbp) movl $0x400, %eax # imm = 0x400 cmpq -0x440(%rbp), %rax jbe 0x4d583 movq -0x440(%rbp), %rax movq %rax, -0x468(%rbp) jmp 0x4d591 movl $0x400, %eax # imm = 0x400 movq %rax, -0x468(%rbp) jmp 0x4d591 movq -0x468(%rbp), %rax movq %rax, -0x448(%rbp) movl -0x8(%rbp), %edi leaq -0x430(%rbp), %rsi movq -0x448(%rbp), %rdx movq -0x18(%rbp), %rcx movq -0x438(%rbp), %rax shlq $0x6, %rax addq %rax, %rcx callq 0x4c010 movq %rax, -0x450(%rbp) cmpq $-0x1, -0x450(%rbp) jne 0x4d5e1 movb $0x0, -0x1(%rbp) jmp 0x4d6b1 movq -0x450(%rbp), %rax andq $0x3f, %rax cmpq $0x0, %rax jne 0x4d5f4 jmp 0x4d5f9 callq 0x9390 movq -0x450(%rbp), %rax shrq $0x6, %rax movq %rax, -0x458(%rbp) cmpq $0x10, -0x458(%rbp) ja 0x4d617 jmp 0x4d61c callq 0x9390 movq $0x0, -0x460(%rbp) movq -0x460(%rbp), %rax cmpq -0x458(%rbp), %rax jae 0x4d693 movq -0x460(%rbp), %rcx leaq -0x430(%rbp), %rax shlq $0x6, %rcx addq %rcx, %rax movl 0x4(%rax), %eax cmpl -0x1c(%rbp), %eax jne 0x4d67d movq -0x460(%rbp), %rax leaq -0x430(%rbp), %rsi shlq $0x6, %rax addq %rax, %rsi movq -0x28(%rbp), %rdi movl $0x40, %edx callq 0x9580 movb $0x1, -0x1(%rbp) jmp 0x4d6b1 jmp 0x4d67f movq -0x460(%rbp), %rax addq $0x1, %rax movq %rax, -0x460(%rbp) jmp 0x4d627 movq -0x458(%rbp), %rax addq -0x438(%rbp), %rax movq %rax, -0x438(%rbp) jmp 0x4d53b movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x470, %rsp # imm = 0x470 popq %rbp retq nop
_ZN5nglog5toolsL22GetSectionHeaderByTypeEitmjP10Elf64_Shdr: push rbp mov rbp, rsp sub rsp, 470h mov ax, si mov dword ptr [rbp+var_8], edi mov [rbp+var_A], ax mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_28], r8 mov [rbp+var_438], 0 loc_4D53B: mov rax, [rbp+var_438] movzx ecx, [rbp+var_A] cmp rax, rcx jnb loc_4D6AD movzx eax, [rbp+var_A] sub rax, [rbp+var_438] shl rax, 6 mov [rbp+var_440], rax mov eax, 400h cmp rax, [rbp+var_440] jbe short loc_4D583 mov rax, [rbp+var_440] mov [rbp+var_468], rax jmp short loc_4D591 loc_4D583: mov eax, 400h mov [rbp+var_468], rax jmp short $+2 loc_4D591: mov rax, [rbp+var_468] mov [rbp+var_448], rax mov edi, dword ptr [rbp+var_8]; this lea rsi, [rbp+var_430]; int mov rdx, [rbp+var_448]; void * mov rcx, [rbp+var_18] mov rax, [rbp+var_438] shl rax, 6 add rcx, rax; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) mov [rbp+var_450], rax cmp [rbp+var_450], 0FFFFFFFFFFFFFFFFh jnz short loc_4D5E1 mov byte ptr [rbp+var_8+7], 0 jmp loc_4D6B1 loc_4D5E1: mov rax, [rbp+var_450] and rax, 3Fh cmp rax, 0 jnz short loc_4D5F4 jmp short loc_4D5F9 loc_4D5F4: call _abort loc_4D5F9: mov rax, [rbp+var_450] shr rax, 6 mov [rbp+var_458], rax cmp [rbp+var_458], 10h ja short loc_4D617 jmp short loc_4D61C loc_4D617: call _abort loc_4D61C: mov [rbp+var_460], 0 loc_4D627: mov rax, [rbp+var_460] cmp rax, [rbp+var_458] jnb short loc_4D693 mov rcx, [rbp+var_460] lea rax, [rbp+var_430] shl rcx, 6 add rax, rcx mov eax, [rax+4] cmp eax, [rbp+var_1C] jnz short loc_4D67D mov rax, [rbp+var_460] lea rsi, [rbp+var_430] shl rax, 6 add rsi, rax mov rdi, [rbp+var_28] mov edx, 40h ; '@' call _memcpy mov byte ptr [rbp+var_8+7], 1 jmp short loc_4D6B1 loc_4D67D: jmp short $+2 loc_4D67F: mov rax, [rbp+var_460] add rax, 1 mov [rbp+var_460], rax jmp short loc_4D627 loc_4D693: mov rax, [rbp+var_458] add rax, [rbp+var_438] mov [rbp+var_438], rax jmp loc_4D53B loc_4D6AD: mov byte ptr [rbp+var_8+7], 0 loc_4D6B1: mov al, byte ptr [rbp+var_8+7] and al, 1 add rsp, 470h pop rbp retn
char nglog::tools::GetSectionHeaderByType( unsigned int a1, unsigned __int16 a2, long long a3, int a4, long long a5) { long long v5; // rdi char *v7; // [rsp+8h] [rbp-468h] unsigned long long j; // [rsp+10h] [rbp-460h] unsigned long long v9; // [rsp+18h] [rbp-458h] unsigned long long v10; // [rsp+20h] [rbp-450h] unsigned long long i; // [rsp+38h] [rbp-438h] int v12[258]; // [rsp+40h] [rbp-430h] BYREF long long v13; // [rsp+448h] [rbp-28h] int v14; // [rsp+454h] [rbp-1Ch] long long v15; // [rsp+458h] [rbp-18h] unsigned __int16 v16; // [rsp+466h] [rbp-Ah] unsigned int v17; // [rsp+468h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = a5; for ( i = 0LL; i < v16; i += v9 ) { if ( (v16 - i) << 6 >= 0x400 ) v7 = (_BYTE *)(&stru_3F8 + 8); else v7 = (char *)((v16 - i) << 6); v5 = v17; v10 = nglog::tools::ReadFromOffset((nglog::tools *)v17, (long long)v12, v7, (i << 6) + v15); if ( v10 == -1LL ) return 0; if ( (v10 & 0x3F) != 0 ) abort(v5, v12); v9 = v10 >> 6; if ( v10 >> 6 > 0x10 ) abort(v5, v12); for ( j = 0LL; j < v9; ++j ) { if ( v12[16 * j + 1] == v14 ) { memcpy(v13, &v12[16 * j], 64LL); return 1; } } } return 0; }
GetSectionHeaderByType: PUSH RBP MOV RBP,RSP SUB RSP,0x470 MOV AX,SI MOV dword ptr [RBP + -0x8],EDI MOV word ptr [RBP + -0xa],AX MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x438],0x0 LAB_0014d53b: MOV RAX,qword ptr [RBP + -0x438] MOVZX ECX,word ptr [RBP + -0xa] CMP RAX,RCX JNC 0x0014d6ad MOVZX EAX,word ptr [RBP + -0xa] SUB RAX,qword ptr [RBP + -0x438] SHL RAX,0x6 MOV qword ptr [RBP + -0x440],RAX MOV EAX,0x400 CMP RAX,qword ptr [RBP + -0x440] JBE 0x0014d583 MOV RAX,qword ptr [RBP + -0x440] MOV qword ptr [RBP + -0x468],RAX JMP 0x0014d591 LAB_0014d583: MOV EAX,0x400 MOV qword ptr [RBP + -0x468],RAX JMP 0x0014d591 LAB_0014d591: MOV RAX,qword ptr [RBP + -0x468] MOV qword ptr [RBP + -0x448],RAX MOV EDI,dword ptr [RBP + -0x8] LEA RSI,[RBP + -0x430] MOV RDX,qword ptr [RBP + -0x448] MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x438] SHL RAX,0x6 ADD RCX,RAX CALL 0x0014c010 MOV qword ptr [RBP + -0x450],RAX CMP qword ptr [RBP + -0x450],-0x1 JNZ 0x0014d5e1 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0014d6b1 LAB_0014d5e1: MOV RAX,qword ptr [RBP + -0x450] AND RAX,0x3f CMP RAX,0x0 JNZ 0x0014d5f4 JMP 0x0014d5f9 LAB_0014d5f4: CALL 0x00109390 LAB_0014d5f9: MOV RAX,qword ptr [RBP + -0x450] SHR RAX,0x6 MOV qword ptr [RBP + -0x458],RAX CMP qword ptr [RBP + -0x458],0x10 JA 0x0014d617 JMP 0x0014d61c LAB_0014d617: CALL 0x00109390 LAB_0014d61c: MOV qword ptr [RBP + -0x460],0x0 LAB_0014d627: MOV RAX,qword ptr [RBP + -0x460] CMP RAX,qword ptr [RBP + -0x458] JNC 0x0014d693 MOV RCX,qword ptr [RBP + -0x460] LEA RAX,[RBP + -0x430] SHL RCX,0x6 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x4] CMP EAX,dword ptr [RBP + -0x1c] JNZ 0x0014d67d MOV RAX,qword ptr [RBP + -0x460] LEA RSI,[RBP + -0x430] SHL RAX,0x6 ADD RSI,RAX MOV RDI,qword ptr [RBP + -0x28] MOV EDX,0x40 CALL 0x00109580 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014d6b1 LAB_0014d67d: JMP 0x0014d67f LAB_0014d67f: MOV RAX,qword ptr [RBP + -0x460] ADD RAX,0x1 MOV qword ptr [RBP + -0x460],RAX JMP 0x0014d627 LAB_0014d693: MOV RAX,qword ptr [RBP + -0x458] ADD RAX,qword ptr [RBP + -0x438] MOV qword ptr [RBP + -0x438],RAX JMP 0x0014d53b LAB_0014d6ad: MOV byte ptr [RBP + -0x1],0x0 LAB_0014d6b1: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x470 POP RBP RET
/* nglog::tools::GetSectionHeaderByType(int, unsigned short, unsigned long, unsigned int, Elf64_Shdr*) */ int1 nglog::tools::GetSectionHeaderByType (int param_1,ushort param_2,ulong param_3,uint param_4,Elf64_Shdr *param_5) { ulong uVar1; ulong local_470; ulong local_468; ulong local_440; int1 local_438 [4]; uint auStack_434 [257]; Elf64_Shdr *local_30; uint local_24; ulong local_20; ushort local_12; int local_10; local_440 = 0; local_30 = param_5; local_24 = param_4; local_20 = param_3; local_12 = param_2; local_10 = param_1; while( true ) { if (local_12 <= local_440) { return 0; } local_470 = (local_12 - local_440) * 0x40; if (0x3ff < local_470) { local_470 = 0x400; } uVar1 = ReadFromOffset(local_10,local_438,local_470,local_20 + local_440 * 0x40); if (uVar1 == 0xffffffffffffffff) { return 0; } if ((uVar1 & 0x3f) != 0) { /* WARNING: Subroutine does not return */ abort(); } uVar1 = uVar1 >> 6; if (0x10 < uVar1) break; for (local_468 = 0; local_468 < uVar1; local_468 = local_468 + 1) { if (auStack_434[local_468 * 0x10] == local_24) { memcpy(local_30,local_438 + local_468 * 0x40,0x40); return 1; } } local_440 = uVar1 + local_440; } /* WARNING: Subroutine does not return */ abort(); }
53,532
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::GetNode(float, float, unsigned char&, unsigned short) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/tmr/subdivisionPlan.cpp
SubdivisionPlan::Node SubdivisionPlan::GetNode(float s, float t, unsigned char& quadrant, unsigned short level) const { switch (getSchemeType()) { case Sdc::SchemeType::SCHEME_CATMARK: return Node(this, NodeBase::traverse<NodeBase::CatmarkWinding>(_tree.data(), s, t, quadrant, level).treeOffset); case Sdc::SchemeType::SCHEME_LOOP: return Node(this, NodeBase::traverse<NodeBase::LoopWinding>(_tree.data(), s, t, quadrant, level).treeOffset); default: break; } assert(0); return {}; }
O2
cpp
OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::GetNode(float, float, unsigned char&, unsigned short) const: pushq %rbx movq %rdi, %rbx movq (%rdi), %rax movq 0x40(%rdi), %rdi testb $0x1, (%rax) jne 0xb1246 movzwl %dx, %edx callq 0x51810 jmp 0xb124e movzwl %dx, %edx callq 0x54790 movq %rbx, %rdx popq %rbx retq nop
_ZNK10OpenSubdiv6v3_6_03Tmr15SubdivisionPlan7GetNodeEffRht: push rbx mov rbx, rdi mov rax, [rdi] mov rdi, [rdi+40h] test byte ptr [rax], 1 jnz short loc_B1246 movzx edx, dx call __ZN10OpenSubdiv6v3_6_03Tmr8NodeBase8traverseINS2_14CatmarkWindingEEES2_PKjffRht; OpenSubdiv::v3_6_0::Tmr::NodeBase::traverse<OpenSubdiv::v3_6_0::Tmr::NodeBase::CatmarkWinding>(uint const*,float,float,uchar &,ushort) jmp short loc_B124E loc_B1246: movzx edx, dx call __ZN10OpenSubdiv6v3_6_03Tmr8NodeBase8traverseINS2_11LoopWindingEEES2_PKjffRht; OpenSubdiv::v3_6_0::Tmr::NodeBase::traverse<OpenSubdiv::v3_6_0::Tmr::NodeBase::LoopWinding>(uint const*,float,float,uchar &,ushort) loc_B124E: mov rdx, rbx pop rbx retn
long long OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::GetNode( OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan *this, float a2, float a3, unsigned __int8 *a4, unsigned __int16 a5) { _BYTE *v5; // rax long long v6; // rdi v5 = *(_BYTE **)this; v6 = *((_QWORD *)this + 8); if ( (*v5 & 1) != 0 ) return OpenSubdiv::v3_6_0::Tmr::NodeBase::traverse<OpenSubdiv::v3_6_0::Tmr::NodeBase::LoopWinding>( v6, a4, a5, a2, a3); else return OpenSubdiv::v3_6_0::Tmr::NodeBase::traverse<OpenSubdiv::v3_6_0::Tmr::NodeBase::CatmarkWinding>( v6, a4, a5, a2, a3); }
GetNode: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [RDI] MOV RDI,qword ptr [RDI + 0x40] TEST byte ptr [RAX],0x1 JNZ 0x001b1246 MOVZX EDX,DX CALL 0x00151810 JMP 0x001b124e LAB_001b1246: MOVZX EDX,DX CALL 0x00154790 LAB_001b124e: MOV RDX,RBX POP RBX RET
/* OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::GetNode(float, float, unsigned char&, unsigned short) const */ void __thiscall OpenSubdiv::v3_6_0::Tmr::SubdivisionPlan::GetNode (SubdivisionPlan *this,float param_1,float param_2,uchar *param_3,ushort param_4) { if ((**(byte **)this & 1) == 0) { NodeBase::traverse<OpenSubdiv::v3_6_0::Tmr::NodeBase::CatmarkWinding> (*(uint **)(this + 0x40),param_1,param_2,param_3,param_4); } else { NodeBase::traverse<OpenSubdiv::v3_6_0::Tmr::NodeBase::LoopWinding> (*(uint **)(this + 0x40),param_1,param_2,param_3,param_4); } return; }
53,533
eth_proofer_execute
corpus-core[P]colibri-stateless/src/chains/eth/proofer/eth_proofer.c
bool eth_proofer_execute(proofer_ctx_t* ctx) { if (ctx->chain_id != C4_CHAIN_MAINNET) return false; if (includes(eth_account_methods, ctx->method)) c4_proof_account(ctx); else if (strcmp(ctx->method, "eth_getTransactionByHash") == 0 || strcmp(ctx->method, "eth_getTransactionByBlockHashAndIndex") == 0 || strcmp(ctx->method, "eth_getTransactionByBlockNumberAndIndex") == 0) c4_proof_transaction(ctx); else if (strcmp(ctx->method, "eth_getTransactionReceipt") == 0) c4_proof_receipt(ctx); else if (strcmp(ctx->method, "eth_getLogs") == 0) c4_proof_logs(ctx); else if (strcmp(ctx->method, "eth_call") == 0) c4_proof_call(ctx); else if (strcmp(ctx->method, "eth_getBlockByHash") == 0 || strcmp(ctx->method, "eth_getBlockByNumber") == 0) c4_proof_block(ctx); else if (strcmp(ctx->method, "eth_proof_sync") == 0) c4_proof_sync(ctx); else ctx->state.error = strdup("Unsupported method"); return true; }
O1
c
eth_proofer_execute: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl 0x30(%rdi), %ebp cmpl $0x1, %ebp jne 0x676b movq %rdi, %rbx movq (%rdi), %r14 leaq 0x36f2b(%rip), %rdi # 0x3d578 movq %r14, %rsi callq 0x5280 testl %eax, %eax je 0x6681 leaq 0x50b58(%rip), %r12 # 0x571b8 movq (%r12), %r15 testq %r15, %r15 je 0x668e movq %r15, %rdi movq %r14, %rsi callq 0x5280 addq $0x8, %r12 testl %eax, %eax jne 0x6660 testq %r15, %r15 je 0x668e movq %rbx, %rdi callq 0x67ac jmp 0x676b leaq 0x36e03(%rip), %rsi # 0x3d498 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x6763 leaq 0x36e05(%rip), %rsi # 0x3d4b1 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x6763 leaq 0x36e14(%rip), %rsi # 0x3d4d7 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x6763 leaq 0x36e25(%rip), %rsi # 0x3d4ff movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x677a leaq 0x36e28(%rip), %rsi # 0x3d519 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x6784 leaq 0x36e1d(%rip), %rsi # 0x3d525 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x6798 leaq 0x36e0f(%rip), %rsi # 0x3d52e movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x678e leaq 0x36e0f(%rip), %rsi # 0x3d541 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x678e leaq 0x36e11(%rip), %rsi # 0x3d556 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x67a2 leaq 0x36e0d(%rip), %rdi # 0x3d565 callq 0x5030 movq %rax, 0x40(%rbx) jmp 0x676b movq %rbx, %rdi callq 0x7184 cmpl $0x1, %ebp sete %al popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi callq 0xa494 jmp 0x676b movq %rbx, %rdi callq 0x783c jmp 0x676b movq %rbx, %rdi callq 0xca6c jmp 0x676b movq %rbx, %rdi callq 0x855c jmp 0x676b movq %rbx, %rdi callq 0xc084 jmp 0x676b
eth_proofer_execute: push rbp push r15 push r14 push r12 push rbx mov ebp, [rdi+30h] cmp ebp, 1 jnz loc_676B mov rbx, rdi mov r14, [rdi] lea rdi, aEthGetbalance; "eth_getBalance" mov rsi, r14 call _strcmp test eax, eax jz short loc_6681 lea r12, off_571B8; "eth_getCode" loc_6660: mov r15, [r12] test r15, r15 jz short loc_668E mov rdi, r15 mov rsi, r14 call _strcmp add r12, 8 test eax, eax jnz short loc_6660 test r15, r15 jz short loc_668E loc_6681: mov rdi, rbx call c4_proof_account jmp loc_676B loc_668E: lea rsi, aEthGettransact; "eth_getTransactionByHash" mov rdi, r14 call _strcmp test eax, eax jz loc_6763 lea rsi, aEthGettransact_0; "eth_getTransactionByBlockHashAndIndex" mov rdi, r14 call _strcmp test eax, eax jz loc_6763 lea rsi, aEthGettransact_1; "eth_getTransactionByBlockNumberAndIndex" mov rdi, r14 call _strcmp test eax, eax jz loc_6763 lea rsi, aEthGettransact_2; "eth_getTransactionReceipt" mov rdi, r14 call _strcmp test eax, eax jz loc_677A lea rsi, aEthGetlogs; "eth_getLogs" mov rdi, r14 call _strcmp test eax, eax jz loc_6784 lea rsi, aEthCall; "eth_call" mov rdi, r14 call _strcmp test eax, eax jz loc_6798 lea rsi, aEthGetblockbyh; "eth_getBlockByHash" mov rdi, r14 call _strcmp test eax, eax jz short loc_678E lea rsi, aEthGetblockbyn; "eth_getBlockByNumber" mov rdi, r14 call _strcmp test eax, eax jz short loc_678E lea rsi, aEthProofSync; "eth_proof_sync" mov rdi, r14 call _strcmp test eax, eax jz short loc_67A2 lea rdi, aUnsupportedMet; "Unsupported method" call _strdup mov [rbx+40h], rax jmp short loc_676B loc_6763: mov rdi, rbx call c4_proof_transaction loc_676B: cmp ebp, 1 setz al pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_677A: mov rdi, rbx call c4_proof_receipt jmp short loc_676B loc_6784: mov rdi, rbx call c4_proof_logs jmp short loc_676B loc_678E: mov rdi, rbx call c4_proof_block jmp short loc_676B loc_6798: mov rdi, rbx call c4_proof_call jmp short loc_676B loc_67A2: mov rdi, rbx call c4_proof_sync jmp short loc_676B
bool eth_proofer_execute(long long *a1) { int v1; // ebp long long v2; // r14 char **v3; // r12 char *v4; // r15 int v5; // eax v1 = *((_DWORD *)a1 + 12); if ( v1 == 1 ) { v2 = *a1; if ( !(unsigned int)strcmp("eth_getBalance", *a1) ) { LABEL_7: c4_proof_account(a1); } else { v3 = off_571B8; while ( 1 ) { v4 = *v3; if ( !*v3 ) break; v5 = strcmp(*v3++, v2); if ( !v5 ) { if ( v4 ) goto LABEL_7; break; } } if ( !(unsigned int)strcmp(v2, "eth_getTransactionByHash") || !(unsigned int)strcmp(v2, "eth_getTransactionByBlockHashAndIndex") || !(unsigned int)strcmp(v2, "eth_getTransactionByBlockNumberAndIndex") ) { c4_proof_transaction(a1); } else if ( !(unsigned int)strcmp(v2, "eth_getTransactionReceipt") ) { c4_proof_receipt(a1); } else if ( !(unsigned int)strcmp(v2, "eth_getLogs") ) { c4_proof_logs(a1); } else if ( !(unsigned int)strcmp(v2, "eth_call") ) { c4_proof_call(a1); } else if ( !(unsigned int)strcmp(v2, "eth_getBlockByHash") || !(unsigned int)strcmp(v2, "eth_getBlockByNumber") ) { c4_proof_block(a1); } else if ( !(unsigned int)strcmp(v2, "eth_proof_sync") ) { c4_proof_sync(a1); } else { a1[8] = strdup("Unsupported method"); } } } return v1 == 1; }
eth_proofer_execute: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EBP,dword ptr [RDI + 0x30] CMP EBP,0x1 JNZ 0x0010676b MOV RBX,RDI MOV R14,qword ptr [RDI] LEA RDI,[0x13d578] MOV RSI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x00106681 LEA R12,[0x1571b8] LAB_00106660: MOV R15,qword ptr [R12] TEST R15,R15 JZ 0x0010668e MOV RDI,R15 MOV RSI,R14 CALL 0x00105280 ADD R12,0x8 TEST EAX,EAX JNZ 0x00106660 TEST R15,R15 JZ 0x0010668e LAB_00106681: MOV RDI,RBX CALL 0x001067ac JMP 0x0010676b LAB_0010668e: LEA RSI,[0x13d498] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x00106763 LEA RSI,[0x13d4b1] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x00106763 LEA RSI,[0x13d4d7] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x00106763 LEA RSI,[0x13d4ff] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x0010677a LEA RSI,[0x13d519] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x00106784 LEA RSI,[0x13d525] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x00106798 LEA RSI,[0x13d52e] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x0010678e LEA RSI,[0x13d541] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x0010678e LEA RSI,[0x13d556] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x001067a2 LEA RDI,[0x13d565] CALL 0x00105030 MOV qword ptr [RBX + 0x40],RAX JMP 0x0010676b LAB_00106763: MOV RDI,RBX CALL 0x00107184 LAB_0010676b: CMP EBP,0x1 SETZ AL POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0010677a: MOV RDI,RBX CALL 0x0010a494 JMP 0x0010676b LAB_00106784: MOV RDI,RBX CALL 0x0010783c JMP 0x0010676b LAB_0010678e: MOV RDI,RBX CALL 0x0010ca6c JMP 0x0010676b LAB_00106798: MOV RDI,RBX CALL 0x0010855c JMP 0x0010676b LAB_001067a2: MOV RDI,RBX CALL 0x0010c084 JMP 0x0010676b
bool eth_proofer_execute(int8 *param_1) { int iVar1; char *__s1; int iVar2; char *pcVar3; int8 *puVar4; iVar1 = *(int *)(param_1 + 6); if (iVar1 != 1) goto LAB_0010676b; pcVar3 = (char *)*param_1; iVar2 = strcmp("eth_getBalance",pcVar3); if (iVar2 != 0) { puVar4 = (int8 *)(eth_account_methods + 8); do { __s1 = (char *)*puVar4; if (__s1 == (char *)0x0) goto LAB_0010668e; iVar2 = strcmp(__s1,pcVar3); puVar4 = puVar4 + 1; } while (iVar2 != 0); if (__s1 == (char *)0x0) { LAB_0010668e: iVar2 = strcmp(pcVar3,"eth_getTransactionByHash"); if (iVar2 != 0) { iVar2 = strcmp(pcVar3,"eth_getTransactionByBlockHashAndIndex"); if (iVar2 != 0) { iVar2 = strcmp(pcVar3,"eth_getTransactionByBlockNumberAndIndex"); if (iVar2 != 0) { iVar2 = strcmp(pcVar3,"eth_getTransactionReceipt"); if (iVar2 == 0) { c4_proof_receipt(param_1); } else { iVar2 = strcmp(pcVar3,"eth_getLogs"); if (iVar2 == 0) { c4_proof_logs(param_1); } else { iVar2 = strcmp(pcVar3,"eth_call"); if (iVar2 == 0) { c4_proof_call(param_1); } else { iVar2 = strcmp(pcVar3,"eth_getBlockByHash"); if (iVar2 != 0) { iVar2 = strcmp(pcVar3,"eth_getBlockByNumber"); if (iVar2 != 0) { iVar2 = strcmp(pcVar3,"eth_proof_sync"); if (iVar2 == 0) { c4_proof_sync(param_1); } else { pcVar3 = strdup("Unsupported method"); param_1[8] = pcVar3; } goto LAB_0010676b; } } c4_proof_block(param_1); } } } goto LAB_0010676b; } } } c4_proof_transaction(param_1); goto LAB_0010676b; } } c4_proof_account(param_1); LAB_0010676b: return iVar1 == 1; }
53,534
eth_proofer_execute
corpus-core[P]colibri-stateless/src/chains/eth/proofer/eth_proofer.c
bool eth_proofer_execute(proofer_ctx_t* ctx) { if (ctx->chain_id != C4_CHAIN_MAINNET) return false; if (includes(eth_account_methods, ctx->method)) c4_proof_account(ctx); else if (strcmp(ctx->method, "eth_getTransactionByHash") == 0 || strcmp(ctx->method, "eth_getTransactionByBlockHashAndIndex") == 0 || strcmp(ctx->method, "eth_getTransactionByBlockNumberAndIndex") == 0) c4_proof_transaction(ctx); else if (strcmp(ctx->method, "eth_getTransactionReceipt") == 0) c4_proof_receipt(ctx); else if (strcmp(ctx->method, "eth_getLogs") == 0) c4_proof_logs(ctx); else if (strcmp(ctx->method, "eth_call") == 0) c4_proof_call(ctx); else if (strcmp(ctx->method, "eth_getBlockByHash") == 0 || strcmp(ctx->method, "eth_getBlockByNumber") == 0) c4_proof_block(ctx); else if (strcmp(ctx->method, "eth_proof_sync") == 0) c4_proof_sync(ctx); else ctx->state.error = strdup("Unsupported method"); return true; }
O3
c
eth_proofer_execute: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl 0x30(%rdi), %ebp cmpl $0x1, %ebp jne 0x6766 movq %rdi, %rbx movq (%rdi), %r14 leaq 0x36f1c(%rip), %rdi # 0x3d578 leaq 0x50b55(%rip), %r15 # 0x571b8 movq %r14, %rsi callq 0x5280 testl %eax, %eax je 0x6754 movq (%r15), %rdi addq $0x8, %r15 testq %rdi, %rdi jne 0x6663 leaq 0x36e12(%rip), %rsi # 0x3d498 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x675e leaq 0x36e14(%rip), %rsi # 0x3d4b1 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x675e leaq 0x36e23(%rip), %rsi # 0x3d4d7 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x675e leaq 0x36e34(%rip), %rsi # 0x3d4ff movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x6777 leaq 0x36e37(%rip), %rsi # 0x3d519 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x6781 leaq 0x36e2c(%rip), %rsi # 0x3d525 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x6795 leaq 0x36e1e(%rip), %rsi # 0x3d52e movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x678b leaq 0x36e1e(%rip), %rsi # 0x3d541 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x678b leaq 0x36e20(%rip), %rsi # 0x3d556 movq %r14, %rdi callq 0x5280 testl %eax, %eax je 0x679f leaq 0x36e1c(%rip), %rdi # 0x3d565 callq 0x5030 movq %rax, 0x40(%rbx) jmp 0x6766 movq %rbx, %rdi callq 0x67ac jmp 0x6766 movq %rbx, %rdi callq 0x7158 cmpl $0x1, %ebp sete %al addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi callq 0xa34c jmp 0x6766 movq %rbx, %rdi callq 0x77f4 jmp 0x6766 movq %rbx, %rdi callq 0xc8fc jmp 0x6766 movq %rbx, %rdi callq 0x8490 jmp 0x6766 movq %rbx, %rdi callq 0xbf5c jmp 0x6766 nopl (%rax)
eth_proofer_execute: push rbp push r15 push r14 push rbx push rax mov ebp, [rdi+30h] cmp ebp, 1 jnz loc_6766 mov rbx, rdi mov r14, [rdi] lea rdi, aEthGetbalance; "eth_getBalance" lea r15, off_571B8; "eth_getCode" loc_6663: mov rsi, r14 call _strcmp test eax, eax jz loc_6754 mov rdi, [r15] add r15, 8 test rdi, rdi jnz short loc_6663 lea rsi, aEthGettransact; "eth_getTransactionByHash" mov rdi, r14 call _strcmp test eax, eax jz loc_675E lea rsi, aEthGettransact_0; "eth_getTransactionByBlockHashAndIndex" mov rdi, r14 call _strcmp test eax, eax jz loc_675E lea rsi, aEthGettransact_1; "eth_getTransactionByBlockNumberAndIndex" mov rdi, r14 call _strcmp test eax, eax jz loc_675E lea rsi, aEthGettransact_2; "eth_getTransactionReceipt" mov rdi, r14 call _strcmp test eax, eax jz loc_6777 lea rsi, aEthGetlogs; "eth_getLogs" mov rdi, r14 call _strcmp test eax, eax jz loc_6781 lea rsi, aEthCall; "eth_call" mov rdi, r14 call _strcmp test eax, eax jz loc_6795 lea rsi, aEthGetblockbyh; "eth_getBlockByHash" mov rdi, r14 call _strcmp test eax, eax jz short loc_678B lea rsi, aEthGetblockbyn; "eth_getBlockByNumber" mov rdi, r14 call _strcmp test eax, eax jz short loc_678B lea rsi, aEthProofSync; "eth_proof_sync" mov rdi, r14 call _strcmp test eax, eax jz short loc_679F lea rdi, aUnsupportedMet; "Unsupported method" call _strdup mov [rbx+40h], rax jmp short loc_6766 loc_6754: mov rdi, rbx call c4_proof_account jmp short loc_6766 loc_675E: mov rdi, rbx call c4_proof_transaction loc_6766: cmp ebp, 1 setz al add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_6777: mov rdi, rbx call c4_proof_receipt jmp short loc_6766 loc_6781: mov rdi, rbx call c4_proof_logs jmp short loc_6766 loc_678B: mov rdi, rbx call c4_proof_block jmp short loc_6766 loc_6795: mov rdi, rbx call c4_proof_call jmp short loc_6766 loc_679F: mov rdi, rbx call c4_proof_sync jmp short loc_6766
bool eth_proofer_execute(long long *a1) { int v1; // ebp long long v3; // r14 const char *v4; // rdi const char **v5; // r15 v1 = *((_DWORD *)a1 + 12); if ( v1 == 1 ) { v3 = *a1; v4 = "eth_getBalance"; v5 = (const char **)off_571B8; do { if ( !(unsigned int)strcmp(v4, v3) ) { c4_proof_account(a1); return v1 == 1; } v4 = *v5++; } while ( v4 ); if ( !(unsigned int)strcmp(v3, "eth_getTransactionByHash") || !(unsigned int)strcmp(v3, "eth_getTransactionByBlockHashAndIndex") || !(unsigned int)strcmp(v3, "eth_getTransactionByBlockNumberAndIndex") ) { c4_proof_transaction(a1); } else if ( !(unsigned int)strcmp(v3, "eth_getTransactionReceipt") ) { c4_proof_receipt(a1); } else if ( !(unsigned int)strcmp(v3, "eth_getLogs") ) { c4_proof_logs(a1); } else if ( !(unsigned int)strcmp(v3, "eth_call") ) { c4_proof_call(a1); } else if ( !(unsigned int)strcmp(v3, "eth_getBlockByHash") || !(unsigned int)strcmp(v3, "eth_getBlockByNumber") ) { c4_proof_block(a1); } else if ( !(unsigned int)strcmp(v3, "eth_proof_sync") ) { c4_proof_sync(a1); } else { a1[8] = strdup("Unsupported method"); } } return v1 == 1; }
eth_proofer_execute: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,dword ptr [RDI + 0x30] CMP EBP,0x1 JNZ 0x00106766 MOV RBX,RDI MOV R14,qword ptr [RDI] LEA RDI,[0x13d578] LEA R15,[0x1571b8] LAB_00106663: MOV RSI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x00106754 MOV RDI,qword ptr [R15] ADD R15,0x8 TEST RDI,RDI JNZ 0x00106663 LEA RSI,[0x13d498] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x0010675e LEA RSI,[0x13d4b1] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x0010675e LEA RSI,[0x13d4d7] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x0010675e LEA RSI,[0x13d4ff] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x00106777 LEA RSI,[0x13d519] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x00106781 LEA RSI,[0x13d525] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x00106795 LEA RSI,[0x13d52e] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x0010678b LEA RSI,[0x13d541] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x0010678b LEA RSI,[0x13d556] MOV RDI,R14 CALL 0x00105280 TEST EAX,EAX JZ 0x0010679f LEA RDI,[0x13d565] CALL 0x00105030 MOV qword ptr [RBX + 0x40],RAX JMP 0x00106766 LAB_00106754: MOV RDI,RBX CALL 0x001067ac JMP 0x00106766 LAB_0010675e: MOV RDI,RBX CALL 0x00107158 LAB_00106766: CMP EBP,0x1 SETZ AL ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00106777: MOV RDI,RBX CALL 0x0010a34c JMP 0x00106766 LAB_00106781: MOV RDI,RBX CALL 0x001077f4 JMP 0x00106766 LAB_0010678b: MOV RDI,RBX CALL 0x0010c8fc JMP 0x00106766 LAB_00106795: MOV RDI,RBX CALL 0x00108490 JMP 0x00106766 LAB_0010679f: MOV RDI,RBX CALL 0x0010bf5c JMP 0x00106766
bool eth_proofer_execute(int8 *param_1) { int iVar1; int iVar2; char *pcVar3; char *__s1; long *plVar4; iVar1 = *(int *)(param_1 + 6); if (iVar1 != 1) goto LAB_00106766; pcVar3 = (char *)*param_1; __s1 = "eth_getBalance"; plVar4 = (long *)(eth_account_methods + 8); do { iVar2 = strcmp(__s1,pcVar3); if (iVar2 == 0) { c4_proof_account(param_1); goto LAB_00106766; } __s1 = (char *)*plVar4; plVar4 = plVar4 + 1; } while (__s1 != (char *)0x0); iVar2 = strcmp(pcVar3,"eth_getTransactionByHash"); if (iVar2 != 0) { iVar2 = strcmp(pcVar3,"eth_getTransactionByBlockHashAndIndex"); if (iVar2 != 0) { iVar2 = strcmp(pcVar3,"eth_getTransactionByBlockNumberAndIndex"); if (iVar2 != 0) { iVar2 = strcmp(pcVar3,"eth_getTransactionReceipt"); if (iVar2 == 0) { c4_proof_receipt(param_1); } else { iVar2 = strcmp(pcVar3,"eth_getLogs"); if (iVar2 == 0) { c4_proof_logs(param_1); } else { iVar2 = strcmp(pcVar3,"eth_call"); if (iVar2 == 0) { c4_proof_call(param_1); } else { iVar2 = strcmp(pcVar3,"eth_getBlockByHash"); if (iVar2 != 0) { iVar2 = strcmp(pcVar3,"eth_getBlockByNumber"); if (iVar2 != 0) { iVar2 = strcmp(pcVar3,"eth_proof_sync"); if (iVar2 == 0) { c4_proof_sync(param_1); } else { pcVar3 = strdup("Unsupported method"); param_1[8] = pcVar3; } goto LAB_00106766; } } c4_proof_block(param_1); } } } goto LAB_00106766; } } } c4_proof_transaction(param_1); LAB_00106766: return iVar1 == 1; }
53,535
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_number()
llama.cpp/common/./json.hpp
token_type scan_number() // lgtm [cpp/use-of-goto] { // reset token_buffer to store the number's bytes reset(); // the type of the parsed number; initially set to unsigned; will be // changed if minus sign, decimal point or exponent is read token_type number_type = token_type::value_unsigned; // state (init): we just found out we need to scan a number switch (current) { case '-': { add(current); goto scan_number_minus; } case '0': { add(current); goto scan_number_zero; } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } // all other characters are rejected outside scan_number() default: // LCOV_EXCL_LINE JSON_ASSERT(false); // NOLINT(cert-dcl03-c,hicpp-static-assert,misc-static-assert) LCOV_EXCL_LINE } scan_number_minus: // state: we just parsed a leading minus sign number_type = token_type::value_integer; switch (get()) { case '0': { add(current); goto scan_number_zero; } case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } default: { error_message = "invalid number; expected digit after '-'"; return token_type::parse_error; } } scan_number_zero: // state: we just parse a zero (maybe with a leading minus sign) switch (get()) { case '.': { add(decimal_point_char); goto scan_number_decimal1; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_any1: // state: we just parsed a number 0-9 (maybe with a leading minus sign) switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any1; } case '.': { add(decimal_point_char); goto scan_number_decimal1; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_decimal1: // state: we just parsed a decimal point number_type = token_type::value_float; switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_decimal2; } default: { error_message = "invalid number; expected digit after '.'"; return token_type::parse_error; } } scan_number_decimal2: // we just parsed at least one number after a decimal point switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_decimal2; } case 'e': case 'E': { add(current); goto scan_number_exponent; } default: goto scan_number_done; } scan_number_exponent: // we just parsed an exponent number_type = token_type::value_float; switch (get()) { case '+': case '-': { add(current); goto scan_number_sign; } case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: { error_message = "invalid number; expected '+', '-', or digit after exponent"; return token_type::parse_error; } } scan_number_sign: // we just parsed an exponent sign switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: { error_message = "invalid number; expected digit after exponent sign"; return token_type::parse_error; } } scan_number_any2: // we just parsed a number after the exponent or exponent sign switch (get()) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': { add(current); goto scan_number_any2; } default: goto scan_number_done; } scan_number_done: // unget the character after the number (we only read it to know that // we are done scanning a number) unget(); char* endptr = nullptr; // NOLINT(cppcoreguidelines-pro-type-vararg,hicpp-vararg) errno = 0; // try to parse integers first and fall back to floats if (number_type == token_type::value_unsigned) { const auto x = std::strtoull(token_buffer.data(), &endptr, 10); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); if (errno == 0) { value_unsigned = static_cast<number_unsigned_t>(x); if (value_unsigned == x) { return token_type::value_unsigned; } } } else if (number_type == token_type::value_integer) { const auto x = std::strtoll(token_buffer.data(), &endptr, 10); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); if (errno == 0) { value_integer = static_cast<number_integer_t>(x); if (value_integer == x) { return token_type::value_integer; } } } // this code is reached if we parse a floating-point number or if an // integer conversion above failed strtof(value_float, token_buffer.data(), &endptr); // we checked the number format before JSON_ASSERT(endptr == token_buffer.data() + token_buffer.size()); return token_type::value_float; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_number(): pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx callq 0x30370 movl 0x14(%rbx), %eax movl $0x5, %ebp leal -0x31(%rax), %ecx cmpl $0x9, %ecx jae 0x30020 leaq 0x50(%rbx), %r14 movsbl %al, %esi movq %r14, %rdi callq 0x22400 movq %rbx, %rdi callq 0x22956 leal -0x30(%rax), %ecx cmpl $0xa, %ecx jae 0x2ffcf movsbl 0x14(%rbx), %esi jmp 0x2ffb1 cmpl $0x2e, %eax je 0x300fc cmpl $0x45, %eax je 0x2ffe6 cmpl $0x65, %eax jne 0x30131 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x22400 movq %rbx, %rdi callq 0x22956 leal -0x30(%rax), %ecx cmpl $0xa, %ecx jb 0x30065 cmpl $0x2d, %eax je 0x301cc cmpl $0x2b, %eax je 0x301cc leaq 0xed358(%rip), %rax # 0x11d373 jmp 0x30126 cmpl $0x30, %eax je 0x300c6 cmpl $0x2d, %eax jne 0x3003c leaq 0x50(%rbx), %rdi movl $0x2d, %esi callq 0x22400 movq %rbx, %rdi callq 0x22956 leal -0x31(%rax), %ecx cmpl $0x9, %ecx jb 0x301ab cmpl $0x30, %eax je 0x30233 leaq 0xed2c1(%rip), %rax # 0x11d321 jmp 0x30126 leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x22400 movq %rbx, %rdi callq 0x22956 addl $-0x30, %eax cmpl $0x9, %eax ja 0x300a5 leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x22400 movq %rbx, %rdi callq 0x22956 addl $-0x30, %eax cmpl $0xa, %eax jb 0x30089 movq %rbx, %rdi callq 0x229be movq $0x0, 0x8(%rsp) callq 0x22150 movl $0x0, (%rax) jmp 0x30187 leaq 0x50(%rbx), %rdi movl $0x30, %esi callq 0x22400 movl $0x5, %ebp movq %rbx, %rdi callq 0x22956 cmpl $0x65, %eax je 0x301b8 cmpl $0x45, %eax je 0x301b8 cmpl $0x2e, %eax jne 0x30131 leaq 0x50(%rbx), %r14 movsbl 0x90(%rbx), %esi movq %r14, %rdi callq 0x22400 movq %rbx, %rdi callq 0x22956 addl $-0x30, %eax cmpl $0x9, %eax jbe 0x301fc leaq 0xed224(%rip), %rax # 0x11d34a movq %rax, 0x70(%rbx) movl $0xe, %eax jmp 0x301a2 movq %rbx, %rdi callq 0x229be movq $0x0, 0x8(%rsp) callq 0x22150 movq %rax, %r14 movl $0x0, (%rax) movq 0x50(%rbx), %rdi leaq 0x8(%rsp), %rsi movl $0xa, %edx cmpl $0x5, %ebp jne 0x3017c callq 0x21e30 cmpl $0x0, (%r14) jne 0x30187 movq %rax, 0x80(%rbx) movl $0x5, %eax jmp 0x301a2 callq 0x21d90 cmpl $0x0, (%r14) je 0x301c1 movq 0x50(%rbx), %rdi leaq 0x8(%rsp), %rsi callq 0x224c0 movsd %xmm0, 0x88(%rbx) movl $0x7, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq movl 0x14(%rbx), %eax movl $0x6, %ebp jmp 0x2ffaa leaq 0x50(%rbx), %r14 jmp 0x2ffe6 movq %rax, 0x78(%rbx) movl $0x6, %eax jmp 0x301a2 movsbl 0x14(%rbx), %esi leaq 0x50(%rbx), %r14 movq %r14, %rdi callq 0x22400 movq %rbx, %rdi callq 0x22956 addl $-0x30, %eax cmpl $0xa, %eax jb 0x30069 leaq 0xed1b7(%rip), %rax # 0x11d3ae jmp 0x30126 leaq 0x50(%rbx), %r14 movsbl 0x14(%rbx), %esi movq %r14, %rdi callq 0x22400 movq %rbx, %rdi callq 0x22956 leal -0x30(%rax), %ecx cmpl $0xa, %ecx jb 0x30200 cmpl $0x65, %eax je 0x2ffe6 cmpl $0x45, %eax je 0x2ffe6 jmp 0x300a5 movsbl 0x14(%rbx), %esi leaq 0x50(%rbx), %rdi callq 0x22400 movl $0x6, %ebp jmp 0x300d9
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE11scan_numberEv: push rbp push r14 push rbx sub rsp, 10h mov rbx, rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE5resetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::reset(void) mov eax, [rbx+14h] mov ebp, 5 lea ecx, [rax-31h] cmp ecx, 9 jnb short loc_30020 loc_2FFAA: lea r14, [rbx+50h] movsx esi, al loc_2FFB1: mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jnb short loc_2FFCF movsx esi, byte ptr [rbx+14h] jmp short loc_2FFB1 loc_2FFCF: cmp eax, 2Eh ; '.' jz loc_300FC cmp eax, 45h ; 'E' jz short loc_2FFE6 cmp eax, 65h ; 'e' jnz loc_30131 loc_2FFE6: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jb short loc_30065 cmp eax, 2Dh ; '-' jz loc_301CC cmp eax, 2Bh ; '+' jz loc_301CC lea rax, aInvalidNumberE; "invalid number; expected '+', '-', or d"... jmp loc_30126 loc_30020: cmp eax, 30h ; '0' jz loc_300C6 cmp eax, 2Dh ; '-' jnz short loc_3003C lea rdi, [rbx+50h] mov esi, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_3003C: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) lea ecx, [rax-31h] cmp ecx, 9 jb loc_301AB cmp eax, 30h ; '0' jz loc_30233 lea rax, aInvalidNumberE_0; "invalid number; expected digit after '-"... jmp loc_30126 loc_30065: lea r14, [rbx+50h] loc_30069: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) add eax, 0FFFFFFD0h cmp eax, 9 ja short loc_300A5 lea r14, [rbx+50h] loc_30089: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) add eax, 0FFFFFFD0h cmp eax, 0Ah jb short loc_30089 loc_300A5: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget(void) mov [rsp+28h+var_20], 0 call ___errno_location mov dword ptr [rax], 0 jmp loc_30187 loc_300C6: lea rdi, [rbx+50h] mov esi, 30h ; '0' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov ebp, 5 loc_300D9: mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) cmp eax, 65h ; 'e' jz loc_301B8 cmp eax, 45h ; 'E' jz loc_301B8 cmp eax, 2Eh ; '.' jnz short loc_30131 lea r14, [rbx+50h] loc_300FC: movsx esi, byte ptr [rbx+90h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) add eax, 0FFFFFFD0h cmp eax, 9 jbe loc_301FC lea rax, aInvalidNumberE_1; "invalid number; expected digit after '."... loc_30126: mov [rbx+70h], rax mov eax, 0Eh jmp short loc_301A2 loc_30131: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE5ungetEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget(void) mov [rsp+28h+var_20], 0 call ___errno_location mov r14, rax mov dword ptr [rax], 0 mov rdi, [rbx+50h] lea rsi, [rsp+28h+var_20] mov edx, 0Ah cmp ebp, 5 jnz short loc_3017C call _strtoull cmp dword ptr [r14], 0 jnz short loc_30187 mov [rbx+80h], rax mov eax, 5 jmp short loc_301A2 loc_3017C: call _strtoll cmp dword ptr [r14], 0 jz short loc_301C1 loc_30187: mov rdi, [rbx+50h] lea rsi, [rsp+28h+var_20] call _strtod movsd qword ptr [rbx+88h], xmm0 mov eax, 7 loc_301A2: add rsp, 10h pop rbx pop r14 pop rbp retn loc_301AB: mov eax, [rbx+14h] mov ebp, 6 jmp loc_2FFAA loc_301B8: lea r14, [rbx+50h] jmp loc_2FFE6 loc_301C1: mov [rbx+78h], rax mov eax, 6 jmp short loc_301A2 loc_301CC: movsx esi, byte ptr [rbx+14h] lea r14, [rbx+50h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) add eax, 0FFFFFFD0h cmp eax, 0Ah jb loc_30069 lea rax, aInvalidNumberE_2; "invalid number; expected digit after ex"... jmp loc_30126 loc_301FC: lea r14, [rbx+50h] loc_30200: movsx esi, byte ptr [rbx+14h] mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov rdi, rbx; this call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_20input_stream_adapterEE3getEv; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(void) lea ecx, [rax-30h] cmp ecx, 0Ah jb short loc_30200 cmp eax, 65h ; 'e' jz loc_2FFE6 cmp eax, 45h ; 'E' jz loc_2FFE6 jmp loc_300A5 loc_30233: movsx esi, byte ptr [rbx+14h] lea rdi, [rbx+50h] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov ebp, 6 jmp loc_300D9
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_number( __m128i *this) { long long v2; // rdx long long v3; // r8 long long v4; // r9 __int32 v5; // eax int v6; // ebp long long v7; // rcx __m128i *v8; // r14 long long i; // rsi int v10; // eax int v11; // eax long long v12; // rdx long long v13; // r8 long long v14; // r9 long long v15; // rcx const char *v16; // rax int v17; // eax __m128i *v18; // r14 long long v19; // rdx long long v20; // rcx long long v21; // r8 long long v22; // r9 int v23; // eax _DWORD *v25; // r14 long long v26; // rdi long long v27; // rax long long v28; // rax int v29; // eax _QWORD v30[4]; // [rsp+8h] [rbp-20h] BYREF nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::reset(); v5 = this[1].m128i_i32[1]; v6 = 5; v7 = (unsigned int)(v5 - 49); if ( (unsigned int)v7 >= 9 ) { if ( v5 == 48 ) { std::string::push_back(&this[5], 48LL, v2, v7, v3, v4); v6 = 5; } else { if ( v5 == 45 ) std::string::push_back(&this[5], 45LL, v2, v7, v3, v4); v17 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); v7 = (unsigned int)(v17 - 49); if ( (unsigned int)v7 < 9 ) { v5 = this[1].m128i_i32[1]; v6 = 6; goto LABEL_2; } if ( v17 != 48 ) { v16 = "invalid number; expected digit after '-'"; goto LABEL_29; } std::string::push_back(&this[5], (unsigned int)this[1].m128i_i8[4], v2, v7, v3, v4); v6 = 6; } v23 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); if ( v23 == 101 || v23 == 69 ) { v8 = this + 5; goto LABEL_8; } if ( v23 != 46 ) goto LABEL_30; v8 = this + 5; LABEL_27: std::string::push_back(v8, (unsigned int)this[9].m128i_i8[0], v2, v7, v3, v4); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this) - 48 > 9 ) { v16 = "invalid number; expected digit after '.'"; goto LABEL_29; } v8 = this + 5; do { std::string::push_back(&this[5], (unsigned int)this[1].m128i_i8[4], v2, v7, v3, v4); v29 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); v7 = (unsigned int)(v29 - 48); } while ( (unsigned int)v7 < 0xA ); if ( v29 != 101 && v29 != 69 ) { LABEL_21: nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget((long long)this); v30[0] = 0LL; *(_DWORD *)__errno_location() = 0; goto LABEL_34; } LABEL_8: std::string::push_back(v8, (unsigned int)this[1].m128i_i8[4], v2, v7, v3, v4); v11 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); v15 = (unsigned int)(v11 - 48); if ( (unsigned int)v15 < 0xA ) { v18 = this + 5; } else { if ( v11 != 45 && v11 != 43 ) { v16 = "invalid number; expected '+', '-', or digit after exponent"; LABEL_29: this[7].m128i_i64[0] = (long long)v16; return 14LL; } v18 = this + 5; std::string::push_back(&this[5], (unsigned int)this[1].m128i_i8[4], v12, v15, v13, v14); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this) - 48 >= 0xA ) { v16 = "invalid number; expected digit after exponent sign"; goto LABEL_29; } } std::string::push_back(v18, (unsigned int)this[1].m128i_i8[4], v12, v15, v13, v14); if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this) - 48 <= 9 ) { do std::string::push_back(&this[5], (unsigned int)this[1].m128i_i8[4], v19, v20, v21, v22); while ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this) - 48 < 0xA ); } goto LABEL_21; } LABEL_2: v8 = this + 5; for ( i = (unsigned int)(char)v5; ; i = (unsigned int)this[1].m128i_i8[4] ) { std::string::push_back(&this[5], i, v2, v7, v3, v4); v10 = nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::get(this); v7 = (unsigned int)(v10 - 48); if ( (unsigned int)v7 >= 0xA ) break; } if ( v10 == 46 ) goto LABEL_27; if ( v10 == 69 || v10 == 101 ) goto LABEL_8; LABEL_30: nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::unget((long long)this); v30[0] = 0LL; v25 = (_DWORD *)__errno_location(); *v25 = 0; v26 = this[5].m128i_i64[0]; if ( v6 == 5 ) { v27 = strtoull(v26, v30, 10LL); if ( !*v25 ) { this[8].m128i_i64[0] = v27; return 5LL; } goto LABEL_34; } v28 = strtoll(v26, v30, 10LL); if ( *v25 ) { LABEL_34: *(double *)&this[8].m128i_i64[1] = strtod(this[5].m128i_i64[0], v30); return 7LL; } this[7].m128i_i64[1] = v28; return 6LL; }
scan_number: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDI CALL 0x00130370 MOV EAX,dword ptr [RBX + 0x14] MOV EBP,0x5 LEA ECX,[RAX + -0x31] CMP ECX,0x9 JNC 0x00130020 LAB_0012ffaa: LEA R14,[RBX + 0x50] MOVSX ESI,AL LAB_0012ffb1: MOV RDI,R14 CALL 0x00122400 MOV RDI,RBX CALL 0x00122956 LEA ECX,[RAX + -0x30] CMP ECX,0xa JNC 0x0012ffcf MOVSX ESI,byte ptr [RBX + 0x14] JMP 0x0012ffb1 LAB_0012ffcf: CMP EAX,0x2e JZ 0x001300fc CMP EAX,0x45 JZ 0x0012ffe6 CMP EAX,0x65 JNZ 0x00130131 LAB_0012ffe6: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x00122400 MOV RDI,RBX CALL 0x00122956 LEA ECX,[RAX + -0x30] CMP ECX,0xa JC 0x00130065 CMP EAX,0x2d JZ 0x001301cc CMP EAX,0x2b JZ 0x001301cc LEA RAX,[0x21d373] JMP 0x00130126 LAB_00130020: CMP EAX,0x30 JZ 0x001300c6 CMP EAX,0x2d JNZ 0x0013003c LEA RDI,[RBX + 0x50] MOV ESI,0x2d CALL 0x00122400 LAB_0013003c: MOV RDI,RBX CALL 0x00122956 LEA ECX,[RAX + -0x31] CMP ECX,0x9 JC 0x001301ab CMP EAX,0x30 JZ 0x00130233 LEA RAX,[0x21d321] JMP 0x00130126 LAB_00130065: LEA R14,[RBX + 0x50] LAB_00130069: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x00122400 MOV RDI,RBX CALL 0x00122956 ADD EAX,-0x30 CMP EAX,0x9 JA 0x001300a5 LEA R14,[RBX + 0x50] LAB_00130089: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x00122400 MOV RDI,RBX CALL 0x00122956 ADD EAX,-0x30 CMP EAX,0xa JC 0x00130089 LAB_001300a5: MOV RDI,RBX CALL 0x001229be MOV qword ptr [RSP + 0x8],0x0 CALL 0x00122150 MOV dword ptr [RAX],0x0 JMP 0x00130187 LAB_001300c6: LEA RDI,[RBX + 0x50] MOV ESI,0x30 CALL 0x00122400 MOV EBP,0x5 LAB_001300d9: MOV RDI,RBX CALL 0x00122956 CMP EAX,0x65 JZ 0x001301b8 CMP EAX,0x45 JZ 0x001301b8 CMP EAX,0x2e JNZ 0x00130131 LEA R14,[RBX + 0x50] LAB_001300fc: MOVSX ESI,byte ptr [RBX + 0x90] MOV RDI,R14 CALL 0x00122400 MOV RDI,RBX CALL 0x00122956 ADD EAX,-0x30 CMP EAX,0x9 JBE 0x001301fc LEA RAX,[0x21d34a] LAB_00130126: MOV qword ptr [RBX + 0x70],RAX MOV EAX,0xe JMP 0x001301a2 LAB_00130131: MOV RDI,RBX CALL 0x001229be MOV qword ptr [RSP + 0x8],0x0 CALL 0x00122150 MOV R14,RAX MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RBX + 0x50] LEA RSI,[RSP + 0x8] MOV EDX,0xa CMP EBP,0x5 JNZ 0x0013017c CALL 0x00121e30 CMP dword ptr [R14],0x0 JNZ 0x00130187 MOV qword ptr [RBX + 0x80],RAX MOV EAX,0x5 JMP 0x001301a2 LAB_0013017c: CALL 0x00121d90 CMP dword ptr [R14],0x0 JZ 0x001301c1 LAB_00130187: MOV RDI,qword ptr [RBX + 0x50] LEA RSI,[RSP + 0x8] CALL 0x001224c0 MOVSD qword ptr [RBX + 0x88],XMM0 MOV EAX,0x7 LAB_001301a2: ADD RSP,0x10 POP RBX POP R14 POP RBP RET LAB_001301ab: MOV EAX,dword ptr [RBX + 0x14] MOV EBP,0x6 JMP 0x0012ffaa LAB_001301b8: LEA R14,[RBX + 0x50] JMP 0x0012ffe6 LAB_001301c1: MOV qword ptr [RBX + 0x78],RAX MOV EAX,0x6 JMP 0x001301a2 LAB_001301cc: MOVSX ESI,byte ptr [RBX + 0x14] LEA R14,[RBX + 0x50] MOV RDI,R14 CALL 0x00122400 MOV RDI,RBX CALL 0x00122956 ADD EAX,-0x30 CMP EAX,0xa JC 0x00130069 LEA RAX,[0x21d3ae] JMP 0x00130126 LAB_001301fc: LEA R14,[RBX + 0x50] LAB_00130200: MOVSX ESI,byte ptr [RBX + 0x14] MOV RDI,R14 CALL 0x00122400 MOV RDI,RBX CALL 0x00122956 LEA ECX,[RAX + -0x30] CMP ECX,0xa JC 0x00130200 CMP EAX,0x65 JZ 0x0012ffe6 CMP EAX,0x45 JZ 0x0012ffe6 JMP 0x001300a5 LAB_00130233: MOVSX ESI,byte ptr [RBX + 0x14] LEA RDI,[RBX + 0x50] CALL 0x00122400 MOV EBP,0x6 JMP 0x001300d9
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::scan_number() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> ::scan_number(lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::input_stream_adapter> *this) { char cVar1; int iVar2; char *pcVar3; int *piVar4; ulonglong uVar5; longlong lVar6; int iVar7; double dVar8; char *local_20; reset(this); iVar2 = *(int *)(this + 0x14); iVar7 = 5; cVar1 = (char)this; if (iVar2 - 0x31U < 9) { LAB_0012ffaa: do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); } while (iVar2 - 0x30U < 10); if (iVar2 != 0x2e) { if ((iVar2 != 0x45) && (iVar2 != 0x65)) { LAB_00130131: unget(this); local_20 = (char *)0x0; piVar4 = __errno_location(); *piVar4 = 0; if (iVar7 == 5) { uVar5 = strtoull(*(char **)(this + 0x50),&local_20,10); if (*piVar4 == 0) { *(ulonglong *)(this + 0x80) = uVar5; return 5; } } else { lVar6 = strtoll(*(char **)(this + 0x50),&local_20,10); if (*piVar4 == 0) { *(longlong *)(this + 0x78) = lVar6; return 6; } } goto LAB_00130187; } goto LAB_0012ffe6; } LAB_001300fc: std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); if (9 < iVar2 - 0x30U) { pcVar3 = "invalid number; expected digit after \'.\'"; goto LAB_00130126; } do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); } while (iVar2 - 0x30U < 10); if ((iVar2 == 0x65) || (iVar2 == 0x45)) goto LAB_0012ffe6; } else { if (iVar2 == 0x30) { std::__cxx11::string::push_back(cVar1 + 'P'); iVar7 = 5; } else { if (iVar2 == 0x2d) { std::__cxx11::string::push_back(cVar1 + 'P'); } iVar2 = get(this); if (iVar2 - 0x31U < 9) { iVar7 = 6; goto LAB_0012ffaa; } if (iVar2 != 0x30) { pcVar3 = "invalid number; expected digit after \'-\'"; goto LAB_00130126; } std::__cxx11::string::push_back(cVar1 + 'P'); iVar7 = 6; } iVar2 = get(this); if ((iVar2 != 0x65) && (iVar2 != 0x45)) { if (iVar2 != 0x2e) goto LAB_00130131; goto LAB_001300fc; } LAB_0012ffe6: std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); if (9 < iVar2 - 0x30U) { if ((iVar2 != 0x2d) && (iVar2 != 0x2b)) { pcVar3 = "invalid number; expected \'+\', \'-\', or digit after exponent"; LAB_00130126: *(char **)(this + 0x70) = pcVar3; return 0xe; } std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); if (9 < iVar2 - 0x30U) { pcVar3 = "invalid number; expected digit after exponent sign"; goto LAB_00130126; } } std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); if (iVar2 - 0x30U < 10) { do { std::__cxx11::string::push_back(cVar1 + 'P'); iVar2 = get(this); } while (iVar2 - 0x30U < 10); } } unget(this); local_20 = (char *)0x0; piVar4 = __errno_location(); *piVar4 = 0; LAB_00130187: dVar8 = strtod(*(char **)(this + 0x50),&local_20); *(double *)(this + 0x88) = dVar8; return 7; }
53,536
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&)
monkey531[P]llama/common/minja.hpp
static void destructuring_assign(const std::vector<std::string> & var_names, const std::shared_ptr<Context> & context, Value& item) { if (var_names.size() == 1) { Value name(var_names[0]); context->set(name, item); } else { if (!item.is_array() || item.size() != var_names.size()) { throw std::runtime_error("Mismatched number of variables and items in destructuring assignment"); } for (size_t i = 0; i < var_names.size(); ++i) { context->set(var_names[i], item.at(i)); } } }
O0
cpp
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&): subq $0x108, %rsp # imm = 0x108 movq %rdi, 0x100(%rsp) movq %rsi, 0xf8(%rsp) movq %rdx, 0xf0(%rsp) movq 0x100(%rsp), %rdi callq 0x62d10 cmpq $0x1, %rax jne 0xf80fc movq 0x100(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xf9fb0 movq %rax, %rsi leaq 0xa0(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x11c2f0 movq 0xf8(%rsp), %rdi callq 0x12dc80 movq 0x30(%rsp), %rsi movq %rax, %rdi movq 0xf0(%rsp), %rdx movq (%rdi), %rax movq 0x28(%rax), %rax callq *%rax jmp 0xf80c4 leaq 0xa0(%rsp), %rdi callq 0x114b80 jmp 0xf827f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) leaq 0xa0(%rsp), %rdi callq 0x114b80 jmp 0xf8287 movq 0xf0(%rsp), %rdi callq 0x116bf0 testb $0x1, %al jne 0xf810f jmp 0xf813b movq 0xf0(%rsp), %rdi callq 0x12d900 movq %rax, 0x28(%rsp) movq 0x100(%rsp), %rdi callq 0x62d10 movq %rax, %rcx movq 0x28(%rsp), %rax cmpq %rcx, %rax je 0xf8199 movl $0x10, %edi callq 0x59660 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x20(%rsp) leaq 0x11b7d8(%rip), %rsi # 0x21392f callq 0x59450 jmp 0xf815e movq 0x20(%rsp), %rdi movq 0x1abe46(%rip), %rsi # 0x2a3fb0 movq 0x1abe07(%rip), %rdx # 0x2a3f78 callq 0x59ad0 movq 0x20(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) callq 0x59f20 jmp 0xf8287 movq $0x0, 0x88(%rsp) movq 0x88(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x100(%rsp), %rdi callq 0x62d10 movq %rax, %rcx movq 0x18(%rsp), %rax cmpq %rcx, %rax jae 0xf827d movq 0xf8(%rsp), %rdi callq 0x12dc80 movq %rax, 0x8(%rsp) movq 0x100(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0xf9fb0 movq %rax, %rsi leaq 0x38(%rsp), %rdi callq 0x11c2f0 movq 0xf0(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0x12dab0 movq %rax, 0x10(%rsp) jmp 0xf8220 movq 0x10(%rsp), %rdx movq 0x8(%rsp), %rdi movq (%rdi), %rax movq 0x28(%rax), %rax leaq 0x38(%rsp), %rsi callq *%rax jmp 0xf823a leaq 0x38(%rsp), %rdi callq 0x114b80 movq 0x88(%rsp), %rax addq $0x1, %rax movq %rax, 0x88(%rsp) jmp 0xf81a5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x98(%rsp) movl %eax, 0x94(%rsp) leaq 0x38(%rsp), %rdi callq 0x114b80 jmp 0xf8287 jmp 0xf827f addq $0x108, %rsp # imm = 0x108 retq movq 0x98(%rsp), %rdi callq 0x59b90 nopw %cs:(%rax,%rax)
_ZN5minjaL20destructuring_assignERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt10shared_ptrINS_7ContextEERNS_5ValueE: sub rsp, 108h mov [rsp+108h+var_8], rdi mov [rsp+108h+var_10], rsi mov [rsp+108h+var_18], rdx mov rdi, [rsp+108h+var_8] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) cmp rax, 1 jnz loc_F80FC mov rdi, [rsp+108h+var_8] xor eax, eax mov esi, eax call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rsi, rax lea rdi, [rsp+108h+var_68] mov [rsp+108h+var_D8], rdi call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rsp+108h+var_10] call _ZNKSt19__shared_ptr_accessIN5minja7ContextELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rsi, [rsp+108h+var_D8] mov rdi, rax mov rdx, [rsp+108h+var_18] mov rax, [rdi] mov rax, [rax+28h] call rax jmp short $+2 loc_F80C4: lea rdi, [rsp+108h+var_68]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp loc_F827F mov rcx, rax mov eax, edx mov [rsp+108h+var_70], rcx mov [rsp+108h+var_74], eax lea rdi, [rsp+108h+var_68]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp loc_F8287 loc_F80FC: mov rdi, [rsp+108h+var_18]; this call _ZNK5minja5Value8is_arrayEv; minja::Value::is_array(void) test al, 1 jnz short loc_F810F jmp short loc_F813B loc_F810F: mov rdi, [rsp+108h+var_18]; this call _ZNK5minja5Value4sizeEv; minja::Value::size(void) mov [rsp+108h+var_E0], rax mov rdi, [rsp+108h+var_8] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) mov rcx, rax mov rax, [rsp+108h+var_E0] cmp rax, rcx jz short loc_F8199 loc_F813B: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+108h+var_E8], rax lea rsi, aMismatchedNumb; "Mismatched number of variables and item"... call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short $+2 loc_F815E: mov rdi, [rsp+108h+var_E8]; void * mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) call ___cxa_throw mov rdi, [rsp+108h+var_E8]; void * mov rcx, rax mov eax, edx mov [rsp+108h+var_70], rcx mov [rsp+108h+var_74], eax call ___cxa_free_exception jmp loc_F8287 loc_F8199: mov [rsp+108h+var_80], 0 loc_F81A5: mov rax, [rsp+108h+var_80] mov [rsp+108h+var_F0], rax mov rdi, [rsp+108h+var_8] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) mov rcx, rax mov rax, [rsp+108h+var_F0] cmp rax, rcx jnb loc_F827D mov rdi, [rsp+108h+var_10] call _ZNKSt19__shared_ptr_accessIN5minja7ContextELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov [rsp+108h+var_100], rax mov rdi, [rsp+108h+var_8] mov rsi, [rsp+108h+var_80] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rsi, rax lea rdi, [rsp+108h+var_D0] call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rsp+108h+var_18]; this mov rsi, [rsp+108h+var_80]; unsigned __int64 call _ZN5minja5Value2atEm; minja::Value::at(ulong) mov [rsp+108h+var_F8], rax jmp short $+2 loc_F8220: mov rdx, [rsp+108h+var_F8] mov rdi, [rsp+108h+var_100] mov rax, [rdi] mov rax, [rax+28h] lea rsi, [rsp+108h+var_D0] call rax jmp short $+2 loc_F823A: lea rdi, [rsp+108h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rax, [rsp+108h+var_80] add rax, 1 mov [rsp+108h+var_80], rax jmp loc_F81A5 mov rcx, rax mov eax, edx mov [rsp+108h+var_70], rcx mov [rsp+108h+var_74], eax lea rdi, [rsp+108h+var_D0]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() jmp short loc_F8287 loc_F827D: jmp short $+2 loc_F827F: add rsp, 108h retn loc_F8287: mov rdi, [rsp+108h+var_70] call __Unwind_Resume
void minja::destructuring_assign(_QWORD *a1, long long a2, minja::Value *a3) { int v3; // eax int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d long long v8; // rax int v9; // eax int v10; // edx int v11; // ecx int v12; // r8d int v13; // r9d long long v14; // [rsp+8h] [rbp-100h] long long v15; // [rsp+10h] [rbp-F8h] unsigned long long v16; // [rsp+18h] [rbp-F0h] std::runtime_error *exception; // [rsp+20h] [rbp-E8h] long long v18; // [rsp+28h] [rbp-E0h] _BYTE v19[80]; // [rsp+38h] [rbp-D0h] BYREF unsigned long long i; // [rsp+88h] [rbp-80h] _BYTE v21[80]; // [rsp+A0h] [rbp-68h] BYREF minja::Value *v22; // [rsp+F0h] [rbp-18h] long long v23; // [rsp+F8h] [rbp-10h] _QWORD *v24; // [rsp+100h] [rbp-8h] v24 = a1; v23 = a2; v22 = a3; if ( std::vector<std::string>::size(a1) == 1 ) { v3 = std::vector<std::string>::operator[](v24, 0LL); minja::Value::Value((unsigned int)v21, v3, v4, v5, v6, v7); v8 = std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v23); (*(void ( **)(long long, _BYTE *, minja::Value *))(*(_QWORD *)v8 + 40LL))(v8, v21, v22); minja::Value::~Value((minja::Value *)v21); } else { if ( (minja::Value::is_array(v22) & 1) == 0 || (v18 = minja::Value::size(v22), v18 != std::vector<std::string>::size(v24)) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error( exception, "Mismatched number of variables and items in destructuring assignment"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } for ( i = 0LL; ; ++i ) { v16 = i; if ( v16 >= std::vector<std::string>::size(v24) ) break; v14 = std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v23); v9 = std::vector<std::string>::operator[](v24, i); minja::Value::Value((unsigned int)v19, v9, v10, v11, v12, v13); v15 = minja::Value::at(v22, i); (*(void ( **)(long long, _BYTE *, long long))(*(_QWORD *)v14 + 40LL))(v14, v19, v15); minja::Value::~Value((minja::Value *)v19); } } }
destructuring_assign: SUB RSP,0x108 MOV qword ptr [RSP + 0x100],RDI MOV qword ptr [RSP + 0xf8],RSI MOV qword ptr [RSP + 0xf0],RDX MOV RDI,qword ptr [RSP + 0x100] CALL 0x00162d10 CMP RAX,0x1 JNZ 0x001f80fc MOV RDI,qword ptr [RSP + 0x100] XOR EAX,EAX MOV ESI,EAX CALL 0x001f9fb0 MOV RSI,RAX LEA RDI,[RSP + 0xa0] MOV qword ptr [RSP + 0x30],RDI CALL 0x0021c2f0 MOV RDI,qword ptr [RSP + 0xf8] CALL 0x0022dc80 MOV RSI,qword ptr [RSP + 0x30] MOV RDI,RAX MOV RDX,qword ptr [RSP + 0xf0] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x28] LAB_001f80c0: CALL RAX LAB_001f80c2: JMP 0x001f80c4 LAB_001f80c4: LEA RDI,[RSP + 0xa0] CALL 0x00214b80 JMP 0x001f827f LAB_001f80fc: MOV RDI,qword ptr [RSP + 0xf0] CALL 0x00216bf0 TEST AL,0x1 JNZ 0x001f810f JMP 0x001f813b LAB_001f810f: MOV RDI,qword ptr [RSP + 0xf0] CALL 0x0022d900 MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x100] CALL 0x00162d10 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x28] CMP RAX,RCX JZ 0x001f8199 LAB_001f813b: MOV EDI,0x10 CALL 0x00159660 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x20],RAX LAB_001f8150: LEA RSI,[0x31392f] CALL 0x00159450 LAB_001f815c: JMP 0x001f815e LAB_001f815e: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [0x003a3fb0] MOV RDX,qword ptr [0x003a3f78] CALL 0x00159ad0 LAB_001f8199: MOV qword ptr [RSP + 0x88],0x0 LAB_001f81a5: MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x100] CALL 0x00162d10 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x18] CMP RAX,RCX JNC 0x001f827d MOV RDI,qword ptr [RSP + 0xf8] CALL 0x0022dc80 MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0x88] CALL 0x001f9fb0 MOV RSI,RAX LEA RDI,[RSP + 0x38] CALL 0x0021c2f0 MOV RDI,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RSP + 0x88] LAB_001f8214: CALL 0x0022dab0 MOV qword ptr [RSP + 0x10],RAX JMP 0x001f8220 LAB_001f8220: MOV RDX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x28] LEA RSI,[RSP + 0x38] CALL RAX LAB_001f8238: JMP 0x001f823a LAB_001f823a: LEA RDI,[RSP + 0x38] CALL 0x00214b80 MOV RAX,qword ptr [RSP + 0x88] ADD RAX,0x1 MOV qword ptr [RSP + 0x88],RAX JMP 0x001f81a5 LAB_001f827d: JMP 0x001f827f LAB_001f827f: ADD RSP,0x108 RET
/* minja::destructuring_assign(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Context> const&, minja::Value&) */ void minja::destructuring_assign(vector *param_1,shared_ptr *param_2,Value *param_3) { long lVar1; string *psVar2; long *plVar3; ulong uVar4; long lVar5; runtime_error *this; ulong uVar6; int8 uVar7; Value local_d0 [80]; ulong local_80; Value local_68 [80]; Value *local_18; shared_ptr *local_10; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_8; local_18 = param_3; local_10 = param_2; local_8 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1; lVar1 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1); if (lVar1 == 1) { psVar2 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] (local_8,0); Value::Value(local_68,psVar2); plVar3 = (long *)std::__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false> *)local_10); /* try { // try from 001f80c0 to 001f80c1 has its CatchHandler @ 001f80d6 */ (**(code **)(*plVar3 + 0x28))(plVar3,local_68,local_18); Value::~Value(local_68); return; } uVar4 = Value::is_array(local_18); if ((uVar4 & 1) != 0) { lVar1 = Value::size(local_18); lVar5 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size(local_8); if (lVar1 == lVar5) { for (local_80 = 0; uVar4 = local_80, uVar6 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size (local_8), uVar4 < uVar6; local_80 = local_80 + 1) { plVar3 = (long *)std:: __shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<minja::Context,(__gnu_cxx::_Lock_policy)2,false,false> *)local_10); psVar2 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] (local_8,local_80); Value::Value(local_d0,psVar2); /* try { // try from 001f8214 to 001f8237 has its CatchHandler @ 001f825d */ uVar7 = Value::at(local_18,local_80); (**(code **)(*plVar3 + 0x28))(plVar3,local_d0,uVar7); Value::~Value(local_d0); } return; } } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001f8150 to 001f815b has its CatchHandler @ 001f8176 */ std::runtime_error::runtime_error (this,"Mismatched number of variables and items in destructuring assignment"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_003a3fb0,PTR__runtime_error_003a3f78); }
53,537
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&)
monkey531[P]llama/common/minja.hpp
static void destructuring_assign(const std::vector<std::string> & var_names, const std::shared_ptr<Context> & context, Value& item) { if (var_names.size() == 1) { Value name(var_names[0]); context->set(name, item); } else { if (!item.is_array() || item.size() != var_names.size()) { throw std::runtime_error("Mismatched number of variables and items in destructuring assignment"); } for (size_t i = 0; i < var_names.size(); ++i) { context->set(var_names[i], item.at(i)); } } }
O2
cpp
minja::destructuring_assign(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::shared_ptr<minja::Context> const&, minja::Value&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %rbx movq %rsi, %rbp movq (%rdi), %rsi movq 0x8(%rdi), %rax subq %rsi, %rax cmpq $0x20, %rax jne 0x589be leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x6680e movq (%rbp), %rdi movq (%rdi), %rax movq %r15, %rsi movq %rbx, %rdx callq *0x28(%rax) leaq 0x8(%rsp), %rdi callq 0x63830 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpq $0x0, 0x10(%rbx) je 0x58a4e movq %rdi, %r15 movq %rbx, %rdi callq 0x6b7bc movq (%r15), %rsi movq 0x8(%r15), %rcx movq %rcx, %rdx subq %rsi, %rdx sarq $0x5, %rdx cmpq %rdx, %rax jne 0x58a4e movq %rbx, (%rsp) xorl %r14d, %r14d leaq 0x8(%rsp), %r12 xorl %r13d, %r13d subq %rsi, %rcx sarq $0x5, %rcx cmpq %rcx, %r13 jae 0x589af movq %rbp, %rbx movq (%rbp), %rbp addq %r14, %rsi movq %r12, %rdi callq 0x6680e movq (%rsp), %rdi movq %r13, %rsi callq 0x6b8c4 movq (%rbp), %rcx movq %rbp, %rdi movq %r12, %rsi movq %rax, %rdx callq *0x28(%rcx) movq %r12, %rdi callq 0x63830 incq %r13 movq (%r15), %rsi movq 0x8(%r15), %rcx addq $0x20, %r14 movq %rbx, %rbp jmp 0x589f9 pushq $0x10 popq %rdi callq 0x23450 movq %rax, %r14 leaq 0x5c4d8(%rip), %rsi # 0xb4f38 movq %rax, %rdi callq 0x23310 movq 0xa5581(%rip), %rsi # 0xfdff0 movq 0xa54e2(%rip), %rdx # 0xfdf58 movq %r14, %rdi callq 0x23ea0 movq %rax, %rbx movq %r14, %rdi callq 0x23670 jmp 0x58a9a jmp 0x58a8d movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x63830 movq %rbx, %rdi callq 0x23f20
_ZN5minjaL20destructuring_assignERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EERKSt10shared_ptrINS_7ContextEERNS_5ValueE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, rdx mov rbp, rsi mov rsi, [rdi] mov rax, [rdi+8] sub rax, rsi cmp rax, 20h ; ' ' jnz short loc_589BE lea r15, [rsp+88h+var_80] mov rdi, r15 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rbp+0] mov rax, [rdi] mov rsi, r15 mov rdx, rbx call qword ptr [rax+28h] lea rdi, [rsp+88h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_589AF: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_589BE: cmp qword ptr [rbx+10h], 0 jz loc_58A4E mov r15, rdi mov rdi, rbx; this call _ZNK5minja5Value4sizeEv; minja::Value::size(void) mov rsi, [r15] mov rcx, [r15+8] mov rdx, rcx sub rdx, rsi sar rdx, 5 cmp rax, rdx jnz short loc_58A4E mov [rsp+88h+var_88], rbx xor r14d, r14d lea r12, [rsp+88h+var_80] xor r13d, r13d loc_589F9: sub rcx, rsi sar rcx, 5 cmp r13, rcx jnb short loc_589AF mov rbx, rbp mov rbp, [rbp+0] add rsi, r14 mov rdi, r12 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, [rsp+88h+var_88]; this mov rsi, r13; unsigned __int64 call _ZN5minja5Value2atEm; minja::Value::at(ulong) mov rcx, [rbp+0] mov rdi, rbp mov rsi, r12 mov rdx, rax call qword ptr [rcx+28h] mov rdi, r12; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() inc r13 mov rsi, [r15] mov rcx, [r15+8] add r14, 20h ; ' ' mov rbp, rbx jmp short loc_589F9 loc_58A4E: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aMismatchedNumb; "Mismatched number of variables and item"... 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 mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_58A9A jmp short $+2 loc_58A8D: mov rbx, rax lea rdi, [rsp+88h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_58A9A: mov rdi, rbx call __Unwind_Resume
void minja::destructuring_assign(_QWORD *a1, _QWORD *a2, minja::Value *a3) { _QWORD *v4; // rbp long long v5; // rax long long v6; // rsi long long v7; // rcx long long v8; // r14 unsigned long long v9; // r13 _QWORD *v10; // rbx long long v11; // rbp long long v12; // rax std::runtime_error *exception; // r14 minja::Value *v14; // [rsp+0h] [rbp-88h] _BYTE v15[128]; // [rsp+8h] [rbp-80h] BYREF v4 = a2; if ( a1[1] - *a1 == 32LL ) { minja::Value::Value(v15, *a1); (*(void ( **)(_QWORD, _BYTE *, minja::Value *))(*(_QWORD *)*a2 + 40LL))(*a2, v15, a3); minja::Value::~Value((minja::Value *)v15); } else { if ( !*((_QWORD *)a3 + 2) || (v5 = minja::Value::size(a3), v6 = *a1, v7 = a1[1], v5 != (v7 - *a1) >> 5) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error( exception, "Mismatched number of variables and items in destructuring assignment"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v14 = a3; v8 = 0LL; v9 = 0LL; while ( v9 < (v7 - v6) >> 5 ) { v10 = v4; v11 = *v4; minja::Value::Value(v15, v8 + v6); v12 = minja::Value::at(v14, v9); (*(void ( **)(long long, _BYTE *, long long))(*(_QWORD *)v11 + 40LL))(v11, v15, v12); minja::Value::~Value((minja::Value *)v15); ++v9; v6 = *a1; v7 = a1[1]; v8 += 32LL; v4 = v10; } } }
destructuring_assign: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,RDX MOV RBP,RSI MOV RSI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] SUB RAX,RSI CMP RAX,0x20 JNZ 0x001589be LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x0016680e MOV RDI,qword ptr [RBP] MOV RAX,qword ptr [RDI] LAB_0015899c: MOV RSI,R15 MOV RDX,RBX CALL qword ptr [RAX + 0x28] LAB_001589a5: LEA RDI,[RSP + 0x8] CALL 0x00163830 LAB_001589af: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001589be: CMP qword ptr [RBX + 0x10],0x0 JZ 0x00158a4e MOV R15,RDI MOV RDI,RBX CALL 0x0016b7bc MOV RSI,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,RCX SUB RDX,RSI SAR RDX,0x5 CMP RAX,RDX JNZ 0x00158a4e MOV qword ptr [RSP],RBX XOR R14D,R14D LEA R12,[RSP + 0x8] XOR R13D,R13D LAB_001589f9: SUB RCX,RSI SAR RCX,0x5 CMP R13,RCX JNC 0x001589af MOV RBX,RBP MOV RBP,qword ptr [RBP] ADD RSI,R14 MOV RDI,R12 CALL 0x0016680e LAB_00158a17: MOV RDI,qword ptr [RSP] MOV RSI,R13 CALL 0x0016b8c4 MOV RCX,qword ptr [RBP] MOV RDI,RBP MOV RSI,R12 MOV RDX,RAX CALL qword ptr [RCX + 0x28] LAB_00158a33: MOV RDI,R12 CALL 0x00163830 INC R13 MOV RSI,qword ptr [R15] MOV RCX,qword ptr [R15 + 0x8] ADD R14,0x20 MOV RBP,RBX JMP 0x001589f9 LAB_00158a4e: PUSH 0x10 POP RDI CALL 0x00123450 MOV R14,RAX LAB_00158a59: LEA RSI,[0x1b4f38] MOV RDI,RAX CALL 0x00123310 LAB_00158a68: MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R14 CALL 0x00123ea0
/* minja::destructuring_assign(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::shared_ptr<minja::Context> const&, minja::Value&) */ void minja::destructuring_assign(vector *param_1,shared_ptr *param_2,Value *param_3) { long *plVar1; long lVar2; int8 uVar3; runtime_error *this; long lVar4; long lVar5; ulong uVar6; Value local_80 [80]; if (*(long *)(param_1 + 8) - (long)*(string **)param_1 == 0x20) { Value::Value(local_80,*(string **)param_1); /* try { // try from 0015899c to 001589a4 has its CatchHandler @ 00158a8b */ (**(code **)(**(long **)param_2 + 0x28))(*(long **)param_2,local_80,param_3); Value::~Value(local_80); return; } if (*(long *)(param_3 + 0x10) != 0) { lVar2 = Value::size(param_3); lVar5 = *(long *)param_1; lVar4 = *(long *)(param_1 + 8); if (lVar2 == lVar4 - lVar5 >> 5) { lVar2 = 0; for (uVar6 = 0; uVar6 < (ulong)(lVar4 - lVar5 >> 5); uVar6 = uVar6 + 1) { plVar1 = *(long **)param_2; Value::Value(local_80,(string *)(lVar5 + lVar2)); /* try { // try from 00158a17 to 00158a32 has its CatchHandler @ 00158a8d */ uVar3 = Value::at(param_3,uVar6); (**(code **)(*plVar1 + 0x28))(plVar1,local_80,uVar3); Value::~Value(local_80); lVar5 = *(long *)param_1; lVar4 = *(long *)(param_1 + 8); lVar2 = lVar2 + 0x20; } return; } } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 00158a59 to 00158a67 has its CatchHandler @ 00158a7e */ std::runtime_error::runtime_error (this,"Mismatched number of variables and items in destructuring assignment"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); }
53,538
Catch::TestSpecParser::preprocessPattern[abi:cxx11]()
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
std::string TestSpecParser::preprocessPattern() { std::string token = m_patternName; for (std::size_t i = 0; i < m_escapeChars.size(); ++i) token = token.substr(0, m_escapeChars[i] - i) + token.substr(m_escapeChars[i] - i + 1); m_escapeChars.clear(); if (startsWith(token, "exclude:")) { m_exclusion = true; token = token.substr(8); } m_patternName.clear(); m_realPatternPos = 0; return token; }
O3
cpp
Catch::TestSpecParser::preprocessPattern[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, 0x60(%rsp) movq %rax, (%rdi) movq 0x60(%rsi), %rsi movq 0x68(%r14), %rdx addq %rsi, %rdx callq 0x251d8 movq 0x80(%r14), %rax movq 0x88(%r14), %rcx cmpq %rax, %rcx je 0x6354c movl $0x1, %r12d leaq 0x10(%rsp), %r13 xorl %ebp, %ebp leaq 0x40(%rsp), %r15 movq (%rax,%rbp,8), %rax leaq (%r12,%rax), %rcx decq %rcx movq %r15, %rdi movq %rbx, %rsi xorl %edx, %edx callq 0x77522 movq 0x80(%r14), %rax movq (%rax,%rbp,8), %rdx addq %r12, %rdx leaq 0x20(%rsp), %rdi movq %rbx, %rsi movq $-0x1, %rcx callq 0x77522 movq 0x40(%rsp), %rcx movl $0xf, %edi leaq 0x50(%rsp), %rax cmpq %rax, %rcx je 0x63440 movq 0x50(%rsp), %rdi movq 0x48(%rsp), %r8 movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx leaq (%rdx,%r8), %rax cmpq %rdi, %rax jbe 0x63471 movl $0xf, %edi leaq 0x30(%rsp), %r9 cmpq %r9, %rsi je 0x6346c movq 0x30(%rsp), %rdi cmpq %rdi, %rax jbe 0x6347b movq %r15, %rdi callq 0x82008 jmp 0x63489 leaq 0x20(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x8064e movq %r13, (%rsp) movq (%rax), %rdx leaq 0x10(%rax), %rcx cmpq %rcx, %rdx jne 0x634a3 movups (%rcx), %xmm0 movups %xmm0, (%r13) jmp 0x634af movq %rdx, (%rsp) movq (%rcx), %rdx movq %rdx, 0x10(%rsp) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x8(%rsp) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) movq %rbx, %rdi movq %rsp, %rsi callq 0x1816c movq (%rsp), %rdi cmpq %r13, %rdi je 0x634ed movq 0x10(%rsp), %rsi incq %rsi callq 0x17150 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x63509 movq 0x30(%rsp), %rsi incq %rsi callq 0x17150 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x63525 movq 0x50(%rsp), %rsi incq %rsi callq 0x17150 incq %rbp movq 0x80(%r14), %rax movq 0x88(%r14), %rcx movq %rcx, %rdx subq %rax, %rdx sarq $0x3, %rdx decq %r12 cmpq %rdx, %rbp jb 0x633ed cmpq %rax, %rcx je 0x63558 movq %rax, 0x88(%r14) leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x7a951(%rip), %rsi # 0xddeba leaq 0x7a952(%rip), %rdx # 0xddec2 movq %rsp, %rdi callq 0x37312 movq 0x8(%rsp), %rdx cmpq %rdx, 0x8(%rbx) jae 0x6358b movq (%rsp), %r15 xorl %ebp, %ebp jmp 0x635aa movq (%rsp), %r15 testq %rdx, %rdx je 0x635a7 movq (%rbx), %rsi movq %r15, %rdi callq 0x177b0 testl %eax, %eax sete %bpl jmp 0x635aa movb $0x1, %bpl cmpq %r12, %r15 je 0x635bf movq 0x10(%rsp), %rsi incq %rsi movq %r15, %rdi callq 0x17150 testb %bpl, %bpl jne 0x635e7 xorl %eax, %eax movq %rax, 0x68(%r14) movq 0x60(%r14), %rcx movb $0x0, (%rcx) movq %rax, 0x18(%r14) movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movb $0x1, 0x8(%r14) movq %rsp, %rdi movl $0x8, %edx movq %rbx, %rsi movq $-0x1, %rcx callq 0x77522 movq %rsp, %rsi movq %rbx, %rdi callq 0x18f95 jmp 0x635c4 jmp 0x63656 jmp 0x63656 movq %rax, %r14 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x63638 movq 0x30(%rsp), %rsi incq %rsi callq 0x17150 jmp 0x63638 movq %rax, %r14 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x63659 movq 0x50(%rsp), %rsi incq %rsi callq 0x17150 jmp 0x63659 movq %rax, %r14 movq (%rbx), %rdi movq 0x60(%rsp), %rax cmpq %rax, %rdi je 0x63671 movq (%rax), %rsi incq %rsi callq 0x17150 movq %r14, %rdi callq 0x17740 nop
_ZN5Catch14TestSpecParser17preprocessPatternB5cxx11Ev: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rsi mov rbx, rdi lea rax, [rdi+10h] mov [rsp+98h+var_38], rax mov [rdi], rax mov rsi, [rsi+60h] mov rdx, [r14+68h] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) mov rax, [r14+80h] mov rcx, [r14+88h] cmp rcx, rax jz loc_6354C mov r12d, 1 lea r13, [rsp+98h+var_88] xor ebp, ebp lea r15, [rsp+98h+var_58] loc_633ED: mov rax, [rax+rbp*8] lea rcx, [r12+rax] dec rcx mov rdi, r15 mov rsi, rbx xor edx, edx call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rax, [r14+80h] mov rdx, [rax+rbp*8] add rdx, r12 lea rdi, [rsp+98h+var_78] mov rsi, rbx mov rcx, 0FFFFFFFFFFFFFFFFh call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rcx, [rsp+98h+var_58] mov edi, 0Fh lea rax, [rsp+98h+var_48] cmp rcx, rax jz short loc_63440 mov rdi, [rsp+98h+var_48] loc_63440: mov r8, [rsp+98h+var_50] mov rsi, [rsp+98h+var_78] mov rdx, [rsp+98h+var_70] lea rax, [rdx+r8] cmp rax, rdi jbe short loc_63471 mov edi, 0Fh lea r9, [rsp+98h+var_68] cmp rsi, r9 jz short loc_6346C mov rdi, [rsp+98h+var_68] loc_6346C: cmp rax, rdi jbe short loc_6347B loc_63471: mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_63489 loc_6347B: lea rdi, [rsp+98h+var_78] xor esi, esi xor edx, edx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_63489: mov [rsp+98h+var_98], r13 mov rdx, [rax] lea rcx, [rax+10h] cmp rdx, rcx jnz short loc_634A3 movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 jmp short loc_634AF loc_634A3: mov [rsp+98h+var_98], rdx mov rdx, [rcx] mov [rsp+98h+var_88], rdx loc_634AF: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rsp+98h+var_90], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 mov rdi, rbx mov rsi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) mov rdi, [rsp+98h+var_98]; void * cmp rdi, r13 jz short loc_634ED mov rsi, [rsp+98h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_634ED: mov rdi, [rsp+98h+var_78]; void * lea rax, [rsp+98h+var_68] cmp rdi, rax jz short loc_63509 mov rsi, [rsp+98h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_63509: mov rdi, [rsp+98h+var_58]; void * lea rax, [rsp+98h+var_48] cmp rdi, rax jz short loc_63525 mov rsi, [rsp+98h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_63525: inc rbp mov rax, [r14+80h] mov rcx, [r14+88h] mov rdx, rcx sub rdx, rax sar rdx, 3 dec r12 cmp rbp, rdx jb loc_633ED loc_6354C: cmp rcx, rax jz short loc_63558 mov [r14+88h], rax loc_63558: lea r12, [rsp+98h+var_88] mov [r12-10h], r12 lea rsi, aExclude; "exclude:" lea rdx, aExclude+8; "" mov rdi, rsp 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 rdx, [rsp+98h+var_90] cmp [rbx+8], rdx jnb short loc_6358B mov r15, [rsp+98h+var_98] xor ebp, ebp jmp short loc_635AA loc_6358B: mov r15, [rsp+98h+var_98] test rdx, rdx jz short loc_635A7 mov rsi, [rbx] mov rdi, r15 call _bcmp test eax, eax setz bpl jmp short loc_635AA loc_635A7: mov bpl, 1 loc_635AA: cmp r15, r12 jz short loc_635BF mov rsi, [rsp+98h+var_88] inc rsi; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) loc_635BF: test bpl, bpl jnz short loc_635E7 loc_635C4: xor eax, eax mov [r14+68h], rax mov rcx, [r14+60h] mov byte ptr [rcx], 0 mov [r14+18h], rax mov rax, rbx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_635E7: mov byte ptr [r14+8], 1 mov rdi, rsp mov edx, 8 mov rsi, rbx mov rcx, 0FFFFFFFFFFFFFFFFh call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rsi, rsp mov rdi, rbx call _ZN5Catch14TestSpecParser17preprocessPatternB5cxx11Ev_cold_1; Catch::TestSpecParser::preprocessPattern(void) [clone] jmp short loc_635C4 jmp short loc_63656 jmp short loc_63656 mov r14, rax mov rdi, [rsp+arg_18]; void * lea rax, [rsp+arg_28] cmp rdi, rax jz short loc_63638 mov rsi, [rsp+arg_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_63638 mov r14, rax loc_63638: mov rdi, [rsp+arg_38]; void * lea rax, [rsp+arg_48] cmp rdi, rax jz short loc_63659 mov rsi, [rsp+arg_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_63659 loc_63656: mov r14, rax loc_63659: mov rdi, [rbx]; void * mov rax, [rsp+arg_58] cmp rdi, rax jz short loc_63671 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_63671: mov rdi, r14 call __Unwind_Resume
_QWORD * Catch::TestSpecParser::preprocessPattern[abi:cxx11](_QWORD *a1, long long a2) { long long v3; // rax long long v4; // rcx long long v5; // r12 unsigned long long v6; // rbp unsigned long long v7; // rdi unsigned long long v8; // rdi long long v9; // rax __int128 *v10; // rcx __int128 *v11; // r15 bool v12; // bp void *v14; // [rsp+0h] [rbp-98h] BYREF unsigned long long v15; // [rsp+8h] [rbp-90h] __int128 v16; // [rsp+10h] [rbp-88h] BYREF void *v17; // [rsp+20h] [rbp-78h] BYREF long long v18; // [rsp+28h] [rbp-70h] _QWORD v19[2]; // [rsp+30h] [rbp-68h] BYREF void *v20; // [rsp+40h] [rbp-58h] BYREF long long v21; // [rsp+48h] [rbp-50h] _QWORD v22[9]; // [rsp+50h] [rbp-48h] BYREF v22[2] = a1 + 2; *a1 = a1 + 2; std::string::_M_construct<char *>(a1, *(_BYTE **)(a2 + 96), *(_QWORD *)(a2 + 96) + *(_QWORD *)(a2 + 104)); v3 = *(_QWORD *)(a2 + 128); v4 = *(_QWORD *)(a2 + 136); if ( v4 != v3 ) { v5 = 1LL; v6 = 0LL; do { std::string::substr(&v20, a1, 0LL, v5 + *(_QWORD *)(v3 + 8 * v6) - 1); std::string::substr(&v17, a1, v5 + *(_QWORD *)(*(_QWORD *)(a2 + 128) + 8 * v6), -1LL); v7 = 15LL; if ( v20 != v22 ) v7 = v22[0]; if ( v18 + v21 <= v7 ) goto LABEL_9; v8 = 15LL; if ( v17 != v19 ) v8 = v19[0]; if ( v18 + v21 <= v8 ) v9 = std::string::replace(&v17, 0LL, 0LL, v20, v21); else LABEL_9: v9 = std::string::_M_append(&v20, v17, v18); v14 = &v16; v10 = (__int128 *)(v9 + 16); if ( *(_QWORD *)v9 == v9 + 16 ) { v16 = *v10; } else { v14 = *(void **)v9; *(_QWORD *)&v16 = *(_QWORD *)v10; } v15 = *(_QWORD *)(v9 + 8); *(_QWORD *)v9 = v10; *(_QWORD *)(v9 + 8) = 0LL; *(_BYTE *)v10 = 0; std::string::operator=(a1, (long long)&v14); if ( v14 != &v16 ) operator delete(v14, v16 + 1); if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v20 != v22 ) operator delete(v20, v22[0] + 1LL); ++v6; v3 = *(_QWORD *)(a2 + 128); v4 = *(_QWORD *)(a2 + 136); --v5; } while ( v6 < (v4 - v3) >> 3 ); } if ( v4 != v3 ) *(_QWORD *)(a2 + 136) = v3; v14 = &v16; std::string::_M_construct<char const*>(&v14, "exclude:", (long long)""); if ( a1[1] >= v15 ) { v11 = (__int128 *)v14; if ( v15 ) v12 = (unsigned int)bcmp(v14, *a1) == 0; else v12 = 1; } else { v11 = (__int128 *)v14; v12 = 0; } if ( v11 != &v16 ) operator delete(v11, v16 + 1); if ( v12 ) { *(_BYTE *)(a2 + 8) = 1; std::string::substr(&v14, a1, 8LL, -1LL); Catch::TestSpecParser::preprocessPattern[abi:cxx11](a1, (long long)&v14); } *(_QWORD *)(a2 + 104) = 0LL; **(_BYTE **)(a2 + 96) = 0; *(_QWORD *)(a2 + 24) = 0LL; return a1; }
preprocessPattern[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RSI MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RDI],RAX MOV RSI,qword ptr [RSI + 0x60] MOV RDX,qword ptr [R14 + 0x68] ADD RDX,RSI CALL 0x001251d8 MOV RAX,qword ptr [R14 + 0x80] MOV RCX,qword ptr [R14 + 0x88] CMP RCX,RAX JZ 0x0016354c MOV R12D,0x1 LEA R13,[RSP + 0x10] XOR EBP,EBP LEA R15,[RSP + 0x40] LAB_001633ed: MOV RAX,qword ptr [RAX + RBP*0x8] LEA RCX,[R12 + RAX*0x1] DEC RCX LAB_001633f8: MOV RDI,R15 MOV RSI,RBX XOR EDX,EDX CALL 0x00177522 MOV RAX,qword ptr [R14 + 0x80] MOV RDX,qword ptr [RAX + RBP*0x8] ADD RDX,R12 LAB_00163413: LEA RDI,[RSP + 0x20] MOV RSI,RBX MOV RCX,-0x1 CALL 0x00177522 MOV RCX,qword ptr [RSP + 0x40] MOV EDI,0xf LEA RAX,[RSP + 0x50] CMP RCX,RAX JZ 0x00163440 MOV RDI,qword ptr [RSP + 0x50] LAB_00163440: MOV R8,qword ptr [RSP + 0x48] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] LEA RAX,[RDX + R8*0x1] CMP RAX,RDI JBE 0x00163471 MOV EDI,0xf LEA R9,[RSP + 0x30] CMP RSI,R9 JZ 0x0016346c MOV RDI,qword ptr [RSP + 0x30] LAB_0016346c: CMP RAX,RDI JBE 0x0016347b LAB_00163471: MOV RDI,R15 CALL 0x00182008 JMP 0x00163489 LAB_0016347b: LEA RDI,[RSP + 0x20] XOR ESI,ESI XOR EDX,EDX CALL 0x0018064e LAB_00163489: MOV qword ptr [RSP],R13 MOV RDX,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RDX,RCX JNZ 0x001634a3 MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM0 JMP 0x001634af LAB_001634a3: MOV qword ptr [RSP],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x10],RDX LAB_001634af: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RSI MOV qword ptr [RAX],RCX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 MOV RDI,RBX MOV RSI,RSP CALL 0x0011816c MOV RDI,qword ptr [RSP] CMP RDI,R13 JZ 0x001634ed MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00117150 LAB_001634ed: MOV RDI,qword ptr [RSP + 0x20] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x00163509 MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x00117150 LAB_00163509: MOV RDI,qword ptr [RSP + 0x40] LEA RAX,[RSP + 0x50] CMP RDI,RAX JZ 0x00163525 MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x00117150 LAB_00163525: INC RBP MOV RAX,qword ptr [R14 + 0x80] MOV RCX,qword ptr [R14 + 0x88] MOV RDX,RCX SUB RDX,RAX SAR RDX,0x3 DEC R12 CMP RBP,RDX JC 0x001633ed LAB_0016354c: CMP RCX,RAX JZ 0x00163558 MOV qword ptr [R14 + 0x88],RAX LAB_00163558: LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 LAB_00163562: LEA RSI,[0x1ddeba] LEA RDX,[0x1ddec2] MOV RDI,RSP CALL 0x00137312 MOV RDX,qword ptr [RSP + 0x8] CMP qword ptr [RBX + 0x8],RDX JNC 0x0016358b MOV R15,qword ptr [RSP] XOR EBP,EBP JMP 0x001635aa LAB_0016358b: MOV R15,qword ptr [RSP] TEST RDX,RDX JZ 0x001635a7 MOV RSI,qword ptr [RBX] MOV RDI,R15 CALL 0x001177b0 TEST EAX,EAX SETZ BPL JMP 0x001635aa LAB_001635a7: MOV BPL,0x1 LAB_001635aa: CMP R15,R12 JZ 0x001635bf MOV RSI,qword ptr [RSP + 0x10] INC RSI MOV RDI,R15 CALL 0x00117150 LAB_001635bf: TEST BPL,BPL JNZ 0x001635e7 LAB_001635c4: XOR EAX,EAX MOV qword ptr [R14 + 0x68],RAX MOV RCX,qword ptr [R14 + 0x60] MOV byte ptr [RCX],0x0 MOV qword ptr [R14 + 0x18],RAX MOV RAX,RBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001635e7: MOV byte ptr [R14 + 0x8],0x1 LAB_001635ec: MOV RDI,RSP MOV EDX,0x8 MOV RSI,RBX MOV RCX,-0x1 CALL 0x00177522 LAB_00163603: MOV RSI,RSP MOV RDI,RBX CALL 0x00118f95 JMP 0x001635c4
/* Catch::TestSpecParser::preprocessPattern[abi:cxx11]() */ void Catch::TestSpecParser::preprocessPattern_abi_cxx11_(void) { long *plVar1; int iVar2; int8 *puVar3; long lVar4; long lVar5; ulong uVar6; long in_RSI; string *in_RDI; ulong uVar7; bool bVar8; long *local_98; ulong local_90; long local_88; int8 uStack_80; ulong *local_78; ulong local_70; ulong local_68 [2]; ulong *local_58; ulong local_50; ulong local_48 [2]; string *local_38; local_38 = in_RDI + 0x10; *(string **)in_RDI = local_38; std::__cxx11::string::_M_construct<char*> (in_RDI,*(long *)(in_RSI + 0x60),*(long *)(in_RSI + 0x68) + *(long *)(in_RSI + 0x60)); lVar4 = *(long *)(in_RSI + 0x80); lVar5 = *(long *)(in_RSI + 0x88); if (lVar5 != lVar4) { uVar6 = 0; do { /* try { // try from 001633f8 to 00163404 has its CatchHandler @ 00163656 */ std::__cxx11::string::substr((ulong)&local_58,(ulong)in_RDI); /* try { // try from 00163413 to 00163426 has its CatchHandler @ 00163635 */ std::__cxx11::string::substr((ulong)&local_78,(ulong)in_RDI); uVar7 = 0xf; if (local_58 != local_48) { uVar7 = local_48[0]; } if (uVar7 < local_70 + local_50) { uVar7 = 0xf; if (local_78 != local_68) { uVar7 = local_68[0]; } if (uVar7 < local_70 + local_50) goto LAB_00163471; puVar3 = (int8 *) std::__cxx11::string::replace((string *)&local_78,0,0,(char *)local_58,local_50); } else { LAB_00163471: /* try { // try from 00163471 to 00163488 has its CatchHandler @ 00163614 */ puVar3 = (int8 *) std::__cxx11::string::_M_append((string *)&local_58,(char *)local_78,local_70); } local_98 = (long *)*puVar3; plVar1 = puVar3 + 2; if (local_98 == plVar1) { local_88 = *plVar1; uStack_80 = puVar3[3]; local_98 = &local_88; } else { local_88 = *plVar1; } local_90 = puVar3[1]; *puVar3 = plVar1; puVar3[1] = 0; *(int1 *)plVar1 = 0; std::__cxx11::string::operator=(in_RDI,(string *)&local_98); if (local_98 != &local_88) { operator_delete(local_98,local_88 + 1); } if (local_78 != local_68) { operator_delete(local_78,local_68[0] + 1); } if (local_58 != local_48) { operator_delete(local_58,local_48[0] + 1); } uVar6 = uVar6 + 1; lVar4 = *(long *)(in_RSI + 0x80); lVar5 = *(long *)(in_RSI + 0x88); } while (uVar6 < (ulong)(lVar5 - lVar4 >> 3)); } if (lVar5 != lVar4) { *(long *)(in_RSI + 0x88) = lVar4; } local_98 = &local_88; /* try { // try from 00163562 to 00163577 has its CatchHandler @ 00163612 */ std::__cxx11::string::_M_construct<char_const*>(&local_98,"exclude:",""); plVar1 = local_98; if (*(ulong *)(in_RDI + 8) < local_90) { bVar8 = false; } else if (local_90 == 0) { bVar8 = true; } else { iVar2 = bcmp(local_98,*(void **)in_RDI,local_90); bVar8 = iVar2 == 0; } if (plVar1 != &local_88) { operator_delete(plVar1,local_88 + 1); } if (bVar8) { *(int1 *)(in_RSI + 8) = 1; /* try { // try from 001635ec to 00163602 has its CatchHandler @ 00163610 */ std::__cxx11::string::substr((ulong)&local_98,(ulong)in_RDI); preprocessPattern_abi_cxx11_(); } *(int8 *)(in_RSI + 0x68) = 0; **(int1 **)(in_RSI + 0x60) = 0; *(int8 *)(in_RSI + 0x18) = 0; return; }
53,539
bool google::protobuf::internal::ExpectTag<34u>(char const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/parse_context.h
bool ExpectTag(const char* ptr) { if (tag < 128) { return *ptr == static_cast<char>(tag); } else { static_assert(tag < 128 * 128, "We only expect tags for 1 or 2 bytes"); char buf[2] = {static_cast<char>(tag | 0x80), static_cast<char>(tag >> 7)}; return std::memcmp(ptr, buf, 2) == 0; } }
O0
c
bool google::protobuf::internal::ExpectTag<34u>(char const*): movq %rdi, -0x8(%rsp) movq -0x8(%rsp), %rax movsbl (%rax), %eax cmpl $0x58, %eax sete %al andb $0x1, %al retq nopw %cs:(%rax,%rax)
_ZN6google8protobuf8internal9ExpectTagILj88EEEbPKc: mov [rsp+var_8], rdi mov rax, [rsp+var_8] movsx eax, byte ptr [rax] cmp eax, 58h ; 'X' setz al and al, 1 retn
bool google::protobuf::internal::ExpectTag<88u>(_BYTE *a1) { return *a1 == 88; }
ExpectTag<88u>: MOV qword ptr [RSP + -0x8],RDI MOV RAX,qword ptr [RSP + -0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x58 SETZ AL AND AL,0x1 RET
/* bool google::protobuf::internal::ExpectTag<88u>(char const*) */ bool google::protobuf::internal::ExpectTag<88u>(char *param_1) { return *param_1 == 'X'; }
53,540
mi_get_key
eloqsql/storage/myisam/mi_search.c
uchar *_mi_get_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uchar *keypos, uint *return_key_length) { uint nod_flag; DBUG_ENTER("_mi_get_key"); nod_flag=mi_test_if_nod(page); if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) { bmove((uchar*) key,(uchar*) keypos,keyinfo->keylength+nod_flag); DBUG_RETURN(keypos+keyinfo->keylength+nod_flag); } else { page+=2+nod_flag; key[0]=0; /* safety */ while (page <= keypos) { *return_key_length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key); if (*return_key_length == 0) { mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(0); } } } DBUG_PRINT("exit",("page: %p length: %u", page, *return_key_length)); DBUG_RETURN(page); }
O3
c
mi_get_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, %r13 movq %r8, %rbx movq %rcx, %r12 movq %rsi, %r14 movq %rdi, -0x30(%rbp) xorl %r15d, %r15d cmpb $0x0, (%rdx) jns 0xa095b movq -0x30(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %r15d testb $0x28, 0xa(%r14) je 0xa09be leal 0x2(%r15), %eax addq %rax, %rdx leaq -0x38(%rbp), %rax movq %rdx, (%rax) movb $0x0, (%r12) movq -0x38(%rbp), %rax cmpq %rbx, %rax ja 0xa09df movq %r14, %rdi movl %r15d, %esi leaq -0x38(%rbp), %rdx movq %r12, %rcx callq *0x48(%r14) movl %eax, (%r13) testl %eax, %eax jne 0xa0975 movq -0x30(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x95dfa callq 0xc14ee movl $0x7e, (%rax) xorl %eax, %eax jmp 0xa09df movzwl 0x12(%r14), %edx addl %r15d, %edx movq %r12, %rdi movq %rbx, %rsi callq 0x2a150 movzwl 0x12(%r14), %ecx movl %r15d, %eax addq %rbx, %rax addq %rcx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_get_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r13, r9 mov rbx, r8 mov r12, rcx mov r14, rsi mov [rbp+var_30], rdi xor r15d, r15d cmp byte ptr [rdx], 0 jns short loc_A095B mov rax, [rbp+var_30] mov rax, [rax] mov r15d, [rax+17Ch] loc_A095B: test byte ptr [r14+0Ah], 28h jz short loc_A09BE lea eax, [r15+2] add rdx, rax lea rax, [rbp+var_38] mov [rax], rdx mov byte ptr [r12], 0 loc_A0975: mov rax, [rbp+var_38] cmp rax, rbx ja short loc_A09DF mov rdi, r14 mov esi, r15d lea rdx, [rbp+var_38] mov rcx, r12 call qword ptr [r14+48h] mov [r13+0], eax test eax, eax jnz short loc_A0975 mov rax, [rbp+var_30] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' xor eax, eax jmp short loc_A09DF loc_A09BE: movzx edx, word ptr [r14+12h] add edx, r15d mov rdi, r12 mov rsi, rbx call _memmove movzx ecx, word ptr [r14+12h] mov eax, r15d add rax, rbx add rax, rcx loc_A09DF: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
char * mi_get_key(long long a1, long long a2, char *a3, _BYTE *a4, unsigned long long a5, _DWORD *a6) { unsigned int v9; // r15d char *result; // rax int v11; // eax char *v12; // [rsp+8h] [rbp-38h] BYREF long long v13; // [rsp+10h] [rbp-30h] v13 = a1; v9 = 0; if ( *a3 < 0 ) v9 = *(_DWORD *)(*(_QWORD *)v13 + 380LL); if ( (*(_BYTE *)(a2 + 10) & 0x28) != 0 ) { v12 = &a3[v9 + 2]; *a4 = 0; while ( 1 ) { result = v12; if ( (unsigned long long)v12 > a5 ) break; v11 = (*(long long ( **)(long long, _QWORD, char **, _BYTE *))(a2 + 72))(a2, v9, &v12, a4); *a6 = v11; if ( !v11 ) { mi_report_error(126, *(_QWORD *)(*(_QWORD *)v13 + 616LL)); *(_DWORD *)my_thread_var(126LL) = 126; return 0LL; } } } else { memmove(a4, a5, v9 + *(unsigned __int16 *)(a2 + 18)); return (char *)(*(unsigned __int16 *)(a2 + 18) + a5 + v9); } return result; }
_mi_get_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R13,R9 MOV RBX,R8 MOV R12,RCX MOV R14,RSI MOV qword ptr [RBP + -0x30],RDI XOR R15D,R15D CMP byte ptr [RDX],0x0 JNS 0x001a095b MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV R15D,dword ptr [RAX + 0x17c] LAB_001a095b: TEST byte ptr [R14 + 0xa],0x28 JZ 0x001a09be LEA EAX,[R15 + 0x2] ADD RDX,RAX LEA RAX,[RBP + -0x38] MOV qword ptr [RAX],RDX MOV byte ptr [R12],0x0 LAB_001a0975: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,RBX JA 0x001a09df MOV RDI,R14 MOV ESI,R15D LEA RDX,[RBP + -0x38] MOV RCX,R12 CALL qword ptr [R14 + 0x48] MOV dword ptr [R13],EAX TEST EAX,EAX JNZ 0x001a0975 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x00195dfa CALL 0x001c14ee MOV dword ptr [RAX],0x7e XOR EAX,EAX JMP 0x001a09df LAB_001a09be: MOVZX EDX,word ptr [R14 + 0x12] ADD EDX,R15D MOV RDI,R12 MOV RSI,RBX CALL 0x0012a150 MOVZX ECX,word ptr [R14 + 0x12] MOV EAX,R15D ADD RAX,RBX ADD RAX,RCX LAB_001a09df: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
char * _mi_get_key(long *param_1,long param_2,char *param_3,int1 *param_4,char *param_5, int *param_6) { int iVar1; int4 *puVar2; uint uVar3; char *local_40; long *local_38; uVar3 = 0; if (*param_3 < '\0') { uVar3 = *(uint *)(*param_1 + 0x17c); } local_38 = param_1; if ((*(byte *)(param_2 + 10) & 0x28) == 0) { memmove(param_4,param_5,(ulong)(*(ushort *)(param_2 + 0x12) + uVar3)); param_5 = param_5 + (ulong)*(ushort *)(param_2 + 0x12) + (ulong)uVar3; } else { local_40 = param_3 + (uVar3 + 2); *param_4 = 0; do { if (param_5 < local_40) { return local_40; } iVar1 = (**(code **)(param_2 + 0x48))(param_2,uVar3,&local_40,param_4); *param_6 = iVar1; } while (iVar1 != 0); mi_report_error(0x7e,*(int8 *)(*local_38 + 0x268)); puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; param_5 = (char *)0x0; } return param_5; }
53,541
ma_stmt_execute_generate_request
eloqsql/libmariadb/libmariadb/mariadb_stmt.c
unsigned char* ma_stmt_execute_generate_request(MYSQL_STMT *stmt, size_t *request_len, my_bool internal) { unsigned char *buf; if (stmt->request_buffer) { *request_len= stmt->request_length; buf= stmt->request_buffer; /* store actual stmt id */ int4store(buf, stmt->stmt_id); /* clear buffer, memory will be freed in execute */ stmt->request_buffer= NULL; stmt->request_length= 0; return buf; } if (stmt->array_size > 0) buf= ma_stmt_execute_generate_bulk_request(stmt, request_len); else buf= ma_stmt_execute_generate_simple_request(stmt, request_len); if (internal) { if (stmt->request_buffer) free(stmt->request_buffer); stmt->request_buffer= buf; stmt->request_length= *request_len; } return buf; }
O0
c
ma_stmt_execute_generate_request: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movb %dl, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movb %al, -0x19(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x360(%rax) je 0x28fdf movq -0x10(%rbp), %rax movq 0x398(%rax), %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq 0x360(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, (%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax shrq $0x8, %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x1(%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax shrq $0x10, %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x2(%rax) movq -0x10(%rbp), %rax movq 0x40(%rax), %rax shrq $0x18, %rax movb %al, %cl movq -0x28(%rbp), %rax movb %cl, 0x3(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x360(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x398(%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x2905d movq -0x10(%rbp), %rax cmpl $0x0, 0x368(%rax) jbe 0x28fff movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x28810 movq %rax, -0x28(%rbp) jmp 0x29010 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x28140 movq %rax, -0x28(%rbp) cmpb $0x0, -0x19(%rbp) je 0x29055 movq -0x10(%rbp), %rax cmpq $0x0, 0x360(%rax) je 0x29034 movq -0x10(%rbp), %rax movq 0x360(%rax), %rdi callq 0x13520 movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x360(%rax) movq -0x18(%rbp), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x398(%rax) movq -0x28(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
ma_stmt_execute_generate_request: push rbp mov rbp, rsp sub rsp, 30h mov al, dl mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_19], al mov rax, [rbp+var_10] cmp qword ptr [rax+360h], 0 jz loc_28FDF mov rax, [rbp+var_10] mov rcx, [rax+398h] mov rax, [rbp+var_18] mov [rax], rcx mov rax, [rbp+var_10] mov rax, [rax+360h] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+40h] mov cl, al mov rax, [rbp+var_28] mov [rax], cl mov rax, [rbp+var_10] mov rax, [rax+40h] shr rax, 8 mov cl, al mov rax, [rbp+var_28] mov [rax+1], cl mov rax, [rbp+var_10] mov rax, [rax+40h] shr rax, 10h mov cl, al mov rax, [rbp+var_28] mov [rax+2], cl mov rax, [rbp+var_10] mov rax, [rax+40h] shr rax, 18h mov cl, al mov rax, [rbp+var_28] mov [rax+3], cl mov rax, [rbp+var_10] mov qword ptr [rax+360h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+398h], 0 mov rax, [rbp+var_28] mov [rbp+var_8], rax jmp short loc_2905D loc_28FDF: mov rax, [rbp+var_10] cmp dword ptr [rax+368h], 0 jbe short loc_28FFF mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call ma_stmt_execute_generate_bulk_request mov [rbp+var_28], rax jmp short loc_29010 loc_28FFF: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call ma_stmt_execute_generate_simple_request mov [rbp+var_28], rax loc_29010: cmp [rbp+var_19], 0 jz short loc_29055 mov rax, [rbp+var_10] cmp qword ptr [rax+360h], 0 jz short loc_29034 mov rax, [rbp+var_10] mov rdi, [rax+360h] call _free loc_29034: mov rcx, [rbp+var_28] mov rax, [rbp+var_10] mov [rax+360h], rcx mov rax, [rbp+var_18] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+398h], rcx loc_29055: mov rax, [rbp+var_28] mov [rbp+var_8], rax loc_2905D: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
char * ma_stmt_execute_generate_request(long long a1, _QWORD *a2, char a3) { long long v4; // [rsp+8h] [rbp-28h] char *bulk_request; // [rsp+8h] [rbp-28h] if ( *(_QWORD *)(a1 + 864) ) { *a2 = *(_QWORD *)(a1 + 920); v4 = *(_QWORD *)(a1 + 864); *(_WORD *)v4 = *(_QWORD *)(a1 + 64); *(_BYTE *)(v4 + 2) = BYTE2(*(_QWORD *)(a1 + 64)); *(_BYTE *)(v4 + 3) = BYTE3(*(_QWORD *)(a1 + 64)); *(_QWORD *)(a1 + 864) = 0LL; *(_QWORD *)(a1 + 920) = 0LL; return (char *)v4; } else { if ( *(_DWORD *)(a1 + 872) ) bulk_request = ma_stmt_execute_generate_bulk_request((_QWORD *)a1, a2); else bulk_request = ma_stmt_execute_generate_simple_request((_QWORD *)a1, a2); if ( a3 ) { if ( *(_QWORD *)(a1 + 864) ) free(*(_QWORD *)(a1 + 864)); *(_QWORD *)(a1 + 864) = bulk_request; *(_QWORD *)(a1 + 920) = *a2; } return bulk_request; } }
ma_stmt_execute_generate_request: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV AL,DL MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV byte ptr [RBP + -0x19],AL MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x360],0x0 JZ 0x00128fdf MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x398] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x360] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] SHR RAX,0x18 MOV CL,AL MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x3],CL MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x360],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x398],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX JMP 0x0012905d LAB_00128fdf: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x368],0x0 JBE 0x00128fff MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00128810 MOV qword ptr [RBP + -0x28],RAX JMP 0x00129010 LAB_00128fff: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00128140 MOV qword ptr [RBP + -0x28],RAX LAB_00129010: CMP byte ptr [RBP + -0x19],0x0 JZ 0x00129055 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x360],0x0 JZ 0x00129034 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x360] CALL 0x00113520 LAB_00129034: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x360],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x398],RCX LAB_00129055: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x8],RAX LAB_0012905d: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
int1 * ma_stmt_execute_generate_request(long param_1,int8 *param_2,char param_3) { int1 *local_30; int1 *local_10; if (*(long *)(param_1 + 0x360) == 0) { if (*(int *)(param_1 + 0x368) == 0) { local_30 = (int1 *)ma_stmt_execute_generate_simple_request(param_1,param_2); } else { local_30 = (int1 *)ma_stmt_execute_generate_bulk_request(param_1,param_2); } if (param_3 != '\0') { if (*(long *)(param_1 + 0x360) != 0) { free(*(void **)(param_1 + 0x360)); } *(int1 **)(param_1 + 0x360) = local_30; *(int8 *)(param_1 + 0x398) = *param_2; } local_10 = local_30; } else { *param_2 = *(int8 *)(param_1 + 0x398); local_10 = *(int1 **)(param_1 + 0x360); *local_10 = (char)*(int8 *)(param_1 + 0x40); local_10[1] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 8); local_10[2] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 0x10); local_10[3] = (char)((ulong)*(int8 *)(param_1 + 0x40) >> 0x18); *(int8 *)(param_1 + 0x360) = 0; *(int8 *)(param_1 + 0x398) = 0; } return local_10; }
53,542
open_logfile_by_number_no_cache
eloqsql/storage/maria/ma_loghandler.c
static File open_logfile_by_number_no_cache(uint32 file_no) { File file; char path[FN_REFLEN]; DBUG_ENTER("open_logfile_by_number_no_cache"); /* TODO: add O_DIRECT to open flags (when buffer is aligned) */ /* TODO: use mysql_file_create() */ if ((file= mysql_file_open(key_file_translog, translog_filename_by_fileno(file_no, path), log_descriptor.open_flags | O_CLOEXEC, MYF(MY_WME))) < 0) { DBUG_PRINT("error", ("Error %d during opening file '%s'", errno, path)); DBUG_RETURN(-1); } DBUG_PRINT("info", ("File: '%s' handler: %d", path, file)); DBUG_RETURN(file); }
O0
c
open_logfile_by_number_no_cache: pushq %rbp movq %rsp, %rbp subq $0x230, %rsp # imm = 0x230 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movl %edi, -0x218(%rbp) leaq 0x3eb94f(%rip), %rax # 0x4408f4 movl (%rax), %eax movl %eax, -0x220(%rbp) movl -0x218(%rbp), %edi leaq -0x210(%rbp), %rsi callq 0x549b0 movl -0x220(%rbp), %edi movq %rax, %rcx movl 0x3ecfdd(%rip), %r8d # 0x441fac orl $0x80000, %r8d # imm = 0x80000 leaq 0xca252(%rip), %rsi # 0x11f22f movl $0x406, %edx # imm = 0x406 movl $0x10, %r9d callq 0x5d9e0 movl %eax, -0x21c(%rbp) cmpl $0x0, %eax jge 0x5500a jmp 0x54ffa jmp 0x54ffc jmp 0x54ffe movl $0xffffffff, -0x214(%rbp) # imm = 0xFFFFFFFF jmp 0x5501c jmp 0x5500c jmp 0x5500e jmp 0x55010 movl -0x21c(%rbp), %eax movl %eax, -0x214(%rbp) movl -0x214(%rbp), %eax movl %eax, -0x224(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x55049 movl -0x224(%rbp), %eax addq $0x230, %rsp # imm = 0x230 popq %rbp retq callq 0x272b0 nop
open_logfile_by_number_no_cache: push rbp mov rbp, rsp sub rsp, 230h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], edi lea rax, key_file_translog mov eax, [rax] mov [rbp+var_220], eax mov edi, [rbp+var_218] lea rsi, [rbp+var_210] call translog_filename_by_fileno mov edi, [rbp+var_220] mov rcx, rax mov r8d, cs:dword_441FAC or r8d, 80000h lea rsi, aWorkspaceLlm4b_14; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 406h mov r9d, 10h call inline_mysql_file_open_0 mov [rbp+var_21C], eax cmp eax, 0 jge short loc_5500A jmp short $+2 loc_54FFA: jmp short $+2 loc_54FFC: jmp short $+2 loc_54FFE: mov [rbp+var_214], 0FFFFFFFFh jmp short loc_5501C loc_5500A: jmp short $+2 loc_5500C: jmp short $+2 loc_5500E: jmp short $+2 loc_55010: mov eax, [rbp+var_21C] mov [rbp+var_214], eax loc_5501C: mov eax, [rbp+var_214] mov [rbp+var_224], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_55049 mov eax, [rbp+var_224] add rsp, 230h pop rbp retn loc_55049: call ___stack_chk_fail
long long open_logfile_by_number_no_cache(unsigned int a1, long long a2, long long a3, long long a4, int a5, int a6) { long long v6; // rax unsigned int v8; // [rsp+10h] [rbp-220h] int v9; // [rsp+14h] [rbp-21Ch] _BYTE v11[520]; // [rsp+20h] [rbp-210h] BYREF unsigned long long v12; // [rsp+228h] [rbp-8h] v12 = __readfsqword(0x28u); v8 = key_file_translog; v6 = translog_filename_by_fileno(a1, (long long)v11, a3, a4, a5, a6); v9 = inline_mysql_file_open_0( v8, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 1030LL, v6, dword_441FAC | 0x80000u, 16LL); if ( v9 >= 0 ) return (unsigned int)v9; else return (unsigned int)-1; }
open_logfile_by_number_no_cache: PUSH RBP MOV RBP,RSP SUB RSP,0x230 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV dword ptr [RBP + -0x218],EDI LEA RAX,[0x5408f4] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x220],EAX MOV EDI,dword ptr [RBP + -0x218] LEA RSI,[RBP + -0x210] CALL 0x001549b0 MOV EDI,dword ptr [RBP + -0x220] MOV RCX,RAX MOV R8D,dword ptr [0x00541fac] OR R8D,0x80000 LEA RSI,[0x21f22f] MOV EDX,0x406 MOV R9D,0x10 CALL 0x0015d9e0 MOV dword ptr [RBP + -0x21c],EAX CMP EAX,0x0 JGE 0x0015500a JMP 0x00154ffa LAB_00154ffa: JMP 0x00154ffc LAB_00154ffc: JMP 0x00154ffe LAB_00154ffe: MOV dword ptr [RBP + -0x214],0xffffffff JMP 0x0015501c LAB_0015500a: JMP 0x0015500c LAB_0015500c: JMP 0x0015500e LAB_0015500e: JMP 0x00155010 LAB_00155010: MOV EAX,dword ptr [RBP + -0x21c] MOV dword ptr [RBP + -0x214],EAX LAB_0015501c: MOV EAX,dword ptr [RBP + -0x214] MOV dword ptr [RBP + -0x224],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00155049 MOV EAX,dword ptr [RBP + -0x224] ADD RSP,0x230 POP RBP RET LAB_00155049: CALL 0x001272b0
int open_logfile_by_number_no_cache(int4 param_1) { int4 uVar1; int8 uVar2; long in_FS_OFFSET; int local_21c; int1 local_218 [520]; long local_10; uVar1 = key_file_translog; local_10 = *(long *)(in_FS_OFFSET + 0x28); uVar2 = translog_filename_by_fileno(param_1,local_218); local_21c = inline_mysql_file_open (uVar1, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_loghandler.c", 0x406,uVar2,DAT_00541fac | 0x80000,0x10); if (local_21c < 0) { local_21c = -1; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_21c; }
53,543
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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> 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>::string_t&)
monkey531[P]llama/common/json.hpp
inline void from_json(const BasicJsonType& j, typename BasicJsonType::string_t& s) { if (JSON_HEDLEY_UNLIKELY(!j.is_string())) { JSON_THROW(type_error::create(302, concat("type must be string, but is ", j.type_name()), &j)); } s = *j.template get_ptr<const typename BasicJsonType::string_t*>(); }
O3
cpp
void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::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> 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>::string_t&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x3, (%rdi) jne 0x8751c movq 0x8(%r14), %rax movq %rsi, %rdi movq %rax, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x1a4c0 movl $0x20, %edi callq 0x1a450 movq %rax, %rbx movq %r14, %rdi callq 0x5ebd0 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x6879d(%rip), %rsi # 0xefcdd leaq 0x10(%rsp), %rdi callq 0x866ad movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x12e, %esi # imm = 0x12E movq %r14, %rcx callq 0x864de xorl %ebp, %ebp leaq 0xa29ed(%rip), %rsi # 0x129f58 leaq -0x2c734(%rip), %rdx # 0x5ae3e movq %rbx, %rdi callq 0x1af40 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x87598 movq 0x20(%rsp), %rsi incq %rsi callq 0x1a8d0 testb %bpl, %bpl jne 0x875a2 jmp 0x875aa movq %rax, %r14 movq %rbx, %rdi callq 0x1a680 movq %r14, %rdi callq 0x1afc0
_ZN8nlohmann16json_abi_v3_11_36detail9from_jsonINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEEvRKT_RNSG_8string_tE: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 3 jnz short loc_8751C mov rax, [r14+8] mov rdi, rsi mov rsi, rax add rsp, 30h pop rbx pop r14 pop rbp jmp __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) loc_8751C: 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, aTypeMustBeStri; "type must be string, but is " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 12Eh; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_87598 mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_87598: test bpl, bpl jnz short loc_875A2 jmp short loc_875AA mov r14, rax loc_875A2: mov rdi, rbx; void * call ___cxa_free_exception loc_875AA: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _QWORD v5[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 3 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); 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>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"type must be string, but is ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 302, v5); __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 std::string::_M_assign(a2, *(_QWORD *)(a1 + 8)); }
from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x3 JNZ 0x0018751c MOV RAX,qword ptr [R14 + 0x8] MOV RDI,RSI MOV RSI,RAX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x0011a4c0 LAB_0018751c: MOV EDI,0x20 CALL 0x0011a450 MOV RBX,RAX MOV RDI,R14 CALL 0x0015ebd0 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00187539: LEA RSI,[0x1efcdd] LEA RDI,[RSP + 0x10] CALL 0x001866ad MOV BPL,0x1 LAB_0018754d: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x12e MOV RCX,R14 CALL 0x001864de XOR EBP,EBP LEA RSI,[0x229f58] LEA RDX,[0x15ae3e] MOV RDI,RBX CALL 0x0011af40
/* void nlohmann::json_abi_v3_11_3::detail::from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::string_t&) */ void nlohmann::json_abi_v3_11_3::detail:: from_json<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1,string_t *param_2) { int8 uVar1; char *local_40; detail local_38 [32]; if (*param_1 == (basic_json)0x3) { std::__cxx11::string::_M_assign((string *)param_2); return; } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)param_1); /* try { // try from 00187539 to 00187549 has its CatchHandler @ 0018759f */ concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"type must be string, but is ",&local_40); /* try { // try from 0018754d to 00187579 has its CatchHandler @ 0018757a */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x12e,local_38,param_1); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&type_error::typeinfo,exception::~exception); }
53,544
string_get_milliseconds
bluesky950520[P]quickjs/quickjs.c
static BOOL string_get_milliseconds(const uint8_t *sp, int *pp, int *pval) { /* parse optional fractional part as milliseconds and truncate. */ /* spec does not indicate which rounding should be used */ int mul = 100, ms = 0, c, p_start, p = *pp; c = sp[p]; if (c == '.' || c == ',') { p++; p_start = p; while ((c = sp[p]) >= '0' && c <= '9') { ms += (c - '0') * mul; mul /= 10; p++; if (p - p_start == 9) break; } if (p > p_start) { /* only consume the separator if digits are present */ *pval = ms; *pp = p; } } return TRUE; }
O0
c
string_get_milliseconds: movq %rdi, -0x8(%rsp) movq %rsi, -0x10(%rsp) movq %rdx, -0x18(%rsp) movl $0x64, -0x1c(%rsp) movl $0x0, -0x20(%rsp) movq -0x10(%rsp), %rax movl (%rax), %eax movl %eax, -0x2c(%rsp) movq -0x8(%rsp), %rax movslq -0x2c(%rsp), %rcx movzbl (%rax,%rcx), %eax movl %eax, -0x24(%rsp) cmpl $0x2e, -0x24(%rsp) je 0x9949e cmpl $0x2c, -0x24(%rsp) jne 0x99546 movl -0x2c(%rsp), %eax addl $0x1, %eax movl %eax, -0x2c(%rsp) movl -0x2c(%rsp), %eax movl %eax, -0x28(%rsp) movq -0x8(%rsp), %rax movslq -0x2c(%rsp), %rcx movzbl (%rax,%rcx), %ecx movl %ecx, -0x24(%rsp) xorl %eax, %eax cmpl $0x30, %ecx movb %al, -0x2d(%rsp) jl 0x994da cmpl $0x39, -0x24(%rsp) setle %al movb %al, -0x2d(%rsp) movb -0x2d(%rsp), %al testb $0x1, %al jne 0x994e4 jmp 0x99524 movl -0x24(%rsp), %eax subl $0x30, %eax imull -0x1c(%rsp), %eax addl -0x20(%rsp), %eax movl %eax, -0x20(%rsp) movl -0x1c(%rsp), %eax movl $0xa, %ecx cltd idivl %ecx movl %eax, -0x1c(%rsp) movl -0x2c(%rsp), %eax addl $0x1, %eax movl %eax, -0x2c(%rsp) movl -0x2c(%rsp), %eax subl -0x28(%rsp), %eax cmpl $0x9, %eax jne 0x99522 jmp 0x99524 jmp 0x994b1 movl -0x2c(%rsp), %eax cmpl -0x28(%rsp), %eax jle 0x99544 movl -0x20(%rsp), %ecx movq -0x18(%rsp), %rax movl %ecx, (%rax) movl -0x2c(%rsp), %ecx movq -0x10(%rsp), %rax movl %ecx, (%rax) jmp 0x99546 movl $0x1, %eax retq nopl (%rax)
string_get_milliseconds: mov [rsp+var_8], rdi mov [rsp+var_10], rsi mov [rsp+var_18], rdx mov [rsp+var_1C], 64h ; 'd' mov [rsp+var_20], 0 mov rax, [rsp+var_10] mov eax, [rax] mov [rsp+var_2C], eax mov rax, [rsp+var_8] movsxd rcx, [rsp+var_2C] movzx eax, byte ptr [rax+rcx] mov [rsp+var_24], eax cmp [rsp+var_24], 2Eh ; '.' jz short loc_9949E cmp [rsp+var_24], 2Ch ; ',' jnz loc_99546 loc_9949E: mov eax, [rsp+var_2C] add eax, 1 mov [rsp+var_2C], eax mov eax, [rsp+var_2C] mov [rsp+var_28], eax loc_994B1: mov rax, [rsp+var_8] movsxd rcx, [rsp+var_2C] movzx ecx, byte ptr [rax+rcx] mov [rsp+var_24], ecx xor eax, eax cmp ecx, 30h ; '0' mov [rsp+var_2D], al jl short loc_994DA cmp [rsp+var_24], 39h ; '9' setle al mov [rsp+var_2D], al loc_994DA: mov al, [rsp+var_2D] test al, 1 jnz short loc_994E4 jmp short loc_99524 loc_994E4: mov eax, [rsp+var_24] sub eax, 30h ; '0' imul eax, [rsp+var_1C] add eax, [rsp+var_20] mov [rsp+var_20], eax mov eax, [rsp+var_1C] mov ecx, 0Ah cdq idiv ecx mov [rsp+var_1C], eax mov eax, [rsp+var_2C] add eax, 1 mov [rsp+var_2C], eax mov eax, [rsp+var_2C] sub eax, [rsp+var_28] cmp eax, 9 jnz short loc_99522 jmp short loc_99524 loc_99522: jmp short loc_994B1 loc_99524: mov eax, [rsp+var_2C] cmp eax, [rsp+var_28] jle short loc_99544 mov ecx, [rsp+var_20] mov rax, [rsp+var_18] mov [rax], ecx mov ecx, [rsp+var_2C] mov rax, [rsp+var_10] mov [rax], ecx loc_99544: jmp short $+2 loc_99546: mov eax, 1 retn
long long string_get_milliseconds(long long a1, int *a2, _DWORD *a3) { bool v4; // [rsp+1h] [rbp-2Dh] int v5; // [rsp+2h] [rbp-2Ch] int v6; // [rsp+6h] [rbp-28h] int v7; // [rsp+Ah] [rbp-24h] int v8; // [rsp+Eh] [rbp-20h] int v9; // [rsp+12h] [rbp-1Ch] v9 = 100; v8 = 0; v7 = *(unsigned __int8 *)(a1 + *a2); if ( v7 == 46 || v7 == 44 ) { v5 = *a2 + 1; v6 = v5; do { v4 = 0; if ( *(unsigned __int8 *)(a1 + v5) >= 0x30u ) v4 = *(unsigned __int8 *)(a1 + v5) <= 0x39u; if ( !v4 ) break; v8 += v9 * (*(unsigned __int8 *)(a1 + v5) - 48); v9 /= 10; ++v5; } while ( v5 - v6 != 9 ); if ( v5 > v6 ) { *a3 = v8; *a2 = v5; } } return 1LL; }
string_get_milliseconds: MOV qword ptr [RSP + -0x8],RDI MOV qword ptr [RSP + -0x10],RSI MOV qword ptr [RSP + -0x18],RDX MOV dword ptr [RSP + -0x1c],0x64 MOV dword ptr [RSP + -0x20],0x0 MOV RAX,qword ptr [RSP + -0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RSP + -0x2c],EAX MOV RAX,qword ptr [RSP + -0x8] MOVSXD RCX,dword ptr [RSP + -0x2c] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RSP + -0x24],EAX CMP dword ptr [RSP + -0x24],0x2e JZ 0x0019949e CMP dword ptr [RSP + -0x24],0x2c JNZ 0x00199546 LAB_0019949e: MOV EAX,dword ptr [RSP + -0x2c] ADD EAX,0x1 MOV dword ptr [RSP + -0x2c],EAX MOV EAX,dword ptr [RSP + -0x2c] MOV dword ptr [RSP + -0x28],EAX LAB_001994b1: MOV RAX,qword ptr [RSP + -0x8] MOVSXD RCX,dword ptr [RSP + -0x2c] MOVZX ECX,byte ptr [RAX + RCX*0x1] MOV dword ptr [RSP + -0x24],ECX XOR EAX,EAX CMP ECX,0x30 MOV byte ptr [RSP + -0x2d],AL JL 0x001994da CMP dword ptr [RSP + -0x24],0x39 SETLE AL MOV byte ptr [RSP + -0x2d],AL LAB_001994da: MOV AL,byte ptr [RSP + -0x2d] TEST AL,0x1 JNZ 0x001994e4 JMP 0x00199524 LAB_001994e4: MOV EAX,dword ptr [RSP + -0x24] SUB EAX,0x30 IMUL EAX,dword ptr [RSP + -0x1c] ADD EAX,dword ptr [RSP + -0x20] MOV dword ptr [RSP + -0x20],EAX MOV EAX,dword ptr [RSP + -0x1c] MOV ECX,0xa CDQ IDIV ECX MOV dword ptr [RSP + -0x1c],EAX MOV EAX,dword ptr [RSP + -0x2c] ADD EAX,0x1 MOV dword ptr [RSP + -0x2c],EAX MOV EAX,dword ptr [RSP + -0x2c] SUB EAX,dword ptr [RSP + -0x28] CMP EAX,0x9 JNZ 0x00199522 JMP 0x00199524 LAB_00199522: JMP 0x001994b1 LAB_00199524: MOV EAX,dword ptr [RSP + -0x2c] CMP EAX,dword ptr [RSP + -0x28] JLE 0x00199544 MOV ECX,dword ptr [RSP + -0x20] MOV RAX,qword ptr [RSP + -0x18] MOV dword ptr [RAX],ECX MOV ECX,dword ptr [RSP + -0x2c] MOV RAX,qword ptr [RSP + -0x10] MOV dword ptr [RAX],ECX LAB_00199544: JMP 0x00199546 LAB_00199546: MOV EAX,0x1 RET
int1 [16] string_get_milliseconds(long param_1,int *param_2,int *param_3) { char cVar1; long lVar2; int iVar3; uint uVar4; int *piVar5; int1 auVar6 [16]; int local_2c; int local_20; int local_1c; local_1c = 100; local_20 = 0; cVar1 = *(char *)(param_1 + *param_2); piVar5 = param_3; if ((cVar1 == '.') || (cVar1 == ',')) { iVar3 = *param_2 + 1; local_2c = iVar3; do { uVar4 = (uint)*(byte *)(param_1 + local_2c); if (uVar4 < 0x30 || 0x39 < uVar4) break; local_20 = (uVar4 - 0x30) * local_1c + local_20; lVar2 = (long)local_1c; local_1c = local_1c / 10; piVar5 = (int *)(lVar2 % 10 & 0xffffffff); local_2c = local_2c + 1; } while (local_2c - iVar3 != 9); if (iVar3 < local_2c) { *param_3 = local_20; *param_2 = local_2c; } } auVar6._8_8_ = piVar5; auVar6._0_8_ = 1; return auVar6; }
53,545
string_get_milliseconds
bluesky950520[P]quickjs/quickjs.c
static BOOL string_get_milliseconds(const uint8_t *sp, int *pp, int *pval) { /* parse optional fractional part as milliseconds and truncate. */ /* spec does not indicate which rounding should be used */ int mul = 100, ms = 0, c, p_start, p = *pp; c = sp[p]; if (c == '.' || c == ',') { p++; p_start = p; while ((c = sp[p]) >= '0' && c <= '9') { ms += (c - '0') * mul; mul /= 10; p++; if (p - p_start == 9) break; } if (p > p_start) { /* only consume the separator if digits are present */ *pval = ms; *pp = p; } } return TRUE; }
O1
c
string_get_milliseconds: movslq (%rsi), %rax movb (%rdi,%rax), %cl andb $-0x3, %cl cmpb $0x2c, %cl jne 0x574f6 pushq %rbx leal 0x1(%rax), %ecx movslq %ecx, %r8 addl $0xa, %eax addq %r8, %rdi movl $0x64, %r10d xorl %r9d, %r9d xorl %r8d, %r8d movzbl (%rdi,%r9), %r11d leal -0x30(%r11), %ebx cmpb $0x9, %bl ja 0x574e6 addl $-0x30, %r11d imull %r10d, %r11d addl %r11d, %r8d movslq %r10d, %r10 imulq $0x66666667, %r10, %r10 # imm = 0x66666667 movq %r10, %r11 shrq $0x3f, %r11 sarq $0x22, %r10 addl %r11d, %r10d incq %r9 cmpl $0x9, %r9d jne 0x574aa jmp 0x574ec addl %ecx, %r9d movl %r9d, %eax cmpl %ecx, %eax jle 0x574f5 movl %r8d, (%rdx) movl %eax, (%rsi) popq %rbx retq
string_get_milliseconds: movsxd rax, dword ptr [rsi] mov cl, [rdi+rax] and cl, 0FDh cmp cl, 2Ch ; ',' jnz short locret_574F6 push rbx lea ecx, [rax+1] movsxd r8, ecx add eax, 0Ah add rdi, r8 mov r10d, 64h ; 'd' xor r9d, r9d xor r8d, r8d loc_574AA: movzx r11d, byte ptr [rdi+r9] lea ebx, [r11-30h] cmp bl, 9 ja short loc_574E6 add r11d, 0FFFFFFD0h imul r11d, r10d add r8d, r11d movsxd r10, r10d imul r10, 66666667h mov r11, r10 shr r11, 3Fh sar r10, 22h add r10d, r11d inc r9 cmp r9d, 9 jnz short loc_574AA jmp short loc_574EC loc_574E6: add r9d, ecx mov eax, r9d loc_574EC: cmp eax, ecx jle short loc_574F5 mov [rdx], r8d mov [rsi], eax loc_574F5: pop rbx locret_574F6: retn
long long string_get_milliseconds(long long a1, int *a2, _DWORD *a3) { long long result; // rax int v4; // ecx long long v5; // rdi int v6; // r10d long long v7; // r9 int v8; // r8d int v9; // r11d result = *a2; if ( (*(_BYTE *)(a1 + result) & 0xFD) == 0x2C ) { v4 = result + 1; result = (unsigned int)(result + 10); v5 = v4 + a1; v6 = 100; v7 = 0LL; v8 = 0; while ( 1 ) { v9 = *(unsigned __int8 *)(v5 + v7); if ( (unsigned __int8)(v9 - 48) > 9u ) break; v8 += v6 * (v9 - 48); v6 /= 10; if ( (_DWORD)++v7 == 9 ) goto LABEL_7; } result = (unsigned int)(v4 + v7); LABEL_7: if ( (int)result > v4 ) { *a3 = v8; *a2 = result; } } return result; }
string_get_milliseconds: MOVSXD RAX,dword ptr [RSI] MOV CL,byte ptr [RDI + RAX*0x1] AND CL,0xfd CMP CL,0x2c JNZ 0x001574f6 PUSH RBX LEA ECX,[RAX + 0x1] MOVSXD R8,ECX ADD EAX,0xa ADD RDI,R8 MOV R10D,0x64 XOR R9D,R9D XOR R8D,R8D LAB_001574aa: MOVZX R11D,byte ptr [RDI + R9*0x1] LEA EBX,[R11 + -0x30] CMP BL,0x9 JA 0x001574e6 ADD R11D,-0x30 IMUL R11D,R10D ADD R8D,R11D MOVSXD R10,R10D IMUL R10,R10,0x66666667 MOV R11,R10 SHR R11,0x3f SAR R10,0x22 ADD R10D,R11D INC R9 CMP R9D,0x9 JNZ 0x001574aa JMP 0x001574ec LAB_001574e6: ADD R9D,ECX MOV EAX,R9D LAB_001574ec: CMP EAX,ECX JLE 0x001574f5 MOV dword ptr [RDX],R8D MOV dword ptr [RSI],EAX LAB_001574f5: POP RBX LAB_001574f6: RET
void string_get_milliseconds(long param_1,int *param_2,int *param_3) { byte bVar1; int iVar2; int iVar3; int iVar4; long lVar5; int iVar6; iVar2 = *param_2; if ((*(byte *)(param_1 + iVar2) & 0xfd) == 0x2c) { iVar3 = iVar2 + 1; iVar2 = iVar2 + 10; iVar6 = 100; lVar5 = 0; iVar4 = 0; do { bVar1 = *(byte *)(param_1 + iVar3 + lVar5); if (9 < (byte)(bVar1 - 0x30)) { iVar2 = (int)lVar5 + iVar3; break; } iVar4 = iVar4 + (bVar1 - 0x30) * iVar6; iVar6 = iVar6 / 10; lVar5 = lVar5 + 1; } while ((int)lVar5 != 9); if (iVar3 < iVar2) { *param_3 = iVar4; *param_2 = iVar2; } } return; }
53,546
my_xml_leave
eloqsql/strings/xml.c
static int my_xml_leave(MY_XML_PARSER *p, const char *str, size_t slen) { char *e, *tag; size_t glen; char s[32]; char g[32]; int rc; /* Find previous '/' or beginning */ for (e= p->attr.end; (e > p->attr.start) && (e[0] != '/') ; e--); glen= (size_t) ((e[0] == '/') ? (p->attr.end - e - 1) : p->attr.end - e); tag= e[0] == '/' ? e + 1 : e; if (str && (slen != glen || memcmp(str, tag, slen))) { mstr(s,str,sizeof(s)-1,slen); if (glen) { mstr(g, tag, sizeof(g)-1, glen); sprintf(p->errstr,"'</%s>' unexpected ('</%s>' wanted)",s,g); } else sprintf(p->errstr,"'</%s>' unexpected (END-OF-INPUT wanted)", s); return MY_XML_ERROR; } if (p->flags & MY_XML_FLAG_RELATIVE_NAMES) rc= p->leave_xml ? p->leave_xml(p, str, slen) : MY_XML_OK; else rc= (p->leave_xml ? p->leave_xml(p, p->attr.start, p->attr.end - p->attr.start) : MY_XML_OK); *e='\0'; p->attr.end= e; return rc; }
O3
c
my_xml_leave: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %rdx, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movq 0x118(%rdi), %r13 movq 0x120(%rdi), %rax movq %rax, %rdx movq %rax, %r12 subq %r13, %rdx movq %rdi, -0x78(%rbp) jbe 0x5e8cc movq %rax, %r12 cmpb $0x2f, (%r12) je 0x5e8d3 decq %r12 cmpq %r13, %r12 ja 0x5e8ba movq %r13, %r12 cmpb $0x2f, (%r12) jne 0x5e8e4 movq %r12, %rbx notq %rbx addq %rax, %rbx movl $0x1, %r15d jmp 0x5e8ed subq %r12, %rax xorl %r15d, %r15d movq %rax, %rbx testq %rsi, %rsi je 0x5e9ac addq %r12, %r15 cmpq %r14, %rbx jne 0x5e92a movq %rsi, %rdi movq %rsi, -0x88(%rbp) movq %r15, %rsi movq %rdx, -0x80(%rbp) movq %r14, %rdx callq 0x242d0 movq -0x80(%rbp), %rdx movq -0x88(%rbp), %rsi testl %eax, %eax je 0x5e9ac cmpq $0x1f, %r14 movl $0x1f, %r12d cmovaeq %r12, %r14 leaq -0x50(%rbp), %rdi movl $0x20, %ecx movq %r14, %rdx callq 0x245c0 movb $0x0, -0x50(%rbp,%r14) testq %rbx, %rbx je 0x5e9db cmpq $0x1f, %rbx cmovbq %rbx, %r12 leaq -0x70(%rbp), %r13 movl $0x20, %ecx movq %r13, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x245c0 movb $0x0, -0x70(%rbp,%r12) movq -0x78(%rbp), %rdi addq $0x8, %rdi leaq 0x6055(%rip), %rcx # 0x649e1 movl $0x1, %r14d leaq -0x50(%rbp), %r8 movl $0x80, %edx movl $0x1, %esi movq %r13, %r9 xorl %eax, %eax callq 0x241c0 jmp 0x5ea16 movq -0x78(%rbp), %rbx testb $0x1, (%rbx) movq 0x158(%rbx), %rax jne 0x5e9c9 testq %rax, %rax je 0x5ea07 movq %rbx, %rdi movq %r13, %rsi jmp 0x5e9d4 testq %rax, %rax je 0x5ea07 movq %rbx, %rdi movq %r14, %rdx callq *%rax movl %eax, %r14d jmp 0x5ea0a movq -0x78(%rbp), %rdi addq $0x8, %rdi leaq 0x601b(%rip), %rcx # 0x64a05 movl $0x1, %r14d leaq -0x50(%rbp), %r8 movl $0x80, %edx movl $0x1, %esi xorl %eax, %eax callq 0x241c0 jmp 0x5ea16 xorl %r14d, %r14d movb $0x0, (%r12) movq %r12, 0x120(%rbx) movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x5ea37 movl %r14d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24350
my_xml_leave: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r14, rdx mov rax, fs:28h mov [rbp+var_30], rax mov r13, [rdi+118h] mov rax, [rdi+120h] mov rdx, rax mov r12, rax sub rdx, r13 mov [rbp+var_78], rdi jbe short loc_5E8CC mov r12, rax loc_5E8BA: cmp byte ptr [r12], 2Fh ; '/' jz short loc_5E8D3 dec r12 cmp r12, r13 ja short loc_5E8BA mov r12, r13 loc_5E8CC: cmp byte ptr [r12], 2Fh ; '/' jnz short loc_5E8E4 loc_5E8D3: mov rbx, r12 not rbx add rbx, rax mov r15d, 1 jmp short loc_5E8ED loc_5E8E4: sub rax, r12 xor r15d, r15d mov rbx, rax loc_5E8ED: test rsi, rsi jz loc_5E9AC add r15, r12 cmp rbx, r14 jnz short loc_5E92A mov rdi, rsi mov [rbp+var_88], rsi mov rsi, r15 mov [rbp+var_80], rdx mov rdx, r14 call _bcmp mov rdx, [rbp+var_80] mov rsi, [rbp+var_88] test eax, eax jz loc_5E9AC loc_5E92A: cmp r14, 1Fh mov r12d, 1Fh cmovnb r14, r12 lea rdi, [rbp+var_50] mov ecx, 20h ; ' ' mov rdx, r14 call ___memcpy_chk mov [rbp+r14+var_50], 0 test rbx, rbx jz loc_5E9DB cmp rbx, 1Fh cmovb r12, rbx lea r13, [rbp+var_70] mov ecx, 20h ; ' ' mov rdi, r13 mov rsi, r15 mov rdx, r12 call ___memcpy_chk mov [rbp+r12+var_70], 0 mov rdi, [rbp+var_78] add rdi, 8 lea rcx, aSUnexpectedSWa; "'</%s>' unexpected ('</%s>' wanted)" mov r14d, 1 lea r8, [rbp+var_50] mov edx, 80h mov esi, 1 mov r9, r13 xor eax, eax call ___sprintf_chk jmp short loc_5EA16 loc_5E9AC: mov rbx, [rbp+var_78] test byte ptr [rbx], 1 mov rax, [rbx+158h] jnz short loc_5E9C9 test rax, rax jz short loc_5EA07 mov rdi, rbx mov rsi, r13 jmp short loc_5E9D4 loc_5E9C9: test rax, rax jz short loc_5EA07 mov rdi, rbx mov rdx, r14 loc_5E9D4: call rax mov r14d, eax jmp short loc_5EA0A loc_5E9DB: mov rdi, [rbp+var_78] add rdi, 8 lea rcx, aSUnexpectedEnd; "'</%s>' unexpected (END-OF-INPUT wanted"... mov r14d, 1 lea r8, [rbp+var_50] mov edx, 80h mov esi, 1 xor eax, eax call ___sprintf_chk jmp short loc_5EA16 loc_5EA07: xor r14d, r14d loc_5EA0A: mov byte ptr [r12], 0 mov [rbx+120h], r12 loc_5EA16: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_5EA37 mov eax, r14d add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5EA37: call ___stack_chk_fail
long long my_xml_leave(long long a1, unsigned long long a2, unsigned long long a3) { unsigned long long v4; // r13 _BYTE *v5; // rax unsigned long long v6; // r12 unsigned long long v7; // rdx unsigned long long v8; // rbx long long v9; // r15 _BYTE *v10; // r15 int v11; // eax long long v12; // r12 unsigned int v13; // r14d long long ( *v14)(long long, unsigned long long, unsigned long long); // rax _BYTE *v16; // [rsp+10h] [rbp-80h] char v17[32]; // [rsp+20h] [rbp-70h] BYREF char v18[32]; // [rsp+40h] [rbp-50h] BYREF unsigned long long v19; // [rsp+60h] [rbp-30h] v19 = __readfsqword(0x28u); v4 = *(_QWORD *)(a1 + 280); v5 = *(_BYTE **)(a1 + 288); v6 = (unsigned long long)v5; v7 = (unsigned long long)&v5[-v4]; if ( (unsigned long long)v5 <= v4 ) { LABEL_6: if ( *(_BYTE *)v6 != 47 ) { v9 = 0LL; v8 = (unsigned long long)&v5[-v6]; goto LABEL_9; } } else { v6 = *(_QWORD *)(a1 + 288); while ( *(_BYTE *)v6 != 47 ) { if ( --v6 <= v4 ) { v6 = *(_QWORD *)(a1 + 280); goto LABEL_6; } } } v8 = (unsigned long long)&v5[~v6]; v9 = 1LL; LABEL_9: if ( !a2 || (v10 = (_BYTE *)(v6 + v9), v8 == a3) && (v16 = &v5[-v4], v11 = bcmp(a2, v10, a3), v7 = (unsigned long long)v16, !v11) ) { v14 = *(long long ( **)(long long, unsigned long long, unsigned long long))(a1 + 344); if ( (*(_BYTE *)a1 & 1) != 0 ) { if ( v14 ) { v7 = a3; goto LABEL_23; } } else if ( v14 ) { a2 = v4; LABEL_23: v13 = v14(a1, a2, v7); LABEL_26: *(_BYTE *)v6 = 0; *(_QWORD *)(a1 + 288) = v6; return v13; } v13 = 0; goto LABEL_26; } v12 = 31LL; if ( a3 >= 0x1F ) a3 = 31LL; __memcpy_chk(v18, a2, a3, 32LL); v18[a3] = 0; if ( v8 ) { if ( v8 < 0x1F ) v12 = v8; __memcpy_chk(v17, v10, v12, 32LL); v17[v12] = 0; v13 = 1; __sprintf_chk(a1 + 8, 1LL, 128LL, "'</%s>' unexpected ('</%s>' wanted)", v18, v17); } else { v13 = 1; __sprintf_chk(a1 + 8, 1LL, 128LL, "'</%s>' unexpected (END-OF-INPUT wanted)", v18); } return v13; }
my_xml_leave: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,RDX MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R13,qword ptr [RDI + 0x118] MOV RAX,qword ptr [RDI + 0x120] MOV RDX,RAX MOV R12,RAX SUB RDX,R13 MOV qword ptr [RBP + -0x78],RDI JBE 0x0015e8cc MOV R12,RAX LAB_0015e8ba: CMP byte ptr [R12],0x2f JZ 0x0015e8d3 DEC R12 CMP R12,R13 JA 0x0015e8ba MOV R12,R13 LAB_0015e8cc: CMP byte ptr [R12],0x2f JNZ 0x0015e8e4 LAB_0015e8d3: MOV RBX,R12 NOT RBX ADD RBX,RAX MOV R15D,0x1 JMP 0x0015e8ed LAB_0015e8e4: SUB RAX,R12 XOR R15D,R15D MOV RBX,RAX LAB_0015e8ed: TEST RSI,RSI JZ 0x0015e9ac ADD R15,R12 CMP RBX,R14 JNZ 0x0015e92a MOV RDI,RSI MOV qword ptr [RBP + -0x88],RSI MOV RSI,R15 MOV qword ptr [RBP + -0x80],RDX MOV RDX,R14 CALL 0x001242d0 MOV RDX,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x88] TEST EAX,EAX JZ 0x0015e9ac LAB_0015e92a: CMP R14,0x1f MOV R12D,0x1f CMOVNC R14,R12 LEA RDI,[RBP + -0x50] MOV ECX,0x20 MOV RDX,R14 CALL 0x001245c0 MOV byte ptr [RBP + R14*0x1 + -0x50],0x0 TEST RBX,RBX JZ 0x0015e9db CMP RBX,0x1f CMOVC R12,RBX LEA R13,[RBP + -0x70] MOV ECX,0x20 MOV RDI,R13 MOV RSI,R15 MOV RDX,R12 CALL 0x001245c0 MOV byte ptr [RBP + R12*0x1 + -0x70],0x0 MOV RDI,qword ptr [RBP + -0x78] ADD RDI,0x8 LEA RCX,[0x1649e1] MOV R14D,0x1 LEA R8,[RBP + -0x50] MOV EDX,0x80 MOV ESI,0x1 MOV R9,R13 XOR EAX,EAX CALL 0x001241c0 JMP 0x0015ea16 LAB_0015e9ac: MOV RBX,qword ptr [RBP + -0x78] TEST byte ptr [RBX],0x1 MOV RAX,qword ptr [RBX + 0x158] JNZ 0x0015e9c9 TEST RAX,RAX JZ 0x0015ea07 MOV RDI,RBX MOV RSI,R13 JMP 0x0015e9d4 LAB_0015e9c9: TEST RAX,RAX JZ 0x0015ea07 MOV RDI,RBX MOV RDX,R14 LAB_0015e9d4: CALL RAX MOV R14D,EAX JMP 0x0015ea0a LAB_0015e9db: MOV RDI,qword ptr [RBP + -0x78] ADD RDI,0x8 LEA RCX,[0x164a05] MOV R14D,0x1 LEA R8,[RBP + -0x50] MOV EDX,0x80 MOV ESI,0x1 XOR EAX,EAX CALL 0x001241c0 JMP 0x0015ea16 LAB_0015ea07: XOR R14D,R14D LAB_0015ea0a: MOV byte ptr [R12],0x0 MOV qword ptr [RBX + 0x120],R12 LAB_0015ea16: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0015ea37 MOV EAX,R14D ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015ea37: CALL 0x00124350
int4 my_xml_leave(byte *param_1,char *param_2,char *param_3) { code *pcVar1; int iVar2; int4 uVar3; char *pcVar4; ulong uVar5; char *pcVar6; char *pcVar7; char *pcVar8; char *pcVar9; long lVar10; long in_FS_OFFSET; char local_78 [32]; char local_58 [32]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); pcVar7 = *(char **)(param_1 + 0x118); pcVar6 = *(char **)(param_1 + 0x120); pcVar4 = pcVar6 + -(long)pcVar7; pcVar9 = pcVar6; pcVar8 = pcVar6; if (pcVar7 <= pcVar6 && pcVar4 != (char *)0x0) { do { pcVar9 = pcVar8; if (*pcVar8 == '/') goto LAB_0015e8d3; pcVar8 = pcVar8 + -1; pcVar9 = pcVar7; } while (pcVar7 < pcVar8); } if (*pcVar9 == '/') { LAB_0015e8d3: uVar5 = ~(ulong)pcVar9; lVar10 = 1; } else { uVar5 = -(long)pcVar9; lVar10 = 0; } pcVar6 = pcVar6 + uVar5; if ((param_2 != (char *)0x0) && ((pcVar6 != param_3 || (iVar2 = bcmp(param_2,pcVar9 + lVar10,(size_t)param_3), iVar2 != 0)))) { if ((char *)0x1e < param_3) { param_3 = (char *)0x1f; } __memcpy_chk(local_58,param_2,param_3,0x20); local_58[(long)param_3] = '\0'; if (pcVar6 == (char *)0x0) { uVar3 = 1; __sprintf_chk(param_1 + 8,1,0x80,"\'</%s>\' unexpected (END-OF-INPUT wanted)",local_58); } else { pcVar7 = (char *)0x1f; if (pcVar6 < (char *)0x1f) { pcVar7 = pcVar6; } __memcpy_chk(local_78,pcVar9 + lVar10,pcVar7,0x20); local_78[(long)pcVar7] = '\0'; uVar3 = 1; __sprintf_chk(param_1 + 8,1,0x80,"\'</%s>\' unexpected (\'</%s>\' wanted)",local_58,local_78); } goto LAB_0015ea16; } pcVar1 = *(code **)(param_1 + 0x158); if ((*param_1 & 1) == 0) { if (pcVar1 == (code *)0x0) goto LAB_0015ea07; LAB_0015e9d4: uVar3 = (*pcVar1)(param_1,pcVar7,pcVar4); } else { pcVar4 = param_3; pcVar7 = param_2; if (pcVar1 != (code *)0x0) goto LAB_0015e9d4; LAB_0015ea07: uVar3 = 0; } *pcVar9 = '\0'; *(char **)(param_1 + 0x120) = pcVar9; LAB_0015ea16: if (*(long *)(in_FS_OFFSET + 0x28) != local_38) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return uVar3; }
53,547
my_hash_init2
eloqsql/mysys/hash.c
my_bool my_hash_init2(PSI_memory_key psi_key, HASH *hash, uint growth_size, CHARSET_INFO *charset, ulong size, size_t key_offset, size_t key_length, my_hash_get_key get_key, my_hash_function hash_function, void (*free_element)(void*), uint flags) { my_bool res; DBUG_ENTER("my_hash_init2"); DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size)); hash->records=0; hash->key_offset=key_offset; hash->key_length=key_length; hash->blength=1; hash->get_key=get_key; hash->hash_function= hash_function ? hash_function : my_hash_sort; hash->free=free_element; hash->flags=flags; hash->charset=charset; res= init_dynamic_array2(psi_key, &hash->array, sizeof(HASH_LINK), NULL, size, growth_size, MYF((flags & HASH_THREAD_SPECIFIC ? MY_THREAD_SPECIFIC : 0))); DBUG_RETURN(res); }
O3
c
my_hash_init2: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movl %edx, %eax movl 0x30(%rbp), %edx movq 0x28(%rbp), %r10 movq 0x20(%rbp), %r11 movq 0x18(%rbp), %rbx movq 0x10(%rbp), %r14 movq $0x0, 0x18(%rsi) movq %r9, (%rsi) movq %r14, 0x8(%rsi) movq $0x1, 0x10(%rsi) movq %rbx, 0x50(%rsi) testq %r11, %r11 jne 0x2fb30 leaq -0x7c(%rip), %r11 # 0x2fab4 movq %r11, 0x58(%rsi) movq %r10, 0x60(%rsi) movl %edx, 0x20(%rsi) movq %rcx, 0x68(%rsi) addq $0x28, %rsi andl $0x2, %edx shll $0xf, %edx movq %rdx, (%rsp) movl $0x10, %edx xorl %ecx, %ecx movl %eax, %r9d callq 0x329dc addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq
my_hash_init2: push rbp mov rbp, rsp push r14 push rbx sub rsp, 10h mov eax, edx mov edx, [rbp+arg_20] mov r10, [rbp+arg_18] mov r11, [rbp+arg_10] mov rbx, [rbp+arg_8] mov r14, [rbp+arg_0] mov qword ptr [rsi+18h], 0 mov [rsi], r9 mov [rsi+8], r14 mov qword ptr [rsi+10h], 1 mov [rsi+50h], rbx test r11, r11 jnz short loc_2FB30 lea r11, my_hash_sort loc_2FB30: mov [rsi+58h], r11 mov [rsi+60h], r10 mov [rsi+20h], edx mov [rsi+68h], rcx add rsi, 28h ; '(' and edx, 2 shl edx, 0Fh mov [rsp+20h+var_20], rdx mov edx, 10h xor ecx, ecx mov r9d, eax call init_dynamic_array2 add rsp, 10h pop rbx pop r14 pop rbp retn
long long my_hash_init2( int a1, long long a2, int a3, long long a4, int a5, long long a6, long long a7, long long a8, long long ( *a9)(long long a1, long long a2, long long a3), long long a10, int a11) { long long ( *v11)(long long, long long, long long); // r11 v11 = a9; *(_QWORD *)(a2 + 24) = 0LL; *(_QWORD *)a2 = a6; *(_QWORD *)(a2 + 8) = a7; *(_QWORD *)(a2 + 16) = 1LL; *(_QWORD *)(a2 + 80) = a8; if ( !a9 ) v11 = my_hash_sort; *(_QWORD *)(a2 + 88) = v11; *(_QWORD *)(a2 + 96) = a10; *(_DWORD *)(a2 + 32) = a11; *(_QWORD *)(a2 + 104) = a4; return init_dynamic_array2(a1, (int)a2 + 40, 16, 0, a5, a3, (unsigned __int8)(a11 & 2) << 15); }
my_hash_init2: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x10 MOV EAX,EDX MOV EDX,dword ptr [RBP + 0x30] MOV R10,qword ptr [RBP + 0x28] MOV R11,qword ptr [RBP + 0x20] MOV RBX,qword ptr [RBP + 0x18] MOV R14,qword ptr [RBP + 0x10] MOV qword ptr [RSI + 0x18],0x0 MOV qword ptr [RSI],R9 MOV qword ptr [RSI + 0x8],R14 MOV qword ptr [RSI + 0x10],0x1 MOV qword ptr [RSI + 0x50],RBX TEST R11,R11 JNZ 0x0012fb30 LEA R11,[0x12fab4] LAB_0012fb30: MOV qword ptr [RSI + 0x58],R11 MOV qword ptr [RSI + 0x60],R10 MOV dword ptr [RSI + 0x20],EDX MOV qword ptr [RSI + 0x68],RCX ADD RSI,0x28 AND EDX,0x2 SHL EDX,0xf MOV qword ptr [RSP],RDX MOV EDX,0x10 XOR ECX,ECX MOV R9D,EAX CALL 0x001329dc ADD RSP,0x10 POP RBX POP R14 POP RBP RET
void my_hash_init2(int8 param_1,int8 *param_2,int4 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, code *param_9,int8 param_10,uint param_11) { param_2[3] = 0; *param_2 = param_6; param_2[1] = param_7; param_2[2] = 1; param_2[10] = param_8; if (param_9 == (code *)0x0) { param_9 = my_hash_sort; } param_2[0xb] = param_9; param_2[0xc] = param_10; *(uint *)(param_2 + 4) = param_11; param_2[0xd] = param_4; init_dynamic_array2(param_1,param_2 + 5,0x10,0,param_5,param_3,(param_11 & 2) << 0xf); return; }
53,548
recv_sys_t::create()
eloqsql/storage/innobase/log/log0recv.cc
void recv_sys_t::create() { ut_ad(this == &recv_sys); ut_ad(!is_initialised()); mysql_mutex_init(recv_sys_mutex_key, &mutex, nullptr); pthread_cond_init(&cond, nullptr); apply_log_recs = false; apply_batch_on = false; buf = static_cast<byte*>(ut_malloc_dontdump(RECV_PARSING_BUF_SIZE, PSI_INSTRUMENT_ME)); len = 0; parse_start_lsn = 0; scanned_lsn = 0; scanned_checkpoint_no = 0; recovered_offset = 0; recovered_lsn = 0; found_corrupt_log = false; found_corrupt_fs = false; mlog_checkpoint_lsn = 0; progress_time = time(NULL); recv_max_page_lsn = 0; memset(truncated_undo_spaces, 0, sizeof truncated_undo_spaces); last_stored_lsn = 1; UT_LIST_INIT(blocks, &buf_block_t::unzip_LRU); }
O0
cpp
recv_sys_t::create(): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x102fc36 jmp 0x102fc38 jmp 0x102fc3a movq -0x18(%rbp), %rsi leaq 0x1522857(%rip), %rax # 0x255249c movl (%rax), %edi xorl %eax, %eax movl %eax, %edx callq 0x102fd70 movq -0x18(%rbp), %rdi addq $0x48, %rdi xorl %eax, %eax movl %eax, %esi callq 0x759830 movq -0x18(%rbp), %rax movb $0x0, 0x7c(%rax) movb $0x0, 0x78(%rax) leaq -0xc(%rbp), %rdi xorl %esi, %esi callq 0xfc4360 leaq -0xc(%rbp), %rdi movl $0x200000, %esi # imm = 0x200000 xorl %eax, %eax movl %eax, %edx movl $0x1, %ecx callq 0x102ce00 movq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, 0x80(%rax) movq $0x0, 0x88(%rax) movq $0x0, 0x90(%rax) movq $0x0, 0x98(%rax) movq $0x0, 0xa0(%rax) movq $0x0, 0xa8(%rax) movq $0x0, 0xb0(%rax) movb $0x0, 0x79(%rax) movb $0x0, 0x7a(%rax) movq $0x0, 0xb8(%rax) xorl %eax, %eax movl %eax, %edi callq 0x759d90 movq -0x18(%rbp), %rdi movq %rax, 0xc0(%rdi) movq $0x0, 0x15286f7(%rip) # 0x2558408 addq $0xf8, %rdi xorl %esi, %esi movl $0x7f0, %edx # imm = 0x7F0 callq 0x7584b0 movq -0x18(%rbp), %rax movq $0x1, 0x940(%rax) movq $0x0, 0x960(%rax) movq $0x0, 0x968(%rax) movq $0x0, 0x970(%rax) movq $0x70, 0x978(%rax) addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN10recv_sys_t6createEv: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_18], rax jmp short $+2 loc_102FC36: jmp short $+2 loc_102FC38: jmp short $+2 loc_102FC3A: mov rsi, [rbp+var_18] lea rax, recv_sys_mutex_key mov edi, [rax] xor eax, eax mov edx, eax call _ZL23inline_mysql_mutex_initjP14st_mysql_mutexPK19pthread_mutexattr_t_36; inline_mysql_mutex_init(uint,st_mysql_mutex *,pthread_mutexattr_t const*) mov rdi, [rbp+var_18] add rdi, 48h ; 'H' xor eax, eax mov esi, eax call _pthread_cond_init mov rax, [rbp+var_18] mov byte ptr [rax+7Ch], 0 mov byte ptr [rax+78h], 0 lea rdi, [rbp+var_C] xor esi, esi call _ZN12ut_allocatorIhLb1EEC2Ej; ut_allocator<uchar,true>::ut_allocator(uint) lea rdi, [rbp+var_C] mov esi, offset aZn25sqlCmdShow_1; "_ZN25Sql_cmd_show_slave_statusC2Eb" xor eax, eax mov edx, eax mov ecx, 1 call _ZN12ut_allocatorIhLb1EE14allocate_largeEmP12ut_new_pfx_tb; ut_allocator<uchar,true>::allocate_large(ulong,ut_new_pfx_t *,bool) mov rcx, rax mov rax, [rbp+var_18] mov [rax+80h], rcx mov qword ptr [rax+88h], 0 mov qword ptr [rax+90h], 0 mov qword ptr [rax+98h], 0 mov qword ptr [rax+0A0h], 0 mov qword ptr [rax+0A8h], 0 mov qword ptr [rax+0B0h], 0 mov byte ptr [rax+79h], 0 mov byte ptr [rax+7Ah], 0 mov qword ptr [rax+0B8h], 0 xor eax, eax mov edi, eax call _time mov rdi, [rbp+var_18] mov [rdi+0C0h], rax mov cs:_ZL17recv_max_page_lsn, 0; recv_max_page_lsn add rdi, 0F8h xor esi, esi mov edx, 7F0h call _memset mov rax, [rbp+var_18] mov qword ptr [rax+940h], 1 mov qword ptr [rax+960h], 0 mov qword ptr [rax+968h], 0 mov qword ptr [rax+970h], 0 mov qword ptr [rax+978h], 70h ; 'p' add rsp, 20h pop rbp retn
recv_sys_t * recv_sys_t::create(recv_sys_t *this) { recv_sys_t *result; // rax int v2; // [rsp+14h] [rbp-Ch] BYREF recv_sys_t *v3; // [rsp+18h] [rbp-8h] v3 = this; inline_mysql_mutex_init(recv_sys_mutex_key, this, 0LL); pthread_cond_init((char *)this + 72, 0LL); *((_BYTE *)this + 124) = 0; *((_BYTE *)this + 120) = 0; ut_allocator<unsigned char,true>::ut_allocator(&v2, 0); *((_QWORD *)this + 16) = ut_allocator<unsigned char,true>::allocate_large( (long long)&v2, (unsigned long long)"_ZN25Sql_cmd_show_slave_statusC2Eb", 0LL, 1); *((_QWORD *)this + 17) = 0LL; *((_QWORD *)this + 18) = 0LL; *((_QWORD *)this + 19) = 0LL; *((_QWORD *)this + 20) = 0LL; *((_QWORD *)this + 21) = 0LL; *((_QWORD *)this + 22) = 0LL; *((_BYTE *)this + 121) = 0; *((_BYTE *)this + 122) = 0; *((_QWORD *)this + 23) = 0LL; *((_QWORD *)this + 24) = time(0LL); recv_max_page_lsn = 0LL; memset((char *)this + 248, 0LL); result = this; *((_QWORD *)this + 296) = 1LL; *((_QWORD *)this + 300) = 0LL; *((_QWORD *)this + 301) = 0LL; *((_QWORD *)this + 302) = 0LL; *((_QWORD *)this + 303) = 112LL; return result; }
make_row: PUSH RBP MOV RBP,RSP SUB RSP,0x110 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 qword ptr [RBP + -0x100],RAX MOV byte ptr [RAX + 0x280],0x0 MOV RDI,qword ptr [RBP + -0x18] CALL 0x0102ce30 TEST AL,0x1 JNZ 0x0102fc58 JMP 0x0102fc5d LAB_0102fc58: JMP 0x0102fd6c LAB_0102fc5d: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x7e0 LEA RSI,[RBP + -0x1c] CALL 0x01029e60 MOV RDI,qword ptr [RBP + -0x100] ADD RDI,0x28 MOV RSI,qword ptr [RBP + -0x10] CALL 0x01041ae0 CMP EAX,0x0 JZ 0x0102fc8f JMP 0x0102fd6c LAB_0102fc8f: MOV RDI,qword ptr [RBP + -0x100] ADD RDI,0x1b0 MOV RSI,qword ptr [RBP + -0x18] CALL 0x0102a7f0 MOV RSI,qword ptr [RBP + -0x18] LEA RDI,[RBP + -0xe8] MOV qword ptr [RBP + -0x108],RDI CALL 0x01025bd0 MOV R8,qword ptr [RBP + -0x108] MOV RDI,qword ptr [RBP + -0x10] LAB_0102fcc8: MOV EDX,0x1 XOR ECX,ECX MOV ESI,EDX CALL 0x010243e0 JMP 0x0102fcd8 LAB_0102fcd8: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x7e0 LEA RSI,[RBP + -0x1c] CALL 0x01029e90 MOV byte ptr [RBP + -0x109],AL JMP 0x0102fcf4 LAB_0102fcf4: MOV AL,byte ptr [RBP + -0x109] TEST AL,0x1 JNZ 0x0102fd2c JMP 0x0102fd00 LAB_0102fd00: MOV dword ptr [RBP + -0xf8],0x1 JMP 0x0102fd60 LAB_0102fd2c: MOV RAX,qword ptr [RBP + -0x100] MOV byte ptr [RAX + 0x280],0x1 MOV RDI,RAX ADD RDI,0x1c0 MOV RSI,qword ptr [RAX + 0x18] LEA RDX,[RBP + -0xd8] CALL 0x0102ce50 LAB_0102fd54: JMP 0x0102fd56 LAB_0102fd56: MOV dword ptr [RBP + -0xf8],0x0 LAB_0102fd60: LEA RDI,[RBP + -0xe8] CALL 0x01025c40 LAB_0102fd6c: ADD RSP,0x110 POP RBP RET
/* table_esms_by_user_by_event_name::make_row(PFS_user*, PFS_statement_class*) */ void __thiscall table_esms_by_user_by_event_name::make_row (table_esms_by_user_by_event_name *this,PFS_user *param_1,PFS_statement_class *param_2) { byte bVar1; int iVar2; ulong uVar3; PFS_connection_statement_visitor local_f0 [16]; PFS_statement_stat local_e0 [188]; pfs_optimistic_state local_24 [4]; PFS_statement_class *local_20; PFS_user *local_18; table_esms_by_user_by_event_name *local_10; this[0x280] = (table_esms_by_user_by_event_name)0x0; local_20 = param_2; local_18 = param_1; local_10 = this; uVar3 = PFS_instr_class::is_mutable((PFS_instr_class *)param_2); if ((uVar3 & 1) == 0) { pfs_lock::begin_optimistic_lock((pfs_lock *)(local_18 + 0x7e0),local_24); iVar2 = PFS_user_row::make_row((PFS_user_row *)(this + 0x28),local_18); if (iVar2 == 0) { PFS_event_name_row::make_row((PFS_event_name_row *)(this + 0x1b0),(PFS_instr_class *)local_20) ; PFS_connection_statement_visitor::PFS_connection_statement_visitor(local_f0,local_20); /* try { // try from 0102fcc8 to 0102fd53 has its CatchHandler @ 0102fd0c */ PFS_connection_iterator::visit_user (local_18,true,true,false,(PFS_connection_visitor *)local_f0); bVar1 = pfs_lock::end_optimistic_lock((pfs_lock *)(local_18 + 0x7e0),local_24); if ((bVar1 & 1) != 0) { this[0x280] = (table_esms_by_user_by_event_name)0x1; PFS_statement_stat_row::set ((PFS_statement_stat_row *)(this + 0x1c0),*(time_normalizer **)(this + 0x18), local_e0); } PFS_connection_statement_visitor::~PFS_connection_statement_visitor(local_f0); } } return; }
53,549
google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionCompare::operator()(google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry const&, google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry const&) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor_database.cc
bool operator()(const ExtensionEntry& a, const ExtensionEntry& b) const { return std::make_tuple(a.extendee(index), a.extension_number) < std::make_tuple(b.extendee(index), b.extension_number); }
O3
cpp
google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionCompare::operator()(google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry const&, google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdx, %rbx movq %rsi, %r14 movups 0x8(%rsi), %xmm0 leaq 0x20(%rsp), %r15 movups %xmm0, (%r15) leaq 0x5f63f(%rip), %rax # 0xbe430 movq (%rax), %r12 movl $0x1, %esi movq %r15, %rdi movq %r12, %rdx callq 0xa7676 movl 0x28(%r14), %ecx movl %ecx, (%r15) movq %rax, 0x8(%r15) movq %rdx, 0x10(%r15) movups 0x8(%rbx), %xmm0 leaq 0x8(%rsp), %r14 movups %xmm0, (%r14) movl $0x1, %esi movq %r14, %rdi movq %r12, %rdx callq 0xa7676 movl 0x28(%rbx), %ecx movl %ecx, (%r14) movq %rax, 0x8(%r14) movq %rdx, 0x10(%r14) leaq 0x20(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x5ee5a addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZNK6google8protobuf25EncodedDescriptorDatabase15DescriptorIndex16ExtensionCompareclERKNS2_14ExtensionEntryES6_: push r15 push r14 push r12 push rbx sub rsp, 38h mov rbx, rdx mov r14, rsi movups xmm0, xmmword ptr [rsi+8] lea r15, [rsp+58h+var_38] movups xmmword ptr [r15], xmm0 lea rax, _ZN6google8protobuf20stringpiece_internal11StringPiece4nposE; google::protobuf::stringpiece_internal::StringPiece::npos mov r12, [rax] mov esi, 1; unsigned __int64 mov rdi, r15; this mov rdx, r12; unsigned __int64 call _ZNK6google8protobuf20stringpiece_internal11StringPiece6substrEmm; google::protobuf::stringpiece_internal::StringPiece::substr(ulong,ulong) mov ecx, [r14+28h] mov [r15], ecx mov [r15+8], rax mov [r15+10h], rdx movups xmm0, xmmword ptr [rbx+8] lea r14, [rsp+58h+var_50] movups xmmword ptr [r14], xmm0 mov esi, 1; unsigned __int64 mov rdi, r14; this mov rdx, r12; unsigned __int64 call _ZNK6google8protobuf20stringpiece_internal11StringPiece6substrEmm; google::protobuf::stringpiece_internal::StringPiece::substr(ulong,ulong) mov ecx, [rbx+28h] mov [r14], ecx mov [r14+8], rax mov [r14+10h], rdx lea rdi, [rsp+58h+var_38] lea rsi, [rsp+58h+var_50] call _ZNSt15__tuple_compareISt5tupleIJN6google8protobuf20stringpiece_internal11StringPieceEiEES5_Lm0ELm2EE6__lessERKS5_S8_; std::__tuple_compare<std::tuple<google::protobuf::stringpiece_internal::StringPiece,int>,std::tuple<google::protobuf::stringpiece_internal::StringPiece,int>,0ul,2ul>::__less(std::tuple<google::protobuf::stringpiece_internal::StringPiece,int> const&,std::tuple<google::protobuf::stringpiece_internal::StringPiece,int> const&) add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn
long long google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionCompare::operator()( long long a1, long long a2, long long a3) { long long v4; // rax long long v5; // rdx long long v6; // rax long long v7; // rdx __int128 v9; // [rsp+8h] [rbp-50h] BYREF long long v10; // [rsp+18h] [rbp-40h] __int128 v11; // [rsp+20h] [rbp-38h] BYREF long long v12; // [rsp+30h] [rbp-28h] v11 = *(_OWORD *)(a2 + 8); v4 = google::protobuf::stringpiece_internal::StringPiece::substr( (google::protobuf::stringpiece_internal::StringPiece *)&v11, 1uLL, google::protobuf::stringpiece_internal::StringPiece::npos); LODWORD(v11) = *(_DWORD *)(a2 + 40); *((_QWORD *)&v11 + 1) = v4; v12 = v5; v9 = *(_OWORD *)(a3 + 8); v6 = google::protobuf::stringpiece_internal::StringPiece::substr( (google::protobuf::stringpiece_internal::StringPiece *)&v9, 1uLL, google::protobuf::stringpiece_internal::StringPiece::npos); LODWORD(v9) = *(_DWORD *)(a3 + 40); *((_QWORD *)&v9 + 1) = v6; v10 = v7; return std::__tuple_compare<std::tuple<google::protobuf::stringpiece_internal::StringPiece,int>,std::tuple<google::protobuf::stringpiece_internal::StringPiece,int>,0ul,2ul>::__less( &v11, &v9); }
operator(): PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDX MOV R14,RSI MOVUPS XMM0,xmmword ptr [RSI + 0x8] LEA R15,[RSP + 0x20] MOVUPS xmmword ptr [R15],XMM0 LEA RAX,[0x1be430] MOV R12,qword ptr [RAX] MOV ESI,0x1 MOV RDI,R15 MOV RDX,R12 CALL 0x001a7676 MOV ECX,dword ptr [R14 + 0x28] MOV dword ptr [R15],ECX MOV qword ptr [R15 + 0x8],RAX MOV qword ptr [R15 + 0x10],RDX MOVUPS XMM0,xmmword ptr [RBX + 0x8] LEA R14,[RSP + 0x8] MOVUPS xmmword ptr [R14],XMM0 MOV ESI,0x1 MOV RDI,R14 MOV RDX,R12 CALL 0x001a7676 MOV ECX,dword ptr [RBX + 0x28] MOV dword ptr [R14],ECX MOV qword ptr [R14 + 0x8],RAX MOV qword ptr [R14 + 0x10],RDX LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x8] CALL 0x0015ee5a ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET
/* google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionCompare::TEMPNAMEPLACEHOLDERVALUE(google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry const&, google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionEntry const&) const */ void __thiscall google::protobuf::EncodedDescriptorDatabase::DescriptorIndex::ExtensionCompare::operator() (ExtensionCompare *this,ExtensionEntry *param_1,ExtensionEntry *param_2) { ulong uVar1; int8 local_50; int1 auStack_48 [16]; int8 local_38; int1 auStack_30 [16]; uVar1 = stringpiece_internal::StringPiece::npos; local_38 = *(int8 *)(param_1 + 8); auStack_30._0_8_ = *(int8 *)(param_1 + 0x10); auStack_30 = stringpiece_internal::StringPiece::substr ((StringPiece *)&local_38,1,stringpiece_internal::StringPiece::npos); local_38 = CONCAT44(local_38._4_4_,*(int4 *)(param_1 + 0x28)); local_50 = *(int8 *)(param_2 + 8); auStack_48._0_8_ = *(int8 *)(param_2 + 0x10); auStack_48 = stringpiece_internal::StringPiece::substr((StringPiece *)&local_50,1,uVar1); local_50 = CONCAT44(local_50._4_4_,*(int4 *)(param_2 + 0x28)); std:: __tuple_compare<std::tuple<google::protobuf::stringpiece_internal::StringPiece,int>,std::tuple<google::protobuf::stringpiece_internal::StringPiece,int>,0ul,2ul> ::__less((tuple *)&local_38,(tuple *)&local_50); return; }
53,550
translog_write_variable_record
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_write_variable_record(LSN *lsn, enum translog_record_type type, MARIA_HA *tbl_info, SHORT_TRANSACTION_ID short_trid, struct st_translog_parts *parts, TRN *trn, void *hook_arg) { struct st_translog_buffer *buffer_to_flush= NULL; uint header_length1= 1 + 2 + 2 + translog_variable_record_length_bytes(parts->record_length); ulong buffer_rest; uint page_rest; /* Max number of such LSNs per record is 2 */ uchar compressed_LSNs[MAX_NUMBER_OF_LSNS_PER_RECORD * COMPRESSED_LSN_MAX_STORE_SIZE]; my_bool res; DBUG_ENTER("translog_write_variable_record"); translog_lock(); DBUG_PRINT("info", ("horizon: " LSN_FMT, LSN_IN_PARTS(log_descriptor.horizon))); page_rest= TRANSLOG_PAGE_SIZE - log_descriptor.bc.current_page_fill; DBUG_PRINT("info", ("header length: %u page_rest: %u", header_length1, page_rest)); /* header and part which we should read have to fit in one chunk TODO: allow to divide readable header */ if (page_rest < (header_length1 + log_record_type_descriptor[type].read_header_len)) { DBUG_PRINT("info", ("Next page, size: %u header: %u + %u", log_descriptor.bc.current_page_fill, header_length1, log_record_type_descriptor[type].read_header_len)); translog_page_next(&log_descriptor.horizon, &log_descriptor.bc, &buffer_to_flush); /* Chunk 2 header is 1 byte, so full page capacity will be one uchar more */ page_rest= log_descriptor.page_capacity_chunk_2 + 1; DBUG_PRINT("info", ("page_rest: %u", page_rest)); } /* To minimize compressed size we will compress always relative to very first chunk address (log_descriptor.horizon for now) */ if (log_record_type_descriptor[type].compressed_LSN > 0) { translog_relative_LSN_encode(parts, log_descriptor.horizon, log_record_type_descriptor[type]. compressed_LSN, compressed_LSNs); /* recalculate header length after compression */ header_length1= 1 + 2 + 2 + translog_variable_record_length_bytes(parts->record_length); DBUG_PRINT("info", ("after compressing LSN(s) header length: %u " "record length: %lu", header_length1, (ulong)parts->record_length)); } /* TODO: check space on current page for header + few bytes */ if (page_rest >= parts->record_length + header_length1) { /* following function makes translog_unlock(); */ res= translog_write_variable_record_1chunk(lsn, type, tbl_info, short_trid, parts, buffer_to_flush, header_length1, trn, hook_arg); DBUG_RETURN(res); } buffer_rest= translog_get_current_group_size(); if (buffer_rest >= parts->record_length + header_length1 - page_rest) { /* following function makes translog_unlock(); */ res= translog_write_variable_record_1group(lsn, type, tbl_info, short_trid, parts, buffer_to_flush, header_length1, trn, hook_arg); DBUG_RETURN(res); } /* following function makes translog_unlock(); */ res= translog_write_variable_record_mgroup(lsn, type, tbl_info, short_trid, parts, buffer_to_flush, header_length1, buffer_rest, trn, hook_arg); DBUG_RETURN(res); }
O0
c
translog_write_variable_record: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0xa8, %rsp movw %cx, %ax movq 0x10(%rbp), %rcx movq %fs:0x28, %rcx movq %rcx, -0x10(%rbp) movq %rdi, -0x40(%rbp) movl %esi, -0x44(%rbp) movq %rdx, -0x50(%rbp) movw %ax, -0x52(%rbp) movq %r8, -0x60(%rbp) movq %r9, -0x68(%rbp) movq $0x0, -0x70(%rbp) movq -0x60(%rbp), %rax movl (%rax), %edi callq 0x599e0 addl $0x5, %eax movl %eax, -0x74(%rbp) callq 0x500c0 jmp 0x546a7 movzwl 0xc25992(%rip), %ecx # 0xc7a040 movl $0x2000, %eax # imm = 0x2000 subl %ecx, %eax movl %eax, -0x84(%rbp) jmp 0x546bd movl -0x84(%rbp), %eax movl -0x74(%rbp), %ecx movl -0x44(%rbp), %edx movl %edx, %esi leaq 0x423aee(%rip), %rdx # 0x4781c0 imulq $0x48, %rsi, %rsi addq %rsi, %rdx movzwl 0x6(%rdx), %edx addl %edx, %ecx cmpl %ecx, %eax jae 0x5471c jmp 0x546e5 jmp 0x546e7 leaq 0x424cd2(%rip), %rsi # 0x4793c0 movq %rsi, %rdi addq $0x800c48, %rdi # imm = 0x800C48 addq $0x800c50, %rsi # imm = 0x800C50 leaq -0x70(%rbp), %rdx callq 0x59a30 movzwl 0x424cd7(%rip), %eax # 0x4793e6 addl $0x1, %eax movl %eax, -0x84(%rbp) jmp 0x5471a jmp 0x5471c movl -0x44(%rbp), %eax movl %eax, %ecx leaq 0x423a98(%rip), %rax # 0x4781c0 imulq $0x48, %rcx, %rcx addq %rcx, %rax movswl 0x20(%rax), %eax cmpl $0x0, %eax jle 0x54778 movq -0x60(%rbp), %rdi movq 0xc258c5(%rip), %rsi # 0xc7a008 movl -0x44(%rbp), %eax movl %eax, %ecx leaq 0x423a71(%rip), %rax # 0x4781c0 imulq $0x48, %rcx, %rcx addq %rcx, %rax movswl 0x20(%rax), %edx leaq -0x30(%rbp), %rcx callq 0x59b30 movq -0x60(%rbp), %rax movl (%rax), %edi callq 0x599e0 addl $0x5, %eax movl %eax, -0x74(%rbp) jmp 0x54776 jmp 0x54778 movl -0x84(%rbp), %eax movq -0x60(%rbp), %rcx movl (%rcx), %ecx addl -0x74(%rbp), %ecx cmpl %ecx, %eax jb 0x547df movq -0x40(%rbp), %rdi movl -0x44(%rbp), %esi movq -0x50(%rbp), %rdx movw -0x52(%rbp), %cx movq -0x60(%rbp), %r8 movq -0x70(%rbp), %r9 movl -0x74(%rbp), %eax movw %ax, %r11w movq -0x68(%rbp), %r10 movq 0x10(%rbp), %rax movzwl %cx, %ecx movzwl %r11w, %r11d movl %r11d, (%rsp) movq %r10, 0x8(%rsp) movq %rax, 0x10(%rsp) callq 0x59e50 movb %al, -0x85(%rbp) movb -0x85(%rbp), %al movb %al, -0x31(%rbp) jmp 0x548ad callq 0x5b7f0 movl %eax, %eax movq %rax, -0x80(%rbp) movq -0x80(%rbp), %rax movq -0x60(%rbp), %rcx movl (%rcx), %ecx addl -0x74(%rbp), %ecx subl -0x84(%rbp), %ecx movl %ecx, %ecx cmpq %rcx, %rax jb 0x54855 movq -0x40(%rbp), %rdi movl -0x44(%rbp), %esi movq -0x50(%rbp), %rdx movw -0x52(%rbp), %cx movq -0x60(%rbp), %r8 movq -0x70(%rbp), %r9 movl -0x74(%rbp), %eax movw %ax, %r11w movq -0x68(%rbp), %r10 movq 0x10(%rbp), %rax movzwl %cx, %ecx movzwl %r11w, %r11d movl %r11d, (%rsp) movq %r10, 0x8(%rsp) movq %rax, 0x10(%rsp) callq 0x59ff0 movb %al, -0x85(%rbp) movb -0x85(%rbp), %al movb %al, -0x31(%rbp) jmp 0x548ad movq -0x40(%rbp), %rdi movl -0x44(%rbp), %esi movq -0x50(%rbp), %rdx movw -0x52(%rbp), %cx movq -0x60(%rbp), %r8 movq -0x70(%rbp), %r9 movl -0x74(%rbp), %eax movw %ax, %bx movq -0x80(%rbp), %rax movl %eax, %r11d movq -0x68(%rbp), %r10 movq 0x10(%rbp), %rax movzwl %cx, %ecx movzwl %bx, %ebx movl %ebx, (%rsp) movl %r11d, 0x8(%rsp) movq %r10, 0x10(%rsp) movq %rax, 0x18(%rsp) callq 0x5a3d0 movb %al, -0x85(%rbp) movb -0x85(%rbp), %al movb %al, -0x31(%rbp) movb -0x31(%rbp), %al movb %al, -0x86(%rbp) movq %fs:0x28, %rax movq -0x10(%rbp), %rcx cmpq %rcx, %rax jne 0x548d8 movb -0x86(%rbp), %al addq $0xa8, %rsp popq %rbx popq %rbp retq callq 0x2a270 nopl (%rax)
translog_write_variable_record: push rbp mov rbp, rsp push rbx sub rsp, 0A8h mov ax, cx mov rcx, [rbp+arg_0] mov rcx, fs:28h mov [rbp+var_10], rcx mov [rbp+var_40], rdi mov [rbp+var_44], esi mov [rbp+var_50], rdx mov [rbp+var_52], ax mov [rbp+var_60], r8 mov [rbp+var_68], r9 mov [rbp+var_70], 0 mov rax, [rbp+var_60] mov edi, [rax] call translog_variable_record_length_bytes add eax, 5 mov [rbp+var_74], eax call translog_lock jmp short $+2 loc_546A7: movzx ecx, cs:word_C7A040 mov eax, 2000h sub eax, ecx mov [rbp+var_84], eax jmp short $+2 loc_546BD: mov eax, [rbp+var_84] mov ecx, [rbp+var_74] mov edx, [rbp+var_44] mov esi, edx lea rdx, log_record_type_descriptor imul rsi, 48h ; 'H' add rdx, rsi movzx edx, word ptr [rdx+6] add ecx, edx cmp eax, ecx jnb short loc_5471C jmp short $+2 loc_546E5: jmp short $+2 loc_546E7: lea rsi, log_descriptor mov rdi, rsi add rdi, 800C48h add rsi, 800C50h lea rdx, [rbp+var_70] call translog_page_next movzx eax, cs:word_4793E6 add eax, 1 mov [rbp+var_84], eax jmp short $+2 loc_5471A: jmp short $+2 loc_5471C: mov eax, [rbp+var_44] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx movsx eax, word ptr [rax+20h] cmp eax, 0 jle short loc_54778 mov rdi, [rbp+var_60] mov rsi, cs:qword_C7A008 mov eax, [rbp+var_44] mov ecx, eax lea rax, log_record_type_descriptor imul rcx, 48h ; 'H' add rax, rcx movsx edx, word ptr [rax+20h] lea rcx, [rbp+var_30] call translog_relative_LSN_encode mov rax, [rbp+var_60] mov edi, [rax] call translog_variable_record_length_bytes add eax, 5 mov [rbp+var_74], eax jmp short $+2 loc_54776: jmp short $+2 loc_54778: mov eax, [rbp+var_84] mov rcx, [rbp+var_60] mov ecx, [rcx] add ecx, [rbp+var_74] cmp eax, ecx jb short loc_547DF mov rdi, [rbp+var_40] mov esi, [rbp+var_44] mov rdx, [rbp+var_50] mov cx, [rbp+var_52] mov r8, [rbp+var_60] mov r9, [rbp+var_70] mov eax, [rbp+var_74] mov r11w, ax mov r10, [rbp+var_68] mov rax, [rbp+arg_0] movzx ecx, cx movzx r11d, r11w mov [rsp+0B0h+var_B0], r11d mov [rsp+0B0h+var_A8], r10 mov [rsp+0B0h+var_A0], rax call translog_write_variable_record_1chunk mov [rbp+var_85], al mov al, [rbp+var_85] mov [rbp+var_31], al jmp loc_548AD loc_547DF: call translog_get_current_group_size mov eax, eax mov [rbp+var_80], rax mov rax, [rbp+var_80] mov rcx, [rbp+var_60] mov ecx, [rcx] add ecx, [rbp+var_74] sub ecx, [rbp+var_84] mov ecx, ecx cmp rax, rcx jb short loc_54855 mov rdi, [rbp+var_40] mov esi, [rbp+var_44] mov rdx, [rbp+var_50] mov cx, [rbp+var_52] mov r8, [rbp+var_60] mov r9, [rbp+var_70] mov eax, [rbp+var_74] mov r11w, ax mov r10, [rbp+var_68] mov rax, [rbp+arg_0] movzx ecx, cx movzx r11d, r11w mov [rsp+0B0h+var_B0], r11d mov [rsp+0B0h+var_A8], r10 mov [rsp+0B0h+var_A0], rax call translog_write_variable_record_1group mov [rbp+var_85], al mov al, [rbp+var_85] mov [rbp+var_31], al jmp short loc_548AD loc_54855: mov rdi, [rbp+var_40] mov esi, [rbp+var_44] mov rdx, [rbp+var_50] mov cx, [rbp+var_52] mov r8, [rbp+var_60] mov r9, [rbp+var_70] mov eax, [rbp+var_74] mov bx, ax mov rax, [rbp+var_80] mov r11d, eax mov r10, [rbp+var_68] mov rax, [rbp+arg_0] movzx ecx, cx movzx ebx, bx mov [rsp+0B0h+var_B0], ebx mov dword ptr [rsp+0B0h+var_A8], r11d mov [rsp+0B0h+var_A0], r10 mov [rsp+0B0h+var_98], rax call translog_write_variable_record_mgroup mov [rbp+var_85], al mov al, [rbp+var_85] mov [rbp+var_31], al loc_548AD: mov al, [rbp+var_31] mov [rbp+var_86], al mov rax, fs:28h mov rcx, [rbp+var_10] cmp rax, rcx jnz short loc_548D8 mov al, [rbp+var_86] add rsp, 0A8h pop rbx pop rbp retn loc_548D8: call ___stack_chk_fail
char translog_write_variable_record( long long a1, int a2, long long a3, unsigned __int16 a4, unsigned int *a5, long long a6, long long a7) { unsigned int v8; // [rsp+2Ch] [rbp-84h] unsigned long long current_group_size; // [rsp+30h] [rbp-80h] _BYTE v10[12]; // [rsp+3Ch] [rbp-74h] BYREF long long v11; // [rsp+48h] [rbp-68h] _DWORD *v12; // [rsp+50h] [rbp-60h] unsigned __int16 v13; // [rsp+5Eh] [rbp-52h] long long v14; // [rsp+60h] [rbp-50h] int v15; // [rsp+6Ch] [rbp-44h] long long v16; // [rsp+70h] [rbp-40h] _BYTE v18[32]; // [rsp+80h] [rbp-30h] BYREF unsigned long long v19; // [rsp+A0h] [rbp-10h] v19 = __readfsqword(0x28u); v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = a5; v11 = a6; *(_QWORD *)&v10[4] = 0LL; *(_QWORD *)v10 = (unsigned int)translog_variable_record_length_bytes(*a5) + 5; translog_lock(); v8 = 0x2000 - (unsigned __int16)word_C7A040; if ( v8 < (unsigned int)HIWORD(log_record_type_descriptor[18 * a2 + 1]) + *(_DWORD *)v10 ) { translog_page_next(&log_descriptor[1048969], &log_descriptor[1048970], &v10[4]); v8 = (unsigned __int16)word_4793E6 + 1; } if ( SLOWORD(log_record_type_descriptor[18 * v15 + 8]) > 0 ) { translog_relative_LSN_encode( v12, qword_C7A008, (unsigned int)SLOWORD(log_record_type_descriptor[18 * v15 + 8]), v18); *(_DWORD *)v10 = translog_variable_record_length_bytes((unsigned int)*v12) + 5; } if ( v8 >= *(_DWORD *)v10 + *v12 ) return translog_write_variable_record_1chunk( v16, v15, v14, v13, (_DWORD)v12, *(_DWORD *)&v10[4], *(__int16 *)v10, v11, a7); current_group_size = (unsigned int)translog_get_current_group_size(); if ( current_group_size < *(_DWORD *)v10 + *v12 - v8 ) return translog_write_variable_record_mgroup( v16, v15, v14, v13, (_DWORD)v12, *(_DWORD *)&v10[4], *(__int16 *)v10, current_group_size, v11, a7); else return translog_write_variable_record_1group( v16, v15, v14, v13, (_DWORD)v12, *(_DWORD *)&v10[4], *(__int16 *)v10, v11, a7); }
translog_write_variable_record: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xa8 MOV AX,CX MOV RCX,qword ptr [RBP + 0x10] MOV RCX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x10],RCX MOV qword ptr [RBP + -0x40],RDI MOV dword ptr [RBP + -0x44],ESI MOV qword ptr [RBP + -0x50],RDX MOV word ptr [RBP + -0x52],AX MOV qword ptr [RBP + -0x60],R8 MOV qword ptr [RBP + -0x68],R9 MOV qword ptr [RBP + -0x70],0x0 MOV RAX,qword ptr [RBP + -0x60] MOV EDI,dword ptr [RAX] CALL 0x001599e0 ADD EAX,0x5 MOV dword ptr [RBP + -0x74],EAX CALL 0x001500c0 JMP 0x001546a7 LAB_001546a7: MOVZX ECX,word ptr [0x00d7a040] MOV EAX,0x2000 SUB EAX,ECX MOV dword ptr [RBP + -0x84],EAX JMP 0x001546bd LAB_001546bd: MOV EAX,dword ptr [RBP + -0x84] MOV ECX,dword ptr [RBP + -0x74] MOV EDX,dword ptr [RBP + -0x44] MOV ESI,EDX LEA RDX,[0x5781c0] IMUL RSI,RSI,0x48 ADD RDX,RSI MOVZX EDX,word ptr [RDX + 0x6] ADD ECX,EDX CMP EAX,ECX JNC 0x0015471c JMP 0x001546e5 LAB_001546e5: JMP 0x001546e7 LAB_001546e7: LEA RSI,[0x5793c0] MOV RDI,RSI ADD RDI,0x800c48 ADD RSI,0x800c50 LEA RDX,[RBP + -0x70] CALL 0x00159a30 MOVZX EAX,word ptr [0x005793e6] ADD EAX,0x1 MOV dword ptr [RBP + -0x84],EAX JMP 0x0015471a LAB_0015471a: JMP 0x0015471c LAB_0015471c: MOV EAX,dword ptr [RBP + -0x44] MOV ECX,EAX LEA RAX,[0x5781c0] IMUL RCX,RCX,0x48 ADD RAX,RCX MOVSX EAX,word ptr [RAX + 0x20] CMP EAX,0x0 JLE 0x00154778 MOV RDI,qword ptr [RBP + -0x60] MOV RSI,qword ptr [0x00d7a008] MOV EAX,dword ptr [RBP + -0x44] MOV ECX,EAX LEA RAX,[0x5781c0] IMUL RCX,RCX,0x48 ADD RAX,RCX MOVSX EDX,word ptr [RAX + 0x20] LEA RCX,[RBP + -0x30] CALL 0x00159b30 MOV RAX,qword ptr [RBP + -0x60] MOV EDI,dword ptr [RAX] CALL 0x001599e0 ADD EAX,0x5 MOV dword ptr [RBP + -0x74],EAX JMP 0x00154776 LAB_00154776: JMP 0x00154778 LAB_00154778: MOV EAX,dword ptr [RBP + -0x84] MOV RCX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RCX] ADD ECX,dword ptr [RBP + -0x74] CMP EAX,ECX JC 0x001547df MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + -0x50] MOV CX,word ptr [RBP + -0x52] MOV R8,qword ptr [RBP + -0x60] MOV R9,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RBP + -0x74] MOV R11W,AX MOV R10,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + 0x10] MOVZX ECX,CX MOVZX R11D,R11W MOV dword ptr [RSP],R11D MOV qword ptr [RSP + 0x8],R10 MOV qword ptr [RSP + 0x10],RAX CALL 0x00159e50 MOV byte ptr [RBP + -0x85],AL MOV AL,byte ptr [RBP + -0x85] MOV byte ptr [RBP + -0x31],AL JMP 0x001548ad LAB_001547df: CALL 0x0015b7f0 MOV EAX,EAX MOV qword ptr [RBP + -0x80],RAX MOV RAX,qword ptr [RBP + -0x80] MOV RCX,qword ptr [RBP + -0x60] MOV ECX,dword ptr [RCX] ADD ECX,dword ptr [RBP + -0x74] SUB ECX,dword ptr [RBP + -0x84] MOV ECX,ECX CMP RAX,RCX JC 0x00154855 MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + -0x50] MOV CX,word ptr [RBP + -0x52] MOV R8,qword ptr [RBP + -0x60] MOV R9,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RBP + -0x74] MOV R11W,AX MOV R10,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + 0x10] MOVZX ECX,CX MOVZX R11D,R11W MOV dword ptr [RSP],R11D MOV qword ptr [RSP + 0x8],R10 MOV qword ptr [RSP + 0x10],RAX CALL 0x00159ff0 MOV byte ptr [RBP + -0x85],AL MOV AL,byte ptr [RBP + -0x85] MOV byte ptr [RBP + -0x31],AL JMP 0x001548ad LAB_00154855: MOV RDI,qword ptr [RBP + -0x40] MOV ESI,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + -0x50] MOV CX,word ptr [RBP + -0x52] MOV R8,qword ptr [RBP + -0x60] MOV R9,qword ptr [RBP + -0x70] MOV EAX,dword ptr [RBP + -0x74] MOV BX,AX MOV RAX,qword ptr [RBP + -0x80] MOV R11D,EAX MOV R10,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + 0x10] MOVZX ECX,CX MOVZX EBX,BX MOV dword ptr [RSP],EBX MOV dword ptr [RSP + 0x8],R11D MOV qword ptr [RSP + 0x10],R10 MOV qword ptr [RSP + 0x18],RAX CALL 0x0015a3d0 MOV byte ptr [RBP + -0x85],AL MOV AL,byte ptr [RBP + -0x85] MOV byte ptr [RBP + -0x31],AL LAB_001548ad: MOV AL,byte ptr [RBP + -0x31] MOV byte ptr [RBP + -0x86],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,RCX JNZ 0x001548d8 MOV AL,byte ptr [RBP + -0x86] ADD RSP,0xa8 POP RBX POP RBP RET LAB_001548d8: CALL 0x0012a270
int8 translog_write_variable_record (int8 param_1,uint param_2,int8 param_3,int2 param_4,int *param_5, int8 param_6,int8 param_7) { int iVar1; uint uVar2; long in_FS_OFFSET; int8 in_stack_ffffffffffffff50; int4 uVar3; uint local_8c; uint local_7c; int8 local_78; int8 local_70; int *local_68; int2 local_5a; int8 local_58; uint local_4c; int8 local_48; int1 local_39; int1 local_38 [32]; long local_18; uVar3 = (int4)((ulong)in_stack_ffffffffffffff50 >> 0x20); local_18 = *(long *)(in_FS_OFFSET + 0x28); local_78 = 0; local_70 = param_6; local_68 = param_5; local_5a = param_4; local_58 = param_3; local_4c = param_2; local_48 = param_1; iVar1 = translog_variable_record_length_bytes(*param_5); local_7c = iVar1 + 5; translog_lock(); local_8c = 0x2000 - DAT_00d7a040; if (local_8c < local_7c + *(ushort *)(log_record_type_descriptor + (ulong)local_4c * 0x48 + 6)) { translog_page_next(&DAT_00d7a008,&DAT_00d7a010,&local_78); local_8c = DAT_005793e6 + 1; } if (0 < *(short *)(log_record_type_descriptor + (ulong)local_4c * 0x48 + 0x20)) { translog_relative_LSN_encode (local_68,DAT_00d7a008, (int)*(short *)(log_record_type_descriptor + (ulong)local_4c * 0x48 + 0x20),local_38) ; iVar1 = translog_variable_record_length_bytes(*local_68); local_7c = iVar1 + 5; } if (local_8c < *local_68 + local_7c) { uVar2 = translog_get_current_group_size(); if (uVar2 < (*local_68 + local_7c) - local_8c) { local_39 = translog_write_variable_record_mgroup (local_48,local_4c,local_58,local_5a,local_68,local_78,local_7c & 0xffff, CONCAT44(uVar3,uVar2),local_70,param_7); } else { local_39 = translog_write_variable_record_1group (local_48,local_4c,local_58,local_5a,local_68,local_78,local_7c & 0xffff, local_70,param_7); } } else { local_39 = translog_write_variable_record_1chunk (local_48,local_4c,local_58,local_5a,local_68,local_78,local_7c & 0xffff, local_70,param_7); } if (*(long *)(in_FS_OFFSET + 0x28) == local_18) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_39); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
53,551
pfs_end_rwlock_wrwait_v1
eloqsql/storage/perfschema/pfs.cc
void pfs_end_rwlock_wrwait_v1(PSI_rwlock_locker* locker, int rc) { PSI_rwlock_locker_state *state= reinterpret_cast<PSI_rwlock_locker_state*> (locker); assert(state != NULL); ulonglong timer_end= 0; ulonglong wait_time= 0; PFS_rwlock *rwlock= reinterpret_cast<PFS_rwlock *> (state->m_rwlock); assert(rwlock != NULL); PFS_thread *thread= reinterpret_cast<PFS_thread *> (state->m_thread); if (state->m_flags & STATE_FLAG_TIMED) { timer_end= state->m_timer(); wait_time= timer_end - state->m_timer_start; /* Aggregate to EVENTS_WAITS_SUMMARY_BY_INSTANCE (timed) */ rwlock->m_rwlock_stat.m_wait_stat.aggregate_value(wait_time); } else { /* Aggregate to EVENTS_WAITS_SUMMARY_BY_INSTANCE (counted) */ rwlock->m_rwlock_stat.m_wait_stat.aggregate_counted(); } if (likely(rc == 0)) { /* Thread safe : we are protected by the instrumented rwlock */ rwlock->m_writer= thread; rwlock->m_last_written= timer_end; if ((state->m_operation != PSI_RWLOCK_SHAREDEXCLUSIVELOCK) && (state->m_operation != PSI_RWLOCK_TRYSHAREDEXCLUSIVELOCK)) { /* Reset the readers stats, they could be off */ rwlock->m_readers= 0; rwlock->m_last_read= 0; } } if (state->m_flags & STATE_FLAG_THREAD) { PFS_single_stat *event_name_array; event_name_array= thread->write_instr_class_waits_stats(); uint index= rwlock->m_class->m_event_name_index; if (state->m_flags & STATE_FLAG_TIMED) { /* Aggregate to EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME (timed) */ event_name_array[index].aggregate_value(wait_time); } else { /* Aggregate to EVENTS_WAITS_SUMMARY_BY_THREAD_BY_EVENT_NAME (counted) */ event_name_array[index].aggregate_counted(); } if (state->m_flags & STATE_FLAG_EVENT) { PFS_events_waits *wait= reinterpret_cast<PFS_events_waits*> (state->m_wait); assert(wait != NULL); wait->m_timer_end= timer_end; wait->m_end_event_id= thread->m_event_id; if (thread->m_flag_events_waits_history) insert_events_waits_history(thread, wait); if (thread->m_flag_events_waits_history_long) insert_events_waits_history_long(wait); thread->m_events_waits_current--; assert(wait == thread->m_events_waits_current); } } }
O0
cpp
pfs_end_rwlock_wrwait_v1: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq $0x0, -0x20(%rbp) movq $0x0, -0x28(%rbp) movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movl (%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x50f1b movq -0x18(%rbp), %rax callq *0x20(%rax) movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq 0x18(%rcx), %rax movq %rax, -0x28(%rbp) movq -0x30(%rbp), %rdi addq $0x20, %rdi movq -0x28(%rbp), %rsi callq 0x564e0 jmp 0x50f28 movq -0x30(%rbp), %rdi addq $0x20, %rdi callq 0x56420 cmpl $0x0, -0xc(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x50f7e movq -0x38(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x20(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x50(%rax) movq -0x18(%rbp), %rax cmpl $0x5, 0x4(%rax) je 0x50f7c movq -0x18(%rbp), %rax cmpl $0x8, 0x4(%rax) je 0x50f7c movq -0x30(%rbp), %rax movl $0x0, 0x48(%rax) movq -0x30(%rbp), %rax movq $0x0, 0x58(%rax) jmp 0x50f7e movq -0x18(%rbp), %rax movl (%rax), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x51069 movq -0x38(%rbp), %rdi callq 0x2cb50 movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax movq 0x18(%rax), %rax movl 0x10(%rax), %eax movl %eax, -0x44(%rbp) movq -0x18(%rbp), %rax movl (%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x50fd2 movq -0x40(%rbp), %rdi movl -0x44(%rbp), %eax shlq $0x5, %rax addq %rax, %rdi movq -0x28(%rbp), %rsi callq 0x564e0 jmp 0x50fe5 movq -0x40(%rbp), %rdi movl -0x44(%rbp), %eax shlq $0x5, %rax addq %rax, %rdi callq 0x56420 movq -0x18(%rbp), %rax movl (%rax), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x51067 movq -0x18(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x50(%rbp) movq -0x20(%rbp), %rcx movq -0x50(%rbp), %rax movq %rcx, 0x40(%rax) movq -0x38(%rbp), %rax movq 0x7f8(%rax), %rcx movq -0x50(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x38(%rbp), %rax testb $0x1, 0x7e2(%rax) je 0x51038 movq -0x38(%rbp), %rdi movq -0x50(%rbp), %rsi callq 0x352d0 movq -0x38(%rbp), %rax testb $0x1, 0x7e3(%rax) je 0x5104e movq -0x50(%rbp), %rdi callq 0x353a0 movq -0x38(%rbp), %rax movq 0x7f0(%rax), %rcx addq $-0xb0, %rcx movq %rcx, 0x7f0(%rax) jmp 0x51069 addq $0x50, %rsp popq %rbp retq nop
pfs_end_rwlock_wrwait_v1: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov [rbp+var_20], 0 mov [rbp+var_28], 0 mov rax, [rbp+var_18] mov rax, [rax+8] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov rax, [rax+10h] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov eax, [rax] and eax, 1 cmp eax, 0 jz short loc_50F1B mov rax, [rbp+var_18] call qword ptr [rax+20h] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, [rcx+18h] mov [rbp+var_28], rax mov rdi, [rbp+var_30] add rdi, 20h ; ' '; this mov rsi, [rbp+var_28]; unsigned __int64 call _ZN15PFS_single_stat15aggregate_valueEy; PFS_single_stat::aggregate_value(ulong long) jmp short loc_50F28 loc_50F1B: mov rdi, [rbp+var_30] add rdi, 20h ; ' '; this call _ZN15PFS_single_stat17aggregate_countedEv; PFS_single_stat::aggregate_counted(void) loc_50F28: cmp [rbp+var_C], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_50F7E mov rcx, [rbp+var_38] mov rax, [rbp+var_30] mov [rax+40h], rcx mov rcx, [rbp+var_20] mov rax, [rbp+var_30] mov [rax+50h], rcx mov rax, [rbp+var_18] cmp dword ptr [rax+4], 5 jz short loc_50F7C mov rax, [rbp+var_18] cmp dword ptr [rax+4], 8 jz short loc_50F7C mov rax, [rbp+var_30] mov dword ptr [rax+48h], 0 mov rax, [rbp+var_30] mov qword ptr [rax+58h], 0 loc_50F7C: jmp short $+2 loc_50F7E: mov rax, [rbp+var_18] mov eax, [rax] and eax, 2 cmp eax, 0 jz loc_51069 mov rdi, [rbp+var_38]; this call _ZN20PFS_connection_slice29write_instr_class_waits_statsEv; PFS_connection_slice::write_instr_class_waits_stats(void) mov [rbp+var_40], rax mov rax, [rbp+var_30] mov rax, [rax+18h] mov eax, [rax+10h] mov [rbp+var_44], eax mov rax, [rbp+var_18] mov eax, [rax] and eax, 1 cmp eax, 0 jz short loc_50FD2 mov rdi, [rbp+var_40] mov eax, [rbp+var_44] shl rax, 5 add rdi, rax; this mov rsi, [rbp+var_28]; unsigned __int64 call _ZN15PFS_single_stat15aggregate_valueEy; PFS_single_stat::aggregate_value(ulong long) jmp short loc_50FE5 loc_50FD2: mov rdi, [rbp+var_40] mov eax, [rbp+var_44] shl rax, 5 add rdi, rax; this call _ZN15PFS_single_stat17aggregate_countedEv; PFS_single_stat::aggregate_counted(void) loc_50FE5: mov rax, [rbp+var_18] mov eax, [rax] and eax, 4 cmp eax, 0 jz short loc_51067 mov rax, [rbp+var_18] mov rax, [rax+28h] mov [rbp+var_50], rax mov rcx, [rbp+var_20] mov rax, [rbp+var_50] mov [rax+40h], rcx mov rax, [rbp+var_38] mov rcx, [rax+7F8h] mov rax, [rbp+var_50] mov [rax+10h], rcx mov rax, [rbp+var_38] test byte ptr [rax+7E2h], 1 jz short loc_51038 mov rdi, [rbp+var_38] mov rsi, [rbp+var_50] call _Z27insert_events_waits_historyP10PFS_threadP16PFS_events_waits; insert_events_waits_history(PFS_thread *,PFS_events_waits *) loc_51038: mov rax, [rbp+var_38] test byte ptr [rax+7E3h], 1 jz short loc_5104E mov rdi, [rbp+var_50] call _Z32insert_events_waits_history_longP16PFS_events_waits; insert_events_waits_history_long(PFS_events_waits *) loc_5104E: mov rax, [rbp+var_38] mov rcx, [rax+7F0h] add rcx, 0FFFFFFFFFFFFFF50h mov [rax+7F0h], rcx loc_51067: jmp short $+2 loc_51069: add rsp, 50h pop rbp retn
PFS_connection_slice * pfs_end_rwlock_wrwait_v1(long long a1, int a2) { PFS_connection_slice *result; // rax long long v3; // [rsp+0h] [rbp-50h] unsigned int v4; // [rsp+Ch] [rbp-44h] long long v5; // [rsp+10h] [rbp-40h] PFS_connection_slice *v6; // [rsp+18h] [rbp-38h] long long v7; // [rsp+20h] [rbp-30h] unsigned long long v8; // [rsp+28h] [rbp-28h] long long v9; // [rsp+30h] [rbp-20h] v9 = 0LL; v8 = 0LL; v7 = *(_QWORD *)(a1 + 8); v6 = *(PFS_connection_slice **)(a1 + 16); if ( (*(_DWORD *)a1 & 1) != 0 ) { v9 = (*(long long (**)(void))(a1 + 32))(); v8 = v9 - *(_QWORD *)(a1 + 24); PFS_single_stat::aggregate_value((PFS_single_stat *)(v7 + 32), v8); } else { PFS_single_stat::aggregate_counted((PFS_single_stat *)(v7 + 32)); } if ( !a2 ) { *(_QWORD *)(v7 + 64) = v6; *(_QWORD *)(v7 + 80) = v9; if ( *(_DWORD *)(a1 + 4) != 5 && *(_DWORD *)(a1 + 4) != 8 ) { *(_DWORD *)(v7 + 72) = 0; *(_QWORD *)(v7 + 88) = 0LL; } } result = (PFS_connection_slice *)(*(_DWORD *)a1 & 2); if ( (_DWORD)result ) { v5 = PFS_connection_slice::write_instr_class_waits_stats(v6); v4 = *(_DWORD *)(*(_QWORD *)(v7 + 24) + 16LL); if ( (*(_DWORD *)a1 & 1) != 0 ) PFS_single_stat::aggregate_value((PFS_single_stat *)(32LL * v4 + v5), v8); else PFS_single_stat::aggregate_counted((PFS_single_stat *)(32LL * v4 + v5)); result = (PFS_connection_slice *)(*(_DWORD *)a1 & 4); if ( (_DWORD)result ) { v3 = *(_QWORD *)(a1 + 40); *(_QWORD *)(v3 + 64) = v9; *(_QWORD *)(v3 + 16) = *((_QWORD *)v6 + 255); if ( (*((_BYTE *)v6 + 2018) & 1) != 0 ) insert_events_waits_history((long long)v6, v3); if ( (*((_BYTE *)v6 + 2019) & 1) != 0 ) insert_events_waits_history_long(v3); result = v6; *((_QWORD *)v6 + 254) -= 176LL; } } return result; }
pfs_end_rwlock_wrwait_v1: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV qword ptr [RBP + -0x20],0x0 MOV qword ptr [RBP + -0x28],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] AND EAX,0x1 CMP EAX,0x0 JZ 0x00150f1b MOV RAX,qword ptr [RBP + -0x18] CALL qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,qword ptr [RCX + 0x18] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x20 MOV RSI,qword ptr [RBP + -0x28] CALL 0x001564e0 JMP 0x00150f28 LAB_00150f1b: MOV RDI,qword ptr [RBP + -0x30] ADD RDI,0x20 CALL 0x00156420 LAB_00150f28: CMP dword ptr [RBP + -0xc],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x00150f7e MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x50],RCX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x4],0x5 JZ 0x00150f7c MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x4],0x8 JZ 0x00150f7c MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x48],0x0 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x58],0x0 LAB_00150f7c: JMP 0x00150f7e LAB_00150f7e: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] AND EAX,0x2 CMP EAX,0x0 JZ 0x00151069 MOV RDI,qword ptr [RBP + -0x38] CALL 0x0012cb50 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x18] MOV EAX,dword ptr [RAX + 0x10] MOV dword ptr [RBP + -0x44],EAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] AND EAX,0x1 CMP EAX,0x0 JZ 0x00150fd2 MOV RDI,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x44] SHL RAX,0x5 ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x28] CALL 0x001564e0 JMP 0x00150fe5 LAB_00150fd2: MOV RDI,qword ptr [RBP + -0x40] MOV EAX,dword ptr [RBP + -0x44] SHL RAX,0x5 ADD RDI,RAX CALL 0x00156420 LAB_00150fe5: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] AND EAX,0x4 CMP EAX,0x0 JZ 0x00151067 MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x50],RAX MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x40],RCX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x7f8] MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x38] TEST byte ptr [RAX + 0x7e2],0x1 JZ 0x00151038 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x50] CALL 0x001352d0 LAB_00151038: MOV RAX,qword ptr [RBP + -0x38] TEST byte ptr [RAX + 0x7e3],0x1 JZ 0x0015104e MOV RDI,qword ptr [RBP + -0x50] CALL 0x001353a0 LAB_0015104e: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x7f0] ADD RCX,-0xb0 MOV qword ptr [RAX + 0x7f0],RCX LAB_00151067: JMP 0x00151069 LAB_00151069: ADD RSP,0x50 POP RBP RET
void pfs_end_rwlock_wrwait_v1(uint *param_1,int param_2) { uint uVar1; long lVar2; PFS_connection_slice *this; PFS_events_waits *pPVar3; long lVar4; ulonglong local_30; long local_28; local_28 = 0; local_30 = 0; lVar2 = *(long *)(param_1 + 2); this = *(PFS_connection_slice **)(param_1 + 4); if ((*param_1 & 1) == 0) { PFS_single_stat::aggregate_counted((PFS_single_stat *)(lVar2 + 0x20)); } else { local_28 = (**(code **)(param_1 + 8))(); local_30 = local_28 - *(long *)(param_1 + 6); PFS_single_stat::aggregate_value((PFS_single_stat *)(lVar2 + 0x20),local_30); } if (param_2 == 0) { *(PFS_connection_slice **)(lVar2 + 0x40) = this; *(long *)(lVar2 + 0x50) = local_28; if ((param_1[1] != 5) && (param_1[1] != 8)) { *(int4 *)(lVar2 + 0x48) = 0; *(int8 *)(lVar2 + 0x58) = 0; } } if ((*param_1 & 2) != 0) { lVar4 = PFS_connection_slice::write_instr_class_waits_stats(this); uVar1 = *(uint *)(*(long *)(lVar2 + 0x18) + 0x10); if ((*param_1 & 1) == 0) { PFS_single_stat::aggregate_counted((PFS_single_stat *)(lVar4 + (ulong)uVar1 * 0x20)); } else { PFS_single_stat::aggregate_value((PFS_single_stat *)(lVar4 + (ulong)uVar1 * 0x20),local_30); } if ((*param_1 & 4) != 0) { pPVar3 = *(PFS_events_waits **)(param_1 + 10); *(long *)(pPVar3 + 0x40) = local_28; *(int8 *)(pPVar3 + 0x10) = *(int8 *)(this + 0x7f8); if (((byte)this[0x7e2] & 1) != 0) { insert_events_waits_history((PFS_thread *)this,pPVar3); } if (((byte)this[0x7e3] & 1) != 0) { insert_events_waits_history_long(pPVar3); } *(long *)(this + 0x7f0) = *(long *)(this + 0x7f0) + -0xb0; } } return; }
53,552
mysql_stmt_prepare_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stmt_prepare_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stmt_prepare, (parms->stmt, parms->query, parms->length), parms->stmt->mysql, int, r_int) }
O3
c
mysql_stmt_prepare_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rax movq 0x8(%rdi), %rsi movq 0x38(%rax), %rcx movq 0x480(%rcx), %rcx movq 0x28(%rcx), %rbx movq 0x10(%rdi), %rdx movq %rax, %rdi callq 0x25898 movl %eax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_stmt_prepare_start_internal: push rbp mov rbp, rsp push rbx push rax mov rax, [rdi] mov rsi, [rdi+8] mov rcx, [rax+38h] mov rcx, [rcx+480h] mov rbx, [rcx+28h] mov rdx, [rdi+10h] mov rdi, rax call mysql_stmt_prepare mov [rbx+8], eax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_stmt_prepare_start_internal(long long *a1) { _DWORD *v1; // rbx long long result; // rax v1 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL); result = mysql_stmt_prepare(*a1, a1[1], a1[2]); v1[2] = result; *v1 = 0; return result; }
mysql_stmt_prepare_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RCX + 0x480] MOV RBX,qword ptr [RCX + 0x28] MOV RDX,qword ptr [RDI + 0x10] MOV RDI,RAX CALL 0x00125898 MOV dword ptr [RBX + 0x8],EAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_stmt_prepare_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28); uVar2 = mysql_stmt_prepare(*param_1,param_1[1],param_1[2]); puVar1[2] = uVar2; *puVar1 = 0; return; }
53,553
LefDefParser::defiRegion::propIsString(int) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiRegion.cpp
int defiRegion::propIsString(int index) const { char msg[160]; if (index < 0 || index >= numProps_) { sprintf (msg, "ERROR (DEFPARS-6130): The index number %d specified for the REGION PROPERTY is invalide.\nValid index number is from 0 to %d. Specify a valid index number and then try again.", index, numProps_); defiError(0, 6130, msg, defData); return 0; } return propDValues_[index] ? 0 : 1; }
O0
cpp
LefDefParser::defiRegion::propIsString(int) const: subq $0xc8, %rsp movq %rdi, 0xb8(%rsp) movl %esi, 0xb4(%rsp) movq 0xb8(%rsp), %rax movq %rax, 0x8(%rsp) cmpl $0x0, 0xb4(%rsp) jl 0x1d18e movq 0x8(%rsp), %rcx movl 0xb4(%rsp), %eax cmpl 0x38(%rcx), %eax jl 0x1d1d7 movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdi movl 0xb4(%rsp), %edx movl 0x38(%rax), %ecx leaq 0x55019(%rip), %rsi # 0x721c2 movb $0x0, %al callq 0x7060 movq 0x8(%rsp), %rax leaq 0x10(%rsp), %rdx movq 0x68(%rax), %rcx xorl %edi, %edi movl $0x17f2, %esi # imm = 0x17F2 callq 0x2a600 movl $0x0, 0xc4(%rsp) jmp 0x1d20f movq 0x8(%rsp), %rax movq 0x50(%rax), %rax movslq 0xb4(%rsp), %rcx movsd (%rax,%rcx,8), %xmm0 xorps %xmm1, %xmm1 movl $0x1, %eax xorl %ecx, %ecx ucomisd %xmm1, %xmm0 setp %sil setne %dl orb %sil, %dl cmovnel %ecx, %eax movl %eax, 0xc4(%rsp) movl 0xc4(%rsp), %eax addq $0xc8, %rsp retq nop
_ZNK12LefDefParser10defiRegion12propIsStringEi: sub rsp, 0C8h mov [rsp+0C8h+var_10], rdi mov [rsp+0C8h+var_14], esi mov rax, [rsp+0C8h+var_10] mov [rsp+0C8h+var_C0], rax cmp [rsp+0C8h+var_14], 0 jl short loc_1D18E mov rcx, [rsp+0C8h+var_C0] mov eax, [rsp+0C8h+var_14] cmp eax, [rcx+38h] jl short loc_1D1D7 loc_1D18E: mov rax, [rsp+0C8h+var_C0] lea rdi, [rsp+0C8h+var_B8] mov edx, [rsp+0C8h+var_14] mov ecx, [rax+38h] lea rsi, aErrorDefpars61; "ERROR (DEFPARS-6130): The index number "... mov al, 0 call _sprintf mov rax, [rsp+0C8h+var_C0] lea rdx, [rsp+0C8h+var_B8]; int mov rcx, [rax+68h]; char * xor edi, edi; this mov esi, 17F2h; int call _ZN12LefDefParser9defiErrorEiiPKcPNS_8defrDataE; LefDefParser::defiError(int,int,char const*,LefDefParser::defrData *) mov [rsp+0C8h+var_4], 0 jmp short loc_1D20F loc_1D1D7: mov rax, [rsp+0C8h+var_C0] mov rax, [rax+50h] movsxd rcx, [rsp+0C8h+var_14] movsd xmm0, qword ptr [rax+rcx*8] xorps xmm1, xmm1 mov eax, 1 xor ecx, ecx ucomisd xmm0, xmm1 setp sil setnz dl or dl, sil cmovnz eax, ecx mov [rsp+0C8h+var_4], eax loc_1D20F: mov eax, [rsp+0C8h+var_4] add rsp, 0C8h retn
_BOOL8 LefDefParser::defiRegion::propIsString(const char **this, int a2) { LefDefParser::defrData *v2; // r8 int v4[41]; // [rsp+10h] [rbp-B8h] BYREF int v5; // [rsp+B4h] [rbp-14h] LefDefParser::defiRegion *v6; // [rsp+B8h] [rbp-10h] v6 = (LefDefParser::defiRegion *)this; v5 = a2; if ( a2 >= 0 && v5 < *((_DWORD *)this + 14) ) { return *(double *)&this[10][8 * v5] == 0.0; } else { sprintf( v4, "ERROR (DEFPARS-6130): The index number %d specified for the REGION PROPERTY is invalide.\n" "Valid index number is from 0 to %d. Specify a valid index number and then try again.", v5, *((_DWORD *)this + 14)); LefDefParser::defiError(0LL, 6130, (int)v4, this[13], v2); return 0; } }
propIsString: SUB RSP,0xc8 MOV qword ptr [RSP + 0xb8],RDI MOV dword ptr [RSP + 0xb4],ESI MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RSP + 0x8],RAX CMP dword ptr [RSP + 0xb4],0x0 JL 0x0011d18e MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0xb4] CMP EAX,dword ptr [RCX + 0x38] JL 0x0011d1d7 LAB_0011d18e: MOV RAX,qword ptr [RSP + 0x8] LEA RDI,[RSP + 0x10] MOV EDX,dword ptr [RSP + 0xb4] MOV ECX,dword ptr [RAX + 0x38] LEA RSI,[0x1721c2] MOV AL,0x0 CALL 0x00107060 MOV RAX,qword ptr [RSP + 0x8] LEA RDX,[RSP + 0x10] MOV RCX,qword ptr [RAX + 0x68] XOR EDI,EDI MOV ESI,0x17f2 CALL 0x0012a600 MOV dword ptr [RSP + 0xc4],0x0 JMP 0x0011d20f LAB_0011d1d7: MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x50] MOVSXD RCX,dword ptr [RSP + 0xb4] MOVSD XMM0,qword ptr [RAX + RCX*0x8] XORPS XMM1,XMM1 MOV EAX,0x1 XOR ECX,ECX UCOMISD XMM0,XMM1 SETP SIL SETNZ DL OR DL,SIL CMOVNZ EAX,ECX MOV dword ptr [RSP + 0xc4],EAX LAB_0011d20f: MOV EAX,dword ptr [RSP + 0xc4] ADD RSP,0xc8 RET
/* LefDefParser::defiRegion::propIsString(int) const */ bool __thiscall LefDefParser::defiRegion::propIsString(defiRegion *this,int param_1) { bool bVar1; char local_b8 [164]; int local_14; defiRegion *local_10; if ((param_1 < 0) || (*(int *)(this + 0x38) <= param_1)) { local_14 = param_1; local_10 = this; sprintf(local_b8, "ERROR (DEFPARS-6130): The index number %d specified for the REGION PROPERTY is invalide.\nValid index number is from 0 to %d. Specify a valid index number and then try again." ,(ulong)(uint)param_1,(ulong)*(uint *)(this + 0x38)); defiError(0,0x17f2,local_b8,*(defrData **)(this + 0x68)); bVar1 = false; } else { bVar1 = *(double *)(*(long *)(this + 0x50) + (long)param_1 * 8) == 0.0; } return bVar1; }
53,554
mysql_mbcharlen_utf8mb3
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int mysql_mbcharlen_utf8mb3(unsigned int utf8) { if (utf8 < 0x80) { return 1; /* single byte character */ } if (utf8 < 0xC2) { return 0; /* invalid multibyte header */ } if (utf8 < 0xE0) { return 2; /* double byte character */ } if (utf8 < 0xF0) { return 3; /* triple byte character */ } return 0; }
O0
c
mysql_mbcharlen_utf8mb3: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0x80, -0x8(%rbp) jae 0x46a49 movl $0x1, -0x4(%rbp) jmp 0x46a86 cmpl $0xc2, -0x8(%rbp) jae 0x46a5b movl $0x0, -0x4(%rbp) jmp 0x46a86 cmpl $0xe0, -0x8(%rbp) jae 0x46a6d movl $0x2, -0x4(%rbp) jmp 0x46a86 cmpl $0xf0, -0x8(%rbp) jae 0x46a7f movl $0x3, -0x4(%rbp) jmp 0x46a86 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
mysql_mbcharlen_utf8mb3: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 80h jnb short loc_46A49 mov [rbp+var_4], 1 jmp short loc_46A86 loc_46A49: cmp [rbp+var_8], 0C2h jnb short loc_46A5B mov [rbp+var_4], 0 jmp short loc_46A86 loc_46A5B: cmp [rbp+var_8], 0E0h jnb short loc_46A6D mov [rbp+var_4], 2 jmp short loc_46A86 loc_46A6D: cmp [rbp+var_8], 0F0h jnb short loc_46A7F mov [rbp+var_4], 3 jmp short loc_46A86 loc_46A7F: mov [rbp+var_4], 0 loc_46A86: mov eax, [rbp+var_4] pop rbp retn
long long mysql_mbcharlen_utf8mb3(unsigned int a1) { if ( a1 >= 0x80 ) { if ( a1 >= 0xC2 ) { if ( a1 >= 0xE0 ) { if ( a1 >= 0xF0 ) return 0; else return 3; } else { return 2; } } else { return 0; } } else { return 1; } }
mysql_mbcharlen_utf8mb3: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0x80 JNC 0x00146a49 MOV dword ptr [RBP + -0x4],0x1 JMP 0x00146a86 LAB_00146a49: CMP dword ptr [RBP + -0x8],0xc2 JNC 0x00146a5b MOV dword ptr [RBP + -0x4],0x0 JMP 0x00146a86 LAB_00146a5b: CMP dword ptr [RBP + -0x8],0xe0 JNC 0x00146a6d MOV dword ptr [RBP + -0x4],0x2 JMP 0x00146a86 LAB_00146a6d: CMP dword ptr [RBP + -0x8],0xf0 JNC 0x00146a7f MOV dword ptr [RBP + -0x4],0x3 JMP 0x00146a86 LAB_00146a7f: MOV dword ptr [RBP + -0x4],0x0 LAB_00146a86: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 mysql_mbcharlen_utf8mb3(uint param_1) { int4 local_c; if (param_1 < 0x80) { local_c = 1; } else if (param_1 < 0xc2) { local_c = 0; } else if (param_1 < 0xe0) { local_c = 2; } else if (param_1 < 0xf0) { local_c = 3; } else { local_c = 0; } return local_c; }
53,555
mysql_mbcharlen_utf8mb3
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int mysql_mbcharlen_utf8mb3(unsigned int utf8) { if (utf8 < 0x80) { return 1; /* single byte character */ } if (utf8 < 0xC2) { return 0; /* invalid multibyte header */ } if (utf8 < 0xE0) { return 2; /* double byte character */ } if (utf8 < 0xF0) { return 3; /* triple byte character */ } return 0; }
O3
c
mysql_mbcharlen_utf8mb3: pushq %rbp movq %rsp, %rbp movl $0x1, %eax cmpl $0x80, %edi jb 0x317bc xorl %eax, %eax cmpl $0xc2, %edi jb 0x317bc movl $0x2, %eax cmpl $0xe0, %edi jb 0x317bc xorl %eax, %eax cmpl $0xf0, %edi setb %al leal (%rax,%rax,2), %eax popq %rbp retq
mysql_mbcharlen_utf8mb3: push rbp mov rbp, rsp mov eax, 1 cmp edi, 80h jb short loc_317BC xor eax, eax cmp edi, 0C2h jb short loc_317BC mov eax, 2 cmp edi, 0E0h jb short loc_317BC xor eax, eax cmp edi, 0F0h setb al lea eax, [rax+rax*2] loc_317BC: pop rbp retn
long long mysql_mbcharlen_utf8mb3(unsigned int a1) { long long result; // rax result = 1LL; if ( a1 >= 0x80 ) { result = 0LL; if ( a1 >= 0xC2 ) { result = 2LL; if ( a1 >= 0xE0 ) return 3 * (unsigned int)(a1 < 0xF0); } } return result; }
mysql_mbcharlen_utf8mb3: PUSH RBP MOV RBP,RSP MOV EAX,0x1 CMP EDI,0x80 JC 0x001317bc XOR EAX,EAX CMP EDI,0xc2 JC 0x001317bc MOV EAX,0x2 CMP EDI,0xe0 JC 0x001317bc XOR EAX,EAX CMP EDI,0xf0 SETC AL LEA EAX,[RAX + RAX*0x2] LAB_001317bc: POP RBP RET
char mysql_mbcharlen_utf8mb3(uint param_1) { char cVar1; cVar1 = '\x01'; if (((0x7f < param_1) && (cVar1 = '\0', 0xc1 < param_1)) && (cVar1 = '\x02', 0xdf < param_1)) { cVar1 = (param_1 < 0xf0) * '\x03'; } return cVar1; }
53,556
ch2x
eloqsql/strings/ctype-uca.c
static int ch2x(int ch) { if (ch >= '0' && ch <= '9') return ch - '0'; if (ch >= 'a' && ch <= 'f') return 10 + ch - 'a'; if (ch >= 'A' && ch <= 'F') return 10 + ch - 'A'; return -1; }
O0
c
ch2x: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0x30, -0x8(%rbp) jl 0xce12e cmpl $0x39, -0x8(%rbp) jg 0xce12e movl -0x8(%rbp), %eax subl $0x30, %eax movl %eax, -0x4(%rbp) jmp 0xce169 cmpl $0x61, -0x8(%rbp) jl 0xce148 cmpl $0x66, -0x8(%rbp) jg 0xce148 movl -0x8(%rbp), %eax addl $0xa, %eax subl $0x61, %eax movl %eax, -0x4(%rbp) jmp 0xce169 cmpl $0x41, -0x8(%rbp) jl 0xce162 cmpl $0x46, -0x8(%rbp) jg 0xce162 movl -0x8(%rbp), %eax addl $0xa, %eax subl $0x41, %eax movl %eax, -0x4(%rbp) jmp 0xce169 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax popq %rbp retq nop
ch2x: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 30h ; '0' jl short loc_CE12E cmp [rbp+var_8], 39h ; '9' jg short loc_CE12E mov eax, [rbp+var_8] sub eax, 30h ; '0' mov [rbp+var_4], eax jmp short loc_CE169 loc_CE12E: cmp [rbp+var_8], 61h ; 'a' jl short loc_CE148 cmp [rbp+var_8], 66h ; 'f' jg short loc_CE148 mov eax, [rbp+var_8] add eax, 0Ah sub eax, 61h ; 'a' mov [rbp+var_4], eax jmp short loc_CE169 loc_CE148: cmp [rbp+var_8], 41h ; 'A' jl short loc_CE162 cmp [rbp+var_8], 46h ; 'F' jg short loc_CE162 mov eax, [rbp+var_8] add eax, 0Ah sub eax, 41h ; 'A' mov [rbp+var_4], eax jmp short loc_CE169 loc_CE162: mov [rbp+var_4], 0FFFFFFFFh loc_CE169: mov eax, [rbp+var_4] pop rbp retn
long long ch2x(int a1) { if ( a1 < 48 || a1 > 57 ) { if ( a1 < 97 || a1 > 102 ) { if ( a1 < 65 || a1 > 70 ) return (unsigned int)-1; else return (unsigned int)(a1 - 55); } else { return (unsigned int)(a1 - 87); } } else { return (unsigned int)(a1 - 48); } }
ch2x: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0x30 JL 0x001ce12e CMP dword ptr [RBP + -0x8],0x39 JG 0x001ce12e MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x30 MOV dword ptr [RBP + -0x4],EAX JMP 0x001ce169 LAB_001ce12e: CMP dword ptr [RBP + -0x8],0x61 JL 0x001ce148 CMP dword ptr [RBP + -0x8],0x66 JG 0x001ce148 MOV EAX,dword ptr [RBP + -0x8] ADD EAX,0xa SUB EAX,0x61 MOV dword ptr [RBP + -0x4],EAX JMP 0x001ce169 LAB_001ce148: CMP dword ptr [RBP + -0x8],0x41 JL 0x001ce162 CMP dword ptr [RBP + -0x8],0x46 JG 0x001ce162 MOV EAX,dword ptr [RBP + -0x8] ADD EAX,0xa SUB EAX,0x41 MOV dword ptr [RBP + -0x4],EAX JMP 0x001ce169 LAB_001ce162: MOV dword ptr [RBP + -0x4],0xffffffff LAB_001ce169: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int ch2x(int param_1) { int4 local_c; if ((param_1 < 0x30) || (0x39 < param_1)) { if ((param_1 < 0x61) || (0x66 < param_1)) { if ((param_1 < 0x41) || (0x46 < param_1)) { local_c = -1; } else { local_c = param_1 + -0x37; } } else { local_c = param_1 + -0x57; } } else { local_c = param_1 + -0x30; } return local_c; }
53,557
mi_unique_comp
eloqsql/storage/myisam/mi_unique.c
int mi_unique_comp(MI_UNIQUEDEF *def, const uchar *a, const uchar *b, my_bool null_are_equal) { const uchar *pos_a, *pos_b, *end; HA_KEYSEG *keyseg; for (keyseg=def->seg ; keyseg < def->end ; keyseg++) { enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type; uint a_length, b_length; a_length= b_length= keyseg->length; /* If part is NULL it's regarded as different */ if (keyseg->null_bit) { uint tmp; if ((tmp=(a[keyseg->null_pos] & keyseg->null_bit)) != (uint) (b[keyseg->null_pos] & keyseg->null_bit)) return 1; if (tmp) { if (!null_are_equal) return 1; continue; } } pos_a= a+keyseg->start; pos_b= b+keyseg->start; if (keyseg->flag & HA_VAR_LENGTH_PART) { uint pack_length= keyseg->bit_start; if (pack_length == 1) { a_length= (uint) *(uchar*) pos_a++; b_length= (uint) *(uchar*) pos_b++; } else { a_length= uint2korr(pos_a); b_length= uint2korr(pos_b); pos_a+= 2; /* Skip VARCHAR length */ pos_b+= 2; } set_if_smaller(a_length, keyseg->length); /* Safety */ set_if_smaller(b_length, keyseg->length); /* safety */ } else if (keyseg->flag & HA_BLOB_PART) { /* Only compare 'length' characters if length != 0 */ a_length= _mi_calc_blob_length(keyseg->bit_start,pos_a); b_length= _mi_calc_blob_length(keyseg->bit_start,pos_b); /* Check that a and b are of equal length */ if (keyseg->length) { /* This is used in some cases when we are not interested in comparing the whole length of the blob. */ set_if_smaller(a_length, keyseg->length); set_if_smaller(b_length, keyseg->length); } memcpy((char**) &pos_a, pos_a+keyseg->bit_start, sizeof(char*)); memcpy((char**) &pos_b, pos_b+keyseg->bit_start, sizeof(char*)); } if (type == HA_KEYTYPE_TEXT || type == HA_KEYTYPE_VARTEXT1 || type == HA_KEYTYPE_VARTEXT2) { if (ha_compare_text(keyseg->charset, (uchar *) pos_a, a_length, (uchar *) pos_b, b_length, 0)) return 1; } else { if (a_length != b_length) return 1; end= pos_a+a_length; while (pos_a != end) { if (*pos_a++ != *pos_b++) return 1; } } } return 0; }
O3
c
mi_unique_comp: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq 0x8(%rdi), %r15 movq %rdi, -0x48(%rbp) cmpq 0x10(%rdi), %r15 jae 0x87a53 movl %ecx, %r14d movq %rdx, -0x40(%rbp) movq %rsi, -0x38(%rbp) movl %ecx, -0x2c(%rbp) movzbl 0x18(%r15), %r12d movzwl 0x14(%r15), %ecx movb 0x19(%r15), %dil testb %dil, %dil je 0x8793a movl 0xc(%r15), %eax movb (%rsi,%rax), %r8b andb %dil, %r8b andb (%rdx,%rax), %dil movl $0x1, %eax cmpb %dil, %r8b jne 0x87a55 testb %r8b, %r8b je 0x8793a testb %r14b, %r14b jne 0x87a10 jmp 0x87a55 movl 0x8(%r15), %r13d leaq (%rsi,%r13), %rbx addq %rdx, %r13 movzwl 0x12(%r15), %eax testb $0x8, %al jne 0x87959 testb $0x20, %al jne 0x87970 movl %ecx, %esi jmp 0x879dd cmpb $0x1, 0x1a(%r15) jne 0x879bf movzbl (%rbx), %eax incq %rbx movzbl (%r13), %edx incq %r13 jmp 0x879cf movzbl 0x1a(%r15), %edi movq %rbx, %rsi callq 0x78c69 movq %rax, %r14 movzbl 0x1a(%r15), %edi movq %r13, %rsi callq 0x78c69 movzwl 0x14(%r15), %edx cmpl %edx, %r14d movl %edx, %ecx cmovbl %r14d, %ecx cmpl %edx, %eax movl %edx, %esi cmovbl %eax, %esi testl %edx, %edx cmovel %r14d, %ecx movl -0x2c(%rbp), %r14d cmovel %eax, %esi movzbl 0x1a(%r15), %eax movq (%rbx,%rax), %rbx movq (%r13,%rax), %r13 jmp 0x879dd movzwl (%rbx), %eax movzwl (%r13), %edx addq $0x2, %rbx addq $0x2, %r13 cmpl %ecx, %eax cmovael %ecx, %eax cmpl %ecx, %edx movl %ecx, %esi cmovbl %edx, %esi movl %eax, %ecx cmpl $0x11, %r12d ja 0x87a24 movl $0x28002, %eax # imm = 0x28002 btl %r12d, %eax jae 0x87a24 movq (%r15), %rdi movl %ecx, %edx movl %esi, %r8d movq %rbx, %rsi movq %r13, %rcx xorl %r9d, %r9d callq 0x9e7d8 testl %eax, %eax movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rsi jne 0x87a64 addq $0x20, %r15 movq -0x48(%rbp), %rax cmpq 0x10(%rax), %r15 jb 0x878f7 jmp 0x87a53 movl $0x1, %eax cmpl %esi, %ecx jne 0x87a55 movl %ecx, %ecx xorl %r8d, %r8d movq -0x40(%rbp), %rdx movq -0x38(%rbp), %rsi cmpq %r8, %rcx je 0x87a10 movb (%rbx,%r8), %r9b leaq 0x1(%r8), %rdi cmpb (%r13,%r8), %r9b movq %rdi, %r8 je 0x87a3a jmp 0x87a55 xorl %eax, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x1, %eax jmp 0x87a55 nop
mi_unique_comp: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r15, [rdi+8] mov [rbp+var_48], rdi cmp r15, [rdi+10h] jnb loc_87A53 mov r14d, ecx mov [rbp+var_40], rdx mov [rbp+var_38], rsi mov [rbp+var_2C], ecx loc_878F7: movzx r12d, byte ptr [r15+18h] movzx ecx, word ptr [r15+14h] mov dil, [r15+19h] test dil, dil jz short loc_8793A mov eax, [r15+0Ch] mov r8b, [rsi+rax] and r8b, dil and dil, [rdx+rax] mov eax, 1 cmp r8b, dil jnz loc_87A55 test r8b, r8b jz short loc_8793A test r14b, r14b jnz loc_87A10 jmp loc_87A55 loc_8793A: mov r13d, [r15+8] lea rbx, [rsi+r13] add r13, rdx movzx eax, word ptr [r15+12h] test al, 8 jnz short loc_87959 test al, 20h jnz short loc_87970 mov esi, ecx jmp loc_879DD loc_87959: cmp byte ptr [r15+1Ah], 1 jnz short loc_879BF movzx eax, byte ptr [rbx] inc rbx movzx edx, byte ptr [r13+0] inc r13 jmp short loc_879CF loc_87970: movzx edi, byte ptr [r15+1Ah] mov rsi, rbx call _mi_calc_blob_length mov r14, rax movzx edi, byte ptr [r15+1Ah] mov rsi, r13 call _mi_calc_blob_length movzx edx, word ptr [r15+14h] cmp r14d, edx mov ecx, edx cmovb ecx, r14d cmp eax, edx mov esi, edx cmovb esi, eax test edx, edx cmovz ecx, r14d mov r14d, [rbp+var_2C] cmovz esi, eax movzx eax, byte ptr [r15+1Ah] mov rbx, [rbx+rax] mov r13, [r13+rax+0] jmp short loc_879DD loc_879BF: movzx eax, word ptr [rbx] movzx edx, word ptr [r13+0] add rbx, 2 add r13, 2 loc_879CF: cmp eax, ecx cmovnb eax, ecx cmp edx, ecx mov esi, ecx cmovb esi, edx mov ecx, eax loc_879DD: cmp r12d, 11h ja short loc_87A24 mov eax, 28002h bt eax, r12d jnb short loc_87A24 mov rdi, [r15] mov edx, ecx mov r8d, esi mov rsi, rbx mov rcx, r13 xor r9d, r9d call ha_compare_text test eax, eax mov rdx, [rbp+var_40] mov rsi, [rbp+var_38] jnz short loc_87A64 loc_87A10: add r15, 20h ; ' ' mov rax, [rbp+var_48] cmp r15, [rax+10h] jb loc_878F7 jmp short loc_87A53 loc_87A24: mov eax, 1 cmp ecx, esi jnz short loc_87A55 mov ecx, ecx xor r8d, r8d mov rdx, [rbp+var_40] mov rsi, [rbp+var_38] loc_87A3A: cmp rcx, r8 jz short loc_87A10 mov r9b, [rbx+r8] lea rdi, [r8+1] cmp r9b, [r13+r8+0] mov r8, rdi jz short loc_87A3A jmp short loc_87A55 loc_87A53: xor eax, eax loc_87A55: add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_87A64: mov eax, 1 jmp short loc_87A55
long long mi_unique_comp(long long a1, long long a2, long long a3, char a4) { unsigned long long v4; // r15 char v5; // r14 unsigned int v6; // r12d unsigned int v7; // ecx char v8; // di long long v9; // rax char v10; // r8 char v11; // di long long result; // rax long long v13; // r13 unsigned __int8 *v14; // rbx unsigned __int8 *v15; // r13 __int16 v16; // ax unsigned int v17; // esi unsigned int v18; // eax unsigned int v19; // edx unsigned int v20; // r14d unsigned int v21; // eax unsigned int v22; // edx long long v23; // rax int v24; // eax int v25; // eax long long v26; // r8 bool v27; // zf long long v29; // [rsp+10h] [rbp-40h] long long v30; // [rsp+18h] [rbp-38h] v4 = *(_QWORD *)(a1 + 8); if ( v4 < *(_QWORD *)(a1 + 16) ) { v5 = a4; v29 = a3; v30 = a2; do { v6 = *(unsigned __int8 *)(v4 + 24); v7 = *(unsigned __int16 *)(v4 + 20); v8 = *(_BYTE *)(v4 + 25); if ( !v8 ) goto LABEL_8; v9 = *(unsigned int *)(v4 + 12); v10 = v8 & *(_BYTE *)(a2 + v9); v11 = *(_BYTE *)(a3 + v9) & v8; result = 1LL; if ( v10 != v11 ) return result; if ( v10 ) { if ( !v5 ) return result; } else { LABEL_8: v13 = *(unsigned int *)(v4 + 8); v14 = (unsigned __int8 *)(a2 + v13); v15 = (unsigned __int8 *)(a3 + v13); v16 = *(_WORD *)(v4 + 18); if ( (v16 & 8) != 0 ) { if ( *(_BYTE *)(v4 + 26) == 1 ) { v18 = *v14++; v19 = *v15++; } else { v18 = *(unsigned __int16 *)v14; v19 = *(unsigned __int16 *)v15; v14 += 2; v15 += 2; } if ( v18 >= v7 ) v18 = *(unsigned __int16 *)(v4 + 20); v17 = *(unsigned __int16 *)(v4 + 20); if ( v19 < v7 ) v17 = v19; v7 = v18; } else if ( (v16 & 0x20) != 0 ) { v20 = mi_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v14); v21 = mi_calc_blob_length(*(unsigned __int8 *)(v4 + 26), v15); v22 = *(unsigned __int16 *)(v4 + 20); v7 = v22; if ( v20 < v22 ) v7 = v20; v17 = *(unsigned __int16 *)(v4 + 20); if ( v21 < v22 ) v17 = v21; if ( !*(_WORD *)(v4 + 20) ) v7 = v20; v5 = a4; if ( !*(_WORD *)(v4 + 20) ) v17 = v21; v23 = *(unsigned __int8 *)(v4 + 26); v14 = *(unsigned __int8 **)&v14[v23]; v15 = *(unsigned __int8 **)&v15[v23]; } else { v17 = *(unsigned __int16 *)(v4 + 20); } if ( v6 <= 0x11 && (v24 = 163842, _bittest(&v24, v6)) ) { v25 = ha_compare_text(*(_QWORD *)v4, v14, v7, v15, v17, 0LL); a3 = v29; a2 = v30; if ( v25 ) return 1LL; } else { result = 1LL; if ( v7 != v17 ) return result; v26 = 0LL; a3 = v29; a2 = v30; while ( v7 != v26 ) { v27 = v14[v26] == v15[v26]; ++v26; if ( !v27 ) return result; } } } v4 += 32LL; } while ( v4 < *(_QWORD *)(a1 + 16) ); } return 0LL; }
mi_unique_comp: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R15,qword ptr [RDI + 0x8] MOV qword ptr [RBP + -0x48],RDI CMP R15,qword ptr [RDI + 0x10] JNC 0x00187a53 MOV R14D,ECX MOV qword ptr [RBP + -0x40],RDX MOV qword ptr [RBP + -0x38],RSI MOV dword ptr [RBP + -0x2c],ECX LAB_001878f7: MOVZX R12D,byte ptr [R15 + 0x18] MOVZX ECX,word ptr [R15 + 0x14] MOV DIL,byte ptr [R15 + 0x19] TEST DIL,DIL JZ 0x0018793a MOV EAX,dword ptr [R15 + 0xc] MOV R8B,byte ptr [RSI + RAX*0x1] AND R8B,DIL AND DIL,byte ptr [RDX + RAX*0x1] MOV EAX,0x1 CMP R8B,DIL JNZ 0x00187a55 TEST R8B,R8B JZ 0x0018793a TEST R14B,R14B JNZ 0x00187a10 JMP 0x00187a55 LAB_0018793a: MOV R13D,dword ptr [R15 + 0x8] LEA RBX,[RSI + R13*0x1] ADD R13,RDX MOVZX EAX,word ptr [R15 + 0x12] TEST AL,0x8 JNZ 0x00187959 TEST AL,0x20 JNZ 0x00187970 MOV ESI,ECX JMP 0x001879dd LAB_00187959: CMP byte ptr [R15 + 0x1a],0x1 JNZ 0x001879bf MOVZX EAX,byte ptr [RBX] INC RBX MOVZX EDX,byte ptr [R13] INC R13 JMP 0x001879cf LAB_00187970: MOVZX EDI,byte ptr [R15 + 0x1a] MOV RSI,RBX CALL 0x00178c69 MOV R14,RAX MOVZX EDI,byte ptr [R15 + 0x1a] MOV RSI,R13 CALL 0x00178c69 MOVZX EDX,word ptr [R15 + 0x14] CMP R14D,EDX MOV ECX,EDX CMOVC ECX,R14D CMP EAX,EDX MOV ESI,EDX CMOVC ESI,EAX TEST EDX,EDX CMOVZ ECX,R14D MOV R14D,dword ptr [RBP + -0x2c] CMOVZ ESI,EAX MOVZX EAX,byte ptr [R15 + 0x1a] MOV RBX,qword ptr [RBX + RAX*0x1] MOV R13,qword ptr [R13 + RAX*0x1] JMP 0x001879dd LAB_001879bf: MOVZX EAX,word ptr [RBX] MOVZX EDX,word ptr [R13] ADD RBX,0x2 ADD R13,0x2 LAB_001879cf: CMP EAX,ECX CMOVNC EAX,ECX CMP EDX,ECX MOV ESI,ECX CMOVC ESI,EDX MOV ECX,EAX LAB_001879dd: CMP R12D,0x11 JA 0x00187a24 MOV EAX,0x28002 BT EAX,R12D JNC 0x00187a24 MOV RDI,qword ptr [R15] MOV EDX,ECX MOV R8D,ESI MOV RSI,RBX MOV RCX,R13 XOR R9D,R9D CALL 0x0019e7d8 TEST EAX,EAX MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] JNZ 0x00187a64 LAB_00187a10: ADD R15,0x20 MOV RAX,qword ptr [RBP + -0x48] CMP R15,qword ptr [RAX + 0x10] JC 0x001878f7 JMP 0x00187a53 LAB_00187a24: MOV EAX,0x1 CMP ECX,ESI JNZ 0x00187a55 MOV ECX,ECX XOR R8D,R8D MOV RDX,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x38] LAB_00187a3a: CMP RCX,R8 JZ 0x00187a10 MOV R9B,byte ptr [RBX + R8*0x1] LEA RDI,[R8 + 0x1] CMP R9B,byte ptr [R13 + R8*0x1] MOV R8,RDI JZ 0x00187a3a JMP 0x00187a55 LAB_00187a53: XOR EAX,EAX LAB_00187a55: ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00187a64: MOV EAX,0x1 JMP 0x00187a55
int8 mi_unique_comp(long param_1,long param_2,long param_3,char param_4) { byte *pbVar1; byte *pbVar2; byte bVar3; byte bVar4; ushort uVar5; uint uVar6; uint uVar7; uint uVar8; int iVar9; uint uVar10; ulong uVar11; uint uVar12; ushort *puVar13; byte bVar14; ulong uVar15; ushort *puVar16; int8 *puVar17; puVar17 = *(int8 **)(param_1 + 8); if (puVar17 < *(int8 **)(param_1 + 0x10)) { do { bVar4 = *(byte *)(puVar17 + 3); uVar5 = *(ushort *)((long)puVar17 + 0x14); uVar11 = (ulong)uVar5; bVar3 = *(byte *)((long)puVar17 + 0x19); if (bVar3 == 0) { LAB_0018793a: puVar13 = (ushort *)(param_2 + (ulong)*(uint *)(puVar17 + 1)); puVar16 = (ushort *)((ulong)*(uint *)(puVar17 + 1) + param_3); if ((*(ushort *)((long)puVar17 + 0x12) & 8) == 0) { if ((*(ushort *)((long)puVar17 + 0x12) & 0x20) == 0) { uVar10 = (uint)uVar5; } else { uVar7 = _mi_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar13); uVar8 = _mi_calc_blob_length(*(int1 *)((long)puVar17 + 0x1a),puVar16); uVar5 = *(ushort *)((long)puVar17 + 0x14); uVar6 = (uint)uVar5; if (uVar7 < uVar5) { uVar6 = uVar7; } uVar12 = (uint)uVar5; uVar10 = uVar12; if (uVar8 < uVar12) { uVar10 = uVar8; } if (uVar12 == 0) { uVar10 = uVar8; uVar6 = uVar7; } uVar11 = (ulong)uVar6; puVar13 = *(ushort **)((long)puVar13 + (ulong)*(byte *)((long)puVar17 + 0x1a)); puVar16 = *(ushort **)((long)puVar16 + (ulong)*(byte *)((long)puVar17 + 0x1a)); } } else { if (*(char *)((long)puVar17 + 0x1a) == '\x01') { uVar6 = (uint)(byte)*puVar13; puVar13 = (ushort *)((long)puVar13 + 1); uVar7 = (uint)(byte)*puVar16; puVar16 = (ushort *)((long)puVar16 + 1); } else { uVar6 = (uint)*puVar13; uVar7 = (uint)*puVar16; puVar13 = puVar13 + 1; puVar16 = puVar16 + 1; } uVar10 = (uint)uVar5; if (uVar10 <= uVar6) { uVar6 = uVar10; } if (uVar7 < uVar10) { uVar10 = uVar7; } uVar11 = (ulong)uVar6; } if ((bVar4 < 0x12) && ((0x28002U >> (bVar4 & 0x1f) & 1) != 0)) { iVar9 = ha_compare_text(*puVar17,puVar13,uVar11,puVar16,uVar10,0); if (iVar9 != 0) { return 1; } } else { if ((uint)uVar11 != uVar10) { return 1; } uVar15 = 0; while (uVar11 != uVar15) { pbVar1 = (byte *)((long)puVar13 + uVar15); pbVar2 = (byte *)((long)puVar16 + uVar15); uVar15 = uVar15 + 1; if (*pbVar1 != *pbVar2) { return 1; } } } } else { bVar14 = *(byte *)(param_2 + (ulong)*(uint *)((long)puVar17 + 0xc)) & bVar3; if (bVar14 != (bVar3 & *(byte *)(param_3 + (ulong)*(uint *)((long)puVar17 + 0xc)))) { return 1; } if (bVar14 == 0) goto LAB_0018793a; if (param_4 == '\0') { return 1; } } puVar17 = puVar17 + 4; } while (puVar17 < *(int8 **)(param_1 + 0x10)); } return 0; }
53,558
MemoryManager::setByte(unsigned int, unsigned char, unsigned int*)
EnderturtleOrz[P]CSC3050-2025-Spring-Project-3/src/MemoryManager.cpp
bool MemoryManager::setByte(uint32_t addr, uint8_t val, uint32_t *cycles) { if (!this->isAddrExist(addr)) { dbgprintf("Byte write to invalid addr 0x%x!\n", addr); return false; } if (this->cache != nullptr) { this->cache->setByte(addr, val, cycles); return true; } this->memory[addr] = val; return true; }
O0
cpp
MemoryManager::setByte(unsigned int, unsigned char, unsigned int*): subq $0x28, %rsp movb %dl, %al movq %rdi, 0x18(%rsp) movl %esi, 0x14(%rsp) movb %al, 0x13(%rsp) movq %rcx, 0x8(%rsp) movq 0x18(%rsp), %rdi movq %rdi, (%rsp) movl 0x14(%rsp), %esi callq 0x1e830 testb $0x1, %al jne 0x1e897 movl 0x14(%rsp), %esi leaq 0xac7b(%rip), %rdi # 0x29504 movb $0x0, %al callq 0x167d0 movb $0x0, 0x27(%rsp) jmp 0x1e8dd movq (%rsp), %rax cmpq $0x0, 0x8(%rax) je 0x1e8c6 movq (%rsp), %rax movq 0x8(%rax), %rdi movl 0x14(%rsp), %esi movb 0x13(%rsp), %al movq 0x8(%rsp), %rcx movzbl %al, %edx callq 0x26660 movb $0x1, 0x27(%rsp) jmp 0x1e8dd movq (%rsp), %rax movb 0x13(%rsp), %dl movq (%rax), %rax movl 0x14(%rsp), %ecx movb %dl, (%rax,%rcx) movb $0x1, 0x27(%rsp) movb 0x27(%rsp), %al andb $0x1, %al addq $0x28, %rsp retq nopl (%rax,%rax)
_ZN13MemoryManager7setByteEjhPj: sub rsp, 28h mov al, dl mov [rsp+28h+var_10], rdi mov [rsp+28h+var_14], esi mov [rsp+28h+var_15], al mov [rsp+28h+var_20], rcx mov rdi, [rsp+28h+var_10]; this mov [rsp+28h+var_28], rdi mov esi, [rsp+28h+var_14]; unsigned int call _ZN13MemoryManager11isAddrExistEj; MemoryManager::isAddrExist(uint) test al, 1 jnz short loc_1E897 mov esi, [rsp+28h+var_14] lea rdi, aByteWriteToInv; "Byte write to invalid addr 0x%x!\n" mov al, 0 call _Z9dbgprintfPKcz; dbgprintf(char const*,...) mov [rsp+28h+var_1], 0 jmp short loc_1E8DD loc_1E897: mov rax, [rsp+28h+var_28] cmp qword ptr [rax+8], 0 jz short loc_1E8C6 mov rax, [rsp+28h+var_28] mov rdi, [rax+8]; this mov esi, [rsp+28h+var_14]; unsigned int mov al, [rsp+28h+var_15] mov rcx, [rsp+28h+var_20]; unsigned int * movzx edx, al; unsigned __int8 call _ZN5Cache7setByteEjhPj; Cache::setByte(uint,uchar,uint *) mov [rsp+28h+var_1], 1 jmp short loc_1E8DD loc_1E8C6: mov rax, [rsp+28h+var_28] mov dl, [rsp+28h+var_15] mov rax, [rax] mov ecx, [rsp+28h+var_14] mov [rax+rcx], dl mov [rsp+28h+var_1], 1 loc_1E8DD: mov al, [rsp+28h+var_1] and al, 1 add rsp, 28h retn
char MemoryManager::setByte( Cache **this, unsigned int a2, unsigned __int8 a3, unsigned int *a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 if ( MemoryManager::isAddrExist((MemoryManager *)this, a2) ) { if ( this[1] ) Cache::setByte(this[1], a2, a3, a4); else *((_BYTE *)*this + a2) = a3; return 1; } else { dbgprintf( "Byte write to invalid addr 0x%x!\n", a2, v12, v13, v14, v15, a5, a6, a7, a8, v16, v17, a11, a12, (char)this); return 0; } }
setByte: SUB RSP,0x28 MOV AL,DL MOV qword ptr [RSP + 0x18],RDI MOV dword ptr [RSP + 0x14],ESI MOV byte ptr [RSP + 0x13],AL MOV qword ptr [RSP + 0x8],RCX MOV RDI,qword ptr [RSP + 0x18] MOV qword ptr [RSP],RDI MOV ESI,dword ptr [RSP + 0x14] CALL 0x0011e830 TEST AL,0x1 JNZ 0x0011e897 MOV ESI,dword ptr [RSP + 0x14] LEA RDI,[0x129504] MOV AL,0x0 CALL 0x001167d0 MOV byte ptr [RSP + 0x27],0x0 JMP 0x0011e8dd LAB_0011e897: MOV RAX,qword ptr [RSP] CMP qword ptr [RAX + 0x8],0x0 JZ 0x0011e8c6 MOV RAX,qword ptr [RSP] MOV RDI,qword ptr [RAX + 0x8] MOV ESI,dword ptr [RSP + 0x14] MOV AL,byte ptr [RSP + 0x13] MOV RCX,qword ptr [RSP + 0x8] MOVZX EDX,AL CALL 0x00126660 MOV byte ptr [RSP + 0x27],0x1 JMP 0x0011e8dd LAB_0011e8c6: MOV RAX,qword ptr [RSP] MOV DL,byte ptr [RSP + 0x13] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RSP + 0x14] MOV byte ptr [RAX + RCX*0x1],DL MOV byte ptr [RSP + 0x27],0x1 LAB_0011e8dd: MOV AL,byte ptr [RSP + 0x27] AND AL,0x1 ADD RSP,0x28 RET
/* MemoryManager::setByte(unsigned int, unsigned char, unsigned int*) */ int1 __thiscall MemoryManager::setByte(MemoryManager *this,uint param_1,uchar param_2,uint *param_3) { ulong uVar1; int1 local_1; uVar1 = isAddrExist(this,param_1); if ((uVar1 & 1) == 0) { dbgprintf("Byte write to invalid addr 0x%x!\n",(ulong)param_1); local_1 = 0; } else if (*(long *)(this + 8) == 0) { *(uchar *)(*(long *)this + (ulong)param_1) = param_2; local_1 = 1; } else { Cache::setByte(*(Cache **)(this + 8),param_1,param_2,param_3); local_1 = 1; } return local_1; }
53,559
trnman_new_trn
eloqsql/storage/maria/trnman.c
TRN *trnman_new_trn(WT_THD *wt) { int res; TRN *trn; union { TRN *trn; void *v; } tmp; DBUG_ENTER("trnman_new_trn"); /* we have a mutex, to do simple things under it - allocate a TRN, increment trnman_active_transactions, set trn->min_read_from. Note that all the above is fast. generating short_id may be slow, as it involves scanning a large array - so it's done outside of the mutex. */ DBUG_PRINT("info", ("mysql_mutex_lock LOCK_trn_list")); mysql_mutex_lock(&LOCK_trn_list); /* Allocating a new TRN structure */ tmp.trn= pool; /* Popping an unused TRN from the pool (ABA isn't possible, we're behind a mutex */ while (tmp.trn && !my_atomic_casptr((void **)(char*) &pool, &tmp.v, (void *)tmp.trn->next)) /* no-op */; /* Nothing in the pool ? Allocate a new one */ if (!(trn= tmp.trn)) { /* trn should be completely initialized at create time to allow one to keep a known state on it. (Like redo_lns, which is assumed to be 0 at start of row handling and reset to zero before end of row handling) */ trn= (TRN *)my_malloc(PSI_INSTRUMENT_ME, sizeof(TRN), MYF(MY_WME | MY_ZEROFILL)); if (unlikely(!trn)) { DBUG_PRINT("info", ("mysql_mutex_unlock LOCK_trn_list")); mysql_mutex_unlock(&LOCK_trn_list); return 0; } trnman_allocated_transactions++; mysql_mutex_init(key_TRN_state_lock, &trn->state_lock, MY_MUTEX_INIT_FAST); } trn->wt= wt; trn->pins= lf_hash_get_pins(&trid_to_trn); if (!trn->pins) { trnman_free_trn(trn); mysql_mutex_unlock(&LOCK_trn_list); return 0; } trnman_active_transactions++; trn->min_read_from= active_list_min.next->trid; trn->trid= new_trid(); trn->next= &active_list_max; trn->prev= active_list_max.prev; active_list_max.prev= trn->prev->next= trn; trid_min_read_from= active_list_min.next->min_read_from; DBUG_PRINT("info", ("mysql_mutex_unlock LOCK_trn_list")); mysql_mutex_unlock(&LOCK_trn_list); if (unlikely(!trn->min_read_from)) { /* We are the only transaction. Set min_read_from so that we can read our own rows */ trn->min_read_from= trn->trid + 1; } /* no other transaction can read changes done by this one */ trn->commit_trid= MAX_TRID; trn->rec_lsn= trn->undo_lsn= trn->first_undo_lsn= 0; trn->used_tables= 0; trn->used_instances= 0; trn->locked_tables= 0; trn->flags= 0; /* only after the following function TRN is considered initialized, so it must be done the last */ mysql_mutex_lock(&trn->state_lock); trn->short_id= get_short_trid(trn); mysql_mutex_unlock(&trn->state_lock); res= lf_hash_insert(&trid_to_trn, trn->pins, &trn); DBUG_ASSERT(res <= 0); if (res) { trnman_end_trn(trn, 0); return 0; } DBUG_PRINT("exit", ("trn: %p trid: 0x%lu min_read_from: 0x%lu", trn, (ulong) trn->trid, (ulong) trn->min_read_from)); DBUG_RETURN(trn); }
O3
c
trnman_new_trn: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %r14 cmpq $0x0, 0x3b6afb(%rip) # 0x3fd560 jne 0x46ce7 leaq 0x3b6aae(%rip), %rdi # 0x3fd520 callq 0x29220 movq 0x3b69ca(%rip), %rbx # 0x3fd448 testq %rbx, %rbx je 0x46aad movq %rbx, %rcx movq 0x68(%rbx), %rdx movq %rbx, %rax lock cmpxchgq %rdx, 0x3b69b2(%rip) # 0x3fd448 movq %rax, %rbx cmoveq %rcx, %rbx je 0x46aa4 testq %rbx, %rbx jne 0x46a83 movq %rbx, -0x20(%rbp) testq %rbx, %rbx jne 0x46b12 movl $0xb0, %esi movl $0x30, %edx xorl %edi, %edi callq 0x9fdb1 movq %rax, -0x20(%rbp) testq %rax, %rax je 0x46d44 movq %rax, %rbx incl 0x3b696c(%rip) # 0x3fd440 leaq 0x3b65f9(%rip), %rax # 0x3fd0d4 movl (%rax), %edi movq %rbx, %r15 addq $0x10, %r15 leaq 0x33f525(%rip), %rax # 0x386010 movq (%rax), %rax movq %r15, %rsi callq *0x40(%rax) movq %rax, 0x50(%rbx) movq %r15, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x38(%rbx) leaq 0xbc1f26(%rip), %rsi # 0xc08a30 movq %r15, %rdi callq 0x29340 movq %r14, 0x8(%rbx) leaq 0x3b6963(%rip), %rdi # 0x3fd480 callq 0x2f225 movq %rax, (%rbx) testq %rax, %rax je 0x46cba incl 0x3b6904(%rip) # 0x3fd438 movq 0x3b66a5(%rip), %rax # 0x3fd1e0 movq 0x78(%rax), %rax movq %rax, 0x80(%rbx) movq 0x3b6903(%rip), %rax # 0x3fd450 incq %rax movq %rax, 0x3b68f9(%rip) # 0x3fd450 movq %rax, 0x78(%rbx) leaq 0x3b66c6(%rip), %rax # 0x3fd228 movq %rax, 0x68(%rbx) movq 0x3b672b(%rip), %rax # 0x3fd298 movq %rax, 0x70(%rbx) movq %rbx, 0x68(%rax) movq %rbx, 0x3b671c(%rip) # 0x3fd298 movq 0x3b665d(%rip), %rax # 0x3fd1e0 movq 0x80(%rax), %rax movq %rax, 0x33d5f7(%rip) # 0x384188 movq 0x3b69c8(%rip), %rdi # 0x3fd560 testq %rdi, %rdi jne 0x46cf1 leaq 0x3b6978(%rip), %rdi # 0x3fd520 callq 0x291e0 cmpq $0x0, 0x80(%rbx) je 0x46d06 movq $-0x1, 0x88(%rbx) movw $0x0, 0xae(%rbx) leaq 0x10(%rbx), %rdi xorps %xmm0, %xmm0 movups %xmm0, 0x58(%rbx) movups %xmm0, 0x90(%rbx) movups %xmm0, 0x9c(%rbx) cmpq $0x0, 0x50(%rbx) jne 0x46d19 callq 0x29220 movq 0x3b6851(%rip), %rax # 0x3fd450 addq %rbx, %rax imulq $0x4c319, %rax, %rcx # imm = 0x4C319 movabsq $-0x7fff7fff7fff7fff, %rdx # imm = 0x8000800080008001 movq %rcx, %rax mulq %rdx shrq $0xf, %rdx movq %rdx, %rax shlq $0x10, %rax subq %rax, %rdx addq %rcx, %rdx incq %rdx movq 0x3b653c(%rip), %rcx # 0x3fd170 cmpq $0x0, (%rcx,%rdx,8) je 0x46c3f movl %edx, %esi jmp 0x46c54 xorl %eax, %eax lock cmpxchgq %rbx, (%rcx,%rdx,8) movq 0x3b6522(%rip), %rcx # 0x3fd170 movl %edx, %esi movl %edx, %eax je 0x46c61 incq %rdx xorl %eax, %eax cmpl $0xffff, %esi # imm = 0xFFFF jl 0x46c34 movl $0x1, %edx testl %eax, %eax je 0x46c34 movq -0x20(%rbp), %r14 movw %ax, 0xac(%r14) leaq 0x10(%r14), %rbx movq 0x50(%r14), %rdi testq %rdi, %rdi jne 0x46d2f movq %rbx, %rdi callq 0x291e0 movq (%r14), %rsi leaq 0x3b67bf(%rip), %rdi # 0x3fd458 leaq -0x20(%rbp), %rbx movq %rbx, %rdx callq 0x2f400 movl %eax, %ecx movq (%rbx), %rax testl %ecx, %ecx je 0x46cdc movq %rax, %rdi xorl %esi, %esi callq 0x46dda jmp 0x46cda movq %rbx, %rdi callq 0x46d60 movq 0x3b6897(%rip), %rdi # 0x3fd560 testq %rdi, %rdi jne 0x46d4b leaq 0x3b684b(%rip), %rdi # 0x3fd520 callq 0x291e0 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x2a52e jmp 0x46a77 leaq 0x33f318(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x46ba1 movq 0x78(%rbx), %rax incq %rax movq %rax, 0x80(%rbx) jmp 0x46bbb leaq 0x92c8d(%rip), %rsi # 0xd99ad movl $0x173, %edx # imm = 0x173 callq 0x2eb8f jmp 0x46bf8 leaq 0x33f2da(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x46c87 callq 0x2a54b jmp 0x46cda leaq 0x33f2be(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x46cce
trnman_new_trn: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov r14, rdi cmp cs:qword_3FD560, 0 jnz loc_46CE7 lea rdi, LOCK_trn_list call _pthread_mutex_lock loc_46A77: mov rbx, cs:pool test rbx, rbx jz short loc_46AAD loc_46A83: mov rcx, rbx mov rdx, [rbx+68h] mov rax, rbx lock cmpxchg cs:pool, rdx mov rbx, rax cmovz rbx, rcx jz short loc_46AA4 test rbx, rbx jnz short loc_46A83 loc_46AA4: mov [rbp+var_20], rbx test rbx, rbx jnz short loc_46B12 loc_46AAD: mov esi, 0B0h mov edx, 30h ; '0' xor edi, edi call my_malloc mov [rbp+var_20], rax test rax, rax jz loc_46D44 mov rbx, rax inc cs:trnman_allocated_transactions lea rax, key_TRN_state_lock mov edi, [rax] mov r15, rbx add r15, 10h lea rax, PSI_server mov rax, [rax] mov rsi, r15 call qword ptr [rax+40h] mov [rbx+50h], rax mov [rbx+48h], r15 xorps xmm0, xmm0 movups xmmword ptr [rbx+38h], xmm0 lea rsi, my_fast_mutexattr mov rdi, r15 call _pthread_mutex_init loc_46B12: mov [rbx+8], r14 lea rdi, unk_3FD480 call lf_pinbox_get_pins mov [rbx], rax test rax, rax jz loc_46CBA inc cs:trnman_active_transactions mov rax, cs:qword_3FD1E0 mov rax, [rax+78h] mov [rbx+80h], rax mov rax, cs:global_trid_generator inc rax mov cs:global_trid_generator, rax mov [rbx+78h], rax lea rax, active_list_max mov [rbx+68h], rax mov rax, cs:qword_3FD298 mov [rbx+70h], rax mov [rax+68h], rbx mov cs:qword_3FD298, rbx mov rax, cs:qword_3FD1E0 mov rax, [rax+80h] mov cs:trid_min_read_from, rax mov rdi, cs:qword_3FD560 test rdi, rdi jnz loc_46CF1 loc_46BA1: lea rdi, LOCK_trn_list call _pthread_mutex_unlock cmp qword ptr [rbx+80h], 0 jz loc_46D06 loc_46BBB: mov qword ptr [rbx+88h], 0FFFFFFFFFFFFFFFFh mov word ptr [rbx+0AEh], 0 lea rdi, [rbx+10h] xorps xmm0, xmm0 movups xmmword ptr [rbx+58h], xmm0 movups xmmword ptr [rbx+90h], xmm0 movups xmmword ptr [rbx+9Ch], xmm0 cmp qword ptr [rbx+50h], 0 jnz loc_46D19 call _pthread_mutex_lock loc_46BF8: mov rax, cs:global_trid_generator add rax, rbx imul rcx, rax, 4C319h mov rdx, 8000800080008001h mov rax, rcx mul rdx shr rdx, 0Fh mov rax, rdx shl rax, 10h sub rdx, rax add rdx, rcx inc rdx mov rcx, cs:short_trid_to_active_trn loc_46C34: cmp qword ptr [rcx+rdx*8], 0 jz short loc_46C3F mov esi, edx jmp short loc_46C54 loc_46C3F: xor eax, eax lock cmpxchg [rcx+rdx*8], rbx mov rcx, cs:short_trid_to_active_trn mov esi, edx mov eax, edx jz short loc_46C61 loc_46C54: inc rdx xor eax, eax cmp esi, 0FFFFh jl short loc_46C34 loc_46C61: mov edx, 1 test eax, eax jz short loc_46C34 mov r14, [rbp+var_20] mov [r14+0ACh], ax lea rbx, [r14+10h] mov rdi, [r14+50h] test rdi, rdi jnz loc_46D2F loc_46C87: mov rdi, rbx call _pthread_mutex_unlock mov rsi, [r14] lea rdi, trid_to_trn lea rbx, [rbp+var_20] mov rdx, rbx call lf_hash_insert mov ecx, eax mov rax, [rbx] test ecx, ecx jz short loc_46CDC mov rdi, rax xor esi, esi call trnman_end_trn jmp short loc_46CDA loc_46CBA: mov rdi, rbx call trnman_free_trn mov rdi, cs:qword_3FD560 test rdi, rdi jnz short loc_46D4B loc_46CCE: lea rdi, LOCK_trn_list call _pthread_mutex_unlock loc_46CDA: xor eax, eax loc_46CDC: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_46CE7: call trnman_new_trn_cold_1 jmp loc_46A77 loc_46CF1: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_46BA1 loc_46D06: mov rax, [rbx+78h] inc rax mov [rbx+80h], rax jmp loc_46BBB loc_46D19: lea rsi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 173h call psi_mutex_lock jmp loc_46BF8 loc_46D2F: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_46C87 loc_46D44: call trnman_new_trn_cold_2 jmp short loc_46CDA loc_46D4B: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_46CCE
signed long long trnman_new_trn(long long a1) { signed long long v1; // rax signed long long v2; // rbx signed long long v3; // rcx bool v4; // zf signed long long v5; // rax long long v6; // rax long long v7; // r15 long long pins; // rax long long v9; // rax long long v10; // rdi unsigned long long v11; // rdx long long v12; // rcx long long v13; // rsi int v14; // eax long long *v15; // r14 long long v16; // rdi int v17; // ecx signed long long result; // rax signed long long v19[4]; // [rsp+0h] [rbp-20h] BYREF v19[0] = v1; if ( qword_3FD560 ) trnman_new_trn_cold_1(a1); else pthread_mutex_lock(&LOCK_trn_list); v2 = pool; if ( !pool ) goto LABEL_8; while ( 1 ) { v3 = v2; v5 = _InterlockedCompareExchange64(&pool, *(_QWORD *)(v2 + 104), v2); v4 = v2 == v5; v2 = v5; if ( v4 ) break; if ( !v5 ) goto LABEL_7; } v2 = v3; LABEL_7: v19[0] = v2; if ( !v2 ) { LABEL_8: v6 = my_malloc(0LL, 176LL, 48LL); v19[0] = v6; if ( !v6 ) { trnman_new_trn_cold_2(); return 0LL; } v2 = v6; ++trnman_allocated_transactions; v7 = v6 + 16; *(_QWORD *)(v6 + 80) = ((long long ( *)(_QWORD, long long))PSI_server[8])(key_TRN_state_lock, v6 + 16); *(_QWORD *)(v2 + 72) = v7; *(_OWORD *)(v2 + 56) = 0LL; pthread_mutex_init(v7, &my_fast_mutexattr); } *(_QWORD *)(v2 + 8) = a1; pins = lf_pinbox_get_pins((long long)&unk_3FD480); *(_QWORD *)v2 = pins; if ( !pins ) { trnman_free_trn(v2); if ( qword_3FD560 ) PSI_server[44](); pthread_mutex_unlock(&LOCK_trn_list); return 0LL; } ++trnman_active_transactions; *(_QWORD *)(v2 + 128) = *(_QWORD *)(qword_3FD1E0 + 120); *(_QWORD *)(v2 + 120) = ++global_trid_generator; *(_QWORD *)(v2 + 104) = &active_list_max; v9 = qword_3FD298; *(_QWORD *)(v2 + 112) = qword_3FD298; *(_QWORD *)(v9 + 104) = v2; qword_3FD298 = v2; trid_min_read_from = *(_QWORD *)(qword_3FD1E0 + 128); if ( qword_3FD560 ) PSI_server[44](); pthread_mutex_unlock(&LOCK_trn_list); if ( !*(_QWORD *)(v2 + 128) ) *(_QWORD *)(v2 + 128) = *(_QWORD *)(v2 + 120) + 1LL; *(_QWORD *)(v2 + 136) = -1LL; *(_WORD *)(v2 + 174) = 0; v10 = v2 + 16; *(_OWORD *)(v2 + 88) = 0LL; *(_OWORD *)(v2 + 144) = 0LL; *(_OWORD *)(v2 + 156) = 0LL; if ( *(_QWORD *)(v2 + 80) ) psi_mutex_lock(v10, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c", 0x173u); else pthread_mutex_lock(v10); v11 = 312089 * (v2 + global_trid_generator) % 0xFFFFuLL + 1; v12 = short_trid_to_active_trn; do { do { if ( *(_QWORD *)(v12 + 8 * v11) ) { v13 = (unsigned int)v11; } else { v4 = _InterlockedCompareExchange64((volatile signed long long *)(v12 + 8 * v11), v2, 0LL) == 0; v12 = short_trid_to_active_trn; v13 = (unsigned int)v11; v14 = v11; if ( v4 ) break; } ++v11; v14 = 0; } while ( (int)v13 < 0xFFFF ); v11 = 1LL; } while ( !v14 ); v15 = (long long *)v19[0]; *(_WORD *)(v19[0] + 172) = v14; v16 = v15[10]; if ( v16 ) ((void ( *)(long long, long long, long long, long long))PSI_server[44])(v16, v13, 1LL, v12); pthread_mutex_unlock(v15 + 2); v17 = lf_hash_insert((long long)&trid_to_trn, *v15, (long long)v19); result = v19[0]; if ( v17 ) { trnman_end_trn(v19[0], 0LL); return 0LL; } return result; }
trnman_new_trn: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R14,RDI CMP qword ptr [0x004fd560],0x0 JNZ 0x00146ce7 LEA RDI,[0x4fd520] CALL 0x00129220 LAB_00146a77: MOV RBX,qword ptr [0x004fd448] TEST RBX,RBX JZ 0x00146aad LAB_00146a83: MOV RCX,RBX MOV RDX,qword ptr [RBX + 0x68] MOV RAX,RBX CMPXCHG.LOCK qword ptr [0x004fd448],RDX MOV RBX,RAX CMOVZ RBX,RCX JZ 0x00146aa4 TEST RBX,RBX JNZ 0x00146a83 LAB_00146aa4: MOV qword ptr [RBP + -0x20],RBX TEST RBX,RBX JNZ 0x00146b12 LAB_00146aad: MOV ESI,0xb0 MOV EDX,0x30 XOR EDI,EDI CALL 0x0019fdb1 MOV qword ptr [RBP + -0x20],RAX TEST RAX,RAX JZ 0x00146d44 MOV RBX,RAX INC dword ptr [0x004fd440] LEA RAX,[0x4fd0d4] MOV EDI,dword ptr [RAX] MOV R15,RBX ADD R15,0x10 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RSI,R15 CALL qword ptr [RAX + 0x40] MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x48],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x38],XMM0 LEA RSI,[0xd08a30] MOV RDI,R15 CALL 0x00129340 LAB_00146b12: MOV qword ptr [RBX + 0x8],R14 LEA RDI,[0x4fd480] CALL 0x0012f225 MOV qword ptr [RBX],RAX TEST RAX,RAX JZ 0x00146cba INC dword ptr [0x004fd438] MOV RAX,qword ptr [0x004fd1e0] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBX + 0x80],RAX MOV RAX,qword ptr [0x004fd450] INC RAX MOV qword ptr [0x004fd450],RAX MOV qword ptr [RBX + 0x78],RAX LEA RAX,[0x4fd228] MOV qword ptr [RBX + 0x68],RAX MOV RAX,qword ptr [0x004fd298] MOV qword ptr [RBX + 0x70],RAX MOV qword ptr [RAX + 0x68],RBX MOV qword ptr [0x004fd298],RBX MOV RAX,qword ptr [0x004fd1e0] MOV RAX,qword ptr [RAX + 0x80] MOV qword ptr [0x00484188],RAX MOV RDI,qword ptr [0x004fd560] TEST RDI,RDI JNZ 0x00146cf1 LAB_00146ba1: LEA RDI,[0x4fd520] CALL 0x001291e0 CMP qword ptr [RBX + 0x80],0x0 JZ 0x00146d06 LAB_00146bbb: MOV qword ptr [RBX + 0x88],-0x1 MOV word ptr [RBX + 0xae],0x0 LEA RDI,[RBX + 0x10] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x58],XMM0 MOVUPS xmmword ptr [RBX + 0x90],XMM0 MOVUPS xmmword ptr [RBX + 0x9c],XMM0 CMP qword ptr [RBX + 0x50],0x0 JNZ 0x00146d19 CALL 0x00129220 LAB_00146bf8: MOV RAX,qword ptr [0x004fd450] ADD RAX,RBX IMUL RCX,RAX,0x4c319 MOV RDX,-0x7fff7fff7fff7fff MOV RAX,RCX MUL RDX SHR RDX,0xf MOV RAX,RDX SHL RAX,0x10 SUB RDX,RAX ADD RDX,RCX INC RDX MOV RCX,qword ptr [0x004fd170] LAB_00146c34: CMP qword ptr [RCX + RDX*0x8],0x0 JZ 0x00146c3f MOV ESI,EDX JMP 0x00146c54 LAB_00146c3f: XOR EAX,EAX CMPXCHG.LOCK qword ptr [RCX + RDX*0x8],RBX MOV RCX,qword ptr [0x004fd170] MOV ESI,EDX MOV EAX,EDX JZ 0x00146c61 LAB_00146c54: INC RDX XOR EAX,EAX CMP ESI,0xffff JL 0x00146c34 LAB_00146c61: MOV EDX,0x1 TEST EAX,EAX JZ 0x00146c34 MOV R14,qword ptr [RBP + -0x20] MOV word ptr [R14 + 0xac],AX LEA RBX,[R14 + 0x10] MOV RDI,qword ptr [R14 + 0x50] TEST RDI,RDI JNZ 0x00146d2f LAB_00146c87: MOV RDI,RBX CALL 0x001291e0 MOV RSI,qword ptr [R14] LEA RDI,[0x4fd458] LEA RBX,[RBP + -0x20] MOV RDX,RBX CALL 0x0012f400 MOV ECX,EAX MOV RAX,qword ptr [RBX] TEST ECX,ECX JZ 0x00146cdc MOV RDI,RAX XOR ESI,ESI CALL 0x00146dda JMP 0x00146cda LAB_00146cba: MOV RDI,RBX CALL 0x00146d60 MOV RDI,qword ptr [0x004fd560] TEST RDI,RDI JNZ 0x00146d4b LAB_00146cce: LEA RDI,[0x4fd520] CALL 0x001291e0 LAB_00146cda: XOR EAX,EAX LAB_00146cdc: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_00146ce7: CALL 0x0012a52e JMP 0x00146a77 LAB_00146cf1: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00146ba1 LAB_00146d06: MOV RAX,qword ptr [RBX + 0x78] INC RAX MOV qword ptr [RBX + 0x80],RAX JMP 0x00146bbb LAB_00146d19: LEA RSI,[0x1d99ad] MOV EDX,0x173 CALL 0x0012eb8f JMP 0x00146bf8 LAB_00146d2f: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00146c87 LAB_00146d44: CALL 0x0012a54b JMP 0x00146cda LAB_00146d4b: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00146cce
long * trnman_new_trn(long param_1) { long *plVar1; int iVar2; long *in_RAX; long *plVar3; long *plVar4; long lVar5; long lVar6; pthread_mutex_t *ppVar7; bool bVar8; long *local_28; local_28 = in_RAX; if (LOCK_trn_list._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)LOCK_trn_list); } else { trnman_new_trn_cold_1(); } plVar4 = pool; if (pool != (long *)0x0) { do { LOCK(); bVar8 = plVar4 != pool; plVar3 = plVar4; plVar1 = (long *)plVar4[0xd]; if (bVar8) { plVar3 = pool; plVar1 = pool; } pool = plVar1; UNLOCK(); } while ((bVar8) && (plVar4 = plVar3, plVar3 != (long *)0x0)); local_28 = plVar4; if (plVar4 != (long *)0x0) goto LAB_00146b12; } plVar4 = (long *)my_malloc(0,0xb0,0x30); local_28 = plVar4; if (plVar4 == (long *)0x0) { trnman_new_trn_cold_2(); return (long *)0x0; } trnman_allocated_transactions = trnman_allocated_transactions + 1; ppVar7 = (pthread_mutex_t *)(plVar4 + 2); lVar5 = (**(code **)(PSI_server + 0x40))(key_TRN_state_lock,ppVar7); plVar4[10] = lVar5; plVar4[9] = (long)ppVar7; plVar4[7] = 0; plVar4[8] = 0; pthread_mutex_init(ppVar7,(pthread_mutexattr_t *)&my_fast_mutexattr); LAB_00146b12: plVar4[1] = param_1; lVar5 = lf_pinbox_get_pins(0x4fd480); *plVar4 = lVar5; if (lVar5 == 0) { trnman_free_trn(plVar4); if (LOCK_trn_list._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)LOCK_trn_list); } else { trnman_active_transactions = trnman_active_transactions + 1; plVar4[0x10] = *(long *)(active_list_min._104_8_ + 0x78); global_trid_generator = global_trid_generator + 1; plVar4[0xf] = global_trid_generator; plVar4[0xd] = (long)active_list_max; plVar4[0xe] = active_list_max._112_8_; *(long **)(active_list_max._112_8_ + 0x68) = plVar4; trid_min_read_from = *(int8 *)(active_list_min._104_8_ + 0x80); active_list_max._112_8_ = plVar4; if (LOCK_trn_list._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)LOCK_trn_list); if (plVar4[0x10] == 0) { plVar4[0x10] = plVar4[0xf] + 1; } plVar4[0x11] = -1; *(int2 *)((long)plVar4 + 0xae) = 0; plVar4[0xb] = 0; plVar4[0xc] = 0; plVar4[0x12] = 0; plVar4[0x13] = 0; *(int8 *)((long)plVar4 + 0x9c) = 0; *(int8 *)((long)plVar4 + 0xa4) = 0; if (plVar4[10] == 0) { pthread_mutex_lock((pthread_mutex_t *)(plVar4 + 2)); } else { psi_mutex_lock((pthread_mutex_t *)(plVar4 + 2), "/workspace/llm4binary/github2025/eloqsql/storage/maria/trnman.c",0x173); } plVar3 = local_28; lVar6 = (ulong)((global_trid_generator + (long)plVar4) * 0x4c319) % 0xffff + 1; lVar5 = short_trid_to_active_trn; LAB_00146c34: do { iVar2 = (int)lVar6; if (*(long *)(lVar5 + lVar6 * 8) == 0) { plVar1 = (long *)(lVar5 + lVar6 * 8); LOCK(); bVar8 = *plVar1 == 0; if (bVar8) { *plVar1 = (long)plVar4; } UNLOCK(); lVar5 = short_trid_to_active_trn; if (!bVar8) goto LAB_00146c54; } else { LAB_00146c54: lVar6 = lVar6 + 1; bVar8 = iVar2 < 0xffff; iVar2 = 0; if (bVar8) goto LAB_00146c34; } lVar6 = 1; } while (iVar2 == 0); *(short *)((long)local_28 + 0xac) = (short)iVar2; ppVar7 = (pthread_mutex_t *)(local_28 + 2); if (local_28[10] != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(ppVar7); iVar2 = lf_hash_insert(trid_to_trn,*plVar3,&local_28); if (iVar2 == 0) { return local_28; } trnman_end_trn(local_28,0); } return (long *)0x0; }
53,560
evmone::get_error_message(evmone::EOFValidationError)
corpus-core[P]colibri-stateless/build_O1/_deps/evmone_external-src/lib/evmone/eof.cpp
std::string_view get_error_message(EOFValidationError err) noexcept { switch (err) { case EOFValidationError::success: return "success"; case EOFValidationError::invalid_prefix: return "invalid_prefix"; case EOFValidationError::eof_version_unknown: return "eof_version_unknown"; case EOFValidationError::incomplete_section_size: return "incomplete_section_size"; case EOFValidationError::incomplete_section_number: return "incomplete_section_number"; case EOFValidationError::header_terminator_missing: return "header_terminator_missing"; case EOFValidationError::type_section_missing: return "type_section_missing"; case EOFValidationError::code_section_missing: return "code_section_missing"; case EOFValidationError::data_section_missing: return "data_section_missing"; case EOFValidationError::zero_section_size: return "zero_section_size"; case EOFValidationError::section_headers_not_terminated: return "section_headers_not_terminated"; case EOFValidationError::invalid_section_bodies_size: return "invalid_section_bodies_size"; case EOFValidationError::unreachable_code_sections: return "unreachable_code_sections"; case EOFValidationError::undefined_instruction: return "undefined_instruction"; case EOFValidationError::truncated_instruction: return "truncated_instruction"; case EOFValidationError::invalid_rjump_destination: return "invalid_rjump_destination"; case EOFValidationError::too_many_code_sections: return "too_many_code_sections"; case EOFValidationError::invalid_type_section_size: return "invalid_type_section_size"; case EOFValidationError::invalid_first_section_type: return "invalid_first_section_type"; case EOFValidationError::invalid_max_stack_increase: return "invalid_max_stack_increase"; case EOFValidationError::max_stack_increase_above_limit: return "max_stack_increase_above_limit"; case EOFValidationError::inputs_outputs_num_above_limit: return "inputs_outputs_num_above_limit"; case EOFValidationError::no_terminating_instruction: return "no_terminating_instruction"; case EOFValidationError::stack_height_mismatch: return "stack_height_mismatch"; case EOFValidationError::stack_higher_than_outputs_required: return "stack_higher_than_outputs_required"; case EOFValidationError::unreachable_instructions: return "unreachable_instructions"; case EOFValidationError::stack_underflow: return "stack_underflow"; case EOFValidationError::stack_overflow: return "stack_overflow"; case EOFValidationError::invalid_code_section_index: return "invalid_code_section_index"; case EOFValidationError::invalid_dataloadn_index: return "invalid_dataloadn_index"; case EOFValidationError::jumpf_destination_incompatible_outputs: return "jumpf_destination_incompatible_outputs"; case EOFValidationError::invalid_non_returning_flag: return "invalid_non_returning_flag"; case EOFValidationError::callf_to_non_returning_function: return "callf_to_non_returning_function"; case EOFValidationError::too_many_container_sections: return "too_many_container_sections"; case EOFValidationError::invalid_container_section_index: return "invalid_container_section_index"; case EOFValidationError::eofcreate_with_truncated_container: return "eofcreate_with_truncated_container"; case EOFValidationError::toplevel_container_truncated: return "toplevel_container_truncated"; case EOFValidationError::ambiguous_container_kind: return "ambiguous_container_kind"; case EOFValidationError::incompatible_container_kind: return "incompatible_container_kind"; case EOFValidationError::container_size_above_limit: return "container_size_above_limit"; case EOFValidationError::unreferenced_subcontainer: return "unreferenced_subcontainer"; } return "<unknown>"; }
O1
cpp
evmone::get_error_message(evmone::EOFValidationError): cmpl $0x28, %edi ja 0x49445 movl %edi, %eax leaq 0x42f5a(%rip), %rcx # 0x8c38c movslq (%rcx,%rax,4), %rdx addq %rcx, %rdx leaq 0x42ff0(%rip), %rcx # 0x8c430 movq (%rcx,%rax,8), %rax retq movl $0x9, %eax leaq 0x436a9(%rip), %rdx # 0x8cafa retq
_ZN6evmone17get_error_messageENS_18EOFValidationErrorE: cmp edi, 28h ; '(' ja short loc_49445 mov eax, edi lea rcx, unk_8C38C movsxd rdx, dword ptr [rcx+rax*4] add rdx, rcx lea rcx, unk_8C430 mov rax, [rcx+rax*8] retn loc_49445: mov eax, 9 lea rdx, aUnknown; "<unknown>" retn
long long evmone::get_error_message(unsigned int a1) { if ( a1 > 0x28 ) return 9LL; else return qword_8C430[a1]; }
get_error_message: CMP EDI,0x28 JA 0x00149445 MOV EAX,EDI LEA RCX,[0x18c38c] MOVSXD RDX,dword ptr [RCX + RAX*0x4] ADD RDX,RCX LEA RCX,[0x18c430] MOV RAX,qword ptr [RCX + RAX*0x8] RET LAB_00149445: MOV EAX,0x9 LEA RDX,[0x18cafa] RET
/* evmone::get_error_message(evmone::EOFValidationError) */ int1 [16] evmone::get_error_message(uint param_1) { int1 auVar1 [16]; int1 auVar2 [16]; if (param_1 < 0x29) { auVar1._8_8_ = &DAT_0018c38c + *(int *)(&DAT_0018c38c + (ulong)param_1 * 4); auVar1._0_8_ = *(int8 *)(&DAT_0018c430 + (ulong)param_1 * 8); return auVar1; } auVar2._8_8_ = "<unknown>"; auVar2._0_8_ = 9; return auVar2; }
53,561
stbi__is_16_main(stbi__context*)
llama.cpp/examples/llava/../../common/stb_image.h
static int stbi__is_16_main(stbi__context *s) { #ifndef STBI_NO_PNG if (stbi__png_is16(s)) return 1; #endif #ifndef STBI_NO_PSD if (stbi__psd_is16(s)) return 1; #endif #ifndef STBI_NO_PNM if (stbi__pnm_is16(s)) return 1; #endif return 0; }
O3
c
stbi__is_16_main(stbi__context*): pushq %rbp pushq %rbx subq $0x28, %rsp movq %rdi, %rbx movq %rsp, %rdi movq %rbx, (%rdi) movl $0x2, %esi xorl %edx, %edx callq 0x2f103 testl %eax, %eax je 0x2320c cmpl $0x10, 0x20(%rsp) jne 0x2320c movl $0x1, %eax jmp 0x232d7 movq (%rsp), %rax movups 0xd0(%rax), %xmm0 movups %xmm0, 0xc0(%rax) movq %rbx, %rdi callq 0x308af movl %eax, %ebp shll $0x10, %ebp movq %rbx, %rdi callq 0x308af orl %ebp, %eax cmpl $0x38425053, %eax # imm = 0x38425053 jne 0x232b1 movq %rbx, %rdi callq 0x308af cmpl $0x1, %eax jne 0x232b1 cmpq $0x0, 0x10(%rbx) je 0x2327e movq 0xc0(%rbx), %rax movq 0xc8(%rbx), %rdx movl %edx, %ecx subl %eax, %ecx cmpl $0x5, %ecx jg 0x23285 movq %rdx, 0xc0(%rbx) movq 0x28(%rbx), %rdi movl $0x6, %esi subl %ecx, %esi callq *0x18(%rbx) jmp 0x23290 movq 0xc0(%rbx), %rax addq $0x6, %rax movq %rax, 0xc0(%rbx) movq %rbx, %rdi callq 0x308af cmpl $0x10, %eax ja 0x232b1 movq %rbx, %rdi callq 0x308af movl %eax, %ecx movl $0x1, %eax cmpl $0x10, %ecx je 0x232d7 movups 0xd0(%rbx), %xmm0 movups %xmm0, 0xc0(%rbx) movq %rbx, %rdi xorl %esi, %esi xorl %edx, %edx xorl %ecx, %ecx callq 0x35420 movl %eax, %ecx xorl %eax, %eax cmpl $0x10, %ecx sete %al addq $0x28, %rsp popq %rbx popq %rbp retq
_ZL16stbi__is_16_mainP13stbi__context: push rbp push rbx sub rsp, 28h mov rbx, rdi mov rdi, rsp mov [rdi], rbx mov esi, 2 xor edx, edx call _ZL20stbi__parse_png_fileP9stbi__pngii; stbi__parse_png_file(stbi__png *,int,int) test eax, eax jz short loc_2320C cmp [rsp+38h+var_18], 10h jnz short loc_2320C mov eax, 1 jmp loc_232D7 loc_2320C: mov rax, [rsp+38h+var_38] movups xmm0, xmmword ptr [rax+0D0h] movups xmmword ptr [rax+0C0h], xmm0 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) mov ebp, eax shl ebp, 10h mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) or eax, ebp cmp eax, 38425053h jnz short loc_232B1 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) cmp eax, 1 jnz short loc_232B1 cmp qword ptr [rbx+10h], 0 jz short loc_2327E mov rax, [rbx+0C0h] mov rdx, [rbx+0C8h] mov ecx, edx sub ecx, eax cmp ecx, 5 jg short loc_23285 mov [rbx+0C0h], rdx mov rdi, [rbx+28h] mov esi, 6 sub esi, ecx call qword ptr [rbx+18h] jmp short loc_23290 loc_2327E: mov rax, [rbx+0C0h] loc_23285: add rax, 6 mov [rbx+0C0h], rax loc_23290: mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) cmp eax, 10h ja short loc_232B1 mov rdi, rbx call _ZL13stbi__get16beP13stbi__context; stbi__get16be(stbi__context *) mov ecx, eax mov eax, 1 cmp ecx, 10h jz short loc_232D7 loc_232B1: movups xmm0, xmmword ptr [rbx+0D0h] movups xmmword ptr [rbx+0C0h], xmm0 mov rdi, rbx xor esi, esi xor edx, edx xor ecx, ecx call _ZL14stbi__pnm_infoP13stbi__contextPiS1_S1_; stbi__pnm_info(stbi__context *,int *,int *,int *) mov ecx, eax xor eax, eax cmp ecx, 10h setz al loc_232D7: add rsp, 28h pop rbx pop rbp retn
_BOOL8 stbi__is_16_main(long long a1) { _BOOL8 result; // rax unsigned int v2; // ebp long long v3; // rax int v4; // ecx int v5; // ecx _QWORD v6[4]; // [rsp+0h] [rbp-38h] BYREF int v7; // [rsp+20h] [rbp-18h] v6[0] = a1; if ( (unsigned int)stbi__parse_png_file(v6, 2LL, 0LL) && v7 == 16 ) return 1LL; *(_OWORD *)(v6[0] + 192LL) = *(_OWORD *)(v6[0] + 208LL); v2 = (unsigned int)stbi__get16be(a1) << 16; if ( (v2 | (unsigned int)stbi__get16be(a1)) != 0x38425053 || (unsigned int)stbi__get16be(a1) != 1 ) goto LABEL_13; if ( !*(_QWORD *)(a1 + 16) ) { v3 = *(_QWORD *)(a1 + 192); goto LABEL_10; } v3 = *(_QWORD *)(a1 + 192); v4 = *(_QWORD *)(a1 + 200) - v3; if ( v4 > 5 ) { LABEL_10: *(_QWORD *)(a1 + 192) = v3 + 6; goto LABEL_11; } *(_QWORD *)(a1 + 192) = *(_QWORD *)(a1 + 200); (*(void ( **)(_QWORD, _QWORD))(a1 + 24))(*(_QWORD *)(a1 + 40), (unsigned int)(6 - v4)); LABEL_11: if ( (unsigned int)stbi__get16be(a1) > 0x10 || (v5 = stbi__get16be(a1), result = 1LL, v5 != 16) ) { LABEL_13: *(_OWORD *)(a1 + 192) = *(_OWORD *)(a1 + 208); return (unsigned int)stbi__pnm_info(a1, 0LL, 0LL, 0LL) == 16; } return result; }
stbi__is_16_main: PUSH RBP PUSH RBX SUB RSP,0x28 MOV RBX,RDI MOV RDI,RSP MOV qword ptr [RDI],RBX MOV ESI,0x2 XOR EDX,EDX CALL 0x0012f103 TEST EAX,EAX JZ 0x0012320c CMP dword ptr [RSP + 0x20],0x10 JNZ 0x0012320c MOV EAX,0x1 JMP 0x001232d7 LAB_0012320c: MOV RAX,qword ptr [RSP] MOVUPS XMM0,xmmword ptr [RAX + 0xd0] MOVUPS xmmword ptr [RAX + 0xc0],XMM0 MOV RDI,RBX CALL 0x001308af MOV EBP,EAX SHL EBP,0x10 MOV RDI,RBX CALL 0x001308af OR EAX,EBP CMP EAX,0x38425053 JNZ 0x001232b1 MOV RDI,RBX CALL 0x001308af CMP EAX,0x1 JNZ 0x001232b1 CMP qword ptr [RBX + 0x10],0x0 JZ 0x0012327e MOV RAX,qword ptr [RBX + 0xc0] MOV RDX,qword ptr [RBX + 0xc8] MOV ECX,EDX SUB ECX,EAX CMP ECX,0x5 JG 0x00123285 MOV qword ptr [RBX + 0xc0],RDX MOV RDI,qword ptr [RBX + 0x28] MOV ESI,0x6 SUB ESI,ECX CALL qword ptr [RBX + 0x18] JMP 0x00123290 LAB_0012327e: MOV RAX,qword ptr [RBX + 0xc0] LAB_00123285: ADD RAX,0x6 MOV qword ptr [RBX + 0xc0],RAX LAB_00123290: MOV RDI,RBX CALL 0x001308af CMP EAX,0x10 JA 0x001232b1 MOV RDI,RBX CALL 0x001308af MOV ECX,EAX MOV EAX,0x1 CMP ECX,0x10 JZ 0x001232d7 LAB_001232b1: MOVUPS XMM0,xmmword ptr [RBX + 0xd0] MOVUPS xmmword ptr [RBX + 0xc0],XMM0 MOV RDI,RBX XOR ESI,ESI XOR EDX,EDX XOR ECX,ECX CALL 0x00135420 MOV ECX,EAX XOR EAX,EAX CMP ECX,0x10 SETZ AL LAB_001232d7: ADD RSP,0x28 POP RBX POP RBP RET
/* stbi__is_16_main(stbi__context*) */ bool stbi__is_16_main(stbi__context *param_1) { int iVar1; uint uVar2; long lVar3; stbi__context *local_38 [4]; int local_18; local_38[0] = param_1; iVar1 = stbi__parse_png_file((stbi__png *)local_38,2,0); if ((iVar1 != 0) && (local_18 == 0x10)) { return true; } *(int8 *)(local_38[0] + 0xc0) = *(int8 *)(local_38[0] + 0xd0); *(int8 *)(local_38[0] + 200) = *(int8 *)(local_38[0] + 0xd8); iVar1 = stbi__get16be(param_1); uVar2 = stbi__get16be(param_1); if (((uVar2 | iVar1 << 0x10) != 0x38425053) || (iVar1 = stbi__get16be(param_1), iVar1 != 1)) goto LAB_001232b1; if (*(long *)(param_1 + 0x10) == 0) { lVar3 = *(long *)(param_1 + 0xc0); LAB_00123285: *(long *)(param_1 + 0xc0) = lVar3 + 6; } else { lVar3 = *(long *)(param_1 + 0xc0); if (5 < (int)*(int8 *)(param_1 + 200) - (int)lVar3) goto LAB_00123285; *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 200); (**(code **)(param_1 + 0x18))(*(int8 *)(param_1 + 0x28)); } uVar2 = stbi__get16be(param_1); if ((uVar2 < 0x11) && (iVar1 = stbi__get16be(param_1), iVar1 == 0x10)) { return true; } LAB_001232b1: *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_1 + 0xd0); *(int8 *)(param_1 + 200) = *(int8 *)(param_1 + 0xd8); iVar1 = stbi__pnm_info(param_1,(int *)0x0,(int *)0x0,(int *)0x0); return iVar1 == 0x10; }
53,562
mysql_query_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_query_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_query, (parms->mysql, parms->q), parms->mysql, int, r_int) }
O0
c
mysql_query_start_internal: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x10(%rbp), %rax movq 0x8(%rax), %rsi callq 0x43590 movl %eax, -0x14(%rbp) movl -0x14(%rbp), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_query_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+8] call mysql_query mov [rbp+var_14], eax mov ecx, [rbp+var_14] mov rax, [rbp+var_20] mov [rax+8], ecx mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
_DWORD * mysql_query_start_internal(long long *a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*a1 + 1152) + 40LL); v2[2] = mysql_query(*a1, a1[1]); result = v2; *v2 = 0; return result; }
mysql_query_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x8] CALL 0x00143590 MOV dword ptr [RBP + -0x14],EAX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_query_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_query(*param_1,param_1[1]); puVar1[2] = uVar2; *puVar1 = 0; return; }
53,563
uhd_find_best_resize(std::pair<int, int>, int, int, bool)
llama.cpp/examples/llava/clip.cpp
static std::pair<int, int> uhd_find_best_resize(std::pair<int, int> original_size, int scale_resolution, int patch_size, bool allow_upscale = false) { int width = original_size.first; int height = original_size.second; if ((width * height > scale_resolution * scale_resolution) || allow_upscale) { float r = static_cast<float>(width) / height; height = static_cast<int>(scale_resolution / std::sqrt(r)); width = static_cast<int>(height * r); } int best_width = ensure_divide(width, patch_size); int best_height = ensure_divide(height, patch_size); return std::make_pair(best_width, best_height); }
O3
cpp
uhd_find_best_resize(std::pair<int, int>, int, int, bool): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rax shrq $0x20, %rax movl %eax, %ecx imull %edi, %ecx cmpl $0x31001, %ecx # imm = 0x31001 setge %cl orb %sil, %cl je 0x44ab8 cvtsi2ss %edi, %xmm2 cvtsi2ss %eax, %xmm0 divss %xmm0, %xmm2 xorps %xmm0, %xmm0 ucomiss %xmm0, %xmm2 jb 0x44ac2 xorps %xmm0, %xmm0 sqrtss %xmm2, %xmm0 jmp 0x44ad4 cvtsi2ss %eax, %xmm0 movaps %xmm0, (%rsp) jmp 0x44af3 movaps %xmm2, %xmm0 movss %xmm2, (%rsp) callq 0x24700 movss (%rsp), %xmm2 movss 0xf3098(%rip), %xmm1 # 0x137b74 divss %xmm0, %xmm1 cvttps2dq %xmm1, %xmm0 cvtdq2ps %xmm0, %xmm0 movaps %xmm0, (%rsp) mulss %xmm0, %xmm2 cvttss2si %xmm2, %edi xorps %xmm0, %xmm0 cvtsi2ss %edi, %xmm0 divss 0xf3076(%rip), %xmm0 # 0x137b78 callq 0x23810 movss 0xf3069(%rip), %xmm1 # 0x137b78 mulss %xmm1, %xmm0 cvttss2si %xmm0, %ebx cmpl $0xf, %ebx movl $0xe, %r14d cmovll %r14d, %ebx movaps (%rsp), %xmm0 divss %xmm1, %xmm0 callq 0x23810 mulss 0xf303f(%rip), %xmm0 # 0x137b78 cvttss2si %xmm0, %eax cmpl $0xf, %eax cmovgel %eax, %r14d shlq $0x20, %r14 orq %r14, %rbx movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 retq
_ZL20uhd_find_best_resizeSt4pairIiiEiib: push r14 push rbx sub rsp, 18h mov rax, rdi shr rax, 20h mov ecx, eax imul ecx, edi cmp ecx, 31001h setnl cl or cl, sil jz short loc_44AB8 cvtsi2ss xmm2, edi cvtsi2ss xmm0, eax divss xmm2, xmm0 xorps xmm0, xmm0 ucomiss xmm2, xmm0 jb short loc_44AC2 xorps xmm0, xmm0 sqrtss xmm0, xmm2 jmp short loc_44AD4 loc_44AB8: cvtsi2ss xmm0, eax movaps [rsp+28h+var_28], xmm0 jmp short loc_44AF3 loc_44AC2: movaps xmm0, xmm2 movss dword ptr [rsp+28h+var_28], xmm2 call _sqrtf movss xmm2, dword ptr [rsp+28h+var_28] loc_44AD4: movss xmm1, cs:dword_137B74 divss xmm1, xmm0 cvttps2dq xmm0, xmm1 cvtdq2ps xmm0, xmm0 movaps [rsp+28h+var_28], xmm0 mulss xmm2, xmm0 cvttss2si edi, xmm2 loc_44AF3: xorps xmm0, xmm0 cvtsi2ss xmm0, edi divss xmm0, cs:dword_137B78 call _roundf movss xmm1, cs:dword_137B78 mulss xmm0, xmm1 cvttss2si ebx, xmm0 cmp ebx, 0Fh mov r14d, 0Eh cmovl ebx, r14d movaps xmm0, [rsp+28h+var_28] divss xmm0, xmm1 call _roundf mulss xmm0, cs:dword_137B78 cvttss2si eax, xmm0 cmp eax, 0Fh cmovge r14d, eax shl r14, 20h or rbx, r14 mov rax, rbx add rsp, 18h pop rbx pop r14 retn
long long uhd_find_best_resize(long long a1, unsigned __int8 a2) { float v2; // xmm2_4 float v3; // xmm0_4 __m128 v4; // xmm1 long long v5; // rbx long long v6; // r14 int v7; // eax float v9; // [rsp+0h] [rbp-28h] if ( a2 | ((int)a1 * HIDWORD(a1) >= 200705) ) { v2 = (float)(int)a1 / (float)SHIDWORD(a1); if ( v2 < 0.0 ) { v3 = sqrtf(v2); v2 = (float)(int)a1 / (float)SHIDWORD(a1); } else { v3 = fsqrt(v2); } v4 = (__m128)0x43E00000u; v4.m128_f32[0] = 448.0 / v3; v9 = _mm_cvtepi32_ps(_mm_cvttps_epi32(v4)).m128_f32[0]; LODWORD(a1) = (int)(float)(v2 * v9); } else { v9 = (float)SHIDWORD(a1); } v5 = (unsigned int)(int)(float)(roundf((float)(int)a1 / 14.0) * 14.0); v6 = 14LL; if ( (int)v5 < 15 ) v5 = 14LL; v7 = (int)(float)(roundf(v9 / 14.0) * 14.0); if ( v7 >= 15 ) v6 = (unsigned int)v7; return (v6 << 32) | v5; }
uhd_find_best_resize: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RAX,RDI SHR RAX,0x20 MOV ECX,EAX IMUL ECX,EDI CMP ECX,0x31001 SETGE CL OR CL,SIL JZ 0x00144ab8 CVTSI2SS XMM2,EDI CVTSI2SS XMM0,EAX DIVSS XMM2,XMM0 XORPS XMM0,XMM0 UCOMISS XMM2,XMM0 JC 0x00144ac2 XORPS XMM0,XMM0 SQRTSS XMM0,XMM2 JMP 0x00144ad4 LAB_00144ab8: CVTSI2SS XMM0,EAX MOVAPS xmmword ptr [RSP],XMM0 JMP 0x00144af3 LAB_00144ac2: MOVAPS XMM0,XMM2 MOVSS dword ptr [RSP],XMM2 CALL 0x00124700 MOVSS XMM2,dword ptr [RSP] LAB_00144ad4: MOVSS XMM1,dword ptr [0x00237b74] DIVSS XMM1,XMM0 CVTTPS2DQ XMM0,XMM1 CVTDQ2PS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MULSS XMM2,XMM0 CVTTSS2SI EDI,XMM2 LAB_00144af3: XORPS XMM0,XMM0 CVTSI2SS XMM0,EDI DIVSS XMM0,dword ptr [0x00237b78] CALL 0x00123810 MOVSS XMM1,dword ptr [0x00237b78] MULSS XMM0,XMM1 CVTTSS2SI EBX,XMM0 CMP EBX,0xf MOV R14D,0xe CMOVL EBX,R14D MOVAPS XMM0,xmmword ptr [RSP] DIVSS XMM0,XMM1 CALL 0x00123810 MULSS XMM0,dword ptr [0x00237b78] CVTTSS2SI EAX,XMM0 CMP EAX,0xf CMOVGE R14D,EAX SHL R14,0x20 OR RBX,R14 MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 RET
/* uhd_find_best_resize(std::pair<int, int>, int, int, bool) */ ulong uhd_find_best_resize(int8 param_1,char param_2) { uint uVar1; ulong uVar2; int iVar3; int iVar4; float fVar5; float fVar6; iVar4 = (int)((ulong)param_1 >> 0x20); iVar3 = (int)param_1; if (iVar4 * iVar3 < 0x31001 && param_2 == '\0') { fVar5 = (float)iVar4; } else { fVar6 = (float)iVar3 / (float)iVar4; if (fVar6 < 0.0) { fVar5 = sqrtf(fVar6); } else { fVar5 = SQRT(fVar6); } fVar5 = (float)(int)(DAT_00237b74 / fVar5); iVar3 = (int)(fVar6 * fVar5); } fVar6 = roundf((float)iVar3 / DAT_00237b78); uVar2 = (ulong)(uint)(int)(fVar6 * DAT_00237b78); if ((int)(fVar6 * DAT_00237b78) < 0xf) { uVar2 = 0xe; } fVar5 = roundf(fVar5 / DAT_00237b78); uVar1 = 0xe; if (0xe < (int)(fVar5 * DAT_00237b78)) { uVar1 = (int)(fVar5 * DAT_00237b78); } return uVar2 | (ulong)uVar1 << 0x20; }
53,564
common_init()
monkey531[P]llama/common/common.cpp
void common_init() { llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) { if (LOG_DEFAULT_LLAMA <= common_log_verbosity_thold) { common_log_add(common_log_main(), level, "%s", text); } }, NULL); #ifdef NDEBUG const char * build_type = ""; #else const char * build_type = " (debug)"; #endif LOG_INF("build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT, LLAMA_COMPILER, LLAMA_BUILD_TARGET, build_type); }
O0
cpp
common_init(): subq $0x28, %rsp leaq 0x27(%rsp), %rdi callq 0xef5b0 movq %rax, %rdi xorl %eax, %eax movl %eax, %esi callq 0x5e010 leaq 0x126b6a(%rip), %rax # 0x2160ab movq %rax, 0x18(%rsp) xorl %eax, %eax leaq 0x1c10b9(%rip), %rcx # 0x2b0608 cmpl (%rcx), %eax jg 0xef5a3 callq 0x1c1890 movq %rax, %rdi leaq 0x1c09a6(%rip), %rax # 0x2aff08 movl (%rax), %ecx leaq 0x1c09a5(%rip), %rax # 0x2aff10 movq (%rax), %r8 leaq 0x1c09a3(%rip), %rax # 0x2aff18 movq (%rax), %r9 leaq 0x1c09a1(%rip), %rax # 0x2aff20 movq (%rax), %r10 movq 0x18(%rsp), %rax movl $0x2, %esi leaq 0x129e9e(%rip), %rdx # 0x219431 movq %r10, (%rsp) movq %rax, 0x8(%rsp) movb $0x0, %al callq 0x1c1980 jmp 0xef5a5 addq $0x28, %rsp retq nopw (%rax,%rax)
_Z11common_initv: sub rsp, 28h lea rdi, [rsp+28h+var_1] call _ZZ11common_initvENK3$_0cvPFv14ggml_log_levelPKcPvEEv; common_init(void)::$_0::operator void (*)(ggml_log_level,char const*,void *)(void) mov rdi, rax xor eax, eax mov esi, eax call _llama_log_set lea rax, aExampleSpecifi+27h; "" mov [rsp+28h+var_10], rax xor eax, eax lea rcx, common_log_verbosity_thold cmp eax, [rcx] jg short loc_EF5A3 call _Z15common_log_mainv; common_log_main(void) mov rdi, rax lea rax, LLAMA_BUILD_NUMBER mov ecx, [rax] lea rax, LLAMA_COMMIT mov r8, [rax] lea rax, LLAMA_COMPILER mov r9, [rax] lea rax, LLAMA_BUILD_TARGET mov r10, [rax] mov rax, [rsp+28h+var_10] mov esi, 2 lea rdx, aBuildDSWithSFo; "build: %d (%s) with %s for %s%s\n" mov [rsp+28h+var_28], r10 mov [rsp+28h+var_20], rax mov al, 0 call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_EF5A3: jmp short $+2 loc_EF5A5: add rsp, 28h retn
long long common_init(void) { long long v0; // rax long long result; // rax int v2; // eax char v3; // [rsp+27h] [rbp-1h] BYREF v0 = common_init(void)::$_0::operator void (*)(ggml_log_level,char const*,void *)(&v3); llama_log_set(v0, 0LL); result = 0LL; if ( common_log_verbosity_thold >= 0 ) { v2 = common_log_main(); return common_log_add( v2, 2, (unsigned int)"build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT[0], LLAMA_COMPILER[0]); } return result; }
common_init: SUB RSP,0x28 LEA RDI,[RSP + 0x27] CALL 0x001ef5b0 MOV RDI,RAX XOR EAX,EAX MOV ESI,EAX CALL 0x0015e010 LEA RAX,[0x3160ab] MOV qword ptr [RSP + 0x18],RAX XOR EAX,EAX LEA RCX,[0x3b0608] CMP EAX,dword ptr [RCX] JG 0x001ef5a3 CALL 0x002c1890 MOV RDI,RAX LEA RAX,[0x3aff08] MOV ECX,dword ptr [RAX] LEA RAX,[0x3aff10] MOV R8,qword ptr [RAX] LEA RAX,[0x3aff18] MOV R9,qword ptr [RAX] LEA RAX,[0x3aff20] MOV R10,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x18] MOV ESI,0x2 LEA RDX,[0x319431] MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV AL,0x0 CALL 0x002c1980 LAB_001ef5a3: JMP 0x001ef5a5 LAB_001ef5a5: ADD RSP,0x28 RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* common_init() */ void common_init(void) { _func_void_ggml_log_level_char_ptr_void_ptr *p_Var1; int8 uVar2; __0 local_1; p_Var1 = common_init()::$_0::operator_cast_to_function_pointer(&local_1); llama_log_set(p_Var1,0); if (-1 < common_log_verbosity_thold) { uVar2 = common_log_main(); common_log_add(uVar2,2,"build: %d (%s) with %s for %s%s\n",LLAMA_BUILD_NUMBER,LLAMA_COMMIT, LLAMA_COMPILER,LLAMA_BUILD_TARGET,""); } return; }
53,565
common_init()
monkey531[P]llama/common/common.cpp
void common_init() { llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) { if (LOG_DEFAULT_LLAMA <= common_log_verbosity_thold) { common_log_add(common_log_main(), level, "%s", text); } }, NULL); #ifdef NDEBUG const char * build_type = ""; #else const char * build_type = " (debug)"; #endif LOG_INF("build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT, LLAMA_COMPILER, LLAMA_BUILD_TARGET, build_type); }
O1
cpp
common_init(): leaq 0xb9773(%rip), %rax # 0x131428 cmpl $0x0, (%rax) js 0x77ce3 pushq %rbp pushq %rbx pushq %rax movq %rsi, %rbx movl %edi, %ebp callq 0xcd023 leaq 0x76e72(%rip), %rdx # 0xeeb40 movq %rax, %rdi movl %ebp, %esi movq %rbx, %rcx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp jmp 0xcd0be retq
_ZZ11common_initvEN3$_08__invokeE14ggml_log_levelPKcPv: lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short locret_77CE3 push rbp push rbx push rax mov rbx, rsi mov ebp, edi call _Z15common_log_mainv; common_log_main(void) lea rdx, aSetCustomJinja_0+0FEh; "%s" mov rdi, rax mov esi, ebp mov rcx, rbx xor eax, eax add rsp, 8 pop rbx pop rbp jmp _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) locret_77CE3: retn
double common_init(void)::$_0::__invoke(int a1, int a2) { int v2; // eax int v3; // r8d int v4; // r9d double result; // xmm0_8 if ( common_log_verbosity_thold >= 0 ) { v2 = common_log_main(); return common_log_add(v2, a1, (unsigned int)"%s", a2, v3, v4); } return result; }
__invoke: LEA RAX,[0x231428] CMP dword ptr [RAX],0x0 JS 0x00177ce3 PUSH RBP PUSH RBX PUSH RAX MOV RBX,RSI MOV EBP,EDI CALL 0x001cd023 LEA RDX,[0x1eeb40] MOV RDI,RAX MOV ESI,EBP MOV RCX,RBX XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP JMP 0x001cd0be LAB_00177ce3: RET
/* __invoke(ggml_log_level, char const*, void*) */ void common_init()::$_0::__invoke(int4 param_1,int8 param_2) { int8 uVar1; if (-1 < common_log_verbosity_thold) { uVar1 = common_log_main(); common_log_add(uVar1,param_1,"%s",param_2); return; } return; }
53,566
common_init()
monkey531[P]llama/common/common.cpp
void common_init() { llama_log_set([](ggml_log_level level, const char * text, void * /*user_data*/) { if (LOG_DEFAULT_LLAMA <= common_log_verbosity_thold) { common_log_add(common_log_main(), level, "%s", text); } }, NULL); #ifdef NDEBUG const char * build_type = ""; #else const char * build_type = " (debug)"; #endif LOG_INF("build: %d (%s) with %s for %s%s\n", LLAMA_BUILD_NUMBER, LLAMA_COMMIT, LLAMA_COMPILER, LLAMA_BUILD_TARGET, build_type); }
O3
cpp
common_init(): leaq 0xb7257(%rip), %rax # 0x12f428 cmpl $0x0, (%rax) js 0x781ff pushq %rbp pushq %rbx pushq %rax movq %rsi, %rbx movl %edi, %ebp callq 0xcc4d7 leaq 0x74956(%rip), %rdx # 0xecb40 movq %rax, %rdi movl %ebp, %esi movq %rbx, %rcx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp jmp 0xcc574 retq
_ZZ11common_initvEN3$_08__invokeE14ggml_log_levelPKcPv: lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short locret_781FF push rbp push rbx push rax mov rbx, rsi mov ebp, edi call _Z15common_log_mainv; common_log_main(void) lea rdx, aSetCustomJinja_0+0FEh; "%s" mov rdi, rax mov esi, ebp mov rcx, rbx xor eax, eax add rsp, 8 pop rbx pop rbp jmp _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) locret_781FF: retn
void * common_init(void)::$_0::__invoke(int a1, int a2) { void *result; // rax int v3; // eax int v4; // r8d int v5; // r9d result = &common_log_verbosity_thold; if ( common_log_verbosity_thold >= 0 ) { v3 = common_log_main(); return (void *)common_log_add(v3, a1, (unsigned int)"%s", a2, v4, v5); } return result; }
__invoke: LEA RAX,[0x22f428] CMP dword ptr [RAX],0x0 JS 0x001781ff PUSH RBP PUSH RBX PUSH RAX MOV RBX,RSI MOV EBP,EDI CALL 0x001cc4d7 LEA RDX,[0x1ecb40] MOV RDI,RAX MOV ESI,EBP MOV RCX,RBX XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP JMP 0x001cc574 LAB_001781ff: RET
/* __invoke(ggml_log_level, char const*, void*) */ void common_init()::$_0::__invoke(int4 param_1,int8 param_2) { int8 uVar1; if (-1 < common_log_verbosity_thold) { uVar1 = common_log_main(); common_log_add(uVar1,param_1,"%s",param_2); return; } return; }
53,567
write_hook_for_redo
eloqsql/storage/maria/ma_blockrec.c
my_bool write_hook_for_redo(enum translog_record_type type __attribute__ ((unused)), TRN *trn, MARIA_HA *tbl_info __attribute__ ((unused)), LSN *lsn, void *hook_arg __attribute__ ((unused))) { /* Users of dummy_transaction_object must keep this TRN clean as it is used by many threads (like those manipulating non-transactional tables). It might be dangerous if one user sets rec_lsn or some other member and it is picked up by another user (like putting this rec_lsn into a page of a non-transactional table); it's safer if all members stay 0. So non-transactional log records (REPAIR, CREATE, RENAME, DROP) should not call this hook; we trust them but verify ;) */ DBUG_ASSERT(trn->trid != 0); /* If the hook stays so simple, it would be faster to pass !trn->rec_lsn ? trn->rec_lsn : some_dummy_lsn to translog_write_record(), like Monty did in his original code, and not have a hook. For now we keep it like this. */ if (trn->rec_lsn == 0) trn->rec_lsn= *lsn; return 0; }
O3
c
write_hook_for_redo: pushq %rbp movq %rsp, %rbp cmpq $0x0, 0x90(%rsi) jne 0x5e944 movq (%rcx), %rax movq %rax, 0x90(%rsi) xorl %eax, %eax popq %rbp retq
write_hook_for_redo: push rbp mov rbp, rsp cmp qword ptr [rsi+90h], 0 jnz short loc_5E944 mov rax, [rcx] mov [rsi+90h], rax loc_5E944: xor eax, eax pop rbp retn
long long write_hook_for_redo(long long a1, long long a2, long long a3, _QWORD *a4) { if ( !*(_QWORD *)(a2 + 144) ) *(_QWORD *)(a2 + 144) = *a4; return 0LL; }
write_hook_for_redo: PUSH RBP MOV RBP,RSP CMP qword ptr [RSI + 0x90],0x0 JNZ 0x0015e944 MOV RAX,qword ptr [RCX] MOV qword ptr [RSI + 0x90],RAX LAB_0015e944: XOR EAX,EAX POP RBP RET
int8 write_hook_for_redo(int8 param_1,long param_2,int8 param_3,int8 *param_4) { if (*(long *)(param_2 + 0x90) == 0) { *(int8 *)(param_2 + 0x90) = *param_4; } return 0; }
53,568
minja::IfNode::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 { for (const auto& branch : cascade) { auto enter_branch = true; if (branch.first) { enter_branch = branch.first->evaluate(context).to_bool(); } if (enter_branch) { if (!branch.second) throw std::runtime_error("IfNode.cascade.second is null"); branch.second->render(out, context); return; } } }
O3
cpp
minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, (%rsp) movq 0x20(%rdi), %r13 movq 0x28(%rdi), %r14 cmpq %r14, %r13 je 0x5d708 movq %rdx, %rbx leaq 0x48(%rsp), %r15 leaq 0x8(%rsp), %r12 movq (%r13), %rsi testq %rsi, %rsi je 0x5d6f3 movq %r12, %rdi movq %rbx, %rdx callq 0x3d5f2 movq %r12, %rdi callq 0x3d7f0 movl %eax, %ebp movq %r15, %rdi xorl %esi, %esi callq 0x3d970 movq %r15, %rdi callq 0x4a5c0 movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x5d68b callq 0x2f80e movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x5d69a callq 0x2f80e movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x5d6a9 callq 0x2f80e movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x5d6df movq 0x928e6(%rip), %rax # 0xeffa0 cmpb $0x0, (%rax) je 0x5d6ca movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x5d6d4 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x5d6df movq (%rdi), %rax callq *0x18(%rax) testb %bpl, %bpl jne 0x5d6f3 addq $0x20, %r13 cmpq %r14, %r13 jne 0x5d648 jmp 0x5d708 movq 0x10(%r13), %rdi testq %rdi, %rdi je 0x5d717 movq (%rsp), %rsi movq %rbx, %rdx callq 0x5d7dc addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x18360 movq %rax, %rbx leaq 0x5df60(%rip), %rsi # 0xbb68b movq %rax, %rdi callq 0x18270 movq 0x928b6(%rip), %rsi # 0xefff0 movq 0x9283f(%rip), %rdx # 0xeff80 movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 movq %rbx, %rdi callq 0x18500 jmp 0x5d763 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x3d8e4 movq %r14, %rdi callq 0x18b90 nop
_ZNK5minja6IfNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rsp+88h+var_88], rsi mov r13, [rdi+20h] mov r14, [rdi+28h] cmp r13, r14 jz loc_5D708 mov rbx, rdx lea r15, [rsp+88h+var_40] lea r12, [rsp+88h+var_80] loc_5D648: mov rsi, [r13+0] test rsi, rsi jz loc_5D6F3 mov rdi, r12 mov rdx, rbx call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, r12; this call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void) mov ebp, eax mov rdi, r15 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, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+88h+var_48] test rdi, rdi jz short loc_5D68B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5D68B: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_5D69A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5D69A: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_5D6A9 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5D6A9: mov rdi, [rsp+88h+var_78] test rdi, rdi jz short loc_5D6DF mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_5D6CA mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_5D6D4 loc_5D6CA: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_5D6D4: cmp eax, 1 jnz short loc_5D6DF mov rax, [rdi] call qword ptr [rax+18h] loc_5D6DF: test bpl, bpl jnz short loc_5D6F3 add r13, 20h ; ' ' cmp r13, r14 jnz loc_5D648 jmp short loc_5D708 loc_5D6F3: mov rdi, [r13+10h] test rdi, rdi jz short loc_5D717 mov rsi, [rsp+88h+var_88] mov rdx, rbx call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&) loc_5D708: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5D717: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aIfnodeCascadeS; "IfNode.cascade.second is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_5D763 mov r14, rax lea rdi, [rsp+88h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_5D763: mov rdi, r14 call __Unwind_Resume
do_render: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RSP],RSI MOV R13,qword ptr [RDI + 0x20] MOV R14,qword ptr [RDI + 0x28] CMP R13,R14 JZ 0x0015d708 MOV RBX,RDX LEA R15,[RSP + 0x48] LEA R12,[RSP + 0x8] LAB_0015d648: MOV RSI,qword ptr [R13] TEST RSI,RSI JZ 0x0015d6f3 MOV RDI,R12 MOV RDX,RBX CALL 0x0013d5f2 LAB_0015d660: MOV RDI,R12 CALL 0x0013d7f0 LAB_0015d668: MOV EBP,EAX MOV RDI,R15 XOR ESI,ESI CALL 0x0013d970 MOV RDI,R15 CALL 0x0014a5c0 MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x0015d68b CALL 0x0012f80e LAB_0015d68b: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0015d69a CALL 0x0012f80e LAB_0015d69a: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0015d6a9 CALL 0x0012f80e LAB_0015d6a9: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0015d6df MOV RAX,qword ptr [0x001effa0] CMP byte ptr [RAX],0x0 JZ 0x0015d6ca MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0015d6d4 LAB_0015d6ca: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0015d6d4: CMP EAX,0x1 JNZ 0x0015d6df MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0015d6df: TEST BPL,BPL JNZ 0x0015d6f3 ADD R13,0x20 CMP R13,R14 JNZ 0x0015d648 JMP 0x0015d708 LAB_0015d6f3: MOV RDI,qword ptr [R13 + 0x10] TEST RDI,RDI JZ 0x0015d717 MOV RSI,qword ptr [RSP] MOV RDX,RBX CALL 0x0015d7dc LAB_0015d708: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015d717: MOV EDI,0x10 CALL 0x00118360 MOV RBX,RAX LAB_0015d724: LEA RSI,[0x1bb68b] MOV RDI,RAX CALL 0x00118270 LAB_0015d733: MOV RSI,qword ptr [0x001efff0] MOV RDX,qword ptr [0x001eff80] MOV RDI,RBX CALL 0x00118b30
/* minja::IfNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::IfNode::do_render(ostringstream *param_1,shared_ptr *param_2) { int *piVar1; int8 *puVar2; char cVar3; int iVar4; runtime_error *this; int8 *puVar5; Expression local_80 [8]; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; data local_40 [16]; puVar5 = *(int8 **)(param_1 + 0x20); puVar2 = *(int8 **)(param_1 + 0x28); if (puVar5 != puVar2) { do { if ((shared_ptr *)*puVar5 == (shared_ptr *)0x0) { LAB_0015d6f3: if ((ostringstream *)puVar5[2] != (ostringstream *)0x0) { TemplateNode::render((ostringstream *)puVar5[2],param_2); return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0015d724 to 0015d732 has its CatchHandler @ 0015d749 */ std::runtime_error::runtime_error(this,"IfNode.cascade.second is null"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001efff0,PTR__runtime_error_001eff80); } Expression::evaluate(local_80,(shared_ptr *)*puVar5); /* try { // try from 0015d660 to 0015d667 has its CatchHandler @ 0015d756 */ cVar3 = minja::Value::to_bool((Value *)local_80); 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_40,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(local_40); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001effa0 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar4 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar4 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar4 + -1; } if (iVar4 == 1) { (**(code **)(*local_78 + 0x18))(); } } if (cVar3 != '\0') goto LAB_0015d6f3; puVar5 = puVar5 + 4; } while (puVar5 != puVar2); } return; }
53,569
ftxui::to_string(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&)
Andrewchistyakov[P]flashcards_lyc/build_O2/_deps/ftxui-src/src/ftxui/screen/string.cpp
std::string to_string(const std::wstring& s) { std::string out; size_t i = 0; uint32_t codepoint = 0; while (EatCodePoint(s, i, &i, &codepoint)) { // Code point <-> UTF-8 conversion // // ┏━━━━━━━━┳━━━━━━━━┳━━━━━━━━┳━━━━━━━━┓ // ┃Byte 1 ┃Byte 2 ┃Byte 3 ┃Byte 4 ┃ // ┡━━━━━━━━╇━━━━━━━━╇━━━━━━━━╇━━━━━━━━┩ // │0xxxxxxx│ │ │ │ // ├────────┼────────┼────────┼────────┤ // │110xxxxx│10xxxxxx│ │ │ // ├────────┼────────┼────────┼────────┤ // │1110xxxx│10xxxxxx│10xxxxxx│ │ // ├────────┼────────┼────────┼────────┤ // │11110xxx│10xxxxxx│10xxxxxx│10xxxxxx│ // └────────┴────────┴────────┴────────┘ // 1 byte UTF8 if (codepoint <= 0b000'0000'0111'1111) { // NOLINT const uint8_t p1 = codepoint; out.push_back(p1); // NOLINT continue; } // 2 bytes UTF8 if (codepoint <= 0b000'0111'1111'1111) { // NOLINT uint8_t p2 = codepoint & 0b111111; // NOLINT codepoint >>= 6; // NOLINT uint8_t p1 = codepoint; // NOLINT out.push_back(0b11000000 + p1); // NOLINT out.push_back(0b10000000 + p2); // NOLINT continue; } // 3 bytes UTF8 if (codepoint <= 0b1111'1111'1111'1111) { // NOLINT uint8_t p3 = codepoint & 0b111111; // NOLINT codepoint >>= 6; // NOLINT uint8_t p2 = codepoint & 0b111111; // NOLINT codepoint >>= 6; // NOLINT uint8_t p1 = codepoint; // NOLINT out.push_back(0b11100000 + p1); // NOLINT out.push_back(0b10000000 + p2); // NOLINT out.push_back(0b10000000 + p3); // NOLINT continue; } // 4 bytes UTF8 if (codepoint <= 0b1'0000'1111'1111'1111'1111) { // NOLINT uint8_t p4 = codepoint & 0b111111; // NOLINT codepoint >>= 6; // NOLINT uint8_t p3 = codepoint & 0b111111; // NOLINT codepoint >>= 6; // NOLINT uint8_t p2 = codepoint & 0b111111; // NOLINT codepoint >>= 6; // NOLINT uint8_t p1 = codepoint; // NOLINT out.push_back(0b11110000 + p1); // NOLINT out.push_back(0b10000000 + p2); // NOLINT out.push_back(0b10000000 + p3); // NOLINT out.push_back(0b10000000 + p4); // NOLINT continue; } // Something else? } return out; }
O2
cpp
ftxui::to_string(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x10(%rdi), %rax movq %rax, (%rdi) andq $0x0, 0x8(%rdi) movq %rsi, %r14 movb $0x0, 0x10(%rdi) xorl %r15d, %r15d cmpq %r15, 0x8(%r14) jbe 0x319e6 movq (%r14), %rax movl (%rax,%r15,4), %ebp cmpl $0x7f, %ebp ja 0x31911 movsbl %bpl, %esi movq %rbx, %rdi callq 0xc3b0 jmp 0x319de cmpl $0x7ff, %ebp # imm = 0x7FF ja 0x31944 movl %ebp, %eax shrl $0x6, %eax orb $-0x40, %al movsbl %al, %esi movq %rbx, %rdi callq 0xc3b0 andb $0x3f, %bpl orb $-0x80, %bpl movsbl %bpl, %esi movq %rbx, %rdi callq 0xc3b0 jmp 0x319de cmpl $0xffff, %ebp # imm = 0xFFFF ja 0x31988 movl %ebp, %eax shrl $0xc, %eax orb $-0x20, %al movsbl %al, %esi movq %rbx, %rdi callq 0xc3b0 movl %ebp, %eax shrl $0x6, %eax andb $0x3f, %al orb $-0x80, %al movsbl %al, %esi movq %rbx, %rdi callq 0xc3b0 andb $0x3f, %bpl orb $-0x80, %bpl movsbl %bpl, %esi movq %rbx, %rdi callq 0xc3b0 jmp 0x319de cmpl $0x110000, %ebp # imm = 0x110000 jae 0x319de movl %ebp, %eax shrl $0x12, %eax orb $-0x10, %al movsbl %al, %esi movq %rbx, %rdi callq 0xc3b0 movl %ebp, %eax shrl $0xc, %eax andb $0x3f, %al orb $-0x80, %al movsbl %al, %esi movq %rbx, %rdi callq 0xc3b0 movl %ebp, %eax shrl $0x6, %eax andb $0x3f, %al orb $-0x80, %al movsbl %al, %esi movq %rbx, %rdi callq 0xc3b0 andb $0x3f, %bpl orb $-0x80, %bpl movsbl %bpl, %esi movq %rbx, %rdi callq 0xc3b0 incq %r15 jmp 0x318ea movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq jmp 0x319fa jmp 0x319fa jmp 0x319fa movq %rax, %r14 movq %rbx, %rdi callq 0xc8c8 movq %r14, %rdi callq 0xc7f0
_ZN5ftxui9to_stringERKNSt7__cxx1112basic_stringIwSt11char_traitsIwESaIwEEE: push rbp push r15 push r14 push rbx push rax mov rbx, rdi lea rax, [rdi+10h] mov [rdi], rax and qword ptr [rdi+8], 0 mov r14, rsi mov byte ptr [rdi+10h], 0 xor r15d, r15d loc_318EA: cmp [r14+8], r15 jbe loc_319E6 mov rax, [r14] mov ebp, [rax+r15*4] cmp ebp, 7Fh ja short loc_31911 movsx esi, bpl mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp loc_319DE loc_31911: cmp ebp, 7FFh ja short loc_31944 mov eax, ebp shr eax, 6 or al, 0C0h movsx esi, al mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) and bpl, 3Fh or bpl, 80h movsx esi, bpl mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp loc_319DE loc_31944: cmp ebp, 0FFFFh ja short loc_31988 mov eax, ebp shr eax, 0Ch or al, 0E0h movsx esi, al mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov eax, ebp shr eax, 6 and al, 3Fh or al, 80h movsx esi, al mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) and bpl, 3Fh or bpl, 80h movsx esi, bpl mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) jmp short loc_319DE loc_31988: cmp ebp, 110000h jnb short loc_319DE mov eax, ebp shr eax, 12h or al, 0F0h movsx esi, al mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov eax, ebp shr eax, 0Ch and al, 3Fh or al, 80h movsx esi, al mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) mov eax, ebp shr eax, 6 and al, 3Fh or al, 80h movsx esi, al mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) and bpl, 3Fh or bpl, 80h movsx esi, bpl mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) loc_319DE: inc r15 jmp loc_318EA loc_319E6: mov rax, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn jmp short loc_319FA jmp short loc_319FA jmp short $+2 loc_319FA: mov r14, rax mov rdi, rbx; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, r14 call __Unwind_Resume
long long ftxui::to_string(long long a1, _QWORD *a2) { unsigned long long i; // r15 unsigned int v3; // ebp *(_QWORD *)a1 = a1 + 16; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; for ( i = 0LL; a2[1] > i; ++i ) { v3 = *(_DWORD *)(*a2 + 4 * i); if ( v3 > 0x7F ) { if ( v3 > 0x7FF ) { if ( v3 > 0xFFFF ) { if ( v3 < 0x110000 ) { std::string::push_back(a1, (unsigned int)(char)((v3 >> 18) | 0xF0)); std::string::push_back(a1, (unsigned int)(char)((v3 >> 12) & 0x3F | 0x80)); std::string::push_back(a1, (unsigned int)(char)((v3 >> 6) & 0x3F | 0x80)); std::string::push_back(a1, (unsigned int)(char)(v3 & 0x3F | 0x80)); } } else { std::string::push_back(a1, (unsigned int)(char)((v3 >> 12) | 0xE0)); std::string::push_back(a1, (unsigned int)(char)((v3 >> 6) & 0x3F | 0x80)); std::string::push_back(a1, (unsigned int)(char)(v3 & 0x3F | 0x80)); } } else { std::string::push_back(a1, (unsigned int)(char)((v3 >> 6) | 0xC0)); std::string::push_back(a1, (unsigned int)(char)(v3 & 0x3F | 0x80)); } } else { std::string::push_back(a1, (unsigned int)(char)v3); } } return a1; }
to_string: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[RDI + 0x10] MOV qword ptr [RDI],RAX AND qword ptr [RDI + 0x8],0x0 MOV R14,RSI MOV byte ptr [RDI + 0x10],0x0 XOR R15D,R15D LAB_001318ea: CMP qword ptr [R14 + 0x8],R15 JBE 0x001319e6 MOV RAX,qword ptr [R14] MOV EBP,dword ptr [RAX + R15*0x4] CMP EBP,0x7f JA 0x00131911 LAB_00131900: MOVSX ESI,BPL MOV RDI,RBX CALL 0x0010c3b0 JMP 0x001319de LAB_00131911: CMP EBP,0x7ff JA 0x00131944 MOV EAX,EBP SHR EAX,0x6 OR AL,0xc0 LAB_00131920: MOVSX ESI,AL MOV RDI,RBX CALL 0x0010c3b0 AND BPL,0x3f OR BPL,0x80 MOVSX ESI,BPL MOV RDI,RBX CALL 0x0010c3b0 JMP 0x001319de LAB_00131944: CMP EBP,0xffff JA 0x00131988 MOV EAX,EBP SHR EAX,0xc OR AL,0xe0 LAB_00131953: MOVSX ESI,AL MOV RDI,RBX CALL 0x0010c3b0 MOV EAX,EBP SHR EAX,0x6 AND AL,0x3f OR AL,0x80 MOVSX ESI,AL MOV RDI,RBX CALL 0x0010c3b0 AND BPL,0x3f OR BPL,0x80 MOVSX ESI,BPL MOV RDI,RBX CALL 0x0010c3b0 JMP 0x001319de LAB_00131988: CMP EBP,0x110000 JNC 0x001319de MOV EAX,EBP SHR EAX,0x12 OR AL,0xf0 LAB_00131997: MOVSX ESI,AL MOV RDI,RBX CALL 0x0010c3b0 MOV EAX,EBP SHR EAX,0xc AND AL,0x3f OR AL,0x80 MOVSX ESI,AL MOV RDI,RBX CALL 0x0010c3b0 MOV EAX,EBP SHR EAX,0x6 AND AL,0x3f OR AL,0x80 MOVSX ESI,AL MOV RDI,RBX CALL 0x0010c3b0 AND BPL,0x3f OR BPL,0x80 MOVSX ESI,BPL MOV RDI,RBX CALL 0x0010c3b0 LAB_001319de: INC R15 JMP 0x001318ea LAB_001319e6: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* ftxui::to_string(std::__cxx11::wstring const&) */ ftxui * __thiscall ftxui::to_string(ftxui *this,wstring *param_1) { uint uVar1; char cVar2; ulong uVar3; *(ftxui **)this = this + 0x10; *(int8 *)(this + 8) = 0; this[0x10] = (ftxui)0x0; for (uVar3 = 0; uVar3 < *(ulong *)(param_1 + 8); uVar3 = uVar3 + 1) { uVar1 = *(uint *)(*(long *)param_1 + uVar3 * 4); cVar2 = (char)this; if (uVar1 < 0x80) { /* try { // try from 00131900 to 0013190b has its CatchHandler @ 001319fa */ std::__cxx11::string::push_back(cVar2); } else if (uVar1 < 0x800) { /* try { // try from 00131920 to 0013193e has its CatchHandler @ 001319f8 */ std::__cxx11::string::push_back(cVar2); std::__cxx11::string::push_back(cVar2); } else if (uVar1 < 0x10000) { /* try { // try from 00131953 to 00131985 has its CatchHandler @ 001319f6 */ std::__cxx11::string::push_back(cVar2); std::__cxx11::string::push_back(cVar2); std::__cxx11::string::push_back(cVar2); } else if (uVar1 < 0x110000) { /* try { // try from 00131997 to 001319dd has its CatchHandler @ 001319f4 */ std::__cxx11::string::push_back(cVar2); std::__cxx11::string::push_back(cVar2); std::__cxx11::string::push_back(cVar2); std::__cxx11::string::push_back(cVar2); } } return this; }
53,570
ma_keydef_read
eloqsql/storage/maria/ma_open.c
uchar *_ma_keydef_read(uchar *ptr, MARIA_KEYDEF *keydef) { keydef->keysegs = (uint) *ptr++; keydef->key_alg = *ptr++; /* Rtree or Btree */ keydef->flag = mi_uint2korr(ptr); ptr+= 2; keydef->block_length = mi_uint2korr(ptr); ptr+= 2; keydef->keylength = mi_uint2korr(ptr); ptr+= 2; keydef->minlength = mi_uint2korr(ptr); ptr+= 2; keydef->maxlength = mi_uint2korr(ptr); ptr+= 2; keydef->version = 0; /* Not saved */ keydef->parser = &ft_default_parser; keydef->ftkey_nr = 0; return ptr; }
O0
c
ma_keydef_read: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movzbl (%rax), %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0xa0(%rax) movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb (%rax), %cl movq -0x10(%rbp), %rax movb %cl, 0xa4(%rax) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0xa2(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0xa6(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0xaa(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0xac(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x8(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movw %ax, %cx movq -0x10(%rbp), %rax movw %cx, 0xae(%rax) movq -0x8(%rbp), %rax addq $0x2, %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax movl $0x0, 0xb8(%rax) movq -0x10(%rbp), %rax leaq 0x25b79c(%rip), %rcx # 0x2bf180 movq %rcx, 0xd0(%rax) movq -0x10(%rbp), %rax movl $0x0, 0xbc(%rax) movq -0x8(%rbp), %rax popq %rbp retq nop
_ma_keydef_read: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx movzx eax, byte ptr [rax] mov cx, ax mov rax, [rbp+var_10] mov [rax+0A0h], cx mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov cl, [rax] mov rax, [rbp+var_10] mov [rax+0A4h], cl mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+0A2h], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+0A6h], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+0AAh], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+0ACh], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_8] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_8] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx mov cx, ax mov rax, [rbp+var_10] mov [rax+0AEh], cx mov rax, [rbp+var_8] add rax, 2 mov [rbp+var_8], rax mov rax, [rbp+var_10] mov dword ptr [rax+0B8h], 0 mov rax, [rbp+var_10] lea rcx, ft_default_parser mov [rax+0D0h], rcx mov rax, [rbp+var_10] mov dword ptr [rax+0BCh], 0 mov rax, [rbp+var_8] pop rbp retn
unsigned __int8 * ma_keydef_read(unsigned __int8 *a1, long long a2) { *(_WORD *)(a2 + 160) = *a1; *(_BYTE *)(a2 + 164) = a1[1]; *(_WORD *)(a2 + 162) = _byteswap_ushort(*((_WORD *)a1 + 1)); *(_WORD *)(a2 + 166) = _byteswap_ushort(*((_WORD *)a1 + 2)); *(_WORD *)(a2 + 170) = _byteswap_ushort(*((_WORD *)a1 + 3)); *(_WORD *)(a2 + 172) = _byteswap_ushort(*((_WORD *)a1 + 4)); *(_WORD *)(a2 + 174) = _byteswap_ushort(*((_WORD *)a1 + 5)); *(_DWORD *)(a2 + 184) = 0; *(_QWORD *)(a2 + 208) = &ft_default_parser; *(_DWORD *)(a2 + 188) = 0; return a1 + 12; }
_ma_keydef_read: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOVZX EAX,byte ptr [RAX] MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0xa0],CX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0xa4],CL MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0xa2],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0xa6],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0xaa],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0xac],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x8] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x10] MOV word ptr [RAX + 0xae],CX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xb8],0x0 MOV RAX,qword ptr [RBP + -0x10] LEA RCX,[0x3bf180] MOV qword ptr [RAX + 0xd0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xbc],0x0 MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
byte * _ma_keydef_read(byte *param_1,long param_2) { *(ushort *)(param_2 + 0xa0) = (ushort)*param_1; *(byte *)(param_2 + 0xa4) = param_1[1]; *(ushort *)(param_2 + 0xa2) = CONCAT11(param_1[2],param_1[3]); *(ushort *)(param_2 + 0xa6) = CONCAT11(param_1[4],param_1[5]); *(ushort *)(param_2 + 0xaa) = CONCAT11(param_1[6],param_1[7]); *(ushort *)(param_2 + 0xac) = CONCAT11(param_1[8],param_1[9]); *(ushort *)(param_2 + 0xae) = CONCAT11(param_1[10],param_1[0xb]); *(int4 *)(param_2 + 0xb8) = 0; *(int1 **)(param_2 + 0xd0) = ft_default_parser; *(int4 *)(param_2 + 0xbc) = 0; return param_1 + 0xc; }
53,571
my_scan_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_scan_mb2(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *end, int sequence_type) { const char *str0= str; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int res; switch (sequence_type) { case MY_SEQ_SPACES: for (res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end); res > 0 && wc == ' '; str+= res, res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end)) { } return (size_t) (str - str0); case MY_SEQ_NONSPACES: DBUG_ASSERT(0); /* Not implemented */ /* pass through */ default: return 0; } }
O3
c
my_scan_mb2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp cmpl $0x2, %ecx jne 0xc73f0 movq %rdx, %r14 movq %rsi, %r12 movq %rdi, %r15 movq 0xb8(%rdi), %rax movq 0x28(%rax), %rbx leaq -0x38(%rbp), %rsi movq %r12, %rdx movq %r14, %rcx callq *%rbx movq %r12, -0x30(%rbp) testl %eax, %eax jle 0xc73ea cmpq $0x20, -0x38(%rbp) movq -0x30(%rbp), %r12 jne 0xc73ea leaq -0x38(%rbp), %r13 movq -0x30(%rbp), %r12 movq %r12, %rcx movl %eax, %r12d addq %rcx, %r12 movq %r15, %rdi movq %r13, %rsi movq %r12, %rdx movq %r14, %rcx callq *%rbx testl %eax, %eax jle 0xc73ea cmpq $0x20, -0x38(%rbp) je 0xc73c8 subq -0x30(%rbp), %r12 jmp 0xc73f3 xorl %r12d, %r12d movq %r12, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_scan_mb2: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h cmp ecx, 2 jnz short loc_C73F0 mov r14, rdx mov r12, rsi mov r15, rdi mov rax, [rdi+0B8h] mov rbx, [rax+28h] lea rsi, [rbp+var_38] mov rdx, r12 mov rcx, r14 call rbx mov [rbp+var_30], r12 test eax, eax jle short loc_C73EA cmp [rbp+var_38], 20h ; ' ' mov r12, [rbp+var_30] jnz short loc_C73EA lea r13, [rbp+var_38] mov r12, [rbp+var_30] loc_C73C8: mov rcx, r12 mov r12d, eax add r12, rcx mov rdi, r15 mov rsi, r13 mov rdx, r12 mov rcx, r14 call rbx test eax, eax jle short loc_C73EA cmp [rbp+var_38], 20h ; ' ' jz short loc_C73C8 loc_C73EA: sub r12, [rbp+var_30] jmp short loc_C73F3 loc_C73F0: xor r12d, r12d loc_C73F3: mov rax, r12 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_scan_mb2(long long a1, long long a2, long long a3, int a4) { long long v5; // r12 long long ( *v6)(long long, long long *, long long, long long); // rbx int v7; // eax long long v10; // [rsp+8h] [rbp-38h] BYREF long long v11; // [rsp+10h] [rbp-30h] if ( a4 != 2 ) return 0LL; v5 = a2; v6 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v7 = v6(a1, &v10, a2, a3); v11 = a2; if ( v7 > 0 ) { v5 = v11; if ( v10 == 32 ) { v5 = v11; do { v5 += (unsigned int)v7; v7 = v6(a1, &v10, v5, a3); } while ( v7 > 0 && v10 == 32 ); } } return v5 - v11; }
my_scan_mb2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 CMP ECX,0x2 JNZ 0x001c73f0 MOV R14,RDX MOV R12,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV RBX,qword ptr [RAX + 0x28] LEA RSI,[RBP + -0x38] MOV RDX,R12 MOV RCX,R14 CALL RBX MOV qword ptr [RBP + -0x30],R12 TEST EAX,EAX JLE 0x001c73ea CMP qword ptr [RBP + -0x38],0x20 MOV R12,qword ptr [RBP + -0x30] JNZ 0x001c73ea LEA R13,[RBP + -0x38] MOV R12,qword ptr [RBP + -0x30] LAB_001c73c8: MOV RCX,R12 MOV R12D,EAX ADD R12,RCX MOV RDI,R15 MOV RSI,R13 MOV RDX,R12 MOV RCX,R14 CALL RBX TEST EAX,EAX JLE 0x001c73ea CMP qword ptr [RBP + -0x38],0x20 JZ 0x001c73c8 LAB_001c73ea: SUB R12,qword ptr [RBP + -0x30] JMP 0x001c73f3 LAB_001c73f0: XOR R12D,R12D LAB_001c73f3: MOV RAX,R12 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_scan_mb2(long param_1,long param_2,int8 param_3,int param_4) { code *pcVar1; uint uVar2; long local_40; long local_38; if (param_4 == 2) { pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3); local_38 = param_2; if ((0 < (int)uVar2) && (local_40 == 0x20)) { do { param_2 = (ulong)uVar2 + param_2; uVar2 = (*pcVar1)(param_1,&local_40,param_2,param_3); if ((int)uVar2 < 1) break; } while (local_40 == 0x20); } param_2 = param_2 - local_38; } else { param_2 = 0; } return param_2; }
53,572
testing::Message::operator<<(wchar_t const*)
AlayaLite/build_O3/_deps/googletest-src/googletest/src/gtest.cc
Message& Message::operator<<(const wchar_t* wide_c_str) { return *this << internal::String::ShowWideCString(wide_c_str); }
O3
cpp
testing::Message::operator<<(wchar_t const*): pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x5e4c4 movq (%rbx), %rdi addq $0x10, %rdi movq (%r14), %rsi movq 0x8(%r14), %rdx callq 0x11b90 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5e493 movq 0x18(%rsp), %rsi incq %rsi callq 0x11120 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x5e4bc movq 0x18(%rsp), %rsi incq %rsi callq 0x11120 movq %rbx, %rdi callq 0x11760
_ZN7testing7MessagelsEPKw: push r14 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rsp+38h+var_30] mov rdi, r14; int call _ZN7testing8internal6String15ShowWideCStringB5cxx11EPKw; testing::internal::String::ShowWideCString(wchar_t const*) mov rdi, [rbx] add rdi, 10h mov rsi, [r14] mov rdx, [r14+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 rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5E493 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5E493: mov rax, rbx add rsp, 28h pop rbx pop r14 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_5E4BC mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_5E4BC: mov rdi, rbx call __Unwind_Resume
_QWORD * testing::Message::operator<<(_QWORD *a1) { void *v2[2]; // [rsp+8h] [rbp-30h] BYREF long long v3; // [rsp+18h] [rbp-20h] BYREF testing::internal::String::ShowWideCString[abi:cxx11]((int)v2); std::__ostream_insert<char,std::char_traits<char>>(*a1 + 16LL, v2[0], v2[1]); if ( v2[0] != &v3 ) operator delete(v2[0], v3 + 1); return a1; }
operator<<: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x0015e4c4 MOV RDI,qword ptr [RBX] ADD RDI,0x10 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_0015e473: CALL 0x00111b90 LAB_0015e478: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0015e493 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00111120 LAB_0015e493: MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 RET
/* testing::Message::TEMPNAMEPLACEHOLDERVALUE(wchar_t const*) */ Message * __thiscall testing::Message::operator<<(Message *this,wchar_t *param_1) { long *local_30; long local_28; long local_20 [2]; internal::String::ShowWideCString_abi_cxx11_((String *)&local_30,param_1); /* try { // try from 0015e473 to 0015e477 has its CatchHandler @ 0015e49e */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(*(long *)this + 0x10),(char *)local_30,local_28); if (local_30 != local_20) { operator_delete(local_30,local_20[0] + 1); } return this; }
53,573
add_star_export_entry
bluesky950520[P]quickjs/quickjs.c
static int add_star_export_entry(JSContext *ctx, JSModuleDef *m, int req_module_idx) { JSStarExportEntry *se; if (js_resize_array(ctx, (void **)&m->star_export_entries, sizeof(JSStarExportEntry), &m->star_export_entries_size, m->star_export_entries_count + 1)) return -1; se = &m->star_export_entries[m->star_export_entries_count++]; se->req_module_idx = req_module_idx; return 0; }
O1
c
add_star_export_entry: pushq %r14 pushq %rbx pushq %rax movl %edx, %ebx movq %rsi, %r14 movl 0x40(%rsi), %r8d cmpl %r8d, 0x44(%rsi) jle 0x6bd72 movq 0x38(%r14), %rax movslq 0x40(%r14), %rcx leal 0x1(%rcx), %edx movl %edx, 0x40(%r14) movl %ebx, (%rax,%rcx,4) xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x38(%r14), %rsi leaq 0x44(%r14), %rcx incl %r8d movl $0x4, %edx callq 0x428db movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testl %ecx, %ecx jne 0x6bd6a jmp 0x6bd56
add_star_export_entry: push r14 push rbx push rax mov ebx, edx mov r14, rsi mov r8d, [rsi+40h] cmp [rsi+44h], r8d jle short loc_6BD72 loc_6BD56: mov rax, [r14+38h] movsxd rcx, dword ptr [r14+40h] lea edx, [rcx+1] mov [r14+40h], edx mov [rax+rcx*4], ebx xor eax, eax loc_6BD6A: add rsp, 8 pop rbx pop r14 retn loc_6BD72: lea rsi, [r14+38h] lea rcx, [r14+44h] inc r8d mov edx, 4 call js_realloc_array mov ecx, eax mov eax, 0FFFFFFFFh test ecx, ecx jnz short loc_6BD6A jmp short loc_6BD56
long long add_star_export_entry(long long a1, long long a2, int a3) { int v4; // r8d long long v5; // rax long long v6; // rcx long long result; // rax int v8; // ecx v4 = *(_DWORD *)(a2 + 64); if ( *(_DWORD *)(a2 + 68) > v4 || (v8 = js_realloc_array(a1, (long long *)(a2 + 56), 4u, (_DWORD *)(a2 + 68), v4 + 1), result = 0xFFFFFFFFLL, !v8) ) { v5 = *(_QWORD *)(a2 + 56); v6 = *(int *)(a2 + 64); *(_DWORD *)(a2 + 64) = v6 + 1; *(_DWORD *)(v5 + 4 * v6) = a3; return 0LL; } return result; }
add_star_export_entry: PUSH R14 PUSH RBX PUSH RAX MOV EBX,EDX MOV R14,RSI MOV R8D,dword ptr [RSI + 0x40] CMP dword ptr [RSI + 0x44],R8D JLE 0x0016bd72 LAB_0016bd56: MOV RAX,qword ptr [R14 + 0x38] MOVSXD RCX,dword ptr [R14 + 0x40] LEA EDX,[RCX + 0x1] MOV dword ptr [R14 + 0x40],EDX MOV dword ptr [RAX + RCX*0x4],EBX XOR EAX,EAX LAB_0016bd6a: ADD RSP,0x8 POP RBX POP R14 RET LAB_0016bd72: LEA RSI,[R14 + 0x38] LEA RCX,[R14 + 0x44] INC R8D MOV EDX,0x4 CALL 0x001428db MOV ECX,EAX MOV EAX,0xffffffff TEST ECX,ECX JNZ 0x0016bd6a JMP 0x0016bd56
int8 add_star_export_entry(int8 param_1,long param_2,int4 param_3) { int iVar1; if ((*(int *)(param_2 + 0x44) <= *(int *)(param_2 + 0x40)) && (iVar1 = js_realloc_array(param_1,param_2 + 0x38,4,param_2 + 0x44,*(int *)(param_2 + 0x40) + 1) , iVar1 != 0)) { return 0xffffffff; } iVar1 = *(int *)(param_2 + 0x40); *(int *)(param_2 + 0x40) = iVar1 + 1; *(int4 *)(*(long *)(param_2 + 0x38) + (long)iVar1 * 4) = param_3; return 0; }
53,574
nglog::GetTempDirectories(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>>>>&)
ng-log[P]ng-log/src/logging.cc
static void GetTempDirectories(vector<string>& list) { list.clear(); #ifdef NGLOG_OS_WINDOWS // On windows we'll try to find a directory in this order: // C:/Documents & Settings/whomever/TEMP (or whatever GetTempPath() is) // C:/TMP/ // C:/TEMP/ char tmp[MAX_PATH]; if (GetTempPathA(MAX_PATH, tmp)) list.push_back(tmp); list.push_back("C:\\TMP\\"); list.push_back("C:\\TEMP\\"); #else // Directories, in order of preference. If we find a dir that // exists, we stop adding other less-preferred dirs const char* candidates[] = { // Non-null only during unittest/regtest getenv("TEST_TMPDIR"), // Explicitly-supplied temp dirs getenv("TMPDIR"), getenv("TMP"), // If all else fails "/tmp", }; for (auto d : candidates) { if (!d) continue; // Empty env var // Make sure we don't surprise anyone who's expecting a '/' string dstr = d; if (dstr[dstr.size() - 1] != '/') { dstr += "/"; } list.push_back(dstr); struct stat statbuf; if (!stat(d, &statbuf) && S_ISDIR(statbuf.st_mode)) { // We found a dir that exists - we're done. return; } } #endif }
O0
cpp
nglog::GetTempDirectories(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>>>>&): pushq %rbp movq %rsp, %rbp subq $0x140, %rsp # imm = 0x140 movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi callq 0x2ac10 leaq 0x3b450(%rip), %rdi # 0x6f98f callq 0xaa20 movq %rax, -0x30(%rbp) leaq 0x3b445(%rip), %rdi # 0x6f994 callq 0xaa20 movq %rax, -0x28(%rbp) leaq 0x3c66a(%rip), %rdi # 0x70bc9 callq 0xaa20 movq %rax, -0x20(%rbp) leaq 0x3c65e(%rip), %rax # 0x70bcd movq %rax, -0x18(%rbp) leaq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax addq $0x20, %rax movq %rax, -0x48(%rbp) movq -0x40(%rbp), %rax cmpq -0x48(%rbp), %rax je 0x346ec movq -0x40(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) cmpq $0x0, -0x50(%rbp) jne 0x345b4 jmp 0x346db movq -0x50(%rbp), %rax movq %rax, -0x130(%rbp) leaq -0x71(%rbp), %rdi movq %rdi, -0x128(%rbp) callq 0xaf60 movq -0x130(%rbp), %rsi movq -0x128(%rbp), %rdx leaq -0x70(%rbp), %rdi callq 0x22510 jmp 0x345e8 leaq -0x71(%rbp), %rdi callq 0xa8b0 leaq -0x70(%rbp), %rdi movq %rdi, -0x140(%rbp) callq 0xa5a0 movq -0x140(%rbp), %rdi movq %rax, %rsi decq %rsi callq 0xb0c0 movq %rax, -0x138(%rbp) jmp 0x3461c movq -0x138(%rbp), %rax movsbl (%rax), %eax cmpl $0x2f, %eax je 0x34676 leaq 0x3b74b(%rip), %rsi # 0x6fd7d leaq -0x70(%rbp), %rdi callq 0xa7a0 jmp 0x3463d jmp 0x34676 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x80(%rbp) movl %eax, -0x84(%rbp) leaq -0x71(%rbp), %rdi callq 0xa8b0 jmp 0x346f5 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x80(%rbp) movl %eax, -0x84(%rbp) leaq -0x70(%rbp), %rdi callq 0xb128 jmp 0x346f5 movq -0x8(%rbp), %rdi leaq -0x70(%rbp), %rsi callq 0x2c620 jmp 0x34685 movq -0x50(%rbp), %rdi leaq -0x118(%rbp), %rsi callq 0xa710 cmpl $0x0, %eax jne 0x346b8 movl -0x100(%rbp), %eax andl $0xf000, %eax # imm = 0xF000 cmpl $0x4000, %eax # imm = 0x4000 jne 0x346b8 movl $0x1, -0x11c(%rbp) jmp 0x346c2 movl $0x0, -0x11c(%rbp) leaq -0x70(%rbp), %rdi callq 0xb128 movl -0x11c(%rbp), %eax testl %eax, %eax je 0x346d9 jmp 0x346d7 jmp 0x346ec jmp 0x346db movq -0x40(%rbp), %rax addq $0x8, %rax movq %rax, -0x40(%rbp) jmp 0x3458f addq $0x140, %rsp # imm = 0x140 popq %rbp retq movq -0x80(%rbp), %rdi callq 0xaf50 nop
_ZN5nglogL18GetTempDirectoriesERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE: push rbp mov rbp, rsp sub rsp, 140h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5clearEv; std::vector<std::string>::clear(void) lea rdi, aTestTmpdir; "TEST_TMPDIR" call _getenv mov [rbp+var_30], rax lea rdi, aTestTmpdir+5; "TMPDIR" call _getenv mov [rbp+var_28], rax lea rdi, aTmp_0; "TMP" call _getenv mov [rbp+var_20], rax lea rax, aTmp; "/tmp" mov [rbp+var_18], rax lea rax, [rbp+var_30] mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_40], rax mov rax, [rbp+var_38] add rax, 20h ; ' ' mov [rbp+var_48], rax loc_3458F: mov rax, [rbp+var_40] cmp rax, [rbp+var_48] jz loc_346EC mov rax, [rbp+var_40] mov rax, [rax] mov [rbp+var_50], rax cmp [rbp+var_50], 0 jnz short loc_345B4 jmp loc_346DB loc_345B4: mov rax, [rbp+var_50] mov [rbp+var_130], rax lea rdi, [rbp+var_71] mov [rbp+var_128], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rbp+var_130] mov rdx, [rbp+var_128] lea rdi, [rbp+var_70] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_345E8: lea rdi, [rbp+var_71] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rbp+var_70] mov [rbp+var_140], rdi call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rdi, [rbp+var_140] mov rsi, rax dec rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEixEm; std::string::operator[](ulong) mov [rbp+var_138], rax jmp short $+2 loc_3461C: mov rax, [rbp+var_138] movsx eax, byte ptr [rax] cmp eax, 2Fh ; '/' jz short loc_34676 lea rsi, asc_6FD7C+1; "/" lea rdi, [rbp+var_70] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_3463D: jmp short loc_34676 mov rcx, rax mov eax, edx mov [rbp+var_80], rcx mov [rbp+var_84], eax lea rdi, [rbp+var_71] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_346F5 mov rcx, rax mov eax, edx mov [rbp+var_80], rcx mov [rbp+var_84], eax lea rdi, [rbp+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_346F5 loc_34676: mov rdi, [rbp+var_8] lea rsi, [rbp+var_70] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backERKS5_; std::vector<std::string>::push_back(std::string const&) jmp short $+2 loc_34685: mov rdi, [rbp+var_50] lea rsi, [rbp+var_118] call _stat cmp eax, 0 jnz short loc_346B8 mov eax, [rbp+var_100] and eax, 0F000h cmp eax, 4000h jnz short loc_346B8 mov [rbp+var_11C], 1 jmp short loc_346C2 loc_346B8: mov [rbp+var_11C], 0 loc_346C2: lea rdi, [rbp+var_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rbp+var_11C] test eax, eax jz short loc_346D9 jmp short $+2 loc_346D7: jmp short loc_346EC loc_346D9: jmp short $+2 loc_346DB: mov rax, [rbp+var_40] add rax, 8 mov [rbp+var_40], rax jmp loc_3458F loc_346EC: add rsp, 140h pop rbp retn loc_346F5: mov rdi, [rbp+var_80] call __Unwind_Resume
long long * nglog::GetTempDirectories(_QWORD *a1) { long long *result; // rax long long v2; // rax long long v3; // [rsp+10h] [rbp-130h] BOOL v4; // [rsp+24h] [rbp-11Ch] char v5[24]; // [rsp+28h] [rbp-118h] BYREF int v6; // [rsp+40h] [rbp-100h] char v7; // [rsp+CFh] [rbp-71h] BYREF _BYTE v8[32]; // [rsp+D0h] [rbp-70h] BYREF long long v9; // [rsp+F0h] [rbp-50h] long long *v10; // [rsp+F8h] [rbp-48h] long long *v11; // [rsp+100h] [rbp-40h] _QWORD *v12; // [rsp+108h] [rbp-38h] _QWORD v13[4]; // [rsp+110h] [rbp-30h] BYREF long long v14; // [rsp+130h] [rbp-10h] BYREF _QWORD *v15; // [rsp+138h] [rbp-8h] v15 = a1; std::vector<std::string>::clear(a1); v13[0] = getenv("TEST_TMPDIR"); v13[1] = getenv("TMPDIR"); v13[2] = getenv("TMP"); v13[3] = "/tmp"; v12 = v13; v11 = v13; v10 = &v14; while ( 1 ) { result = v11; if ( v11 == v10 ) break; v9 = *v11; if ( v9 ) { v3 = v9; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v8, v3, (long long)&v7); std::allocator<char>::~allocator(&v7); v2 = std::string::size(v8); if ( *(_BYTE *)std::string::operator[](v8, v2 - 1) != 47 ) std::string::operator+=(v8, "/"); std::vector<std::string>::push_back((long long)v15, (long long)v8); v4 = !(unsigned int)stat(v9, v5) && (v6 & 0xF000) == 0x4000; std::string::~string(v8); result = (long long *)v4; if ( v4 ) break; } ++v11; } return result; }
GetTempDirectories: PUSH RBP MOV RBP,RSP SUB RSP,0x140 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012ac10 LEA RDI,[0x16f98f] CALL 0x0010aa20 MOV qword ptr [RBP + -0x30],RAX LEA RDI,[0x16f994] CALL 0x0010aa20 MOV qword ptr [RBP + -0x28],RAX LEA RDI,[0x170bc9] CALL 0x0010aa20 MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x170bcd] MOV qword ptr [RBP + -0x18],RAX LEA RAX,[RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x20 MOV qword ptr [RBP + -0x48],RAX LAB_0013458f: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x48] JZ 0x001346ec MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX CMP qword ptr [RBP + -0x50],0x0 JNZ 0x001345b4 JMP 0x001346db LAB_001345b4: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x130],RAX LEA RDI,[RBP + -0x71] MOV qword ptr [RBP + -0x128],RDI CALL 0x0010af60 MOV RSI,qword ptr [RBP + -0x130] MOV RDX,qword ptr [RBP + -0x128] LAB_001345dd: LEA RDI,[RBP + -0x70] CALL 0x00122510 JMP 0x001345e8 LAB_001345e8: LEA RDI,[RBP + -0x71] CALL 0x0010a8b0 LEA RDI,[RBP + -0x70] MOV qword ptr [RBP + -0x140],RDI CALL 0x0010a5a0 MOV RDI,qword ptr [RBP + -0x140] MOV RSI,RAX DEC RSI LAB_0013460e: CALL 0x0010b0c0 MOV qword ptr [RBP + -0x138],RAX JMP 0x0013461c LAB_0013461c: MOV RAX,qword ptr [RBP + -0x138] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2f JZ 0x00134676 LEA RSI,[0x16fd7d] LEA RDI,[RBP + -0x70] CALL 0x0010a7a0 JMP 0x0013463d LAB_0013463d: JMP 0x00134676 LAB_00134676: MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x70] CALL 0x0012c620 LAB_00134683: JMP 0x00134685 LAB_00134685: MOV RDI,qword ptr [RBP + -0x50] LEA RSI,[RBP + -0x118] CALL 0x0010a710 CMP EAX,0x0 JNZ 0x001346b8 MOV EAX,dword ptr [RBP + -0x100] AND EAX,0xf000 CMP EAX,0x4000 JNZ 0x001346b8 MOV dword ptr [RBP + -0x11c],0x1 JMP 0x001346c2 LAB_001346b8: MOV dword ptr [RBP + -0x11c],0x0 LAB_001346c2: LEA RDI,[RBP + -0x70] CALL 0x0010b128 MOV EAX,dword ptr [RBP + -0x11c] TEST EAX,EAX JZ 0x001346d9 JMP 0x001346d7 LAB_001346d7: JMP 0x001346ec LAB_001346d9: JMP 0x001346db LAB_001346db: MOV RAX,qword ptr [RBP + -0x40] ADD RAX,0x8 MOV qword ptr [RBP + -0x40],RAX JMP 0x0013458f LAB_001346ec: ADD RSP,0x140 POP RBP RET
/* nglog::GetTempDirectories(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&) */ void nglog::GetTempDirectories(vector *param_1) { bool bVar1; int iVar2; char *pcVar3; stat local_120; allocator local_79; string local_78 [32]; char *local_58; char **local_50; char **local_48; char **local_40; char *local_38; char *local_30; char *local_28; int *local_20; char *pcStack_18; vector *local_10; local_10 = param_1; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::clear ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_1); local_38 = getenv("TEST_TMPDIR"); local_30 = getenv("TMPDIR"); local_28 = getenv("TMP"); local_20 = &DAT_00170bcd; local_48 = &local_38; local_50 = &pcStack_18; local_40 = local_48; do { if (local_48 == local_50) { return; } pcVar3 = *local_48; if (pcVar3 != (char *)0x0) { local_58 = pcVar3; std::allocator<char>::allocator(); /* try { // try from 001345dd to 001345e5 has its CatchHandler @ 0013463f */ std::__cxx11::string::string<std::allocator<char>>(local_78,pcVar3,&local_79); std::allocator<char>::~allocator((allocator<char> *)&local_79); std::__cxx11::string::size(); /* try { // try from 0013460e to 00134682 has its CatchHandler @ 0013465c */ pcVar3 = (char *)std::__cxx11::string::operator[]((ulong)local_78); if (*pcVar3 != '/') { std::__cxx11::string::operator+=(local_78,"/"); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_10, local_78); iVar2 = stat(local_58,&local_120); if ((iVar2 == 0) && ((local_120.st_mode & 0xf000) == 0x4000)) { bVar1 = true; } else { bVar1 = false; } std::__cxx11::string::~string(local_78); if (bVar1) { return; } } local_48 = local_48 + 1; } while( true ); }
53,575
Field_mysql_json::val_str(String*, String*)
eloqsql/plugin/type_mysql_json/type.cc
String *Field_mysql_json::val_str(String *val_buffer, String *val_ptr) { String *raw_value= Field_blob::val_str(val_buffer, val_ptr); String data; data.copy(*raw_value); val_ptr->length(0); if (parse_mysql(val_ptr, data.ptr(), data.length())) { val_ptr->length(0); my_printf_error(ER_UNKNOWN_ERROR, "Error parsing MySQL JSON format, please dump this table from MySQL " "and then restore it to be able to use it in MariaDB.", MYF(0)); } return val_ptr; }
O0
cpp
Field_mysql_json::val_str(String*, String*): pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x60(%rbp) movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0xf0f0 movq %rax, -0x20(%rbp) leaq -0x40(%rbp), %rdi movq %rdi, -0x58(%rbp) callq 0xf890 movq -0x58(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0xf560 jmp 0x116dc movq -0x18(%rbp), %rdi addq $0x8, %rdi xorl %eax, %eax movl %eax, %esi callq 0xf7a0 jmp 0x116ef movq -0x18(%rbp), %rax movq %rax, -0x70(%rbp) leaq -0x38(%rbp), %rdi callq 0xf6e0 movq %rax, -0x68(%rbp) jmp 0x11706 leaq -0x38(%rbp), %rdi callq 0xf1c0 movl %eax, -0x74(%rbp) jmp 0x11714 movq -0x68(%rbp), %rdx movq -0x70(%rbp), %rsi movq -0x60(%rbp), %rdi movl -0x74(%rbp), %eax movl %eax, %eax movl %eax, %ecx callq 0xf380 movb %al, -0x75(%rbp) jmp 0x11731 movb -0x75(%rbp), %al testb $0x1, %al jne 0x1173a jmp 0x11788 movq -0x18(%rbp), %rdi addq $0x8, %rdi xorl %eax, %eax movl %eax, %esi callq 0xf7a0 jmp 0x1174d movq 0x980c(%rip), %rax # 0x1af60 movq (%rax), %rax movq 0x8(%rax), %rcx leaq 0x3937(%rip), %rsi # 0x15099 xorl %eax, %eax movl %eax, %edx movl $0x451, %edi # imm = 0x451 callq *%rcx jmp 0x1176f jmp 0x11788 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) leaq -0x40(%rbp), %rdi callq 0xf570 jmp 0x117a6 movq -0x18(%rbp), %rax movq %rax, -0x80(%rbp) leaq -0x40(%rbp), %rdi callq 0xf570 movq -0x80(%rbp), %rax addq $0x80, %rsp popq %rbp retq movq -0x48(%rbp), %rdi callq 0xf7c0 nop
_ZN16Field_mysql_json7val_strEP6StringS1_: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8]; this mov [rbp+var_60], rdi mov rsi, [rbp+var_10]; String * mov rdx, [rbp+var_18]; String * call __ZN10Field_blob7val_strEP6StringS1_; Field_blob::val_str(String *,String *) mov [rbp+var_20], rax lea rdi, [rbp+var_40]; this mov [rbp+var_58], rdi call __ZN6StringC2Ev; String::String(void) mov rdi, [rbp+var_58]; this mov rsi, [rbp+var_20]; String * call __ZN6String4copyERKS_; String::copy(String const&) jmp short $+2 loc_116DC: mov rdi, [rbp+var_18] add rdi, 8; this xor eax, eax mov esi, eax; unsigned __int64 call __ZN13Binary_string6lengthEm; Binary_string::length(ulong) jmp short $+2 loc_116EF: mov rax, [rbp+var_18] mov [rbp+var_74+4], rax lea rdi, [rbp+var_38]; this call __ZNK13Binary_string3ptrEv; Binary_string::ptr(void) mov [rbp+var_68], rax jmp short $+2 loc_11706: lea rdi, [rbp+var_38]; this call __ZNK13Binary_string6lengthEv; Binary_string::length(void) mov dword ptr [rbp+var_74], eax jmp short $+2 loc_11714: mov rdx, [rbp+var_68]; char * mov rsi, [rbp+var_74+4]; String * mov rdi, [rbp+var_60]; this mov eax, dword ptr [rbp+var_74] mov eax, eax mov ecx, eax; unsigned __int64 call __ZNK16Field_mysql_json11parse_mysqlEP6StringPKcm; Field_mysql_json::parse_mysql(String *,char const*,ulong) mov [rbp+var_75], al jmp short $+2 loc_11731: mov al, [rbp+var_75] test al, 1 jnz short loc_1173A jmp short loc_11788 loc_1173A: mov rdi, [rbp+var_18] add rdi, 8; this xor eax, eax mov esi, eax; unsigned __int64 call __ZN13Binary_string6lengthEm; Binary_string::length(ulong) jmp short $+2 loc_1174D: mov rax, cs:my_print_error_service_ptr mov rax, [rax] mov rcx, [rax+8] lea rsi, aErrorParsingMy; "Error parsing MySQL JSON format, please"... xor eax, eax mov edx, eax mov edi, 451h call rcx jmp short $+2 loc_1176F: jmp short loc_11788 mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax lea rdi, [rbp+var_40]; this call __ZN6StringD2Ev; String::~String() jmp short loc_117A6 loc_11788: mov rax, [rbp+var_18] mov [rbp+var_80], rax lea rdi, [rbp+var_40]; this call __ZN6StringD2Ev; String::~String() mov rax, [rbp+var_80] add rsp, 80h pop rbp retn loc_117A6: mov rdi, [rbp+var_48] call __Unwind_Resume
String * Field_mysql_json::val_str(Field_mysql_json *this, String *a2, String *a3) { String *v4; // [rsp+0h] [rbp-80h] unsigned int v5; // [rsp+Ch] [rbp-74h] String *v6; // [rsp+10h] [rbp-70h] char *v7; // [rsp+18h] [rbp-68h] _BYTE v8[8]; // [rsp+40h] [rbp-40h] BYREF _BYTE v9[24]; // [rsp+48h] [rbp-38h] BYREF String *v10; // [rsp+60h] [rbp-20h] String *v11; // [rsp+68h] [rbp-18h] String *v12; // [rsp+70h] [rbp-10h] Field_blob *v13; // [rsp+78h] [rbp-8h] v13 = this; v12 = a2; v11 = a3; v10 = (String *)Field_blob::val_str(this, a2, a3); String::String((String *)v8); String::copy((String *)v8, v10); Binary_string::length((String *)((char *)v11 + 8), 0LL); v6 = v11; v7 = (char *)Binary_string::ptr((Binary_string *)v9); v5 = Binary_string::length((Binary_string *)v9); if ( (Field_mysql_json::parse_mysql(this, v6, v7, v5) & 1) != 0 ) { Binary_string::length((String *)((char *)v11 + 8), 0LL); (*(void ( **)(long long, const char *, _QWORD))(my_print_error_service + 8LL))( 1105LL, "Error parsing MySQL JSON format, please dump this table from MySQL and then restore it to be able to use it in MariaDB.", 0LL); } v4 = v11; String::~String((String *)v8); return v4; }
val_str: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x60],RDI MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x0010f0f0 MOV qword ptr [RBP + -0x20],RAX LEA RDI,[RBP + -0x40] MOV qword ptr [RBP + -0x58],RDI CALL 0x0010f890 MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x20] LAB_001116d5: CALL 0x0010f560 JMP 0x001116dc LAB_001116dc: MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x8 XOR EAX,EAX MOV ESI,EAX CALL 0x0010f7a0 JMP 0x001116ef LAB_001116ef: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x70],RAX LEA RDI,[RBP + -0x38] CALL 0x0010f6e0 MOV qword ptr [RBP + -0x68],RAX JMP 0x00111706 LAB_00111706: LEA RDI,[RBP + -0x38] CALL 0x0010f1c0 MOV dword ptr [RBP + -0x74],EAX JMP 0x00111714 LAB_00111714: MOV RDX,qword ptr [RBP + -0x68] MOV RSI,qword ptr [RBP + -0x70] MOV RDI,qword ptr [RBP + -0x60] MOV EAX,dword ptr [RBP + -0x74] MOV EAX,EAX MOV ECX,EAX CALL 0x0010f380 MOV byte ptr [RBP + -0x75],AL JMP 0x00111731 LAB_00111731: MOV AL,byte ptr [RBP + -0x75] TEST AL,0x1 JNZ 0x0011173a JMP 0x00111788 LAB_0011173a: MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x8 XOR EAX,EAX MOV ESI,EAX CALL 0x0010f7a0 JMP 0x0011174d LAB_0011174d: MOV RAX,qword ptr [0x0011af60] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x8] LEA RSI,[0x115099] XOR EAX,EAX MOV EDX,EAX MOV EDI,0x451 CALL RCX LAB_0011176d: JMP 0x0011176f LAB_0011176f: JMP 0x00111788 LAB_00111788: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x80],RAX LEA RDI,[RBP + -0x40] CALL 0x0010f570 MOV RAX,qword ptr [RBP + -0x80] ADD RSP,0x80 POP RBP RET
/* Field_mysql_json::val_str(String*, String*) */ String * __thiscall Field_mysql_json::val_str(Field_mysql_json *this,String *param_1,String *param_2) { String *pSVar1; byte bVar2; uint uVar3; char *pcVar4; String local_48 [8]; Binary_string local_40 [24]; String *local_28; String *local_20; String *local_18; Field_mysql_json *local_10; local_20 = param_2; local_18 = param_1; local_10 = this; local_28 = (String *)Field_blob::val_str((String *)this,param_1); String::String(local_48); /* try { // try from 001116d5 to 0011176c has its CatchHandler @ 00111771 */ String::copy(local_48,local_28); Binary_string::length((Binary_string *)(local_20 + 8),0); pSVar1 = local_20; pcVar4 = (char *)Binary_string::ptr(local_40); uVar3 = Binary_string::length(local_40); bVar2 = parse_mysql(this,pSVar1,pcVar4,(ulong)uVar3); if ((bVar2 & 1) != 0) { Binary_string::length((Binary_string *)(local_20 + 8),0); (**(code **)(*(long *)PTR_my_print_error_service_0011af60 + 8)) (0x451, "Error parsing MySQL JSON format, please dump this table from MySQL and then restore it to be able to use it in MariaDB." ,0); } pSVar1 = local_20; String::~String(local_48); return pSVar1; }
53,576
ma_net_real_write
eloqsql/libmariadb/libmariadb/ma_net.c
int ma_net_real_write(NET *net, const char *packet, size_t len) { ssize_t length; char *pos,*end; if (net->error == 2) return(-1); /* socket can't be used */ net->reading_or_writing=2; #ifdef HAVE_COMPRESS if (net->compress) { size_t complen; uchar *b; uint header_length=NET_HEADER_SIZE+COMP_HEADER_SIZE; if (!(b=(uchar*) malloc(len + NET_HEADER_SIZE + COMP_HEADER_SIZE + 1))) { net->pvio->set_error(net->pvio->mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); net->error=2; net->reading_or_writing=0; return(1); } memcpy(b+header_length,packet,len); if (_mariadb_compress(net, (unsigned char*) b+header_length,&len,&complen)) { complen=0; } int3store(&b[NET_HEADER_SIZE],complen); int3store(b,len); b[3]=(uchar) (net->compress_pkt_nr++); len+= header_length; packet= (char*) b; } #endif /* HAVE_COMPRESS */ pos=(char*) packet; end=pos+len; while (pos != end) { if ((length=ma_pvio_write(net->pvio,(uchar *)pos,(size_t) (end-pos))) <= 0) { int save_errno= errno; char errmsg[100]; net->error=2; /* Close socket */ strerror_r(save_errno, errmsg, 100); net->pvio->set_error(net->pvio->mysql, CR_ERR_NET_WRITE, SQLSTATE_UNKNOWN, 0, errmsg, save_errno); net->reading_or_writing=0; #ifdef HAVE_COMPRESS if (net->compress) free((char*) packet); #endif return(1); } pos+=length; } #ifdef HAVE_COMPRESS if (net->compress) free((char*) packet); #endif net->reading_or_writing=0; return(((int) (pos != end))); }
O0
c
ma_net_real_write: pushq %rbp movq %rsp, %rbp subq $0xd0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x80(%rbp) movq %rsi, -0x88(%rbp) movq %rdx, -0x90(%rbp) movq -0x80(%rbp), %rax movzbl 0x94(%rax), %eax cmpl $0x2, %eax jne 0x45c16 movl $0xffffffff, -0x74(%rbp) # imm = 0xFFFFFFFF jmp 0x45f21 movq -0x80(%rbp), %rax movb $0x2, 0x80(%rax) movq -0x80(%rbp), %rax cmpb $0x0, 0x84(%rax) je 0x45dcc movl $0x7, -0xbc(%rbp) movq -0x90(%rbp), %rdi addq $0x4, %rdi addq $0x3, %rdi addq $0x1, %rdi callq 0x135b0 movq %rax, -0xb8(%rbp) cmpq $0x0, %rax jne 0x45cb1 movq -0x80(%rbp), %rax movq (%rax), %rax movq 0x50(%rax), %r8 movq -0x80(%rbp), %rax movq (%rax), %rax movq 0x40(%rax), %rdi leaq 0x1a202(%rip), %rax # 0x5fe80 movq (%rax), %rdx movl $0x7d8, %esi # imm = 0x7D8 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq *%r8 movq -0x80(%rbp), %rax movb $0x2, 0x94(%rax) movq -0x80(%rbp), %rax movb $0x0, 0x80(%rax) movl $0x1, -0x74(%rbp) jmp 0x45f21 movq -0xb8(%rbp), %rdi movl -0xbc(%rbp), %eax addq %rax, %rdi movq -0x88(%rbp), %rsi movq -0x90(%rbp), %rdx callq 0x13360 movq -0x80(%rbp), %rdi movq -0xb8(%rbp), %rsi movl -0xbc(%rbp), %eax addq %rax, %rsi leaq -0x90(%rbp), %rdx leaq -0xb0(%rbp), %rcx callq 0x25110 cmpb $0x0, %al je 0x45d0a movq $0x0, -0xb0(%rbp) jmp 0x45d0c movq -0xb0(%rbp), %rax movb %al, %cl movq -0xb8(%rbp), %rax movb %cl, 0x4(%rax) movq -0xb0(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0xb8(%rbp), %rax movb %cl, 0x5(%rax) movq -0xb0(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0xb8(%rbp), %rax movb %cl, 0x6(%rax) jmp 0x45d4f movq -0x90(%rbp), %rax movb %al, %cl movq -0xb8(%rbp), %rax movb %cl, (%rax) movq -0x90(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0xb8(%rbp), %rax movb %cl, 0x1(%rax) movq -0x90(%rbp), %rax shrq $0x10, %rax movb %al, %cl movq -0xb8(%rbp), %rax movb %cl, 0x2(%rax) movq -0x80(%rbp), %rcx movl 0x64(%rcx), %eax movl %eax, %edx addl $0x1, %edx movl %edx, 0x64(%rcx) movb %al, %cl movq -0xb8(%rbp), %rax movb %cl, 0x3(%rax) movl -0xbc(%rbp), %eax addq -0x90(%rbp), %rax movq %rax, -0x90(%rbp) movq -0xb8(%rbp), %rax movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rax movq %rax, -0xa0(%rbp) movq -0xa0(%rbp), %rax addq -0x90(%rbp), %rax movq %rax, -0xa8(%rbp) movq -0xa0(%rbp), %rax cmpq -0xa8(%rbp), %rax je 0x45ee4 movq -0x80(%rbp), %rax movq (%rax), %rdi movq -0xa0(%rbp), %rsi movq -0xa8(%rbp), %rdx movq -0xa0(%rbp), %rax subq %rax, %rdx callq 0x23860 movq %rax, -0x98(%rbp) cmpq $0x0, %rax jg 0x45eca callq 0x13050 movl (%rax), %eax movl %eax, -0xc0(%rbp) movq -0x80(%rbp), %rax movb $0x2, 0x94(%rax) movl -0xc0(%rbp), %edi leaq -0x70(%rbp), %rsi movl $0x64, %edx callq 0x131d0 movq -0x80(%rbp), %rax movq (%rax), %rax movq 0x50(%rax), %r10 movq -0x80(%rbp), %rax movq (%rax), %rax movq 0x40(%rax), %rdi leaq 0x19fff(%rip), %rax # 0x5fe80 movq (%rax), %rdx leaq -0x70(%rbp), %r8 movl -0xc0(%rbp), %r9d movl $0x1396, %esi # imm = 0x1396 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq *%r10 movq -0x80(%rbp), %rax movb $0x0, 0x80(%rax) movq -0x80(%rbp), %rax cmpb $0x0, 0x84(%rax) je 0x45ec1 movq -0x88(%rbp), %rdi callq 0x13520 movl $0x1, -0x74(%rbp) jmp 0x45f21 movq -0x98(%rbp), %rax addq -0xa0(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0x45def movq -0x80(%rbp), %rax cmpb $0x0, 0x84(%rax) je 0x45efd movq -0x88(%rbp), %rdi callq 0x13520 movq -0x80(%rbp), %rax movb $0x0, 0x80(%rax) movq -0xa0(%rbp), %rax cmpq -0xa8(%rbp), %rax setne %al andb $0x1, %al movzbl %al, %eax movl %eax, -0x74(%rbp) movl -0x74(%rbp), %eax movl %eax, -0xc4(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x45f4b movl -0xc4(%rbp), %eax addq $0xd0, %rsp popq %rbp retq callq 0x134b0
ma_net_real_write: push rbp mov rbp, rsp sub rsp, 0D0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_80], rdi mov [rbp+var_88], rsi mov [rbp+var_90], rdx mov rax, [rbp+var_80] movzx eax, byte ptr [rax+94h] cmp eax, 2 jnz short loc_45C16 mov [rbp+var_74], 0FFFFFFFFh jmp loc_45F21 loc_45C16: mov rax, [rbp+var_80] mov byte ptr [rax+80h], 2 mov rax, [rbp+var_80] cmp byte ptr [rax+84h], 0 jz loc_45DCC mov [rbp+var_BC], 7 mov rdi, [rbp+var_90] add rdi, 4 add rdi, 3 add rdi, 1 call _malloc mov [rbp+var_B8], rax cmp rax, 0 jnz short loc_45CB1 mov rax, [rbp+var_80] mov rax, [rax] mov r8, [rax+50h] mov rax, [rbp+var_80] mov rax, [rax] mov rdi, [rax+40h] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 7D8h xor eax, eax mov ecx, eax mov al, 0 call r8 mov rax, [rbp+var_80] mov byte ptr [rax+94h], 2 mov rax, [rbp+var_80] mov byte ptr [rax+80h], 0 mov [rbp+var_74], 1 jmp loc_45F21 loc_45CB1: mov rdi, [rbp+var_B8] mov eax, [rbp+var_BC] add rdi, rax mov rsi, [rbp+var_88] mov rdx, [rbp+var_90] call _memcpy mov rdi, [rbp+var_80] mov rsi, [rbp+var_B8] mov eax, [rbp+var_BC] add rsi, rax lea rdx, [rbp+var_90] lea rcx, [rbp+var_B0] call _mariadb_compress cmp al, 0 jz short loc_45D0A mov [rbp+var_B0], 0 loc_45D0A: jmp short $+2 loc_45D0C: mov rax, [rbp+var_B0] mov cl, al mov rax, [rbp+var_B8] mov [rax+4], cl mov rax, [rbp+var_B0] shr rax, 8 mov cl, al mov rax, [rbp+var_B8] mov [rax+5], cl mov rax, [rbp+var_B0] shr rax, 10h mov cl, al mov rax, [rbp+var_B8] mov [rax+6], cl jmp short $+2 loc_45D4F: mov rax, [rbp+var_90] mov cl, al mov rax, [rbp+var_B8] mov [rax], cl mov rax, [rbp+var_90] shr rax, 8 mov cl, al mov rax, [rbp+var_B8] mov [rax+1], cl mov rax, [rbp+var_90] shr rax, 10h mov cl, al mov rax, [rbp+var_B8] mov [rax+2], cl mov rcx, [rbp+var_80] mov eax, [rcx+64h] mov edx, eax add edx, 1 mov [rcx+64h], edx mov cl, al mov rax, [rbp+var_B8] mov [rax+3], cl mov eax, [rbp+var_BC] add rax, [rbp+var_90] mov [rbp+var_90], rax mov rax, [rbp+var_B8] mov [rbp+var_88], rax loc_45DCC: mov rax, [rbp+var_88] mov [rbp+var_A0], rax mov rax, [rbp+var_A0] add rax, [rbp+var_90] mov [rbp+var_A8], rax loc_45DEF: mov rax, [rbp+var_A0] cmp rax, [rbp+var_A8] jz loc_45EE4 mov rax, [rbp+var_80] mov rdi, [rax] mov rsi, [rbp+var_A0] mov rdx, [rbp+var_A8] mov rax, [rbp+var_A0] sub rdx, rax call ma_pvio_write mov [rbp+var_98], rax cmp rax, 0 jg loc_45ECA call ___errno_location mov eax, [rax] mov [rbp+var_C0], eax mov rax, [rbp+var_80] mov byte ptr [rax+94h], 2 mov edi, [rbp+var_C0] lea rsi, [rbp+var_70] mov edx, 64h ; 'd' call ___xpg_strerror_r mov rax, [rbp+var_80] mov rax, [rax] mov r10, [rax+50h] mov rax, [rbp+var_80] mov rax, [rax] mov rdi, [rax+40h] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea r8, [rbp+var_70] mov r9d, [rbp+var_C0] mov esi, 1396h xor eax, eax mov ecx, eax mov al, 0 call r10 mov rax, [rbp+var_80] mov byte ptr [rax+80h], 0 mov rax, [rbp+var_80] cmp byte ptr [rax+84h], 0 jz short loc_45EC1 mov rdi, [rbp+var_88] call _free loc_45EC1: mov [rbp+var_74], 1 jmp short loc_45F21 loc_45ECA: mov rax, [rbp+var_98] add rax, [rbp+var_A0] mov [rbp+var_A0], rax jmp loc_45DEF loc_45EE4: mov rax, [rbp+var_80] cmp byte ptr [rax+84h], 0 jz short loc_45EFD mov rdi, [rbp+var_88] call _free loc_45EFD: mov rax, [rbp+var_80] mov byte ptr [rax+80h], 0 mov rax, [rbp+var_A0] cmp rax, [rbp+var_A8] setnz al and al, 1 movzx eax, al mov [rbp+var_74], eax loc_45F21: mov eax, [rbp+var_74] mov [rbp+var_C4], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_45F4B mov eax, [rbp+var_C4] add rsp, 0D0h pop rbp retn loc_45F4B: call ___stack_chk_fail
long long ma_net_real_write(_BYTE *a1, long long a2, long long a3) { int v3; // eax long long v4; // rdi unsigned int v6; // [rsp+10h] [rbp-C0h] long long v7; // [rsp+18h] [rbp-B8h] long long v8; // [rsp+20h] [rbp-B0h] BYREF long long v9; // [rsp+28h] [rbp-A8h] long long v10; // [rsp+30h] [rbp-A0h] long long v11; // [rsp+38h] [rbp-98h] long long v12; // [rsp+40h] [rbp-90h] BYREF long long v13; // [rsp+48h] [rbp-88h] _BYTE *v14; // [rsp+50h] [rbp-80h] _BYTE v16[104]; // [rsp+60h] [rbp-70h] BYREF unsigned long long v17; // [rsp+C8h] [rbp-8h] v17 = __readfsqword(0x28u); v14 = a1; v13 = a2; v12 = a3; if ( a1[148] == 2 ) { return (unsigned int)-1; } else { v14[128] = 2; if ( v14[132] ) { v7 = malloc(v12 + 8); if ( !v7 ) { (*(void ( **)(_QWORD, long long, char *, _QWORD))(*(_QWORD *)v14 + 80LL))( *(_QWORD *)(*(_QWORD *)v14 + 64LL), 2008LL, SQLSTATE_UNKNOWN, 0LL); v14[148] = 2; v14[128] = 0; return 1; } memcpy(v7 + 7, v13, v12); if ( mariadb_compress((long long)v14, v7 + 7, &v12, &v8) ) v8 = 0LL; *(_WORD *)(v7 + 4) = v8; *(_BYTE *)(v7 + 6) = BYTE2(v8); *(_WORD *)v7 = v12; *(_BYTE *)(v7 + 2) = BYTE2(v12); v3 = *((_DWORD *)v14 + 25); *((_DWORD *)v14 + 25) = v3 + 1; *(_BYTE *)(v7 + 3) = v3; v12 += 7LL; v13 = v7; } v10 = v13; v9 = v12 + v13; while ( v10 != v9 ) { v4 = *(_QWORD *)v14; v11 = ma_pvio_write(*(_QWORD **)v14, v10, v9 - v10); if ( v11 <= 0 ) { v6 = *(_DWORD *)__errno_location(v4); v14[148] = 2; __xpg_strerror_r(v6, v16, 100LL); (*(void ( **)(_QWORD, long long, char *, _QWORD, _BYTE *, _QWORD))(*(_QWORD *)v14 + 80LL))( *(_QWORD *)(*(_QWORD *)v14 + 64LL), 5014LL, SQLSTATE_UNKNOWN, 0LL, v16, v6); v14[128] = 0; if ( v14[132] ) free(v13); return 1; } v10 += v11; } if ( v14[132] ) free(v13); v14[128] = 0; return v10 != v9; } }
ma_net_real_write: PUSH RBP MOV RBP,RSP SUB RSP,0xd0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x80],RDI MOV qword ptr [RBP + -0x88],RSI MOV qword ptr [RBP + -0x90],RDX MOV RAX,qword ptr [RBP + -0x80] MOVZX EAX,byte ptr [RAX + 0x94] CMP EAX,0x2 JNZ 0x00145c16 MOV dword ptr [RBP + -0x74],0xffffffff JMP 0x00145f21 LAB_00145c16: MOV RAX,qword ptr [RBP + -0x80] MOV byte ptr [RAX + 0x80],0x2 MOV RAX,qword ptr [RBP + -0x80] CMP byte ptr [RAX + 0x84],0x0 JZ 0x00145dcc MOV dword ptr [RBP + -0xbc],0x7 MOV RDI,qword ptr [RBP + -0x90] ADD RDI,0x4 ADD RDI,0x3 ADD RDI,0x1 CALL 0x001135b0 MOV qword ptr [RBP + -0xb8],RAX CMP RAX,0x0 JNZ 0x00145cb1 MOV RAX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RAX] MOV R8,qword ptr [RAX + 0x50] MOV RAX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x40] LEA RAX,[0x15fe80] MOV RDX,qword ptr [RAX] MOV ESI,0x7d8 XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL R8 MOV RAX,qword ptr [RBP + -0x80] MOV byte ptr [RAX + 0x94],0x2 MOV RAX,qword ptr [RBP + -0x80] MOV byte ptr [RAX + 0x80],0x0 MOV dword ptr [RBP + -0x74],0x1 JMP 0x00145f21 LAB_00145cb1: MOV RDI,qword ptr [RBP + -0xb8] MOV EAX,dword ptr [RBP + -0xbc] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x88] MOV RDX,qword ptr [RBP + -0x90] CALL 0x00113360 MOV RDI,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0xb8] MOV EAX,dword ptr [RBP + -0xbc] ADD RSI,RAX LEA RDX,[RBP + -0x90] LEA RCX,[RBP + -0xb0] CALL 0x00125110 CMP AL,0x0 JZ 0x00145d0a MOV qword ptr [RBP + -0xb0],0x0 LAB_00145d0a: JMP 0x00145d0c LAB_00145d0c: MOV RAX,qword ptr [RBP + -0xb0] MOV CL,AL MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RAX + 0x4],CL MOV RAX,qword ptr [RBP + -0xb0] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RBP + -0xb0] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RAX + 0x6],CL JMP 0x00145d4f LAB_00145d4f: MOV RAX,qword ptr [RBP + -0x90] MOV CL,AL MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x90] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x90] SHR RAX,0x10 MOV CL,AL MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RAX + 0x2],CL MOV RCX,qword ptr [RBP + -0x80] MOV EAX,dword ptr [RCX + 0x64] MOV EDX,EAX ADD EDX,0x1 MOV dword ptr [RCX + 0x64],EDX MOV CL,AL MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RAX + 0x3],CL MOV EAX,dword ptr [RBP + -0xbc] ADD RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0xb8] MOV qword ptr [RBP + -0x88],RAX LAB_00145dcc: MOV RAX,qword ptr [RBP + -0x88] MOV qword ptr [RBP + -0xa0],RAX MOV RAX,qword ptr [RBP + -0xa0] ADD RAX,qword ptr [RBP + -0x90] MOV qword ptr [RBP + -0xa8],RAX LAB_00145def: MOV RAX,qword ptr [RBP + -0xa0] CMP RAX,qword ptr [RBP + -0xa8] JZ 0x00145ee4 MOV RAX,qword ptr [RBP + -0x80] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0xa0] MOV RDX,qword ptr [RBP + -0xa8] MOV RAX,qword ptr [RBP + -0xa0] SUB RDX,RAX CALL 0x00123860 MOV qword ptr [RBP + -0x98],RAX CMP RAX,0x0 JG 0x00145eca CALL 0x00113050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0xc0],EAX MOV RAX,qword ptr [RBP + -0x80] MOV byte ptr [RAX + 0x94],0x2 MOV EDI,dword ptr [RBP + -0xc0] LEA RSI,[RBP + -0x70] MOV EDX,0x64 CALL 0x001131d0 MOV RAX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RAX] MOV R10,qword ptr [RAX + 0x50] MOV RAX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RAX] MOV RDI,qword ptr [RAX + 0x40] LEA RAX,[0x15fe80] MOV RDX,qword ptr [RAX] LEA R8,[RBP + -0x70] MOV R9D,dword ptr [RBP + -0xc0] MOV ESI,0x1396 XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL R10 MOV RAX,qword ptr [RBP + -0x80] MOV byte ptr [RAX + 0x80],0x0 MOV RAX,qword ptr [RBP + -0x80] CMP byte ptr [RAX + 0x84],0x0 JZ 0x00145ec1 MOV RDI,qword ptr [RBP + -0x88] CALL 0x00113520 LAB_00145ec1: MOV dword ptr [RBP + -0x74],0x1 JMP 0x00145f21 LAB_00145eca: MOV RAX,qword ptr [RBP + -0x98] ADD RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0xa0],RAX JMP 0x00145def LAB_00145ee4: MOV RAX,qword ptr [RBP + -0x80] CMP byte ptr [RAX + 0x84],0x0 JZ 0x00145efd MOV RDI,qword ptr [RBP + -0x88] CALL 0x00113520 LAB_00145efd: MOV RAX,qword ptr [RBP + -0x80] MOV byte ptr [RAX + 0x80],0x0 MOV RAX,qword ptr [RBP + -0xa0] CMP RAX,qword ptr [RBP + -0xa8] SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0x74],EAX LAB_00145f21: MOV EAX,dword ptr [RBP + -0x74] MOV dword ptr [RBP + -0xc4],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00145f4b MOV EAX,dword ptr [RBP + -0xc4] ADD RSP,0xd0 POP RBP RET LAB_00145f4b: CALL 0x001134b0
uint ma_net_real_write(long *param_1,int1 *param_2,size_t param_3) { int iVar1; char cVar2; int1 *puVar3; int *piVar4; long in_FS_OFFSET; int8 local_b8; int1 *local_b0; int1 *local_a8; long local_a0; size_t local_98; int1 *local_90; long *local_88; uint local_7c; int1 local_78 [104]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_98 = param_3; local_90 = param_2; local_88 = param_1; if (*(char *)((long)param_1 + 0x94) == '\x02') { local_7c = 0xffffffff; } else { *(int1 *)(param_1 + 0x10) = 2; if (*(char *)((long)param_1 + 0x84) != '\0') { puVar3 = (int1 *)malloc(param_3 + 8); if (puVar3 == (int1 *)0x0) { (**(code **)(*local_88 + 0x50))(*(int8 *)(*local_88 + 0x40),0x7d8,SQLSTATE_UNKNOWN,0); *(int1 *)((long)local_88 + 0x94) = 2; *(int1 *)(local_88 + 0x10) = 0; local_7c = 1; goto LAB_00145f21; } memcpy(puVar3 + 7,local_90,local_98); cVar2 = _mariadb_compress(local_88,puVar3 + 7,&local_98,&local_b8); if (cVar2 != '\0') { local_b8 = 0; } puVar3[4] = (char)local_b8; puVar3[5] = (char)((ulong)local_b8 >> 8); puVar3[6] = (char)((ulong)local_b8 >> 0x10); *puVar3 = (char)local_98; puVar3[1] = (char)(local_98 >> 8); puVar3[2] = (char)(local_98 >> 0x10); iVar1 = *(int *)((long)local_88 + 100); *(int *)((long)local_88 + 100) = iVar1 + 1; puVar3[3] = (char)iVar1; local_98 = local_98 + 7; local_90 = puVar3; } local_b0 = local_90 + local_98; for (local_a8 = local_90; local_a8 != local_b0; local_a8 = local_a8 + local_a0) { local_a0 = ma_pvio_write(*local_88,local_a8,(long)local_b0 - (long)local_a8); if (local_a0 < 1) { piVar4 = __errno_location(); iVar1 = *piVar4; *(int1 *)((long)local_88 + 0x94) = 2; __xpg_strerror_r(iVar1,local_78,100); (**(code **)(*local_88 + 0x50)) (*(int8 *)(*local_88 + 0x40),0x1396,SQLSTATE_UNKNOWN,0,local_78,iVar1); *(int1 *)(local_88 + 0x10) = 0; if (*(char *)((long)local_88 + 0x84) != '\0') { free(local_90); } local_7c = 1; goto LAB_00145f21; } } if (*(char *)((long)local_88 + 0x84) != '\0') { free(local_90); } *(int1 *)(local_88 + 0x10) = 0; local_7c = (uint)(local_a8 != local_b0); } LAB_00145f21: if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_7c; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
53,577
apply_one_rule
eloqsql/strings/ctype-uca.c
static my_bool apply_one_rule(MY_CHARSET_LOADER *loader, MY_COLL_RULES *rules, MY_COLL_RULE *r, MY_UCA_WEIGHT_LEVEL *dst) { size_t nweights; size_t nreset= my_coll_rule_reset_length(r); /* Length of reset sequence */ size_t nshift= my_coll_rule_shift_length(r); /* Length of shift sequence */ uint16 *to; my_bool rc; if ((rules->shift_after_method == my_shift_method_expand && r->diff[0]) || r->before_level == 1) { /* Suppose we have this rule: &B[before primary] < C i.e. we need to put C before B, but after A, so the result order is: A < C < B. Let primary weight of B be [BBBB]. We cannot just use [BBBB-1] as weight for C: DUCET does not have enough unused weights between any two characters, so using [BBBB-1] will likely make C equal to the previous character, which is A, so we'll get this order instead of the desired: A = C < B. To guarantee that that C is sorted after A, we'll use expansion with a kind of "biggest possible character". As "biggest possible character" we'll use "last_non_ignorable": We'll compose weight for C as: [BBBB-1][MMMM+1] where [MMMM] is weight for "last_non_ignorable". We also do the same trick for "reset after" if the collation option says so. E.g. for the rules "&B < C", weight for C will be calculated as: [BBBB][MMMM+1] At this point we only need to store codepoints 'B' and 'last_non_ignorable'. Actual weights for 'C' will be calculated according to the above formula later, in create_tailoring(). */ if (!my_coll_rule_expand(r->base, MY_UCA_MAX_EXPANSION, rules->uca->last_non_ignorable)) { my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset); return TRUE; } nreset= my_coll_rule_reset_length(r); } if (nshift >= 2) /* Contraction */ { MY_CONTRACTIONS *contractions= &dst->contractions; to= my_uca_init_one_contraction(contractions, r->curr, (uint)nshift, r->with_context); /* Store weights of the "reset to" character */ dst->contractions.nitems--; /* Temporarily hide - it's incomplete */ rc= my_char_weight_put(dst, to, MY_UCA_CONTRACTION_MAX_WEIGHT_SIZE, &nweights, r->base, nreset); dst->contractions.nitems++; /* Activate, now it's complete */ } else { my_wc_t pagec= (r->curr[0] >> 8); DBUG_ASSERT(dst->weights[pagec]); to= my_char_weight_addr(dst, r->curr[0]); /* Store weights of the "reset to" character */ rc= my_char_weight_put(dst, to, dst->lengths[pagec], &nweights, r->base, nreset); } if (rc) { my_charset_loader_error_for_rule(loader, r, "Expansion", r->base, nreset); return rc; } /* Apply level difference. */ return apply_shift(loader, rules, r, dst->levelno, to, nweights); }
O0
c
apply_one_rule: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rdi callq 0x52960 movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rdi callq 0x52980 movq %rax, -0x40(%rbp) movq -0x18(%rbp), %rax cmpl $0x1, 0x30(%rax) jne 0x52339 movq -0x20(%rbp), %rax cmpl $0x0, 0x80(%rax) jne 0x52347 movq -0x20(%rbp), %rax cmpq $0x1, 0x90(%rax) jne 0x52398 movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rax movq 0x8(%rax), %rax movq 0x78(%rax), %rdx movl $0xa, %esi callq 0x51d40 cmpl $0x0, %eax jne 0x5238b movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x2b7f0(%rip), %rdx # 0x7db6d callq 0x529b0 movb $0x1, -0x1(%rbp) jmp 0x524b8 movq -0x20(%rbp), %rdi callq 0x52960 movq %rax, -0x38(%rbp) cmpq $0x2, -0x40(%rbp) jb 0x52414 movq -0x28(%rbp), %rax addq $0x18, %rax movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi movq -0x20(%rbp), %rsi addq $0x50, %rsi movq -0x40(%rbp), %rax movl %eax, %edx movq -0x20(%rbp), %rax movsbl 0x98(%rax), %ecx callq 0x524d0 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x18(%rax) movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x20(%rbp), %r8 movq -0x38(%rbp), %r9 movl $0x11, %edx leaq -0x30(%rbp), %rcx callq 0x52a70 movb %al, -0x49(%rbp) movq -0x28(%rbp), %rax movq 0x18(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x18(%rax) jmp 0x5246b movq -0x20(%rbp), %rax movq 0x50(%rax), %rax shrq $0x8, %rax movq %rax, -0x60(%rbp) jmp 0x52426 movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x50(%rax), %rax movl %eax, %esi callq 0x50230 movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rdi movq -0x48(%rbp), %rsi movq -0x28(%rbp), %rax movq 0x8(%rax), %rax movq -0x60(%rbp), %rcx movzbl (%rax,%rcx), %eax movl %eax, %edx movq -0x20(%rbp), %r8 movq -0x38(%rbp), %r9 leaq -0x30(%rbp), %rcx callq 0x52a70 movb %al, -0x49(%rbp) cmpb $0x0, -0x49(%rbp) je 0x52495 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x20(%rbp), %rcx movq -0x38(%rbp), %r8 leaq 0x2b6e5(%rip), %rdx # 0x7db6d callq 0x529b0 movb -0x49(%rbp), %al movb %al, -0x1(%rbp) jmp 0x524b8 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx movq -0x28(%rbp), %rax movl 0x30(%rax), %ecx movq -0x48(%rbp), %r8 movq -0x30(%rbp), %r9 callq 0x52c70 movb %al, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
apply_one_rule: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rdi, [rbp+var_20] call my_coll_rule_reset_length mov [rbp+var_38], rax mov rdi, [rbp+var_20] call my_coll_rule_shift_length mov [rbp+var_40], rax mov rax, [rbp+var_18] cmp dword ptr [rax+30h], 1 jnz short loc_52339 mov rax, [rbp+var_20] cmp dword ptr [rax+80h], 0 jnz short loc_52347 loc_52339: mov rax, [rbp+var_20] cmp qword ptr [rax+90h], 1 jnz short loc_52398 loc_52347: mov rdi, [rbp+var_20] mov rax, [rbp+var_18] mov rax, [rax+8] mov rdx, [rax+78h] mov esi, 0Ah call my_coll_rule_expand cmp eax, 0 jnz short loc_5238B mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rcx, [rbp+var_20] mov r8, [rbp+var_38] lea rdx, aExpansion; "Expansion" call my_charset_loader_error_for_rule mov [rbp+var_1], 1 jmp loc_524B8 loc_5238B: mov rdi, [rbp+var_20] call my_coll_rule_reset_length mov [rbp+var_38], rax loc_52398: cmp [rbp+var_40], 2 jb short loc_52414 mov rax, [rbp+var_28] add rax, 18h mov [rbp+var_58], rax mov rdi, [rbp+var_58] mov rsi, [rbp+var_20] add rsi, 50h ; 'P' mov rax, [rbp+var_40] mov edx, eax mov rax, [rbp+var_20] movsx ecx, byte ptr [rax+98h] call my_uca_init_one_contraction mov [rbp+var_48], rax mov rax, [rbp+var_28] mov rcx, [rax+18h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+18h], rcx mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov r8, [rbp+var_20] mov r9, [rbp+var_38] mov edx, 11h lea rcx, [rbp+var_30] call my_char_weight_put mov [rbp+var_49], al mov rax, [rbp+var_28] mov rcx, [rax+18h] add rcx, 1 mov [rax+18h], rcx jmp short loc_5246B loc_52414: mov rax, [rbp+var_20] mov rax, [rax+50h] shr rax, 8 mov [rbp+var_60], rax jmp short $+2 loc_52426: mov rdi, [rbp+var_28] mov rax, [rbp+var_20] mov rax, [rax+50h] mov esi, eax call my_char_weight_addr mov [rbp+var_48], rax mov rdi, [rbp+var_28] mov rsi, [rbp+var_48] mov rax, [rbp+var_28] mov rax, [rax+8] mov rcx, [rbp+var_60] movzx eax, byte ptr [rax+rcx] mov edx, eax mov r8, [rbp+var_20] mov r9, [rbp+var_38] lea rcx, [rbp+var_30] call my_char_weight_put mov [rbp+var_49], al loc_5246B: cmp [rbp+var_49], 0 jz short loc_52495 mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] mov rcx, [rbp+var_20] mov r8, [rbp+var_38] lea rdx, aExpansion; "Expansion" call my_charset_loader_error_for_rule mov al, [rbp+var_49] mov [rbp+var_1], al jmp short loc_524B8 loc_52495: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_28] mov ecx, [rax+30h] mov r8, [rbp+var_48] mov r9, [rbp+var_30] call apply_shift mov [rbp+var_1], al loc_524B8: mov al, [rbp+var_1] add rsp, 60h pop rbp retn
char apply_one_rule(long long a1, long long a2, long long a3, _QWORD *a4) { long long v5; // [rsp+0h] [rbp-60h] char v6; // [rsp+17h] [rbp-49h] long long inited; // [rsp+18h] [rbp-48h] unsigned long long v8; // [rsp+20h] [rbp-40h] long long v9; // [rsp+28h] [rbp-38h] long long v10; // [rsp+30h] [rbp-30h] BYREF _QWORD *v11; // [rsp+38h] [rbp-28h] long long v12; // [rsp+40h] [rbp-20h] long long v13; // [rsp+48h] [rbp-18h] long long v14; // [rsp+50h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; v11 = a4; v9 = my_coll_rule_reset_length(a3); v8 = my_coll_rule_shift_length(v12); if ( *(_DWORD *)(a2 + 48) == 1 && *(_DWORD *)(v12 + 128) || *(_QWORD *)(v12 + 144) == 1LL ) { if ( !(unsigned int)my_coll_rule_expand(v12, 0xAuLL, *(_QWORD *)(*(_QWORD *)(v13 + 8) + 120LL)) ) { my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9); return 1; } v9 = my_coll_rule_reset_length(v12); } if ( v8 < 2 ) { v5 = *(_QWORD *)(v12 + 80) >> 8; inited = my_char_weight_addr(v11, *(_QWORD *)(v12 + 80)); v6 = my_char_weight_put(v11, inited, *(unsigned __int8 *)(v11[1] + v5), &v10, v12, v9); } else { inited = my_uca_init_one_contraction(v11 + 3, v12 + 80, (unsigned int)v8, (unsigned int)*(char *)(v12 + 152)); --v11[3]; v6 = my_char_weight_put(v11, inited, 17LL, &v10, v12, v9); ++v11[3]; } if ( !v6 ) return apply_shift(v14, v13, v12, *((unsigned int *)v11 + 12), inited, v10); my_charset_loader_error_for_rule(v14, v12, "Expansion", v12, v9); return v6; }
apply_one_rule: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00152960 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x20] CALL 0x00152980 MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x30],0x1 JNZ 0x00152339 MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX + 0x80],0x0 JNZ 0x00152347 LAB_00152339: MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x90],0x1 JNZ 0x00152398 LAB_00152347: MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RAX + 0x78] MOV ESI,0xa CALL 0x00151d40 CMP EAX,0x0 JNZ 0x0015238b MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x38] LEA RDX,[0x17db6d] CALL 0x001529b0 MOV byte ptr [RBP + -0x1],0x1 JMP 0x001524b8 LAB_0015238b: MOV RDI,qword ptr [RBP + -0x20] CALL 0x00152960 MOV qword ptr [RBP + -0x38],RAX LAB_00152398: CMP qword ptr [RBP + -0x40],0x2 JC 0x00152414 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x18 MOV qword ptr [RBP + -0x58],RAX MOV RDI,qword ptr [RBP + -0x58] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x50 MOV RAX,qword ptr [RBP + -0x40] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x20] MOVSX ECX,byte ptr [RAX + 0x98] CALL 0x001524d0 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,-0x1 MOV qword ptr [RAX + 0x18],RCX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x38] MOV EDX,0x11 LEA RCX,[RBP + -0x30] CALL 0x00152a70 MOV byte ptr [RBP + -0x49],AL MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,0x1 MOV qword ptr [RAX + 0x18],RCX JMP 0x0015246b LAB_00152414: MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] SHR RAX,0x8 MOV qword ptr [RBP + -0x60],RAX JMP 0x00152426 LAB_00152426: MOV RDI,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x50] MOV ESI,EAX CALL 0x00150230 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x60] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV EDX,EAX MOV R8,qword ptr [RBP + -0x20] MOV R9,qword ptr [RBP + -0x38] LEA RCX,[RBP + -0x30] CALL 0x00152a70 MOV byte ptr [RBP + -0x49],AL LAB_0015246b: CMP byte ptr [RBP + -0x49],0x0 JZ 0x00152495 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x38] LEA RDX,[0x17db6d] CALL 0x001529b0 MOV AL,byte ptr [RBP + -0x49] MOV byte ptr [RBP + -0x1],AL JMP 0x001524b8 LAB_00152495: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x28] MOV ECX,dword ptr [RAX + 0x30] MOV R8,qword ptr [RBP + -0x48] MOV R9,qword ptr [RBP + -0x30] CALL 0x00152c70 MOV byte ptr [RBP + -0x1],AL LAB_001524b8: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x60 POP RBP RET
int8 apply_one_rule(int8 param_1,long param_2,long param_3,long param_4) { char extraout_AL; int iVar1; ulong uVar2; int7 extraout_var; int8 uVar3; int7 uVar4; int7 extraout_var_00; char local_51; int8 local_50; int8 local_40; int8 local_38; long local_30; long local_28; long local_20; int8 local_18; char local_9; local_30 = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_40 = my_coll_rule_reset_length(param_3); uVar2 = my_coll_rule_shift_length(local_28); if (((*(int *)(local_20 + 0x30) == 1) && (*(int *)(local_28 + 0x80) != 0)) || (*(long *)(local_28 + 0x90) == 1)) { iVar1 = my_coll_rule_expand(local_28,10,*(int8 *)(*(long *)(local_20 + 8) + 0x78)); if (iVar1 == 0) { my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40); local_9 = '\x01'; uVar4 = extraout_var; goto LAB_001524b8; } local_40 = my_coll_rule_reset_length(local_28); } if (uVar2 < 2) { uVar2 = *(ulong *)(local_28 + 0x50); local_50 = my_char_weight_addr(local_30,*(ulong *)(local_28 + 0x50) & 0xffffffff); local_51 = my_char_weight_put(local_30,local_50, *(int1 *)(*(long *)(local_30 + 8) + (uVar2 >> 8)),&local_38, local_28,local_40); } else { local_50 = my_uca_init_one_contraction (local_30 + 0x18,local_28 + 0x50,uVar2 & 0xffffffff, (int)*(char *)(local_28 + 0x98)); *(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + -1; local_51 = my_char_weight_put(local_30,local_50,0x11,&local_38,local_28,local_40); *(long *)(local_30 + 0x18) = *(long *)(local_30 + 0x18) + 1; } if (local_51 == '\0') { apply_shift(local_18,local_20,local_28,*(int4 *)(local_30 + 0x30),local_50,local_38); uVar4 = extraout_var_00; local_9 = extraout_AL; } else { uVar3 = my_charset_loader_error_for_rule(local_18,local_28,"Expansion",local_28,local_40); uVar4 = (int7)((ulong)uVar3 >> 8); local_9 = local_51; } LAB_001524b8: return CONCAT71(uVar4,local_9); }
53,578
get_severity_color
tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c
static const char* get_severity_color(DiagnosticSeverity severity) { switch (severity) { case DIAGNOSTIC_INFO: return "\033[36m"; // Cyan case DIAGNOSTIC_WARNING: return "\033[33m"; // Yellow case DIAGNOSTIC_ERROR: return "\033[31m"; // Red case DIAGNOSTIC_FATAL: return "\033[35m"; // Magenta default: return "\033[0m"; // Reset } }
O0
c
get_severity_color: pushq %rbp movq %rsp, %rbp movl %edi, -0xc(%rbp) movl -0xc(%rbp), %eax movq %rax, -0x18(%rbp) subq $0x3, %rax ja 0x30fc movq -0x18(%rbp), %rax leaq 0x1b1d(%rip), %rcx # 0x4bdc movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x1fba(%rip), %rax # 0x5089 movq %rax, -0x8(%rbp) jmp 0x3107 leaq 0x1fb3(%rip), %rax # 0x508f movq %rax, -0x8(%rbp) jmp 0x3107 leaq 0x1fac(%rip), %rax # 0x5095 movq %rax, -0x8(%rbp) jmp 0x3107 leaq 0x1fa5(%rip), %rax # 0x509b movq %rax, -0x8(%rbp) jmp 0x3107 leaq 0x1d27(%rip), %rax # 0x4e2a movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopl (%rax)
get_severity_color: push rbp mov rbp, rsp mov [rbp+var_C], edi mov eax, [rbp+var_C] mov [rbp+var_18], rax sub rax, 3; switch 4 cases ja short def_30C6; jumptable 00000000000030C6 default case mov rax, [rbp+var_18] lea rcx, jpt_30C6 movsxd rax, ds:(jpt_30C6 - 4BDCh)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_30C8: lea rax, a36m; jumptable 00000000000030C6 case 0 mov [rbp+var_8], rax jmp short loc_3107 loc_30D5: lea rax, a33m; jumptable 00000000000030C6 case 1 mov [rbp+var_8], rax jmp short loc_3107 loc_30E2: lea rax, a31m; jumptable 00000000000030C6 case 2 mov [rbp+var_8], rax jmp short loc_3107 loc_30EF: lea rax, a35m; jumptable 00000000000030C6 case 3 mov [rbp+var_8], rax jmp short loc_3107 def_30C6: lea rax, a0m; jumptable 00000000000030C6 default case mov [rbp+var_8], rax loc_3107: mov rax, [rbp+var_8] pop rbp retn
const char * get_severity_color(int a1) { const char *v2; // [rsp+10h] [rbp-8h] switch ( a1 ) { case 0: v2 = "\x1B[36m"; break; case 1: v2 = "\x1B[33m"; break; case 2: v2 = "\x1B[31m"; break; case 3: v2 = "\x1B[35m"; break; default: v2 = "\x1B[0m"; break; } return v2; }
get_severity_color: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0xc],EDI MOV EAX,dword ptr [RBP + -0xc] MOV qword ptr [RBP + -0x18],RAX SUB RAX,0x3 JA 0x001030fc MOV RAX,qword ptr [RBP + -0x18] LEA RCX,[0x104bb8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RAX,[0x105053] MOV qword ptr [RBP + -0x8],RAX JMP 0x00103107 caseD_1: LEA RAX,[0x105059] MOV qword ptr [RBP + -0x8],RAX JMP 0x00103107 caseD_2: LEA RAX,[0x10505f] MOV qword ptr [RBP + -0x8],RAX JMP 0x00103107 caseD_3: LEA RAX,[0x105065] MOV qword ptr [RBP + -0x8],RAX JMP 0x00103107 default: LEA RAX,[0x104df4] MOV qword ptr [RBP + -0x8],RAX LAB_00103107: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int * get_severity_color(int4 param_1) { int *local_10; switch(param_1) { case 0: local_10 = &DAT_00105053; break; case 1: local_10 = &DAT_00105059; break; case 2: local_10 = &DAT_0010505f; break; case 3: local_10 = &DAT_00105065; break; default: local_10 = &DAT_00104df4; } return local_10; }
53,579
maria_ftparser_call_initializer
eloqsql/storage/maria/ma_ft_parser.c
MYSQL_FTPARSER_PARAM *maria_ftparser_call_initializer(MARIA_HA *info, uint keynr, uint paramnr) { uint32 ftparser_nr; struct st_mysql_ftparser *parser; if (!maria_ftparser_alloc_param(info)) return 0; if (keynr == NO_SUCH_KEY) { ftparser_nr= 0; parser= &ft_default_parser; } else { ftparser_nr= info->s->keyinfo[keynr].ftkey_nr; parser= info->s->keyinfo[keynr].parser; } DBUG_ASSERT(paramnr < MAX_PARAM_NR); ftparser_nr= ftparser_nr*MAX_PARAM_NR + paramnr; if (! info->ftparser_param[ftparser_nr].mysql_add_word) { /* Note, that mysql_add_word is used here as a flag: mysql_add_word == 0 - parser is not initialized mysql_add_word != 0 - parser is initialized, or no initialization needed. */ info->ftparser_param[ftparser_nr].mysql_add_word= (int (*)(struct st_mysql_ftparser_param *, const char *, int, MYSQL_FTPARSER_BOOLEAN_INFO *)) 1; if (parser->init && parser->init(&info->ftparser_param[ftparser_nr])) return 0; } return &info->ftparser_param[ftparser_nr]; }
O0
c
maria_ftparser_call_initializer: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq -0x10(%rbp), %rdi callq 0x75d80 cmpq $0x0, %rax jne 0x75e2e movq $0x0, -0x8(%rbp) jmp 0x75f2f cmpl $-0x1, -0x14(%rbp) jne 0x75e48 movl $0x0, -0x1c(%rbp) leaq 0x25714e(%rip), %rax # 0x2ccf90 movq %rax, -0x28(%rbp) jmp 0x75e92 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movl 0xbc(%rax), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movq 0xd0(%rax), %rax movq %rax, -0x28(%rbp) jmp 0x75e94 jmp 0x75e96 movl -0x1c(%rbp), %eax shll %eax addl -0x18(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x10(%rbp), %rax movq 0x368(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rax cmpq $0x0, 0x8(%rax) jne 0x75f16 movq -0x10(%rbp), %rax movq 0x368(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rax movl $0x1, %ecx movq %rcx, 0x8(%rax) movq -0x28(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x75f14 movq -0x28(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rcx movq 0x368(%rcx), %rdi movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rdi callq *%rax cmpl $0x0, %eax je 0x75f14 movq $0x0, -0x8(%rbp) jmp 0x75f2f jmp 0x75f16 movq -0x10(%rbp), %rax movq 0x368(%rax), %rax movl -0x1c(%rbp), %ecx shlq $0x6, %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopl (%rax)
maria_ftparser_call_initializer: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov rdi, [rbp+var_10] call maria_ftparser_alloc_param cmp rax, 0 jnz short loc_75E2E mov [rbp+var_8], 0 jmp loc_75F2F loc_75E2E: cmp [rbp+var_14], 0FFFFFFFFh jnz short loc_75E48 mov [rbp+var_1C], 0 lea rax, ft_default_parser mov [rbp+var_28], rax jmp short loc_75E92 loc_75E48: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_14] imul rcx, 118h add rax, rcx mov eax, [rax+0BCh] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_14] imul rcx, 118h add rax, rcx mov rax, [rax+0D0h] mov [rbp+var_28], rax loc_75E92: jmp short $+2 loc_75E94: jmp short $+2 loc_75E96: mov eax, [rbp+var_1C] shl eax, 1 add eax, [rbp+var_18] mov [rbp+var_1C], eax mov rax, [rbp+var_10] mov rax, [rax+368h] mov ecx, [rbp+var_1C] shl rcx, 6 add rax, rcx cmp qword ptr [rax+8], 0 jnz short loc_75F16 mov rax, [rbp+var_10] mov rax, [rax+368h] mov ecx, [rbp+var_1C] shl rcx, 6 add rax, rcx mov ecx, 1 mov [rax+8], rcx mov rax, [rbp+var_28] cmp qword ptr [rax+10h], 0 jz short loc_75F14 mov rax, [rbp+var_28] mov rax, [rax+10h] mov rcx, [rbp+var_10] mov rdi, [rcx+368h] mov ecx, [rbp+var_1C] shl rcx, 6 add rdi, rcx call rax cmp eax, 0 jz short loc_75F14 mov [rbp+var_8], 0 jmp short loc_75F2F loc_75F14: jmp short $+2 loc_75F16: mov rax, [rbp+var_10] mov rax, [rax+368h] mov ecx, [rbp+var_1C] shl rcx, 6 add rax, rcx mov [rbp+var_8], rax loc_75F2F: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
unsigned long long maria_ftparser_call_initializer(_QWORD *a1, unsigned int a2, int a3) { _QWORD *v4; // [rsp+8h] [rbp-28h] int v5; // [rsp+14h] [rbp-1Ch] unsigned int v6; // [rsp+14h] [rbp-1Ch] if ( !maria_ftparser_alloc_param(a1) ) return 0LL; if ( a2 == -1 ) { v5 = 0; v4 = &ft_default_parser; } else { v5 = *(_DWORD *)(280LL * a2 + *(_QWORD *)(*a1 + 1392LL) + 188); v4 = *(_QWORD **)(280LL * a2 + *(_QWORD *)(*a1 + 1392LL) + 208); } v6 = a3 + 2 * v5; if ( !*(_QWORD *)(((unsigned long long)v6 << 6) + a1[109] + 8) && (*(_QWORD *)(((unsigned long long)v6 << 6) + a1[109] + 8) = 1LL, v4[2]) && ((unsigned int ( *)(unsigned long long))v4[2])(((unsigned long long)v6 << 6) + a1[109]) ) { return 0LL; } else { return ((unsigned long long)v6 << 6) + a1[109]; } }
maria_ftparser_call_initializer: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00175d80 CMP RAX,0x0 JNZ 0x00175e2e MOV qword ptr [RBP + -0x8],0x0 JMP 0x00175f2f LAB_00175e2e: CMP dword ptr [RBP + -0x14],-0x1 JNZ 0x00175e48 MOV dword ptr [RBP + -0x1c],0x0 LEA RAX,[0x3ccf90] MOV qword ptr [RBP + -0x28],RAX JMP 0x00175e92 LAB_00175e48: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x118 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0xbc] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x118 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0xd0] MOV qword ptr [RBP + -0x28],RAX LAB_00175e92: JMP 0x00175e94 LAB_00175e94: JMP 0x00175e96 LAB_00175e96: MOV EAX,dword ptr [RBP + -0x1c] SHL EAX,0x1 ADD EAX,dword ptr [RBP + -0x18] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x368] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RAX,RCX CMP qword ptr [RAX + 0x8],0x0 JNZ 0x00175f16 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x368] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RAX,RCX MOV ECX,0x1 MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x28] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00175f14 MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x368] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RDI,RCX CALL RAX CMP EAX,0x0 JZ 0x00175f14 MOV qword ptr [RBP + -0x8],0x0 JMP 0x00175f2f LAB_00175f14: JMP 0x00175f16 LAB_00175f16: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x368] MOV ECX,dword ptr [RBP + -0x1c] SHL RCX,0x6 ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_00175f2f: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
long maria_ftparser_call_initializer(long *param_1,uint param_2,int param_3) { uint uVar1; int iVar2; long lVar3; int1 *local_30; int local_24; long local_10; lVar3 = maria_ftparser_alloc_param(param_1); if (lVar3 == 0) { local_10 = 0; } else { if (param_2 == 0xffffffff) { local_24 = 0; local_30 = ft_default_parser; } else { local_24 = *(int *)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xbc); local_30 = *(int1 **)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xd0); } uVar1 = local_24 * 2 + param_3; if (((*(long *)(param_1[0x6d] + (ulong)uVar1 * 0x40 + 8) == 0) && (*(int8 *)(param_1[0x6d] + (ulong)uVar1 * 0x40 + 8) = 1, *(long *)(local_30 + 0x10) != 0)) && (iVar2 = (**(code **)(local_30 + 0x10))(param_1[0x6d] + (ulong)uVar1 * 0x40), iVar2 != 0)) { local_10 = 0; } else { local_10 = param_1[0x6d] + (ulong)uVar1 * 0x40; } } return local_10; }
53,580
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { auto result = Value::array(); for (const auto& e : elements) { if (!e) throw std::runtime_error("Array element is null"); result.push_back(e->evaluate(context)); } return result; }
O2
cpp
minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x70, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx xorps %xmm0, %xmm0 movq %rsp, %rsi movaps %xmm0, (%rsi) andq $0x0, 0x10(%rsi) callq 0x69154 movq %rsp, %rdi callq 0x68966 movq 0x20(%r15), %r12 movq 0x28(%r15), %r13 leaq 0x20(%rsp), %r15 cmpq %r13, %r12 je 0x6909a movq (%r12), %rsi testq %rsi, %rsi je 0x690ab movq %r15, %rdi movq %r14, %rdx callq 0x62a82 movq %rbx, %rdi movq %r15, %rsi callq 0x691c0 movq %r15, %rdi callq 0x62d12 addq $0x10, %r12 jmp 0x69068 movq %rbx, %rax addq $0x70, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x23480 movq %rax, %r15 leaq 0x4b0ed(%rip), %rsi # 0xb41aa movq %rax, %rdi callq 0x23340 movq 0x94f24(%rip), %rsi # 0xfdff0 movq 0x94e85(%rip), %rdx # 0xfdf58 movq %r15, %rdi callq 0x23f30 movq %rax, %r14 movq %rsp, %rdi callq 0x68966 jmp 0x69111 jmp 0x690f7 movq %rax, %r14 movq %r15, %rdi callq 0x236b0 jmp 0x69109 movq %rax, %r14 jmp 0x69109 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x62d12 movq %rbx, %rdi callq 0x62d12 movq %r14, %rdi callq 0x23fd0 nop
_ZNK5minja9ArrayExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r13 push r12 push rbx sub rsp, 70h mov r14, rdx mov r15, rsi mov rbx, rdi xorps xmm0, xmm0 mov rsi, rsp movaps xmmword ptr [rsi], xmm0 and qword ptr [rsi+10h], 0 call _ZN5minja5Value5arrayESt6vectorIS0_SaIS0_EE; minja::Value::array(std::vector<minja::Value>) mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() mov r12, [r15+20h] mov r13, [r15+28h] lea r15, [rsp+98h+var_78] loc_69068: cmp r12, r13 jz short loc_6909A mov rsi, [r12] test rsi, rsi jz short loc_690AB mov rdi, r15 mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, rbx; this mov rsi, r15; minja::Value * call _ZN5minja5Value9push_backERKS0_; minja::Value::push_back(minja::Value const&) mov rdi, r15; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add r12, 10h jmp short loc_69068 loc_6909A: mov rax, rbx add rsp, 70h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_690AB: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov r15, rax lea rsi, aArrayElementIs; "Array element 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, r15; void * call ___cxa_throw mov r14, rax mov rdi, rsp call _ZNSt6vectorIN5minja5ValueESaIS1_EED2Ev; std::vector<minja::Value>::~vector() jmp short loc_69111 jmp short loc_690F7 mov r14, rax mov rdi, r15; void * call ___cxa_free_exception jmp short loc_69109 loc_690F7: mov r14, rax jmp short loc_69109 mov r14, rax lea rdi, [rsp+98h+var_78]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_69109: mov rdi, rbx; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_69111: mov rdi, r14 call __Unwind_Resume
minja::Value * minja::ArrayExpr::do_evaluate(minja::Value *this, long long a2, int a3, int a4, int a5, int a6) { void (****v6)(void); // r12 void (****v7)(void); // r13 std::runtime_error *exception; // r15 _BYTE v10[32]; // [rsp+0h] [rbp-98h] BYREF _BYTE v11[120]; // [rsp+20h] [rbp-78h] BYREF minja::Value::array((_DWORD)this, (unsigned int)v10, a3, a4, a5, a6, 0LL, 0LL, 0LL); std::vector<minja::Value>::~vector((long long)v10); v6 = *(void (*****)(void))(a2 + 32); v7 = *(void (*****)(void))(a2 + 40); while ( v6 != v7 ) { if ( !*v6 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Array element 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)v11, *v6); minja::Value::push_back(this, (const minja::Value *)v11); minja::Value::~Value((minja::Value *)v11); v6 += 2; } return this; }
do_evaluate: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x70 MOV R14,RDX MOV R15,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOV RSI,RSP MOVAPS xmmword ptr [RSI],XMM0 AND qword ptr [RSI + 0x10],0x0 LAB_0016904e: CALL 0x00169154 MOV RDI,RSP CALL 0x00168966 MOV R12,qword ptr [R15 + 0x20] MOV R13,qword ptr [R15 + 0x28] LEA R15,[RSP + 0x20] LAB_00169068: CMP R12,R13 JZ 0x0016909a MOV RSI,qword ptr [R12] TEST RSI,RSI JZ 0x001690ab LAB_00169076: MOV RDI,R15 MOV RDX,R14 CALL 0x00162a82 LAB_00169081: MOV RDI,RBX MOV RSI,R15 CALL 0x001691c0 LAB_0016908c: MOV RDI,R15 CALL 0x00162d12 ADD R12,0x10 JMP 0x00169068 LAB_0016909a: MOV RAX,RBX ADD RSP,0x70 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_001690ab: PUSH 0x10 POP RDI CALL 0x00123480 MOV R15,RAX LAB_001690b6: LEA RSI,[0x1b41aa] MOV RDI,RAX CALL 0x00123340 LAB_001690c5: MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,R15 CALL 0x00123f30
/* minja::ArrayExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ ArrayExpr * __thiscall minja::ArrayExpr::do_evaluate(ArrayExpr *this,shared_ptr *param_1) { int8 *puVar1; runtime_error *this_00; int8 *puVar2; int8 local_98; int8 uStack_90; int8 local_88; Expression local_78 [80]; local_98 = 0; uStack_90 = 0; local_88 = 0; /* try { // try from 0016904e to 00169052 has its CatchHandler @ 001690db */ Value::array(); std::vector<minja::Value,std::allocator<minja::Value>>::~vector ((vector<minja::Value,std::allocator<minja::Value>> *)&local_98); puVar2 = *(int8 **)(param_1 + 0x20); puVar1 = *(int8 **)(param_1 + 0x28); while( true ) { if (puVar2 == puVar1) { return this; } if ((shared_ptr *)*puVar2 == (shared_ptr *)0x0) break; /* try { // try from 00169076 to 00169080 has its CatchHandler @ 001690f7 */ Expression::evaluate(local_78,(shared_ptr *)*puVar2); /* try { // try from 00169081 to 0016908b has its CatchHandler @ 001690fc */ Value::push_back((Value *)this,(Value *)local_78); Value::~Value((Value *)local_78); puVar2 = puVar2 + 2; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001690b6 to 001690c4 has its CatchHandler @ 001690ea */ std::runtime_error::runtime_error(this_00,"Array element is null"); /* try { // try from 001690c5 to 001690da has its CatchHandler @ 001690e8 */ /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); }
53,581
FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context*, int)
7CodeWizard[P]stablediffusion/clip.hpp
void alloc_compute_buffer(ggml_context* work_ctx, int max_tokens) { auto get_graph = [&]() -> struct ggml_cgraph* { bool return_pooled = false; if (version == VERSION_XL) { return_pooled = true; } return build_graph(compute_allocr, std::vector<int>(max_tokens), return_pooled); }; GGMLModule::alloc_compute_buffer(get_graph); }
O0
cpp
FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context*, int): subq $0x78, %rsp movq %rdi, 0x70(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x28(%rsp) movq (%rax), %rax movq %rax, 0x30(%rsp) movb $0x0, 0x6f(%rsp) cmpl $0x2, 0x68(%rax) jne 0x8179b movb $0x1, 0x6f(%rsp) movq 0x28(%rsp), %rax movq 0x30(%rsp), %rcx movq 0x50(%rcx), %rcx movq %rcx, 0x10(%rsp) movq 0x8(%rax), %rax movslq (%rax), %rax movq %rax, 0x18(%rsp) leaq 0x4f(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x45590 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx leaq 0x50(%rsp), %rdi callq 0x81e00 jmp 0x817df movq 0x10(%rsp), %rsi movq 0x30(%rsp), %rdi movzbl 0x6f(%rsp), %ecx andl $0x1, %ecx leaq 0x50(%rsp), %rdx callq 0x81860 movq %rax, 0x8(%rsp) jmp 0x81802 leaq 0x50(%rsp), %rdi callq 0x381b0 leaq 0x4f(%rsp), %rdi callq 0x45630 movq 0x8(%rsp), %rax addq $0x78, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x40(%rsp) movl %eax, 0x3c(%rsp) jmp 0x81848 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x40(%rsp) movl %eax, 0x3c(%rsp) leaq 0x50(%rsp), %rdi callq 0x381b0 leaq 0x4f(%rsp), %rdi callq 0x45630 movq 0x40(%rsp), %rdi callq 0xbd30 nopl (%rax)
_ZZN33FrozenCLIPEmbedderWithCustomWords20alloc_compute_bufferEP12ggml_contextiENKUlvE_clEv: sub rsp, 78h mov [rsp+78h+var_8], rdi mov rax, [rsp+78h+var_8] mov [rsp+78h+var_50], rax mov rax, [rax] mov [rsp+78h+var_48], rax mov [rsp+78h+var_9], 0 cmp dword ptr [rax+68h], 2 jnz short loc_8179B mov [rsp+78h+var_9], 1 loc_8179B: mov rax, [rsp+78h+var_50] mov rcx, [rsp+78h+var_48] mov rcx, [rcx+50h] mov [rsp+78h+var_68], rcx mov rax, [rax+8] movsxd rax, dword ptr [rax] mov [rsp+78h+var_60], rax lea rdi, [rsp+78h+var_29] mov [rsp+78h+var_58], rdi call _ZNSaIiEC2Ev; std::allocator<int>::allocator(void) mov rsi, [rsp+78h+var_60] mov rdx, [rsp+78h+var_58] lea rdi, [rsp+78h+var_28] call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&) jmp short $+2 loc_817DF: mov rsi, [rsp+78h+var_68] mov rdi, [rsp+78h+var_48] movzx ecx, [rsp+78h+var_9] and ecx, 1 lea rdx, [rsp+78h+var_28] call _ZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEb; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool) mov [rsp+78h+var_70], rax jmp short $+2 loc_81802: lea rdi, [rsp+78h+var_28] call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() lea rdi, [rsp+78h+var_29] call _ZNSaIiED2Ev; std::allocator<int>::~allocator() mov rax, [rsp+78h+var_70] add rsp, 78h retn mov rcx, rax mov eax, edx mov [rsp+arg_38], rcx mov [rsp+arg_34], eax jmp short loc_81848 mov rcx, rax mov eax, edx mov [rsp+arg_38], rcx mov [rsp+arg_34], eax lea rdi, [rsp+arg_48] call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() loc_81848: lea rdi, [rsp+arg_47] call _ZNSaIiED2Ev; std::allocator<int>::~allocator() mov rdi, [rsp+arg_38] call __Unwind_Resume
operator(): SUB RSP,0x78 MOV qword ptr [RSP + 0x70],RDI MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x30],RAX MOV byte ptr [RSP + 0x6f],0x0 CMP dword ptr [RAX + 0x68],0x2 JNZ 0x0018179b MOV byte ptr [RSP + 0x6f],0x1 LAB_0018179b: MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RCX + 0x50] MOV qword ptr [RSP + 0x10],RCX MOV RAX,qword ptr [RAX + 0x8] MOVSXD RAX,dword ptr [RAX] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x4f] MOV qword ptr [RSP + 0x20],RDI CALL 0x00145590 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_001817d3: LEA RDI,[RSP + 0x50] CALL 0x00181e00 JMP 0x001817df LAB_001817df: MOV RSI,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RSP + 0x30] MOVZX ECX,byte ptr [RSP + 0x6f] LAB_001817ee: AND ECX,0x1 LEA RDX,[RSP + 0x50] CALL 0x00181860 LAB_001817fb: MOV qword ptr [RSP + 0x8],RAX JMP 0x00181802 LAB_00181802: LEA RDI,[RSP + 0x50] CALL 0x001381b0 LEA RDI,[RSP + 0x4f] CALL 0x00145630 MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x78 RET
/* FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context*, int)::{lambda()#1}::TEMPNAMEPLACEHOLDERVALUE() const */ int8 __thiscall FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context*,int)::{lambda()#1}::operator() (_lambda___1_ *this) { int iVar1; FrozenCLIPEmbedderWithCustomWords *pFVar2; int8 uVar3; allocator<int> local_29; vector<int,std::allocator<int>> local_28 [31]; byte local_9; _lambda___1_ *local_8; pFVar2 = *(FrozenCLIPEmbedderWithCustomWords **)this; local_9 = *(int *)(pFVar2 + 0x68) == 2; uVar3 = *(int8 *)(pFVar2 + 0x50); iVar1 = **(int **)(this + 8); local_8 = this; std::allocator<int>::allocator(&local_29); /* try { // try from 001817d3 to 001817dc has its CatchHandler @ 00181820 */ std::vector<int,std::allocator<int>>::vector(local_28,(long)iVar1,(allocator *)&local_29); /* try { // try from 001817ee to 001817fa has its CatchHandler @ 00181830 */ uVar3 = build_graph(pFVar2,uVar3,local_28,local_9 & 1); std::vector<int,std::allocator<int>>::~vector(local_28); std::allocator<int>::~allocator(&local_29); return uVar3; }
53,582
FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context*, int)
7CodeWizard[P]stablediffusion/clip.hpp
void alloc_compute_buffer(ggml_context* work_ctx, int max_tokens) { auto get_graph = [&]() -> struct ggml_cgraph* { bool return_pooled = false; if (version == VERSION_XL) { return_pooled = true; } return build_graph(compute_allocr, std::vector<int>(max_tokens), return_pooled); }; GGMLModule::alloc_compute_buffer(get_graph); }
O1
cpp
FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context*, int): pushq %rbx subq $0x30, %rsp leaq 0xc(%rsp), %rax movl %edx, (%rax) xorps %xmm0, %xmm0 leaq 0x10(%rsp), %rsi movaps %xmm0, (%rsi) movaps %xmm0, 0x10(%rsi) movq %rdi, (%rsi) movq %rax, 0x8(%rsi) leaq 0x43e3(%rip), %rax # 0x52956 movq %rax, 0x18(%rsi) leaq 0x43de(%rip), %rax # 0x5295c movq %rax, 0x10(%rsi) callq 0x47a54 movq 0x20(%rsp), %rax testq %rax, %rax je 0x4e5a0 leaq 0x10(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax addq $0x30, %rsp popq %rbx retq jmp 0x4e5cc movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x4e5c4 leaq 0x10(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0xaae0 movq %rax, %rdi callq 0x37049
_ZN33FrozenCLIPEmbedderWithCustomWords20alloc_compute_bufferEP12ggml_contexti: push rbx sub rsp, 30h lea rax, [rsp+38h+var_2C] mov [rax], edx xorps xmm0, xmm0 lea rsi, [rsp+38h+var_28] movaps xmmword ptr [rsi], xmm0 movaps xmmword ptr [rsi+10h], xmm0 mov [rsi], rdi mov [rsi+8], rax lea rax, _ZNSt17_Function_handlerIFP11ggml_cgraphvEZN33FrozenCLIPEmbedderWithCustomWords20alloc_compute_bufferEP12ggml_contextiEUlvE_E9_M_invokeERKSt9_Any_data; std::_Function_handler<ggml_cgraph * ()(void),FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context *,int)::{lambda(void)#1}>::_M_invoke(std::_Any_data const&) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFP11ggml_cgraphvEZN33FrozenCLIPEmbedderWithCustomWords20alloc_compute_bufferEP12ggml_contextiEUlvE_E10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation; std::_Function_handler<ggml_cgraph * ()(void),FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context *,int)::{lambda(void)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax call _ZN10GGMLModule20alloc_compute_bufferESt8functionIFP11ggml_cgraphvEE; GGMLModule::alloc_compute_buffer(std::function<ggml_cgraph * ()(void)>) mov rax, [rsp+38h+var_18] test rax, rax jz short loc_4E5A0 lea rdi, [rsp+38h+var_28] mov rsi, rdi mov edx, 3 call rax loc_4E5A0: add rsp, 30h pop rbx retn jmp short loc_4E5CC mov rbx, rax mov rax, [rsp+38h+var_18] test rax, rax jz short loc_4E5C4 lea rdi, [rsp+38h+var_28] mov rsi, rdi mov edx, 3 call rax loc_4E5C4: mov rdi, rbx call __Unwind_Resume loc_4E5CC: mov rdi, rax call __clang_call_terminate
long long FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(_QWORD *a1, long long a2, int a3) { long long result; // rax int v4; // [rsp+Ch] [rbp-2Ch] BYREF _QWORD v5[2]; // [rsp+10h] [rbp-28h] BYREF long long ( *v6)(); // [rsp+20h] [rbp-18h] long long ( *v7)(); // [rsp+28h] [rbp-10h] v4 = a3; v5[0] = a1; v5[1] = &v4; v7 = std::_Function_handler<ggml_cgraph * ()(void),FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context *,int)::{lambda(void)#1}>::_M_invoke; v6 = std::_Function_handler<ggml_cgraph * ()(void),FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context *,int)::{lambda(void)#1}>::_M_manager; GGMLModule::alloc_compute_buffer(a1, (long long)v5); result = (long long)v6; if ( v6 ) return ((long long ( *)(_QWORD *, _QWORD *, long long))v6)(v5, v5, 3LL); return result; }
53,583
FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context*, int)
7CodeWizard[P]stablediffusion/clip.hpp
void alloc_compute_buffer(ggml_context* work_ctx, int max_tokens) { auto get_graph = [&]() -> struct ggml_cgraph* { bool return_pooled = false; if (version == VERSION_XL) { return_pooled = true; } return build_graph(compute_allocr, std::vector<int>(max_tokens), return_pooled); }; GGMLModule::alloc_compute_buffer(get_graph); }
O2
cpp
FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context*, int): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq (%rdi), %rbx movq 0x8(%rdi), %rax movl 0x68(%rbx), %ebp movq 0x50(%rbx), %r14 movslq (%rax), %rsi leaq 0x10(%rsp), %r15 leaq 0xf(%rsp), %rdx movq %r15, %rdi callq 0x3565a xorl %ecx, %ecx cmpl $0x2, %ebp sete %cl movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x353c8 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x22d64 movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x22d64 movq %rbx, %rdi callq 0xaab0 nop
_ZZN33FrozenCLIPEmbedderWithCustomWords20alloc_compute_bufferEP12ggml_contextiENKUlvE_clEv: push rbp push r15 push r14 push rbx sub rsp, 28h mov rbx, [rdi] mov rax, [rdi+8] mov ebp, [rbx+68h] mov r14, [rbx+50h] movsxd rsi, dword ptr [rax] lea r15, [rsp+48h+var_38] lea rdx, [rsp+48h+var_39] mov rdi, r15 call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&) xor ecx, ecx cmp ebp, 2 setz cl mov rdi, rbx mov rsi, r14 mov rdx, r15 call _ZN33FrozenCLIPEmbedderWithCustomWords11build_graphEP11ggml_allocrSt6vectorIiSaIiEEb; FrozenCLIPEmbedderWithCustomWords::build_graph(ggml_allocr *,std::vector<int>,bool) mov rbx, rax lea rdi, [rsp+48h+var_38] call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base() mov rax, rbx add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_8] call _ZNSt12_Vector_baseIiSaIiEED2Ev; std::_Vector_base<int>::~_Vector_base() mov rdi, rbx call __Unwind_Resume
long long FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context *,int)::{lambda(void)#1}::operator()( int **a1) { int *v1; // rbx int v2; // ebp long long v3; // r14 long long result; // rax char v5; // [rsp+Fh] [rbp-39h] BYREF _QWORD v6[7]; // [rsp+10h] [rbp-38h] BYREF v1 = *a1; v2 = (*a1)[26]; v3 = *((_QWORD *)*a1 + 10); std::vector<int>::vector(v6, *a1[1], &v5); result = FrozenCLIPEmbedderWithCustomWords::build_graph(v1, v3, v6, v2 == 2); std::_Vector_base<int>::~_Vector_base(v6); return result; }
operator(): PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x8] MOV EBP,dword ptr [RBX + 0x68] MOV R14,qword ptr [RBX + 0x50] MOVSXD RSI,dword ptr [RAX] LEA R15,[RSP + 0x10] LEA RDX,[RSP + 0xf] MOV RDI,R15 CALL 0x0013565a XOR ECX,ECX CMP EBP,0x2 SETZ CL LAB_00135389: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x001353c8 LAB_00135397: MOV RBX,RAX LEA RDI,[RSP + 0x10] CALL 0x00122d64 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET
/* FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context*, int)::{lambda()#1}::TEMPNAMEPLACEHOLDERVALUE() const */ int8 __thiscall FrozenCLIPEmbedderWithCustomWords::alloc_compute_buffer(ggml_context*,int)::{lambda()#1}::operator() (_lambda___1_ *this) { int iVar1; FrozenCLIPEmbedderWithCustomWords *pFVar2; int8 uVar3; allocator local_39; vector<int,std::allocator<int>> local_38 [24]; pFVar2 = *(FrozenCLIPEmbedderWithCustomWords **)this; iVar1 = *(int *)(pFVar2 + 0x68); uVar3 = *(int8 *)(pFVar2 + 0x50); std::vector<int,std::allocator<int>>::vector(local_38,(long)**(int **)(this + 8),&local_39); /* try { // try from 00135389 to 00135396 has its CatchHandler @ 001353b2 */ uVar3 = build_graph(pFVar2,uVar3,local_38,iVar1 == 2); std::_Vector_base<int,std::allocator<int>>::~_Vector_base ((_Vector_base<int,std::allocator<int>> *)local_38); return uVar3; }
53,584
ma_tls_write
eloqsql/libmariadb/libmariadb/secure/openssl.c
ssize_t ma_tls_write(MARIADB_TLS *ctls, const uchar* buffer, size_t length) { int rc; MARIADB_PVIO *pvio= ctls->pvio; while ((rc= SSL_write((SSL *)ctls->ssl, (void *)buffer, (int)length)) <= 0) { int error= SSL_get_error((SSL *)ctls->ssl, rc); if (error != SSL_ERROR_WANT_WRITE) break; if (pvio->methods->wait_io_or_timeout(pvio, TRUE, pvio->mysql->options.write_timeout) < 1) break; } if (rc <= 0) { MYSQL *mysql= SSL_get_app_data(ctls->ssl); ma_tls_set_error(mysql); } return rc; }
O3
c
ma_tls_write: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r12 movq %rdi, %r15 movq 0x8(%rdi), %r13 movq 0x10(%r15), %rdi movq %r12, %rsi movl %ebx, %edx callq 0x13840 movl %eax, %r14d testl %eax, %eax jg 0x2b40f movq 0x10(%r15), %rdi movl %r14d, %esi callq 0x13050 cmpl $0x3, %eax jne 0x2b3fc movq 0x40(%r13), %rax movq 0x48(%r13), %rcx movl 0x398(%rax), %edx movq %r13, %rdi movl $0x1, %esi callq *0x30(%rcx) testl %eax, %eax jg 0x2b3b9 movq 0x10(%r15), %rdi xorl %esi, %esi callq 0x13160 movq %rax, %rdi callq 0x2b10c movslq %r14d, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_tls_write: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r12, rsi mov r15, rdi mov r13, [rdi+8] loc_2B3B9: mov rdi, [r15+10h] mov rsi, r12 mov edx, ebx call _SSL_write mov r14d, eax test eax, eax jg short loc_2B40F mov rdi, [r15+10h] mov esi, r14d call _SSL_get_error cmp eax, 3 jnz short loc_2B3FC mov rax, [r13+40h] mov rcx, [r13+48h] mov edx, [rax+398h] mov rdi, r13 mov esi, 1 call qword ptr [rcx+30h] test eax, eax jg short loc_2B3B9 loc_2B3FC: mov rdi, [r15+10h] xor esi, esi call _SSL_get_ex_data mov rdi, rax call ma_tls_set_error loc_2B40F: movsxd rax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_tls_write(long long a1, long long a2, unsigned int a3) { long long v4; // r13 int v5; // eax int v6; // r14d long long *v7; // rax v4 = *(_QWORD *)(a1 + 8); while ( 1 ) { v5 = SSL_write(*(_QWORD *)(a1 + 16), a2, a3); v6 = v5; if ( v5 > 0 ) break; if ( (unsigned int)SSL_get_error(*(_QWORD *)(a1 + 16), (unsigned int)v5) != 3 || (*(int ( **)(long long, long long, _QWORD))(*(_QWORD *)(v4 + 72) + 48LL))( v4, 1LL, *(unsigned int *)(*(_QWORD *)(v4 + 64) + 920LL)) <= 0 ) { v7 = (long long *)SSL_get_ex_data(*(_QWORD *)(a1 + 16), 0LL); ma_tls_set_error(v7); return v6; } } return v6; }
ma_tls_write: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R12,RSI MOV R15,RDI MOV R13,qword ptr [RDI + 0x8] LAB_0012b3b9: MOV RDI,qword ptr [R15 + 0x10] MOV RSI,R12 MOV EDX,EBX CALL 0x00113840 MOV R14D,EAX TEST EAX,EAX JG 0x0012b40f MOV RDI,qword ptr [R15 + 0x10] MOV ESI,R14D CALL 0x00113050 CMP EAX,0x3 JNZ 0x0012b3fc MOV RAX,qword ptr [R13 + 0x40] MOV RCX,qword ptr [R13 + 0x48] MOV EDX,dword ptr [RAX + 0x398] MOV RDI,R13 MOV ESI,0x1 CALL qword ptr [RCX + 0x30] TEST EAX,EAX JG 0x0012b3b9 LAB_0012b3fc: MOV RDI,qword ptr [R15 + 0x10] XOR ESI,ESI CALL 0x00113160 MOV RDI,RAX CALL 0x0012b10c LAB_0012b40f: MOVSXD RAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long ma_tls_write(long param_1,void *param_2,int param_3) { long lVar1; int ret_code; int iVar2; void *pvVar3; lVar1 = *(long *)(param_1 + 8); do { ret_code = SSL_write(*(SSL **)(param_1 + 0x10),param_2,param_3); if (0 < ret_code) goto LAB_0012b40f; iVar2 = SSL_get_error(*(SSL **)(param_1 + 0x10),ret_code); if (iVar2 != 3) break; iVar2 = (**(code **)(*(long *)(lVar1 + 0x48) + 0x30)) (lVar1,1,*(int4 *)(*(long *)(lVar1 + 0x40) + 0x398)); } while (0 < iVar2); pvVar3 = SSL_get_ex_data(*(SSL **)(param_1 + 0x10),0); ma_tls_set_error(pvVar3); LAB_0012b40f: return (long)ret_code; }
53,585
js_std_setenv
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_setenv(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *name, *value; name = JS_ToCString(ctx, argv[0]); if (!name) return JS_EXCEPTION; value = JS_ToCString(ctx, argv[1]); if (!value) { JS_FreeCString(ctx, name); return JS_EXCEPTION; } setenv(name, value, TRUE); JS_FreeCString(ctx, name); JS_FreeCString(ctx, value); return JS_UNDEFINED; }
O2
c
js_std_setenv: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %r8, %r15 movq %rdi, %rbx movq (%r8), %rsi movq 0x8(%r8), %rdx callq 0x11a6c testq %rax, %rax je 0x11f1c movq %rax, %r14 movq 0x10(%r15), %rsi movq 0x18(%r15), %rdx movq %rbx, %rdi callq 0x11a6c testq %rax, %rax je 0x11f22 movq %rax, %r12 pushq $0x1 popq %rdx movq %r14, %rdi movq %rax, %rsi callq 0xe1d0 movq %rbx, %rdi movq %r14, %rsi callq 0x1b057 pushq $0x3 popq %r15 movq %r12, %r14 jmp 0x11f26 pushq $0x6 popq %r15 jmp 0x11f31 pushq $0x6 popq %r15 movq %rbx, %rdi movq %r14, %rsi callq 0x1b057 xorl %eax, %eax movq %r15, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
js_std_setenv: push r15 push r14 push r12 push rbx push rax mov r15, r8 mov rbx, rdi mov rsi, [r8] mov rdx, [r8+8] call JS_ToCString test rax, rax jz short loc_11F1C mov r14, rax mov rsi, [r15+10h] mov rdx, [r15+18h] mov rdi, rbx call JS_ToCString test rax, rax jz short loc_11F22 mov r12, rax push 1 pop rdx mov rdi, r14 mov rsi, rax call _setenv mov rdi, rbx mov rsi, r14 call JS_FreeCString push 3 pop r15 mov r14, r12 jmp short loc_11F26 loc_11F1C: push 6 pop r15 jmp short loc_11F31 loc_11F22: push 6 pop r15 loc_11F26: mov rdi, rbx mov rsi, r14 call JS_FreeCString loc_11F31: xor eax, eax mov rdx, r15 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long js_std_setenv(long long a1, long long a2, long long a3, long long a4, long long *a5) { long long v6; // rax long long v7; // r14 long long v8; // rax long long v9; // r12 v6 = JS_ToCString(a1, *a5, a5[1]); if ( v6 ) { v7 = v6; v8 = JS_ToCString(a1, a5[2], a5[3]); if ( v8 ) { v9 = v8; setenv(v7, v8, 1LL); JS_FreeCString(a1, v7); v7 = v9; } JS_FreeCString(a1, v7); } return 0LL; }
js_std_setenv: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,R8 MOV RBX,RDI MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] CALL 0x00111a6c TEST RAX,RAX JZ 0x00111f1c MOV R14,RAX MOV RSI,qword ptr [R15 + 0x10] MOV RDX,qword ptr [R15 + 0x18] MOV RDI,RBX CALL 0x00111a6c TEST RAX,RAX JZ 0x00111f22 MOV R12,RAX PUSH 0x1 POP RDX MOV RDI,R14 MOV RSI,RAX CALL 0x0010e1d0 MOV RDI,RBX MOV RSI,R14 CALL 0x0011b057 PUSH 0x3 POP R15 MOV R14,R12 JMP 0x00111f26 LAB_00111f1c: PUSH 0x6 POP R15 JMP 0x00111f31 LAB_00111f22: PUSH 0x6 POP R15 LAB_00111f26: MOV RDI,RBX MOV RSI,R14 CALL 0x0011b057 LAB_00111f31: XOR EAX,EAX MOV RDX,R15 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int1 [16] js_std_setenv(int8 param_1) { int1 auVar1 [16]; char *__name; char *__value; int8 *in_R8; ulong uVar2; __name = (char *)JS_ToCString(param_1,*in_R8,in_R8[1]); if (__name == (char *)0x0) { uVar2 = 6; } else { __value = (char *)JS_ToCString(param_1,in_R8[2],in_R8[3]); if (__value == (char *)0x0) { uVar2 = 6; } else { setenv(__name,__value,1); JS_FreeCString(param_1,__name); uVar2 = 3; __name = __value; } JS_FreeCString(param_1,__name); } auVar1._8_8_ = 0; auVar1._0_8_ = uVar2; return auVar1 << 0x40; }
53,586
js_std_setenv
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_setenv(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { const char *name, *value; name = JS_ToCString(ctx, argv[0]); if (!name) return JS_EXCEPTION; value = JS_ToCString(ctx, argv[1]); if (!value) { JS_FreeCString(ctx, name); return JS_EXCEPTION; } setenv(name, value, TRUE); JS_FreeCString(ctx, name); JS_FreeCString(ctx, value); return JS_UNDEFINED; }
O3
c
js_std_setenv: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %r8, %r15 movq %rdi, %rbx movq (%r8), %rdx movq 0x8(%r8), %rcx xorl %esi, %esi xorl %r8d, %r8d callq 0x21353 testq %rax, %rax je 0x17b4f movq %rax, %r14 movq 0x10(%r15), %rdx movq 0x18(%r15), %rcx movq %rbx, %rdi xorl %esi, %esi xorl %r8d, %r8d callq 0x21353 testq %rax, %rax je 0x17b57 movq %rax, %r12 movq %r14, %rdi movq %rax, %rsi movl $0x1, %edx callq 0xe1c0 movq %rbx, %rdi movq %r14, %rsi callq 0x21629 movl $0x3, %r15d movq %r12, %r14 jmp 0x17b5d movl $0x6, %r15d jmp 0x17b68 movl $0x6, %r15d movq %rbx, %rdi movq %r14, %rsi callq 0x21629 xorl %eax, %eax movq %r15, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq
js_std_setenv: push r15 push r14 push r12 push rbx push rax mov r15, r8 mov rbx, rdi mov rdx, [r8] mov rcx, [r8+8] xor esi, esi xor r8d, r8d call JS_ToCStringLen2 test rax, rax jz short loc_17B4F mov r14, rax mov rdx, [r15+10h] mov rcx, [r15+18h] mov rdi, rbx xor esi, esi xor r8d, r8d call JS_ToCStringLen2 test rax, rax jz short loc_17B57 mov r12, rax mov rdi, r14 mov rsi, rax mov edx, 1 call _setenv mov rdi, rbx mov rsi, r14 call JS_FreeCString mov r15d, 3 mov r14, r12 jmp short loc_17B5D loc_17B4F: mov r15d, 6 jmp short loc_17B68 loc_17B57: mov r15d, 6 loc_17B5D: mov rdi, rbx mov rsi, r14 call JS_FreeCString loc_17B68: xor eax, eax mov rdx, r15 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
long long js_std_setenv(long long a1, long long a2, long long a3, long long a4, _QWORD *a5) { long long v6; // rax long long v7; // r14 long long v8; // rax long long v9; // r12 v6 = JS_ToCStringLen2(a1, 0LL, *a5, a5[1], 0LL); if ( v6 ) { v7 = v6; v8 = JS_ToCStringLen2(a1, 0LL, a5[2], a5[3], 0LL); if ( v8 ) { v9 = v8; setenv(v7, v8, 1LL); JS_FreeCString(a1, v7); v7 = v9; } JS_FreeCString(a1, v7); } return 0LL; }
js_std_setenv: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R15,R8 MOV RBX,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] XOR ESI,ESI XOR R8D,R8D CALL 0x00121353 TEST RAX,RAX JZ 0x00117b4f MOV R14,RAX MOV RDX,qword ptr [R15 + 0x10] MOV RCX,qword ptr [R15 + 0x18] MOV RDI,RBX XOR ESI,ESI XOR R8D,R8D CALL 0x00121353 TEST RAX,RAX JZ 0x00117b57 MOV R12,RAX MOV RDI,R14 MOV RSI,RAX MOV EDX,0x1 CALL 0x0010e1c0 MOV RDI,RBX MOV RSI,R14 CALL 0x00121629 MOV R15D,0x3 MOV R14,R12 JMP 0x00117b5d LAB_00117b4f: MOV R15D,0x6 JMP 0x00117b68 LAB_00117b57: MOV R15D,0x6 LAB_00117b5d: MOV RDI,RBX MOV RSI,R14 CALL 0x00121629 LAB_00117b68: XOR EAX,EAX MOV RDX,R15 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int1 [16] js_std_setenv(int8 param_1) { int1 auVar1 [16]; char *__name; char *__value; int8 *in_R8; ulong uVar2; __name = (char *)JS_ToCStringLen2(param_1,0,*in_R8,in_R8[1],0); if (__name == (char *)0x0) { uVar2 = 6; } else { __value = (char *)JS_ToCStringLen2(param_1,0,in_R8[2],in_R8[3],0); if (__value == (char *)0x0) { uVar2 = 6; } else { setenv(__name,__value,1); JS_FreeCString(param_1,__name); uVar2 = 3; __name = __value; } JS_FreeCString(param_1,__name); } auVar1._8_8_ = 0; auVar1._0_8_ = uVar2; return auVar1 << 0x40; }
53,587
my_hrtime
eloqsql/mysys/my_getsystime.c
my_hrtime_t my_hrtime() { my_hrtime_t hrtime; #if defined(_WIN32) ulonglong newtime; GetSystemTimePreciseAsFileTime((FILETIME*)&newtime); hrtime.val= (newtime - OFFSET_TO_EPOC)/10; #elif defined(HAVE_CLOCK_GETTIME) struct timespec tp; clock_gettime(CLOCK_REALTIME, &tp); hrtime.val= tp.tv_sec*1000000ULL+tp.tv_nsec/1000ULL; #else struct timeval t; /* The following loop is here because gettimeofday may fail */ while (gettimeofday(&t, NULL) != 0) {} hrtime.val= t.tv_sec*1000000ULL + t.tv_usec; #endif DBUG_EXECUTE_IF("system_time_plus_one_hour", hrtime.val += 3600*1000000ULL;); DBUG_EXECUTE_IF("system_time_minus_one_hour", hrtime.val -= 3600*1000000ULL;); return hrtime; }
O3
c
my_hrtime: pushq %rbp movq %rsp, %rbp pushq %rbx subq $0x18, %rsp leaq -0x18(%rbp), %rbx xorl %edi, %edi movq %rbx, %rsi callq 0x262e0 imulq $0xf4240, (%rbx), %rcx # imm = 0xF4240 movq 0x8(%rbx), %rax shrq $0x3, %rax movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF mulq %rdx shrq $0x4, %rdx addq %rdx, %rcx movq %rcx, %rax addq $0x18, %rsp popq %rbx popq %rbp retq
my_hrtime: push rbp mov rbp, rsp push rbx sub rsp, 18h lea rbx, [rbp+var_18] xor edi, edi mov rsi, rbx call _clock_gettime imul rcx, [rbx], 0F4240h mov rax, [rbx+8] shr rax, 3 mov rdx, 20C49BA5E353F7CFh mul rdx shr rdx, 4 add rcx, rdx mov rax, rcx add rsp, 18h pop rbx pop rbp retn
unsigned long long my_hrtime() { long long v1; // [rsp+8h] [rbp-18h] BYREF unsigned long long v2; // [rsp+10h] [rbp-10h] clock_gettime(0LL, &v1); return v2 / 0x3E8 + 1000000 * v1; }
my_hrtime: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0x18 LEA RBX,[RBP + -0x18] XOR EDI,EDI MOV RSI,RBX CALL 0x001262e0 IMUL RCX,qword ptr [RBX],0xf4240 MOV RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 MOV RDX,0x20c49ba5e353f7cf MUL RDX SHR RDX,0x4 ADD RCX,RDX MOV RAX,RCX ADD RSP,0x18 POP RBX POP RBP RET
long my_hrtime(void) { timespec local_20; clock_gettime(0,&local_20); return local_20.tv_sec * 1000000 + (ulong)local_20.tv_nsec / 1000; }
53,588
js_std_tmpfile
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_tmpfile(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { FILE *f; f = tmpfile(); if (argc >= 1) js_set_error_object(ctx, argv[0], f ? 0 : errno); if (!f) return JS_NULL; return js_new_std_file(ctx, f, FALSE); }
O1
c
js_std_tmpfile: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %r8, %r15 movl %ecx, %ebp movq %rdi, %rbx callq 0xe500 movq %rax, %r14 testl %ebp, %ebp jle 0x17c28 testq %r14, %r14 je 0x17c02 xorl %r8d, %r8d jmp 0x17c0a callq 0xe0b0 movl (%rax), %r8d movq 0x8(%r15), %rdx cmpl $0x3, %edx je 0x17c28 movq (%r15), %rsi leaq 0x84106(%rip), %rcx # 0x9bd23 movq %rbx, %rdi xorl %r9d, %r9d callq 0x25428 testq %r14, %r14 je 0x17c3c movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x15d77 jmp 0x17c43 movl $0x2, %edx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
js_std_tmpfile: push rbp push r15 push r14 push rbx push rax mov r15, r8 mov ebp, ecx mov rbx, rdi call _tmpfile mov r14, rax test ebp, ebp jle short loc_17C28 test r14, r14 jz short loc_17C02 xor r8d, r8d jmp short loc_17C0A loc_17C02: call ___errno_location mov r8d, [rax] loc_17C0A: mov rdx, [r15+8] cmp edx, 3 jz short loc_17C28 mov rsi, [r15] lea rcx, aErrno; "errno" mov rdi, rbx xor r9d, r9d call JS_SetPropertyStr loc_17C28: test r14, r14 jz short loc_17C3C mov rdi, rbx mov rsi, r14 xor edx, edx call js_new_std_file jmp short loc_17C43 loc_17C3C: mov edx, 2 xor eax, eax loc_17C43: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
unsigned long long js_std_tmpfile(long long a1, long long a2, long long a3, int a4, _QWORD *a5) { long long v7; // rax long long v8; // r14 long long v9; // r8 long long v10; // rdx v7 = tmpfile(a1); v8 = v7; if ( a4 > 0 ) { v9 = v7 ? 0LL : *(unsigned int *)__errno_location(a1); v10 = a5[1]; if ( (_DWORD)v10 != 3 ) JS_SetPropertyStr(a1, *a5, v10, "errno", v9, 0LL); } if ( v8 ) return js_new_std_file(a1, v8, 0); else return 0LL; }
53,589
js_std_tmpfile
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_tmpfile(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { FILE *f; f = tmpfile(); if (argc >= 1) js_set_error_object(ctx, argv[0], f ? 0 : errno); if (!f) return JS_NULL; return js_new_std_file(ctx, f, FALSE); }
O2
c
js_std_tmpfile: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %r8, %r15 movl %ecx, %ebp movq %rdi, %rbx callq 0xe510 movq %rax, %r14 testl %ebp, %ebp jle 0x128fd xorl %ecx, %ecx testq %r14, %r14 jne 0x128ee callq 0xe0b0 movl (%rax), %ecx movq (%r15), %rsi movq 0x8(%r15), %rdx movq %rbx, %rdi callq 0x12b1d testq %r14, %r14 je 0x12911 movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x10c2a jmp 0x12916 pushq $0x2 popq %rdx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
js_std_tmpfile: push rbp push r15 push r14 push rbx push rax mov r15, r8 mov ebp, ecx mov rbx, rdi call _tmpfile mov r14, rax test ebp, ebp jle short loc_128FD xor ecx, ecx test r14, r14 jnz short loc_128EE call ___errno_location mov ecx, [rax] loc_128EE: mov rsi, [r15] mov rdx, [r15+8] mov rdi, rbx call js_set_error_object loc_128FD: test r14, r14 jz short loc_12911 mov rdi, rbx mov rsi, r14 xor edx, edx call js_new_std_file jmp short loc_12916 loc_12911: push 2 pop rdx xor eax, eax loc_12916: add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
unsigned long long js_std_tmpfile(long long a1, long long a2, long long a3, int a4, _QWORD *a5) { long long v7; // rax long long v8; // r14 long long v9; // rcx v7 = tmpfile(a1); v8 = v7; if ( a4 > 0 ) { v9 = 0LL; if ( !v7 ) v9 = *(unsigned int *)__errno_location(a1); js_set_error_object(a1, *a5, a5[1], v9); } if ( v8 ) return js_new_std_file(a1, v8, 0); else return 0LL; }
js_std_tmpfile: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R15,R8 MOV EBP,ECX MOV RBX,RDI CALL 0x0010e510 MOV R14,RAX TEST EBP,EBP JLE 0x001128fd XOR ECX,ECX TEST R14,R14 JNZ 0x001128ee CALL 0x0010e0b0 MOV ECX,dword ptr [RAX] LAB_001128ee: MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] MOV RDI,RBX CALL 0x00112b1d LAB_001128fd: TEST R14,R14 JZ 0x00112911 MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x00110c2a JMP 0x00112916 LAB_00112911: PUSH 0x2 POP RDX XOR EAX,EAX LAB_00112916: ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 js_std_tmpfile(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { FILE *pFVar1; int *piVar2; int8 uVar3; int iVar4; pFVar1 = tmpfile(); if (0 < param_4) { iVar4 = 0; if (pFVar1 == (FILE *)0x0) { piVar2 = __errno_location(); iVar4 = *piVar2; } js_set_error_object(param_1,*param_5,param_5[1],iVar4); } if (pFVar1 == (FILE *)0x0) { uVar3 = 0; } else { uVar3 = js_new_std_file(param_1,pFVar1,0); } return uVar3; }
53,590
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
monkey531[P]llama/common/common.cpp
std::vector<llama_token> common_tokenize( const struct llama_vocab * vocab, const std::string & text, bool add_special, bool parse_special) { // upper limit for the number of tokens int n_tokens = text.length() + 2 * add_special; std::vector<llama_token> result(n_tokens); n_tokens = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special); if (n_tokens < 0) { result.resize(-n_tokens); int check = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special); GGML_ASSERT(check == -n_tokens); } else { result.resize(n_tokens); } return result; }
O1
cpp
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx leal (%r14,%r14), %eax addl 0x8(%rdx), %eax movslq %eax, %rsi leaq 0x17(%rsp), %rdx callq 0x79d54 movq (%r12), %rsi movl 0x8(%r12), %edx movq (%rbx), %rcx movq 0x8(%rbx), %r8 subq %rcx, %r8 shrq $0x2, %r8 movl %ebp, (%rsp) movq %r15, %rdi movl %r14d, %r9d callq 0x1c040 movl %eax, %r13d testl %eax, %eax js 0x763c8 movl %r13d, %esi movq %rbx, %rdi callq 0x79dde jmp 0x76405 negl %r13d movq %rbx, %rdi movq %r13, %rsi callq 0x79dde movq (%r12), %rsi movl 0x8(%r12), %edx movq (%rbx), %rcx movq 0x8(%rbx), %r8 subq %rcx, %r8 shrq $0x2, %r8 movzbl %bpl, %eax movl %eax, (%rsp) movzbl %r14b, %r9d movq %r15, %rdi callq 0x1c040 cmpl %r13d, %eax jne 0x76417 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x7bf93(%rip), %rdi # 0xf23b1 leaq 0x7916e(%rip), %rdx # 0xef593 leaq 0x7c605(%rip), %rcx # 0xf2a31 movl $0x6b8, %esi # imm = 0x6B8 xorl %eax, %eax callq 0x1beb0 jmp 0x7643a movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0x76451 movq 0x10(%rbx), %rsi subq %rdi, %rsi callq 0x1b8f0 movq %r14, %rdi callq 0x1bfb0
_Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebp, r8d mov r14d, ecx mov r12, rdx mov r15, rsi mov rbx, rdi lea eax, [r14+r14] add eax, [rdx+8] movsxd rsi, eax lea rdx, [rsp+48h+var_31] call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&) mov rsi, [r12] mov edx, [r12+8] mov rcx, [rbx] mov r8, [rbx+8] sub r8, rcx shr r8, 2 mov [rsp+48h+var_48], ebp mov rdi, r15 mov r9d, r14d call _llama_tokenize mov r13d, eax test eax, eax js short loc_763C8 mov esi, r13d mov rdi, rbx call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) jmp short loc_76405 loc_763C8: neg r13d mov rdi, rbx mov rsi, r13 call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov rsi, [r12] mov edx, [r12+8] mov rcx, [rbx] mov r8, [rbx+8] sub r8, rcx shr r8, 2 movzx eax, bpl mov [rsp+48h+var_48], eax movzx r9d, r14b mov rdi, r15 call _llama_tokenize cmp eax, r13d jnz short loc_76417 loc_76405: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_76417: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCheckNTokens; "check == -n_tokens" mov esi, 6B8h xor eax, eax call _ggml_abort jmp short $+2 loc_7643A: mov r14, rax mov rdi, [rbx]; void * test rdi, rdi jz short loc_76451 mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_76451: mov rdi, r14 call __Unwind_Resume
_QWORD * common_tokenize(_QWORD *a1, long long a2, _QWORD *a3, unsigned int a4, int a5) { int v8; // eax int v9; // r13d long long v11; // r14 _BYTE v12[49]; // [rsp+17h] [rbp-31h] BYREF std::vector<int>::vector(a1, (int)(*((_DWORD *)a3 + 2) + 2 * a4), v12); v8 = llama_tokenize(a2, *a3, *((unsigned int *)a3 + 2), *a1, (a1[1] - *a1) >> 2, a4, a5); if ( v8 < 0 ) { v9 = -v8; std::vector<int>::resize(a1, (unsigned int)-v8); if ( (unsigned int)llama_tokenize( a2, *a3, *((unsigned int *)a3 + 2), *a1, (a1[1] - *a1) >> 2, (unsigned __int8)a4, (unsigned __int8)a5) != v9 ) { v11 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 1720LL, "GGML_ASSERT(%s) failed", "check == -n_tokens"); if ( *a1 ) operator delete((void *)*a1, a1[2] - *a1); _Unwind_Resume(v11); } } else { std::vector<int>::resize(a1, (unsigned int)v8); } return a1; }
common_tokenize: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBP,R8D MOV R14D,ECX MOV R12,RDX MOV R15,RSI MOV RBX,RDI LEA EAX,[R14 + R14*0x1] ADD EAX,dword ptr [RDX + 0x8] MOVSXD RSI,EAX LEA RDX,[RSP + 0x17] CALL 0x00179d54 MOV RSI,qword ptr [R12] MOV EDX,dword ptr [R12 + 0x8] MOV RCX,qword ptr [RBX] MOV R8,qword ptr [RBX + 0x8] SUB R8,RCX SHR R8,0x2 LAB_001763a6: MOV dword ptr [RSP],EBP MOV RDI,R15 MOV R9D,R14D CALL 0x0011c040 MOV R13D,EAX TEST EAX,EAX JS 0x001763c8 MOV ESI,R13D MOV RDI,RBX CALL 0x00179dde JMP 0x00176405 LAB_001763c8: NEG R13D MOV RDI,RBX MOV RSI,R13 CALL 0x00179dde MOV RSI,qword ptr [R12] MOV EDX,dword ptr [R12 + 0x8] MOV RCX,qword ptr [RBX] MOV R8,qword ptr [RBX + 0x8] SUB R8,RCX SHR R8,0x2 LAB_001763ed: MOVZX EAX,BPL MOV dword ptr [RSP],EAX MOVZX R9D,R14B MOV RDI,R15 CALL 0x0011c040 CMP EAX,R13D JNZ 0x00176417 LAB_00176405: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00176417: LEA RDI,[0x1f23b1] LEA RDX,[0x1ef593] LEA RCX,[0x1f2a31] MOV ESI,0x6b8 XOR EAX,EAX CALL 0x0011beb0
/* common_tokenize(llama_vocab const*, std::__cxx11::string const&, bool, bool) */ llama_vocab * common_tokenize(llama_vocab *param_1,string *param_2,bool param_3,bool param_4) { uint uVar1; uint uVar2; int7 in_register_00000009; int7 in_register_00000011; int8 *puVar3; uint in_R8D; puVar3 = (int8 *)CONCAT71(in_register_00000011,param_3); std::vector<int,std::allocator<int>>::vector ((ulong)param_1, (allocator *) (long)((int)CONCAT71(in_register_00000009,param_4) * 2 + *(int *)(puVar3 + 1))); /* try { // try from 001763a6 to 001763d5 has its CatchHandler @ 0017643a */ uVar1 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1, (ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2, CONCAT71(in_register_00000009,param_4) & 0xffffffff,in_R8D); if ((int)uVar1 < 0) { std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)param_1,(ulong)-uVar1); /* try { // try from 001763ed to 00176437 has its CatchHandler @ 00176438 */ uVar2 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1, (ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,param_4, in_R8D & 0xff); if (uVar2 != -uVar1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6b8 ,"GGML_ASSERT(%s) failed","check == -n_tokens"); } } else { std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)param_1,(ulong)uVar1); } return param_1; }
53,591
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool)
monkey531[P]llama/common/common.cpp
std::vector<llama_token> common_tokenize( const struct llama_vocab * vocab, const std::string & text, bool add_special, bool parse_special) { // upper limit for the number of tokens int n_tokens = text.length() + 2 * add_special; std::vector<llama_token> result(n_tokens); n_tokens = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special); if (n_tokens < 0) { result.resize(-n_tokens); int check = llama_tokenize(vocab, text.data(), text.length(), result.data(), result.size(), add_special, parse_special); GGML_ASSERT(check == -n_tokens); } else { result.resize(n_tokens); } return result; }
O3
cpp
common_tokenize(llama_vocab const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdx, %r12 movq %rsi, %r15 movq %rdi, %rbx leal (%r14,%r14), %eax addl 0x8(%rdx), %eax movslq %eax, %rsi leaq 0x17(%rsp), %rdx callq 0x792aa movq (%r12), %rsi movl 0x8(%r12), %edx movq (%rbx), %rcx movq 0x8(%rbx), %r8 subq %rcx, %r8 shrq $0x2, %r8 movl %ebp, (%rsp) movq %r15, %rdi movl %r14d, %r9d callq 0x1b040 movl %eax, %r13d testl %eax, %eax js 0x75a9c movl %r13d, %esi movq %rbx, %rdi callq 0x79336 jmp 0x75ad9 negl %r13d movq %rbx, %rdi movq %r13, %rsi callq 0x79336 movq (%r12), %rsi movl 0x8(%r12), %edx movq (%rbx), %rcx movq 0x8(%rbx), %r8 subq %rcx, %r8 shrq $0x2, %r8 movzbl %bpl, %eax movl %eax, (%rsp) movzbl %r14b, %r9d movq %r15, %rdi callq 0x1b040 cmpl %r13d, %eax jne 0x75aeb movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x798af(%rip), %rdi # 0xef3a1 leaq 0x76a9a(%rip), %rdx # 0xec593 leaq 0x79f21(%rip), %rcx # 0xefa21 movl $0x6b8, %esi # imm = 0x6B8 xorl %eax, %eax callq 0x1aeb0 jmp 0x75b0e movq %rax, %r14 movq (%rbx), %rdi testq %rdi, %rdi je 0x75b25 movq 0x10(%rbx), %rsi subq %rdi, %rsi callq 0x1a8f0 movq %r14, %rdi callq 0x1afb0
_Z15common_tokenizePK11llama_vocabRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov ebp, r8d mov r14d, ecx mov r12, rdx mov r15, rsi mov rbx, rdi lea eax, [r14+r14] add eax, [rdx+8] movsxd rsi, eax lea rdx, [rsp+48h+var_31] call _ZNSt6vectorIiSaIiEEC2EmRKS0_; std::vector<int>::vector(ulong,std::allocator<int> const&) mov rsi, [r12] mov edx, [r12+8] mov rcx, [rbx] mov r8, [rbx+8] sub r8, rcx shr r8, 2 mov [rsp+48h+var_48], ebp mov rdi, r15 mov r9d, r14d call _llama_tokenize mov r13d, eax test eax, eax js short loc_75A9C mov esi, r13d mov rdi, rbx call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) jmp short loc_75AD9 loc_75A9C: neg r13d mov rdi, rbx mov rsi, r13 call _ZNSt6vectorIiSaIiEE6resizeEm; std::vector<int>::resize(ulong) mov rsi, [r12] mov edx, [r12+8] mov rcx, [rbx] mov r8, [rbx+8] sub r8, rcx shr r8, 2 movzx eax, bpl mov [rsp+48h+var_48], eax movzx r9d, r14b mov rdi, r15 call _llama_tokenize cmp eax, r13d jnz short loc_75AEB loc_75AD9: mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_75AEB: lea rdi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCheckNTokens; "check == -n_tokens" mov esi, 6B8h xor eax, eax call _ggml_abort jmp short $+2 loc_75B0E: mov r14, rax mov rdi, [rbx]; void * test rdi, rdi jz short loc_75B25 mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_75B25: mov rdi, r14 call __Unwind_Resume
_QWORD * common_tokenize(_QWORD *a1, long long a2, _QWORD *a3, unsigned int a4, int a5) { int v8; // eax int v9; // r13d long long v11; // r14 _BYTE v12[49]; // [rsp+17h] [rbp-31h] BYREF std::vector<int>::vector(a1, (int)(*((_DWORD *)a3 + 2) + 2 * a4), v12); v8 = llama_tokenize(a2, *a3, *((unsigned int *)a3 + 2), *a1, (a1[1] - *a1) >> 2, a4, a5); if ( v8 < 0 ) { v9 = -v8; std::vector<int>::resize(a1, (unsigned int)-v8); if ( (unsigned int)llama_tokenize( a2, *a3, *((unsigned int *)a3 + 2), *a1, (a1[1] - *a1) >> 2, (unsigned __int8)a4, (unsigned __int8)a5) != v9 ) { v11 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp", 1720LL, "GGML_ASSERT(%s) failed", "check == -n_tokens"); if ( *a1 ) operator delete((void *)*a1, a1[2] - *a1); _Unwind_Resume(v11); } } else { std::vector<int>::resize(a1, (unsigned int)v8); } return a1; }
common_tokenize: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV EBP,R8D MOV R14D,ECX MOV R12,RDX MOV R15,RSI MOV RBX,RDI LEA EAX,[R14 + R14*0x1] ADD EAX,dword ptr [RDX + 0x8] MOVSXD RSI,EAX LEA RDX,[RSP + 0x17] CALL 0x001792aa MOV RSI,qword ptr [R12] MOV EDX,dword ptr [R12 + 0x8] MOV RCX,qword ptr [RBX] MOV R8,qword ptr [RBX + 0x8] SUB R8,RCX SHR R8,0x2 LAB_00175a7a: MOV dword ptr [RSP],EBP MOV RDI,R15 MOV R9D,R14D CALL 0x0011b040 MOV R13D,EAX TEST EAX,EAX JS 0x00175a9c MOV ESI,R13D MOV RDI,RBX CALL 0x00179336 JMP 0x00175ad9 LAB_00175a9c: NEG R13D MOV RDI,RBX MOV RSI,R13 CALL 0x00179336 MOV RSI,qword ptr [R12] MOV EDX,dword ptr [R12 + 0x8] MOV RCX,qword ptr [RBX] MOV R8,qword ptr [RBX + 0x8] SUB R8,RCX SHR R8,0x2 LAB_00175ac1: MOVZX EAX,BPL MOV dword ptr [RSP],EAX MOVZX R9D,R14B MOV RDI,R15 CALL 0x0011b040 CMP EAX,R13D JNZ 0x00175aeb LAB_00175ad9: MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00175aeb: LEA RDI,[0x1ef3a1] LEA RDX,[0x1ec593] LEA RCX,[0x1efa21] MOV ESI,0x6b8 XOR EAX,EAX CALL 0x0011aeb0
/* common_tokenize(llama_vocab const*, std::__cxx11::string const&, bool, bool) */ llama_vocab * common_tokenize(llama_vocab *param_1,string *param_2,bool param_3,bool param_4) { uint uVar1; uint uVar2; int7 in_register_00000009; int7 in_register_00000011; int8 *puVar3; uint in_R8D; puVar3 = (int8 *)CONCAT71(in_register_00000011,param_3); std::vector<int,std::allocator<int>>::vector ((ulong)param_1, (allocator *) (long)((int)CONCAT71(in_register_00000009,param_4) * 2 + *(int *)(puVar3 + 1))); /* try { // try from 00175a7a to 00175aa9 has its CatchHandler @ 00175b0e */ uVar1 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1, (ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2, CONCAT71(in_register_00000009,param_4) & 0xffffffff,in_R8D); if ((int)uVar1 < 0) { std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)param_1,(ulong)-uVar1); /* try { // try from 00175ac1 to 00175b0b has its CatchHandler @ 00175b0c */ uVar2 = llama_tokenize(param_2,*puVar3,*(int4 *)(puVar3 + 1),*(long *)param_1, (ulong)(*(long *)(param_1 + 8) - *(long *)param_1) >> 2,param_4, in_R8D & 0xff); if (uVar2 != -uVar1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/common.cpp",0x6b8 ,"GGML_ASSERT(%s) failed","check == -n_tokens"); } } else { std::vector<int,std::allocator<int>>::resize ((vector<int,std::allocator<int>> *)param_1,(ulong)uVar1); } return param_1; }
53,592
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 0x662d0 movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rdi addq $0x5, %rdi callq 0x662d0 movq %rax, -0x40(%rbp) jmp 0x6678d movq -0x38(%rbp), %rax cmpq -0x40(%rbp), %rax ja 0x667c5 movq -0x38(%rbp), %rax movq -0x28(%rbp), %rcx xorl %edx, %edx divq 0x138(%rcx) cmpq $0x0, %rdx jne 0x667c5 movq -0x40(%rbp), %rax movq -0x28(%rbp), %rcx xorl %edx, %edx divq 0x138(%rcx) cmpq $0x0, %rdx je 0x667ce movb $0x1, -0x29(%rbp) jmp 0x6689a 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 0x66822 jmp 0x6681e jmp 0x66820 jmp 0x66822 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 0x2a2a0 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 0x668b0 movb %al, -0x29(%rbp) cmpb $0x0, %al jne 0x66898 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 0x6689a jmp 0x6689c 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_1 mov [rbp+var_38], rax mov rdi, [rbp+var_18] add rdi, 5 call uint5korr_1 mov [rbp+var_40], rax jmp short $+2 loc_6678D: mov rax, [rbp+var_38] cmp rax, [rbp+var_40] ja short loc_667C5 mov rax, [rbp+var_38] mov rcx, [rbp+var_28] xor edx, edx div qword ptr [rcx+138h] cmp rdx, 0 jnz short loc_667C5 mov rax, [rbp+var_40] mov rcx, [rbp+var_28] xor edx, edx div qword ptr [rcx+138h] cmp rdx, 0 jz short loc_667CE loc_667C5: mov [rbp+var_29], 1 jmp loc_6689A loc_667CE: 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_66822 jmp short $+2 loc_6681E: jmp short $+2 loc_66820: jmp short $+2 loc_66822: 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_66898 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_66898: jmp short $+2 loc_6689A: jmp short $+2 loc_6689C: 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_1(a3); v4 = uint5korr_1((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 0x001662d0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x18] ADD RDI,0x5 CALL 0x001662d0 MOV qword ptr [RBP + -0x40],RAX JMP 0x0016678d LAB_0016678d: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x40] JA 0x001667c5 MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x28] XOR EDX,EDX DIV qword ptr [RCX + 0x138] CMP RDX,0x0 JNZ 0x001667c5 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x28] XOR EDX,EDX DIV qword ptr [RCX + 0x138] CMP RDX,0x0 JZ 0x001667ce LAB_001667c5: MOV byte ptr [RBP + -0x29],0x1 JMP 0x0016689a LAB_001667ce: 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 0x00166822 JMP 0x0016681e LAB_0016681e: JMP 0x00166820 LAB_00166820: JMP 0x00166822 LAB_00166822: 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 0x0012a2a0 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 0x001668b0 MOV byte ptr [RBP + -0x29],AL CMP AL,0x0 JNZ 0x00166898 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_00166898: JMP 0x0016689a LAB_0016689a: JMP 0x0016689c LAB_0016689c: 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; }
53,593
my_mb_wc_filename
eloqsql/strings/ctype-utf8.c
static int my_mb_wc_filename(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e) { int byte1, byte2; if (s >= e) return MY_CS_TOOSMALL; if (*s < 128 && filename_safe_char[*s]) { *pwc= *s; return 1; } if (*s != MY_FILENAME_ESCAPE) return MY_CS_ILSEQ; if (s + 3 > e) return MY_CS_TOOSMALL3; byte1= s[1]; if (byte1 == 0) return MY_CS_ILSEQ; /* avoid possible out-of-bounds read */ byte2= s[2]; if (byte1 >= 0x30 && byte1 <= 0x7F && byte2 >= 0x30 && byte2 <= 0x7F) { int code= (byte1 - 0x30) * 80 + byte2 - 0x30; if (code < 5994 && touni[code]) { *pwc= touni[code]; return 3; } if (byte1 == '@' && byte2 == '@') { *pwc= 0; return 3; } } if (s + 4 > e) return MY_CS_TOOSMALL4; if ((byte1= hexlo(byte1)) >= 0 && (byte2= hexlo(byte2)) >= 0) { int byte3= hexlo(s[3]); int byte4= hexlo(s[3] ? s[4] : 0); if (byte3 >=0 && byte4 >=0) { *pwc= (byte1 << 12) + (byte2 << 8) + (byte3 << 4) + byte4; return 5; } } return MY_CS_ILSEQ; }
O3
c
my_mb_wc_filename: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x59fc2 movsbq (%rdx), %r8 testq %r8, %r8 js 0x59fc0 leaq 0x2828e6(%rip), %rdi # 0x2dc7b0 movl $0x1, %eax cmpb $0x0, (%r8,%rdi) je 0x59ede movq %r8, (%rsi) jmp 0x59fc2 cmpb $0x40, %r8b jne 0x59fc0 leaq 0x3(%rdx), %rdi movl $0xffffff99, %eax # imm = 0xFFFFFF99 cmpq %rcx, %rdi ja 0x59fc2 movzbl 0x1(%rdx), %r10d testl %r10d, %r10d je 0x59fc0 movb 0x2(%rdx), %al movzbl %al, %r9d cmpb $0x30, %r10b setge %al cmpb $0x30, %r9b setge %r8b andb %al, %r8b cmpb $0x1, %r8b jne 0x59f79 leal (%r10,%r10,4), %eax shll $0x4, %eax addl %r9d, %eax addl $0xfffff100, %eax # imm = 0xFFFFF100 cmpl $0x1799, %eax # imm = 0x1799 jg 0x59f5b addl $-0x30, %eax leaq 0x2828e9(%rip), %r8 # 0x2dc830 movzwl (%r8,%rax,2), %r8d testq %r8, %r8 je 0x59f5b movl $0x3, %eax jmp 0x59ed6 movl %r10d, %eax xorb $0x40, %al movl %r9d, %r8d xorb $0x40, %r8b orb %al, %r8b jne 0x59f79 movl $0x3, %eax xorl %r8d, %r8d jmp 0x59ed6 addq $0x4, %rdx movl $0xffffff98, %eax # imm = 0xFFFFFF98 cmpq %rcx, %rdx ja 0x59fc2 movl %r10d, %eax leaq 0x28577f(%rip), %r10 # 0x2df710 movzbl (%rax,%r10), %ecx testb %cl, %cl js 0x59fc0 movl %r9d, %eax movzbl (%rax,%r10), %r9d movl $0x0, %eax testb %r9b, %r9b js 0x59fc2 movzbl (%rdi), %edi xorl %eax, %eax movzbl (%rdi,%r10), %r8d testq %rdi, %rdi je 0x59fc4 movzbl (%rdx), %edx jmp 0x59fc6 xorl %eax, %eax popq %rbp retq xorl %edx, %edx testb %r8b, %r8b js 0x59fc2 movb (%rdx,%r10), %dl testb %dl, %dl js 0x59fc2 movzbl %dl, %eax shll $0xc, %ecx shll $0x8, %r9d shll $0x4, %r8d addq %rcx, %r8 addq %r9, %r8 addq %rax, %r8 movl $0x5, %eax jmp 0x59ed6
my_mb_wc_filename: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb loc_59FC2 movsx r8, byte ptr [rdx] test r8, r8 js loc_59FC0 lea rdi, filename_safe_char mov eax, 1 cmp byte ptr [r8+rdi], 0 jz short loc_59EDE loc_59ED6: mov [rsi], r8 jmp loc_59FC2 loc_59EDE: cmp r8b, 40h ; '@' jnz loc_59FC0 lea rdi, [rdx+3] mov eax, 0FFFFFF99h cmp rdi, rcx ja loc_59FC2 movzx r10d, byte ptr [rdx+1] test r10d, r10d jz loc_59FC0 mov al, [rdx+2] movzx r9d, al cmp r10b, 30h ; '0' setnl al cmp r9b, 30h ; '0' setnl r8b and r8b, al cmp r8b, 1 jnz short loc_59F79 lea eax, [r10+r10*4] shl eax, 4 add eax, r9d add eax, 0FFFFF100h cmp eax, 1799h jg short loc_59F5B add eax, 0FFFFFFD0h lea r8, touni movzx r8d, word ptr [r8+rax*2] test r8, r8 jz short loc_59F5B mov eax, 3 jmp loc_59ED6 loc_59F5B: mov eax, r10d xor al, 40h mov r8d, r9d xor r8b, 40h or r8b, al jnz short loc_59F79 mov eax, 3 xor r8d, r8d jmp loc_59ED6 loc_59F79: add rdx, 4 mov eax, 0FFFFFF98h cmp rdx, rcx ja short loc_59FC2 mov eax, r10d lea r10, hexlo_hex_lo_digit movzx ecx, byte ptr [rax+r10] test cl, cl js short loc_59FC0 mov eax, r9d movzx r9d, byte ptr [rax+r10] mov eax, 0 test r9b, r9b js short loc_59FC2 movzx edi, byte ptr [rdi] xor eax, eax movzx r8d, byte ptr [rdi+r10] test rdi, rdi jz short loc_59FC4 movzx edx, byte ptr [rdx] jmp short loc_59FC6 loc_59FC0: xor eax, eax loc_59FC2: pop rbp retn loc_59FC4: xor edx, edx loc_59FC6: test r8b, r8b js short loc_59FC2 mov dl, [rdx+r10] test dl, dl js short loc_59FC2 movzx eax, dl shl ecx, 0Ch shl r9d, 8 shl r8d, 4 add r8, rcx add r8, r9 add r8, rax mov eax, 5 jmp loc_59ED6
long long my_mb_wc_filename(long long a1, signed long long *a2, char *a3, unsigned long long a4) { long long result; // rax signed long long v5; // r8 unsigned __int8 *v6; // rdi int v7; // r10d int v8; // r9d long long v9; // rax unsigned __int8 *v10; // rdx int v11; // ecx int v12; // r9d long long v13; // rdi int v14; // r8d long long v15; // rdx char v16; // dl result = 4294967195LL; if ( (unsigned long long)a3 >= a4 ) return result; v5 = *a3; if ( v5 < 0 ) return 0LL; result = 1LL; if ( filename_safe_char[v5] ) { LABEL_4: *a2 = v5; return result; } if ( (_BYTE)v5 != 64 ) return 0LL; v6 = (unsigned __int8 *)(a3 + 3); result = 4294967193LL; if ( (unsigned long long)(a3 + 3) > a4 ) return result; v7 = (unsigned __int8)a3[1]; if ( !a3[1] ) return 0LL; v8 = (unsigned __int8)a3[2]; if ( (char)v7 >= 48 && (char)v8 >= 48 ) { if ( v8 + 80 * v7 - 3840 <= 6041 ) { v9 = (unsigned int)(v8 + 80 * v7 - 3888); v5 = touni[v9]; if ( touni[v9] ) { result = 3LL; goto LABEL_4; } } if ( !((unsigned __int8)v7 ^ 0x40 | (unsigned __int8)v8 ^ 0x40) ) { result = 3LL; v5 = 0LL; goto LABEL_4; } } v10 = (unsigned __int8 *)(a3 + 4); result = 4294967192LL; if ( (unsigned long long)v10 <= a4 ) { v11 = hexlo_hex_lo_digit[v7]; if ( (v11 & 0x80u) == 0 ) { v12 = hexlo_hex_lo_digit[v8]; result = 0LL; if ( (v12 & 0x80u) == 0 ) { v13 = *v6; result = 0LL; v14 = hexlo_hex_lo_digit[v13]; v15 = v13 ? *v10 : 0LL; if ( (v14 & 0x80u) == 0 ) { v16 = hexlo_hex_lo_digit[v15]; if ( v16 >= 0 ) { v5 = (unsigned __int8)v16 + (unsigned int)(v12 << 8) + (unsigned int)(v11 << 12) + (unsigned long long)(unsigned int)(16 * v14); result = 5LL; goto LABEL_4; } } } return result; } return 0LL; } return result; }
my_mb_wc_filename: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x00159fc2 MOVSX R8,byte ptr [RDX] TEST R8,R8 JS 0x00159fc0 LEA RDI,[0x3dc7b0] MOV EAX,0x1 CMP byte ptr [R8 + RDI*0x1],0x0 JZ 0x00159ede LAB_00159ed6: MOV qword ptr [RSI],R8 JMP 0x00159fc2 LAB_00159ede: CMP R8B,0x40 JNZ 0x00159fc0 LEA RDI,[RDX + 0x3] MOV EAX,0xffffff99 CMP RDI,RCX JA 0x00159fc2 MOVZX R10D,byte ptr [RDX + 0x1] TEST R10D,R10D JZ 0x00159fc0 MOV AL,byte ptr [RDX + 0x2] MOVZX R9D,AL CMP R10B,0x30 SETGE AL CMP R9B,0x30 SETGE R8B AND R8B,AL CMP R8B,0x1 JNZ 0x00159f79 LEA EAX,[R10 + R10*0x4] SHL EAX,0x4 ADD EAX,R9D ADD EAX,0xfffff100 CMP EAX,0x1799 JG 0x00159f5b ADD EAX,-0x30 LEA R8,[0x3dc830] MOVZX R8D,word ptr [R8 + RAX*0x2] TEST R8,R8 JZ 0x00159f5b MOV EAX,0x3 JMP 0x00159ed6 LAB_00159f5b: MOV EAX,R10D XOR AL,0x40 MOV R8D,R9D XOR R8B,0x40 OR R8B,AL JNZ 0x00159f79 MOV EAX,0x3 XOR R8D,R8D JMP 0x00159ed6 LAB_00159f79: ADD RDX,0x4 MOV EAX,0xffffff98 CMP RDX,RCX JA 0x00159fc2 MOV EAX,R10D LEA R10,[0x3df710] MOVZX ECX,byte ptr [RAX + R10*0x1] TEST CL,CL JS 0x00159fc0 MOV EAX,R9D MOVZX R9D,byte ptr [RAX + R10*0x1] MOV EAX,0x0 TEST R9B,R9B JS 0x00159fc2 MOVZX EDI,byte ptr [RDI] XOR EAX,EAX MOVZX R8D,byte ptr [RDI + R10*0x1] TEST RDI,RDI JZ 0x00159fc4 MOVZX EDX,byte ptr [RDX] JMP 0x00159fc6 LAB_00159fc0: XOR EAX,EAX LAB_00159fc2: POP RBP RET LAB_00159fc4: XOR EDX,EDX LAB_00159fc6: TEST R8B,R8B JS 0x00159fc2 MOV DL,byte ptr [RDX + R10*0x1] TEST DL,DL JS 0x00159fc2 MOVZX EAX,DL SHL ECX,0xc SHL R9D,0x8 SHL R8D,0x4 ADD R8,RCX ADD R8,R9 ADD R8,RAX MOV EAX,0x5 JMP 0x00159ed6
int8 my_mb_wc_filename(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; byte bVar2; int iVar3; int8 uVar4; ulong uVar5; ulong uVar6; if (param_4 <= param_3) { return 0xffffff9b; } uVar6 = (ulong)(char)*param_3; if ((long)uVar6 < 0) { return 0; } uVar4 = 1; if (filename_safe_char[uVar6] != '\0') goto LAB_00159ed6; if (*param_3 == 0x40) { if (param_4 < param_3 + 3) { return 0xffffff99; } bVar2 = param_3[1]; if (bVar2 == 0) { return 0; } bVar1 = param_3[2]; if ('/' < (char)bVar1 && '/' < (char)bVar2) { iVar3 = ((uint)bVar2 + (uint)bVar2 * 4) * 0x10 + (uint)bVar1; if ((iVar3 + -0xf00 < 0x179a) && (uVar6 = (ulong)*(ushort *)(touni + (ulong)(iVar3 - 0xf30) * 2), uVar6 != 0)) { uVar4 = 3; goto LAB_00159ed6; } if (bVar1 == 0x40 && bVar2 == 0x40) { uVar4 = 3; uVar6 = 0; goto LAB_00159ed6; } } if (param_4 < param_3 + 4) { return 0xffffff98; } if (-1 < (char)hexlo_hex_lo_digit[bVar2]) { if ((char)hexlo_hex_lo_digit[bVar1] < '\0') { return 0; } uVar6 = (ulong)param_3[3]; if (uVar6 == 0) { uVar5 = 0; } else { uVar5 = (ulong)param_3[4]; } if ((char)hexlo_hex_lo_digit[uVar6] < '\0') { return 0; } if ((char)hexlo_hex_lo_digit[uVar5] < '\0') { return 0; } uVar6 = (ulong)(byte)hexlo_hex_lo_digit[uVar6] * 0x10 + (ulong)(byte)hexlo_hex_lo_digit[bVar2] * 0x1000 + (ulong)(byte)hexlo_hex_lo_digit[bVar1] * 0x100 + (ulong)(byte)hexlo_hex_lo_digit[uVar5]; uVar4 = 5; LAB_00159ed6: *param_2 = uVar6; return uVar4; } } return 0; }
53,594
inline_mysql_cond_signal
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_signal( mysql_cond_t *that) { int result; #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) PSI_COND_CALL(signal_cond)(that->m_psi); #endif result= pthread_cond_signal(&that->m_cond); return result; }
O0
c
inline_mysql_cond_signal: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x30(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xc4cab leaq 0x23d321(%rip), %rax # 0x301fb8 movq (%rax), %rax movq 0x170(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0x60800 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq
inline_mysql_cond_signal_0: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_C4CAB lea rax, PSI_server mov rax, [rax] mov rax, [rax+170h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax loc_C4CAB: mov rdi, [rbp+var_8] call _pthread_cond_signal mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long inline_mysql_cond_signal_0(long long a1) { if ( *(_QWORD *)(a1 + 48) ) (*((void ( **)(_QWORD))PSI_server + 46))(*(_QWORD *)(a1 + 48)); return (unsigned int)pthread_cond_signal(a1); }
inline_mysql_cond_signal: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001c4cab LEA RAX,[0x401fb8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x170] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX LAB_001c4cab: MOV RDI,qword ptr [RBP + -0x8] CALL 0x00160800 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int inline_mysql_cond_signal(pthread_cond_t *param_1) { int iVar1; if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x170))(param_1[1].__align); } iVar1 = pthread_cond_signal(param_1); return iVar1; }
53,595
cleanup_stage_class()
eloqsql/storage/perfschema/pfs_instr_class.cc
void cleanup_stage_class(void) { PFS_FREE_ARRAY(& builtin_memory_stage_class, stage_class_max, sizeof(PFS_stage_class), stage_class_array); stage_class_array= NULL; stage_class_dirty_count= stage_class_allocated_count= 0; stage_class_max= 0; }
O3
cpp
cleanup_stage_class(): pushq %rbp movq %rsp, %rbp movq 0x39485f(%rip), %rsi # 0x3cf310 movq 0x3950f0(%rip), %rcx # 0x3cfba8 leaq 0x392241(%rip), %rdi # 0x3ccd00 movl $0x100, %edx # imm = 0x100 callq 0x2ce61 xorl %eax, %eax movq %rax, 0x3950d6(%rip) # 0x3cfba8 movl %eax, 0x3950c4(%rip) # 0x3cfb9c movl %eax, 0x3950c2(%rip) # 0x3cfba0 movq %rax, 0x39482b(%rip) # 0x3cf310 popq %rbp retq
_Z19cleanup_stage_classv: push rbp mov rbp, rsp mov rsi, cs:stage_class_max mov rcx, cs:_ZL17stage_class_array; stage_class_array lea rdi, builtin_memory_stage_class mov edx, 100h call _Z14pfs_free_arrayP24PFS_builtin_memory_classmmPv; pfs_free_array(PFS_builtin_memory_class *,ulong,ulong,void *) xor eax, eax mov cs:_ZL17stage_class_array, rax; stage_class_array mov cs:_ZL27stage_class_allocated_count, eax; stage_class_allocated_count mov cs:_ZL23stage_class_dirty_count, eax; stage_class_dirty_count mov cs:stage_class_max, rax pop rbp retn
long long cleanup_stage_class(void) { long long result; // rax pfs_free_array((long long)&builtin_memory_stage_class, stage_class_max, 256LL, stage_class_array); result = 0LL; stage_class_array = 0LL; stage_class_allocated_count = 0; stage_class_dirty_count = 0; stage_class_max = 0LL; return result; }
cleanup_stage_class: PUSH RBP MOV RBP,RSP MOV RSI,qword ptr [0x004cf310] MOV RCX,qword ptr [0x004cfba8] LEA RDI,[0x4ccd00] MOV EDX,0x100 CALL 0x0012ce61 XOR EAX,EAX MOV qword ptr [0x004cfba8],RAX MOV dword ptr [0x004cfb9c],EAX MOV dword ptr [0x004cfba0],EAX MOV qword ptr [0x004cf310],RAX POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* cleanup_stage_class() */ void cleanup_stage_class(void) { pfs_free_array((PFS_builtin_memory_class *)builtin_memory_stage_class,stage_class_max,0x100, stage_class_array); stage_class_array = (void *)0x0; stage_class_allocated_count = 0; stage_class_dirty_count = 0; stage_class_max = 0; return; }
53,596
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 0x624d8 movb (%rsi,%rcx), %r8b movb %r8b, (%rax,%rcx) leaq 0x1(%rcx), %rdi testb %r8b, %r8b jne 0x624bd jmp 0x624dc 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_624BD: mov rcx, rdi cmp rdx, rdi jz short loc_624D8 mov r8b, [rsi+rcx] mov [rax+rcx], r8b lea rdi, [rcx+1] test r8b, r8b jnz short loc_624BD jmp short loc_624DC loc_624D8: mov byte ptr [rax+rcx], 0 loc_624DC: 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_001624bd: MOV RCX,RDI CMP RDX,RDI JZ 0x001624d8 MOV R8B,byte ptr [RSI + RCX*0x1] MOV byte ptr [RAX + RCX*0x1],R8B LEA RDI,[RCX + 0x1] TEST R8B,R8B JNZ 0x001624bd JMP 0x001624dc LAB_001624d8: MOV byte ptr [RAX + RCX*0x1],0x0 LAB_001624dc: 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; }
53,597
js_boolean_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_boolean_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { JSValue val, obj; val = js_bool(JS_ToBool(ctx, argv[0])); if (!JS_IsUndefined(new_target)) { obj = js_create_from_ctor(ctx, new_target, JS_CLASS_BOOLEAN); if (!JS_IsException(obj)) JS_SetObjectData(ctx, obj, val); return obj; } else { return val; } }
O0
c
js_boolean_constructor: subq $0x78, %rsp movq %rsi, 0x58(%rsp) movq %rdx, 0x60(%rsp) movq %rdi, 0x50(%rsp) movl %ecx, 0x4c(%rsp) movq %r8, 0x40(%rsp) movq 0x50(%rsp), %rdi movq 0x40(%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x38530 movl %eax, %edi callq 0x57250 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x58(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x2e260 cmpl $0x0, %eax jne 0x57368 movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x60(%rsp), %rdx movl $0x6, %ecx callq 0x54e00 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq (%rsp), %rax movq %rax, 0x20(%rsp) movq 0x8(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax jne 0x57352 movq 0x50(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x28(%rsp), %rdx movq 0x30(%rsp), %rcx movq 0x38(%rsp), %r8 callq 0x55010 movq 0x20(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x70(%rsp) jmp 0x5737c movq 0x30(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x68(%rsp), %rax movq 0x70(%rsp), %rdx addq $0x78, %rsp retq nopl (%rax,%rax)
js_boolean_constructor: sub rsp, 78h mov [rsp+78h+var_20], rsi mov [rsp+78h+var_18], rdx mov [rsp+78h+var_28], rdi mov [rsp+78h+var_2C], ecx mov [rsp+78h+var_38], r8 mov rdi, [rsp+78h+var_28] mov rax, [rsp+78h+var_38] mov rsi, [rax] mov rdx, [rax+8] call JS_ToBool mov edi, eax call js_bool mov [rsp+78h+var_68], rax mov [rsp+78h+var_60], rdx mov rax, [rsp+78h+var_68] mov [rsp+78h+var_48], rax mov rax, [rsp+78h+var_60] mov [rsp+78h+var_40], rax mov rdi, [rsp+78h+var_20] mov rsi, [rsp+78h+var_18] call JS_IsUndefined_0 cmp eax, 0 jnz short loc_57368 mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_20] mov rdx, [rsp+78h+var_18] mov ecx, 6 call js_create_from_ctor mov [rsp+78h+var_78], rax mov [rsp+78h+var_70], rdx mov rax, [rsp+78h+var_78] mov [rsp+78h+var_58], rax mov rax, [rsp+78h+var_70] mov [rsp+78h+var_50], rax mov rdi, [rsp+78h+var_58] mov rsi, [rsp+78h+var_50] call JS_IsException_1 cmp eax, 0 jnz short loc_57352 mov rdi, [rsp+78h+var_28] mov rsi, [rsp+78h+var_58] mov rdx, [rsp+78h+var_50] mov rcx, [rsp+78h+var_48] mov r8, [rsp+78h+var_40] call JS_SetObjectData loc_57352: mov rax, [rsp+78h+var_58] mov [rsp+78h+var_10], rax mov rax, [rsp+78h+var_50] mov [rsp+78h+var_8], rax jmp short loc_5737C loc_57368: mov rax, [rsp+78h+var_48] mov [rsp+78h+var_10], rax mov rax, [rsp+78h+var_40] mov [rsp+78h+var_8], rax loc_5737C: mov rax, [rsp+78h+var_10] mov rdx, [rsp+78h+var_8] add rsp, 78h retn
long long js_boolean_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) { int v13; // eax long long v14; // rdx int v15; // edx double v16; // xmm4_8 double v17; // xmm5_8 long long v19; // [rsp+0h] [rbp-78h] long long v20; // [rsp+10h] [rbp-68h] int v21; // [rsp+28h] [rbp-50h] long long v22; // [rsp+38h] [rbp-40h] v13 = JS_ToBool(a1, *(_DWORD **)a13, *(_QWORD *)(a13 + 8)); v20 = js_bool(v13); v22 = v14; if ( JS_IsUndefined_0(a2, a3) ) return v20; v19 = js_create_from_ctor(a1, a2, a3, 6); v21 = v15; if ( !JS_IsException_1(v19, v15) ) JS_SetObjectData(a1, v19, v21, v20, v22, a4, a5, a6, a7, v16, v17, a10, a11); return v19; }
js_boolean_constructor: SUB RSP,0x78 MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x60],RDX MOV qword ptr [RSP + 0x50],RDI MOV dword ptr [RSP + 0x4c],ECX MOV qword ptr [RSP + 0x40],R8 MOV RDI,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00138530 MOV EDI,EAX CALL 0x00157250 MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x38],RAX MOV RDI,qword ptr [RSP + 0x58] MOV RSI,qword ptr [RSP + 0x60] CALL 0x0012e260 CMP EAX,0x0 JNZ 0x00157368 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] MOV ECX,0x6 CALL 0x00154e00 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x28],RAX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x28] CALL 0x00123cc0 CMP EAX,0x0 JNZ 0x00157352 MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x30] MOV R8,qword ptr [RSP + 0x38] CALL 0x00155010 LAB_00157352: MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x70],RAX JMP 0x0015737c LAB_00157368: MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x70],RAX LAB_0015737c: MOV RAX,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] ADD RSP,0x78 RET
int1 [16] js_boolean_constructor (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 *param_5) { int4 uVar1; int iVar2; int8 uVar3; int8 uVar4; int1 auVar5 [16]; uVar1 = JS_ToBool(param_1,*param_5,param_5[1]); auVar5 = js_bool(uVar1); uVar4 = auVar5._8_8_; uVar3 = auVar5._0_8_; iVar2 = JS_IsUndefined(param_2,param_3); if (iVar2 == 0) { auVar5 = js_create_from_ctor(param_1,param_2,param_3,6); iVar2 = JS_IsException(auVar5._0_8_,auVar5._8_8_); if (iVar2 == 0) { JS_SetObjectData(param_1,auVar5._0_8_,auVar5._8_8_,uVar3,uVar4); } } return auVar5; }
53,598
js_boolean_constructor
bluesky950520[P]quickjs/quickjs.c
static JSValue js_boolean_constructor(JSContext *ctx, JSValue new_target, int argc, JSValue *argv) { JSValue val, obj; val = js_bool(JS_ToBool(ctx, argv[0])); if (!JS_IsUndefined(new_target)) { obj = js_create_from_ctor(ctx, new_target, JS_CLASS_BOOLEAN); if (!JS_IsException(obj)) JS_SetObjectData(ctx, obj, val); return obj; } else { return val; } }
O1
c
js_boolean_constructor: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbx movq (%r8), %rsi movq 0x8(%r8), %rdx movq %rsi, 0x8(%rsp) cmpl $-0x9, %edx jb 0x3896c movq 0x8(%rsp), %rax incl (%rax) movq %rbx, %rdi callq 0x22d0d xorl %r14d, %r14d testl %eax, %eax setne %r14b movl $0x1, %r15d cmpl $0x3, %r12d jne 0x3898e movq %r14, %r12 jmp 0x389c4 movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx movl $0x6, %ecx callq 0x36d56 movq %rax, %r12 movq %rdx, %r15 cmpl $0x6, %r15d je 0x389c4 movl $0x1, %r8d movq %rbx, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx callq 0x36e62 movq %r12, %rax movq %r15, %rdx addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
js_boolean_constructor: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r12, rdx mov r13, rsi mov rbx, rdi mov rsi, [r8] mov rdx, [r8+8] mov [rsp+38h+var_30], rsi cmp edx, 0FFFFFFF7h jb short loc_3896C mov rax, [rsp+38h+var_30] inc dword ptr [rax] loc_3896C: mov rdi, rbx call JS_ToBoolFree xor r14d, r14d test eax, eax setnz r14b mov r15d, 1 cmp r12d, 3 jnz short loc_3898E mov r12, r14 jmp short loc_389C4 loc_3898E: mov rdi, rbx mov rsi, r13 mov rdx, r12 mov ecx, 6 call js_create_from_ctor mov r12, rax mov r15, rdx cmp r15d, 6 jz short loc_389C4 mov r8d, 1 mov rdi, rbx mov rsi, r12 mov rdx, r15 mov rcx, r14 call JS_SetObjectData loc_389C4: mov rax, r12 mov rdx, r15 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn
_BOOL8 js_boolean_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) { _DWORD *v15; // rsi long long v16; // rdx int v17; // eax _BOOL8 v18; // r14 unsigned long long v19; // r12 unsigned long long v20; // rax int v21; // edx long long v22; // r9 double v23; // xmm4_8 double v24; // xmm5_8 char v26; // [rsp+0h] [rbp-38h] v15 = *(_DWORD **)a13; v16 = *(_QWORD *)(a13 + 8); if ( (unsigned int)v16 >= 0xFFFFFFF7 ) ++**(_DWORD **)a13; v17 = JS_ToBoolFree(a1, (long long)v15, v16); v18 = v17 != 0; if ( (_DWORD)a3 == 3 ) return v17 != 0; v20 = js_create_from_ctor(a1, a2, a3, 6); v19 = v20; if ( v21 != 6 ) JS_SetObjectData(a1, v20, v21, (_DWORD *)v18, 1LL, a4, a5, a6, a7, v23, v24, a10, a11, v22, v26); return v19; }
53,599
LefDefParser::lefwDensityCheckStep(double)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwDensityCheckStep(double checkStepValue) { lefw54Num = LEFW_DENSITYCHECKSTEP; if (!lefwFile) return LEFW_UNINITIALIZED; if (versionNum < 5.4) return LEFW_WRONG_VERSION; if (lefwWriteEncrypt) encPrint(lefwFile, (char*) " DENSITYCHECKSTEP %.11g ;\n", checkStepValue); else fprintf(lefwFile, " DENSITYCHECKSTEP %.11g ;\n", checkStepValue); lefwLines++; return LEFW_OK; }
O3
cpp
LefDefParser::lefwDensityCheckStep(double): movl $0x7d, 0x75f37(%rip) # 0x8cebc leaq 0x76164(%rip), %rax # 0x8d0f0 movq (%rax), %rdi testq %rdi, %rdi je 0x16fc5 movl $0x5, %eax movsd 0x53b4f(%rip), %xmm1 # 0x6aaf0 ucomisd 0x75f07(%rip), %xmm1 # 0x8ceb0 ja 0x16fe8 pushq %rax cmpb $0x1, 0x76429(%rip) # 0x8d3dc jne 0x16fcb leaq 0x44626(%rip), %rsi # 0x5b5e2 movb $0x1, %al callq 0x55afd jmp 0x16fd9 movl $0x1, %eax retq leaq 0x44610(%rip), %rsi # 0x5b5e2 movb $0x1, %al callq 0x22e0 leaq 0x7635c(%rip), %rax # 0x8d33c incl (%rax) xorl %eax, %eax addq $0x8, %rsp retq
_ZN12LefDefParser20lefwDensityCheckStepEd: mov cs:_ZN12LefDefParserL9lefw54NumE, 7Dh ; '}'; LefDefParser::lefw54Num lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] test rdi, rdi jz short loc_16FC5 mov eax, 5 movsd xmm1, cs:qword_6AAF0 ucomisd xmm1, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum ja short locret_16FE8 push rax cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 1; LefDefParser::lefwWriteEncrypt jnz short loc_16FCB lea rsi, aDensitycheckst_0; " DENSITYCHECKSTEP %.11g ;\n" mov al, 1 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp short loc_16FD9 loc_16FC5: mov eax, 1 retn loc_16FCB: lea rsi, aDensitycheckst_0; " DENSITYCHECKSTEP %.11g ;\n" mov al, 1 call _fprintf loc_16FD9: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines inc dword ptr [rax] xor eax, eax add rsp, 8 locret_16FE8: retn
long long LefDefParser::lefwDensityCheckStep( LefDefParser *this, double a2, long long a3, int a4, int a5, int a6, int a7) { long long result; // rax LefDefParser::lefw54Num = 125; if ( !*(_QWORD *)&LefDefParser::lefwFile ) return 1LL; result = 5LL; if ( *(double *)&LefDefParser::versionNum >= 5.4 ) { if ( LefDefParser::lefwWriteEncrypt == 1 ) LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)" DENSITYCHECKSTEP %.11g ;\n", a4, a5, a6, a7); else fprintf(*(_QWORD *)&LefDefParser::lefwFile, " DENSITYCHECKSTEP %.11g ;\n", a2); ++LefDefParser::lefwLines; return 0LL; } return result; }
lefwDensityCheckStep: MOV dword ptr [0x0018cebc],0x7d LEA RAX,[0x18d0f0] MOV RDI,qword ptr [RAX] TEST RDI,RDI JZ 0x00116fc5 MOV EAX,0x5 MOVSD XMM1,qword ptr [0x0016aaf0] UCOMISD XMM1,qword ptr [0x0018ceb0] JA 0x00116fe8 PUSH RAX CMP byte ptr [0x0018d3dc],0x1 JNZ 0x00116fcb LEA RSI,[0x15b5e2] MOV AL,0x1 CALL 0x00155afd JMP 0x00116fd9 LAB_00116fc5: MOV EAX,0x1 RET LAB_00116fcb: LEA RSI,[0x15b5e2] MOV AL,0x1 CALL 0x001022e0 LAB_00116fd9: LEA RAX,[0x18d33c] INC dword ptr [RAX] XOR EAX,EAX ADD RSP,0x8 LAB_00116fe8: RET
/* LefDefParser::lefwDensityCheckStep(double) */ int8 LefDefParser::lefwDensityCheckStep(double param_1) { int8 uVar1; lefw54Num = 0x7d; if (lefwFile != (_IO_FILE *)0x0) { uVar1 = 5; if (DAT_0016aaf0 <= versionNum) { if (lefwWriteEncrypt == '\x01') { encPrint(lefwFile," DENSITYCHECKSTEP %.11g ;\n"); } else { fprintf(lefwFile," DENSITYCHECKSTEP %.11g ;\n"); } lefwLines = lefwLines + 1; uVar1 = 0; } return uVar1; } return 1; }