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
46,800
CLI::App::set_help_all_flag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE Option *App::set_help_all_flag(std::string help_name, const std::string &help_description) { // take flag_description by const reference otherwise add_flag tries to assign to flag_description if(help_all_ptr_ != nullptr) { remove_option(help_all_ptr_); help_all_ptr_ = nullptr; } // Empty name will simply remove the help all flag if(!help_name.empty()) { help_all_ptr_ = add_flag(help_name, help_description); help_all_ptr_->configurable(false); } return help_all_ptr_; }
O0
cpp
CLI::App::set_help_all_flag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rsi, -0x58(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x50(%rbp) cmpq $0x0, 0x138(%rax) je 0x26369 movq -0x50(%rbp), %rdi movq 0x138(%rdi), %rsi callq 0x27e60 movq -0x50(%rbp), %rax movq $0x0, 0x138(%rax) movq -0x58(%rbp), %rdi callq 0x99c0 testb $0x1, %al jne 0x263e1 movq -0x58(%rbp), %rsi leaq -0x38(%rbp), %rdi movq %rdi, -0x68(%rbp) callq 0x9250 movq -0x50(%rbp), %rdi movq -0x68(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x27ff0 movq %rax, -0x60(%rbp) jmp 0x2639e movq -0x50(%rbp), %rax movq -0x60(%rbp), %rcx movq %rcx, 0x138(%rax) leaq -0x38(%rbp), %rdi callq 0x9b90 movq -0x50(%rbp), %rax movq 0x138(%rax), %rdi xorl %esi, %esi callq 0x280d0 jmp 0x263e1 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x38(%rbp), %rdi callq 0x9b90 jmp 0x263f2 movq -0x50(%rbp), %rax movq 0x138(%rax), %rax addq $0x70, %rsp popq %rbp retq movq -0x40(%rbp), %rdi callq 0x9a70 nopl (%rax,%rax)
_ZN3CLI3App17set_help_all_flagENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKS6_: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_58], rsi mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov [rbp+var_50], rax cmp qword ptr [rax+138h], 0 jz short loc_26369 mov rdi, [rbp+var_50]; this mov rsi, [rdi+138h]; CLI::Option * call _ZN3CLI3App13remove_optionEPNS_6OptionE; CLI::App::remove_option(CLI::Option *) mov rax, [rbp+var_50] mov qword ptr [rax+138h], 0 loc_26369: mov rdi, [rbp+var_58] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_263E1 mov rsi, [rbp+var_58] lea rdi, [rbp+var_38] mov [rbp+var_68], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) mov rdi, [rbp+var_50] mov rsi, [rbp+var_68] mov rdx, [rbp+var_18] call _ZN3CLI3App8add_flagIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXaasr3std8is_constIT_EE5valuesr3std16is_constructibleIS7_SA_EE5valueENS_6detail7enablerEE4typeELSC_0EEEPNS_6OptionES7_RSA_ mov [rbp+var_60], rax jmp short $+2 loc_2639E: mov rax, [rbp+var_50] mov rcx, [rbp+var_60] mov [rax+138h], rcx lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rbp+var_50] mov rdi, [rax+138h] xor esi, esi call _ZN3CLI10OptionBaseINS_6OptionEE12configurableEb; CLI::OptionBase<CLI::Option>::configurable(bool) jmp short loc_263E1 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_263F2 loc_263E1: mov rax, [rbp+var_50] mov rax, [rax+138h] add rsp, 70h pop rbp retn loc_263F2: mov rdi, [rbp+var_40] call __Unwind_Resume
CLI::Option * CLI::App::set_help_all_flag(CLI::Option **a1, long long a2, long long a3) { _BYTE v4[32]; // [rsp+38h] [rbp-38h] BYREF long long v5; // [rsp+58h] [rbp-18h] long long v6; // [rsp+60h] [rbp-10h] CLI::Option **v7; // [rsp+68h] [rbp-8h] v7 = a1; v6 = a2; v5 = a3; if ( a1[39] ) { CLI::App::remove_option((CLI::App *)a1, a1[39]); a1[39] = 0LL; } if ( (std::string::empty(a2) & 1) == 0 ) { std::string::basic_string(v4, a2); a1[39] = (CLI::Option *)ZN3CLI3App8add_flagIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXaasr3std8is_constIT_EE5valuesr3std16is_constructibleIS7_SA_EE5valueENS_6detail7enablerEE4typeELSC_0EEEPNS_6OptionES7_RSA_( a1, v4, v5); std::string::~string(v4); CLI::OptionBase<CLI::Option>::configurable(a1[39], 0LL); } return a1[39]; }
set_help_all_flag: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x58],RSI 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 + -0x50],RAX CMP qword ptr [RAX + 0x138],0x0 JZ 0x00126369 MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RDI + 0x138] CALL 0x00127e60 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RAX + 0x138],0x0 LAB_00126369: MOV RDI,qword ptr [RBP + -0x58] CALL 0x001099c0 TEST AL,0x1 JNZ 0x001263e1 MOV RSI,qword ptr [RBP + -0x58] LEA RDI,[RBP + -0x38] MOV qword ptr [RBP + -0x68],RDI CALL 0x00109250 MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RBP + -0x18] LAB_00126393: CALL 0x00127ff0 LAB_00126398: MOV qword ptr [RBP + -0x60],RAX JMP 0x0012639e LAB_0012639e: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x60] MOV qword ptr [RAX + 0x138],RCX LEA RDI,[RBP + -0x38] CALL 0x00109b90 MOV RAX,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RAX + 0x138] XOR ESI,ESI CALL 0x001280d0 JMP 0x001263e1 LAB_001263e1: MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX + 0x138] ADD RSP,0x70 POP RBP RET
/* CLI::App::set_help_all_flag(std::__cxx11::string, std::__cxx11::string const&) */ int8 __thiscall CLI::App::set_help_all_flag(App *this,string *param_2,int8 param_3) { ulong uVar1; int8 uVar2; string local_40 [32]; int8 local_20; string *local_18; App *local_10; local_20 = param_3; local_18 = param_2; local_10 = this; if (*(long *)(this + 0x138) != 0) { remove_option(this,*(Option **)(this + 0x138)); *(int8 *)(this + 0x138) = 0; } uVar1 = std::__cxx11::string::empty(); if ((uVar1 & 1) == 0) { std::__cxx11::string::string(local_40,param_2); /* try { // try from 00126393 to 00126397 has its CatchHandler @ 001263ca */ uVar2 = _ZN3CLI3App8add_flagIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEETnNSt9enable_ifIXaasr3std8is_constIT_EE5valuesr3std16is_constructibleIS7_SA_EE5valueENS_6detail7enablerEE4typeELSC_0EEEPNS_6OptionES7_RSA_ (this,local_40,local_20); *(int8 *)(this + 0x138) = uVar2; std::__cxx11::string::~string(local_40); OptionBase<CLI::Option>::configurable(*(OptionBase<CLI::Option> **)(this + 0x138),false); } return *(int8 *)(this + 0x138); }
46,801
psi_prlock_rdlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_prlock_rdlock(mysql_prlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_rdwait) (&state, that->m_psi, PSI_RWLOCK_READLOCK, file, line); int result= rw_pr_rdlock(&that->m_prlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_rdwait)(locker, result); return result; }
O0
c
psi_prlock_rdlock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1af69e(%rip), %rax # 0x1e3e98 movq (%rax), %rax movq 0x1a0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x68(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi xorl %edx, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x34ef0 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x3484d leaq 0x1af65e(%rip), %rax # 0x1e3e98 movq (%rax), %rax movq 0x1a8(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
psi_prlock_rdlock: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx lea rax, PSI_server mov rax, [rax] mov rax, [rax+1A0h] mov rcx, [rbp+var_8] mov rsi, [rcx+68h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] xor edx, edx call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call rw_pr_rdlock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_3484D lea rax, PSI_server mov rax, [rax] mov rax, [rax+1A8h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_3484D: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_prlock_rdlock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = (*((long long ( **)(_BYTE *, _QWORD, _QWORD, long long, _QWORD))PSI_server + 52))( v6, *(_QWORD *)(a1 + 104), 0LL, a2, a3); v4 = rw_pr_rdlock(v9); if ( v5 ) (*((void ( **)(long long, _QWORD))PSI_server + 53))(v5, v4); return v4; }
psi_prlock_rdlock: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LEA RAX,[0x2e3e98] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1a0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x68] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] XOR EDX,EDX CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x00134ef0 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x0013484d LEA RAX,[0x2e3e98] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1a8] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_0013484d: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int4 psi_prlock_rdlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; long local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1a0)) (local_50,*(int8 *)(param_1 + 0x68),0,param_2,param_3); uVar1 = rw_pr_rdlock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1a8))(lVar2,uVar1); } return uVar1; }
46,802
matrix_f_create
tsotchke[P]eshkol/src/core/utils/vector.c
MatrixF* matrix_f_create(Arena* arena, size_t rows, size_t cols) { assert(arena != NULL); assert(rows > 0 && rows <= VECTOR_MAX_DIM); assert(cols > 0 && cols <= VECTOR_MAX_DIM); MatrixF* mat = arena_alloc_aligned(arena, sizeof(MatrixF), VECTOR_ALIGNMENT); if (!mat) { return NULL; } mat->rows = rows; mat->cols = cols; memset(mat->data, 0, sizeof(mat->data)); return mat; }
O3
c
matrix_f_create: pushq %r14 pushq %rbx pushq %rax testq %rdi, %rdi je 0x508a movq %rsi, %r14 leaq -0x1(%rsi), %rax cmpq $0x4, %rax jae 0x50a9 movq %rdx, %rbx leaq -0x1(%rdx), %rax cmpq $0x4, %rax jae 0x50c8 movl $0x60, %esi movl $0x20, %edx callq 0x3e09 testq %rax, %rax je 0x5082 movq %r14, 0x40(%rax) movq %rbx, 0x48(%rax) xorps %xmm0, %xmm0 movaps %xmm0, (%rax) movaps %xmm0, 0x10(%rax) movaps %xmm0, 0x20(%rax) movaps %xmm0, 0x30(%rax) addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x20ae(%rip), %rdi # 0x713f leaq 0x3658(%rip), %rsi # 0x86f0 leaq 0x3a32(%rip), %rcx # 0x8ad1 movl $0x2de, %edx # imm = 0x2DE callq 0x1090 leaq 0x3a53(%rip), %rdi # 0x8b03 leaq 0x3639(%rip), %rsi # 0x86f0 leaq 0x3a13(%rip), %rcx # 0x8ad1 movl $0x2df, %edx # imm = 0x2DF callq 0x1090 leaq 0x3a57(%rip), %rdi # 0x8b26 leaq 0x361a(%rip), %rsi # 0x86f0 leaq 0x39f4(%rip), %rcx # 0x8ad1 movl $0x2e0, %edx # imm = 0x2E0 callq 0x1090
matrix_f_create: push r14 push rbx push rax test rdi, rdi jz short loc_508A mov r14, rsi lea rax, [rsi-1] cmp rax, 4 jnb short loc_50A9 mov rbx, rdx lea rax, [rdx-1] cmp rax, 4 jnb short loc_50C8 mov esi, 60h ; '`' mov edx, 20h ; ' ' call arena_alloc_aligned test rax, rax jz short loc_5082 mov [rax+40h], r14 mov [rax+48h], rbx xorps xmm0, xmm0 movaps xmmword ptr [rax], xmm0 movaps xmmword ptr [rax+10h], xmm0 movaps xmmword ptr [rax+20h], xmm0 movaps xmmword ptr [rax+30h], xmm0 loc_5082: add rsp, 8 pop rbx pop r14 retn loc_508A: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aMatrixfMatrixF; "MatrixF *matrix_f_create(Arena *, size_"... mov edx, 2DEh call ___assert_fail loc_50A9: lea rdi, aRows0RowsVecto; "rows > 0 && rows <= VECTOR_MAX_DIM" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aMatrixfMatrixF; "MatrixF *matrix_f_create(Arena *, size_"... mov edx, 2DFh call ___assert_fail loc_50C8: lea rdi, aCols0ColsVecto; "cols > 0 && cols <= VECTOR_MAX_DIM" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aMatrixfMatrixF; "MatrixF *matrix_f_create(Arena *, size_"... mov edx, 2E0h call ___assert_fail
long long matrix_f_create(_QWORD *a1, long long a2, long long a3) { long long result; // rax if ( !a1 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 734LL, "MatrixF *matrix_f_create(Arena *, size_t, size_t)"); if ( (unsigned long long)(a2 - 1) >= 4 ) __assert_fail( "rows > 0 && rows <= VECTOR_MAX_DIM", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 735LL, "MatrixF *matrix_f_create(Arena *, size_t, size_t)"); if ( (unsigned long long)(a3 - 1) >= 4 ) __assert_fail( "cols > 0 && cols <= VECTOR_MAX_DIM", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 736LL, "MatrixF *matrix_f_create(Arena *, size_t, size_t)"); result = arena_alloc_aligned(a1, 96LL, 0x20uLL); if ( result ) { *(_QWORD *)(result + 64) = a2; *(_QWORD *)(result + 72) = a3; *(_OWORD *)result = 0LL; *(_OWORD *)(result + 16) = 0LL; *(_OWORD *)(result + 32) = 0LL; *(_OWORD *)(result + 48) = 0LL; } return result; }
matrix_f_create: PUSH R14 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x0010508a MOV R14,RSI LEA RAX,[RSI + -0x1] CMP RAX,0x4 JNC 0x001050a9 MOV RBX,RDX LEA RAX,[RDX + -0x1] CMP RAX,0x4 JNC 0x001050c8 MOV ESI,0x60 MOV EDX,0x20 CALL 0x00103e09 TEST RAX,RAX JZ 0x00105082 MOV qword ptr [RAX + 0x40],R14 MOV qword ptr [RAX + 0x48],RBX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RAX],XMM0 MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPS xmmword ptr [RAX + 0x20],XMM0 MOVAPS xmmword ptr [RAX + 0x30],XMM0 LAB_00105082: ADD RSP,0x8 POP RBX POP R14 RET LAB_0010508a: LEA RDI,[0x10713f] LEA RSI,[0x1086f0] LEA RCX,[0x108ad1] MOV EDX,0x2de CALL 0x00101090 LAB_001050a9: LEA RDI,[0x108b03] LEA RSI,[0x1086f0] LEA RCX,[0x108ad1] MOV EDX,0x2df CALL 0x00101090 LAB_001050c8: LEA RDI,[0x108b26] LEA RSI,[0x1086f0] LEA RCX,[0x108ad1] MOV EDX,0x2e0 CALL 0x00101090
void matrix_f_create(long param_1,long param_2,long param_3) { int8 *puVar1; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c" ,0x2de,"MatrixF *matrix_f_create(Arena *, size_t, size_t)"); } if (param_2 - 1U < 4) { if (param_3 - 1U < 4) { puVar1 = (int8 *)arena_alloc_aligned(param_1,0x60,0x20); if (puVar1 != (int8 *)0x0) { puVar1[8] = param_2; puVar1[9] = param_3; *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; puVar1[3] = 0; puVar1[4] = 0; puVar1[5] = 0; puVar1[6] = 0; puVar1[7] = 0; } return; } /* WARNING: Subroutine does not return */ __assert_fail("cols > 0 && cols <= VECTOR_MAX_DIM", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c" ,0x2e0,"MatrixF *matrix_f_create(Arena *, size_t, size_t)"); } /* WARNING: Subroutine does not return */ __assert_fail("rows > 0 && rows <= VECTOR_MAX_DIM", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 0x2df,"MatrixF *matrix_f_create(Arena *, size_t, size_t)"); }
46,803
js_json_parse
bluesky950520[P]quickjs/quickjs.c
static JSValue js_json_parse(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj, root; JSValue reviver; const char *str; size_t len; str = JS_ToCStringLen(ctx, &len, argv[0]); if (!str) return JS_EXCEPTION; obj = JS_ParseJSON(ctx, str, len, "<input>"); JS_FreeCString(ctx, str); if (JS_IsException(obj)) return obj; if (argc > 1 && JS_IsFunction(ctx, argv[1])) { reviver = argv[1]; root = JS_NewObject(ctx); if (JS_IsException(root)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } if (JS_DefinePropertyValue(ctx, root, JS_ATOM_empty_string, obj, JS_PROP_C_W_E) < 0) { JS_FreeValue(ctx, root); return JS_EXCEPTION; } obj = internalize_json_property(ctx, root, JS_ATOM_empty_string, reviver); JS_FreeValue(ctx, root); } return obj; }
O0
c
js_json_parse: subq $0xb8, %rsp movq %rsi, 0x98(%rsp) movq %rdx, 0xa0(%rsp) movq %rdi, 0x90(%rsp) movl %ecx, 0x8c(%rsp) movq %r8, 0x80(%rsp) movq 0x90(%rsp), %rdi movq 0x80(%rsp), %rax movq (%rax), %rdx movq 0x8(%rax), %rcx leaq 0x40(%rsp), %rsi callq 0x62ed0 movq %rax, 0x48(%rsp) cmpq $0x0, 0x48(%rsp) jne 0x88738 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) jmp 0x88950 movq 0x90(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x40(%rsp), %rdx leaq 0x85d2e(%rip), %rcx # 0x10e47f callq 0x4ea20 movq %rax, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x90(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x29e50 movq 0x70(%rsp), %rdi movq 0x78(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x887b9 movq 0x70(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0x78(%rsp), %rax movq %rax, 0xb0(%rsp) jmp 0x88950 cmpl $0x1, 0x8c(%rsp) jle 0x88936 movq 0x90(%rsp), %rdi movq 0x80(%rsp), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx callq 0x2e510 cmpl $0x0, %eax je 0x88936 movq 0x80(%rsp), %rax movq 0x10(%rax), %rcx movq %rcx, 0x50(%rsp) movq 0x18(%rax), %rax movq %rax, 0x58(%rsp) movq 0x90(%rsp), %rdi callq 0x2a570 movq %rax, 0x20(%rsp) movq %rdx, 0x28(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x60(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x68(%rsp) movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rsi callq 0x23cc0 cmpl $0x0, %eax je 0x88879 movq 0x90(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x78(%rsp), %rdx callq 0x23c90 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) jmp 0x88950 movq 0x90(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx movq 0x70(%rsp), %r8 movq 0x78(%rsp), %r9 movl $0x2f, %ecx movl $0x7, (%rsp) callq 0x371b0 cmpl $0x0, %eax jge 0x888db movq 0x90(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x23c90 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) jmp 0x88950 movq 0x90(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx movq 0x50(%rsp), %r8 movq 0x58(%rsp), %r9 movl $0x2f, %ecx callq 0x889d0 movq %rax, 0x10(%rsp) movq %rdx, 0x18(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x70(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x78(%rsp) movq 0x90(%rsp), %rdi movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx callq 0x23c90 movq 0x70(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0x78(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0xa8(%rsp), %rax movq 0xb0(%rsp), %rdx addq $0xb8, %rsp retq nopl (%rax,%rax)
js_json_parse: sub rsp, 0B8h mov [rsp+0B8h+var_20], rsi mov [rsp+0B8h+var_18], rdx mov [rsp+0B8h+var_28], rdi mov [rsp+0B8h+var_2C], ecx mov [rsp+0B8h+var_38], r8 mov rdi, [rsp+0B8h+var_28] mov rax, [rsp+0B8h+var_38] mov rdx, [rax] mov rcx, [rax+8] lea rsi, [rsp+0B8h+var_78] call JS_ToCStringLen_0 mov [rsp+0B8h+var_70], rax cmp [rsp+0B8h+var_70], 0 jnz short loc_88738 mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 jmp loc_88950 loc_88738: mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_70] mov rdx, [rsp+0B8h+var_78] lea rcx, aInput; "<input>" call JS_ParseJSON mov [rsp+0B8h+var_88], rax mov [rsp+0B8h+var_80], rdx mov rax, [rsp+0B8h+var_88] mov [rsp+0B8h+var_48], rax mov rax, [rsp+0B8h+var_80] mov [rsp+0B8h+var_40], rax mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_70] call JS_FreeCString mov rdi, [rsp+0B8h+var_48] mov rsi, [rsp+0B8h+var_40] call JS_IsException_1 cmp eax, 0 jz short loc_887B9 mov rax, [rsp+0B8h+var_48] mov [rsp+0B8h+var_10], rax mov rax, [rsp+0B8h+var_40] mov [rsp+0B8h+var_8], rax jmp loc_88950 loc_887B9: cmp [rsp+0B8h+var_2C], 1 jle loc_88936 mov rdi, [rsp+0B8h+var_28] mov rax, [rsp+0B8h+var_38] mov rsi, [rax+10h] mov rdx, [rax+18h] call JS_IsFunction cmp eax, 0 jz loc_88936 mov rax, [rsp+0B8h+var_38] mov rcx, [rax+10h] mov [rsp+0B8h+var_68], rcx mov rax, [rax+18h] mov [rsp+0B8h+var_60], rax mov rdi, [rsp+0B8h+var_28] call JS_NewObject mov [rsp+0B8h+var_98], rax mov [rsp+0B8h+var_90], rdx mov rax, [rsp+0B8h+var_98] mov [rsp+0B8h+var_58], rax mov rax, [rsp+0B8h+var_90] mov [rsp+0B8h+var_50], rax mov rdi, [rsp+0B8h+var_58] mov rsi, [rsp+0B8h+var_50] call JS_IsException_1 cmp eax, 0 jz short loc_88879 mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_48] mov rdx, [rsp+0B8h+var_40] call JS_FreeValue mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 jmp loc_88950 loc_88879: mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_58] mov rdx, [rsp+0B8h+var_50] mov r8, [rsp+0B8h+var_48] mov r9, [rsp+0B8h+var_40] mov ecx, 2Fh ; '/' mov [rsp+0B8h+var_B8], 7 call JS_DefinePropertyValue cmp eax, 0 jge short loc_888DB mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_58] mov rdx, [rsp+0B8h+var_50] call JS_FreeValue mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 jmp short loc_88950 loc_888DB: mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_58] mov rdx, [rsp+0B8h+var_50] mov r8, [rsp+0B8h+var_68] mov r9, [rsp+0B8h+var_60] mov ecx, 2Fh ; '/' call internalize_json_property mov [rsp+0B8h+var_A8], rax mov [rsp+0B8h+var_A0], rdx mov rax, [rsp+0B8h+var_A8] mov [rsp+0B8h+var_48], rax mov rax, [rsp+0B8h+var_A0] mov [rsp+0B8h+var_40], rax mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_58] mov rdx, [rsp+0B8h+var_50] call JS_FreeValue loc_88936: mov rax, [rsp+0B8h+var_48] mov [rsp+0B8h+var_10], rax mov rax, [rsp+0B8h+var_40] mov [rsp+0B8h+var_8], rax loc_88950: mov rax, [rsp+0B8h+var_10] mov rdx, [rsp+0B8h+var_8] add rsp, 0B8h retn
_DWORD * js_json_parse( long long a1, long long a2, long long a3, int a4, long long *a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { double v13; // xmm4_8 double v14; // xmm5_8 long long v15; // rdx long long v16; // rdx __m128 v17; // xmm4 __m128 v18; // xmm5 long long v19; // rdx long long v21; // [rsp+40h] [rbp-78h] BYREF _DWORD *v22; // [rsp+48h] [rbp-70h] long long v23; // [rsp+50h] [rbp-68h] long long v24; // [rsp+58h] [rbp-60h] long long v25; // [rsp+60h] [rbp-58h] long long v26; // [rsp+68h] [rbp-50h] _DWORD *v27; // [rsp+70h] [rbp-48h] long long v28; // [rsp+78h] [rbp-40h] long long *v29; // [rsp+80h] [rbp-38h] int v30; // [rsp+8Ch] [rbp-2Ch] long long v31; // [rsp+90h] [rbp-28h] long long v32; // [rsp+98h] [rbp-20h] long long v33; // [rsp+A0h] [rbp-18h] _DWORD *v34; // [rsp+A8h] [rbp-10h] long long v35; // [rsp+B0h] [rbp-8h] v32 = a2; v33 = a3; v31 = a1; v30 = a4; v29 = a5; v22 = JS_ToCStringLen_0(a1, &v21, *a5, a5[1]); if ( v22 ) { v27 = (_DWORD *)JS_ParseJSON(v31, (long long)v22, v21, (long long)"<input>", a6, a7, a8, a9, v13, v14, a12, a13); v28 = v15; JS_FreeCString(v31, (long long)v22); if ( !JS_IsException_1((long long)v27, v28) ) { if ( v30 > 1 && (unsigned int)JS_IsFunction(v31, v29[2], v29[3]) ) { v23 = v29[2]; v24 = v29[3]; v25 = JS_NewObject(v31); v26 = v16; if ( JS_IsException_1(v25, v16) ) { JS_FreeValue(v31, (long long)v27, v28); LODWORD(v34) = 0; v35 = 6LL; return v34; } if ( (int)JS_DefinePropertyValue(v31, v25, v26, 0x2Fu, v27, v28, a6, a7, a8, a9, v17, v18, a12, a13, 7) < 0 ) { JS_FreeValue(v31, v25, v26); LODWORD(v34) = 0; v35 = 6LL; return v34; } v27 = (_DWORD *)internalize_json_property(v31, v25, v26, 47LL, v23, v24); v28 = v19; JS_FreeValue(v31, v25, v26); } v34 = v27; v35 = v28; return v34; } v34 = v27; v35 = v28; } else { LODWORD(v34) = 0; v35 = 6LL; } return v34; }
string_buffer_putc8: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI MOV dword ptr [RSP + 0x4],ESI MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX + 0x10] MOV RCX,qword ptr [RSP + 0x8] CMP EAX,dword ptr [RCX + 0x14] SETGE AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0018871b MOV RDI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RAX + 0x10] ADD ESI,0x1 MOV EDX,dword ptr [RSP + 0x4] CALL 0x00173e50 CMP EAX,0x0 JZ 0x00188719 MOV dword ptr [RSP + 0x14],0xffffffff JMP 0x0018877e LAB_00188719: JMP 0x0018871b LAB_0018871b: MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX + 0x18],0x0 JZ 0x00188750 MOV EAX,dword ptr [RSP + 0x4] MOV DX,AX MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RSI,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSI + 0x10] MOV EDI,ECX ADD EDI,0x1 MOV dword ptr [RSI + 0x10],EDI MOVSXD RCX,ECX MOV word ptr [RAX + RCX*0x2 + 0x18],DX JMP 0x00188776 LAB_00188750: MOV EAX,dword ptr [RSP + 0x4] MOV DL,AL MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RSI,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSI + 0x10] MOV EDI,ECX ADD EDI,0x1 MOV dword ptr [RSI + 0x10],EDI MOVSXD RCX,ECX MOV byte ptr [RAX + RCX*0x1 + 0x18],DL LAB_00188776: MOV dword ptr [RSP + 0x14],0x0 LAB_0018877e: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
int4 string_buffer_putc8(long param_1,int4 param_2) { int iVar1; int4 local_4; if ((*(int *)(param_1 + 0x10) < *(int *)(param_1 + 0x14)) || (iVar1 = string_buffer_realloc(param_1,*(int *)(param_1 + 0x10) + 1,param_2), iVar1 == 0)) { if (*(int *)(param_1 + 0x18) == 0) { iVar1 = *(int *)(param_1 + 0x10); *(int *)(param_1 + 0x10) = iVar1 + 1; *(char *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1) = (char)param_2; } else { iVar1 = *(int *)(param_1 + 0x10); *(int *)(param_1 + 0x10) = iVar1 + 1; *(short *)(*(long *)(param_1 + 8) + 0x18 + (long)iVar1 * 2) = (short)param_2; } local_4 = 0; } else { local_4 = 0xffffffff; } return local_4; }
46,804
js_json_parse
bluesky950520[P]quickjs/quickjs.c
static JSValue js_json_parse(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj, root; JSValue reviver; const char *str; size_t len; str = JS_ToCStringLen(ctx, &len, argv[0]); if (!str) return JS_EXCEPTION; obj = JS_ParseJSON(ctx, str, len, "<input>"); JS_FreeCString(ctx, str); if (JS_IsException(obj)) return obj; if (argc > 1 && JS_IsFunction(ctx, argv[1])) { reviver = argv[1]; root = JS_NewObject(ctx); if (JS_IsException(root)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } if (JS_DefinePropertyValue(ctx, root, JS_ATOM_empty_string, obj, JS_PROP_C_W_E) < 0) { JS_FreeValue(ctx, root); return JS_EXCEPTION; } obj = internalize_json_property(ctx, root, JS_ATOM_empty_string, reviver); JS_FreeValue(ctx, root); } return obj; }
O1
c
js_json_parse: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r8, %r13 movl %ecx, %ebp movq %rdi, %r15 movq (%r8), %rdx movq 0x8(%r8), %rcx leaq 0x20(%rsp), %rsi xorl %ebx, %ebx xorl %r8d, %r8d callq 0x20bf7 movl $0x6, %r14d testq %rax, %rax je 0x4dd85 movq %rax, %r12 movq 0x20(%rsp), %rdx leaq 0x517d4(%rip), %rcx # 0x9f41b movq %r15, %rdi movq %rax, %rsi callq 0x33ba9 movq %rax, %rbx movq 0x18(%r15), %rdi movl -0x18(%r12), %eax leal -0x1(%rax), %ecx movl %ecx, -0x18(%r12) cmpl $0x1, %eax jg 0x4dc84 addq $-0x18, %r12 movq %r12, %rsi movq %rdx, %r12 movq $-0x7, %rdx callq 0x21266 movq %r12, %rdx cmpl $0x6, %edx jne 0x4dc9e movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %rbx, %rcx andq %rax, %rcx jmp 0x4dd6d cmpl $0x2, %ebp jl 0x4dd60 movq %rdx, %r12 movq 0x10(%r13), %rbp movq 0x18(%r13), %r13 movq %r15, %rdi movq %rbp, %rsi movq %r13, %rdx callq 0x22dbe testl %eax, %eax je 0x4dcfa movq %r13, 0x18(%rsp) movq 0x40(%r15), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx movq %r15, %rdi movl $0x1, %ecx callq 0x20f05 movq %rdx, %r13 cmpl $0x6, %r13d jne 0x4dcff movq 0x18(%r15), %rdi movq %rbx, %rsi movq %r12, %rdx jmp 0x4dd7e movq %r12, %rdx jmp 0x4dd60 movl $0x7, (%rsp) movq %r15, %rdi movq %rax, 0x10(%rsp) movq %rax, %rsi movq %r13, %rdx movl $0x2f, %ecx movq %rbx, %r8 movq %r12, %r9 callq 0x26abb testl %eax, %eax js 0x4dd72 movq %r15, %rdi movq 0x10(%rsp), %r12 movq %r12, %rsi movq %r13, %rdx movl $0x2f, %ecx movq %rbp, %r8 movq 0x18(%rsp), %r9 callq 0x4dd9e movq %rax, %rbx movq %rdx, %r14 movq 0x18(%r15), %rdi movq %r12, %rsi movq %r13, %rdx callq 0x1d8c6 movq %r14, %rdx movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rbx, %rcx movq %rdx, %r14 jmp 0x4dd87 movq 0x18(%r15), %rdi movq 0x10(%rsp), %rsi movq %r13, %rdx callq 0x1d8c6 xorl %ebx, %ebx xorl %ecx, %ecx movl %ebx, %eax orq %rcx, %rax movq %r14, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_json_parse: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r13, r8 mov ebp, ecx mov r15, rdi mov rdx, [r8] mov rcx, [r8+8] lea rsi, [rsp+58h+var_38] xor ebx, ebx xor r8d, r8d call JS_ToCStringLen2 mov r14d, 6 test rax, rax jz loc_4DD85 mov r12, rax mov rdx, [rsp+58h+var_38] lea rcx, aInput; "<input>" mov rdi, r15 mov rsi, rax call JS_ParseJSON mov rbx, rax mov rdi, [r15+18h] mov eax, [r12-18h] lea ecx, [rax-1] mov [r12-18h], ecx cmp eax, 1 jg short loc_4DC84 add r12, 0FFFFFFFFFFFFFFE8h mov rsi, r12 mov r12, rdx mov rdx, 0FFFFFFFFFFFFFFF9h call js_free_value_rt mov rdx, r12 loc_4DC84: cmp edx, 6 jnz short loc_4DC9E mov rax, 0FFFFFFFF00000000h mov rcx, rbx and rcx, rax jmp loc_4DD6D loc_4DC9E: cmp ebp, 2 jl loc_4DD60 mov r12, rdx mov rbp, [r13+10h] mov r13, [r13+18h] mov rdi, r15 mov rsi, rbp mov rdx, r13 call JS_IsFunction test eax, eax jz short loc_4DCFA mov [rsp+58h+var_40], r13 mov rax, [r15+40h] mov rsi, [rax+10h] mov rdx, [rax+18h] mov rdi, r15 mov ecx, 1 call JS_NewObjectProtoClass mov r13, rdx cmp r13d, 6 jnz short loc_4DCFF mov rdi, [r15+18h] mov rsi, rbx mov rdx, r12 jmp loc_4DD7E loc_4DCFA: mov rdx, r12 jmp short loc_4DD60 loc_4DCFF: mov [rsp+58h+var_58], 7 mov rdi, r15 mov [rsp+58h+var_48], rax mov rsi, rax mov rdx, r13 mov ecx, 2Fh ; '/' mov r8, rbx mov r9, r12 call JS_DefinePropertyValue test eax, eax js short loc_4DD72 mov rdi, r15 mov r12, [rsp+58h+var_48] mov rsi, r12 mov rdx, r13 mov ecx, 2Fh ; '/' mov r8, rbp mov r9, [rsp+58h+var_40] call internalize_json_property mov rbx, rax mov r14, rdx mov rdi, [r15+18h] mov rsi, r12 mov rdx, r13 call JS_FreeValueRT mov rdx, r14 loc_4DD60: mov rcx, 0FFFFFFFF00000000h and rcx, rbx loc_4DD6D: mov r14, rdx jmp short loc_4DD87 loc_4DD72: mov rdi, [r15+18h] mov rsi, [rsp+58h+var_48] mov rdx, r13 loc_4DD7E: call JS_FreeValueRT xor ebx, ebx loc_4DD85: xor ecx, ecx loc_4DD87: mov eax, ebx or rax, rcx mov rdx, r14 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_json_parse( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9, long long a10, long long a11, int a12, long long *a13) { long long v16; // rbx long long v17; // rax double v18; // xmm4_8 double v19; // xmm5_8 long long v20; // r12 long long v21; // rdx long long v22; // rdi int v23; // eax _QWORD *v24; // rsi long long v25; // r12 unsigned long long v26; // rcx long long v27; // r12 long long v28; // rbp long long v29; // r13 unsigned long long v30; // rax long long v31; // rdx __m128 v32; // xmm4 __m128 v33; // xmm5 long long v34; // r13 long long v35; // rdi _DWORD *v36; // rsi long long v37; // rdx _DWORD *v39; // [rsp+10h] [rbp-48h] long long v40; // [rsp+18h] [rbp-40h] long long v41[7]; // [rsp+20h] [rbp-38h] BYREF LODWORD(v16) = 0; v17 = JS_ToCStringLen2(a1, v41, *a13, a13[1], 0); if ( !v17 ) goto LABEL_16; v20 = v17; v16 = (long long)JS_ParseJSON(a1, v17, v41[0], (long long)"<input>", a2, a3, a4, a5, v18, v19, a8, a9); v22 = *(_QWORD *)(a1 + 24); v23 = *(_DWORD *)(v20 - 24); *(_DWORD *)(v20 - 24) = v23 - 1; if ( v23 <= 1 ) { v24 = (_QWORD *)(v20 - 24); v25 = v21; js_free_value_rt(v22, v24, -7); v21 = v25; } if ( (_DWORD)v21 != 6 ) { if ( a12 >= 2 ) { v27 = v21; v28 = a13[2]; v29 = a13[3]; if ( (unsigned int)JS_IsFunction(a1, v28, v29) ) { v40 = v29; v30 = JS_NewObjectProtoClass( a1, *(_QWORD *)(*(_QWORD *)(a1 + 64) + 16LL), *(_QWORD *)(*(_QWORD *)(a1 + 64) + 24LL), 1u); v34 = v31; if ( (_DWORD)v31 == 6 ) { v35 = *(_QWORD *)(a1 + 24); v36 = (_DWORD *)v16; v37 = v27; LABEL_15: JS_FreeValueRT(v35, v36, v37); LODWORD(v16) = 0; LABEL_16: v26 = 0LL; return v26 | (unsigned int)v16; } v39 = (_DWORD *)v30; if ( (int)JS_DefinePropertyValue( a1, v30, v31, 47LL, (_DWORD *)v16, v27, *(double *)a2.m128_u64, a3, a4, a5, v32, v33, a8, a9, 7) < 0 ) { v35 = *(_QWORD *)(a1 + 24); v36 = v39; v37 = v34; goto LABEL_15; } v16 = internalize_json_property(a1, v39, v34, 47LL, v28, v40); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v39, v34); } } v26 = v16 & 0xFFFFFFFF00000000LL; return v26 | (unsigned int)v16; } v26 = v16 & 0xFFFFFFFF00000000LL; return v26 | (unsigned int)v16; }
46,805
js_json_parse
bluesky950520[P]quickjs/quickjs.c
static JSValue js_json_parse(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue obj, root; JSValue reviver; const char *str; size_t len; str = JS_ToCStringLen(ctx, &len, argv[0]); if (!str) return JS_EXCEPTION; obj = JS_ParseJSON(ctx, str, len, "<input>"); JS_FreeCString(ctx, str); if (JS_IsException(obj)) return obj; if (argc > 1 && JS_IsFunction(ctx, argv[1])) { reviver = argv[1]; root = JS_NewObject(ctx); if (JS_IsException(root)) { JS_FreeValue(ctx, obj); return JS_EXCEPTION; } if (JS_DefinePropertyValue(ctx, root, JS_ATOM_empty_string, obj, JS_PROP_C_W_E) < 0) { JS_FreeValue(ctx, root); return JS_EXCEPTION; } obj = internalize_json_property(ctx, root, JS_ATOM_empty_string, reviver); JS_FreeValue(ctx, root); } return obj; }
O2
c
js_json_parse: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %r8, %rbp movl %ecx, %r13d movq %rdi, %r15 movq (%r8), %rdx movq 0x8(%r8), %rcx leaq 0x20(%rsp), %rsi callq 0x36bee pushq $0x6 popq %rbx testq %rax, %rax je 0x42bb1 movq %rax, %r12 movq 0x20(%rsp), %rdx leaq 0x438ae(%rip), %rcx # 0x8636b movq %r15, %rdi movq %rax, %rsi callq 0x2d105 movq %rax, %r14 movq %r15, %rdi movq %r12, %rsi movq %rdx, %r12 callq 0x1b057 cmpl $0x6, %r12d jne 0x42af4 movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 movq %r14, %rcx andq %rax, %rcx jmp 0x42b9a cmpl $0x2, %r13d jl 0x42b8d movq 0x10(%rbp), %r13 movq 0x18(%rbp), %rbp movq %r15, %rdi movq %r13, %rsi movq %rbp, %rdx callq 0x1ce7d testl %eax, %eax je 0x42b8d movq %r15, %rdi callq 0x1b2c9 cmpl $0x6, %edx jne 0x42b30 movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx jmp 0x42bac movl $0x7, (%rsp) pushq $0x2f popq %rcx movq %r15, %rdi movq %rax, 0x10(%rsp) movq %rax, %rsi movq %rdx, 0x18(%rsp) movq %r14, %r8 movq %r12, %r9 callq 0x20872 testl %eax, %eax js 0x42b9f pushq $0x2f popq %rcx movq %r15, %rdi movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rbx movq %rbx, %rdx movq %r13, %r8 movq %rbp, %r9 callq 0x42bf7 movq %rax, %r14 movq %rdx, %r12 movq %r15, %rdi movq 0x10(%rsp), %rsi movq %rbx, %rdx callq 0x1801e movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %r14, %rcx movq %r12, %rbx jmp 0x42bb6 movq %r15, %rdi movq 0x10(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0x1801e xorl %r14d, %r14d xorl %ecx, %ecx movl %r14d, %eax orq %rcx, %rax movq %rbx, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_json_parse: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbp, r8 mov r13d, ecx mov r15, rdi mov rdx, [r8] mov rcx, [r8+8] lea rsi, [rsp+58h+var_38] call JS_ToCStringLen_0 push 6 pop rbx test rax, rax jz loc_42BB1 mov r12, rax mov rdx, [rsp+58h+var_38] lea rcx, aInput; "<input>" mov rdi, r15 mov rsi, rax call JS_ParseJSON mov r14, rax mov rdi, r15 mov rsi, r12 mov r12, rdx call JS_FreeCString cmp r12d, 6 jnz short loc_42AF4 mov rax, 0FFFFFFFF00000000h mov rcx, r14 and rcx, rax jmp loc_42B9A loc_42AF4: cmp r13d, 2 jl loc_42B8D mov r13, [rbp+10h] mov rbp, [rbp+18h] mov rdi, r15 mov rsi, r13 mov rdx, rbp call JS_IsFunction test eax, eax jz short loc_42B8D mov rdi, r15 call JS_NewObject cmp edx, 6 jnz short loc_42B30 mov rdi, r15 mov rsi, r14 mov rdx, r12 jmp short loc_42BAC loc_42B30: mov [rsp+58h+var_58], 7 push 2Fh ; '/' pop rcx mov rdi, r15 mov [rsp+58h+var_48], rax mov rsi, rax mov [rsp+58h+var_40], rdx mov r8, r14 mov r9, r12 call JS_DefinePropertyValue test eax, eax js short loc_42B9F push 2Fh ; '/' pop rcx mov rdi, r15 mov rsi, [rsp+58h+var_48] mov rbx, [rsp+58h+var_40] mov rdx, rbx mov r8, r13 mov r9, rbp call internalize_json_property mov r14, rax mov r12, rdx mov rdi, r15 mov rsi, [rsp+58h+var_48] mov rdx, rbx call JS_FreeValue loc_42B8D: mov rcx, 0FFFFFFFF00000000h and rcx, r14 loc_42B9A: mov rbx, r12 jmp short loc_42BB6 loc_42B9F: mov rdi, r15 mov rsi, [rsp+58h+var_48] mov rdx, [rsp+58h+var_40] loc_42BAC: call JS_FreeValue loc_42BB1: xor r14d, r14d xor ecx, ecx loc_42BB6: mov eax, r14d or rax, rcx mov rdx, rbx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_json_parse( long long a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, double a6, double a7, __m128 a8, __m128 a9, long long a10, long long a11, int a12, long long *a13) { long long v15; // rax double v16; // xmm4_8 double v17; // xmm5_8 long long v18; // r12 long long v19; // r14 long long v20; // rsi long long v21; // rdx long long v22; // r12 unsigned long long v23; // rcx long long v24; // r13 long long v25; // rbp long long v26; // rax long long v27; // rdx __m128 v28; // xmm4 __m128 v29; // xmm5 long long v30; // rsi long long v31; // rdx long long v33; // [rsp+10h] [rbp-48h] long long v34; // [rsp+18h] [rbp-40h] long long v35[7]; // [rsp+20h] [rbp-38h] BYREF v15 = JS_ToCStringLen_0(a1, v35, *a13, a13[1]); if ( !v15 ) goto LABEL_13; v18 = v15; v19 = JS_ParseJSON(a1, v15, v35[0], (long long)"<input>", a2, a3, a4, a5, v16, v17, a8, a9); v20 = v18; v22 = v21; JS_FreeCString(a1, v20); if ( (_DWORD)v22 != 6 ) { if ( a12 >= 2 ) { v24 = a13[2]; v25 = a13[3]; if ( (unsigned int)JS_IsFunction(a1, v24, v25) ) { v26 = JS_NewObject(a1); if ( (_DWORD)v27 == 6 ) { v30 = v19; v31 = v22; LABEL_12: JS_FreeValue(a1, v30, v31); LABEL_13: LODWORD(v19) = 0; v23 = 0LL; return v23 | (unsigned int)v19; } v33 = v26; v34 = v27; if ( (int)JS_DefinePropertyValue( a1, v26, v27, 47LL, (_DWORD *)v19, v22, *(double *)a2.m128_u64, a3, a4, a5, v28, v29, a8, a9, 7) < 0 ) { v30 = v33; v31 = v34; goto LABEL_12; } v19 = internalize_json_property(a1, v33, v34, 47LL, v24, v25); JS_FreeValue(a1, v33, v34); } } v23 = v19 & 0xFFFFFFFF00000000LL; return v23 | (unsigned int)v19; } v23 = v19 & 0xFFFFFFFF00000000LL; return v23 | (unsigned int)v19; }
js_json_parse: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBP,R8 MOV R13D,ECX MOV R15,RDI MOV RDX,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] LEA RSI,[RSP + 0x20] CALL 0x00136bee PUSH 0x6 POP RBX TEST RAX,RAX JZ 0x00142bb1 MOV R12,RAX MOV RDX,qword ptr [RSP + 0x20] LEA RCX,[0x18636b] MOV RDI,R15 MOV RSI,RAX CALL 0x0012d105 MOV R14,RAX MOV RDI,R15 MOV RSI,R12 MOV R12,RDX CALL 0x0011b057 CMP R12D,0x6 JNZ 0x00142af4 MOV RAX,-0x100000000 MOV RCX,R14 AND RCX,RAX JMP 0x00142b9a LAB_00142af4: CMP R13D,0x2 JL 0x00142b8d MOV R13,qword ptr [RBP + 0x10] MOV RBP,qword ptr [RBP + 0x18] MOV RDI,R15 MOV RSI,R13 MOV RDX,RBP CALL 0x0011ce7d TEST EAX,EAX JZ 0x00142b8d MOV RDI,R15 CALL 0x0011b2c9 CMP EDX,0x6 JNZ 0x00142b30 MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 JMP 0x00142bac LAB_00142b30: MOV dword ptr [RSP],0x7 PUSH 0x2f POP RCX MOV RDI,R15 MOV qword ptr [RSP + 0x10],RAX MOV RSI,RAX MOV qword ptr [RSP + 0x18],RDX MOV R8,R14 MOV R9,R12 CALL 0x00120872 TEST EAX,EAX JS 0x00142b9f PUSH 0x2f POP RCX MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x10] MOV RBX,qword ptr [RSP + 0x18] MOV RDX,RBX MOV R8,R13 MOV R9,RBP CALL 0x00142bf7 MOV R14,RAX MOV R12,RDX MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RBX CALL 0x0011801e LAB_00142b8d: MOV RCX,-0x100000000 AND RCX,R14 LAB_00142b9a: MOV RBX,R12 JMP 0x00142bb6 LAB_00142b9f: MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x18] LAB_00142bac: CALL 0x0011801e LAB_00142bb1: XOR R14D,R14D XOR ECX,ECX LAB_00142bb6: MOV EAX,R14D OR RAX,RCX MOV RDX,RBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_json_parse(int8 param_1,int8 param_2,int8 param_3,int param_4, int8 *param_5) { int8 uVar1; int8 uVar2; int iVar3; long lVar4; int8 uVar5; ulong uVar6; int1 auVar8 [16]; int1 auVar9 [16]; int8 local_38; int8 uVar7; lVar4 = JS_ToCStringLen(param_1,&local_38,*param_5,param_5[1]); if (lVar4 == 0) { LAB_00142bb1: auVar8 = ZEXT816(6) << 0x40; uVar6 = 0; } else { auVar8 = JS_ParseJSON(param_1,lVar4,local_38,"<input>"); JS_FreeCString(param_1,lVar4); if ((auVar8._8_4_ != 6) && (1 < param_4)) { uVar1 = param_5[2]; uVar2 = param_5[3]; iVar3 = JS_IsFunction(param_1,uVar1,uVar2); if (iVar3 != 0) { auVar9 = JS_NewObject(param_1); uVar7 = auVar9._8_8_; uVar5 = auVar9._0_8_; if ((auVar9._8_4_ == 6) || (iVar3 = JS_DefinePropertyValue(param_1,uVar5,uVar7,0x2f,auVar8._0_8_,auVar8._8_8_,7), auVar8 = auVar9, iVar3 < 0)) { JS_FreeValue(param_1,auVar8._0_8_,auVar8._8_8_); goto LAB_00142bb1; } auVar8 = internalize_json_property(param_1,uVar5,uVar7,0x2f,uVar1,uVar2); JS_FreeValue(param_1,uVar5,uVar7); } } uVar6 = auVar8._0_8_ & 0xffffffff00000000; } auVar9._0_8_ = auVar8._0_8_ & 0xffffffff | uVar6; auVar9._8_8_ = auVar8._8_8_; return auVar9; }
46,806
void testing::internal::InitGoogleTestImpl<char>(int*, char**)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest.cc
void InitGoogleTestImpl(int* argc, CharType** argv) { // We don't want to run the initialization code twice. if (GTestIsInitialized()) return; if (*argc <= 0) return; g_argvs.clear(); for (int i = 0; i != *argc; i++) { g_argvs.push_back(StreamableToString(argv[i])); } #ifdef GTEST_HAS_ABSL absl::InitializeSymbolizer(g_argvs[0].c_str()); #ifdef GTEST_HAS_ABSL_FLAGS // When using the Abseil Flags library, set the program usage message to the // help message, but remove the color-encoding from the message first. absl::SetProgramUsageMessage(absl::StrReplaceAll( kColorEncodedHelpMessage, {{"@D", ""}, {"@R", ""}, {"@G", ""}, {"@Y", ""}, {"@@", "@"}})); #endif // GTEST_HAS_ABSL_FLAGS #endif // GTEST_HAS_ABSL ParseGoogleTestFlagsOnly(argc, argv); GetUnitTestImpl()->PostFlagParsingInit(); }
O0
cpp
void testing::internal::InitGoogleTestImpl<char>(int*, char**): subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) callq 0xe36a0 testb $0x1, %al jne 0xf48f9 jmp 0xf48fe jmp 0xf49ab movq 0x50(%rsp), %rax cmpl $0x0, (%rax) jg 0xf490d jmp 0xf49ab leaq 0x91414(%rip), %rdi # 0x185d28 callq 0x113f80 movl $0x0, 0x44(%rsp) movl 0x44(%rsp), %eax movq 0x50(%rsp), %rcx cmpl (%rcx), %eax je 0xf498f movq 0x48(%rsp), %rax movslq 0x44(%rsp), %rcx leaq (%rax,%rcx,8), %rsi leaq 0x20(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x113df0 movq 0x8(%rsp), %rsi leaq 0x913d1(%rip), %rdi # 0x185d28 callq 0xedbb0 jmp 0xf495e leaq 0x20(%rsp), %rdi callq 0x1dfd0 movl 0x44(%rsp), %eax addl $0x1, %eax movl %eax, 0x44(%rsp) jmp 0xf4921 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x20(%rsp), %rdi callq 0x1dfd0 jmp 0xf49b0 movq 0x50(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0xe48e0 callq 0xeaeb0 movq %rax, %rdi callq 0xe3230 addq $0x58, %rsp retq movq 0x18(%rsp), %rdi callq 0x16cf0 nopw (%rax,%rax)
_ZN7testing8internal18InitGoogleTestImplIcEEvPiPPT_: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi call _ZN7testing8internalL18GTestIsInitializedEv; testing::internal::GTestIsInitialized(void) test al, 1 jnz short loc_F48F9 jmp short loc_F48FE loc_F48F9: jmp loc_F49AB loc_F48FE: mov rax, [rsp+58h+var_8] cmp dword ptr [rax], 0 jg short loc_F490D jmp loc_F49AB loc_F490D: lea rdi, _ZN7testing8internalL7g_argvsB5cxx11E; testing::internal::g_argvs call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5clearEv; std::vector<std::string>::clear(void) mov [rsp+58h+var_14], 0 loc_F4921: mov eax, [rsp+58h+var_14] mov rcx, [rsp+58h+var_8] cmp eax, [rcx] jz short loc_F498F mov rax, [rsp+58h+var_10] movsxd rcx, [rsp+58h+var_14] lea rsi, [rax+rcx*8] lea rdi, [rsp+58h+var_38] mov [rsp+58h+var_50], rdi call _ZN7testing8internal18StreamableToStringIPcEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::internal::StreamableToString<char *>(char * const&) mov rsi, [rsp+58h+var_50] lea rdi, _ZN7testing8internalL7g_argvsB5cxx11E; testing::internal::g_argvs call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_; std::vector<std::string>::push_back(std::string&&) jmp short $+2 loc_F495E: lea rdi, [rsp+58h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov eax, [rsp+58h+var_14] add eax, 1 mov [rsp+58h+var_14], eax jmp short loc_F4921 mov rcx, rax mov eax, edx mov [rsp+arg_10], rcx mov [rsp+arg_C], eax lea rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_F49B0 loc_F498F: mov rdi, [rsp+58h+var_8]; this mov rsi, [rsp+58h+var_10]; int * call _ZN7testing8internal24ParseGoogleTestFlagsOnlyEPiPPc; testing::internal::ParseGoogleTestFlagsOnly(int *,char **) call _ZN7testing8internal15GetUnitTestImplEv; testing::internal::GetUnitTestImpl(void) mov rdi, rax; this call _ZN7testing8internal12UnitTestImpl19PostFlagParsingInitEv; testing::internal::UnitTestImpl::PostFlagParsingInit(void) loc_F49AB: add rsp, 58h retn loc_F49B0: mov rdi, [rsp+arg_10] call __Unwind_Resume
void testing::internal::InitGoogleTestImpl<char>(testing::internal *a1, int *a2) { char **v2; // rdx int v3; // r8d int v4; // r9d testing::internal *v5; // rdi testing::internal::UnitTestImpl *UnitTestImpl; // rax int v7; // [rsp+0h] [rbp-58h] long long v8; // [rsp+8h] [rbp-50h] int v9; // [rsp+10h] [rbp-48h] int v10; // [rsp+18h] [rbp-40h] long long v11; // [rsp+20h] [rbp-38h] BYREF char v12; // [rsp+28h] [rbp-30h] int i; // [rsp+44h] [rbp-14h] int *v14; // [rsp+48h] [rbp-10h] testing::internal *v15; // [rsp+50h] [rbp-8h] v15 = a1; v14 = a2; if ( (testing::internal::GTestIsInitialized(a1) & 1) == 0 && *(int *)v15 > 0 ) { std::vector<std::string>::clear(&testing::internal::g_argvs[abi:cxx11]); for ( i = 0; i != *(_DWORD *)v15; ++i ) { testing::internal::StreamableToString<char *>( (unsigned int)&v11, (_DWORD)v14 + 8 * i, (_DWORD)v2, i, v3, v4, v7, (unsigned int)&v11, v9, v10, v11, v12); std::vector<std::string>::push_back((long long)&testing::internal::g_argvs[abi:cxx11], v8); std::string::~string(&v11); } v5 = v15; testing::internal::ParseGoogleTestFlagsOnly(v15, v14, v2); UnitTestImpl = (testing::internal::UnitTestImpl *)testing::internal::GetUnitTestImpl(v5); testing::internal::UnitTestImpl::PostFlagParsingInit(UnitTestImpl); } }
InitGoogleTestImpl<char>: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI CALL 0x001e36a0 TEST AL,0x1 JNZ 0x001f48f9 JMP 0x001f48fe LAB_001f48f9: JMP 0x001f49ab LAB_001f48fe: MOV RAX,qword ptr [RSP + 0x50] CMP dword ptr [RAX],0x0 JG 0x001f490d JMP 0x001f49ab LAB_001f490d: LEA RDI,[0x285d28] CALL 0x00213f80 MOV dword ptr [RSP + 0x44],0x0 LAB_001f4921: MOV EAX,dword ptr [RSP + 0x44] MOV RCX,qword ptr [RSP + 0x50] CMP EAX,dword ptr [RCX] JZ 0x001f498f MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,dword ptr [RSP + 0x44] LEA RSI,[RAX + RCX*0x8] LEA RDI,[RSP + 0x20] MOV qword ptr [RSP + 0x8],RDI CALL 0x00213df0 MOV RSI,qword ptr [RSP + 0x8] LAB_001f4950: LEA RDI,[0x285d28] CALL 0x001edbb0 LAB_001f495c: JMP 0x001f495e LAB_001f495e: LEA RDI,[RSP + 0x20] CALL 0x0011dfd0 MOV EAX,dword ptr [RSP + 0x44] ADD EAX,0x1 MOV dword ptr [RSP + 0x44],EAX JMP 0x001f4921 LAB_001f498f: MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x48] CALL 0x001e48e0 CALL 0x001eaeb0 MOV RDI,RAX CALL 0x001e3230 LAB_001f49ab: ADD RSP,0x58 RET
/* void testing::internal::InitGoogleTestImpl<char>(int*, char**) */ void testing::internal::InitGoogleTestImpl<char>(int *param_1,char **param_2) { ulong uVar1; UnitTestImpl *this; internal local_38 [36]; int local_14; char **local_10; int *local_8; local_10 = param_2; local_8 = param_1; uVar1 = GTestIsInitialized(); if (((uVar1 & 1) == 0) && (0 < *local_8)) { std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::clear ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) g_argvs_abi_cxx11_); for (local_14 = 0; local_14 != *local_8; local_14 = local_14 + 1) { StreamableToString<char*>(local_38,local_10 + local_14); /* try { // try from 001f4950 to 001f495b has its CatchHandler @ 001f4975 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::push_back ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) g_argvs_abi_cxx11_,(string *)local_38); std::__cxx11::string::~string((string *)local_38); } ParseGoogleTestFlagsOnly(local_8,local_10); this = (UnitTestImpl *)GetUnitTestImpl(); UnitTestImpl::PostFlagParsingInit(this); } return; }
46,807
sp_make_key
eloqsql/storage/myisam/sp_key.c
uint sp_make_key(register MI_INFO *info, uint keynr, uchar *key, const uchar *record, my_off_t filepos) { HA_KEYSEG *keyseg; MI_KEYDEF *keyinfo = &info->s->keyinfo[keynr]; uint len = 0; uchar *pos; uint dlen; uchar *dptr; double mbr[SPDIMS * 2]; uint i; keyseg = &keyinfo->seg[-1]; pos = (uchar*)record + keyseg->start; dlen = _mi_calc_blob_length(keyseg->bit_start, pos); memcpy(&dptr, pos + keyseg->bit_start, sizeof(char*)); if (!dptr) { my_errno= HA_ERR_NULL_IN_SPATIAL; 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 == sizeof(double)); DBUG_ASSERT(!(start % sizeof(double))); 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) { uchar buf[sizeof(double)]; float8store(buf, val); pos= &buf[length]; while (pos > buf) *key++ = *--pos; } else { float8store((uchar *)key, val); key += length; } len+= length; } _mi_dpointer(info, key, filepos); return len; }
O0
c
sp_make_key: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x20(%rbp) movl %esi, -0x24(%rbp) movq %rdx, -0x30(%rbp) movq %rcx, -0x38(%rbp) movq %r8, -0x40(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0x24(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movl $0x0, -0x54(%rbp) movq -0x50(%rbp), %rax movq 0x28(%rax), %rax addq $-0x20, %rax movq %rax, -0x48(%rbp) movq -0x38(%rbp), %rax movq -0x48(%rbp), %rcx movl 0x8(%rcx), %ecx addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x48(%rbp), %rax movzbl 0x1a(%rax), %edi movq -0x60(%rbp), %rsi callq 0xac820 movl %eax, -0x64(%rbp) movq -0x60(%rbp), %rax movq -0x48(%rbp), %rcx movzbl 0x1a(%rcx), %ecx movslq %ecx, %rcx movq (%rax,%rcx), %rax movq %rax, -0x70(%rbp) cmpq $0x0, -0x70(%rbp) jne 0xd7849 callq 0xf7a70 movl $0x9e, (%rax) movl $0x0, -0x14(%rbp) jmp 0xd79e2 movq -0x70(%rbp), %rdi addq $0x4, %rdi movl -0x64(%rbp), %esi subl $0x4, %esi leaq -0x90(%rbp), %rcx movl $0x2, %edx callq 0xd7a20 movl $0x0, -0x94(%rbp) movq -0x50(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax cmpb $0x0, 0x18(%rax) je 0xd79cb movq -0x48(%rbp), %rax movzwl 0x14(%rax), %eax movl %eax, -0x98(%rbp) movq -0x48(%rbp), %rax movl 0x8(%rax), %eax movl %eax, -0x9c(%rbp) jmp 0xd78a9 jmp 0xd78ab jmp 0xd78ad jmp 0xd78af jmp 0xd78b1 jmp 0xd78b3 jmp 0xd78b5 movl -0x9c(%rbp), %eax shrq $0x3, %rax movsd -0x90(%rbp,%rax,8), %xmm0 movsd %xmm0, -0xa8(%rbp) movsd -0xa8(%rbp), %xmm0 ucomisd %xmm0, %xmm0 setp %al testb $0x1, %al jne 0xd78e5 jmp 0xd791c movq -0x30(%rbp), %rdi movl -0x98(%rbp), %eax movl %eax, %edx xorl %esi, %esi callq 0x2a2a0 movl -0x98(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x30(%rbp) movl -0x98(%rbp), %eax addl -0x54(%rbp), %eax movl %eax, -0x54(%rbp) jmp 0xd79ab movq -0x48(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x40, %eax cmpl $0x0, %eax je 0xd797e movq -0xa8(%rbp), %rax movq %rax, -0x10(%rbp) movl -0x98(%rbp), %eax movl %eax, %ecx leaq -0x10(%rbp), %rax addq %rcx, %rax movq %rax, -0x60(%rbp) movq -0x60(%rbp), %rax leaq -0x10(%rbp), %rcx cmpq %rcx, %rax jbe 0xd797c movq -0x60(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x60(%rbp) movb -0x1(%rax), %cl movq -0x30(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x30(%rbp) movb %cl, (%rax) jmp 0xd794a jmp 0xd799f movq -0x30(%rbp), %rax movq -0xa8(%rbp), %rcx movq %rcx, (%rax) movl -0x98(%rbp), %ecx movq -0x30(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x30(%rbp) movl -0x98(%rbp), %eax addl -0x54(%rbp), %eax movl %eax, -0x54(%rbp) movq -0x48(%rbp), %rax addq $0x20, %rax movq %rax, -0x48(%rbp) movl -0x94(%rbp), %eax addl $0x1, %eax movl %eax, -0x94(%rbp) jmp 0xd787e movq -0x20(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x40(%rbp), %rdx callq 0xc2240 movl -0x54(%rbp), %eax movl %eax, -0x14(%rbp) movl -0x14(%rbp), %eax movl %eax, -0xac(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xd7a0c movl -0xac(%rbp), %eax addq $0xb0, %rsp popq %rbp retq callq 0x2a250 nopw %cs:(%rax,%rax)
sp_make_key: push rbp mov rbp, rsp sub rsp, 0B0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_20], rdi mov [rbp+var_24], esi mov [rbp+var_30], rdx mov [rbp+var_38], rcx mov [rbp+var_40], r8 mov rax, [rbp+var_20] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_24] imul rcx, 70h ; 'p' add rax, rcx mov [rbp+var_50], rax mov [rbp+var_54], 0 mov rax, [rbp+var_50] mov rax, [rax+28h] add rax, 0FFFFFFFFFFFFFFE0h mov [rbp+var_48], rax mov rax, [rbp+var_38] mov rcx, [rbp+var_48] mov ecx, [rcx+8] add rax, rcx mov [rbp+var_60], rax mov rax, [rbp+var_48] movzx edi, byte ptr [rax+1Ah] mov rsi, [rbp+var_60] call _mi_calc_blob_length mov [rbp+var_64], eax mov rax, [rbp+var_60] mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx+1Ah] movsxd rcx, ecx mov rax, [rax+rcx] mov [rbp+var_70], rax cmp [rbp+var_70], 0 jnz short loc_D7849 call _my_thread_var mov dword ptr [rax], 9Eh mov [rbp+var_14], 0 jmp loc_D79E2 loc_D7849: mov rdi, [rbp+var_70] add rdi, 4 mov esi, [rbp+var_64] sub esi, 4 lea rcx, [rbp+var_90] mov edx, 2 call sp_mbr_from_wkb_0 mov [rbp+var_94], 0 mov rax, [rbp+var_50] mov rax, [rax+28h] mov [rbp+var_48], rax loc_D787E: mov rax, [rbp+var_48] cmp byte ptr [rax+18h], 0 jz loc_D79CB mov rax, [rbp+var_48] movzx eax, word ptr [rax+14h] mov [rbp+var_98], eax mov rax, [rbp+var_48] mov eax, [rax+8] mov [rbp+var_9C], eax jmp short $+2 loc_D78A9: jmp short $+2 loc_D78AB: jmp short $+2 loc_D78AD: jmp short $+2 loc_D78AF: jmp short $+2 loc_D78B1: jmp short $+2 loc_D78B3: jmp short $+2 loc_D78B5: mov eax, [rbp+var_9C] shr rax, 3 movsd xmm0, [rbp+rax*8+var_90] movsd [rbp+var_A8], xmm0 movsd xmm0, [rbp+var_A8] ucomisd xmm0, xmm0 setp al test al, 1 jnz short loc_D78E5 jmp short loc_D791C loc_D78E5: mov rdi, [rbp+var_30] mov eax, [rbp+var_98] mov edx, eax xor esi, esi call _memset mov ecx, [rbp+var_98] mov rax, [rbp+var_30] mov ecx, ecx add rax, rcx mov [rbp+var_30], rax mov eax, [rbp+var_98] add eax, [rbp+var_54] mov [rbp+var_54], eax jmp loc_D79AB loc_D791C: mov rax, [rbp+var_48] movzx eax, word ptr [rax+12h] and eax, 40h cmp eax, 0 jz short loc_D797E mov rax, [rbp+var_A8] mov [rbp+var_10], rax mov eax, [rbp+var_98] mov ecx, eax lea rax, [rbp+var_10] add rax, rcx mov [rbp+var_60], rax loc_D794A: mov rax, [rbp+var_60] lea rcx, [rbp+var_10] cmp rax, rcx jbe short loc_D797C mov rax, [rbp+var_60] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_60], rcx mov cl, [rax-1] mov rax, [rbp+var_30] mov rdx, rax add rdx, 1 mov [rbp+var_30], rdx mov [rax], cl jmp short loc_D794A loc_D797C: jmp short loc_D799F loc_D797E: mov rax, [rbp+var_30] mov rcx, [rbp+var_A8] mov [rax], rcx mov ecx, [rbp+var_98] mov rax, [rbp+var_30] mov ecx, ecx add rax, rcx mov [rbp+var_30], rax loc_D799F: mov eax, [rbp+var_98] add eax, [rbp+var_54] mov [rbp+var_54], eax loc_D79AB: mov rax, [rbp+var_48] add rax, 20h ; ' ' mov [rbp+var_48], rax mov eax, [rbp+var_94] add eax, 1 mov [rbp+var_94], eax jmp loc_D787E loc_D79CB: mov rdi, [rbp+var_20] mov rsi, [rbp+var_30] mov rdx, [rbp+var_40] call _mi_dpointer mov eax, [rbp+var_54] mov [rbp+var_14], eax loc_D79E2: mov eax, [rbp+var_14] mov [rbp+var_AC], eax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_D7A0C mov eax, [rbp+var_AC] add rsp, 0B0h pop rbp retn loc_D7A0C: call ___stack_chk_fail
long long sp_make_key(long long a1, unsigned int a2, _BYTE *a3, long long a4, unsigned long long a5) { long long v5; // rdi unsigned __int8 *v6; // rax char v7; // cl _BYTE *v8; // rax unsigned int v10; // [rsp+18h] [rbp-98h] int v11; // [rsp+1Ch] [rbp-94h] _QWORD v12[4]; // [rsp+20h] [rbp-90h] BYREF long long v13; // [rsp+40h] [rbp-70h] int v14; // [rsp+4Ch] [rbp-64h] unsigned __int8 *v15; // [rsp+50h] [rbp-60h] unsigned int v16; // [rsp+5Ch] [rbp-54h] long long v17; // [rsp+60h] [rbp-50h] long long v18; // [rsp+68h] [rbp-48h] unsigned long long v19; // [rsp+70h] [rbp-40h] long long v20; // [rsp+78h] [rbp-38h] _BYTE *v21; // [rsp+80h] [rbp-30h] unsigned int v22; // [rsp+8Ch] [rbp-24h] long long v23; // [rsp+90h] [rbp-20h] _QWORD v25[2]; // [rsp+A0h] [rbp-10h] BYREF v25[1] = __readfsqword(0x28u); v23 = a1; v22 = a2; v21 = a3; v20 = a4; v19 = a5; v17 = 112LL * a2 + *(_QWORD *)(*(_QWORD *)a1 + 536LL); v16 = 0; v18 = *(_QWORD *)(v17 + 40) - 32LL; v15 = (unsigned __int8 *)(*(unsigned int *)(v18 + 8) + a4); v5 = *(unsigned __int8 *)(v18 + 26); v14 = mi_calc_blob_length(v5, v15); v13 = *(_QWORD *)&v15[*(unsigned __int8 *)(v18 + 26)]; if ( v13 ) { sp_mbr_from_wkb_0(v13 + 4, (unsigned int)(v14 - 4), 2LL, v12); v11 = 0; v18 = *(_QWORD *)(v17 + 40); while ( *(_BYTE *)(v18 + 24) ) { v10 = *(unsigned __int16 *)(v18 + 20); if ( (*(_WORD *)(v18 + 18) & 0x40) != 0 ) { v25[0] = v12[(unsigned long long)*(unsigned int *)(v18 + 8) >> 3]; v15 = (unsigned __int8 *)v25 + v10; while ( v15 > (unsigned __int8 *)v25 ) { v6 = v15--; v7 = *(v6 - 1); v8 = v21++; *v8 = v7; } } else { *(_QWORD *)v21 = v12[(unsigned long long)*(unsigned int *)(v18 + 8) >> 3]; v21 += v10; } v16 += v10; v18 += 32LL; ++v11; } mi_dpointer(v23, v21, v19); return v16; } else { *(_DWORD *)my_thread_var(v5, (const char *)v15) = 158; return 0; } }
sp_make_key: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x20],RDI MOV dword ptr [RBP + -0x24],ESI MOV qword ptr [RBP + -0x30],RDX MOV qword ptr [RBP + -0x38],RCX MOV qword ptr [RBP + -0x40],R8 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0x24] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV dword ptr [RBP + -0x54],0x0 MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX + 0x28] ADD RAX,-0x20 MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RCX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x48] MOVZX EDI,byte ptr [RAX + 0x1a] MOV RSI,qword ptr [RBP + -0x60] CALL 0x001ac820 MOV dword ptr [RBP + -0x64],EAX MOV RAX,qword ptr [RBP + -0x60] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX + 0x1a] MOVSXD RCX,ECX MOV RAX,qword ptr [RAX + RCX*0x1] MOV qword ptr [RBP + -0x70],RAX CMP qword ptr [RBP + -0x70],0x0 JNZ 0x001d7849 CALL 0x001f7a70 MOV dword ptr [RAX],0x9e MOV dword ptr [RBP + -0x14],0x0 JMP 0x001d79e2 LAB_001d7849: MOV RDI,qword ptr [RBP + -0x70] ADD RDI,0x4 MOV ESI,dword ptr [RBP + -0x64] SUB ESI,0x4 LEA RCX,[RBP + -0x90] MOV EDX,0x2 CALL 0x001d7a20 MOV dword ptr [RBP + -0x94],0x0 MOV RAX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x48],RAX LAB_001d787e: MOV RAX,qword ptr [RBP + -0x48] CMP byte ptr [RAX + 0x18],0x0 JZ 0x001d79cb MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,word ptr [RAX + 0x14] MOV dword ptr [RBP + -0x98],EAX MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x9c],EAX JMP 0x001d78a9 LAB_001d78a9: JMP 0x001d78ab LAB_001d78ab: JMP 0x001d78ad LAB_001d78ad: JMP 0x001d78af LAB_001d78af: JMP 0x001d78b1 LAB_001d78b1: JMP 0x001d78b3 LAB_001d78b3: JMP 0x001d78b5 LAB_001d78b5: MOV EAX,dword ptr [RBP + -0x9c] SHR RAX,0x3 MOVSD XMM0,qword ptr [RBP + RAX*0x8 + -0x90] MOVSD qword ptr [RBP + -0xa8],XMM0 MOVSD XMM0,qword ptr [RBP + -0xa8] UCOMISD XMM0,XMM0 SETP AL TEST AL,0x1 JNZ 0x001d78e5 JMP 0x001d791c LAB_001d78e5: MOV RDI,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RBP + -0x98] MOV EDX,EAX XOR ESI,ESI CALL 0x0012a2a0 MOV ECX,dword ptr [RBP + -0x98] MOV RAX,qword ptr [RBP + -0x30] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV EAX,dword ptr [RBP + -0x98] ADD EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x54],EAX JMP 0x001d79ab LAB_001d791c: MOV RAX,qword ptr [RBP + -0x48] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x40 CMP EAX,0x0 JZ 0x001d797e MOV RAX,qword ptr [RBP + -0xa8] MOV qword ptr [RBP + -0x10],RAX MOV EAX,dword ptr [RBP + -0x98] MOV ECX,EAX LEA RAX,[RBP + -0x10] ADD RAX,RCX MOV qword ptr [RBP + -0x60],RAX LAB_001d794a: MOV RAX,qword ptr [RBP + -0x60] LEA RCX,[RBP + -0x10] CMP RAX,RCX JBE 0x001d797c MOV RAX,qword ptr [RBP + -0x60] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x60],RCX MOV CL,byte ptr [RAX + -0x1] MOV RAX,qword ptr [RBP + -0x30] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x30],RDX MOV byte ptr [RAX],CL JMP 0x001d794a LAB_001d797c: JMP 0x001d799f LAB_001d797e: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0xa8] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RBP + -0x98] MOV RAX,qword ptr [RBP + -0x30] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX LAB_001d799f: MOV EAX,dword ptr [RBP + -0x98] ADD EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x54],EAX LAB_001d79ab: MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x20 MOV qword ptr [RBP + -0x48],RAX MOV EAX,dword ptr [RBP + -0x94] ADD EAX,0x1 MOV dword ptr [RBP + -0x94],EAX JMP 0x001d787e LAB_001d79cb: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x40] CALL 0x001c2240 MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x14],EAX LAB_001d79e2: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0xac],EAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001d7a0c MOV EAX,dword ptr [RBP + -0xac] ADD RSP,0xb0 POP RBP RET LAB_001d7a0c: CALL 0x0012a250
int sp_make_key(long *param_1,uint param_2,double *param_3,long param_4,int8 param_5) { double dVar1; long lVar2; double *pdVar3; double *pdVar4; uint uVar5; int4 *puVar6; long in_FS_OFFSET; double local_98 [4]; long local_78; int local_6c; double *local_68; int local_5c; long local_58; long local_50; int8 local_48; long local_40; double *local_38; uint local_2c; long *local_28; int local_1c; double local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_58 = *(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70; local_5c = 0; lVar2 = *(long *)(local_58 + 0x28); local_50 = lVar2 + -0x20; local_68 = (double *)(param_4 + (ulong)*(uint *)(lVar2 + -0x18)); local_48 = param_5; local_40 = param_4; local_38 = param_3; local_2c = param_2; local_28 = param_1; local_6c = _mi_calc_blob_length(*(int1 *)(lVar2 + -6),local_68); local_78 = *(long *)((long)local_68 + (long)(int)(uint)*(byte *)(local_50 + 0x1a)); if (local_78 == 0) { puVar6 = (int4 *)_my_thread_var(); *puVar6 = 0x9e; local_1c = 0; } else { sp_mbr_from_wkb(local_78 + 4,local_6c + -4,2,local_98); for (local_50 = *(long *)(local_58 + 0x28); *(char *)(local_50 + 0x18) != '\0'; local_50 = local_50 + 0x20) { uVar5 = (uint)*(ushort *)(local_50 + 0x14); dVar1 = local_98[*(uint *)(local_50 + 8) >> 3]; if (NAN(dVar1)) { memset(local_38,0,(ulong)uVar5); local_38 = (double *)((long)local_38 + (ulong)uVar5); local_5c = uVar5 + local_5c; } else { if ((*(ushort *)(local_50 + 0x12) & 0x40) == 0) { *local_38 = dVar1; local_38 = (double *)((long)local_38 + (ulong)uVar5); } else { local_18 = dVar1; local_68 = (double *)((long)&local_18 + (ulong)uVar5); while (pdVar4 = local_38, pdVar3 = local_68, &local_18 < local_68) { local_68 = (double *)((long)local_68 + -1); local_38 = (double *)((long)local_38 + 1); *(int1 *)pdVar4 = *(int1 *)((long)pdVar3 + -1); } } local_5c = uVar5 + local_5c; } } _mi_dpointer(local_28,local_38,local_48); local_1c = local_5c; } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_1c; }
46,808
my_strxfrm_pad_unicode
eloqsql/strings/ctype-utf8.c
size_t my_strxfrm_pad_unicode(uchar *str, uchar *strend) { uchar *str0= str; DBUG_ASSERT(str && str <= strend); for ( ; str < strend ; ) { *str++= 0x00; if (str < strend) *str++= 0x20; } return str - str0; }
O0
c
my_strxfrm_pad_unicode: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x63046 jmp 0x63048 movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x63082 movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb $0x0, (%rax) movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x63080 movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb $0x20, (%rax) jmp 0x63048 movq -0x8(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax popq %rbp retq nop
my_strxfrm_pad_unicode: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax jmp short $+2 loc_63046: jmp short $+2 loc_63048: mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_63082 mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_63080 mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov byte ptr [rax], 20h ; ' ' loc_63080: jmp short loc_63048 loc_63082: mov rax, [rbp+var_8] mov rcx, [rbp+var_18] sub rax, rcx pop rbp retn
_BYTE * my_strxfrm_pad_unicode(_BYTE *a1, unsigned long long a2) { _BYTE *v2; // rax _BYTE *v3; // rax _BYTE *v5; // [rsp+10h] [rbp-8h] v5 = a1; while ( (unsigned long long)v5 < a2 ) { v2 = v5++; *v2 = 0; if ( (unsigned long long)v5 < a2 ) { v3 = v5++; *v3 = 32; } } return (_BYTE *)(v5 - a1); }
my_strxfrm_pad_unicode: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX JMP 0x00163046 LAB_00163046: JMP 0x00163048 LAB_00163048: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x00163082 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x00163080 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RAX],0x20 LAB_00163080: JMP 0x00163048 LAB_00163082: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX POP RBP RET
long my_strxfrm_pad_unicode(int1 *param_1,int1 *param_2) { int1 *puVar1; int1 *local_10; puVar1 = param_1; while (local_10 = puVar1, local_10 < param_2) { puVar1 = local_10 + 1; *local_10 = 0; if (puVar1 < param_2) { *puVar1 = 0x20; puVar1 = local_10 + 2; } } return (long)local_10 - (long)param_1; }
46,809
my_strxfrm_pad_unicode
eloqsql/strings/ctype-utf8.c
size_t my_strxfrm_pad_unicode(uchar *str, uchar *strend) { uchar *str0= str; DBUG_ASSERT(str && str <= strend); for ( ; str < strend ; ) { *str++= 0x00; if (str < strend) *str++= 0x20; } return str - str0; }
O3
c
my_strxfrm_pad_unicode: movq %rdi, %rax cmpq %rsi, %rdi jae 0x4d58c pushq %rbp movq %rsp, %rbp movq %rdi, %rcx leaq 0x1(%rcx), %rax movb $0x0, (%rcx) cmpq %rsi, %rax jae 0x4d583 movb $0x20, 0x1(%rcx) addq $0x2, %rcx movq %rcx, %rax movq %rax, %rcx cmpq %rsi, %rax jb 0x4d56c popq %rbp subq %rdi, %rax retq
my_strxfrm_pad_unicode: mov rax, rdi cmp rdi, rsi jnb short loc_4D58C push rbp mov rbp, rsp mov rcx, rdi loc_4D56C: lea rax, [rcx+1] mov byte ptr [rcx], 0 cmp rax, rsi jnb short loc_4D583 mov byte ptr [rcx+1], 20h ; ' ' add rcx, 2 mov rax, rcx loc_4D583: mov rcx, rax cmp rax, rsi jb short loc_4D56C pop rbp loc_4D58C: sub rax, rdi retn
long long my_strxfrm_pad_unicode(_BYTE *a1, unsigned long long a2) { _BYTE *v2; // rax _BYTE *v3; // rcx v2 = a1; if ( (unsigned long long)a1 < a2 ) { v3 = a1; do { v2 = v3 + 1; *v3 = 0; if ( (unsigned long long)(v3 + 1) < a2 ) { v3[1] = 32; v2 = v3 + 2; } v3 = v2; } while ( (unsigned long long)v2 < a2 ); } return v2 - a1; }
my_strxfrm_pad_unicode: MOV RAX,RDI CMP RDI,RSI JNC 0x0014d58c PUSH RBP MOV RBP,RSP MOV RCX,RDI LAB_0014d56c: LEA RAX,[RCX + 0x1] MOV byte ptr [RCX],0x0 CMP RAX,RSI JNC 0x0014d583 MOV byte ptr [RCX + 0x1],0x20 ADD RCX,0x2 MOV RAX,RCX LAB_0014d583: MOV RCX,RAX CMP RAX,RSI JC 0x0014d56c POP RBP LAB_0014d58c: SUB RAX,RDI RET
long my_strxfrm_pad_unicode(int1 *param_1,int1 *param_2) { int1 *puVar1; int1 *puVar2; puVar2 = param_1; puVar1 = param_1; if (param_1 < param_2) { do { puVar2 = puVar1 + 1; *puVar1 = 0; if (puVar2 < param_2) { puVar1[1] = 0x20; puVar2 = puVar1 + 2; } puVar1 = puVar2; } while (puVar2 < param_2); } return (long)puVar2 - (long)param_1; }
46,810
JS_GetOwnPropertyNames
bluesky950520[P]quickjs/quickjs.c
int JS_GetOwnPropertyNames(JSContext *ctx, JSPropertyEnum **ptab, uint32_t *plen, JSValue obj, int flags) { if (JS_VALUE_GET_TAG(obj) != JS_TAG_OBJECT) { JS_ThrowTypeErrorNotAnObject(ctx); return -1; } return JS_GetOwnPropertyNamesInternal(ctx, ptab, plen, JS_VALUE_GET_OBJ(obj), flags); }
O0
c
JS_GetOwnPropertyNames: subq $0x48, %rsp movq %rcx, 0x30(%rsp) movq %r8, 0x38(%rsp) movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) movl %r9d, 0x14(%rsp) movq 0x38(%rsp), %rax cmpl $-0x1, %eax je 0x2f569 movq 0x28(%rsp), %rdi callq 0x2f5a0 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x2f58b movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx movq 0x30(%rsp), %rcx movl 0x14(%rsp), %r8d callq 0x2f5e0 movl %eax, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
JS_GetOwnPropertyNames: sub rsp, 48h mov [rsp+48h+var_18], rcx mov [rsp+48h+var_10], r8 mov [rsp+48h+var_20], rdi mov [rsp+48h+var_28], rsi mov [rsp+48h+var_30], rdx mov [rsp+48h+var_34], r9d mov rax, [rsp+48h+var_10] cmp eax, 0FFFFFFFFh jz short loc_2F569 mov rdi, [rsp+48h+var_20] call JS_ThrowTypeErrorNotAnObject mov [rsp+48h+var_48], rax mov [rsp+48h+var_40], rdx mov [rsp+48h+var_4], 0FFFFFFFFh jmp short loc_2F58B loc_2F569: mov rdi, [rsp+48h+var_20] mov rsi, [rsp+48h+var_28] mov rdx, [rsp+48h+var_30] mov rcx, [rsp+48h+var_18] mov r8d, [rsp+48h+var_34] call JS_GetOwnPropertyNamesInternal mov [rsp+48h+var_4], eax loc_2F58B: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long JS_GetOwnPropertyNames(long long a1, long long a2, long long a3, long long a4, int a5, unsigned int a6) { if ( a5 == -1 ) { return (unsigned int)JS_GetOwnPropertyNamesInternal(a1, a2, a3, a4, a6); } else { JS_ThrowTypeErrorNotAnObject(a1); return (unsigned int)-1; } }
JS_GetOwnPropertyNames: SUB RSP,0x48 MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x38],R8 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX MOV dword ptr [RSP + 0x14],R9D MOV RAX,qword ptr [RSP + 0x38] CMP EAX,-0x1 JZ 0x0012f569 MOV RDI,qword ptr [RSP + 0x28] CALL 0x0012f5a0 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x0012f58b LAB_0012f569: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x30] MOV R8D,dword ptr [RSP + 0x14] CALL 0x0012f5e0 MOV dword ptr [RSP + 0x44],EAX LAB_0012f58b: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
int4 JS_GetOwnPropertyNames (int8 param_1,int8 param_2,int8 param_3,int8 param_4,int param_5, int4 param_6) { int4 local_4; if (param_5 == -1) { local_4 = JS_GetOwnPropertyNamesInternal(param_1,param_2,param_3,param_4,param_6); } else { JS_ThrowTypeErrorNotAnObject(param_1); local_4 = 0xffffffff; } return local_4; }
46,811
test_basic_cursors
eloqsql/tests/mysql_client_test.c
static void test_basic_cursors() { const char *basic_tables[]= { "DROP TABLE IF EXISTS t1, t2", "CREATE TABLE t1 " "(id INTEGER NOT NULL PRIMARY KEY, " " name VARCHAR(20) NOT NULL)", "INSERT INTO t1 (id, name) VALUES " " (2, 'Ja'), (3, 'Ede'), " " (4, 'Haag'), (5, 'Kabul'), " " (6, 'Almere'), (7, 'Utrecht'), " " (8, 'Qandahar'), (9, 'Amsterdam'), " " (10, 'Amersfoort'), (11, 'Constantine')", "CREATE TABLE t2 " "(id INTEGER NOT NULL PRIMARY KEY, " " name VARCHAR(20) NOT NULL)", "INSERT INTO t2 (id, name) VALUES " " (4, 'Guam'), (5, 'Aruba'), " " (6, 'Angola'), (7, 'Albania'), " " (8, 'Anguilla'), (9, 'Argentina'), " " (10, 'Azerbaijan'), (11, 'Afghanistan'), " " (12, 'Burkina Faso'), (13, 'Faroe Islands')" }; const char *queries[]= { "SELECT * FROM t1", "SELECT * FROM t2" }; DBUG_ENTER("test_basic_cursors"); myheader("test_basic_cursors"); fill_tables(basic_tables, sizeof(basic_tables)/sizeof(*basic_tables)); fetch_n(queries, sizeof(queries)/sizeof(*queries), USE_ROW_BY_ROW_FETCH); fetch_n(queries, sizeof(queries)/sizeof(*queries), USE_STORE_RESULT); DBUG_VOID_RETURN; }
O0
c
test_basic_cursors: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp leaq -0x30(%rbp), %rdi leaq 0x22d79d(%rip), %rsi # 0x29f920 movl $0x28, %edx callq 0x3a0b0 movq 0x22d7bc(%rip), %rax # 0x29f950 movq %rax, -0x40(%rbp) movq 0x22d7b9(%rip), %rax # 0x29f958 movq %rax, -0x38(%rbp) jmp 0x721a5 movsbl 0x3f8325(%rip), %eax # 0x46a4d1 cmpl $0x2, %eax jge 0x7222d movq 0x23ce20(%rip), %rax # 0x2aefd8 movq (%rax), %rdi leaq 0xbc162(%rip), %rsi # 0x12e324 movb $0x0, %al callq 0x3a1c0 movq 0x23ce08(%rip), %rax # 0x2aefd8 movq (%rax), %rdi movl 0x3f8543(%rip), %edx # 0x46a71c movl %edx, %eax addl $0x1, %eax movl %eax, 0x3f8538(%rip) # 0x46a71c movl 0x3f852e(%rip), %ecx # 0x46a718 movl 0x3f830b(%rip), %r8d # 0x46a4fc leaq 0xbd434(%rip), %rsi # 0x12f62c leaq 0xbcc2f(%rip), %r9 # 0x12ee2e movb $0x0, %al callq 0x3a1c0 movq 0x23cdcb(%rip), %rax # 0x2aefd8 movq (%rax), %rdi leaq 0xbc145(%rip), %rsi # 0x12e35c movb $0x0, %al callq 0x3a1c0 movq 0x23cdb3(%rip), %rax # 0x2aefd8 movq (%rax), %rdi callq 0x3a4a0 leaq -0x30(%rbp), %rdi movl $0x5, %esi callq 0x3cac0 leaq -0x40(%rbp), %rdi movl $0x2, %esi xorl %edx, %edx callq 0x3cf60 leaq -0x40(%rbp), %rdi movl $0x2, %esi movl $0x1, %edx callq 0x3cf60 jmp 0x72260 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
test_basic_cursors: push rbp mov rbp, rsp sub rsp, 40h lea rdi, [rbp+var_30] lea rsi, off_29F920; "DROP TABLE IF EXISTS t1, t2" mov edx, 28h ; '(' call _memcpy mov rax, cs:off_29F950; "SELECT * FROM t1" mov [rbp+var_40], rax mov rax, cs:off_29F958; "SELECT * FROM t2" mov [rbp+var_38], rax jmp short $+2 loc_721A5: movsx eax, cs:opt_silent cmp eax, 2 jge short loc_7222D mov rax, cs:stdout_ptr mov rdi, [rax] lea rsi, asc_12E324; "\n\n###################################"... mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] mov edx, cs:test_count mov eax, edx add eax, 1 mov cs:test_count, eax mov ecx, cs:iter_count mov r8d, cs:opt_count lea rsi, aUOfUUS; "%u of (%u/%u): %s" lea r9, aTestBasicCurso; "test_basic_cursors" mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] lea rsi, asc_12E35C; " \n###################################"... mov al, 0 call _fprintf mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush loc_7222D: lea rdi, [rbp+var_30] mov esi, 5 call fill_tables lea rdi, [rbp+var_40] mov esi, 2 xor edx, edx call fetch_n lea rdi, [rbp+var_40] mov esi, 2 mov edx, 1 call fetch_n jmp short $+2 loc_72260: add rsp, 40h pop rbp retn
_BOOL8 test_basic_cursors() { int v0; // edx _QWORD v2[2]; // [rsp+0h] [rbp-40h] BYREF long long v3[6]; // [rsp+10h] [rbp-30h] BYREF memcpy(v3, off_29F920, 40LL); v2[0] = "SELECT * FROM t1"; v2[1] = "SELECT * FROM t2"; if ( opt_silent < 2 ) { fprintf(stdout, "\n\n#####################################\n"); v0 = test_count++; fprintf(stdout, "%u of (%u/%u): %s", v0, iter_count, opt_count, "test_basic_cursors"); fprintf(stdout, " \n#####################################\n"); fflush(stdout); } fill_tables(v3, 5); fetch_n((long long)v2, 2u, 0); return fetch_n((long long)v2, 2u, 1); }
test_basic_cursors: PUSH RBP MOV RBP,RSP SUB RSP,0x40 LEA RDI,[RBP + -0x30] LEA RSI,[0x39f920] MOV EDX,0x28 CALL 0x0013a0b0 MOV RAX,qword ptr [0x0039f950] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [0x0039f958] MOV qword ptr [RBP + -0x38],RAX JMP 0x001721a5 LAB_001721a5: MOVSX EAX,byte ptr [0x0056a4d1] CMP EAX,0x2 JGE 0x0017222d MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x22e324] MOV AL,0x0 CALL 0x0013a1c0 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] MOV EDX,dword ptr [0x0056a71c] MOV EAX,EDX ADD EAX,0x1 MOV dword ptr [0x0056a71c],EAX MOV ECX,dword ptr [0x0056a718] MOV R8D,dword ptr [0x0056a4fc] LEA RSI,[0x22f62c] LEA R9,[0x22ee2e] MOV AL,0x0 CALL 0x0013a1c0 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] LEA RSI,[0x22e35c] MOV AL,0x0 CALL 0x0013a1c0 MOV RAX,qword ptr [0x003aefd8] MOV RDI,qword ptr [RAX] CALL 0x0013a4a0 LAB_0017222d: LEA RDI,[RBP + -0x30] MOV ESI,0x5 CALL 0x0013cac0 LEA RDI,[RBP + -0x40] MOV ESI,0x2 XOR EDX,EDX CALL 0x0013cf60 LEA RDI,[RBP + -0x40] MOV ESI,0x2 MOV EDX,0x1 CALL 0x0013cf60 JMP 0x00172260 LAB_00172260: ADD RSP,0x40 POP RBP RET
void test_basic_cursors(void) { ulong uVar1; int *local_48; int *local_40; int1 local_38 [48]; memcpy(local_38,&PTR_s_DROP_TABLE_IF_EXISTS_t1__t2_0039f920,0x28); local_48 = PTR_s_SELECT___FROM_t1_0039f950; local_40 = PTR_s_SELECT___FROM_t2_0039f958; if (opt_silent < '\x02') { fprintf(*(FILE **)PTR_stdout_003aefd8,"\n\n#####################################\n"); uVar1 = (ulong)test_count; test_count = test_count + 1; fprintf(*(FILE **)PTR_stdout_003aefd8,"%u of (%u/%u): %s",uVar1,(ulong)iter_count, (ulong)opt_count,"test_basic_cursors"); fprintf(*(FILE **)PTR_stdout_003aefd8," \n#####################################\n"); fflush(*(FILE **)PTR_stdout_003aefd8); } fill_tables(local_38,5); fetch_n(&local_48,2,0); fetch_n(&local_48,2,1); return; }
46,812
MainWindow::onChatSelectionChanged()
MarsToPluto[P]llmstudio/src/mainwindow.cpp
void MainWindow::onChatSelectionChanged() { QListWidgetItem *item = chatListWidget->currentItem(); if (item) { // In a real app, load the actual chat history for item->text() chatHistoryDisplay->setPlainText(QString("Chat history for: %1\n\n(Load actual content here)").arg(item->text())); messageInput->setFocus(); // Focus input when chat changes } else { chatHistoryDisplay->clear(); } }
O2
cpp
MainWindow::onChatSelectionChanged(): pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rdi, %rbx movq 0x70(%rdi), %rdi callq 0x5070 movq 0xe8(%rbx), %r14 testq %rax, %rax je 0x78d7 movq %rax, %r15 leaq 0x10bd(%rip), %rsi # 0x8922 leaq 0x20(%rsp), %rdi callq 0x791c leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x7ab6 leaq 0x38(%rsp), %rdi leaq 0x20(%rsp), %rsi leaq 0x8(%rsp), %rdx pushq $0x20 popq %r8 xorl %ecx, %ecx callq 0x5340 leaq 0x38(%rsp), %rsi movq %r14, %rdi callq 0x5210 leaq 0x38(%rsp), %rdi callq 0x7bd8 leaq 0x8(%rsp), %rdi callq 0x7bd8 leaq 0x20(%rsp), %rdi callq 0x7bd8 movq 0x100(%rbx), %rdi callq 0x7b06 addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %r14, %rdi addq $0x50, %rsp popq %rbx popq %r14 popq %r15 jmp 0x5200 movq %rax, %rbx leaq 0x38(%rsp), %rdi callq 0x7bd8 jmp 0x78fa movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x7bd8 jmp 0x7909 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x7bd8 movq %rbx, %rdi callq 0x5230 nop
_ZN10MainWindow22onChatSelectionChangedEv: push r15 push r14 push rbx sub rsp, 50h mov rbx, rdi mov rdi, [rdi+70h]; this call __ZNK11QListWidget11currentItemEv; QListWidget::currentItem(void) mov r14, [rbx+0E8h] test rax, rax jz short loc_78D7 mov r15, rax lea rsi, aChatHistoryFor; "Chat history for: %1\n\n(Load actual co"... lea rdi, [rsp+68h+var_48]; this call _ZN7QStringC2EPKc; QString::QString(char const*) lea rdi, [rsp+68h+var_60]; this mov rsi, r15 call _ZNK15QListWidgetItem4textEv; QListWidgetItem::text(void) lea rdi, [rsp+68h+var_30] lea rsi, [rsp+68h+var_48] lea rdx, [rsp+68h+var_60] push 20h ; ' ' pop r8 xor ecx, ecx call __ZNK7QString3argERKS_i5QChar; QString::arg(QString const&,int,QChar) lea rsi, [rsp+68h+var_30] mov rdi, r14 call __ZN9QTextEdit12setPlainTextERK7QString; QTextEdit::setPlainText(QString const&) lea rdi, [rsp+68h+var_30] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() lea rdi, [rsp+68h+var_60] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() lea rdi, [rsp+68h+var_48] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() mov rdi, [rbx+100h]; this call _ZN7QWidget8setFocusEv; QWidget::setFocus(void) add rsp, 50h pop rbx pop r14 pop r15 retn loc_78D7: mov rdi, r14; this add rsp, 50h pop rbx pop r14 pop r15 jmp __ZN9QTextEdit5clearEv; QTextEdit::clear(void) mov rbx, rax lea rdi, [rsp+arg_30] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() jmp short loc_78FA mov rbx, rax loc_78FA: lea rdi, [rsp+arg_0] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() jmp short loc_7909 mov rbx, rax loc_7909: lea rdi, [rsp+arg_18] call _ZN17QArrayDataPointerIDsED2Ev; QArrayDataPointer<char16_t>::~QArrayDataPointer() mov rdi, rbx call __Unwind_Resume
long long MainWindow::onChatSelectionChanged(QListWidget **this) { long long v1; // rax QTextEdit *v2; // r14 _BYTE v4[24]; // [rsp+8h] [rbp-60h] BYREF _BYTE v5[24]; // [rsp+20h] [rbp-48h] BYREF _BYTE v6[48]; // [rsp+38h] [rbp-30h] BYREF v1 = QListWidget::currentItem(this[14]); v2 = this[29]; if ( !v1 ) return QTextEdit::clear(this[29]); QString::QString((QString *)v5, "Chat history for: %1\n\n(Load actual content here)"); QListWidgetItem::text((QListWidgetItem *)v4); QString::arg(v6, v5, v4, 0LL, 32LL); QTextEdit::setPlainText(v2, (const QString *)v6); QArrayDataPointer<char16_t>::~QArrayDataPointer(v6); QArrayDataPointer<char16_t>::~QArrayDataPointer(v4); QArrayDataPointer<char16_t>::~QArrayDataPointer(v5); return QWidget::setFocus(this[32]); }
onChatSelectionChanged: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x70] CALL 0x00105070 MOV R14,qword ptr [RBX + 0xe8] TEST RAX,RAX JZ 0x001078d7 MOV R15,RAX LEA RSI,[0x108922] LEA RDI,[RSP + 0x20] CALL 0x0010791c LAB_0010786f: LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x00107ab6 LAB_0010787c: LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x20] LEA RDX,[RSP + 0x8] PUSH 0x20 POP R8 XOR ECX,ECX CALL 0x00105340 LAB_00107896: LEA RSI,[RSP + 0x38] MOV RDI,R14 CALL 0x00105210 LAB_001078a3: LEA RDI,[RSP + 0x38] CALL 0x00107bd8 LEA RDI,[RSP + 0x8] CALL 0x00107bd8 LEA RDI,[RSP + 0x20] CALL 0x00107bd8 MOV RDI,qword ptr [RBX + 0x100] CALL 0x00107b06 ADD RSP,0x50 POP RBX POP R14 POP R15 RET LAB_001078d7: MOV RDI,R14 ADD RSP,0x50 POP RBX POP R14 POP R15 JMP 0x00105200
/* MainWindow::onChatSelectionChanged() */ void __thiscall MainWindow::onChatSelectionChanged(MainWindow *this) { QString *pQVar1; long lVar2; QArrayDataPointer<char16_t> local_60 [24]; QString local_48 [24]; QArrayDataPointer<char16_t> local_30 [24]; lVar2 = QListWidget::currentItem(); pQVar1 = *(QString **)(this + 0xe8); if (lVar2 != 0) { QString::QString(local_48,"Chat history for: %1\n\n(Load actual content here)"); /* try { // try from 0010786f to 0010787b has its CatchHandler @ 00107906 */ QListWidgetItem::text(); /* try { // try from 0010787c to 00107895 has its CatchHandler @ 001078f7 */ QString::arg(local_30,local_48,local_60,0,0x20); /* try { // try from 00107896 to 001078a2 has its CatchHandler @ 001078e8 */ QTextEdit::setPlainText(pQVar1); QArrayDataPointer<char16_t>::~QArrayDataPointer(local_30); QArrayDataPointer<char16_t>::~QArrayDataPointer(local_60); QArrayDataPointer<char16_t>::~QArrayDataPointer((QArrayDataPointer<char16_t> *)local_48); QWidget::setFocus(*(QWidget **)(this + 0x100)); return; } QTextEdit::clear(); return; }
46,813
MainWindow::onChatSelectionChanged()
MarsToPluto[P]llmstudio/src/mainwindow.cpp
void MainWindow::onChatSelectionChanged() { QListWidgetItem *item = chatListWidget->currentItem(); if (item) { // In a real app, load the actual chat history for item->text() chatHistoryDisplay->setPlainText(QString("Chat history for: %1\n\n(Load actual content here)").arg(item->text())); messageInput->setFocus(); // Focus input when chat changes } else { chatHistoryDisplay->clear(); } }
O3
cpp
MainWindow::onChatSelectionChanged(): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdi, %rbx movq 0x70(%rdi), %rdi callq 0x5070 movq 0xe8(%rbx), %r14 testq %rax, %rax je 0x91ea movq %rax, %r15 leaq 0x1821(%rip), %rdx # 0xa912 leaq 0x50(%rsp), %r12 movl $0x30, %esi movq %r12, %rdi callq 0x5350 movaps (%r12), %xmm0 movaps %xmm0, (%rsp) movq 0x10(%r12), %rax movq %rax, 0x10(%rsp) movq (%r15), %rax leaq 0x50(%rsp), %rdi movq %r15, %rsi xorl %edx, %edx callq *0x18(%rax) leaq 0x20(%rsp), %rdi leaq 0x50(%rsp), %rsi callq 0x5580 leaq 0x50(%rsp), %rdi callq 0x5190 leaq 0x38(%rsp), %rdi movq %rsp, %rsi leaq 0x20(%rsp), %rdx xorl %ecx, %ecx movl $0x20, %r8d callq 0x5330 leaq 0x38(%rsp), %rsi movq %r14, %rdi callq 0x5200 movq 0x38(%rsp), %rax testq %rax, %rax je 0x9189 lock decl (%rax) jne 0x9189 movq 0x38(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x5310 movq 0x20(%rsp), %rax testq %rax, %rax je 0x91ac lock decl (%rax) jne 0x91ac movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x5310 movq (%rsp), %rax testq %rax, %rax je 0x91cd lock decl (%rax) jne 0x91cd movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x5310 movq 0x100(%rbx), %rdi movl $0x7, %esi callq 0x5120 addq $0x78, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %r14, %rdi addq $0x78, %rsp popq %rbx popq %r12 popq %r14 popq %r15 jmp 0x51f0 movq %rax, %rbx movq 0x38(%rsp), %rax testq %rax, %rax je 0x9228 lock decl (%rax) jne 0x9228 movq 0x38(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x5310 jmp 0x9228 movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x925f lock decl (%rax) jne 0x925f movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x5310 jmp 0x925f movq %rax, %rbx leaq 0x50(%rsp), %rdi callq 0x5190 jmp 0x925f movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x9280 lock decl (%rax) jne 0x9280 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x5310 movq %rbx, %rdi callq 0x5220
_ZN10MainWindow22onChatSelectionChangedEv: push r15 push r14 push r12 push rbx sub rsp, 78h mov rbx, rdi mov rdi, [rdi+70h]; this call __ZNK11QListWidget11currentItemEv; QListWidget::currentItem(void) mov r14, [rbx+0E8h] test rax, rax jz loc_91EA mov r15, rax lea rdx, aChatHistoryFor; "Chat history for: %1\n\n(Load actual co"... lea r12, [rsp+98h+var_48] mov esi, 30h ; '0' mov rdi, r12 call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView) movaps xmm0, xmmword ptr [r12] movaps [rsp+98h+var_98], xmm0 mov rax, [r12+10h] mov [rsp+98h+var_88], rax mov rax, [r15] lea rdi, [rsp+98h+var_48] mov rsi, r15 xor edx, edx call qword ptr [rax+18h] lea rdi, [rsp+98h+var_78]; this lea rsi, [rsp+98h+var_48] call __ZNK8QVariant8toStringEv; QVariant::toString(void) lea rdi, [rsp+98h+var_48]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() lea rdi, [rsp+98h+var_60] mov rsi, rsp lea rdx, [rsp+98h+var_78] xor ecx, ecx mov r8d, 20h ; ' ' call __ZNK7QString3argERKS_i5QChar; QString::arg(QString const&,int,QChar) lea rsi, [rsp+98h+var_60] mov rdi, r14 call __ZN9QTextEdit12setPlainTextERK7QString; QTextEdit::setPlainText(QString const&) mov rax, [rsp+98h+var_60] test rax, rax jz short loc_9189 lock dec dword ptr [rax] jnz short loc_9189 mov rdi, [rsp+98h+var_60] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_9189: mov rax, [rsp+98h+var_78] test rax, rax jz short loc_91AC lock dec dword ptr [rax] jnz short loc_91AC mov rdi, [rsp+98h+var_78] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_91AC: mov rax, qword ptr [rsp+98h+var_98] test rax, rax jz short loc_91CD lock dec dword ptr [rax] jnz short loc_91CD mov rdi, qword ptr [rsp+98h+var_98] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_91CD: mov rdi, [rbx+100h] mov esi, 7 call __ZN7QWidget8setFocusEN2Qt11FocusReasonE; QWidget::setFocus(Qt::FocusReason) add rsp, 78h pop rbx pop r12 pop r14 pop r15 retn loc_91EA: mov rdi, r14; this add rsp, 78h pop rbx pop r12 pop r14 pop r15 jmp __ZN9QTextEdit5clearEv; QTextEdit::clear(void) mov rbx, rax mov rax, [rsp+arg_30] test rax, rax jz short loc_9228 lock dec dword ptr [rax] jnz short loc_9228 mov rdi, [rsp+arg_30] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) jmp short loc_9228 mov rbx, rax loc_9228: mov rax, [rsp+arg_18] test rax, rax jz short loc_925F lock dec dword ptr [rax] jnz short loc_925F mov rdi, [rsp+arg_18] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) jmp short loc_925F mov rbx, rax lea rdi, [rsp+arg_48]; this call __ZN8QVariantD1Ev; QVariant::~QVariant() jmp short loc_925F mov rbx, rax loc_925F: mov rax, [rsp+0] test rax, rax jz short loc_9280 lock dec dword ptr [rax] jnz short loc_9280 mov rdi, [rsp+0] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_9280: mov rdi, rbx call __Unwind_Resume
long long MainWindow::onChatSelectionChanged(QListWidget **this) { long long v1; // rax QListWidget *v2; // r14 long long v3; // r15 __int128 v5; // [rsp+0h] [rbp-98h] BYREF long long v6; // [rsp+10h] [rbp-88h] volatile signed __int32 *v7[3]; // [rsp+20h] [rbp-78h] BYREF volatile signed __int32 *v8[3]; // [rsp+38h] [rbp-60h] BYREF __int128 v9; // [rsp+50h] [rbp-48h] BYREF long long v10; // [rsp+60h] [rbp-38h] v1 = QListWidget::currentItem(this[14]); v2 = this[29]; if ( !v1 ) return QTextEdit::clear(this[29]); v3 = v1; QString::fromUtf8(&v9, 48LL, "Chat history for: %1\n\n(Load actual content here)"); v5 = v9; v6 = v10; (*(void ( **)(__int128 *, long long, _QWORD))(*(_QWORD *)v3 + 24LL))(&v9, v3, 0LL); QVariant::toString((QVariant *)v7); QVariant::~QVariant((QVariant *)&v9); QString::arg(v8, &v5, v7, 0LL, 32LL); QTextEdit::setPlainText(v2, v8); if ( v8[0] && !_InterlockedDecrement(v8[0]) ) QArrayData::deallocate(v8[0], 2LL, 8LL); if ( v7[0] && !_InterlockedDecrement(v7[0]) ) QArrayData::deallocate(v7[0], 2LL, 8LL); if ( (_QWORD)v5 ) { if ( !_InterlockedDecrement((volatile signed __int32 *)v5) ) QArrayData::deallocate(v5, 2LL, 8LL); } return QWidget::setFocus(this[32], 7LL); }
onChatSelectionChanged: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x70] CALL 0x00105070 MOV R14,qword ptr [RBX + 0xe8] TEST RAX,RAX JZ 0x001091ea MOV R15,RAX LEA RDX,[0x10a912] LEA R12,[RSP + 0x50] MOV ESI,0x30 MOV RDI,R12 CALL 0x00105350 MOVAPS XMM0,xmmword ptr [R12] MOVAPS xmmword ptr [RSP],XMM0 MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [R15] LAB_00109119: LEA RDI,[RSP + 0x50] MOV RSI,R15 XOR EDX,EDX CALL qword ptr [RAX + 0x18] LAB_00109126: LEA RDI,[RSP + 0x20] LEA RSI,[RSP + 0x50] CALL 0x00105580 LEA RDI,[RSP + 0x50] CALL 0x00105190 LAB_0010913f: LEA RDI,[RSP + 0x38] MOV RSI,RSP LEA RDX,[RSP + 0x20] XOR ECX,ECX MOV R8D,0x20 CALL 0x00105330 LAB_00109159: LEA RSI,[RSP + 0x38] MOV RDI,R14 CALL 0x00105200 LAB_00109166: MOV RAX,qword ptr [RSP + 0x38] TEST RAX,RAX JZ 0x00109189 DEC.LOCK dword ptr [RAX] JNZ 0x00109189 MOV RDI,qword ptr [RSP + 0x38] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00105310 LAB_00109189: MOV RAX,qword ptr [RSP + 0x20] TEST RAX,RAX JZ 0x001091ac DEC.LOCK dword ptr [RAX] JNZ 0x001091ac MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00105310 LAB_001091ac: MOV RAX,qword ptr [RSP] TEST RAX,RAX JZ 0x001091cd DEC.LOCK dword ptr [RAX] JNZ 0x001091cd MOV RDI,qword ptr [RSP] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00105310 LAB_001091cd: MOV RDI,qword ptr [RBX + 0x100] MOV ESI,0x7 CALL 0x00105120 ADD RSP,0x78 POP RBX POP R12 POP R14 POP R15 RET LAB_001091ea: MOV RDI,R14 ADD RSP,0x78 POP RBX POP R12 POP R14 POP R15 JMP 0x001051f0
/* MainWindow::onChatSelectionChanged() */ void __thiscall MainWindow::onChatSelectionChanged(MainWindow *this) { QString *pQVar1; int *piVar2; long *plVar3; int4 local_98; int4 uStack_94; int4 uStack_90; int4 uStack_8c; int8 local_88; QArrayData *local_78 [3]; QArrayData *local_60 [3]; int4 local_48; int4 uStack_44; int4 uStack_40; int4 uStack_3c; int8 local_38; plVar3 = (long *)QListWidget::currentItem(); pQVar1 = *(QString **)(this + 0xe8); if (plVar3 != (long *)0x0) { QString::fromUtf8(&local_48,0x30,"Chat history for: %1\n\n(Load actual content here)"); local_98 = local_48; uStack_94 = uStack_44; uStack_90 = uStack_40; uStack_8c = uStack_3c; local_88 = local_38; /* try { // try from 00109119 to 00109125 has its CatchHandler @ 0010925c */ (**(code **)(*plVar3 + 0x18))(&local_48,plVar3,0); /* try { // try from 00109126 to 00109134 has its CatchHandler @ 0010924d */ QVariant::toString(); QVariant::~QVariant((QVariant *)&local_48); /* try { // try from 0010913f to 00109158 has its CatchHandler @ 00109225 */ QString::arg(local_60,&local_98,local_78,0,0x20); /* try { // try from 00109159 to 00109165 has its CatchHandler @ 001091fd */ QTextEdit::setPlainText(pQVar1); if (local_60[0] != (QArrayData *)0x0) { LOCK(); *(int *)local_60[0] = *(int *)local_60[0] + -1; UNLOCK(); if (*(int *)local_60[0] == 0) { QArrayData::deallocate(local_60[0],2,8); } } if (local_78[0] != (QArrayData *)0x0) { LOCK(); *(int *)local_78[0] = *(int *)local_78[0] + -1; UNLOCK(); if (*(int *)local_78[0] == 0) { QArrayData::deallocate(local_78[0],2,8); } } piVar2 = (int *)CONCAT44(uStack_94,local_98); if (piVar2 != (int *)0x0) { LOCK(); *piVar2 = *piVar2 + -1; UNLOCK(); if (*piVar2 == 0) { QArrayData::deallocate((QArrayData *)CONCAT44(uStack_94,local_98),2,8); } } QWidget::setFocus(*(int8 *)(this + 0x100),7); return; } QTextEdit::clear(); return; }
46,814
bf_add_si
bluesky950520[P]quickjs/libbf.c
int bf_add_si(bf_t *r, const bf_t *a, int64_t b1, limb_t prec, bf_flags_t flags) { bf_t b; int ret; bf_init(r->ctx, &b); ret = bf_set_si(&b, b1); ret |= bf_add(r, a, &b, prec, flags); bf_delete(&b); return ret; }
O0
c
bf_add_si: subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq %rdx, 0x40(%rsp) movq %rcx, 0x38(%rsp) movl %r8d, 0x34(%rsp) movq 0x50(%rsp), %rax movq (%rax), %rdi leaq 0x8(%rsp), %rsi callq 0xe5f70 movq 0x40(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0xe61e0 movl %eax, 0x4(%rsp) movq 0x50(%rsp), %rdi movq 0x48(%rsp), %rsi movq 0x38(%rsp), %rcx movl 0x34(%rsp), %r8d leaq 0x8(%rsp), %rdx callq 0xea170 orl 0x4(%rsp), %eax movl %eax, 0x4(%rsp) leaq 0x8(%rsp), %rdi callq 0xe93d0 movl 0x4(%rsp), %eax addq $0x58, %rsp retq nopl (%rax,%rax)
bf_add_si: sub rsp, 58h mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov [rsp+58h+var_18], rdx mov [rsp+58h+var_20], rcx mov [rsp+58h+var_24], r8d mov rax, [rsp+58h+var_8] mov rdi, [rax] lea rsi, [rsp+58h+var_50] call bf_init mov rsi, [rsp+58h+var_18] lea rdi, [rsp+58h+var_50] call bf_set_si mov [rsp+58h+var_54], eax mov rdi, [rsp+58h+var_8] mov rsi, [rsp+58h+var_10] mov rcx, [rsp+58h+var_20] mov r8d, [rsp+58h+var_24] lea rdx, [rsp+58h+var_50] call bf_add or eax, [rsp+58h+var_54] mov [rsp+58h+var_54], eax lea rdi, [rsp+58h+var_50] call bf_delete_0 mov eax, [rsp+58h+var_54] add rsp, 58h retn
long long bf_add_si(long long *a1, long long a2, long long a3, long long a4, unsigned int a5) { int v6; // [rsp+4h] [rbp-54h] unsigned int v7; // [rsp+4h] [rbp-54h] _BYTE v8[44]; // [rsp+8h] [rbp-50h] BYREF unsigned int v9; // [rsp+34h] [rbp-24h] long long v10; // [rsp+38h] [rbp-20h] long long v11; // [rsp+40h] [rbp-18h] long long v12; // [rsp+48h] [rbp-10h] long long *v13; // [rsp+50h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = a5; bf_init(*a1, (long long)v8); v6 = bf_set_si((long long)v8, v11); v7 = v6 | bf_add(v13, v12, v8, v10, v9); bf_delete_0(v8); return v7; }
bf_add_si: SUB RSP,0x58 MOV qword ptr [RSP + 0x50],RDI MOV qword ptr [RSP + 0x48],RSI MOV qword ptr [RSP + 0x40],RDX MOV qword ptr [RSP + 0x38],RCX MOV dword ptr [RSP + 0x34],R8D MOV RAX,qword ptr [RSP + 0x50] MOV RDI,qword ptr [RAX] LEA RSI,[RSP + 0x8] CALL 0x001e5f70 MOV RSI,qword ptr [RSP + 0x40] LEA RDI,[RSP + 0x8] CALL 0x001e61e0 MOV dword ptr [RSP + 0x4],EAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x48] MOV RCX,qword ptr [RSP + 0x38] MOV R8D,dword ptr [RSP + 0x34] LEA RDX,[RSP + 0x8] CALL 0x001ea170 OR EAX,dword ptr [RSP + 0x4] MOV dword ptr [RSP + 0x4],EAX LEA RDI,[RSP + 0x8] CALL 0x001e93d0 MOV EAX,dword ptr [RSP + 0x4] ADD RSP,0x58 RET
uint bf_add_si(int8 *param_1,int8 param_2,int8 param_3,int8 param_4, int4 param_5) { uint uVar1; uint uVar2; int1 local_50 [44]; int4 local_24; int8 local_20; int8 local_18; int8 local_10; int8 *local_8; local_24 = param_5; local_20 = param_4; local_18 = param_3; local_10 = param_2; local_8 = param_1; bf_init(*param_1,local_50); uVar1 = bf_set_si(local_50,local_18); uVar2 = bf_add(local_8,local_10,local_50,local_20,local_24); bf_delete(local_50); return uVar2 | uVar1; }
46,815
bf_add_si
bluesky950520[P]quickjs/libbf.c
int bf_add_si(bf_t *r, const bf_t *a, int64_t b1, limb_t prec, bf_flags_t flags) { bf_t b; int ret; bf_init(r->ctx, &b); ret = bf_set_si(&b, b1); ret |= bf_add(r, a, &b, prec, flags); bf_delete(&b); return ret; }
O2
c
bf_add_si: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebx movq %rcx, %r14 movq %rsi, %r15 movq %rdi, %r12 movq (%rdi), %rax movq %rsp, %r13 movq %rax, (%r13) andl $0x0, 0x8(%r13) movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000 movq %rax, 0x10(%r13) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r13) movq %r13, %rdi movq %rdx, %rsi callq 0x6f5ec movl %eax, %ebp movq %r12, %rdi movq %r15, %rsi movq %r13, %rdx movq %r14, %rcx movl %ebx, %r8d callq 0x71c49 movl %eax, %ebx orl %ebp, %ebx movq %r13, %rdi callq 0x7145e movl %ebx, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
bf_add_si: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov ebx, r8d mov r14, rcx mov r15, rsi mov r12, rdi mov rax, [rdi] mov r13, rsp mov [r13+0], rax and dword ptr [r13+8], 0 mov rax, 8000000000000000h mov [r13+10h], rax xorps xmm0, xmm0 movups xmmword ptr [r13+18h], xmm0 mov rdi, r13 mov rsi, rdx call bf_set_si mov ebp, eax mov rdi, r12 mov rsi, r15 mov rdx, r13 mov rcx, r14 mov r8d, ebx call bf_add mov ebx, eax or ebx, ebp mov rdi, r13 call bf_delete_0 mov eax, ebx add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long bf_add_si(long long *a1, long long a2, signed long long a3, long long a4, unsigned int a5) { int v7; // ebp unsigned int v8; // ebx long long v10; // [rsp+0h] [rbp-58h] BYREF int v11; // [rsp+8h] [rbp-50h] unsigned long long v12; // [rsp+10h] [rbp-48h] __int128 v13; // [rsp+18h] [rbp-40h] v10 = *a1; v11 = 0; v12 = 0x8000000000000000LL; v13 = 0LL; v7 = bf_set_si((long long)&v10, a3); v8 = v7 | bf_add(a1, a2, &v10, a4, a5); bf_delete_0(&v10); return v8; }
bf_add_si: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBX,R8D MOV R14,RCX MOV R15,RSI MOV R12,RDI MOV RAX,qword ptr [RDI] MOV R13,RSP MOV qword ptr [R13],RAX AND dword ptr [R13 + 0x8],0x0 MOV RAX,-0x8000000000000000 MOV qword ptr [R13 + 0x10],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [R13 + 0x18],XMM0 MOV RDI,R13 MOV RSI,RDX CALL 0x0016f5ec MOV EBP,EAX MOV RDI,R12 MOV RSI,R15 MOV RDX,R13 MOV RCX,R14 MOV R8D,EBX CALL 0x00171c49 MOV EBX,EAX OR EBX,EBP MOV RDI,R13 CALL 0x0017145e MOV EAX,EBX ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint bf_add_si(int8 *param_1,int8 param_2,int8 param_3,int8 param_4, int4 param_5) { uint uVar1; uint uVar2; int8 local_58; int4 local_50; int8 local_48; int8 local_40; int8 uStack_38; local_58 = *param_1; local_50 = 0; local_48 = 0x8000000000000000; local_40 = 0; uStack_38 = 0; uVar1 = bf_set_si(&local_58,param_3); uVar2 = bf_add(param_1,param_2,&local_58,param_4,param_5); bf_delete(&local_58); return uVar2 | uVar1; }
46,816
google::protobuf::FastInt32ToBuffer(int, char*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/stubs/strutil.cc
char *FastInt32ToBuffer(int32_t i, char* buffer) { // We could collapse the positive and negative sections, but that // would be slightly slower for positive numbers... // 12 bytes is enough to store -2**32, -4294967296. char* p = buffer + kFastInt32ToBufferOffset; *p-- = '\0'; if (i >= 0) { do { *p-- = '0' + i % 10; i /= 10; } while (i > 0); return p + 1; } else { // On different platforms, % and / have different behaviors for // negative numbers, so we need to jump through hoops to make sure // we don't divide negative numbers. if (i > -10) { i = -i; *p-- = '0' + i; *p = '-'; return p; } else { // Make sure we aren't at MIN_INT, in which case we can't say i = -i i = i + 10; i = -i; *p-- = '0' + i % 10; // Undo what we did a moment ago i = i / 10 + 1; do { *p-- = '0' + i % 10; i /= 10; } while (i > 0); *p = '-'; return p; } } }
O0
cpp
google::protobuf::FastInt32ToBuffer(int, char*): movl %edi, -0xc(%rsp) movq %rsi, -0x18(%rsp) movq -0x18(%rsp), %rax addq $0xb, %rax movq %rax, -0x20(%rsp) movq -0x20(%rsp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x20(%rsp) movb $0x0, (%rax) cmpl $0x0, -0xc(%rsp) jl 0x28da2 jmp 0x28d54 movl -0xc(%rsp), %eax movl $0xa, %ecx cltd idivl %ecx addl $0x30, %edx movb %dl, %cl movq -0x20(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x20(%rsp) movb %cl, (%rax) movl -0xc(%rsp), %eax movl $0xa, %ecx cltd idivl %ecx movl %eax, -0xc(%rsp) cmpl $0x0, -0xc(%rsp) jg 0x28d54 movq -0x20(%rsp), %rax addq $0x1, %rax movq %rax, -0x8(%rsp) jmp 0x28e7f cmpl $-0xa, -0xc(%rsp) jle 0x28de6 xorl %eax, %eax subl -0xc(%rsp), %eax movl %eax, -0xc(%rsp) movl -0xc(%rsp), %eax addl $0x30, %eax movb %al, %cl movq -0x20(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x20(%rsp) movb %cl, (%rax) movq -0x20(%rsp), %rax movb $0x2d, (%rax) movq -0x20(%rsp), %rax movq %rax, -0x8(%rsp) jmp 0x28e7f movl -0xc(%rsp), %eax addl $0xa, %eax movl %eax, -0xc(%rsp) xorl %eax, %eax subl -0xc(%rsp), %eax movl %eax, -0xc(%rsp) movl -0xc(%rsp), %eax movl $0xa, %ecx cltd idivl %ecx addl $0x30, %edx movb %dl, %cl movq -0x20(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x20(%rsp) movb %cl, (%rax) movl -0xc(%rsp), %eax movl $0xa, %ecx cltd idivl %ecx addl $0x1, %eax movl %eax, -0xc(%rsp) movl -0xc(%rsp), %eax movl $0xa, %ecx cltd idivl %ecx addl $0x30, %edx movb %dl, %cl movq -0x20(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x20(%rsp) movb %cl, (%rax) movl -0xc(%rsp), %eax movl $0xa, %ecx cltd idivl %ecx movl %eax, -0xc(%rsp) cmpl $0x0, -0xc(%rsp) jg 0x28e32 movq -0x20(%rsp), %rax movb $0x2d, (%rax) movq -0x20(%rsp), %rax movq %rax, -0x8(%rsp) movq -0x8(%rsp), %rax retq nopw %cs:(%rax,%rax)
_ZN6google8protobuf17FastInt32ToBufferEiPc: mov [rsp+var_C], edi mov [rsp+var_18], rsi mov rax, [rsp+var_18] add rax, 0Bh mov [rsp+var_20], rax mov rax, [rsp+var_20] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rsp+var_20], rcx mov byte ptr [rax], 0 cmp [rsp+var_C], 0 jl short loc_28DA2 jmp short $+2 loc_28D54: mov eax, [rsp+var_C] mov ecx, 0Ah cdq idiv ecx add edx, 30h ; '0' mov cl, dl mov rax, [rsp+var_20] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+var_20], rdx mov [rax], cl mov eax, [rsp+var_C] mov ecx, 0Ah cdq idiv ecx mov [rsp+var_C], eax cmp [rsp+var_C], 0 jg short loc_28D54 mov rax, [rsp+var_20] add rax, 1 mov [rsp+var_8], rax jmp loc_28E7F loc_28DA2: cmp [rsp+var_C], 0FFFFFFF6h jle short loc_28DE6 xor eax, eax sub eax, [rsp+var_C] mov [rsp+var_C], eax mov eax, [rsp+var_C] add eax, 30h ; '0' mov cl, al mov rax, [rsp+var_20] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+var_20], rdx mov [rax], cl mov rax, [rsp+var_20] mov byte ptr [rax], 2Dh ; '-' mov rax, [rsp+var_20] mov [rsp+var_8], rax jmp loc_28E7F loc_28DE6: mov eax, [rsp+var_C] add eax, 0Ah mov [rsp+var_C], eax xor eax, eax sub eax, [rsp+var_C] mov [rsp+var_C], eax mov eax, [rsp+var_C] mov ecx, 0Ah cdq idiv ecx add edx, 30h ; '0' mov cl, dl mov rax, [rsp+var_20] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+var_20], rdx mov [rax], cl mov eax, [rsp+var_C] mov ecx, 0Ah cdq idiv ecx add eax, 1 mov [rsp+var_C], eax loc_28E32: mov eax, [rsp+var_C] mov ecx, 0Ah cdq idiv ecx add edx, 30h ; '0' mov cl, dl mov rax, [rsp+var_20] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+var_20], rdx mov [rax], cl mov eax, [rsp+var_C] mov ecx, 0Ah cdq idiv ecx mov [rsp+var_C], eax cmp [rsp+var_C], 0 jg short loc_28E32 mov rax, [rsp+var_20] mov byte ptr [rax], 2Dh ; '-' mov rax, [rsp+var_20] mov [rsp+var_8], rax loc_28E7F: mov rax, [rsp+var_8] retn
_BYTE * google::protobuf::FastInt32ToBuffer(google::protobuf *this, _BYTE *a2, char *a3) { _BYTE *v3; // rax _BYTE *v4; // rax _BYTE *v6; // [rsp+0h] [rbp-20h] _BYTE *v7; // [rsp+0h] [rbp-20h] int v8; // [rsp+14h] [rbp-Ch] int v9; // [rsp+14h] [rbp-Ch] int v10; // [rsp+14h] [rbp-Ch] v8 = (int)this; v6 = a2 + 10; a2[11] = 0; if ( (int)this < 0 ) { if ( (int)this <= -10 ) { v9 = -((_DWORD)this + 10); v7 = a2 + 9; a2[10] = v9 % 10 + 48; v10 = v9 / 10 + 1; do { v4 = v7--; *v4 = v10 % 10 + 48; v10 /= 10; } while ( v10 > 0 ); *v7 = 45; return v7; } else { a2[10] = 48 - (_BYTE)this; a2[9] = 45; return a2 + 9; } } else { do { v3 = v6--; *v3 = v8 % 10 + 48; v8 /= 10; } while ( v8 > 0 ); return v6 + 1; } }
FastInt32ToBuffer: MOV dword ptr [RSP + -0xc],EDI MOV qword ptr [RSP + -0x18],RSI MOV RAX,qword ptr [RSP + -0x18] ADD RAX,0xb MOV qword ptr [RSP + -0x20],RAX MOV RAX,qword ptr [RSP + -0x20] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RSP + -0x20],RCX MOV byte ptr [RAX],0x0 CMP dword ptr [RSP + -0xc],0x0 JL 0x00128da2 JMP 0x00128d54 LAB_00128d54: MOV EAX,dword ptr [RSP + -0xc] MOV ECX,0xa CDQ IDIV ECX ADD EDX,0x30 MOV CL,DL MOV RAX,qword ptr [RSP + -0x20] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RSP + -0x20],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + -0xc] MOV ECX,0xa CDQ IDIV ECX MOV dword ptr [RSP + -0xc],EAX CMP dword ptr [RSP + -0xc],0x0 JG 0x00128d54 MOV RAX,qword ptr [RSP + -0x20] ADD RAX,0x1 MOV qword ptr [RSP + -0x8],RAX JMP 0x00128e7f LAB_00128da2: CMP dword ptr [RSP + -0xc],-0xa JLE 0x00128de6 XOR EAX,EAX SUB EAX,dword ptr [RSP + -0xc] MOV dword ptr [RSP + -0xc],EAX MOV EAX,dword ptr [RSP + -0xc] ADD EAX,0x30 MOV CL,AL MOV RAX,qword ptr [RSP + -0x20] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RSP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RSP + -0x20] MOV byte ptr [RAX],0x2d MOV RAX,qword ptr [RSP + -0x20] MOV qword ptr [RSP + -0x8],RAX JMP 0x00128e7f LAB_00128de6: MOV EAX,dword ptr [RSP + -0xc] ADD EAX,0xa MOV dword ptr [RSP + -0xc],EAX XOR EAX,EAX SUB EAX,dword ptr [RSP + -0xc] MOV dword ptr [RSP + -0xc],EAX MOV EAX,dword ptr [RSP + -0xc] MOV ECX,0xa CDQ IDIV ECX ADD EDX,0x30 MOV CL,DL MOV RAX,qword ptr [RSP + -0x20] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RSP + -0x20],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + -0xc] MOV ECX,0xa CDQ IDIV ECX ADD EAX,0x1 MOV dword ptr [RSP + -0xc],EAX LAB_00128e32: MOV EAX,dword ptr [RSP + -0xc] MOV ECX,0xa CDQ IDIV ECX ADD EDX,0x30 MOV CL,DL MOV RAX,qword ptr [RSP + -0x20] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RSP + -0x20],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RSP + -0xc] MOV ECX,0xa CDQ IDIV ECX MOV dword ptr [RSP + -0xc],EAX CMP dword ptr [RSP + -0xc],0x0 JG 0x00128e32 MOV RAX,qword ptr [RSP + -0x20] MOV byte ptr [RAX],0x2d MOV RAX,qword ptr [RSP + -0x20] MOV qword ptr [RSP + -0x8],RAX LAB_00128e7f: MOV RAX,qword ptr [RSP + -0x8] RET
/* google::protobuf::FastInt32ToBuffer(int, char*) */ int1 [16] google::protobuf::FastInt32ToBuffer(int param_1,char *param_2) { long lVar1; char *pcVar2; char *pcVar3; int1 auVar4 [16]; char *local_20; int local_c; char *local_8; pcVar2 = param_2 + 10; param_2[0xb] = '\0'; local_c = param_1; if (param_1 < 0) { if (param_1 < -9) { *pcVar2 = (char)(-(param_1 + 10) % 10) + '0'; local_c = -(param_1 + 10) / 10 + 1; local_20 = param_2 + 9; do { local_8 = local_20 + -1; *local_20 = (char)(local_c % 10) + '0'; lVar1 = (long)local_c; local_c = local_c / 10; pcVar3 = (char *)(lVar1 % 10 & 0xffffffff); local_20 = local_8; } while (0 < local_c); *local_8 = '-'; } else { pcVar3 = param_2 + 9; *pcVar2 = '0' - (char)param_1; *pcVar3 = '-'; local_8 = pcVar3; } } else { do { local_20 = pcVar2; *local_20 = (char)(local_c % 10) + '0'; lVar1 = (long)local_c; local_c = local_c / 10; pcVar3 = (char *)(lVar1 % 10 & 0xffffffff); pcVar2 = local_20 + -1; } while (0 < local_c); local_8 = local_20; } auVar4._8_8_ = pcVar3; auVar4._0_8_ = local_8; return auVar4; }
46,817
js_proxy_revocable
bluesky950520[P]quickjs/quickjs.c
static JSValue js_proxy_revocable(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue proxy_obj, revoke_obj = JS_UNDEFINED, obj; proxy_obj = js_proxy_constructor(ctx, JS_UNDEFINED, argc, argv); if (JS_IsException(proxy_obj)) goto fail; revoke_obj = js_proxy_revoke_constructor(ctx, proxy_obj); if (JS_IsException(revoke_obj)) goto fail; obj = JS_NewObject(ctx); if (JS_IsException(obj)) goto fail; // XXX: exceptions? JS_DefinePropertyValue(ctx, obj, JS_ATOM_proxy, proxy_obj, JS_PROP_C_W_E); JS_DefinePropertyValue(ctx, obj, JS_ATOM_revoke, revoke_obj, JS_PROP_C_W_E); return obj; fail: JS_FreeValue(ctx, proxy_obj); JS_FreeValue(ctx, revoke_obj); return JS_EXCEPTION; }
O2
c
js_proxy_revocable: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx callq 0x2f226 movq %rax, %r15 movq %rdx, %r14 cmpl $0x6, %r14d jne 0x445bb pushq $0x3 popq %r12 xorl %r13d, %r13d jmp 0x44604 leaq 0x18(%rsp), %r9 movq %r15, (%r9) movq %r14, 0x8(%r9) leaq 0xb2(%rip), %rsi # 0x44680 pushq $0x1 popq %r8 movq %rbx, %rdi xorl %edx, %edx xorl %ecx, %ecx callq 0x1b3ba movq %rax, %r13 movq %rdx, %r12 cmpl $0x6, %r12d je 0x44604 movq %r13, 0x10(%rsp) movq %rbx, %rdi callq 0x1b2c9 movq %rdx, %rbp cmpl $0x6, %ebp jne 0x4463b movq 0x10(%rsp), %r13 movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x1801e movq %rbx, %rdi movq %r13, %rsi movq %r12, %rdx callq 0x1801e pushq $0x6 popq %rbp xorl %r13d, %r13d movq %r13, %rax movq %rbp, %rdx addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r13 pushq $0x7 popq %rax movl %eax, (%rsp) movq %rbx, %rdi movq %r13, %rsi movq %rbp, %rdx movl $0x84, %ecx movq %r15, %r8 movq %r14, %r9 callq 0x20872 pushq $0x7 popq %rax movl %eax, (%rsp) movq %rbx, %rdi movq %r13, %rsi movq %rbp, %rdx movl $0x85, %ecx movq 0x10(%rsp), %r8 movq %r12, %r9 callq 0x20872 jmp 0x44626
js_proxy_revocable: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rbx, rdi call js_proxy_constructor mov r15, rax mov r14, rdx cmp r14d, 6 jnz short loc_445BB push 3 pop r12 xor r13d, r13d jmp short loc_44604 loc_445BB: lea r9, [rsp+58h+var_40] mov [r9], r15 mov [r9+8], r14 lea rsi, js_proxy_revoke push 1 pop r8 mov rdi, rbx xor edx, edx xor ecx, ecx call JS_NewCFunctionData mov r13, rax mov r12, rdx cmp r12d, 6 jz short loc_44604 mov [rsp+58h+var_48], r13 mov rdi, rbx call JS_NewObject mov rbp, rdx cmp ebp, 6 jnz short loc_4463B mov r13, [rsp+58h+var_48] loc_44604: mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_FreeValue mov rdi, rbx mov rsi, r13 mov rdx, r12 call JS_FreeValue push 6 pop rbp xor r13d, r13d loc_44626: mov rax, r13 mov rdx, rbp add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4463B: mov r13, rax push 7 pop rax mov [rsp+58h+var_58], eax mov rdi, rbx mov rsi, r13 mov rdx, rbp mov ecx, 84h mov r8, r15 mov r9, r14 call JS_DefinePropertyValue push 7 pop rax mov [rsp+58h+var_58], eax mov rdi, rbx mov rsi, r13 mov rdx, rbp mov ecx, 85h mov r8, [rsp+58h+var_48] mov r9, r12 call JS_DefinePropertyValue jmp short loc_44626
long long js_proxy_revocable( long long a1, long long a2, long long a3, long long a4, _QWORD *a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { unsigned long long v14; // rax long long v15; // rdx _DWORD *v16; // r15 long long v17; // r14 long long v18; // r12 long long v19; // r13 unsigned long long v20; // rax long long v21; // rdx long long v22; // rax long long v23; // rdx __m128 v24; // xmm4 __m128 v25; // xmm5 long long v26; // rbp long long v27; // r13 __m128 v29; // xmm4 __m128 v30; // xmm5 _DWORD *v31; // [rsp+10h] [rbp-48h] _QWORD v32[8]; // [rsp+18h] [rbp-40h] BYREF v14 = js_proxy_constructor(a1, a2, a3, a7, a8, a9, a10, a11, a12, a13, a14, a4, a5, a6); v16 = (_DWORD *)v14; v17 = v15; if ( (_DWORD)v15 == 6 ) { v18 = 3LL; v19 = 0LL; } else { v32[0] = v14; v32[1] = v15; v20 = JS_NewCFunctionData(a1, (long long)js_proxy_revoke, 0, 0, 1u, (long long)v32); v19 = v20; v18 = v21; if ( (_DWORD)v21 != 6 ) { v31 = (_DWORD *)v20; v22 = JS_NewObject(a1); v26 = v23; if ( (_DWORD)v23 != 6 ) { v27 = v22; JS_DefinePropertyValue( a1, v22, v23, 132LL, v16, v17, *(double *)a7.m128_u64, a8, a9, a10, v24, v25, a13, a14, 7); JS_DefinePropertyValue( a1, v27, v26, 133LL, v31, v18, *(double *)a7.m128_u64, a8, a9, a10, v29, v30, a13, a14, 7); return v27; } v19 = (long long)v31; } } JS_FreeValue(a1, (long long)v16, v17); JS_FreeValue(a1, v19, v18); return 0LL; }
js_proxy_revocable: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RBX,RDI CALL 0x0012f226 MOV R15,RAX MOV R14,RDX CMP R14D,0x6 JNZ 0x001445bb PUSH 0x3 POP R12 XOR R13D,R13D JMP 0x00144604 LAB_001445bb: LEA R9,[RSP + 0x18] MOV qword ptr [R9],R15 MOV qword ptr [R9 + 0x8],R14 LEA RSI,[0x144680] PUSH 0x1 POP R8 MOV RDI,RBX XOR EDX,EDX XOR ECX,ECX CALL 0x0011b3ba MOV R13,RAX MOV R12,RDX CMP R12D,0x6 JZ 0x00144604 MOV qword ptr [RSP + 0x10],R13 MOV RDI,RBX CALL 0x0011b2c9 MOV RBP,RDX CMP EBP,0x6 JNZ 0x0014463b MOV R13,qword ptr [RSP + 0x10] LAB_00144604: MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x0011801e MOV RDI,RBX MOV RSI,R13 MOV RDX,R12 CALL 0x0011801e PUSH 0x6 POP RBP XOR R13D,R13D LAB_00144626: MOV RAX,R13 MOV RDX,RBP ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014463b: MOV R13,RAX PUSH 0x7 POP RAX MOV dword ptr [RSP],EAX MOV RDI,RBX MOV RSI,R13 MOV RDX,RBP MOV ECX,0x84 MOV R8,R15 MOV R9,R14 CALL 0x00120872 PUSH 0x7 POP RAX MOV dword ptr [RSP],EAX MOV RDI,RBX MOV RSI,R13 MOV RDX,RBP MOV ECX,0x85 MOV R8,qword ptr [RSP + 0x10] MOV R9,R12 CALL 0x00120872 JMP 0x00144626
int1 [16] js_proxy_revocable(int8 param_1) { int1 auVar1 [16]; int1 auVar2 [16]; int1 auVar3 [16]; auVar1 = js_proxy_constructor(); if (auVar1._8_4_ == 6) { auVar2 = ZEXT816(3) << 0x40; } else { auVar2 = JS_NewCFunctionData(param_1,js_proxy_revoke,0,0,1); if (auVar2._8_4_ != 6) { auVar3 = JS_NewObject(param_1); if (auVar3._8_4_ != 6) { JS_DefinePropertyValue(param_1,auVar3._0_8_,auVar3._8_8_,0x84,auVar1._0_8_,auVar1._8_8_,7); JS_DefinePropertyValue(param_1,auVar3._0_8_,auVar3._8_8_,0x85,auVar2._0_8_,auVar2._8_8_,7); return auVar3; } } } JS_FreeValue(param_1,auVar1._0_8_,auVar1._8_8_); JS_FreeValue(param_1,auVar2._0_8_,auVar2._8_8_); return ZEXT816(6) << 0x40; }
46,818
js_new_string8_len
bluesky950520[P]quickjs/quickjs.c
static JSValue js_new_string8_len(JSContext *ctx, const char *buf, int len) { JSString *str; str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; memcpy(str->u.str8, buf, len); str->u.str8[len] = '\0'; return JS_MKPTR(JS_TAG_STRING, str); }
O1
c
js_new_string8_len: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebp movq %rsi, %rbx movl %edx, %esi xorl %edx, %edx callq 0x20b73 testq %rax, %rax je 0x20222 movq %rax, %r14 movq %rax, %rdi addq $0x18, %rdi movslq %ebp, %r15 movq %rbx, %rsi movq %r15, %rdx callq 0xe5b0 movb $0x0, 0x18(%r14,%r15) movq %r14, (%rsp) movq $-0x7, %rdx jmp 0x2022e movl $0x0, (%rsp) movl $0x6, %edx movq (%rsp), %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
js_cond_signal: push rax call _pthread_cond_signal test eax, eax jnz short loc_201E9 pop rax retn loc_201E9: call _abort
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm4,xmm5> js_cond_signal() { if ( (unsigned int)pthread_cond_signal() ) abort(); }
js_cond_signal: PUSH RAX CALL 0x001114a0 TEST EAX,EAX JNZ 0x001201e9 POP RAX RET LAB_001201e9: CALL 0x00111090
int8 js_cond_signal(pthread_cond_t *param_1) { int iVar1; int8 in_RAX; iVar1 = pthread_cond_signal(param_1); if (iVar1 == 0) { return in_RAX; } /* WARNING: Subroutine does not return */ abort(); }
46,819
js_new_string8_len
bluesky950520[P]quickjs/quickjs.c
static JSValue js_new_string8_len(JSContext *ctx, const char *buf, int len) { JSString *str; str = js_alloc_string(ctx, len, 0); if (!str) return JS_EXCEPTION; memcpy(str->u.str8, buf, len); str->u.str8[len] = '\0'; return JS_MKPTR(JS_TAG_STRING, str); }
O2
c
js_new_string8_len: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %ebp movq %rsi, %r14 xorl %ebx, %ebx movl %edx, %esi xorl %edx, %edx callq 0x1ad45 testq %rax, %rax je 0x1a52a movq %rax, %r15 movq %rax, %rdi addq $0x18, %rdi movslq %ebp, %rbx movq %r14, %rsi movq %rbx, %rdx callq 0xe5c0 movb $0x0, 0x18(%r15,%rbx) pushq $-0x7 popq %rdx movq %r15, %rbx jmp 0x1a52d pushq $0x6 popq %rdx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
js_new_string8_len: push rbp push r15 push r14 push rbx push rax mov ebp, edx mov r14, rsi xor ebx, ebx mov esi, edx xor edx, edx call js_alloc_string test rax, rax jz short loc_1A52A mov r15, rax mov rdi, rax add rdi, 18h movsxd rbx, ebp mov rsi, r14 mov rdx, rbx call _memcpy mov byte ptr [r15+rbx+18h], 0 push 0FFFFFFFFFFFFFFF9h pop rdx mov rbx, r15 jmp short loc_1A52D loc_1A52A: push 6 pop rdx loc_1A52D: mov rax, rbx add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long js_new_string8_len(long long a1, long long a2, unsigned int a3) { long long v4; // rbx long long v5; // rax long long v6; // r15 v4 = 0LL; v5 = js_alloc_string(a1, a3, 0LL); if ( v5 ) { v6 = v5; memcpy(v5 + 24, a2, (int)a3); *(_BYTE *)(v6 + (int)a3 + 24) = 0; return v6; } return v4; }
js_new_string8_len: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EBP,EDX MOV R14,RSI XOR EBX,EBX MOV ESI,EDX XOR EDX,EDX CALL 0x0011ad45 TEST RAX,RAX JZ 0x0011a52a MOV R15,RAX MOV RDI,RAX ADD RDI,0x18 MOVSXD RBX,EBP MOV RSI,R14 MOV RDX,RBX CALL 0x0010e5c0 MOV byte ptr [R15 + RBX*0x1 + 0x18],0x0 PUSH -0x7 POP RDX MOV RBX,R15 JMP 0x0011a52d LAB_0011a52a: PUSH 0x6 POP RDX LAB_0011a52d: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int1 [16] js_new_string8_len(int8 param_1,void *param_2,int param_3) { long lVar1; int8 uVar2; long lVar3; int1 auVar4 [16]; lVar3 = 0; lVar1 = js_alloc_string(param_1,param_3,0); if (lVar1 == 0) { uVar2 = 6; } else { memcpy((void *)(lVar1 + 0x18),param_2,(long)param_3); *(int1 *)(lVar1 + 0x18 + (long)param_3) = 0; uVar2 = 0xfffffffffffffff9; lVar3 = lVar1; } auVar4._8_8_ = uVar2; auVar4._0_8_ = lVar3; return auVar4; }
46,820
llava_eval_image_embed
monkey531[P]llama/examples/llava/llava.cpp
bool llava_eval_image_embed(llama_context * ctx_llama, const struct llava_image_embed * image_embed, int n_batch, int * n_past) { int n_embd = llama_model_n_embd(llama_get_model(ctx_llama)); for (int i = 0; i < image_embed->n_image_pos; i += n_batch) { int n_eval = image_embed->n_image_pos - i; if (n_eval > n_batch) { n_eval = n_batch; } float * embd = image_embed->embed+i*n_embd; llava_embd_batch llava_batch = llava_embd_batch(embd, n_eval, *n_past, 0); if (llama_decode(ctx_llama, llava_batch.batch)) { LOG_ERR("%s : failed to eval\n", __func__); return false; } *n_past += n_eval; } return true; }
O2
cpp
llava_eval_image_embed: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x118, %rsp # imm = 0x118 movq %rcx, 0x40(%rsp) movl %edx, %ebx movq %rsi, %r15 movq %rdi, 0x58(%rsp) callq 0x26a90 movq %rax, %rdi callq 0x262f0 movl %ebx, 0x3c(%rsp) movslq %ebx, %rbx cltq imulq %rbx, %rax shlq $0x2, %rax movq %rax, 0x48(%rsp) movq %rbx, 0x60(%rsp) negq %rbx xorl %r14d, %r14d xorl %r12d, %r12d movq %r15, 0x50(%rsp) movslq 0x8(%r15), %rbp addq 0x60(%rsp), %rbx cmpq %rbp, %rbx jge 0x2cde5 leal (%r12,%rbp), %r13d movl 0x3c(%rsp), %eax cmpl %eax, %r13d cmovgel %eax, %r13d movq (%r15), %rsi addq %r14, %rsi movq 0x40(%rsp), %rax movl (%rax), %ecx leaq 0x68(%rsp), %rdi movl %r13d, %edx xorl %r8d, %r8d callq 0x2d0b2 leaq 0xe0(%rsp), %rcx movq 0x30(%rcx), %rax movq %rax, 0x30(%rsp) movups (%rcx), %xmm0 movups 0x10(%rcx), %xmm1 movups 0x20(%rcx), %xmm2 movups %xmm2, 0x20(%rsp) movups %xmm1, 0x10(%rsp) movups %xmm0, (%rsp) movq 0x58(%rsp), %rdi callq 0x27420 movl %eax, %r15d testl %eax, %eax jne 0x2cdc4 movq 0x40(%rsp), %rax addl %r13d, (%rax) subl 0x3c(%rsp), %r12d addq 0x48(%rsp), %r14 leaq 0x68(%rsp), %rdi callq 0x2d232 testl %r15d, %r15d movq 0x50(%rsp), %r15 je 0x2cd1f jmp 0x2cde5 movq 0xf41bd(%rip), %rax # 0x120f88 movq (%rax), %rdi leaq 0x98a6d(%rip), %rsi # 0xc5842 leaq 0x98a7b(%rip), %rdx # 0xc5857 xorl %eax, %eax callq 0x271f0 jmp 0x2cda0 cmpq %rbp, %rbx setge %al addq $0x118, %rsp # imm = 0x118 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x68(%rsp), %rdi callq 0x2d232 movq %rbx, %rdi callq 0x27660
llava_eval_image_embed: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 118h mov [rsp+148h+var_108], rcx mov ebx, edx mov r15, rsi mov [rsp+148h+var_F0], rdi call _llama_get_model mov rdi, rax call _llama_model_n_embd mov [rsp+148h+var_10C], ebx movsxd rbx, ebx cdqe imul rax, rbx shl rax, 2 mov [rsp+148h+var_100], rax mov [rsp+148h+var_E8], rbx neg rbx xor r14d, r14d xor r12d, r12d mov [rsp+148h+var_F8], r15 loc_2CD1F: movsxd rbp, dword ptr [r15+8] add rbx, [rsp+148h+var_E8] cmp rbx, rbp jge loc_2CDE5 lea r13d, [r12+rbp] mov eax, [rsp+148h+var_10C] cmp r13d, eax cmovge r13d, eax mov rsi, [r15] add rsi, r14; float * mov rax, [rsp+148h+var_108] mov ecx, [rax]; int lea rdi, [rsp+148h+var_E0]; this mov edx, r13d; int xor r8d, r8d; int call _ZN16llava_embd_batchC2EPfiii; llava_embd_batch::llava_embd_batch(float *,int,int,int) lea rcx, [rsp+148h+var_68] mov rax, [rcx+30h] mov [rsp+148h+var_118], rax movups xmm0, xmmword ptr [rcx] movups xmm1, xmmword ptr [rcx+10h] movups xmm2, xmmword ptr [rcx+20h] movups [rsp+148h+var_128], xmm2 movups [rsp+148h+var_138], xmm1 movups [rsp+148h+var_148], xmm0 mov rdi, [rsp+148h+var_F0] call _llama_decode mov r15d, eax test eax, eax jnz short loc_2CDC4 mov rax, [rsp+148h+var_108] add [rax], r13d loc_2CDA0: sub r12d, [rsp+148h+var_10C] add r14, [rsp+148h+var_100] lea rdi, [rsp+148h+var_E0]; this call _ZN16llava_embd_batchD2Ev; llava_embd_batch::~llava_embd_batch() test r15d, r15d mov r15, [rsp+148h+var_F8] jz loc_2CD1F jmp short loc_2CDE5 loc_2CDC4: mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aSFailedToEval; "%s : failed to eval\n" lea rdx, aLlavaEvalImage; "llava_eval_image_embed" xor eax, eax call _fprintf jmp short loc_2CDA0 loc_2CDE5: cmp rbx, rbp setnl al add rsp, 118h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_60]; this call _ZN16llava_embd_batchD2Ev; llava_embd_batch::~llava_embd_batch() mov rdi, rbx call __Unwind_Resume
bool llava_eval_image_embed(long long a1, long long a2, int a3, int *a4) { long long v5; // r15 long long model; // rax long long v7; // rbx long long v8; // r14 int v9; // r12d long long v10; // rbp int v11; // r13d float *v12; // rsi long long v13; // rdx long long v14; // r8 long long v15; // r9 int v16; // r15d bool v17; // zf int v19; // [rsp+3Ch] [rbp-10Ch] long long v21; // [rsp+48h] [rbp-100h] long long v23; // [rsp+60h] [rbp-E8h] _BYTE v24[120]; // [rsp+68h] [rbp-E0h] BYREF _QWORD v25[13]; // [rsp+E0h] [rbp-68h] BYREF v5 = a2; model = llama_get_model(a1); v19 = a3; v21 = 4 * a3 * (long long)(int)llama_model_n_embd(model); v23 = a3; v7 = -(long long)a3; v8 = 0LL; v9 = 0; do { v10 = *(int *)(v5 + 8); v7 += v23; if ( v7 >= v10 ) break; v11 = v9 + v10; if ( v9 + (int)v10 >= v19 ) v11 = v19; v12 = (float *)(v8 + *(_QWORD *)v5); llava_embd_batch::llava_embd_batch((llava_embd_batch *)v24, v12, v11, *a4, 0); v16 = llama_decode(a1, v12, v13, v25, v14, v15, v25[0], v25[1], v25[2], v25[3], v25[4], v25[5], v25[6]); if ( v16 ) fprintf(stderr, "%s : failed to eval\n", "llava_eval_image_embed"); else *a4 += v11; v9 -= v19; v8 += v21; llava_embd_batch::~llava_embd_batch((llava_embd_batch *)v24); v17 = v16 == 0; v5 = a2; } while ( v17 ); return v7 >= v10; }
llava_eval_image_embed: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x118 MOV qword ptr [RSP + 0x40],RCX MOV EBX,EDX MOV R15,RSI MOV qword ptr [RSP + 0x58],RDI CALL 0x00126a90 MOV RDI,RAX CALL 0x001262f0 MOV dword ptr [RSP + 0x3c],EBX MOVSXD RBX,EBX CDQE IMUL RAX,RBX SHL RAX,0x2 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x60],RBX NEG RBX XOR R14D,R14D XOR R12D,R12D MOV qword ptr [RSP + 0x50],R15 LAB_0012cd1f: MOVSXD RBP,dword ptr [R15 + 0x8] ADD RBX,qword ptr [RSP + 0x60] CMP RBX,RBP JGE 0x0012cde5 LEA R13D,[R12 + RBP*0x1] MOV EAX,dword ptr [RSP + 0x3c] CMP R13D,EAX CMOVGE R13D,EAX MOV RSI,qword ptr [R15] ADD RSI,R14 MOV RAX,qword ptr [RSP + 0x40] MOV ECX,dword ptr [RAX] LEA RDI,[RSP + 0x68] MOV EDX,R13D XOR R8D,R8D CALL 0x0012d0b2 LAB_0012cd5d: LEA RCX,[RSP + 0xe0] MOV RAX,qword ptr [RCX + 0x30] MOV qword ptr [RSP + 0x30],RAX MOVUPS XMM0,xmmword ptr [RCX] MOVUPS XMM1,xmmword ptr [RCX + 0x10] MOVUPS XMM2,xmmword ptr [RCX + 0x20] MOVUPS xmmword ptr [RSP + 0x20],XMM2 MOVUPS xmmword ptr [RSP + 0x10],XMM1 MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,qword ptr [RSP + 0x58] CALL 0x00127420 LAB_0012cd91: MOV R15D,EAX TEST EAX,EAX JNZ 0x0012cdc4 MOV RAX,qword ptr [RSP + 0x40] ADD dword ptr [RAX],R13D LAB_0012cda0: SUB R12D,dword ptr [RSP + 0x3c] ADD R14,qword ptr [RSP + 0x48] LEA RDI,[RSP + 0x68] CALL 0x0012d232 TEST R15D,R15D MOV R15,qword ptr [RSP + 0x50] JZ 0x0012cd1f JMP 0x0012cde5 LAB_0012cdc4: MOV RAX,qword ptr [0x00220f88] MOV RDI,qword ptr [RAX] LEA RSI,[0x1c5842] LEA RDX,[0x1c5857] XOR EAX,EAX CALL 0x001271f0 JMP 0x0012cda0 LAB_0012cde5: CMP RBX,RBP SETGE AL ADD RSP,0x118 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
bool llava_eval_image_embed(int8 param_1,long *param_2,int param_3,int *param_4) { int iVar1; int iVar2; int iVar3; int iVar4; int8 uVar5; long lVar6; long lVar7; int iVar8; long lVar9; llava_embd_batch local_e0 [176]; uVar5 = llama_get_model(); iVar3 = llama_model_n_embd(uVar5); lVar6 = (long)param_3; lVar7 = -lVar6; lVar9 = 0; iVar8 = 0; do { iVar1 = (int)param_2[1]; lVar7 = lVar7 + lVar6; if (iVar1 <= lVar7) break; iVar2 = iVar8 + iVar1; if (param_3 <= iVar8 + iVar1) { iVar2 = param_3; } llava_embd_batch::llava_embd_batch(local_e0,(float *)(*param_2 + lVar9),iVar2,*param_4,0); /* try { // try from 0012cd5d to 0012cd90 has its CatchHandler @ 0012cdfd */ iVar4 = llama_decode(param_1); if (iVar4 == 0) { *param_4 = *param_4 + iVar2; } else { fprintf(*(FILE **)PTR_stderr_00220f88,"%s : failed to eval\n","llava_eval_image_embed"); } iVar8 = iVar8 - param_3; lVar9 = lVar9 + iVar3 * lVar6 * 4; llava_embd_batch::~llava_embd_batch(local_e0); } while (iVar4 == 0); return iVar1 <= lVar7; }
46,821
my_thread_destroy_internal_mutex
eloqsql/mysys/my_thr_init.c
void my_thread_destroy_internal_mutex(void) { mysql_mutex_destroy(&THR_LOCK_threads); mysql_mutex_destroy(&THR_LOCK_malloc); mysql_cond_destroy(&THR_COND_threads); }
O3
c
my_thread_destroy_internal_mutex: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax leaq 0x33fe64(%rip), %rbx # 0x366880 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x26a3a leaq 0x2c8df4(%rip), %rax # 0x2ef820 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0x33fe3f(%rip), %rdi # 0x366880 callq 0x24350 leaq 0x33fe7b(%rip), %rbx # 0x3668c8 movq 0x40(%rbx), %rdi testq %rdi, %rdi je 0x26a6b leaq 0x2c8dc3(%rip), %rax # 0x2ef820 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0x40(%rbx) leaq 0x33fe56(%rip), %rdi # 0x3668c8 callq 0x24350 leaq 0x33fe92(%rip), %rax # 0x366910 movq 0x30(%rax), %rdi testq %rdi, %rdi jne 0x26a99 leaq 0x33fe82(%rip), %rdi # 0x366910 addq $0x8, %rsp popq %rbx popq %rbp jmp 0x245a0 callq 0x24a08 jmp 0x26a87
my_thread_destroy_internal_mutex: push rbp mov rbp, rsp push rbx push rax lea rbx, THR_LOCK_threads mov rdi, [rbx+40h] test rdi, rdi jz short loc_26A3A lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_26A3A: lea rdi, THR_LOCK_threads call _pthread_mutex_destroy lea rbx, THR_LOCK_malloc mov rdi, [rbx+40h] test rdi, rdi jz short loc_26A6B lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+40h], 0 loc_26A6B: lea rdi, THR_LOCK_malloc call _pthread_mutex_destroy lea rax, THR_COND_threads mov rdi, [rax+30h] test rdi, rdi jnz short loc_26A99 loc_26A87: lea rdi, THR_COND_threads add rsp, 8 pop rbx pop rbp jmp _pthread_cond_destroy loc_26A99: call my_thread_destroy_internal_mutex_cold_1 jmp short loc_26A87
long long my_thread_destroy_internal_mutex() { long long v0; // rdi long long v1; // rdi v0 = THR_LOCK_threads[8]; if ( v0 ) { (*((void ( **)(long long))PSI_server[0] + 9))(v0); THR_LOCK_threads[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_threads); v1 = THR_LOCK_malloc[8]; if ( v1 ) { (*((void ( **)(long long))PSI_server[0] + 9))(v1); THR_LOCK_malloc[8] = 0LL; } pthread_mutex_destroy(THR_LOCK_malloc); if ( THR_COND_threads[6] ) my_thread_destroy_internal_mutex_cold_1(); return pthread_cond_destroy(THR_COND_threads); }
my_thread_destroy_internal_mutex: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LEA RBX,[0x466880] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x00126a3a LEA RAX,[0x3ef820] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_00126a3a: LEA RDI,[0x466880] CALL 0x00124350 LEA RBX,[0x4668c8] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JZ 0x00126a6b LEA RAX,[0x3ef820] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0x40],0x0 LAB_00126a6b: LEA RDI,[0x4668c8] CALL 0x00124350 LEA RAX,[0x466910] MOV RDI,qword ptr [RAX + 0x30] TEST RDI,RDI JNZ 0x00126a99 LAB_00126a87: LEA RDI,[0x466910] ADD RSP,0x8 POP RBX POP RBP JMP 0x001245a0 LAB_00126a99: CALL 0x00124a08 JMP 0x00126a87
void my_thread_destroy_internal_mutex(void) { if (THR_LOCK_threads._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_threads._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_threads); if (THR_LOCK_malloc._64_8_ != 0) { (**(code **)(PSI_server + 0x48))(); THR_LOCK_malloc._64_8_ = 0; } pthread_mutex_destroy((pthread_mutex_t *)THR_LOCK_malloc); if (THR_COND_threads._48_8_ != 0) { my_thread_destroy_internal_mutex_cold_1(); } pthread_cond_destroy((pthread_cond_t *)THR_COND_threads); return; }
46,822
my_string_repertoire_8bit
eloqsql/strings/ctype.c
uint my_string_repertoire_8bit(CHARSET_INFO *cs, const char *str, size_t length) { const char *strend; if ((cs->state & MY_CS_NONASCII) && length > 0) return MY_REPERTOIRE_UNICODE30; for (strend= str + length; str < strend; str++) { if (((uchar) *str) > 0x7F) return MY_REPERTOIRE_UNICODE30; } return MY_REPERTOIRE_ASCII; }
O3
c
my_string_repertoire_8bit: movl $0x3, %eax testq %rdx, %rdx je 0x58917 movl $0x2000, %ecx # imm = 0x2000 andl 0xc(%rdi), %ecx je 0x58917 retq testq %rdx, %rdx jle 0x58937 pushq %rbp movq %rsp, %rbp addq %rsi, %rdx cmpb $0x0, (%rsi) js 0x58935 incq %rsi cmpq %rdx, %rsi jb 0x58923 movl $0x1, %eax popq %rbp retq movl $0x1, %eax retq
my_string_repertoire_8bit: mov eax, 3 test rdx, rdx jz short loc_58917 mov ecx, 2000h and ecx, [rdi+0Ch] jz short loc_58917 retn loc_58917: test rdx, rdx jle short loc_58937 push rbp mov rbp, rsp add rdx, rsi loc_58923: cmp byte ptr [rsi], 0 js short loc_58935 inc rsi cmp rsi, rdx jb short loc_58923 mov eax, 1 loc_58935: pop rbp retn loc_58937: mov eax, 1 retn
long long my_string_repertoire_8bit(long long a1, char *a2, long long a3) { long long result; // rax char *v4; // rdx result = 3LL; if ( !a3 || (*(_DWORD *)(a1 + 12) & 0x2000) == 0 ) { if ( a3 <= 0 ) { return 1LL; } else { v4 = &a2[a3]; while ( *a2 >= 0 ) { if ( ++a2 >= v4 ) return 1LL; } } } return result; }
my_string_repertoire_8bit: MOV EAX,0x3 TEST RDX,RDX JZ 0x00158917 MOV ECX,0x2000 AND ECX,dword ptr [RDI + 0xc] JZ 0x00158917 RET LAB_00158917: TEST RDX,RDX JLE 0x00158937 PUSH RBP MOV RBP,RSP ADD RDX,RSI LAB_00158923: CMP byte ptr [RSI],0x0 JS 0x00158935 INC RSI CMP RSI,RDX JC 0x00158923 MOV EAX,0x1 LAB_00158935: POP RBP RET LAB_00158937: MOV EAX,0x1 RET
int8 my_string_repertoire_8bit(long param_1,char *param_2,long param_3) { char *pcVar1; if ((param_3 != 0) && ((*(uint *)(param_1 + 0xc) & 0x2000) != 0)) { return 3; } if (param_3 < 1) { return 1; } pcVar1 = param_2 + param_3; do { if (*param_2 < '\0') { return 3; } param_2 = param_2 + 1; } while (param_2 < pcVar1); return 1; }
46,823
my_mb_wc_utf8mb4_no_range
eloqsql/strings/ctype-utf8.c
static int my_mb_wc_utf8mb4_no_range(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s) { uchar c; c= s[0]; if (c < 0x80) { *pwc = c; return 1; } if (c < 0xc2) return MY_CS_ILSEQ; if (c < 0xe0) { if (!IS_CONTINUATION_BYTE(s[1])) return MY_CS_ILSEQ; *pwc= UTF8MB2_CODE(c, s[1]); return 2; } if (c < 0xf0) { if (!IS_UTF8MB3_STEP2(c, s[1], s[2])) return MY_CS_ILSEQ; *pwc= UTF8MB3_CODE(c, s[1], s[2]); return 3; } else if (c < 0xf5) { if (!IS_UTF8MB4_STEP2(c, s[1], s[2], s[3])) return MY_CS_ILSEQ; *pwc= UTF8MB4_CODE(c, s[1], s[2], s[3]); return 4; } return MY_CS_ILSEQ; }
O0
c
my_mb_wc_utf8mb4_no_range: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax movb (%rax), %al movb %al, -0x21(%rbp) movzbl -0x21(%rbp), %eax cmpl $0x80, %eax jge 0x6a0bd movzbl -0x21(%rbp), %eax movl %eax, %ecx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x6a2b9 movzbl -0x21(%rbp), %eax cmpl $0xc2, %eax jge 0x6a0d4 movl $0x0, -0x4(%rbp) jmp 0x6a2b9 movzbl -0x21(%rbp), %eax cmpl $0xe0, %eax jge 0x6a130 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jl 0x6a0fd movl $0x0, -0x4(%rbp) jmp 0x6a2b9 movzbl -0x21(%rbp), %eax andl $0x1f, %eax movslq %eax, %rcx shlq $0x6, %rcx movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x6a2b9 movzbl -0x21(%rbp), %eax cmpl $0xf0, %eax jge 0x6a1d2 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x6a17d movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x6a17d movzbl -0x21(%rbp), %eax cmpl $0xe1, %eax jge 0x6a189 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0xa0, %eax jge 0x6a189 movl $0x0, -0x4(%rbp) jmp 0x6a2b9 movzbl -0x21(%rbp), %eax andl $0xf, %eax movslq %eax, %rcx shlq $0xc, %rcx movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x3, -0x4(%rbp) jmp 0x6a2b9 movzbl -0x21(%rbp), %eax cmpl $0xf5, %eax jge 0x6a2b0 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x6a24b movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x6a24b movq -0x20(%rbp), %rax movzbl 0x3(%rax), %eax xorl $0x80, %eax cmpl $0x40, %eax jge 0x6a24b movzbl -0x21(%rbp), %eax cmpl $0xf1, %eax jge 0x6a231 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x90, %eax jl 0x6a24b movzbl -0x21(%rbp), %eax cmpl $0xf3, %eax jle 0x6a254 movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax cmpl $0x8f, %eax jle 0x6a254 movl $0x0, -0x4(%rbp) jmp 0x6a2b9 movzbl -0x21(%rbp), %eax andl $0x7, %eax movslq %eax, %rcx shlq $0x12, %rcx movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax xorl $0x80, %eax cltq shlq $0xc, %rax orq %rax, %rcx movq -0x20(%rbp), %rax movzbl 0x2(%rax), %eax xorl $0x80, %eax cltq shlq $0x6, %rax orq %rax, %rcx movq -0x20(%rbp), %rax movzbl 0x3(%rax), %eax xorl $0x80, %eax cltq orq %rax, %rcx movq -0x18(%rbp), %rax movq %rcx, (%rax) movl $0x4, -0x4(%rbp) jmp 0x6a2b9 jmp 0x6a2b2 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nop
my_mb_wc_utf8mb4_no_range: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_20] mov al, [rax] mov [rbp+var_21], al movzx eax, [rbp+var_21] cmp eax, 80h jge short loc_6A0BD movzx eax, [rbp+var_21] mov ecx, eax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 1 jmp loc_6A2B9 loc_6A0BD: movzx eax, [rbp+var_21] cmp eax, 0C2h jge short loc_6A0D4 mov [rbp+var_4], 0 jmp loc_6A2B9 loc_6A0D4: movzx eax, [rbp+var_21] cmp eax, 0E0h jge short loc_6A130 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jl short loc_6A0FD mov [rbp+var_4], 0 jmp loc_6A2B9 loc_6A0FD: movzx eax, [rbp+var_21] and eax, 1Fh movsxd rcx, eax shl rcx, 6 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 2 jmp loc_6A2B9 loc_6A130: movzx eax, [rbp+var_21] cmp eax, 0F0h jge loc_6A1D2 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_6A17D mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_6A17D movzx eax, [rbp+var_21] cmp eax, 0E1h jge short loc_6A189 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0A0h jge short loc_6A189 loc_6A17D: mov [rbp+var_4], 0 jmp loc_6A2B9 loc_6A189: movzx eax, [rbp+var_21] and eax, 0Fh movsxd rcx, eax shl rcx, 0Ch mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 3 jmp loc_6A2B9 loc_6A1D2: movzx eax, [rbp+var_21] cmp eax, 0F5h jge loc_6A2B0 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cmp eax, 40h ; '@' jge short loc_6A24B mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] xor eax, 80h cmp eax, 40h ; '@' jge short loc_6A24B mov rax, [rbp+var_20] movzx eax, byte ptr [rax+3] xor eax, 80h cmp eax, 40h ; '@' jge short loc_6A24B movzx eax, [rbp+var_21] cmp eax, 0F1h jge short loc_6A231 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 90h jl short loc_6A24B loc_6A231: movzx eax, [rbp+var_21] cmp eax, 0F3h jle short loc_6A254 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] cmp eax, 8Fh jle short loc_6A254 loc_6A24B: mov [rbp+var_4], 0 jmp short loc_6A2B9 loc_6A254: movzx eax, [rbp+var_21] and eax, 7 movsxd rcx, eax shl rcx, 12h mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] xor eax, 80h cdqe shl rax, 0Ch or rcx, rax mov rax, [rbp+var_20] movzx eax, byte ptr [rax+2] xor eax, 80h cdqe shl rax, 6 or rcx, rax mov rax, [rbp+var_20] movzx eax, byte ptr [rax+3] xor eax, 80h cdqe or rcx, rax mov rax, [rbp+var_18] mov [rax], rcx mov [rbp+var_4], 4 jmp short loc_6A2B9 loc_6A2B0: jmp short $+2 loc_6A2B2: mov [rbp+var_4], 0 loc_6A2B9: mov eax, [rbp+var_4] pop rbp retn
long long my_mb_wc_utf8mb4_no_range(long long a1, unsigned long long *a2, unsigned __int8 *a3) { unsigned __int8 v4; // [rsp+1h] [rbp-21h] v4 = *a3; if ( *a3 >= 0x80u ) { if ( v4 >= 0xC2u ) { if ( v4 >= 0xE0u ) { if ( v4 >= 0xF0u ) { if ( v4 >= 0xF5u ) { return 0; } else if ( (a3[1] ^ 0x80) < 64 && (a3[2] ^ 0x80) < 64 && (a3[3] ^ 0x80) < 64 && (v4 >= 0xF1u || a3[1] >= 0x90u) && (v4 <= 0xF3u || a3[1] <= 0x8Fu) ) { *a2 = a3[3] ^ 0x80u | ((long long)(a3[2] ^ 0x80u) << 6) | ((long long)(a3[1] ^ 0x80u) << 12) | ((unsigned long long)(v4 & 7) << 18); return 4; } else { return 0; } } else if ( (a3[1] ^ 0x80) < 64 && (a3[2] ^ 0x80) < 64 && (v4 >= 0xE1u || a3[1] >= 0xA0u) ) { *a2 = a3[2] ^ 0x80u | ((long long)(a3[1] ^ 0x80u) << 6) | ((unsigned long long)(v4 & 0xF) << 12); return 3; } else { return 0; } } else if ( (a3[1] ^ 0x80) < 64 ) { *a2 = a3[1] ^ 0x80u | ((unsigned long long)(v4 & 0x1F) << 6); return 2; } else { return 0; } } else { return 0; } } else { *a2 = v4; return 1; } }
my_mb_wc_utf8mb4_no_range: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x20] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x21],AL MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0x80 JGE 0x0016a0bd MOVZX EAX,byte ptr [RBP + -0x21] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0016a2b9 LAB_0016a0bd: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xc2 JGE 0x0016a0d4 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016a2b9 LAB_0016a0d4: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe0 JGE 0x0016a130 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JL 0x0016a0fd MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016a2b9 LAB_0016a0fd: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x1f MOVSXD RCX,EAX SHL RCX,0x6 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x2 JMP 0x0016a2b9 LAB_0016a130: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf0 JGE 0x0016a1d2 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0016a17d MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0016a17d MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xe1 JGE 0x0016a189 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa0 JGE 0x0016a189 LAB_0016a17d: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016a2b9 LAB_0016a189: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0xf MOVSXD RCX,EAX SHL RCX,0xc MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x3 JMP 0x0016a2b9 LAB_0016a1d2: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf5 JGE 0x0016a2b0 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0016a24b MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0016a24b MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x3] XOR EAX,0x80 CMP EAX,0x40 JGE 0x0016a24b MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf1 JGE 0x0016a231 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x90 JL 0x0016a24b LAB_0016a231: MOVZX EAX,byte ptr [RBP + -0x21] CMP EAX,0xf3 JLE 0x0016a254 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0x8f JLE 0x0016a254 LAB_0016a24b: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0016a2b9 LAB_0016a254: MOVZX EAX,byte ptr [RBP + -0x21] AND EAX,0x7 MOVSXD RCX,EAX SHL RCX,0x12 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] XOR EAX,0x80 CDQE SHL RAX,0xc OR RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x2] XOR EAX,0x80 CDQE SHL RAX,0x6 OR RCX,RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x3] XOR EAX,0x80 CDQE OR RCX,RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x4 JMP 0x0016a2b9 LAB_0016a2b0: JMP 0x0016a2b2 LAB_0016a2b2: MOV dword ptr [RBP + -0x4],0x0 LAB_0016a2b9: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_mb_wc_utf8mb4_no_range(int8 param_1,ulong *param_2,byte *param_3) { byte bVar1; int4 local_c; bVar1 = *param_3; if (bVar1 < 0x80) { *param_2 = (ulong)bVar1; local_c = 1; } else if (bVar1 < 0xc2) { local_c = 0; } else if (bVar1 < 0xe0) { if ((param_3[1] ^ 0x80) < 0x40) { *param_2 = (long)(int)(bVar1 & 0x1f) << 6 | (long)(int)(param_3[1] ^ 0x80); local_c = 2; } else { local_c = 0; } } else if (bVar1 < 0xf0) { if ((((param_3[1] ^ 0x80) < 0x40) && ((param_3[2] ^ 0x80) < 0x40)) && ((0xe0 < bVar1 || (0x9f < param_3[1])))) { *param_2 = (long)(int)(bVar1 & 0xf) << 0xc | (long)(int)(param_3[1] ^ 0x80) << 6 | (long)(int)(param_3[2] ^ 0x80); local_c = 3; } else { local_c = 0; } } else if (bVar1 < 0xf5) { if ((((((param_3[1] ^ 0x80) < 0x40) && ((param_3[2] ^ 0x80) < 0x40)) && ((param_3[3] ^ 0x80) < 0x40)) && ((0xf0 < bVar1 || (0x8f < param_3[1])))) && ((bVar1 < 0xf4 || (param_3[1] < 0x90)))) { *param_2 = (long)(int)(bVar1 & 7) << 0x12 | (long)(int)(param_3[1] ^ 0x80) << 0xc | (long)(int)(param_3[2] ^ 0x80) << 6 | (long)(int)(param_3[3] ^ 0x80); local_c = 4; } else { local_c = 0; } } else { local_c = 0; } return local_c; }
46,824
bf_cmp
bluesky950520[P]quickjs/libbf.c
int bf_cmp(const bf_t *a, const bf_t *b) { int res; if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) { res = 2; } else if (a->sign != b->sign) { if (a->expn == BF_EXP_ZERO && b->expn == BF_EXP_ZERO) res = 0; else res = 1 - 2 * a->sign; } else { res = bf_cmpu(a, b); if (a->sign) res = -res; } return res; }
O0
c
bf_cmp: subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x10(%rsp), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, 0x10(%rax) je 0xe5f48 movq 0x8(%rsp), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, 0x10(%rax) jne 0xe5f55 movl $0x2, 0x4(%rsp) jmp 0xe5fde movq 0x10(%rsp), %rax movl 0x8(%rax), %eax movq 0x8(%rsp), %rcx cmpl 0x8(%rcx), %eax je 0xe5fb2 movq 0x10(%rsp), %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 cmpq %rcx, 0x10(%rax) jne 0xe5f9b movq 0x8(%rsp), %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 cmpq %rcx, 0x10(%rax) jne 0xe5f9b movl $0x0, 0x4(%rsp) jmp 0xe5fb0 movq 0x10(%rsp), %rax movl 0x8(%rax), %ecx shll %ecx movl $0x1, %eax subl %ecx, %eax movl %eax, 0x4(%rsp) jmp 0xe5fdc movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0xe5c80 movl %eax, 0x4(%rsp) movq 0x10(%rsp), %rax cmpl $0x0, 0x8(%rax) je 0xe5fda xorl %eax, %eax subl 0x4(%rsp), %eax movl %eax, 0x4(%rsp) jmp 0xe5fdc jmp 0xe5fde movl 0x4(%rsp), %eax addq $0x18, %rsp retq nopw (%rax,%rax)
bf_cmp: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov rax, [rsp+18h+var_8] mov rcx, 7FFFFFFFFFFFFFFFh cmp [rax+10h], rcx jz short loc_E5F48 mov rax, [rsp+18h+var_10] mov rcx, 7FFFFFFFFFFFFFFFh cmp [rax+10h], rcx jnz short loc_E5F55 loc_E5F48: mov [rsp+18h+var_14], 2 jmp loc_E5FDE loc_E5F55: mov rax, [rsp+18h+var_8] mov eax, [rax+8] mov rcx, [rsp+18h+var_10] cmp eax, [rcx+8] jz short loc_E5FB2 mov rax, [rsp+18h+var_8] mov rcx, 8000000000000000h cmp [rax+10h], rcx jnz short loc_E5F9B mov rax, [rsp+18h+var_10] mov rcx, 8000000000000000h cmp [rax+10h], rcx jnz short loc_E5F9B mov [rsp+18h+var_14], 0 jmp short loc_E5FB0 loc_E5F9B: mov rax, [rsp+18h+var_8] mov ecx, [rax+8] shl ecx, 1 mov eax, 1 sub eax, ecx mov [rsp+18h+var_14], eax loc_E5FB0: jmp short loc_E5FDC loc_E5FB2: mov rdi, [rsp+18h+var_8] mov rsi, [rsp+18h+var_10] call bf_cmpu mov [rsp+18h+var_14], eax mov rax, [rsp+18h+var_8] cmp dword ptr [rax+8], 0 jz short loc_E5FDA xor eax, eax sub eax, [rsp+18h+var_14] mov [rsp+18h+var_14], eax loc_E5FDA: jmp short $+2 loc_E5FDC: jmp short $+2 loc_E5FDE: mov eax, [rsp+18h+var_14] add rsp, 18h retn
long long bf_cmp(long long a1, long long a2) { unsigned int v3; // [rsp+4h] [rbp-14h] if ( *(_QWORD *)(a1 + 16) == 0x7FFFFFFFFFFFFFFFLL || *(_QWORD *)(a2 + 16) == 0x7FFFFFFFFFFFFFFFLL ) { return 2; } else if ( *(_DWORD *)(a1 + 8) == *(_DWORD *)(a2 + 8) ) { v3 = bf_cmpu(a1, a2); if ( *(_DWORD *)(a1 + 8) ) return -v3; } else if ( *(_QWORD *)(a1 + 16) == 0x8000000000000000LL && *(_QWORD *)(a2 + 16) == 0x8000000000000000LL ) { return 0; } else { return (unsigned int)(1 - 2 * *(_DWORD *)(a1 + 8)); } return v3; }
bf_cmp: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RAX,qword ptr [RSP + 0x10] MOV RCX,0x7fffffffffffffff CMP qword ptr [RAX + 0x10],RCX JZ 0x001e5f48 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,0x7fffffffffffffff CMP qword ptr [RAX + 0x10],RCX JNZ 0x001e5f55 LAB_001e5f48: MOV dword ptr [RSP + 0x4],0x2 JMP 0x001e5fde LAB_001e5f55: MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x8] CMP EAX,dword ptr [RCX + 0x8] JZ 0x001e5fb2 MOV RAX,qword ptr [RSP + 0x10] MOV RCX,-0x8000000000000000 CMP qword ptr [RAX + 0x10],RCX JNZ 0x001e5f9b MOV RAX,qword ptr [RSP + 0x8] MOV RCX,-0x8000000000000000 CMP qword ptr [RAX + 0x10],RCX JNZ 0x001e5f9b MOV dword ptr [RSP + 0x4],0x0 JMP 0x001e5fb0 LAB_001e5f9b: MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RAX + 0x8] SHL ECX,0x1 MOV EAX,0x1 SUB EAX,ECX MOV dword ptr [RSP + 0x4],EAX LAB_001e5fb0: JMP 0x001e5fdc LAB_001e5fb2: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] CALL 0x001e5c80 MOV dword ptr [RSP + 0x4],EAX MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x8],0x0 JZ 0x001e5fda XOR EAX,EAX SUB EAX,dword ptr [RSP + 0x4] MOV dword ptr [RSP + 0x4],EAX LAB_001e5fda: JMP 0x001e5fdc LAB_001e5fdc: JMP 0x001e5fde LAB_001e5fde: MOV EAX,dword ptr [RSP + 0x4] ADD RSP,0x18 RET
int bf_cmp(long param_1,long param_2) { int4 local_14; if ((*(long *)(param_1 + 0x10) == 0x7fffffffffffffff) || (*(long *)(param_2 + 0x10) == 0x7fffffffffffffff)) { local_14 = 2; } else if (*(int *)(param_1 + 8) == *(int *)(param_2 + 8)) { local_14 = bf_cmpu(param_1,param_2); if (*(int *)(param_1 + 8) != 0) { local_14 = -local_14; } } else if ((*(long *)(param_1 + 0x10) == -0x8000000000000000) && (*(long *)(param_2 + 0x10) == -0x8000000000000000)) { local_14 = 0; } else { local_14 = *(int *)(param_1 + 8) * -2 + 1; } return local_14; }
46,825
bf_cmp
bluesky950520[P]quickjs/libbf.c
int bf_cmp(const bf_t *a, const bf_t *b) { int res; if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) { res = 2; } else if (a->sign != b->sign) { if (a->expn == BF_EXP_ZERO && b->expn == BF_EXP_ZERO) res = 0; else res = 1 - 2 * a->sign; } else { res = bf_cmpu(a, b); if (a->sign) res = -res; } return res; }
O1
c
bf_cmp: movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF movq 0x10(%rdi), %rcx movl $0x2, %eax cmpq %rdx, %rcx je 0x84935 movq 0x10(%rsi), %r8 cmpq %rdx, %r8 je 0x84935 pushq %rbx movl 0x8(%rdi), %ebx cmpl 0x8(%rsi), %ebx jne 0x8491b callq 0x84816 movl %eax, %ecx negl %eax testl %ebx, %ebx cmovel %ecx, %eax jmp 0x84934 incq %rdx xorq %rdx, %rcx xorq %rdx, %r8 xorl %eax, %eax orq %rcx, %r8 je 0x84934 addl %ebx, %ebx movl $0x1, %eax subl %ebx, %eax popq %rbx retq
bf_cmp: mov rdx, 7FFFFFFFFFFFFFFFh mov rcx, [rdi+10h] mov eax, 2 cmp rcx, rdx jz short locret_84935 mov r8, [rsi+10h] cmp r8, rdx jz short locret_84935 push rbx mov ebx, [rdi+8] cmp ebx, [rsi+8] jnz short loc_8491B call bf_cmpu mov ecx, eax neg eax test ebx, ebx cmovz eax, ecx jmp short loc_84934 loc_8491B: inc rdx xor rcx, rdx xor r8, rdx xor eax, eax or r8, rcx jz short loc_84934 add ebx, ebx mov eax, 1 sub eax, ebx loc_84934: pop rbx locret_84935: retn
long long bf_cmp(long long a1, long long a2) { long long v2; // rcx long long result; // rax long long v4; // r8 int v5; // ebx unsigned int v6; // ecx v2 = *(_QWORD *)(a1 + 16); result = 2LL; if ( v2 != 0x7FFFFFFFFFFFFFFFLL ) { v4 = *(_QWORD *)(a2 + 16); if ( v4 != 0x7FFFFFFFFFFFFFFFLL ) { v5 = *(_DWORD *)(a1 + 8); if ( v5 == *(_DWORD *)(a2 + 8) ) { v6 = bf_cmpu((_QWORD *)a1, (_QWORD *)a2); result = -v6; if ( !v5 ) return v6; } else { result = 0LL; if ( v2 ^ 0x8000000000000000LL | v4 ^ 0x8000000000000000LL ) return (unsigned int)(1 - 2 * v5); } } } return result; }
bf_cmp: MOV RDX,0x7fffffffffffffff MOV RCX,qword ptr [RDI + 0x10] MOV EAX,0x2 CMP RCX,RDX JZ 0x00184935 MOV R8,qword ptr [RSI + 0x10] CMP R8,RDX JZ 0x00184935 PUSH RBX MOV EBX,dword ptr [RDI + 0x8] CMP EBX,dword ptr [RSI + 0x8] JNZ 0x0018491b CALL 0x00184816 MOV ECX,EAX NEG EAX TEST EBX,EBX CMOVZ EAX,ECX JMP 0x00184934 LAB_0018491b: INC RDX XOR RCX,RDX XOR R8,RDX XOR EAX,EAX OR R8,RCX JZ 0x00184934 ADD EBX,EBX MOV EAX,0x1 SUB EAX,EBX LAB_00184934: POP RBX LAB_00184935: RET
int bf_cmp(long param_1,long param_2) { int iVar1; int iVar2; int iVar3; iVar3 = 2; if ((*(long *)(param_1 + 0x10) != 0x7fffffffffffffff) && (*(long *)(param_2 + 0x10) != 0x7fffffffffffffff)) { iVar1 = *(int *)(param_1 + 8); if (iVar1 == *(int *)(param_2 + 8)) { iVar2 = bf_cmpu(); iVar3 = -iVar2; if (iVar1 == 0) { iVar3 = iVar2; } } else { iVar3 = 0; if (*(long *)(param_2 + 0x10) != -0x8000000000000000 || *(long *)(param_1 + 0x10) != -0x8000000000000000) { iVar3 = iVar1 * -2 + 1; } } } return iVar3; }
46,826
key_cache_read
eloqsql/mysys/mf_keycache.c
uchar *key_cache_read(KEY_CACHE *keycache, File file, my_off_t filepos, int level, uchar *buff, uint length, uint block_length, int return_buffer) { if (keycache->can_be_used) return keycache->interface_funcs->read(keycache->keycache_cb, file, filepos, level, buff, length, block_length, return_buffer); /* We can't use mutex here as the key cache may not be initialized */ if (my_pread(file, (uchar*) buff, length, filepos, MYF(MY_NABP))) return (uchar *) 0; return buff; }
O3
c
key_cache_read: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %r8, %rbx movq %rdx, %rax cmpb $0x0, 0x49(%rdi) je 0x995b0 movq 0x8(%rdi), %rdx movq 0x10(%rdi), %rdi movq 0x18(%rdi), %r11 movq %rdx, %rdi movq %rax, %rdx movq %rbx, %r8 addq $0x8, %rsp popq %rbx popq %rbp jmpq *%r11 movl %r9d, %edx movl $0x4, %r8d movl %esi, %edi movq %rbx, %rsi movq %rax, %rcx callq 0xa158c xorl %ecx, %ecx testq %rax, %rax cmoveq %rbx, %rcx movq %rcx, %rax addq $0x8, %rsp popq %rbx popq %rbp retq
key_cache_read: push rbp mov rbp, rsp push rbx push rax mov rbx, r8 mov rax, rdx cmp byte ptr [rdi+49h], 0 jz short loc_995B0 mov rdx, [rdi+8] mov rdi, [rdi+10h] mov r11, [rdi+18h] mov rdi, rdx mov rdx, rax mov r8, rbx add rsp, 8 pop rbx pop rbp jmp r11 loc_995B0: mov edx, r9d mov r8d, 4 mov edi, esi mov rsi, rbx mov rcx, rax call my_pread xor ecx, ecx test rax, rax cmovz rcx, rbx mov rax, rcx add rsp, 8 pop rbx pop rbp retn
long long key_cache_read(long long a1, long long a2, long long a3, long long a4, long long a5, unsigned int a6) { long long v8; // rax long long v9; // rcx if ( *(_BYTE *)(a1 + 73) ) return (*(long long ( **)(_QWORD, long long, long long, long long, long long))(*(_QWORD *)(a1 + 16) + 24LL))( *(_QWORD *)(a1 + 8), a2, a3, a4, a5); v8 = my_pread((unsigned int)a2, a5, a6, a3, 4LL); v9 = 0LL; if ( !v8 ) return a5; return v9; }
key_cache_read: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,R8 MOV RAX,RDX CMP byte ptr [RDI + 0x49],0x0 JZ 0x001995b0 MOV RDX,qword ptr [RDI + 0x8] MOV RDI,qword ptr [RDI + 0x10] MOV R11,qword ptr [RDI + 0x18] MOV RDI,RDX MOV RDX,RAX MOV R8,RBX ADD RSP,0x8 POP RBX POP RBP JMP R11 LAB_001995b0: MOV EDX,R9D MOV R8D,0x4 MOV EDI,ESI MOV RSI,RBX MOV RCX,RAX CALL 0x001a158c XOR ECX,ECX TEST RAX,RAX CMOVZ RCX,RBX MOV RAX,RCX ADD RSP,0x8 POP RBX POP RBP RET
int8 key_cache_read(long param_1,ulong param_2,int8 param_3,int8 param_4,int8 param_5, int4 param_6) { int8 uVar1; long lVar2; if (*(char *)(param_1 + 0x49) != '\0') { /* WARNING: Could not recover jumptable at 0x001995ad. Too many branches */ /* WARNING: Treating indirect jump as call */ uVar1 = (**(code **)(*(long *)(param_1 + 0x10) + 0x18)) (*(int8 *)(param_1 + 8),param_2,param_3,param_4,param_5); return uVar1; } lVar2 = my_pread(param_2 & 0xffffffff,param_5,param_6,param_3,4); uVar1 = 0; if (lVar2 == 0) { uVar1 = param_5; } return uVar1; }
46,827
minja::Value::contains(char const*) const
monkey531[P]llama/common/minja.hpp
bool contains(const char * key) const { return contains(std::string(key)); }
O1
cpp
minja::Value::contains(char const*) const: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x512b6 movq %rbx, %rdi movq %r14, %rsi callq 0x92eee movl %eax, %ebx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xace78 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a890 movl %ebx, %eax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xacea0 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a890 movq %rbx, %rdi callq 0x1af20
_ZNK5minja5Value8containsEPKc: push r14 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov rsi, r14 call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&) mov ebx, eax lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_ACE78 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ACE78: mov eax, ebx 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_ACEA0 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ACEA0: mov rdi, rbx call __Unwind_Resume
long long minja::Value::contains(minja::Value *this, char *a2) { unsigned int v2; // eax unsigned int v3; // ebx void *v5[2]; // [rsp+8h] [rbp-30h] BYREF long long v6; // [rsp+18h] [rbp-20h] BYREF std::string::basic_string<std::allocator<char>>(v5, a2); LOBYTE(v2) = minja::Value::contains((long long)this, (long long)v5); v3 = v2; if ( v5[0] != &v6 ) operator delete(v5[0], v6 + 1); return v3; }
contains: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x001512b6 LAB_001ace50: MOV RDI,RBX MOV RSI,R14 CALL 0x00192eee LAB_001ace5b: MOV EBX,EAX LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001ace78 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a890 LAB_001ace78: MOV EAX,EBX ADD RSP,0x28 POP RBX POP R14 RET
/* minja::Value::contains(char const*) const */ int4 __thiscall minja::Value::contains(Value *this,char *param_1) { int4 uVar1; allocator local_31; long *local_30 [2]; long local_20 [2]; std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31); /* try { // try from 001ace50 to 001ace5a has its CatchHandler @ 001ace82 */ uVar1 = contains(this,(string *)local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return uVar1; }
46,828
minja::Value::contains(char const*) const
monkey531[P]llama/common/minja.hpp
bool contains(const char * key) const { return contains(std::string(key)); }
O3
cpp
minja::Value::contains(char const*) const: pushq %r14 pushq %rbx subq $0x28, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 leaq 0x7(%rsp), %rdx movq %r14, %rdi callq 0x51cf6 movq %rbx, %rdi movq %r14, %rsi callq 0x9292e movl %eax, %ebx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xac608 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a890 movl %ebx, %eax addq $0x28, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xac630 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a890 movq %rbx, %rdi callq 0x1af20
_ZNK5minja5Value8containsEPKc: push r14 push rbx sub rsp, 28h mov rbx, rdi lea r14, [rsp+38h+var_30] lea rdx, [rsp+38h+var_31] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rdi, rbx mov rsi, r14 call _ZNK5minja5Value8containsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::contains(std::string const&) mov ebx, eax lea rax, [rsp+38h+var_20] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AC608 mov rsi, [rsp+38h+var_20] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC608: mov eax, ebx 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_AC630 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_AC630: mov rdi, rbx call __Unwind_Resume
long long minja::Value::contains(minja::Value *this, char *a2) { unsigned int v2; // eax unsigned int v3; // ebx void *v5[2]; // [rsp+8h] [rbp-30h] BYREF long long v6; // [rsp+18h] [rbp-20h] BYREF std::string::basic_string<std::allocator<char>>(v5, a2); LOBYTE(v2) = minja::Value::contains((long long)this, (long long)v5); v3 = v2; if ( v5[0] != &v6 ) operator delete(v5[0], v6 + 1); return v3; }
contains: PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RDI LEA R14,[RSP + 0x8] LEA RDX,[RSP + 0x7] MOV RDI,R14 CALL 0x00151cf6 LAB_001ac5e0: MOV RDI,RBX MOV RSI,R14 CALL 0x0019292e LAB_001ac5eb: MOV EBX,EAX LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001ac608 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a890 LAB_001ac608: MOV EAX,EBX ADD RSP,0x28 POP RBX POP R14 RET
/* minja::Value::contains(char const*) const */ int4 __thiscall minja::Value::contains(Value *this,char *param_1) { int4 uVar1; allocator local_31; long *local_30 [2]; long local_20 [2]; std::__cxx11::string::string<std::allocator<char>>((string *)local_30,param_1,&local_31); /* try { // try from 001ac5e0 to 001ac5ea has its CatchHandler @ 001ac612 */ uVar1 = contains(this,(string *)local_30); if (local_30[0] != local_20) { operator_delete(local_30[0],local_20[0] + 1); } return uVar1; }
46,829
insert_dynamic
eloqsql/mysys/array.c
my_bool insert_dynamic(DYNAMIC_ARRAY *array, const void * element) { void *buffer; if (array->elements == array->max_element) { /* Call only when necessary */ if (!(buffer=alloc_dynamic(array))) return TRUE; } else { buffer=array->buffer+(array->elements * array->size_of_element); array->elements++; } memcpy(buffer,element,(size_t) array->size_of_element); return FALSE; }
O3
c
insert_dynamic: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 movl 0x8(%rdi), %ecx cmpl 0xc(%rdi), %ecx jne 0x2c0a5 movq %r14, %rdi callq 0x2c0cc testq %rax, %rax je 0x2c0c8 movq %rax, %rdi movl 0x14(%r14), %eax jmp 0x2c0b7 movl 0x14(%r14), %eax movl %eax, %edi imull %ecx, %edi addq (%r14), %rdi incl %ecx movl %ecx, 0x8(%r14) movl %eax, %edx movq %rbx, %rsi callq 0x24270 xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq movb $0x1, %al jmp 0x2c0c3
insert_dynamic: push rbp mov rbp, rsp push r14 push rbx mov rbx, rsi mov r14, rdi mov ecx, [rdi+8] cmp ecx, [rdi+0Ch] jnz short loc_2C0A5 mov rdi, r14 call alloc_dynamic test rax, rax jz short loc_2C0C8 mov rdi, rax mov eax, [r14+14h] jmp short loc_2C0B7 loc_2C0A5: mov eax, [r14+14h] mov edi, eax imul edi, ecx add rdi, [r14] inc ecx mov [r14+8], ecx loc_2C0B7: mov edx, eax mov rsi, rbx call _memcpy xor eax, eax loc_2C0C3: pop rbx pop r14 pop rbp retn loc_2C0C8: mov al, 1 jmp short loc_2C0C3
long long insert_dynamic(long long a1, long long a2) { int v3; // ecx long long v4; // rax long long v5; // rdi unsigned int v6; // eax v3 = *(_DWORD *)(a1 + 8); if ( v3 != *(_DWORD *)(a1 + 12) ) { v6 = *(_DWORD *)(a1 + 20); v5 = *(_QWORD *)a1 + v3 * v6; *(_DWORD *)(a1 + 8) = v3 + 1; goto LABEL_5; } v4 = alloc_dynamic(a1); if ( v4 ) { v5 = v4; v6 = *(_DWORD *)(a1 + 20); LABEL_5: memcpy(v5, a2, v6); return 0LL; } return 1LL; }
insert_dynamic: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RSI MOV R14,RDI MOV ECX,dword ptr [RDI + 0x8] CMP ECX,dword ptr [RDI + 0xc] JNZ 0x0012c0a5 MOV RDI,R14 CALL 0x0012c0cc TEST RAX,RAX JZ 0x0012c0c8 MOV RDI,RAX MOV EAX,dword ptr [R14 + 0x14] JMP 0x0012c0b7 LAB_0012c0a5: MOV EAX,dword ptr [R14 + 0x14] MOV EDI,EAX IMUL EDI,ECX ADD RDI,qword ptr [R14] INC ECX MOV dword ptr [R14 + 0x8],ECX LAB_0012c0b7: MOV EDX,EAX MOV RSI,RBX CALL 0x00124270 XOR EAX,EAX LAB_0012c0c3: POP RBX POP R14 POP RBP RET LAB_0012c0c8: MOV AL,0x1 JMP 0x0012c0c3
int8 insert_dynamic(long *param_1,void *param_2) { int iVar1; uint uVar2; void *__dest; iVar1 = (int)param_1[1]; if (iVar1 == *(int *)((long)param_1 + 0xc)) { __dest = (void *)alloc_dynamic(param_1); if (__dest == (void *)0x0) { return 1; } uVar2 = *(uint *)((long)param_1 + 0x14); } else { uVar2 = *(uint *)((long)param_1 + 0x14); __dest = (void *)((ulong)(uVar2 * iVar1) + *param_1); *(int *)(param_1 + 1) = iVar1 + 1; } memcpy(__dest,param_2,(ulong)uVar2); return 0; }
46,830
JS_SetConstructorBit
bluesky950520[P]quickjs/quickjs.c
BOOL JS_SetConstructorBit(JSContext *ctx, JSValue func_obj, BOOL val) { JSObject *p; if (JS_VALUE_GET_TAG(func_obj) != JS_TAG_OBJECT) return FALSE; p = JS_VALUE_GET_OBJ(func_obj); p->is_constructor = val; return TRUE; }
O0
c
JS_SetConstructorBit: movq %rsi, -0x18(%rsp) movq %rdx, -0x10(%rsp) movq %rdi, -0x20(%rsp) movl %ecx, -0x24(%rsp) movq -0x10(%rsp), %rax cmpl $-0x1, %eax je 0x38167 movl $0x0, -0x4(%rsp) jmp 0x38195 movq -0x18(%rsp), %rax movq %rax, -0x30(%rsp) movl -0x24(%rsp), %eax movb %al, %dl movq -0x30(%rsp), %rax movb 0x5(%rax), %cl andb $0x1, %dl shlb $0x4, %dl andb $-0x11, %cl orb %dl, %cl movb %cl, 0x5(%rax) movl $0x1, -0x4(%rsp) movl -0x4(%rsp), %eax retq nopw (%rax,%rax)
JS_SetConstructorBit: mov [rsp+var_18], rsi mov [rsp+var_10], rdx mov [rsp+var_20], rdi mov [rsp+var_24], ecx mov rax, [rsp+var_10] cmp eax, 0FFFFFFFFh jz short loc_38167 mov [rsp+var_4], 0 jmp short loc_38195 loc_38167: mov rax, [rsp+var_18] mov [rsp+var_30], rax mov eax, [rsp+var_24] mov dl, al mov rax, [rsp+var_30] mov cl, [rax+5] and dl, 1 shl dl, 4 and cl, 0EFh or cl, dl mov [rax+5], cl mov [rsp+var_4], 1 loc_38195: mov eax, [rsp+var_4] retn
long long JS_SetConstructorBit(long long a1, long long a2, int a3, char a4) { if ( a3 == -1 ) { *(_BYTE *)(a2 + 5) = (16 * (a4 & 1)) | *(_BYTE *)(a2 + 5) & 0xEF; return 1; } else { return 0; } }
JS_SetConstructorBit: MOV qword ptr [RSP + -0x18],RSI MOV qword ptr [RSP + -0x10],RDX MOV qword ptr [RSP + -0x20],RDI MOV dword ptr [RSP + -0x24],ECX MOV RAX,qword ptr [RSP + -0x10] CMP EAX,-0x1 JZ 0x00138167 MOV dword ptr [RSP + -0x4],0x0 JMP 0x00138195 LAB_00138167: MOV RAX,qword ptr [RSP + -0x18] MOV qword ptr [RSP + -0x30],RAX MOV EAX,dword ptr [RSP + -0x24] MOV DL,AL MOV RAX,qword ptr [RSP + -0x30] MOV CL,byte ptr [RAX + 0x5] AND DL,0x1 SHL DL,0x4 AND CL,0xef OR CL,DL MOV byte ptr [RAX + 0x5],CL MOV dword ptr [RSP + -0x4],0x1 LAB_00138195: MOV EAX,dword ptr [RSP + -0x4] RET
bool JS_SetConstructorBit(int8 param_1,long param_2,int param_3,byte param_4) { if (param_3 == -1) { *(byte *)(param_2 + 5) = *(byte *)(param_2 + 5) & 0xef | (param_4 & 1) << 4; } return param_3 == -1; }
46,831
JS_SetConstructorBit
bluesky950520[P]quickjs/quickjs.c
BOOL JS_SetConstructorBit(JSContext *ctx, JSValue func_obj, BOOL val) { JSObject *p; if (JS_VALUE_GET_TAG(func_obj) != JS_TAG_OBJECT) return FALSE; p = JS_VALUE_GET_OBJ(func_obj); p->is_constructor = val; return TRUE; }
O1
c
JS_SetConstructorBit: movq %rsi, -0x8(%rsp) xorl %eax, %eax cmpl $-0x1, %edx jne 0x274de movq -0x8(%rsp), %rax movb 0x5(%rax), %dl shlb $0x4, %cl andb $0x10, %cl andb $-0x11, %dl orb %cl, %dl movb %dl, 0x5(%rax) movl $0x1, %eax retq
JS_SetConstructorBit: mov [rsp+var_8], rsi xor eax, eax cmp edx, 0FFFFFFFFh jnz short locret_274DE mov rax, [rsp+var_8] mov dl, [rax+5] shl cl, 4 and cl, 10h and dl, 0EFh or dl, cl mov [rax+5], dl mov eax, 1 locret_274DE: retn
long long JS_SetConstructorBit(long long a1, long long a2, int a3, char a4) { long long result; // rax result = 0LL; if ( a3 == -1 ) { *(_BYTE *)(a2 + 5) = (16 * a4) & 0x10 | *(_BYTE *)(a2 + 5) & 0xEF; return 1LL; } return result; }
JS_SetConstructorBit: MOV qword ptr [RSP + -0x8],RSI XOR EAX,EAX CMP EDX,-0x1 JNZ 0x001274de MOV RAX,qword ptr [RSP + -0x8] MOV DL,byte ptr [RAX + 0x5] SHL CL,0x4 AND CL,0x10 AND DL,0xef OR DL,CL MOV byte ptr [RAX + 0x5],DL MOV EAX,0x1 LAB_001274de: RET
bool JS_SetConstructorBit(int8 param_1,long param_2,int param_3,byte param_4) { if (param_3 == -1) { *(byte *)(param_2 + 5) = *(byte *)(param_2 + 5) & 0xef | (param_4 & 1) << 4; } return param_3 == -1; }
46,832
JS_SetConstructorBit
bluesky950520[P]quickjs/quickjs.c
BOOL JS_SetConstructorBit(JSContext *ctx, JSValue func_obj, BOOL val) { JSObject *p; if (JS_VALUE_GET_TAG(func_obj) != JS_TAG_OBJECT) return FALSE; p = JS_VALUE_GET_OBJ(func_obj); p->is_constructor = val; return TRUE; }
O2
c
JS_SetConstructorBit: xorl %eax, %eax cmpl $-0x1, %edx jne 0x21173 movb 0x5(%rsi), %al shlb $0x4, %cl andb $0x10, %cl andb $-0x11, %al orb %cl, %al movb %al, 0x5(%rsi) pushq $0x1 popq %rax retq
JS_SetConstructorBit: xor eax, eax cmp edx, 0FFFFFFFFh jnz short locret_21173 mov al, [rsi+5] shl cl, 4 and cl, 10h and al, 0EFh or al, cl mov [rsi+5], al push 1 pop rax locret_21173: retn
long long JS_SetConstructorBit(long long a1, long long a2, int a3, char a4) { long long result; // rax result = 0LL; if ( a3 == -1 ) { *(_BYTE *)(a2 + 5) = (16 * a4) & 0x10 | *(_BYTE *)(a2 + 5) & 0xEF; return 1LL; } return result; }
JS_SetConstructorBit: XOR EAX,EAX CMP EDX,-0x1 JNZ 0x00121173 MOV AL,byte ptr [RSI + 0x5] SHL CL,0x4 AND CL,0x10 AND AL,0xef OR AL,CL MOV byte ptr [RSI + 0x5],AL PUSH 0x1 POP RAX LAB_00121173: RET
bool JS_SetConstructorBit(int8 param_1,long param_2,int param_3,byte param_4) { if (param_3 == -1) { *(byte *)(param_2 + 5) = *(byte *)(param_2 + 5) & 0xef | (param_4 & 1) << 4; } return param_3 == -1; }
46,833
evmone::instr::core::mcopy(evmone::StackTop, long, evmone::ExecutionState&)
corpus-core[P]colibri-stateless/build_O2/_deps/evmone_external-src/lib/evmone/instructions.hpp
inline Result mcopy(StackTop stack, int64_t gas_left, ExecutionState& state) noexcept { const auto& dst_u256 = stack.pop(); const auto& src_u256 = stack.pop(); const auto& size_u256 = stack.pop(); if (!check_memory(gas_left, state.memory, std::max(dst_u256, src_u256), size_u256)) return {EVMC_OUT_OF_GAS, gas_left}; const auto dst = static_cast<size_t>(dst_u256); const auto src = static_cast<size_t>(src_u256); const auto size = static_cast<size_t>(size_u256); if (const auto cost = copy_cost(size); (gas_left -= cost) < 0) return {EVMC_OUT_OF_GAS, gas_left}; if (size > 0) std::memmove(&state.memory[dst], &state.memory[src], size); return {EVMC_SUCCESS, gas_left}; }
O2
cpp
evmone::instr::core::mcopy(evmone::StackTop, long, evmone::ExecutionState&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movq %rdi, %r14 leaq 0x8(%rsp), %r15 movq %rsi, (%r15) leaq -0x20(%rdi), %rsi leaq -0x40(%rdi), %r12 addq $0x8, %rbx callq 0x3c38e movq %r15, %rdi movq %rbx, %rsi movq %rax, %rdx movq %r12, %rcx callq 0x3b250 testb %al, %al je 0x3c372 movq (%r14), %rdi movq -0x40(%r14), %rax movq -0x20(%r14), %rsi leaq 0x1f(%rax), %rcx shrq $0x5, %rcx imulq $-0x3, %rcx, %rdx addq 0x8(%rsp), %rdx movq %rdx, 0x8(%rsp) js 0x3c37c xorl %ebp, %ebp testq %rax, %rax je 0x3c37f movq (%rbx), %rcx addq %rcx, %rdi addq %rcx, %rsi movq %rax, %rdx callq 0x22100 jmp 0x3c375 pushq $0x3 popq %rbp movq 0x8(%rsp), %rdx jmp 0x3c37f pushq $0x3 popq %rbp movl %ebp, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_ZN6evmone5instr4core5mcopyENS_8StackTopElRNS_14ExecutionStateE: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rdx mov r14, rdi lea r15, [rsp+38h+var_30] mov [r15], rsi lea rsi, [rdi-20h] lea r12, [rdi-40h] add rbx, 8 call _ZSt3maxIN4intx4uintILj256EEEERKT_S5_S5_; std::max<intx::uint<256u>>(intx::uint<256u> const&,intx::uint<256u> const&) mov rdi, r15 mov rsi, rbx mov rdx, rax mov rcx, r12 call _ZN6evmone12check_memoryERlRNS_6MemoryERKN4intx4uintILj256EEES7_; evmone::check_memory(long &,evmone::Memory &,intx::uint<256u> const&,intx::uint<256u> const&) test al, al jz short loc_3C372 mov rdi, [r14] mov rax, [r14-40h] mov rsi, [r14-20h] lea rcx, [rax+1Fh] shr rcx, 5 imul rdx, rcx, -3 add rdx, [rsp+38h+var_30] mov [rsp+38h+var_30], rdx js short loc_3C37C xor ebp, ebp test rax, rax jz short loc_3C37F mov rcx, [rbx] add rdi, rcx add rsi, rcx mov rdx, rax call _memmove jmp short loc_3C375 loc_3C372: push 3 pop rbp loc_3C375: mov rdx, [rsp+38h+var_30] jmp short loc_3C37F loc_3C37C: push 3 pop rbp loc_3C37F: mov eax, ebp add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long evmone::instr::core::mcopy(long long *a1, long long a2, long long a3) { _QWORD *v4; // rbx long long v5; // rax long long v6; // rdi long long v7; // rax long long v8; // rsi unsigned int v9; // ebp long long v11[6]; // [rsp+8h] [rbp-30h] BYREF v11[0] = a2; v4 = (_QWORD *)(a3 + 8); v5 = std::max<intx::uint<256u>>(a1, a1 - 4); if ( evmone::check_memory((long long)v11, (long long)v4, v5, a1 - 8) ) { v6 = *a1; v7 = *(a1 - 8); v8 = *(a1 - 4); v11[0] -= 3 * ((unsigned long long)(v7 + 31) >> 5); if ( v11[0] < 0 ) { return 3; } else { v9 = 0; if ( v7 ) memmove(*v4 + v6, *v4 + v8, v7); } } else { return 3; } return v9; }
mcopy: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDX MOV R14,RDI LEA R15,[RSP + 0x8] MOV qword ptr [R15],RSI LEA RSI,[RDI + -0x20] LEA R12,[RDI + -0x40] ADD RBX,0x8 CALL 0x0013c38e MOV RDI,R15 MOV RSI,RBX MOV RDX,RAX MOV RCX,R12 CALL 0x0013b250 TEST AL,AL JZ 0x0013c372 MOV RDI,qword ptr [R14] MOV RAX,qword ptr [R14 + -0x40] MOV RSI,qword ptr [R14 + -0x20] LEA RCX,[RAX + 0x1f] SHR RCX,0x5 IMUL RDX,RCX,-0x3 ADD RDX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x8],RDX JS 0x0013c37c XOR EBP,EBP TEST RAX,RAX JZ 0x0013c37f MOV RCX,qword ptr [RBX] ADD RDI,RCX ADD RSI,RCX MOV RDX,RAX CALL 0x00122100 JMP 0x0013c375 LAB_0013c372: PUSH 0x3 POP RBP LAB_0013c375: MOV RDX,qword ptr [RSP + 0x8] JMP 0x0013c37f LAB_0013c37c: PUSH 0x3 POP RBP LAB_0013c37f: MOV EAX,EBP ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* evmone::instr::core::mcopy(evmone::StackTop, long, evmone::ExecutionState&) */ int1 [16] evmone::instr::core::mcopy(uint *param_1,long param_2,long param_3) { size_t __n; long lVar1; char cVar2; uint *puVar3; int8 uVar4; int1 auVar5 [16]; long local_30; local_30 = param_2; puVar3 = std::max<intx::uint<256u>>(param_1,param_1 + -0x20); cVar2 = check_memory(&local_30,(Memory *)(param_3 + 8),puVar3,param_1 + -0x40); if (cVar2 == '\0') { uVar4 = 3; } else { __n = *(size_t *)(param_1 + -0x40); local_30 = (__n + 0x1f >> 5) * -3 + local_30; if (local_30 < 0) { uVar4 = 3; } else { uVar4 = 0; if (__n != 0) { lVar1 = *(long *)(param_3 + 8); memmove((void *)(*(long *)param_1 + lVar1),(void *)(*(long *)(param_1 + -0x20) + lVar1),__n) ; } } } auVar5._8_8_ = local_30; auVar5._0_8_ = uVar4; return auVar5; }
46,834
ggml_leaky_relu
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
struct ggml_tensor * ggml_leaky_relu( struct ggml_context * ctx, struct ggml_tensor * a, float negative_slope, bool inplace) { struct ggml_tensor * result = inplace ? ggml_view_tensor(ctx, a) : ggml_dup_tensor(ctx, a); ggml_set_op_params(result, &negative_slope, sizeof(negative_slope)); result->op = GGML_OP_LEAKY_RELU; result->src[0] = a; return result; }
O1
c
ggml_leaky_relu: pushq %rbx subq $0x10, %rsp movss %xmm0, 0xc(%rsp) movq %rsi, %rbx testl %edx, %edx je 0x1cab8 movq %rbx, %rsi callq 0x17260 jmp 0x1cace movl (%rbx), %esi leaq 0x10(%rbx), %rcx movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x1b871 testq %rax, %rax je 0x1caf2 movss 0xc(%rsp), %xmm0 movss %xmm0, 0x54(%rax) movl $0x3c, 0x50(%rax) movq %rbx, 0x98(%rax) addq $0x10, %rsp popq %rbx retq leaq 0x31bcc(%rip), %rdi # 0x4e6c5 leaq 0x2fac1(%rip), %rdx # 0x4c5c1 leaq 0x31ceb(%rip), %rcx # 0x4e7f2 movl $0x70, %esi xorl %eax, %eax callq 0x18ce0
ggml_leaky_relu: push rbx sub rsp, 10h movss [rsp+18h+var_C], xmm0 mov rbx, rsi test edx, edx jz short loc_1CAB8 mov rsi, rbx call _ggml_view_tensor jmp short loc_1CACE loc_1CAB8: mov esi, [rbx] lea rcx, [rbx+10h] mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl loc_1CACE: test rax, rax jz short loc_1CAF2 movss xmm0, [rsp+18h+var_C] movss dword ptr [rax+54h], xmm0 mov dword ptr [rax+50h], 3Ch ; '<' mov [rax+98h], rbx add rsp, 10h pop rbx retn loc_1CAF2: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNull; "tensor != NULL" mov esi, 70h ; 'p' xor eax, eax call _ggml_abort
long long ggml_leaky_relu(long long a1, long long a2, int a3, double a4) { long long result; // rax int v5; // r8d int v6; // r9d if ( a3 ) result = ggml_view_tensor(a1, a2, a4); else result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4, (long long *)(a2 + 16), 0LL, 0LL, a4); if ( !result ) ggml_abort( (unsigned int)"/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h", 112, (unsigned int)"GGML_ASSERT(%s) failed", (unsigned int)"tensor != NULL", v5, v6); *(_DWORD *)(result + 84) = LODWORD(a4); *(_DWORD *)(result + 80) = 60; *(_QWORD *)(result + 152) = a2; return result; }
ggml_leaky_relu: PUSH RBX SUB RSP,0x10 MOVSS dword ptr [RSP + 0xc],XMM0 MOV RBX,RSI TEST EDX,EDX JZ 0x0011cab8 MOV RSI,RBX CALL 0x00117260 JMP 0x0011cace LAB_0011cab8: MOV ESI,dword ptr [RBX] LEA RCX,[RBX + 0x10] MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x0011b871 LAB_0011cace: TEST RAX,RAX JZ 0x0011caf2 MOVSS XMM0,dword ptr [RSP + 0xc] MOVSS dword ptr [RAX + 0x54],XMM0 MOV dword ptr [RAX + 0x50],0x3c MOV qword ptr [RAX + 0x98],RBX ADD RSP,0x10 POP RBX RET LAB_0011caf2: LEA RDI,[0x14e6c5] LEA RDX,[0x14c5c1] LEA RCX,[0x14e7f2] MOV ESI,0x70 XOR EAX,EAX CALL 0x00118ce0
void ggml_leaky_relu(int4 param_1,int8 param_2,int4 *param_3,int param_4) { long lVar1; if (param_4 == 0) { lVar1 = ggml_new_tensor_impl(param_2,*param_3,4,param_3 + 4,0,0); } else { lVar1 = ggml_view_tensor(param_2,param_3); } if (lVar1 != 0) { *(int4 *)(lVar1 + 0x54) = param_1; *(int4 *)(lVar1 + 0x50) = 0x3c; *(int4 **)(lVar1 + 0x98) = param_3; return; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-impl.h" ,0x70,"GGML_ASSERT(%s) failed","tensor != NULL"); }
46,835
print_aria_log_control
eloqsql/storage/maria/ma_control_file.c
my_bool print_aria_log_control() { uchar buffer[CF_MAX_SIZE]; char name[FN_REFLEN], uuid_str[MY_UUID_STRING_LENGTH+1]; const char *errmsg; uint new_cf_create_time_size, new_cf_changeable_size; my_off_t file_size; ulong logno; ulonglong trid,checkpoint_lsn; int open_flags= O_BINARY | /*O_DIRECT |*/ O_RDWR | O_CLOEXEC; int error= CONTROL_FILE_UNKNOWN_ERROR; uint recovery_fails; File file; DBUG_ENTER("ma_control_file_open"); if (fn_format(name, CONTROL_FILE_BASE_NAME, maria_data_root, "", MYF(MY_WME)) == NullS) DBUG_RETURN(CONTROL_FILE_UNKNOWN_ERROR); if ((file= mysql_file_open(key_file_control, name, open_flags, MYF(MY_WME))) < 0) { errmsg= "Can't open file"; goto err; } file_size= mysql_file_seek(file, 0, SEEK_END, MYF(MY_WME)); if (file_size == MY_FILEPOS_ERROR) { errmsg= "Can't read size"; goto err; } if (file_size < CF_MIN_SIZE) { /* Given that normally we write only a sector and it's atomic, the only possibility for a file to be of too short size is if we crashed at the very first startup, between file creation and file write. Quite unlikely (and can be made even more unlikely by doing this: create a temp file, write it, and then rename it to be the control file). What's more likely is if someone forgot to restore the control file, just did a "touch control" to try to get Maria to start, or if the disk/filesystem has a problem. So let's be rigid. */ error= CONTROL_FILE_TOO_SMALL; errmsg= "Size of control file is smaller than expected"; goto err; } /* Check if control file is unexpectedly big */ if (file_size > CF_MAX_SIZE) { error= CONTROL_FILE_TOO_BIG; errmsg= "File size bigger than expected"; goto err; } if (mysql_file_pread(file, buffer, (size_t)file_size, 0, MYF(MY_FNABP))) { errmsg= "Can't read file"; goto err; } if (memcmp(buffer + CF_MAGIC_STRING_OFFSET, CF_MAGIC_STRING, CF_MAGIC_STRING_SIZE)) { error= CONTROL_FILE_BAD_MAGIC_STRING; errmsg= "Missing valid id at start of file. File is not a valid aria control file"; goto err; } printf("Aria file version: %u\n", buffer[CF_VERSION_OFFSET]); new_cf_create_time_size= uint2korr(buffer + CF_CREATE_TIME_SIZE_OFFSET); new_cf_changeable_size= uint2korr(buffer + CF_CHANGEABLE_SIZE_OFFSET); if (new_cf_create_time_size < CF_MIN_CREATE_TIME_TOTAL_SIZE || new_cf_changeable_size < CF_MIN_CHANGEABLE_TOTAL_SIZE || new_cf_create_time_size + new_cf_changeable_size != file_size) { error= CONTROL_FILE_INCONSISTENT_INFORMATION; errmsg= "Sizes stored in control file are inconsistent"; goto err; } checkpoint_lsn= lsn_korr(buffer + new_cf_create_time_size + CF_LSN_OFFSET); logno= uint4korr(buffer + new_cf_create_time_size + CF_FILENO_OFFSET); my_uuid2str(buffer + CF_UUID_OFFSET, uuid_str); uuid_str[MY_UUID_STRING_LENGTH]= 0; printf("Block size: %u\n", uint2korr(buffer + CF_BLOCKSIZE_OFFSET)); printf("maria_uuid: %s\n", uuid_str); printf("last_checkpoint_lsn: " LSN_FMT "\n", LSN_IN_PARTS(checkpoint_lsn)); printf("last_log_number: %lu\n", (ulong) logno); if (new_cf_changeable_size >= (CF_MAX_TRID_OFFSET + CF_MAX_TRID_SIZE)) { trid= transid_korr(buffer + new_cf_create_time_size + CF_MAX_TRID_OFFSET); printf("trid: %llu\n", (ulonglong) trid); } if (new_cf_changeable_size >= (CF_RECOV_FAIL_OFFSET + CF_RECOV_FAIL_SIZE)) { recovery_fails= (buffer + new_cf_create_time_size + CF_RECOV_FAIL_OFFSET)[0]; printf("recovery_failures: %u\n", recovery_fails); } DBUG_RETURN(0); err: my_printf_error(HA_ERR_INITIALIZATION, "Got error '%s' when trying to use aria control file " "'%s'", 0, errmsg, name); DBUG_RETURN(error); }
O3
c
print_aria_log_control: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x478, %rsp # imm = 0x478 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq 0x39f04e(%rip), %rax # 0x4071e0 movq (%rax), %rdx leaq 0x76f84(%rip), %rsi # 0xdf120 leaq 0x7db39(%rip), %rcx # 0xe5cdc leaq -0x480(%rbp), %rdi movl $0x10, %r8d callq 0x9a8bc testq %rax, %rax je 0x68271 leaq 0x39f1db(%rip), %rax # 0x4073a0 movl (%rax), %esi leaq 0x324ea2(%rip), %r13 # 0x38d070 movq (%r13), %rax leaq -0x280(%rbp), %rdi leaq -0x480(%rbp), %rcx leaq -0x80(%rbp), %rbx movl $0x2, %edx movq %rbx, %r8 callq *0x148(%rax) movq %rax, (%rbx) testq %rax, %rax jne 0x684c3 leaq -0x480(%rbp), %rdi movl $0x10, %edx movl $0x80002, %esi # imm = 0x80002 callq 0xa63a4 movl %eax, %r15d movb $0xb, %bl testl %r15d, %r15d js 0x68278 movq (%r13), %rax leaq -0x280(%rbp), %rdi movl %r15d, %esi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x684e8 movl $0x10, %ecx movl %r15d, %edi xorl %esi, %esi movl $0x2, %edx callq 0xa6ca0 movq %rax, %r14 cmpq $-0x1, %r14 je 0x68284 cmpq $0x2d, %r14 jae 0x68290 leaq 0x777d8(%rip), %rcx # 0xdfa42 movb $0x1, %bl jmp 0x68311 movb $0xb, %bl jmp 0x6832d leaq 0x777a3(%rip), %rcx # 0xdfa22 jmp 0x68311 leaq 0x777a7(%rip), %rcx # 0xdfa32 jmp 0x68311 cmpq $0x200, %r14 # imm = 0x200 jbe 0x682a4 leaq 0x777d0(%rip), %rcx # 0xdfa70 movb $0x2, %bl jmp 0x68311 movq (%r13), %rax leaq -0x80(%rbp), %rdi movl %r15d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x68502 leaq -0x280(%rbp), %rsi movl $0x2, %r8d movl %r15d, %edi movq %r14, %rdx xorl %ecx, %ecx callq 0xa6624 movq %rax, %r15 testq %r15, %r15 je 0x682ee leaq 0x777a3(%rip), %rcx # 0xdfa8f jmp 0x68311 movl $0xfefe, %eax # imm = 0xFEFE xorl -0x280(%rbp), %eax movzbl -0x27e(%rbp), %ecx xorl $0xc, %ecx orw %ax, %cx je 0x68354 leaq 0x77794(%rip), %rcx # 0xdfaa3 movb $0x3, %bl leaq 0x778e1(%rip), %rsi # 0xdfbf9 leaq -0x480(%rbp), %r8 movl $0xae, %edi xorl %edx, %edx xorl %eax, %eax callq 0xa4321 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x6855c movl %ebx, %eax addq $0x478, %rsp # imm = 0x478 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movzbl -0x27d(%rbp), %edx leaq 0x77946(%rip), %rsi # 0xdfca8 movl $0x1, %edi xorl %eax, %eax callq 0x297b0 movzwl -0x26c(%rbp), %r12d leaq 0x777ad(%rip), %rcx # 0xdfb2a movb $0x8, %bl cmpq $0x1e, %r12 jb 0x68311 movzwl -0x26a(%rbp), %r13d cmpw $0xf, %r13w jb 0x68311 movq %r13, %rax addq %r12, %rax cmpq %rax, %r14 jne 0x68311 movzwl -0x27c(%rbp,%r12), %eax movzbl -0x27a(%rbp,%r12), %r15d shll $0x10, %r15d orl %eax, %r15d movl -0x279(%rbp,%r12), %eax movl %eax, -0x484(%rbp) movl -0x275(%rbp,%r12), %eax movq %rax, -0x490(%rbp) leaq -0x27c(%rbp), %rbx leaq -0x80(%rbp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0xac5be movb $0x0, 0x24(%r14) movzwl 0x14(%rbx), %edx leaq 0x778be(%rip), %rsi # 0xdfcc1 xorl %ebx, %ebx movl $0x1, %edi xorl %eax, %eax callq 0x297b0 leaq 0x778c2(%rip), %rsi # 0xdfcda movl $0x1, %edi movq %r14, %rdx xorl %eax, %eax callq 0x297b0 leaq 0x778c5(%rip), %rsi # 0xdfcf3 movl $0x1, %edi movl %r15d, %edx movl -0x484(%rbp), %ecx xorl %eax, %eax callq 0x297b0 leaq 0x778c9(%rip), %rsi # 0xdfd13 movl $0x1, %edi movq -0x490(%rbp), %rdx xorl %eax, %eax callq 0x297b0 cmpw $0x15, %r13w jb 0x6832d movl -0x271(%rbp,%r12), %eax movzwl -0x26d(%rbp,%r12), %edx shlq $0x20, %rdx orq %rax, %rdx leaq 0x778a6(%rip), %rsi # 0xdfd2d xorl %ebx, %ebx movl $0x1, %edi xorl %eax, %eax callq 0x297b0 cmpw $0x15, %r13w je 0x6832d movzbl -0x26b(%rbp,%r12), %edx leaq 0x77898(%rip), %rsi # 0xdfd48 xorl %ebx, %ebx movl $0x1, %edi xorl %eax, %eax callq 0x297b0 jmp 0x6832d leaq -0x480(%rbp), %rsi leaq -0x80(%rbp), %rdx leaq -0x494(%rbp), %rbx movq %rax, %rdi movq %rbx, %rcx callq 0x2ace9 movl (%rbx), %r15d jmp 0x68217 leaq -0x80(%rbp), %r14 movq %rax, %rdi movl %r15d, %esi movq %r14, %rdx callq 0x2ad45 movq (%r14), %r14 jmp 0x68257 movq %rax, %r12 movq (%r13), %rax leaq 0x774c9(%rip), %rdx # 0xdf9d9 movq %r12, %rdi movq %r14, %rsi movl $0x2a6, %ecx # imm = 0x2A6 callq *0x210(%rax) leaq -0x280(%rbp), %rsi movl $0x2, %r8d movl %r15d, %edi movq %r14, %rdx xorl %ecx, %ecx callq 0xa6624 movq %rax, %r15 testq %rax, %rax movl $0x0, %esi cmoveq %r14, %rsi movq (%r13), %rax movq %r12, %rdi callq *0x218(%rax) jmp 0x682e0 callq 0x29220 nopl (%rax)
print_aria_log_control: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 478h mov rax, fs:28h mov [rbp+var_30], rax lea rax, maria_data_root mov rdx, [rax] lea rsi, aMariaLogContro+1; "aria_log_control" lea rcx, asc_E5CD8+4; "" lea rdi, [rbp+var_480] mov r8d, 10h call fn_format test rax, rax jz loc_68271 lea rax, key_file_control mov esi, [rax] lea r13, PSI_server mov rax, [r13+0] lea rdi, [rbp+var_280] lea rcx, [rbp+var_480] lea rbx, [rbp+var_80] mov edx, 2 mov r8, rbx call qword ptr [rax+148h] mov [rbx], rax test rax, rax jnz loc_684C3 lea rdi, [rbp+var_480] mov edx, 10h mov esi, 80002h call my_open mov r15d, eax loc_68217: mov bl, 0Bh test r15d, r15d js short loc_68278 mov rax, [r13+0] lea rdi, [rbp+var_280] mov esi, r15d mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz loc_684E8 mov ecx, 10h mov edi, r15d xor esi, esi mov edx, 2 call my_seek mov r14, rax loc_68257: cmp r14, 0FFFFFFFFFFFFFFFFh jz short loc_68284 cmp r14, 2Dh ; '-' jnb short loc_68290 lea rcx, aSizeOfControlF; "Size of control file is smaller than ex"... mov bl, 1 jmp loc_68311 loc_68271: mov bl, 0Bh jmp loc_6832D loc_68278: lea rcx, aCanTOpenFile; "Can't open file" jmp loc_68311 loc_68284: lea rcx, aCanTReadSize; "Can't read size" jmp loc_68311 loc_68290: cmp r14, 200h jbe short loc_682A4 lea rcx, aFileSizeBigger; "File size bigger than expected" mov bl, 2 jmp short loc_68311 loc_682A4: mov rax, [r13+0] lea rdi, [rbp+var_80] mov esi, r15d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_68502 lea rsi, [rbp+var_280] mov r8d, 2 mov edi, r15d mov rdx, r14 xor ecx, ecx call my_pread mov r15, rax loc_682E0: test r15, r15 jz short loc_682EE lea rcx, aCanTReadFile; "Can't read file" jmp short loc_68311 loc_682EE: mov eax, 0FEFEh xor eax, [rbp+var_280] movzx ecx, byte ptr [rbp+var_280+2] xor ecx, 0Ch or cx, ax jz short loc_68354 lea rcx, aMissingValidId; "Missing valid id at start of file. File"... mov bl, 3 loc_68311: lea rsi, aGotErrorSWhenT; "Got error '%s' when trying to use aria "... lea r8, [rbp+var_480] mov edi, 0AEh xor edx, edx xor eax, eax call my_printf_error loc_6832D: mov rax, fs:28h cmp rax, [rbp+var_30] jnz loc_6855C mov eax, ebx add rsp, 478h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_68354: movzx edx, byte ptr [rbp+var_280+3] lea rsi, aAriaFileVersio; "Aria file version: %u\n" mov edi, 1 xor eax, eax call ___printf_chk movzx r12d, [rbp+var_26C] lea rcx, aSizesStoredInC; "Sizes stored in control file are incons"... mov bl, 8 cmp r12, 1Eh jb short loc_68311 movzx r13d, [rbp+var_26A] cmp r13w, 0Fh jb loc_68311 mov rax, r13 add rax, r12 cmp r14, rax jnz loc_68311 movzx eax, [rbp+r12+var_27C] movzx r15d, [rbp+r12+var_27A] shl r15d, 10h or r15d, eax mov eax, [rbp+r12+var_279] mov [rbp+var_484], eax mov eax, [rbp+r12+var_275] mov [rbp+var_490], rax lea rbx, [rbp+var_27C] lea r14, [rbp+var_80] mov rdi, rbx mov rsi, r14 call my_uuid2str mov byte ptr [r14+24h], 0 movzx edx, word ptr [rbx+14h] lea rsi, aBlockSizeU; "Block size: %u\n" xor ebx, ebx mov edi, 1 xor eax, eax call ___printf_chk lea rsi, aMariaUuidS; "maria_uuid: %s\n" mov edi, 1 mov rdx, r14 xor eax, eax call ___printf_chk lea rsi, aLastCheckpoint; "last_checkpoint_lsn: (%u,0x%x)\n" mov edi, 1 mov edx, r15d mov ecx, [rbp+var_484] xor eax, eax call ___printf_chk lea rsi, aLastLogNumberL; "last_log_number: %lu\n" mov edi, 1 mov rdx, [rbp+var_490] xor eax, eax call ___printf_chk cmp r13w, 15h jb loc_6832D mov eax, [rbp+r12+var_271] movzx edx, word ptr [rbp+r12-26Dh] shl rdx, 20h or rdx, rax lea rsi, aTridLlu; "trid: %llu\n" xor ebx, ebx mov edi, 1 xor eax, eax call ___printf_chk cmp r13w, 15h jz loc_6832D movzx edx, byte ptr [rbp+r12+var_26C+1] lea rsi, aRecoveryFailur; "recovery_failures: %u\n" xor ebx, ebx mov edi, 1 xor eax, eax call ___printf_chk jmp loc_6832D loc_684C3: lea rsi, [rbp+var_480] lea rdx, [rbp+var_80] lea rbx, [rbp+var_494] mov rdi, rax mov rcx, rbx call print_aria_log_control_cold_1 mov r15d, [rbx] jmp loc_68217 loc_684E8: lea r14, [rbp+var_80] mov rdi, rax mov esi, r15d mov rdx, r14 call print_aria_log_control_cold_2 mov r14, [r14] jmp loc_68257 loc_68502: mov r12, rax mov rax, [r13+0] lea rdx, aWorkspaceLlm4b_10; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r12 mov rsi, r14 mov ecx, 2A6h call qword ptr [rax+210h] lea rsi, [rbp+var_280] mov r8d, 2 mov edi, r15d mov rdx, r14 xor ecx, ecx call my_pread mov r15, rax test rax, rax mov esi, 0 cmovz rsi, r14 mov rax, [r13+0] mov rdi, r12 call qword ptr [rax+218h] jmp loc_682E0 loc_6855C: call ___stack_chk_fail
long long print_aria_log_control() { unsigned int *v0; // rbx long long v1; // rax int v2; // r9d unsigned int v3; // r15d long long v4; // rax unsigned long long v5; // r14 const char *v6; // rcx long long v7; // rax long long v8; // r15 long long v10; // rdx long long v11; // r12 unsigned __int16 v12; // r13 int v13; // r15d long long v14; // r12 unsigned long long v15; // rsi unsigned int v16; // [rsp+Ch] [rbp-494h] BYREF long long v17; // [rsp+10h] [rbp-490h] int v18; // [rsp+1Ch] [rbp-484h] _BYTE v19[512]; // [rsp+20h] [rbp-480h] BYREF unsigned __int16 v20; // [rsp+220h] [rbp-280h] BYREF unsigned __int8 v21; // [rsp+222h] [rbp-27Eh] unsigned __int8 v22; // [rsp+223h] [rbp-27Dh] _WORD v23[8]; // [rsp+224h] [rbp-27Ch] BYREF unsigned __int16 v24; // [rsp+234h] [rbp-26Ch] unsigned __int16 v25; // [rsp+236h] [rbp-26Ah] unsigned __int16 v26; // [rsp+238h] [rbp-268h] _QWORD v27[4]; // [rsp+420h] [rbp-80h] BYREF char v28; // [rsp+444h] [rbp-5Ch] unsigned long long v29; // [rsp+470h] [rbp-30h] v29 = __readfsqword(0x28u); if ( fn_format(v19, "aria_log_control", *(_QWORD *)&maria_data_root, "", 16LL) ) { v0 = (unsigned int *)v27; v1 = ((long long ( *)(unsigned __int16 *, _QWORD, long long, _BYTE *, _QWORD *))PSI_server[41])( &v20, key_file_control, 2LL, v19, v27); v27[0] = v1; if ( v1 ) { v0 = &v16; print_aria_log_control_cold_1(v1, (long long)v19, v27, &v16); v3 = v16; } else { v3 = my_open(v19, 524290LL, 16LL); } LOBYTE(v0) = 11; if ( (v3 & 0x80000000) != 0 ) { v6 = "Can't open file"; goto LABEL_21; } v4 = ((long long ( *)(unsigned __int16 *, _QWORD, long long))PSI_server[43])(&v20, v3, 8LL); if ( v4 ) { print_aria_log_control_cold_2(v4, v3, v27); v5 = v27[0]; } else { v5 = my_seek(v3, 0LL, 2LL, 16LL); } if ( v5 == -1LL ) { v6 = "Can't read size"; goto LABEL_21; } if ( v5 < 0x2D ) { v6 = "Size of control file is smaller than expected"; LOBYTE(v0) = 1; LABEL_21: my_printf_error( 174, (unsigned int)"Got error '%s' when trying to use aria control file '%s'", 0, (_DWORD)v6, (unsigned int)v19, v2); return (unsigned int)v0; } if ( v5 > 0x200 ) { v6 = "File size bigger than expected"; LOBYTE(v0) = 2; goto LABEL_21; } v7 = ((long long ( *)(_QWORD *, _QWORD, long long))PSI_server[43])(v27, v3, 6LL); if ( v7 ) { v14 = v7; ((void ( *)(long long, unsigned long long, const char *, long long))PSI_server[66])( v7, v5, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 678LL); v8 = my_pread(v3, &v20, v5, 0LL, 2LL); v15 = 0LL; if ( !v8 ) v15 = v5; ((void ( *)(long long, unsigned long long))PSI_server[67])(v14, v15); } else { v8 = my_pread(v3, &v20, v5, 0LL, 2LL); } if ( v8 ) { v6 = "Can't read file"; goto LABEL_21; } if ( v20 ^ 0xFEFE | v21 ^ 0xC ) { v6 = "Missing valid id at start of file. File is not a valid aria control file"; LOBYTE(v0) = 3; goto LABEL_21; } __printf_chk(1LL, "Aria file version: %u\n", v22); v11 = v24; v6 = "Sizes stored in control file are inconsistent"; LOBYTE(v0) = 8; if ( v24 < 0x1EuLL ) goto LABEL_21; v12 = v25; if ( v25 < 0xFu || v5 != v24 + (unsigned long long)v25 ) goto LABEL_21; v13 = *(unsigned __int16 *)((char *)v23 + v24) | (*((unsigned __int8 *)&v23[1] + v24) << 16); v18 = *(_DWORD *)((char *)&v23[1] + v24 + 1); v17 = *(unsigned int *)((char *)&v23[3] + v24 + 1); my_uuid2str(v23, v27, v10, "Sizes stored in control file are inconsistent"); v28 = 0; LODWORD(v0) = 0; __printf_chk(1LL, "Block size: %u\n", v26); __printf_chk(1LL, "maria_uuid: %s\n", (const char *)v27); __printf_chk(1LL, "last_checkpoint_lsn: (%u,0x%x)\n", v13, v18); __printf_chk(1LL, "last_log_number: %lu\n", v17); if ( v12 >= 0x15u ) { LODWORD(v0) = 0; __printf_chk( 1LL, "trid: %llu\n", *(unsigned int *)((char *)&v23[5] + v11 + 1) | ((unsigned long long)*(unsigned __int16 *)((char *)&v23[7] + v11 + 1) << 32)); if ( v12 != 21 ) { LODWORD(v0) = 0; __printf_chk(1LL, "recovery_failures: %u\n", *((unsigned __int8 *)&v24 + v11 + 1)); } } } else { LOBYTE(v0) = 11; } return (unsigned int)v0; }
print_aria_log_control: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x478 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA RAX,[0x5071e0] MOV RDX,qword ptr [RAX] LEA RSI,[0x1df120] LEA RCX,[0x1e5cdc] LEA RDI,[RBP + -0x480] MOV R8D,0x10 CALL 0x0019a8bc TEST RAX,RAX JZ 0x00168271 LEA RAX,[0x5073a0] MOV ESI,dword ptr [RAX] LEA R13,[0x48d070] MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x280] LEA RCX,[RBP + -0x480] LEA RBX,[RBP + -0x80] MOV EDX,0x2 MOV R8,RBX CALL qword ptr [RAX + 0x148] MOV qword ptr [RBX],RAX TEST RAX,RAX JNZ 0x001684c3 LEA RDI,[RBP + -0x480] MOV EDX,0x10 MOV ESI,0x80002 CALL 0x001a63a4 MOV R15D,EAX LAB_00168217: MOV BL,0xb TEST R15D,R15D JS 0x00168278 MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x280] MOV ESI,R15D MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x001684e8 MOV ECX,0x10 MOV EDI,R15D XOR ESI,ESI MOV EDX,0x2 CALL 0x001a6ca0 MOV R14,RAX LAB_00168257: CMP R14,-0x1 JZ 0x00168284 CMP R14,0x2d JNC 0x00168290 LEA RCX,[0x1dfa42] MOV BL,0x1 JMP 0x00168311 LAB_00168271: MOV BL,0xb JMP 0x0016832d LAB_00168278: LEA RCX,[0x1dfa22] JMP 0x00168311 LAB_00168284: LEA RCX,[0x1dfa32] JMP 0x00168311 LAB_00168290: CMP R14,0x200 JBE 0x001682a4 LEA RCX,[0x1dfa70] MOV BL,0x2 JMP 0x00168311 LAB_001682a4: MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x80] MOV ESI,R15D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00168502 LEA RSI,[RBP + -0x280] MOV R8D,0x2 MOV EDI,R15D MOV RDX,R14 XOR ECX,ECX CALL 0x001a6624 MOV R15,RAX LAB_001682e0: TEST R15,R15 JZ 0x001682ee LEA RCX,[0x1dfa8f] JMP 0x00168311 LAB_001682ee: MOV EAX,0xfefe XOR EAX,dword ptr [RBP + -0x280] MOVZX ECX,byte ptr [RBP + -0x27e] XOR ECX,0xc OR CX,AX JZ 0x00168354 LEA RCX,[0x1dfaa3] MOV BL,0x3 LAB_00168311: LEA RSI,[0x1dfbf9] LEA R8,[RBP + -0x480] MOV EDI,0xae XOR EDX,EDX XOR EAX,EAX CALL 0x001a4321 LAB_0016832d: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0016855c MOV EAX,EBX ADD RSP,0x478 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00168354: MOVZX EDX,byte ptr [RBP + -0x27d] LEA RSI,[0x1dfca8] MOV EDI,0x1 XOR EAX,EAX CALL 0x001297b0 MOVZX R12D,word ptr [RBP + -0x26c] LEA RCX,[0x1dfb2a] MOV BL,0x8 CMP R12,0x1e JC 0x00168311 MOVZX R13D,word ptr [RBP + -0x26a] CMP R13W,0xf JC 0x00168311 MOV RAX,R13 ADD RAX,R12 CMP R14,RAX JNZ 0x00168311 MOVZX EAX,word ptr [RBP + R12*0x1 + -0x27c] MOVZX R15D,byte ptr [RBP + R12*0x1 + -0x27a] SHL R15D,0x10 OR R15D,EAX MOV EAX,dword ptr [RBP + R12*0x1 + -0x279] MOV dword ptr [RBP + -0x484],EAX MOV EAX,dword ptr [RBP + R12*0x1 + -0x275] MOV qword ptr [RBP + -0x490],RAX LEA RBX,[RBP + -0x27c] LEA R14,[RBP + -0x80] MOV RDI,RBX MOV RSI,R14 CALL 0x001ac5be MOV byte ptr [R14 + 0x24],0x0 MOVZX EDX,word ptr [RBX + 0x14] LEA RSI,[0x1dfcc1] XOR EBX,EBX MOV EDI,0x1 XOR EAX,EAX CALL 0x001297b0 LEA RSI,[0x1dfcda] MOV EDI,0x1 MOV RDX,R14 XOR EAX,EAX CALL 0x001297b0 LEA RSI,[0x1dfcf3] MOV EDI,0x1 MOV EDX,R15D MOV ECX,dword ptr [RBP + -0x484] XOR EAX,EAX CALL 0x001297b0 LEA RSI,[0x1dfd13] MOV EDI,0x1 MOV RDX,qword ptr [RBP + -0x490] XOR EAX,EAX CALL 0x001297b0 CMP R13W,0x15 JC 0x0016832d MOV EAX,dword ptr [RBP + R12*0x1 + -0x271] MOVZX EDX,word ptr [RBP + R12*0x1 + -0x26d] SHL RDX,0x20 OR RDX,RAX LEA RSI,[0x1dfd2d] XOR EBX,EBX MOV EDI,0x1 XOR EAX,EAX CALL 0x001297b0 CMP R13W,0x15 JZ 0x0016832d MOVZX EDX,byte ptr [RBP + R12*0x1 + -0x26b] LEA RSI,[0x1dfd48] XOR EBX,EBX MOV EDI,0x1 XOR EAX,EAX CALL 0x001297b0 JMP 0x0016832d LAB_001684c3: LEA RSI,[RBP + -0x480] LEA RDX,[RBP + -0x80] LEA RBX,[RBP + -0x494] MOV RDI,RAX MOV RCX,RBX CALL 0x0012ace9 MOV R15D,dword ptr [RBX] JMP 0x00168217 LAB_001684e8: LEA R14,[RBP + -0x80] MOV RDI,RAX MOV ESI,R15D MOV RDX,R14 CALL 0x0012ad45 MOV R14,qword ptr [R14] JMP 0x00168257 LAB_00168502: MOV R12,RAX MOV RAX,qword ptr [R13] LEA RDX,[0x1df9d9] MOV RDI,R12 MOV RSI,R14 MOV ECX,0x2a6 CALL qword ptr [RAX + 0x210] LEA RSI,[RBP + -0x280] MOV R8D,0x2 MOV EDI,R15D MOV RDX,R14 XOR ECX,ECX CALL 0x001a6624 MOV R15,RAX TEST RAX,RAX MOV ESI,0x0 CMOVZ RSI,R14 MOV RAX,qword ptr [R13] MOV RDI,R12 CALL qword ptr [RAX + 0x218] JMP 0x001682e0 LAB_0016855c: CALL 0x00129220
ulong print_aria_log_control(void) { int1 uVar1; int2 uVar2; int iVar3; long lVar4; ulong uVar5; long lVar6; char *pcVar7; int8 extraout_RDX; int8 unaff_RBX; ulong uVar8; ulong uVar11; long in_FS_OFFSET; int local_49c; ulong local_498; int4 local_48c; int1 local_488 [512]; int1 local_288 [2]; char cStack_286; int1 uStack_285; int2 local_284; int1 uStack_282; uint auStack_281 [3]; int1 auStack_275 [2]; int1 uStack_273; ushort local_272; int2 local_270; ulong local_88 [4]; int1 local_64; long local_38; ulong *puVar9; int7 uVar10; local_38 = *(long *)(in_FS_OFFSET + 0x28); lVar4 = fn_format(local_488,"aria_log_control",maria_data_root,&DAT_001e5cdc,0x10); if (lVar4 == 0) { uVar8 = CONCAT71((int7)((ulong)unaff_RBX >> 8),0xb); } else { puVar9 = local_88; local_88[0] = (**(code **)(PSI_server + 0x148))(local_288,key_file_control,2,local_488,puVar9); if (local_88[0] == 0) { iVar3 = my_open(local_488,0x80002,0x10); } else { puVar9 = (ulong *)&local_49c; print_aria_log_control_cold_1(local_88[0],local_488,local_88,puVar9); iVar3 = local_49c; } uVar10 = (int7)((ulong)puVar9 >> 8); uVar8 = CONCAT71(uVar10,0xb); if (iVar3 < 0) { pcVar7 = "Can\'t open file"; } else { lVar4 = (**(code **)(PSI_server + 0x158))(local_288,iVar3,8); if (lVar4 == 0) { uVar5 = my_seek(iVar3,0,2,0x10); } else { print_aria_log_control_cold_2(lVar4,iVar3,local_88); uVar5 = local_88[0]; } if (uVar5 == 0xffffffffffffffff) { pcVar7 = "Can\'t read size"; } else if (uVar5 < 0x2d) { pcVar7 = "Size of control file is smaller than expected"; uVar8 = CONCAT71(uVar10,1); } else if (uVar5 < 0x201) { lVar4 = (**(code **)(PSI_server + 0x158))(local_88,iVar3,6); if (lVar4 == 0) { lVar6 = my_pread(iVar3,local_288,uVar5,0,2); } else { (**(code **)(PSI_server + 0x210)) (lVar4,uVar5, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_control_file.c", 0x2a6); lVar6 = my_pread(iVar3,local_288,uVar5,0,2); uVar11 = 0; if (lVar6 == 0) { uVar11 = uVar5; } (**(code **)(PSI_server + 0x218))(lVar4,uVar11); } if (lVar6 == 0) { if (cStack_286 == '\f' && (short)_local_288 == -0x102) { __printf_chk(1,"Aria file version: %u\n",uStack_285); uVar11 = (ulong)stack0xfffffffffffffd8c; pcVar7 = "Sizes stored in control file are inconsistent"; uVar8 = CONCAT71(uVar10,8); if (0x1d < uVar11) { if ((0xe < local_272) && (uVar5 == local_272 + uVar11)) { uVar2 = *(int2 *)((long)&local_284 + uVar11); uVar1 = *(int1 *)((long)auStack_281 + (uVar11 - 1)); local_48c = *(int4 *)((long)auStack_281 + uVar11); local_498 = (ulong)*(uint *)((long)auStack_281 + uVar11 + 4); my_uuid2str(&local_284,local_88,extraout_RDX, "Sizes stored in control file are inconsistent"); local_64 = 0; uVar8 = 0; __printf_chk(1,"Block size: %u\n",local_270); __printf_chk(1,"maria_uuid: %s\n",local_88); __printf_chk(1,"last_checkpoint_lsn: (%u,0x%x)\n",(ulong)CONCAT12(uVar1,uVar2), local_48c); __printf_chk(1,"last_log_number: %lu\n",local_498); if (0x14 < local_272) { uVar8 = 0; __printf_chk(1,"trid: %llu\n", (ulong)CONCAT24(*(int2 *)(auStack_275 + uVar11), *(int4 *)((long)auStack_281 + uVar11 + 8))); if (local_272 != 0x15) { uVar8 = 0; __printf_chk(1,"recovery_failures: %u\n",(&uStack_273)[uVar11]); } } goto LAB_0016832d; } } } else { pcVar7 = "Missing valid id at start of file. File is not a valid aria control file"; uVar8 = CONCAT71(uVar10,3); } } else { pcVar7 = "Can\'t read file"; } } else { pcVar7 = "File size bigger than expected"; uVar8 = CONCAT71(uVar10,2); } } my_printf_error(0xae,"Got error \'%s\' when trying to use aria control file \'%s\'",0,pcVar7, local_488); } LAB_0016832d: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return uVar8 & 0xffffffff; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
46,836
PFS_events_statements::copy(PFS_events_statements const&)
eloqsql/storage/perfschema/pfs_events_statements.cc
inline void PFS_events_statements::copy(const PFS_events_statements &source) { /* Copy all attributes except SQL TEXT and DIGEST */ memcpy((void*) this, &source, offsetof(PFS_events_statements, m_sqltext)); /* Copy SQL TEXT */ int sqltext_length= source.m_sqltext_length; if (sqltext_length > 0) { memcpy(m_sqltext, source.m_sqltext, sqltext_length); m_sqltext_length= sqltext_length; } else { m_sqltext_length= 0; } /* Copy DIGEST */ m_digest_storage.copy(&source.m_digest_storage); }
O0
cpp
PFS_events_statements::copy(PFS_events_statements const&): pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x20(%rbp) movq -0x10(%rbp), %rsi movl $0x550, %edx # imm = 0x550 callq 0x26280 movq -0x10(%rbp), %rax movl 0x558(%rax), %eax movl %eax, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) jle 0x555f7 movq -0x20(%rbp), %rax movq 0x550(%rax), %rdi movq -0x10(%rbp), %rax movq 0x550(%rax), %rsi movslq -0x14(%rbp), %rdx callq 0x26280 movq -0x20(%rbp), %rax movl -0x14(%rbp), %ecx movl %ecx, 0x558(%rax) jmp 0x55605 movq -0x20(%rbp), %rax movl $0x0, 0x558(%rax) movq -0x20(%rbp), %rdi addq $0x560, %rdi # imm = 0x560 movq -0x10(%rbp), %rsi addq $0x560, %rsi # imm = 0x560 callq 0x4e650 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN21PFS_events_statements4copyERKS_: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rdi, [rbp+var_8] mov [rbp+var_20], rdi mov rsi, [rbp+var_10] mov edx, 550h call _memcpy mov rax, [rbp+var_10] mov eax, [rax+558h] mov [rbp+var_14], eax cmp [rbp+var_14], 0 jle short loc_555F7 mov rax, [rbp+var_20] mov rdi, [rax+550h] mov rax, [rbp+var_10] mov rsi, [rax+550h] movsxd rdx, [rbp+var_14] call _memcpy mov rax, [rbp+var_20] mov ecx, [rbp+var_14] mov [rax+558h], ecx jmp short loc_55605 loc_555F7: mov rax, [rbp+var_20] mov dword ptr [rax+558h], 0 loc_55605: mov rdi, [rbp+var_20] add rdi, 560h; this mov rsi, [rbp+var_10] add rsi, 560h; sql_digest_storage * call _ZN18sql_digest_storage4copyEPKS_; sql_digest_storage::copy(sql_digest_storage const*) add rsp, 20h pop rbp retn
sql_digest_storage * PFS_events_statements::copy(long long a1, long long a2) { int v3; // [rsp+Ch] [rbp-14h] memcpy(a1, a2, 1360LL); v3 = *(_DWORD *)(a2 + 1368); if ( v3 <= 0 ) { *(_DWORD *)(a1 + 1368) = 0; } else { memcpy(*(_QWORD *)(a1 + 1360), *(_QWORD *)(a2 + 1360), v3); *(_DWORD *)(a1 + 1368) = v3; } return sql_digest_storage::copy((sql_digest_storage *)(a1 + 1376), (const sql_digest_storage *)(a2 + 1376)); }
copy: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RDI MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x550 CALL 0x00126280 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x558] MOV dword ptr [RBP + -0x14],EAX CMP dword ptr [RBP + -0x14],0x0 JLE 0x001555f7 MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RAX + 0x550] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x550] MOVSXD RDX,dword ptr [RBP + -0x14] CALL 0x00126280 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RBP + -0x14] MOV dword ptr [RAX + 0x558],ECX JMP 0x00155605 LAB_001555f7: MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x558],0x0 LAB_00155605: MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x560 MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x560 CALL 0x0014e650 ADD RSP,0x20 POP RBP RET
/* PFS_events_statements::copy(PFS_events_statements const&) */ void __thiscall PFS_events_statements::copy(PFS_events_statements *this,PFS_events_statements *param_1) { int iVar1; memcpy(this,param_1,0x550); iVar1 = *(int *)(param_1 + 0x558); if (iVar1 < 1) { *(int4 *)(this + 0x558) = 0; } else { memcpy(*(void **)(this + 0x550),*(void **)(param_1 + 0x550),(long)iVar1); *(int *)(this + 0x558) = iVar1; } sql_digest_storage::copy ((sql_digest_storage *)(this + 0x560),(sql_digest_storage *)(param_1 + 0x560)); return; }
46,837
vemit_tap
eloqsql/unittest/mytap/tap.c
static void vemit_tap(int pass, char const *fmt, va_list ap) { fprintf(tapout, "%sok %d%s", pass ? "" : "not ", ++g_test.last, (fmt && *fmt) ? " - " : ""); if (fmt && *fmt) vfprintf(tapout, fmt, ap); fflush(tapout); }
O3
c
vemit_tap: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edi, %eax movq 0x2f2b60(%rip), %r15 # 0x383fa8 movq (%r15), %rdi testl %eax, %eax leaq 0x4ab73(%rip), %rcx # 0xdbfc7 leaq 0x4e9be(%rip), %rax # 0xdfe19 cmovneq %rax, %rcx movl 0xb6e5ae(%rip), %r8d # 0xbffa14 incl %r8d movl %r8d, 0xb6e5a4(%rip) # 0xbffa14 testq %rsi, %rsi je 0x914b7 movq %rdx, %rbx movq %rsi, %r14 cmpb $0x0, (%rsi) leaq 0x4ab47(%rip), %r9 # 0xdbfcc cmoveq %rax, %r9 leaq 0x4ab2d(%rip), %rdx # 0xdbfbd movl $0x1, %esi xorl %eax, %eax callq 0x29200 cmpb $0x0, (%r14) je 0x914d1 movq (%r15), %rdi movl $0x1, %esi movq %r14, %rdx movq %rbx, %rcx callq 0x29750 jmp 0x914d1 leaq 0x4aaff(%rip), %rdx # 0xdbfbd leaq 0x4e954(%rip), %r9 # 0xdfe19 movl $0x1, %esi xorl %eax, %eax callq 0x29200 movq (%r15), %rdi addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x29400
vemit_tap: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov eax, edi mov r15, cs:stdout_ptr mov rdi, [r15] test eax, eax lea rcx, aNot; "not " lea rax, asc_DFE15+4; "" cmovnz rcx, rax mov r8d, cs:dword_BFFA14 inc r8d mov cs:dword_BFFA14, r8d test rsi, rsi jz short loc_914B7 mov rbx, rdx mov r14, rsi cmp byte ptr [rsi], 0 lea r9, asc_DBFCC; " - " cmovz r9, rax lea rdx, aSokDS; "%sok %d%s" mov esi, 1 xor eax, eax call ___fprintf_chk cmp byte ptr [r14], 0 jz short loc_914D1 mov rdi, [r15] mov esi, 1 mov rdx, r14 mov rcx, rbx call ___vfprintf_chk jmp short loc_914D1 loc_914B7: lea rdx, aSokDS; "%sok %d%s" lea r9, asc_DFE15+4; "" mov esi, 1 xor eax, eax call ___fprintf_chk loc_914D1: mov rdi, [r15] add rsp, 8 pop rbx pop r14 pop r15 pop rbp jmp _fflush
long long vemit_tap(int a1, _BYTE *a2, long long a3) { const char *v3; // rcx int v4; // r8d const char *v6; // r9 v3 = "not "; if ( a1 ) v3 = ""; v4 = ++dword_BFFA14; if ( a2 ) { v6 = " - "; if ( !*a2 ) v6 = ""; __fprintf_chk(stdout, 1LL, "%sok %d%s", v3, v4, v6); if ( *a2 ) __vfprintf_chk(stdout, 1LL, a2, a3); } else { __fprintf_chk(stdout, 1LL, "%sok %d%s", v3, v4, ""); } return fflush(stdout); }
vemit_tap: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV EAX,EDI MOV R15,qword ptr [0x00483fa8] MOV RDI,qword ptr [R15] TEST EAX,EAX LEA RCX,[0x1dbfc7] LEA RAX,[0x1dfe19] CMOVNZ RCX,RAX MOV R8D,dword ptr [0x00cffa14] INC R8D MOV dword ptr [0x00cffa14],R8D TEST RSI,RSI JZ 0x001914b7 MOV RBX,RDX MOV R14,RSI CMP byte ptr [RSI],0x0 LEA R9,[0x1dbfcc] CMOVZ R9,RAX LEA RDX,[0x1dbfbd] MOV ESI,0x1 XOR EAX,EAX CALL 0x00129200 CMP byte ptr [R14],0x0 JZ 0x001914d1 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV RDX,R14 MOV RCX,RBX CALL 0x00129750 JMP 0x001914d1 LAB_001914b7: LEA RDX,[0x1dbfbd] LEA R9,[0x1dfe19] MOV ESI,0x1 XOR EAX,EAX CALL 0x00129200 LAB_001914d1: MOV RDI,qword ptr [R15] ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP JMP 0x00129400
void vemit_tap(int param_1,char *param_2,int8 param_3) { int *puVar1; int *puVar2; int *puVar3; puVar1 = PTR_stdout_00483fa8; puVar2 = &DAT_001dbfc7; if (param_1 != 0) { puVar2 = &DAT_001dfe19; } DAT_00cffa14 = DAT_00cffa14 + 1; if (param_2 == (char *)0x0) { __fprintf_chk(*(int8 *)PTR_stdout_00483fa8,1,"%sok %d%s",puVar2,DAT_00cffa14,&DAT_001dfe19 ); } else { puVar3 = &DAT_001dbfcc; if (*param_2 == '\0') { puVar3 = &DAT_001dfe19; } __fprintf_chk(*(int8 *)PTR_stdout_00483fa8,1,"%sok %d%s",puVar2,DAT_00cffa14,puVar3); if (*param_2 != '\0') { __vfprintf_chk(*(int8 *)puVar1,1,param_2,param_3); } } fflush(*(FILE **)puVar1); return; }
46,838
get_charset
eloqsql/mysys/charset.c
CHARSET_INFO *get_charset(uint cs_number, myf flags) { CHARSET_INFO *cs= NULL; if (cs_number == default_charset_info->number) return default_charset_info; my_pthread_once(&charsets_initialized, init_available_charsets); if (cs_number < array_elements(all_charsets)) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); cs= get_internal_charset(&loader, cs_number, flags); } if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)], cs_string[23]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); cs_string[0]='#'; int10_to_str(cs_number, cs_string+1, 10); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_string, index_file); } return cs; }
O3
c
get_charset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x238, %rsp # imm = 0x238 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0x2d1962(%rip), %rax # 0x2fa2e0 movq (%rax), %r15 cmpl %edi, (%r15) je 0x28a85 movq %rsi, %r14 movl %edi, %ebx leaq 0x3505fa(%rip), %rdi # 0x378f90 leaq -0x382(%rip), %rsi # 0x2861b callq 0x24310 cmpl $0x7ff, %ebx # imm = 0x7FF ja 0x28a1a leaq -0x230(%rbp), %rdi movb $0x0, (%rdi) leaq -0xb6d(%rip), %rax # 0x27e4e movq %rax, 0x80(%rdi) leaq -0xb6c(%rip), %rax # 0x27e5d movq %rax, 0x88(%rdi) leaq -0xb5f(%rip), %rax # 0x27e78 movq %rax, 0x90(%rdi) leaq 0x7921(%rip), %rax # 0x30306 movq %rax, 0x98(%rdi) leaq 0x2d18e5(%rip), %rax # 0x2fa2d8 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xb6e(%rip), %rax # 0x27e96 movq %rax, 0xa8(%rdi) movl %ebx, %esi movq %r14, %rdx callq 0x28aaa movq %rax, %r15 jmp 0x28a1d xorl %r15d, %r15d testq %r15, %r15 setne %al testb $0x10, %r14b sete %cl orb %al, %cl jne 0x28a85 leaq -0x230(%rbp), %r14 movq %r14, %rdi callq 0x283db movabsq $0x6d782e7865646e49, %rcx # imm = 0x6D782E7865646E49 movq %rcx, (%rax) movw $0x6c, 0x8(%rax) leaq -0x24f(%rbp), %rsi movb $0x23, -0x1(%rsi) movl %ebx, %edi movl $0xa, %edx callq 0x617e2 xorl %r15d, %r15d leaq -0x250(%rbp), %rdx movl $0x4, %esi movl $0x16, %edi movq %r14, %rcx xorl %eax, %eax callq 0x2cce7 movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x28aa5 movq %r15, %rax addq $0x238, %rsp # imm = 0x238 popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x243e0
get_charset: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 238h mov rax, fs:28h mov [rbp+var_20], rax lea rax, default_charset_info mov r15, [rax] cmp [r15], edi jz loc_28A85 mov r14, rsi mov ebx, edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once cmp ebx, 7FFh ja short loc_28A1A lea rdi, [rbp+var_230] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax mov esi, ebx mov rdx, r14 call get_internal_charset mov r15, rax jmp short loc_28A1D loc_28A1A: xor r15d, r15d loc_28A1D: test r15, r15 setnz al test r14b, 10h setz cl or cl, al jnz short loc_28A85 lea r14, [rbp+var_230] mov rdi, r14 call get_charsets_dir mov rcx, 6D782E7865646E49h mov [rax], rcx mov word ptr [rax+8], 6Ch ; 'l' lea rsi, [rbp+var_24F] mov byte ptr [rsi-1], 23h ; '#' mov edi, ebx mov edx, 0Ah call int10_to_str xor r15d, r15d lea rdx, [rbp+var_250] mov esi, 4 mov edi, 16h mov rcx, r14 xor eax, eax call my_error loc_28A85: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_28AA5 mov rax, r15 add rsp, 238h pop rbx pop r14 pop r15 pop rbp retn loc_28AA5: call ___stack_chk_fail
void * get_charset(unsigned int a1, long long a2) { void *internal_charset; // r15 int v3; // r8d int v4; // r9d char v6; // [rsp+0h] [rbp-250h] BYREF _BYTE v7[31]; // [rsp+1h] [rbp-24Fh] BYREF _BYTE v8[128]; // [rsp+20h] [rbp-230h] BYREF long long ( *v9)(long long); // [rsp+A0h] [rbp-1B0h] long long ( *v10)(long long); // [rsp+A8h] [rbp-1A8h] long long ( *v11)(long long, long long); // [rsp+B0h] [rbp-1A0h] long long ( *v12)(_QWORD); // [rsp+B8h] [rbp-198h] long long ( *v13)(); // [rsp+C0h] [rbp-190h] long long ( *v14)(unsigned int *); // [rsp+C8h] [rbp-188h] unsigned long long v15; // [rsp+230h] [rbp-20h] v15 = __readfsqword(0x28u); internal_charset = default_charset_info; if ( *(_DWORD *)default_charset_info != a1 ) { pthread_once(&charsets_initialized, init_available_charsets); if ( a1 > 0x7FF ) { internal_charset = 0LL; } else { v8[0] = 0; v9 = my_once_alloc_c; v10 = my_malloc_c; v11 = my_realloc_c; v12 = my_free; v13 = my_charset_error_reporter; v14 = add_collation; internal_charset = (void *)get_internal_charset(v8, a1, a2); } if ( internal_charset == 0LL && (a2 & 0x10) != 0 ) { strcpy((char *)get_charsets_dir((long long)v8), "Index.xml"); v6 = 35; int10_to_str(a1, v7, 10LL); internal_charset = 0LL; my_error(22, 4, (unsigned int)&v6, (unsigned int)v8, v3, v4); } } return internal_charset; }
get_charset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x238 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RAX,[0x3fa2e0] MOV R15,qword ptr [RAX] CMP dword ptr [R15],EDI JZ 0x00128a85 MOV R14,RSI MOV EBX,EDI LEA RDI,[0x478f90] LEA RSI,[0x12861b] CALL 0x00124310 CMP EBX,0x7ff JA 0x00128a1a LEA RDI,[RBP + -0x230] MOV byte ptr [RDI],0x0 LEA RAX,[0x127e4e] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x127e5d] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x127e78] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x130306] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x3fa2d8] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x127e96] MOV qword ptr [RDI + 0xa8],RAX MOV ESI,EBX MOV RDX,R14 CALL 0x00128aaa MOV R15,RAX JMP 0x00128a1d LAB_00128a1a: XOR R15D,R15D LAB_00128a1d: TEST R15,R15 SETNZ AL TEST R14B,0x10 SETZ CL OR CL,AL JNZ 0x00128a85 LEA R14,[RBP + -0x230] MOV RDI,R14 CALL 0x001283db MOV RCX,0x6d782e7865646e49 MOV qword ptr [RAX],RCX MOV word ptr [RAX + 0x8],0x6c LEA RSI,[RBP + -0x24f] MOV byte ptr [RSI + -0x1],0x23 MOV EDI,EBX MOV EDX,0xa CALL 0x001617e2 XOR R15D,R15D LEA RDX,[RBP + -0x250] MOV ESI,0x4 MOV EDI,0x16 MOV RCX,R14 XOR EAX,EAX CALL 0x0012cce7 LAB_00128a85: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00128aa5 MOV RAX,R15 ADD RSP,0x238 POP RBX POP R14 POP R15 POP RBP RET LAB_00128aa5: CALL 0x001243e0
int * get_charset(uint param_1,ulong param_2) { int *puVar1; int8 *puVar2; long in_FS_OFFSET; int1 local_258; int1 local_257 [31]; int1 local_238 [128]; code *local_1b8; code *local_1b0; code *local_1a8; code *local_1a0; int *local_198; code *local_190; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); puVar1 = default_charset_info; if (*(uint *)default_charset_info != param_1) { pthread_once(&charsets_initialized,init_available_charsets); if (param_1 < 0x800) { local_238[0] = 0; local_1b8 = my_once_alloc_c; local_1b0 = my_malloc_c; local_1a8 = my_realloc_c; local_1a0 = my_free; local_198 = my_charset_error_reporter; local_190 = add_collation; puVar1 = (int *)get_internal_charset(local_238,param_1,param_2); } else { puVar1 = (int *)0x0; } if ((param_2 & 0x10) != 0 && puVar1 == (int *)0x0) { puVar2 = (int8 *)get_charsets_dir(local_238); *puVar2 = 0x6d782e7865646e49; *(int2 *)(puVar2 + 1) = 0x6c; local_258 = 0x23; int10_to_str(param_1,local_257,10); puVar1 = (int *)0x0; my_error(0x16,4,&local_258,local_238); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return puVar1; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
46,839
my_strntoul_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static ulong my_strntoul_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 unsigned int cutlim; register uint32 cutoff; register uint32 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= ((uint32)~0L) / (uint32) base; cutlim= (uint) (((uint32)~0L) % (uint32) 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*= (uint32) 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 (overflow) { err[0]= (ERANGE); return (~(uint32) 0); } return (negative ? -((long) res) : (long) res); }
O3
c
my_strntoul_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %r8, -0x40(%rbp) movl %ecx, -0x34(%rbp) movq %rdx, %r13 movq %rsi, %r15 movq %rdi, %r14 movq 0xb8(%rdi), %rax movq 0x28(%rax), %r12 addq %rsi, %r13 movq %r9, -0x50(%rbp) movl $0x0, (%r9) leaq -0x30(%rbp), %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0x87fdd movl $0x0, -0x38(%rbp) leaq -0x30(%rbp), %rbx movq -0x30(%rbp), %rcx cmpq $0x2a, %rcx jg 0x87fad cmpq $0x9, %rcx je 0x87fc5 cmpq $0x20, %rcx je 0x87fc5 jmp 0x8800f cmpq $0x2b, %rcx je 0x87fc5 cmpq $0x2d, %rcx jne 0x8800f xorl %ecx, %ecx cmpl $0x0, -0x38(%rbp) sete %cl movl %ecx, -0x38(%rbp) movl %eax, %eax addq %rax, %r15 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jg 0x87f95 movq -0x40(%rbp), %rcx testq %rcx, %rcx je 0x87fe9 movq %r15, (%rcx) testl %eax, %eax movl $0x54, %eax movl $0x21, %ecx cmovel %eax, %ecx movq -0x50(%rbp), %rax movl %ecx, (%rax) xorl %eax, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl -0x34(%rbp) movl %edx, %ebx movl %eax, -0x44(%rbp) leaq -0x30(%rbp), %rsi movq %r14, %rdi movq %r15, %rdx movq %r13, %rcx callq *%r12 testl %eax, %eax jle 0x880d3 movq %r12, -0x68(%rbp) movl %ebx, %ecx movq %rcx, -0x60(%rbp) xorl %ecx, %ecx movq %r15, %rbx xorl %edi, %edi movq %rbx, %rsi movl %eax, %ebx addq %rsi, %rbx movq -0x30(%rbp), %rsi leaq -0x30(%rsi), %rax cmpq $0x9, %rax ja 0x88063 movq %rax, -0x30(%rbp) jmp 0x88088 leaq -0x41(%rsi), %rax cmpq $0x19, %rax ja 0x88073 addq $-0x37, %rsi jmp 0x88081 leaq -0x61(%rsi), %rax cmpq $0x19, %rax ja 0x880e4 addq $-0x57, %rsi movq %rsi, -0x30(%rbp) movq %rsi, %rax cmpl -0x34(%rbp), %eax jge 0x880e4 movl $0x1, %esi cmpl -0x44(%rbp), %ecx ja 0x880ab jne 0x880a3 movl -0x44(%rbp), %r12d cmpq -0x60(%rbp), %rax ja 0x880ae imull -0x34(%rbp), %ecx addl %eax, %ecx movl %edi, %esi movl %ecx, %r12d movl %esi, -0x54(%rbp) movq %r14, %rdi leaq -0x30(%rbp), %rsi movq %rbx, %rdx movq %r13, %rcx callq *-0x68(%rbp) movl -0x54(%rbp), %esi movl %r12d, %ecx movl %esi, %edi testl %eax, %eax jg 0x88047 jmp 0x880db xorl %r12d, %r12d movq %r15, %rbx xorl %esi, %esi testl %eax, %eax je 0x8811c movl %esi, %edi movl %r12d, %ecx movq -0x40(%rbp), %rax testq %rax, %rax je 0x880f0 movq %rbx, (%rax) cmpq %r15, %rbx je 0x8810d testl %edi, %edi je 0x88137 movq -0x50(%rbp), %rax movl $0x22, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF jmp 0x88000 movq -0x50(%rbp), %rax movl $0x21, (%rax) jmp 0x87ffe movq -0x40(%rbp), %rax testq %rax, %rax je 0x88128 movq %rbx, (%rax) movq -0x50(%rbp), %rax movl $0x54, (%rax) jmp 0x87ffe movl %ecx, %ecx movq %rcx, %rax negq %rax cmpl $0x0, -0x38(%rbp) cmoveq %rcx, %rax jmp 0x88000
my_strntoul_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rbp+var_40], r8 mov [rbp+var_34], ecx mov r13, rdx mov r15, rsi mov r14, rdi mov rax, [rdi+0B8h] mov r12, [rax+28h] add r13, rsi mov [rbp+var_50], r9 mov dword ptr [r9], 0 lea rsi, [rbp+var_30] mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle short loc_87FDD mov [rbp+var_38], 0 lea rbx, [rbp+var_30] loc_87F95: mov rcx, [rbp+var_30] cmp rcx, 2Ah ; '*' jg short loc_87FAD cmp rcx, 9 jz short loc_87FC5 cmp rcx, 20h ; ' ' jz short loc_87FC5 jmp short loc_8800F loc_87FAD: cmp rcx, 2Bh ; '+' jz short loc_87FC5 cmp rcx, 2Dh ; '-' jnz short loc_8800F xor ecx, ecx cmp [rbp+var_38], 0 setz cl mov [rbp+var_38], ecx loc_87FC5: mov eax, eax add r15, rax mov rdi, r14 mov rsi, rbx mov rdx, r15 mov rcx, r13 call r12 test eax, eax jg short loc_87F95 loc_87FDD: mov rcx, [rbp+var_40] test rcx, rcx jz short loc_87FE9 mov [rcx], r15 loc_87FE9: test eax, eax mov eax, 54h ; 'T' mov ecx, 21h ; '!' cmovz ecx, eax mov rax, [rbp+var_50] mov [rax], ecx loc_87FFE: xor eax, eax loc_88000: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8800F: mov eax, 0FFFFFFFFh xor edx, edx div [rbp+var_34] mov ebx, edx mov [rbp+var_44], eax lea rsi, [rbp+var_30] mov rdi, r14 mov rdx, r15 mov rcx, r13 call r12 test eax, eax jle loc_880D3 mov [rbp+var_68], r12 mov ecx, ebx mov [rbp+var_60], rcx xor ecx, ecx mov rbx, r15 xor edi, edi loc_88047: mov rsi, rbx mov ebx, eax add rbx, rsi mov rsi, [rbp+var_30] lea rax, [rsi-30h] cmp rax, 9 ja short loc_88063 mov [rbp+var_30], rax jmp short loc_88088 loc_88063: lea rax, [rsi-41h] cmp rax, 19h ja short loc_88073 add rsi, 0FFFFFFFFFFFFFFC9h jmp short loc_88081 loc_88073: lea rax, [rsi-61h] cmp rax, 19h ja short loc_880E4 add rsi, 0FFFFFFFFFFFFFFA9h loc_88081: mov [rbp+var_30], rsi mov rax, rsi loc_88088: cmp eax, [rbp+var_34] jge short loc_880E4 mov esi, 1 cmp ecx, [rbp+var_44] ja short loc_880AB jnz short loc_880A3 mov r12d, [rbp+var_44] cmp rax, [rbp+var_60] ja short loc_880AE loc_880A3: imul ecx, [rbp+var_34] add ecx, eax mov esi, edi loc_880AB: mov r12d, ecx loc_880AE: mov [rbp+var_54], esi mov rdi, r14 lea rsi, [rbp+var_30] mov rdx, rbx mov rcx, r13 call [rbp+var_68] mov esi, [rbp+var_54] mov ecx, r12d mov edi, esi test eax, eax jg loc_88047 jmp short loc_880DB loc_880D3: xor r12d, r12d mov rbx, r15 xor esi, esi loc_880DB: test eax, eax jz short loc_8811C mov edi, esi mov ecx, r12d loc_880E4: mov rax, [rbp+var_40] test rax, rax jz short loc_880F0 mov [rax], rbx loc_880F0: cmp rbx, r15 jz short loc_8810D test edi, edi jz short loc_88137 mov rax, [rbp+var_50] mov dword ptr [rax], 22h ; '"' mov eax, 0FFFFFFFFh jmp loc_88000 loc_8810D: mov rax, [rbp+var_50] mov dword ptr [rax], 21h ; '!' jmp loc_87FFE loc_8811C: mov rax, [rbp+var_40] test rax, rax jz short loc_88128 mov [rax], rbx loc_88128: mov rax, [rbp+var_50] mov dword ptr [rax], 54h ; 'T' jmp loc_87FFE loc_88137: mov ecx, ecx mov rax, rcx neg rax cmp [rbp+var_38], 0 cmovz rax, rcx jmp loc_88000
long long my_strntoul_mb2_or_mb4(long long a1, long long a2, long long a3, unsigned int a4, _QWORD *a5, int *a6) { long long v6; // r15 long long ( *v8)(long long, _QWORD *, long long, long long); // r12 long long v9; // r13 int v10; // eax int v11; // ecx long long result; // rax int v13; // eax unsigned int v14; // ecx long long v15; // rbx int v16; // edi unsigned long long v17; // rax long long v18; // rsi int v19; // esi unsigned int v20; // r12d long long ( *v21)(long long, _QWORD *, long long, long long); // [rsp+8h] [rbp-68h] unsigned int v23; // [rsp+2Ch] [rbp-44h] BOOL v25; // [rsp+38h] [rbp-38h] _QWORD v27[6]; // [rsp+40h] [rbp-30h] BYREF v6 = a2; v8 = *(long long ( **)(long long, _QWORD *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); v9 = a2 + a3; *a6 = 0; v10 = v8(a1, v27, a2, a2 + a3); if ( v10 <= 0 ) { LABEL_11: if ( a5 ) *a5 = v6; v11 = 33; if ( !v10 ) v11 = 84; *a6 = v11; return 0LL; } v25 = 0; while ( 1 ) { if ( v27[0] > 42LL ) { if ( v27[0] != 43LL ) { if ( v27[0] != 45LL ) break; v25 = !v25; } goto LABEL_10; } if ( v27[0] != 9LL && v27[0] != 32LL ) break; LABEL_10: v6 += (unsigned int)v10; v10 = v8(a1, v27, v6, v9); if ( v10 <= 0 ) goto LABEL_11; } v23 = 0xFFFFFFFF / a4; v13 = v8(a1, v27, v6, v9); if ( v13 > 0 ) { v21 = v8; v14 = 0; v15 = v6; v16 = 0; while ( 1 ) { v15 += (unsigned int)v13; v17 = v27[0] - 48LL; if ( (unsigned long long)(v27[0] - 48LL) > 9 ) { if ( (unsigned long long)(v27[0] - 65LL) > 0x19 ) { if ( (unsigned long long)(v27[0] - 97LL) > 0x19 ) goto LABEL_37; v18 = v27[0] - 87LL; } else { v18 = v27[0] - 55LL; } v27[0] = v18; v17 = v18; } else { v27[0] -= 48LL; } if ( (int)v17 >= (int)a4 ) goto LABEL_37; v19 = 1; if ( v14 <= v23 ) { if ( v14 == v23 ) { v20 = 0xFFFFFFFF / a4; if ( v17 > 0xFFFFFFFF % a4 ) goto LABEL_32; } v14 = v17 + a4 * v14; v19 = v16; } v20 = v14; LABEL_32: v13 = v21(a1, v27, v15, v9); v14 = v20; v16 = v19; if ( v13 <= 0 ) goto LABEL_35; } } v20 = 0; v15 = v6; v19 = 0; LABEL_35: if ( !v13 ) { if ( a5 ) *a5 = v15; *a6 = 84; return 0LL; } v16 = v19; v14 = v20; LABEL_37: if ( a5 ) *a5 = v15; if ( v15 == v6 ) { *a6 = 33; return 0LL; } if ( v16 ) { *a6 = 34; return 0xFFFFFFFFLL; } else { result = -(long long)v14; if ( !v25 ) return v14; } return result; }
my_strntoul_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x40],R8 MOV dword ptr [RBP + -0x34],ECX MOV R13,RDX MOV R15,RSI MOV R14,RDI MOV RAX,qword ptr [RDI + 0xb8] MOV R12,qword ptr [RAX + 0x28] ADD R13,RSI MOV qword ptr [RBP + -0x50],R9 MOV dword ptr [R9],0x0 LEA RSI,[RBP + -0x30] MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x00187fdd MOV dword ptr [RBP + -0x38],0x0 LEA RBX,[RBP + -0x30] LAB_00187f95: MOV RCX,qword ptr [RBP + -0x30] CMP RCX,0x2a JG 0x00187fad CMP RCX,0x9 JZ 0x00187fc5 CMP RCX,0x20 JZ 0x00187fc5 JMP 0x0018800f LAB_00187fad: CMP RCX,0x2b JZ 0x00187fc5 CMP RCX,0x2d JNZ 0x0018800f XOR ECX,ECX CMP dword ptr [RBP + -0x38],0x0 SETZ CL MOV dword ptr [RBP + -0x38],ECX LAB_00187fc5: MOV EAX,EAX ADD R15,RAX MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JG 0x00187f95 LAB_00187fdd: MOV RCX,qword ptr [RBP + -0x40] TEST RCX,RCX JZ 0x00187fe9 MOV qword ptr [RCX],R15 LAB_00187fe9: TEST EAX,EAX MOV EAX,0x54 MOV ECX,0x21 CMOVZ ECX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],ECX LAB_00187ffe: XOR EAX,EAX LAB_00188000: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018800f: MOV EAX,0xffffffff XOR EDX,EDX DIV dword ptr [RBP + -0x34] MOV EBX,EDX MOV dword ptr [RBP + -0x44],EAX LEA RSI,[RBP + -0x30] MOV RDI,R14 MOV RDX,R15 MOV RCX,R13 CALL R12 TEST EAX,EAX JLE 0x001880d3 MOV qword ptr [RBP + -0x68],R12 MOV ECX,EBX MOV qword ptr [RBP + -0x60],RCX XOR ECX,ECX MOV RBX,R15 XOR EDI,EDI LAB_00188047: MOV RSI,RBX MOV EBX,EAX ADD RBX,RSI MOV RSI,qword ptr [RBP + -0x30] LEA RAX,[RSI + -0x30] CMP RAX,0x9 JA 0x00188063 MOV qword ptr [RBP + -0x30],RAX JMP 0x00188088 LAB_00188063: LEA RAX,[RSI + -0x41] CMP RAX,0x19 JA 0x00188073 ADD RSI,-0x37 JMP 0x00188081 LAB_00188073: LEA RAX,[RSI + -0x61] CMP RAX,0x19 JA 0x001880e4 ADD RSI,-0x57 LAB_00188081: MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI LAB_00188088: CMP EAX,dword ptr [RBP + -0x34] JGE 0x001880e4 MOV ESI,0x1 CMP ECX,dword ptr [RBP + -0x44] JA 0x001880ab JNZ 0x001880a3 MOV R12D,dword ptr [RBP + -0x44] CMP RAX,qword ptr [RBP + -0x60] JA 0x001880ae LAB_001880a3: IMUL ECX,dword ptr [RBP + -0x34] ADD ECX,EAX MOV ESI,EDI LAB_001880ab: MOV R12D,ECX LAB_001880ae: MOV dword ptr [RBP + -0x54],ESI MOV RDI,R14 LEA RSI,[RBP + -0x30] MOV RDX,RBX MOV RCX,R13 CALL qword ptr [RBP + -0x68] MOV ESI,dword ptr [RBP + -0x54] MOV ECX,R12D MOV EDI,ESI TEST EAX,EAX JG 0x00188047 JMP 0x001880db LAB_001880d3: XOR R12D,R12D MOV RBX,R15 XOR ESI,ESI LAB_001880db: TEST EAX,EAX JZ 0x0018811c MOV EDI,ESI MOV ECX,R12D LAB_001880e4: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x001880f0 MOV qword ptr [RAX],RBX LAB_001880f0: CMP RBX,R15 JZ 0x0018810d TEST EDI,EDI JZ 0x00188137 MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x22 MOV EAX,0xffffffff JMP 0x00188000 LAB_0018810d: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x21 JMP 0x00187ffe LAB_0018811c: MOV RAX,qword ptr [RBP + -0x40] TEST RAX,RAX JZ 0x00188128 MOV qword ptr [RAX],RBX LAB_00188128: MOV RAX,qword ptr [RBP + -0x50] MOV dword ptr [RAX],0x54 JMP 0x00187ffe LAB_00188137: MOV ECX,ECX MOV RAX,RCX NEG RAX CMP dword ptr [RBP + -0x38],0x0 CMOVZ RAX,RCX JMP 0x00188000
ulong my_strntoul_mb2_or_mb4 (long param_1,long param_2,long param_3,uint param_4,long *param_5, int4 *param_6) { code *pcVar1; bool bVar2; bool bVar3; bool bVar4; uint uVar5; uint uVar6; int4 uVar7; uint uVar8; long lVar9; ulong uVar10; ulong local_38; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); param_3 = param_3 + param_2; *param_6 = 0; uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3); if (0 < (int)uVar5) { bVar2 = false; do { if ((long)local_38 < 0x2b) { if ((local_38 != 9) && (local_38 != 0x20)) { LAB_0018800f: uVar5 = (uint)(0xffffffff / (ulong)param_4); uVar6 = (*pcVar1)(param_1,&local_38,param_2,param_3); lVar9 = param_2; if ((int)uVar6 < 1) { uVar8 = 0; bVar3 = false; goto LAB_001880db; } uVar8 = 0; bVar3 = false; goto LAB_00188047; } } else if (local_38 != 0x2b) { if (local_38 != 0x2d) goto LAB_0018800f; bVar2 = !bVar2; } param_2 = param_2 + (ulong)uVar5; uVar5 = (*pcVar1)(param_1,&local_38,param_2,param_3); } while (0 < (int)uVar5); } if (param_5 != (long *)0x0) { *param_5 = param_2; } uVar7 = 0x21; if (uVar5 == 0) { uVar7 = 0x54; } *param_6 = uVar7; return 0; while( true ) { if ((int)param_4 <= (int)uVar10) goto LAB_001880e4; uVar6 = uVar8; bVar4 = true; if ((uVar8 <= uVar5) && ((uVar8 != uVar5 || (uVar6 = uVar5, uVar10 <= 0xffffffffU % (ulong)param_4)))) { uVar6 = uVar8 * param_4 + (int)uVar10; bVar4 = bVar3; } bVar3 = bVar4; uVar8 = uVar6; local_38 = uVar10; uVar6 = (*pcVar1)(param_1,&local_38,lVar9,param_3); if ((int)uVar6 < 1) break; LAB_00188047: lVar9 = (ulong)uVar6 + lVar9; uVar10 = local_38 - 0x30; if (9 < uVar10) { if (local_38 - 0x41 < 0x1a) { uVar10 = local_38 - 0x37; } else { if (0x19 < local_38 - 0x61) goto LAB_001880e4; uVar10 = local_38 - 0x57; } } } LAB_001880db: if (uVar6 == 0) { if (param_5 != (long *)0x0) { *param_5 = lVar9; } *param_6 = 0x54; } else { LAB_001880e4: if (param_5 != (long *)0x0) { *param_5 = lVar9; } if (lVar9 != param_2) { if (bVar3) { *param_6 = 0x22; return 0xffffffff; } if (!bVar2) { return (ulong)uVar8; } return -(ulong)uVar8; } *param_6 = 0x21; } return 0; }
46,840
mariadb_get_charset_info
eloqsql/libmariadb/libmariadb/mariadb_lib.c
static void mariadb_get_charset_info(MYSQL *mysql, MY_CHARSET_INFO *cs) { if (!cs) return; cs->number= mysql->charset->nr; cs->csname= mysql->charset->csname; cs->name= mysql->charset->name; cs->state= 0; cs->comment= NULL; cs->dir= NULL; cs->mbminlen= mysql->charset->char_minlen; cs->mbmaxlen= mysql->charset->char_maxlen; return; }
O0
c
mariadb_get_charset_info: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x3c5d8 jmp 0x3c666 movq -0x8(%rbp), %rax movq 0x2f0(%rax), %rax movl (%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movq -0x8(%rbp), %rax movq 0x2f0(%rax), %rax movq 0x8(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x8(%rbp), %rax movq 0x2f0(%rax), %rax movq 0x10(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x4(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x18(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x8(%rbp), %rax movq 0x2f0(%rax), %rax movl 0x30(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x28(%rax) movq -0x8(%rbp), %rax movq 0x2f0(%rax), %rax movl 0x34(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x2c(%rax) popq %rbp retq nopl (%rax,%rax)
mariadb_get_charset_info: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi cmp [rbp+var_10], 0 jnz short loc_3C5D8 jmp loc_3C666 loc_3C5D8: mov rax, [rbp+var_8] mov rax, [rax+2F0h] mov ecx, [rax] mov rax, [rbp+var_10] mov [rax], ecx mov rax, [rbp+var_8] mov rax, [rax+2F0h] mov rcx, [rax+8] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_8] mov rax, [rax+2F0h] mov rcx, [rax+10h] mov rax, [rbp+var_10] mov [rax+10h], rcx mov rax, [rbp+var_10] mov dword ptr [rax+4], 0 mov rax, [rbp+var_10] mov qword ptr [rax+18h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+20h], 0 mov rax, [rbp+var_8] mov rax, [rax+2F0h] mov ecx, [rax+30h] mov rax, [rbp+var_10] mov [rax+28h], ecx mov rax, [rbp+var_8] mov rax, [rax+2F0h] mov ecx, [rax+34h] mov rax, [rbp+var_10] mov [rax+2Ch], ecx loc_3C666: pop rbp retn
long long mariadb_get_charset_info(long long a1, long long a2) { long long result; // rax if ( a2 ) { *(_DWORD *)a2 = **(_DWORD **)(a1 + 752); *(_QWORD *)(a2 + 8) = *(_QWORD *)(*(_QWORD *)(a1 + 752) + 8LL); *(_QWORD *)(a2 + 16) = *(_QWORD *)(*(_QWORD *)(a1 + 752) + 16LL); *(_DWORD *)(a2 + 4) = 0; *(_QWORD *)(a2 + 24) = 0LL; *(_QWORD *)(a2 + 32) = 0LL; *(_DWORD *)(a2 + 40) = *(_DWORD *)(*(_QWORD *)(a1 + 752) + 48LL); result = a2; *(_DWORD *)(a2 + 44) = *(_DWORD *)(*(_QWORD *)(a1 + 752) + 52LL); } return result; }
mariadb_get_charset_info: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI CMP qword ptr [RBP + -0x10],0x0 JNZ 0x0013c5d8 JMP 0x0013c666 LAB_0013c5d8: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2f0] MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2f0] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2f0] MOV RCX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2f0] MOV ECX,dword ptr [RAX + 0x30] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x2f0] MOV ECX,dword ptr [RAX + 0x34] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x2c],ECX LAB_0013c666: POP RBP RET
void mariadb_get_charset_info(long param_1,int4 *param_2) { if (param_2 != (int4 *)0x0) { *param_2 = **(int4 **)(param_1 + 0x2f0); *(int8 *)(param_2 + 2) = *(int8 *)(*(long *)(param_1 + 0x2f0) + 8); *(int8 *)(param_2 + 4) = *(int8 *)(*(long *)(param_1 + 0x2f0) + 0x10); param_2[1] = 0; *(int8 *)(param_2 + 6) = 0; *(int8 *)(param_2 + 8) = 0; param_2[10] = *(int4 *)(*(long *)(param_1 + 0x2f0) + 0x30); param_2[0xb] = *(int4 *)(*(long *)(param_1 + 0x2f0) + 0x34); } return; }
46,841
glfwPlatformSetWindowTitle
untodesu[P]riteg/build_O3/_deps/glfw-src/src/x11_window.c
void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title) { #if defined(X_HAVE_UTF8_STRING) Xutf8SetWMProperties(_glfw.x11.display, window->x11.handle, title, title, NULL, 0, NULL, NULL, NULL); #else // This may be a slightly better fallback than using XStoreName and // XSetIconName, which always store their arguments using STRING XmbSetWMProperties(_glfw.x11.display, window->x11.handle, title, title, NULL, 0, NULL, NULL, NULL); #endif XChangeProperty(_glfw.x11.display, window->x11.handle, _glfw.x11.NET_WM_NAME, _glfw.x11.UTF8_STRING, 8, PropModeReplace, (unsigned char*) title, strlen(title)); XChangeProperty(_glfw.x11.display, window->x11.handle, _glfw.x11.NET_WM_ICON_NAME, _glfw.x11.UTF8_STRING, 8, PropModeReplace, (unsigned char*) title, strlen(title)); XFlush(_glfw.x11.display); }
O3
c
glfwPlatformSetWindowTitle: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 leaq 0x85c6e(%rip), %r15 # 0xa8638 movq 0x1fec0(%r15), %rdi movq 0x348(%r14), %rsi subq $0x20, %rsp xorps %xmm0, %xmm0 movups %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movq %rbx, %rdx movq %rbx, %rcx xorl %r8d, %r8d xorl %r9d, %r9d callq 0xc260 addq $0x20, %rsp movq %r15, %rax movq 0x1fec0(%r15), %r15 movq 0x348(%r14), %r12 movq 0x20408(%rax), %r13 movq 0x20550(%rax), %rbp movq %rbx, %rdi callq 0xc3a0 movq %r15, %rdi movq %r12, %rsi movq %r13, %rdx movq %rbp, %rcx movl $0x8, %r8d xorl %r9d, %r9d pushq %rax pushq %rbx callq 0xc720 addq $0x10, %rsp leaq 0x85be9(%rip), %rax # 0xa8638 movq 0x1fec0(%rax), %r15 movq 0x348(%r14), %r14 movq 0x20410(%rax), %r12 movq 0x20550(%rax), %r13 movq %rax, %rbp movq %rbx, %rdi callq 0xc3a0 movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx movq %r13, %rcx movl $0x8, %r8d xorl %r9d, %r9d pushq %rax pushq %rbx callq 0xc720 addq $0x10, %rsp movq 0x1fec0(%rbp), %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xcce0
_glfwPlatformSetWindowTitle: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi mov r14, rdi lea r15, _glfw mov rdi, [r15+1FEC0h] mov rsi, [r14+348h] sub rsp, 20h xorps xmm0, xmm0 movups [rsp+58h+var_58], xmm0 mov [rsp+58h+var_48], 0 mov rdx, rbx mov rcx, rbx xor r8d, r8d xor r9d, r9d call _Xutf8SetWMProperties add rsp, 20h mov rax, r15 mov r15, [r15+1FEC0h] mov r12, [r14+348h] mov r13, [rax+20408h] mov rbp, [rax+20550h] mov rdi, rbx call _strlen mov rdi, r15 mov rsi, r12 mov rdx, r13 mov rcx, rbp mov r8d, 8 xor r9d, r9d push rax push rbx call _XChangeProperty add rsp, 10h lea rax, _glfw mov r15, [rax+1FEC0h] mov r14, [r14+348h] mov r12, [rax+20410h] mov r13, [rax+20550h] mov rbp, rax mov rdi, rbx call _strlen mov rdi, r15 mov rsi, r14 mov rdx, r12 mov rcx, r13 mov r8d, 8 xor r9d, r9d push rax push rbx call _XChangeProperty add rsp, 10h mov rdi, [rbp+1FEC0h] add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _XFlush
long long glfwPlatformSetWindowTitle(long long a1, long long a2) { long long v2; // r15 long long v3; // r12 long long v4; // r13 long long v5; // rbp long long v6; // rax long long v7; // r15 long long v8; // r14 long long v9; // r12 long long v10; // r13 long long v11; // rax Xutf8SetWMProperties(*(_QWORD *)&glfw[32688], *(_QWORD *)(a1 + 840), a2, a2, 0LL, 0LL, 0LL, 0LL, 0LL); v2 = *(_QWORD *)&glfw[32688]; v3 = *(_QWORD *)(a1 + 840); v4 = *(_QWORD *)&glfw[33026]; v5 = *(_QWORD *)&glfw[33108]; v6 = strlen(a2); XChangeProperty(v2, v3, v4, v5, 8LL, 0LL, a2, v6); v7 = *(_QWORD *)&glfw[32688]; v8 = *(_QWORD *)(a1 + 840); v9 = *(_QWORD *)&glfw[33028]; v10 = *(_QWORD *)&glfw[33108]; v11 = strlen(a2); XChangeProperty(v7, v8, v9, v10, 8LL, 0LL, a2, v11); return XFlush(*(_QWORD *)&glfw[32688]); }
_glfwPlatformSetWindowTitle: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI LEA R15,[0x1a8638] MOV RDI,qword ptr [R15 + 0x1fec0] MOV RSI,qword ptr [R14 + 0x348] SUB RSP,0x20 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 MOV RDX,RBX MOV RCX,RBX XOR R8D,R8D XOR R9D,R9D CALL 0x0010c260 ADD RSP,0x20 MOV RAX,R15 MOV R15,qword ptr [R15 + 0x1fec0] MOV R12,qword ptr [R14 + 0x348] MOV R13,qword ptr [RAX + 0x20408] MOV RBP,qword ptr [RAX + 0x20550] MOV RDI,RBX CALL 0x0010c3a0 MOV RDI,R15 MOV RSI,R12 MOV RDX,R13 MOV RCX,RBP MOV R8D,0x8 XOR R9D,R9D PUSH RAX PUSH RBX CALL 0x0010c720 ADD RSP,0x10 LEA RAX,[0x1a8638] MOV R15,qword ptr [RAX + 0x1fec0] MOV R14,qword ptr [R14 + 0x348] MOV R12,qword ptr [RAX + 0x20410] MOV R13,qword ptr [RAX + 0x20550] MOV RBP,RAX MOV RDI,RBX CALL 0x0010c3a0 MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 MOV RCX,R13 MOV R8D,0x8 XOR R9D,R9D PUSH RAX PUSH RBX CALL 0x0010c720 ADD RSP,0x10 MOV RDI,qword ptr [RBP + 0x1fec0] ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0010cce0
void _glfwPlatformSetWindowTitle(long param_1,char *param_2) { int8 uVar1; int8 uVar2; int8 uVar3; int8 uVar4; size_t sVar5; Xutf8SetWMProperties(DAT_001c84f8,*(int8 *)(param_1 + 0x348),param_2,param_2,0,0,0,0,0); uVar4 = DAT_001c8b88; uVar3 = DAT_001c8a40; uVar2 = DAT_001c84f8; uVar1 = *(int8 *)(param_1 + 0x348); sVar5 = strlen(param_2); XChangeProperty(uVar2,uVar1,uVar3,uVar4,8,0,param_2,sVar5); uVar4 = DAT_001c8b88; uVar3 = DAT_001c8a48; uVar2 = DAT_001c84f8; uVar1 = *(int8 *)(param_1 + 0x348); sVar5 = strlen(param_2); XChangeProperty(uVar2,uVar1,uVar3,uVar4,8,0,param_2,sVar5); XFlush(DAT_001c84f8); return; }
46,842
intern_filename
eloqsql/mysys/mf_pack.c
char *intern_filename(char *to, const char *from) { size_t length, to_length; char buff[FN_REFLEN + 1]; if (from == to) { /* Dirname may destroy from */ (void) strnmov(buff, from, FN_REFLEN); from=buff; } length= dirname_part(to, from, &to_length); /* Copy dirname & fix chars */ (void) strnmov(to + to_length, from + length, FN_REFLEN - to_length); return (to); }
O0
c
intern_filename: pushq %rbp movq %rsp, %rbp subq $0x240, %rsp # imm = 0x240 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x218(%rbp) movq %rsi, -0x220(%rbp) movq -0x220(%rbp), %rax cmpq -0x218(%rbp), %rax jne 0x2dbac leaq -0x210(%rbp), %rdi movq -0x220(%rbp), %rsi movl $0x200, %edx # imm = 0x200 callq 0x77560 leaq -0x210(%rbp), %rax movq %rax, -0x220(%rbp) movq -0x218(%rbp), %rdi movq -0x220(%rbp), %rsi leaq -0x230(%rbp), %rdx callq 0x2d680 movq %rax, -0x228(%rbp) movq -0x218(%rbp), %rdi movq -0x230(%rbp), %rax addq %rax, %rdi movq -0x220(%rbp), %rsi movq -0x228(%rbp), %rcx addq %rcx, %rsi movl $0x200, %edx # imm = 0x200 subq %rax, %rdx callq 0x77560 movq -0x218(%rbp), %rax movq %rax, -0x238(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2dc2c movq -0x238(%rbp), %rax addq $0x240, %rsp # imm = 0x240 popq %rbp retq callq 0x24320 nopw %cs:(%rax,%rax)
intern_filename: push rbp mov rbp, rsp sub rsp, 240h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_218], rdi mov [rbp+var_220], rsi mov rax, [rbp+var_220] cmp rax, [rbp+var_218] jnz short loc_2DBAC lea rdi, [rbp+var_210] mov rsi, [rbp+var_220] mov edx, 200h call strnmov lea rax, [rbp+var_210] mov [rbp+var_220], rax loc_2DBAC: mov rdi, [rbp+var_218] mov rsi, [rbp+var_220] lea rdx, [rbp+var_230] call dirname_part mov [rbp+var_228], rax mov rdi, [rbp+var_218] mov rax, [rbp+var_230] add rdi, rax mov rsi, [rbp+var_220] mov rcx, [rbp+var_228] add rsi, rcx mov edx, 200h sub rdx, rax call strnmov mov rax, [rbp+var_218] mov [rbp+var_238], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2DC2C mov rax, [rbp+var_238] add rsp, 240h pop rbp retn loc_2DC2C: call ___stack_chk_fail
long long intern_filename(long long a1, _BYTE *a2) { long long v3; // [rsp+10h] [rbp-230h] BYREF long long v4; // [rsp+18h] [rbp-228h] _BYTE *v5; // [rsp+20h] [rbp-220h] long long v6; // [rsp+28h] [rbp-218h] _BYTE v7[520]; // [rsp+30h] [rbp-210h] BYREF unsigned long long v8; // [rsp+238h] [rbp-8h] v8 = __readfsqword(0x28u); v6 = a1; v5 = a2; if ( a2 == (_BYTE *)a1 ) { strnmov(v7, v5, 512LL); v5 = v7; } v4 = dirname_part(v6, v5, &v3); strnmov(v3 + v6, &v5[v4], 512 - v3); return v6; }
intern_filename: PUSH RBP MOV RBP,RSP SUB RSP,0x240 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x218],RDI MOV qword ptr [RBP + -0x220],RSI MOV RAX,qword ptr [RBP + -0x220] CMP RAX,qword ptr [RBP + -0x218] JNZ 0x0012dbac LEA RDI,[RBP + -0x210] MOV RSI,qword ptr [RBP + -0x220] MOV EDX,0x200 CALL 0x00177560 LEA RAX,[RBP + -0x210] MOV qword ptr [RBP + -0x220],RAX LAB_0012dbac: MOV RDI,qword ptr [RBP + -0x218] MOV RSI,qword ptr [RBP + -0x220] LEA RDX,[RBP + -0x230] CALL 0x0012d680 MOV qword ptr [RBP + -0x228],RAX MOV RDI,qword ptr [RBP + -0x218] MOV RAX,qword ptr [RBP + -0x230] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x220] MOV RCX,qword ptr [RBP + -0x228] ADD RSI,RCX MOV EDX,0x200 SUB RDX,RAX CALL 0x00177560 MOV RAX,qword ptr [RBP + -0x218] MOV qword ptr [RBP + -0x238],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012dc2c MOV RAX,qword ptr [RBP + -0x238] ADD RSP,0x240 POP RBP RET LAB_0012dc2c: CALL 0x00124320
int1 * intern_filename(int1 *param_1,int1 *param_2) { long in_FS_OFFSET; long local_238; long local_230; int1 *local_228; int1 *local_220; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_228 = param_2; local_220 = param_1; if (param_2 == param_1) { strnmov(local_218,param_2,0x200); local_228 = local_218; } local_230 = dirname_part(local_220,local_228,&local_238); strnmov(local_220 + local_238,local_228 + local_230,0x200 - local_238); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_220; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
46,843
add_compiled_collation
eloqsql/mysys/charset.c
void add_compiled_collation(struct charset_info_st *cs) { DBUG_ASSERT(cs->number < array_elements(all_charsets)); all_charsets[cs->number]= cs; cs->state|= MY_CS_AVAILABLE; if ((my_hash_insert(&charset_name_hash, (uchar*) cs))) { #ifndef DBUG_OFF CHARSET_INFO *org= (CHARSET_INFO*) my_hash_search(&charset_name_hash, (uchar*) cs->cs_name.str, cs->cs_name.length); DBUG_ASSERT(org); DBUG_ASSERT(org->cs_name.str == cs->cs_name.str); DBUG_ASSERT(org->cs_name.length == strlen(cs->cs_name.str)); #endif } }
O3
c
add_compiled_collation: pushq %rbp movq %rsp, %rbp movq %rdi, %rsi movl (%rdi), %eax leaq 0x3429df(%rip), %rcx # 0x36e4c0 movq %rdi, (%rcx,%rax,8) orb $0x2, 0xd(%rdi) leaq 0x3469d0(%rip), %rdi # 0x3724c0 popq %rbp jmp 0x2e126
add_compiled_collation: push rbp mov rbp, rsp mov rsi, rdi mov eax, [rdi] lea rcx, all_charsets mov [rcx+rax*8], rdi or byte ptr [rdi+0Dh], 2 lea rdi, charset_name_hash pop rbp jmp my_hash_insert
long long add_compiled_collation(unsigned int *a1) { all_charsets[*a1] = a1; *((_BYTE *)a1 + 13) |= 2u; return my_hash_insert(&charset_name_hash, a1); }
add_compiled_collation: PUSH RBP MOV RBP,RSP MOV RSI,RDI MOV EAX,dword ptr [RDI] LEA RCX,[0x46e4c0] MOV qword ptr [RCX + RAX*0x8],RDI OR byte ptr [RDI + 0xd],0x2 LEA RDI,[0x4724c0] POP RBP JMP 0x0012e126
void add_compiled_collation(uint *param_1) { (&all_charsets)[*param_1] = param_1; *(byte *)((long)param_1 + 0xd) = *(byte *)((long)param_1 + 0xd) | 2; my_hash_insert(charset_name_hash,param_1); return; }
46,844
coro::net::socket::shutdown(coro::poll_op)
AlayaLite/build_O3/_deps/libcoro-src/src/net/socket.cpp
auto socket::shutdown(poll_op how) -> bool { if (m_fd != -1) { int h{0}; switch (how) { case poll_op::read: h = SHUT_RD; break; case poll_op::write: h = SHUT_WR; break; case poll_op::read_write: h = SHUT_RDWR; break; } return (::shutdown(m_fd, h) == 0); } return false; }
O3
cpp
coro::net::socket::shutdown(coro::poll_op): movl (%rdi), %edi cmpl $-0x1, %edi je 0x8536 pushq %rax xorl %eax, %eax cmpq $0x4, %rsi sete %al cmpq $0x5, %rsi movl $0x2, %esi cmovnel %eax, %esi callq 0x3340 testl %eax, %eax sete %al addq $0x8, %rsp retq xorl %eax, %eax retq
_ZN4coro3net6socket8shutdownENS_7poll_opE: mov edi, [rdi] cmp edi, 0FFFFFFFFh jz short loc_8536 push rax xor eax, eax cmp rsi, 4 setz al cmp rsi, 5 mov esi, 2 cmovnz esi, eax call _shutdown test eax, eax setz al add rsp, 8 retn loc_8536: xor eax, eax retn
bool coro::net::socket::shutdown(unsigned int *a1, long long a2) { long long v2; // rdi BOOL v3; // eax bool v4; // zf long long v5; // rsi v2 = *a1; if ( (_DWORD)v2 == -1 ) return 0; v3 = a2 == 4; v4 = a2 == 5; v5 = 2LL; if ( !v4 ) v5 = v3; return (unsigned int)shutdown(v2, v5) == 0; }
shutdown: MOV EDI,dword ptr [RDI] CMP EDI,-0x1 JZ 0x00108536 PUSH RAX XOR EAX,EAX CMP RSI,0x4 SETZ AL CMP RSI,0x5 MOV ESI,0x2 CMOVNZ ESI,EAX CALL 0x00103340 TEST EAX,EAX SETZ AL ADD RSP,0x8 RET LAB_00108536: XOR EAX,EAX RET
/* coro::net::socket::shutdown(coro::poll_op) */ int8 __thiscall coro::net::socket::shutdown(socket *this,long param_2) { int iVar1; int4 extraout_var; uint __how; if (*(int *)this != -1) { __how = 2; if (param_2 != 5) { __how = (uint)(param_2 == 4); } iVar1 = ::shutdown(*(int *)this,__how); return CONCAT71((int7)(CONCAT44(extraout_var,iVar1) >> 8),iVar1 == 0); } return 0; }
46,845
my_strxfrm_pad_nweights_unicode
eloqsql/strings/ctype-utf8.c
size_t my_strxfrm_pad_nweights_unicode(uchar *str, uchar *strend, size_t nweights) { uchar *str0; DBUG_ASSERT(str && str <= strend); for (str0= str; str < strend && nweights; nweights--) { *str++= 0x00; if (str < strend) *str++= 0x20; } return str - str0; }
O0
c
my_strxfrm_pad_nweights_unicode: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) jmp 0x6a842 movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rcx xorl %eax, %eax cmpq -0x10(%rbp), %rcx movb %al, -0x21(%rbp) jae 0x6a864 cmpq $0x0, -0x18(%rbp) setne %al movb %al, -0x21(%rbp) movb -0x21(%rbp), %al testb $0x1, %al jne 0x6a86d jmp 0x6a8ab movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb $0x0, (%rax) movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0x6a89b movq -0x8(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x8(%rbp) movb $0x20, (%rax) jmp 0x6a89d movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0x6a84a movq -0x8(%rbp), %rax movq -0x20(%rbp), %rcx subq %rcx, %rax popq %rbp retq nopl (%rax,%rax)
my_strxfrm_pad_nweights_unicode: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx jmp short $+2 loc_6A842: mov rax, [rbp+var_8] mov [rbp+var_20], rax loc_6A84A: mov rcx, [rbp+var_8] xor eax, eax cmp rcx, [rbp+var_10] mov [rbp+var_21], al jnb short loc_6A864 cmp [rbp+var_18], 0 setnz al mov [rbp+var_21], al loc_6A864: mov al, [rbp+var_21] test al, 1 jnz short loc_6A86D jmp short loc_6A8AB loc_6A86D: mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_6A89B mov rax, [rbp+var_8] mov rcx, rax add rcx, 1 mov [rbp+var_8], rcx mov byte ptr [rax], 20h ; ' ' loc_6A89B: jmp short $+2 loc_6A89D: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_6A84A loc_6A8AB: mov rax, [rbp+var_8] mov rcx, [rbp+var_20] sub rax, rcx pop rbp retn
_BYTE * my_strxfrm_pad_nweights_unicode(_BYTE *a1, unsigned long long a2, long long a3) { _BYTE *v3; // rax _BYTE *v4; // rax bool v6; // [rsp+1h] [rbp-21h] _BYTE *v8; // [rsp+1Ah] [rbp-8h] v8 = a1; while ( 1 ) { v6 = 0; if ( (unsigned long long)v8 < a2 ) v6 = a3 != 0; if ( !v6 ) break; v3 = v8++; *v3 = 0; if ( (unsigned long long)v8 < a2 ) { v4 = v8++; *v4 = 32; } --a3; } return (_BYTE *)(v8 - a1); }
my_strxfrm_pad_nweights_unicode: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX JMP 0x0016a842 LAB_0016a842: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX LAB_0016a84a: MOV RCX,qword ptr [RBP + -0x8] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x10] MOV byte ptr [RBP + -0x21],AL JNC 0x0016a864 CMP qword ptr [RBP + -0x18],0x0 SETNZ AL MOV byte ptr [RBP + -0x21],AL LAB_0016a864: MOV AL,byte ptr [RBP + -0x21] TEST AL,0x1 JNZ 0x0016a86d JMP 0x0016a8ab LAB_0016a86d: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x0016a89b MOV RAX,qword ptr [RBP + -0x8] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x8],RCX MOV byte ptr [RAX],0x20 LAB_0016a89b: JMP 0x0016a89d LAB_0016a89d: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x0016a84a LAB_0016a8ab: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x20] SUB RAX,RCX POP RBP RET
long my_strxfrm_pad_nweights_unicode(int1 *param_1,int1 *param_2,long param_3) { int1 *puVar1; long local_20; int1 *local_10; local_10 = param_1; for (local_20 = param_3; local_10 < param_2 && local_20 != 0; local_20 = local_20 + -1) { puVar1 = local_10 + 1; *local_10 = 0; if (puVar1 < param_2) { *puVar1 = 0x20; puVar1 = local_10 + 2; } local_10 = puVar1; } return (long)local_10 - (long)param_1; }
46,846
google::protobuf::io::CopyingInputStreamAdaptor::BackUp(int)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
void CopyingInputStreamAdaptor::BackUp(int count) { GOOGLE_CHECK(backup_bytes_ == 0 && buffer_.get() != NULL) << " BackUp() can only be called after Next()."; GOOGLE_CHECK_LE(count, buffer_used_) << " Can't back up over more bytes than were returned by the last call" " to Next()."; GOOGLE_CHECK_GE(count, 0) << " Parameter to BackUp() can't be negative."; backup_bytes_ = count; }
O0
cpp
google::protobuf::io::CopyingInputStreamAdaptor::BackUp(int): subq $0x138, %rsp # imm = 0x138 movq %rdi, 0x130(%rsp) movl %esi, 0x12c(%rsp) movq 0x130(%rsp), %rax movq %rax, 0x50(%rsp) movl 0x30(%rax), %eax movb $0x0, 0xef(%rsp) cmpl $0x0, %eax jne 0x1f1359 movq 0x50(%rsp), %rdi addq $0x20, %rdi callq 0x1f2330 cmpq $0x0, %rax je 0x1f1359 jmp 0x1f13ca leaq 0x20ab70(%rip), %rdx # 0x3fbed0 leaq 0xf0(%rsp), %rdi movq %rdi, 0x40(%rsp) movl $0x3, %esi movl $0xf7, %ecx callq 0x219560 movq 0x40(%rsp), %rdi movb $0x1, 0xef(%rsp) leaq 0x20ad09(%rip), %rsi # 0x3fc099 callq 0x218e20 movq %rax, 0x48(%rsp) jmp 0x1f139c movq 0x48(%rsp), %rdi leaq 0x20ad2d(%rip), %rsi # 0x3fc0d5 callq 0x218e20 movq %rax, 0x38(%rsp) jmp 0x1f13b4 movq 0x38(%rsp), %rsi leaq 0xdb(%rsp), %rdi callq 0x218fd0 jmp 0x1f13c8 jmp 0x1f13ca testb $0x1, 0xef(%rsp) jne 0x1f13d6 jmp 0x1f13e3 leaq 0xf0(%rsp), %rdi callq 0x2195a0 movq 0x50(%rsp), %rcx movl 0x12c(%rsp), %eax movl 0x2c(%rcx), %ecx movb $0x0, 0x9f(%rsp) cmpl %ecx, %eax jg 0x1f1400 jmp 0x1f1471 leaq 0x20aac9(%rip), %rdx # 0x3fbed0 leaq 0xa0(%rsp), %rdi movq %rdi, 0x28(%rsp) movl $0x3, %esi movl $0xf9, %ecx callq 0x219560 movq 0x28(%rsp), %rdi movb $0x1, 0x9f(%rsp) leaq 0x20acc9(%rip), %rsi # 0x3fc100 callq 0x218e20 movq %rax, 0x30(%rsp) jmp 0x1f1443 movq 0x30(%rsp), %rdi leaq 0x20acdb(%rip), %rsi # 0x3fc12a callq 0x218e20 movq %rax, 0x20(%rsp) jmp 0x1f145b movq 0x20(%rsp), %rsi leaq 0x9e(%rsp), %rdi callq 0x218fd0 jmp 0x1f146f jmp 0x1f1471 testb $0x1, 0x9f(%rsp) jne 0x1f147d jmp 0x1f148a leaq 0xa0(%rsp), %rdi callq 0x2195a0 movl 0x12c(%rsp), %eax movb $0x0, 0x5f(%rsp) cmpl $0x0, %eax jl 0x1f149d jmp 0x1f1505 leaq 0x20aa2c(%rip), %rdx # 0x3fbed0 leaq 0x60(%rsp), %rdi movq %rdi, 0x10(%rsp) movl $0x3, %esi movl $0xfc, %ecx callq 0x219560 movq 0x10(%rsp), %rdi movb $0x1, 0x5f(%rsp) leaq 0x20ab10(%rip), %rsi # 0x3fbfde callq 0x218e20 movq %rax, 0x18(%rsp) jmp 0x1f14da movq 0x18(%rsp), %rdi leaq 0x20ac92(%rip), %rsi # 0x3fc178 callq 0x218e20 movq %rax, 0x8(%rsp) jmp 0x1f14f2 movq 0x8(%rsp), %rsi leaq 0x5e(%rsp), %rdi callq 0x218fd0 jmp 0x1f1503 jmp 0x1f1505 testb $0x1, 0x5f(%rsp) jne 0x1f150e jmp 0x1f1518 leaq 0x60(%rsp), %rdi callq 0x2195a0 movq 0x50(%rsp), %rax movl 0x12c(%rsp), %ecx movl %ecx, 0x30(%rax) addq $0x138, %rsp # imm = 0x138 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) testb $0x1, 0xef(%rsp) jne 0x1f154f jmp 0x1f155c leaq 0xf0(%rsp), %rdi callq 0x2195a0 jmp 0x1f15b6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) testb $0x1, 0x9f(%rsp) jne 0x1f157e jmp 0x1f158b leaq 0xa0(%rsp), %rdi callq 0x2195a0 jmp 0x1f15b6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xe0(%rsp) movl %eax, 0xdc(%rsp) testb $0x1, 0x5f(%rsp) jne 0x1f15aa jmp 0x1f15b4 leaq 0x60(%rsp), %rdi callq 0x2195a0 jmp 0x1f15b6 movq 0xe0(%rsp), %rdi callq 0x21700 nopw %cs:(%rax,%rax)
_ZN6google8protobuf2io25CopyingInputStreamAdaptor6BackUpEi: sub rsp, 138h mov [rsp+138h+var_8], rdi mov [rsp+138h+var_C], esi mov rax, [rsp+138h+var_8] mov [rsp+138h+var_E8], rax mov eax, [rax+30h] mov [rsp+138h+var_49], 0 cmp eax, 0 jnz short loc_1F1359 mov rdi, [rsp+138h+var_E8] add rdi, 20h ; ' ' call _ZNKSt10unique_ptrIA_hSt14default_deleteIS0_EE3getEv; std::unique_ptr<uchar []>::get(void) cmp rax, 0 jz short loc_1F1359 jmp short loc_1F13CA loc_1F1359: lea rdx, aWorkspaceLlm4b_66; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+138h+var_48] mov [rsp+138h+var_F8], rdi mov esi, 3 mov ecx, 0F7h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+138h+var_F8] mov [rsp+138h+var_49], 1 lea rsi, aCheckFailedBac_0; "CHECK failed: backup_bytes_ == 0 && buf"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+138h+var_F0], rax jmp short $+2 loc_1F139C: mov rdi, [rsp+138h+var_F0] lea rsi, aBackupCanOnlyB_0; " BackUp() can only be called after Next"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+138h+var_100], rax jmp short $+2 loc_1F13B4: mov rsi, [rsp+138h+var_100] lea rdi, [rsp+138h+var_5D] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_1F13C8: jmp short $+2 loc_1F13CA: test [rsp+138h+var_49], 1 jnz short loc_1F13D6 jmp short loc_1F13E3 loc_1F13D6: lea rdi, [rsp+138h+var_48]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1F13E3: mov rcx, [rsp+138h+var_E8] mov eax, [rsp+138h+var_C] mov ecx, [rcx+2Ch] mov [rsp+138h+var_99], 0 cmp eax, ecx jg short loc_1F1400 jmp short loc_1F1471 loc_1F1400: lea rdx, aWorkspaceLlm4b_66; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+138h+var_98] mov [rsp+138h+var_110], rdi mov esi, 3 mov ecx, 0F9h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+138h+var_110] mov [rsp+138h+var_99], 1 lea rsi, aCheckFailedCou_2; "CHECK failed: (count) <= (buffer_used_)"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+138h+var_108], rax jmp short $+2 loc_1F1443: mov rdi, [rsp+138h+var_108] lea rsi, aCanTBackUpOver; " Can't back up over more bytes than wer"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+138h+var_118], rax jmp short $+2 loc_1F145B: mov rsi, [rsp+138h+var_118] lea rdi, [rsp+138h+var_9A] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_1F146F: jmp short $+2 loc_1F1471: test [rsp+138h+var_99], 1 jnz short loc_1F147D jmp short loc_1F148A loc_1F147D: lea rdi, [rsp+138h+var_98]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1F148A: mov eax, [rsp+138h+var_C] mov [rsp+138h+var_D9], 0 cmp eax, 0 jl short loc_1F149D jmp short loc_1F1505 loc_1F149D: lea rdx, aWorkspaceLlm4b_66; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+138h+var_D8] mov [rsp+138h+var_128], rdi mov esi, 3 mov ecx, 0FCh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+138h+var_128] mov [rsp+138h+var_D9], 1 lea rsi, aCheckFailedCou_1; "CHECK failed: (count) >= (0): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+138h+var_120], rax jmp short $+2 loc_1F14DA: mov rdi, [rsp+138h+var_120] lea rsi, aParameterToBac; " Parameter to BackUp() can't be negativ"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+138h+var_130], rax jmp short $+2 loc_1F14F2: mov rsi, [rsp+138h+var_130] lea rdi, [rsp+138h+var_DA] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_1F1503: jmp short $+2 loc_1F1505: test [rsp+138h+var_D9], 1 jnz short loc_1F150E jmp short loc_1F1518 loc_1F150E: lea rdi, [rsp+138h+var_D8]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1F1518: mov rax, [rsp+138h+var_E8] mov ecx, [rsp+138h+var_C] mov [rax+30h], ecx add rsp, 138h retn mov rcx, rax mov eax, edx mov [rsp+arg_D8], rcx mov [rsp+arg_D4], eax test [rsp+arg_E7], 1 jnz short loc_1F154F jmp short loc_1F155C loc_1F154F: lea rdi, [rsp+arg_E8]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1F155C: jmp short loc_1F15B6 mov rcx, rax mov eax, edx mov [rsp+arg_D8], rcx mov [rsp+arg_D4], eax test [rsp+arg_97], 1 jnz short loc_1F157E jmp short loc_1F158B loc_1F157E: lea rdi, [rsp+arg_98]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1F158B: jmp short loc_1F15B6 mov rcx, rax mov eax, edx mov [rsp+arg_D8], rcx mov [rsp+arg_D4], eax test [rsp+arg_57], 1 jnz short loc_1F15AA jmp short loc_1F15B4 loc_1F15AA: lea rdi, [rsp+arg_58]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1F15B4: jmp short $+2 loc_1F15B6: mov rdi, [rsp+arg_D8] call __Unwind_Resume
google::protobuf::io::CopyingInputStreamAdaptor * google::protobuf::io::CopyingInputStreamAdaptor::BackUp( google::protobuf::io::CopyingInputStreamAdaptor *this, int a2) { int v2; // eax int v3; // ecx google::protobuf::io::CopyingInputStreamAdaptor *result; // rax long long v5; // [rsp+8h] [rbp-130h] long long v6; // [rsp+18h] [rbp-120h] long long v7; // [rsp+20h] [rbp-118h] long long v8; // [rsp+30h] [rbp-108h] long long v9; // [rsp+38h] [rbp-100h] long long v10; // [rsp+48h] [rbp-F0h] char v11; // [rsp+5Eh] [rbp-DAh] BYREF char v12; // [rsp+5Fh] [rbp-D9h] _BYTE v13[62]; // [rsp+60h] [rbp-D8h] BYREF char v14; // [rsp+9Eh] [rbp-9Ah] BYREF char v15; // [rsp+9Fh] [rbp-99h] _BYTE v16[59]; // [rsp+A0h] [rbp-98h] BYREF _BYTE v17[20]; // [rsp+DBh] [rbp-5Dh] BYREF char v18; // [rsp+EFh] [rbp-49h] _BYTE v19[60]; // [rsp+F0h] [rbp-48h] BYREF int v20; // [rsp+12Ch] [rbp-Ch] google::protobuf::io::CopyingInputStreamAdaptor *v21; // [rsp+130h] [rbp-8h] v21 = this; v20 = a2; v2 = *((_DWORD *)this + 12); v18 = 0; if ( v2 || !std::unique_ptr<unsigned char []>::get((char *)this + 32) ) { google::protobuf::internal::LogMessage::LogMessage( v19, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 247LL); v18 = 1; v10 = google::protobuf::internal::LogMessage::operator<<( v19, "CHECK failed: backup_bytes_ == 0 && buffer_.get() != NULL: "); v9 = google::protobuf::internal::LogMessage::operator<<(v10, " BackUp() can only be called after Next()."); google::protobuf::internal::LogFinisher::operator=(v17, v9); } if ( (v18 & 1) != 0 ) google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v19); v3 = *((_DWORD *)this + 11); v15 = 0; if ( v20 > v3 ) { google::protobuf::internal::LogMessage::LogMessage( v16, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 249LL); v15 = 1; v8 = google::protobuf::internal::LogMessage::operator<<(v16, "CHECK failed: (count) <= (buffer_used_): "); v7 = google::protobuf::internal::LogMessage::operator<<( v8, " Can't back up over more bytes than were returned by the last call to Next()."); google::protobuf::internal::LogFinisher::operator=(&v14, v7); } if ( (v15 & 1) != 0 ) google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v16); v12 = 0; if ( v20 < 0 ) { google::protobuf::internal::LogMessage::LogMessage( v13, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 252LL); v12 = 1; v6 = google::protobuf::internal::LogMessage::operator<<(v13, "CHECK failed: (count) >= (0): "); v5 = google::protobuf::internal::LogMessage::operator<<(v6, " Parameter to BackUp() can't be negative."); google::protobuf::internal::LogFinisher::operator=(&v11, v5); } if ( (v12 & 1) != 0 ) google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v13); result = this; *((_DWORD *)this + 12) = v20; return result; }
46,847
google::protobuf::io::CopyingInputStreamAdaptor::BackUp(int)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc
void CopyingInputStreamAdaptor::BackUp(int count) { GOOGLE_CHECK(backup_bytes_ == 0 && buffer_.get() != NULL) << " BackUp() can only be called after Next()."; GOOGLE_CHECK_LE(count, buffer_used_) << " Can't back up over more bytes than were returned by the last call" " to Next()."; GOOGLE_CHECK_GE(count, 0) << " Parameter to BackUp() can't be negative."; backup_bytes_ = count; }
O3
cpp
google::protobuf::io::CopyingInputStreamAdaptor::BackUp(int): pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movl %esi, %ebx movq %rdi, %r14 cmpl $0x0, 0x30(%rdi) jne 0xfca5d cmpq $0x0, 0x20(%r14) jne 0xfcab0 leaq 0xef9eb(%rip), %rdx # 0x1ec44f leaq 0x8(%rsp), %r15 movq %r15, %rdi movl $0x3, %esi movl $0xf7, %ecx callq 0x1072ba leaq 0xefb96(%rip), %rsi # 0x1ec618 movq %r15, %rdi callq 0x106db8 leaq 0xefbc3(%rip), %rsi # 0x1ec654 movq %rax, %rdi callq 0x106db8 leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x106e92 leaq 0x8(%rsp), %rdi callq 0x1072d8 cmpl %ebx, 0x2c(%r14) jge 0xfcb09 leaq 0xef992(%rip), %rdx # 0x1ec44f leaq 0x8(%rsp), %r15 movq %r15, %rdi movl $0x3, %esi movl $0xf9, %ecx callq 0x1072ba leaq 0xefba4(%rip), %rsi # 0x1ec67f movq %r15, %rdi callq 0x106db8 leaq 0xefbbf(%rip), %rsi # 0x1ec6a9 movq %rax, %rdi callq 0x106db8 leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x106e92 leaq 0x8(%rsp), %rdi callq 0x1072d8 testl %ebx, %ebx jns 0xfcb60 leaq 0xef93b(%rip), %rdx # 0x1ec44f leaq 0x8(%rsp), %r15 movq %r15, %rdi movl $0x3, %esi movl $0xfc, %ecx callq 0x1072ba leaq 0xefa2b(%rip), %rsi # 0x1ec55d movq %r15, %rdi callq 0x106db8 leaq 0xefbb6(%rip), %rsi # 0x1ec6f7 movq %rax, %rdi callq 0x106db8 leaq 0x7(%rsp), %rdi movq %rax, %rsi callq 0x106e92 leaq 0x8(%rsp), %rdi callq 0x1072d8 movl %ebx, 0x30(%r14) addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0xfcb78 jmp 0xfcb78 jmp 0xfcb78 jmp 0xfcb78 jmp 0xfcb78 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x1072d8 movq %rbx, %rdi callq 0x1f860 nop
_ZN6google8protobuf2io25CopyingInputStreamAdaptor6BackUpEi: push r15 push r14 push rbx sub rsp, 40h mov ebx, esi mov r14, rdi cmp dword ptr [rdi+30h], 0 jnz short loc_FCA5D cmp qword ptr [r14+20h], 0 jnz short loc_FCAB0 loc_FCA5D: lea rdx, aWorkspaceLlm4b_51; "/workspace/llm4binary/github2025/aimrt_"... lea r15, [rsp+58h+var_50] mov rdi, r15 mov esi, 3 mov ecx, 0F7h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCheckFailedBac_0; "CHECK failed: backup_bytes_ == 0 && buf"... mov rdi, r15 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, aBackupCanOnlyB_0; " BackUp() can only be called after Next"... mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+58h+var_51] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+58h+var_50]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_FCAB0: cmp [r14+2Ch], ebx jge short loc_FCB09 lea rdx, aWorkspaceLlm4b_51; "/workspace/llm4binary/github2025/aimrt_"... lea r15, [rsp+58h+var_50] mov rdi, r15 mov esi, 3 mov ecx, 0F9h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCheckFailedCou_2; "CHECK failed: (count) <= (buffer_used_)"... mov rdi, r15 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, aCanTBackUpOver; " Can't back up over more bytes than wer"... mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+58h+var_51] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+58h+var_50]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_FCB09: test ebx, ebx jns short loc_FCB60 lea rdx, aWorkspaceLlm4b_51; "/workspace/llm4binary/github2025/aimrt_"... lea r15, [rsp+58h+var_50] mov rdi, r15 mov esi, 3 mov ecx, 0FCh call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCheckFailedCou_1; "CHECK failed: (count) >= (0): " mov rdi, r15 call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rsi, aParameterToBac; " Parameter to BackUp() can't be negativ"... mov rdi, rax call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+58h+var_51] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+58h+var_50]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_FCB60: mov [r14+30h], ebx add rsp, 40h pop rbx pop r14 pop r15 retn jmp short loc_FCB78 jmp short loc_FCB78 jmp short loc_FCB78 jmp short loc_FCB78 jmp short $+2 loc_FCB78: mov rbx, rax lea rdi, [rsp+arg_0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rdi, rbx call __Unwind_Resume
void google::protobuf::io::CopyingInputStreamAdaptor::BackUp( google::protobuf::io::CopyingInputStreamAdaptor *this, int a2) { long long v2; // rax long long v3; // rax long long v4; // rax long long v5; // rax long long v6; // rax long long v7; // rax char v8; // [rsp+7h] [rbp-51h] BYREF _BYTE v9[80]; // [rsp+8h] [rbp-50h] BYREF if ( *((_DWORD *)this + 12) || !*((_QWORD *)this + 4) ) { google::protobuf::internal::LogMessage::LogMessage( v9, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 247LL); v2 = google::protobuf::internal::LogMessage::operator<<( v9, "CHECK failed: backup_bytes_ == 0 && buffer_.get() != NULL: "); v3 = google::protobuf::internal::LogMessage::operator<<(v2, " BackUp() can only be called after Next()."); google::protobuf::internal::LogFinisher::operator=(&v8, v3); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v9); } if ( *((_DWORD *)this + 11) < a2 ) { google::protobuf::internal::LogMessage::LogMessage( v9, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 249LL); v4 = google::protobuf::internal::LogMessage::operator<<(v9, "CHECK failed: (count) <= (buffer_used_): "); v5 = google::protobuf::internal::LogMessage::operator<<( v4, " Can't back up over more bytes than were returned by the last call to Next()."); google::protobuf::internal::LogFinisher::operator=(&v8, v5); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v9); } if ( a2 < 0 ) { google::protobuf::internal::LogMessage::LogMessage( v9, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc", 252LL); v6 = google::protobuf::internal::LogMessage::operator<<(v9, "CHECK failed: (count) >= (0): "); v7 = google::protobuf::internal::LogMessage::operator<<(v6, " Parameter to BackUp() can't be negative."); google::protobuf::internal::LogFinisher::operator=(&v8, v7); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v9); } *((_DWORD *)this + 12) = a2; }
BackUp: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV EBX,ESI MOV R14,RDI CMP dword ptr [RDI + 0x30],0x0 JNZ 0x001fca5d CMP qword ptr [R14 + 0x20],0x0 JNZ 0x001fcab0 LAB_001fca5d: LEA RDX,[0x2ec44f] LEA R15,[RSP + 0x8] MOV RDI,R15 MOV ESI,0x3 MOV ECX,0xf7 CALL 0x002072ba LAB_001fca7b: LEA RSI,[0x2ec618] MOV RDI,R15 CALL 0x00206db8 LEA RSI,[0x2ec654] MOV RDI,RAX CALL 0x00206db8 LAB_001fca99: LEA RDI,[RSP + 0x7] MOV RSI,RAX CALL 0x00206e92 LAB_001fcaa6: LEA RDI,[RSP + 0x8] CALL 0x002072d8 LAB_001fcab0: CMP dword ptr [R14 + 0x2c],EBX JGE 0x001fcb09 LEA RDX,[0x2ec44f] LEA R15,[RSP + 0x8] MOV RDI,R15 MOV ESI,0x3 MOV ECX,0xf9 CALL 0x002072ba LAB_001fcad4: LEA RSI,[0x2ec67f] MOV RDI,R15 CALL 0x00206db8 LEA RSI,[0x2ec6a9] MOV RDI,RAX CALL 0x00206db8 LAB_001fcaf2: LEA RDI,[RSP + 0x7] MOV RSI,RAX CALL 0x00206e92 LAB_001fcaff: LEA RDI,[RSP + 0x8] CALL 0x002072d8 LAB_001fcb09: TEST EBX,EBX JNS 0x001fcb60 LEA RDX,[0x2ec44f] LEA R15,[RSP + 0x8] MOV RDI,R15 MOV ESI,0x3 MOV ECX,0xfc CALL 0x002072ba LAB_001fcb2b: LEA RSI,[0x2ec55d] MOV RDI,R15 CALL 0x00206db8 LEA RSI,[0x2ec6f7] MOV RDI,RAX CALL 0x00206db8 LAB_001fcb49: LEA RDI,[RSP + 0x7] MOV RSI,RAX CALL 0x00206e92 LAB_001fcb56: LEA RDI,[RSP + 0x8] CALL 0x002072d8 LAB_001fcb60: MOV dword ptr [R14 + 0x30],EBX ADD RSP,0x40 POP RBX POP R14 POP R15 RET
/* google::protobuf::io::CopyingInputStreamAdaptor::BackUp(int) */ void __thiscall google::protobuf::io::CopyingInputStreamAdaptor::BackUp(CopyingInputStreamAdaptor *this,int param_1) { LogMessage *pLVar1; LogFinisher local_51; LogMessage local_50 [56]; if ((*(int *)(this + 0x30) != 0) || (*(long *)(this + 0x20) == 0)) { internal::LogMessage::LogMessage (local_50,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc" ,0xf7); /* try { // try from 001fca7b to 001fca98 has its CatchHandler @ 001fcb78 */ pLVar1 = (LogMessage *) internal::LogMessage::operator<< (local_50,"CHECK failed: backup_bytes_ == 0 && buffer_.get() != NULL: "); pLVar1 = (LogMessage *) internal::LogMessage::operator<<(pLVar1," BackUp() can only be called after Next()."); /* try { // try from 001fca99 to 001fcaa5 has its CatchHandler @ 001fcb72 */ internal::LogFinisher::operator=(&local_51,pLVar1); internal::LogMessage::~LogMessage(local_50); } if (*(int *)(this + 0x2c) < param_1) { internal::LogMessage::LogMessage (local_50,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc" ,0xf9); /* try { // try from 001fcad4 to 001fcaf1 has its CatchHandler @ 001fcb76 */ pLVar1 = (LogMessage *) internal::LogMessage::operator<<(local_50,"CHECK failed: (count) <= (buffer_used_): "); pLVar1 = (LogMessage *) internal::LogMessage::operator<< (pLVar1, " Can\'t back up over more bytes than were returned by the last call to Next()." ); /* try { // try from 001fcaf2 to 001fcafe has its CatchHandler @ 001fcb70 */ internal::LogFinisher::operator=(&local_51,pLVar1); internal::LogMessage::~LogMessage(local_50); } if (param_1 < 0) { internal::LogMessage::LogMessage (local_50,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl_lite.cc" ,0xfc); /* try { // try from 001fcb2b to 001fcb48 has its CatchHandler @ 001fcb74 */ pLVar1 = (LogMessage *) internal::LogMessage::operator<<(local_50,"CHECK failed: (count) >= (0): "); pLVar1 = (LogMessage *) internal::LogMessage::operator<<(pLVar1," Parameter to BackUp() can\'t be negative."); /* try { // try from 001fcb49 to 001fcb55 has its CatchHandler @ 001fcb6e */ internal::LogFinisher::operator=(&local_51,pLVar1); internal::LogMessage::~LogMessage(local_50); } *(int *)(this + 0x30) = param_1; return; }
46,848
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateInlineAccessorDefinitions(google::protobuf::io::Printer*) const
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/primitive_field.cc
void RepeatedPrimitiveFieldGenerator::GenerateInlineAccessorDefinitions( io::Printer* printer) const { Formatter format(printer, variables_); format( "inline $type$ $classname$::_internal_$name$(int index) const {\n" " return $field$.Get(index);\n" "}\n" "inline $type$ $classname$::$name$(int index) const {\n" "$annotate_get$" " // @@protoc_insertion_point(field_get:$full_name$)\n" " return _internal_$name$(index);\n" "}\n" "inline void $classname$::set_$name$(int index, $type$ value) {\n" "$annotate_set$" " $field$.Set(index, value);\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n" "inline void $classname$::_internal_add_$name$($type$ value) {\n" " $field$.Add(value);\n" "}\n" "inline void $classname$::add_$name$($type$ value) {\n" " _internal_add_$name$(value);\n" "$annotate_add$" " // @@protoc_insertion_point(field_add:$full_name$)\n" "}\n" "inline const ::$proto_ns$::RepeatedField< $type$ >&\n" "$classname$::_internal_$name$() const {\n" " return $field$;\n" "}\n" "inline const ::$proto_ns$::RepeatedField< $type$ >&\n" "$classname$::$name$() const {\n" "$annotate_list$" " // @@protoc_insertion_point(field_list:$full_name$)\n" " return _internal_$name$();\n" "}\n" "inline ::$proto_ns$::RepeatedField< $type$ >*\n" "$classname$::_internal_mutable_$name$() {\n" " return &$field$;\n" "}\n" "inline ::$proto_ns$::RepeatedField< $type$ >*\n" "$classname$::mutable_$name$() {\n" "$annotate_mutable_list$" " // @@protoc_insertion_point(field_mutable_list:$full_name$)\n" " return _internal_mutable_$name$();\n" "}\n"); }
O3
cpp
google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateInlineAccessorDefinitions(google::protobuf::io::Printer*) const: pushq %r14 pushq %rbx subq $0x38, %rsp leaq 0x18(%rdi), %rax leaq 0x8(%rsp), %rbx movq %rsi, -0x8(%rbx) movq %rbx, %rdi movq %rax, %rsi callq 0x7e61e leaq 0x101683(%rip), %rsi # 0x1cc4eb movq %rsp, %rdi callq 0x39938 movq %rbx, %rdi callq 0x2e5e0 addq $0x38, %rsp popq %rbx popq %r14 retq movq %rax, %r14 movq %rbx, %rdi callq 0x2e5e0 movq %r14, %rdi callq 0x1f860 nop
_ZNK6google8protobuf8compiler3cpp31RepeatedPrimitiveFieldGenerator33GenerateInlineAccessorDefinitionsEPNS0_2io7PrinterE: push r14 push rbx sub rsp, 38h lea rax, [rdi+18h] lea rbx, [rsp+48h+var_40] mov [rbx-8], rsi mov rdi, rbx mov rsi, rax call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>> const&) lea rsi, aInlineTypeClas_5; "inline $type$ $classname$::_internal_$n"... mov rdi, rsp call _ZNK6google8protobuf8compiler3cpp9FormatterclIJEEEvPKcDpRKT_ mov rdi, rbx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() add rsp, 38h pop rbx pop r14 retn mov r14, rax mov rdi, rbx call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateInlineAccessorDefinitions( google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator *this, google::protobuf::io::Printer *a2) { long long result; // rax google::protobuf::io::Printer *v3; // [rsp+0h] [rbp-48h] BYREF _BYTE v4[64]; // [rsp+8h] [rbp-40h] BYREF v3 = a2; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::_Rb_tree( (long long)v4, (long long)this + 24); result = google::protobuf::compiler::cpp::Formatter::operator()<>( &v3, "inline $type$ $classname$::_internal_$name$(int index) const {\n" " return $field$.Get(index);\n" "}\n" "inline $type$ $classname$::$name$(int index) const {\n" "$annotate_get$ // @@protoc_insertion_point(field_get:$full_name$)\n" " return _internal_$name$(index);\n" "}\n" "inline void $classname$::set_$name$(int index, $type$ value) {\n" "$annotate_set$ $field$.Set(index, value);\n" " // @@protoc_insertion_point(field_set:$full_name$)\n" "}\n" "inline void $classname$::_internal_add_$name$($type$ value) {\n" " $field$.Add(value);\n" "}\n" "inline void $classname$::add_$name$($type$ value) {\n" " _internal_add_$name$(value);\n" "$annotate_add$ // @@protoc_insertion_point(field_add:$full_name$)\n" "}\n" "inline const ::$proto_ns$::RepeatedField< $type$ >&\n" "$classname$::_internal_$name$() const {\n" " return $field$;\n" "}\n" "inline const ::$proto_ns$::RepeatedField< $type$ >&\n" "$classname$::$name$() const {\n" "$annotate_list$ // @@protoc_insertion_point(field_list:$full_name$)\n" " return _internal_$name$();\n" "}\n" "inline ::$proto_ns$::RepeatedField< $type$ >*\n" "$classname$::_internal_mutable_$name$() {\n" " return &$field$;\n" "}\n" "inline ::$proto_ns$::RepeatedField< $type$ >*\n" "$classname$::mutable_$name$() {\n" "$annotate_mutable_list$ // @@protoc_insertion_point(field_mutable_list:$full_name$)\n" " return _internal_mutable_$name$();\n" "}\n"); std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree((long long)v4); return result; }
GenerateInlineAccessorDefinitions: PUSH R14 PUSH RBX SUB RSP,0x38 LEA RAX,[RDI + 0x18] LEA RBX,[RSP + 0x8] MOV qword ptr [RBX + -0x8],RSI MOV RDI,RBX MOV RSI,RAX CALL 0x0017e61e LAB_001cae61: LEA RSI,[0x2cc4eb] MOV RDI,RSP CALL 0x00139938 LAB_001cae70: MOV RDI,RBX CALL 0x0012e5e0 ADD RSP,0x38 POP RBX POP R14 RET
/* google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateInlineAccessorDefinitions(google::protobuf::io::Printer*) const */ void __thiscall google::protobuf::compiler::cpp::RepeatedPrimitiveFieldGenerator::GenerateInlineAccessorDefinitions (RepeatedPrimitiveFieldGenerator *this,Printer *param_1) { Printer *local_48; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> local_40 [48]; local_48 = param_1; std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::_Rb_tree(local_40,(_Rb_tree *)(this + 0x18)); /* try { // try from 001cae61 to 001cae6f has its CatchHandler @ 001cae80 */ Formatter::operator()<> ((Formatter *)&local_48, "inline $type$ $classname$::_internal_$name$(int index) const {\n return $field$.Get(index);\n}\ninline $type$ $classname$::$name$(int index) const {\n$annotate_get$ // @@protoc_insertion_point(field_get:$full_name$)\n return _internal_$name$(index);\n}\ninline void $classname$::set_$name$(int index, $type$ value) {\n$annotate_set$ $field$.Set(index, value);\n // @@protoc_insertion_point(field_set:$full_name$)\n}\ninline void $classname$::_internal_add_$name$($type$ value) {\n $field$.Add(value);\n}\ninline void $classname$::add_$name$($type$ value) {\n _internal_add_$name$(value);\n$annotate_add$ // @@protoc_insertion_point(field_add:$full_name$)\n}\ninline const ::$proto_ns$::RepeatedField< $type$ >&\n$classname$::_internal_$name$() const {\n return $field$;\n}\ninline const ::$proto_ns$::RepeatedField< $type$ >&\n$classname$::$name$() const {\n$annotate_list$ // @@protoc_insertion_point(field_list:$full_name$)\n return _internal_$name$();\n}\ninline ::$proto_ns$::RepeatedField< $type$ >*\n$classname$::_internal_mutable_$name$() {\n return &$field$;\n}\ninline ::$proto_ns$::RepeatedField< $type$ >*\n$classname$::mutable_$name$() {\n$annotate_mutable_list$ // @@protoc_insertion_point(field_mutable_list:$full_name$)\n return _internal_mutable_$name$();\n}\n" ); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,std::__cxx11::string>,std::_Select1st<std::pair<std::__cxx11::string_const,std::__cxx11::string>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::~_Rb_tree(local_40); return; }
46,849
minja::Value& 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[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/./json.hpp
T & operator[](KeyType && key) { return emplace(std::forward<KeyType>(key), T{}).first->second; }
O1
cpp
minja::Value& 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[]<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, 0>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> 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 0x3efdc movq %r14, %rdi movl $0x1, %esi callq 0x3efdc movq %rsp, %rdx movq %r15, %rdi movq %rbx, %rsi callq 0x50028 movq %rax, %rbx movq %r14, %rdi xorl %esi, %esi callq 0x3efdc movq %r14, %rdi callq 0x4bfb8 movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x4f67d callq 0x30e64 movq 0x28(%rsp), %rdi testq %rdi, %rdi je 0x4f68c callq 0x30e64 movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x4f69b callq 0x30e64 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x4f6d1 movq 0xa38f4(%rip), %rax # 0xf2fa0 cmpb $0x0, (%rax) je 0x4f6bc movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x4f6c6 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x4f6d1 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 0x3ef50 movq %rbx, %rdi callq 0x18b90 nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_: 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_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_ 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_4F67D call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4F67D: mov rdi, [rsp+68h+var_40] test rdi, rdi jz short loc_4F68C call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4F68C: mov rdi, [rsp+68h+var_50] test rdi, rdi jz short loc_4F69B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4F69B: mov rdi, [rsp+68h+var_60] test rdi, rdi jz short loc_4F6D1 mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_4F6BC mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_4F6C6 loc_4F6BC: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_4F6C6: cmp eax, 1 jnz short loc_4F6D1 mov rax, [rdi] call qword ptr [rax+18h] loc_4F6D1: 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 ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_( 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] void *v10[5]; // [rsp+40h] [rbp-28h] BYREF v10[1] = 0LL; v6 = 0LL; v7 = 0LL; v8 = 0LL; v9 = 0LL; LOBYTE(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((char *)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((char *)v10); v2 = ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_( 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((char *)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; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_: 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 0x0013efdc MOV RDI,R14 MOV ESI,0x1 CALL 0x0013efdc LAB_0014f64b: MOV RDX,RSP MOV RDI,R15 MOV RSI,RBX CALL 0x00150028 LAB_0014f659: MOV RBX,RAX MOV RDI,R14 XOR ESI,ESI CALL 0x0013efdc MOV RDI,R14 CALL 0x0014bfb8 MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x0014f67d CALL 0x00130e64 LAB_0014f67d: MOV RDI,qword ptr [RSP + 0x28] TEST RDI,RDI JZ 0x0014f68c CALL 0x00130e64 LAB_0014f68c: MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x0014f69b CALL 0x00130e64 LAB_0014f69b: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0014f6d1 MOV RAX,qword ptr [0x001f2fa0] CMP byte ptr [RAX],0x0 JZ 0x0014f6bc MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0014f6c6 LAB_0014f6bc: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0014f6c6: CMP EAX,0x1 JNZ 0x0014f6d1 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0014f6d1: ADD RBX,0x10 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
long _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OST_ (int8 param_1,int8 param_2) { 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); 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(bVar4); 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(bVar4); /* try { // try from 0014f64b to 0014f658 has its CatchHandler @ 0014f6e2 */ lVar3 = _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE7emplaceIRKS9_TnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEESI_IN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEEbEOST_OSF_ (param_1,param_2,&local_68); 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(bVar4); 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_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_001f2fa0 == '\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; }
46,850
mysql_find_charset_nr
eloqsql/libmariadb/libmariadb/ma_charset.c
const MARIADB_CHARSET_INFO * mysql_find_charset_nr(unsigned int charsetnr) { const MARIADB_CHARSET_INFO * c = mariadb_compiled_charsets; if (my_collation_id_is_uca1400(charsetnr)) charsetnr= my_uca1400_collation_id_uca400_compat(charsetnr); do { if (c->nr == charsetnr) { return(c); } ++c; } while (c[0].nr != 0); return(NULL); }
O3
c
mysql_find_charset_nr: pushq %rbp movq %rsp, %rbp movl %edi, %eax andl $0xfffff800, %eax # imm = 0xFFFFF800 cmpl $0x800, %eax # imm = 0x800 jne 0x33b87 movl %edi, %eax andl $0xf8, %eax leaq 0x18abe(%rip), %rcx # 0x4c600 cmpq $0x0, 0x8(%rcx,%rax,4) je 0x33b87 movl %edi, %edx shrl $0x8, %edx andl $0x7, %edx cmpl $0x4, %edx ja 0x33b87 leaq (%rcx,%rax,4), %rax leaq 0x9916(%rip), %rcx # 0x3d478 movslq (%rcx,%rdx,4), %rdx addq %rcx, %rdx jmpq *%rdx movzwl 0x10(%rax), %edi jmp 0x33b87 movzwl 0x18(%rax), %edi jmp 0x33b87 movzwl 0x14(%rax), %edi jmp 0x33b87 movzwl 0x16(%rax), %edi jmp 0x33b87 movzwl 0x12(%rax), %edi leaq 0x120b2(%rip), %rax # 0x45c40 movl $0x1, %ecx cmpl %edi, %ecx je 0x33ba4 movl 0x48(%rax), %ecx addq $0x48, %rax testl %ecx, %ecx jne 0x33b93 xorl %eax, %eax popq %rbp retq
mysql_find_charset_nr: push rbp mov rbp, rsp mov eax, edi and eax, 0FFFFF800h cmp eax, 800h jnz short def_33B69; jumptable 0000000000033B69 default case mov eax, edi and eax, 0F8h lea rcx, my_uca1400_collation_definitions cmp qword ptr [rcx+rax*4+8], 0 jz short def_33B69; jumptable 0000000000033B69 default case mov edx, edi shr edx, 8 and edx, 7 cmp edx, 4; switch 5 cases ja short def_33B69; jumptable 0000000000033B69 default case lea rax, [rcx+rax*4] lea rcx, jpt_33B69 movsxd rdx, ds:(jpt_33B69 - 3D478h)[rcx+rdx*4] add rdx, rcx jmp rdx; switch jump loc_33B6B: movzx edi, word ptr [rax+10h]; jumptable 0000000000033B69 case 0 jmp short def_33B69; jumptable 0000000000033B69 default case loc_33B71: movzx edi, word ptr [rax+18h]; jumptable 0000000000033B69 case 4 jmp short def_33B69; jumptable 0000000000033B69 default case loc_33B77: movzx edi, word ptr [rax+14h]; jumptable 0000000000033B69 case 2 jmp short def_33B69; jumptable 0000000000033B69 default case loc_33B7D: movzx edi, word ptr [rax+16h]; jumptable 0000000000033B69 case 3 jmp short def_33B69; jumptable 0000000000033B69 default case loc_33B83: movzx edi, word ptr [rax+12h]; jumptable 0000000000033B69 case 1 def_33B69: lea rax, mariadb_compiled_charsets; jumptable 0000000000033B69 default case mov ecx, 1 loc_33B93: cmp ecx, edi jz short loc_33BA4 mov ecx, [rax+48h] add rax, 48h ; 'H' test ecx, ecx jnz short loc_33B93 xor eax, eax loc_33BA4: pop rbp retn
_DWORD * mysql_find_charset_nr(unsigned int a1) { long long v1; // rax unsigned __int16 *v2; // rax _DWORD *result; // rax int v4; // ecx if ( (a1 & 0xFFFFF800) == 0x800 ) { v1 = (unsigned __int8)a1 & 0xF8; if ( *(_UNKNOWN **)((char *)&my_uca1400_collation_definitions + 4 * v1 + 8) ) { v2 = (unsigned __int16 *)&my_uca1400_collation_definitions + 2 * v1; switch ( (a1 >> 8) & 7 ) { case 0u: a1 = v2[8]; break; case 1u: a1 = v2[9]; break; case 2u: a1 = v2[10]; break; case 3u: a1 = v2[11]; break; case 4u: a1 = v2[12]; break; default: break; } } } result = &mariadb_compiled_charsets; v4 = 1; while ( v4 != a1 ) { v4 = result[18]; result += 18; if ( !v4 ) return 0LL; } return result; }
mysql_find_charset_nr: PUSH RBP MOV RBP,RSP MOV EAX,EDI AND EAX,0xfffff800 CMP EAX,0x800 JNZ 0x00133b87 MOV EAX,EDI AND EAX,0xf8 LEA RCX,[0x14c600] CMP qword ptr [RCX + RAX*0x4 + 0x8],0x0 JZ 0x00133b87 MOV EDX,EDI SHR EDX,0x8 AND EDX,0x7 CMP EDX,0x4 JA 0x00133b87 LEA RAX,[RCX + RAX*0x4] LEA RCX,[0x13d478] MOVSXD RDX,dword ptr [RCX + RDX*0x4] ADD RDX,RCX switchD: JMP RDX caseD_0: MOVZX EDI,word ptr [RAX + 0x10] JMP 0x00133b87 caseD_4: MOVZX EDI,word ptr [RAX + 0x18] JMP 0x00133b87 caseD_2: MOVZX EDI,word ptr [RAX + 0x14] JMP 0x00133b87 caseD_3: MOVZX EDI,word ptr [RAX + 0x16] JMP 0x00133b87 caseD_1: MOVZX EDI,word ptr [RAX + 0x12] LAB_00133b87: LEA RAX,[0x145c40] MOV ECX,0x1 LAB_00133b93: CMP ECX,EDI JZ 0x00133ba4 MOV ECX,dword ptr [RAX + 0x48] ADD RAX,0x48 TEST ECX,ECX JNZ 0x00133b93 XOR EAX,EAX LAB_00133ba4: POP RBP RET
int4 * mysql_find_charset_nr(uint param_1) { long lVar1; int4 *puVar2; uint uVar3; if ((((param_1 & 0xfffff800) == 0x800) && (*(long *)(my_uca1400_collation_definitions + (ulong)(param_1 & 0xf8) * 4 + 8) != 0)) && (uVar3 = param_1 >> 8 & 7, uVar3 < 5)) { lVar1 = (ulong)(param_1 & 0xf8) * 4; switch(uVar3) { case 0: param_1 = (uint)*(ushort *)(my_uca1400_collation_definitions + lVar1 + 0x10); break; case 1: param_1 = (uint)*(ushort *)(my_uca1400_collation_definitions + lVar1 + 0x12); break; case 2: param_1 = (uint)*(ushort *)(my_uca1400_collation_definitions + lVar1 + 0x14); break; case 3: param_1 = (uint)*(ushort *)(my_uca1400_collation_definitions + lVar1 + 0x16); break; case 4: param_1 = (uint)*(ushort *)(my_uca1400_collation_definitions + lVar1 + 0x18); } } puVar2 = &mariadb_compiled_charsets; uVar3 = 1; do { if (uVar3 == param_1) { return puVar2; } uVar3 = puVar2[0x12]; puVar2 = puVar2 + 0x12; } while (uVar3 != 0); return (int4 *)0x0; }
46,851
js_async_function_free
bluesky950520[P]quickjs/quickjs.c
static void js_async_function_free(JSRuntime *rt, JSAsyncFunctionData *s) { if (--s->header.ref_count == 0) { js_async_function_free0(rt, s); } }
O2
c
js_async_function_free: decl (%rsi) je 0x4ab14 retq pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 callq 0x4ab6b movq 0x18(%rbx), %rsi movq 0x20(%rbx), %rdx movq %r14, %rdi callq 0x1bbe1 movq 0x28(%rbx), %rsi movq 0x30(%rbx), %rdx movq %r14, %rdi callq 0x1bbe1 movq 0x8(%rbx), %rax movq 0x10(%rbx), %rcx movq %rcx, 0x8(%rax) movq %rax, (%rcx) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rbx) movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1ac7b
js_async_function_free: dec dword ptr [rsi] jz short loc_4AB14 retn loc_4AB14: push r14 push rbx push rax mov rbx, rsi mov r14, rdi call js_async_function_terminate mov rsi, [rbx+18h] mov rdx, [rbx+20h] mov rdi, r14 call JS_FreeValueRT mov rsi, [rbx+28h] mov rdx, [rbx+30h] mov rdi, r14 call JS_FreeValueRT mov rax, [rbx+8] mov rcx, [rbx+10h] mov [rax+8], rcx mov [rcx], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+8], xmm0 mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp js_free_rt
long long js_async_function_free(long long a1, long long a2) { long long v3; // rax _QWORD *v4; // rcx long long result; // rax if ( (*(_DWORD *)a2)-- == 1 ) { js_async_function_terminate(a1); JS_FreeValueRT(a1, *(unsigned int **)(a2 + 24), *(_QWORD *)(a2 + 32)); JS_FreeValueRT(a1, *(unsigned int **)(a2 + 40), *(_QWORD *)(a2 + 48)); v3 = *(_QWORD *)(a2 + 8); v4 = *(_QWORD **)(a2 + 16); *(_QWORD *)(v3 + 8) = v4; *v4 = v3; *(_OWORD *)(a2 + 8) = 0LL; return js_free_rt(a1, a2); } return result; }
js_async_function_free: DEC dword ptr [RSI] JZ 0x0014ab14 RET LAB_0014ab14: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI CALL 0x0014ab6b MOV RSI,qword ptr [RBX + 0x18] MOV RDX,qword ptr [RBX + 0x20] MOV RDI,R14 CALL 0x0011bbe1 MOV RSI,qword ptr [RBX + 0x28] MOV RDX,qword ptr [RBX + 0x30] MOV RDI,R14 CALL 0x0011bbe1 MOV RAX,qword ptr [RBX + 0x8] MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RCX],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x8],XMM0 MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x0011ac7b
void js_async_function_free(int8 param_1,int *param_2) { long lVar1; long *plVar2; *param_2 = *param_2 + -1; if (*param_2 != 0) { return; } js_async_function_terminate(); JS_FreeValueRT(param_1,*(int8 *)(param_2 + 6),*(int8 *)(param_2 + 8)); JS_FreeValueRT(param_1,*(int8 *)(param_2 + 10),*(int8 *)(param_2 + 0xc)); lVar1 = *(long *)(param_2 + 2); plVar2 = *(long **)(param_2 + 4); *(long **)(lVar1 + 8) = plVar2; *plVar2 = lVar1; param_2[2] = 0; param_2[3] = 0; param_2[4] = 0; param_2[5] = 0; js_free_rt(param_1,param_2); return; }
46,852
translog_read_record_header_scan
eloqsql/storage/maria/ma_loghandler.c
int translog_read_record_header_scan(TRANSLOG_SCANNER_DATA *scanner, TRANSLOG_HEADER_BUFFER *buff, my_bool move_scanner) { translog_size_t res; DBUG_ENTER("translog_read_record_header_scan"); DBUG_PRINT("enter", ("Scanner: Cur: " LSN_FMT " Hrz: " LSN_FMT " " "Lst: " LSN_FMT " Offset: %u(%x) fixed %d", LSN_IN_PARTS(scanner->page_addr), LSN_IN_PARTS(scanner->horizon), LSN_IN_PARTS(scanner->last_file_page), (uint) scanner->page_offset, (uint) scanner->page_offset, scanner->fixed_horizon)); DBUG_ASSERT(translog_status == TRANSLOG_OK || translog_status == TRANSLOG_READONLY); buff->groups_no= 0; buff->lsn= scanner->page_addr; buff->lsn+= scanner->page_offset; /* offset increasing */ res= translog_read_record_header_from_buffer(scanner->page, scanner->page_offset, buff, (move_scanner ? scanner : 0)); DBUG_RETURN(res); }
O3
c
translog_read_record_header_scan: pushq %rbp movq %rsp, %rbp movq %rsi, %rax movl $0x0, 0x418(%rsi) movq 0x2000(%rdi), %rcx movq %rcx, (%rsi) movl 0x2028(%rdi), %esi addq %rcx, %rsi movq %rsi, (%rax) movq 0x2018(%rdi), %r8 movzwl 0x2028(%rdi), %esi xorl %ecx, %ecx testb %dl, %dl cmovneq %rdi, %rcx movq %r8, %rdi movq %rax, %rdx popq %rbp jmp 0x472f8
translog_read_record_header_scan: push rbp mov rbp, rsp mov rax, rsi mov dword ptr [rsi+418h], 0 mov rcx, [rdi+2000h] mov [rsi], rcx mov esi, [rdi+2028h] add rsi, rcx mov [rax], rsi mov r8, [rdi+2018h] movzx esi, word ptr [rdi+2028h] xor ecx, ecx test dl, dl cmovnz rcx, rdi mov rdi, r8 mov rdx, rax pop rbp jmp translog_read_record_header_from_buffer
long long translog_read_record_header_scan(long long a1, long long a2, char a3) { long long v3; // rcx _BYTE *v4; // rcx *(_DWORD *)(a2 + 1048) = 0; v3 = *(_QWORD *)(a1 + 0x2000); *(_QWORD *)a2 = v3; *(_QWORD *)a2 = v3 + *(unsigned int *)(a1 + 8232); v4 = 0LL; if ( a3 ) v4 = (_BYTE *)a1; return translog_read_record_header_from_buffer(*(_QWORD *)(a1 + 8216), *(unsigned __int16 *)(a1 + 8232), a2, v4); }
translog_read_record_header_scan: PUSH RBP MOV RBP,RSP MOV RAX,RSI MOV dword ptr [RSI + 0x418],0x0 MOV RCX,qword ptr [RDI + 0x2000] MOV qword ptr [RSI],RCX MOV ESI,dword ptr [RDI + 0x2028] ADD RSI,RCX MOV qword ptr [RAX],RSI MOV R8,qword ptr [RDI + 0x2018] MOVZX ESI,word ptr [RDI + 0x2028] XOR ECX,ECX TEST DL,DL CMOVNZ RCX,RDI MOV RDI,R8 MOV RDX,RAX POP RBP JMP 0x001472f8
void translog_read_record_header_scan(long param_1,long *param_2,char param_3) { long lVar1; *(int4 *)(param_2 + 0x83) = 0; lVar1 = *(long *)(param_1 + 0x2000); *param_2 = lVar1; *param_2 = (ulong)*(uint *)(param_1 + 0x2028) + lVar1; lVar1 = 0; if (param_3 != '\0') { lVar1 = param_1; } translog_read_record_header_from_buffer (*(int8 *)(param_1 + 0x2018),*(int2 *)(param_1 + 0x2028),param_2,lVar1); return; }
46,853
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t)
monkey531[P]llama/common/json.hpp
basic_json(initializer_list_t init, bool type_deduction = true, value_t manual_type = value_t::array) { // check if each element is an array with two elements whose first // element is a string bool is_an_object = std::all_of(init.begin(), init.end(), [](const detail::json_ref<basic_json>& element_ref) { // The cast is to ensure op[size_type] is called, bearing in mind size_type may not be int; // (many string types can be constructed from 0 via its null-pointer guise, so we get a // broken call to op[key_type], the wrong semantics and a 4804 warning on Windows) return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[static_cast<size_type>(0)].is_string(); }); // adjust type if type deduction is not wanted if (!type_deduction) { // if array is wanted, do not create an object though possible if (manual_type == value_t::array) { is_an_object = false; } // if object is wanted but impossible, throw an exception if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object)) { JSON_THROW(type_error::create(301, "cannot create object from initializer list", nullptr)); } } if (is_an_object) { // the initializer list is a list of pairs -> create object m_data.m_type = value_t::object; m_data.m_value = value_t::object; for (auto& element_ref : init) { auto element = element_ref.moved_or_copied(); m_data.m_value.object->emplace( std::move(*((*element.m_data.m_value.array)[0].m_data.m_value.string)), std::move((*element.m_data.m_value.array)[1])); } } else { // the initializer list describes an array -> create array m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(init.begin(), init.end()); } set_parents(); assert_invariant(); }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebp movl %ecx, %r13d movq %rdx, %r15 movq %rsi, %r14 movq %rdi, %rbx leaq (%rdx,%rdx,2), %rax leaq (%rsi,%rax,8), %r12 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rsi, %rdi movq %r12, %rsi callq 0x85fec cmpq %r12, %rax sete %cl testb %r13b, %r13b jne 0x64fb3 cmpq %r12, %rax sete %al cmpb $0x2, %bpl setne %cl cmpb $0x1, %bpl setne %dl orb %al, %dl je 0x6505e andb %al, %cl testb %cl, %cl je 0x65028 movb $0x1, (%rbx) movl $0x20, %edi callq 0x196a0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%rbx) testq %r15, %r15 je 0x65042 shlq $0x3, %r15 leaq (%r15,%r15,2), %r12 movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq 0x85f46 movq 0x8(%rbx), %rdi movq 0x8(%rsp), %rax movq (%rax), %rdx movq 0x8(%rdx), %rsi addq $0x10, %rdx callq 0x2fe40 movq %r15, %rdi xorl %esi, %esi callq 0x28fd0 movq %r15, %rdi callq 0x2e790 addq $0x18, %r14 addq $-0x18, %r12 jne 0x64fe6 jmp 0x65042 movb $0x2, (%rbx) movq %rsp, %rdi movq %r14, (%rdi) leaq 0x20(%rsp), %rsi movq %r12, (%rsi) callq 0x85f98 movq %rax, 0x8(%rbx) movq %rbx, %rdi movl $0x1, %esi callq 0x28fd0 addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x19370 movq %rax, %r14 leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x59f93(%rip), %rsi # 0xbf00f leaq 0x59fb6(%rip), %rdx # 0xbf039 movq %rsp, %rdi callq 0x32ea4 movb $0x1, %bpl movq %rsp, %rdx movq %r14, %rdi movl $0x12d, %esi # imm = 0x12D xorl %ecx, %ecx callq 0x54c3a xorl %ebp, %ebp leaq 0x87e77(%rip), %rsi # 0xecf20 leaq -0x39762(%rip), %rdx # 0x2b94e movq %r14, %rdi callq 0x19b70 jmp 0x650be jmp 0x650be jmp 0x650be movq %rax, %r15 jmp 0x6510b movq %rax, %r15 movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x28fd0 movq %r14, %rdi callq 0x2e790 jmp 0x6510b movq %rax, %r15 movq (%rsp), %rdi cmpq %r12, %rdi je 0x650fe movq 0x10(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x650fe movq %rax, %r15 movb $0x1, %bpl testb %bpl, %bpl je 0x6510b movq %r14, %rdi callq 0x19510 movq %rbx, %rdi callq 0x2e790 movq %r15, %rdi callq 0x19be0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE: push rbp; int push r15; int push r14; char push r13; int push r12; __int64 push rbx; int sub rsp, 28h mov ebp, r8d mov r13d, ecx mov r15, rdx mov r14, rsi mov rbx, rdi lea rax, [rdx+rdx*2] lea r12, [rsi+rax*8] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, rsi mov rsi, r12 call _ZSt9__find_ifIPKN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEN9__gnu_cxx5__ops12_Iter_negateIZNSG_C1ESt16initializer_listISH_EbNS2_7value_tEEUlRSI_E_EEET_ST_ST_T0_St26random_access_iterator_tag; std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>,std::random_access_iterator_tag) cmp rax, r12 setz cl test r13b, r13b jnz short loc_64FB3 cmp rax, r12 setz al cmp bpl, 2 setnz cl cmp bpl, 1 setnz dl or dl, al jz loc_6505E and cl, al loc_64FB3: test cl, cl jz short loc_65028 mov byte ptr [rbx], 1 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [rbx+8], rax test r15, r15 jz short loc_65042 shl r15, 3 lea r12, [r15+r15*2] mov r15, rsp loc_64FE6: mov rdi, r15 mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::moved_or_copied(void) mov rdi, [rbx+8] mov rax, [rsp+58h+var_50] mov rdx, [rax] mov rsi, [rdx+8] add rdx, 10h 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 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() add r14, 18h add r12, 0FFFFFFFFFFFFFFE8h jnz short loc_64FE6 jmp short loc_65042 loc_65028: mov byte ptr [rbx], 2 mov rdi, rsp mov [rdi], r14 lea rsi, [rsp+58h+var_38] mov [rsi], r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJPKNS0_6detail8json_refISD_EESL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const* &&) mov [rbx+8], rax loc_65042: mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6505E: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov r14, rax lea r12, [rsp+58h+var_48] mov [r12-10h], r12 lea rsi, aCannotCreateOb; "cannot create object from initializer l"... lea rdx, aCannotCreateOb+2Ah; "" 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 bpl, 1 mov rdx, rsp mov rdi, r14; this mov esi, 12Dh; int xor ecx, ecx call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_650BE jmp short loc_650BE jmp short $+2 loc_650BE: mov r15, rax jmp short loc_6510B mov r15, 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() jmp short loc_6510B mov r15, rax mov rdi, [rsp+58h+var_58]; void * cmp rdi, r12 jz short loc_650FE mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_650FE mov r15, rax mov bpl, 1 loc_650FE: test bpl, bpl jz short loc_6510B mov rdi, r14; void * call ___cxa_free_exception loc_6510B: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r15 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( long long a1, char *a2, long long a3, char a4, char a5) { char *v8; // r14 char *v9; // r12 long long v10; // rax bool v11; // cl bool v12; // al long long result; // rax long long v14; // r12 nlohmann::json_abi_v3_11_3::detail::exception *exception; // r14 void *v16; // [rsp+0h] [rbp-58h] BYREF long long v17; // [rsp+8h] [rbp-50h] _QWORD v18[9]; // [rsp+10h] [rbp-48h] BYREF v8 = a2; v9 = &a2[24 * a3]; *(_OWORD *)a1 = 0LL; v10 = std::__find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*,__gnu_cxx::__ops::_Iter_negate<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const&)#1}>>( a2, v9); v11 = v10 == (_QWORD)v9; if ( !a4 ) { v12 = v10 == (_QWORD)v9; if ( !v12 && a5 == 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v16 = v18; std::string::_M_construct<char const*>(&v16, "cannot create object from initializer list", (long long)""); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( exception, 301, &v16); __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); } v11 = v12 && a5 != 2; } if ( v11 ) { *(_BYTE *)a1 = 1; result = operator new(0x20uLL); *(_OWORD *)result = 0LL; *(_QWORD *)(result + 16) = 0LL; *(_QWORD *)(a1 + 8) = result; if ( a3 ) { v14 = 24 * a3; do { nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::moved_or_copied( &v16, v8); 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( *(_QWORD **)(a1 + 8), *(long long **)(*(_QWORD *)v17 + 8LL), *(_QWORD *)v17 + 16LL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)&v16); result = 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(&v16); v8 += 24; v14 -= 24LL; } while ( v14 ); } } else { *(_BYTE *)a1 = 2; v16 = a2; v18[2] = v9; result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*>(&v16); *(_QWORD *)(a1 + 8) = result; } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); return result; }
basic_json: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,R8D MOV R13D,ECX MOV R15,RDX MOV R14,RSI MOV RBX,RDI LEA RAX,[RDX + RDX*0x2] LEA R12,[RSI + RAX*0x8] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_00164f7f: MOV RDI,RSI MOV RSI,R12 CALL 0x00185fec CMP RAX,R12 SETZ CL TEST R13B,R13B JNZ 0x00164fb3 CMP RAX,R12 SETZ AL CMP BPL,0x2 SETNZ CL CMP BPL,0x1 SETNZ DL OR DL,AL JZ 0x0016505e AND CL,AL LAB_00164fb3: TEST CL,CL JZ 0x00165028 MOV byte ptr [RBX],0x1 LAB_00164fba: MOV EDI,0x20 CALL 0x001196a0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [RBX + 0x8],RAX TEST R15,R15 JZ 0x00165042 SHL R15,0x3 LEA R12,[R15 + R15*0x2] MOV R15,RSP LAB_00164fe6: MOV RDI,R15 MOV RSI,R14 CALL 0x00185f46 MOV RDI,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RAX] MOV RSI,qword ptr [RDX + 0x8] ADD RDX,0x10 LAB_00165005: CALL 0x0012fe40 MOV RDI,R15 XOR ESI,ESI CALL 0x00128fd0 MOV RDI,R15 CALL 0x0012e790 ADD R14,0x18 ADD R12,-0x18 JNZ 0x00164fe6 JMP 0x00165042 LAB_00165028: MOV byte ptr [RBX],0x2 MOV RDI,RSP MOV qword ptr [RDI],R14 LEA RSI,[RSP + 0x20] MOV qword ptr [RSI],R12 LAB_00165039: CALL 0x00185f98 LAB_0016503e: MOV qword ptr [RBX + 0x8],RAX LAB_00165042: MOV RDI,RBX MOV ESI,0x1 CALL 0x00128fd0 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016505e: MOV EDI,0x20 CALL 0x00119370 MOV R14,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 LAB_00165075: LEA RSI,[0x1bf00f] LEA RDX,[0x1bf039] MOV RDI,RSP CALL 0x00132ea4 MOV BPL,0x1 LAB_0016508e: MOV RDX,RSP MOV RDI,R14 MOV ESI,0x12d XOR ECX,ECX CALL 0x00154c3a XOR EBP,EBP LEA RSI,[0x1ecf20] LEA RDX,[0x12b94e] MOV RDI,R14 CALL 0x00119b70
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >, bool, nlohmann::json_abi_v3_11_3::detail::value_t) */ void nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(int8 *param_1,json_ref *param_2,long param_3,char param_4,char param_5) { json_ref *pjVar1; json_ref *pjVar2; int8 *puVar3; vector *pvVar4; int8 uVar5; bool bVar6; json_ref *local_58; long *local_50; json_ref local_48 [16]; json_ref *local_38; pjVar1 = param_2 + param_3 * 0x18; *param_1 = 0; param_1[1] = 0; /* try { // try from 00164f7f to 00164f89 has its CatchHandler @ 001650bc */ pjVar2 = std:: __find_if<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,__gnu_cxx::__ops::_Iter_negate<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>::_Iter_negate(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::_lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const&)_1_>> (param_2,pjVar1); bVar6 = pjVar2 == pjVar1; if (param_4 == '\0') { if (param_5 == '\x01' && pjVar2 != pjVar1) { uVar5 = __cxa_allocate_exception(0x20); local_58 = local_48; /* try { // try from 00165075 to 0016508a has its CatchHandler @ 001650f8 */ std::__cxx11::string::_M_construct<char_const*> (&local_58,"cannot create object from initializer list",""); /* try { // try from 0016508e to 001650b7 has its CatchHandler @ 001650dd */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (uVar5,0x12d,&local_58,0); /* WARNING: Subroutine does not return */ __cxa_throw(uVar5,&detail::type_error::typeinfo,detail::exception::~exception); } bVar6 = param_5 != '\x02' && pjVar2 == pjVar1; } if (bVar6) { *(int1 *)param_1 = 1; /* try { // try from 00164fba to 00164fc3 has its CatchHandler @ 001650ba */ puVar3 = (int8 *)operator_new(0x20); *puVar3 = 0; puVar3[1] = 0; puVar3[2] = 0; param_1[1] = puVar3; if (param_3 != 0) { param_3 = param_3 * 0x18; do { /* try { // try from 00164fe6 to 00164ff0 has its CatchHandler @ 001650be */ detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::moved_or_copied(); /* try { // try from 00165005 to 00165009 has its CatchHandler @ 001650c3 */ ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::emplace((ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)param_1[1],*(string **)(*local_50 + 8),(basic_json *)(*local_50 + 0x10)); assert_invariant(SUB81(&local_58,0)); data::~data((data *)&local_58); param_3 = param_3 + -0x18; } while (param_3 != 0); } } else { *(int1 *)param_1 = 2; local_58 = param_2; local_38 = pjVar1; /* try { // try from 00165039 to 0016503d has its CatchHandler @ 001650b8 */ pvVar4 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*> (&local_58,&local_38); param_1[1] = pvVar4; } assert_invariant(SUB81(param_1,0)); return; }
46,854
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t)
monkey531[P]llama/common/json.hpp
basic_json(initializer_list_t init, bool type_deduction = true, value_t manual_type = value_t::array) { // check if each element is an array with two elements whose first // element is a string bool is_an_object = std::all_of(init.begin(), init.end(), [](const detail::json_ref<basic_json>& element_ref) { // The cast is to ensure op[size_type] is called, bearing in mind size_type may not be int; // (many string types can be constructed from 0 via its null-pointer guise, so we get a // broken call to op[key_type], the wrong semantics and a 4804 warning on Windows) return element_ref->is_array() && element_ref->size() == 2 && (*element_ref)[static_cast<size_type>(0)].is_string(); }); // adjust type if type deduction is not wanted if (!type_deduction) { // if array is wanted, do not create an object though possible if (manual_type == value_t::array) { is_an_object = false; } // if object is wanted but impossible, throw an exception if (JSON_HEDLEY_UNLIKELY(manual_type == value_t::object && !is_an_object)) { JSON_THROW(type_error::create(301, "cannot create object from initializer list", nullptr)); } } if (is_an_object) { // the initializer list is a list of pairs -> create object m_data.m_type = value_t::object; m_data.m_value = value_t::object; for (auto& element_ref : init) { auto element = element_ref.moved_or_copied(); m_data.m_value.object->emplace( std::move(*((*element.m_data.m_value.array)[0].m_data.m_value.string)), std::move((*element.m_data.m_value.array)[1])); } } else { // the initializer list describes an array -> create array m_data.m_type = value_t::array; m_data.m_value.array = create<array_t>(init.begin(), init.end()); } set_parents(); assert_invariant(); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>, bool, nlohmann::json_abi_v3_11_3::detail::value_t): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %r8d, %ebp movl %ecx, %r12d movq %rsi, %r14 movq %rdi, %rbx imulq $0x18, %rdx, %r13 leaq (%rsi,%r13), %r15 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rsi, %rdi movq %r15, %rsi callq 0x73a16 testb %r12b, %r12b jne 0x59978 cmpb $0x2, %bpl setne %cl cmpb $0x1, %bpl setne %dl orb %al, %dl je 0x599fc andb %cl, %al testb %al, %al je 0x599c8 movb $0x1, (%rbx) callq 0x2b266 movq %rax, 0x8(%rbx) leaq 0x8(%rsp), %r15 testq %r13, %r13 je 0x599e2 movq %r15, %rdi movq %r14, %rsi callq 0x73a28 movq 0x8(%rbx), %rdi movq 0x10(%rsp), %rax movq (%rax), %rdx movq 0x8(%rdx), %rsi addq $0x10, %rdx callq 0x311a0 movq %r15, %rdi callq 0x2a632 addq $0x18, %r14 addq $-0x18, %r13 jmp 0x5998d movb $0x2, (%rbx) leaq 0x8(%rsp), %rdi movq %r14, (%rdi) movq %rsp, %rsi movq %r15, (%rsi) callq 0x73a4a movq %rax, 0x8(%rbx) pushq $0x1 popq %rsi movq %rbx, %rdi callq 0x2b16e addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x20 popq %rdi callq 0x213a0 movq %rax, %r14 leaq 0x44641(%rip), %rsi # 0x9e04f leaq 0x8(%rsp), %rdi movq %rsp, %rdx callq 0x2a484 movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %r14, %rdi movl $0x12d, %esi # imm = 0x12D xorl %ecx, %ecx callq 0x4e42c xorl %ebp, %ebp leaq 0x80515(%rip), %rsi # 0xd9f50 leaq -0x2c236(%rip), %rdx # 0x2d80c movq %r14, %rdi callq 0x21b70 jmp 0x59a50 jmp 0x59a50 jmp 0x59a50 movq %rax, %r15 jmp 0x59a83 movq %rax, %r15 leaq 0x8(%rsp), %rdi callq 0x2a632 jmp 0x59a83 movq %rax, %r15 leaq 0x8(%rsp), %rdi callq 0x21dc8 testb %bpl, %bpl jne 0x59a7b jmp 0x59a83 movq %rax, %r15 movq %r14, %rdi callq 0x21530 movq %rbx, %rdi callq 0x2fe74 movq %r15, %rdi callq 0x21be0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ESt16initializer_listINS0_6detail8json_refISD_EEEbNSF_7value_tE: push rbp; int push r15; char push r14; int push r13; int push r12; int push rbx; char sub rsp, 28h mov ebp, r8d mov r12d, ecx mov r14, rsi mov rbx, rdi imul r13, rdx, 18h lea r15, [rsi+r13] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov rdi, rsi mov rsi, r15 call _ZSt6all_ofIPKN8nlohmann16json_abi_v3_11_36detail8json_refINS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEZNSG_C1ESt16initializer_listISH_EbNS2_7value_tEEUlRSI_E_EbT_SP_T0_; std::all_of<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&)#1}) test r12b, r12b jnz short loc_59978 cmp bpl, 2 setnz cl cmp bpl, 1 setnz dl or dl, al jz loc_599FC and al, cl loc_59978: test al, al jz short loc_599C8 mov byte ptr [rbx], 1 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<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>>>>>() mov [rbx+8], rax lea r15, [rsp+58h+var_50] loc_5998D: test r13, r13 jz short loc_599E2 mov rdi, r15 mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv; nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::moved_or_copied(void) mov rdi, [rbx+8] mov rax, [rsp+58h+var_48] mov rdx, [rax] mov rsi, [rdx+8] add rdx, 10h 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 rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() add r14, 18h add r13, 0FFFFFFFFFFFFFFE8h jmp short loc_5998D loc_599C8: mov byte ptr [rbx], 2 lea rdi, [rsp+58h+var_50] mov [rdi], r14 mov rsi, rsp mov [rsi], r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createIS3_ISD_SaISD_EEJPKNS0_6detail8json_refISD_EESL_EEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*>(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const* &&) mov [rbx+8], rax loc_599E2: push 1 pop rsi mov rdi, rbx call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_599FC: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aCannotCreateOb; "cannot create object from initializer l"... lea rdi, [rsp+58h+var_50] mov rdx, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov bpl, 1 lea rdx, [rsp+58h+var_50] mov rdi, r14; this mov esi, 12Dh; int xor ecx, ecx call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short loc_59A50 jmp short loc_59A50 jmp short $+2 loc_59A50: mov r15, rax jmp short loc_59A83 mov r15, rax lea rdi, [rsp+58h+var_50] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvED2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::~basic_json() jmp short loc_59A83 mov r15, rax lea rdi, [rsp+58h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_59A7B jmp short loc_59A83 mov r15, rax loc_59A7B: mov rdi, r14; void * call ___cxa_free_exception loc_59A83: mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r15 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( long long a1, long long a2, long long a3, char a4, char a5) { long long v7; // r14 long long v8; // r13 long long v9; // r15 unsigned __int8 v10; // al long long result; // rax nlohmann::json_abi_v3_11_3::detail::type_error *exception; // r14 long long v13; // [rsp+0h] [rbp-58h] BYREF long long v14; // [rsp+8h] [rbp-50h] BYREF long long v15; // [rsp+10h] [rbp-48h] v7 = a2; v8 = 24 * a3; v9 = a2 + 24 * a3; *(_OWORD *)a1 = 0LL; v10 = std::all_of<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::{lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const&)#1}>( a2, v9); if ( !a4 ) { if ( !(v10 | (a5 != 1)) ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); std::string::basic_string<std::allocator<char>>(&v14, (long long)"cannot create object from initializer list"); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( exception, 301, (long long)&v14); __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); } v10 &= a5 != 2; } if ( v10 ) { *(_BYTE *)a1 = 1; result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<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>>>>>(); *(_QWORD *)(a1 + 8) = result; while ( v8 ) { nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::moved_or_copied( &v14, v7); 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( *(long long **)(a1 + 8), *(_QWORD *)(*(_QWORD *)v15 + 8LL), *(_QWORD *)v15 + 16LL); result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::~basic_json((long long)&v14); v7 += 24LL; v8 -= 24LL; } } else { *(_BYTE *)a1 = 2; v14 = a2; v13 = v9; result = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>> const*>( &v14, &v13); *(_QWORD *)(a1 + 8) = result; } nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); return result; }
basic_json: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBP,R8D MOV R12D,ECX MOV R14,RSI MOV RBX,RDI IMUL R13,RDX,0x18 LEA R15,[RSI + R13*0x1] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 LAB_00159950: MOV RDI,RSI MOV RSI,R15 CALL 0x00173a16 TEST R12B,R12B JNZ 0x00159978 CMP BPL,0x2 SETNZ CL CMP BPL,0x1 SETNZ DL OR DL,AL JZ 0x001599fc AND AL,CL LAB_00159978: TEST AL,AL JZ 0x001599c8 MOV byte ptr [RBX],0x1 LAB_0015997f: CALL 0x0012b266 MOV qword ptr [RBX + 0x8],RAX LEA R15,[RSP + 0x8] LAB_0015998d: TEST R13,R13 JZ 0x001599e2 LAB_00159992: MOV RDI,R15 MOV RSI,R14 CALL 0x00173a28 MOV RDI,qword ptr [RBX + 0x8] MOV RAX,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RAX] MOV RSI,qword ptr [RDX + 0x8] ADD RDX,0x10 LAB_001599b1: CALL 0x001311a0 MOV RDI,R15 CALL 0x0012a632 ADD R14,0x18 ADD R13,-0x18 JMP 0x0015998d LAB_001599c8: MOV byte ptr [RBX],0x2 LEA RDI,[RSP + 0x8] MOV qword ptr [RDI],R14 MOV RSI,RSP MOV qword ptr [RSI],R15 LAB_001599d9: CALL 0x00173a4a LAB_001599de: MOV qword ptr [RBX + 0x8],RAX LAB_001599e2: PUSH 0x1 POP RSI MOV RDI,RBX CALL 0x0012b16e ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001599fc: PUSH 0x20 POP RDI CALL 0x001213a0 MOV R14,RAX LAB_00159a07: LEA RSI,[0x19e04f] LEA RDI,[RSP + 0x8] MOV RDX,RSP CALL 0x0012a484 MOV BPL,0x1 LAB_00159a1e: LEA RDX,[RSP + 0x8] MOV RDI,R14 MOV ESI,0x12d XOR ECX,ECX CALL 0x0014e42c XOR EBP,EBP LEA RSI,[0x1d9f50] LEA RDX,[0x12d80c] MOV RDI,R14 CALL 0x00121b70
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >, bool, nlohmann::json_abi_v3_11_3::detail::value_t) */ void nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(int8 *param_1,json_ref *param_2,long param_3,char param_4,char param_5) { bool bVar1; ordered_map *poVar2; vector *pvVar3; int8 uVar4; json_ref *local_58; json_ref *local_50; long *local_48; param_3 = param_3 * 0x18; *param_1 = 0; param_1[1] = 0; /* try { // try from 00159950 to 0015995a has its CatchHandler @ 00159a4e */ bVar1 = std:: all_of<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>::json_ref(std::initializer_list<nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,bool,nlohmann::json_abi_v3_11_3::detail::value_t)::_lambda(nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const&)_1_> (param_2,param_2 + param_3); if (param_4 == '\0') { if (param_5 == '\x01' && !bVar1) { uVar4 = __cxa_allocate_exception(0x20); /* try { // try from 00159a07 to 00159a1a has its CatchHandler @ 00159a78 */ std::__cxx11::string::string<std::allocator<char>> ((string *)&local_50,"cannot create object from initializer list", (allocator *)&local_58); /* try { // try from 00159a1e to 00159a49 has its CatchHandler @ 00159a64 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (uVar4,0x12d,&local_50,0); /* WARNING: Subroutine does not return */ __cxa_throw(uVar4,&detail::type_error::typeinfo,detail::exception::~exception); } bVar1 = bVar1 && param_5 != '\x02'; } if (bVar1 == false) { *(int1 *)param_1 = 2; local_58 = param_2 + param_3; local_50 = param_2; /* try { // try from 001599d9 to 001599dd has its CatchHandler @ 00159a4a */ pvVar3 = create<std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*,nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>const*> (&local_50,&local_58); param_1[1] = pvVar3; } else { *(int1 *)param_1 = 1; /* try { // try from 0015997f to 00159983 has its CatchHandler @ 00159a4c */ poVar2 = create<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>>>>> (); param_1[1] = poVar2; for (; param_3 != 0; param_3 = param_3 + -0x18) { /* try { // try from 00159992 to 0015999c has its CatchHandler @ 00159a50 */ detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::moved_or_copied(); /* try { // try from 001599b1 to 001599b5 has its CatchHandler @ 00159a55 */ ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::emplace((ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)param_1[1],*(string **)(*local_48 + 8),(basic_json *)(*local_48 + 0x10)); ~basic_json((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_50); } } assert_invariant(SUB81(param_1,0)); return; }
46,855
testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(testing::UnitTest const&)
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void PrettyUnitTestResultPrinter::PrintSkippedTests(const UnitTest& unit_test) { const int skipped_test_count = unit_test.skipped_test_count(); if (skipped_test_count == 0) { return; } for (int i = 0; i < unit_test.total_test_suite_count(); ++i) { const TestSuite& test_suite = *unit_test.GetTestSuite(i); if (!test_suite.should_run() || (test_suite.skipped_test_count() == 0)) { continue; } for (int j = 0; j < test_suite.total_test_count(); ++j) { const TestInfo& test_info = *test_suite.GetTestInfo(j); if (!test_info.should_run() || !test_info.result()->Skipped()) { continue; } ColoredPrintf(GTestColor::kGreen, "[ SKIPPED ] "); printf("%s.%s", test_suite.name(), test_info.name()); printf("\n"); } } }
O1
cpp
testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(testing::UnitTest const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x40(%rdi), %rdi callq 0x207d2 testl %eax, %eax je 0x275cc movq 0x40(%rbx), %rcx movq 0xb8(%rcx), %rax movq 0xc0(%rcx), %rdx subq %rax, %rdx shrq $0x3, %rdx testl %edx, %edx jle 0x275cc leaq 0x1c161(%rip), %r15 # 0x43604 xorl %r13d, %r13d movq 0xd0(%rcx), %rdx movq 0xd8(%rcx), %rcx subq %rdx, %rcx shrq $0x2, %rcx movslq %ecx, %rcx cmpq %rcx, %r13 jge 0x274d0 cmpl $0x0, (%rdx,%r13,4) js 0x274d0 movq (%rax,%r13,8), %r12 jmp 0x274d3 xorl %r12d, %r12d cmpb $0x1, 0x70(%r12) jne 0x275a4 movq %r12, %rdi callq 0x20822 testl %eax, %eax je 0x275a4 movq 0x30(%r12), %rax movq 0x38(%r12), %rcx subq %rax, %rcx shrq $0x3, %rcx testl %ecx, %ecx jle 0x275a4 xorl %ebp, %ebp movq 0x48(%r12), %rcx movq 0x50(%r12), %rdx subq %rcx, %rdx shrq $0x2, %rdx movslq %edx, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF cmpq %rsi, %rbp jge 0x2752b movl (%rcx,%rbp,4), %edx testl %edx, %edx js 0x27537 movl %edx, %ecx movq (%rax,%rcx,8), %r14 jmp 0x2753a xorl %r14d, %r14d cmpb $0x1, 0x80(%r14) jne 0x27584 leaq 0x90(%r14), %rdi callq 0x2417c testb %al, %al je 0x27584 movl $0x2, %edi leaq 0x1c050(%rip), %rsi # 0x435b0 xorl %eax, %eax callq 0x26396 movq 0x8(%r12), %rsi movq 0x20(%r14), %rdx movq %r15, %rdi xorl %eax, %eax callq 0x9080 movl $0xa, %edi callq 0x97a0 incq %rbp movq 0x30(%r12), %rax movq 0x38(%r12), %rcx subq %rax, %rcx shrq $0x3, %rcx movslq %ecx, %rcx cmpq %rcx, %rbp jl 0x2750a incq %r13 movq 0x40(%rbx), %rcx movq 0xb8(%rcx), %rax movq 0xc0(%rcx), %rdx subq %rax, %rdx shrq $0x3, %rdx movslq %edx, %rdx cmpq %rdx, %r13 jl 0x274a6 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN7testing8internal27PrettyUnitTestResultPrinter17PrintSkippedTestsERKNS_8UnitTestE: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov rdi, [rdi+40h]; this call _ZNK7testing8internal12UnitTestImpl18skipped_test_countEv; testing::internal::UnitTestImpl::skipped_test_count(void) test eax, eax jz loc_275CC mov rcx, [rbx+40h] mov rax, [rcx+0B8h] mov rdx, [rcx+0C0h] sub rdx, rax shr rdx, 3 test edx, edx jle loc_275CC lea r15, aSS_0; "%s.%s" xor r13d, r13d loc_274A6: mov rdx, [rcx+0D0h] mov rcx, [rcx+0D8h] sub rcx, rdx shr rcx, 2 movsxd rcx, ecx cmp r13, rcx jge short loc_274D0 cmp dword ptr [rdx+r13*4], 0 js short loc_274D0 mov r12, [rax+r13*8] jmp short loc_274D3 loc_274D0: xor r12d, r12d loc_274D3: cmp byte ptr [r12+70h], 1 jnz loc_275A4 mov rdi, r12; this call _ZNK7testing9TestSuite18skipped_test_countEv; testing::TestSuite::skipped_test_count(void) test eax, eax jz loc_275A4 mov rax, [r12+30h] mov rcx, [r12+38h] sub rcx, rax shr rcx, 3 test ecx, ecx jle loc_275A4 xor ebp, ebp loc_2750A: mov rcx, [r12+48h] mov rdx, [r12+50h] sub rdx, rcx shr rdx, 2 movsxd rsi, edx mov edx, 0FFFFFFFFh cmp rbp, rsi jge short loc_2752B mov edx, [rcx+rbp*4] loc_2752B: test edx, edx js short loc_27537 mov ecx, edx mov r14, [rax+rcx*8] jmp short loc_2753A loc_27537: xor r14d, r14d loc_2753A: cmp byte ptr [r14+80h], 1 jnz short loc_27584 lea rdi, [r14+90h]; this call _ZNK7testing10TestResult7SkippedEv; testing::TestResult::Skipped(void) test al, al jz short loc_27584 mov edi, 2 lea rsi, aSkipped_0; "[ SKIPPED ] " xor eax, eax call _ZN7testing8internalL13ColoredPrintfENS0_12_GLOBAL__N_110GTestColorEPKcz; testing::internal::ColoredPrintf(testing::internal::`anonymous namespace'::GTestColor,char const*,...) mov rsi, [r12+8] mov rdx, [r14+20h] mov rdi, r15 xor eax, eax call _printf mov edi, 0Ah call _putchar loc_27584: inc rbp mov rax, [r12+30h] mov rcx, [r12+38h] sub rcx, rax shr rcx, 3 movsxd rcx, ecx cmp rbp, rcx jl loc_2750A loc_275A4: inc r13 mov rcx, [rbx+40h] mov rax, [rcx+0B8h] mov rdx, [rcx+0C0h] sub rdx, rax shr rdx, 3 movsxd rdx, edx cmp r13, rdx jl loc_274A6 loc_275CC: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests( testing::internal::UnitTestImpl **this, const testing::UnitTest *a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { char v10; // al long long result; // rax testing::internal::UnitTestImpl *v12; // rcx long long v13; // r13 long long v14; // rdx long long v15; // r12 long long v16; // rax long long v17; // rbp long long v18; // rcx int v19; // edx long long v20; // r14 long long v21; // rdx long long v22; // rcx long long v23; // r8 long long v24; // r9 __m128 v25; // xmm4 __m128 v26; // xmm5 char v27; // [rsp-8h] [rbp-38h] v27 = v10; result = testing::internal::UnitTestImpl::skipped_test_count(this[8]); if ( (_DWORD)result ) { v12 = this[8]; result = *((_QWORD *)v12 + 23); if ( (int)((unsigned long long)(*((_QWORD *)v12 + 24) - result) >> 3) > 0 ) { v13 = 0LL; do { v14 = *((_QWORD *)v12 + 26); if ( v13 >= (int)((unsigned long long)(*((_QWORD *)v12 + 27) - v14) >> 2) || *(int *)(v14 + 4 * v13) < 0 ) v15 = 0LL; else v15 = *(_QWORD *)(result + 8 * v13); if ( *(_BYTE *)(v15 + 112) == 1 ) { if ( (unsigned int)testing::TestSuite::skipped_test_count((testing::TestSuite *)v15) ) { v16 = *(_QWORD *)(v15 + 48); if ( (int)((unsigned long long)(*(_QWORD *)(v15 + 56) - v16) >> 3) > 0 ) { v17 = 0LL; do { v18 = *(_QWORD *)(v15 + 72); v19 = -1; if ( v17 < (int)((unsigned long long)(*(_QWORD *)(v15 + 80) - v18) >> 2) ) v19 = *(_DWORD *)(v18 + 4 * v17); if ( v19 < 0 ) v20 = 0LL; else v20 = *(_QWORD *)(v16 + 8LL * (unsigned int)v19); if ( *(_BYTE *)(v20 + 128) == 1 ) { if ( testing::TestResult::Skipped((testing::TestResult *)(v20 + 144)) ) { testing::internal::ColoredPrintf( 2, (long long)"[ SKIPPED ] ", v21, v22, v23, v24, a3, a4, a5, a6, v25, v26, a9, a10, v27); printf("%s.%s", *(const char **)(v15 + 8), *(const char **)(v20 + 32)); putchar(10LL); } } ++v17; v16 = *(_QWORD *)(v15 + 48); } while ( v17 < (int)((unsigned long long)(*(_QWORD *)(v15 + 56) - v16) >> 3) ); } } } ++v13; v12 = this[8]; result = *((_QWORD *)v12 + 23); } while ( v13 < (int)((unsigned long long)(*((_QWORD *)v12 + 24) - result) >> 3) ); } } return result; }
PrintSkippedTests: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x40] CALL 0x001207d2 TEST EAX,EAX JZ 0x001275cc MOV RCX,qword ptr [RBX + 0x40] MOV RAX,qword ptr [RCX + 0xb8] MOV RDX,qword ptr [RCX + 0xc0] SUB RDX,RAX SHR RDX,0x3 TEST EDX,EDX JLE 0x001275cc LEA R15,[0x143604] XOR R13D,R13D LAB_001274a6: MOV RDX,qword ptr [RCX + 0xd0] MOV RCX,qword ptr [RCX + 0xd8] SUB RCX,RDX SHR RCX,0x2 MOVSXD RCX,ECX CMP R13,RCX JGE 0x001274d0 CMP dword ptr [RDX + R13*0x4],0x0 JS 0x001274d0 MOV R12,qword ptr [RAX + R13*0x8] JMP 0x001274d3 LAB_001274d0: XOR R12D,R12D LAB_001274d3: CMP byte ptr [R12 + 0x70],0x1 JNZ 0x001275a4 MOV RDI,R12 CALL 0x00120822 TEST EAX,EAX JZ 0x001275a4 MOV RAX,qword ptr [R12 + 0x30] MOV RCX,qword ptr [R12 + 0x38] SUB RCX,RAX SHR RCX,0x3 TEST ECX,ECX JLE 0x001275a4 XOR EBP,EBP LAB_0012750a: MOV RCX,qword ptr [R12 + 0x48] MOV RDX,qword ptr [R12 + 0x50] SUB RDX,RCX SHR RDX,0x2 MOVSXD RSI,EDX MOV EDX,0xffffffff CMP RBP,RSI JGE 0x0012752b MOV EDX,dword ptr [RCX + RBP*0x4] LAB_0012752b: TEST EDX,EDX JS 0x00127537 MOV ECX,EDX MOV R14,qword ptr [RAX + RCX*0x8] JMP 0x0012753a LAB_00127537: XOR R14D,R14D LAB_0012753a: CMP byte ptr [R14 + 0x80],0x1 JNZ 0x00127584 LEA RDI,[R14 + 0x90] CALL 0x0012417c TEST AL,AL JZ 0x00127584 MOV EDI,0x2 LEA RSI,[0x1435b0] XOR EAX,EAX CALL 0x00126396 MOV RSI,qword ptr [R12 + 0x8] MOV RDX,qword ptr [R14 + 0x20] MOV RDI,R15 XOR EAX,EAX CALL 0x00109080 MOV EDI,0xa CALL 0x001097a0 LAB_00127584: INC RBP MOV RAX,qword ptr [R12 + 0x30] MOV RCX,qword ptr [R12 + 0x38] SUB RCX,RAX SHR RCX,0x3 MOVSXD RCX,ECX CMP RBP,RCX JL 0x0012750a LAB_001275a4: INC R13 MOV RCX,qword ptr [RBX + 0x40] MOV RAX,qword ptr [RCX + 0xb8] MOV RDX,qword ptr [RCX + 0xc0] SUB RDX,RAX SHR RDX,0x3 MOVSXD RDX,EDX CMP R13,RDX JL 0x001274a6 LAB_001275cc: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(testing::UnitTest const&) */ void testing::internal::PrettyUnitTestResultPrinter::PrintSkippedTests(UnitTest *param_1) { char cVar1; int iVar2; long lVar3; uint uVar4; long lVar5; TestSuite *this; long lVar6; iVar2 = UnitTestImpl::skipped_test_count(*(UnitTestImpl **)(param_1 + 0x40)); if (iVar2 != 0) { lVar3 = *(long *)(param_1 + 0x40); lVar5 = *(long *)(lVar3 + 0xb8); if (0 < (int)((ulong)(*(long *)(lVar3 + 0xc0) - lVar5) >> 3)) { lVar6 = 0; do { if ((lVar6 < (int)((ulong)(*(long *)(lVar3 + 0xd8) - *(long *)(lVar3 + 0xd0)) >> 2)) && (-1 < *(int *)(*(long *)(lVar3 + 0xd0) + lVar6 * 4))) { this = *(TestSuite **)(lVar5 + lVar6 * 8); } else { this = (TestSuite *)0x0; } if (this[0x70] == (TestSuite)0x1) { iVar2 = TestSuite::skipped_test_count(this); if ((iVar2 != 0) && (lVar3 = *(long *)(this + 0x30), 0 < (int)((ulong)(*(long *)(this + 0x38) - lVar3) >> 3))) { lVar5 = 0; do { uVar4 = 0xffffffff; if (lVar5 < (int)((ulong)(*(long *)(this + 0x50) - *(long *)(this + 0x48)) >> 2)) { uVar4 = *(uint *)(*(long *)(this + 0x48) + lVar5 * 4); } if ((int)uVar4 < 0) { lVar3 = 0; } else { lVar3 = *(long *)(lVar3 + (ulong)uVar4 * 8); } if (*(char *)(lVar3 + 0x80) == '\x01') { cVar1 = TestResult::Skipped((TestResult *)(lVar3 + 0x90)); if (cVar1 != '\0') { ColoredPrintf(2,"[ SKIPPED ] "); printf("%s.%s",*(int8 *)(this + 8),*(int8 *)(lVar3 + 0x20)); putchar(10); } } lVar5 = lVar5 + 1; lVar3 = *(long *)(this + 0x30); } while (lVar5 < (int)((ulong)(*(long *)(this + 0x38) - lVar3) >> 3)); } } lVar6 = lVar6 + 1; lVar3 = *(long *)(param_1 + 0x40); lVar5 = *(long *)(lVar3 + 0xb8); } while (lVar6 < (int)((ulong)(*(long *)(lVar3 + 0xc0) - lVar5) >> 3)); } } return; }
46,856
mysql_stmt_fetch_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stmt_fetch_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stmt_fetch, (parms->stmt), parms->stmt->mysql, int, r_int) }
O0
c
mysql_stmt_fetch_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 0x38(%rax), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0x2bbb0 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 nopw (%rax,%rax)
mysql_stmt_fetch_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+38h] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] call mysql_stmt_fetch 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_stmt_fetch_start_internal(long long *a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(*a1 + 56) + 1152LL) + 40LL); v2[2] = mysql_stmt_fetch(*a1); result = v2; *v2 = 0; return result; }
mysql_stmt_fetch_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 + 0x38] 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] CALL 0x0012bbb0 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_stmt_fetch_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28); uVar2 = mysql_stmt_fetch(*param_1); puVar1[2] = uVar2; *puVar1 = 0; return; }
46,857
js_calloc
bluesky950520[P]quickjs/quickjs.c
void *js_calloc(JSContext *ctx, size_t count, size_t size) { void *ptr; ptr = js_calloc_rt(ctx->rt, count, size); if (unlikely(!ptr)) { JS_ThrowOutOfMemory(ctx); return NULL; } return ptr; }
O0
c
js_calloc: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) movq 0x28(%rsp), %rax movq 0x18(%rax), %rdi movq 0x20(%rsp), %rsi movq 0x18(%rsp), %rdx callq 0x20490 movq %rax, 0x10(%rsp) cmpq $0x0, 0x10(%rsp) setne %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x2093a movq 0x28(%rsp), %rdi callq 0x20950 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movq $0x0, 0x30(%rsp) jmp 0x20944 movq 0x10(%rsp), %rax movq %rax, 0x30(%rsp) movq 0x30(%rsp), %rax addq $0x38, %rsp retq nop
js_calloc: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_20], rdx mov rax, [rsp+38h+var_10] mov rdi, [rax+18h] mov rsi, [rsp+38h+var_18] mov rdx, [rsp+38h+var_20] call js_calloc_rt mov [rsp+38h+var_28], rax cmp [rsp+38h+var_28], 0 setnz al xor al, 0FFh xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_2093A mov rdi, [rsp+38h+var_10] call JS_ThrowOutOfMemory mov [rsp+38h+var_38], rax mov [rsp+38h+var_30], rdx mov [rsp+38h+var_8], 0 jmp short loc_20944 loc_2093A: mov rax, [rsp+38h+var_28] mov [rsp+38h+var_8], rax loc_20944: mov rax, [rsp+38h+var_8] add rsp, 38h retn
long long js_calloc(long long a1, long long a2, unsigned long long a3) { long long v4; // [rsp+10h] [rbp-28h] v4 = js_calloc_rt(*(_QWORD *)(a1 + 24), a2, a3); if ( v4 ) return v4; JS_ThrowOutOfMemory(a1); return 0LL; }
js_calloc: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x20] MOV RDX,qword ptr [RSP + 0x18] CALL 0x00120490 MOV qword ptr [RSP + 0x10],RAX CMP qword ptr [RSP + 0x10],0x0 SETNZ AL XOR AL,0xff XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0012093a MOV RDI,qword ptr [RSP + 0x28] CALL 0x00120950 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV qword ptr [RSP + 0x30],0x0 JMP 0x00120944 LAB_0012093a: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x30],RAX LAB_00120944: MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0x38 RET
long js_calloc(long param_1,int8 param_2,int8 param_3) { long local_8; local_8 = js_calloc_rt(*(int8 *)(param_1 + 0x18),param_2,param_3); if (local_8 == 0) { JS_ThrowOutOfMemory(param_1); local_8 = 0; } return local_8; }
46,858
js_calloc
bluesky950520[P]quickjs/quickjs.c
void *js_calloc(JSContext *ctx, size_t count, size_t size) { void *ptr; ptr = js_calloc_rt(ctx->rt, count, size); if (unlikely(!ptr)) { JS_ThrowOutOfMemory(ctx); return NULL; } return ptr; }
O1
c
js_calloc: pushq %rbx movq %rdi, %rbx movq 0x18(%rdi), %rdi callq 0xec78 testq %rax, %rax je 0xed51 popq %rbx retq movq %rbx, %rdi callq 0x1bf4f xorl %eax, %eax jmp 0xed4f
js_calloc: push rbx mov rbx, rdi mov rdi, [rdi+18h] call js_calloc_rt test rax, rax jz short loc_ED51 loc_ED4F: pop rbx retn loc_ED51: mov rdi, rbx call JS_ThrowOutOfMemory xor eax, eax jmp short loc_ED4F
long long js_calloc(long long a1, unsigned long long a2, unsigned long long a3) { long long result; // rax result = js_calloc_rt(*(_QWORD *)(a1 + 24), a2, a3); if ( !result ) { JS_ThrowOutOfMemory(a1); return 0LL; } return result; }
js_calloc: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x18] CALL 0x0010ec78 TEST RAX,RAX JZ 0x0010ed51 LAB_0010ed4f: POP RBX RET LAB_0010ed51: MOV RDI,RBX CALL 0x0011bf4f XOR EAX,EAX JMP 0x0010ed4f
long js_calloc(long param_1) { long lVar1; lVar1 = js_calloc_rt(*(int8 *)(param_1 + 0x18)); if (lVar1 == 0) { JS_ThrowOutOfMemory(param_1); lVar1 = 0; } return lVar1; }
46,859
Settings::Settings()
666mxvbee[P]BattleShip/lib/Settings/Settings.cpp
Settings::Settings() : mode(""), width(0), height(0), start(false), stop(false), exitFlag(false), haveLastShot(false), lastShotX(0), lastShotY(0), lastResult("") {}
O1
cpp
Settings::Settings(): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, 0x10(%rdi) movups %xmm0, (%rdi) xorl %r15d, %r15d movq %r15, 0x20(%rdi) addq $0x28, %rdi leaq 0x38(%rbx), %r13 movq %r13, 0x28(%rbx) leaq 0x1579f(%rip), %r14 # 0x1b8e3 movq %r14, %rsi movq %r14, %rdx callq 0x603a leaq 0x68(%rbx), %rax movl %r15d, 0x68(%rbx) movq %r15, 0x70(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x48(%rbx) movl %r15d, 0x57(%rbx) movq %rax, 0x78(%rbx) movq %rax, 0x80(%rbx) leaq 0xd8(%rbx), %rdi leaq 0xe8(%rbx), %rax movups %xmm0, 0x88(%rbx) movups %xmm0, 0x98(%rbx) movups %xmm0, 0xa8(%rbx) movups %xmm0, 0xb1(%rbx) movups %xmm0, 0xc8(%rbx) movq %rax, 0xd8(%rbx) movq %r14, %rsi movq %r14, %rdx callq 0x603a popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 leaq 0xa8(%rbx), %rdi leaq 0x90(%rbx), %r15 leaq 0x60(%rbx), %r12 callq 0x5f5a movq %r15, %rdi callq 0x5f5a movq %r12, %rdi callq 0x5fea movq 0x28(%rbx), %rdi cmpq %r13, %rdi je 0x61fd movq (%r13), %rsi incq %rsi callq 0x53a0 movq %r14, %rdi callq 0x5600 nop
_ZN8SettingsC2Ev: push r15; Alternative name is 'Settings::Settings(void)' push r14 push r13 push r12 push rbx mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi+10h], xmm0 movups xmmword ptr [rdi], xmm0 xor r15d, r15d mov [rdi+20h], r15 add rdi, 28h ; '(' lea r13, [rbx+38h] mov [rbx+28h], r13 lea r14, aMasterSlaveShi+29h; "" mov rsi, r14 mov rdx, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rax, [rbx+68h] mov [rbx+68h], r15d mov [rbx+70h], r15 xorps xmm0, xmm0 movups xmmword ptr [rbx+48h], xmm0 mov [rbx+57h], r15d mov [rbx+78h], rax mov [rbx+80h], rax lea rdi, [rbx+0D8h] lea rax, [rbx+0E8h] movups xmmword ptr [rbx+88h], xmm0 movups xmmword ptr [rbx+98h], xmm0 movups xmmword ptr [rbx+0A8h], xmm0 movups xmmword ptr [rbx+0B1h], xmm0 movups xmmword ptr [rbx+0C8h], xmm0 mov [rbx+0D8h], rax mov rsi, r14 mov rdx, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax lea rdi, [rbx+0A8h] lea r15, [rbx+90h] lea r12, [rbx+60h] call _ZNSt6vectorI4ShipSaIS0_EED2Ev; std::vector<Ship>::~vector() mov rdi, r15 call _ZNSt6vectorI4ShipSaIS0_EED2Ev; std::vector<Ship>::~vector() mov rdi, r12 call _ZNSt8_Rb_treeIiSt4pairIKimESt10_Select1stIS2_ESt4lessIiESaIS2_EED2Ev; std::_Rb_tree<int,std::pair<int const,ulong>,std::_Select1st<std::pair<int const,ulong>>,std::less<int>,std::allocator<std::pair<int const,ulong>>>::~_Rb_tree() mov rdi, [rbx+28h]; void * cmp rdi, r13 jz short loc_61FD mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_61FD: mov rdi, r14 call __Unwind_Resume
void Settings::Settings(Settings *this) { *((_OWORD *)this + 1) = 0LL; *(_OWORD *)this = 0LL; *((_QWORD *)this + 4) = 0LL; *((_QWORD *)this + 5) = (char *)this + 56; std::string::_M_construct<char const*>((_QWORD *)this + 5, "", (long long)""); *((_DWORD *)this + 26) = 0; *((_QWORD *)this + 14) = 0LL; *(_OWORD *)((char *)this + 72) = 0LL; *(_DWORD *)((char *)this + 87) = 0; *((_QWORD *)this + 15) = (char *)this + 104; *((_QWORD *)this + 16) = (char *)this + 104; *(_OWORD *)((char *)this + 136) = 0LL; *(_OWORD *)((char *)this + 152) = 0LL; *(_OWORD *)((char *)this + 168) = 0LL; *(_OWORD *)((char *)this + 177) = 0LL; *(_OWORD *)((char *)this + 200) = 0LL; *((_QWORD *)this + 27) = (char *)this + 232; std::string::_M_construct<char const*>((_QWORD *)this + 27, "", (long long)""); }
Settings: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOVUPS xmmword ptr [RDI],XMM0 XOR R15D,R15D MOV qword ptr [RDI + 0x20],R15 ADD RDI,0x28 LEA R13,[RBX + 0x38] MOV qword ptr [RBX + 0x28],R13 LEA R14,[0x11b8e3] MOV RSI,R14 MOV RDX,R14 CALL 0x0010603a LEA RAX,[RBX + 0x68] MOV dword ptr [RBX + 0x68],R15D MOV qword ptr [RBX + 0x70],R15 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOV dword ptr [RBX + 0x57],R15D MOV qword ptr [RBX + 0x78],RAX MOV qword ptr [RBX + 0x80],RAX LEA RDI,[RBX + 0xd8] LEA RAX,[RBX + 0xe8] MOVUPS xmmword ptr [RBX + 0x88],XMM0 MOVUPS xmmword ptr [RBX + 0x98],XMM0 MOVUPS xmmword ptr [RBX + 0xa8],XMM0 MOVUPS xmmword ptr [RBX + 0xb1],XMM0 MOVUPS xmmword ptr [RBX + 0xc8],XMM0 MOV qword ptr [RBX + 0xd8],RAX LAB_001061a9: MOV RSI,R14 MOV RDX,R14 CALL 0x0010603a LAB_001061b4: POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* Settings::Settings() */ void __thiscall Settings::Settings(Settings *this) { *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x20) = 0; *(Settings **)(this + 0x28) = this + 0x38; std::__cxx11::string::_M_construct<char_const*>(this + 0x28,"",""); *(int4 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(int8 *)(this + 0x48) = 0; *(int8 *)(this + 0x50) = 0; *(int4 *)(this + 0x57) = 0; *(Settings **)(this + 0x78) = this + 0x68; *(Settings **)(this + 0x80) = this + 0x68; *(int8 *)(this + 0x88) = 0; *(int8 *)(this + 0x90) = 0; *(int8 *)(this + 0x98) = 0; *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0; *(int8 *)(this + 0xb0) = 0; *(int8 *)(this + 0xb1) = 0; *(int8 *)(this + 0xb9) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; *(Settings **)(this + 0xd8) = this + 0xe8; /* try { // try from 001061a9 to 001061b3 has its CatchHandler @ 001061be */ std::__cxx11::string::_M_construct<char_const*>(this + 0xd8,"",""); return; }
46,860
maria_ft_parse
eloqsql/storage/maria/ma_ft_parser.c
int maria_ft_parse(TREE *wtree, uchar *doc, int doclen, struct st_mysql_ftparser *parser, MYSQL_FTPARSER_PARAM *param, MEM_ROOT *mem_root) { MY_FT_PARSER_PARAM my_param; DBUG_ENTER("maria_ft_parse"); DBUG_ASSERT(parser); my_param.wtree= wtree; my_param.mem_root= mem_root; param->mysql_parse= maria_ft_parse_internal; param->mysql_add_word= maria_ft_add_word; param->mysql_ftparam= &my_param; param->cs= wtree->custom_arg; param->doc= (char*)doc; param->length= doclen; param->mode= MYSQL_FTPARSER_SIMPLE_MODE; DBUG_RETURN(parser->parse(param)); }
O0
c
maria_ft_parse: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) jmp 0x73531 movq -0x8(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x28(%rbp), %rax leaq 0x74(%rip), %rcx # 0x735c0 movq %rcx, (%rax) movq -0x28(%rbp), %rax leaq 0x116(%rip), %rcx # 0x73670 movq %rcx, 0x8(%rax) movq -0x28(%rbp), %rax leaq -0x40(%rbp), %rcx movq %rcx, 0x18(%rax) movq -0x8(%rbp), %rax movq 0x230(%rax), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x10(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, 0x28(%rax) movl -0x14(%rbp), %ecx movq -0x28(%rbp), %rax movl %ecx, 0x30(%rax) movq -0x28(%rbp), %rax movl $0x0, 0x38(%rax) movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq -0x28(%rbp), %rdi callq *%rax movl %eax, -0x44(%rbp) movl -0x44(%rbp), %eax addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
maria_ft_parse: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 jmp short $+2 loc_73531: mov rax, [rbp+var_8] mov [rbp+var_40], rax mov rax, [rbp+var_30] mov [rbp+var_38], rax mov rax, [rbp+var_28] lea rcx, maria_ft_parse_internal mov [rax], rcx mov rax, [rbp+var_28] lea rcx, maria_ft_add_word mov [rax+8], rcx mov rax, [rbp+var_28] lea rcx, [rbp+var_40] mov [rax+18h], rcx mov rax, [rbp+var_8] mov rcx, [rax+230h] mov rax, [rbp+var_28] mov [rax+20h], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_28] mov [rax+28h], rcx mov ecx, [rbp+var_14] mov rax, [rbp+var_28] mov [rax+30h], ecx mov rax, [rbp+var_28] mov dword ptr [rax+38h], 0 mov rax, [rbp+var_20] mov rax, [rax+8] mov rdi, [rbp+var_28] call rax mov [rbp+var_44], eax mov eax, [rbp+var_44] add rsp, 50h pop rbp retn
long long maria_ft_parse(long long a1, long long a2, int a3, long long a4, _QWORD *a5, long long a6) { _QWORD v7[3]; // [rsp+10h] [rbp-40h] BYREF _QWORD *v8; // [rsp+28h] [rbp-28h] long long v9; // [rsp+30h] [rbp-20h] int v10; // [rsp+3Ch] [rbp-14h] long long v11; // [rsp+40h] [rbp-10h] long long v12; // [rsp+48h] [rbp-8h] v12 = a1; v11 = a2; v10 = a3; v9 = a4; v8 = a5; v7[2] = a6; v7[0] = a1; v7[1] = a6; *a5 = maria_ft_parse_internal; v8[1] = maria_ft_add_word; v8[3] = v7; v8[4] = *(_QWORD *)(v12 + 560); v8[5] = v11; *((_DWORD *)v8 + 12) = v10; *((_DWORD *)v8 + 14) = 0; return (*(unsigned int ( **)(_QWORD *))(v9 + 8))(v8); }
maria_ft_parse: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 JMP 0x00173531 LAB_00173531: MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x1735c0] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[0x173670] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x28] LEA RCX,[RBP + -0x40] MOV qword ptr [RAX + 0x18],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x230] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX + 0x28],RCX MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x30],ECX MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX + 0x38],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RBP + -0x28] CALL RAX MOV dword ptr [RBP + -0x44],EAX MOV EAX,dword ptr [RBP + -0x44] ADD RSP,0x50 POP RBP RET
int4 maria_ft_parse(long param_1,int8 param_2,int4 param_3,long param_4,int8 *param_5, int8 param_6) { int4 uVar1; long local_48; int8 local_40; int8 local_38; int8 *local_30; long local_28; int4 local_1c; int8 local_18; long local_10; *param_5 = maria_ft_parse_internal; param_5[1] = maria_ft_add_word; param_5[3] = &local_48; param_5[4] = *(int8 *)(param_1 + 0x230); param_5[5] = param_2; *(int4 *)(param_5 + 6) = param_3; *(int4 *)(param_5 + 7) = 0; local_48 = param_1; local_40 = param_6; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; uVar1 = (**(code **)(param_4 + 8))(param_5); return uVar1; }
46,861
mi_read_static_record
eloqsql/storage/myisam/mi_statrec.c
int _mi_read_static_record(register MI_INFO *info, register my_off_t pos, register uchar *record) { int error; if (pos != HA_OFFSET_ERROR) { if (info->opt_flag & WRITE_CACHE_USED && info->rec_cache.pos_in_file <= pos && flush_io_cache(&info->rec_cache)) return(-1); info->rec_cache.seek_not_done=1; /* We have done a seek */ error=info->s->file_read(info, record, info->s->base.reclength, pos,MYF(MY_NABP)) != 0; fast_mi_writeinfo(info); if (! error) { if (!*record) { my_errno=HA_ERR_RECORD_DELETED; return(1); /* Record is deleted */ } info->update|= HA_STATE_AKTIV; /* Record is read */ return(0); } return(-1); /* Error on read */ } fast_mi_writeinfo(info); /* No such record */ return(-1); }
O3
c
mi_read_static_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdi, %rbx cmpq $-0x1, %rsi je 0x88c53 movq %rdx, %r14 movq %rsi, %r15 testb $0x10, 0x1c8(%rbx) je 0x88bf4 cmpq %r15, 0x220(%rbx) ja 0x88bf4 leaq 0x220(%rbx), %rdi movl $0x1, %esi callq 0x96b09 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testl %eax, %eax jne 0x88c82 movl $0x1, 0x300(%rbx) movq (%rbx), %rax movq 0x140(%rax), %rdx movl $0x4, %r8d movq %rbx, %rdi movq %r14, %rsi movq %r15, %rcx callq *0x2e0(%rax) movq %rax, %r15 movq (%rbx), %rax cmpl $0x0, 0x368(%rax) jne 0x88c36 movq %rbx, %rdi xorl %esi, %esi callq 0x7e2a6 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testq %r15, %r15 jne 0x88c82 cmpb $0x0, (%r14) je 0x88c71 orb $0x2, 0x1d0(%rbx) xorl %r12d, %r12d jmp 0x88c82 movq (%rbx), %rax movl $0xffffffff, %r12d # imm = 0xFFFFFFFF cmpl $0x0, 0x368(%rax) jne 0x88c82 movq %rbx, %rdi xorl %esi, %esi callq 0x7e2a6 jmp 0x88c82 callq 0xa319a movl $0x86, (%rax) movl $0x1, %r12d movl %r12d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_mi_read_static_record: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rdi cmp rsi, 0FFFFFFFFFFFFFFFFh jz loc_88C53 mov r14, rdx mov r15, rsi test byte ptr [rbx+1C8h], 10h jz short loc_88BF4 cmp [rbx+220h], r15 ja short loc_88BF4 lea rdi, [rbx+220h] mov esi, 1 call my_b_flush_io_cache mov r12d, 0FFFFFFFFh test eax, eax jnz loc_88C82 loc_88BF4: mov dword ptr [rbx+300h], 1 mov rax, [rbx] mov rdx, [rax+140h] mov r8d, 4 mov rdi, rbx mov rsi, r14 mov rcx, r15 call qword ptr [rax+2E0h] mov r15, rax mov rax, [rbx] cmp dword ptr [rax+368h], 0 jnz short loc_88C36 mov rdi, rbx xor esi, esi call _mi_writeinfo loc_88C36: mov r12d, 0FFFFFFFFh test r15, r15 jnz short loc_88C82 cmp byte ptr [r14], 0 jz short loc_88C71 or byte ptr [rbx+1D0h], 2 xor r12d, r12d jmp short loc_88C82 loc_88C53: mov rax, [rbx] mov r12d, 0FFFFFFFFh cmp dword ptr [rax+368h], 0 jnz short loc_88C82 mov rdi, rbx xor esi, esi call _mi_writeinfo jmp short loc_88C82 loc_88C71: call _my_thread_var mov dword ptr [rax], 86h mov r12d, 1 loc_88C82: mov eax, r12d pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long mi_read_static_record(long long a1, unsigned long long a2, _BYTE *a3) { unsigned int v4; // r12d long long v5; // r15 if ( a2 == -1LL ) { v4 = -1; if ( !*(_DWORD *)(*(_QWORD *)a1 + 872LL) ) mi_writeinfo((_QWORD *)a1, 0); } else if ( (*(_BYTE *)(a1 + 456) & 0x10) == 0 || *(_QWORD *)(a1 + 544) > a2 || (v4 = -1, !(unsigned int)my_b_flush_io_cache(a1 + 544, 1LL)) ) { *(_DWORD *)(a1 + 768) = 1; v5 = (*(long long ( **)(long long, _BYTE *, _QWORD, unsigned long long, long long))(*(_QWORD *)a1 + 736LL))( a1, a3, *(_QWORD *)(*(_QWORD *)a1 + 320LL), a2, 4LL); if ( !*(_DWORD *)(*(_QWORD *)a1 + 872LL) ) mi_writeinfo((_QWORD *)a1, 0); v4 = -1; if ( !v5 ) { if ( *a3 ) { *(_BYTE *)(a1 + 464) |= 2u; return 0; } else { *(_DWORD *)my_thread_var(a1) = 134; return 1; } } } return v4; }
_mi_read_static_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RDI CMP RSI,-0x1 JZ 0x00188c53 MOV R14,RDX MOV R15,RSI TEST byte ptr [RBX + 0x1c8],0x10 JZ 0x00188bf4 CMP qword ptr [RBX + 0x220],R15 JA 0x00188bf4 LEA RDI,[RBX + 0x220] MOV ESI,0x1 CALL 0x00196b09 MOV R12D,0xffffffff TEST EAX,EAX JNZ 0x00188c82 LAB_00188bf4: MOV dword ptr [RBX + 0x300],0x1 MOV RAX,qword ptr [RBX] MOV RDX,qword ptr [RAX + 0x140] MOV R8D,0x4 MOV RDI,RBX MOV RSI,R14 MOV RCX,R15 CALL qword ptr [RAX + 0x2e0] MOV R15,RAX MOV RAX,qword ptr [RBX] CMP dword ptr [RAX + 0x368],0x0 JNZ 0x00188c36 MOV RDI,RBX XOR ESI,ESI CALL 0x0017e2a6 LAB_00188c36: MOV R12D,0xffffffff TEST R15,R15 JNZ 0x00188c82 CMP byte ptr [R14],0x0 JZ 0x00188c71 OR byte ptr [RBX + 0x1d0],0x2 XOR R12D,R12D JMP 0x00188c82 LAB_00188c53: MOV RAX,qword ptr [RBX] MOV R12D,0xffffffff CMP dword ptr [RAX + 0x368],0x0 JNZ 0x00188c82 MOV RDI,RBX XOR ESI,ESI CALL 0x0017e2a6 JMP 0x00188c82 LAB_00188c71: CALL 0x001a319a MOV dword ptr [RAX],0x86 MOV R12D,0x1 LAB_00188c82: MOV EAX,R12D POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 _mi_read_static_record(long *param_1,ulong param_2,char *param_3) { int iVar1; long lVar2; int4 *puVar3; int8 uVar4; if (param_2 == 0xffffffffffffffff) { uVar4 = 0xffffffff; if (*(int *)(*param_1 + 0x368) == 0) { _mi_writeinfo(param_1,0); } } else { if ((((*(byte *)(param_1 + 0x39) & 0x10) != 0) && ((ulong)param_1[0x44] <= param_2)) && (iVar1 = my_b_flush_io_cache(param_1 + 0x44,1), iVar1 != 0)) { return 0xffffffff; } *(int4 *)(param_1 + 0x60) = 1; lVar2 = (**(code **)(*param_1 + 0x2e0)) (param_1,param_3,*(int8 *)(*param_1 + 0x140),param_2,4); if (*(int *)(*param_1 + 0x368) == 0) { _mi_writeinfo(param_1,0); } uVar4 = 0xffffffff; if (lVar2 == 0) { if (*param_3 == '\0') { puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x86; uVar4 = 1; } else { *(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 2; uVar4 = 0; } } } return uVar4; }
46,862
main
monkey531[P]llama/examples/export-lora/export-lora.cpp
int main(int argc, char ** argv) { common_params params; if (!common_params_parse(argc, argv, params, LLAMA_EXAMPLE_EXPORT_LORA, print_usage)) { return 1; } g_verbose = (params.verbosity > 1); try { lora_merge_ctx ctx(params.model, params.lora_adapters, params.lora_outfile, params.cpuparams.n_threads); ctx.run_merge(); } catch (const std::exception & err) { fprintf(stderr, "%s\n", err.what()); exit(EXIT_FAILURE); } printf("done, output file is %s\n", params.lora_outfile.c_str()); return 0; }
O0
cpp
main: subq $0x17d8, %rsp # imm = 0x17D8 movl $0x0, 0x17d4(%rsp) movl %edi, 0x17d0(%rsp) movq %rsi, 0x17c8(%rsp) leaq 0x4e0(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x60650 movq 0x10(%rsp), %rdx movl 0x17d0(%rsp), %edi movq 0x17c8(%rsp), %rsi leaq 0x1b2(%rip), %r8 # 0x60190 movl $0xc, %ecx callq 0x6ed90 movb %al, 0x1f(%rsp) jmp 0x5ffee movb 0x1f(%rsp), %al testb $0x1, %al jne 0x6002c jmp 0x5fff8 movl $0x1, 0x17d4(%rsp) movl $0x1, 0x4d0(%rsp) jmp 0x6014e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4d8(%rsp) movl %eax, 0x4d4(%rsp) jmp 0x6016a movl 0x1478(%rsp), %eax subl $0x2, %eax setge 0x24c054(%rip) # 0x2ac091 leaq 0x1238(%rsp), %rsi leaq 0x1448(%rsp), %rdx leaq 0x17a0(%rsp), %rcx movl 0x754(%rsp), %r8d leaq 0x28(%rsp), %rdi callq 0x61ba0 jmp 0x60069 leaq 0x28(%rsp), %rdi callq 0x62070 jmp 0x60075 leaq 0x28(%rsp), %rdi callq 0x62c40 jmp 0x60118 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4d8(%rsp) movl %eax, 0x4d4(%rsp) jmp 0x600b8 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x4d8(%rsp) movl %eax, 0x4d4(%rsp) leaq 0x28(%rsp), %rdi callq 0x62c40 movl 0x4d4(%rsp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0x6016a movq 0x4d8(%rsp), %rdi callq 0x5b0f0 movq %rax, 0x20(%rsp) movq 0x24ae5b(%rip), %rax # 0x2aaf40 movq (%rax), %rax movq %rax, 0x8(%rsp) movq 0x20(%rsp), %rdi movq (%rdi), %rax callq *0x10(%rax) movq 0x8(%rsp), %rdi movq %rax, %rdx leaq 0x1b53f9(%rip), %rsi # 0x215500 movb $0x0, %al callq 0x5b360 movl $0x1, %edi callq 0x5bd70 leaq 0x17a0(%rsp), %rdi callq 0x5b1d0 movq %rax, %rsi leaq 0x1acee5(%rip), %rdi # 0x20d014 xorl %eax, %eax callq 0x5b100 jmp 0x60138 movl $0x0, 0x17d4(%rsp) movl $0x1, 0x4d0(%rsp) leaq 0x4e0(%rsp), %rdi callq 0x62cf0 movl 0x17d4(%rsp), %eax addq $0x17d8, %rsp # imm = 0x17D8 retq leaq 0x4e0(%rsp), %rdi callq 0x62cf0 movq 0x4d8(%rsp), %rdi callq 0x5bd10 nopw %cs:(%rax,%rax)
main: sub rsp, 17D8h mov [rsp+17D8h+var_4], 0 mov [rsp+17D8h+var_8], edi mov [rsp+17D8h+var_10], rsi lea rdi, [rsp+17D8h+var_12F8]; this mov qword ptr [rsp+17D8h+var_17C8], rdi; int call _ZN13common_paramsC2Ev; common_params::common_params(void) mov rdx, qword ptr [rsp+17D8h+var_17C8] mov edi, [rsp+17D8h+var_8] mov rsi, [rsp+17D8h+var_10] lea r8, _ZL11print_usageiPPc; print_usage(int,char **) mov ecx, 0Ch call _Z19common_params_parseiPPcR13common_params13llama_examplePFviS0_E; common_params_parse(int,char **,common_params &,llama_example,void (*)(int,char **)) mov [rsp+17D8h+var_17B9], al jmp short $+2 loc_5FFEE: mov al, [rsp+17D8h+var_17B9] test al, 1 jnz short loc_6002C jmp short $+2 loc_5FFF8: mov [rsp+17D8h+var_4], 1 mov [rsp+17D8h+var_1308], 1 jmp loc_6014E mov rcx, rax mov eax, edx mov [rsp+17D8h+var_1300], rcx mov [rsp+17D8h+var_1304], eax jmp loc_6016A loc_6002C: mov eax, [rsp+17D8h+var_360] sub eax, 2 setnl cs:_ZL9g_verbose; g_verbose lea rsi, [rsp+17D8h+var_5A0]; int lea rdx, [rsp+17D8h+var_390]; int lea rcx, [rsp+17D8h+var_38]; int mov r8d, [rsp+17D8h+var_1084] lea rdi, [rsp+17D8h+var_17B0]; char call _ZN14lora_merge_ctxC2ERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERSt6vectorI24common_adapter_lora_infoSaIS8_EES6_i; lora_merge_ctx::lora_merge_ctx(std::string &,std::vector<common_adapter_lora_info> &,std::string &,int) jmp short $+2 loc_60069: lea rdi, [rsp+17D8h+var_17B0]; this call _ZN14lora_merge_ctx9run_mergeEv; lora_merge_ctx::run_merge(void) jmp short $+2 loc_60075: lea rdi, [rsp+17D8h+var_17B0]; this call _ZN14lora_merge_ctxD2Ev; lora_merge_ctx::~lora_merge_ctx() jmp loc_60118 mov rcx, rax mov eax, edx mov [rsp+17D8h+var_1300], rcx mov [rsp+17D8h+var_1304], eax jmp short loc_600B8 mov rcx, rax mov eax, edx mov [rsp+17D8h+var_1300], rcx mov [rsp+17D8h+var_1304], eax lea rdi, [rsp+17D8h+var_17B0]; this call _ZN14lora_merge_ctxD2Ev; lora_merge_ctx::~lora_merge_ctx() loc_600B8: mov eax, [rsp+17D8h+var_1304] mov ecx, 1 cmp eax, ecx jnz loc_6016A mov rdi, [rsp+17D8h+var_1300]; void * call ___cxa_begin_catch mov [rsp+17D8h+var_17B8], rax mov rax, cs:stderr_ptr mov rax, [rax] mov [rsp+17D8h+var_17D0], rax mov rdi, [rsp+17D8h+var_17B8] mov rax, [rdi] call qword ptr [rax+10h] mov rdi, [rsp+17D8h+var_17D0] mov rdx, rax lea rsi, aErrorInvalidTy+25h; "%s\n" mov al, 0 call _fprintf mov edi, 1 call _exit loc_60118: lea rdi, [rsp+17D8h+var_38] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rsi, rax lea rdi, aDoneOutputFile; "done, output file is %s\n" xor eax, eax call _printf jmp short $+2 loc_60138: mov [rsp+17D8h+var_4], 0 mov [rsp+17D8h+var_1308], 1 loc_6014E: lea rdi, [rsp+17D8h+var_12F8]; this call _ZN13common_paramsD2Ev; common_params::~common_params() mov eax, [rsp+17D8h+var_4] add rsp, 17D8h retn loc_6016A: lea rdi, [rsp+17D8h+var_12F8]; this call _ZN13common_paramsD2Ev; common_params::~common_params() mov rdi, [rsp+17D8h+var_1300] call __Unwind_Resume
int main(int argc, const char **argv, const char **envp) { const char *v3; // rax int v5; // [rsp+0h] [rbp-17D8h] int v6; // [rsp+8h] [rbp-17D0h] int v7; // [rsp+18h] [rbp-17C0h] int v8; // [rsp+20h] [rbp-17B8h] int v9[12]; // [rsp+28h] [rbp-17B0h] BYREF void *v10; // [rsp+58h] [rbp-1780h] void *v11; // [rsp+60h] [rbp-1778h] int v12; // [rsp+68h] [rbp-1770h] int v13; // [rsp+70h] [rbp-1768h] long long v14; // [rsp+78h] [rbp-1760h] void *v15; // [rsp+80h] [rbp-1758h] file_input *v16; // [rsp+88h] [rbp-1750h] long long v17; // [rsp+90h] [rbp-1748h] int v18; // [rsp+98h] [rbp-1740h] int v19; // [rsp+A0h] [rbp-1738h] int v20; // [rsp+A8h] [rbp-1730h] int v21; // [rsp+B0h] [rbp-1728h] int v22; // [rsp+B8h] [rbp-1720h] int v23; // [rsp+C0h] [rbp-1718h] char v24; // [rsp+C8h] [rbp-1710h] int v25; // [rsp+D0h] [rbp-1708h] char v26; // [rsp+D8h] [rbp-1700h] int v27; // [rsp+E0h] [rbp-16F8h] int v28; // [rsp+E8h] [rbp-16F0h] int v29; // [rsp+F0h] [rbp-16E8h] int v30; // [rsp+F8h] [rbp-16E0h] int v31; // [rsp+100h] [rbp-16D8h] int v32; // [rsp+108h] [rbp-16D0h] int v33; // [rsp+110h] [rbp-16C8h] int v34; // [rsp+118h] [rbp-16C0h] long long v35; // [rsp+120h] [rbp-16B8h] int v36; // [rsp+4D0h] [rbp-1308h] int v37[157]; // [rsp+4E0h] [rbp-12F8h] BYREF int v38; // [rsp+1238h] [rbp-5A0h] BYREF int v39[214]; // [rsp+1448h] [rbp-390h] BYREF int v40[10]; // [rsp+17A0h] [rbp-38h] BYREF const char **v41; // [rsp+17C8h] [rbp-10h] unsigned int v42; // [rsp+17D0h] [rbp-8h] int v43; // [rsp+17D4h] [rbp-4h] v43 = 0; v42 = argc; v41 = argv; common_params::common_params((common_params *)v37); if ( (common_params_parse(v42, v41, v37, 12LL, print_usage) & 1) != 0 ) { g_verbose = v39[12] >= 2; lora_merge_ctx::lora_merge_ctx( (char)v9, (int)&v38, (int)v39, (int)v40, v5, v6, (int)v37, v7, v8, v9[0], v9[2], v9[4], v9[6], v9[8], v9[10], v10, v11, v12, v13, v14, v15, v16, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28, v29, v30, v31, v32, v33, v34, v35); lora_merge_ctx::run_merge((lora_merge_ctx *)v9); lora_merge_ctx::~lora_merge_ctx((lora_merge_ctx *)v9); v3 = (const char *)std::string::c_str(v40); printf("done, output file is %s\n", v3); v43 = 0; } else { v43 = 1; } v36 = 1; common_params::~common_params((common_params *)v37); return v43; }
main: SUB RSP,0x17d8 MOV dword ptr [RSP + 0x17d4],0x0 MOV dword ptr [RSP + 0x17d0],EDI MOV qword ptr [RSP + 0x17c8],RSI LEA RDI,[RSP + 0x4e0] MOV qword ptr [RSP + 0x10],RDI CALL 0x00160650 MOV RDX,qword ptr [RSP + 0x10] MOV EDI,dword ptr [RSP + 0x17d0] MOV RSI,qword ptr [RSP + 0x17c8] LAB_0015ffd7: LEA R8,[0x160190] MOV ECX,0xc CALL 0x0016ed90 MOV byte ptr [RSP + 0x1f],AL JMP 0x0015ffee LAB_0015ffee: MOV AL,byte ptr [RSP + 0x1f] TEST AL,0x1 JNZ 0x0016002c JMP 0x0015fff8 LAB_0015fff8: MOV dword ptr [RSP + 0x17d4],0x1 MOV dword ptr [RSP + 0x4d0],0x1 JMP 0x0016014e LAB_0016002c: MOV EAX,dword ptr [RSP + 0x1478] SUB EAX,0x2 SETGE byte ptr [0x003ac091] LEA RSI,[RSP + 0x1238] LEA RDX,[RSP + 0x1448] LEA RCX,[RSP + 0x17a0] MOV R8D,dword ptr [RSP + 0x754] LAB_0016005d: LEA RDI,[RSP + 0x28] CALL 0x00161ba0 JMP 0x00160069 LAB_00160069: LEA RDI,[RSP + 0x28] CALL 0x00162070 LAB_00160073: JMP 0x00160075 LAB_00160075: LEA RDI,[RSP + 0x28] CALL 0x00162c40 JMP 0x00160118 LAB_00160118: LEA RDI,[RSP + 0x17a0] CALL 0x0015b1d0 MOV RSI,RAX LAB_00160128: LEA RDI,[0x30d014] XOR EAX,EAX CALL 0x0015b100 LAB_00160136: JMP 0x00160138 LAB_00160138: MOV dword ptr [RSP + 0x17d4],0x0 MOV dword ptr [RSP + 0x4d0],0x1 LAB_0016014e: LEA RDI,[RSP + 0x4e0] CALL 0x00162cf0 MOV EAX,dword ptr [RSP + 0x17d4] ADD RSP,0x17d8 RET
uint main(int4 param_1,int8 param_2) { byte bVar1; int8 uVar2; bool bVar3; lora_merge_ctx local_17b0 [1192]; int4 local_1308; common_params local_12f8 [628]; int local_1084; string local_5a0 [528]; vector local_390 [48]; int local_360; string local_38 [40]; int8 local_10; int4 local_8; uint local_4; local_4 = 0; local_10 = param_2; local_8 = param_1; common_params::common_params(local_12f8); /* try { // try from 0015ffd7 to 0015ffe7 has its CatchHandler @ 00160013 */ bVar1 = common_params_parse(local_8,local_10,local_12f8,0xc,print_usage); bVar3 = (bVar1 & 1) != 0; if (bVar3) { g_verbose = 1 < local_360; /* try { // try from 0016005d to 00160066 has its CatchHandler @ 00160084 */ lora_merge_ctx::lora_merge_ctx(local_17b0,local_5a0,local_390,local_38,local_1084); /* try { // try from 00160069 to 00160072 has its CatchHandler @ 0016009a */ lora_merge_ctx::run_merge(local_17b0); lora_merge_ctx::~lora_merge_ctx(local_17b0); uVar2 = std::__cxx11::string::c_str(); /* try { // try from 00160128 to 00160135 has its CatchHandler @ 00160013 */ printf("done, output file is %s\n",uVar2); } local_4 = (uint)!bVar3; local_1308 = 1; common_params::~common_params(local_12f8); return local_4; }
46,863
fmt::v10::detail::thousands_sep_result<char> fmt::v10::detail::thousands_sep_impl<char>(fmt::v10::detail::locale_ref)
aimrt_mujoco_sim/_deps/fmt-src/include/fmt/format-inl.h
FMT_FUNC auto thousands_sep_impl(locale_ref loc) -> thousands_sep_result<Char> { auto& facet = std::use_facet<std::numpunct<Char>>(loc.get<std::locale>()); auto grouping = facet.grouping(); auto thousands_sep = grouping.empty() ? Char() : facet.thousands_sep(); return {std::move(grouping), thousands_sep}; }
O3
c
fmt::v10::detail::thousands_sep_result<char> fmt::v10::detail::thousands_sep_impl<char>(fmt::v10::detail::locale_ref): pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq %rsp, %rdi testq %rsi, %rsi je 0x8ed38 callq 0x81460 jmp 0x8ed3d callq 0x84310 movq %rsp, %rdi callq 0x80dd0 movq %rax, %r14 movq %rsp, %rdi callq 0x82ec0 movq (%r14), %rax movq %rsp, %r15 movq %r15, %rdi movq %r14, %rsi callq *0x20(%rax) cmpq $0x0, 0x8(%r15) je 0x8ed71 movq (%r14), %rax movq %r14, %rdi callq *0x18(%rax) jmp 0x8ed73 xorl %eax, %eax leaq 0x10(%rbx), %rcx movq %rcx, (%rbx) leaq 0x10(%rsp), %rdx movq -0x10(%rdx), %rsi cmpq %rdx, %rsi je 0x8ed96 movq %rsi, (%rbx) movq 0x10(%rsp), %rcx movq %rcx, 0x10(%rbx) jmp 0x8ed9c movups (%rdx), %xmm0 movups %xmm0, (%rcx) movq 0x8(%rsp), %rcx movq %rcx, 0x8(%rbx) movb %al, 0x20(%rbx) movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8ede0 movq 0x10(%rsp), %rsi incq %rsi callq 0x82190 jmp 0x8ede0 movq %rax, %rbx movq %rsp, %rdi callq 0x82ec0 movq %rbx, %rdi callq 0x83b70
_ZN3fmt3v106detail18thousands_sep_implIcEENS1_20thousands_sep_resultIT_EENS1_10locale_refE: push r15 push r14 push rbx sub rsp, 20h mov rbx, rdi mov rdi, rsp; this test rsi, rsi jz short loc_8ED38 call __ZNSt6localeC1ERKS_; std::locale::locale(std::locale const&) jmp short loc_8ED3D loc_8ED38: call __ZNSt6localeC1Ev; std::locale::locale(void) loc_8ED3D: mov rdi, rsp call __ZSt9use_facetINSt7__cxx118numpunctIcEEERKT_RKSt6locale; std::use_facet<std::numpunct<char>>(std::locale const&) mov r14, rax mov rdi, rsp; this call __ZNSt6localeD1Ev; std::locale::~locale() mov rax, [r14] mov r15, rsp mov rdi, r15 mov rsi, r14 call qword ptr [rax+20h] cmp qword ptr [r15+8], 0 jz short loc_8ED71 mov rax, [r14] mov rdi, r14 call qword ptr [rax+18h] jmp short loc_8ED73 loc_8ED71: xor eax, eax loc_8ED73: lea rcx, [rbx+10h] mov [rbx], rcx lea rdx, [rsp+38h+var_28] mov rsi, [rdx-10h] cmp rsi, rdx jz short loc_8ED96 mov [rbx], rsi mov rcx, [rsp+38h+var_28] mov [rbx+10h], rcx jmp short loc_8ED9C loc_8ED96: movups xmm0, xmmword ptr [rdx] movups xmmword ptr [rcx], xmm0 loc_8ED9C: mov rcx, [rsp+38h+var_30] mov [rbx+8], rcx mov [rbx+20h], al mov rax, rbx add rsp, 20h pop rbx pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8EDE0 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_8EDE0 mov rbx, rax mov rdi, rsp; this call __ZNSt6localeD1Ev; std::locale::~locale() loc_8EDE0: mov rdi, rbx call __Unwind_Resume
long long fmt::v10::detail::thousands_sep_impl<char>(long long a1, const std::locale *a2) { long long v2; // r14 char v3; // al __int128 *v5; // [rsp+0h] [rbp-38h] BYREF long long v6; // [rsp+8h] [rbp-30h] __int128 v7; // [rsp+10h] [rbp-28h] BYREF if ( a2 ) std::locale::locale((std::locale *)&v5, a2); else std::locale::locale((std::locale *)&v5); v2 = std::use_facet<std::numpunct<char>>(&v5); std::locale::~locale((std::locale *)&v5); (*(void ( **)(__int128 **, long long))(*(_QWORD *)v2 + 32LL))(&v5, v2); if ( v6 ) v3 = (*(long long ( **)(long long))(*(_QWORD *)v2 + 24LL))(v2); else v3 = 0; *(_QWORD *)a1 = a1 + 16; if ( v5 == &v7 ) { *(_OWORD *)(a1 + 16) = v7; } else { *(_QWORD *)a1 = v5; *(_QWORD *)(a1 + 16) = v7; } *(_QWORD *)(a1 + 8) = v6; *(_BYTE *)(a1 + 32) = v3; return a1; }
thousands_sep_impl<char>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RDI,RSP TEST RSI,RSI JZ 0x0018ed38 CALL 0x00181460 JMP 0x0018ed3d LAB_0018ed38: CALL 0x00184310 LAB_0018ed3d: MOV RDI,RSP CALL 0x00180dd0 LAB_0018ed45: MOV R14,RAX MOV RDI,RSP CALL 0x00182ec0 MOV RAX,qword ptr [R14] MOV R15,RSP MOV RDI,R15 MOV RSI,R14 CALL qword ptr [RAX + 0x20] CMP qword ptr [R15 + 0x8],0x0 JZ 0x0018ed71 MOV RAX,qword ptr [R14] LAB_0018ed69: MOV RDI,R14 CALL qword ptr [RAX + 0x18] LAB_0018ed6f: JMP 0x0018ed73 LAB_0018ed71: XOR EAX,EAX LAB_0018ed73: LEA RCX,[RBX + 0x10] MOV qword ptr [RBX],RCX LEA RDX,[RSP + 0x10] MOV RSI,qword ptr [RDX + -0x10] CMP RSI,RDX JZ 0x0018ed96 MOV qword ptr [RBX],RSI MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RBX + 0x10],RCX JMP 0x0018ed9c LAB_0018ed96: MOVUPS XMM0,xmmword ptr [RDX] MOVUPS xmmword ptr [RCX],XMM0 LAB_0018ed9c: MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RBX + 0x8],RCX MOV byte ptr [RBX + 0x20],AL MOV RAX,RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* fmt::v10::detail::thousands_sep_result<char> fmt::v10::detail::thousands_sep_impl<char>(fmt::v10::detail::locale_ref) */ detail * __thiscall fmt::v10::detail::thousands_sep_impl<char>(detail *this,locale *param_2) { detail dVar1; numpunct *pnVar2; int8 *local_38; long local_30; int8 local_28; int8 uStack_20; if (param_2 == (locale *)0x0) { std::locale::locale((locale *)&local_38); } else { std::locale::locale((locale *)&local_38,param_2); } /* try { // try from 0018ed3d to 0018ed44 has its CatchHandler @ 0018edd5 */ pnVar2 = std::use_facet<std::__cxx11::numpunct<char>>((locale *)&local_38); std::locale::~locale((locale *)&local_38); (**(code **)(*(long *)pnVar2 + 0x20))(&local_38,pnVar2); if (local_30 == 0) { dVar1 = (detail)0x0; } else { /* try { // try from 0018ed69 to 0018ed6e has its CatchHandler @ 0018edb5 */ dVar1 = (detail)(**(code **)(*(long *)pnVar2 + 0x18))(pnVar2); } *(detail **)this = this + 0x10; if (local_38 == &local_28) { *(int8 *)(this + 0x10) = local_28; *(int8 *)(this + 0x18) = uStack_20; } else { *(int8 **)this = local_38; *(int8 *)(this + 0x10) = local_28; } *(long *)(this + 8) = local_30; this[0x20] = dVar1; return this; }
46,864
my_close
eloqsql/mysys/my_open.c
int my_close(File fd, myf MyFlags) { int err; char *name= NULL; DBUG_ENTER("my_close"); DBUG_PRINT("my",("fd: %d MyFlags: %lu",fd, MyFlags)); if (!(MyFlags & (MY_WME | MY_FAE))) MyFlags|= my_global_flags; if ((uint) fd < my_file_limit && my_file_info[fd].type != UNOPEN) { name= my_file_info[fd].name; my_file_info[fd].name= NULL; my_file_info[fd].type= UNOPEN; } #ifndef _WIN32 err= close(fd); #else err= my_win_close(fd); #endif if (err) { DBUG_PRINT("error",("Got error %d on close",err)); my_errno=errno; if (MyFlags & (MY_FAE | MY_WME)) my_error(EE_BADCLOSE, MYF(ME_BELL | (MyFlags & (ME_NOTE | ME_ERROR_LOG))), name,errno); } if (name) { my_free(name); } my_atomic_add32_explicit(&my_file_opened, -1, MY_MEMORY_ORDER_RELAXED); DBUG_RETURN(err); }
O3
c
my_close: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r12 xorl %ebx, %ebx movl $0x0, %r14d testb $0x18, %r12b jne 0xa054e leaq 0xb677bd(%rip), %rax # 0xc07d08 movq (%rax), %r14 leaq 0x2e55bb(%rip), %rax # 0x385b10 cmpl %edi, (%rax) jbe 0xa058d leaq 0x2e55b8(%rip), %rax # 0x385b18 movq (%rax), %rdx movslq %edi, %rcx shlq $0x4, %rcx cmpl $0x0, 0x8(%rdx,%rcx) je 0xa058b addq %rcx, %rdx movq (%rdx), %rbx movq $0x0, (%rdx) movq (%rax), %rax movl $0x0, 0x8(%rax,%rcx) jmp 0xa058d xorl %ebx, %ebx callq 0x29190 movl %eax, %r15d testl %eax, %eax je 0xa05d6 orq %r12, %r14 callq 0x29790 movq %rax, %r12 movl (%rax), %r13d callq 0xa1ac2 movl %r13d, (%rax) testb $0x18, %r14b je 0xa05d6 andl $0x440, %r14d # imm = 0x440 orq $0x4, %r14 movl (%r12), %ecx movl $0x4, %edi movq %r14, %rsi movq %rbx, %rdx xorl %eax, %eax callq 0x9dfd3 testq %rbx, %rbx je 0xa05e3 movq %rbx, %rdi callq 0x9ff7e leaq 0xb6772a(%rip), %rax # 0xc07d14 lock decl (%rax) movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
my_close: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12, rsi xor ebx, ebx mov r14d, 0 test r12b, 18h jnz short loc_A054E lea rax, my_global_flags mov r14, [rax] loc_A054E: lea rax, my_file_limit cmp [rax], edi jbe short loc_A058D lea rax, my_file_info mov rdx, [rax] movsxd rcx, edi shl rcx, 4 cmp dword ptr [rdx+rcx+8], 0 jz short loc_A058B add rdx, rcx mov rbx, [rdx] mov qword ptr [rdx], 0 mov rax, [rax] mov dword ptr [rax+rcx+8], 0 jmp short loc_A058D loc_A058B: xor ebx, ebx loc_A058D: call _close mov r15d, eax test eax, eax jz short loc_A05D6 or r14, r12 call ___errno_location mov r12, rax mov r13d, [rax] call _my_thread_var mov [rax], r13d test r14b, 18h jz short loc_A05D6 and r14d, 440h or r14, 4 mov ecx, [r12] mov edi, 4 mov rsi, r14 mov rdx, rbx xor eax, eax call my_error loc_A05D6: test rbx, rbx jz short loc_A05E3 mov rdi, rbx call my_free loc_A05E3: lea rax, my_file_opened lock dec dword ptr [rax] mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_close(long long a1, __int16 a2) { long long v2; // rbx __int16 v3; // r14 long long v4; // rcx unsigned int v5; // r15d __int16 v6; // r14 unsigned int *v7; // r12 unsigned int v8; // r13d v2 = 0LL; v3 = 0; if ( (a2 & 0x18) == 0 ) v3 = my_global_flags; if ( my_file_limit[0] > (unsigned int)a1 ) { v4 = 16LL * (int)a1; if ( *(_DWORD *)((char *)my_file_info + v4 + 8) ) { v2 = *(_QWORD *)((char *)my_file_info + v4); *(_QWORD *)((char *)my_file_info + v4) = 0LL; *(_DWORD *)((char *)my_file_info + v4 + 8) = 0; } else { v2 = 0LL; } } v5 = close(a1); if ( v5 ) { v6 = a2 | v3; v7 = (unsigned int *)__errno_location(a1); v8 = *v7; *(_DWORD *)my_thread_var(a1) = v8; if ( (v6 & 0x18) != 0 ) my_error(4u, v6 & 0x440 | 4LL, v2, *v7); } if ( v2 ) my_free(v2); _InterlockedDecrement(my_file_opened); return v5; }
my_close: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12,RSI XOR EBX,EBX MOV R14D,0x0 TEST R12B,0x18 JNZ 0x001a054e LEA RAX,[0xd07d08] MOV R14,qword ptr [RAX] LAB_001a054e: LEA RAX,[0x485b10] CMP dword ptr [RAX],EDI JBE 0x001a058d LEA RAX,[0x485b18] MOV RDX,qword ptr [RAX] MOVSXD RCX,EDI SHL RCX,0x4 CMP dword ptr [RDX + RCX*0x1 + 0x8],0x0 JZ 0x001a058b ADD RDX,RCX MOV RBX,qword ptr [RDX] MOV qword ptr [RDX],0x0 MOV RAX,qword ptr [RAX] MOV dword ptr [RAX + RCX*0x1 + 0x8],0x0 JMP 0x001a058d LAB_001a058b: XOR EBX,EBX LAB_001a058d: CALL 0x00129190 MOV R15D,EAX TEST EAX,EAX JZ 0x001a05d6 OR R14,R12 CALL 0x00129790 MOV R12,RAX MOV R13D,dword ptr [RAX] CALL 0x001a1ac2 MOV dword ptr [RAX],R13D TEST R14B,0x18 JZ 0x001a05d6 AND R14D,0x440 OR R14,0x4 MOV ECX,dword ptr [R12] MOV EDI,0x4 MOV RSI,R14 MOV RDX,RBX XOR EAX,EAX CALL 0x0019dfd3 LAB_001a05d6: TEST RBX,RBX JZ 0x001a05e3 MOV RDI,RBX CALL 0x0019ff7e LAB_001a05e3: LEA RAX,[0xd07d14] DEC.LOCK dword ptr [RAX] MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int my_close(uint param_1,ulong param_2) { int iVar1; int iVar2; int *piVar3; int *piVar4; long lVar5; long lVar6; ulong uVar7; lVar6 = 0; uVar7 = 0; if ((param_2 & 0x18) == 0) { uVar7 = my_global_flags; } if (param_1 < my_file_limit) { lVar5 = (long)(int)param_1 * 0x10; if (*(int *)(my_file_info + lVar5 + 8) == 0) { lVar6 = 0; } else { lVar6 = *(long *)(my_file_info + lVar5); *(long *)(my_file_info + lVar5) = 0; *(int4 *)(my_file_info + lVar5 + 8) = 0; } } iVar2 = close(param_1); if (iVar2 != 0) { piVar3 = __errno_location(); iVar1 = *piVar3; piVar4 = (int *)_my_thread_var(); *piVar4 = iVar1; if (((uVar7 | param_2) & 0x18) != 0) { my_error(4,(uint)(uVar7 | param_2) & 0x440 | 4,lVar6,*piVar3); } } if (lVar6 != 0) { my_free(lVar6); } LOCK(); my_file_opened = my_file_opened + -1; UNLOCK(); return iVar2; }
46,865
json_parse_ident
bluesky950520[P]quickjs/quickjs.c
static JSAtom json_parse_ident(JSParseState *s, const uint8_t **pp, int c) { const uint8_t *p; char ident_buf[128], *buf; size_t ident_size, ident_pos; JSAtom atom; p = *pp; buf = ident_buf; ident_size = sizeof(ident_buf); ident_pos = 0; for(;;) { buf[ident_pos++] = c; c = *p; if (c >= 128 || !((lre_id_continue_table_ascii[c >> 5] >> (c & 31)) & 1)) break; p++; if (unlikely(ident_pos >= ident_size - UTF8_CHAR_LEN_MAX)) { if (ident_realloc(s->ctx, &buf, &ident_size, ident_buf)) { atom = JS_ATOM_NULL; goto done; } } } /* buf contains pure ASCII */ atom = JS_NewAtomLen(s->ctx, buf, ident_pos); done: if (unlikely(buf != ident_buf)) js_free(s->ctx, buf); *pp = p; return atom; }
O0
c
json_parse_ident: subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movl %edx, 0xb4(%rsp) movq 0xb8(%rsp), %rax movq (%rax), %rax movq %rax, 0xa8(%rsp) leaq 0x20(%rsp), %rax movq %rax, 0x18(%rsp) movq $0x80, 0x10(%rsp) movq $0x0, 0x8(%rsp) movl 0xb4(%rsp), %eax movb %al, %dl movq 0x18(%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, %rsi addq $0x1, %rsi movq %rsi, 0x8(%rsp) movb %dl, (%rax,%rcx) movq 0xa8(%rsp), %rax movzbl (%rax), %eax movl %eax, 0xb4(%rsp) cmpl $0x80, 0xb4(%rsp) jge 0x85649 movl 0xb4(%rsp), %eax sarl $0x5, %eax movslq %eax, %rcx leaq 0x8ba9e(%rip), %rax # 0x1110d0 movl (%rax,%rcx,4), %eax movl 0xb4(%rsp), %ecx andl $0x1f, %ecx shrl %cl, %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x8564b jmp 0x856b9 movq 0xa8(%rsp), %rax addq $0x1, %rax movq %rax, 0xa8(%rsp) movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx subq $0x4, %rcx cmpq %rcx, %rax setae %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x856b4 movq 0xc0(%rsp), %rax movq (%rax), %rdi leaq 0x20(%rsp), %rcx leaq 0x18(%rsp), %rsi leaq 0x10(%rsp), %rdx callq 0x85b30 cmpl $0x0, %eax je 0x856b2 movl $0x0, 0x4(%rsp) jmp 0x856d7 jmp 0x856b4 jmp 0x855dd movq 0xc0(%rsp), %rax movq (%rax), %rdi movq 0x18(%rsp), %rsi movq 0x8(%rsp), %rdx callq 0x26d60 movl %eax, 0x4(%rsp) movq 0x18(%rsp), %rax leaq 0x20(%rsp), %rcx cmpq %rcx, %rax setne %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x8570d movq 0xc0(%rsp), %rax movq (%rax), %rdi movq 0x18(%rsp), %rsi callq 0x20af0 movq 0xa8(%rsp), %rcx movq 0xb8(%rsp), %rax movq %rcx, (%rax) movl 0x4(%rsp), %eax addq $0xc8, %rsp retq nopl (%rax)
json_parse_ident: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov [rsp+0C8h+var_10], rsi mov [rsp+0C8h+var_14], edx mov rax, [rsp+0C8h+var_10] mov rax, [rax] mov [rsp+0C8h+var_20], rax lea rax, [rsp+0C8h+var_A8] mov [rsp+0C8h+var_B0], rax mov [rsp+0C8h+var_B8], 80h mov [rsp+0C8h+var_C0], 0 loc_855DD: mov eax, [rsp+0C8h+var_14] mov dl, al mov rax, [rsp+0C8h+var_B0] mov rcx, [rsp+0C8h+var_C0] mov rsi, rcx add rsi, 1 mov [rsp+0C8h+var_C0], rsi mov [rax+rcx], dl mov rax, [rsp+0C8h+var_20] movzx eax, byte ptr [rax] mov [rsp+0C8h+var_14], eax cmp [rsp+0C8h+var_14], 80h jge short loc_85649 mov eax, [rsp+0C8h+var_14] sar eax, 5 movsxd rcx, eax lea rax, lre_id_continue_table_ascii mov eax, [rax+rcx*4] mov ecx, [rsp+0C8h+var_14] and ecx, 1Fh shr eax, cl and eax, 1 cmp eax, 0 jnz short loc_8564B loc_85649: jmp short loc_856B9 loc_8564B: mov rax, [rsp+0C8h+var_20] add rax, 1 mov [rsp+0C8h+var_20], rax mov rax, [rsp+0C8h+var_C0] mov rcx, [rsp+0C8h+var_B8] sub rcx, 4 cmp rax, rcx setnb al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_856B4 mov rax, [rsp+0C8h+var_8] mov rdi, [rax] lea rcx, [rsp+0C8h+var_A8] lea rsi, [rsp+0C8h+var_B0] lea rdx, [rsp+0C8h+var_B8] call ident_realloc cmp eax, 0 jz short loc_856B2 mov [rsp+0C8h+var_C4], 0 jmp short loc_856D7 loc_856B2: jmp short $+2 loc_856B4: jmp loc_855DD loc_856B9: mov rax, [rsp+0C8h+var_8] mov rdi, [rax] mov rsi, [rsp+0C8h+var_B0] mov rdx, [rsp+0C8h+var_C0] call JS_NewAtomLen mov [rsp+0C8h+var_C4], eax loc_856D7: mov rax, [rsp+0C8h+var_B0] lea rcx, [rsp+0C8h+var_A8] cmp rax, rcx setnz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_8570D mov rax, [rsp+0C8h+var_8] mov rdi, [rax] mov rsi, [rsp+0C8h+var_B0] call js_free loc_8570D: mov rcx, [rsp+0C8h+var_20] mov rax, [rsp+0C8h+var_10] mov [rax], rcx mov eax, [rsp+0C8h+var_C4] add rsp, 0C8h retn
long long json_parse_ident(long long *a1, unsigned __int8 **a2, int a3) { unsigned long long v3; // rcx unsigned int v5; // [rsp+4h] [rbp-C4h] unsigned long long v6; // [rsp+8h] [rbp-C0h] long long v7; // [rsp+10h] [rbp-B8h] BYREF unsigned __int8 *v8; // [rsp+18h] [rbp-B0h] BYREF _BYTE v9[136]; // [rsp+20h] [rbp-A8h] BYREF unsigned __int8 *v10; // [rsp+A8h] [rbp-20h] int v11; // [rsp+B4h] [rbp-14h] _QWORD *v12; // [rsp+B8h] [rbp-10h] long long *v13; // [rsp+C0h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; v10 = *a2; v8 = v9; v7 = 128LL; v6 = 0LL; do { v3 = v6++; v8[v3] = v11; v11 = *v10; if ( v11 >= 128 || ((lre_id_continue_table_ascii[v11 >> 5] >> (v11 & 0x1F)) & 1) == 0 ) { v5 = JS_NewAtomLen(*v13, v8, v6); goto LABEL_9; } ++v10; } while ( v6 < v7 - 4 || !(unsigned int)ident_realloc(*v13, &v8, &v7, v9) ); v5 = 0; LABEL_9: if ( v8 != v9 ) js_free(*v13, (long long)v8); *v12 = v10; return v5; }
json_parse_ident: SUB RSP,0xc8 MOV qword ptr [RSP + 0xc0],RDI MOV qword ptr [RSP + 0xb8],RSI MOV dword ptr [RSP + 0xb4],EDX MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0xa8],RAX LEA RAX,[RSP + 0x20] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10],0x80 MOV qword ptr [RSP + 0x8],0x0 LAB_001855dd: MOV EAX,dword ptr [RSP + 0xb4] MOV DL,AL MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x8] MOV RSI,RCX ADD RSI,0x1 MOV qword ptr [RSP + 0x8],RSI MOV byte ptr [RAX + RCX*0x1],DL MOV RAX,qword ptr [RSP + 0xa8] MOVZX EAX,byte ptr [RAX] MOV dword ptr [RSP + 0xb4],EAX CMP dword ptr [RSP + 0xb4],0x80 JGE 0x00185649 MOV EAX,dword ptr [RSP + 0xb4] SAR EAX,0x5 MOVSXD RCX,EAX LEA RAX,[0x2110d0] MOV EAX,dword ptr [RAX + RCX*0x4] MOV ECX,dword ptr [RSP + 0xb4] AND ECX,0x1f SHR EAX,CL AND EAX,0x1 CMP EAX,0x0 JNZ 0x0018564b LAB_00185649: JMP 0x001856b9 LAB_0018564b: MOV RAX,qword ptr [RSP + 0xa8] ADD RAX,0x1 MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] SUB RCX,0x4 CMP RAX,RCX SETNC AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001856b4 MOV RAX,qword ptr [RSP + 0xc0] MOV RDI,qword ptr [RAX] LEA RCX,[RSP + 0x20] LEA RSI,[RSP + 0x18] LEA RDX,[RSP + 0x10] CALL 0x00185b30 CMP EAX,0x0 JZ 0x001856b2 MOV dword ptr [RSP + 0x4],0x0 JMP 0x001856d7 LAB_001856b2: JMP 0x001856b4 LAB_001856b4: JMP 0x001855dd LAB_001856b9: MOV RAX,qword ptr [RSP + 0xc0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x8] CALL 0x00126d60 MOV dword ptr [RSP + 0x4],EAX LAB_001856d7: MOV RAX,qword ptr [RSP + 0x18] LEA RCX,[RSP + 0x20] CMP RAX,RCX SETNZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0018570d MOV RAX,qword ptr [RSP + 0xc0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00120af0 LAB_0018570d: MOV RCX,qword ptr [RSP + 0xa8] MOV RAX,qword ptr [RSP + 0xb8] MOV qword ptr [RAX],RCX MOV EAX,dword ptr [RSP + 0x4] ADD RSP,0xc8 RET
int4 json_parse_ident(int8 *param_1,int8 *param_2,uint param_3) { int iVar1; ulong uVar2; int4 local_c4; ulong local_c0; long local_b8; int1 *local_b0; int1 local_a8 [136]; byte *local_20; uint local_14; int8 *local_10; int8 *local_8; local_20 = (byte *)*param_2; local_b0 = local_a8; local_b8 = 0x80; local_c0 = 0; local_14 = param_3; local_10 = param_2; local_8 = param_1; do { uVar2 = local_c0 + 1; local_b0[local_c0] = (char)local_14; local_14 = (uint)*local_20; if ((0x7f < local_14) || ((*(uint *)(lre_id_continue_table_ascii + (long)((int)local_14 >> 5) * 4) >> (*local_20 & 0x1f) & 1) == 0)) { local_c4 = JS_NewAtomLen(*local_8,local_b0,uVar2); goto LAB_001856d7; } local_20 = local_20 + 1; local_c0 = uVar2; } while ((uVar2 < local_b8 - 4U) || (iVar1 = ident_realloc(*local_8,&local_b0,&local_b8,local_a8), iVar1 == 0)); local_c4 = 0; LAB_001856d7: if (local_b0 != local_a8) { js_free(*local_8,local_b0); } *local_10 = local_20; return local_c4; }
46,866
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>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
llama.cpp/common/json.hpp
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movb $0x0, (%rdi) movq $0x0, 0x8(%rdi) movl $0x1, %esi callq 0x875ae movq %rbx, %rdi movl $0x1, %esi callq 0x875ae movq (%r12), %r15 movq 0x8(%r12), %r12 movq %rsp, %rdi movq %r13, %rsi callq 0x86f50 addq %r15, %r12 movzbl %r14b, %r8d movzbl %bpl, %r9d leaq 0x20(%rsp), %rdi movq %rsp, %rcx movq %r15, %rsi movq %r12, %rdx callq 0x86ea4 leaq 0x20(%rsp), %rdi movl $0x1, %esi movq %rbx, %rdx callq 0x86fae leaq 0x48(%rsp), %r14 movq %r14, %rdi callq 0x877f6 movq -0x18(%r14), %rax testq %rax, %rax je 0xd19f1 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0xd1a08 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xd1a4c jmp 0xd1a4c movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x87580 jmp 0xd1a33 movq %rax, %r14 movq 0x10(%rsp), %rax testq %rax, %rax je 0xd1a57 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xd1a57 movq %rax, %rdi callq 0x28d45 movq %rax, %r14 movq %rbx, %rdi xorl %esi, %esi callq 0x875ae movq %rbx, %rdi callq 0x8bcc8 movq %r14, %rdi callq 0x21c20 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov ebp, r8d mov r14d, ecx mov r13, rdx mov r12, rsi mov rbx, rdi mov byte ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx mov 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 r15, [r12] mov r12, [r12+8] mov rdi, rsp mov rsi, r13 call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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&) add r12, r15 movzx r8d, r14b movzx r9d, bpl lea rdi, [rsp+118h+var_F8] mov rcx, rsp mov rsi, r15 mov rdx, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) lea rdi, [rsp+118h+var_F8]; int mov esi, 1 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,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>&) lea r14, [rsp+118h+var_D0] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; 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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer() mov rax, [r14-18h] test rax, rax jz short loc_D19F1 lea rdi, [rsp+118h+var_F8] mov rsi, rdi mov edx, 3 call rax loc_D19F1: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_D1A08 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_D1A08: mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_D1A4C jmp short loc_D1A4C mov r14, rax lea rdi, [rsp+118h+var_F8] call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() jmp short loc_D1A33 mov r14, rax loc_D1A33: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_D1A57 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_D1A57 loc_D1A4C: mov rdi, rax call __clang_call_terminate mov r14, rax loc_D1A57: mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string&>( long long a1, long long *a2, long long a3, unsigned __int8 a4, unsigned __int8 a5) { long long v8; // r15 long long v9; // r12 __int128 v11; // [rsp+0h] [rbp-118h] BYREF void ( *v12)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-108h] int v13[4]; // [rsp+20h] [rbp-F8h] BYREF void ( *v14)(int *, int *, long long); // [rsp+30h] [rbp-E8h] _QWORD v15[26]; // [rsp+48h] [rbp-D0h] BYREF *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); v8 = *a2; v9 = a2[1]; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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> &)>::function( &v11, a3); 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>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>( (long long)v13, v8, v8 + v9, &v11, a4, a5); nlohmann::json_abi_v3_11_3::detail::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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse( (long long)v13, 1, (_BYTE *)a1); 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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer(v15); if ( v14 ) v14(v13, v13, 3LL); if ( v12 ) v12(&v11, &v11, 3LL); return a1; }
parse<std::__cxx11::string&>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV EBP,R8D MOV R14D,ECX MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV byte ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV ESI,0x1 CALL 0x001875ae MOV RDI,RBX MOV ESI,0x1 CALL 0x001875ae MOV R15,qword ptr [R12] MOV R12,qword ptr [R12 + 0x8] LAB_001d1991: MOV RDI,RSP MOV RSI,R13 CALL 0x00186f50 ADD R12,R15 LAB_001d199f: MOVZX R8D,R14B MOVZX R9D,BPL LEA RDI,[RSP + 0x20] MOV RCX,RSP MOV RSI,R15 MOV RDX,R12 CALL 0x00186ea4 LAB_001d19ba: LEA RDI,[RSP + 0x20] MOV ESI,0x1 MOV RDX,RBX CALL 0x00186fae LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x001877f6 MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x001d19f1 LAB_001d19e2: LEA RDI,[RSP + 0x20] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001d19f1: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001d1a08 LAB_001d19fb: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001d1a08: MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> 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>::parse<std::__cxx11::string&>(std::__cxx11::string&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool, bool) */ 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> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::parse<std::__cxx11::string&> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,long *param_1,function *param_3,int1 param_4,int1 param_5) { long lVar1; long lVar2; function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)> afStack_118 [16]; code *local_108; 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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_f8 [16]; code *local_e8; 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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_d0 [160]; *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0; *(int8 *)(this + 8) = 0; assert_invariant(SUB81(this,0)); assert_invariant(SUB81(this,0)); lVar1 = *param_1; lVar2 = param_1[1]; /* try { // try from 001d1991 to 001d199b has its CatchHandler @ 001d1a54 */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,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>&)> ::function(afStack_118,param_3); /* try { // try from 001d199f to 001d19b9 has its CatchHandler @ 001d1a30 */ parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> (local_f8,lVar1,lVar2 + lVar1,afStack_118,param_4,param_5); /* try { // try from 001d19ba to 001d19cb has its CatchHandler @ 001d1a21 */ detail:: 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>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::parse(local_f8,true,(basic_json *)this); 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::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::~lexer(local_d0); if (local_e8 != (code *)0x0) { /* try { // try from 001d19e2 to 001d19f0 has its CatchHandler @ 001d1a1f */ (*local_e8)(local_f8,local_f8,3); } if (local_108 != (code *)0x0) { /* try { // try from 001d19fb to 001d1a07 has its CatchHandler @ 001d1a1d */ (*local_108)(afStack_118,afStack_118,3); } return this; }
46,867
create_fromuni
eloqsql/strings/ctype-simple.c
static my_bool create_fromuni(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { uni_idx idx[PLANE_NUM]; int i,n; /* Check that Unicode map is loaded. It can be not loaded when the collation is listed in Index.xml but not specified in the character set specific XML file. */ if (!cs->tab_to_uni) return TRUE; /* Clear plane statistics */ bzero(idx,sizeof(idx)); /* Count number of characters in each plane */ for (i=0; i< 0x100; i++) { uint16 wc=cs->tab_to_uni[i]; int pl= PLANE_NUMBER(wc); if (wc || !i) { if (!idx[pl].nchars) { idx[pl].uidx.from=wc; idx[pl].uidx.to=wc; }else { idx[pl].uidx.from=wc<idx[pl].uidx.from?wc:idx[pl].uidx.from; idx[pl].uidx.to=wc>idx[pl].uidx.to?wc:idx[pl].uidx.to; } idx[pl].nchars++; } } /* Sort planes in descending order */ qsort(&idx,PLANE_NUM,sizeof(uni_idx),&pcmp); for (i=0; i < PLANE_NUM; i++) { int ch,numchars; uchar *tab; /* Skip empty plane */ if (!idx[i].nchars) break; numchars=idx[i].uidx.to-idx[i].uidx.from+1; if (!(idx[i].uidx.tab= tab= (uchar*) (loader->once_alloc) (numchars * sizeof(*idx[i].uidx.tab)))) return TRUE; bzero(tab,numchars*sizeof(*tab)); for (ch=1; ch < PLANE_SIZE; ch++) { uint16 wc=cs->tab_to_uni[ch]; if (wc >= idx[i].uidx.from && wc <= idx[i].uidx.to && wc) { int ofs= wc - idx[i].uidx.from; if (!tab[ofs] || tab[ofs] > 0x7F) /* Prefer ASCII*/ { /* Some character sets can have double encoding. For example, in ARMSCII8, the following characters are encoded twice: Encoding#1 Encoding#2 Unicode Character Name ---------- ---------- ------- -------------- 0x27 0xFF U+0027 APOSTROPHE 0x28 0xA5 U+0028 LEFT PARENTHESIS 0x29 0xA4 U+0029 RIGHT PARENTHESIS 0x2C 0xAB U+002C COMMA 0x2D 0xAC U+002D HYPHEN-MINUS 0x2E 0xA9 U+002E FULL STOP That is, both 0x27 and 0xFF convert to Unicode U+0027. When converting back from Unicode to ARMSCII, we prefer the ASCII range, that is we want U+0027 to convert to 0x27 rather than to 0xFF. */ tab[ofs]= ch; } } } } /* Allocate and fill reverse table for each plane */ n=i; if (!(cs->tab_from_uni= (MY_UNI_IDX *) (loader->once_alloc)(sizeof(MY_UNI_IDX) * (n + 1)))) return TRUE; for (i=0; i< n; i++) ((struct my_uni_idx_st*)cs->tab_from_uni)[i]= idx[i].uidx; /* Set end-of-list marker */ bzero((char*) &cs->tab_from_uni[i],sizeof(MY_UNI_IDX)); return FALSE; }
O0
c
create_fromuni: pushq %rbp movq %rsp, %rbp subq $0x1850, %rsp # imm = 0x1850 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0x48557 movb $0x1, -0x1(%rbp) jmp 0x48a2a leaq -0x1820(%rbp), %rdi xorl %esi, %esi movl $0x1800, %edx # imm = 0x1800 callq 0x24190 movl $0x0, -0x1824(%rbp) cmpl $0x100, -0x1824(%rbp) # imm = 0x100 jge 0x48748 movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movslq -0x1824(%rbp), %rcx movw (%rax,%rcx,2), %ax movw %ax, -0x182a(%rbp) movzwl -0x182a(%rbp), %eax sarl $0x8, %eax movl $0x100, %ecx # imm = 0x100 cltd idivl %ecx movl %edx, -0x1830(%rbp) movzwl -0x182a(%rbp), %eax cmpl $0x0, %eax jne 0x485cf cmpl $0x0, -0x1824(%rbp) jne 0x48732 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax cmpl $0x0, (%rax) jne 0x4862e movw -0x182a(%rbp), %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0x8(%rax) movw -0x182a(%rbp), %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0xa(%rax) jmp 0x48716 movzwl -0x182a(%rbp), %eax movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx cmpl %ecx, %eax jge 0x48661 movzwl -0x182a(%rbp), %eax movl %eax, -0x184c(%rbp) jmp 0x48680 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0x8(%rax), %eax movl %eax, -0x184c(%rbp) movl -0x184c(%rbp), %eax movw %ax, %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0x8(%rax) movzwl -0x182a(%rbp), %eax movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0xa(%rcx), %ecx cmpl %ecx, %eax jle 0x486d5 movzwl -0x182a(%rbp), %eax movl %eax, -0x1850(%rbp) jmp 0x486f4 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0xa(%rax), %eax movl %eax, -0x1850(%rbp) movl -0x1850(%rbp), %eax movw %ax, %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0xa(%rax) movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) jmp 0x48734 movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0x48574 leaq -0x1820(%rbp), %rdi movl $0x100, %esi # imm = 0x100 movl $0x18, %edx leaq 0x2e0(%rip), %rcx # 0x48a40 callq 0x24550 movl $0x0, -0x1824(%rbp) cmpl $0x100, -0x1824(%rbp) # imm = 0x100 jge 0x48961 movslq -0x1824(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax cmpl $0x0, (%rax) jne 0x4879e jmp 0x48961 movslq -0x1824(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0xa(%rax), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx subl %ecx, %eax addl $0x1, %eax movl %eax, -0x1838(%rbp) movq -0x18(%rbp), %rax movq 0x80(%rax), %rax movslq -0x1838(%rbp), %rdi shlq $0x0, %rdi callq *%rax movq %rax, -0x1840(%rbp) movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax jne 0x48822 movb $0x1, -0x1(%rbp) jmp 0x48a2a movq -0x1840(%rbp), %rdi movslq -0x1838(%rbp), %rdx shlq $0x0, %rdx xorl %esi, %esi callq 0x24190 movl $0x1, -0x1834(%rbp) cmpl $0x100, -0x1834(%rbp) # imm = 0x100 jge 0x4894b movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movslq -0x1834(%rbp), %rcx movw (%rax,%rcx,2), %ax movw %ax, -0x1842(%rbp) movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx cmpl %ecx, %eax jl 0x48935 movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0xa(%rcx), %ecx cmpl %ecx, %eax jg 0x48935 movzwl -0x1842(%rbp), %eax cmpl $0x0, %eax je 0x48935 movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx subl %ecx, %eax movl %eax, -0x1848(%rbp) movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx cmpb $0x0, (%rax,%rcx) je 0x4891a movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx movzbl (%rax,%rcx), %eax cmpl $0x7f, %eax jle 0x48933 movl -0x1834(%rbp), %eax movb %al, %dl movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx movb %dl, (%rax,%rcx) jmp 0x48935 jmp 0x48937 movl -0x1834(%rbp), %eax addl $0x1, %eax movl %eax, -0x1834(%rbp) jmp 0x48845 jmp 0x4894d movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0x4876f movl -0x1824(%rbp), %eax movl %eax, -0x1828(%rbp) movq -0x18(%rbp), %rax movq 0x80(%rax), %rax movl -0x1828(%rbp), %ecx addl $0x1, %ecx movslq %ecx, %rdi shlq $0x4, %rdi callq *%rax movq -0x10(%rbp), %rcx movq %rax, 0x70(%rcx) cmpq $0x0, %rax jne 0x489a1 movb $0x1, -0x1(%rbp) jmp 0x48a2a movl $0x0, -0x1824(%rbp) movl -0x1824(%rbp), %eax cmpl -0x1828(%rbp), %eax jge 0x48a04 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movslq -0x1824(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movq 0x8(%rcx), %rdx movq %rdx, (%rax) movq 0x10(%rcx), %rcx movq %rcx, 0x8(%rax) movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0x489ab movq -0x10(%rbp), %rax movq 0x70(%rax), %rdi movslq -0x1824(%rbp), %rax shlq $0x4, %rax addq %rax, %rdi xorl %esi, %esi movl $0x10, %edx callq 0x24190 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x1850, %rsp # imm = 0x1850 popq %rbp retq nopw %cs:(%rax,%rax)
create_fromuni: push rbp mov rbp, rsp sub rsp, 1850h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp qword ptr [rax+68h], 0 jnz short loc_48557 mov [rbp+var_1], 1 jmp loc_48A2A loc_48557: lea rdi, [rbp+var_1820] xor esi, esi mov edx, 1800h call _memset mov [rbp+var_1824], 0 loc_48574: cmp [rbp+var_1824], 100h jge loc_48748 mov rax, [rbp+var_10] mov rax, [rax+68h] movsxd rcx, [rbp+var_1824] mov ax, [rax+rcx*2] mov [rbp+var_182A], ax movzx eax, [rbp+var_182A] sar eax, 8 mov ecx, 100h cdq idiv ecx mov [rbp+var_1830], edx movzx eax, [rbp+var_182A] cmp eax, 0 jnz short loc_485CF cmp [rbp+var_1824], 0 jnz loc_48732 loc_485CF: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx cmp dword ptr [rax], 0 jnz short loc_4862E mov cx, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+8], cx mov cx, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+0Ah], cx jmp loc_48716 loc_4862E: movzx eax, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] cmp eax, ecx jge short loc_48661 movzx eax, [rbp+var_182A] mov [rbp+var_184C], eax jmp short loc_48680 loc_48661: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+8] mov [rbp+var_184C], eax loc_48680: mov eax, [rbp+var_184C] mov cx, ax movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+8], cx movzx eax, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+0Ah] cmp eax, ecx jle short loc_486D5 movzx eax, [rbp+var_182A] mov [rbp+var_1850], eax jmp short loc_486F4 loc_486D5: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+0Ah] mov [rbp+var_1850], eax loc_486F4: mov eax, [rbp+var_1850] mov cx, ax movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+0Ah], cx loc_48716: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx mov ecx, [rax] add ecx, 1 mov [rax], ecx loc_48732: jmp short $+2 loc_48734: mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp loc_48574 loc_48748: lea rdi, [rbp+var_1820] mov esi, 100h mov edx, 18h lea rcx, pcmp call _qsort mov [rbp+var_1824], 0 loc_4876F: cmp [rbp+var_1824], 100h jge loc_48961 movsxd rcx, [rbp+var_1824] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx cmp dword ptr [rax], 0 jnz short loc_4879E jmp loc_48961 loc_4879E: movsxd rcx, [rbp+var_1824] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+0Ah] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] sub eax, ecx add eax, 1 mov [rbp+var_1838], eax mov rax, [rbp+var_18] mov rax, [rax+80h] movsxd rdi, [rbp+var_1838] shl rdi, 0 call rax mov [rbp+var_1840], rax movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx mov [rcx+10h], rax cmp rax, 0 jnz short loc_48822 mov [rbp+var_1], 1 jmp loc_48A2A loc_48822: mov rdi, [rbp+var_1840] movsxd rdx, [rbp+var_1838] shl rdx, 0 xor esi, esi call _memset mov [rbp+var_1834], 1 loc_48845: cmp [rbp+var_1834], 100h jge loc_4894B mov rax, [rbp+var_10] mov rax, [rax+68h] movsxd rcx, [rbp+var_1834] mov ax, [rax+rcx*2] mov [rbp+var_1842], ax movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] cmp eax, ecx jl loc_48935 movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+0Ah] cmp eax, ecx jg short loc_48935 movzx eax, [rbp+var_1842] cmp eax, 0 jz short loc_48935 movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] sub eax, ecx mov [rbp+var_1848], eax mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] cmp byte ptr [rax+rcx], 0 jz short loc_4891A mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] movzx eax, byte ptr [rax+rcx] cmp eax, 7Fh jle short loc_48933 loc_4891A: mov eax, [rbp+var_1834] mov dl, al mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] mov [rax+rcx], dl loc_48933: jmp short $+2 loc_48935: jmp short $+2 loc_48937: mov eax, [rbp+var_1834] add eax, 1 mov [rbp+var_1834], eax jmp loc_48845 loc_4894B: jmp short $+2 loc_4894D: mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp loc_4876F loc_48961: mov eax, [rbp+var_1824] mov [rbp+var_1828], eax mov rax, [rbp+var_18] mov rax, [rax+80h] mov ecx, [rbp+var_1828] add ecx, 1 movsxd rdi, ecx shl rdi, 4 call rax mov rcx, [rbp+var_10] mov [rcx+70h], rax cmp rax, 0 jnz short loc_489A1 mov [rbp+var_1], 1 jmp loc_48A2A loc_489A1: mov [rbp+var_1824], 0 loc_489AB: mov eax, [rbp+var_1824] cmp eax, [rbp+var_1828] jge short loc_48A04 mov rax, [rbp+var_10] mov rax, [rax+70h] movsxd rcx, [rbp+var_1824] shl rcx, 4 add rax, rcx movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx mov rdx, [rcx+8] mov [rax], rdx mov rcx, [rcx+10h] mov [rax+8], rcx mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp short loc_489AB loc_48A04: mov rax, [rbp+var_10] mov rdi, [rax+70h] movsxd rax, [rbp+var_1824] shl rax, 4 add rdi, rax xor esi, esi mov edx, 10h call _memset mov [rbp+var_1], 0 loc_48A2A: mov al, [rbp+var_1] add rsp, 1850h pop rbp retn
char create_fromuni(long long a1, long long a2) { long long v2; // rax _QWORD *v3; // rax unsigned __int16 v5; // [rsp+0h] [rbp-1850h] __int16 v6; // [rsp+4h] [rbp-184Ch] int v7; // [rsp+8h] [rbp-1848h] unsigned __int16 v8; // [rsp+Eh] [rbp-1842h] long long v9; // [rsp+10h] [rbp-1840h] int v10; // [rsp+18h] [rbp-1838h] int k; // [rsp+1Ch] [rbp-1834h] int v12; // [rsp+20h] [rbp-1830h] unsigned __int16 v13; // [rsp+26h] [rbp-182Ah] int v14; // [rsp+28h] [rbp-1828h] int i; // [rsp+2Ch] [rbp-1824h] int j; // [rsp+2Ch] [rbp-1824h] int m; // [rsp+2Ch] [rbp-1824h] _DWORD v18[1538]; // [rsp+30h] [rbp-1820h] BYREF long long v19; // [rsp+1838h] [rbp-18h] long long v20; // [rsp+1840h] [rbp-10h] v20 = a1; v19 = a2; if ( !*(_QWORD *)(a1 + 104) ) return 1; memset(v18, 0LL, 6144LL); for ( i = 0; i < 256; ++i ) { v13 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i); v12 = ((int)v13 >> 8) % 256; if ( v13 || !i ) { if ( v18[6 * v12] ) { if ( v13 >= (int)LOWORD(v18[6 * v12 + 2]) ) v6 = v18[6 * v12 + 2]; else v6 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i); LOWORD(v18[6 * v12 + 2]) = v6; if ( v13 <= (int)HIWORD(v18[6 * v12 + 2]) ) v5 = HIWORD(v18[6 * v12 + 2]); else v5 = v13; HIWORD(v18[6 * v12 + 2]) = v5; } else { LOWORD(v18[6 * v12 + 2]) = v13; HIWORD(v18[6 * v12 + 2]) = v13; } ++v18[6 * v12]; } } qsort(v18, 256LL, 24LL, pcmp); for ( j = 0; j < 256 && v18[6 * j]; ++j ) { v10 = HIWORD(v18[6 * j + 2]) - LOWORD(v18[6 * j + 2]) + 1; v9 = (*(long long ( **)(_QWORD))(v19 + 128))(v10); *(_QWORD *)&v18[6 * j + 4] = v9; if ( !v9 ) return 1; memset(v9, 0LL, v10); for ( k = 1; k < 256; ++k ) { v8 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * k); if ( v8 >= (int)LOWORD(v18[6 * j + 2]) && v8 <= (int)HIWORD(v18[6 * j + 2]) ) { if ( v8 ) { v7 = v8 - LOWORD(v18[6 * j + 2]); if ( !*(_BYTE *)(v9 + v7) || *(unsigned __int8 *)(v9 + v7) > 0x7Fu ) *(_BYTE *)(v9 + v7) = k; } } } } v14 = j; v2 = (*(long long ( **)(long long))(v19 + 128))(16LL * (j + 1)); *(_QWORD *)(v20 + 112) = v2; if ( !v2 ) return 1; for ( m = 0; m < v14; ++m ) { v3 = (_QWORD *)(16LL * m + *(_QWORD *)(v20 + 112)); *v3 = *(_QWORD *)&v18[6 * m + 2]; v3[1] = *(_QWORD *)&v18[6 * m + 4]; } memset(16LL * m + *(_QWORD *)(v20 + 112), 0LL, 16LL); return 0; }
create_fromuni: PUSH RBP MOV RBP,RSP SUB RSP,0x1850 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x00148557 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00148a2a LAB_00148557: LEA RDI,[RBP + -0x1820] XOR ESI,ESI MOV EDX,0x1800 CALL 0x00124190 MOV dword ptr [RBP + -0x1824],0x0 LAB_00148574: CMP dword ptr [RBP + -0x1824],0x100 JGE 0x00148748 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOVSXD RCX,dword ptr [RBP + -0x1824] MOV AX,word ptr [RAX + RCX*0x2] MOV word ptr [RBP + -0x182a],AX MOVZX EAX,word ptr [RBP + -0x182a] SAR EAX,0x8 MOV ECX,0x100 CDQ IDIV ECX MOV dword ptr [RBP + -0x1830],EDX MOVZX EAX,word ptr [RBP + -0x182a] CMP EAX,0x0 JNZ 0x001485cf CMP dword ptr [RBP + -0x1824],0x0 JNZ 0x00148732 LAB_001485cf: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX CMP dword ptr [RAX],0x0 JNZ 0x0014862e MOV CX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0x8],CX MOV CX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0xa],CX JMP 0x00148716 LAB_0014862e: MOVZX EAX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] CMP EAX,ECX JGE 0x00148661 MOVZX EAX,word ptr [RBP + -0x182a] MOV dword ptr [RBP + -0x184c],EAX JMP 0x00148680 LAB_00148661: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0x8] MOV dword ptr [RBP + -0x184c],EAX LAB_00148680: MOV EAX,dword ptr [RBP + -0x184c] MOV CX,AX MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0x8],CX MOVZX EAX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0xa] CMP EAX,ECX JLE 0x001486d5 MOVZX EAX,word ptr [RBP + -0x182a] MOV dword ptr [RBP + -0x1850],EAX JMP 0x001486f4 LAB_001486d5: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0xa] MOV dword ptr [RBP + -0x1850],EAX LAB_001486f4: MOV EAX,dword ptr [RBP + -0x1850] MOV CX,AX MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0xa],CX LAB_00148716: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX LAB_00148732: JMP 0x00148734 LAB_00148734: MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x00148574 LAB_00148748: LEA RDI,[RBP + -0x1820] MOV ESI,0x100 MOV EDX,0x18 LEA RCX,[0x148a40] CALL 0x00124550 MOV dword ptr [RBP + -0x1824],0x0 LAB_0014876f: CMP dword ptr [RBP + -0x1824],0x100 JGE 0x00148961 MOVSXD RCX,dword ptr [RBP + -0x1824] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX CMP dword ptr [RAX],0x0 JNZ 0x0014879e JMP 0x00148961 LAB_0014879e: MOVSXD RCX,dword ptr [RBP + -0x1824] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0xa] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] SUB EAX,ECX ADD EAX,0x1 MOV dword ptr [RBP + -0x1838],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x80] MOVSXD RDI,dword ptr [RBP + -0x1838] SHL RDI,0x0 CALL RAX MOV qword ptr [RBP + -0x1840],RAX MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JNZ 0x00148822 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00148a2a LAB_00148822: MOV RDI,qword ptr [RBP + -0x1840] MOVSXD RDX,dword ptr [RBP + -0x1838] SHL RDX,0x0 XOR ESI,ESI CALL 0x00124190 MOV dword ptr [RBP + -0x1834],0x1 LAB_00148845: CMP dword ptr [RBP + -0x1834],0x100 JGE 0x0014894b MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOVSXD RCX,dword ptr [RBP + -0x1834] MOV AX,word ptr [RAX + RCX*0x2] MOV word ptr [RBP + -0x1842],AX MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] CMP EAX,ECX JL 0x00148935 MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0xa] CMP EAX,ECX JG 0x00148935 MOVZX EAX,word ptr [RBP + -0x1842] CMP EAX,0x0 JZ 0x00148935 MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] SUB EAX,ECX MOV dword ptr [RBP + -0x1848],EAX MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] CMP byte ptr [RAX + RCX*0x1],0x0 JZ 0x0014891a MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x7f JLE 0x00148933 LAB_0014891a: MOV EAX,dword ptr [RBP + -0x1834] MOV DL,AL MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] MOV byte ptr [RAX + RCX*0x1],DL LAB_00148933: JMP 0x00148935 LAB_00148935: JMP 0x00148937 LAB_00148937: MOV EAX,dword ptr [RBP + -0x1834] ADD EAX,0x1 MOV dword ptr [RBP + -0x1834],EAX JMP 0x00148845 LAB_0014894b: JMP 0x0014894d LAB_0014894d: MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x0014876f LAB_00148961: MOV EAX,dword ptr [RBP + -0x1824] MOV dword ptr [RBP + -0x1828],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RBP + -0x1828] ADD ECX,0x1 MOVSXD RDI,ECX SHL RDI,0x4 CALL RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x70],RAX CMP RAX,0x0 JNZ 0x001489a1 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00148a2a LAB_001489a1: MOV dword ptr [RBP + -0x1824],0x0 LAB_001489ab: MOV EAX,dword ptr [RBP + -0x1824] CMP EAX,dword ptr [RBP + -0x1828] JGE 0x00148a04 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOVSXD RCX,dword ptr [RBP + -0x1824] SHL RCX,0x4 ADD RAX,RCX MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x001489ab LAB_00148a04: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x70] MOVSXD RAX,dword ptr [RBP + -0x1824] SHL RAX,0x4 ADD RDI,RAX XOR ESI,ESI MOV EDX,0x10 CALL 0x00124190 MOV byte ptr [RBP + -0x1],0x0 LAB_00148a2a: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x1850 POP RBP RET
int1 create_fromuni(long param_1,long param_2) { ushort uVar1; ushort uVar2; int iVar3; void *__s; long lVar4; int8 *puVar5; uint uVar6; int local_183c; int local_182c; int local_1828 [2]; ushort auStack_1820 [4]; int8 auStack_1818 [767]; long local_20; long local_18; int1 local_9; if (*(long *)(param_1 + 0x68) == 0) { local_9 = 1; } else { local_20 = param_2; local_18 = param_1; memset(local_1828,0,0x1800); for (local_182c = 0; local_182c < 0x100; local_182c = local_182c + 1) { uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_182c * 2); uVar6 = (uint)((int)(uint)uVar1 >> 8) % 0x100; if ((uVar1 != 0) || (local_182c == 0)) { if (local_1828[(long)(int)uVar6 * 6] == 0) { auStack_1820[(long)(int)uVar6 * 0xc] = uVar1; auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1; } else { uVar2 = uVar1; if (auStack_1820[(long)(int)uVar6 * 0xc] <= uVar1) { uVar2 = auStack_1820[(long)(int)uVar6 * 0xc]; } auStack_1820[(long)(int)uVar6 * 0xc] = uVar2; if (uVar1 <= auStack_1820[(long)(int)uVar6 * 0xc + 1]) { uVar1 = auStack_1820[(long)(int)uVar6 * 0xc + 1]; } auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1; } local_1828[(long)(int)uVar6 * 6] = local_1828[(long)(int)uVar6 * 6] + 1; } } qsort(local_1828,0x100,0x18,pcmp); local_182c = 0; while ((iVar3 = local_182c, local_182c < 0x100 && (local_1828[(long)local_182c * 6] != 0))) { iVar3 = ((uint)auStack_1820[(long)local_182c * 0xc + 1] - (uint)auStack_1820[(long)local_182c * 0xc]) + 1; __s = (void *)(**(code **)(local_20 + 0x80))((long)iVar3); auStack_1818[(long)local_182c * 3] = __s; if (__s == (void *)0x0) { return 1; } memset(__s,0,(long)iVar3); for (local_183c = 1; local_183c < 0x100; local_183c = local_183c + 1) { uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_183c * 2); if ((((auStack_1820[(long)local_182c * 0xc] <= uVar1) && (uVar1 <= auStack_1820[(long)local_182c * 0xc + 1])) && (uVar1 != 0)) && ((iVar3 = (uint)uVar1 - (uint)auStack_1820[(long)local_182c * 0xc], *(char *)((long)__s + (long)iVar3) == '\0' || (0x7f < *(byte *)((long)__s + (long)iVar3))))) { *(char *)((long)__s + (long)iVar3) = (char)local_183c; } } local_182c = local_182c + 1; } lVar4 = (**(code **)(local_20 + 0x80))((long)(local_182c + 1) << 4); *(long *)(local_18 + 0x70) = lVar4; if (lVar4 == 0) { local_9 = 1; } else { for (local_182c = 0; local_182c < iVar3; local_182c = local_182c + 1) { puVar5 = (int8 *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10); *puVar5 = *(int8 *)(auStack_1820 + (long)local_182c * 0xc); puVar5[1] = auStack_1818[(long)local_182c * 3]; } memset((void *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10),0,0x10); local_9 = 0; } } return local_9; }
46,868
Engine::storeTT(unsigned long, int, int, TTEntryType, chess::Move)
Razamindset[P]pawnstar-chess-engine/src/engine/tts.cpp
void Engine::storeTT(uint64_t hash, int depth, int score, TTEntryType type, Move bestMove) { // keep the table of a constant size if (transpositionTable.size() > 1000000) { // Todo implement a replacement scheme if (transpositionTable.size() > 2000000) { clearTranspositionTable(); } } TTEntry entry; entry.hash = hash; entry.score = score; entry.depth = depth; entry.bestMove = bestMove; entry.type = type; transpositionTable[hash] = entry; }
O0
cpp
Engine::storeTT(unsigned long, int, int, TTEntryType, chess::Move): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movl %r9d, -0x4(%rbp) movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movl %ecx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x48(%rbp) addq $0xd8, %rdi callq 0x206a0 cmpq $0xf4240, %rax # imm = 0xF4240 jbe 0x2056d movq -0x48(%rbp), %rdi addq $0xd8, %rdi callq 0x206a0 cmpq $0x1e8480, %rax # imm = 0x1E8480 jbe 0x2056b movq -0x48(%rbp), %rdi callq 0x20370 jmp 0x2056d movq -0x48(%rbp), %rdi movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movl -0x20(%rbp), %eax movl %eax, -0x38(%rbp) movl -0x1c(%rbp), %eax movl %eax, -0x34(%rbp) movl -0x4(%rbp), %eax movl %eax, -0x2c(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x30(%rbp) addq $0xd8, %rdi leaq -0x18(%rbp), %rsi callq 0x206c0 movq -0x40(%rbp), %rcx movq %rcx, (%rax) movq -0x38(%rbp), %rcx movq %rcx, 0x8(%rax) movq -0x30(%rbp), %rcx movq %rcx, 0x10(%rax) addq $0x50, %rsp popq %rbp retq nop
_ZN6Engine7storeTTEmii11TTEntryTypeN5chess4MoveE: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_4], r9d mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_20], ecx mov [rbp+var_24], r8d mov rdi, [rbp+var_10] mov [rbp+var_48], rdi add rdi, 0D8h call _ZNKSt13unordered_mapIm7TTEntrySt4hashImESt8equal_toImESaISt4pairIKmS0_EEE4sizeEv; std::unordered_map<ulong,TTEntry>::size(void) cmp rax, offset unk_F4240 jbe short loc_2056D mov rdi, [rbp+var_48] add rdi, 0D8h call _ZNKSt13unordered_mapIm7TTEntrySt4hashImESt8equal_toImESaISt4pairIKmS0_EEE4sizeEv; std::unordered_map<ulong,TTEntry>::size(void) cmp rax, 1E8480h jbe short loc_2056B mov rdi, [rbp+var_48]; this call _ZN6Engine23clearTranspositionTableEv; Engine::clearTranspositionTable(void) loc_2056B: jmp short $+2 loc_2056D: mov rdi, [rbp+var_48] mov rax, [rbp+var_18] mov [rbp+var_40], rax mov eax, [rbp+var_20] mov dword ptr [rbp+var_38], eax mov eax, [rbp+var_1C] mov dword ptr [rbp+var_38+4], eax mov eax, [rbp+var_4] mov dword ptr [rbp+var_30+4], eax mov eax, [rbp+var_24] mov dword ptr [rbp+var_30], eax add rdi, 0D8h lea rsi, [rbp+var_18] call _ZNSt13unordered_mapIm7TTEntrySt4hashImESt8equal_toImESaISt4pairIKmS0_EEEixERS6_; std::unordered_map<ulong,TTEntry>::operator[](ulong const&) mov rcx, [rbp+var_40] mov [rax], rcx mov rcx, [rbp+var_38] mov [rax+8], rcx mov rcx, [rbp+var_30] mov [rax+10h], rcx add rsp, 50h pop rbp retn
_QWORD * Engine::storeTT( Engine *a1, long long a2, unsigned int a3, unsigned int a4, unsigned int a5, unsigned int a6) { _QWORD *result; // rax long long v7; // [rsp+10h] [rbp-40h] unsigned long long v8; // [rsp+20h] [rbp-30h] unsigned long long v10; // [rsp+30h] [rbp-20h] _QWORD v11[2]; // [rsp+38h] [rbp-18h] BYREF unsigned int v12; // [rsp+4Ch] [rbp-4h] v12 = a6; v11[1] = a1; v11[0] = a2; v10 = __PAIR64__(a3, a4); if ( std::unordered_map<unsigned long,TTEntry>::size((char *)a1 + 216) > (unsigned long long)&unk_F4240 && (unsigned long long)std::unordered_map<unsigned long,TTEntry>::size((char *)a1 + 216) > 0x1E8480 ) { Engine::clearTranspositionTable(a1); } v7 = v11[0]; v8 = __PAIR64__(v12, a5); result = (_QWORD *)std::unordered_map<unsigned long,TTEntry>::operator[]((char *)a1 + 216, v11); *result = v7; result[1] = v10; result[2] = v8; return result; }
storeTT: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV dword ptr [RBP + -0x4],R9D MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV dword ptr [RBP + -0x20],ECX MOV dword ptr [RBP + -0x24],R8D MOV RDI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x48],RDI ADD RDI,0xd8 CALL 0x001206a0 CMP RAX,0xf4240 JBE 0x0012056d MOV RDI,qword ptr [RBP + -0x48] ADD RDI,0xd8 CALL 0x001206a0 CMP RAX,0x1e8480 JBE 0x0012056b MOV RDI,qword ptr [RBP + -0x48] CALL 0x00120370 LAB_0012056b: JMP 0x0012056d LAB_0012056d: MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x38],EAX MOV EAX,dword ptr [RBP + -0x1c] MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x4] MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x30],EAX ADD RDI,0xd8 LEA RSI,[RBP + -0x18] CALL 0x001206c0 MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x10],RCX ADD RSP,0x50 POP RBP RET
/* Engine::storeTT(unsigned long, int, int, TTEntryType, chess::Move) */ void __thiscall Engine::storeTT(Engine *this,ulong param_1,int4 param_2,int4 param_3,int4 param_5, int4 param_6) { int4 uVar1; ulong uVar2; ulong *puVar3; ulong local_20; Engine *local_18; int4 local_c; local_20 = param_1; local_18 = this; local_c = param_6; uVar2 = std:: unordered_map<unsigned_long,TTEntry,std::hash<unsigned_long>,std::equal_to<unsigned_long>,std::allocator<std::pair<unsigned_long_const,TTEntry>>> ::size((unordered_map<unsigned_long,TTEntry,std::hash<unsigned_long>,std::equal_to<unsigned_long>,std::allocator<std::pair<unsigned_long_const,TTEntry>>> *)(this + 0xd8)); if ((1000000 < uVar2) && (uVar2 = std:: unordered_map<unsigned_long,TTEntry,std::hash<unsigned_long>,std::equal_to<unsigned_long>,std::allocator<std::pair<unsigned_long_const,TTEntry>>> ::size((unordered_map<unsigned_long,TTEntry,std::hash<unsigned_long>,std::equal_to<unsigned_long>,std::allocator<std::pair<unsigned_long_const,TTEntry>>> *)(this + 0xd8)), 2000000 < uVar2)) { clearTranspositionTable(this); } uVar1 = local_c; uVar2 = local_20; puVar3 = (ulong *)std:: unordered_map<unsigned_long,TTEntry,std::hash<unsigned_long>,std::equal_to<unsigned_long>,std::allocator<std::pair<unsigned_long_const,TTEntry>>> ::operator[]((unordered_map<unsigned_long,TTEntry,std::hash<unsigned_long>,std::equal_to<unsigned_long>,std::allocator<std::pair<unsigned_long_const,TTEntry>>> *)(this + 0xd8),&local_20); *puVar3 = uVar2; puVar3[1] = CONCAT44(param_2,param_3); puVar3[2] = CONCAT44(uVar1,param_5); return; }
46,869
Engine::storeTT(unsigned long, int, int, TTEntryType, chess::Move)
Razamindset[P]pawnstar-chess-engine/src/engine/tts.cpp
void Engine::storeTT(uint64_t hash, int depth, int score, TTEntryType type, Move bestMove) { // keep the table of a constant size if (transpositionTable.size() > 1000000) { // Todo implement a replacement scheme if (transpositionTable.size() > 2000000) { clearTranspositionTable(); } } TTEntry entry; entry.hash = hash; entry.score = score; entry.depth = depth; entry.bestMove = bestMove; entry.type = type; transpositionTable[hash] = entry; }
O3
cpp
Engine::storeTT(unsigned long, int, int, TTEntryType, chess::Move): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %r9d, 0xc(%rsp) movl %r8d, %ebp movl %ecx, %r15d movl %edx, %r14d movq %rsi, %r12 movq %rsi, 0x10(%rsp) leaq 0xd8(%rdi), %r13 cmpq $0x1e8481, 0xf0(%rdi) # imm = 0x1E8481 jb 0xbbbf movq %rdi, %rbx movq %r13, %rdi callq 0x5a2a movl $0x0, 0x110(%rbx) leaq 0x10(%rsp), %rsi movq %r13, %rdi callq 0xbc4c movq %r12, (%rax) movl %r15d, 0x8(%rax) movl %r14d, 0xc(%rax) movl %ebp, 0x10(%rax) movl 0xc(%rsp), %ecx movl %ecx, 0x14(%rax) addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN6Engine7storeTTEmii11TTEntryTypeN5chess4MoveE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rsp+48h+var_3C], r9d mov ebp, r8d mov r15d, ecx mov r14d, edx mov r12, rsi mov [rsp+48h+var_38], rsi lea r13, [rdi+0D8h] cmp qword ptr [rdi+0F0h], 1E8481h jb short loc_BBBF mov rbx, rdi mov rdi, r13 call _ZNSt10_HashtableImSt4pairIKm7TTEntryESaIS3_ENSt8__detail10_Select1stESt8equal_toImESt4hashImENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE5clearEv; std::_Hashtable<ulong,std::pair<ulong const,TTEntry>,std::allocator<std::pair<ulong const,TTEntry>>,std::__detail::_Select1st,std::equal_to<ulong>,std::hash<ulong>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::clear(void) mov dword ptr [rbx+110h], 0 loc_BBBF: lea rsi, [rsp+48h+var_38] mov rdi, r13 call _ZNSt8__detail9_Map_baseImSt4pairIKm7TTEntryESaIS4_ENS_10_Select1stESt8equal_toImESt4hashImENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS2_; std::__detail::_Map_base<ulong,std::pair<ulong const,TTEntry>,std::allocator<std::pair<ulong const,TTEntry>>,std::__detail::_Select1st,std::equal_to<ulong>,std::hash<ulong>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](ulong const&) mov [rax], r12 mov [rax+8], r15d mov [rax+0Ch], r14d mov [rax+10h], ebp mov ecx, [rsp+48h+var_3C] mov [rax+14h], ecx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long Engine::storeTT(long long a1, long long a2, int a3, int a4, int a5, int a6) { long long result; // rax _QWORD v11[7]; // [rsp+10h] [rbp-38h] BYREF v11[0] = a2; if ( *(_QWORD *)(a1 + 240) >= 0x1E8481uLL ) { std::_Hashtable<unsigned long,std::pair<unsigned long const,TTEntry>,std::allocator<std::pair<unsigned long const,TTEntry>>,std::__detail::_Select1st,std::equal_to<unsigned long>,std::hash<unsigned long>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::clear((_QWORD *)(a1 + 216)); *(_DWORD *)(a1 + 272) = 0; } result = std::__detail::_Map_base<unsigned long,std::pair<unsigned long const,TTEntry>,std::allocator<std::pair<unsigned long const,TTEntry>>,std::__detail::_Select1st,std::equal_to<unsigned long>,std::hash<unsigned long>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[]( a1 + 216, v11); *(_QWORD *)result = a2; *(_DWORD *)(result + 8) = a4; *(_DWORD *)(result + 12) = a3; *(_DWORD *)(result + 16) = a5; *(_DWORD *)(result + 20) = a6; return result; }
storeTT: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV dword ptr [RSP + 0xc],R9D MOV EBP,R8D MOV R15D,ECX MOV R14D,EDX MOV R12,RSI MOV qword ptr [RSP + 0x10],RSI LEA R13,[RDI + 0xd8] CMP qword ptr [RDI + 0xf0],0x1e8481 JC 0x0010bbbf MOV RBX,RDI MOV RDI,R13 CALL 0x00105a2a MOV dword ptr [RBX + 0x110],0x0 LAB_0010bbbf: LEA RSI,[RSP + 0x10] MOV RDI,R13 CALL 0x0010bc4c MOV qword ptr [RAX],R12 MOV dword ptr [RAX + 0x8],R15D MOV dword ptr [RAX + 0xc],R14D MOV dword ptr [RAX + 0x10],EBP MOV ECX,dword ptr [RSP + 0xc] MOV dword ptr [RAX + 0x14],ECX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Engine::storeTT(unsigned long, int, int, TTEntryType, chess::Move) */ void __thiscall Engine::storeTT(Engine *this,ulong param_1,int4 param_2,int4 param_3,int4 param_5, int4 param_6) { ulong *puVar1; ulong local_38; local_38 = param_1; if (2000000 < *(ulong *)(this + 0xf0)) { std:: _Hashtable<unsigned_long,std::pair<unsigned_long_const,TTEntry>,std::allocator<std::pair<unsigned_long_const,TTEntry>>,std::__detail::_Select1st,std::equal_to<unsigned_long>,std::hash<unsigned_long>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::clear((_Hashtable<unsigned_long,std::pair<unsigned_long_const,TTEntry>,std::allocator<std::pair<unsigned_long_const,TTEntry>>,std::__detail::_Select1st,std::equal_to<unsigned_long>,std::hash<unsigned_long>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)(this + 0xd8)); *(int4 *)(this + 0x110) = 0; } puVar1 = (ulong *)std::__detail:: _Map_base<unsigned_long,std::pair<unsigned_long_const,TTEntry>,std::allocator<std::pair<unsigned_long_const,TTEntry>>,std::__detail::_Select1st,std::equal_to<unsigned_long>,std::hash<unsigned_long>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> ::operator[]((_Map_base<unsigned_long,std::pair<unsigned_long_const,TTEntry>,std::allocator<std::pair<unsigned_long_const,TTEntry>>,std::__detail::_Select1st,std::equal_to<unsigned_long>,std::hash<unsigned_long>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> *)(this + 0xd8),&local_38); *puVar1 = param_1; *(int4 *)(puVar1 + 1) = param_3; *(int4 *)((long)puVar1 + 0xc) = param_2; *(int4 *)(puVar1 + 2) = param_5; *(int4 *)((long)puVar1 + 0x14) = param_6; return; }
46,870
google::protobuf::RepeatedField<unsigned int>::ExtractSubrange(int, int, unsigned int*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_field.h
void RepeatedField<Element>::ExtractSubrange(int start, int num, Element* elements) { GOOGLE_DCHECK_GE(start, 0); GOOGLE_DCHECK_GE(num, 0); GOOGLE_DCHECK_LE(start + num, this->current_size_); // Save the values of the removed elements if requested. if (elements != nullptr) { for (int i = 0; i < num; ++i) elements[i] = this->Get(i + start); } // Slide remaining elements down to fill the gap. if (num > 0) { for (int i = start + num; i < this->current_size_; ++i) this->Set(i - num, this->Get(i)); this->Truncate(this->current_size_ - num); } }
O0
c
google::protobuf::RepeatedField<unsigned int>::ExtractSubrange(int, int, unsigned int*): subq $0x138, %rsp # imm = 0x138 movq %rdi, 0x130(%rsp) movl %esi, 0x12c(%rsp) movl %edx, 0x128(%rsp) movq %rcx, 0x120(%rsp) movq 0x130(%rsp), %rax movq %rax, 0x40(%rsp) xorl %eax, %eax testb $0x1, %al jne 0x18662d jmp 0x1866ec movl 0x12c(%rsp), %eax movb $0x0, 0xe7(%rsp) cmpl $0x0, %eax jl 0x186643 jmp 0x18669c leaq 0x25da66(%rip), %rdx # 0x3e40b0 leaq 0xe8(%rsp), %rdi movq %rdi, 0x30(%rsp) movl $0x3, %esi movl $0x2e7, %ecx # imm = 0x2E7 callq 0x19a670 movq 0x30(%rsp), %rdi movb $0x1, 0xe7(%rsp) leaq 0x25dac6(%rip), %rsi # 0x3e4140 callq 0x199f30 movq %rax, 0x38(%rsp) jmp 0x186686 movq 0x38(%rsp), %rsi leaq 0xd3(%rsp), %rdi callq 0x19a0e0 jmp 0x18669a jmp 0x18669c testb $0x1, 0xe7(%rsp) jne 0x1866a8 jmp 0x1866b5 leaq 0xe8(%rsp), %rdi callq 0x19a6b0 jmp 0x186622 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd8(%rsp) movl %eax, 0xd4(%rsp) testb $0x1, 0xe7(%rsp) jne 0x1866da jmp 0x1866e7 leaq 0xe8(%rsp), %rdi callq 0x19a6b0 jmp 0x18694e jmp 0x1866ee xorl %eax, %eax testb $0x1, %al jne 0x1866f9 jmp 0x1867b8 movl 0x128(%rsp), %eax movb $0x0, 0x97(%rsp) cmpl $0x0, %eax jl 0x18670f jmp 0x186768 leaq 0x25d99a(%rip), %rdx # 0x3e40b0 leaq 0x98(%rsp), %rdi movq %rdi, 0x20(%rsp) movl $0x3, %esi movl $0x2e8, %ecx # imm = 0x2E8 callq 0x19a670 movq 0x20(%rsp), %rdi movb $0x1, 0x97(%rsp) leaq 0x25da19(%rip), %rsi # 0x3e415f callq 0x199f30 movq %rax, 0x28(%rsp) jmp 0x186752 movq 0x28(%rsp), %rsi leaq 0x96(%rsp), %rdi callq 0x19a0e0 jmp 0x186766 jmp 0x186768 testb $0x1, 0x97(%rsp) jne 0x186774 jmp 0x186781 leaq 0x98(%rsp), %rdi callq 0x19a6b0 jmp 0x1866ee movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd8(%rsp) movl %eax, 0xd4(%rsp) testb $0x1, 0x97(%rsp) jne 0x1867a6 jmp 0x1867b3 leaq 0x98(%rsp), %rdi callq 0x19a6b0 jmp 0x18694e jmp 0x1867ba xorl %eax, %eax testb $0x1, %al jne 0x1867c5 jmp 0x186879 movq 0x40(%rsp), %rcx movl 0x12c(%rsp), %eax addl 0x128(%rsp), %eax movl (%rcx), %ecx movb $0x0, 0x57(%rsp) cmpl %ecx, %eax jg 0x1867e5 jmp 0x186835 leaq 0x25d8c4(%rip), %rdx # 0x3e40b0 leaq 0x58(%rsp), %rdi movq %rdi, 0x10(%rsp) movl $0x3, %esi movl $0x2e9, %ecx # imm = 0x2E9 callq 0x19a670 movq 0x10(%rsp), %rdi movb $0x1, 0x57(%rsp) leaq 0x25d966(%rip), %rsi # 0x3e417c callq 0x199f30 movq %rax, 0x18(%rsp) jmp 0x186822 movq 0x18(%rsp), %rsi leaq 0x56(%rsp), %rdi callq 0x19a0e0 jmp 0x186833 jmp 0x186835 testb $0x1, 0x57(%rsp) jne 0x18683e jmp 0x186848 leaq 0x58(%rsp), %rdi callq 0x19a6b0 jmp 0x1867ba movq %rax, %rcx movl %edx, %eax movq %rcx, 0xd8(%rsp) movl %eax, 0xd4(%rsp) testb $0x1, 0x57(%rsp) jne 0x18686a jmp 0x186874 leaq 0x58(%rsp), %rdi callq 0x19a6b0 jmp 0x18694e cmpq $0x0, 0x120(%rsp) je 0x1868cf movl $0x0, 0x50(%rsp) movl 0x50(%rsp), %eax cmpl 0x128(%rsp), %eax jge 0x1868cd movq 0x40(%rsp), %rdi movl 0x50(%rsp), %esi addl 0x12c(%rsp), %esi callq 0x185850 movl (%rax), %edx movq 0x120(%rsp), %rax movslq 0x50(%rsp), %rcx movl %edx, (%rax,%rcx,4) movl 0x50(%rsp), %eax addl $0x1, %eax movl %eax, 0x50(%rsp) jmp 0x18688c jmp 0x1868cf cmpl $0x0, 0x128(%rsp) jle 0x186946 movl 0x12c(%rsp), %eax addl 0x128(%rsp), %eax movl %eax, 0x4c(%rsp) movq 0x40(%rsp), %rcx movl 0x4c(%rsp), %eax cmpl (%rcx), %eax jge 0x186933 movq 0x40(%rsp), %rdi movl 0x4c(%rsp), %eax subl 0x128(%rsp), %eax movl %eax, 0xc(%rsp) movl 0x4c(%rsp), %esi callq 0x185850 movq 0x40(%rsp), %rdi movl 0xc(%rsp), %esi movq %rax, %rdx callq 0x186220 movl 0x4c(%rsp), %eax addl $0x1, %eax movl %eax, 0x4c(%rsp) jmp 0x1868eb movq 0x40(%rsp), %rdi movl (%rdi), %esi subl 0x128(%rsp), %esi callq 0x186960 addq $0x138, %rsp # imm = 0x138 retq movq 0xd8(%rsp), %rdi callq 0x90db0 nopl (%rax,%rax)
_ZN6google8protobuf13RepeatedFieldIjE15ExtractSubrangeEiiPj: sub rsp, 138h mov [rsp+138h+var_8], rdi mov [rsp+138h+var_C], esi mov [rsp+138h+var_10], edx mov [rsp+138h+var_18], rcx mov rax, [rsp+138h+var_8] mov [rsp+138h+var_F8], rax loc_186622: xor eax, eax test al, 1 jnz short loc_18662D jmp loc_1866EC loc_18662D: mov eax, [rsp+138h+var_C] mov [rsp+138h+var_51], 0 cmp eax, 0 jl short loc_186643 jmp short loc_18669C loc_186643: lea rdx, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+138h+var_50] mov [rsp+138h+var_108], rdi mov esi, 3 mov ecx, 2E7h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+138h+var_108] mov [rsp+138h+var_51], 1 lea rsi, aCheckFailedSta_1; "CHECK failed: (start) >= (0): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+138h+var_100], rax jmp short $+2 loc_186686: mov rsi, [rsp+138h+var_100] lea rdi, [rsp+138h+var_65] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_18669A: jmp short $+2 loc_18669C: test [rsp+138h+var_51], 1 jnz short loc_1866A8 jmp short loc_1866B5 loc_1866A8: lea rdi, [rsp+138h+var_50]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1866B5: jmp loc_186622 mov rcx, rax mov eax, edx mov [rsp+arg_D0], rcx mov [rsp+arg_CC], eax test [rsp+arg_DF], 1 jnz short loc_1866DA jmp short loc_1866E7 loc_1866DA: lea rdi, [rsp+arg_E0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1866E7: jmp loc_18694E loc_1866EC: jmp short $+2 loc_1866EE: xor eax, eax test al, 1 jnz short loc_1866F9 jmp loc_1867B8 loc_1866F9: mov eax, [rsp+138h+var_10] mov [rsp+138h+var_A1], 0 cmp eax, 0 jl short loc_18670F jmp short loc_186768 loc_18670F: lea rdx, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+138h+var_A0] mov [rsp+138h+var_118], rdi mov esi, 3 mov ecx, 2E8h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+138h+var_118] mov [rsp+138h+var_A1], 1 lea rsi, aCheckFailedNum_0; "CHECK failed: (num) >= (0): " call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+138h+var_110], rax jmp short $+2 loc_186752: mov rsi, [rsp+138h+var_110] lea rdi, [rsp+138h+var_A2] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_186766: jmp short $+2 loc_186768: test [rsp+138h+var_A1], 1 jnz short loc_186774 jmp short loc_186781 loc_186774: lea rdi, [rsp+138h+var_A0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_186781: jmp loc_1866EE mov rcx, rax mov eax, edx mov [rsp+arg_D0], rcx mov [rsp+arg_CC], eax test [rsp+arg_8F], 1 jnz short loc_1867A6 jmp short loc_1867B3 loc_1867A6: lea rdi, [rsp+arg_90]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_1867B3: jmp loc_18694E loc_1867B8: jmp short $+2 loc_1867BA: xor eax, eax test al, 1 jnz short loc_1867C5 jmp loc_186879 loc_1867C5: mov rcx, [rsp+138h+var_F8] mov eax, [rsp+138h+var_C] add eax, [rsp+138h+var_10] mov ecx, [rcx] mov [rsp+138h+var_E1], 0 cmp eax, ecx jg short loc_1867E5 jmp short loc_186835 loc_1867E5: lea rdx, aWorkspaceLlm4b_21; "/workspace/llm4binary/github2025/aimrt_"... lea rdi, [rsp+138h+var_E0] mov [rsp+138h+var_128], rdi mov esi, 3 mov ecx, 2E9h call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) mov rdi, [rsp+138h+var_128] mov [rsp+138h+var_E1], 1 lea rsi, aCheckFailedSta_2; "CHECK failed: (start + num) <= (this->c"... call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) mov [rsp+138h+var_120], rax jmp short $+2 loc_186822: mov rsi, [rsp+138h+var_120] lea rdi, [rsp+138h+var_E2] call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) jmp short $+2 loc_186833: jmp short $+2 loc_186835: test [rsp+138h+var_E1], 1 jnz short loc_18683E jmp short loc_186848 loc_18683E: lea rdi, [rsp+138h+var_E0]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_186848: jmp loc_1867BA mov rcx, rax mov eax, edx mov [rsp+arg_D0], rcx mov [rsp+arg_CC], eax test [rsp+arg_4F], 1 jnz short loc_18686A jmp short loc_186874 loc_18686A: lea rdi, [rsp+arg_50]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() loc_186874: jmp loc_18694E loc_186879: cmp [rsp+138h+var_18], 0 jz short loc_1868CF mov [rsp+138h+var_E8], 0 loc_18688C: mov eax, [rsp+138h+var_E8] cmp eax, [rsp+138h+var_10] jge short loc_1868CD mov rdi, [rsp+138h+var_F8] mov esi, [rsp+138h+var_E8] add esi, [rsp+138h+var_C] call _ZNK6google8protobuf13RepeatedFieldIjE3GetEi; google::protobuf::RepeatedField<uint>::Get(int) mov edx, [rax] mov rax, [rsp+138h+var_18] movsxd rcx, [rsp+138h+var_E8] mov [rax+rcx*4], edx mov eax, [rsp+138h+var_E8] add eax, 1 mov [rsp+138h+var_E8], eax jmp short loc_18688C loc_1868CD: jmp short $+2 loc_1868CF: cmp [rsp+138h+var_10], 0 jle short loc_186946 mov eax, [rsp+138h+var_C] add eax, [rsp+138h+var_10] mov [rsp+138h+var_EC], eax loc_1868EB: mov rcx, [rsp+138h+var_F8] mov eax, [rsp+138h+var_EC] cmp eax, [rcx] jge short loc_186933 mov rdi, [rsp+138h+var_F8] mov eax, [rsp+138h+var_EC] sub eax, [rsp+138h+var_10] mov [rsp+138h+var_12C], eax mov esi, [rsp+138h+var_EC] call _ZNK6google8protobuf13RepeatedFieldIjE3GetEi; google::protobuf::RepeatedField<uint>::Get(int) mov rdi, [rsp+138h+var_F8] mov esi, [rsp+138h+var_12C] mov rdx, rax call _ZN6google8protobuf13RepeatedFieldIjE3SetEiRKj; google::protobuf::RepeatedField<uint>::Set(int,uint const&) mov eax, [rsp+138h+var_EC] add eax, 1 mov [rsp+138h+var_EC], eax jmp short loc_1868EB loc_186933: mov rdi, [rsp+138h+var_F8] mov esi, [rdi] sub esi, [rsp+138h+var_10] call _ZN6google8protobuf13RepeatedFieldIjE8TruncateEi; google::protobuf::RepeatedField<uint>::Truncate(int) loc_186946: add rsp, 138h retn loc_18694E: mov rdi, [rsp+arg_D0] call __Unwind_Resume
long long google::protobuf::RepeatedField<unsigned int>::ExtractSubrange( int *a1, int a2, int a3, long long a4, int a5, int a6) { long long result; // rax int *v7; // rax _DWORD *v8; // rax int j; // [rsp+4Ch] [rbp-ECh] int i; // [rsp+50h] [rbp-E8h] long long v11; // [rsp+120h] [rbp-18h] int v12; // [rsp+128h] [rbp-10h] v12 = a3; v11 = a4; result = 0LL; if ( a4 ) { for ( i = 0; ; ++i ) { result = (unsigned int)i; if ( i >= v12 ) break; v7 = (int *)google::protobuf::RepeatedField<unsigned int>::Get((long long)a1, a2 + i, a3, a4, a5, a6); a3 = *v7; LODWORD(a4) = i; *(_DWORD *)(v11 + 4LL * i) = *v7; } } if ( v12 > 0 ) { for ( j = v12 + a2; j < *a1; ++j ) { v8 = (_DWORD *)google::protobuf::RepeatedField<unsigned int>::Get((long long)a1, j, a3, (int)a1, a5, a6); google::protobuf::RepeatedField<unsigned int>::Set((long long)a1, j - v12, v8); } return google::protobuf::RepeatedField<unsigned int>::Truncate((_DWORD)a1, *a1 - v12, a3, (_DWORD)a1, a5, a6); } return result; }
46,871
google::protobuf::RepeatedField<unsigned int>::ExtractSubrange(int, int, unsigned int*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/repeated_field.h
void RepeatedField<Element>::ExtractSubrange(int start, int num, Element* elements) { GOOGLE_DCHECK_GE(start, 0); GOOGLE_DCHECK_GE(num, 0); GOOGLE_DCHECK_LE(start + num, this->current_size_); // Save the values of the removed elements if requested. if (elements != nullptr) { for (int i = 0; i < num; ++i) elements[i] = this->Get(i + start); } // Slide remaining elements down to fill the gap. if (num > 0) { for (int i = start + num; i < this->current_size_; ++i) this->Set(i - num, this->Get(i)); this->Truncate(this->current_size_ - num); } }
O3
c
google::protobuf::RepeatedField<unsigned int>::ExtractSubrange(int, int, unsigned int*): testq %rcx, %rcx sete %al testl %edx, %edx setle %r8b orb %al, %r8b jne 0x810cc movslq %esi, %rax movl %edx, %r8d shlq $0x3, %rax addq 0x8(%rdi), %rax xorl %r9d, %r9d movq (%rax,%r9,8), %r10 movq %r10, (%rcx,%r9,8) incq %r9 cmpq %r9, %r8 jne 0x810bc testl %edx, %edx jle 0x81105 addl %edx, %esi movslq (%rdi), %rax cmpl %eax, %esi jge 0x810fd movq 0x8(%rdi), %rcx movslq %esi, %rsi movl %edx, %r9d shlq $0x3, %r9 movq %rcx, %r8 subq %r9, %r8 movq (%rcx,%rsi,8), %r9 movq %r9, (%r8,%rsi,8) incq %rsi cmpq %rax, %rsi jl 0x810ed testl %eax, %eax jle 0x81105 subl %edx, %eax movl %eax, (%rdi) retq
_ZN6google8protobuf13RepeatedFieldIlE15ExtractSubrangeEiiPl: test rcx, rcx setz al test edx, edx setle r8b or r8b, al jnz short loc_810CC movsxd rax, esi mov r8d, edx shl rax, 3 add rax, [rdi+8] xor r9d, r9d loc_810BC: mov r10, [rax+r9*8] mov [rcx+r9*8], r10 inc r9 cmp r8, r9 jnz short loc_810BC loc_810CC: test edx, edx jle short locret_81105 add esi, edx movsxd rax, dword ptr [rdi] cmp esi, eax jge short loc_810FD mov rcx, [rdi+8] movsxd rsi, esi mov r9d, edx shl r9, 3 mov r8, rcx sub r8, r9 loc_810ED: mov r9, [rcx+rsi*8] mov [r8+rsi*8], r9 inc rsi cmp rsi, rax jl short loc_810ED loc_810FD: test eax, eax jle short locret_81105 sub eax, edx mov [rdi], eax locret_81105: retn
char google::protobuf::RepeatedField<long>::ExtractSubrange(int *a1, int a2, int a3, long long a4) { long long v4; // rax long long v5; // r9 long long v6; // rsi long long v7; // rcx LOBYTE(v4) = a4 == 0; if ( a4 != 0 && a3 > 0 ) { v4 = *((_QWORD *)a1 + 1) + 8LL * a2; v5 = 0LL; do { *(_QWORD *)(a4 + 8 * v5) = *(_QWORD *)(v4 + 8 * v5); ++v5; } while ( a3 != v5 ); } if ( a3 > 0 ) { LODWORD(v6) = a3 + a2; v4 = *a1; if ( (int)v6 < (int)v4 ) { v7 = *((_QWORD *)a1 + 1); v6 = (int)v6; do { *(_QWORD *)(v7 - 8LL * (unsigned int)a3 + 8 * v6) = *(_QWORD *)(v7 + 8 * v6); ++v6; } while ( v6 < v4 ); } if ( (int)v4 > 0 ) { LODWORD(v4) = v4 - a3; *a1 = v4; } } return v4; }
ExtractSubrange: TEST RCX,RCX SETZ AL TEST EDX,EDX SETLE R8B OR R8B,AL JNZ 0x001810cc MOVSXD RAX,ESI MOV R8D,EDX SHL RAX,0x3 ADD RAX,qword ptr [RDI + 0x8] XOR R9D,R9D LAB_001810bc: MOV R10,qword ptr [RAX + R9*0x8] MOV qword ptr [RCX + R9*0x8],R10 INC R9 CMP R8,R9 JNZ 0x001810bc LAB_001810cc: TEST EDX,EDX JLE 0x00181105 ADD ESI,EDX MOVSXD RAX,dword ptr [RDI] CMP ESI,EAX JGE 0x001810fd MOV RCX,qword ptr [RDI + 0x8] MOVSXD RSI,ESI MOV R9D,EDX SHL R9,0x3 MOV R8,RCX SUB R8,R9 LAB_001810ed: MOV R9,qword ptr [RCX + RSI*0x8] MOV qword ptr [R8 + RSI*0x8],R9 INC RSI CMP RSI,RAX JL 0x001810ed LAB_001810fd: TEST EAX,EAX JLE 0x00181105 SUB EAX,EDX MOV dword ptr [RDI],EAX LAB_00181105: RET
/* google::protobuf::RepeatedField<long>::ExtractSubrange(int, int, long*) */ void __thiscall google::protobuf::RepeatedField<long>::ExtractSubrange (RepeatedField<long> *this,int param_1,int param_2,long *param_3) { int iVar1; long lVar2; long lVar3; ulong uVar4; if (0 < param_2 && param_3 != (long *)0x0) { lVar2 = *(long *)(this + 8); uVar4 = 0; do { param_3[uVar4] = *(long *)((long)param_1 * 8 + lVar2 + uVar4 * 8); uVar4 = uVar4 + 1; } while ((uint)param_2 != uVar4); } if (0 < param_2) { iVar1 = *(int *)this; if (param_1 + param_2 < iVar1) { lVar2 = *(long *)(this + 8); lVar3 = (long)(param_1 + param_2); do { *(int8 *)(lVar2 + (ulong)(uint)param_2 * -8 + lVar3 * 8) = *(int8 *)(lVar2 + lVar3 * 8); lVar3 = lVar3 + 1; } while (lVar3 < iVar1); } if (0 < iVar1) { *(int *)this = iVar1 - param_2; } } return; }
46,872
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/common.cpp
void string_process_escapes(std::string & input) { std::size_t input_len = input.length(); std::size_t output_idx = 0; for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) { if (input[input_idx] == '\\' && input_idx + 1 < input_len) { switch (input[++input_idx]) { case 'n': input[output_idx++] = '\n'; break; case 'r': input[output_idx++] = '\r'; break; case 't': input[output_idx++] = '\t'; break; case '\'': input[output_idx++] = '\''; break; case '\"': input[output_idx++] = '\"'; break; case '\\': input[output_idx++] = '\\'; break; case 'x': // Handle \x12, etc if (input_idx + 2 < input_len) { const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 }; char *err_p = nullptr; const long val = std::strtol(x, &err_p, 16); if (err_p == x + 2) { input_idx += 2; input[output_idx++] = char(val); break; } } // fall through default: input[output_idx++] = '\\'; input[output_idx++] = input[input_idx]; break; } } else { input[output_idx++] = input[input_idx]; } } input.resize(output_idx); }
O3
cpp
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq 0x8(%rdi), %r13 testq %r13, %r13 je 0x77153 leaq 0xf(%rsp), %r12 xorl %r14d, %r14d leaq 0xd(%rsp), %rdi leaq 0x10(%rsp), %rsi xorl %ecx, %ecx movq (%rbx), %rax movb (%rax,%rcx), %dl cmpb $0x5c, %dl jne 0x77072 leaq 0x1(%rcx), %rbp cmpq %r13, %rbp jae 0x77072 movzbl (%rax,%rbp), %edx cmpl $0x6d, %edx jle 0x7708c cmpl $0x73, %edx jg 0x770ad cmpl $0x6e, %edx je 0x7711c cmpl $0x72, %edx jne 0x770fc movb $0xd, (%rax,%r14) jmp 0x7712f movb %dl, (%rax,%r14) incq %r14 movq %rcx, %rbp incq %rbp movq %rbp, %rcx cmpq %r13, %rbp jb 0x77034 jmp 0x77156 cmpl $0x22, %edx je 0x77115 cmpl $0x27, %edx je 0x7712a cmpl $0x5c, %edx jne 0x770fc movb $0x5c, (%rax,%r14) jmp 0x7712f cmpl $0x74, %edx je 0x77123 cmpl $0x78, %edx jne 0x770fc leaq 0x3(%rcx), %r15 cmpq %r13, %r15 jae 0x770fc movb 0x2(%rax,%rcx), %dl movb %dl, 0xd(%rsp) movb 0x3(%rax,%rcx), %al movb %al, 0xe(%rsp) movb $0x0, 0xf(%rsp) movq $0x0, 0x10(%rsp) movl $0x10, %edx callq 0x1be90 cmpq %r12, 0x10(%rsp) je 0x77137 movq (%rbx), %rax leaq 0xd(%rsp), %rdi leaq 0x10(%rsp), %rsi movb $0x5c, (%rax,%r14) movq (%rbx), %rax movb (%rax,%rbp), %cl movb %cl, 0x1(%rax,%r14) addq $0x2, %r14 jmp 0x7707c movb $0x22, (%rax,%r14) jmp 0x7712f movb $0xa, (%rax,%r14) jmp 0x7712f movb $0x9, (%rax,%r14) jmp 0x7712f movb $0x27, (%rax,%r14) incq %r14 jmp 0x7707c movq (%rbx), %rcx movb %al, (%rcx,%r14) incq %r14 movq %r15, %rbp leaq 0xd(%rsp), %rdi leaq 0x10(%rsp), %rsi jmp 0x7707c xorl %r14d, %r14d movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x1b290 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi mov r13, [rdi+8] test r13, r13 jz loc_77153 lea r12, [rsp+48h+var_39] xor r14d, r14d lea rdi, [rsp+48h+var_3B] lea rsi, [rsp+48h+var_38] xor ecx, ecx loc_77034: mov rax, [rbx] mov dl, [rax+rcx] cmp dl, 5Ch ; '\' jnz short loc_77072 lea rbp, [rcx+1] cmp rbp, r13 jnb short loc_77072 movzx edx, byte ptr [rax+rbp] cmp edx, 6Dh ; 'm' jle short loc_7708C cmp edx, 73h ; 's' jg short loc_770AD cmp edx, 6Eh ; 'n' jz loc_7711C cmp edx, 72h ; 'r' jnz loc_770FC mov byte ptr [rax+r14], 0Dh jmp loc_7712F loc_77072: mov [rax+r14], dl inc r14 mov rbp, rcx loc_7707C: inc rbp mov rcx, rbp cmp rbp, r13 jb short loc_77034 jmp loc_77156 loc_7708C: cmp edx, 22h ; '"' jz loc_77115 cmp edx, 27h ; ''' jz loc_7712A cmp edx, 5Ch ; '\' jnz short loc_770FC mov byte ptr [rax+r14], 5Ch ; '\' jmp loc_7712F loc_770AD: cmp edx, 74h ; 't' jz short loc_77123 cmp edx, 78h ; 'x' jnz short loc_770FC lea r15, [rcx+3] cmp r15, r13 jnb short loc_770FC mov dl, [rax+rcx+2] mov [rsp+48h+var_3B], dl mov al, [rax+rcx+3] mov [rsp+48h+var_3A], al mov [rsp+48h+var_39], 0 mov [rsp+48h+var_38], 0 mov edx, 10h call _strtol cmp [rsp+48h+var_38], r12 jz short loc_77137 mov rax, [rbx] lea rdi, [rsp+48h+var_3B] lea rsi, [rsp+48h+var_38] loc_770FC: mov byte ptr [rax+r14], 5Ch ; '\' mov rax, [rbx] mov cl, [rax+rbp] mov [rax+r14+1], cl add r14, 2 jmp loc_7707C loc_77115: mov byte ptr [rax+r14], 22h ; '"' jmp short loc_7712F loc_7711C: mov byte ptr [rax+r14], 0Ah jmp short loc_7712F loc_77123: mov byte ptr [rax+r14], 9 jmp short loc_7712F loc_7712A: mov byte ptr [rax+r14], 27h ; ''' loc_7712F: inc r14 jmp loc_7707C loc_77137: mov rcx, [rbx] mov [rcx+r14], al inc r14 mov rbp, r15 lea rdi, [rsp+48h+var_3B] lea rsi, [rsp+48h+var_38] jmp loc_7707C loc_77153: xor r14d, r14d loc_77156: mov rdi, rbx mov rsi, r14 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long string_process_escapes(long long *a1, long long a2, long long a3, long long a4) { unsigned long long v4; // r13 long long v5; // r14 long long v6; // rax char v7; // dl long long v8; // rbp unsigned int v9; // edx long long v10; // r15 char v11; // al _BYTE v13[2]; // [rsp+Dh] [rbp-3Bh] BYREF char v14; // [rsp+Fh] [rbp-39h] BYREF char *v15; // [rsp+10h] [rbp-38h] BYREF v4 = a1[1]; if ( v4 ) { v5 = 0LL; a4 = 0LL; while ( 1 ) { v6 = *a1; v7 = *(_BYTE *)(*a1 + a4); if ( v7 == 92 && (v8 = a4 + 1, a4 + 1 < v4) ) { v9 = *(unsigned __int8 *)(v6 + v8); if ( v9 <= 0x6D ) { switch ( v9 ) { case '"': *(_BYTE *)(v6 + v5) = 34; goto LABEL_27; case '\'': *(_BYTE *)(v6 + v5) = 39; goto LABEL_27; case '\\': *(_BYTE *)(v6 + v5) = 92; goto LABEL_27; } } else if ( *(unsigned __int8 *)(v6 + v8) > 0x73u ) { if ( v9 == 116 ) { *(_BYTE *)(v6 + v5) = 9; goto LABEL_27; } if ( v9 == 120 ) { v10 = a4 + 3; if ( a4 + 3 < v4 ) { v13[0] = *(_BYTE *)(v6 + a4 + 2); v13[1] = *(_BYTE *)(v6 + a4 + 3); v14 = 0; v15 = 0LL; v11 = strtol(v13, &v15, 16LL); if ( v15 == &v14 ) { *(_BYTE *)(*a1 + v5++) = v11; v8 = v10; goto LABEL_11; } v6 = *a1; } } } else { if ( v9 == 110 ) { *(_BYTE *)(v6 + v5) = 10; goto LABEL_27; } if ( v9 == 114 ) { *(_BYTE *)(v6 + v5) = 13; LABEL_27: ++v5; goto LABEL_11; } } *(_BYTE *)(v6 + v5) = 92; *(_BYTE *)(*a1 + v5 + 1) = *(_BYTE *)(*a1 + v8); v5 += 2LL; } else { *(_BYTE *)(v6 + v5++) = v7; v8 = a4; } LABEL_11: a4 = v8 + 1; if ( v8 + 1 >= v4 ) return std::string::resize(a1, v5, 0LL, a4); } } v5 = 0LL; return std::string::resize(a1, v5, 0LL, a4); }
string_process_escapes: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV R13,qword ptr [RDI + 0x8] TEST R13,R13 JZ 0x00177153 LEA R12,[RSP + 0xf] XOR R14D,R14D LEA RDI,[RSP + 0xd] LEA RSI,[RSP + 0x10] XOR ECX,ECX LAB_00177034: MOV RAX,qword ptr [RBX] MOV DL,byte ptr [RAX + RCX*0x1] CMP DL,0x5c JNZ 0x00177072 LEA RBP,[RCX + 0x1] CMP RBP,R13 JNC 0x00177072 MOVZX EDX,byte ptr [RAX + RBP*0x1] CMP EDX,0x6d JLE 0x0017708c CMP EDX,0x73 JG 0x001770ad CMP EDX,0x6e JZ 0x0017711c CMP EDX,0x72 JNZ 0x001770fc MOV byte ptr [RAX + R14*0x1],0xd JMP 0x0017712f LAB_00177072: MOV byte ptr [RAX + R14*0x1],DL INC R14 MOV RBP,RCX LAB_0017707c: INC RBP MOV RCX,RBP CMP RBP,R13 JC 0x00177034 JMP 0x00177156 LAB_0017708c: CMP EDX,0x22 JZ 0x00177115 CMP EDX,0x27 JZ 0x0017712a CMP EDX,0x5c JNZ 0x001770fc MOV byte ptr [RAX + R14*0x1],0x5c JMP 0x0017712f LAB_001770ad: CMP EDX,0x74 JZ 0x00177123 CMP EDX,0x78 JNZ 0x001770fc LEA R15,[RCX + 0x3] CMP R15,R13 JNC 0x001770fc MOV DL,byte ptr [RAX + RCX*0x1 + 0x2] MOV byte ptr [RSP + 0xd],DL MOV AL,byte ptr [RAX + RCX*0x1 + 0x3] MOV byte ptr [RSP + 0xe],AL MOV byte ptr [RSP + 0xf],0x0 MOV qword ptr [RSP + 0x10],0x0 MOV EDX,0x10 CALL 0x0011be90 CMP qword ptr [RSP + 0x10],R12 JZ 0x00177137 MOV RAX,qword ptr [RBX] LEA RDI,[RSP + 0xd] LEA RSI,[RSP + 0x10] LAB_001770fc: MOV byte ptr [RAX + R14*0x1],0x5c MOV RAX,qword ptr [RBX] MOV CL,byte ptr [RAX + RBP*0x1] MOV byte ptr [RAX + R14*0x1 + 0x1],CL ADD R14,0x2 JMP 0x0017707c LAB_00177115: MOV byte ptr [RAX + R14*0x1],0x22 JMP 0x0017712f LAB_0017711c: MOV byte ptr [RAX + R14*0x1],0xa JMP 0x0017712f LAB_00177123: MOV byte ptr [RAX + R14*0x1],0x9 JMP 0x0017712f LAB_0017712a: MOV byte ptr [RAX + R14*0x1],0x27 LAB_0017712f: INC R14 JMP 0x0017707c LAB_00177137: MOV RCX,qword ptr [RBX] MOV byte ptr [RCX + R14*0x1],AL INC R14 MOV RBP,R15 LEA RDI,[RSP + 0xd] LEA RSI,[RSP + 0x10] JMP 0x0017707c LAB_00177153: XOR R14D,R14D LAB_00177156: MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x0011b290 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_process_escapes(std::__cxx11::string&) */ void string_process_escapes(string *param_1) { ulong uVar1; byte bVar2; ulong uVar3; long lVar4; ulong uVar5; long lVar6; char local_3b; int1 local_3a; char local_39; char *local_38; uVar3 = *(ulong *)(param_1 + 8); if (uVar3 == 0) { lVar6 = 0; } else { lVar6 = 0; uVar5 = 0; do { lVar4 = *(long *)param_1; if ((*(char *)(lVar4 + uVar5) == '\\') && (uVar1 = uVar5 + 1, uVar1 < uVar3)) { bVar2 = *(byte *)(lVar4 + uVar1); if (bVar2 < 0x6e) { if (bVar2 == 0x22) { *(int1 *)(lVar4 + lVar6) = 0x22; } else if (bVar2 == 0x27) { *(int1 *)(lVar4 + lVar6) = 0x27; } else { if (bVar2 != 0x5c) goto LAB_001770fc; *(int1 *)(lVar4 + lVar6) = 0x5c; } } else if (bVar2 < 0x74) { if (bVar2 == 0x6e) { *(int1 *)(lVar4 + lVar6) = 10; } else { if (bVar2 != 0x72) goto LAB_001770fc; *(int1 *)(lVar4 + lVar6) = 0xd; } } else { if (bVar2 != 0x74) { if ((bVar2 == 0x78) && (uVar5 + 3 < uVar3)) { local_3b = *(char *)(lVar4 + 2 + uVar5); local_3a = *(int1 *)(lVar4 + 3 + uVar5); local_39 = '\0'; local_38 = (char *)0x0; lVar4 = strtol(&local_3b,&local_38,0x10); if (local_38 == &local_39) { *(char *)(*(long *)param_1 + lVar6) = (char)lVar4; lVar6 = lVar6 + 1; uVar5 = uVar5 + 3; goto LAB_0017707c; } lVar4 = *(long *)param_1; } LAB_001770fc: *(int1 *)(lVar4 + lVar6) = 0x5c; *(int1 *)(*(long *)param_1 + 1 + lVar6) = *(int1 *)(*(long *)param_1 + uVar1); lVar6 = lVar6 + 2; uVar5 = uVar1; goto LAB_0017707c; } *(int1 *)(lVar4 + lVar6) = 9; } lVar6 = lVar6 + 1; uVar5 = uVar1; } else { *(char *)(lVar4 + lVar6) = *(char *)(lVar4 + uVar5); lVar6 = lVar6 + 1; } LAB_0017707c: uVar5 = uVar5 + 1; } while (uVar5 < uVar3); } std::__cxx11::string::resize((ulong)param_1,(char)lVar6); return; }
46,873
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>)
monkey531[P]llama/common/json.hpp
iterator erase(iterator first, iterator last) { if (first == last) { return first; } const auto elements_affected = std::distance(first, last); const auto offset = std::distance(Container::begin(), first); // This is the start situation. We need to delete elements_affected // elements (3 in this example: e, f, g), and need to return an // iterator past the last deleted element (h in this example). // Note that offset is the distance from the start of the vector // to first. We will need this later. // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // first last // Since we cannot move const Keys, we re-construct them in place. // We start at first and re-construct (viz. copy) the elements from // the back of the vector. Example for first iteration: // ,--------. // v | destroy e and re-construct with h // [ a, b, c, d, e, f, g, h, i, j ] // ^ ^ // it it + elements_affected for (auto it = first; std::next(it, elements_affected) != Container::end(); ++it) { it->~value_type(); // destroy but keep allocation new (&*it) value_type{std::move(*std::next(it, elements_affected))}; // "move" next element to it } // [ a, b, c, d, h, i, j, h, i, j ] // ^ ^ // first last // remove the unneeded elements at the end of the vector Container::resize(this->size() - static_cast<size_type>(elements_affected)); // [ a, b, c, d, h, i, j ] // ^ ^ // first last // first is now pointing past the last deleted element, but we cannot // use this iterator, because it may have been invalidated by the // resize call. Instead, we can return begin() + offset. return Container::begin() + offset; }
O3
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>>): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %rbx cmpq %rdx, %rsi je 0x97f17 movq %rdx, %r12 movq %rdi, %r14 movq %rdx, %rbp subq %rbx, %rbp sarq $0x5, %rbp movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rax, %rbp movq (%rdi), %rax movq %rax, (%rsp) movq %rdx, %r15 negq %r15 movq %rbx, %r13 cmpq 0x8(%r14), %r12 je 0x97eea movq %r13, %rdi callq 0x90864 movq %r13, %rdi movq %r12, %rsi callq 0x97f2a addq $0x60, %r13 addq $0x60, %r12 addq $-0x60, %r15 jmp 0x97ec3 subq (%rsp), %rbx addq (%r14), %r15 negq %r15 sarq $0x5, %r15 movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB imulq %rax, %r15 subq %rbp, %r15 movq %r14, %rdi movq %r15, %rsi callq 0x97fb6 addq (%r14), %rbx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE5eraseEN9__gnu_cxx17__normal_iteratorIPSK_S3_ISK_SL_EEESR_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rsi cmp rsi, rdx jz loc_97F17 mov r12, rdx mov r14, rdi mov rbp, rdx sub rbp, rbx sar rbp, 5 mov rax, 0AAAAAAAAAAAAAAABh imul rbp, rax mov rax, [rdi] mov [rsp+38h+var_38], rax mov r15, rdx neg r15 mov r13, rbx loc_97EC3: cmp r12, [r14+8] jz short loc_97EEA mov rdi, r13 call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEED2Ev; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::~pair() mov rdi, r13 mov rsi, r12 call _ZNSt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEEN5minja5ValueEEC2EOSI_; std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>::pair(std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>&&) add r13, 60h ; '`' add r12, 60h ; '`' add r15, 0FFFFFFFFFFFFFFA0h jmp short loc_97EC3 loc_97EEA: sub rbx, [rsp+38h+var_38] add r15, [r14] neg r15 sar r15, 5 mov rax, 0AAAAAAAAAAAAAAABh imul r15, rax sub r15, rbp mov rdi, r14 mov rsi, r15 call _ZNSt6vectorISt4pairIKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES_IhSaIhEEvEEN5minja5ValueEESaISI_EE6resizeEm; std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>::resize(ulong) add rbx, [r14] loc_97F17: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::erase( long long *a1, long long a2, long long a3) { long long v3; // rbx long long v4; // r12 unsigned long long v5; // rbp long long v6; // r15 long long v7; // r13 long long v9; // [rsp+0h] [rbp-38h] v3 = a2; if ( a2 != a3 ) { v4 = a3; v5 = 0xAAAAAAAAAAAAAAABLL * ((a3 - a2) >> 5); v9 = *a1; v6 = -a3; v7 = a2; while ( v4 != a1[1] ) { std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::~pair(v7); std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>::pair( v7, v4); v7 += 96LL; v4 += 96LL; v6 -= 96LL; } std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>::resize( a1, 0xAAAAAAAAAAAAAAABLL * (-(*a1 + v6) >> 5) - v5); return *a1 + a2 - v9; } return v3; }
erase: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RSI CMP RSI,RDX JZ 0x00197f17 MOV R12,RDX MOV R14,RDI MOV RBP,RDX SUB RBP,RBX SAR RBP,0x5 MOV RAX,-0x5555555555555555 IMUL RBP,RAX MOV RAX,qword ptr [RDI] MOV qword ptr [RSP],RAX MOV R15,RDX NEG R15 MOV R13,RBX LAB_00197ec3: CMP R12,qword ptr [R14 + 0x8] JZ 0x00197eea MOV RDI,R13 CALL 0x00190864 MOV RDI,R13 MOV RSI,R12 CALL 0x00197f2a ADD R13,0x60 ADD R12,0x60 ADD R15,-0x60 JMP 0x00197ec3 LAB_00197eea: SUB RBX,qword ptr [RSP] ADD R15,qword ptr [R14] NEG R15 SAR R15,0x5 MOV RAX,-0x5555555555555555 IMUL R15,RAX SUB R15,RBP MOV RDI,R14 MOV RSI,R15 CALL 0x00197fb6 ADD RBX,qword ptr [R14] LAB_00197f17: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::erase(__gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >, __gnu_cxx::__normal_iterator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>*, std::vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > > >) */ 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> * __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::erase(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,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> *param_2, 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> *param_3) { long lVar1; long lVar2; 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_00; long lVar3; if (param_2 != param_3) { lVar2 = (long)param_3 - (long)param_2; lVar1 = *(long *)this; lVar3 = -(long)param_3; this_00 = param_2; for (; param_3 != *(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 + 8); param_3 = param_3 + 0x60) { std:: pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> ::~pair(this_00); std:: pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value> ::pair(this_00,param_3); this_00 = this_00 + 0x60; lVar3 = lVar3 + -0x60; } std:: vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::resize((vector<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *)this,(-(lVar3 + *(long *)this) >> 5) * -0x5555555555555555 + (lVar2 >> 5) * 0x5555555555555555); param_2 = param_2 + (*(long *)this - lVar1); } return param_2; }
46,874
my_numcells_cp932
eloqsql/strings/ctype-cp932.c
static size_t my_numcells_cp932(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *str_end) { size_t clen= 0; const uchar *b= (const uchar *) str; const uchar *e= (const uchar *) str_end; for (clen= 0; b < e; ) { if (*b >= 0xA1 && *b <= 0xDF) { clen++; b++; } else if (*b > 0x7F) { clen+= 2; b+= 2; } else { clen++; b++; } } return clen; }
O0
c
my_numcells_cp932: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq $0x0, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq $0x0, -0x20(%rbp) movq -0x28(%rbp), %rax cmpq -0x30(%rbp), %rax jae 0x3d555 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0xa1, %eax jl 0x3d510 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0xdf, %eax jg 0x3d510 movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x3d550 movq -0x28(%rbp), %rax movzbl (%rax), %eax cmpl $0x7f, %eax jle 0x3d536 movq -0x20(%rbp), %rax addq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0x3d54e movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) jmp 0x3d550 jmp 0x3d4d0 movq -0x20(%rbp), %rax popq %rbp retq nopl (%rax,%rax)
my_numcells_cp932: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], 0 mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov [rbp+var_30], rax mov [rbp+var_20], 0 loc_3D4D0: mov rax, [rbp+var_28] cmp rax, [rbp+var_30] jnb short loc_3D555 mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 0A1h jl short loc_3D510 mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 0DFh jg short loc_3D510 mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax jmp short loc_3D550 loc_3D510: mov rax, [rbp+var_28] movzx eax, byte ptr [rax] cmp eax, 7Fh jle short loc_3D536 mov rax, [rbp+var_20] add rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax jmp short loc_3D54E loc_3D536: mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax loc_3D54E: jmp short $+2 loc_3D550: jmp loc_3D4D0 loc_3D555: mov rax, [rbp+var_20] pop rbp retn
long long my_numcells_cp932(long long a1, unsigned __int8 *a2, unsigned long long a3) { long long v5; // [rsp+10h] [rbp-20h] v5 = 0LL; while ( (unsigned long long)a2 < a3 ) { if ( *a2 < 0xA1u || *a2 > 0xDFu ) { if ( *a2 <= 0x7Fu ) { ++v5; ++a2; } else { v5 += 2LL; a2 += 2; } } else { ++v5; ++a2; } } return v5; }
my_numcells_cp932: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x20],0x0 LAB_0013d4d0: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x30] JNC 0x0013d555 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0xa1 JL 0x0013d510 MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0xdf JG 0x0013d510 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX JMP 0x0013d550 LAB_0013d510: MOV RAX,qword ptr [RBP + -0x28] MOVZX EAX,byte ptr [RAX] CMP EAX,0x7f JLE 0x0013d536 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX JMP 0x0013d54e LAB_0013d536: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX LAB_0013d54e: JMP 0x0013d550 LAB_0013d550: JMP 0x0013d4d0 LAB_0013d555: MOV RAX,qword ptr [RBP + -0x20] POP RBP RET
long my_numcells_cp932(int8 param_1,byte *param_2,byte *param_3) { byte *local_30; long local_28; local_28 = 0; local_30 = param_2; while (local_30 < param_3) { if ((*local_30 < 0xa1) || (0xdf < *local_30)) { if (*local_30 < 0x80) { local_28 = local_28 + 1; local_30 = local_30 + 1; } else { local_28 = local_28 + 2; local_30 = local_30 + 2; } } else { local_28 = local_28 + 1; local_30 = local_30 + 1; } } return local_28; }
46,875
lzr_socks5_handle_reponse
xtate/src/probe-modules/lzr-probes/lzr-socks5.c
static unsigned lzr_socks5_handle_reponse(unsigned th_idx, ProbeTarget *target, const unsigned char *px, unsigned sizeof_px, OutItem *item) { if (sizeof_px == 2 && px[0] == '\x05' && #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare" #endif (px[1] == '\xff' || px[1] == '\x00')) { #ifdef __clang__ #pragma clang diagnostic pop #endif item->level = OUT_FAILURE; safe_strcpy(item->classification, OUT_CLS_SIZE, "socks5"); safe_strcpy(item->reason, OUT_RSN_SIZE, "matched"); return 0; } if (sizeof_px < 4) { item->level = OUT_FAILURE; safe_strcpy(item->classification, OUT_CLS_SIZE, "not socks5"); safe_strcpy(item->reason, OUT_RSN_SIZE, "not matched"); return 0; } if (px[0] == '\x05' && (px[1] == '\x01' || px[1] == '\x02')) { item->level = OUT_SUCCESS; safe_strcpy(item->classification, OUT_CLS_SIZE, "socks5"); safe_strcpy(item->reason, OUT_RSN_SIZE, "matched"); return 0; } if (safe_bytes_equals(px, sizeof_px, "\x05\0\x05", sizeof("\x05\0\x05") - 1) && px[3] <= 8) { item->level = OUT_SUCCESS; safe_strcpy(item->classification, OUT_CLS_SIZE, "socks5"); safe_strcpy(item->reason, OUT_RSN_SIZE, "matched"); return 0; } item->level = OUT_FAILURE; safe_strcpy(item->classification, OUT_CLS_SIZE, "not socks5"); safe_strcpy(item->reason, OUT_RSN_SIZE, "not matched"); return 0; }
O3
c
lzr_socks5_handle_reponse: pushq %r14 pushq %rbx pushq %rax movq %r8, %rbx movq %rdx, %r14 cmpl $0x2, %ecx jne 0x2d034 cmpb $0x5, (%r14) jne 0x2d07f cmpb $0x0, 0x1(%r14) jne 0x2d07f leaq 0x3d135(%rip), %r14 # 0x6a160 leaq 0x3c0f3(%rip), %rdx # 0x69125 jmp 0x2d08d cmpl $0x3, %ecx jbe 0x2d07f cmpb $0x5, (%r14) jne 0x2d049 movb 0x1(%r14), %al decb %al cmpb $0x2, %al jb 0x2d06a movl %ecx, %esi leaq 0x3c108(%rip), %rdx # 0x6915a movl $0x3, %ecx movq %r14, %rdi callq 0x51d41 testb %al, %al je 0x2d07f cmpb $0x9, 0x3(%r14) jae 0x2d07f leaq 0x3d0ef(%rip), %r14 # 0x6a160 leaq 0x3c0ad(%rip), %rdx # 0x69125 movl $0x2, %eax jmp 0x2d092 leaq 0x3d084(%rip), %r14 # 0x6a10a leaq 0x3c094(%rip), %rdx # 0x69121 movl $0x1, %eax movl %eax, 0x8(%rbx) leaq 0x50(%rbx), %rdi movl $0x1e, %esi callq 0x51195 addq $0x6e, %rbx movl $0x1e, %esi movq %rbx, %rdi movq %r14, %rdx callq 0x51195 xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %r14 retq nopl (%rax)
lzr_socks5_handle_reponse: push r14 push rbx push rax mov rbx, r8 mov r14, rdx cmp ecx, 2 jnz short loc_2D034 cmp byte ptr [r14], 5 jnz short loc_2D07F cmp byte ptr [r14+1], 0 jnz short loc_2D07F lea r14, aProtocolMatche_0+9; "matched" lea rdx, aNotSocks5+4; "socks5" jmp short loc_2D08D loc_2D034: cmp ecx, 3 jbe short loc_2D07F cmp byte ptr [r14], 5 jnz short loc_2D049 mov al, [r14+1] dec al cmp al, 2 jb short loc_2D06A loc_2D049: mov esi, ecx lea rdx, unk_6915A mov ecx, 3 mov rdi, r14 call safe_bytes_equals test al, al jz short loc_2D07F cmp byte ptr [r14+3], 9 jnb short loc_2D07F loc_2D06A: lea r14, aProtocolMatche_0+9; "matched" lea rdx, aNotSocks5+4; "socks5" mov eax, 2 jmp short loc_2D092 loc_2D07F: lea r14, aProtocolNotMat+9; "not matched" lea rdx, aNotSocks5; "not socks5" loc_2D08D: mov eax, 1 loc_2D092: mov [rbx+8], eax lea rdi, [rbx+50h] mov esi, 1Eh call safe_strcpy add rbx, 6Eh ; 'n' mov esi, 1Eh mov rdi, rbx mov rdx, r14 call safe_strcpy xor eax, eax add rsp, 8 pop rbx pop r14 retn
long long lzr_socks5_handle_reponse(long long a1, long long a2, _BYTE *a3, unsigned int a4, long long a5) { int v7; // eax if ( a4 >= 4 && (*a3 == 5 && (unsigned __int8)(a3[1] - 1) < 2u || (unsigned __int8)safe_bytes_equals(a3, a4, &unk_6915A, 3LL) && a3[3] < 9u) ) { v7 = 2; } else { v7 = 1; } *(_DWORD *)(a5 + 8) = v7; safe_strcpy(a5 + 80, 30LL); safe_strcpy(a5 + 110, 30LL); return 0LL; }
lzr_socks5_handle_reponse: PUSH R14 PUSH RBX PUSH RAX MOV RBX,R8 MOV R14,RDX CMP ECX,0x2 JNZ 0x0012d034 CMP byte ptr [R14],0x5 JNZ 0x0012d07f CMP byte ptr [R14 + 0x1],0x0 JNZ 0x0012d07f LEA R14,[0x16a160] LEA RDX,[0x169125] JMP 0x0012d08d LAB_0012d034: CMP ECX,0x3 JBE 0x0012d07f CMP byte ptr [R14],0x5 JNZ 0x0012d049 MOV AL,byte ptr [R14 + 0x1] DEC AL CMP AL,0x2 JC 0x0012d06a LAB_0012d049: MOV ESI,ECX LEA RDX,[0x16915a] MOV ECX,0x3 MOV RDI,R14 CALL 0x00151d41 TEST AL,AL JZ 0x0012d07f CMP byte ptr [R14 + 0x3],0x9 JNC 0x0012d07f LAB_0012d06a: LEA R14,[0x16a160] LEA RDX,[0x169125] MOV EAX,0x2 JMP 0x0012d092 LAB_0012d07f: LEA R14,[0x16a10a] LEA RDX,[0x169121] LAB_0012d08d: MOV EAX,0x1 LAB_0012d092: MOV dword ptr [RBX + 0x8],EAX LEA RDI,[RBX + 0x50] MOV ESI,0x1e CALL 0x00151195 ADD RBX,0x6e MOV ESI,0x1e MOV RDI,RBX MOV RDX,R14 CALL 0x00151195 XOR EAX,EAX ADD RSP,0x8 POP RBX POP R14 RET
int8 lzr_socks5_handle_reponse (int8 param_1,int8 param_2,char *param_3,uint param_4,long param_5) { char *pcVar1; char cVar2; int4 uVar3; char *pcVar4; if (param_4 == 2) { if ((*param_3 != '\x05') || (param_3[1] != '\0')) goto LAB_0012d07f; pcVar1 = "protocol matched"; pcVar4 = "socks5"; } else { if (3 < param_4) { if ((*param_3 != '\x05') || (1 < (byte)(param_3[1] - 1U))) { cVar2 = safe_bytes_equals(param_3,param_4,&DAT_0016915a,3); if ((cVar2 == '\0') || (8 < (byte)param_3[3])) goto LAB_0012d07f; } pcVar1 = "protocol matched"; pcVar4 = "socks5"; uVar3 = 2; goto LAB_0012d092; } LAB_0012d07f: pcVar1 = "protocol not matched"; pcVar4 = "not socks5"; } uVar3 = 1; LAB_0012d092: *(int4 *)(param_5 + 8) = uVar3; safe_strcpy(param_5 + 0x50,0x1e,pcVar4); safe_strcpy(param_5 + 0x6e,0x1e,pcVar1 + 9); return 0; }
46,876
google::protobuf::DescriptorBuilder::BuildExtensionRange(google::protobuf::DescriptorProto_ExtensionRange const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor::ExtensionRange*, google::protobuf::internal::FlatAllocator&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void DescriptorBuilder::BuildExtensionRange( const DescriptorProto::ExtensionRange& proto, const Descriptor* parent, Descriptor::ExtensionRange* result, internal::FlatAllocator& alloc) { result->start = proto.start(); result->end = proto.end(); if (result->start <= 0) { message_hints_[parent].RequestHintOnFieldNumbers( proto, DescriptorPool::ErrorCollector::NUMBER, result->start, result->end); AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, "Extension numbers must be positive integers."); } // Checking of the upper bound of the extension range is deferred until after // options interpreting. This allows messages with message_set_wire_format to // have extensions beyond FieldDescriptor::kMaxNumber, since the extension // numbers are actually used as int32s in the message_set_wire_format. if (result->start >= result->end) { AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, "Extension range end number must be greater than start number."); } result->options_ = nullptr; // Set to default_instance later if necessary. if (proto.has_options()) { std::vector<int> options_path; parent->GetLocationPath(&options_path); options_path.push_back(DescriptorProto::kExtensionRangeFieldNumber); // find index of this extension range in order to compute path int index; for (index = 0; parent->extension_ranges_ + index != result; index++) { } options_path.push_back(index); options_path.push_back(DescriptorProto_ExtensionRange::kOptionsFieldNumber); AllocateOptionsImpl(parent->full_name(), parent->full_name(), proto.options(), result, options_path, "google.protobuf.ExtensionRangeOptions", alloc); } }
O0
cpp
google::protobuf::DescriptorBuilder::BuildExtensionRange(google::protobuf::DescriptorProto_ExtensionRange const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor::ExtensionRange*, google::protobuf::internal::FlatAllocator&): subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq %rdx, 0xb0(%rsp) movq %rcx, 0xa8(%rsp) movq %r8, 0xa0(%rsp) movq 0xc0(%rsp), %rax movq %rax, 0x40(%rsp) movq 0xb8(%rsp), %rdi callq 0x285d10 movl %eax, %ecx movq 0xa8(%rsp), %rax movl %ecx, (%rax) movq 0xb8(%rsp), %rdi callq 0x285d20 movl %eax, %ecx movq 0xa8(%rsp), %rax movl %ecx, 0x4(%rax) movq 0xa8(%rsp), %rax cmpl $0x0, (%rax) jg 0x26023e movq 0x40(%rsp), %rdi addq $0x98, %rdi leaq 0xb0(%rsp), %rsi callq 0x285900 movq %rax, %rdi movq 0xb8(%rsp), %rsi movq 0xa8(%rsp), %rax movl (%rax), %ecx movq 0xa8(%rsp), %rax movl 0x4(%rax), %r8d movl $0x1, %edx callq 0x285930 movq 0xb0(%rsp), %rdi callq 0x1bd120 movq 0x40(%rsp), %rdi movq %rax, %rsi movq 0xb8(%rsp), %rdx movl $0x1, %ecx leaq 0x18cdd2(%rip), %r8 # 0x3ed00b callq 0x2509e0 movq 0xa8(%rsp), %rax movl (%rax), %eax movq 0xa8(%rsp), %rcx cmpl 0x4(%rcx), %eax jl 0x260283 movq 0xb0(%rsp), %rdi callq 0x1bd120 movq 0x40(%rsp), %rdi movq %rax, %rsi movq 0xb8(%rsp), %rdx movl $0x1, %ecx leaq 0x18cdba(%rip), %r8 # 0x3ed038 callq 0x2509e0 movq 0xa8(%rsp), %rax movq $0x0, 0x8(%rax) movq 0xb8(%rsp), %rdi callq 0x285d30 testb $0x1, %al jne 0x2602a9 jmp 0x260483 leaq 0x88(%rsp), %rdi movq %rdi, 0x38(%rsp) callq 0x112bb0 movq 0x38(%rsp), %rsi movq 0xb0(%rsp), %rdi callq 0x24f3d0 jmp 0x2602cf movl $0x5, 0x78(%rsp) leaq 0x88(%rsp), %rdi leaq 0x78(%rsp), %rsi callq 0x8fc80 jmp 0x2602eb movl $0x0, 0x74(%rsp) movq 0xb0(%rsp), %rax movq 0x48(%rax), %rax movslq 0x74(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax cmpq 0xa8(%rsp), %rax je 0x26033a jmp 0x260317 movl 0x74(%rsp), %eax addl $0x1, %eax movl %eax, 0x74(%rsp) jmp 0x2602f3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0x260474 leaq 0x88(%rsp), %rdi leaq 0x74(%rsp), %rsi callq 0x92800 jmp 0x26034e movl $0x3, 0x70(%rsp) leaq 0x88(%rsp), %rdi leaq 0x70(%rsp), %rsi callq 0x8fc80 jmp 0x26036a movq 0xb0(%rsp), %rdi callq 0x1bd120 movq %rax, 0x30(%rsp) jmp 0x26037e movq 0xb0(%rsp), %rdi callq 0x1bd120 movq %rax, 0x28(%rsp) jmp 0x260392 movq 0xb8(%rsp), %rdi callq 0x2861a0 movq %rax, 0x20(%rsp) jmp 0x2603a6 movq 0xa8(%rsp), %rax movq %rax, 0x10(%rsp) leaq 0x4f(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x94520 movq 0x18(%rsp), %rdx leaq 0x18cca8(%rip), %rsi # 0x3ed076 leaq 0x50(%rsp), %rdi callq 0x92ea0 jmp 0x2603da movq 0x10(%rsp), %r8 movq 0x20(%rsp), %rcx movq 0x28(%rsp), %rdx movq 0x30(%rsp), %rsi movq 0x40(%rsp), %rdi movq 0xa0(%rsp), %r9 movq %rsp, %rax movq %r9, 0x8(%rax) leaq 0x50(%rsp), %r9 movq %r9, (%rax) leaq 0x88(%rsp), %r9 callq 0x285dc0 jmp 0x260419 leaq 0x50(%rsp), %rdi callq 0x921e0 leaq 0x4f(%rsp), %rdi callq 0x96fa0 leaq 0x88(%rsp), %rdi callq 0xf7d30 jmp 0x260483 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0x26046a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0x50(%rsp), %rdi callq 0x921e0 leaq 0x4f(%rsp), %rdi callq 0x96fa0 leaq 0x88(%rsp), %rdi callq 0xf7d30 jmp 0x26048b addq $0xc8, %rsp retq movq 0x80(%rsp), %rdi callq 0x90db0 nopl (%rax,%rax)
_ZN6google8protobuf17DescriptorBuilder19BuildExtensionRangeERKNS0_30DescriptorProto_ExtensionRangeEPKNS0_10DescriptorEPNS5_14ExtensionRangeERNS0_8internal13FlatAllocatorE: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov [rsp+0C8h+var_10], rsi mov [rsp+0C8h+var_18], rdx mov [rsp+0C8h+var_20], rcx mov [rsp+0C8h+var_28], r8 mov rax, [rsp+0C8h+var_8] mov [rsp+0C8h+var_88], rax mov rdi, [rsp+0C8h+var_10]; this call _ZNK6google8protobuf30DescriptorProto_ExtensionRange5startEv; google::protobuf::DescriptorProto_ExtensionRange::start(void) mov ecx, eax mov rax, [rsp+0C8h+var_20] mov [rax], ecx mov rdi, [rsp+0C8h+var_10]; this call _ZNK6google8protobuf30DescriptorProto_ExtensionRange3endEv; google::protobuf::DescriptorProto_ExtensionRange::end(void) mov ecx, eax mov rax, [rsp+0C8h+var_20] mov [rax+4], ecx mov rax, [rsp+0C8h+var_20] cmp dword ptr [rax], 0 jg short loc_26023E mov rdi, [rsp+0C8h+var_88] add rdi, 98h lea rsi, [rsp+0C8h+var_18] call _ZNSt13unordered_mapIPKN6google8protobuf10DescriptorENS1_17DescriptorBuilder12MessageHintsESt4hashIS4_ESt8equal_toIS4_ESaISt4pairIKS4_S6_EEEixERSC_; std::unordered_map<google::protobuf::Descriptor const*,google::protobuf::DescriptorBuilder::MessageHints>::operator[](google::protobuf::Descriptor const* const&) mov rdi, rax mov rsi, [rsp+0C8h+var_10] mov rax, [rsp+0C8h+var_20] mov ecx, [rax] mov rax, [rsp+0C8h+var_20] mov r8d, [rax+4] mov edx, 1 call _ZN6google8protobuf17DescriptorBuilder12MessageHints25RequestHintOnFieldNumbersERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEii; google::protobuf::DescriptorBuilder::MessageHints::RequestHintOnFieldNumbers(google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,int,int) mov rdi, [rsp+0C8h+var_18] call _ZNK6google8protobuf10Descriptor9full_nameB5cxx11Ev; google::protobuf::Descriptor::full_name(void) mov rdi, [rsp+0C8h+var_88] mov rsi, rax mov rdx, [rsp+0C8h+var_10] mov ecx, 1 lea r8, aExtensionNumbe; "Extension numbers must be positive inte"... call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*) loc_26023E: mov rax, [rsp+0C8h+var_20] mov eax, [rax] mov rcx, [rsp+0C8h+var_20] cmp eax, [rcx+4] jl short loc_260283 mov rdi, [rsp+0C8h+var_18] call _ZNK6google8protobuf10Descriptor9full_nameB5cxx11Ev; google::protobuf::Descriptor::full_name(void) mov rdi, [rsp+0C8h+var_88] mov rsi, rax mov rdx, [rsp+0C8h+var_10] mov ecx, 1 lea r8, aExtensionRange_2; "Extension range end number must be grea"... call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*) loc_260283: mov rax, [rsp+0C8h+var_20] mov qword ptr [rax+8], 0 mov rdi, [rsp+0C8h+var_10]; this call _ZNK6google8protobuf30DescriptorProto_ExtensionRange11has_optionsEv; google::protobuf::DescriptorProto_ExtensionRange::has_options(void) test al, 1 jnz short loc_2602A9 jmp loc_260483 loc_2602A9: lea rdi, [rsp+0C8h+var_40] mov [rsp+0C8h+var_90], rdi call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void) mov rsi, [rsp+0C8h+var_90] mov rdi, [rsp+0C8h+var_18] call _ZNK6google8protobuf10Descriptor15GetLocationPathEPSt6vectorIiSaIiEE; google::protobuf::Descriptor::GetLocationPath(std::vector<int> *) jmp short $+2 loc_2602CF: mov [rsp+0C8h+var_50], 5 lea rdi, [rsp+0C8h+var_40] lea rsi, [rsp+0C8h+var_50] call __ZNSt6vectorIiSaIiEE9push_backEOi; std::vector<int>::push_back(int &&) jmp short $+2 loc_2602EB: mov [rsp+0C8h+var_54], 0 loc_2602F3: mov rax, [rsp+0C8h+var_18] mov rax, [rax+48h] movsxd rcx, [rsp+0C8h+var_54] shl rcx, 4 add rax, rcx cmp rax, [rsp+0C8h+var_20] jz short loc_26033A jmp short $+2 loc_260317: mov eax, [rsp+0C8h+var_54] add eax, 1 mov [rsp+0C8h+var_54], eax jmp short loc_2602F3 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp loc_260474 loc_26033A: lea rdi, [rsp+0C8h+var_40] lea rsi, [rsp+0C8h+var_54] call __ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) jmp short $+2 loc_26034E: mov [rsp+0C8h+var_58], 3 lea rdi, [rsp+0C8h+var_40] lea rsi, [rsp+0C8h+var_58] call __ZNSt6vectorIiSaIiEE9push_backEOi; std::vector<int>::push_back(int &&) jmp short $+2 loc_26036A: mov rdi, [rsp+0C8h+var_18] call _ZNK6google8protobuf10Descriptor9full_nameB5cxx11Ev; google::protobuf::Descriptor::full_name(void) mov [rsp+0C8h+var_98], rax jmp short $+2 loc_26037E: mov rdi, [rsp+0C8h+var_18] call _ZNK6google8protobuf10Descriptor9full_nameB5cxx11Ev; google::protobuf::Descriptor::full_name(void) mov [rsp+0C8h+var_A0], rax jmp short $+2 loc_260392: mov rdi, [rsp+0C8h+var_10]; this call _ZNK6google8protobuf30DescriptorProto_ExtensionRange7optionsEv; google::protobuf::DescriptorProto_ExtensionRange::options(void) mov [rsp+0C8h+var_A8], rax jmp short $+2 loc_2603A6: mov rax, [rsp+0C8h+var_20] mov [rsp+0C8h+var_B8], rax lea rdi, [rsp+0C8h+var_79] mov [rsp+0C8h+var_B0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+0C8h+var_B0] lea rsi, aGoogleProtobuf_22; "google.protobuf.ExtensionRangeOptions" lea rdi, [rsp+0C8h+var_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) jmp short $+2 loc_2603DA: mov r8, [rsp+0C8h+var_B8] mov rcx, [rsp+0C8h+var_A8] mov rdx, [rsp+0C8h+var_A0] mov rsi, [rsp+0C8h+var_98] mov rdi, [rsp+0C8h+var_88] mov r9, [rsp+0C8h+var_28] mov rax, rsp mov [rax+8], r9 lea r9, [rsp+0C8h+var_78] mov [rax], r9 lea r9, [rsp+0C8h+var_40] call _ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_10Descriptor14ExtensionRangeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_RKNT_11OptionsTypeEPSD_RKSt6vectorIiSaIiEESC_RNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::Descriptor::ExtensionRange>(std::string const&,std::string const&,google::protobuf::Descriptor::ExtensionRange::OptionsType const&,google::protobuf::Descriptor::ExtensionRange::OptionsType*,std::vector<int> const&,std::string const&,google::protobuf::internal::FlatAllocator &) jmp short $+2 loc_260419: lea rdi, [rsp+0C8h+var_78] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0C8h+var_79] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+0C8h+var_40] call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() jmp short loc_260483 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_26046A mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_48] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_26046A: lea rdi, [rsp+arg_47] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_260474: lea rdi, [rsp+arg_80] call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() jmp short loc_26048B loc_260483: add rsp, 0C8h retn loc_26048B: mov rdi, [rsp+arg_78] call __Unwind_Resume
long long google::protobuf::DescriptorBuilder::BuildExtensionRange( google::protobuf::DescriptorBuilder *this, const google::protobuf::DescriptorProto_ExtensionRange *a2, const google::protobuf::Descriptor *a3, google::protobuf::Descriptor::ExtensionRange *a4, google::protobuf::internal::FlatAllocator *a5) { long long v5; // rax long long v6; // rax long long v7; // rax long long result; // rax int v9; // [rsp+10h] [rbp-B8h] int v10; // [rsp+20h] [rbp-A8h] int v11; // [rsp+28h] [rbp-A0h] int v12; // [rsp+30h] [rbp-98h] char v13; // [rsp+4Fh] [rbp-79h] BYREF _BYTE v14[32]; // [rsp+50h] [rbp-78h] BYREF int v15; // [rsp+70h] [rbp-58h] BYREF int i; // [rsp+74h] [rbp-54h] BYREF int v17[4]; // [rsp+78h] [rbp-50h] BYREF long long v18[3]; // [rsp+88h] [rbp-40h] BYREF google::protobuf::internal::FlatAllocator *v19; // [rsp+A0h] [rbp-28h] google::protobuf::Descriptor::ExtensionRange *v20; // [rsp+A8h] [rbp-20h] google::protobuf::Descriptor *v21; // [rsp+B0h] [rbp-18h] BYREF google::protobuf::DescriptorProto_ExtensionRange *v22; // [rsp+B8h] [rbp-10h] google::protobuf::DescriptorBuilder *v23; // [rsp+C0h] [rbp-8h] v23 = this; v22 = a2; v21 = a3; v20 = a4; v19 = a5; *(_DWORD *)a4 = google::protobuf::DescriptorProto_ExtensionRange::start(a2); *((_DWORD *)v20 + 1) = google::protobuf::DescriptorProto_ExtensionRange::end(v22); if ( *(int *)v20 <= 0 ) { v5 = std::unordered_map<google::protobuf::Descriptor const*,google::protobuf::DescriptorBuilder::MessageHints>::operator[]( (char *)this + 152, &v21); google::protobuf::DescriptorBuilder::MessageHints::RequestHintOnFieldNumbers(v5, v22, 1LL, *(unsigned int *)v20); v6 = google::protobuf::Descriptor::full_name[abi:cxx11]((long long)v21); google::protobuf::DescriptorBuilder::AddError( (long long)this, v6, (long long)v22, 1u, (long long)"Extension numbers must be positive integers."); } if ( *(_DWORD *)v20 >= *((_DWORD *)v20 + 1) ) { v7 = google::protobuf::Descriptor::full_name[abi:cxx11]((long long)v21); google::protobuf::DescriptorBuilder::AddError( (long long)this, v7, (long long)v22, 1u, (long long)"Extension range end number must be greater than start number."); } *((_QWORD *)v20 + 1) = 0LL; result = google::protobuf::DescriptorProto_ExtensionRange::has_options(v22); if ( (result & 1) != 0 ) { std::vector<int>::vector((long long)v18); google::protobuf::Descriptor::GetLocationPath(v21, (long long)v18); v17[0] = 5; std::vector<int>::push_back(v18, v17); for ( i = 0; (google::protobuf::Descriptor::ExtensionRange *)(16LL * i + *((_QWORD *)v21 + 9)) != v20; ++i ) ; std::vector<int>::push_back(v18, &i); v15 = 3; std::vector<int>::push_back(v18, &v15); v12 = google::protobuf::Descriptor::full_name[abi:cxx11]((long long)v21); v11 = google::protobuf::Descriptor::full_name[abi:cxx11]((long long)v21); v10 = google::protobuf::DescriptorProto_ExtensionRange::options(v22); v9 = (int)v20; std::allocator<char>::allocator(&v13, &v15); std::string::basic_string(v14, "google.protobuf.ExtensionRangeOptions", &v13); google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::Descriptor::ExtensionRange>( (_DWORD)this, v12, v11, v10, v9, (unsigned int)v18, (long long)v14, (long long)v19, v9, (unsigned int)&v13, v10, v11, v12, (unsigned int)v18, (_DWORD)this); std::string::~string(v14); std::allocator<char>::~allocator(&v13); return std::vector<int>::~vector(v18); } return result; }
InternalSwap: SUB RSP,0x28 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RCX ADD RCX,0x8 MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x8 MOV qword ptr [RSP + 0x20],RCX MOV qword ptr [RSP + 0x18],RAX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00193960 MOV RDI,qword ptr [RSP] ADD RDI,0x10 MOV RSI,qword ptr [RSP + 0x8] ADD RSI,0x10 CALL 0x00258810 ADD RSP,0x28 RET
/* aimrt::protocols::geometry::Vector3::InternalSwap(aimrt::protocols::geometry::Vector3*) */ void __thiscall aimrt::protocols::geometry::Vector3::InternalSwap(Vector3 *this,Vector3 *param_1) { std::swap<long>((long *)(this + 8),(long *)(param_1 + 8)); std::enable_if<((24)>=(16ul))&&((24)<((1u)<<(31))),void>::type_google::protobuf::internal:: memswap<24>((char *)(this + 0x10),(char *)(param_1 + 0x10)); return; }
46,877
google::protobuf::DescriptorBuilder::BuildExtensionRange(google::protobuf::DescriptorProto_ExtensionRange const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor::ExtensionRange*, google::protobuf::internal::FlatAllocator&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
void DescriptorBuilder::BuildExtensionRange( const DescriptorProto::ExtensionRange& proto, const Descriptor* parent, Descriptor::ExtensionRange* result, internal::FlatAllocator& alloc) { result->start = proto.start(); result->end = proto.end(); if (result->start <= 0) { message_hints_[parent].RequestHintOnFieldNumbers( proto, DescriptorPool::ErrorCollector::NUMBER, result->start, result->end); AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, "Extension numbers must be positive integers."); } // Checking of the upper bound of the extension range is deferred until after // options interpreting. This allows messages with message_set_wire_format to // have extensions beyond FieldDescriptor::kMaxNumber, since the extension // numbers are actually used as int32s in the message_set_wire_format. if (result->start >= result->end) { AddError(parent->full_name(), proto, DescriptorPool::ErrorCollector::NUMBER, "Extension range end number must be greater than start number."); } result->options_ = nullptr; // Set to default_instance later if necessary. if (proto.has_options()) { std::vector<int> options_path; parent->GetLocationPath(&options_path); options_path.push_back(DescriptorProto::kExtensionRangeFieldNumber); // find index of this extension range in order to compute path int index; for (index = 0; parent->extension_ranges_ + index != result; index++) { } options_path.push_back(index); options_path.push_back(DescriptorProto_ExtensionRange::kOptionsFieldNumber); AllocateOptionsImpl(parent->full_name(), parent->full_name(), proto.options(), result, options_path, "google.protobuf.ExtensionRangeOptions", alloc); } }
O3
cpp
google::protobuf::DescriptorBuilder::BuildExtensionRange(google::protobuf::DescriptorProto_ExtensionRange const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor::ExtensionRange*, google::protobuf::internal::FlatAllocator&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %r8, %rbx movq %rcx, %r14 movq %rsi, %r12 movq %rdi, %r15 movq %rdx, 0x8(%rsp) movl 0x20(%rsi), %eax movl %eax, (%rcx) movl 0x24(%rsi), %ecx movl %ecx, 0x4(%r14) testl %eax, %eax jg 0xd318c leaq 0x98(%r15), %rdi leaq 0x8(%rsp), %rsi callq 0xe64c4 movl (%r14), %ecx movl 0x4(%r14), %edx xorl %esi, %esi testl %edx, %edx cmovlel %esi, %edx movl $0x1fffffff, %edi # imm = 0x1FFFFFFF cmpl %edi, %edx cmovgel %edi, %edx testl %ecx, %ecx cmovlel %esi, %ecx cmpl %edi, %ecx cmovgel %edi, %ecx subl %ecx, %edx testl %edx, %edx cmovlel %esi, %edx addl (%rax), %edx testl %edx, %edx cmovlel %esi, %edx cmpl %edi, %edx cmovgel %edi, %edx movl %edx, (%rax) cmpq $0x0, 0x8(%rax) jne 0xd3161 movq %r12, 0x8(%rax) movl $0x1, 0x10(%rax) movq 0x8(%rsp), %rax movq 0x8(%rax), %rsi addq $0x20, %rsi leaq 0x99a4d(%rip), %r8 # 0x16cbc2 movq %r15, %rdi movq %r12, %rdx movl $0x1, %ecx callq 0xca012 movl (%r14), %eax movl 0x4(%r14), %ecx cmpl %ecx, %eax jl 0xd31b4 movq 0x8(%rsp), %rax movq 0x8(%rax), %rsi addq $0x20, %rsi leaq 0x99a4b(%rip), %r8 # 0x16cbef movq %r15, %rdi movq %r12, %rdx movl $0x1, %ecx callq 0xca012 movq $0x0, 0x8(%r14) testb $0x1, 0x10(%r12) je 0xd3316 xorps %xmm0, %xmm0 leaq 0x10(%rsp), %rsi movaps %xmm0, (%rsi) movq $0x0, 0x10(%rsi) movq 0x8(%rsp), %rdi callq 0xc862c movl $0x5, 0x38(%rsp) movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rax cmpq %rax, %rsi je 0xd320d movl $0x5, (%rsi) addq $0x4, %rsi movq %rsi, 0x18(%rsp) jmp 0xd3226 leaq 0x10(%rsp), %rdi leaq 0x38(%rsp), %rdx callq 0x2ddf0 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rax movq 0x8(%rsp), %rdx movq %r14, %rcx subq 0x48(%rdx), %rcx shrq $0x4, %rcx movl %ecx, 0x34(%rsp) cmpq %rax, %rsi je 0xd324c movl %ecx, (%rsi) addq $0x4, %rsi movq %rsi, 0x18(%rsp) jmp 0xd3265 leaq 0x10(%rsp), %rdi leaq 0x34(%rsp), %rdx callq 0x2c5d0 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rax movl $0x3, 0x38(%rsp) cmpq %rax, %rsi je 0xd3283 movl $0x3, (%rsi) addq $0x4, %rsi movq %rsi, 0x18(%rsp) jmp 0xd3292 leaq 0x10(%rsp), %rdi leaq 0x38(%rsp), %rdx callq 0x2ddf0 movq 0x8(%rsp), %rax movq 0x8(%rax), %r13 movq 0x18(%r12), %r12 leaq 0x48(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x9997d(%rip), %rsi # 0x16cc2d leaq 0x9999b(%rip), %rdx # 0x16cc52 leaq 0x38(%rsp), %rbp movq %rbp, %rdi callq 0x2c610 testq %r12, %r12 jne 0xd32d0 leaq 0x13ea10(%rip), %r12 # 0x211ce0 addq $0x20, %r13 leaq 0x10(%rsp), %r9 movq %r15, %rdi movq %r13, %rsi movq %r13, %rdx movq %r12, %rcx movq %r14, %r8 pushq %rbx pushq %rbp callq 0xe1016 addq $0x10, %rsp movq 0x38(%rsp), %rdi leaq 0x48(%rsp), %rax cmpq %rax, %rdi je 0xd3307 callq 0x2d160 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xd3316 callq 0x2d160 addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xd3346 jmp 0xd3346 jmp 0xd3346 movq %rax, %r14 movq 0x38(%rsp), %rdi leaq 0x48(%rsp), %rax cmpq %rax, %rdi je 0xd3349 callq 0x2d160 jmp 0xd3349 jmp 0xd3346 movq %rax, %r14 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xd3358 callq 0x2d160 movq %r14, %rdi callq 0x2e220
_ZN6google8protobuf17DescriptorBuilder19BuildExtensionRangeERKNS0_30DescriptorProto_ExtensionRangeEPKNS0_10DescriptorEPNS5_14ExtensionRangeERNS0_8internal13FlatAllocatorE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov rbx, r8 mov r14, rcx mov r12, rsi mov r15, rdi mov [rsp+88h+var_80], rdx mov eax, [rsi+20h] mov [rcx], eax mov ecx, [rsi+24h] mov [r14+4], ecx test eax, eax jg loc_D318C lea rdi, [r15+98h] lea rsi, [rsp+88h+var_80] call _ZNSt8__detail9_Map_baseIPKN6google8protobuf10DescriptorESt4pairIKS5_NS2_17DescriptorBuilder12MessageHintsEESaISA_ENS_10_Select1stESt8equal_toIS5_ESt4hashIS5_ENS_18_Mod_range_hashingENS_20_Default_ranged_hashENS_20_Prime_rehash_policyENS_17_Hashtable_traitsILb0ELb0ELb1EEELb1EEixERS7_; std::__detail::_Map_base<google::protobuf::Descriptor const*,std::pair<google::protobuf::Descriptor const* const,google::protobuf::DescriptorBuilder::MessageHints>,std::allocator<std::pair<google::protobuf::Descriptor const* const,google::protobuf::DescriptorBuilder::MessageHints>>,std::__detail::_Select1st,std::equal_to<google::protobuf::Descriptor const*>,std::hash<google::protobuf::Descriptor const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[](google::protobuf::Descriptor const* const&) mov ecx, [r14] mov edx, [r14+4] xor esi, esi test edx, edx cmovle edx, esi mov edi, 1FFFFFFFh cmp edx, edi cmovge edx, edi test ecx, ecx cmovle ecx, esi cmp ecx, edi cmovge ecx, edi sub edx, ecx test edx, edx cmovle edx, esi add edx, [rax] test edx, edx cmovle edx, esi cmp edx, edi cmovge edx, edi mov [rax], edx cmp qword ptr [rax+8], 0 jnz short loc_D3161 mov [rax+8], r12 mov dword ptr [rax+10h], 1 loc_D3161: mov rax, [rsp+88h+var_80] mov rsi, [rax+8] add rsi, 20h ; ' ' lea r8, aExtensionNumbe; "Extension numbers must be positive inte"... mov rdi, r15 mov rdx, r12 mov ecx, 1 call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*) mov eax, [r14] mov ecx, [r14+4] loc_D318C: cmp eax, ecx jl short loc_D31B4 mov rax, [rsp+88h+var_80] mov rsi, [rax+8] add rsi, 20h ; ' ' lea r8, aExtensionRange_2; "Extension range end number must be grea"... mov rdi, r15 mov rdx, r12 mov ecx, 1 call _ZN6google8protobuf17DescriptorBuilder8AddErrorERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_7MessageENS0_14DescriptorPool14ErrorCollector13ErrorLocationEPKc; google::protobuf::DescriptorBuilder::AddError(std::string const&,google::protobuf::Message const&,google::protobuf::DescriptorPool::ErrorCollector::ErrorLocation,char const*) loc_D31B4: mov qword ptr [r14+8], 0 test byte ptr [r12+10h], 1 jz loc_D3316 xorps xmm0, xmm0 lea rsi, [rsp+88h+var_78] movaps xmmword ptr [rsi], xmm0 mov qword ptr [rsi+10h], 0 mov rdi, [rsp+88h+var_80] call _ZNK6google8protobuf10Descriptor15GetLocationPathEPSt6vectorIiSaIiEE; google::protobuf::Descriptor::GetLocationPath(std::vector<int> *) mov dword ptr [rsp+88h+var_50], 5 mov rsi, [rsp+88h+var_70] mov rax, [rsp+88h+var_68] cmp rsi, rax jz short loc_D320D mov dword ptr [rsi], 5 add rsi, 4 mov [rsp+88h+var_70], rsi jmp short loc_D3226 loc_D320D: lea rdi, [rsp+88h+var_78] lea rdx, [rsp+88h+var_50] call __ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int &&) mov rsi, [rsp+88h+var_70] mov rax, [rsp+88h+var_68] loc_D3226: mov rdx, [rsp+88h+var_80] mov rcx, r14 sub rcx, [rdx+48h] shr rcx, 4 mov [rsp+88h+var_54], ecx cmp rsi, rax jz short loc_D324C mov [rsi], ecx add rsi, 4 mov [rsp+88h+var_70], rsi jmp short loc_D3265 loc_D324C: lea rdi, [rsp+88h+var_78] lea rdx, [rsp+88h+var_54] call __ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&) mov rsi, [rsp+88h+var_70] mov rax, [rsp+88h+var_68] loc_D3265: mov dword ptr [rsp+88h+var_50], 3 cmp rsi, rax jz short loc_D3283 mov dword ptr [rsi], 3 add rsi, 4 mov [rsp+88h+var_70], rsi jmp short loc_D3292 loc_D3283: lea rdi, [rsp+88h+var_78] lea rdx, [rsp+88h+var_50] call __ZNSt6vectorIiSaIiEE17_M_realloc_insertIJiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int &&) loc_D3292: mov rax, [rsp+88h+var_80] mov r13, [rax+8] mov r12, [r12+18h] lea rax, [rsp+88h+var_40] mov [rax-10h], rax lea rsi, aGoogleProtobuf_22; "google.protobuf.ExtensionRangeOptions" lea rdx, aGoogleProtobuf_22+25h; "" lea rbp, [rsp+88h+var_50] mov rdi, rbp 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) test r12, r12 jnz short loc_D32D0 lea r12, _ZN6google8protobuf40_ExtensionRangeOptions_default_instance_E; google::protobuf::_ExtensionRangeOptions_default_instance_ loc_D32D0: add r13, 20h ; ' ' lea r9, [rsp+88h+var_78] mov rdi, r15 mov rsi, r13 mov rdx, r13 mov rcx, r12 mov r8, r14 push rbx push rbp call _ZN6google8protobuf17DescriptorBuilder19AllocateOptionsImplINS0_10Descriptor14ExtensionRangeEEEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_RKNT_11OptionsTypeEPSD_RKSt6vectorIiSaIiEESC_RNS0_8internal13FlatAllocatorE; google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::Descriptor::ExtensionRange>(std::string const&,std::string const&,google::protobuf::Descriptor::ExtensionRange::OptionsType const&,google::protobuf::Descriptor::ExtensionRange::OptionsType*,std::vector<int> const&,std::string const&,google::protobuf::internal::FlatAllocator &) add rsp, 10h mov rdi, [rsp+88h+var_50]; void * lea rax, [rsp+88h+var_40] cmp rdi, rax jz short loc_D3307 call __ZdlPv; operator delete(void *) loc_D3307: mov rdi, [rsp+88h+var_78]; void * test rdi, rdi jz short loc_D3316 call __ZdlPv; operator delete(void *) loc_D3316: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_D3346 jmp short loc_D3346 jmp short loc_D3346 mov r14, rax mov rdi, [rsp+arg_30]; void * lea rax, [rsp+arg_40] cmp rdi, rax jz short loc_D3349 call __ZdlPv; operator delete(void *) jmp short loc_D3349 jmp short $+2 loc_D3346: mov r14, rax loc_D3349: mov rdi, [rsp+arg_8]; void * test rdi, rdi jz short loc_D3358 call __ZdlPv; operator delete(void *) loc_D3358: mov rdi, r14 call __Unwind_Resume
void google::protobuf::DescriptorBuilder::BuildExtensionRange( long long a1, long long a2, long long a3, long long a4, long long a5) { int v8; // eax int v9; // ecx long long v10; // rax int v11; // ecx int v12; // edx int v13; // edx int v14; // edx long long v15; // rsi _DWORD *v16; // rax _DWORD *v17; // rsi unsigned long long v18; // rcx _DWORD *v19; // rsi long long v20; // r13 void ( ***v21)(google::protobuf::ExtensionRangeOptions *__hidden); // r12 long long v22; // [rsp+8h] [rbp-80h] BYREF __int128 v23; // [rsp+10h] [rbp-78h] BYREF _DWORD *v24; // [rsp+20h] [rbp-68h] int v25; // [rsp+34h] [rbp-54h] BYREF void *v26[2]; // [rsp+38h] [rbp-50h] BYREF _BYTE v27[64]; // [rsp+48h] [rbp-40h] BYREF v22 = a3; v8 = *(_DWORD *)(a2 + 32); *(_DWORD *)a4 = v8; v9 = *(_DWORD *)(a2 + 36); *(_DWORD *)(a4 + 4) = v9; if ( v8 <= 0 ) { v10 = std::__detail::_Map_base<google::protobuf::Descriptor const*,std::pair<google::protobuf::Descriptor const* const,google::protobuf::DescriptorBuilder::MessageHints>,std::allocator<std::pair<google::protobuf::Descriptor const* const,google::protobuf::DescriptorBuilder::MessageHints>>,std::__detail::_Select1st,std::equal_to<google::protobuf::Descriptor const*>,std::hash<google::protobuf::Descriptor const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true>::operator[]( a1 + 152, &v22); v11 = *(_DWORD *)a4; v12 = *(_DWORD *)(a4 + 4); if ( v12 <= 0 ) v12 = 0; if ( v12 >= 0x1FFFFFFF ) v12 = 0x1FFFFFFF; if ( v11 <= 0 ) v11 = 0; if ( v11 >= 0x1FFFFFFF ) v11 = 0x1FFFFFFF; v13 = v12 - v11; if ( v13 <= 0 ) v13 = 0; v14 = *(_DWORD *)v10 + v13; if ( v14 <= 0 ) v14 = 0; if ( v14 >= 0x1FFFFFFF ) v14 = 0x1FFFFFFF; *(_DWORD *)v10 = v14; if ( !*(_QWORD *)(v10 + 8) ) { *(_QWORD *)(v10 + 8) = a2; *(_DWORD *)(v10 + 16) = 1; } google::protobuf::DescriptorBuilder::AddError( a1, (_QWORD *)(*(_QWORD *)(v22 + 8) + 32LL), a2, 1u, (long long)"Extension numbers must be positive integers."); v8 = *(_DWORD *)a4; v9 = *(_DWORD *)(a4 + 4); } if ( v8 >= v9 ) google::protobuf::DescriptorBuilder::AddError( a1, (_QWORD *)(*(_QWORD *)(v22 + 8) + 32LL), a2, 1u, (long long)"Extension range end number must be greater than start number."); *(_QWORD *)(a4 + 8) = 0LL; if ( (*(_BYTE *)(a2 + 16) & 1) != 0 ) { v23 = 0LL; v24 = 0LL; google::protobuf::Descriptor::GetLocationPath(v22, (long long)&v23); LODWORD(v26[0]) = 5; v15 = *((_QWORD *)&v23 + 1); v16 = v24; if ( *((_DWORD **)&v23 + 1) == v24 ) { std::vector<int>::_M_realloc_insert<int>(&v23, *((_QWORD *)&v23 + 1), v26); v17 = (_DWORD *)*((_QWORD *)&v23 + 1); v16 = v24; } else { **((_DWORD **)&v23 + 1) = 5; v17 = (_DWORD *)(v15 + 4); *((_QWORD *)&v23 + 1) = v17; } v18 = (unsigned long long)(a4 - *(_QWORD *)(v22 + 72)) >> 4; v25 = v18; if ( v17 == v16 ) { std::vector<int>::_M_realloc_insert<int const&>(&v23, v17, &v25); v19 = (_DWORD *)*((_QWORD *)&v23 + 1); v16 = v24; } else { *v17 = v18; v19 = v17 + 1; *((_QWORD *)&v23 + 1) = v19; } LODWORD(v26[0]) = 3; if ( v19 == v16 ) { std::vector<int>::_M_realloc_insert<int>(&v23, v19, v26); } else { *v19 = 3; *((_QWORD *)&v23 + 1) = v19 + 1; } v20 = *(_QWORD *)(v22 + 8); v21 = *(void ( ****)(google::protobuf::ExtensionRangeOptions *__hidden))(a2 + 24); v26[0] = v27; std::string::_M_construct<char const*>(v26, "google.protobuf.ExtensionRangeOptions", ""); if ( !v21 ) v21 = &google::protobuf::_ExtensionRangeOptions_default_instance_; google::protobuf::DescriptorBuilder::AllocateOptionsImpl<google::protobuf::Descriptor::ExtensionRange>( a1, v20 + 32, v20 + 32, v21, a4, &v23, v26, a5); if ( v26[0] != v27 ) operator delete(v26[0]); if ( (_QWORD)v23 ) operator delete((void *)v23); } }
BuildExtensionRange: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV RBX,R8 MOV R14,RCX MOV R12,RSI MOV R15,RDI MOV qword ptr [RSP + 0x8],RDX MOV EAX,dword ptr [RSI + 0x20] MOV dword ptr [RCX],EAX MOV ECX,dword ptr [RSI + 0x24] MOV dword ptr [R14 + 0x4],ECX TEST EAX,EAX JG 0x001d318c LEA RDI,[R15 + 0x98] LEA RSI,[RSP + 0x8] CALL 0x001e64c4 MOV ECX,dword ptr [R14] MOV EDX,dword ptr [R14 + 0x4] XOR ESI,ESI TEST EDX,EDX CMOVLE EDX,ESI MOV EDI,0x1fffffff CMP EDX,EDI CMOVGE EDX,EDI TEST ECX,ECX CMOVLE ECX,ESI CMP ECX,EDI CMOVGE ECX,EDI SUB EDX,ECX TEST EDX,EDX CMOVLE EDX,ESI ADD EDX,dword ptr [RAX] TEST EDX,EDX CMOVLE EDX,ESI CMP EDX,EDI CMOVGE EDX,EDI MOV dword ptr [RAX],EDX CMP qword ptr [RAX + 0x8],0x0 JNZ 0x001d3161 MOV qword ptr [RAX + 0x8],R12 MOV dword ptr [RAX + 0x10],0x1 LAB_001d3161: MOV RAX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RAX + 0x8] ADD RSI,0x20 LEA R8,[0x26cbc2] MOV RDI,R15 MOV RDX,R12 MOV ECX,0x1 CALL 0x001ca012 MOV EAX,dword ptr [R14] MOV ECX,dword ptr [R14 + 0x4] LAB_001d318c: CMP EAX,ECX JL 0x001d31b4 MOV RAX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RAX + 0x8] ADD RSI,0x20 LEA R8,[0x26cbef] MOV RDI,R15 MOV RDX,R12 MOV ECX,0x1 CALL 0x001ca012 LAB_001d31b4: MOV qword ptr [R14 + 0x8],0x0 TEST byte ptr [R12 + 0x10],0x1 JZ 0x001d3316 XORPS XMM0,XMM0 LEA RSI,[RSP + 0x10] MOVAPS xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],0x0 MOV RDI,qword ptr [RSP + 0x8] LAB_001d31e0: CALL 0x001c862c MOV dword ptr [RSP + 0x38],0x5 MOV RSI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] CMP RSI,RAX JZ 0x001d320d MOV dword ptr [RSI],0x5 ADD RSI,0x4 MOV qword ptr [RSP + 0x18],RSI JMP 0x001d3226 LAB_001d320d: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x38] CALL 0x0012ddf0 MOV RSI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] LAB_001d3226: MOV RDX,qword ptr [RSP + 0x8] MOV RCX,R14 SUB RCX,qword ptr [RDX + 0x48] SHR RCX,0x4 MOV dword ptr [RSP + 0x34],ECX CMP RSI,RAX JZ 0x001d324c MOV dword ptr [RSI],ECX ADD RSI,0x4 MOV qword ptr [RSP + 0x18],RSI JMP 0x001d3265 LAB_001d324c: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x34] CALL 0x0012c5d0 MOV RSI,qword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] LAB_001d3265: MOV dword ptr [RSP + 0x38],0x3 CMP RSI,RAX JZ 0x001d3283 MOV dword ptr [RSI],0x3 ADD RSI,0x4 MOV qword ptr [RSP + 0x18],RSI JMP 0x001d3292 LAB_001d3283: LEA RDI,[RSP + 0x10] LEA RDX,[RSP + 0x38] CALL 0x0012ddf0 LAB_001d3292: MOV RAX,qword ptr [RSP + 0x8] MOV R13,qword ptr [RAX + 0x8] MOV R12,qword ptr [R12 + 0x18] LEA RAX,[RSP + 0x48] MOV qword ptr [RAX + -0x10],RAX LAB_001d32a9: LEA RSI,[0x26cc2d] LEA RDX,[0x26cc52] LEA RBP,[RSP + 0x38] MOV RDI,RBP CALL 0x0012c610 TEST R12,R12 JNZ 0x001d32d0 LEA R12,[0x311ce0] LAB_001d32d0: ADD R13,0x20 LAB_001d32d4: LEA R9,[RSP + 0x10] MOV RDI,R15 MOV RSI,R13 MOV RDX,R13 MOV RCX,R12 MOV R8,R14 PUSH RBX PUSH RBP CALL 0x001e1016 ADD RSP,0x10 LAB_001d32f3: MOV RDI,qword ptr [RSP + 0x38] LEA RAX,[RSP + 0x48] CMP RDI,RAX JZ 0x001d3307 CALL 0x0012d160 LAB_001d3307: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x001d3316 CALL 0x0012d160 LAB_001d3316: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* google::protobuf::DescriptorBuilder::BuildExtensionRange(google::protobuf::DescriptorProto_ExtensionRange const&, google::protobuf::Descriptor const*, google::protobuf::Descriptor::ExtensionRange*, google::protobuf::internal::FlatAllocator&) */ void __thiscall google::protobuf::DescriptorBuilder::BuildExtensionRange (DescriptorBuilder *this,DescriptorProto_ExtensionRange *param_1,Descriptor *param_2, ExtensionRange *param_3,FlatAllocator *param_4) { long lVar1; int iVar2; int *piVar3; int iVar4; int1 *puVar5; Descriptor *local_80; void *local_78; int4 *puStack_70; int4 *local_68; int4 local_54; int1 *local_50 [2]; int1 local_40 [16]; iVar2 = *(int *)(param_1 + 0x20); *(int *)param_3 = iVar2; iVar4 = *(int *)(param_1 + 0x24); *(int *)(param_3 + 4) = iVar4; local_80 = param_2; if (iVar2 < 1) { piVar3 = (int *)std::__detail:: _Map_base<google::protobuf::Descriptor_const*,std::pair<google::protobuf::Descriptor_const*const,google::protobuf::DescriptorBuilder::MessageHints>,std::allocator<std::pair<google::protobuf::Descriptor_const*const,google::protobuf::DescriptorBuilder::MessageHints>>,std::__detail::_Select1st,std::equal_to<google::protobuf::Descriptor_const*>,std::hash<google::protobuf::Descriptor_const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> ::operator[]((_Map_base<google::protobuf::Descriptor_const*,std::pair<google::protobuf::Descriptor_const*const,google::protobuf::DescriptorBuilder::MessageHints>,std::allocator<std::pair<google::protobuf::Descriptor_const*const,google::protobuf::DescriptorBuilder::MessageHints>>,std::__detail::_Select1st,std::equal_to<google::protobuf::Descriptor_const*>,std::hash<google::protobuf::Descriptor_const*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>,true> *)(this + 0x98),&local_80); iVar2 = *(int *)param_3; iVar4 = *(int *)(param_3 + 4); if (*(int *)(param_3 + 4) < 1) { iVar4 = 0; } if (0x1ffffffe < iVar4) { iVar4 = 0x1fffffff; } if (iVar2 < 1) { iVar2 = 0; } if (0x1ffffffe < iVar2) { iVar2 = 0x1fffffff; } iVar4 = iVar4 - iVar2; if (iVar4 < 1) { iVar4 = 0; } iVar4 = iVar4 + *piVar3; if (iVar4 < 1) { iVar4 = 0; } if (0x1ffffffe < iVar4) { iVar4 = 0x1fffffff; } *piVar3 = iVar4; if (*(long *)(piVar3 + 2) == 0) { *(DescriptorProto_ExtensionRange **)(piVar3 + 2) = param_1; piVar3[4] = 1; } AddError(this,*(long *)(local_80 + 8) + 0x20,param_1,1, "Extension numbers must be positive integers."); iVar2 = *(int *)param_3; iVar4 = *(int *)(param_3 + 4); } if (iVar4 <= iVar2) { AddError(this,*(long *)(local_80 + 8) + 0x20,param_1,1, "Extension range end number must be greater than start number."); } *(int8 *)(param_3 + 8) = 0; if (((byte)param_1[0x10] & 1) != 0) { local_78 = (void *)0x0; puStack_70 = (int4 *)0x0; local_68 = (int4 *)0x0; /* try { // try from 001d31e0 to 001d31e4 has its CatchHandler @ 001d3346 */ Descriptor::GetLocationPath(local_80,(vector *)&local_78); local_50[0] = (int1 *)CONCAT44(local_50[0]._4_4_,5); if (puStack_70 == local_68) { /* try { // try from 001d320d to 001d321b has its CatchHandler @ 001d3329 */ std::vector<int,std::allocator<int>>::_M_realloc_insert<int> ((vector<int,std::allocator<int>> *)&local_78,puStack_70,local_50); } else { *puStack_70 = 5; puStack_70 = puStack_70 + 1; } local_54 = (int4)((ulong)((long)param_3 - *(long *)(local_80 + 0x48)) >> 4); if (puStack_70 == local_68) { /* try { // try from 001d324c to 001d325a has its CatchHandler @ 001d3327 */ std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&> ((vector<int,std::allocator<int>> *)&local_78,puStack_70,&local_54); } else { *puStack_70 = local_54; puStack_70 = puStack_70 + 1; } local_50[0] = (int1 *)CONCAT44(local_50[0]._4_4_,3); if (puStack_70 == local_68) { /* try { // try from 001d3283 to 001d3291 has its CatchHandler @ 001d3325 */ std::vector<int,std::allocator<int>>::_M_realloc_insert<int> ((vector<int,std::allocator<int>> *)&local_78,puStack_70,local_50); } else { *puStack_70 = 3; puStack_70 = puStack_70 + 1; } lVar1 = *(long *)(local_80 + 8); puVar5 = *(int1 **)(param_1 + 0x18); local_50[0] = local_40; /* try { // try from 001d32a9 to 001d32c3 has its CatchHandler @ 001d3344 */ std::__cxx11::string::_M_construct<char_const*> ((string *)local_50,"google.protobuf.ExtensionRangeOptions",""); if ((OptionsType *)puVar5 == (OptionsType *)0x0) { puVar5 = _ExtensionRangeOptions_default_instance_; } /* try { // try from 001d32d4 to 001d32f2 has its CatchHandler @ 001d332b */ AllocateOptionsImpl<google::protobuf::Descriptor::ExtensionRange> (this,(string *)(lVar1 + 0x20),(string *)(lVar1 + 0x20),(OptionsType *)puVar5,param_3, (vector *)&local_78,(string *)local_50,param_4); if (local_50[0] != local_40) { operator_delete(local_50[0]); } if (local_78 != (void *)0x0) { operator_delete(local_78); } } return; }
46,878
mysql_autocommit_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_autocommit_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_autocommit, (parms->mysql, parms->auto_mode), parms->mysql, my_bool, r_my_bool) }
O0
c
mysql_autocommit_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 movsbl 0x8(%rax), %esi callq 0x46e20 movb %al, -0x11(%rbp) movb -0x11(%rbp), %cl movq -0x20(%rbp), %rax movb %cl, 0x8(%rax) movq -0x20(%rbp), %rax movl $0x0, (%rax) addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_autocommit_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] movsx esi, byte ptr [rax+8] call mysql_autocommit mov [rbp+var_11], al mov cl, [rbp+var_11] mov rax, [rbp+var_20] mov [rax+8], cl mov rax, [rbp+var_20] mov dword ptr [rax], 0 add rsp, 20h pop rbp retn
long long mysql_autocommit_start_internal(long long a1) { long long result; // rax long long v2; // [rsp+0h] [rbp-20h] v2 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL); *(_BYTE *)(v2 + 8) = mysql_autocommit(*(_QWORD *)a1, *(_BYTE *)(a1 + 8)); result = v2; *(_DWORD *)v2 = 0; return result; }
mysql_autocommit_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] MOVSX ESI,byte ptr [RAX + 0x8] CALL 0x00146e20 MOV byte ptr [RBP + -0x11],AL MOV CL,byte ptr [RBP + -0x11] MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x8],CL MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX],0x0 ADD RSP,0x20 POP RBP RET
void mysql_autocommit_start_internal(long *param_1) { int4 *puVar1; int1 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_autocommit(*param_1,(int)(char)param_1[1]); *(int1 *)(puVar1 + 2) = uVar2; *puVar1 = 0; return; }
46,879
common_context_params_to_llama(common_params const&)
monkey531[P]llama/common/common.cpp
struct llama_context_params common_context_params_to_llama(const common_params & params) { auto cparams = llama_context_default_params(); cparams.n_ctx = params.n_ctx; cparams.n_seq_max = params.n_parallel; cparams.n_batch = params.n_batch; cparams.n_ubatch = params.n_ubatch; cparams.n_threads = params.cpuparams.n_threads; cparams.n_threads_batch = params.cpuparams_batch.n_threads == -1 ? params.cpuparams.n_threads : params.cpuparams_batch.n_threads; cparams.logits_all = params.logits_all; cparams.embeddings = params.embedding; cparams.rope_scaling_type = params.rope_scaling_type; cparams.rope_freq_base = params.rope_freq_base; cparams.rope_freq_scale = params.rope_freq_scale; cparams.yarn_ext_factor = params.yarn_ext_factor; cparams.yarn_attn_factor = params.yarn_attn_factor; cparams.yarn_beta_fast = params.yarn_beta_fast; cparams.yarn_beta_slow = params.yarn_beta_slow; cparams.yarn_orig_ctx = params.yarn_orig_ctx; cparams.pooling_type = params.pooling_type; cparams.attention_type = params.attention_type; cparams.defrag_thold = params.defrag_thold; cparams.cb_eval = params.cb_eval; cparams.cb_eval_user_data = params.cb_eval_user_data; cparams.offload_kqv = !params.no_kv_offload; cparams.flash_attn = params.flash_attn; cparams.no_perf = params.no_perf; if (params.reranking) { cparams.embeddings = true; cparams.pooling_type = LLAMA_POOLING_TYPE_RANK; } cparams.type_k = params.cache_type_k; cparams.type_v = params.cache_type_v; return cparams; }
O3
cpp
common_context_params_to_llama(common_params const&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx callq 0x1a0b0 movl 0x18(%r14), %eax movl %eax, 0xc(%rbx) movq 0x4(%r14), %rax movq %rax, (%rbx) movl 0xc(%r14), %eax movl %eax, 0x8(%rbx) movl 0x274(%r14), %eax movl %eax, 0x10(%rbx) movl 0x488(%r14), %ecx cmpl $-0x1, %ecx cmovel %eax, %ecx movl %ecx, 0x14(%rbx) movb 0xfe8(%r14), %al movb %al, 0x60(%rbx) movb 0x1038(%r14), %al movb %al, 0x61(%rbx) movups 0x2c(%r14), %xmm0 movups %xmm0, 0x24(%rbx) movsd 0x3c(%r14), %xmm0 movsd %xmm0, 0x34(%rbx) movl 0x44(%r14), %eax movl %eax, 0x3c(%rbx) movq 0x6b4(%r14), %rax movq %rax, 0x18(%rbx) movl 0x6bc(%r14), %eax movl %eax, 0x20(%rbx) movss 0x48(%r14), %xmm0 movss %xmm0, 0x40(%rbx) movups 0x6a0(%r14), %xmm0 movups %xmm0, 0x48(%rbx) movb 0xfee(%r14), %al xorb $0x1, %al movb %al, 0x62(%rbx) movb 0xfe4(%r14), %al movb %al, 0x63(%rbx) movb 0xfe5(%r14), %al movb %al, 0x64(%rbx) cmpb $0x1, 0x1080(%r14) jne 0x748d3 movb $0x1, 0x61(%rbx) movl $0x4, 0x1c(%rbx) movq 0xff4(%r14), %rax movq %rax, 0x58(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_Z30common_context_params_to_llamaRK13common_params: push r14 push rbx push rax mov r14, rsi mov rbx, rdi call _llama_context_default_params mov eax, [r14+18h] mov [rbx+0Ch], eax mov rax, [r14+4] mov [rbx], rax mov eax, [r14+0Ch] mov [rbx+8], eax mov eax, [r14+274h] mov [rbx+10h], eax mov ecx, [r14+488h] cmp ecx, 0FFFFFFFFh cmovz ecx, eax mov [rbx+14h], ecx mov al, [r14+0FE8h] mov [rbx+60h], al mov al, [r14+1038h] mov [rbx+61h], al movups xmm0, xmmword ptr [r14+2Ch] movups xmmword ptr [rbx+24h], xmm0 movsd xmm0, qword ptr [r14+3Ch] movsd qword ptr [rbx+34h], xmm0 mov eax, [r14+44h] mov [rbx+3Ch], eax mov rax, [r14+6B4h] mov [rbx+18h], rax mov eax, [r14+6BCh] mov [rbx+20h], eax movss xmm0, dword ptr [r14+48h] movss dword ptr [rbx+40h], xmm0 movups xmm0, xmmword ptr [r14+6A0h] movups xmmword ptr [rbx+48h], xmm0 mov al, [r14+0FEEh] xor al, 1 mov [rbx+62h], al mov al, [r14+0FE4h] mov [rbx+63h], al mov al, [r14+0FE5h] mov [rbx+64h], al cmp byte ptr [r14+1080h], 1 jnz short loc_748D3 mov byte ptr [rbx+61h], 1 mov dword ptr [rbx+1Ch], 4 loc_748D3: mov rax, [r14+0FF4h] mov [rbx+58h], rax mov rax, rbx add rsp, 8 pop rbx pop r14 retn
const common_params * common_context_params_to_llama(const common_params *a1, long long a2) { int v2; // eax int v3; // ecx llama_context_default_params(a1); *((_DWORD *)a1 + 3) = *(_DWORD *)(a2 + 24); *(_QWORD *)a1 = *(_QWORD *)(a2 + 4); *((_DWORD *)a1 + 2) = *(_DWORD *)(a2 + 12); v2 = *(_DWORD *)(a2 + 628); *((_DWORD *)a1 + 4) = v2; v3 = *(_DWORD *)(a2 + 1160); if ( v3 == -1 ) v3 = v2; *((_DWORD *)a1 + 5) = v3; *((_BYTE *)a1 + 96) = *(_BYTE *)(a2 + 4072); *((_BYTE *)a1 + 97) = *(_BYTE *)(a2 + 4152); *(_OWORD *)((char *)a1 + 36) = *(_OWORD *)(a2 + 44); *(_QWORD *)((char *)a1 + 52) = *(_QWORD *)(a2 + 60); *((_DWORD *)a1 + 15) = *(_DWORD *)(a2 + 68); *((_QWORD *)a1 + 3) = *(_QWORD *)(a2 + 1716); *((_DWORD *)a1 + 8) = *(_DWORD *)(a2 + 1724); *((_DWORD *)a1 + 16) = *(_DWORD *)(a2 + 72); *(_OWORD *)((char *)a1 + 72) = *(_OWORD *)(a2 + 1696); *((_BYTE *)a1 + 98) = *(_BYTE *)(a2 + 4078) ^ 1; *((_BYTE *)a1 + 99) = *(_BYTE *)(a2 + 4068); *((_BYTE *)a1 + 100) = *(_BYTE *)(a2 + 4069); if ( *(_BYTE *)(a2 + 4224) == 1 ) { *((_BYTE *)a1 + 97) = 1; *((_DWORD *)a1 + 7) = 4; } *((_QWORD *)a1 + 11) = *(_QWORD *)(a2 + 4084); return a1; }
common_context_params_to_llama: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI CALL 0x0011a0b0 MOV EAX,dword ptr [R14 + 0x18] MOV dword ptr [RBX + 0xc],EAX MOV RAX,qword ptr [R14 + 0x4] MOV qword ptr [RBX],RAX MOV EAX,dword ptr [R14 + 0xc] MOV dword ptr [RBX + 0x8],EAX MOV EAX,dword ptr [R14 + 0x274] MOV dword ptr [RBX + 0x10],EAX MOV ECX,dword ptr [R14 + 0x488] CMP ECX,-0x1 CMOVZ ECX,EAX MOV dword ptr [RBX + 0x14],ECX MOV AL,byte ptr [R14 + 0xfe8] MOV byte ptr [RBX + 0x60],AL MOV AL,byte ptr [R14 + 0x1038] MOV byte ptr [RBX + 0x61],AL MOVUPS XMM0,xmmword ptr [R14 + 0x2c] MOVUPS xmmword ptr [RBX + 0x24],XMM0 MOVSD XMM0,qword ptr [R14 + 0x3c] MOVSD qword ptr [RBX + 0x34],XMM0 MOV EAX,dword ptr [R14 + 0x44] MOV dword ptr [RBX + 0x3c],EAX MOV RAX,qword ptr [R14 + 0x6b4] MOV qword ptr [RBX + 0x18],RAX MOV EAX,dword ptr [R14 + 0x6bc] MOV dword ptr [RBX + 0x20],EAX MOVSS XMM0,dword ptr [R14 + 0x48] MOVSS dword ptr [RBX + 0x40],XMM0 MOVUPS XMM0,xmmword ptr [R14 + 0x6a0] MOVUPS xmmword ptr [RBX + 0x48],XMM0 MOV AL,byte ptr [R14 + 0xfee] XOR AL,0x1 MOV byte ptr [RBX + 0x62],AL MOV AL,byte ptr [R14 + 0xfe4] MOV byte ptr [RBX + 0x63],AL MOV AL,byte ptr [R14 + 0xfe5] MOV byte ptr [RBX + 0x64],AL CMP byte ptr [R14 + 0x1080],0x1 JNZ 0x001748d3 MOV byte ptr [RBX + 0x61],0x1 MOV dword ptr [RBX + 0x1c],0x4 LAB_001748d3: MOV RAX,qword ptr [R14 + 0xff4] MOV qword ptr [RBX + 0x58],RAX MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* common_context_params_to_llama(common_params const&) */ common_params * common_context_params_to_llama(common_params *param_1) { int iVar1; int8 uVar2; int iVar3; long in_RSI; llama_context_default_params(); *(int4 *)(param_1 + 0xc) = *(int4 *)(in_RSI + 0x18); *(int8 *)param_1 = *(int8 *)(in_RSI + 4); *(int4 *)(param_1 + 8) = *(int4 *)(in_RSI + 0xc); iVar1 = *(int *)(in_RSI + 0x274); *(int *)(param_1 + 0x10) = iVar1; iVar3 = *(int *)(in_RSI + 0x488); if (*(int *)(in_RSI + 0x488) == -1) { iVar3 = iVar1; } *(int *)(param_1 + 0x14) = iVar3; param_1[0x60] = *(common_params *)(in_RSI + 0xfe8); param_1[0x61] = *(common_params *)(in_RSI + 0x1038); uVar2 = *(int8 *)(in_RSI + 0x34); *(int8 *)(param_1 + 0x24) = *(int8 *)(in_RSI + 0x2c); *(int8 *)(param_1 + 0x2c) = uVar2; *(int8 *)(param_1 + 0x34) = *(int8 *)(in_RSI + 0x3c); *(int4 *)(param_1 + 0x3c) = *(int4 *)(in_RSI + 0x44); *(int8 *)(param_1 + 0x18) = *(int8 *)(in_RSI + 0x6b4); *(int4 *)(param_1 + 0x20) = *(int4 *)(in_RSI + 0x6bc); *(int4 *)(param_1 + 0x40) = *(int4 *)(in_RSI + 0x48); uVar2 = *(int8 *)(in_RSI + 0x6a8); *(int8 *)(param_1 + 0x48) = *(int8 *)(in_RSI + 0x6a0); *(int8 *)(param_1 + 0x50) = uVar2; param_1[0x62] = (common_params)(*(byte *)(in_RSI + 0xfee) ^ 1); param_1[99] = *(common_params *)(in_RSI + 0xfe4); param_1[100] = *(common_params *)(in_RSI + 0xfe5); if (*(char *)(in_RSI + 0x1080) == '\x01') { param_1[0x61] = (common_params)0x1; *(int4 *)(param_1 + 0x1c) = 4; } *(int8 *)(param_1 + 0x58) = *(int8 *)(in_RSI + 0xff4); return param_1; }
46,880
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&)
monkey531[P]llama/common/json.hpp
std::pair<iterator, bool> emplace(const key_type& key, T&& t) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return {it, false}; } } Container::emplace_back(key, std::forward<T>(t)); return {std::prev(this->end()), true}; }
O3
cpp
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::emplace(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, (%rsp) movq %rsi, %r12 movq %rdi, %r14 movq (%rdi), %rbx movq 0x8(%rdi), %r15 cmpq %r15, %rbx je 0x5f266 movq (%r12), %r13 movq 0x8(%r12), %rbp cmpq %rbp, 0x8(%rbx) jne 0x5f25d testq %rbp, %rbp je 0x5f281 movq (%rbx), %rdi movq %r13, %rsi movq %rbp, %rdx callq 0x1b8f0 testl %eax, %eax je 0x5f281 addq $0x30, %rbx cmpq %r15, %rbx jne 0x5f240 movq %r14, %rdi movq %r12, %rsi movq (%rsp), %rdx callq 0x5f296 movq 0x8(%r14), %rbx addq $-0x30, %rbx movb $0x1, %dl jmp 0x5f283 xorl %edx, %edx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov [rsp+38h+var_38], rdx mov r12, rsi mov r14, rdi mov rbx, [rdi] mov r15, [rdi+8] cmp rbx, r15 jz short loc_5F266 mov r13, [r12] mov rbp, [r12+8] loc_5F240: cmp [rbx+8], rbp jnz short loc_5F25D test rbp, rbp jz short loc_5F281 mov rdi, [rbx] mov rsi, r13 mov rdx, rbp call _bcmp test eax, eax jz short loc_5F281 loc_5F25D: add rbx, 30h ; '0' cmp rbx, r15 jnz short loc_5F240 loc_5F266: mov rdi, r14 mov rsi, r12 mov rdx, [rsp+38h+var_38] call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE12emplace_backIJRS7_SF_EEERSG_DpOT_; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::emplace_back<std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(std::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, [r14+8] add rbx, 0FFFFFFFFFFFFFFD0h mov dl, 1 jmp short loc_5F283 loc_5F281: xor edx, edx loc_5F283: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
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>>>>::emplace( _QWORD *a1, long long *a2, long long a3) { _QWORD *v3; // rbx _QWORD *v4; // r15 long long v5; // r13 long long v6; // rbp v3 = (_QWORD *)*a1; v4 = (_QWORD *)a1[1]; if ( (_QWORD *)*a1 == v4 ) { LABEL_7: std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::emplace_back<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>>( a1, a2, a3); return a1[1] - 48LL; } else { v5 = *a2; v6 = a2[1]; while ( v3[1] != v6 || v6 && (unsigned int)bcmp(*v3, v5) ) { v3 += 6; if ( v3 == v4 ) goto LABEL_7; } } return (long long)v3; }
emplace: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RSP],RDX MOV R12,RSI MOV R14,RDI MOV RBX,qword ptr [RDI] MOV R15,qword ptr [RDI + 0x8] CMP RBX,R15 JZ 0x0015f266 MOV R13,qword ptr [R12] MOV RBP,qword ptr [R12 + 0x8] LAB_0015f240: CMP qword ptr [RBX + 0x8],RBP JNZ 0x0015f25d TEST RBP,RBP JZ 0x0015f281 MOV RDI,qword ptr [RBX] MOV RSI,R13 MOV RDX,RBP CALL 0x0011b8f0 TEST EAX,EAX JZ 0x0015f281 LAB_0015f25d: ADD RBX,0x30 CMP RBX,R15 JNZ 0x0015f240 LAB_0015f266: MOV RDI,R14 MOV RSI,R12 MOV RDX,qword ptr [RSP] CALL 0x0015f296 MOV RBX,qword ptr [R14 + 0x8] ADD RBX,-0x30 MOV DL,0x1 JMP 0x0015f283 LAB_0015f281: XOR EDX,EDX LAB_0015f283: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP 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> > > >::emplace(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>&&) */ int1 [16] __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>>>> ::emplace(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,basic_json *param_2) { int8 *puVar1; void *__s2; size_t __n; int iVar2; int8 extraout_RDX; int8 uVar3; int8 *puVar4; int1 auVar5 [16]; puVar4 = *(int8 **)this; puVar1 = *(int8 **)(this + 8); if (puVar4 != puVar1) { __s2 = *(void **)param_1; __n = *(size_t *)(param_1 + 8); do { if (puVar4[1] == __n) { if (__n != 0) { iVar2 = bcmp((void *)*puVar4,__s2,__n); if (iVar2 != 0) goto LAB_0015f25d; } uVar3 = 0; goto LAB_0015f283; } LAB_0015f25d: puVar4 = puVar4 + 6; } while (puVar4 != puVar1); } std:: vector<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>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> :: emplace_back<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>> ((vector<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>>,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,param_1,param_2); puVar4 = (int8 *)(*(long *)(this + 8) + -0x30); uVar3 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1); LAB_0015f283: auVar5._8_8_ = uVar3; auVar5._0_8_ = puVar4; return auVar5; }
46,881
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
monkey531[P]llama/common/minja.hpp
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) { std::map<std::string, size_t> named_positions; for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i; return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value { auto args_obj = Value::object(); std::vector<bool> provided_args(params.size()); for (size_t i = 0, n = args.args.size(); i < n; i++) { auto & arg = args.args[i]; if (i < params.size()) { args_obj.set(params[i], arg); provided_args[i] = true; } else { throw std::runtime_error("Too many positional params for " + fn_name); } } for (auto & [name, value] : args.kwargs) { auto named_pos_it = named_positions.find(name); if (named_pos_it == named_positions.end()) { throw std::runtime_error("Unknown argument " + name + " for function " + fn_name); } provided_args[named_pos_it->second] = true; args_obj.set(name, value); } return fn(context, args_obj); }); }
O0
cpp
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&): subq $0x158, %rsp # imm = 0x158 movq %rdi, 0x30(%rsp) movq %rdi, %rax movq %rax, 0x38(%rsp) movq %rdi, 0x150(%rsp) movq %rsi, 0x148(%rsp) movq %rdx, 0x140(%rsp) movq %rcx, 0x138(%rsp) leaq 0x108(%rsp), %rdi callq 0x171870 movq $0x0, 0x100(%rsp) movq 0x140(%rsp), %rdi callq 0x62d10 movq %rax, 0xf8(%rsp) movq 0x100(%rsp), %rax cmpq 0xf8(%rsp), %rax jae 0xf8381 movq 0x100(%rsp), %rsi movq %rsi, 0x20(%rsp) movq 0x140(%rsp), %rdi callq 0xf9fb0 movq %rax, %rsi leaq 0x108(%rsp), %rdi callq 0x171880 movq %rax, 0x28(%rsp) jmp 0xf8345 movq 0x28(%rsp), %rax movq 0x20(%rsp), %rcx movq %rcx, (%rax) movq 0x100(%rsp), %rax addq $0x1, %rax movq %rax, 0x100(%rsp) jmp 0xf8302 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf84dd leaq 0x40(%rsp), %rdi movq %rdi, 0x18(%rsp) movq 0x140(%rsp), %rsi callq 0x8fed0 jmp 0xf839a leaq 0x58(%rsp), %rdi movq %rdi, 0x10(%rsp) movq 0x148(%rsp), %rsi callq 0x591f0 jmp 0xf83b3 leaq 0x78(%rsp), %rdi movq %rdi, 0x8(%rsp) leaq 0x108(%rsp), %rsi callq 0x171970 jmp 0xf83cc leaq 0xa8(%rsp), %rdi movq 0x138(%rsp), %rsi callq 0x1719a0 jmp 0xf83e3 leaq 0xc8(%rsp), %rdi leaq 0x40(%rsp), %rsi callq 0xf8500 jmp 0xf83f7 movq 0x30(%rsp), %rdi leaq 0xc8(%rsp), %rsi callq 0x13d030 jmp 0xf840b leaq 0xc8(%rsp), %rdi callq 0x13d160 leaq 0x40(%rsp), %rdi callq 0xf85b0 leaq 0x108(%rsp), %rdi callq 0x171a50 movq 0x38(%rsp), %rax addq $0x158, %rsp # imm = 0x158 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf8490 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf8486 movq 0x8(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) callq 0x171a50 movq 0x10(%rsp), %rdi callq 0x5a4d8 movq 0x18(%rsp), %rdi callq 0x62de0 jmp 0xf84dd movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) jmp 0xf84d3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xf0(%rsp) movl %eax, 0xec(%rsp) leaq 0xc8(%rsp), %rdi callq 0x13d160 leaq 0x40(%rsp), %rdi callq 0xf85b0 leaq 0x108(%rsp), %rdi callq 0x171a50 movq 0xf0(%rsp), %rdi callq 0x59b90 nopw (%rax,%rax)
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE: sub rsp, 158h mov [rsp+158h+var_128], rdi mov rax, rdi mov [rsp+158h+var_120], rax mov [rsp+158h+var_8], rdi mov [rsp+158h+var_10], rsi mov [rsp+158h+var_18], rdx mov [rsp+158h+var_20], rcx lea rdi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEC2Ev; std::map<std::string,ulong>::map(void) mov [rsp+158h+var_58], 0 mov rdi, [rsp+158h+var_18] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) mov [rsp+158h+var_60], rax loc_F8302: mov rax, [rsp+158h+var_58] cmp rax, [rsp+158h+var_60] jnb short loc_F8381 mov rsi, [rsp+158h+var_58] mov [rsp+158h+var_138], rsi mov rdi, [rsp+158h+var_18] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rsi, rax lea rdi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&) mov [rsp+158h+var_130], rax jmp short $+2 loc_F8345: mov rax, [rsp+158h+var_130] mov rcx, [rsp+158h+var_138] mov [rax], rcx mov rax, [rsp+158h+var_58] add rax, 1 mov [rsp+158h+var_58], rax jmp short loc_F8302 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp loc_F84DD loc_F8381: lea rdi, [rsp+158h+var_118] mov [rsp+158h+var_140], rdi mov rsi, [rsp+158h+var_18] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) jmp short $+2 loc_F839A: lea rdi, [rsp+158h+var_100] mov [rsp+158h+var_148], rdi mov rsi, [rsp+158h+var_10] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_F83B3: lea rdi, [rsp+158h+var_E0] mov [rsp+158h+var_150], rdi lea rsi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEC2ERKSC_; std::map<std::string,ulong>::map(std::map<std::string,ulong> const&) jmp short $+2 loc_F83CC: lea rdi, [rsp+158h+var_B0] mov rsi, [rsp+158h+var_20] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) jmp short $+2 loc_F83E3: lea rdi, [rsp+158h+var_90] lea rsi, [rsp+158h+var_118] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEC2IZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISH_SaISH_EERKS_IFS1_S6_RS1_EEE3$_0vEEOT_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0,void>(minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0 &&) jmp short $+2 loc_F83F7: mov rdi, [rsp+158h+var_128] lea rsi, [rsp+158h+var_90] call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) jmp short $+2 loc_F840B: lea rdi, [rsp+158h+var_90] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function() lea rdi, [rsp+158h+var_118] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() lea rdi, [rsp+158h+var_50] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map() mov rax, [rsp+158h+var_120] add rsp, 158h retn mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_F8490 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_F8486 mov rdi, [rsp+arg_0] mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map() loc_F8486: mov rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F8490: mov rdi, [rsp+arg_10] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_F84DD mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax jmp short loc_F84D3 mov rcx, rax mov eax, edx mov [rsp+arg_E8], rcx mov [rsp+arg_E4], eax lea rdi, [rsp+arg_C0] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEED2Ev; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function() loc_F84D3: lea rdi, [rsp+arg_38] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() loc_F84DD: lea rdi, [rsp+arg_100] call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEED2Ev; std::map<std::string,ulong>::~map() mov rdi, [rsp+arg_E8] call __Unwind_Resume
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4) { long long v4; // rax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d int v13; // edx int v14; // ecx int v15; // r8d int v16; // r9d _QWORD v18[3]; // [rsp+40h] [rbp-118h] BYREF _BYTE v19[32]; // [rsp+58h] [rbp-100h] BYREF _BYTE v20[48]; // [rsp+78h] [rbp-E0h] BYREF char v21; // [rsp+A8h] [rbp-B0h] BYREF _BYTE v22[48]; // [rsp+C8h] [rbp-90h] BYREF unsigned long long v23; // [rsp+F8h] [rbp-60h] unsigned long long v24; // [rsp+100h] [rbp-58h] _BYTE v25[48]; // [rsp+108h] [rbp-50h] BYREF long long v26; // [rsp+138h] [rbp-20h] _QWORD *v27; // [rsp+140h] [rbp-18h] long long v28; // [rsp+148h] [rbp-10h] long long v29; // [rsp+150h] [rbp-8h] v29 = a1; v28 = a2; v27 = a3; v26 = a4; std::map<std::string,unsigned long>::map(v25); v24 = 0LL; v23 = std::vector<std::string>::size(v27); while ( v24 < v23 ) { v4 = std::vector<std::string>::operator[](v27, v24); *(_QWORD *)std::map<std::string,unsigned long>::operator[](v25, v4) = v24++; } std::vector<std::string>::vector(v18, v27); std::string::basic_string(v19, v28); std::map<std::string,unsigned long>::map(v20, v25); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function( (unsigned int)&v21, v26, v5, v6, v7, v8); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::function<minja::simple_function(std::string const&,std::vector<std::string> const&,std::function const&<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>)::$_0,void>( (unsigned int)v22, (unsigned int)v18, v9, v10, v11, v12); minja::Value::callable(a1, (unsigned int)v22, v13, v14, v15, v16); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::~function(v22); minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0(v18); std::map<std::string,unsigned long>::~map(v25); return a1; }
simple_function: SUB RSP,0x158 MOV qword ptr [RSP + 0x30],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x150],RDI MOV qword ptr [RSP + 0x148],RSI MOV qword ptr [RSP + 0x140],RDX MOV qword ptr [RSP + 0x138],RCX LEA RDI,[RSP + 0x108] CALL 0x00271870 MOV qword ptr [RSP + 0x100],0x0 MOV RDI,qword ptr [RSP + 0x140] CALL 0x00162d10 MOV qword ptr [RSP + 0xf8],RAX LAB_001f8302: MOV RAX,qword ptr [RSP + 0x100] CMP RAX,qword ptr [RSP + 0xf8] JNC 0x001f8381 MOV RSI,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x20],RSI MOV RDI,qword ptr [RSP + 0x140] CALL 0x001f9fb0 MOV RSI,RAX LAB_001f8331: LEA RDI,[RSP + 0x108] CALL 0x00271880 MOV qword ptr [RSP + 0x28],RAX JMP 0x001f8345 LAB_001f8345: MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RSP + 0x100] ADD RAX,0x1 MOV qword ptr [RSP + 0x100],RAX JMP 0x001f8302 LAB_001f8381: LEA RDI,[RSP + 0x40] MOV qword ptr [RSP + 0x18],RDI MOV RSI,qword ptr [RSP + 0x140] CALL 0x0018fed0 JMP 0x001f839a LAB_001f839a: LEA RDI,[RSP + 0x58] MOV qword ptr [RSP + 0x10],RDI MOV RSI,qword ptr [RSP + 0x148] LAB_001f83ac: CALL 0x001591f0 JMP 0x001f83b3 LAB_001f83b3: LEA RDI,[RSP + 0x78] MOV qword ptr [RSP + 0x8],RDI LAB_001f83bd: LEA RSI,[RSP + 0x108] CALL 0x00271970 JMP 0x001f83cc LAB_001f83cc: LEA RDI,[RSP + 0xa8] MOV RSI,qword ptr [RSP + 0x138] LAB_001f83dc: CALL 0x002719a0 JMP 0x001f83e3 LAB_001f83e3: LEA RDI,[RSP + 0xc8] LEA RSI,[RSP + 0x40] CALL 0x001f8500 JMP 0x001f83f7 LAB_001f83f7: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0xc8] CALL 0x0023d030 LAB_001f8409: JMP 0x001f840b LAB_001f840b: LEA RDI,[RSP + 0xc8] CALL 0x0023d160 LEA RDI,[RSP + 0x40] CALL 0x001f85b0 LEA RDI,[RSP + 0x108] CALL 0x00271a50 MOV RAX,qword ptr [RSP + 0x38] ADD RSP,0x158 RET
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */ minja * __thiscall minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3) { ulong uVar1; string *psVar2; ulong *puVar3; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_118 [24]; string local_100 [32]; map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_e0 [48]; function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_b0 [32]; function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)> local_90 [48] ; ulong local_60; ulong local_58; map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_50 [48]; function *local_20; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_18; string *local_10; minja *local_8; local_20 = param_3; local_18 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)param_2; local_10 = param_1; local_8 = this; std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::map(local_50); local_58 = 0; local_60 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size(local_18); for (; uVar1 = local_58, local_58 < local_60; local_58 = local_58 + 1) { psVar2 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] (local_18,local_58); /* try { // try from 001f8331 to 001f8397 has its CatchHandler @ 001f8368 */ puVar3 = (ulong *)std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::operator[](local_50,psVar2); *puVar3 = uVar1; } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector (local_118,(vector *)local_18); /* try { // try from 001f83ac to 001f83b0 has its CatchHandler @ 001f843c */ std::__cxx11::string::string(local_100,local_10); /* try { // try from 001f83bd to 001f83c9 has its CatchHandler @ 001f8452 */ std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::map(local_e0,(map *)local_50); /* try { // try from 001f83dc to 001f83e0 has its CatchHandler @ 001f8468 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function (local_b0,local_20); /* try { // try from 001f83e3 to 001f83f4 has its CatchHandler @ 001f849c */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: function<minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::__0,void> (local_90,(__0 *)local_118); /* try { // try from 001f83f7 to 001f8408 has its CatchHandler @ 001f84b2 */ Value::callable((Value *)this,(function *)local_90); std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: ~function(local_90); simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&) ::$_0::~__0((__0 *)local_118); std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::~map(local_50); return this; }
46,882
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
monkey531[P]llama/common/minja.hpp
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) { std::map<std::string, size_t> named_positions; for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i; return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value { auto args_obj = Value::object(); std::vector<bool> provided_args(params.size()); for (size_t i = 0, n = args.args.size(); i < n; i++) { auto & arg = args.args[i]; if (i < params.size()) { args_obj.set(params[i], arg); provided_args[i] = true; } else { throw std::runtime_error("Too many positional params for " + fn_name); } } for (auto & [name, value] : args.kwargs) { auto named_pos_it = named_positions.find(name); if (named_pos_it == named_positions.end()) { throw std::runtime_error("Unknown argument " + name + " for function " + fn_name); } provided_args[named_pos_it->second] = true; args_obj.set(name, value); } return fn(context, args_obj); }); }
O2
cpp
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, 0x8(%rsp) movq %rdx, %r15 movq %rsi, %r12 leaq 0x38(%rsp), %rax andl $0x0, (%rax) andq $0x0, 0x8(%rax) movq %rax, 0x10(%rax) movq %rax, 0x18(%rax) andq $0x0, 0x20(%rax) movq %rdi, (%rsp) movq 0x8(%rdx), %rbp subq (%rdx), %rbp sarq $0x5, %rbp xorl %ebx, %ebx leaq 0x30(%rsp), %r13 xorl %r14d, %r14d cmpq %r14, %rbp je 0x9f59e movq (%r15), %rsi addq %rbx, %rsi movq %r13, %rdi callq 0x7f98a movq %r14, (%rax) incq %r14 addq $0x20, %rbx jmp 0x9f57f leaq 0x60(%rsp), %rdi movq %r15, %rsi callq 0x3a57c leaq 0x78(%rsp), %r15 movq %r15, %rdi movq %r12, %rsi callq 0x23bb0 leaq 0x98(%rsp), %r13 leaq 0x30(%rsp), %rsi movq %r13, %rdi callq 0x7fdd4 leaq 0xc8(%rsp), %r12 movq %r12, %rdi movq 0x8(%rsp), %rsi callq 0x7f9f0 xorps %xmm0, %xmm0 movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movl $0x88, %edi callq 0x23890 movq %rax, %r14 leaq 0x60(%rsp), %rsi movq %rax, %rdi callq 0x3a57c leaq 0x18(%r14), %r13 movq %r13, %rdi movq %r15, %rsi callq 0x23bb0 leaq 0x40(%r14), %rdi leaq 0xa0(%rsp), %rsi callq 0x3d036 leaq 0x68(%r14), %rdi movq %r12, %rsi callq 0x7f9f0 leaq 0x10(%rsp), %rsi movq %r14, (%rsi) leaq 0x109(%rip), %rax # 0x9f750 movq %rax, 0x18(%rsi) leaq 0x42c(%rip), %rax # 0x9fa7e movq %rax, 0x10(%rsi) movq (%rsp), %rbx movq %rbx, %rdi callq 0x7028a leaq 0x10(%rsp), %rdi callq 0x48638 leaq 0x60(%rsp), %rdi callq 0x9f728 leaq 0x30(%rsp), %rdi callq 0x8001a movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x9f6cf movq %rax, %rbx movq %r14, %rdi addq $0x38, %rdi callq 0x8001a movq %r13, %rdi callq 0x24158 jmp 0x9f6b3 movq %rax, %rbx movq %r14, %rdi callq 0x27412 jmp 0x9f6c0 movq %rax, %rbx movl $0x88, %esi movq %r14, %rdi callq 0x238b0 jmp 0x9f6d2 movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x48638 leaq 0x60(%rsp), %rdi callq 0x9f728 jmp 0x9f716 movq %rax, %rbx movq %r13, %rdi callq 0x8001a jmp 0x9f6f8 movq %rax, %rbx movq %r15, %rdi callq 0x24158 jmp 0x9f705 movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0x27412 jmp 0x9f716 jmp 0x9f713 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x8001a movq %rbx, %rdi callq 0x23f20
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE_0: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov [rsp+118h+var_110], rcx mov r15, rdx mov r12, rsi lea rax, [rsp+118h+var_E0] and dword ptr [rax], 0 and qword ptr [rax+8], 0 mov [rax+10h], rax mov [rax+18h], rax and qword ptr [rax+20h], 0 mov [rsp+118h+var_118], rdi mov rbp, [rdx+8] sub rbp, [rdx] sar rbp, 5 xor ebx, ebx lea r13, [rsp+118h+var_E8] xor r14d, r14d loc_9F57F: cmp rbp, r14 jz short loc_9F59E mov rsi, [r15] add rsi, rbx mov rdi, r13 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&) mov [rax], r14 inc r14 add rbx, 20h ; ' ' jmp short loc_9F57F loc_9F59E: lea rdi, [rsp+118h+var_B8] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) lea r15, [rsp+118h+var_A0] mov rdi, r15 mov rsi, r12 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea r13, [rsp+118h+var_80] lea rsi, [rsp+118h+var_E8] mov rdi, r13 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>> const&) lea r12, [rsp+118h+var_50] mov rdi, r12 mov rsi, [rsp+118h+var_110] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) xorps xmm0, xmm0 movaps [rsp+118h+var_F8], xmm0 movaps [rsp+118h+var_108], xmm0 mov edi, 88h; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax lea rsi, [rsp+118h+var_B8] mov rdi, rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) lea r13, [r14+18h] mov rdi, r13 mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) lea rdi, [r14+40h] lea rsi, [rsp+118h+var_78] call _ZNSt15_Rb_tree_headerC2EOS_; std::_Rb_tree_header::_Rb_tree_header(std::_Rb_tree_header&&) lea rdi, [r14+68h] mov rsi, r12 call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) lea rsi, [rsp+118h+var_108] mov [rsi], r14 lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E9_M_invokeERKSt9_Any_dataS6_S8__0; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke(std::_Any_data const&,std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation_0; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax mov rbx, [rsp+118h+var_118] mov rdi, rbx call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) lea rdi, [rsp+118h+var_108]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+118h+var_B8] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev_0; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() lea rdi, [rsp+118h+var_E8] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_9F6CF mov rbx, rax mov rdi, r14 add rdi, 38h ; '8' call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, r13; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_9F6B3 mov rbx, rax loc_9F6B3: mov rdi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_9F6C0 mov rbx, rax loc_9F6C0: mov esi, 88h; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9F6D2 loc_9F6CF: mov rbx, rax loc_9F6D2: lea rdi, [rsp+arg_8]; this call _ZNSt14_Function_baseD2Ev; std::_Function_base::~_Function_base() lea rdi, [rsp+arg_58] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev_0; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() jmp short loc_9F716 mov rbx, rax mov rdi, r13 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() jmp short loc_9F6F8 mov rbx, rax loc_9F6F8: mov rdi, r15; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_9F705 mov rbx, rax loc_9F705: lea rdi, [rsp+arg_58] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_9F716 jmp short $+2 loc_9F713: mov rbx, rax loc_9F716: lea rdi, [rsp+arg_28] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, rbx call __Unwind_Resume
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4) { long long v5; // rbp long long v6; // rbx long long i; // r14 long long v8; // r14 __int128 v11; // [rsp+10h] [rbp-108h] BYREF long long ( *v12)(); // [rsp+20h] [rbp-F8h] long long ( *v13)(); // [rsp+28h] [rbp-F0h] _BYTE v14[8]; // [rsp+30h] [rbp-E8h] BYREF int v15; // [rsp+38h] [rbp-E0h] BYREF long long v16; // [rsp+40h] [rbp-D8h] int *v17; // [rsp+48h] [rbp-D0h] int *v18; // [rsp+50h] [rbp-C8h] long long v19; // [rsp+58h] [rbp-C0h] _QWORD v20[3]; // [rsp+60h] [rbp-B8h] BYREF _BYTE v21[32]; // [rsp+78h] [rbp-A0h] BYREF _BYTE v22[8]; // [rsp+98h] [rbp-80h] BYREF _BYTE v23[40]; // [rsp+A0h] [rbp-78h] BYREF _OWORD v24[5]; // [rsp+C8h] [rbp-50h] BYREF v15 = 0; v16 = 0LL; v17 = &v15; v18 = &v15; v19 = 0LL; v5 = (long long)(a3[1] - *a3) >> 5; v6 = 0LL; for ( i = 0LL; v5 != i; ++i ) { *(_QWORD *)std::map<std::string,unsigned long>::operator[]((long long)v14, v6 + *a3) = i; v6 += 32LL; } std::vector<std::string>::vector(v20, a3); std::string::basic_string(v21, a2); std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::_Rb_tree( (long long)v22, (long long)v14); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v24, a4); v11 = 0LL; v8 = operator new(0x88uLL); std::vector<std::string>::vector((_QWORD *)v8, v20); std::string::basic_string(v8 + 24, v21); std::_Rb_tree_header::_Rb_tree_header(v8 + 64, (long long)v23); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function( (_OWORD *)(v8 + 104), (long long)v24); *(_QWORD *)&v11 = v8; v13 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke; v12 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager; minja::Value::callable(a1); std::_Function_base::~_Function_base((std::_Function_base *)&v11); minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0(v20); std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree((long long)v14); return a1; }
simple_function: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV qword ptr [RSP + 0x8],RCX MOV R15,RDX MOV R12,RSI LEA RAX,[RSP + 0x38] AND dword ptr [RAX],0x0 AND qword ptr [RAX + 0x8],0x0 MOV qword ptr [RAX + 0x10],RAX MOV qword ptr [RAX + 0x18],RAX AND qword ptr [RAX + 0x20],0x0 MOV qword ptr [RSP],RDI MOV RBP,qword ptr [RDX + 0x8] SUB RBP,qword ptr [RDX] SAR RBP,0x5 XOR EBX,EBX LEA R13,[RSP + 0x30] XOR R14D,R14D LAB_0019f57f: CMP RBP,R14 JZ 0x0019f59e MOV RSI,qword ptr [R15] ADD RSI,RBX LAB_0019f58a: MOV RDI,R13 CALL 0x0017f98a MOV qword ptr [RAX],R14 INC R14 ADD RBX,0x20 JMP 0x0019f57f LAB_0019f59e: LEA RDI,[RSP + 0x60] MOV RSI,R15 CALL 0x0013a57c LEA R15,[RSP + 0x78] LAB_0019f5b0: MOV RDI,R15 MOV RSI,R12 CALL 0x00123bb0 LEA R13,[RSP + 0x98] LAB_0019f5c3: LEA RSI,[RSP + 0x30] MOV RDI,R13 CALL 0x0017fdd4 LEA R12,[RSP + 0xc8] LAB_0019f5d8: MOV RDI,R12 MOV RSI,qword ptr [RSP + 0x8] CALL 0x0017f9f0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 LAB_0019f5f2: MOV EDI,0x88 CALL 0x00123890 LAB_0019f5fc: MOV R14,RAX LEA RSI,[RSP + 0x60] MOV RDI,RAX CALL 0x0013a57c LEA R13,[R14 + 0x18] LAB_0019f610: MOV RDI,R13 MOV RSI,R15 CALL 0x00123bb0 LEA RDI,[R14 + 0x40] LEA RSI,[RSP + 0xa0] CALL 0x0013d036 LEA RDI,[R14 + 0x68] LAB_0019f630: MOV RSI,R12 CALL 0x0017f9f0 LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],R14 LEA RAX,[0x19f750] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x19fa7e] MOV qword ptr [RSI + 0x10],RAX LAB_0019f656: MOV RBX,qword ptr [RSP] MOV RDI,RBX CALL 0x0017028a LAB_0019f662: LEA RDI,[RSP + 0x10] CALL 0x00148638 LEA RDI,[RSP + 0x60] CALL 0x0019f728 LEA RDI,[RSP + 0x30] CALL 0x0018001a MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */ minja * __thiscall minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3) { long lVar1; long lVar2; long *plVar3; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00; long lVar4; long lVar5; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_108; int8 uStack_100; code *local_f8; code *pcStack_f0; map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_e8 [8]; int4 local_e0 [2]; int8 local_d8; int4 *local_d0; int4 *local_c8; int8 local_c0; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_b8 [24]; string local_a0 [32]; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_80 [8]; _Rb_tree_header local_78 [40]; function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_50 [32]; local_d0 = local_e0; local_e0[0] = 0; local_d8 = 0; local_c0 = 0; lVar1 = *(long *)(param_2 + 8); lVar2 = *(long *)param_2; lVar4 = 0; local_c8 = local_d0; for (lVar5 = 0; lVar1 - lVar2 >> 5 != lVar5; lVar5 = lVar5 + 1) { /* try { // try from 0019f58a to 0019f591 has its CatchHandler @ 0019f713 */ plVar3 = (long *)std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::operator[](local_e8,(string *)(*(long *)param_2 + lVar4)); *plVar3 = lVar5; lVar4 = lVar4 + 0x20; } /* try { // try from 0019f59e to 0019f5aa has its CatchHandler @ 0019f711 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_b8,param_2); /* try { // try from 0019f5b0 to 0019f5ba has its CatchHandler @ 0019f702 */ std::__cxx11::string::string(local_a0,param_1); /* try { // try from 0019f5c3 to 0019f5cf has its CatchHandler @ 0019f6f5 */ std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::_Rb_tree(local_80,(_Rb_tree *)local_e8); /* try { // try from 0019f5d8 to 0019f5e4 has its CatchHandler @ 0019f6e8 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function (local_50,param_3); local_f8 = (code *)0x0; pcStack_f0 = (code *)0x0; local_108 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)0x0; uStack_100 = 0; /* try { // try from 0019f5f2 to 0019f5fb has its CatchHandler @ 0019f6cf */ this_00 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)operator_new(0x88); /* try { // try from 0019f5fc to 0019f60b has its CatchHandler @ 0019f6bd */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector (this_00,(vector *)local_b8); /* try { // try from 0019f610 to 0019f61a has its CatchHandler @ 0019f6b0 */ std::__cxx11::string::string((string *)(this_00 + 0x18),local_a0); std::_Rb_tree_header::_Rb_tree_header((_Rb_tree_header *)(this_00 + 0x40),local_78); /* try { // try from 0019f630 to 0019f637 has its CatchHandler @ 0019f697 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function ((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> *) (this_00 + 0x68),local_50); pcStack_f0 = std:: _Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0> ::_M_invoke; local_f8 = std:: _Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0> ::_M_manager; local_108 = this_00; /* try { // try from 0019f656 to 0019f661 has its CatchHandler @ 0019f695 */ Value::callable(this); std::_Function_base::~_Function_base((_Function_base *)&local_108); simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&) ::$_0::~__0((__0 *)local_b8); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> *)local_e8); return this; }
46,883
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&)
monkey531[P]llama/common/minja.hpp
static Value simple_function(const std::string & fn_name, const std::vector<std::string> & params, const std::function<Value(const std::shared_ptr<Context> &, Value & args)> & fn) { std::map<std::string, size_t> named_positions; for (size_t i = 0, n = params.size(); i < n; i++) named_positions[params[i]] = i; return Value::callable([=](const std::shared_ptr<Context> & context, ArgumentsValue & args) -> Value { auto args_obj = Value::object(); std::vector<bool> provided_args(params.size()); for (size_t i = 0, n = args.args.size(); i < n; i++) { auto & arg = args.args[i]; if (i < params.size()) { args_obj.set(params[i], arg); provided_args[i] = true; } else { throw std::runtime_error("Too many positional params for " + fn_name); } } for (auto & [name, value] : args.kwargs) { auto named_pos_it = named_positions.find(name); if (named_pos_it == named_positions.end()) { throw std::runtime_error("Unknown argument " + name + " for function " + fn_name); } provided_args[named_pos_it->second] = true; args_obj.set(name, value); } return fn(context, args_obj); }); }
O3
cpp
minja::simple_function(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movq %rcx, 0x28(%rsp) movq %rdx, %r15 movq %rsi, %r14 movq %rdi, 0x20(%rsp) leaq 0xc0(%rsp), %rax movl $0x0, (%rax) xorl %ecx, %ecx movq %rcx, 0x8(%rax) movq %rax, 0x10(%rax) movq %rax, 0x18(%rax) movq %rcx, 0x20(%rax) movq 0x8(%rdx), %rbp subq (%rdx), %rbp je 0x78f6a sarq $0x5, %rbp cmpq $0x1, %rbp adcq $0x0, %rbp xorl %ebx, %ebx leaq 0xb8(%rsp), %r13 xorl %r12d, %r12d movq (%r15), %rsi addq %rbx, %rsi movq %r13, %rdi callq 0xace24 movq %r12, (%rax) incq %r12 addq $0x20, %rbx cmpq %r12, %rbp jne 0x78f4d leaq 0x30(%rsp), %rdi movq %r15, %rsi callq 0x5589a leaq 0x48(%rsp), %rdi leaq 0x58(%rsp), %r13 movq %r13, -0x10(%r13) movq (%r14), %rsi movq 0x8(%r14), %rdx addq %rsi, %rdx callq 0x224fc leaq 0x68(%rsp), %r14 leaq 0xb8(%rsp), %rsi movq %r14, %rdi callq 0xad27e leaq 0x98(%rsp), %r15 movq %r15, %rdi movq 0x28(%rsp), %rsi callq 0xacea0 xorps %xmm0, %xmm0 movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) movl $0x88, %edi callq 0x1a870 movq %rax, %r12 leaq 0x30(%rsp), %rsi movq %rax, %rdi callq 0x5589a leaq 0x18(%r12), %rdi leaq 0x28(%r12), %rbp movq %rbp, 0x18(%r12) movq 0x48(%rsp), %rsi movq 0x50(%rsp), %rdx addq %rsi, %rdx callq 0x224fc leaq 0x40(%r12), %rax movq 0x78(%rsp), %rdx testq %rdx, %rdx je 0x79051 leaq 0x70(%rsp), %rdi movl (%rdi), %ecx movq %rdx, 0x48(%r12) movq 0x10(%rdi), %r8 movq 0x18(%rdi), %rsi movq %rax, 0x8(%rdx) leaq 0x90(%rsp), %rdx movq (%rdx), %rax movq %rax, 0x60(%r12) movq $0x0, -0x18(%rdx) movq %rdi, -0x10(%rdx) movq %rdi, -0x8(%rdx) movq %r8, %rax jmp 0x79064 movq $0x0, 0x48(%r12) leaq 0x60(%r12), %rdx xorl %ecx, %ecx movq %rax, %rsi movq %rax, 0x50(%r12) movq %rsi, 0x58(%r12) movq $0x0, (%rdx) movl %ecx, 0x40(%r12) leaq 0x68(%r12), %rdi movq %r15, %rsi callq 0xacea0 movq %rsp, %rsi movq %r12, (%rsi) leaq 0x1c8(%rip), %rax # 0x7925c movq %rax, 0x18(%rsi) leaq 0x83b(%rip), %rax # 0x798da movq %rax, 0x10(%rsi) movq 0x20(%rsp), %rdi callq 0x96a3e movq 0x10(%rsp), %rax testq %rax, %rax je 0x790c4 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0xa8(%rsp), %rax testq %rax, %rax je 0x790de movq %r15, %rdi movq %r15, %rsi movl $0x3, %edx callq *%rax movq %r14, %rdi callq 0xad4e0 movq 0x48(%rsp), %rdi cmpq %r13, %rdi je 0x790fd movq 0x58(%rsp), %rsi incq %rsi callq 0x1a890 leaq 0x30(%rsp), %rdi callq 0x2161a leaq 0xb8(%rsp), %rdi callq 0xad4e0 addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x791a5 jmp 0x791a5 movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x791b0 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x791b0 jmp 0x791a5 movq %rax, %rbx movq %r12, %rdi addq $0x38, %rdi callq 0xad4e0 movq 0x18(%r12), %rdi cmpq %rbp, %rdi je 0x79172 movq (%rbp), %rsi incq %rsi callq 0x1a890 jmp 0x79172 movq %rax, %rbx movq %r12, %rdi callq 0x2161a jmp 0x7917f movq %rax, %rbx movl $0x88, %esi movq %r12, %rdi callq 0x1a890 movq 0x10(%rsp), %rax testq %rax, %rax je 0x791b0 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x791b0 movq %rax, %rdi callq 0x2160f movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x7920e jmp 0x791f9 movq %rax, %rbx movq %r14, %rdi callq 0xad4e0 jmp 0x791cc movq %rax, %rbx movq 0x48(%rsp), %rdi cmpq %r13, %rdi je 0x791e8 movq 0x58(%rsp), %rsi incq %rsi callq 0x1a890 jmp 0x791e8 movq %rax, %rbx leaq 0x30(%rsp), %rdi callq 0x2161a jmp 0x791f9 jmp 0x791f6 movq %rax, %rbx leaq 0xb8(%rsp), %rdi callq 0xad4e0 movq %rbx, %rdi callq 0x1af20
_ZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov [rsp+118h+var_F0], rcx mov r15, rdx mov r14, rsi mov [rsp+118h+var_F8], rdi lea rax, [rsp+118h+var_58] mov dword ptr [rax], 0 xor ecx, ecx mov [rax+8], rcx mov [rax+10h], rax mov [rax+18h], rax mov [rax+20h], rcx mov rbp, [rdx+8] sub rbp, [rdx] jz short loc_78F6A sar rbp, 5 cmp rbp, 1 adc rbp, 0 xor ebx, ebx lea r13, [rsp+118h+var_60] xor r12d, r12d loc_78F4D: mov rsi, [r15] add rsi, rbx mov rdi, r13 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEmSt4lessIS5_ESaISt4pairIKS5_mEEEixERS9_; std::map<std::string,ulong>::operator[](std::string const&) mov [rax], r12 inc r12 add rbx, 20h ; ' ' cmp rbp, r12 jnz short loc_78F4D loc_78F6A: lea rdi, [rsp+118h+var_E8] mov rsi, r15 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) lea rdi, [rsp+118h+var_D0] lea r13, [rsp+118h+var_C0] mov [r13-10h], r13 mov rsi, [r14] mov rdx, [r14+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea r14, [rsp+118h+var_B0] lea rsi, [rsp+118h+var_60] mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EEC2ERKSE_; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::_Rb_tree(std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>> const&) lea r15, [rsp+118h+var_80] mov rdi, r15 mov rsi, [rsp+118h+var_F0] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) xorps xmm0, xmm0 movaps [rsp+118h+var_108], xmm0 movaps [rsp+118h+var_118], xmm0 mov edi, 88h; unsigned __int64 call __Znwm; operator new(ulong) mov r12, rax lea rsi, [rsp+118h+var_E8] mov rdi, rax call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2ERKS7_; std::vector<std::string>::vector(std::vector<std::string> const&) lea rdi, [r12+18h] lea rbp, [r12+28h] mov [r12+18h], rbp mov rsi, [rsp+118h+var_D0] mov rdx, [rsp+118h+var_C8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) lea rax, [r12+40h] mov rdx, [rsp+118h+var_A0] test rdx, rdx jz short loc_79051 lea rdi, [rsp+118h+var_A8] mov ecx, [rdi] mov [r12+48h], rdx mov r8, [rdi+10h] mov rsi, [rdi+18h] mov [rdx+8], rax lea rdx, [rsp+118h+var_88] mov rax, [rdx] mov [r12+60h], rax mov qword ptr [rdx-18h], 0 mov [rdx-10h], rdi mov [rdx-8], rdi mov rax, r8 jmp short loc_79064 loc_79051: mov qword ptr [r12+48h], 0 lea rdx, [r12+60h] xor ecx, ecx mov rsi, rax loc_79064: mov [r12+50h], rax mov [r12+58h], rsi mov qword ptr [rdx], 0 mov [r12+40h], ecx lea rdi, [r12+68h] mov rsi, r15 call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERS1_EEC2ERKS9_; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&) mov rsi, rsp mov [rsi], r12 lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E9_M_invokeERKSt9_Any_dataS6_S8_; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke(std::_Any_data const&,std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) mov [rsi+18h], rax lea rax, _ZNSt17_Function_handlerIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEZNS0_L15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISF_SaISF_EERKSt8functionIFS1_S6_RS1_EEE3$_0E10_M_managerERSt9_Any_dataRKSV_St18_Manager_operation; std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rsi+10h], rax mov rdi, [rsp+118h+var_F8] call _ZN5minja5Value8callableERKSt8functionIFS0_RKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueEEE; minja::Value::callable(std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)> const&) mov rax, qword ptr [rsp+118h+var_108] test rax, rax jz short loc_790C4 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_790C4: mov rax, [rsp+118h+var_70] test rax, rax jz short loc_790DE mov rdi, r15 mov rsi, r15 mov edx, 3 call rax loc_790DE: mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, [rsp+118h+var_D0]; void * cmp rdi, r13 jz short loc_790FD mov rsi, [rsp+118h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_790FD: lea rdi, [rsp+118h+var_E8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() lea rdi, [rsp+118h+var_60] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_791A5 jmp short loc_791A5 mov rbx, rax mov rax, qword ptr [rsp+118h+var_108] test rax, rax jz short loc_791B0 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_791B0 jmp short loc_791A5 mov rbx, rax mov rdi, r12 add rdi, 38h ; '8' call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, [r12+18h]; void * cmp rdi, rbp jz short loc_79172 mov rsi, [rbp+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_79172 mov rbx, rax loc_79172: mov rdi, r12 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_7917F mov rbx, rax loc_7917F: mov esi, 88h; unsigned __int64 mov rdi, r12; void * call __ZdlPvm; operator delete(void *,ulong) mov rax, qword ptr [rsp+118h+var_108] test rax, rax jz short loc_791B0 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_791B0 loc_791A5: mov rdi, rax call __clang_call_terminate mov rbx, rax loc_791B0: lea rdi, [rsp+118h+var_E8] call _ZZN5minjaL15simple_functionERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS5_SaIS5_EERKSt8functionIFNS_5ValueERKSt10shared_ptrINS_7ContextEERSE_EEEN3$_0D2Ev; minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0::~$_0() jmp short loc_791F9 mov rbx, rax mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() jmp short loc_791CC mov rbx, rax loc_791CC: mov rdi, [rsp+118h+var_D0]; void * cmp rdi, r13 jz short loc_791E8 mov rsi, [rsp+118h+var_C0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_791E8 mov rbx, rax loc_791E8: lea rdi, [rsp+118h+var_E8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_791F9 jmp short $+2 loc_791F6: mov rbx, rax loc_791F9: lea rdi, [rsp+118h+var_60] call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_mESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,ulong>,std::_Select1st<std::pair<std::string const,ulong>>,std::less<std::string>,std::allocator<std::pair<std::string const,ulong>>>::~_Rb_tree() mov rdi, rbx call __Unwind_Resume
long long minja::simple_function(long long a1, long long a2, _QWORD *a3, long long a4) { long long v5; // rbp long long v6; // rbp long long v7; // rbx long long v8; // r12 long long v9; // r12 long long v10; // rax long long v11; // rdx int v12; // ecx int *v13; // r8 int *v14; // rsi long long *v15; // rdx int v16; // edx int v17; // ecx int v18; // r8d int v19; // r9d __int128 v21; // [rsp+0h] [rbp-118h] BYREF __int128 v22; // [rsp+10h] [rbp-108h] long long v23; // [rsp+20h] [rbp-F8h] long long v24; // [rsp+28h] [rbp-F0h] _QWORD v25[3]; // [rsp+30h] [rbp-E8h] BYREF void *v26[2]; // [rsp+48h] [rbp-D0h] BYREF _QWORD v27[2]; // [rsp+58h] [rbp-C0h] BYREF _BYTE v28[8]; // [rsp+68h] [rbp-B0h] BYREF int v29; // [rsp+70h] [rbp-A8h] BYREF long long v30; // [rsp+78h] [rbp-A0h] int *v31; // [rsp+80h] [rbp-98h] int *v32; // [rsp+88h] [rbp-90h] long long v33; // [rsp+90h] [rbp-88h] BYREF _BYTE v34[16]; // [rsp+98h] [rbp-80h] BYREF void ( *v35)(_BYTE *, _BYTE *, long long); // [rsp+A8h] [rbp-70h] _BYTE v36[8]; // [rsp+B8h] [rbp-60h] BYREF int v37; // [rsp+C0h] [rbp-58h] BYREF long long v38; // [rsp+C8h] [rbp-50h] int *v39; // [rsp+D0h] [rbp-48h] int *v40; // [rsp+D8h] [rbp-40h] long long v41; // [rsp+E0h] [rbp-38h] v24 = a4; v23 = a1; v37 = 0; v38 = 0LL; v39 = &v37; v40 = &v37; v41 = 0LL; v5 = a3[1] - *a3; if ( v5 ) { v6 = (v5 >> 5 == 0) + (v5 >> 5); v7 = 0LL; v8 = 0LL; do { *(_QWORD *)std::map<std::string,unsigned long>::operator[](v36, v7 + *a3) = v8++; v7 += 32LL; } while ( v6 != v8 ); } std::vector<std::string>::vector((long long)v25, a3); v26[0] = v27; std::string::_M_construct<char *>((long long)v26, *(_BYTE **)a2, *(_QWORD *)a2 + *(_QWORD *)(a2 + 8)); std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::_Rb_tree( v28, v36); std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v34, v24); v22 = 0LL; v21 = 0LL; v9 = operator new(0x88uLL); std::vector<std::string>::vector(v9, v25); *(_QWORD *)(v9 + 24) = v9 + 40; std::string::_M_construct<char *>(v9 + 24, (_BYTE *)v26[0], (long long)v26[0] + (unsigned long long)v26[1]); v10 = v9 + 64; v11 = v30; if ( v30 ) { v12 = v29; *(_QWORD *)(v9 + 72) = v30; v13 = v31; v14 = v32; *(_QWORD *)(v11 + 8) = v10; v15 = &v33; *(_QWORD *)(v9 + 96) = v33; v30 = 0LL; v31 = &v29; v32 = &v29; v10 = (long long)v13; } else { *(_QWORD *)(v9 + 72) = 0LL; v15 = (long long *)(v9 + 96); v12 = 0; v14 = (int *)(v9 + 64); } *(_QWORD *)(v9 + 80) = v10; *(_QWORD *)(v9 + 88) = v14; *v15 = 0LL; *(_DWORD *)(v9 + 64) = v12; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)>::function(v9 + 104, v34); *((_QWORD *)&v22 + 1) = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_invoke; *(_QWORD *)&v22 = std::_Function_handler<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &),minja::simple_function(std::string const&,std::vector<std::string> const&,std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::Value&)> const&)::$_0>::_M_manager; minja::Value::callable(v23, (unsigned int)&v21, v16, v17, v18, v19, v9, *((long long *)&v21 + 1)); if ( (_QWORD)v22 ) ((void ( *)(__int128 *, __int128 *, long long))v22)(&v21, &v21, 3LL); if ( v35 ) v35(v34, v34, 3LL); std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree(v28); if ( v26[0] != v27 ) operator delete(v26[0], v27[0] + 1LL); std::vector<std::string>::~vector((long long)v25); return std::_Rb_tree<std::string,std::pair<std::string const,unsigned long>,std::_Select1st<std::pair<std::string const,unsigned long>>,std::less<std::string>,std::allocator<std::pair<std::string const,unsigned long>>>::~_Rb_tree(v36); }
simple_function: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV qword ptr [RSP + 0x28],RCX MOV R15,RDX MOV R14,RSI MOV qword ptr [RSP + 0x20],RDI LEA RAX,[RSP + 0xc0] MOV dword ptr [RAX],0x0 XOR ECX,ECX MOV qword ptr [RAX + 0x8],RCX MOV qword ptr [RAX + 0x10],RAX MOV qword ptr [RAX + 0x18],RAX MOV qword ptr [RAX + 0x20],RCX MOV RBP,qword ptr [RDX + 0x8] SUB RBP,qword ptr [RDX] JZ 0x00178f6a SAR RBP,0x5 CMP RBP,0x1 ADC RBP,0x0 XOR EBX,EBX LEA R13,[RSP + 0xb8] XOR R12D,R12D LAB_00178f4d: MOV RSI,qword ptr [R15] ADD RSI,RBX LAB_00178f53: MOV RDI,R13 CALL 0x001ace24 MOV qword ptr [RAX],R12 INC R12 ADD RBX,0x20 CMP RBP,R12 JNZ 0x00178f4d LAB_00178f6a: LEA RDI,[RSP + 0x30] MOV RSI,R15 CALL 0x0015589a LEA RDI,[RSP + 0x48] LEA R13,[RSP + 0x58] MOV qword ptr [R13 + -0x10],R13 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] ADD RDX,RSI LAB_00178f8f: CALL 0x001224fc LEA R14,[RSP + 0x68] LAB_00178f99: LEA RSI,[RSP + 0xb8] MOV RDI,R14 CALL 0x001ad27e LEA R15,[RSP + 0x98] LAB_00178fb1: MOV RDI,R15 MOV RSI,qword ptr [RSP + 0x28] CALL 0x001acea0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 LAB_00178fca: MOV EDI,0x88 CALL 0x0011a870 LAB_00178fd4: MOV R12,RAX LEA RSI,[RSP + 0x30] MOV RDI,RAX CALL 0x0015589a LEA RDI,[R12 + 0x18] LEA RBP,[R12 + 0x28] MOV qword ptr [R12 + 0x18],RBP MOV RSI,qword ptr [RSP + 0x48] MOV RDX,qword ptr [RSP + 0x50] ADD RDX,RSI LAB_00179000: CALL 0x001224fc LEA RAX,[R12 + 0x40] MOV RDX,qword ptr [RSP + 0x78] TEST RDX,RDX JZ 0x00179051 LEA RDI,[RSP + 0x70] MOV ECX,dword ptr [RDI] MOV qword ptr [R12 + 0x48],RDX MOV R8,qword ptr [RDI + 0x10] MOV RSI,qword ptr [RDI + 0x18] MOV qword ptr [RDX + 0x8],RAX LEA RDX,[RSP + 0x90] MOV RAX,qword ptr [RDX] MOV qword ptr [R12 + 0x60],RAX MOV qword ptr [RDX + -0x18],0x0 MOV qword ptr [RDX + -0x10],RDI MOV qword ptr [RDX + -0x8],RDI MOV RAX,R8 JMP 0x00179064 LAB_00179051: MOV qword ptr [R12 + 0x48],0x0 LEA RDX,[R12 + 0x60] XOR ECX,ECX MOV RSI,RAX LAB_00179064: MOV qword ptr [R12 + 0x50],RAX MOV qword ptr [R12 + 0x58],RSI MOV qword ptr [RDX],0x0 MOV dword ptr [R12 + 0x40],ECX LEA RDI,[R12 + 0x68] LAB_0017907f: MOV RSI,R15 CALL 0x001acea0 MOV RSI,RSP MOV qword ptr [RSI],R12 LEA RAX,[0x17925c] MOV qword ptr [RSI + 0x18],RAX LEA RAX,[0x1798da] MOV qword ptr [RSI + 0x10],RAX LAB_001790a3: MOV RDI,qword ptr [RSP + 0x20] CALL 0x00196a3e MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001790c4 LAB_001790b7: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001790c4: MOV RAX,qword ptr [RSP + 0xa8] TEST RAX,RAX JZ 0x001790de LAB_001790d1: MOV RDI,R15 MOV RSI,R15 MOV EDX,0x3 CALL RAX LAB_001790de: MOV RDI,R14 CALL 0x001ad4e0 MOV RDI,qword ptr [RSP + 0x48] CMP RDI,R13 JZ 0x001790fd MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x0011a890 LAB_001790fd: LEA RDI,[RSP + 0x30] CALL 0x0012161a LEA RDI,[RSP + 0xb8] CALL 0x001ad4e0 ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* minja::simple_function(std::__cxx11::string const&, std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > > const&, std::function<minja::Value (std::shared_ptr<minja::Context> const&, minja::Value&)> const&) */ void __thiscall minja::simple_function(minja *this,string *param_1,vector *param_2,function *param_3) { long *plVar1; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *this_00; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar2; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar3; long lVar4; long lVar5; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *pvVar6; long lVar7; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_118; int8 uStack_110; code *local_108; code *pcStack_100; minja *local_f8; function *local_f0; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_e8 [24]; long *local_d0; long local_c8; long local_c0 [2]; _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_b0 [8]; int4 local_a8 [2]; long local_a0; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_98; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_90; int8 local_88; function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> local_80 [16]; code *local_70; map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> local_60 [8]; int4 local_58 [2]; int8 local_50; int4 *local_48; int4 *local_40; int8 local_38; local_48 = local_58; local_58[0] = 0; local_50 = 0; local_38 = 0; local_f8 = this; local_f0 = param_3; local_40 = local_48; if (*(long *)(param_2 + 8) - *(long *)param_2 != 0) { lVar5 = *(long *)(param_2 + 8) - *(long *)param_2 >> 5; lVar4 = 0; lVar7 = 0; do { /* try { // try from 00178f53 to 00178f5a has its CatchHandler @ 001791f6 */ plVar1 = (long *)std:: map<std::__cxx11::string,unsigned_long,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::operator[](local_60,(string *)(*(long *)param_2 + lVar4)); *plVar1 = lVar7; lVar7 = lVar7 + 1; lVar4 = lVar4 + 0x20; } while (lVar5 + (ulong)(lVar5 == 0) != lVar7); } /* try { // try from 00178f6a to 00178f76 has its CatchHandler @ 001791f4 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector(local_e8,param_2); local_d0 = local_c0; /* try { // try from 00178f8f to 00178f93 has its CatchHandler @ 001791e5 */ std::__cxx11::string::_M_construct<char*> (&local_d0,*(long *)param_1,*(long *)(param_1 + 8) + *(long *)param_1); /* try { // try from 00178f99 to 00178fa8 has its CatchHandler @ 001791c9 */ std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::_Rb_tree(local_b0,(_Rb_tree *)local_60); /* try { // try from 00178fb1 to 00178fbd has its CatchHandler @ 001791bc */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function (local_80,local_f0); local_108 = (code *)0x0; pcStack_100 = (code *)0x0; local_118 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)0x0; uStack_110 = 0; /* try { // try from 00178fca to 00178fd3 has its CatchHandler @ 001791ad */ this_00 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)operator_new(0x88); /* try { // try from 00178fd4 to 00178fe3 has its CatchHandler @ 0017917c */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector (this_00,(vector *)local_e8); *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x18) = this_00 + 0x28; /* try { // try from 00179000 to 00179004 has its CatchHandler @ 0017916f */ std::__cxx11::string::_M_construct<char*>(this_00 + 0x18,local_d0,local_c8 + (long)local_d0); pvVar2 = this_00 + 0x40; if (local_a0 == 0) { *(int8 *)(this_00 + 0x48) = 0; pvVar3 = this_00 + 0x60; local_a8[0] = 0; pvVar6 = pvVar2; } else { *(long *)(this_00 + 0x48) = local_a0; *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(local_a0 + 8) = pvVar2; pvVar3 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)&local_88; *(int8 *)(this_00 + 0x60) = local_88; local_a0 = 0; pvVar2 = local_98; pvVar6 = local_90; local_98 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a8; local_90 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_a8; } *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x50) = pvVar2; *(vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> **)(this_00 + 0x58) = pvVar6; *(int8 *)pvVar3 = 0; *(int4 *)(this_00 + 0x40) = local_a8[0]; /* try { // try from 0017907f to 00179086 has its CatchHandler @ 00179148 */ std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>::function ((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)> *) (this_00 + 0x68),local_80); pcStack_100 = std:: _Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0> ::_M_invoke; local_108 = std:: _Function_handler<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&),minja::simple_function(std::__cxx11::string_const&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>const&,std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::Value&)>const&)::$_0> ::_M_manager; local_118 = this_00; /* try { // try from 001790a3 to 001790ac has its CatchHandler @ 0017912a */ Value::callable((Value *)local_f8,(function *)&local_118); if (local_108 != (code *)0x0) { /* try { // try from 001790b7 to 001790c3 has its CatchHandler @ 00179128 */ (*local_108)(&local_118,&local_118,3); } if (local_70 != (code *)0x0) { /* try { // try from 001790d1 to 001790dd has its CatchHandler @ 00179126 */ (*local_70)(local_80,local_80,3); } std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::~_Rb_tree(local_b0); if (local_d0 != local_c0) { operator_delete(local_d0,local_c0[0] + 1); } std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_e8); std:: _Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> ::~_Rb_tree((_Rb_tree<std::__cxx11::string,std::pair<std::__cxx11::string_const,unsigned_long>,std::_Select1st<std::pair<std::__cxx11::string_const,unsigned_long>>,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,unsigned_long>>> *)local_60); return; }
46,884
my_wc_mb_filename
eloqsql/strings/ctype-utf8.c
static int my_wc_mb_filename(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; static const char hex[]= "0123456789abcdef"; if (s >= e) return MY_CS_TOOSMALL; if (wc < 128 && filename_safe_char[wc]) { *s= (uchar) wc; return 1; } if (s + 3 > e) return MY_CS_TOOSMALL3; *s++= MY_FILENAME_ESCAPE; if ((wc >= 0x00C0 && wc <= 0x05FF && (code= uni_0C00_05FF[wc - 0x00C0])) || (wc >= 0x1E00 && wc <= 0x1FFF && (code= uni_1E00_1FFF[wc - 0x1E00])) || (wc >= 0x2160 && wc <= 0x217F && (code= uni_2160_217F[wc - 0x2160])) || (wc >= 0x24B0 && wc <= 0x24EF && (code= uni_24B0_24EF[wc - 0x24B0])) || (wc >= 0xFF20 && wc <= 0xFF5F && (code= uni_FF20_FF5F[wc - 0xFF20]))) { *s++= (code / 80) + 0x30; *s++= (code % 80) + 0x30; return 3; } /* Non letter */ if (s + 4 > e) return MY_CS_TOOSMALL5; *s++= hex[(wc >> 12) & 15]; *s++= hex[(wc >> 8) & 15]; *s++= hex[(wc >> 4) & 15]; *s++= hex[(wc) & 15]; return 5; }
O0
c
my_wc_mb_filename: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq -0x20(%rbp), %rax cmpq -0x28(%rbp), %rax jb 0x7d59a movl $0xffffff9b, -0x4(%rbp) # imm = 0xFFFFFF9B jmp 0x7d805 cmpq $0x80, -0x18(%rbp) jae 0x7d5d0 movq -0x18(%rbp), %rcx leaq 0x14c831(%rip), %rax # 0x1c9de0 movsbl (%rax,%rcx), %eax cmpl $0x0, %eax je 0x7d5d0 movq -0x18(%rbp), %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x1, -0x4(%rbp) jmp 0x7d805 movq -0x20(%rbp), %rax addq $0x3, %rax cmpq -0x28(%rbp), %rax jbe 0x7d5ea movl $0xffffff99, -0x4(%rbp) # imm = 0xFFFFFF99 jmp 0x7d805 movq -0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rbp) movb $0x40, (%rax) cmpq $0xc0, -0x18(%rbp) jb 0x7d632 cmpq $0x5ff, -0x18(%rbp) # imm = 0x5FF ja 0x7d632 movq -0x18(%rbp), %rcx subq $0xc0, %rcx leaq 0x14f97e(%rip), %rax # 0x1ccfa0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x7d6fe cmpq $0x1e00, -0x18(%rbp) # imm = 0x1E00 jb 0x7d668 cmpq $0x1fff, -0x18(%rbp) # imm = 0x1FFF ja 0x7d668 movq -0x18(%rbp), %rcx subq $0x1e00, %rcx # imm = 0x1E00 leaq 0x322d08(%rip), %rax # 0x3a0360 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x7d6fe cmpq $0x2160, -0x18(%rbp) # imm = 0x2160 jb 0x7d69a cmpq $0x217f, -0x18(%rbp) # imm = 0x217F ja 0x7d69a movq -0x18(%rbp), %rcx subq $0x2160, %rcx # imm = 0x2160 leaq 0x14f7d2(%rip), %rax # 0x1cce60 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x7d6fe cmpq $0x24b0, -0x18(%rbp) # imm = 0x24B0 jb 0x7d6cc cmpq $0x24ef, -0x18(%rbp) # imm = 0x24EF ja 0x7d6cc movq -0x18(%rbp), %rcx subq $0x24b0, %rcx # imm = 0x24B0 leaq 0x14f7e0(%rip), %rax # 0x1ccea0 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax jne 0x7d6fe cmpq $0xff20, -0x18(%rbp) # imm = 0xFF20 jb 0x7d74c cmpq $0xff5f, -0x18(%rbp) # imm = 0xFF5F ja 0x7d74c movq -0x18(%rbp), %rcx subq $0xff20, %rcx # imm = 0xFF20 leaq 0x14f82e(%rip), %rax # 0x1ccf20 movzwl (%rax,%rcx,2), %eax movl %eax, -0x2c(%rbp) cmpl $0x0, %eax je 0x7d74c movl -0x2c(%rbp), %eax movl $0x50, %ecx cltd idivl %ecx addl $0x30, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movl -0x2c(%rbp), %eax movl $0x50, %ecx cltd idivl %ecx addl $0x30, %edx movb %dl, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movl $0x3, -0x4(%rbp) jmp 0x7d805 movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0x7d766 movl $0xffffff97, -0x4(%rbp) # imm = 0xFFFFFF97 jmp 0x7d805 movq -0x18(%rbp), %rcx shrq $0xc, %rcx andq $0xf, %rcx leaq 0x14f6c7(%rip), %rax # 0x1cce40 movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rcx shrq $0x8, %rcx andq $0xf, %rcx leaq 0x14f6a0(%rip), %rax # 0x1cce40 movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rcx shrq $0x4, %rcx andq $0xf, %rcx leaq 0x14f679(%rip), %rax # 0x1cce40 movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rcx andq $0xf, %rcx leaq 0x14f656(%rip), %rax # 0x1cce40 movb (%rax,%rcx), %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movl $0x5, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_wc_mb_filename: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov rax, [rbp+var_20] cmp rax, [rbp+var_28] jb short loc_7D59A mov [rbp+var_4], 0FFFFFF9Bh jmp loc_7D805 loc_7D59A: cmp [rbp+var_18], 80h jnb short loc_7D5D0 mov rcx, [rbp+var_18] lea rax, filename_safe_char movsx eax, byte ptr [rax+rcx] cmp eax, 0 jz short loc_7D5D0 mov rax, [rbp+var_18] mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 1 jmp loc_7D805 loc_7D5D0: mov rax, [rbp+var_20] add rax, 3 cmp rax, [rbp+var_28] jbe short loc_7D5EA mov [rbp+var_4], 0FFFFFF99h jmp loc_7D805 loc_7D5EA: mov rax, [rbp+var_20] mov rcx, rax add rcx, 1 mov [rbp+var_20], rcx mov byte ptr [rax], 40h ; '@' cmp [rbp+var_18], 0C0h jb short loc_7D632 cmp [rbp+var_18], 5FFh ja short loc_7D632 mov rcx, [rbp+var_18] sub rcx, 0C0h lea rax, uni_0C00_05FF movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz loc_7D6FE loc_7D632: cmp [rbp+var_18], 1E00h jb short loc_7D668 cmp [rbp+var_18], 1FFFh ja short loc_7D668 mov rcx, [rbp+var_18] sub rcx, 1E00h lea rax, uni_1E00_1FFF movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz loc_7D6FE loc_7D668: cmp [rbp+var_18], 2160h jb short loc_7D69A cmp [rbp+var_18], 217Fh ja short loc_7D69A mov rcx, [rbp+var_18] sub rcx, 2160h lea rax, uni_2160_217F movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_7D6FE loc_7D69A: cmp [rbp+var_18], 24B0h jb short loc_7D6CC cmp [rbp+var_18], 24EFh ja short loc_7D6CC mov rcx, [rbp+var_18] sub rcx, 24B0h lea rax, uni_24B0_24EF movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jnz short loc_7D6FE loc_7D6CC: cmp [rbp+var_18], 0FF20h jb short loc_7D74C cmp [rbp+var_18], 0FF5Fh ja short loc_7D74C mov rcx, [rbp+var_18] sub rcx, 0FF20h lea rax, uni_FF20_FF5F movzx eax, word ptr [rax+rcx*2] mov [rbp+var_2C], eax cmp eax, 0 jz short loc_7D74C loc_7D6FE: mov eax, [rbp+var_2C] mov ecx, 50h ; 'P' cdq idiv ecx add eax, 30h ; '0' mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov eax, [rbp+var_2C] mov ecx, 50h ; 'P' cdq idiv ecx add edx, 30h ; '0' mov cl, dl mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov [rbp+var_4], 3 jmp loc_7D805 loc_7D74C: mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_7D766 mov [rbp+var_4], 0FFFFFF97h jmp loc_7D805 loc_7D766: mov rcx, [rbp+var_18] shr rcx, 0Ch and rcx, 0Fh lea rax, my_wc_mb_filename_hex; "0123456789abcdef" mov cl, [rax+rcx] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rcx, [rbp+var_18] shr rcx, 8 and rcx, 0Fh lea rax, my_wc_mb_filename_hex; "0123456789abcdef" mov cl, [rax+rcx] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rcx, [rbp+var_18] shr rcx, 4 and rcx, 0Fh lea rax, my_wc_mb_filename_hex; "0123456789abcdef" mov cl, [rax+rcx] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rcx, [rbp+var_18] and rcx, 0Fh lea rax, my_wc_mb_filename_hex; "0123456789abcdef" mov cl, [rax+rcx] mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov [rbp+var_4], 5 loc_7D805: mov eax, [rbp+var_4] pop rbp retn
long long my_wc_mb_filename(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { int v5; // [rsp+0h] [rbp-2Ch] _BYTE *v6; // [rsp+Ch] [rbp-20h] if ( (unsigned long long)a3 < a4 ) { if ( a2 < 0x80 && filename_safe_char[a2] ) { *a3 = a2; return 1; } else if ( (unsigned long long)(a3 + 3) <= a4 ) { v6 = a3 + 1; *a3 = 64; if ( a2 >= 0xC0 && a2 <= 0x5FF && (v5 = uni_0C00_05FF[a2 - 192]) != 0 || a2 >= 0x1E00 && a2 <= 0x1FFF && (v5 = uni_1E00_1FFF[a2 - 7680]) != 0 || a2 >= 0x2160 && a2 <= 0x217F && (v5 = uni_2160_217F[a2 - 8544]) != 0 || a2 >= 0x24B0 && a2 <= 0x24EF && (v5 = uni_24B0_24EF[a2 - 9392]) != 0 || a2 >= 0xFF20 && a2 <= 0xFF5F && (v5 = uni_FF20_FF5F[a2 - 65312]) != 0 ) { *v6 = v5 / 80 + 48; a3[2] = v5 % 80 + 48; return 3; } else if ( (unsigned long long)(a3 + 5) <= a4 ) { *v6 = my_wc_mb_filename_hex[(unsigned __int16)a2 >> 12]; a3[2] = my_wc_mb_filename_hex[(a2 >> 8) & 0xF]; a3[3] = my_wc_mb_filename_hex[(unsigned __int8)a2 >> 4]; a3[4] = my_wc_mb_filename_hex[a2 & 0xF]; return 5; } else { return (unsigned int)-105; } } else { return (unsigned int)-103; } } else { return (unsigned int)-101; } }
my_wc_mb_filename: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x28] JC 0x0017d59a MOV dword ptr [RBP + -0x4],0xffffff9b JMP 0x0017d805 LAB_0017d59a: CMP qword ptr [RBP + -0x18],0x80 JNC 0x0017d5d0 MOV RCX,qword ptr [RBP + -0x18] LEA RAX,[0x2c9de0] MOVSX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x0 JZ 0x0017d5d0 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 0x0017d805 LAB_0017d5d0: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x3 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0017d5ea MOV dword ptr [RBP + -0x4],0xffffff99 JMP 0x0017d805 LAB_0017d5ea: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x20],RCX MOV byte ptr [RAX],0x40 CMP qword ptr [RBP + -0x18],0xc0 JC 0x0017d632 CMP qword ptr [RBP + -0x18],0x5ff JA 0x0017d632 MOV RCX,qword ptr [RBP + -0x18] SUB RCX,0xc0 LEA RAX,[0x2ccfa0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x0017d6fe LAB_0017d632: CMP qword ptr [RBP + -0x18],0x1e00 JC 0x0017d668 CMP qword ptr [RBP + -0x18],0x1fff JA 0x0017d668 MOV RCX,qword ptr [RBP + -0x18] SUB RCX,0x1e00 LEA RAX,[0x4a0360] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x0017d6fe LAB_0017d668: CMP qword ptr [RBP + -0x18],0x2160 JC 0x0017d69a CMP qword ptr [RBP + -0x18],0x217f JA 0x0017d69a MOV RCX,qword ptr [RBP + -0x18] SUB RCX,0x2160 LEA RAX,[0x2cce60] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x0017d6fe LAB_0017d69a: CMP qword ptr [RBP + -0x18],0x24b0 JC 0x0017d6cc CMP qword ptr [RBP + -0x18],0x24ef JA 0x0017d6cc MOV RCX,qword ptr [RBP + -0x18] SUB RCX,0x24b0 LEA RAX,[0x2ccea0] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JNZ 0x0017d6fe LAB_0017d6cc: CMP qword ptr [RBP + -0x18],0xff20 JC 0x0017d74c CMP qword ptr [RBP + -0x18],0xff5f JA 0x0017d74c MOV RCX,qword ptr [RBP + -0x18] SUB RCX,0xff20 LEA RAX,[0x2ccf20] MOVZX EAX,word ptr [RAX + RCX*0x2] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,0x0 JZ 0x0017d74c LAB_0017d6fe: MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,0x50 CDQ IDIV ECX ADD EAX,0x30 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV EAX,dword ptr [RBP + -0x2c] MOV ECX,0x50 CDQ IDIV ECX ADD EDX,0x30 MOV CL,DL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x3 JMP 0x0017d805 LAB_0017d74c: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x0017d766 MOV dword ptr [RBP + -0x4],0xffffff97 JMP 0x0017d805 LAB_0017d766: MOV RCX,qword ptr [RBP + -0x18] SHR RCX,0xc AND RCX,0xf LEA RAX,[0x2cce40] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x18] SHR RCX,0x8 AND RCX,0xf LEA RAX,[0x2cce40] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x18] SHR RCX,0x4 AND RCX,0xf LEA RAX,[0x2cce40] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x18] AND RCX,0xf LEA RAX,[0x2cce40] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x5 LAB_0017d805: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_wc_mb_filename(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { uint local_34; int4 local_c; if (param_3 < param_4) { if ((param_2 < 0x80) && (filename_safe_char[param_2] != '\0')) { *param_3 = (char)param_2; local_c = 1; } else if (param_4 < param_3 + 3) { local_c = 0xffffff99; } else { *param_3 = 0x40; if ((((((param_2 < 0xc0) || (0x5ff < param_2)) || (local_34 = (uint)*(ushort *)(uni_0C00_05FF + (param_2 - 0xc0) * 2), local_34 == 0)) && (((param_2 < 0x1e00 || (0x1fff < param_2)) || (local_34 = (uint)*(ushort *)(uni_1E00_1FFF + (param_2 - 0x1e00) * 2), local_34 == 0)))) && (((param_2 < 0x2160 || (0x217f < param_2)) || (local_34 = (uint)*(ushort *)(uni_2160_217F + (param_2 - 0x2160) * 2), local_34 == 0)) )) && ((((param_2 < 0x24b0 || (0x24ef < param_2)) || (local_34 = (uint)*(ushort *)(uni_24B0_24EF + (param_2 - 0x24b0) * 2), local_34 == 0)) && (((param_2 < 0xff20 || (0xff5f < param_2)) || (local_34 = (uint)*(ushort *)(uni_FF20_FF5F + (param_2 - 0xff20) * 2), local_34 == 0)))))) { if (param_4 < param_3 + 5) { local_c = 0xffffff97; } else { param_3[1] = "0123456789abcdef"[param_2 >> 0xc & 0xf]; param_3[2] = "0123456789abcdef"[param_2 >> 8 & 0xf]; param_3[3] = "0123456789abcdef"[param_2 >> 4 & 0xf]; param_3[4] = "0123456789abcdef"[param_2 & 0xf]; local_c = 5; } } else { param_3[1] = (char)(local_34 / 0x50) + '0'; param_3[2] = (char)(local_34 % 0x50) + '0'; local_c = 3; } } } else { local_c = 0xffffff9b; } return local_c; }
46,885
flux::parser::BinaryExpr::clone() const
kvthweatt[P]FluxLang/src/parser/ast.cpp
std::unique_ptr<Expr> BinaryExpr::clone() const { return std::make_unique<BinaryExpr>(left->clone(), op, right->clone(), range); }
O3
cpp
flux::parser::BinaryExpr::clone() const: pushq %r15 pushq %r14 pushq %rbx subq $0x20, %rsp movq %rsi, %r15 movq %rdi, %rbx movq 0x28(%rsi), %rsi movq (%rsi), %rax leaq 0x8(%rsp), %rdi callq *0x18(%rax) movq 0x90(%r15), %rsi movq (%rsi), %rax movq %rsp, %rdi callq *0x18(%rax) movl $0x98, %edi callq 0x6270 movq %rax, %r14 leaq 0x8(%r15), %r8 addq $0x30, %r15 movq 0x8(%rsp), %rax leaq 0x18(%rsp), %rsi movq %rax, (%rsi) xorl %eax, %eax movq %rax, 0x8(%rsp) movq (%rsp), %rdx leaq 0x10(%rsp), %rcx movq %rdx, (%rcx) movq %rax, (%rsp) movq %r14, %rdi movq %r15, %rdx callq 0x11e60 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xd218 movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x10(%rsp) movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0xd231 movq (%rdi), %rax callq *0x8(%rax) movq %r14, (%rbx) movq (%rsp), %rdi testq %rdi, %rdi je 0xd243 movq (%rdi), %rax callq *0x8(%rax) movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xd253 movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0xd273 movq (%rdi), %rax callq *0x8(%rax) leaq 0x10(%rsp), %rdi leaq 0x18(%rsp), %rsi movq %r14, %rdx callq 0x6570 jmp 0xd28a movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0xd29e movq (%rdi), %rax callq *0x8(%rax) jmp 0xd29e movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0xd2ae movq (%rdi), %rax callq *0x8(%rax) movq %rbx, %rdi callq 0x6440
_ZNK4flux6parser10BinaryExpr5cloneEv: push r15 push r14 push rbx sub rsp, 20h mov r15, rsi mov rbx, rdi mov rsi, [rsi+28h] mov rax, [rsi] lea rdi, [rsp+38h+var_30] call qword ptr [rax+18h] mov rsi, [r15+90h] mov rax, [rsi] mov rdi, rsp call qword ptr [rax+18h] mov edi, 98h; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax lea r8, [r15+8] add r15, 30h ; '0' mov rax, [rsp+38h+var_30] lea rsi, [rsp+38h+var_20] mov [rsi], rax xor eax, eax mov [rsp+38h+var_30], rax mov rdx, [rsp+38h+var_38] lea rcx, [rsp+38h+var_28] mov [rcx], rdx mov [rsp+38h+var_38], rax mov rdi, r14 mov rdx, r15 call _ZN4flux6parser10BinaryExprC2ESt10unique_ptrINS0_4ExprESt14default_deleteIS3_EERKNS_5lexer5TokenES6_RKNS_6common11SourceRangeE; flux::parser::BinaryExpr::BinaryExpr(std::unique_ptr<flux::parser::Expr>,flux::lexer::Token const&,std::unique_ptr<flux::parser::Expr>,flux::common::SourceRange const&) mov rdi, [rsp+38h+var_28] test rdi, rdi jz short loc_D218 mov rax, [rdi] call qword ptr [rax+8] loc_D218: mov [rsp+38h+var_28], 0 mov rdi, [rsp+38h+var_20] test rdi, rdi jz short loc_D231 mov rax, [rdi] call qword ptr [rax+8] loc_D231: mov [rbx], r14 mov rdi, [rsp+38h+var_38] test rdi, rdi jz short loc_D243 mov rax, [rdi] call qword ptr [rax+8] loc_D243: mov rdi, [rsp+38h+var_30] test rdi, rdi jz short loc_D253 mov rax, [rdi] call qword ptr [rax+8] loc_D253: mov rax, rbx add rsp, 20h pop rbx pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_D273 mov rax, [rdi] call qword ptr [rax+8] loc_D273: lea rdi, [rsp+arg_8] lea rsi, [rsp+arg_10] mov rdx, r14 call _ZNK4flux6parser10BinaryExpr5cloneEv_cold_1; flux::parser::BinaryExpr::clone(void) [clone] jmp short loc_D28A mov rbx, rax loc_D28A: mov rdi, [rsp+0] test rdi, rdi jz short loc_D29E mov rax, [rdi] call qword ptr [rax+8] jmp short loc_D29E mov rbx, rax loc_D29E: mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_D2AE mov rax, [rdi] call qword ptr [rax+8] loc_D2AE: mov rdi, rbx call __Unwind_Resume
flux::parser::BinaryExpr * flux::parser::BinaryExpr::clone(flux::parser::BinaryExpr *this, long long a2) { long long v2; // r14 long long v4; // [rsp+0h] [rbp-38h] BYREF long long v5; // [rsp+8h] [rbp-30h] BYREF long long v6; // [rsp+10h] [rbp-28h] BYREF _QWORD v7[4]; // [rsp+18h] [rbp-20h] BYREF (*(void ( **)(long long *))(**(_QWORD **)(a2 + 40) + 24LL))(&v5); (*(void ( **)(long long *))(**(_QWORD **)(a2 + 144) + 24LL))(&v4); v2 = operator new(0x98uLL); v7[0] = v5; v5 = 0LL; v6 = v4; v4 = 0LL; flux::parser::BinaryExpr::BinaryExpr(v2, v7, a2 + 48, &v6, a2 + 8); if ( v6 ) (*(void ( **)(long long))(*(_QWORD *)v6 + 8LL))(v6); v6 = 0LL; if ( v7[0] ) (*(void ( **)(_QWORD))(*(_QWORD *)v7[0] + 8LL))(v7[0]); *(_QWORD *)this = v2; if ( v4 ) (*(void ( **)(long long))(*(_QWORD *)v4 + 8LL))(v4); if ( v5 ) (*(void ( **)(long long))(*(_QWORD *)v5 + 8LL))(v5); return this; }
clone: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x20 MOV R15,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x28] MOV RAX,qword ptr [RSI] LEA RDI,[RSP + 0x8] CALL qword ptr [RAX + 0x18] MOV RSI,qword ptr [R15 + 0x90] MOV RAX,qword ptr [RSI] LAB_0010d1be: MOV RDI,RSP CALL qword ptr [RAX + 0x18] LAB_0010d1c4: MOV EDI,0x98 CALL 0x00106270 MOV R14,RAX LEA R8,[R15 + 0x8] ADD R15,0x30 MOV RAX,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x18] MOV qword ptr [RSI],RAX XOR EAX,EAX MOV qword ptr [RSP + 0x8],RAX MOV RDX,qword ptr [RSP] LEA RCX,[RSP + 0x10] MOV qword ptr [RCX],RDX MOV qword ptr [RSP],RAX LAB_0010d1fd: MOV RDI,R14 MOV RDX,R15 CALL 0x00111e60 LAB_0010d208: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0010d218 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010d218: MOV qword ptr [RSP + 0x10],0x0 MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x0010d231 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010d231: MOV qword ptr [RBX],R14 MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0010d243 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010d243: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0010d253 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010d253: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R14 POP R15 RET
/* flux::parser::BinaryExpr::clone() const */ void flux::parser::BinaryExpr::clone(void) { BinaryExpr *pBVar1; long in_RSI; int8 *in_RDI; long *local_38; long *local_30; long *local_28; long *local_20; (**(code **)(**(long **)(in_RSI + 0x28) + 0x18))(&local_30); /* try { // try from 0010d1be to 0010d1c3 has its CatchHandler @ 0010d29b */ (**(code **)(**(long **)(in_RSI + 0x90) + 0x18))(&local_38); /* try { // try from 0010d1c4 to 0010d1cd has its CatchHandler @ 0010d287 */ pBVar1 = (BinaryExpr *)operator_new(0x98); local_20 = local_30; local_30 = (long *)0x0; local_28 = local_38; local_38 = (long *)0x0; /* try { // try from 0010d1fd to 0010d207 has its CatchHandler @ 0010d260 */ BinaryExpr(pBVar1,&local_20,in_RSI + 0x30,&local_28,in_RSI + 8); if (local_28 != (long *)0x0) { (**(code **)(*local_28 + 8))(); } local_28 = (long *)0x0; if (local_20 != (long *)0x0) { (**(code **)(*local_20 + 8))(); } *in_RDI = pBVar1; if (local_38 != (long *)0x0) { (**(code **)(*local_38 + 8))(); } if (local_30 != (long *)0x0) { (**(code **)(*local_30 + 8))(); } return; }
46,886
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/common.cpp
void string_process_escapes(std::string & input) { std::size_t input_len = input.length(); std::size_t output_idx = 0; for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) { if (input[input_idx] == '\\' && input_idx + 1 < input_len) { switch (input[++input_idx]) { case 'n': input[output_idx++] = '\n'; break; case 'r': input[output_idx++] = '\r'; break; case 't': input[output_idx++] = '\t'; break; case '\'': input[output_idx++] = '\''; break; case '\"': input[output_idx++] = '\"'; break; case '\\': input[output_idx++] = '\\'; break; case 'x': // Handle \x12, etc if (input_idx + 2 < input_len) { const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 }; char *err_p = nullptr; const long val = std::strtol(x, &err_p, 16); if (err_p == x + 2) { input_idx += 2; input[output_idx++] = char(val); break; } } // fall through default: input[output_idx++] = '\\'; input[output_idx++] = input[input_idx]; break; } } else { input[output_idx++] = input[input_idx]; } } input.resize(output_idx); }
O1
cpp
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq 0x8(%rdi), %r13 testq %r13, %r13 je 0x4f874 leaq 0xf(%rsp), %rbp xorl %r14d, %r14d leaq 0xd(%rsp), %rdi leaq 0x10(%rsp), %rsi xorl %eax, %eax movq (%rbx), %rcx movb (%rcx,%rax), %dl cmpb $0x5c, %dl jne 0x4f79d leaq 0x1(%rax), %r15 cmpq %r13, %r15 jae 0x4f79d movzbl (%rcx,%r15), %edx cmpl $0x6d, %edx jle 0x4f7a9 cmpl $0x73, %edx jg 0x4f7c3 cmpl $0x6e, %edx je 0x4f814 cmpl $0x72, %edx jne 0x4f84b movb $0xd, (%rcx,%r14) jmp 0x4f827 movb %dl, (%rcx,%r14) incq %r14 jmp 0x4f866 cmpl $0x22, %edx je 0x4f80d cmpl $0x27, %edx je 0x4f822 cmpl $0x5c, %edx jne 0x4f84b movb $0x5c, (%rcx,%r14) jmp 0x4f827 cmpl $0x74, %edx je 0x4f81b cmpl $0x78, %edx jne 0x4f84b leaq 0x3(%rax), %r12 cmpq %r13, %r12 jae 0x4f84b movb 0x2(%rcx,%rax), %dl movb %dl, 0xd(%rsp) movb 0x3(%rcx,%rax), %al movb %al, 0xe(%rsp) movb $0x0, 0xf(%rsp) movq $0x0, 0x10(%rsp) movl $0x10, %edx callq 0x19b10 movq 0x10(%rsp), %rcx cmpq %rbp, %rcx je 0x4f82c movq %r15, %r12 jmp 0x4f839 movb $0x22, (%rcx,%r14) jmp 0x4f827 movb $0xa, (%rcx,%r14) jmp 0x4f827 movb $0x9, (%rcx,%r14) jmp 0x4f827 movb $0x27, (%rcx,%r14) incq %r14 jmp 0x4f863 movq (%rbx), %rdx movb %al, (%rdx,%r14) incq %r14 movq %r12, %r15 movq %r12, %rax cmpq %rbp, %rcx leaq 0xd(%rsp), %rdi leaq 0x10(%rsp), %rsi je 0x4f866 movq (%rbx), %rax movb $0x5c, (%rax,%r14) movq (%rbx), %rax movb (%rax,%r15), %cl movb %cl, 0x1(%rax,%r14) addq $0x2, %r14 movq %r15, %rax incq %rax cmpq %r13, %rax jb 0x4f75e jmp 0x4f877 xorl %r14d, %r14d movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x19200 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi mov r13, [rdi+8] test r13, r13 jz loc_4F874 lea rbp, [rsp+48h+var_39] xor r14d, r14d lea rdi, [rsp+48h+var_3B] lea rsi, [rsp+48h+var_38] xor eax, eax loc_4F75E: mov rcx, [rbx] mov dl, [rcx+rax] cmp dl, 5Ch ; '\' jnz short loc_4F79D lea r15, [rax+1] cmp r15, r13 jnb short loc_4F79D movzx edx, byte ptr [rcx+r15] cmp edx, 6Dh ; 'm' jle short loc_4F7A9 cmp edx, 73h ; 's' jg short loc_4F7C3 cmp edx, 6Eh ; 'n' jz loc_4F814 cmp edx, 72h ; 'r' jnz loc_4F84B mov byte ptr [rcx+r14], 0Dh jmp loc_4F827 loc_4F79D: mov [rcx+r14], dl inc r14 jmp loc_4F866 loc_4F7A9: cmp edx, 22h ; '"' jz short loc_4F80D cmp edx, 27h ; ''' jz short loc_4F822 cmp edx, 5Ch ; '\' jnz loc_4F84B mov byte ptr [rcx+r14], 5Ch ; '\' jmp short loc_4F827 loc_4F7C3: cmp edx, 74h ; 't' jz short loc_4F81B cmp edx, 78h ; 'x' jnz short loc_4F84B lea r12, [rax+3] cmp r12, r13 jnb short loc_4F84B mov dl, [rcx+rax+2] mov [rsp+48h+var_3B], dl mov al, [rcx+rax+3] mov [rsp+48h+var_3A], al mov [rsp+48h+var_39], 0 mov [rsp+48h+var_38], 0 mov edx, 10h call _strtol mov rcx, [rsp+48h+var_38] cmp rcx, rbp jz short loc_4F82C mov r12, r15 jmp short loc_4F839 loc_4F80D: mov byte ptr [rcx+r14], 22h ; '"' jmp short loc_4F827 loc_4F814: mov byte ptr [rcx+r14], 0Ah jmp short loc_4F827 loc_4F81B: mov byte ptr [rcx+r14], 9 jmp short loc_4F827 loc_4F822: mov byte ptr [rcx+r14], 27h ; ''' loc_4F827: inc r14 jmp short loc_4F863 loc_4F82C: mov rdx, [rbx] mov [rdx+r14], al inc r14 mov r15, r12 loc_4F839: mov rax, r12 cmp rcx, rbp lea rdi, [rsp+48h+var_3B] lea rsi, [rsp+48h+var_38] jz short loc_4F866 loc_4F84B: mov rax, [rbx] mov byte ptr [rax+r14], 5Ch ; '\' mov rax, [rbx] mov cl, [rax+r15] mov [rax+r14+1], cl add r14, 2 loc_4F863: mov rax, r15 loc_4F866: inc rax cmp rax, r13 jb loc_4F75E jmp short loc_4F877 loc_4F874: xor r14d, r14d loc_4F877: mov rdi, rbx mov rsi, r14 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long string_process_escapes(long long *a1) { unsigned long long v1; // r13 long long v2; // r14 long long v3; // rax long long v4; // rcx char v5; // dl long long v6; // r15 unsigned int v7; // edx long long v8; // r12 char v9; // al char *v10; // rcx _BYTE v12[2]; // [rsp+Dh] [rbp-3Bh] BYREF char v13; // [rsp+Fh] [rbp-39h] BYREF char *v14; // [rsp+10h] [rbp-38h] BYREF v1 = a1[1]; if ( v1 ) { v2 = 0LL; v3 = 0LL; while ( 1 ) { v4 = *a1; v5 = *(_BYTE *)(*a1 + v3); if ( v5 == 92 ) { v6 = v3 + 1; if ( v3 + 1 < v1 ) break; } *(_BYTE *)(v4 + v2++) = v5; LABEL_29: if ( ++v3 >= v1 ) return std::string::resize(a1, v2, 0LL); } v7 = *(unsigned __int8 *)(v4 + v6); if ( v7 <= 0x6D ) { switch ( v7 ) { case '"': *(_BYTE *)(v4 + v2) = 34; goto LABEL_24; case '\'': *(_BYTE *)(v4 + v2) = 39; goto LABEL_24; case '\\': *(_BYTE *)(v4 + v2) = 92; goto LABEL_24; } } else if ( *(unsigned __int8 *)(v4 + v6) > 0x73u ) { if ( v7 == 116 ) { *(_BYTE *)(v4 + v2) = 9; goto LABEL_24; } if ( v7 == 120 ) { v8 = v3 + 3; if ( v3 + 3 < v1 ) { v12[0] = *(_BYTE *)(v4 + v3 + 2); v12[1] = *(_BYTE *)(v4 + v3 + 3); v13 = 0; v14 = 0LL; v9 = strtol(v12, &v14, 16LL); v10 = v14; if ( v14 == &v13 ) { *(_BYTE *)(*a1 + v2++) = v9; v6 = v8; } else { v8 = v6; } v3 = v8; if ( v10 == &v13 ) goto LABEL_29; } } } else { if ( v7 == 110 ) { *(_BYTE *)(v4 + v2) = 10; goto LABEL_24; } if ( v7 == 114 ) { *(_BYTE *)(v4 + v2) = 13; LABEL_24: ++v2; LABEL_28: v3 = v6; goto LABEL_29; } } *(_BYTE *)(*a1 + v2) = 92; *(_BYTE *)(*a1 + v2 + 1) = *(_BYTE *)(*a1 + v6); v2 += 2LL; goto LABEL_28; } v2 = 0LL; return std::string::resize(a1, v2, 0LL); }
string_process_escapes: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV R13,qword ptr [RDI + 0x8] TEST R13,R13 JZ 0x0014f874 LEA RBP,[RSP + 0xf] XOR R14D,R14D LEA RDI,[RSP + 0xd] LEA RSI,[RSP + 0x10] XOR EAX,EAX LAB_0014f75e: MOV RCX,qword ptr [RBX] MOV DL,byte ptr [RCX + RAX*0x1] CMP DL,0x5c JNZ 0x0014f79d LEA R15,[RAX + 0x1] CMP R15,R13 JNC 0x0014f79d MOVZX EDX,byte ptr [RCX + R15*0x1] CMP EDX,0x6d JLE 0x0014f7a9 CMP EDX,0x73 JG 0x0014f7c3 CMP EDX,0x6e JZ 0x0014f814 CMP EDX,0x72 JNZ 0x0014f84b MOV byte ptr [RCX + R14*0x1],0xd JMP 0x0014f827 LAB_0014f79d: MOV byte ptr [RCX + R14*0x1],DL INC R14 JMP 0x0014f866 LAB_0014f7a9: CMP EDX,0x22 JZ 0x0014f80d CMP EDX,0x27 JZ 0x0014f822 CMP EDX,0x5c JNZ 0x0014f84b MOV byte ptr [RCX + R14*0x1],0x5c JMP 0x0014f827 LAB_0014f7c3: CMP EDX,0x74 JZ 0x0014f81b CMP EDX,0x78 JNZ 0x0014f84b LEA R12,[RAX + 0x3] CMP R12,R13 JNC 0x0014f84b MOV DL,byte ptr [RCX + RAX*0x1 + 0x2] MOV byte ptr [RSP + 0xd],DL MOV AL,byte ptr [RCX + RAX*0x1 + 0x3] MOV byte ptr [RSP + 0xe],AL MOV byte ptr [RSP + 0xf],0x0 MOV qword ptr [RSP + 0x10],0x0 MOV EDX,0x10 CALL 0x00119b10 MOV RCX,qword ptr [RSP + 0x10] CMP RCX,RBP JZ 0x0014f82c MOV R12,R15 JMP 0x0014f839 LAB_0014f80d: MOV byte ptr [RCX + R14*0x1],0x22 JMP 0x0014f827 LAB_0014f814: MOV byte ptr [RCX + R14*0x1],0xa JMP 0x0014f827 LAB_0014f81b: MOV byte ptr [RCX + R14*0x1],0x9 JMP 0x0014f827 LAB_0014f822: MOV byte ptr [RCX + R14*0x1],0x27 LAB_0014f827: INC R14 JMP 0x0014f863 LAB_0014f82c: MOV RDX,qword ptr [RBX] MOV byte ptr [RDX + R14*0x1],AL INC R14 MOV R15,R12 LAB_0014f839: MOV RAX,R12 CMP RCX,RBP LEA RDI,[RSP + 0xd] LEA RSI,[RSP + 0x10] JZ 0x0014f866 LAB_0014f84b: MOV RAX,qword ptr [RBX] MOV byte ptr [RAX + R14*0x1],0x5c MOV RAX,qword ptr [RBX] MOV CL,byte ptr [RAX + R15*0x1] MOV byte ptr [RAX + R14*0x1 + 0x1],CL ADD R14,0x2 LAB_0014f863: MOV RAX,R15 LAB_0014f866: INC RAX CMP RAX,R13 JC 0x0014f75e JMP 0x0014f877 LAB_0014f874: XOR R14D,R14D LAB_0014f877: MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x00119200 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_process_escapes(std::__cxx11::string&) */ void string_process_escapes(string *param_1) { byte bVar1; ulong uVar2; long lVar3; ulong uVar4; long lVar6; char local_3b; int1 local_3a; char local_39; char *local_38; ulong uVar5; uVar2 = *(ulong *)(param_1 + 8); if (uVar2 == 0) { lVar6 = 0; } else { lVar6 = 0; uVar4 = 0; do { lVar3 = *(long *)param_1; if ((*(char *)(lVar3 + uVar4) == '\\') && (uVar5 = uVar4 + 1, uVar5 < uVar2)) { bVar1 = *(byte *)(lVar3 + uVar5); if (bVar1 < 0x6e) { if (bVar1 == 0x22) { *(int1 *)(lVar3 + lVar6) = 0x22; } else if (bVar1 == 0x27) { *(int1 *)(lVar3 + lVar6) = 0x27; } else { if (bVar1 != 0x5c) goto LAB_0014f84b; *(int1 *)(lVar3 + lVar6) = 0x5c; } } else if (bVar1 < 0x74) { if (bVar1 == 0x6e) { *(int1 *)(lVar3 + lVar6) = 10; } else { if (bVar1 != 0x72) goto LAB_0014f84b; *(int1 *)(lVar3 + lVar6) = 0xd; } } else { if (bVar1 != 0x74) { if ((bVar1 == 0x78) && (uVar4 + 3 < uVar2)) { local_3b = *(char *)(lVar3 + 2 + uVar4); local_3a = *(int1 *)(lVar3 + 3 + uVar4); local_39 = '\0'; local_38 = (char *)0x0; lVar3 = strtol(&local_3b,&local_38,0x10); if (local_38 == &local_39) { *(char *)(*(long *)param_1 + lVar6) = (char)lVar3; lVar6 = lVar6 + 1; uVar5 = uVar4 + 3; goto LAB_0014f866; } } LAB_0014f84b: *(int1 *)(*(long *)param_1 + lVar6) = 0x5c; *(int1 *)(*(long *)param_1 + 1 + lVar6) = *(int1 *)(*(long *)param_1 + uVar5); lVar6 = lVar6 + 2; goto LAB_0014f866; } *(int1 *)(lVar3 + lVar6) = 9; } lVar6 = lVar6 + 1; } else { *(char *)(lVar3 + lVar6) = *(char *)(lVar3 + uVar4); lVar6 = lVar6 + 1; uVar5 = uVar4; } LAB_0014f866: uVar4 = uVar5 + 1; } while (uVar4 < uVar2); } std::__cxx11::string::resize((ulong)param_1,(char)lVar6); return; }
46,887
ntt_fft_partial
bluesky950520[P]quickjs/libbf.c
static int ntt_fft_partial(BFNTTState *s, NTTLimb *buf1, int k1, int k2, limb_t n1, limb_t n2, int inverse, limb_t m_idx) { limb_t i, j, c_mul, c0, m, m_inv, strip_len, l; NTTLimb *buf2, *buf3; buf2 = NULL; buf3 = ntt_malloc(s, sizeof(NTTLimb) * n1); if (!buf3) goto fail; if (k2 == 0) { if (ntt_fft(s, buf1, buf1, buf3, k1, inverse, m_idx)) goto fail; } else { strip_len = STRIP_LEN; buf2 = ntt_malloc(s, sizeof(NTTLimb) * n1 * strip_len); if (!buf2) goto fail; m = ntt_mods[m_idx]; m_inv = s->ntt_mods_div[m_idx]; c0 = s->ntt_proot_pow[m_idx][inverse][k1 + k2]; c_mul = 1; assert((n2 % strip_len) == 0); for(j = 0; j < n2; j += strip_len) { for(i = 0; i < n1; i++) { for(l = 0; l < strip_len; l++) { buf2[i + l * n1] = buf1[i * n2 + (j + l)]; } } for(l = 0; l < strip_len; l++) { if (inverse) mul_trig(buf2 + l * n1, n1, c_mul, m, m_inv); if (ntt_fft(s, buf2 + l * n1, buf2 + l * n1, buf3, k1, inverse, m_idx)) goto fail; if (!inverse) mul_trig(buf2 + l * n1, n1, c_mul, m, m_inv); c_mul = mul_mod_fast(c_mul, c0, m, m_inv); } for(i = 0; i < n1; i++) { for(l = 0; l < strip_len; l++) { buf1[i * n2 + (j + l)] = buf2[i + l *n1]; } } } ntt_free(s, buf2); } ntt_free(s, buf3); return 0; fail: ntt_free(s, buf2); ntt_free(s, buf3); return -1; }
O2
c
ntt_fft_partial: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r9, 0x48(%rsp) movq %r8, %r13 movl %ecx, %ebx movl %edx, 0x14(%rsp) movq %rsi, 0x18(%rsp) movq %rdi, %r15 leaq (,%r8,8), %r12 movq (%rdi), %rax movq (%rax), %rdi xorl %r14d, %r14d xorl %esi, %esi movq %r12, %rdx callq *0x8(%rax) movq %rax, %rbp testq %rax, %rax je 0x7f058 movq 0xa8(%rsp), %rax movl 0xa0(%rsp), %r9d testl %ebx, %ebx je 0x7f025 movq %r13, %rdx shlq $0x7, %rdx movq (%r15), %rax movq (%rax), %rdi xorl %r14d, %r14d xorl %esi, %esi callq *0x8(%rax) movq %rax, 0x20(%rsp) testq %rax, %rax je 0x7f058 movq %rbp, 0x28(%rsp) leaq 0xe388(%rip), %rax # 0x8d1f0 movq 0xa8(%rsp), %rbp movq (%rax,%rbp,8), %rax movq %rax, 0x40(%rsp) movq 0x8(%r15,%rbp,8), %rax movq %rax, 0x38(%rsp) imulq $0x340, %rbp, %rax # imm = 0x340 movq %r15, 0x30(%rsp) addq %r15, %rax movl 0xa0(%rsp), %r9d movl %r9d, %ecx addl 0x14(%rsp), %ebx movslq %ebx, %rdx imulq $0x1a0, %rcx, %rcx # imm = 0x1A0 addq %rax, %rcx movq 0x30(%rcx,%rdx,8), %rax movq %rax, 0x60(%rsp) movq 0x48(%rsp), %rax leaq (,%rax,8), %r11 pushq $0x1 popq %rbx xorl %ecx, %ecx pushq $0x10 popq %r14 movq 0x18(%rsp), %r10 movq 0x20(%rsp), %r15 movq %r11, 0x50(%rsp) cmpq %rax, %rcx jae 0x7f082 movq %rcx, 0x58(%rsp) movq %r15, %rax movq %r10, %rcx xorl %edx, %edx cmpq %r13, %rdx je 0x7ef1e movq %rax, %rsi xorl %edi, %edi cmpq $0x10, %rdi je 0x7ef12 movq (%rcx,%rdi,8), %r8 movq %r8, (%rsi) incq %rdi addq %r12, %rsi jmp 0x7eefd incq %rdx addq %r11, %rcx addq $0x8, %rax jmp 0x7eef3 movq %r10, 0x18(%rsp) subq $0x1, %r14 jb 0x7efc8 testl %r9d, %r9d je 0x7ef52 movq %r15, %rdi movq %r13, %rsi movq %rbx, %rdx movq 0x40(%rsp), %rcx movq 0x38(%rsp), %r8 callq 0x7f2aa movl 0xa0(%rsp), %r9d movl %ebp, (%rsp) movq 0x30(%rsp), %rdi movq %r15, %rsi movq %r15, %rdx movq 0x28(%rsp), %rcx movl 0x14(%rsp), %r8d movl %r9d, %ebp callq 0x7f0ac testl %eax, %eax jne 0x7f049 testl %ebp, %ebp jne 0x7ef96 movq %r15, %rdi movq %r13, %rsi movq %rbx, %rdx movq 0x40(%rsp), %rcx movq 0x38(%rsp), %r8 callq 0x7f2aa movq %rbx, %rdi movq 0x60(%rsp), %rsi movq 0x40(%rsp), %rdx movq 0x38(%rsp), %rcx callq 0x7ed88 movq %rax, %rbx addq %r12, %r15 movl 0xa0(%rsp), %r9d movq 0xa8(%rsp), %rbp jmp 0x7ef23 movq 0x20(%rsp), %r15 movq %r15, %rax movq 0x18(%rsp), %r10 movq %r10, %rcx xorl %edx, %edx movq 0x50(%rsp), %r11 pushq $0x10 popq %r14 cmpq %r13, %rdx je 0x7f00e movq %rax, %rsi xorl %edi, %edi cmpq $0x10, %rdi je 0x7f002 movq (%rsi), %r8 movq %r8, (%rcx,%rdi,8) incq %rdi addq %r12, %rsi jmp 0x7efed incq %rdx addq %r11, %rcx addq $0x8, %rax jmp 0x7efe3 movq 0x58(%rsp), %rcx addq $0x10, %rcx subq $-0x80, %r10 movq 0x48(%rsp), %rax jmp 0x7eedd movl %eax, (%rsp) movq %r15, %rdi movq 0x18(%rsp), %rdx movq %rdx, %rsi movq %rbp, %rcx movl 0x14(%rsp), %r8d callq 0x7f0ac testl %eax, %eax je 0x7f09a xorl %r14d, %r14d jmp 0x7f058 movq 0x20(%rsp), %r14 movq 0x30(%rsp), %r15 movq 0x28(%rsp), %rbp movq %r15, %rdi movq %r14, %rsi callq 0x7e4b2 movq %r15, %rdi movq %rbp, %rsi callq 0x7e4b2 pushq $-0x1 popq %rbx movl %ebx, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r15, %rsi movq 0x30(%rsp), %r15 movq (%r15), %rax movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x28(%rsp), %rbp movq (%r15), %rax movq (%rax), %rdi xorl %ebx, %ebx movq %rbp, %rsi xorl %edx, %edx callq *0x8(%rax) jmp 0x7f071
ntt_fft_partial: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rsp+98h+var_50], r9 mov r13, r8 mov ebx, ecx mov [rsp+98h+var_84], edx mov [rsp+98h+var_80], rsi mov r15, rdi lea r12, ds:0[r8*8] mov rax, [rdi] mov rdi, [rax] xor r14d, r14d xor esi, esi mov rdx, r12 call qword ptr [rax+8] mov rbp, rax test rax, rax jz loc_7F058 mov rax, [rsp+98h+arg_8] mov r9d, [rsp+98h+arg_0] test ebx, ebx jz loc_7F025 mov rdx, r13 shl rdx, 7 mov rax, [r15] mov rdi, [rax] xor r14d, r14d xor esi, esi call qword ptr [rax+8] mov [rsp+98h+var_78], rax test rax, rax jz loc_7F058 mov [rsp+98h+var_70], rbp lea rax, ntt_mods mov rbp, [rsp+98h+arg_8] mov rax, [rax+rbp*8] mov [rsp+98h+var_58], rax mov rax, [r15+rbp*8+8] mov [rsp+98h+var_60], rax imul rax, rbp, 340h mov [rsp+98h+var_68], r15 add rax, r15 mov r9d, [rsp+98h+arg_0] mov ecx, r9d add ebx, [rsp+98h+var_84] movsxd rdx, ebx imul rcx, 1A0h add rcx, rax mov rax, [rcx+rdx*8+30h] mov [rsp+98h+var_38], rax mov rax, [rsp+98h+var_50] lea r11, ds:0[rax*8] push 1 pop rbx xor ecx, ecx push 10h pop r14 mov r10, [rsp+98h+var_80] mov r15, [rsp+98h+var_78] mov [rsp+98h+var_48], r11 loc_7EEDD: cmp rcx, rax jnb loc_7F082 mov [rsp+98h+var_40], rcx mov rax, r15 mov rcx, r10 xor edx, edx loc_7EEF3: cmp rdx, r13 jz short loc_7EF1E mov rsi, rax xor edi, edi loc_7EEFD: cmp rdi, 10h jz short loc_7EF12 mov r8, [rcx+rdi*8] mov [rsi], r8 inc rdi add rsi, r12 jmp short loc_7EEFD loc_7EF12: inc rdx add rcx, r11 add rax, 8 jmp short loc_7EEF3 loc_7EF1E: mov [rsp+98h+var_80], r10 loc_7EF23: sub r14, 1 jb loc_7EFC8 test r9d, r9d jz short loc_7EF52 mov rdi, r15 mov rsi, r13 mov rdx, rbx mov rcx, [rsp+98h+var_58] mov r8, [rsp+98h+var_60] call mul_trig mov r9d, [rsp+98h+arg_0] loc_7EF52: mov [rsp+98h+var_98], ebp mov rdi, [rsp+98h+var_68] mov rsi, r15 mov rdx, r15 mov rcx, [rsp+98h+var_70] mov r8d, [rsp+98h+var_84] mov ebp, r9d call ntt_fft test eax, eax jnz loc_7F049 test ebp, ebp jnz short loc_7EF96 mov rdi, r15 mov rsi, r13 mov rdx, rbx mov rcx, [rsp+98h+var_58] mov r8, [rsp+98h+var_60] call mul_trig loc_7EF96: mov rdi, rbx mov rsi, [rsp+98h+var_38] mov rdx, [rsp+98h+var_58] mov rcx, [rsp+98h+var_60] call mul_mod_fast mov rbx, rax add r15, r12 mov r9d, [rsp+98h+arg_0] mov rbp, [rsp+98h+arg_8] jmp loc_7EF23 loc_7EFC8: mov r15, [rsp+98h+var_78] mov rax, r15 mov r10, [rsp+98h+var_80] mov rcx, r10 xor edx, edx mov r11, [rsp+98h+var_48] push 10h pop r14 loc_7EFE3: cmp rdx, r13 jz short loc_7F00E mov rsi, rax xor edi, edi loc_7EFED: cmp rdi, 10h jz short loc_7F002 mov r8, [rsi] mov [rcx+rdi*8], r8 inc rdi add rsi, r12 jmp short loc_7EFED loc_7F002: inc rdx add rcx, r11 add rax, 8 jmp short loc_7EFE3 loc_7F00E: mov rcx, [rsp+98h+var_40] add rcx, 10h sub r10, 0FFFFFFFFFFFFFF80h mov rax, [rsp+98h+var_50] jmp loc_7EEDD loc_7F025: mov [rsp+98h+var_98], eax mov rdi, r15 mov rdx, [rsp+98h+var_80] mov rsi, rdx mov rcx, rbp mov r8d, [rsp+98h+var_84] call ntt_fft test eax, eax jz short loc_7F09A xor r14d, r14d jmp short loc_7F058 loc_7F049: mov r14, [rsp+98h+var_78] mov r15, [rsp+98h+var_68] mov rbp, [rsp+98h+var_70] loc_7F058: mov rdi, r15 mov rsi, r14 call ntt_free mov rdi, r15 mov rsi, rbp call ntt_free push 0FFFFFFFFFFFFFFFFh pop rbx loc_7F071: mov eax, ebx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_7F082: mov rsi, r15 mov r15, [rsp+98h+var_68] mov rax, [r15] mov rdi, [rax] xor edx, edx call qword ptr [rax+8] mov rbp, [rsp+98h+var_70] loc_7F09A: mov rax, [r15] mov rdi, [rax] xor ebx, ebx mov rsi, rbp xor edx, edx call qword ptr [rax+8] jmp short loc_7F071
long long ntt_fft_partial( _QWORD **a1, long long a2, int a3, int a4, long long a5, unsigned long long a6, unsigned int a7, long long a8) { _QWORD **v10; // r15 long long v11; // r12 long long v12; // r14 long long v13; // rcx long long v14; // rbp long long v15; // r8 int v16; // ebp unsigned int v17; // r9d unsigned long long v18; // rax long long v19; // r11 unsigned long long v20; // rbx unsigned long long v21; // rcx long long v22; // r14 long long v23; // r10 long long v24; // r15 _QWORD *v25; // rax long long v26; // rcx long long i; // rdx _QWORD *v28; // rsi long long j; // rdi unsigned int v31; // ebp _QWORD *v32; // rax long long v33; // rcx long long v34; // rdx _QWORD *v35; // rsi long long k; // rdi unsigned int v37; // ebx long long v39; // rsi int v40; // [rsp+0h] [rbp-98h] long long v42; // [rsp+18h] [rbp-80h] long long v43; // [rsp+20h] [rbp-78h] long long v44; // [rsp+28h] [rbp-70h] long long v46; // [rsp+38h] [rbp-60h] long long v47; // [rsp+40h] [rbp-58h] unsigned long long v49; // [rsp+58h] [rbp-40h] unsigned long long v50; // [rsp+60h] [rbp-38h] v10 = a1; v11 = 8 * a5; v12 = 0LL; v14 = ((long long ( *)(_QWORD, _QWORD, long long))(*a1)[1])(**a1, 0LL, 8 * a5); if ( v14 ) { if ( a4 ) { v12 = 0LL; v43 = ((long long ( *)(_QWORD, _QWORD, long long, long long, long long, _QWORD))(*a1)[1])( **a1, 0LL, a5 << 7, v13, v15, a7); if ( v43 ) { v44 = v14; v16 = a8; v47 = ntt_mods[a8]; v46 = (long long)a1[a8 + 1]; v17 = a7; v50 = (unsigned long long)(&(&(&a1[104 * a8])[52 * a7])[a3])[a4 + 6]; v18 = a6; v19 = 8 * a6; v20 = 1LL; v21 = 0LL; v22 = 16LL; v23 = a2; v24 = v43; while ( v21 < v18 ) { v49 = v21; v25 = (_QWORD *)v24; v26 = v23; for ( i = 0LL; i != a5; ++i ) { v28 = v25; for ( j = 0LL; j != 16; ++j ) { *v28 = *(_QWORD *)(v26 + 8 * j); v28 = (_QWORD *)((char *)v28 + v11); } v26 += v19; ++v25; } v42 = v23; while ( v22-- != 0 ) { if ( v17 ) { mul_trig(v24, a5, v20, v47, v46); v17 = a7; } v40 = v16; v31 = v17; if ( (unsigned int)ntt_fft((_DWORD)a1, v24, v24, v44, a3, v17, v40) ) { v12 = v43; v10 = a1; v14 = v44; goto LABEL_30; } if ( !v31 ) mul_trig(v24, a5, v20, v47, v46); v20 = mul_mod_fast(v20, v50, v47, v46); v24 += v11; v17 = a7; v16 = a8; } v24 = v43; v32 = (_QWORD *)v43; v33 = v42; v34 = 0LL; v19 = 8 * a6; v22 = 16LL; while ( v34 != a5 ) { v35 = v32; for ( k = 0LL; k != 16; ++k ) { *(_QWORD *)(v33 + 8 * k) = *v35; v35 = (_QWORD *)((char *)v35 + v11); } ++v34; v33 += 8 * a6; ++v32; } v21 = v49 + 16; v23 = v42 + 128; v18 = a6; } v39 = v24; v10 = a1; ((void ( *)(_QWORD, long long, _QWORD))(*a1)[1])(**a1, v39, 0LL); v14 = v44; goto LABEL_33; } } else { if ( !(unsigned int)ntt_fft((_DWORD)a1, a2, a2, v14, a3, a7, a8) ) { LABEL_33: v37 = 0; ((void ( *)(_QWORD, long long, _QWORD))(*v10)[1])(**v10, v14, 0LL); return v37; } v12 = 0LL; } } LABEL_30: ntt_free(v10, v12); ntt_free(v10, v14); return (unsigned int)-1; }
ntt_fft_partial: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV qword ptr [RSP + 0x48],R9 MOV R13,R8 MOV EBX,ECX MOV dword ptr [RSP + 0x14],EDX MOV qword ptr [RSP + 0x18],RSI MOV R15,RDI LEA R12,[R8*0x8] MOV RAX,qword ptr [RDI] MOV RDI,qword ptr [RAX] XOR R14D,R14D XOR ESI,ESI MOV RDX,R12 CALL qword ptr [RAX + 0x8] MOV RBP,RAX TEST RAX,RAX JZ 0x0017f058 MOV RAX,qword ptr [RSP + 0xa8] MOV R9D,dword ptr [RSP + 0xa0] TEST EBX,EBX JZ 0x0017f025 MOV RDX,R13 SHL RDX,0x7 MOV RAX,qword ptr [R15] MOV RDI,qword ptr [RAX] XOR R14D,R14D XOR ESI,ESI CALL qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x20],RAX TEST RAX,RAX JZ 0x0017f058 MOV qword ptr [RSP + 0x28],RBP LEA RAX,[0x18d1f0] MOV RBP,qword ptr [RSP + 0xa8] MOV RAX,qword ptr [RAX + RBP*0x8] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [R15 + RBP*0x8 + 0x8] MOV qword ptr [RSP + 0x38],RAX IMUL RAX,RBP,0x340 MOV qword ptr [RSP + 0x30],R15 ADD RAX,R15 MOV R9D,dword ptr [RSP + 0xa0] MOV ECX,R9D ADD EBX,dword ptr [RSP + 0x14] MOVSXD RDX,EBX IMUL RCX,RCX,0x1a0 ADD RCX,RAX MOV RAX,qword ptr [RCX + RDX*0x8 + 0x30] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x48] LEA R11,[RAX*0x8] PUSH 0x1 POP RBX XOR ECX,ECX PUSH 0x10 POP R14 MOV R10,qword ptr [RSP + 0x18] MOV R15,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x50],R11 LAB_0017eedd: CMP RCX,RAX JNC 0x0017f082 MOV qword ptr [RSP + 0x58],RCX MOV RAX,R15 MOV RCX,R10 XOR EDX,EDX LAB_0017eef3: CMP RDX,R13 JZ 0x0017ef1e MOV RSI,RAX XOR EDI,EDI LAB_0017eefd: CMP RDI,0x10 JZ 0x0017ef12 MOV R8,qword ptr [RCX + RDI*0x8] MOV qword ptr [RSI],R8 INC RDI ADD RSI,R12 JMP 0x0017eefd LAB_0017ef12: INC RDX ADD RCX,R11 ADD RAX,0x8 JMP 0x0017eef3 LAB_0017ef1e: MOV qword ptr [RSP + 0x18],R10 LAB_0017ef23: SUB R14,0x1 JC 0x0017efc8 TEST R9D,R9D JZ 0x0017ef52 MOV RDI,R15 MOV RSI,R13 MOV RDX,RBX MOV RCX,qword ptr [RSP + 0x40] MOV R8,qword ptr [RSP + 0x38] CALL 0x0017f2aa MOV R9D,dword ptr [RSP + 0xa0] LAB_0017ef52: MOV dword ptr [RSP],EBP MOV RDI,qword ptr [RSP + 0x30] MOV RSI,R15 MOV RDX,R15 MOV RCX,qword ptr [RSP + 0x28] MOV R8D,dword ptr [RSP + 0x14] MOV EBP,R9D CALL 0x0017f0ac TEST EAX,EAX JNZ 0x0017f049 TEST EBP,EBP JNZ 0x0017ef96 MOV RDI,R15 MOV RSI,R13 MOV RDX,RBX MOV RCX,qword ptr [RSP + 0x40] MOV R8,qword ptr [RSP + 0x38] CALL 0x0017f2aa LAB_0017ef96: MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x40] MOV RCX,qword ptr [RSP + 0x38] CALL 0x0017ed88 MOV RBX,RAX ADD R15,R12 MOV R9D,dword ptr [RSP + 0xa0] MOV RBP,qword ptr [RSP + 0xa8] JMP 0x0017ef23 LAB_0017efc8: MOV R15,qword ptr [RSP + 0x20] MOV RAX,R15 MOV R10,qword ptr [RSP + 0x18] MOV RCX,R10 XOR EDX,EDX MOV R11,qword ptr [RSP + 0x50] PUSH 0x10 POP R14 LAB_0017efe3: CMP RDX,R13 JZ 0x0017f00e MOV RSI,RAX XOR EDI,EDI LAB_0017efed: CMP RDI,0x10 JZ 0x0017f002 MOV R8,qword ptr [RSI] MOV qword ptr [RCX + RDI*0x8],R8 INC RDI ADD RSI,R12 JMP 0x0017efed LAB_0017f002: INC RDX ADD RCX,R11 ADD RAX,0x8 JMP 0x0017efe3 LAB_0017f00e: MOV RCX,qword ptr [RSP + 0x58] ADD RCX,0x10 SUB R10,-0x80 MOV RAX,qword ptr [RSP + 0x48] JMP 0x0017eedd LAB_0017f025: MOV dword ptr [RSP],EAX MOV RDI,R15 MOV RDX,qword ptr [RSP + 0x18] MOV RSI,RDX MOV RCX,RBP MOV R8D,dword ptr [RSP + 0x14] CALL 0x0017f0ac TEST EAX,EAX JZ 0x0017f09a XOR R14D,R14D JMP 0x0017f058 LAB_0017f049: MOV R14,qword ptr [RSP + 0x20] MOV R15,qword ptr [RSP + 0x30] MOV RBP,qword ptr [RSP + 0x28] LAB_0017f058: MOV RDI,R15 MOV RSI,R14 CALL 0x0017e4b2 MOV RDI,R15 MOV RSI,RBP CALL 0x0017e4b2 PUSH -0x1 POP RBX LAB_0017f071: MOV EAX,EBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0017f082: MOV RSI,R15 MOV R15,qword ptr [RSP + 0x30] MOV RAX,qword ptr [R15] MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] MOV RBP,qword ptr [RSP + 0x28] LAB_0017f09a: MOV RAX,qword ptr [R15] MOV RDI,qword ptr [RAX] XOR EBX,EBX MOV RSI,RBP XOR EDX,EDX CALL qword ptr [RAX + 0x8] JMP 0x0017f071
int4 ntt_fft_partial(long *param_1,long param_2,int param_3,int param_4,long param_5,ulong param_6, uint param_7,long param_8) { int8 uVar1; long lVar2; long lVar3; int iVar4; long lVar5; int8 *puVar6; int8 uVar7; int8 *puVar8; long lVar9; ulong uVar10; long lVar11; int8 *puVar12; long lVar13; long lVar14; bool bVar15; lVar5 = (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,0,param_5 * 8); puVar8 = (int8 *)0x0; if (lVar5 != 0) { if (param_4 == 0) { iVar4 = ntt_fft(param_1,param_2,param_2,lVar5,param_3,param_7,(int)param_8); if (iVar4 == 0) goto LAB_0017f09a; puVar8 = (int8 *)0x0; } else { puVar6 = (int8 *) (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,0,param_5 << 7); puVar8 = (int8 *)0x0; if (puVar6 != (int8 *)0x0) { uVar1 = (&ntt_mods)[param_8]; lVar2 = param_1[param_8 + 1]; lVar3 = param_1[param_8 * 0x68 + (ulong)param_7 * 0x34 + (long)(param_4 + param_3) + 6]; uVar7 = 1; for (uVar10 = 0; lVar14 = 0x10, uVar10 < param_6; uVar10 = uVar10 + 0x10) { puVar8 = puVar6; lVar9 = param_2; for (lVar11 = 0; puVar12 = puVar6, lVar11 != param_5; lVar11 = lVar11 + 1) { puVar12 = puVar8; for (lVar13 = 0; lVar13 != 0x10; lVar13 = lVar13 + 1) { *puVar12 = *(int8 *)(lVar9 + lVar13 * 8); puVar12 = puVar12 + param_5; } lVar9 = lVar9 + param_6 * 8; puVar8 = puVar8 + 1; } while (bVar15 = lVar14 != 0, lVar14 = lVar14 + -1, bVar15) { if (param_7 != 0) { mul_trig(puVar12,param_5,uVar7,uVar1,lVar2); } iVar4 = ntt_fft(param_1,puVar12,puVar12,lVar5,param_3,param_7,(int)param_8); puVar8 = puVar6; if (iVar4 != 0) goto LAB_0017f058; if (param_7 == 0) { mul_trig(puVar12,param_5,uVar7,uVar1,lVar2); } uVar7 = mul_mod_fast(uVar7,lVar3,uVar1,lVar2); puVar12 = puVar12 + param_5; } puVar8 = puVar6; lVar14 = param_2; for (lVar9 = 0; lVar9 != param_5; lVar9 = lVar9 + 1) { puVar12 = puVar8; for (lVar11 = 0; lVar11 != 0x10; lVar11 = lVar11 + 1) { *(int8 *)(lVar14 + lVar11 * 8) = *puVar12; puVar12 = puVar12 + param_5; } lVar14 = lVar14 + param_6 * 8; puVar8 = puVar8 + 1; } param_2 = param_2 + 0x80; } (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,puVar6,0); LAB_0017f09a: (*(code *)((int8 *)*param_1)[1])(*(int8 *)*param_1,lVar5,0); return 0; } } } LAB_0017f058: ntt_free(param_1,puVar8); ntt_free(param_1,lVar5); return 0xffffffff; }
46,888
common_kv_cache_dump_view(llama_kv_cache_view const&, int)
monkey531[P]llama/common/common.cpp
void common_kv_cache_dump_view(const llama_kv_cache_view & view, int row_size) { static const char slot_chars[] = ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+"; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d", view.n_cells, view.n_seq_max, view.used_cells, view.token_count, view.max_contiguous, view.max_contiguous_idx); llama_kv_cache_view_cell * c_curr = view.cells; llama_seq_id * cs_curr = view.cells_sequences; for (int i = 0; i < view.n_cells; i++, c_curr++, cs_curr += view.n_seq_max) { if (i % row_size == 0) { printf("\n%5d: ", i); } int seq_count = 0; for (int j = 0; j < view.n_seq_max; j++) { if (cs_curr[j] >= 0) { seq_count++; } } putchar(slot_chars[std::min(sizeof(slot_chars) - 2, size_t(seq_count))]); } printf("\n=== Done dumping\n"); }
O3
cpp
common_kv_cache_dump_view(llama_kv_cache_view const&, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %ebx movq %rdi, %r14 movl (%rdi), %esi movl 0x4(%rdi), %edx movl 0xc(%rdi), %ecx movl 0x8(%rdi), %r8d movl 0x10(%rdi), %r9d movl 0x14(%rdi), %eax movl %eax, (%rsp) leaq 0x62eb8(%rip), %rdi # 0xb9d4e xorl %eax, %eax callq 0x19070 cmpl $0x0, (%r14) jle 0x56f13 movq 0x20(%r14), %r12 movl $0x3e, %r13d leaq 0x64e6c(%rip), %r15 # 0xbbd20 xorl %ebp, %ebp movl %ebp, %eax cltd idivl %ebx testl %edx, %edx jne 0x56ecf leaq 0x62f12(%rip), %rdi # 0xb9dd8 movl %ebp, %esi xorl %eax, %eax callq 0x19070 movslq 0x4(%r14), %rcx testq %rcx, %rcx jle 0x56ef1 xorl %edx, %edx xorl %eax, %eax movl (%r12,%rdx,4), %esi notl %esi shrl $0x1f, %esi addl %esi, %eax incq %rdx cmpq %rdx, %rcx jne 0x56edc jmp 0x56ef3 xorl %eax, %eax cmpl $0x3e, %eax cmovael %r13d, %eax movsbl (%rax,%r15), %edi callq 0x19950 incl %ebp movslq 0x4(%r14), %rax leaq (%r12,%rax,4), %r12 cmpl (%r14), %ebp jl 0x56eb6 leaq 0x64deb(%rip), %rdi # 0xbbd05 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x19a70
_Z25common_kv_cache_dump_viewRK19llama_kv_cache_viewi: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebx, esi mov r14, rdi mov esi, [rdi] mov edx, [rdi+4] mov ecx, [rdi+0Ch] mov r8d, [rdi+8] mov r9d, [rdi+10h] mov eax, [rdi+14h] mov [rsp+38h+var_38], eax lea rdi, aDumpingKvCache; "=== Dumping KV cache. total cells %d, m"... xor eax, eax call _printf cmp dword ptr [r14], 0 jle short loc_56F13 mov r12, [r14+20h] mov r13d, 3Eh ; '>' lea r15, _ZZ25common_kv_cache_dump_viewRK19llama_kv_cache_viewiE10slot_chars; ".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabc"... xor ebp, ebp loc_56EB6: mov eax, ebp cdq idiv ebx test edx, edx jnz short loc_56ECF lea rdi, a5d; "\n%5d: " mov esi, ebp xor eax, eax call _printf loc_56ECF: movsxd rcx, dword ptr [r14+4] test rcx, rcx jle short loc_56EF1 xor edx, edx xor eax, eax loc_56EDC: mov esi, [r12+rdx*4] not esi shr esi, 1Fh add eax, esi inc rdx cmp rcx, rdx jnz short loc_56EDC jmp short loc_56EF3 loc_56EF1: xor eax, eax loc_56EF3: cmp eax, 3Eh ; '>' cmovnb eax, r13d movsx edi, byte ptr [rax+r15] call _putchar inc ebp movsxd rax, dword ptr [r14+4] lea r12, [r12+rax*4] cmp ebp, [r14] jl short loc_56EB6 loc_56F13: lea rdi, aDoneDumping; "\n=== Done dumping" add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _puts
long long common_kv_cache_dump_view(long long a1, int a2) { long long v2; // r12 int v3; // ebp long long v4; // rcx long long v5; // rdx long long v6; // rax printf( "=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, large" "st empty slot=%d @ %d", *(_DWORD *)a1, *(_DWORD *)(a1 + 4), *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8), *(_DWORD *)(a1 + 16), *(_DWORD *)(a1 + 20)); if ( *(int *)a1 > 0 ) { v2 = *(_QWORD *)(a1 + 32); v3 = 0; do { if ( !(v3 % a2) ) printf("\n%5d: ", v3); v4 = *(int *)(a1 + 4); if ( v4 <= 0 ) { v6 = 0LL; } else { v5 = 0LL; LODWORD(v6) = 0; do v6 = (*(_DWORD *)(v2 + 4 * v5++) >= 0) + (unsigned int)v6; while ( v4 != v5 ); } if ( (unsigned int)v6 >= 0x3E ) v6 = 62LL; putchar((unsigned int)common_kv_cache_dump_view(llama_kv_cache_view const&,int)::slot_chars[v6]); ++v3; v2 += 4LL * *(int *)(a1 + 4); } while ( v3 < *(_DWORD *)a1 ); } return puts("\n=== Done dumping"); }
common_kv_cache_dump_view: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBX,ESI MOV R14,RDI MOV ESI,dword ptr [RDI] MOV EDX,dword ptr [RDI + 0x4] MOV ECX,dword ptr [RDI + 0xc] MOV R8D,dword ptr [RDI + 0x8] MOV R9D,dword ptr [RDI + 0x10] MOV EAX,dword ptr [RDI + 0x14] MOV dword ptr [RSP],EAX LEA RDI,[0x1b9d4e] XOR EAX,EAX CALL 0x00119070 CMP dword ptr [R14],0x0 JLE 0x00156f13 MOV R12,qword ptr [R14 + 0x20] MOV R13D,0x3e LEA R15,[0x1bbd20] XOR EBP,EBP LAB_00156eb6: MOV EAX,EBP CDQ IDIV EBX TEST EDX,EDX JNZ 0x00156ecf LEA RDI,[0x1b9dd8] MOV ESI,EBP XOR EAX,EAX CALL 0x00119070 LAB_00156ecf: MOVSXD RCX,dword ptr [R14 + 0x4] TEST RCX,RCX JLE 0x00156ef1 XOR EDX,EDX XOR EAX,EAX LAB_00156edc: MOV ESI,dword ptr [R12 + RDX*0x4] NOT ESI SHR ESI,0x1f ADD EAX,ESI INC RDX CMP RCX,RDX JNZ 0x00156edc JMP 0x00156ef3 LAB_00156ef1: XOR EAX,EAX LAB_00156ef3: CMP EAX,0x3e CMOVNC EAX,R13D MOVSX EDI,byte ptr [RAX + R15*0x1] CALL 0x00119950 INC EBP MOVSXD RAX,dword ptr [R14 + 0x4] LEA R12,[R12 + RAX*0x4] CMP EBP,dword ptr [R14] JL 0x00156eb6 LAB_00156f13: LEA RDI,[0x1bbd05] ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00119a70
/* common_kv_cache_dump_view(llama_kv_cache_view const&, int) */ void common_kv_cache_dump_view(llama_kv_cache_view *param_1,int param_2) { uint uVar1; int8 in_RAX; ulong uVar2; long lVar3; uint uVar4; long lVar5; printf("=== Dumping KV cache. total cells %d, max sequences per cell %d, populated cells %d, total tokens in cache %d, largest empty slot=%d @ %d" ,(ulong)*(uint *)param_1,(ulong)*(uint *)(param_1 + 4),(ulong)*(uint *)(param_1 + 0xc), (ulong)*(uint *)(param_1 + 8),(ulong)*(uint *)(param_1 + 0x10), CONCAT44((int)((ulong)in_RAX >> 0x20),*(int4 *)(param_1 + 0x14))); if (0 < *(int *)param_1) { lVar5 = *(long *)(param_1 + 0x20); uVar4 = 0; do { if ((int)uVar4 % param_2 == 0) { printf("\n%5d: ",(ulong)uVar4); } if ((long)*(int *)(param_1 + 4) < 1) { uVar1 = 0; } else { lVar3 = 0; uVar1 = 0; do { uVar1 = uVar1 - ((int)~*(uint *)(lVar5 + lVar3 * 4) >> 0x1f); lVar3 = lVar3 + 1; } while (*(int *)(param_1 + 4) != lVar3); } uVar2 = (ulong)uVar1; if (0x3d < uVar1) { uVar2 = 0x3e; } putchar((int)".123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+"[uVar2]); uVar4 = uVar4 + 1; lVar5 = lVar5 + (long)*(int *)(param_1 + 4) * 4; } while ((int)uVar4 < *(int *)param_1); } puts("\n=== Done dumping"); return; }
46,889
testing::AssertionResult testing::internal::CmpHelperOpFailure<unsigned long, int>(char const*, char const*, unsigned long const&, int const&, char const*)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/include/gtest/gtest.h
AssertionResult CmpHelperOpFailure(const char* expr1, const char* expr2, const T1& val1, const T2& val2, const char* op) { return AssertionFailure() << "Expected: (" << expr1 << ") " << op << " (" << expr2 << "), actual: " << FormatForComparisonFailureMessage(val1, val2) << " vs " << FormatForComparisonFailureMessage(val2, val1); }
O1
c
testing::AssertionResult testing::internal::CmpHelperOpFailure<unsigned long, int>(char const*, char const*, unsigned long const&, int const&, char const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x68, %rsp movq %r8, %r14 movq %rcx, %r15 movq %rdi, %rbx movq %rsi, 0x20(%rsp) movq %rdx, 0x18(%rsp) movq %r9, 0x10(%rsp) movq %rsp, %r12 movq %r12, %rdi callq 0xf0a6 leaq 0x319b7(%rip), %rsi # 0x405c9 movq %r12, %rdi callq 0xe620 leaq 0x20(%rsp), %rsi movq %rax, %rdi callq 0xe69e leaq 0x319a7(%rip), %rsi # 0x405d5 movq %rax, %rdi callq 0xe72e leaq 0x10(%rsp), %rsi movq %rax, %rdi callq 0xe69e leaq 0x31988(%rip), %rsi # 0x405d2 movq %rax, %rdi callq 0xe72e leaq 0x18(%rsp), %rsi movq %rax, %rdi callq 0xe69e leaq 0x31972(%rip), %rsi # 0x405d8 movq %rax, %rdi callq 0xe620 movq %rax, %r12 leaq 0x48(%rsp), %rdi movq %r15, %rsi callq 0xe369 leaq 0x48(%rsp), %rsi movq %r12, %rdi callq 0xe7ac leaq 0x31952(%rip), %rsi # 0x405e4 movq %rax, %rdi callq 0xe820 movq %rax, %r15 leaq 0x28(%rsp), %rdi movq %r14, %rsi callq 0xe2e6 leaq 0x28(%rsp), %rsi movq %r15, %rdi callq 0xe7ac movq %rbx, %rdi movq %rax, %rsi callq 0xefc4 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xecdd movq 0x38(%rsp), %rsi incq %rsi callq 0x84e0 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xecf8 movq 0x58(%rsp), %rsi incq %rsi callq 0x84e0 movq 0x8(%rsp), %rsi testq %rsi, %rsi je 0xed0c leaq 0x8(%rsp), %rdi callq 0xde4a movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0xed3f jmp 0xed5f movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xed42 movq 0x38(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0xed42 movq %rax, %rbx leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xed62 movq 0x58(%rsp), %rsi incq %rsi callq 0x84e0 jmp 0xed62 movq %rax, %rbx movq 0x8(%rsp), %rsi testq %rsi, %rsi je 0xed76 leaq 0x8(%rsp), %rdi callq 0xde4a movq %rbx, %rdi callq 0x8990
_ZN7testing8internal18CmpHelperOpFailureImiEENS_15AssertionResultEPKcS4_RKT_RKT0_S4_: push r15 push r14 push r12 push rbx sub rsp, 68h mov r14, r8 mov r15, rcx mov rbx, rdi mov [rsp+88h+var_68], rsi mov [rsp+88h+var_70], rdx mov [rsp+88h+var_78], r9 mov r12, rsp mov rdi, r12; this call _ZN7testing16AssertionFailureEv; testing::AssertionFailure(void) lea rsi, aExpected; "Expected: (" mov rdi, r12; this call _ZN7testing15AssertionResultlsIA12_cEERS0_RKT_; testing::AssertionResult::operator<<<char [12]>(char [12] const&) lea rsi, [rsp+88h+var_68] mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) lea rsi, asc_405D5; ") " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA3_cEERS0_RKT_; testing::AssertionResult::operator<<<char [3]>(char [3] const&) lea rsi, [rsp+88h+var_78] mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) lea rsi, aExpected+9; " (" mov rdi, rax; this call _ZN7testing15AssertionResultlsIA3_cEERS0_RKT_; testing::AssertionResult::operator<<<char [3]>(char [3] const&) lea rsi, [rsp+88h+var_70] mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) lea rsi, aActual; "), actual: " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA12_cEERS0_RKT_; testing::AssertionResult::operator<<<char [12]>(char [12] const&) mov r12, rax lea rdi, [rsp+88h+var_40] mov rsi, r15 call _ZN7testing13PrintToStringImEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::PrintToString<ulong>(ulong const&) lea rsi, [rsp+88h+var_40] mov rdi, r12; this call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&) lea rsi, aVs; " vs " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA5_cEERS0_RKT_; testing::AssertionResult::operator<<<char [5]>(char [5] const&) mov r15, rax lea rdi, [rsp+88h+var_60] mov rsi, r14 call _ZN7testing13PrintToStringIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; testing::PrintToString<int>(int const&) lea rsi, [rsp+88h+var_60] mov rdi, r15; this call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&) mov rdi, rbx mov rsi, rax call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&) lea rax, [rsp+88h+var_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_ECDD mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ECDD: lea rax, [rsp+88h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_ECF8 mov rsi, [rsp+88h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_ECF8: mov rsi, [rsp+88h+var_80] test rsi, rsi jz short loc_ED0C lea rdi, [rsp+88h+var_80] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_ED0C: mov rax, rbx add rsp, 68h pop rbx pop r12 pop r14 pop r15 retn jmp short loc_ED3F jmp short loc_ED5F mov rbx, rax lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_ED42 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_ED42 loc_ED3F: mov rbx, rax loc_ED42: lea rax, [rsp+arg_50] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_ED62 mov rsi, [rsp+arg_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_ED62 loc_ED5F: mov rbx, rax loc_ED62: mov rsi, [rsp+arg_0] test rsi, rsi jz short loc_ED76 lea rdi, [rsp+arg_0] call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_ED76: mov rdi, rbx call __Unwind_Resume
testing::AssertionResult * testing::internal::CmpHelperOpFailure<unsigned long,int>( testing::AssertionResult *a1, const char *a2, const char *a3, _QWORD *a4, unsigned int *a5, const char *a6) { testing::AssertionResult *v8; // rax testing::AssertionResult *v9; // rax testing::AssertionResult *v10; // rax testing::AssertionResult *v11; // rax testing::AssertionResult *v12; // rax testing::AssertionResult *v13; // rax testing::AssertionResult *v14; // r12 testing::AssertionResult *v15; // rax testing::AssertionResult *v16; // r15 testing::AssertionResult *v17; // rax long long v19; // [rsp+0h] [rbp-88h] BYREF long long v20; // [rsp+8h] [rbp-80h] BYREF const char *v21; // [rsp+10h] [rbp-78h] BYREF const char *v22; // [rsp+18h] [rbp-70h] BYREF const char *v23; // [rsp+20h] [rbp-68h] BYREF void *v24[2]; // [rsp+28h] [rbp-60h] BYREF long long v25; // [rsp+38h] [rbp-50h] BYREF void *v26[2]; // [rsp+48h] [rbp-40h] BYREF long long v27; // [rsp+58h] [rbp-30h] BYREF v23 = a2; v22 = a3; v21 = a6; testing::AssertionFailure((testing *)&v19); v8 = testing::AssertionResult::operator<<<char [12]>((testing::AssertionResult *)&v19, (long long)"Expected: ("); v9 = testing::AssertionResult::operator<<<char const*>(v8, &v23); v10 = testing::AssertionResult::operator<<<char [3]>(v9, (long long)") "); v11 = testing::AssertionResult::operator<<<char const*>(v10, &v21); v12 = testing::AssertionResult::operator<<<char [3]>(v11, (long long)" ("); v13 = testing::AssertionResult::operator<<<char const*>(v12, &v22); v14 = testing::AssertionResult::operator<<<char [12]>(v13, (long long)"), actual: "); testing::PrintToString<unsigned long>((long long)v26, a4); v15 = testing::AssertionResult::operator<<<std::string>(v14, v26); v16 = testing::AssertionResult::operator<<<char [5]>(v15, (long long)" vs "); testing::PrintToString<int>((long long)v24, a5); v17 = testing::AssertionResult::operator<<<std::string>(v16, v24); testing::AssertionResult::AssertionResult(a1, v17); if ( v24[0] != &v25 ) operator delete(v24[0], v25 + 1); if ( v26[0] != &v27 ) operator delete(v26[0], v27 + 1); if ( v20 ) std::default_delete<std::string>::operator()((long long)&v20, v20); return a1; }
CmpHelperOpFailure<unsigned_long,int>: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R14,R8 MOV R15,RCX MOV RBX,RDI MOV qword ptr [RSP + 0x20],RSI MOV qword ptr [RSP + 0x18],RDX MOV qword ptr [RSP + 0x10],R9 MOV R12,RSP MOV RDI,R12 CALL 0x0010f0a6 LAB_0010ec0b: LEA RSI,[0x1405c9] MOV RDI,R12 CALL 0x0010e620 LEA RSI,[RSP + 0x20] MOV RDI,RAX CALL 0x0010e69e LEA RSI,[0x1405d5] MOV RDI,RAX CALL 0x0010e72e LEA RSI,[RSP + 0x10] MOV RDI,RAX CALL 0x0010e69e LEA RSI,[0x1405d2] MOV RDI,RAX CALL 0x0010e72e LEA RSI,[RSP + 0x18] MOV RDI,RAX CALL 0x0010e69e LEA RSI,[0x1405d8] MOV RDI,RAX CALL 0x0010e620 LAB_0010ec6e: MOV R12,RAX LEA RDI,[RSP + 0x48] MOV RSI,R15 CALL 0x0010e369 LAB_0010ec7e: LEA RSI,[RSP + 0x48] MOV RDI,R12 CALL 0x0010e7ac LEA RSI,[0x1405e4] MOV RDI,RAX CALL 0x0010e820 LAB_0010ec9a: MOV R15,RAX LEA RDI,[RSP + 0x28] MOV RSI,R14 CALL 0x0010e2e6 LAB_0010ecaa: LEA RSI,[RSP + 0x28] MOV RDI,R15 CALL 0x0010e7ac MOV RDI,RBX MOV RSI,RAX CALL 0x0010efc4 LAB_0010ecc2: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0010ecdd MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001084e0 LAB_0010ecdd: LEA RAX,[RSP + 0x58] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0010ecf8 MOV RSI,qword ptr [RSP + 0x58] INC RSI CALL 0x001084e0 LAB_0010ecf8: MOV RSI,qword ptr [RSP + 0x8] TEST RSI,RSI JZ 0x0010ed0c LEA RDI,[RSP + 0x8] CALL 0x0010de4a LAB_0010ed0c: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R12 POP R14 POP R15 RET
/* testing::AssertionResult testing::internal::CmpHelperOpFailure<unsigned long, int>(char const*, char const*, unsigned long const&, int const&, char const*) */ internal * __thiscall testing::internal::CmpHelperOpFailure<unsigned_long,int> (internal *this,char *param_1,char *param_2,ulong *param_3,int *param_4,char *param_5) { AssertionResult *pAVar1; testing atStack_88 [8]; string *local_80; char *local_78; char *local_70; char *local_68; long *local_60 [2]; long local_50 [2]; long *local_40 [2]; long local_30 [2]; local_78 = param_5; local_70 = param_2; local_68 = param_1; AssertionFailure(atStack_88); /* try { // try from 0010ec0b to 0010ec6d has its CatchHandler @ 0010ed5f */ pAVar1 = (AssertionResult *) AssertionResult::operator<<((AssertionResult *)atStack_88,"Expected: ("); pAVar1 = AssertionResult::operator<<(pAVar1,&local_68); pAVar1 = AssertionResult::operator<<(pAVar1,") "); pAVar1 = AssertionResult::operator<<(pAVar1,&local_78); pAVar1 = AssertionResult::operator<<(pAVar1," ("); pAVar1 = AssertionResult::operator<<(pAVar1,&local_70); pAVar1 = (AssertionResult *)AssertionResult::operator<<(pAVar1,"), actual: "); /* try { // try from 0010ec6e to 0010ec7d has its CatchHandler @ 0010ed1d */ PrintToString<unsigned_long>((ulong *)local_40); /* try { // try from 0010ec7e to 0010ec99 has its CatchHandler @ 0010ed3f */ pAVar1 = AssertionResult::operator<<(pAVar1,(string *)local_40); pAVar1 = AssertionResult::operator<<(pAVar1," vs "); /* try { // try from 0010ec9a to 0010eca9 has its CatchHandler @ 0010ed1b */ PrintToString<int>((testing *)local_60,param_4); /* try { // try from 0010ecaa to 0010ecc1 has its CatchHandler @ 0010ed1f */ pAVar1 = AssertionResult::operator<<(pAVar1,(string *)local_60); AssertionResult::AssertionResult((AssertionResult *)this,pAVar1); if (local_60[0] != local_50) { operator_delete(local_60[0],local_50[0] + 1); } if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } if (local_80 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_80,local_80); } return this; }
46,890
psi_rwlock_trywrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_rwlock_trywrlock(mysql_rwlock_t *that, const char *file, uint line) { PSI_rwlock_locker_state state; PSI_rwlock_locker *locker= PSI_RWLOCK_CALL(start_rwlock_wrwait) (&state, that->m_psi, PSI_RWLOCK_TRYWRITELOCK, file, line); int result= rw_trywrlock(&that->m_rwlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O0
c
psi_rwlock_trywrlock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1cc396(%rip), %rax # 0x2cb4e0 movq (%rax), %rax movq 0x1b0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x90(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi movl $0x3, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x1028b0 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0xff1a3 leaq 0x1cc350(%rip), %rax # 0x2cb4e0 movq (%rax), %rax movq 0x1b8(%rax), %rax movq -0x50(%rbp), %rdi movl -0x54(%rbp), %esi callq *%rax movl -0x54(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
psi_rwlock_trywrlock: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx lea rax, PSI_server mov rax, [rax] mov rax, [rax+1B0h] mov rcx, [rbp+var_8] mov rsi, [rcx+90h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] mov edx, 3 call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call my_rw_trywrlock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_FF1A3 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1B8h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_FF1A3: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_rwlock_trywrlock(long long a1, long long a2, unsigned int a3) { unsigned int v4; // [rsp+Ch] [rbp-54h] long long v5; // [rsp+10h] [rbp-50h] _BYTE v6[52]; // [rsp+18h] [rbp-48h] BYREF unsigned int v7; // [rsp+4Ch] [rbp-14h] long long v8; // [rsp+50h] [rbp-10h] long long v9; // [rsp+58h] [rbp-8h] v9 = a1; v8 = a2; v7 = a3; v5 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, _QWORD))PSI_server[54])( v6, *(_QWORD *)(a1 + 144), 3LL, a2, a3); v4 = my_rw_trywrlock(v9); if ( v5 ) ((void ( *)(long long, _QWORD))PSI_server[55])(v5, v4); return v4; }
psi_rwlock_trywrlock: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LEA RAX,[0x3cb4e0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1b0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x90] MOV RCX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RBP + -0x14] LEA RDI,[RBP + -0x48] MOV EDX,0x3 CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x002028b0 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x001ff1a3 LEA RAX,[0x3cb4e0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1b8] MOV RDI,qword ptr [RBP + -0x50] MOV ESI,dword ptr [RBP + -0x54] CALL RAX LAB_001ff1a3: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int4 psi_rwlock_trywrlock(long param_1,int8 param_2,int4 param_3) { int4 uVar1; long lVar2; int1 local_50 [52]; int4 local_1c; int8 local_18; long local_10; local_1c = param_3; local_18 = param_2; local_10 = param_1; lVar2 = (**(code **)(PSI_server + 0x1b0)) (local_50,*(int8 *)(param_1 + 0x90),3,param_2,param_3); uVar1 = my_rw_trywrlock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
46,891
mysql_cset_escape_quotes
eloqsql/libmariadb/libmariadb/ma_charset.c
size_t mysql_cset_escape_quotes(const MARIADB_CHARSET_INFO *cset, char *newstr, const char * escapestr, size_t escapestr_len ) { const char *newstr_s = newstr; const char *newstr_e = newstr + 2 * escapestr_len; const char *end = escapestr + escapestr_len; my_bool escape_overflow = FALSE; for (;escapestr < end; escapestr++) { unsigned int len = 0; /* check unicode characters */ if (cset->char_maxlen > 1 && (len = cset->mb_valid(escapestr, end))) { /* check possible overflow */ if ((newstr + len) > newstr_e) { escape_overflow = TRUE; break; } /* copy mb char without escaping it */ while (len--) { *newstr++ = *escapestr++; } escapestr--; continue; } if (*escapestr == '\'') { if (newstr + 2 > newstr_e) { escape_overflow = TRUE; break; } *newstr++ = '\''; *newstr++ = '\''; } else { if (newstr + 1 > newstr_e) { escape_overflow = TRUE; break; } *newstr++ = *escapestr; } } *newstr = '\0'; if (escape_overflow) { return((size_t)~0); } return((size_t)(newstr - newstr_s)); }
O3
c
mysql_cset_escape_quotes: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, -0x30(%rbp) movq %rsi, %rax testq %rcx, %rcx jle 0x30366 movq %rcx, %r14 movq %rdx, %r12 movq %rdi, %r15 movq -0x30(%rbp), %rbx leaq (%rbx,%rcx,2), %r13 addq %rdx, %r14 cmpl $0x2, 0x34(%r15) jb 0x30337 movq %r12, %rdi movq %r14, %rsi callq *0x40(%r15) testl %eax, %eax je 0x30337 movl %eax, %ecx movl %eax, %eax addq %rbx, %rax cmpq %r13, %rax ja 0x3036f decq %r12 movq %r12, %rdx leaq 0x1(%rdx), %r12 leaq 0x1(%rbx), %rax movb 0x1(%rdx), %dl movb %dl, (%rbx) movq %r12, %rdx movq %rax, %rbx decl %ecx jne 0x3031e jmp 0x3035b movb (%r12), %cl cmpb $0x27, %cl jne 0x30350 leaq 0x2(%rbx), %rax cmpq %r13, %rax ja 0x3036f movw $0x2727, (%rbx) # imm = 0x2727 jmp 0x3035b leaq 0x1(%rbx), %rax cmpq %r13, %rax ja 0x3036f movb %cl, (%rbx) incq %r12 movq %rax, %rbx cmpq %r14, %r12 jb 0x302f7 movb $0x0, (%rax) subq -0x30(%rbp), %rax jmp 0x30379 movb $0x0, (%rbx) movq $-0x1, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mysql_cset_escape_quotes: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov [rbp+var_30], rsi mov rax, rsi test rcx, rcx jle loc_30366 mov r14, rcx mov r12, rdx mov r15, rdi mov rbx, [rbp+var_30] lea r13, [rbx+rcx*2] add r14, rdx loc_302F7: cmp dword ptr [r15+34h], 2 jb short loc_30337 mov rdi, r12 mov rsi, r14 call qword ptr [r15+40h] test eax, eax jz short loc_30337 mov ecx, eax mov eax, eax add rax, rbx cmp rax, r13 ja short loc_3036F dec r12 mov rdx, r12 loc_3031E: lea r12, [rdx+1] lea rax, [rbx+1] mov dl, [rdx+1] mov [rbx], dl mov rdx, r12 mov rbx, rax dec ecx jnz short loc_3031E jmp short loc_3035B loc_30337: mov cl, [r12] cmp cl, 27h ; ''' jnz short loc_30350 lea rax, [rbx+2] cmp rax, r13 ja short loc_3036F mov word ptr [rbx], 2727h jmp short loc_3035B loc_30350: lea rax, [rbx+1] cmp rax, r13 ja short loc_3036F mov [rbx], cl loc_3035B: inc r12 mov rbx, rax cmp r12, r14 jb short loc_302F7 loc_30366: mov byte ptr [rax], 0 sub rax, [rbp+var_30] jmp short loc_30379 loc_3036F: mov byte ptr [rbx], 0 mov rax, 0FFFFFFFFFFFFFFFFh loc_30379: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mysql_cset_escape_quotes(long long a1, _BYTE *a2, _BYTE *a3, long long a4) { _BYTE *v4; // rax _BYTE *v5; // r12 _WORD *v6; // rbx unsigned long long v7; // r13 unsigned long long v8; // r14 unsigned int v9; // eax unsigned int v10; // ecx _BYTE *v11; // rdx v4 = a2; if ( a4 <= 0 ) { LABEL_15: *v4 = 0; return v4 - a2; } v5 = a3; v6 = a2; v7 = (unsigned long long)&a2[2 * a4]; v8 = (unsigned long long)&a3[a4]; while ( 1 ) { if ( *(_DWORD *)(a1 + 52) >= 2u ) { v9 = (*(long long ( **)(_BYTE *, unsigned long long))(a1 + 64))(v5, v8); if ( v9 ) { v10 = v9; if ( (unsigned long long)v6 + v9 > v7 ) goto LABEL_16; v11 = v5 - 1; do { v5 = v11 + 1; v4 = (char *)v6 + 1; *(_BYTE *)v6 = *++v11; v6 = (_WORD *)((char *)v6 + 1); --v10; } while ( v10 ); goto LABEL_14; } } if ( *v5 != 39 ) break; v4 = v6 + 1; if ( (unsigned long long)(v6 + 1) > v7 ) goto LABEL_16; *v6 = 10023; LABEL_14: ++v5; v6 = v4; if ( (unsigned long long)v5 >= v8 ) goto LABEL_15; } v4 = (char *)v6 + 1; if ( (unsigned long long)v6 + 1 <= v7 ) { *(_BYTE *)v6 = *v5; goto LABEL_14; } LABEL_16: *(_BYTE *)v6 = 0; return -1LL; }
mysql_cset_escape_quotes: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI TEST RCX,RCX JLE 0x00130366 MOV R14,RCX MOV R12,RDX MOV R15,RDI MOV RBX,qword ptr [RBP + -0x30] LEA R13,[RBX + RCX*0x2] ADD R14,RDX LAB_001302f7: CMP dword ptr [R15 + 0x34],0x2 JC 0x00130337 MOV RDI,R12 MOV RSI,R14 CALL qword ptr [R15 + 0x40] TEST EAX,EAX JZ 0x00130337 MOV ECX,EAX MOV EAX,EAX ADD RAX,RBX CMP RAX,R13 JA 0x0013036f DEC R12 MOV RDX,R12 LAB_0013031e: LEA R12,[RDX + 0x1] LEA RAX,[RBX + 0x1] MOV DL,byte ptr [RDX + 0x1] MOV byte ptr [RBX],DL MOV RDX,R12 MOV RBX,RAX DEC ECX JNZ 0x0013031e JMP 0x0013035b LAB_00130337: MOV CL,byte ptr [R12] CMP CL,0x27 JNZ 0x00130350 LEA RAX,[RBX + 0x2] CMP RAX,R13 JA 0x0013036f MOV word ptr [RBX],0x2727 JMP 0x0013035b LAB_00130350: LEA RAX,[RBX + 0x1] CMP RAX,R13 JA 0x0013036f MOV byte ptr [RBX],CL LAB_0013035b: INC R12 MOV RBX,RAX CMP R12,R14 JC 0x001302f7 LAB_00130366: MOV byte ptr [RAX],0x0 SUB RAX,qword ptr [RBP + -0x30] JMP 0x00130379 LAB_0013036f: MOV byte ptr [RBX],0x0 MOV RAX,-0x1 LAB_00130379: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long mysql_cset_escape_quotes(long param_1,char *param_2,char *param_3,long param_4) { char *pcVar1; uint uVar2; char *pcVar3; char *pcVar4; char *pcVar5; char *pcVar6; pcVar3 = param_2; if (0 < param_4) { pcVar1 = param_2 + param_4 * 2; pcVar6 = param_3 + param_4; pcVar5 = param_2; do { if ((*(uint *)(param_1 + 0x34) < 2) || (uVar2 = (**(code **)(param_1 + 0x40))(param_3,pcVar6), uVar2 == 0)) { if (*param_3 == '\'') { pcVar3 = pcVar5 + 2; if (pcVar1 < pcVar3) { LAB_0013036f: *pcVar5 = '\0'; return -1; } pcVar5[0] = '\''; pcVar5[1] = '\''; } else { pcVar3 = pcVar5 + 1; if (pcVar1 < pcVar3) goto LAB_0013036f; *pcVar5 = *param_3; } } else { if (pcVar1 < pcVar5 + uVar2) goto LAB_0013036f; pcVar4 = param_3 + -1; do { param_3 = pcVar4 + 1; pcVar3 = pcVar5 + 1; *pcVar5 = pcVar4[1]; uVar2 = uVar2 - 1; pcVar4 = param_3; pcVar5 = pcVar3; } while (uVar2 != 0); } param_3 = param_3 + 1; pcVar5 = pcVar3; } while (param_3 < pcVar6); } *pcVar3 = '\0'; return (long)pcVar3 - (long)param_2; }
46,892
Field::binlog_type() const
eloqsql/sql/field.h
virtual enum_field_types binlog_type() const { /* Binlog stores field->type() as type code by default. For example, it puts MYSQL_TYPE_STRING in case of CHAR, VARCHAR, SET and ENUM, with extra data type details put into metadata. Binlog behaviour slightly differs between various MySQL and MariaDB versions for the temporal data types TIME, DATETIME and TIMESTAMP. MySQL prior to 5.6 uses MYSQL_TYPE_TIME, MYSQL_TYPE_DATETIME and MYSQL_TYPE_TIMESTAMP type codes in binlog and stores no additional metadata. MariaDB-5.3 implements new versions for TIME, DATATIME, TIMESTAMP with fractional second precision, but uses the old format for the types TIME(0), DATETIME(0), TIMESTAMP(0), and it still stores MYSQL_TYPE_TIME, MYSQL_TYPE_DATETIME and MYSQL_TYPE_TIMESTAMP in binlog, with no additional metadata. So row-based replication between temporal data types of different precision is not possible in MariaDB. MySQL-5.6 also implements a new version of TIME, DATETIME, TIMESTAMP which support fractional second precision 0..6, and use the new format even for the types TIME(0), DATETIME(0), TIMESTAMP(0). For these new data types, MySQL-5.6 stores new type codes MYSQL_TYPE_TIME2, MYSQL_TYPE_DATETIME2, MYSQL_TYPE_TIMESTAMP2 in binlog, with fractional precision 0..6 put into metadata. This makes it in theory possible to do row-based replication between columns of different fractional precision (e.g. from TIME(1) on master to TIME(6) on slave). However, it's not currently fully implemented yet. MySQL-5.6 can only do row-based replication from the old types TIME, DATETIME, TIMESTAMP (represented by MYSQL_TYPE_TIME, MYSQL_TYPE_DATETIME and MYSQL_TYPE_TIMESTAMP type codes in binlog) to the new corresponding types TIME(0), DATETIME(0), TIMESTAMP(0). Note: MariaDB starting from the version 10.0 understands the new MySQL-5.6 type codes MYSQL_TYPE_TIME2, MYSQL_TYPE_DATETIME2, MYSQL_TYPE_TIMESTAMP2. When started over MySQL-5.6 tables both on master and on slave, MariaDB-10.0 can also do row-based replication from the old types TIME, DATETIME, TIMESTAMP to the new MySQL-5.6 types TIME(0), DATETIME(0), TIMESTAMP(0). Note: perhaps binlog should eventually be modified to store real_type() instead of type() for all column types. */ return type(); }
O3
c
Field::binlog_type() const: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax popq %rbp jmpq *0x1b8(%rax)
_ZNK5Field11binlog_typeEv: push rbp mov rbp, rsp mov rax, [rdi] pop rbp jmp qword ptr [rax+1B8h]
long long Field::binlog_type(Field *this) { return (*(long long ( **)(Field *))(*(_QWORD *)this + 440LL))(this); }
binlog_type: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] POP RBP JMP qword ptr [RAX + 0x1b8]
/* Field::binlog_type() const */ void __thiscall Field::binlog_type(Field *this) { /* WARNING: Could not recover jumptable at 0x0010cbb8. Too many branches */ /* WARNING: Treating indirect jump as call */ (**(code **)(*(long *)this + 0x1b8))(); return; }
46,893
serial_cpp::IOException::~IOException()
ami-iit[P]serial_cpp/include/serial_cpp/serial.h
virtual ~IOException() throw() {}
O1
c
serial_cpp::IOException::~IOException(): pushq %rbx movq %rdi, %rbx leaq 0x7b07(%rip), %rax # 0xfd50 movq %rax, (%rdi) movq 0x30(%rdi), %rdi leaq 0x40(%rbx), %rax cmpq %rax, %rdi je 0x8264 movq (%rax), %rsi incq %rsi callq 0x32c0 movq 0x8(%rbx), %rdi leaq 0x18(%rbx), %rax cmpq %rax, %rdi je 0x827c movq (%rax), %rsi incq %rsi callq 0x32c0 movq %rbx, %rdi popq %rbx jmp 0x3530 nop
_ZN10serial_cpp11IOExceptionD2Ev: push rbx mov rbx, rdi lea rax, off_FD50 mov [rdi], rax mov rdi, [rdi+30h]; void * lea rax, [rbx+40h] cmp rdi, rax jz short loc_8264 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8264: mov rdi, [rbx+8]; void * lea rax, [rbx+18h] cmp rdi, rax jz short loc_827C mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_827C: mov rdi, rbx; this pop rbx jmp __ZNSt9exceptionD2Ev; std::exception::~exception()
void serial_cpp::IOException::~IOException(std::exception *a1) { _QWORD *v2; // rdi _QWORD *v3; // rdi *(_QWORD *)a1 = off_FD50; v2 = (_QWORD *)*((_QWORD *)a1 + 6); if ( v2 != (_QWORD *)((char *)a1 + 64) ) operator delete(v2, *((_QWORD *)a1 + 8) + 1LL); v3 = (_QWORD *)*((_QWORD *)a1 + 1); if ( v3 != (_QWORD *)((char *)a1 + 24) ) operator delete(v3, *((_QWORD *)a1 + 3) + 1LL); std::exception::~exception(a1); }
~IOException: PUSH RBX MOV RBX,RDI LEA RAX,[0x10fd50] MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x30] LEA RAX,[RBX + 0x40] CMP RDI,RAX JZ 0x00108264 MOV RSI,qword ptr [RAX] INC RSI CALL 0x001032c0 LAB_00108264: MOV RDI,qword ptr [RBX + 0x8] LEA RAX,[RBX + 0x18] CMP RDI,RAX JZ 0x0010827c MOV RSI,qword ptr [RAX] INC RSI CALL 0x001032c0 LAB_0010827c: MOV RDI,RBX POP RBX JMP 0x00103530
/* serial_cpp::IOException::~IOException() */ void __thiscall serial_cpp::IOException::~IOException(IOException *this) { *(int ***)this = &PTR__IOException_0010fd50; if (*(IOException **)(this + 0x30) != this + 0x40) { operator_delete(*(IOException **)(this + 0x30),*(long *)(this + 0x40) + 1); } if (*(IOException **)(this + 8) != this + 0x18) { operator_delete(*(IOException **)(this + 8),*(long *)(this + 0x18) + 1); } std::exception::~exception((exception *)this); return; }
46,894
serial_cpp::IOException::~IOException()
ami-iit[P]serial_cpp/include/serial_cpp/serial.h
virtual ~IOException() throw() {}
O3
c
serial_cpp::IOException::~IOException(): pushq %rbx movq %rdi, %rbx leaq 0x7b55(%rip), %rax # 0xfd50 movq %rax, (%rdi) movq 0x30(%rdi), %rdi leaq 0x40(%rbx), %rax cmpq %rax, %rdi je 0x8216 movq (%rax), %rsi incq %rsi callq 0x32c0 movq 0x8(%rbx), %rdi leaq 0x18(%rbx), %rax cmpq %rax, %rdi je 0x822e movq (%rax), %rsi incq %rsi callq 0x32c0 movq %rbx, %rdi popq %rbx jmp 0x3530 nop
_ZN10serial_cpp11IOExceptionD2Ev: push rbx mov rbx, rdi lea rax, off_FD50 mov [rdi], rax mov rdi, [rdi+30h]; void * lea rax, [rbx+40h] cmp rdi, rax jz short loc_8216 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8216: mov rdi, [rbx+8]; void * lea rax, [rbx+18h] cmp rdi, rax jz short loc_822E mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_822E: mov rdi, rbx; this pop rbx jmp __ZNSt9exceptionD2Ev; std::exception::~exception()
void serial_cpp::IOException::~IOException(std::exception *a1) { _QWORD *v2; // rdi _QWORD *v3; // rdi *(_QWORD *)a1 = off_FD50; v2 = (_QWORD *)*((_QWORD *)a1 + 6); if ( v2 != (_QWORD *)((char *)a1 + 64) ) operator delete(v2, *((_QWORD *)a1 + 8) + 1LL); v3 = (_QWORD *)*((_QWORD *)a1 + 1); if ( v3 != (_QWORD *)((char *)a1 + 24) ) operator delete(v3, *((_QWORD *)a1 + 3) + 1LL); std::exception::~exception(a1); }
~IOException: PUSH RBX MOV RBX,RDI LEA RAX,[0x10fd50] MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x30] LEA RAX,[RBX + 0x40] CMP RDI,RAX JZ 0x00108216 MOV RSI,qword ptr [RAX] INC RSI CALL 0x001032c0 LAB_00108216: MOV RDI,qword ptr [RBX + 0x8] LEA RAX,[RBX + 0x18] CMP RDI,RAX JZ 0x0010822e MOV RSI,qword ptr [RAX] INC RSI CALL 0x001032c0 LAB_0010822e: MOV RDI,RBX POP RBX JMP 0x00103530
/* serial_cpp::IOException::~IOException() */ void __thiscall serial_cpp::IOException::~IOException(IOException *this) { *(int ***)this = &PTR__IOException_0010fd50; if (*(IOException **)(this + 0x30) != this + 0x40) { operator_delete(*(IOException **)(this + 0x30),*(long *)(this + 0x40) + 1); } if (*(IOException **)(this + 8) != this + 0x18) { operator_delete(*(IOException **)(this + 8),*(long *)(this + 0x18) + 1); } std::exception::~exception((exception *)this); return; }
46,895
table_events_transactions_common::read_row_values(TABLE*, unsigned char*, Field**, bool)
eloqsql/storage/perfschema/table_events_transactions.cc
int table_events_transactions_common::read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) { Field *f; if (unlikely(! m_row_exists)) return HA_ERR_RECORD_DELETED; /* Set the null bits */ assert(table->s->null_bytes == 3); buf[0]= 0; buf[1]= 0; buf[2]= 0; for (; (f= *fields) ; fields++) { if (read_all || bitmap_is_set(table->read_set, f->field_index)) { switch(f->field_index) { case 0: /* THREAD_ID */ set_field_ulonglong(f, m_row.m_thread_internal_id); break; case 1: /* EVENT_ID */ set_field_ulonglong(f, m_row.m_event_id); break; case 2: /* END_EVENT_ID */ if (m_row.m_end_event_id > 0) set_field_ulonglong(f, m_row.m_end_event_id - 1); else f->set_null(); break; case 3: /* EVENT_NAME */ set_field_varchar_utf8(f, m_row.m_name, m_row.m_name_length); break; case 4: /* STATE */ set_field_enum(f, m_row.m_state); break; case 5: /* TRX_ID */ if (m_row.m_trxid != 0) set_field_ulonglong(f, m_row.m_trxid); else f->set_null(); break; case 6: /* GTID */ set_field_varchar_utf8(f, m_row.m_gtid, m_row.m_gtid_length); break; case 7: /* XID_FORMAT_ID */ if (!m_row.m_xa || m_row.m_xid.is_null()) f->set_null(); else set_field_long(f, m_row.m_xid.formatID); break; case 8: /* XID_GTRID */ if (!m_row.m_xa || m_row.m_xid.is_null() || m_row.m_xid.gtrid_length <= 0) f->set_null(); else xid_store_gtrid(f, &m_row.m_xid); break; case 9: /* XID_BQUAL */ if (!m_row.m_xa || m_row.m_xid.is_null() || m_row.m_xid.bqual_length <= 0) f->set_null(); else xid_store_bqual(f, &m_row.m_xid); break; case 10: /* XA STATE */ if (!m_row.m_xa || m_row.m_xid.is_null()) f->set_null(); else set_field_xa_state(f, m_row.m_xa_state); break; case 11: /* SOURCE */ set_field_varchar_utf8(f, m_row.m_source, m_row.m_source_length); break; case 12: /* TIMER_START */ if (m_row.m_timer_start != 0) set_field_ulonglong(f, m_row.m_timer_start); else f->set_null(); break; case 13: /* TIMER_END */ if (m_row.m_timer_end != 0) set_field_ulonglong(f, m_row.m_timer_end); else f->set_null(); break; case 14: /* TIMER_WAIT */ if (m_row.m_timer_wait != 0) set_field_ulonglong(f, m_row.m_timer_wait); else f->set_null(); break; case 15: /* ACCESS_MODE */ set_field_enum(f, m_row.m_read_only ? TRANS_MODE_READ_ONLY : TRANS_MODE_READ_WRITE); break; case 16: /* ISOLATION_LEVEL */ set_field_isolation_level(f, m_row.m_isolation_level); break; case 17: /* AUTOCOMMIT */ set_field_enum(f, m_row.m_autocommit ? ENUM_YES : ENUM_NO); break; case 18: /* NUMBER_OF_SAVEPOINTS */ set_field_ulonglong(f, m_row.m_savepoint_count); break; case 19: /* NUMBER_OF_ROLLBACK_TO_SAVEPOINT */ set_field_ulonglong(f, m_row.m_rollback_to_savepoint_count); break; case 20: /* NUMBER_OF_RELEASE_SAVEPOINT */ set_field_ulonglong(f, m_row.m_release_savepoint_count); break; case 21: /* OBJECT_INSTANCE_BEGIN */ f->set_null(); break; case 22: /* NESTING_EVENT_ID */ if (m_row.m_nesting_event_id != 0) set_field_ulonglong(f, m_row.m_nesting_event_id); else f->set_null(); break; case 23: /* NESTING_EVENT_TYPE */ if (m_row.m_nesting_event_id != 0) set_field_enum(f, m_row.m_nesting_event_type); else f->set_null(); break; default: assert(false); } } } return 0; }
O0
cpp
table_events_transactions_common::read_row_values(TABLE*, unsigned char*, Field**, bool): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movb %r8b, %al movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) andb $0x1, %al movb %al, -0x29(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x40(%rbp) movb 0x1c0(%rax), %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0xf35a46 movl $0x86, -0x4(%rbp) jmp 0xf35f06 movq -0x20(%rbp), %rax movb $0x0, (%rax) movq -0x20(%rbp), %rax movb $0x0, 0x1(%rax) movq -0x20(%rbp), %rax movb $0x0, 0x2(%rax) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) cmpq $0x0, %rax je 0xf35eff testb $0x1, -0x29(%rbp) jne 0xf35a9c movq -0x18(%rbp), %rax movq 0x1f0(%rax), %rdi movq -0x38(%rbp), %rax movzwl 0x8c(%rax), %esi callq 0xf35f10 cmpl $0x0, %eax je 0xf35eec movq -0x38(%rbp), %rax movzwl 0x8c(%rax), %eax movq %rax, -0x48(%rbp) subq $0x17, %rax ja 0xf35ee8 movq -0x48(%rbp), %rax leaq 0x6459c0(%rip), %rcx # 0x157b480 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq 0x28(%rax), %rsi callq 0xf034b0 jmp 0xf35eea movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq 0x30(%rax), %rsi callq 0xf034b0 jmp 0xf35eea movq -0x40(%rbp), %rax cmpq $0x0, 0x38(%rax) jbe 0xf35b17 movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq 0x38(%rax), %rsi subq $0x1, %rsi callq 0xf034b0 jmp 0xf35b24 movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x8572c0 jmp 0xf35eea movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq 0x50(%rax), %rsi movl 0x58(%rax), %edx callq 0xf03570 jmp 0xf35eea movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movl 0xc8(%rax), %eax movl %eax, %esi callq 0xf03630 jmp 0xf35eea movq -0x40(%rbp), %rax cmpq $0x0, 0xc0(%rax) je 0xf35b80 movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq 0xc0(%rax), %rsi callq 0xf034b0 jmp 0xf35b8d movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x8572c0 jmp 0xf35eea movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq %rax, %rsi addq $0x28, %rsi addq $0xa4, %rsi movl 0xf8(%rax), %edx callq 0xf03570 jmp 0xf35eea movq -0x40(%rbp), %rax testb $0x1, 0x19c(%rax) je 0xf35bdf movq -0x40(%rbp), %rdi addq $0x28, %rdi addq $0xd8, %rdi callq 0xf09010 testb $0x1, %al jne 0xf35bdf jmp 0xf35bee movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x8572c0 jmp 0xf35c02 movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq 0x100(%rax), %rsi callq 0xf03410 jmp 0xf35eea movq -0x40(%rbp), %rax testb $0x1, 0x19c(%rax) je 0xf35c3a movq -0x40(%rbp), %rdi addq $0x28, %rdi addq $0xd8, %rdi callq 0xf09010 testb $0x1, %al jne 0xf35c3a movq -0x40(%rbp), %rax cmpq $0x0, 0x108(%rax) jg 0xf35c49 movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x8572c0 jmp 0xf35c61 movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdi addq $0x28, %rsi addq $0xd8, %rsi callq 0xf35f60 jmp 0xf35eea movq -0x40(%rbp), %rax testb $0x1, 0x19c(%rax) je 0xf35c99 movq -0x40(%rbp), %rdi addq $0x28, %rdi addq $0xd8, %rdi callq 0xf09010 testb $0x1, %al jne 0xf35c99 movq -0x40(%rbp), %rax cmpq $0x0, 0x110(%rax) jg 0xf35ca8 movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x8572c0 jmp 0xf35cc0 movq -0x40(%rbp), %rsi movq -0x38(%rbp), %rdi addq $0x28, %rsi addq $0xd8, %rsi callq 0xf35f90 jmp 0xf35eea movq -0x40(%rbp), %rax testb $0x1, 0x19c(%rax) je 0xf35cec movq -0x40(%rbp), %rdi addq $0x28, %rdi addq $0xd8, %rdi callq 0xf09010 testb $0x1, %al jne 0xf35cec jmp 0xf35cfb movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x8572c0 jmp 0xf35d0e movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movl 0x198(%rax), %esi callq 0xf43560 jmp 0xf35eea movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq %rax, %rsi addq $0x28, %rsi addq $0x50, %rsi movl 0xb8(%rax), %edx callq 0xf03570 jmp 0xf35eea movq -0x40(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0xf35d54 movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq 0x60(%rax), %rsi callq 0xf034b0 jmp 0xf35d61 movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x8572c0 jmp 0xf35eea movq -0x40(%rbp), %rax cmpq $0x0, 0x68(%rax) je 0xf35d84 movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq 0x68(%rax), %rsi callq 0xf034b0 jmp 0xf35d91 movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x8572c0 jmp 0xf35eea movq -0x40(%rbp), %rax cmpq $0x0, 0x70(%rax) je 0xf35db4 movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq 0x70(%rax), %rsi callq 0xf034b0 jmp 0xf35dc1 movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x8572c0 jmp 0xf35eea movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movb 0x1a4(%rax), %dl movl $0x2, %eax movl $0x1, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, %eax movl %eax, %esi callq 0xf03630 jmp 0xf35eea movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movl 0x1a0(%rax), %esi callq 0xf434c0 jmp 0xf35eea movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movb 0x19d(%rax), %dl movl $0x2, %eax movl $0x1, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, %eax movl %eax, %esi callq 0xf03630 jmp 0xf35eea movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq 0x1a8(%rax), %rsi callq 0xf034b0 jmp 0xf35eea movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq 0x1b0(%rax), %rsi callq 0xf034b0 jmp 0xf35eea movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq 0x1b8(%rax), %rsi callq 0xf034b0 jmp 0xf35eea movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x8572c0 jmp 0xf35eea movq -0x40(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0xf35eab movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movq 0x40(%rax), %rsi callq 0xf034b0 jmp 0xf35eb8 movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x8572c0 jmp 0xf35eea movq -0x40(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0xf35ed9 movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdi movl 0x48(%rax), %eax movl %eax, %esi callq 0xf03630 jmp 0xf35ee6 movq -0x38(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x8572c0 jmp 0xf35eea jmp 0xf35eea jmp 0xf35eec jmp 0xf35eee movq -0x28(%rbp), %rax addq $0x8, %rax movq %rax, -0x28(%rbp) jmp 0xf35a5d movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nop
_ZN32table_events_transactions_common15read_row_valuesEP5TABLEPhPP5Fieldb: push rbp mov rbp, rsp sub rsp, 50h mov al, r8b mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx and al, 1 mov [rbp+var_29], al mov rax, [rbp+var_10] mov [rbp+var_40], rax mov al, [rax+1C0h] xor al, 0FFh and al, 1 movzx eax, al cmp eax, 0 jz short loc_F35A46 mov [rbp+var_4], 86h jmp loc_F35F06 loc_F35A46: mov rax, [rbp+var_20] mov byte ptr [rax], 0 mov rax, [rbp+var_20] mov byte ptr [rax+1], 0 mov rax, [rbp+var_20] mov byte ptr [rax+2], 0 loc_F35A5D: mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_38], rax cmp rax, 0 jz loc_F35EFF test [rbp+var_29], 1 jnz short loc_F35A9C mov rax, [rbp+var_18] mov rdi, [rax+1F0h] mov rax, [rbp+var_38] movzx esi, word ptr [rax+8Ch] call _ZL13bitmap_is_setPK9st_bitmapj_46; bitmap_is_set(st_bitmap const*,uint) cmp eax, 0 jz loc_F35EEC loc_F35A9C: mov rax, [rbp+var_38] movzx eax, word ptr [rax+8Ch] mov [rbp+var_48], rax sub rax, 17h; switch 24 cases ja def_F35AC7; jumptable 0000000000F35AC7 default case mov rax, [rbp+var_48] lea rcx, jpt_F35AC7; unsigned int movsxd rax, ds:(jpt_F35AC7 - 157B480h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_F35AC9: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 0 mov rdi, [rbp+var_38]; this mov rsi, [rax+28h]; Field * call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long) jmp loc_F35EEA loc_F35ADF: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 1 mov rdi, [rbp+var_38]; this mov rsi, [rax+30h]; Field * call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long) jmp loc_F35EEA loc_F35AF5: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 2 cmp qword ptr [rax+38h], 0 jbe short loc_F35B17 mov rax, [rbp+var_40] mov rdi, [rbp+var_38]; this mov rsi, [rax+38h] sub rsi, 1; Field * call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long) jmp short loc_F35B24 loc_F35B17: mov rdi, [rbp+var_38]; this xor eax, eax mov esi, eax; __int64 call _ZN5Field8set_nullEx; Field::set_null(long long) loc_F35B24: jmp loc_F35EEA loc_F35B29: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 3 mov rdi, [rbp+var_38]; this mov rsi, [rax+50h]; Field * mov edx, [rax+58h]; char * call _ZN16PFS_engine_table22set_field_varchar_utf8EP5FieldPKcj; PFS_engine_table::set_field_varchar_utf8(Field *,char const*,uint) jmp loc_F35EEA loc_F35B42: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 4 mov rdi, [rbp+var_38]; this mov eax, [rax+0C8h] mov esi, eax; Field * call _ZN16PFS_engine_table14set_field_enumEP5Fieldy; PFS_engine_table::set_field_enum(Field *,ulong long) jmp loc_F35EEA loc_F35B5C: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 5 cmp qword ptr [rax+0C0h], 0 jz short loc_F35B80 mov rax, [rbp+var_40] mov rdi, [rbp+var_38]; this mov rsi, [rax+0C0h]; Field * call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long) jmp short loc_F35B8D loc_F35B80: mov rdi, [rbp+var_38]; this xor eax, eax mov esi, eax; __int64 call _ZN5Field8set_nullEx; Field::set_null(long long) loc_F35B8D: jmp loc_F35EEA loc_F35B92: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 6 mov rdi, [rbp+var_38]; this mov rsi, rax add rsi, 28h ; '(' add rsi, 0A4h; Field * mov edx, [rax+0F8h]; char * call _ZN16PFS_engine_table22set_field_varchar_utf8EP5FieldPKcj; PFS_engine_table::set_field_varchar_utf8(Field *,char const*,uint) jmp loc_F35EEA loc_F35BB8: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 7 test byte ptr [rax+19Ch], 1 jz short loc_F35BDF mov rdi, [rbp+var_40] add rdi, 28h ; '(' add rdi, 0D8h; this call _ZN7PSI_xid7is_nullEv; PSI_xid::is_null(void) test al, 1 jnz short loc_F35BDF jmp short loc_F35BEE loc_F35BDF: mov rdi, [rbp+var_38]; this xor eax, eax mov esi, eax; __int64 call _ZN5Field8set_nullEx; Field::set_null(long long) jmp short loc_F35C02 loc_F35BEE: mov rax, [rbp+var_40] mov rdi, [rbp+var_38]; this mov rsi, [rax+100h]; Field * call _ZN16PFS_engine_table14set_field_longEP5Fieldl; PFS_engine_table::set_field_long(Field *,long) loc_F35C02: jmp loc_F35EEA loc_F35C07: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 8 test byte ptr [rax+19Ch], 1 jz short loc_F35C3A mov rdi, [rbp+var_40] add rdi, 28h ; '(' add rdi, 0D8h; this call _ZN7PSI_xid7is_nullEv; PSI_xid::is_null(void) test al, 1 jnz short loc_F35C3A mov rax, [rbp+var_40] cmp qword ptr [rax+108h], 0 jg short loc_F35C49 loc_F35C3A: mov rdi, [rbp+var_38]; this xor eax, eax mov esi, eax; __int64 call _ZN5Field8set_nullEx; Field::set_null(long long) jmp short loc_F35C61 loc_F35C49: mov rsi, [rbp+var_40] mov rdi, [rbp+var_38]; Field * add rsi, 28h ; '(' add rsi, 0D8h; PSI_xid * call _ZL15xid_store_gtridP5FieldP7PSI_xid; xid_store_gtrid(Field *,PSI_xid *) loc_F35C61: jmp loc_F35EEA loc_F35C66: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 9 test byte ptr [rax+19Ch], 1 jz short loc_F35C99 mov rdi, [rbp+var_40] add rdi, 28h ; '(' add rdi, 0D8h; this call _ZN7PSI_xid7is_nullEv; PSI_xid::is_null(void) test al, 1 jnz short loc_F35C99 mov rax, [rbp+var_40] cmp qword ptr [rax+110h], 0 jg short loc_F35CA8 loc_F35C99: mov rdi, [rbp+var_38]; this xor eax, eax mov esi, eax; __int64 call _ZN5Field8set_nullEx; Field::set_null(long long) jmp short loc_F35CC0 loc_F35CA8: mov rsi, [rbp+var_40] mov rdi, [rbp+var_38]; Field * add rsi, 28h ; '(' add rsi, 0D8h; PSI_xid * call _ZL15xid_store_bqualP5FieldP7PSI_xid; xid_store_bqual(Field *,PSI_xid *) loc_F35CC0: jmp loc_F35EEA loc_F35CC5: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 10 test byte ptr [rax+19Ch], 1 jz short loc_F35CEC mov rdi, [rbp+var_40] add rdi, 28h ; '(' add rdi, 0D8h; this call _ZN7PSI_xid7is_nullEv; PSI_xid::is_null(void) test al, 1 jnz short loc_F35CEC jmp short loc_F35CFB loc_F35CEC: mov rdi, [rbp+var_38]; this xor eax, eax mov esi, eax; __int64 call _ZN5Field8set_nullEx; Field::set_null(long long) jmp short loc_F35D0E loc_F35CFB: mov rax, [rbp+var_40] mov rdi, [rbp+var_38] mov esi, [rax+198h] call _Z18set_field_xa_stateP5Field25enum_xa_transaction_state; set_field_xa_state(Field *,enum_xa_transaction_state) loc_F35D0E: jmp loc_F35EEA loc_F35D13: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 11 mov rdi, [rbp+var_38]; this mov rsi, rax add rsi, 28h ; '(' add rsi, 50h ; 'P'; Field * mov edx, [rax+0B8h]; char * call _ZN16PFS_engine_table22set_field_varchar_utf8EP5FieldPKcj; PFS_engine_table::set_field_varchar_utf8(Field *,char const*,uint) jmp loc_F35EEA loc_F35D36: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 12 cmp qword ptr [rax+60h], 0 jz short loc_F35D54 mov rax, [rbp+var_40] mov rdi, [rbp+var_38]; this mov rsi, [rax+60h]; Field * call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long) jmp short loc_F35D61 loc_F35D54: mov rdi, [rbp+var_38]; this xor eax, eax mov esi, eax; __int64 call _ZN5Field8set_nullEx; Field::set_null(long long) loc_F35D61: jmp loc_F35EEA loc_F35D66: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 13 cmp qword ptr [rax+68h], 0 jz short loc_F35D84 mov rax, [rbp+var_40] mov rdi, [rbp+var_38]; this mov rsi, [rax+68h]; Field * call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long) jmp short loc_F35D91 loc_F35D84: mov rdi, [rbp+var_38]; this xor eax, eax mov esi, eax; __int64 call _ZN5Field8set_nullEx; Field::set_null(long long) loc_F35D91: jmp loc_F35EEA loc_F35D96: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 14 cmp qword ptr [rax+70h], 0 jz short loc_F35DB4 mov rax, [rbp+var_40] mov rdi, [rbp+var_38]; this mov rsi, [rax+70h]; Field * call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long) jmp short loc_F35DC1 loc_F35DB4: mov rdi, [rbp+var_38]; this xor eax, eax mov esi, eax; __int64 call _ZN5Field8set_nullEx; Field::set_null(long long) loc_F35DC1: jmp loc_F35EEA loc_F35DC6: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 15 mov rdi, [rbp+var_38]; this mov dl, [rax+1A4h]; unsigned __int64 mov eax, 2 mov ecx, (offset dword_0+1) test dl, 1 cmovnz eax, ecx mov eax, eax mov esi, eax; Field * call _ZN16PFS_engine_table14set_field_enumEP5Fieldy; PFS_engine_table::set_field_enum(Field *,ulong long) jmp loc_F35EEA loc_F35DF2: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 16 mov rdi, [rbp+var_38] mov esi, [rax+1A0h] call _Z25set_field_isolation_levelP5Field20enum_isolation_level; set_field_isolation_level(Field *,enum_isolation_level) jmp loc_F35EEA loc_F35E0A: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 17 mov rdi, [rbp+var_38]; this mov dl, [rax+19Dh]; unsigned __int64 mov eax, 2 mov ecx, (offset dword_0+1) test dl, 1 cmovnz eax, ecx mov eax, eax mov esi, eax; Field * call _ZN16PFS_engine_table14set_field_enumEP5Fieldy; PFS_engine_table::set_field_enum(Field *,ulong long) jmp loc_F35EEA loc_F35E36: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 18 mov rdi, [rbp+var_38]; this mov rsi, [rax+1A8h]; Field * call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long) jmp loc_F35EEA loc_F35E4F: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 19 mov rdi, [rbp+var_38]; this mov rsi, [rax+1B0h]; Field * call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long) jmp loc_F35EEA loc_F35E68: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 20 mov rdi, [rbp+var_38]; this mov rsi, [rax+1B8h]; Field * call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long) jmp short loc_F35EEA loc_F35E7E: mov rdi, [rbp+var_38]; jumptable 0000000000F35AC7 case 21 xor eax, eax mov esi, eax; __int64 call _ZN5Field8set_nullEx; Field::set_null(long long) jmp short loc_F35EEA loc_F35E8D: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 22 cmp qword ptr [rax+40h], 0 jz short loc_F35EAB mov rax, [rbp+var_40] mov rdi, [rbp+var_38]; this mov rsi, [rax+40h]; Field * call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long) jmp short loc_F35EB8 loc_F35EAB: mov rdi, [rbp+var_38]; this xor eax, eax mov esi, eax; __int64 call _ZN5Field8set_nullEx; Field::set_null(long long) loc_F35EB8: jmp short loc_F35EEA loc_F35EBA: mov rax, [rbp+var_40]; jumptable 0000000000F35AC7 case 23 cmp qword ptr [rax+40h], 0 jz short loc_F35ED9 mov rax, [rbp+var_40] mov rdi, [rbp+var_38]; this mov eax, [rax+48h] mov esi, eax; Field * call _ZN16PFS_engine_table14set_field_enumEP5Fieldy; PFS_engine_table::set_field_enum(Field *,ulong long) jmp short loc_F35EE6 loc_F35ED9: mov rdi, [rbp+var_38]; this xor eax, eax mov esi, eax; __int64 call _ZN5Field8set_nullEx; Field::set_null(long long) loc_F35EE6: jmp short loc_F35EEA def_F35AC7: jmp short $+2; jumptable 0000000000F35AC7 default case loc_F35EEA: jmp short $+2 loc_F35EEC: jmp short $+2 loc_F35EEE: mov rax, [rbp+var_28] add rax, 8 mov [rbp+var_28], rax jmp loc_F35A5D loc_F35EFF: mov [rbp+var_4], 0 loc_F35F06: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long table_events_transactions_common::read_row_values( Field **this, TABLE *a2, unsigned __int8 *a3, Field **a4, char a5) { PFS_engine_table *v5; // rdi unsigned int v6; // eax Field *v9; // [rsp+18h] [rbp-38h] char v10; // [rsp+27h] [rbp-29h] v10 = a5 & 1; if ( ((_BYTE)this[56] & 1) != 0 ) { *a3 = 0; a3[1] = 0; a3[2] = 0; while ( 1 ) { v9 = *a4; if ( !*a4 ) return 0; if ( (v10 & 1) != 0 || (unsigned int)bitmap_is_set(*((_QWORD *)a2 + 62), *((unsigned __int16 *)v9 + 70)) ) { switch ( *((_WORD *)v9 + 70) ) { case 0: PFS_engine_table::set_field_ulonglong(v9, this[5]); break; case 1: PFS_engine_table::set_field_ulonglong(v9, this[6]); break; case 2: if ( !this[7] ) goto LABEL_62; PFS_engine_table::set_field_ulonglong(v9, (Field *)((char *)this[7] - 1)); break; case 3: PFS_engine_table::set_field_varchar_utf8(v9, this[10], (const char *)*((unsigned int *)this + 22)); break; case 4: PFS_engine_table::set_field_enum(v9, (Field *)*((unsigned int *)this + 50)); break; case 5: if ( !this[24] ) goto LABEL_62; PFS_engine_table::set_field_ulonglong(v9, this[24]); break; case 6: PFS_engine_table::set_field_varchar_utf8( v9, (Field *)((char *)this + 204), (const char *)*((unsigned int *)this + 62)); break; case 7: if ( (*((_BYTE *)this + 412) & 1) == 0 || PSI_xid::is_null((PSI_xid *)(this + 32)) ) goto LABEL_62; PFS_engine_table::set_field_long(v9, this[32]); break; case 8: if ( (*((_BYTE *)this + 412) & 1) == 0 || PSI_xid::is_null((PSI_xid *)(this + 32)) || (long long)this[33] <= 0 ) goto LABEL_62; xid_store_gtrid(v9, (PSI_xid *)(this + 32)); break; case 9: if ( (*((_BYTE *)this + 412) & 1) == 0 || PSI_xid::is_null((PSI_xid *)(this + 32)) || (long long)this[34] <= 0 ) goto LABEL_62; xid_store_bqual(v9, (PSI_xid *)(this + 32)); break; case 0xA: if ( (*((_BYTE *)this + 412) & 1) == 0 || PSI_xid::is_null((PSI_xid *)(this + 32)) ) goto LABEL_62; set_field_xa_state(v9, *((unsigned int *)this + 102)); break; case 0xB: PFS_engine_table::set_field_varchar_utf8( v9, (Field *)(this + 15), (const char *)*((unsigned int *)this + 46)); break; case 0xC: if ( !this[12] ) goto LABEL_62; PFS_engine_table::set_field_ulonglong(v9, this[12]); break; case 0xD: if ( !this[13] ) goto LABEL_62; PFS_engine_table::set_field_ulonglong(v9, this[13]); break; case 0xE: if ( !this[14] ) goto LABEL_62; PFS_engine_table::set_field_ulonglong(v9, this[14]); break; case 0xF: v5 = v9; v6 = 2; if ( (*((_BYTE *)this + 420) & 1) != 0 ) v6 = (unsigned int)&dword_0 + 1; goto LABEL_49; case 0x10: set_field_isolation_level(v9, *((unsigned int *)this + 104)); break; case 0x11: v5 = v9; v6 = 2; if ( (*((_BYTE *)this + 413) & 1) != 0 ) v6 = (unsigned int)&dword_0 + 1; LABEL_49: PFS_engine_table::set_field_enum(v5, (Field *)v6); break; case 0x12: PFS_engine_table::set_field_ulonglong(v9, this[53]); break; case 0x13: PFS_engine_table::set_field_ulonglong(v9, this[54]); break; case 0x14: PFS_engine_table::set_field_ulonglong(v9, this[55]); break; case 0x15: goto LABEL_62; case 0x16: if ( !this[8] ) goto LABEL_62; PFS_engine_table::set_field_ulonglong(v9, this[8]); break; case 0x17: if ( this[8] ) PFS_engine_table::set_field_enum(v9, (Field *)*((unsigned int *)this + 18)); else LABEL_62: Field::set_null((Field **)v9, 0LL); break; default: break; } } ++a4; } } else { return 134; } }
inline_mysql_file_pread: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV qword ptr [RBP + -0x30],R9 LEA RAX,[0x1c0e4d0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x158] MOV ESI,dword ptr [RBP + -0x18] LEA RDI,[RBP + -0x88] MOV EDX,0x6 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 0x00f35b3f LEA RAX,[0x1c0e4d0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x210] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RBP + -0x14] CALL RAX MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV R8,qword ptr [RBP + 0x10] CALL 0x013c7fa0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + 0x10] AND RAX,0x6 CMP RAX,0x0 JZ 0x00f35aea CMP qword ptr [RBP + -0x38],0x0 JNZ 0x00f35acf MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x00f35ada LAB_00f35acf: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x00f35ada LAB_00f35ada: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x00f35b17 LAB_00f35aea: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x00f35afe MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x00f35b09 LAB_00f35afe: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x00f35b09 LAB_00f35b09: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_00f35b17: LEA RAX,[0x1c0e4d0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0x90] CALL RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX JMP 0x00f35b63 LAB_00f35b3f: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] MOV R8,qword ptr [RBP + 0x10] CALL 0x013c7fa0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_00f35b63: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_pread (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,int8 param_6,ulong param_7) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; int8 local_38; long local_30; int8 local_28; int4 local_20; int4 local_1c; int8 local_18; long local_10; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_1c = param_2; local_18 = param_1; local_48 = (**(code **)(PSI_server + 0x158))(local_90,param_3,6); if (local_48 == 0) { local_10 = my_pread(local_20,local_28,local_30,local_38,param_7); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_pread(local_20,local_28,local_30,local_38,param_7); if ((param_7 & 6) == 0) { local_a8 = local_40; if (local_40 == -1) { local_a8 = 0; } local_98 = local_a8; } else { if (local_40 == 0) { local_a0 = local_30; } else { local_a0 = 0; } local_98 = local_a0; } (**(code **)(PSI_server + 0x218))(local_48,local_98); local_10 = local_40; } return local_10; }
46,896
table_events_transactions_common::read_row_values(TABLE*, unsigned char*, Field**, bool)
eloqsql/storage/perfschema/table_events_transactions.cc
int table_events_transactions_common::read_row_values(TABLE *table, unsigned char *buf, Field **fields, bool read_all) { Field *f; if (unlikely(! m_row_exists)) return HA_ERR_RECORD_DELETED; /* Set the null bits */ assert(table->s->null_bytes == 3); buf[0]= 0; buf[1]= 0; buf[2]= 0; for (; (f= *fields) ; fields++) { if (read_all || bitmap_is_set(table->read_set, f->field_index)) { switch(f->field_index) { case 0: /* THREAD_ID */ set_field_ulonglong(f, m_row.m_thread_internal_id); break; case 1: /* EVENT_ID */ set_field_ulonglong(f, m_row.m_event_id); break; case 2: /* END_EVENT_ID */ if (m_row.m_end_event_id > 0) set_field_ulonglong(f, m_row.m_end_event_id - 1); else f->set_null(); break; case 3: /* EVENT_NAME */ set_field_varchar_utf8(f, m_row.m_name, m_row.m_name_length); break; case 4: /* STATE */ set_field_enum(f, m_row.m_state); break; case 5: /* TRX_ID */ if (m_row.m_trxid != 0) set_field_ulonglong(f, m_row.m_trxid); else f->set_null(); break; case 6: /* GTID */ set_field_varchar_utf8(f, m_row.m_gtid, m_row.m_gtid_length); break; case 7: /* XID_FORMAT_ID */ if (!m_row.m_xa || m_row.m_xid.is_null()) f->set_null(); else set_field_long(f, m_row.m_xid.formatID); break; case 8: /* XID_GTRID */ if (!m_row.m_xa || m_row.m_xid.is_null() || m_row.m_xid.gtrid_length <= 0) f->set_null(); else xid_store_gtrid(f, &m_row.m_xid); break; case 9: /* XID_BQUAL */ if (!m_row.m_xa || m_row.m_xid.is_null() || m_row.m_xid.bqual_length <= 0) f->set_null(); else xid_store_bqual(f, &m_row.m_xid); break; case 10: /* XA STATE */ if (!m_row.m_xa || m_row.m_xid.is_null()) f->set_null(); else set_field_xa_state(f, m_row.m_xa_state); break; case 11: /* SOURCE */ set_field_varchar_utf8(f, m_row.m_source, m_row.m_source_length); break; case 12: /* TIMER_START */ if (m_row.m_timer_start != 0) set_field_ulonglong(f, m_row.m_timer_start); else f->set_null(); break; case 13: /* TIMER_END */ if (m_row.m_timer_end != 0) set_field_ulonglong(f, m_row.m_timer_end); else f->set_null(); break; case 14: /* TIMER_WAIT */ if (m_row.m_timer_wait != 0) set_field_ulonglong(f, m_row.m_timer_wait); else f->set_null(); break; case 15: /* ACCESS_MODE */ set_field_enum(f, m_row.m_read_only ? TRANS_MODE_READ_ONLY : TRANS_MODE_READ_WRITE); break; case 16: /* ISOLATION_LEVEL */ set_field_isolation_level(f, m_row.m_isolation_level); break; case 17: /* AUTOCOMMIT */ set_field_enum(f, m_row.m_autocommit ? ENUM_YES : ENUM_NO); break; case 18: /* NUMBER_OF_SAVEPOINTS */ set_field_ulonglong(f, m_row.m_savepoint_count); break; case 19: /* NUMBER_OF_ROLLBACK_TO_SAVEPOINT */ set_field_ulonglong(f, m_row.m_rollback_to_savepoint_count); break; case 20: /* NUMBER_OF_RELEASE_SAVEPOINT */ set_field_ulonglong(f, m_row.m_release_savepoint_count); break; case 21: /* OBJECT_INSTANCE_BEGIN */ f->set_null(); break; case 22: /* NESTING_EVENT_ID */ if (m_row.m_nesting_event_id != 0) set_field_ulonglong(f, m_row.m_nesting_event_id); else f->set_null(); break; case 23: /* NESTING_EVENT_TYPE */ if (m_row.m_nesting_event_id != 0) set_field_enum(f, m_row.m_nesting_event_type); else f->set_null(); break; default: assert(false); } } } return 0; }
O3
cpp
table_events_transactions_common::read_row_values(TABLE*, unsigned char*, Field**, bool): cmpb $0x1, 0x1c0(%rdi) jne 0x65ee71 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r14 movq %rdi, %r12 andw $0x0, (%rdx) movb $0x0, 0x2(%rdx) movq (%rcx), %rdi testq %rdi, %rdi je 0x65ee60 movl %r8d, %ebx movq %rsi, %r15 leaq 0x78(%r12), %rax movq %rax, -0x40(%rbp) leaq 0x100(%r12), %rax movq %rax, -0x30(%rbp) leaq 0xcc(%r12), %rax movq %rax, -0x38(%rbp) addq $0x8, %r14 leaq 0x8c4bc8(%rip), %r13 # 0xf237e4 testb %bl, %bl je 0x65ec29 movzwl 0x8c(%rdi), %eax jmp 0x65ec51 movq 0x1f0(%r15), %rcx movzwl 0x8c(%rdi), %eax movq (%rcx), %rcx movl %eax, %edx shrl $0x3, %edx movzbl (%rcx,%rdx), %ecx movl %eax, %edx andl $0x7, %edx btl %edx, %ecx jae 0x65ee50 cmpw $0x17, %ax ja 0x65ee50 movzwl %ax, %eax movslq (%r13,%rax,4), %rax addq %r13, %rax jmpq *%rax movq 0x28(%r12), %rsi jmp 0x65ee37 movzbl 0x1a4(%r12), %eax jmp 0x65eda9 movq 0x68(%r12), %rsi jmp 0x65ee17 cmpb $0x1, 0x19c(%r12) jne 0x65ee1c cmpq $-0x1, 0x100(%r12) je 0x65ee1c movl 0x198(%r12), %esi callq 0xae5855 jmp 0x65ee50 movq 0x50(%r12), %rsi movl 0x58(%r12), %edx jmp 0x65ed3f movl 0xb8(%r12), %edx movq -0x40(%rbp), %rsi jmp 0x65ed3f cmpb $0x1, 0x19c(%r12) jne 0x65ee1c movq 0x108(%r12), %rcx cmpq $-0x1, 0x100(%r12) sete %al testq %rcx, %rcx setle %dl orb %al, %dl cmpb $0x1, %dl je 0x65ee1c movq -0x30(%rbp), %rsi xorl %edx, %edx jmp 0x65edec movq 0x70(%r12), %rsi jmp 0x65ee17 movq 0x38(%r12), %rsi testq %rsi, %rsi je 0x65ee1c decq %rsi jmp 0x65ee37 movl 0xf8(%r12), %edx movq -0x38(%rbp), %rsi callq 0xac33fc jmp 0x65ee50 movq 0x30(%r12), %rsi jmp 0x65ee37 movl 0x1a0(%r12), %esi callq 0xae57fc jmp 0x65ee50 movq 0x1b0(%r12), %rsi jmp 0x65ee37 movl 0xc8(%r12), %esi jmp 0x65ee4b movq 0x1b8(%r12), %rsi jmp 0x65ee37 movq 0x60(%r12), %rsi jmp 0x65ee17 movq 0xc0(%r12), %rsi jmp 0x65ee17 movzbl 0x19d(%r12), %eax pushq $0x2 popq %rsi subq %rax, %rsi jmp 0x65ee4b cmpb $0x1, 0x19c(%r12) jne 0x65ee1c movq 0x110(%r12), %rcx cmpq $-0x1, 0x100(%r12) sete %al testq %rcx, %rcx setle %dl orb %al, %dl cmpb $0x1, %dl je 0x65ee1c movq 0x108(%r12), %rdx movq -0x30(%rbp), %rsi callq 0xadfd7c jmp 0x65ee50 cmpb $0x1, 0x19c(%r12) jne 0x65ee1c movq -0x30(%rbp), %rax movq (%rax), %rsi cmpq $-0x1, %rsi je 0x65ee1c callq 0xac3384 jmp 0x65ee50 movq 0x40(%r12), %rsi testq %rsi, %rsi jne 0x65ee37 movq 0x10(%rdi), %rax testq %rax, %rax je 0x65ee50 movb 0x8e(%rdi), %cl orb %cl, (%rax) jmp 0x65ee50 movq 0x1a8(%r12), %rsi callq 0xac33b4 jmp 0x65ee50 cmpq $0x0, 0x40(%r12) je 0x65ee1c movl 0x48(%r12), %esi callq 0xac3444 movq (%r14), %rdi addq $0x8, %r14 testq %rdi, %rdi jne 0x65ec1c xorl %eax, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x86, %eax retq nop
_ZN32table_events_transactions_common15read_row_valuesEP5TABLEPhPP5Fieldb: cmp byte ptr [rdi+1C0h], 1 jnz loc_65EE71 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rcx mov r12, rdi and word ptr [rdx], 0 mov byte ptr [rdx+2], 0 mov rdi, [rcx]; this test rdi, rdi jz loc_65EE60 mov ebx, r8d mov r15, rsi lea rax, [r12+78h] mov [rbp-40h], rax lea rax, [r12+100h] mov [rbp-30h], rax lea rax, [r12+0CCh] mov [rbp-38h], rax add r14, 8 lea r13, jpt_65EC66 loc_65EC1C: test bl, bl jz short loc_65EC29 movzx eax, word ptr [rdi+8Ch] jmp short loc_65EC51 loc_65EC29: mov rcx, [r15+1F0h] movzx eax, word ptr [rdi+8Ch] mov rcx, [rcx] mov edx, eax shr edx, 3 movzx ecx, byte ptr [rcx+rdx]; unsigned int mov edx, eax and edx, 7; unsigned __int64 bt ecx, edx jnb def_65EC66; jumptable 000000000065EC66 default case loc_65EC51: cmp ax, 17h; switch 24 cases ja def_65EC66; jumptable 000000000065EC66 default case movzx eax, ax movsxd rax, ds:(jpt_65EC66 - 0F237E4h)[r13+rax*4] add rax, r13 jmp rax; switch jump loc_65EC68: mov rsi, [r12+28h]; jumptable 000000000065EC66 case 0 jmp loc_65EE37 loc_65EC72: movzx eax, byte ptr [r12+1A4h]; jumptable 000000000065EC66 case 15 jmp loc_65EDA9 loc_65EC80: mov rsi, [r12+68h]; jumptable 000000000065EC66 case 13 jmp loc_65EE17 loc_65EC8A: cmp byte ptr [r12+19Ch], 1; jumptable 000000000065EC66 case 10 jnz loc_65EE1C; jumptable 000000000065EC66 case 21 cmp qword ptr [r12+100h], 0FFFFFFFFFFFFFFFFh jz loc_65EE1C; jumptable 000000000065EC66 case 21 mov esi, [r12+198h] call _Z18set_field_xa_stateP5Field25enum_xa_transaction_state; set_field_xa_state(Field *,enum_xa_transaction_state) jmp def_65EC66; jumptable 000000000065EC66 default case loc_65ECBA: mov rsi, [r12+50h]; jumptable 000000000065EC66 case 3 mov edx, [r12+58h] jmp short loc_65ED3F loc_65ECC6: mov edx, [r12+0B8h]; jumptable 000000000065EC66 case 11 mov rsi, [rbp-40h] jmp short loc_65ED3F loc_65ECD4: cmp byte ptr [r12+19Ch], 1; jumptable 000000000065EC66 case 8 jnz loc_65EE1C; jumptable 000000000065EC66 case 21 mov rcx, [r12+108h] cmp qword ptr [r12+100h], 0FFFFFFFFFFFFFFFFh setz al test rcx, rcx setle dl or dl, al cmp dl, 1 jz loc_65EE1C; jumptable 000000000065EC66 case 21 mov rsi, [rbp-30h] xor edx, edx jmp loc_65EDEC loc_65ED13: mov rsi, [r12+70h]; jumptable 000000000065EC66 case 14 jmp loc_65EE17 loc_65ED1D: mov rsi, [r12+38h]; jumptable 000000000065EC66 case 2 test rsi, rsi jz loc_65EE1C; jumptable 000000000065EC66 case 21 dec rsi jmp loc_65EE37 loc_65ED33: mov edx, [r12+0F8h]; jumptable 000000000065EC66 case 6 mov rsi, [rbp-38h]; Field * loc_65ED3F: call _ZN16PFS_engine_table22set_field_varchar_utf8EP5FieldPKcj; PFS_engine_table::set_field_varchar_utf8(Field *,char const*,uint) jmp def_65EC66; jumptable 000000000065EC66 default case loc_65ED49: mov rsi, [r12+30h]; jumptable 000000000065EC66 case 1 jmp loc_65EE37 loc_65ED53: mov esi, [r12+1A0h]; jumptable 000000000065EC66 case 16 call _Z25set_field_isolation_levelP5Field20enum_isolation_level; set_field_isolation_level(Field *,enum_isolation_level) jmp def_65EC66; jumptable 000000000065EC66 default case loc_65ED65: mov rsi, [r12+1B0h]; jumptable 000000000065EC66 case 19 jmp loc_65EE37 loc_65ED72: mov esi, [r12+0C8h]; jumptable 000000000065EC66 case 4 jmp loc_65EE4B loc_65ED7F: mov rsi, [r12+1B8h]; jumptable 000000000065EC66 case 20 jmp loc_65EE37 loc_65ED8C: mov rsi, [r12+60h]; jumptable 000000000065EC66 case 12 jmp loc_65EE17 loc_65ED96: mov rsi, [r12+0C0h]; jumptable 000000000065EC66 case 5 jmp short loc_65EE17 loc_65EDA0: movzx eax, byte ptr [r12+19Dh]; jumptable 000000000065EC66 case 17 loc_65EDA9: push 2 pop rsi sub rsi, rax jmp loc_65EE4B loc_65EDB4: cmp byte ptr [r12+19Ch], 1; jumptable 000000000065EC66 case 9 jnz short loc_65EE1C; jumptable 000000000065EC66 case 21 mov rcx, [r12+110h] cmp qword ptr [r12+100h], 0FFFFFFFFFFFFFFFFh setz al test rcx, rcx setle dl or dl, al cmp dl, 1 jz short loc_65EE1C; jumptable 000000000065EC66 case 21 mov rdx, [r12+108h] mov rsi, [rbp-30h] loc_65EDEC: call _ZL9xid_storeP5FieldP7PSI_xidmm; xid_store(Field *,PSI_xid *,ulong,ulong) jmp short def_65EC66; jumptable 000000000065EC66 default case loc_65EDF3: cmp byte ptr [r12+19Ch], 1; jumptable 000000000065EC66 case 7 jnz short loc_65EE1C; jumptable 000000000065EC66 case 21 mov rax, [rbp-30h] mov rsi, [rax]; Field * cmp rsi, 0FFFFFFFFFFFFFFFFh jz short loc_65EE1C; jumptable 000000000065EC66 case 21 call _ZN16PFS_engine_table14set_field_longEP5Fieldl; PFS_engine_table::set_field_long(Field *,long) jmp short def_65EC66; jumptable 000000000065EC66 default case loc_65EE12: mov rsi, [r12+40h]; jumptable 000000000065EC66 case 22 loc_65EE17: test rsi, rsi jnz short loc_65EE37 loc_65EE1C: mov rax, [rdi+10h]; jumptable 000000000065EC66 case 21 test rax, rax jz short def_65EC66; jumptable 000000000065EC66 default case mov cl, [rdi+8Eh] or [rax], cl jmp short def_65EC66; jumptable 000000000065EC66 default case loc_65EE2F: mov rsi, [r12+1A8h]; jumptable 000000000065EC66 case 18 loc_65EE37: call _ZN16PFS_engine_table19set_field_ulonglongEP5Fieldy; PFS_engine_table::set_field_ulonglong(Field *,ulong long) jmp short def_65EC66; jumptable 000000000065EC66 default case loc_65EE3E: cmp qword ptr [r12+40h], 0; jumptable 000000000065EC66 case 23 jz short loc_65EE1C; jumptable 000000000065EC66 case 21 mov esi, [r12+48h]; Field * loc_65EE4B: call _ZN16PFS_engine_table14set_field_enumEP5Fieldy; PFS_engine_table::set_field_enum(Field *,ulong long) def_65EC66: mov rdi, [r14]; jumptable 000000000065EC66 default case add r14, 8 test rdi, rdi jnz loc_65EC1C loc_65EE60: xor eax, eax add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_65EE71: mov eax, 86h retn
long long table_events_transactions_common::read_row_values( table_events_transactions_common *this, TABLE *a2, unsigned __int8 *a3, Field **a4, char a5) { long long v6; // rdi Field **v9; // r14 unsigned __int16 v10; // ax Field *v11; // rsi long long v12; // rax Field *v13; // rsi const char *v14; // rdx char *v15; // rsi long long v16; // rdx long long v17; // rsi Field *v18; // rsi _BYTE *v19; // rax Field **v21; // [rsp-38h] [rbp-38h] if ( *((_BYTE *)this + 448) != 1 ) return 134LL; *(_WORD *)a3 = 0; a3[2] = 0; v6 = (long long)*a4; if ( *a4 ) { v21 = (Field **)((char *)this + 256); v9 = a4 + 1; while ( !a5 ) { v10 = *(_WORD *)(v6 + 140); LODWORD(a4) = *(unsigned __int8 *)(**((_QWORD **)a2 + 62) + (v10 >> 3)); a3 = (unsigned __int8 *)(v10 & 7); if ( _bittest((const int *)&a4, (unsigned int)a3) ) goto LABEL_7; LABEL_49: v6 = (long long)*v9++; if ( !v6 ) return 0LL; } v10 = *(_WORD *)(v6 + 140); LABEL_7: switch ( v10 ) { case 0u: v11 = (Field *)*((_QWORD *)this + 5); goto LABEL_45; case 1u: v11 = (Field *)*((_QWORD *)this + 6); goto LABEL_45; case 2u: v17 = *((_QWORD *)this + 7); if ( !v17 ) goto LABEL_42; v11 = (Field *)(v17 - 1); goto LABEL_45; case 3u: v13 = (Field *)*((_QWORD *)this + 10); v14 = (const char *)*((unsigned int *)this + 22); goto LABEL_23; case 4u: v18 = (Field *)*((unsigned int *)this + 50); goto LABEL_48; case 5u: v11 = (Field *)*((_QWORD *)this + 24); goto LABEL_41; case 6u: v14 = (const char *)*((unsigned int *)this + 62); v13 = (table_events_transactions_common *)((char *)this + 204); goto LABEL_23; case 7u: if ( *((_BYTE *)this + 412) != 1 || *v21 == (Field *)-1LL ) goto LABEL_42; PFS_engine_table::set_field_long((PFS_engine_table *)v6, *v21, (long long)a3); goto LABEL_49; case 8u: if ( *((_BYTE *)this + 412) != 1 ) goto LABEL_42; a4 = (Field **)*((_QWORD *)this + 33); LOBYTE(a3) = *((_QWORD *)this + 32) == -1LL || (long long)a4 <= 0; if ( (_BYTE)a3 == 1 ) goto LABEL_42; v15 = (char *)this + 256; v16 = 0LL; goto LABEL_36; case 9u: if ( *((_BYTE *)this + 412) != 1 ) goto LABEL_42; a4 = (Field **)*((_QWORD *)this + 34); LOBYTE(a3) = *((_QWORD *)this + 32) == -1LL || (long long)a4 <= 0; if ( (_BYTE)a3 == 1 ) goto LABEL_42; v16 = *((_QWORD *)this + 33); v15 = (char *)this + 256; LABEL_36: xid_store(v6, v15, v16); goto LABEL_49; case 0xAu: if ( *((_BYTE *)this + 412) != 1 || *((_QWORD *)this + 32) == -1LL ) goto LABEL_42; set_field_xa_state(v6, *((unsigned int *)this + 102)); goto LABEL_49; case 0xBu: v14 = (const char *)*((unsigned int *)this + 46); v13 = (table_events_transactions_common *)((char *)this + 120); LABEL_23: PFS_engine_table::set_field_varchar_utf8((PFS_engine_table *)v6, v13, v14, (unsigned int)a4); goto LABEL_49; case 0xCu: v11 = (Field *)*((_QWORD *)this + 12); goto LABEL_41; case 0xDu: v11 = (Field *)*((_QWORD *)this + 13); goto LABEL_41; case 0xEu: v11 = (Field *)*((_QWORD *)this + 14); goto LABEL_41; case 0xFu: v12 = *((unsigned __int8 *)this + 420); goto LABEL_32; case 0x10u: set_field_isolation_level(v6, *((unsigned int *)this + 104)); goto LABEL_49; case 0x11u: v12 = *((unsigned __int8 *)this + 413); LABEL_32: v18 = (Field *)(2 - v12); goto LABEL_48; case 0x12u: v11 = (Field *)*((_QWORD *)this + 53); goto LABEL_45; case 0x13u: v11 = (Field *)*((_QWORD *)this + 54); goto LABEL_45; case 0x14u: v11 = (Field *)*((_QWORD *)this + 55); goto LABEL_45; case 0x15u: goto LABEL_42; case 0x16u: v11 = (Field *)*((_QWORD *)this + 8); LABEL_41: if ( !v11 ) goto LABEL_42; LABEL_45: PFS_engine_table::set_field_ulonglong((PFS_engine_table *)v6, v11, (unsigned long long)a3); break; case 0x17u: if ( *((_QWORD *)this + 8) ) { v18 = (Field *)*((unsigned int *)this + 18); LABEL_48: PFS_engine_table::set_field_enum((PFS_engine_table *)v6, v18, (unsigned long long)a3); } else { LABEL_42: v19 = *(_BYTE **)(v6 + 16); if ( v19 ) { LOBYTE(a4) = *(_BYTE *)(v6 + 142); *v19 |= (unsigned __int8)a4; } } break; default: goto LABEL_49; } goto LABEL_49; } return 0LL; }
46,897
mariadb_field_attr
eloqsql/libmariadb/libmariadb/mariadb_lib.c
int STDCALL mariadb_field_attr(MARIADB_CONST_STRING *attr, const MYSQL_FIELD *field, enum mariadb_field_attr_t type) { MA_FIELD_EXTENSION *ext= (MA_FIELD_EXTENSION*) field->extension; if (!ext || type > MARIADB_FIELD_ATTR_LAST) { *attr= null_const_string; return 1; } *attr= ext->metadata[type]; return 0; }
O0
c
mariadb_field_attr: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq -0x18(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x28(%rbp) cmpq $0x0, -0x28(%rbp) je 0x21f38 cmpl $0x1, -0x1c(%rbp) jbe 0x21f5a movq -0x10(%rbp), %rax movq 0x405cd(%rip), %rcx # 0x62510 movq %rcx, (%rax) movq 0x405cb(%rip), %rcx # 0x62518 movq %rcx, 0x8(%rax) movl $0x1, -0x4(%rbp) jmp 0x21f81 movq -0x10(%rbp), %rax movq -0x28(%rbp), %rcx movl -0x1c(%rbp), %edx shlq $0x4, %rdx addq %rdx, %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax)
mariadb_field_attr: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov rax, [rbp+var_18] mov rax, [rax+78h] mov [rbp+var_28], rax cmp [rbp+var_28], 0 jz short loc_21F38 cmp [rbp+var_1C], 1 jbe short loc_21F5A loc_21F38: mov rax, [rbp+var_10] mov rcx, cs:null_const_string mov [rax], rcx mov rcx, cs:qword_62518 mov [rax+8], rcx mov [rbp+var_4], 1 jmp short loc_21F81 loc_21F5A: mov rax, [rbp+var_10] mov rcx, [rbp+var_28] mov edx, [rbp+var_1C] shl rdx, 4 add rcx, rdx mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov [rbp+var_4], 0 loc_21F81: mov eax, [rbp+var_4] pop rbp retn
long long mariadb_field_attr(_QWORD *a1, long long a2, unsigned int a3) { long long v3; // rdx long long v5; // [rsp+0h] [rbp-28h] v5 = *(_QWORD *)(a2 + 120); if ( v5 && a3 <= 1 ) { v3 = 16LL * a3; *a1 = *(_QWORD *)(v3 + v5); a1[1] = *(_QWORD *)(v3 + v5 + 8); return 0; } else { *a1 = null_const_string; a1[1] = qword_62518; return 1; } }
mariadb_field_attr: 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 + -0x18] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],0x0 JZ 0x00121f38 CMP dword ptr [RBP + -0x1c],0x1 JBE 0x00121f5a LAB_00121f38: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [0x00162510] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [0x00162518] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RBP + -0x4],0x1 JMP 0x00121f81 LAB_00121f5a: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x28] MOV EDX,dword ptr [RBP + -0x1c] SHL RDX,0x4 ADD RCX,RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV dword ptr [RBP + -0x4],0x0 LAB_00121f81: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 mariadb_field_attr(int8 *param_1,long param_2,uint param_3) { int8 *puVar1; int4 local_c; if ((*(long *)(param_2 + 0x78) == 0) || (1 < param_3)) { *param_1 = null_const_string; param_1[1] = DAT_00162518; local_c = 1; } else { puVar1 = (int8 *)(*(long *)(param_2 + 0x78) + (ulong)param_3 * 0x10); *param_1 = *puVar1; param_1[1] = puVar1[1]; local_c = 0; } return local_c; }
46,898
CustomAllocTest_DataPatternTest_Test::~CustomAllocTest_DataPatternTest_Test()
seiftnesse[P]memoryallocator/tests/test_allocator.cpp
TEST_F(CustomAllocTest, DataPatternTest) { constexpr size_t testSize = 4096; // Test various data patterns std::vector<std::pair<std::string, uint8_t> > patterns = { {"All zeros", 0x00}, {"All ones", 0xFF}, {"Alternating bits", 0xAA}, {"Inverse alternating", 0x55} }; for (const auto &[name, pattern]: patterns) { std::cout << "Testing pattern: " << name << std::endl; void *ptr = _malloc(testSize); ASSERT_NE(ptr, nullptr); // Fill with pattern fillMemory(ptr, testSize, pattern); // Verify pattern EXPECT_TRUE(verifyPattern(ptr, testSize, pattern)); _free(ptr); } }
O1
cpp
CustomAllocTest_DataPatternTest_Test::~CustomAllocTest_DataPatternTest_Test(): pushq %rbx movq %rdi, %rbx callq 0x242c6 movl $0x10, %esi movq %rbx, %rdi popq %rbx jmp 0x94c0 nop
_ZN36CustomAllocTest_DataPatternTest_TestD0Ev: push rbx mov rbx, rdi call _ZN7testing4TestD2Ev; testing::Test::~Test() mov esi, 10h; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void CustomAllocTest_DataPatternTest_Test::~CustomAllocTest_DataPatternTest_Test( CustomAllocTest_DataPatternTest_Test *this) { testing::Test::~Test(this); operator delete(this, 0x10uLL); }
~CustomAllocTest_DataPatternTest_Test: PUSH RBX MOV RBX,RDI CALL 0x001242c6 MOV ESI,0x10 MOV RDI,RBX POP RBX JMP 0x001094c0
/* CustomAllocTest_DataPatternTest_Test::~CustomAllocTest_DataPatternTest_Test() */ void __thiscall CustomAllocTest_DataPatternTest_Test::~CustomAllocTest_DataPatternTest_Test (CustomAllocTest_DataPatternTest_Test *this) { testing::Test::~Test((Test *)this); operator_delete(this,0x10); return; }
46,899
nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t)
hkr04[P]cpp-mcp/common/json.hpp
static parse_error create(int id_, const position_t& pos, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("parse_error", id_), "parse error", position_string(pos), ": ", exception::diagnostics(context), what_arg); return {id_, pos.chars_read_total, w.c_str()}; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::parse_error nlohmann::json_abi_v3_11_3::detail::parse_error::create<std::nullptr_t, 0>(int, nlohmann::json_abi_v3_11_3::detail::position_t const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t): subq $0x118, %rsp # imm = 0x118 movq %rdi, 0x20(%rsp) movq %rdi, %rax movq %rax, 0x28(%rsp) movq %rdi, 0x110(%rsp) movl %esi, 0x10c(%rsp) movq %rdx, 0x100(%rsp) movq %rcx, 0xf8(%rsp) movq %r8, 0xf0(%rsp) leaq 0x8f(%rsp), %rdi movq %rdi, 0x30(%rsp) callq 0x6980 movq 0x30(%rsp), %rdx leaq 0x1b67f(%rip), %rsi # 0x513d8 leaq 0x90(%rsp), %rdi callq 0x80f0 jmp 0x35d68 movl 0x10c(%rsp), %edx leaq 0xb0(%rsp), %rdi leaq 0x90(%rsp), %rsi callq 0xf670 jmp 0x35d86 movq 0x100(%rsp), %rsi leaq 0x58(%rsp), %rdi callq 0x40440 jmp 0x35d9a xorl %eax, %eax movl %eax, %esi leaq 0x38(%rsp), %rdi callq 0x102b0 jmp 0x35daa movq 0xf8(%rsp), %rcx movq %rsp, %rax movq %rcx, (%rax) leaq 0x1b625(%rip), %rdx # 0x513e4 leaq 0x1870b(%rip), %r8 # 0x4e4d1 leaq 0xd0(%rsp), %rdi leaq 0xb0(%rsp), %rsi leaq 0x58(%rsp), %rcx leaq 0x38(%rsp), %r9 callq 0x40350 jmp 0x35de7 leaq 0x38(%rsp), %rdi callq 0x6360 leaq 0x58(%rsp), %rdi callq 0x6360 leaq 0xb0(%rsp), %rdi callq 0x6360 leaq 0x90(%rsp), %rdi callq 0x6360 leaq 0x8f(%rsp), %rdi callq 0x6640 movl 0x10c(%rsp), %eax movl %eax, 0x14(%rsp) movq 0x100(%rsp), %rax movq (%rax), %rax movq %rax, 0x18(%rsp) leaq 0xd0(%rsp), %rdi callq 0x61f0 movq 0x20(%rsp), %rdi movl 0x14(%rsp), %esi movq 0x18(%rsp), %rdx movq %rax, %rcx callq 0x40510 jmp 0x35e62 leaq 0xd0(%rsp), %rdi callq 0x6360 movq 0x28(%rsp), %rax addq $0x118, %rsp # imm = 0x118 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0x35f07 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0x35efa movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0x35eed movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) jmp 0x35ee3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0x38(%rsp), %rdi callq 0x6360 leaq 0x58(%rsp), %rdi callq 0x6360 leaq 0xb0(%rsp), %rdi callq 0x6360 leaq 0x90(%rsp), %rdi callq 0x6360 leaq 0x8f(%rsp), %rdi callq 0x6640 jmp 0x35f34 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x80(%rsp) movl %eax, 0x7c(%rsp) leaq 0xd0(%rsp), %rdi callq 0x6360 movq 0x80(%rsp), %rdi callq 0x6970 nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: sub rsp, 118h mov [rsp+118h+var_F8], rdi mov rax, rdi mov [rsp+118h+var_F0], rax mov [rsp+118h+var_8], rdi mov [rsp+118h+var_C], esi mov [rsp+118h+var_18], rdx mov [rsp+118h+var_20], rcx mov [rsp+118h+var_28], r8 lea rdi, [rsp+118h+var_89] mov [rsp+118h+var_E8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+118h+var_E8] lea rsi, aParseError; "parse_error" lea rdi, [rsp+118h+var_88] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_35D68: mov edx, [rsp+118h+var_C] lea rdi, [rsp+118h+var_68] lea rsi, [rsp+118h+var_88] call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) jmp short $+2 loc_35D86: mov rsi, [rsp+118h+var_18] lea rdi, [rsp+118h+var_C0] call _ZN8nlohmann16json_abi_v3_11_36detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE; nlohmann::json_abi_v3_11_3::detail::parse_error::position_string(nlohmann::json_abi_v3_11_3::detail::position_t const&) jmp short $+2 loc_35D9A: xor eax, eax mov esi, eax lea rdi, [rsp+118h+var_E0] call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics(decltype(nullptr)) jmp short $+2 loc_35DAA: mov rcx, [rsp+118h+var_20] mov rax, rsp mov [rax], rcx lea rdx, aParseError_0; "parse error" lea r8, aSubtype+9; ": " lea rdi, [rsp+118h+var_48] lea rsi, [rsp+118h+var_68] lea rcx, [rsp+118h+var_C0] lea r9, [rsp+118h+var_E0] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_RA12_KcS8_RA3_S9_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>(std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&) jmp short $+2 loc_35DE7: lea rdi, [rsp+118h+var_E0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_C0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_68] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_88] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_89] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov eax, [rsp+118h+var_C] mov [rsp+118h+var_104], eax mov rax, [rsp+118h+var_18] mov rax, [rax] mov [rsp+118h+var_100], rax lea rdi, [rsp+118h+var_48] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rsp+118h+var_F8]; this mov esi, [rsp+118h+var_104]; int mov rdx, [rsp+118h+var_100]; unsigned __int64 mov rcx, rax; char * call _ZN8nlohmann16json_abi_v3_11_36detail11parse_errorC2EimPKc; nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error(int,ulong,char const*) jmp short $+2 loc_35E62: lea rdi, [rsp+118h+var_48] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+118h+var_F0] add rsp, 118h retn mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_35F07 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_35EFA mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_35EED mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax jmp short loc_35EE3 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_35EE3: lea rdi, [rsp+arg_50] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_35EED: lea rdi, [rsp+arg_A8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_35EFA: lea rdi, [rsp+arg_88] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_35F07: lea rdi, [rsp+arg_87] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_35F34 mov rcx, rax mov eax, edx mov [rsp+arg_78], rcx mov [rsp+arg_74], eax lea rdi, [rsp+arg_C8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_35F34: mov rdi, [rsp+arg_78] call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::parse_error * ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( nlohmann::json_abi_v3_11_3::detail::parse_error *a1, int a2, unsigned long long *a3, long long a4, long long a5) { int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d const char *v9; // rax int v11; // [rsp+14h] [rbp-104h] unsigned long long v12; // [rsp+18h] [rbp-100h] _BYTE v13[32]; // [rsp+38h] [rbp-E0h] BYREF _BYTE v14[55]; // [rsp+58h] [rbp-C0h] BYREF char v15; // [rsp+8Fh] [rbp-89h] BYREF _BYTE v16[32]; // [rsp+90h] [rbp-88h] BYREF _BYTE v17[32]; // [rsp+B0h] [rbp-68h] BYREF _BYTE v18[32]; // [rsp+D0h] [rbp-48h] BYREF long long v19; // [rsp+F0h] [rbp-28h] long long v20; // [rsp+F8h] [rbp-20h] unsigned long long *v21; // [rsp+100h] [rbp-18h] int v22; // [rsp+10Ch] [rbp-Ch] nlohmann::json_abi_v3_11_3::detail::parse_error *v23; // [rsp+110h] [rbp-8h] v23 = a1; v22 = a2; v21 = a3; v20 = a4; v19 = a5; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v16, (long long)"parse_error", (long long)&v15); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v17, (long long)v16, v22); nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11]( (unsigned int)v14, (_DWORD)v21, v5, v6, v7, v8); nlohmann::json_abi_v3_11_3::detail::exception::diagnostics[abi:cxx11]((long long)v13, 0LL); nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,char const(&)[12],std::string,char const(&)[3],std::string,std::string const&>( (unsigned int)v18, (unsigned int)v17, (unsigned int)"parse error", (unsigned int)v14, (unsigned int)": ", (unsigned int)v13, v20); std::string::~string(v13); std::string::~string(v14); std::string::~string(v17); std::string::~string(v16); std::allocator<char>::~allocator(&v15); v11 = v22; v12 = *v21; v9 = (const char *)std::string::c_str(v18); nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error(a1, v11, v12, v9); std::string::~string(v18); return a1; }
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: SUB RSP,0x118 MOV qword ptr [RSP + 0x20],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x110],RDI MOV dword ptr [RSP + 0x10c],ESI MOV qword ptr [RSP + 0x100],RDX MOV qword ptr [RSP + 0xf8],RCX MOV qword ptr [RSP + 0xf0],R8 LEA RDI,[RSP + 0x8f] MOV qword ptr [RSP + 0x30],RDI CALL 0x00106980 MOV RDX,qword ptr [RSP + 0x30] LAB_00135d52: LEA RSI,[0x1513d8] LEA RDI,[RSP + 0x90] CALL 0x001080f0 JMP 0x00135d68 LAB_00135d68: MOV EDX,dword ptr [RSP + 0x10c] LAB_00135d6f: LEA RDI,[RSP + 0xb0] LEA RSI,[RSP + 0x90] CALL 0x0010f670 JMP 0x00135d86 LAB_00135d86: MOV RSI,qword ptr [RSP + 0x100] LAB_00135d8e: LEA RDI,[RSP + 0x58] CALL 0x00140440 JMP 0x00135d9a LAB_00135d9a: XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0x38] CALL 0x001102b0 JMP 0x00135daa LAB_00135daa: MOV RCX,qword ptr [RSP + 0xf8] LAB_00135db2: MOV RAX,RSP MOV qword ptr [RAX],RCX LEA RDX,[0x1513e4] LEA R8,[0x14e4d1] LEA RDI,[RSP + 0xd0] LEA RSI,[RSP + 0xb0] LEA RCX,[RSP + 0x58] LEA R9,[RSP + 0x38] CALL 0x00140350 JMP 0x00135de7 LAB_00135de7: LEA RDI,[RSP + 0x38] CALL 0x00106360 LEA RDI,[RSP + 0x58] CALL 0x00106360 LEA RDI,[RSP + 0xb0] CALL 0x00106360 LEA RDI,[RSP + 0x90] CALL 0x00106360 LEA RDI,[RSP + 0x8f] CALL 0x00106640 MOV EAX,dword ptr [RSP + 0x10c] MOV dword ptr [RSP + 0x14],EAX MOV RAX,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0xd0] CALL 0x001061f0 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,dword ptr [RSP + 0x14] MOV RDX,qword ptr [RSP + 0x18] MOV RCX,RAX LAB_00135e5b: CALL 0x00140510 LAB_00135e60: JMP 0x00135e62 LAB_00135e62: LEA RDI,[RSP + 0xd0] CALL 0x00106360 MOV RAX,qword ptr [RSP + 0x28] ADD RSP,0x118 RET
parse_error * _ZN8nlohmann16json_abi_v3_11_36detail11parse_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNS1_10position_tERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (parse_error *param_1,int param_2,position_t *param_3,string *param_4,int8 param_5) { ulong uVar1; int iVar2; char *pcVar3; exception local_e0 [32]; parse_error local_c0 [55]; allocator local_89; string local_88 [32]; exception local_68 [32]; detail local_48 [32]; int8 local_28; string *local_20; position_t *local_18; int local_c; parse_error *local_8; local_28 = param_5; local_20 = param_4; local_18 = param_3; local_c = param_2; local_8 = param_1; std::allocator<char>::allocator(); /* try { // try from 00135d52 to 00135d65 has its CatchHandler @ 00135e7c */ std::__cxx11::string::string<std::allocator<char>>(local_88,"parse_error",&local_89); /* try { // try from 00135d6f to 00135d83 has its CatchHandler @ 00135e8f */ nlohmann::json_abi_v3_11_3::detail::exception::name(local_68,local_88,local_c); /* try { // try from 00135d8e to 00135d97 has its CatchHandler @ 00135ea2 */ nlohmann::json_abi_v3_11_3::detail::parse_error::position_string_abi_cxx11_(local_c0,local_18); /* try { // try from 00135d9a to 00135da7 has its CatchHandler @ 00135eb5 */ nlohmann::json_abi_v3_11_3::detail::exception::diagnostics_abi_cxx11_ (local_e0,(_func_decltype_nullptr *)0x0); /* try { // try from 00135db2 to 00135de4 has its CatchHandler @ 00135ec8 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,std::__cxx11::string,char_const(&)[12],std::__cxx11::string,char_const(&)[3],std::__cxx11::string,std::__cxx11::string_const&> (local_48,(string *)local_68,"parse error",(string *)local_c0,": ",(string *)local_e0, local_20); std::__cxx11::string::~string((string *)local_e0); std::__cxx11::string::~string((string *)local_c0); std::__cxx11::string::~string((string *)local_68); std::__cxx11::string::~string(local_88); std::allocator<char>::~allocator((allocator<char> *)&local_89); iVar2 = local_c; uVar1 = *(ulong *)local_18; pcVar3 = (char *)std::__cxx11::string::c_str(); /* try { // try from 00135e5b to 00135e5f has its CatchHandler @ 00135f16 */ nlohmann::json_abi_v3_11_3::detail::parse_error::parse_error(param_1,iVar2,uVar1,pcVar3); std::__cxx11::string::~string((string *)local_48); return param_1; }