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
50,300
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&)
monkey531[P]llama/common/json.hpp
inline int find_largest_pow10(const std::uint32_t n, std::uint32_t& pow10) { // LCOV_EXCL_START if (n >= 1000000000) { pow10 = 1000000000; return 10; } // LCOV_EXCL_STOP if (n >= 100000000) { pow10 = 100000000; return 9; } if (n >= 10000000) { pow10 = 10000000; return 8; } if (n >= 1000000) { pow10 = 1000000; return 7; } if (n >= 100000) { pow10 = 100000; return 6; } if (n >= 10000) { pow10 = 10000; return 5; } if (n >= 1000) { pow10 = 1000; return 4; } if (n >= 100) { pow10 = 100; return 3; } if (n >= 10) { pow10 = 10; return 2; } pow10 = 1; return 1; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&): cmpl $0x3b9ac9ff, %edi # imm = 0x3B9AC9FF jbe 0xa4559 pushq $0xa popq %rax movl $0x3b9aca00, %ecx # imm = 0x3B9ACA00 jmp 0xa45e1 cmpl $0x5f5e0ff, %edi # imm = 0x5F5E0FF jbe 0xa456b pushq $0x9 popq %rax movl $0x5f5e100, %ecx # imm = 0x5F5E100 jmp 0xa45e1 cmpl $0x98967f, %edi # imm = 0x98967F jbe 0xa457d pushq $0x8 popq %rax movl $0x989680, %ecx # imm = 0x989680 jmp 0xa45e1 cmpl $0xf423f, %edi # imm = 0xF423F jbe 0xa458f pushq $0x7 popq %rax movl $0xf4240, %ecx # imm = 0xF4240 jmp 0xa45e1 cmpl $0x1869f, %edi # imm = 0x1869F jbe 0xa45a1 pushq $0x6 popq %rax movl $0x186a0, %ecx # imm = 0x186A0 jmp 0xa45e1 cmpl $0x270f, %edi # imm = 0x270F jbe 0xa45b3 pushq $0x5 popq %rax movl $0x2710, %ecx # imm = 0x2710 jmp 0xa45e1 cmpl $0x3e7, %edi # imm = 0x3E7 jbe 0xa45c5 pushq $0x4 popq %rax movl $0x3e8, %ecx # imm = 0x3E8 jmp 0xa45e1 cmpl $0x63, %edi jbe 0xa45d2 pushq $0x3 popq %rax pushq $0x64 popq %rcx jmp 0xa45e1 xorl %eax, %eax cmpl $0xa, %edi setae %al leal (%rax,%rax,8), %ecx incl %ecx incl %eax movl %ecx, (%rsi) retq
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl18find_largest_pow10EjRj: cmp edi, 3B9AC9FFh jbe short loc_A4559 push 0Ah pop rax mov ecx, 3B9ACA00h jmp loc_A45E1 loc_A4559: cmp edi, 5F5E0FFh jbe short loc_A456B push 9 pop rax mov ecx, 5F5E100h jmp short loc_A45E1 loc_A456B: cmp edi, 98967Fh jbe short loc_A457D push 8 pop rax mov ecx, 989680h jmp short loc_A45E1 loc_A457D: cmp edi, offset unk_F423F jbe short loc_A458F push 7 pop rax mov ecx, offset unk_F4240 jmp short loc_A45E1 loc_A458F: cmp edi, 1869Fh jbe short loc_A45A1 push 6 pop rax mov ecx, 186A0h jmp short loc_A45E1 loc_A45A1: cmp edi, 270Fh jbe short loc_A45B3 push 5 pop rax mov ecx, 2710h jmp short loc_A45E1 loc_A45B3: cmp edi, 3E7h jbe short loc_A45C5 push 4 pop rax mov ecx, 3E8h jmp short loc_A45E1 loc_A45C5: cmp edi, 63h ; 'c' jbe short loc_A45D2 push 3 pop rax push 64h ; 'd' pop rcx jmp short loc_A45E1 loc_A45D2: xor eax, eax cmp edi, 0Ah setnb al lea ecx, [rax+rax*8] inc ecx inc eax loc_A45E1: mov [rsi], ecx retn
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *this, _DWORD *a2, unsigned int *a3) { long long result; // rax void *v4; // rcx BOOL v5; // eax if ( (unsigned int)this <= 0x3B9AC9FF ) { if ( (unsigned int)this <= 0x5F5E0FF ) { if ( (unsigned int)this <= 0x98967F ) { if ( (unsigned int)this <= (unsigned int)&unk_F423F ) { if ( (unsigned int)this <= 0x1869F ) { if ( (unsigned int)this <= 0x270F ) { if ( (unsigned int)this <= 0x3E7 ) { if ( (unsigned int)this <= 0x63 ) { v5 = (unsigned int)this >= 0xA; LODWORD(v4) = 9 * v5 + 1; result = (unsigned int)(v5 + 1); } else { result = 3LL; LODWORD(v4) = 100; } } else { result = 4LL; LODWORD(v4) = 1000; } } else { result = 5LL; LODWORD(v4) = 10000; } } else { result = 6LL; LODWORD(v4) = 100000; } } else { result = 7LL; v4 = &unk_F4240; } } else { result = 8LL; LODWORD(v4) = 10000000; } } else { result = 9LL; LODWORD(v4) = 100000000; } } else { result = 10LL; LODWORD(v4) = 1000000000; } *a2 = (_DWORD)v4; return result; }
find_largest_pow10: CMP EDI,0x3b9ac9ff JBE 0x001a4559 PUSH 0xa POP RAX MOV ECX,0x3b9aca00 JMP 0x001a45e1 LAB_001a4559: CMP EDI,0x5f5e0ff JBE 0x001a456b PUSH 0x9 POP RAX MOV ECX,0x5f5e100 JMP 0x001a45e1 LAB_001a456b: CMP EDI,0x98967f JBE 0x001a457d PUSH 0x8 POP RAX MOV ECX,0x989680 JMP 0x001a45e1 LAB_001a457d: CMP EDI,0xf423f JBE 0x001a458f PUSH 0x7 POP RAX MOV ECX,0xf4240 JMP 0x001a45e1 LAB_001a458f: CMP EDI,0x1869f JBE 0x001a45a1 PUSH 0x6 POP RAX MOV ECX,0x186a0 JMP 0x001a45e1 LAB_001a45a1: CMP EDI,0x270f JBE 0x001a45b3 PUSH 0x5 POP RAX MOV ECX,0x2710 JMP 0x001a45e1 LAB_001a45b3: CMP EDI,0x3e7 JBE 0x001a45c5 PUSH 0x4 POP RAX MOV ECX,0x3e8 JMP 0x001a45e1 LAB_001a45c5: CMP EDI,0x63 JBE 0x001a45d2 PUSH 0x3 POP RAX PUSH 0x64 POP RCX JMP 0x001a45e1 LAB_001a45d2: XOR EAX,EAX CMP EDI,0xa SETNC AL LEA ECX,[RAX + RAX*0x8] INC ECX INC EAX LAB_001a45e1: MOV dword ptr [RSI],ECX RET
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(unsigned int, unsigned int&) */ char nlohmann::json_abi_v3_11_3::detail::dtoa_impl::find_largest_pow10(uint param_1,uint *param_2) { char cVar1; uint uVar2; if (param_1 < 1000000000) { if (param_1 < 100000000) { if (param_1 < 10000000) { if (param_1 < 1000000) { if (param_1 < 100000) { if (param_1 < 10000) { if (param_1 < 1000) { if (param_1 < 100) { uVar2 = (uint)(9 < param_1) * 9 + 1; cVar1 = (9 < param_1) + '\x01'; } else { cVar1 = '\x03'; uVar2 = 100; } } else { cVar1 = '\x04'; uVar2 = 1000; } } else { cVar1 = '\x05'; uVar2 = 10000; } } else { cVar1 = '\x06'; uVar2 = 100000; } } else { cVar1 = '\a'; uVar2 = 1000000; } } else { cVar1 = '\b'; uVar2 = 10000000; } } else { cVar1 = '\t'; uVar2 = 100000000; } } else { cVar1 = '\n'; uVar2 = 1000000000; } *param_2 = uVar2; return cVar1; }
50,301
MainWindow::on_extBtn_clicked()
The-SGR[P]silly-clicker/mainwindow.cpp
void MainWindow::on_extBtn_clicked() { QMessageBox::StandardButton exit1 = QMessageBox::question(this, "Exit", "r u sure?", QMessageBox::No | QMessageBox::Yes); if (exit1 == QMessageBox::Yes) { QMessageBox::StandardButton exit2 = QMessageBox::question(this, "Exit", "r u completely sure?", QMessageBox::No | QMessageBox::Yes); if (exit2 == QMessageBox::Yes) { QMessageBox::information(this, "Bai!!!!!", "Bai!!!!!!!!!!!"); QApplication::quit(); } } }
O3
cpp
MainWindow::on_extBtn_clicked(): pushq %rbp pushq %r14 pushq %rbx subq $0x60, %rsp movq %rdi, %rbx leaq 0x220d(%rip), %rdx # 0x7259 leaq 0x40(%rsp), %r14 movl $0x4, %esi movq %r14, %rdi callq 0x4280 movaps (%r14), %xmm0 movaps %xmm0, (%rsp) movq 0x10(%r14), %rax movq %rax, 0x10(%rsp) leaq 0x21e8(%rip), %rdx # 0x725e leaq 0x40(%rsp), %rdi movl $0x9, %esi callq 0x4280 movaps 0x40(%rsp), %xmm0 leaq 0x20(%rsp), %rdx movaps %xmm0, (%rdx) movq 0x50(%rsp), %rax movq %rax, 0x10(%rdx) movq %rsp, %rsi movq %rbx, %rdi movl $0x14000, %ecx # imm = 0x14000 xorl %r8d, %r8d callq 0x40d0 movl %eax, %ebp movq 0x20(%rsp), %rax testq %rax, %rax je 0x50d3 lock decl (%rax) jne 0x50d3 movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x4260 movq (%rsp), %rax testq %rax, %rax je 0x50f4 lock decl (%rax) jne 0x50f4 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x4260 cmpl $0x4000, %ebp # imm = 0x4000 jne 0x526d leaq 0x2152(%rip), %rdx # 0x7259 leaq 0x40(%rsp), %r14 movl $0x4, %esi movq %r14, %rdi callq 0x4280 movaps (%r14), %xmm0 movaps %xmm0, (%rsp) movq 0x10(%r14), %rax movq %rax, 0x10(%rsp) leaq 0x2137(%rip), %rdx # 0x7268 leaq 0x40(%rsp), %rdi movl $0x14, %esi callq 0x4280 movaps 0x40(%rsp), %xmm0 leaq 0x20(%rsp), %rdx movaps %xmm0, (%rdx) movq 0x50(%rsp), %rax movq %rax, 0x10(%rdx) movq %rsp, %rsi movq %rbx, %rdi movl $0x14000, %ecx # imm = 0x14000 xorl %r8d, %r8d callq 0x40d0 movl %eax, %ebp movq 0x20(%rsp), %rax testq %rax, %rax je 0x518e lock decl (%rax) jne 0x518e movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x4260 movq (%rsp), %rax testq %rax, %rax je 0x51af lock decl (%rax) jne 0x51af movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x4260 cmpl $0x4000, %ebp # imm = 0x4000 jne 0x526d leaq 0x20bb(%rip), %rdx # 0x727d leaq 0x40(%rsp), %r14 movl $0x8, %esi movq %r14, %rdi callq 0x4280 movaps (%r14), %xmm0 movaps %xmm0, (%rsp) movq 0x10(%r14), %rax movq %rax, 0x10(%rsp) leaq 0x209a(%rip), %rdx # 0x7286 leaq 0x40(%rsp), %rdi movl $0xe, %esi callq 0x4280 movaps 0x40(%rsp), %xmm0 leaq 0x20(%rsp), %rdx movaps %xmm0, (%rdx) movq 0x50(%rsp), %rax movq %rax, 0x10(%rdx) movq %rsp, %rsi movq %rbx, %rdi movl $0x400, %ecx # imm = 0x400 xorl %r8d, %r8d callq 0x40f0 movq 0x20(%rsp), %rax testq %rax, %rax je 0x5247 lock decl (%rax) jne 0x5247 movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x4260 movq (%rsp), %rax testq %rax, %rax je 0x5268 lock decl (%rax) jne 0x5268 movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x4260 callq 0x4180 addq $0x60, %rsp popq %rbx popq %r14 popq %rbp retq jmp 0x527e jmp 0x52a6 jmp 0x527e jmp 0x52a6 movq %rax, %rbx movq 0x20(%rsp), %rax testq %rax, %rax je 0x52a9 lock decl (%rax) jne 0x52a9 movq 0x20(%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x4260 jmp 0x52a9 movq %rax, %rbx movq (%rsp), %rax testq %rax, %rax je 0x52ca lock decl (%rax) jne 0x52ca movq (%rsp), %rdi movl $0x2, %esi movl $0x8, %edx callq 0x4260 movq %rbx, %rdi callq 0x41e0
_ZN10MainWindow17on_extBtn_clickedEv: push rbp push r14 push rbx sub rsp, 60h mov rbx, rdi lea rdx, aExit; "Exit" lea r14, [rsp+78h+var_38] mov esi, 4 mov rdi, r14 call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView) movaps xmm0, xmmword ptr [r14] movaps xmmword ptr [rsp+78h+var_78], xmm0 mov rax, [r14+10h] mov [rsp+78h+var_68], rax lea rdx, aRUSure; "r u sure?" lea rdi, [rsp+78h+var_38] mov esi, 9 call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView) movaps xmm0, [rsp+78h+var_38] lea rdx, [rsp+78h+var_58] movaps xmmword ptr [rdx], xmm0 mov rax, [rsp+78h+var_28] mov [rdx+10h], rax mov rsi, rsp mov rdi, rbx mov ecx, offset unk_14000 xor r8d, r8d call __ZN11QMessageBox8questionEP7QWidgetRK7QStringS4_6QFlagsINS_14StandardButtonEES6_; QMessageBox::question(QWidget *,QString const&,QString const&,QFlags<QMessageBox::StandardButton>,QMessageBox::StandardButton) mov ebp, eax mov rax, [rsp+78h+var_58] test rax, rax jz short loc_50D3 lock dec dword ptr [rax] jnz short loc_50D3 mov rdi, [rsp+78h+var_58] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_50D3: mov rax, [rsp+78h+var_78] test rax, rax jz short loc_50F4 lock dec dword ptr [rax] jnz short loc_50F4 mov rdi, [rsp+78h+var_78] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_50F4: cmp ebp, 4000h jnz loc_526D lea rdx, aExit; "Exit" lea r14, [rsp+78h+var_38] mov esi, 4 mov rdi, r14 call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView) movaps xmm0, xmmword ptr [r14] movaps xmmword ptr [rsp+78h+var_78], xmm0 mov rax, [r14+10h] mov [rsp+78h+var_68], rax lea rdx, aRUCompletelySu; "r u completely sure?" lea rdi, [rsp+78h+var_38] mov esi, 14h call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView) movaps xmm0, [rsp+78h+var_38] lea rdx, [rsp+78h+var_58] movaps xmmword ptr [rdx], xmm0 mov rax, [rsp+78h+var_28] mov [rdx+10h], rax mov rsi, rsp mov rdi, rbx mov ecx, offset unk_14000 xor r8d, r8d call __ZN11QMessageBox8questionEP7QWidgetRK7QStringS4_6QFlagsINS_14StandardButtonEES6_; QMessageBox::question(QWidget *,QString const&,QString const&,QFlags<QMessageBox::StandardButton>,QMessageBox::StandardButton) mov ebp, eax mov rax, [rsp+78h+var_58] test rax, rax jz short loc_518E lock dec dword ptr [rax] jnz short loc_518E mov rdi, [rsp+78h+var_58] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_518E: mov rax, [rsp+78h+var_78] test rax, rax jz short loc_51AF lock dec dword ptr [rax] jnz short loc_51AF mov rdi, [rsp+78h+var_78] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_51AF: cmp ebp, 4000h jnz loc_526D lea rdx, aBai; "Bai!!!!!" lea r14, [rsp+78h+var_38] mov esi, 8 mov rdi, r14 call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView) movaps xmm0, xmmword ptr [r14] movaps xmmword ptr [rsp+78h+var_78], xmm0 mov rax, [r14+10h] mov [rsp+78h+var_68], rax lea rdx, aBai_0; "Bai!!!!!!!!!!!" lea rdi, [rsp+78h+var_38] mov esi, 0Eh call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView) movaps xmm0, [rsp+78h+var_38] lea rdx, [rsp+78h+var_58] movaps xmmword ptr [rdx], xmm0 mov rax, [rsp+78h+var_28] mov [rdx+10h], rax mov rsi, rsp mov rdi, rbx mov ecx, 400h xor r8d, r8d call __ZN11QMessageBox11informationEP7QWidgetRK7QStringS4_6QFlagsINS_14StandardButtonEES6_; QMessageBox::information(QWidget *,QString const&,QString const&,QFlags<QMessageBox::StandardButton>,QMessageBox::StandardButton) mov rax, [rsp+78h+var_58] test rax, rax jz short loc_5247 lock dec dword ptr [rax] jnz short loc_5247 mov rdi, [rsp+78h+var_58] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_5247: mov rax, [rsp+78h+var_78] test rax, rax jz short loc_5268 lock dec dword ptr [rax] jnz short loc_5268 mov rdi, [rsp+78h+var_78]; this mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_5268: call __ZN16QCoreApplication4quitEv; QCoreApplication::quit(void) loc_526D: add rsp, 60h pop rbx pop r14 pop rbp retn jmp short loc_527E jmp short loc_52A6 jmp short loc_527E jmp short loc_52A6 loc_527E: mov rbx, rax mov rax, [rsp+arg_18] test rax, rax jz short loc_52A9 lock dec dword ptr [rax] jnz short loc_52A9 mov rdi, [rsp+arg_18] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) jmp short loc_52A9 loc_52A6: mov rbx, rax loc_52A9: mov rax, [rsp+0] test rax, rax jz short loc_52CA lock dec dword ptr [rax] jnz short loc_52CA mov rdi, [rsp+0] mov esi, 2 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) loc_52CA: mov rdi, rbx call __Unwind_Resume
QCoreApplication * MainWindow::on_extBtn_clicked(MainWindow *this) { int v1; // ebp QCoreApplication *result; // rax int v3; // ebp QCoreApplication *v4[2]; // [rsp+0h] [rbp-78h] BYREF long long v5; // [rsp+10h] [rbp-68h] __int128 v6; // [rsp+20h] [rbp-58h] BYREF long long v7; // [rsp+30h] [rbp-48h] __int128 v8; // [rsp+40h] [rbp-38h] BYREF long long v9; // [rsp+50h] [rbp-28h] QString::fromUtf8(&v8, 4LL, "Exit"); *(_OWORD *)v4 = v8; v5 = v9; QString::fromUtf8(&v8, 9LL, "r u sure?"); v6 = v8; v7 = v9; v1 = QMessageBox::question(this, v4, &v6, &unk_14000, 0LL); if ( (_QWORD)v6 && !_InterlockedDecrement((volatile signed __int32 *)v6) ) QArrayData::deallocate(v6, 2LL, 8LL); result = v4[0]; if ( v4[0] && !_InterlockedDecrement((volatile signed __int32 *)v4[0]) ) result = (QCoreApplication *)QArrayData::deallocate(v4[0], 2LL, 8LL); if ( v1 == 0x4000 ) { QString::fromUtf8(&v8, 4LL, "Exit"); *(_OWORD *)v4 = v8; v5 = v9; QString::fromUtf8(&v8, 20LL, "r u completely sure?"); v6 = v8; v7 = v9; v3 = QMessageBox::question(this, v4, &v6, &unk_14000, 0LL); if ( (_QWORD)v6 && !_InterlockedDecrement((volatile signed __int32 *)v6) ) QArrayData::deallocate(v6, 2LL, 8LL); result = v4[0]; if ( v4[0] && !_InterlockedDecrement((volatile signed __int32 *)v4[0]) ) result = (QCoreApplication *)QArrayData::deallocate(v4[0], 2LL, 8LL); if ( v3 == 0x4000 ) { QString::fromUtf8(&v8, 8LL, "Bai!!!!!"); *(_OWORD *)v4 = v8; v5 = v9; QString::fromUtf8(&v8, 14LL, "Bai!!!!!!!!!!!"); v6 = v8; v7 = v9; QMessageBox::information(this, v4, &v6, 1024LL, 0LL); if ( (_QWORD)v6 && !_InterlockedDecrement((volatile signed __int32 *)v6) ) { this = (MainWindow *)v6; QArrayData::deallocate(v6, 2LL, 8LL); } if ( v4[0] ) { if ( !_InterlockedDecrement((volatile signed __int32 *)v4[0]) ) { this = v4[0]; QArrayData::deallocate(v4[0], 2LL, 8LL); } } return (QCoreApplication *)QCoreApplication::quit(this); } } return result; }
on_extBtn_clicked: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x60 MOV RBX,RDI LEA RDX,[0x107259] LEA R14,[RSP + 0x40] MOV ESI,0x4 MOV RDI,R14 CALL 0x00104280 MOVAPS XMM0,xmmword ptr [R14] MOVAPS xmmword ptr [RSP],XMM0 MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX LAB_0010506f: LEA RDX,[0x10725e] LEA RDI,[RSP + 0x40] MOV ESI,0x9 CALL 0x00104280 MOVAPS XMM0,xmmword ptr [RSP + 0x40] LEA RDX,[RSP + 0x20] MOVAPS xmmword ptr [RDX],XMM0 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RDX + 0x10],RAX LAB_0010509b: MOV RSI,RSP MOV RDI,RBX MOV ECX,0x14000 XOR R8D,R8D CALL 0x001040d0 LAB_001050ae: MOV EBP,EAX MOV RAX,qword ptr [RSP + 0x20] TEST RAX,RAX JZ 0x001050d3 DEC.LOCK dword ptr [RAX] JNZ 0x001050d3 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00104260 LAB_001050d3: MOV RAX,qword ptr [RSP] TEST RAX,RAX JZ 0x001050f4 DEC.LOCK dword ptr [RAX] JNZ 0x001050f4 MOV RDI,qword ptr [RSP] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00104260 LAB_001050f4: CMP EBP,0x4000 JNZ 0x0010526d LEA RDX,[0x107259] LEA R14,[RSP + 0x40] MOV ESI,0x4 MOV RDI,R14 CALL 0x00104280 MOVAPS XMM0,xmmword ptr [R14] MOVAPS xmmword ptr [RSP],XMM0 MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX LAB_0010512a: LEA RDX,[0x107268] LEA RDI,[RSP + 0x40] MOV ESI,0x14 CALL 0x00104280 MOVAPS XMM0,xmmword ptr [RSP + 0x40] LEA RDX,[RSP + 0x20] MOVAPS xmmword ptr [RDX],XMM0 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RDX + 0x10],RAX LAB_00105156: MOV RSI,RSP MOV RDI,RBX MOV ECX,0x14000 XOR R8D,R8D CALL 0x001040d0 LAB_00105169: MOV EBP,EAX MOV RAX,qword ptr [RSP + 0x20] TEST RAX,RAX JZ 0x0010518e DEC.LOCK dword ptr [RAX] JNZ 0x0010518e MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00104260 LAB_0010518e: MOV RAX,qword ptr [RSP] TEST RAX,RAX JZ 0x001051af DEC.LOCK dword ptr [RAX] JNZ 0x001051af MOV RDI,qword ptr [RSP] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00104260 LAB_001051af: CMP EBP,0x4000 JNZ 0x0010526d LEA RDX,[0x10727d] LEA R14,[RSP + 0x40] MOV ESI,0x8 MOV RDI,R14 CALL 0x00104280 MOVAPS XMM0,xmmword ptr [R14] MOVAPS xmmword ptr [RSP],XMM0 MOV RAX,qword ptr [R14 + 0x10] MOV qword ptr [RSP + 0x10],RAX LAB_001051e5: LEA RDX,[0x107286] LEA RDI,[RSP + 0x40] MOV ESI,0xe CALL 0x00104280 MOVAPS XMM0,xmmword ptr [RSP + 0x40] LEA RDX,[RSP + 0x20] MOVAPS xmmword ptr [RDX],XMM0 MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RDX + 0x10],RAX LAB_00105211: MOV RSI,RSP MOV RDI,RBX MOV ECX,0x400 XOR R8D,R8D CALL 0x001040f0 LAB_00105224: MOV RAX,qword ptr [RSP + 0x20] TEST RAX,RAX JZ 0x00105247 DEC.LOCK dword ptr [RAX] JNZ 0x00105247 MOV RDI,qword ptr [RSP + 0x20] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00104260 LAB_00105247: MOV RAX,qword ptr [RSP] TEST RAX,RAX JZ 0x00105268 DEC.LOCK dword ptr [RAX] JNZ 0x00105268 MOV RDI,qword ptr [RSP] MOV ESI,0x2 MOV EDX,0x8 CALL 0x00104260 LAB_00105268: CALL 0x00104180 LAB_0010526d: ADD RSP,0x60 POP RBX POP R14 POP RBP RET
/* MainWindow::on_extBtn_clicked() */ void __thiscall MainWindow::on_extBtn_clicked(MainWindow *this) { int *piVar1; int iVar2; int4 local_78; int4 uStack_74; int4 uStack_70; int4 uStack_6c; int8 local_68; int4 local_58; int4 uStack_54; int4 uStack_50; int4 uStack_4c; int8 local_48; int4 local_38; int4 uStack_34; int4 uStack_30; int4 uStack_2c; int8 local_28; QString::fromUtf8(&local_38,4,&DAT_00107259); local_78 = local_38; uStack_74 = uStack_34; uStack_70 = uStack_30; uStack_6c = uStack_2c; local_68 = local_28; /* try { // try from 0010506f to 00105084 has its CatchHandler @ 001052a6 */ QString::fromUtf8(&local_38,9,"r u sure?"); local_58 = local_38; uStack_54 = uStack_34; uStack_50 = uStack_30; uStack_4c = uStack_2c; local_48 = local_28; /* try { // try from 0010509b to 001050ad has its CatchHandler @ 0010527e */ iVar2 = QMessageBox::question(this,&local_78,&local_58,0x14000,0); piVar1 = (int *)CONCAT44(uStack_54,local_58); if (piVar1 != (int *)0x0) { LOCK(); *piVar1 = *piVar1 + -1; UNLOCK(); if (*piVar1 == 0) { QArrayData::deallocate((QArrayData *)CONCAT44(uStack_54,local_58),2,8); } } piVar1 = (int *)CONCAT44(uStack_74,local_78); if (piVar1 != (int *)0x0) { LOCK(); *piVar1 = *piVar1 + -1; UNLOCK(); if (*piVar1 == 0) { QArrayData::deallocate((QArrayData *)CONCAT44(uStack_74,local_78),2,8); } } if (iVar2 == 0x4000) { QString::fromUtf8(&local_38,4,&DAT_00107259); local_78 = local_38; uStack_74 = uStack_34; uStack_70 = uStack_30; uStack_6c = uStack_2c; local_68 = local_28; /* try { // try from 0010512a to 0010513f has its CatchHandler @ 0010527c */ QString::fromUtf8(&local_38,0x14,"r u completely sure?"); local_58 = local_38; uStack_54 = uStack_34; uStack_50 = uStack_30; uStack_4c = uStack_2c; local_48 = local_28; /* try { // try from 00105156 to 00105168 has its CatchHandler @ 0010527a */ iVar2 = QMessageBox::question(this,&local_78,&local_58,0x14000,0); piVar1 = (int *)CONCAT44(uStack_54,local_58); if (piVar1 != (int *)0x0) { LOCK(); *piVar1 = *piVar1 + -1; UNLOCK(); if (*piVar1 == 0) { QArrayData::deallocate((QArrayData *)CONCAT44(uStack_54,local_58),2,8); } } piVar1 = (int *)CONCAT44(uStack_74,local_78); if (piVar1 != (int *)0x0) { LOCK(); *piVar1 = *piVar1 + -1; UNLOCK(); if (*piVar1 == 0) { QArrayData::deallocate((QArrayData *)CONCAT44(uStack_74,local_78),2,8); } } if (iVar2 == 0x4000) { QString::fromUtf8(&local_38,8,"Bai!!!!!"); local_78 = local_38; uStack_74 = uStack_34; uStack_70 = uStack_30; uStack_6c = uStack_2c; local_68 = local_28; /* try { // try from 001051e5 to 001051fa has its CatchHandler @ 00105278 */ QString::fromUtf8(&local_38,0xe,"Bai!!!!!!!!!!!"); local_58 = local_38; uStack_54 = uStack_34; uStack_50 = uStack_30; uStack_4c = uStack_2c; local_48 = local_28; /* try { // try from 00105211 to 00105223 has its CatchHandler @ 00105276 */ QMessageBox::information(this,&local_78,&local_58,0x400,0); piVar1 = (int *)CONCAT44(uStack_54,local_58); if (piVar1 != (int *)0x0) { LOCK(); *piVar1 = *piVar1 + -1; UNLOCK(); if (*piVar1 == 0) { QArrayData::deallocate((QArrayData *)CONCAT44(uStack_54,local_58),2,8); } } piVar1 = (int *)CONCAT44(uStack_74,local_78); if (piVar1 != (int *)0x0) { LOCK(); *piVar1 = *piVar1 + -1; UNLOCK(); if (*piVar1 == 0) { QArrayData::deallocate((QArrayData *)CONCAT44(uStack_74,local_78),2,8); } } QCoreApplication::quit(); } } return; }
50,302
nglog::GetExistingTempDirectories(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
ng-log[P]ng-log/src/logging.cc
NGLOG_NO_EXPORT void GetExistingTempDirectories(vector<string>& list) { GetTempDirectories(list); auto i_dir = list.begin(); while (i_dir != list.end()) { // zero arg to access means test for existence; no constant // defined on windows if (access(i_dir->c_str(), 0)) { i_dir = list.erase(i_dir); } else { ++i_dir; } } }
O3
cpp
nglog::GetExistingTempDirectories(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx callq 0xdc59 movq (%rbx), %r14 cmpq 0x8(%rbx), %r14 je 0xdde4 movq (%r14), %rdi xorl %esi, %esi callq 0x7920 testl %eax, %eax je 0xddde movq %rbx, %rdi movq %r14, %rsi callq 0x20116 movq %rax, %r14 jmp 0xddba addq $0x20, %r14 jmp 0xddba addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN5nglog26GetExistingTempDirectoriesERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE: push r14 push rbx push rax mov rbx, rdi call _ZN5nglogL18GetTempDirectoriesERSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS6_EE; nglog::GetTempDirectories(std::vector<std::string> &) mov r14, [rbx] loc_DDBA: cmp r14, [rbx+8] jz short loc_DDE4 mov rdi, [r14] xor esi, esi call _access test eax, eax jz short loc_DDDE mov rdi, rbx mov rsi, r14 call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE8_M_eraseEN9__gnu_cxx17__normal_iteratorIPS5_S7_EE; std::vector<std::string>::_M_erase(__gnu_cxx::__normal_iterator<std::string*,std::vector<std::string>>) mov r14, rax jmp short loc_DDBA loc_DDDE: add r14, 20h ; ' ' jmp short loc_DDBA loc_DDE4: add rsp, 8 pop rbx pop r14 retn
char nglog::GetExistingTempDirectories(_QWORD *a1) { long long v1; // rax _QWORD *v2; // r14 LOBYTE(v1) = nglog::GetTempDirectories(a1); v2 = (_QWORD *)*a1; while ( v2 != (_QWORD *)a1[1] ) { LODWORD(v1) = access(*v2, 0LL); if ( (_DWORD)v1 ) { v1 = std::vector<std::string>::_M_erase(a1, v2); v2 = (_QWORD *)v1; } else { v2 += 4; } } return v1; }
GetExistingTempDirectories: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x0010dc59 MOV R14,qword ptr [RBX] LAB_0010ddba: CMP R14,qword ptr [RBX + 0x8] JZ 0x0010dde4 MOV RDI,qword ptr [R14] XOR ESI,ESI CALL 0x00107920 TEST EAX,EAX JZ 0x0010ddde MOV RDI,RBX MOV RSI,R14 CALL 0x00120116 MOV R14,RAX JMP 0x0010ddba LAB_0010ddde: ADD R14,0x20 JMP 0x0010ddba LAB_0010dde4: ADD RSP,0x8 POP RBX POP R14 RET
/* nglog::GetExistingTempDirectories(std::vector<std::__cxx11::string, std::allocator<std::__cxx11::string > >&) */ void nglog::GetExistingTempDirectories(vector *param_1) { int iVar1; int8 *puVar2; GetTempDirectories(param_1); puVar2 = *(int8 **)param_1; while (puVar2 != *(int8 **)(param_1 + 8)) { iVar1 = access((char *)*puVar2,0); if (iVar1 == 0) { puVar2 = puVar2 + 4; } else { puVar2 = (int8 *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::_M_erase ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) param_1); } } return; }
50,303
minja::Value::set(minja::Value const&, minja::Value const&)
monkey531[P]llama/common/minja.hpp
void set(const Value& key, const Value& value) { if (!object_) throw std::runtime_error("Value is not an object: " + dump()); if (!key.is_hashable()) throw std::runtime_error("Unashable type: " + dump()); (*object_)[key.primitive_] = value; }
O3
cpp
minja::Value::set(minja::Value const&, minja::Value const&): pushq %rbp pushq %r14 pushq %rbx subq $0x40, %rsp movq %rdi, %r14 movq 0x20(%rdi), %rdi testq %rdi, %rdi je 0x4f7ff cmpq $0x0, 0x10(%rsi) jne 0x4f85c cmpq $0x0, 0x20(%rsi) jne 0x4f85c cmpq $0x0, 0x30(%rsi) jne 0x4f85c movq %rdx, %rbx addq $0x40, %rsi callq 0x4f99c movq %rax, %r14 movq 0x10(%rbx), %rax movq %rax, 0x10(%r14) leaq 0x18(%r14), %rdi leaq 0x18(%rbx), %rsi callq 0x4e924 movq 0x20(%rbx), %rax movq %rax, 0x20(%r14) leaq 0x28(%r14), %rdi leaq 0x28(%rbx), %rsi callq 0x4e924 movq 0x30(%rbx), %rax movq %rax, 0x30(%r14) leaq 0x38(%r14), %rdi leaq 0x38(%rbx), %rsi callq 0x4e924 addq $0x40, %rbx leaq 0x20(%rsp), %rdi movq %rbx, %rsi callq 0x2a3b8 addq $0x40, %r14 leaq 0x20(%rsp), %rbx movq %r14, %rdi movq %rbx, %rsi callq 0x2a0d4 movq %rbx, %rdi xorl %esi, %esi callq 0x3d0e4 movq %rbx, %rdi callq 0x49cd2 addq $0x40, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x10, %edi callq 0x18350 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x3d41a leaq 0x5b853(%rip), %rsi # 0xab078 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x245f5 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x18a80 xorl %ebp, %ebp movq 0x8c7a5(%rip), %rsi # 0xdbff0 movq 0x8c71e(%rip), %rdx # 0xdbf70 movq %rbx, %rdi callq 0x18b30 jmp 0x4f8b7 movl $0x10, %edi callq 0x18350 movq %rax, %rbx movq %rsp, %rdi movq %r14, %rsi movl $0xffffffff, %edx # imm = 0xFFFFFFFF xorl %ecx, %ecx callq 0x3d41a leaq 0x5b80f(%rip), %rsi # 0xab091 leaq 0x20(%rsp), %rdi movq %rsp, %rdx callq 0x245f5 movb $0x1, %bpl leaq 0x20(%rsp), %rsi movq %rbx, %rdi callq 0x18a80 xorl %ebp, %ebp movq 0x8c748(%rip), %rsi # 0xdbff0 movq 0x8c6c1(%rip), %rdx # 0xdbf70 movq %rbx, %rdi callq 0x18b30 jmp 0x4f8bb jmp 0x4f8fb movq %rax, %r14 leaq 0x30(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4f8d9 movq 0x30(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4f8f4 movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 testb %bpl, %bpl jne 0x4f920 jmp 0x4f928 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x4f920 movq 0x10(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x4f920 jmp 0x4f91d movq %rax, %r14 movq %rbx, %rdi callq 0x184f0 movq %r14, %rdi callq 0x18bb0 movq %rax, %rdi callq 0x2a243
_ZN5minja5Value3setERKS0_S2_: push rbp push r14 push rbx sub rsp, 40h mov r14, rdi mov rdi, [rdi+20h] test rdi, rdi jz loc_4F7FF cmp qword ptr [rsi+10h], 0 jnz loc_4F85C cmp qword ptr [rsi+20h], 0 jnz loc_4F85C cmp qword ptr [rsi+30h], 0 jnz loc_4F85C mov rbx, rdx add rsi, 40h ; '@' call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEEixERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::operator[](nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov r14, rax mov rax, [rbx+10h] mov [r14+10h], rax lea rdi, [r14+18h] lea rsi, [rbx+18h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) mov rax, [rbx+20h] mov [r14+20h], rax lea rdi, [r14+28h] lea rsi, [rbx+28h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) mov rax, [rbx+30h] mov [r14+30h], rax lea rdi, [r14+38h] lea rsi, [rbx+38h] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EEaSERKS2_; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) add rbx, 40h ; '@' lea rdi, [rsp+58h+var_38] mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) add r14, 40h ; '@' lea rbx, [rsp+58h+var_38] mov rdi, r14 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(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, 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() add rsp, 40h pop rbx pop r14 pop rbp retn loc_4F7FF: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotAnOb; "Value is not an object: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_4F8B7 loc_4F85C: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, rsp mov rsi, r14 mov edx, 0FFFFFFFFh xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+58h+var_38] mov rdx, rsp call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+58h+var_38] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_4F8B7: jmp short loc_4F8BB jmp short loc_4F8FB loc_4F8BB: mov r14, rax lea rax, [rsp+58h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4F8D9 mov rsi, [rsp+58h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4F8D9: lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4F8F4 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4F8F4: test bpl, bpl jnz short loc_4F920 jmp short loc_4F928 loc_4F8FB: mov r14, rax lea rax, [rsp+58h+var_48] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_4F920 mov rsi, [rsp+58h+var_48] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_4F920 jmp short $+2 loc_4F91D: mov r14, rax loc_4F920: mov rdi, rbx; void * call ___cxa_free_exception loc_4F928: mov rdi, r14 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
char * minja::Value::set(minja::Value *this, const minja::Value *a2, const minja::Value *a3) { long long v4; // rdi long long v6; // r14 char *result; // rax void *exception; // rbx void *v9; // rbx _BYTE v10[16]; // [rsp+0h] [rbp-58h] BYREF void **v11[2]; // [rsp+20h] [rbp-38h] BYREF v4 = *((_QWORD *)this + 4); if ( !v4 ) { exception = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v11, (long long)"Value is not an object: ", (long long)v10); std::runtime_error::runtime_error(exception, v11); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( *((_QWORD *)a2 + 2) || *((_QWORD *)a2 + 4) || *((_QWORD *)a2 + 6) ) { v9 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v11, (long long)"Unashable type: ", (long long)v10); std::runtime_error::runtime_error(v9, v11); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v6 = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::operator[]( v4, (char *)a2 + 64); *(_QWORD *)(v6 + 16) = *((_QWORD *)a3 + 2); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=( (volatile signed __int32 **)(v6 + 24), (volatile signed __int32 **)a3 + 3); *(_QWORD *)(v6 + 32) = *((_QWORD *)a3 + 4); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=( (volatile signed __int32 **)(v6 + 40), (volatile signed __int32 **)a3 + 5); *(_QWORD *)(v6 + 48) = *((_QWORD *)a3 + 6); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=( (volatile signed __int32 **)(v6 + 56), (volatile signed __int32 **)a3 + 7); 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)v11, (long long)a3 + 64); 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>::operator=( (char *)(v6 + 64), (char *)v11); 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 *)v11); 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(v11); return result; }
set: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RDI MOV RDI,qword ptr [RDI + 0x20] TEST RDI,RDI JZ 0x0014f7ff CMP qword ptr [RSI + 0x10],0x0 JNZ 0x0014f85c CMP qword ptr [RSI + 0x20],0x0 JNZ 0x0014f85c CMP qword ptr [RSI + 0x30],0x0 JNZ 0x0014f85c MOV RBX,RDX ADD RSI,0x40 CALL 0x0014f99c MOV R14,RAX MOV RAX,qword ptr [RBX + 0x10] MOV qword ptr [R14 + 0x10],RAX LEA RDI,[R14 + 0x18] LEA RSI,[RBX + 0x18] CALL 0x0014e924 MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [R14 + 0x20],RAX LEA RDI,[R14 + 0x28] LEA RSI,[RBX + 0x28] CALL 0x0014e924 MOV RAX,qword ptr [RBX + 0x30] MOV qword ptr [R14 + 0x30],RAX LEA RDI,[R14 + 0x38] LEA RSI,[RBX + 0x38] CALL 0x0014e924 ADD RBX,0x40 LAB_0014f7c3: LEA RDI,[RSP + 0x20] MOV RSI,RBX CALL 0x0012a3b8 LAB_0014f7d0: ADD R14,0x40 LEA RBX,[RSP + 0x20] MOV RDI,R14 MOV RSI,RBX CALL 0x0012a0d4 MOV RDI,RBX XOR ESI,ESI CALL 0x0013d0e4 MOV RDI,RBX CALL 0x00149cd2 ADD RSP,0x40 POP RBX POP R14 POP RBP RET LAB_0014f7ff: MOV EDI,0x10 CALL 0x00118350 MOV RBX,RAX LAB_0014f80c: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0013d41a LAB_0014f81e: LEA RSI,[0x1ab078] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001245f5 MOV BPL,0x1 LAB_0014f835: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00118a80 XOR EBP,EBP MOV RSI,qword ptr [0x001dbff0] MOV RDX,qword ptr [0x001dbf70] MOV RDI,RBX CALL 0x00118b30 LAB_0014f85c: MOV EDI,0x10 CALL 0x00118350 MOV RBX,RAX LAB_0014f869: MOV RDI,RSP MOV RSI,R14 MOV EDX,0xffffffff XOR ECX,ECX CALL 0x0013d41a LAB_0014f87b: LEA RSI,[0x1ab091] LEA RDI,[RSP + 0x20] MOV RDX,RSP CALL 0x001245f5 MOV BPL,0x1 LAB_0014f892: LEA RSI,[RSP + 0x20] MOV RDI,RBX CALL 0x00118a80 XOR EBP,EBP MOV RSI,qword ptr [0x001dbff0] MOV RDX,qword ptr [0x001dbf70] MOV RDI,RBX CALL 0x00118b30
/* minja::Value::set(minja::Value const&, minja::Value const&) */ void __thiscall minja::Value::set(Value *this,Value *param_1,Value *param_2) { long lVar1; runtime_error *prVar2; int1 auStack_58 [32]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_38 [32]; if (*(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 + 0x20) == (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>>> *)0x0) { prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0014f80c to 0014f81d has its CatchHandler @ 0014f91d */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 0014f81e to 0014f831 has its CatchHandler @ 0014f8fb */ std::operator+((char *)local_38,(string *)"Value is not an object: "); /* try { // try from 0014f835 to 0014f859 has its CatchHandler @ 0014f8bb */ std::runtime_error::runtime_error(prVar2,(string *)local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_001dbff0,PTR__runtime_error_001dbf70); } if (((*(long *)(param_1 + 0x10) == 0) && (*(long *)(param_1 + 0x20) == 0)) && (*(long *)(param_1 + 0x30) == 0)) { lVar1 = nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::operator[](*(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> **)(this + 0x20),(basic_json *)(param_1 + 0x40)); *(int8 *)(lVar1 + 0x10) = *(int8 *)(param_2 + 0x10); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(lVar1 + 0x18), (__shared_count *)(param_2 + 0x18)); *(int8 *)(lVar1 + 0x20) = *(int8 *)(param_2 + 0x20); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(lVar1 + 0x28), (__shared_count *)(param_2 + 0x28)); *(int8 *)(lVar1 + 0x30) = *(int8 *)(param_2 + 0x30); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator= ((__shared_count<(__gnu_cxx::_Lock_policy)2> *)(lVar1 + 0x38), (__shared_count *)(param_2 + 0x38)); /* try { // try from 0014f7c3 to 0014f7cf has its CatchHandler @ 0014f930 */ 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(local_38,(basic_json *)(param_2 + 0x40)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)(lVar1 + 0x40),(data *)local_38); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)local_38,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_38); return; } prVar2 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0014f869 to 0014f87a has its CatchHandler @ 0014f91b */ dump_abi_cxx11_((int)auStack_58,SUB81(this,0)); /* try { // try from 0014f87b to 0014f88e has its CatchHandler @ 0014f8b9 */ std::operator+((char *)local_38,(string *)"Unashable type: "); /* try { // try from 0014f892 to 0014f8b6 has its CatchHandler @ 0014f8b7 */ std::runtime_error::runtime_error(prVar2,(string *)local_38); /* WARNING: Subroutine does not return */ __cxa_throw(prVar2,PTR_typeinfo_001dbff0,PTR__runtime_error_001dbf70); }
50,304
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; }
50,305
get_head_or_tail_page
eloqsql/storage/maria/ma_blockrec.c
static my_bool get_head_or_tail_page(MARIA_HA *info, const MARIA_BITMAP_BLOCK *block, uchar *buff, uint length, uint page_type, enum pagecache_page_lock lock, struct st_row_pos_info *res) { uint block_size; MARIA_PINNED_PAGE page_link; MARIA_SHARE *share= info->s; DBUG_ENTER("get_head_or_tail_page"); DBUG_PRINT("enter", ("page_type: %u length: %u", page_type, length)); block_size= share->block_size; if (block->org_bitmap_value == 0) /* Empty block */ { /* New page */ make_empty_page(info, buff, page_type, 1); res->buff= buff; res->empty_space= res->length= (block_size - PAGE_OVERHEAD_SIZE(share)); res->data= (buff + PAGE_HEADER_SIZE(share)); res->dir= res->data + res->length; res->rownr= 0; DBUG_ASSERT(length <= res->length); } else { uchar *dir; /* Read old page */ page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; res->buff= pagecache_read(share->pagecache, &info->dfile, block->page, 0, 0, share->page_type, lock, &page_link.link); page_link.changed= res->buff != 0; push_dynamic(&info->pinned_pages, (void*) &page_link); if (!page_link.changed) { _ma_set_fatal_error(info, my_errno); DBUG_RETURN(1); } DBUG_ASSERT((uint) (res->buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type); if (!(dir= find_free_position(info, res->buff, block_size, &res->rownr, &res->length, &res->empty_space, page_type == HEAD_PAGE))) goto crashed; if (res->length < length) { if (res->empty_space + res->length >= length) { _ma_compact_block_page(share, res->buff, res->rownr, 1, (page_type == HEAD_PAGE ? info->trn->min_read_from : 0), (page_type == HEAD_PAGE ? share->base.min_block_length : 0)); /* All empty space are now after current position */ dir= dir_entry_pos(res->buff, block_size, res->rownr); res->length= res->empty_space= uint2korr(dir+2); } if (res->length < length) { DBUG_PRINT("error", ("length: %u res->length: %u empty_space: %u", length, res->length, res->empty_space)); goto crashed; /* Wrong bitmap information */ } } res->dir= dir; res->data= res->buff + uint2korr(dir); } DBUG_RETURN(0); crashed: DBUG_ASSERT(!maria_assert_if_crashed_table); _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); /* File crashed */ DBUG_RETURN(1); }
O3
c
get_head_or_tail_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r9, %rbx movl %ecx, %r12d movq %rdi, %r14 movq (%rdi), %rcx movl 0x7bc(%rcx), %r13d cmpb $0x0, 0x15(%rsi) je 0x52949 movl %r8d, -0x2c(%rbp) leaq -0x58(%rbp), %r15 movl $0x6, 0x8(%r15) movq 0x600(%rcx), %rdi leaq 0x470(%r14), %rax movq (%rsi), %rdx movq %rcx, -0x38(%rbp) movl 0x7d4(%rcx), %r9d movq %rax, %rsi xorl %ecx, %ecx xorl %r8d, %r8d pushq %r15 pushq $0x4 callq 0x3c546 addq $0x10, %rsp movq %rax, (%rbx) testq %rax, %rax setne 0x10(%r15) leaq 0x2e8(%r14), %rdi movq %r15, %rsi callq 0x92e56 cmpb $0x0, 0x10(%r15) je 0x5299c movl %r12d, -0x30(%rbp) movq (%rbx), %r15 movq (%r14), %rdx movzbl 0x8(%r15), %r10d movzbl 0x9(%r15), %ecx leaq (%r15,%r13), %r12 movzwl 0xa(%r15), %eax movl %eax, 0x20(%rbx) cmpl $0xff, %ecx je 0x529ab cmpb %r10b, %cl jae 0x52b25 leal (,%rcx,4), %esi movq %r12, %rax subq %rsi, %rax movq $-0x8, %rdi subq %rsi, %rdi movzbl -0x5(%rax), %eax movb %al, 0x9(%r15) cmpq $0xff, %rax je 0x5291e shll $0x2, %eax movq %r12, %r8 subq %rax, %r8 movb $-0x1, -0x6(%r8) leaq (%r12,%rdi), %rax cmpq $-0x9, %rdi jg 0x52a12 movzwl 0x4(%r12,%rdi), %r8d addq $0x4, %rdi testl %r8d, %r8d je 0x52922 movzwl 0x2(%r12,%rdi), %edi addl %r8d, %edi jmp 0x52a1b movq %rdx, %r15 movq %r14, %rdi movq %rdx, %rsi movl %r8d, %edx movq %rcx, %r14 movl $0x1, %ecx callq 0x4ee12 movq %r15, (%rbx) subl 0xc18(%r14), %r13d addl $-0x14, %r13d movl %r13d, 0x18(%rbx) movl %r13d, 0x20(%rbx) movl 0xc18(%r14), %eax addl $0xc, %eax addq %r15, %rax movq %rax, 0x8(%rbx) addq %rax, %r13 movq %r13, 0x10(%rbx) movl $0x0, 0x1c(%rbx) jmp 0x52b44 callq 0xa2f56 movl (%rax), %esi movq %r14, %rdi jmp 0x52b2d cmpl $0xff, %r10d je 0x52b25 leal -0x4(,%r10,4), %ecx subq %rcx, %r12 movq (%r14), %rdi testl %r10d, %r10d je 0x52b55 leaq -0x8(%r12), %rsi movzwl -0x8(%r12), %edx movzwl -0x6(%r12), %ecx subl %r15d, %esi leal (%rcx,%rdx), %r8d addl $0x4, %r8d cmpl %esi, %r8d jbe 0x52a4d leal -0x1(%r10), %edx cmpl $0x1, -0x2c(%rbp) movq %r10, -0x40(%rbp) jne 0x52a51 movq 0x8(%r14), %rax movq 0x80(%rax), %r8 movl 0x3b8(%rdi), %r9d jmp 0x52a57 movl 0xc18(%rdx), %edi addl $0xc, %edi movq %r13, %rdx subq %rsi, %rdx leaq (%rdx,%r15), %rsi addq $-0xb, %rsi movq %rsi, %rdx cmpb $0x0, -0x1(%rsi) jne 0x52a3b leaq -0x4(%rdx), %rsi cmpb $0x0, (%rdx) je 0x52a29 movzwl -0x1(%rdx), %edx subl %edi, %edx movw %di, (%rax) leaq 0x2(%rax), %r12 movl %ecx, %r10d jmp 0x52aa9 addl %edx, %ecx jmp 0x52a84 xorl %r8d, %r8d xorl %r9d, %r9d movq %r15, %rsi xorl %ecx, %ecx callq 0x4bab0 movzwl -0x8(%r12), %edx movzwl -0x6(%r12), %ecx movzwl 0xa(%r15), %eax movl %eax, 0x20(%rbx) cmpl $0x4, %eax movq -0x40(%rbp), %r10 jb 0x52b25 addl %edx, %ecx addl $-0x4, %eax movl %eax, 0x20(%rbx) leal 0x1(%r10), %eax movb %al, 0x8(%r15) leaq -0xc(%r12), %rax addl %ecx, %r15d movl %eax, %edx subl %r15d, %edx movw %cx, -0xc(%r12) addq $-0xa, %r12 movw $0x0, (%r12) movl %r10d, 0x1c(%rbx) movl %edx, 0x18(%rbx) movl -0x30(%rbp), %r15d cmpl %r15d, %edx jae 0x52b36 movl 0x20(%rbx), %ecx addl %edx, %ecx cmpl %r15d, %ecx jb 0x52b20 movq (%rbx), %rsi cmpl $0x1, -0x2c(%rbp) jne 0x52aeb movq 0x8(%r14), %rax movq 0x80(%rax), %r8 movq -0x38(%rbp), %rdi movl 0x3b8(%rdi), %r9d jmp 0x52af5 xorl %r8d, %r8d xorl %r9d, %r9d movq -0x38(%rbp), %rdi movl %r10d, %edx movl $0x1, %ecx callq 0x4bab0 addq (%rbx), %r13 movl 0x1c(%rbx), %eax shll $0x2, %eax subq %rax, %r13 movzwl -0x6(%r13), %edx addq $-0x8, %r13 movl %edx, 0x20(%rbx) movl %edx, 0x18(%rbx) movq %r13, %rax cmpl %r15d, %edx jae 0x52b36 movq %r14, %rdi movl $0x7f, %esi callq 0x410e8 movb $0x1, %al jmp 0x52b46 movq %rax, 0x10(%rbx) movzwl (%rax), %eax addq (%rbx), %rax movq %rax, 0x8(%rbx) xorl %eax, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl 0xc18(%rdi), %ecx addl $0xc, %ecx jmp 0x52a84
get_head_or_tail_page: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov rbx, r9 mov r12d, ecx mov r14, rdi mov rcx, [rdi] mov r13d, [rcx+7BCh] cmp byte ptr [rsi+15h], 0 jz loc_52949 mov [rbp+var_2C], r8d lea r15, [rbp+var_58] mov dword ptr [r15+8], 6 mov rdi, [rcx+600h] lea rax, [r14+470h] mov rdx, [rsi] mov [rbp+var_38], rcx mov r9d, [rcx+7D4h] mov rsi, rax xor ecx, ecx xor r8d, r8d push r15 push 4 call pagecache_read add rsp, 10h mov [rbx], rax test rax, rax setnz byte ptr [r15+10h] lea rdi, [r14+2E8h] mov rsi, r15 call insert_dynamic cmp byte ptr [r15+10h], 0 jz loc_5299C mov [rbp+var_30], r12d mov r15, [rbx] mov rdx, [r14] movzx r10d, byte ptr [r15+8] movzx ecx, byte ptr [r15+9] lea r12, [r15+r13] movzx eax, word ptr [r15+0Ah] mov [rbx+20h], eax cmp ecx, 0FFh jz loc_529AB cmp cl, r10b jnb loc_52B25 lea esi, ds:0[rcx*4] mov rax, r12 sub rax, rsi mov rdi, 0FFFFFFFFFFFFFFF8h sub rdi, rsi movzx eax, byte ptr [rax-5] mov [r15+9], al cmp rax, 0FFh jz short loc_5291E shl eax, 2 mov r8, r12 sub r8, rax mov byte ptr [r8-6], 0FFh loc_5291E: lea rax, [r12+rdi] loc_52922: cmp rdi, 0FFFFFFFFFFFFFFF7h jg loc_52A12 movzx r8d, word ptr [r12+rdi+4] add rdi, 4 test r8d, r8d jz short loc_52922 movzx edi, word ptr [r12+rdi+2] add edi, r8d jmp loc_52A1B loc_52949: mov r15, rdx mov rdi, r14 mov rsi, rdx mov edx, r8d mov r14, rcx mov ecx, 1 call make_empty_page mov [rbx], r15 sub r13d, [r14+0C18h] add r13d, 0FFFFFFECh mov [rbx+18h], r13d mov [rbx+20h], r13d mov eax, [r14+0C18h] add eax, 0Ch add rax, r15 mov [rbx+8], rax add r13, rax mov [rbx+10h], r13 mov dword ptr [rbx+1Ch], 0 jmp loc_52B44 loc_5299C: call _my_thread_var mov esi, [rax] mov rdi, r14 jmp loc_52B2D loc_529AB: cmp r10d, 0FFh jz loc_52B25 lea ecx, ds:0FFFFFFFFFFFFFFFCh[r10*4] sub r12, rcx mov rdi, [r14] test r10d, r10d jz loc_52B55 lea rsi, [r12-8] movzx edx, word ptr [r12-8] movzx ecx, word ptr [r12-6] sub esi, r15d lea r8d, [rcx+rdx] add r8d, 4 cmp r8d, esi jbe short loc_52A4D lea edx, [r10-1] cmp [rbp+var_2C], 1 mov [rbp+var_40], r10 jnz short loc_52A51 mov rax, [r14+8] mov r8, [rax+80h] mov r9d, [rdi+3B8h] jmp short loc_52A57 loc_52A12: mov edi, [rdx+0C18h] add edi, 0Ch loc_52A1B: mov rdx, r13 sub rdx, rsi lea rsi, [rdx+r15] add rsi, 0FFFFFFFFFFFFFFF5h loc_52A29: mov rdx, rsi cmp byte ptr [rsi-1], 0 jnz short loc_52A3B lea rsi, [rdx-4] cmp byte ptr [rdx], 0 jz short loc_52A29 loc_52A3B: movzx edx, word ptr [rdx-1] sub edx, edi mov [rax], di lea r12, [rax+2] mov r10d, ecx jmp short loc_52AA9 loc_52A4D: add ecx, edx jmp short loc_52A84 loc_52A51: xor r8d, r8d xor r9d, r9d loc_52A57: mov rsi, r15 xor ecx, ecx call _ma_compact_block_page movzx edx, word ptr [r12-8] movzx ecx, word ptr [r12-6] movzx eax, word ptr [r15+0Ah] mov [rbx+20h], eax cmp eax, 4 mov r10, [rbp+var_40] jb loc_52B25 add ecx, edx loc_52A84: add eax, 0FFFFFFFCh mov [rbx+20h], eax lea eax, [r10+1] mov [r15+8], al lea rax, [r12-0Ch] add r15d, ecx mov edx, eax sub edx, r15d mov [r12-0Ch], cx add r12, 0FFFFFFFFFFFFFFF6h loc_52AA9: mov word ptr [r12], 0 mov [rbx+1Ch], r10d mov [rbx+18h], edx mov r15d, [rbp+var_30] cmp edx, r15d jnb short loc_52B36 mov ecx, [rbx+20h] add ecx, edx cmp ecx, r15d jb short loc_52B20 mov rsi, [rbx] cmp [rbp+var_2C], 1 jnz short loc_52AEB mov rax, [r14+8] mov r8, [rax+80h] mov rdi, [rbp+var_38] mov r9d, [rdi+3B8h] jmp short loc_52AF5 loc_52AEB: xor r8d, r8d xor r9d, r9d mov rdi, [rbp+var_38] loc_52AF5: mov edx, r10d mov ecx, 1 call _ma_compact_block_page add r13, [rbx] mov eax, [rbx+1Ch] shl eax, 2 sub r13, rax movzx edx, word ptr [r13-6] add r13, 0FFFFFFFFFFFFFFF8h mov [rbx+20h], edx mov [rbx+18h], edx mov rax, r13 loc_52B20: cmp edx, r15d jnb short loc_52B36 loc_52B25: mov rdi, r14 mov esi, 7Fh loc_52B2D: call _ma_set_fatal_error mov al, 1 jmp short loc_52B46 loc_52B36: mov [rbx+10h], rax movzx eax, word ptr [rax] add rax, [rbx] mov [rbx+8], rax loc_52B44: xor eax, eax loc_52B46: add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_52B55: mov ecx, [rdi+0C18h] add ecx, 0Ch jmp loc_52A84
char get_head_or_tail_page(long long *a1, long long a2, _BYTE *a3, unsigned int a4, int a5, long long a6) { long long v9; // rcx long long v10; // r13 long long v11; // rdi long long v12; // rdx long long v13; // rax long long v14; // r8 int v15; // r9d long long v16; // r15 long long v17; // rdx long long v18; // r10 long long v19; // rcx long long v20; // r12 unsigned int v21; // eax long long v22; // rsi long long v23; // rdi long long v24; // rax _WORD *v25; // rax int v26; // edi long long v28; // r14 long long v29; // r13 _BYTE *v30; // rax int v31; // esi long long *v32; // rdi long long v33; // r12 long long v34; // rdi int v35; // edx int v36; // ecx unsigned long long v37; // r8 unsigned int v38; // r9d long long v39; // rsi _BYTE *v40; // rdx _WORD *v41; // r12 int v42; // ecx unsigned int v43; // r15d unsigned long long v44; // r8 long long v45; // rdi unsigned int v46; // r9d long long v47; // r13 long long v49; // [rsp+8h] [rbp-58h] BYREF int v50; // [rsp+10h] [rbp-50h] bool v51; // [rsp+18h] [rbp-48h] long long v52; // [rsp+20h] [rbp-40h] long long v53; // [rsp+28h] [rbp-38h] unsigned int v54; // [rsp+30h] [rbp-30h] int v55; // [rsp+34h] [rbp-2Ch] v9 = *a1; v10 = *(unsigned int *)(*a1 + 1980); if ( !*(_BYTE *)(a2 + 21) ) { v28 = *a1; make_empty_page((long long)a1, a3, a5, 1); *(_QWORD *)a6 = a3; v29 = (unsigned int)(v10 - *(_DWORD *)(v28 + 3096) - 20); *(_DWORD *)(a6 + 24) = v29; *(_DWORD *)(a6 + 32) = v29; v30 = &a3[*(_DWORD *)(v28 + 3096) + 12]; *(_QWORD *)(a6 + 8) = v30; *(_QWORD *)(a6 + 16) = &v30[v29]; *(_DWORD *)(a6 + 28) = 0; return 0; } v55 = a5; v50 = 6; v11 = *(_QWORD *)(v9 + 1536); v12 = *(_QWORD *)a2; v53 = v9; v13 = pagecache_read(v11, (long long)(a1 + 142), v12, 0, 0LL, *(_DWORD *)(v9 + 2004), 4u, &v49); *(_QWORD *)a6 = v13; v51 = v13 != 0; insert_dynamic(a1 + 93, &v49); if ( !v51 ) { v31 = *(_DWORD *)my_thread_var(a1 + 93); v32 = a1; LABEL_36: ma_set_fatal_error(v32, v31, v17, v19, v14, v15); return 1; } v54 = a4; v16 = *(_QWORD *)a6; v17 = *a1; v18 = *(unsigned __int8 *)(*(_QWORD *)a6 + 8LL); v19 = *(unsigned __int8 *)(*(_QWORD *)a6 + 9LL); v20 = *(_QWORD *)a6 + v10; v21 = *(unsigned __int16 *)(*(_QWORD *)a6 + 10LL); *(_DWORD *)(a6 + 32) = v21; if ( (_DWORD)v19 != 255 ) { if ( (unsigned __int8)v19 < (unsigned __int8)v18 ) { v22 = (unsigned int)(4 * v19); v23 = -8 - v22; v24 = *(unsigned __int8 *)(v20 - v22 - 5); *(_BYTE *)(v16 + 9) = v24; if ( v24 != 255 ) { v14 = v20 - (unsigned int)(4 * v24); *(_BYTE *)(v14 - 6) = -1; } v25 = (_WORD *)(v20 + v23); while ( v23 <= -9 ) { v14 = *(unsigned __int16 *)(v20 + v23 + 4); v23 += 4LL; if ( (_DWORD)v14 ) { v26 = v14 + *(unsigned __int16 *)(v20 + v23 + 2); goto LABEL_19; } } v26 = *(_DWORD *)(v17 + 3096) + 12; LABEL_19: v39 = v10 - v22 + v16 - 11; do { v40 = (_BYTE *)v39; if ( *(_BYTE *)(v39 - 1) ) break; v39 -= 4LL; } while ( !*v40 ); v17 = (unsigned int)*(unsigned __int16 *)(v40 - 1) - v26; *v25 = v26; v41 = v25 + 1; LODWORD(v18) = v19; goto LABEL_28; } LABEL_35: v32 = a1; v31 = 127; goto LABEL_36; } if ( (_DWORD)v18 == 255 ) goto LABEL_35; v33 = v20 - (unsigned int)(4 * v18 - 4); v34 = *a1; if ( (_DWORD)v18 ) { v35 = *(unsigned __int16 *)(v33 - 8); v36 = *(unsigned __int16 *)(v33 - 6); v14 = (unsigned int)(v36 + v35 + 4); if ( (unsigned int)v14 <= (int)v33 - 8 - (int)v16 ) { v42 = v35 + v36; } else { v52 = v18; if ( v55 == 1 ) { v37 = *(_QWORD *)(a1[1] + 128); v38 = *(_DWORD *)(v34 + 952); } else { v37 = 0LL; v38 = 0; } ma_compact_block_page(v34, v16, v18 - 1, 0, v37, v38); v17 = *(unsigned __int16 *)(v33 - 8); v19 = *(unsigned __int16 *)(v33 - 6); v21 = *(unsigned __int16 *)(v16 + 10); *(_DWORD *)(a6 + 32) = v21; LODWORD(v18) = v52; if ( v21 < 4 ) goto LABEL_35; v42 = v17 + v19; } } else { v42 = *(_DWORD *)(v34 + 3096) + 12; } *(_DWORD *)(a6 + 32) = v21 - 4; *(_BYTE *)(v16 + 8) = v18 + 1; v25 = (_WORD *)(v33 - 12); v17 = (unsigned int)(v33 - 12 - (v42 + v16)); *(_WORD *)(v33 - 12) = v42; v41 = (_WORD *)(v33 - 10); LABEL_28: *v41 = 0; *(_DWORD *)(a6 + 28) = v18; *(_DWORD *)(a6 + 24) = v17; v43 = v54; if ( (unsigned int)v17 < v54 ) { v19 = (unsigned int)(v17 + *(_DWORD *)(a6 + 32)); if ( (unsigned int)v19 >= v54 ) { if ( v55 == 1 ) { v44 = *(_QWORD *)(a1[1] + 128); v45 = v53; v46 = *(_DWORD *)(v53 + 952); } else { v44 = 0LL; v46 = 0; v45 = v53; } ma_compact_block_page(v45, *(_QWORD *)a6, v18, 1, v44, v46); v47 = *(_QWORD *)a6 + v10 - (unsigned int)(4 * *(_DWORD *)(a6 + 28)); v17 = *(unsigned __int16 *)(v47 - 6); *(_DWORD *)(a6 + 32) = v17; *(_DWORD *)(a6 + 24) = v17; v25 = (_WORD *)(v47 - 8); } if ( (unsigned int)v17 < v43 ) goto LABEL_35; } *(_QWORD *)(a6 + 16) = v25; *(_QWORD *)(a6 + 8) = *(_QWORD *)a6 + (unsigned __int16)*v25; return 0; }
get_head_or_tail_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,R9 MOV R12D,ECX MOV R14,RDI MOV RCX,qword ptr [RDI] MOV R13D,dword ptr [RCX + 0x7bc] CMP byte ptr [RSI + 0x15],0x0 JZ 0x00152949 MOV dword ptr [RBP + -0x2c],R8D LEA R15,[RBP + -0x58] MOV dword ptr [R15 + 0x8],0x6 MOV RDI,qword ptr [RCX + 0x600] LEA RAX,[R14 + 0x470] MOV RDX,qword ptr [RSI] MOV qword ptr [RBP + -0x38],RCX MOV R9D,dword ptr [RCX + 0x7d4] MOV RSI,RAX XOR ECX,ECX XOR R8D,R8D PUSH R15 PUSH 0x4 CALL 0x0013c546 ADD RSP,0x10 MOV qword ptr [RBX],RAX TEST RAX,RAX SETNZ byte ptr [R15 + 0x10] LEA RDI,[R14 + 0x2e8] MOV RSI,R15 CALL 0x00192e56 CMP byte ptr [R15 + 0x10],0x0 JZ 0x0015299c MOV dword ptr [RBP + -0x30],R12D MOV R15,qword ptr [RBX] MOV RDX,qword ptr [R14] MOVZX R10D,byte ptr [R15 + 0x8] MOVZX ECX,byte ptr [R15 + 0x9] LEA R12,[R15 + R13*0x1] MOVZX EAX,word ptr [R15 + 0xa] MOV dword ptr [RBX + 0x20],EAX CMP ECX,0xff JZ 0x001529ab CMP CL,R10B JNC 0x00152b25 LEA ESI,[RCX*0x4] MOV RAX,R12 SUB RAX,RSI MOV RDI,-0x8 SUB RDI,RSI MOVZX EAX,byte ptr [RAX + -0x5] MOV byte ptr [R15 + 0x9],AL CMP RAX,0xff JZ 0x0015291e SHL EAX,0x2 MOV R8,R12 SUB R8,RAX MOV byte ptr [R8 + -0x6],0xff LAB_0015291e: LEA RAX,[R12 + RDI*0x1] LAB_00152922: CMP RDI,-0x9 JG 0x00152a12 MOVZX R8D,word ptr [R12 + RDI*0x1 + 0x4] ADD RDI,0x4 TEST R8D,R8D JZ 0x00152922 MOVZX EDI,word ptr [R12 + RDI*0x1 + 0x2] ADD EDI,R8D JMP 0x00152a1b LAB_00152949: MOV R15,RDX MOV RDI,R14 MOV RSI,RDX MOV EDX,R8D MOV R14,RCX MOV ECX,0x1 CALL 0x0014ee12 MOV qword ptr [RBX],R15 SUB R13D,dword ptr [R14 + 0xc18] ADD R13D,-0x14 MOV dword ptr [RBX + 0x18],R13D MOV dword ptr [RBX + 0x20],R13D MOV EAX,dword ptr [R14 + 0xc18] ADD EAX,0xc ADD RAX,R15 MOV qword ptr [RBX + 0x8],RAX ADD R13,RAX MOV qword ptr [RBX + 0x10],R13 MOV dword ptr [RBX + 0x1c],0x0 JMP 0x00152b44 LAB_0015299c: CALL 0x001a2f56 MOV ESI,dword ptr [RAX] MOV RDI,R14 JMP 0x00152b2d LAB_001529ab: CMP R10D,0xff JZ 0x00152b25 LEA ECX,[-0x4 + R10*0x4] SUB R12,RCX MOV RDI,qword ptr [R14] TEST R10D,R10D JZ 0x00152b55 LEA RSI,[R12 + -0x8] MOVZX EDX,word ptr [R12 + -0x8] MOVZX ECX,word ptr [R12 + -0x6] SUB ESI,R15D LEA R8D,[RCX + RDX*0x1] ADD R8D,0x4 CMP R8D,ESI JBE 0x00152a4d LEA EDX,[R10 + -0x1] CMP dword ptr [RBP + -0x2c],0x1 MOV qword ptr [RBP + -0x40],R10 JNZ 0x00152a51 MOV RAX,qword ptr [R14 + 0x8] MOV R8,qword ptr [RAX + 0x80] MOV R9D,dword ptr [RDI + 0x3b8] JMP 0x00152a57 LAB_00152a12: MOV EDI,dword ptr [RDX + 0xc18] ADD EDI,0xc LAB_00152a1b: MOV RDX,R13 SUB RDX,RSI LEA RSI,[RDX + R15*0x1] ADD RSI,-0xb LAB_00152a29: MOV RDX,RSI CMP byte ptr [RSI + -0x1],0x0 JNZ 0x00152a3b LEA RSI,[RDX + -0x4] CMP byte ptr [RDX],0x0 JZ 0x00152a29 LAB_00152a3b: MOVZX EDX,word ptr [RDX + -0x1] SUB EDX,EDI MOV word ptr [RAX],DI LEA R12,[RAX + 0x2] MOV R10D,ECX JMP 0x00152aa9 LAB_00152a4d: ADD ECX,EDX JMP 0x00152a84 LAB_00152a51: XOR R8D,R8D XOR R9D,R9D LAB_00152a57: MOV RSI,R15 XOR ECX,ECX CALL 0x0014bab0 MOVZX EDX,word ptr [R12 + -0x8] MOVZX ECX,word ptr [R12 + -0x6] MOVZX EAX,word ptr [R15 + 0xa] MOV dword ptr [RBX + 0x20],EAX CMP EAX,0x4 MOV R10,qword ptr [RBP + -0x40] JC 0x00152b25 ADD ECX,EDX LAB_00152a84: ADD EAX,-0x4 MOV dword ptr [RBX + 0x20],EAX LEA EAX,[R10 + 0x1] MOV byte ptr [R15 + 0x8],AL LEA RAX,[R12 + -0xc] ADD R15D,ECX MOV EDX,EAX SUB EDX,R15D MOV word ptr [R12 + -0xc],CX ADD R12,-0xa LAB_00152aa9: MOV word ptr [R12],0x0 MOV dword ptr [RBX + 0x1c],R10D MOV dword ptr [RBX + 0x18],EDX MOV R15D,dword ptr [RBP + -0x30] CMP EDX,R15D JNC 0x00152b36 MOV ECX,dword ptr [RBX + 0x20] ADD ECX,EDX CMP ECX,R15D JC 0x00152b20 MOV RSI,qword ptr [RBX] CMP dword ptr [RBP + -0x2c],0x1 JNZ 0x00152aeb MOV RAX,qword ptr [R14 + 0x8] MOV R8,qword ptr [RAX + 0x80] MOV RDI,qword ptr [RBP + -0x38] MOV R9D,dword ptr [RDI + 0x3b8] JMP 0x00152af5 LAB_00152aeb: XOR R8D,R8D XOR R9D,R9D MOV RDI,qword ptr [RBP + -0x38] LAB_00152af5: MOV EDX,R10D MOV ECX,0x1 CALL 0x0014bab0 ADD R13,qword ptr [RBX] MOV EAX,dword ptr [RBX + 0x1c] SHL EAX,0x2 SUB R13,RAX MOVZX EDX,word ptr [R13 + -0x6] ADD R13,-0x8 MOV dword ptr [RBX + 0x20],EDX MOV dword ptr [RBX + 0x18],EDX MOV RAX,R13 LAB_00152b20: CMP EDX,R15D JNC 0x00152b36 LAB_00152b25: MOV RDI,R14 MOV ESI,0x7f LAB_00152b2d: CALL 0x001410e8 MOV AL,0x1 JMP 0x00152b46 LAB_00152b36: MOV qword ptr [RBX + 0x10],RAX MOVZX EAX,word ptr [RAX] ADD RAX,qword ptr [RBX] MOV qword ptr [RBX + 0x8],RAX LAB_00152b44: XOR EAX,EAX LAB_00152b46: ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00152b55: MOV ECX,dword ptr [RDI + 0xc18] ADD ECX,0xc JMP 0x00152a84
int8 get_head_or_tail_page (long *param_1,int8 *param_2,long param_3,uint param_4,int param_5,long *param_6) { byte bVar1; byte bVar2; ushort uVar3; ushort uVar4; ushort uVar5; long lVar6; long lVar7; uint uVar8; char *pcVar9; long lVar10; int4 *puVar11; int8 uVar12; uint uVar13; int4 uVar14; ulong uVar15; char *pcVar16; int iVar17; long lVar18; ushort *puVar19; uint uVar20; ulong uVar21; ushort *puVar22; int1 local_60 [8]; int4 local_58; char local_50; ulong local_48; long local_40; uint local_38; int local_34; lVar10 = *param_1; uVar20 = *(uint *)(lVar10 + 0x7bc); uVar21 = (ulong)uVar20; if (*(char *)((long)param_2 + 0x15) == '\0') { make_empty_page(param_1,param_3,param_5,1); *param_6 = param_3; uVar20 = (uVar20 - *(int *)(lVar10 + 0xc18)) - 0x14; *(uint *)(param_6 + 3) = uVar20; *(uint *)(param_6 + 4) = uVar20; param_3 = (ulong)(*(int *)(lVar10 + 0xc18) + 0xc) + param_3; param_6[1] = param_3; param_6[2] = (ulong)uVar20 + param_3; *(int4 *)((long)param_6 + 0x1c) = 0; LAB_00152b44: uVar12 = 0; } else { local_58 = 6; local_40 = lVar10; local_34 = param_5; lVar10 = pagecache_read(*(int8 *)(lVar10 + 0x600),param_1 + 0x8e,*param_2,0,0, *(int4 *)(lVar10 + 0x7d4),4,local_60); *param_6 = lVar10; local_50 = lVar10 != 0; insert_dynamic(param_1 + 0x5d,local_60); if (local_50 == '\0') { puVar11 = (int4 *)_my_thread_var(); uVar14 = *puVar11; } else { lVar6 = *param_6; lVar7 = *param_1; bVar1 = *(byte *)(lVar6 + 8); bVar2 = *(byte *)(lVar6 + 9); lVar10 = lVar6 + uVar21; uVar13 = (uint)*(ushort *)(lVar6 + 10); *(uint *)(param_6 + 4) = (uint)*(ushort *)(lVar6 + 10); uVar20 = (uint)bVar2; local_38 = param_4; if (uVar20 == 0xff) { if (bVar1 != 0xff) { lVar10 = lVar10 - (ulong)((uint)bVar1 * 4 - 4); lVar7 = *param_1; uVar20 = (uint)bVar1; if (bVar1 == 0) { iVar17 = *(int *)(lVar7 + 0xc18) + 0xc; } else if ((uint)(((int)lVar10 + -8) - (int)lVar6) < (uint)*(ushort *)(lVar10 + -6) + (uint)*(ushort *)(lVar10 + -8) + 4) { if (local_34 == 1) { uVar12 = *(int8 *)(param_1[1] + 0x80); uVar14 = *(int4 *)(lVar7 + 0x3b8); } else { uVar12 = 0; uVar14 = 0; } local_48 = (ulong)bVar1; _ma_compact_block_page(lVar7,lVar6,bVar1 - 1,0,uVar12,uVar14); uVar3 = *(ushort *)(lVar10 + -8); uVar4 = *(ushort *)(lVar10 + -6); uVar5 = *(ushort *)(lVar6 + 10); uVar13 = (uint)uVar5; *(uint *)(param_6 + 4) = (uint)uVar5; if (uVar5 < 4) goto LAB_00152b25; iVar17 = (uint)uVar4 + (uint)uVar3; uVar20 = (uint)local_48; } else { iVar17 = (uint)*(ushort *)(lVar10 + -6) + (uint)*(ushort *)(lVar10 + -8); } *(uint *)(param_6 + 4) = uVar13 - 4; *(char *)(lVar6 + 8) = (char)uVar20 + '\x01'; puVar22 = (ushort *)(lVar10 + -0xc); uVar13 = (int)puVar22 - ((int)lVar6 + iVar17); *(short *)(lVar10 + -0xc) = (short)iVar17; puVar19 = (ushort *)(lVar10 + -10); goto LAB_00152aa9; } } else if (bVar2 < bVar1) { uVar15 = (ulong)((uint)bVar2 * 4); lVar18 = -8 - uVar15; bVar1 = *(byte *)((lVar10 - uVar15) + -5); *(byte *)(lVar6 + 9) = bVar1; if (bVar1 != 0xff) { *(int1 *)(lVar10 + (ulong)bVar1 * -4 + -6) = 0xff; } puVar22 = (ushort *)(lVar10 + lVar18); do { if (-9 < lVar18) { iVar17 = *(int *)(lVar7 + 0xc18) + 0xc; goto LAB_00152a1b; } uVar3 = *(ushort *)(lVar10 + 4 + lVar18); lVar18 = lVar18 + 4; } while (uVar3 == 0); iVar17 = (uint)*(ushort *)(lVar10 + 2 + lVar18) + (uint)uVar3; LAB_00152a1b: pcVar9 = (char *)((uVar21 - uVar15) + lVar6 + -0xb); do { pcVar16 = pcVar9; if (pcVar16[-1] != '\0') break; pcVar9 = pcVar16 + -4; } while (*pcVar16 == '\0'); uVar13 = (uint)*(ushort *)(pcVar16 + -1) - iVar17; *puVar22 = (ushort)iVar17; puVar19 = puVar22 + 1; LAB_00152aa9: uVar8 = local_38; *puVar19 = 0; *(uint *)((long)param_6 + 0x1c) = uVar20; *(uint *)(param_6 + 3) = uVar13; if (uVar13 < local_38) { if (local_38 <= (int)param_6[4] + uVar13) { if (local_34 == 1) { uVar12 = *(int8 *)(param_1[1] + 0x80); uVar14 = *(int4 *)(local_40 + 0x3b8); } else { uVar12 = 0; uVar14 = 0; } _ma_compact_block_page(local_40,*param_6,uVar20,1,uVar12,uVar14); lVar10 = (uVar21 + *param_6) - (ulong)(uint)(*(int *)((long)param_6 + 0x1c) << 2); uVar3 = *(ushort *)(lVar10 + -6); uVar13 = (uint)uVar3; puVar22 = (ushort *)(lVar10 + -8); *(uint *)(param_6 + 4) = (uint)uVar3; *(uint *)(param_6 + 3) = (uint)uVar3; } if (uVar13 < uVar8) goto LAB_00152b25; } param_6[2] = (long)puVar22; param_6[1] = (ulong)*puVar22 + *param_6; goto LAB_00152b44; } LAB_00152b25: uVar14 = 0x7f; } _ma_set_fatal_error(param_1,uVar14); uVar12 = 1; } return uVar12; }
50,306
my_mb_wc_cp932
eloqsql/strings/ctype-cp932.c
static int my_mb_wc_cp932(CHARSET_INFO *cs __attribute__((unused)), my_wc_t *pwc, const uchar *s, const uchar *e){ int hi; if (s >= e) return MY_CS_TOOSMALL; if ((hi= s[0]) < 0x80) /* ASCII: [00-7F] -> [U+0000..U+007F] */ { *pwc= hi; return 1; } /* JIS-X-0201 Half width Katakana: [A1..DF] -> [U+FF61..U+FF9F] */ if (hi >= 0xA1 && hi <= 0xDF) { *pwc= cp932_to_unicode[hi]; return 1; } if (s + 2 > e) return MY_CS_TOOSMALL2; /* JIS-X-0208-MS [81..9F,E0..FC][40..7E,80..FC] */ if (!(pwc[0]= cp932_to_unicode[(hi << 8) + s[1]])) return (iscp932head(hi) && iscp932tail(s[1])) ? -2 : MY_CS_ILSEQ; return 2; }
O3
c
my_mb_wc_cp932: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0xb381b movzbl (%rdx), %edi testb %dil, %dil js 0xb3801 movq %rdi, (%rsi) jmp 0xb3816 leal 0x5f(%rdi), %eax cmpb $0x3e, %al ja 0xb381d leaq 0x4f4c1(%rip), %rax # 0x102cd0 movzwl (%rax,%rdi,2), %eax movq %rax, (%rsi) movl $0x1, %eax popq %rbp retq leaq 0x2(%rdx), %r8 movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %r8 ja 0xb381b movzbl 0x1(%rdx), %eax movl %edi, %ecx shll $0x9, %ecx leal (%rcx,%rax,2), %eax leaq 0x4f492(%rip), %rcx # 0x102cd0 movzwl (%rax,%rcx), %ecx movq %rcx, (%rsi) movl $0x2, %eax testq %rcx, %rcx jne 0xb381b cmpb $-0x80, %dil setne %al cmpb $-0x60, %dil setb %cl andb %al, %cl addb $0x20, %dil cmpb $0x1d, %dil setb %sil orb %cl, %sil xorl %eax, %eax cmpb $0x1, %sil jne 0xb381b movb 0x1(%rdx), %cl leal -0x40(%rcx), %edx movl $0xfffffffe, %eax # imm = 0xFFFFFFFE cmpb $0x3f, %dl jb 0xb381b movl $0x0, %eax testb %cl, %cl jns 0xb381b xorl %eax, %eax cmpb $-0x3, %cl setae %al leal -0x2(,%rax,2), %eax jmp 0xb381b
my_mb_wc_cp932: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_B381B movzx edi, byte ptr [rdx] test dil, dil js short loc_B3801 mov [rsi], rdi jmp short loc_B3816 loc_B3801: lea eax, [rdi+5Fh] cmp al, 3Eh ; '>' ja short loc_B381D lea rax, cp932_to_unicode movzx eax, word ptr [rax+rdi*2] mov [rsi], rax loc_B3816: mov eax, 1 loc_B381B: pop rbp retn loc_B381D: lea r8, [rdx+2] mov eax, 0FFFFFF9Ah cmp r8, rcx ja short loc_B381B movzx eax, byte ptr [rdx+1] mov ecx, edi shl ecx, 9 lea eax, [rcx+rax*2] lea rcx, cp932_to_unicode movzx ecx, word ptr [rax+rcx] mov [rsi], rcx mov eax, 2 test rcx, rcx jnz short loc_B381B cmp dil, 80h setnz al cmp dil, 0A0h setb cl and cl, al add dil, 20h ; ' ' cmp dil, 1Dh setb sil or sil, cl xor eax, eax cmp sil, 1 jnz short loc_B381B mov cl, [rdx+1] lea edx, [rcx-40h] mov eax, 0FFFFFFFEh cmp dl, 3Fh ; '?' jb short loc_B381B mov eax, 0 test cl, cl jns short loc_B381B xor eax, eax cmp cl, 0FDh setnb al lea eax, ds:0FFFFFFFFFFFFFFFEh[rax*2] jmp loc_B381B
long long my_mb_wc_cp932(long long a1, _QWORD *a2, unsigned __int8 *a3, unsigned long long a4) { long long result; // rax long long v5; // rdi long long v6; // rcx char v7; // cl result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { v5 = *a3; if ( (v5 & 0x80u) == 0LL ) { *a2 = v5; return 1LL; } if ( (unsigned __int8)(v5 + 95) <= 0x3Eu ) { *a2 = cp932_to_unicode[v5]; return 1LL; } result = 4294967194LL; if ( (unsigned long long)(a3 + 2) <= a4 ) { v6 = cp932_to_unicode[256 * (_DWORD)v5 + a3[1]]; *a2 = v6; result = 2LL; if ( !v6 ) { result = 0LL; if ( (_BYTE)v5 != 0x80 && (unsigned __int8)v5 < 0xA0u || (unsigned __int8)(v5 + 32) < 0x1Du ) { v7 = a3[1]; result = 4294967294LL; if ( (unsigned __int8)(v7 - 64) >= 0x3Fu ) { result = 0LL; if ( v7 < 0 ) return 2 * (unsigned int)((unsigned __int8)v7 >= 0xFDu) - 2; } } } } } return result; }
my_mb_wc_cp932: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001b381b MOVZX EDI,byte ptr [RDX] TEST DIL,DIL JS 0x001b3801 MOV qword ptr [RSI],RDI JMP 0x001b3816 LAB_001b3801: LEA EAX,[RDI + 0x5f] CMP AL,0x3e JA 0x001b381d LEA RAX,[0x202cd0] MOVZX EAX,word ptr [RAX + RDI*0x2] MOV qword ptr [RSI],RAX LAB_001b3816: MOV EAX,0x1 LAB_001b381b: POP RBP RET LAB_001b381d: LEA R8,[RDX + 0x2] MOV EAX,0xffffff9a CMP R8,RCX JA 0x001b381b MOVZX EAX,byte ptr [RDX + 0x1] MOV ECX,EDI SHL ECX,0x9 LEA EAX,[RCX + RAX*0x2] LEA RCX,[0x202cd0] MOVZX ECX,word ptr [RAX + RCX*0x1] MOV qword ptr [RSI],RCX MOV EAX,0x2 TEST RCX,RCX JNZ 0x001b381b CMP DIL,0x80 SETNZ AL CMP DIL,0xa0 SETC CL AND CL,AL ADD DIL,0x20 CMP DIL,0x1d SETC SIL OR SIL,CL XOR EAX,EAX CMP SIL,0x1 JNZ 0x001b381b MOV CL,byte ptr [RDX + 0x1] LEA EDX,[RCX + -0x40] MOV EAX,0xfffffffe CMP DL,0x3f JC 0x001b381b MOV EAX,0x0 TEST CL,CL JNS 0x001b381b XOR EAX,EAX CMP CL,0xfd SETNC AL LEA EAX,[-0x2 + RAX*0x2] JMP 0x001b381b
int my_mb_wc_cp932(int8 param_1,ulong *param_2,byte *param_3,byte *param_4) { byte bVar1; ushort uVar2; int iVar3; iVar3 = -0x65; if (param_3 < param_4) { bVar1 = *param_3; if ((char)bVar1 < '\0') { if (0x3e < (byte)(bVar1 + 0x5f)) { if (param_4 < param_3 + 2) { return -0x66; } uVar2 = *(ushort *)(cp932_to_unicode + ((uint)bVar1 * 0x200 + (uint)param_3[1] * 2)); *param_2 = (ulong)uVar2; if ((ulong)uVar2 != 0) { return 2; } if (0x1c < (byte)(bVar1 + 0x20) && (0x9f < bVar1 || bVar1 == 0x80)) { return 0; } bVar1 = param_3[1]; if ((byte)(bVar1 - 0x40) < 0x3f) { return -2; } if (-1 < (char)bVar1) { return 0; } return (uint)(0xfc < bVar1) * 2 + -2; } *param_2 = (ulong)*(ushort *)(cp932_to_unicode + (ulong)bVar1 * 2); } else { *param_2 = (ulong)bVar1; } iVar3 = 1; } return iVar3; }
50,307
lo0bits
eloqsql/libmariadb/libmariadb/ma_dtoa.c
static int lo0bits(ULong *y) { register int k; register ULong x= *y; if (x & 7) { if (x & 1) return 0; if (x & 2) { *y= x >> 1; return 1; } *y= x >> 2; return 2; } k= 0; if (!(x & 0xffff)) { k= 16; x>>= 16; } if (!(x & 0xff)) { k+= 8; x>>= 8; } if (!(x & 0xf)) { k+= 4; x>>= 4; } if (!(x & 0x3)) { k+= 2; x>>= 2; } if (!(x & 1)) { k++; x>>= 1; if (!x) return 32; } *y= x; return k; }
O0
c
lo0bits: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movl (%rax), %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x7, %eax cmpl $0x0, %eax je 0x4fdfd movl -0x18(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax je 0x4fdc3 movl $0x0, -0x4(%rbp) jmp 0x4feb6 movl -0x18(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax je 0x4fde5 movl -0x18(%rbp), %ecx shrl %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x1, -0x4(%rbp) jmp 0x4feb6 movl -0x18(%rbp), %ecx shrl $0x2, %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl $0x2, -0x4(%rbp) jmp 0x4feb6 movl $0x0, -0x14(%rbp) movl -0x18(%rbp), %eax andl $0xffff, %eax # imm = 0xFFFF cmpl $0x0, %eax jne 0x4fe21 movl $0x10, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x10, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0xff, %eax cmpl $0x0, %eax jne 0x4fe40 movl -0x14(%rbp), %eax addl $0x8, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x8, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0xf, %eax cmpl $0x0, %eax jne 0x4fe5d movl -0x14(%rbp), %eax addl $0x4, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x4, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x3, %eax cmpl $0x0, %eax jne 0x4fe7a movl -0x14(%rbp), %eax addl $0x2, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl $0x2, %eax movl %eax, -0x18(%rbp) movl -0x18(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x4fea7 movl -0x14(%rbp), %eax addl $0x1, %eax movl %eax, -0x14(%rbp) movl -0x18(%rbp), %eax shrl %eax movl %eax, -0x18(%rbp) cmpl $0x0, -0x18(%rbp) jne 0x4fea5 movl $0x20, -0x4(%rbp) jmp 0x4feb6 jmp 0x4fea7 movl -0x18(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopl (%rax,%rax)
lo0bits: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov eax, [rax] mov [rbp+var_18], eax mov eax, [rbp+var_18] and eax, 7 cmp eax, 0 jz short loc_4FDFD mov eax, [rbp+var_18] and eax, 1 cmp eax, 0 jz short loc_4FDC3 mov [rbp+var_4], 0 jmp loc_4FEB6 loc_4FDC3: mov eax, [rbp+var_18] and eax, 2 cmp eax, 0 jz short loc_4FDE5 mov ecx, [rbp+var_18] shr ecx, 1 mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 1 jmp loc_4FEB6 loc_4FDE5: mov ecx, [rbp+var_18] shr ecx, 2 mov rax, [rbp+var_10] mov [rax], ecx mov [rbp+var_4], 2 jmp loc_4FEB6 loc_4FDFD: mov [rbp+var_14], 0 mov eax, [rbp+var_18] and eax, 0FFFFh cmp eax, 0 jnz short loc_4FE21 mov [rbp+var_14], 10h mov eax, [rbp+var_18] shr eax, 10h mov [rbp+var_18], eax loc_4FE21: mov eax, [rbp+var_18] and eax, 0FFh cmp eax, 0 jnz short loc_4FE40 mov eax, [rbp+var_14] add eax, 8 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 8 mov [rbp+var_18], eax loc_4FE40: mov eax, [rbp+var_18] and eax, 0Fh cmp eax, 0 jnz short loc_4FE5D mov eax, [rbp+var_14] add eax, 4 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 4 mov [rbp+var_18], eax loc_4FE5D: mov eax, [rbp+var_18] and eax, 3 cmp eax, 0 jnz short loc_4FE7A mov eax, [rbp+var_14] add eax, 2 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 2 mov [rbp+var_18], eax loc_4FE7A: mov eax, [rbp+var_18] and eax, 1 cmp eax, 0 jnz short loc_4FEA7 mov eax, [rbp+var_14] add eax, 1 mov [rbp+var_14], eax mov eax, [rbp+var_18] shr eax, 1 mov [rbp+var_18], eax cmp [rbp+var_18], 0 jnz short loc_4FEA5 mov [rbp+var_4], 20h ; ' ' jmp short loc_4FEB6 loc_4FEA5: jmp short $+2 loc_4FEA7: mov ecx, [rbp+var_18] mov rax, [rbp+var_10] mov [rax], ecx mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_4FEB6: mov eax, [rbp+var_4] pop rbp retn
long long lo0bits(unsigned int *a1) { unsigned int v2; // [rsp+0h] [rbp-18h] unsigned int v3; // [rsp+4h] [rbp-14h] v2 = *a1; if ( (*a1 & 7) != 0 ) { if ( (v2 & 1) != 0 ) { return 0; } else if ( (v2 & 2) != 0 ) { *a1 = v2 >> 1; return 1; } else { *a1 = v2 >> 2; return 2; } } else { v3 = 0; if ( !(_WORD)v2 ) { v3 = 16; v2 >>= 16; } if ( !(_BYTE)v2 ) { v3 += 8; v2 >>= 8; } if ( (v2 & 0xF) == 0 ) { v3 += 4; v2 >>= 4; } if ( (v2 & 3) == 0 ) { v3 += 2; v2 >>= 2; } if ( (v2 & 1) != 0 || (++v3, (v2 >>= 1) != 0) ) { *a1 = v2; return v3; } else { return 32; } } }
lo0bits: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x18],EAX MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x7 CMP EAX,0x0 JZ 0x0014fdfd MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x1 CMP EAX,0x0 JZ 0x0014fdc3 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0014feb6 LAB_0014fdc3: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x2 CMP EAX,0x0 JZ 0x0014fde5 MOV ECX,dword ptr [RBP + -0x18] SHR ECX,0x1 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x1 JMP 0x0014feb6 LAB_0014fde5: MOV ECX,dword ptr [RBP + -0x18] SHR ECX,0x2 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV dword ptr [RBP + -0x4],0x2 JMP 0x0014feb6 LAB_0014fdfd: MOV dword ptr [RBP + -0x14],0x0 MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xffff CMP EAX,0x0 JNZ 0x0014fe21 MOV dword ptr [RBP + -0x14],0x10 MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x10 MOV dword ptr [RBP + -0x18],EAX LAB_0014fe21: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xff CMP EAX,0x0 JNZ 0x0014fe40 MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x8 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x8 MOV dword ptr [RBP + -0x18],EAX LAB_0014fe40: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0xf CMP EAX,0x0 JNZ 0x0014fe5d MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x4 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x4 MOV dword ptr [RBP + -0x18],EAX LAB_0014fe5d: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x3 CMP EAX,0x0 JNZ 0x0014fe7a MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x2 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x2 MOV dword ptr [RBP + -0x18],EAX LAB_0014fe7a: MOV EAX,dword ptr [RBP + -0x18] AND EAX,0x1 CMP EAX,0x0 JNZ 0x0014fea7 MOV EAX,dword ptr [RBP + -0x14] ADD EAX,0x1 MOV dword ptr [RBP + -0x14],EAX MOV EAX,dword ptr [RBP + -0x18] SHR EAX,0x1 MOV dword ptr [RBP + -0x18],EAX CMP dword ptr [RBP + -0x18],0x0 JNZ 0x0014fea5 MOV dword ptr [RBP + -0x4],0x20 JMP 0x0014feb6 LAB_0014fea5: JMP 0x0014fea7 LAB_0014fea7: MOV ECX,dword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_0014feb6: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int lo0bits(uint *param_1) { uint local_20; int local_1c; int local_c; local_20 = *param_1; if ((local_20 & 7) == 0) { local_1c = 0; if ((local_20 & 0xffff) == 0) { local_1c = 0x10; local_20 = local_20 >> 0x10; } if ((local_20 & 0xff) == 0) { local_1c = local_1c + 8; local_20 = local_20 >> 8; } if ((local_20 & 0xf) == 0) { local_1c = local_1c + 4; local_20 = local_20 >> 4; } if ((local_20 & 3) == 0) { local_1c = local_1c + 2; local_20 = local_20 >> 2; } if ((local_20 & 1) == 0) { local_1c = local_1c + 1; local_20 = local_20 >> 1; if (local_20 == 0) { return 0x20; } } *param_1 = local_20; local_c = local_1c; } else if ((local_20 & 1) == 0) { if ((local_20 & 2) == 0) { *param_1 = local_20 >> 2; local_c = 2; } else { *param_1 = local_20 >> 1; local_c = 1; } } else { local_c = 0; } return local_c; }
50,308
CLI::Option::_validate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int) const
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/Option_inl.hpp
CLI11_INLINE std::string Option::_validate(std::string &result, int index) const { std::string err_msg; if(result.empty() && expected_min_ == 0) { // an empty with nothing expected is allowed return err_msg; } for(const auto &vali : validators_) { auto v = vali.get_application_index(); if(v == -1 || v == index) { try { err_msg = vali(result); } catch(const ValidationError &err) { err_msg = err.what(); } if(!err_msg.empty()) break; } } return err_msg; }
O0
cpp
CLI::Option::_validate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int) const: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0xa0(%rbp) movq %rdi, %rax movq %rax, -0x98(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x90(%rbp) movb $0x0, -0x1d(%rbp) callq 0x9890 movq -0x18(%rbp), %rdi callq 0x99c0 testb $0x1, %al jne 0x1cf6e jmp 0x1cf8e movq -0x90(%rbp), %rax cmpl $0x0, 0x170(%rax) jne 0x1cf8e movb $0x1, -0x1d(%rbp) movl $0x1, -0x24(%rbp) jmp 0x1d0e1 movq -0x90(%rbp), %rax addq $0x178, %rax # imm = 0x178 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rdi callq 0x1dcc0 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rdi callq 0x1dcf0 movq %rax, -0x40(%rbp) leaq -0x38(%rbp), %rdi leaq -0x40(%rbp), %rsi callq 0x1dec0 testb $0x1, %al jne 0x1cfcf jmp 0x1d0d6 leaq -0x38(%rbp), %rdi callq 0x1df00 movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rdi callq 0x1df20 movl %eax, -0xa4(%rbp) jmp 0x1cfed movl -0xa4(%rbp), %eax movl %eax, -0x4c(%rbp) cmpl $-0x1, -0x4c(%rbp) je 0x1d008 movl -0x4c(%rbp), %eax cmpl -0x1c(%rbp), %eax jne 0x1d0c6 movq -0x48(%rbp), %rsi movq -0x18(%rbp), %rdx leaq -0x80(%rbp), %rdi callq 0x1df40 jmp 0x1d01b movq -0xa0(%rbp), %rdi leaq -0x80(%rbp), %rsi callq 0x9790 leaq -0x80(%rbp), %rdi callq 0x9b90 jmp 0x1d09d movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x1d103 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) movl -0x5c(%rbp), %eax movl $0x1, %ecx cmpl %ecx, %eax jne 0x1d103 movq -0x58(%rbp), %rdi callq 0x9220 movq %rax, -0x88(%rbp) movq -0x88(%rbp), %rdi movq (%rdi), %rax movq 0x10(%rax), %rax callq *%rax movq -0xa0(%rbp), %rdi movq %rax, %rsi callq 0x9870 jmp 0x1d094 callq 0x99a0 jmp 0x1d09b jmp 0x1d09d movq -0xa0(%rbp), %rdi callq 0x99c0 testb $0x1, %al jne 0x1d0c4 jmp 0x1d0d6 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) callq 0x99a0 jmp 0x1d0c2 jmp 0x1d103 jmp 0x1d0c6 jmp 0x1d0c8 leaq -0x38(%rbp), %rdi callq 0x1e090 jmp 0x1cfb9 movb $0x1, -0x1d(%rbp) movl $0x1, -0x24(%rbp) testb $0x1, -0x1d(%rbp) jne 0x1d0f3 movq -0xa0(%rbp), %rdi callq 0x9b90 movq -0x98(%rbp), %rax addq $0xb0, %rsp popq %rbp retq movq -0xa0(%rbp), %rdi callq 0x9b90 movq -0x58(%rbp), %rdi callq 0x9a70 movq %rax, %rdi callq 0x10800
_ZNK3CLI6Option9_validateERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_A0], rdi mov rax, rdi mov [rbp+var_98], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov rax, [rbp+var_10] mov [rbp+var_90], rax mov [rbp+var_1D], 0 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rdi, [rbp+var_18] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_1CF6E jmp short loc_1CF8E loc_1CF6E: mov rax, [rbp+var_90] cmp dword ptr [rax+170h], 0 jnz short loc_1CF8E mov [rbp+var_1D], 1 mov [rbp+var_24], 1 jmp loc_1D0E1 loc_1CF8E: mov rax, [rbp+var_90] add rax, 178h mov [rbp+var_30], rax mov rdi, [rbp+var_30] call _ZNKSt6vectorIN3CLI9ValidatorESaIS1_EE5beginEv; std::vector<CLI::Validator>::begin(void) mov [rbp+var_38], rax mov rdi, [rbp+var_30] call _ZNKSt6vectorIN3CLI9ValidatorESaIS1_EE3endEv; std::vector<CLI::Validator>::end(void) mov [rbp+var_40], rax loc_1CFB9: lea rdi, [rbp+var_38] lea rsi, [rbp+var_40] call _ZN9__gnu_cxxneIPKN3CLI9ValidatorESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<CLI::Validator const*,std::vector<CLI::Validator>>(__gnu_cxx::__normal_iterator<CLI::Validator const*,std::vector<CLI::Validator>> const&,__gnu_cxx::__normal_iterator<CLI::Validator const*,std::vector<CLI::Validator>> const&) test al, 1 jnz short loc_1CFCF jmp loc_1D0D6 loc_1CFCF: lea rdi, [rbp+var_38] call _ZNK9__gnu_cxx17__normal_iteratorIPKN3CLI9ValidatorESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<CLI::Validator const*,std::vector<CLI::Validator>>::operator*(void) mov [rbp+var_48], rax mov rdi, [rbp+var_48]; this call _ZNK3CLI9Validator21get_application_indexEv; CLI::Validator::get_application_index(void) mov [rbp+var_A4], eax jmp short $+2 loc_1CFED: mov eax, [rbp+var_A4] mov [rbp+var_4C], eax cmp [rbp+var_4C], 0FFFFFFFFh jz short loc_1D008 mov eax, [rbp+var_4C] cmp eax, [rbp+var_1C] jnz loc_1D0C6 loc_1D008: mov rsi, [rbp+var_48] mov rdx, [rbp+var_18] lea rdi, [rbp+var_80] call _ZNK3CLI9ValidatorclERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::Validator::operator()(std::string &) jmp short $+2 loc_1D01B: mov rdi, [rbp+var_A0] lea rsi, [rbp+var_80] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rbp+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp short loc_1D09D mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp loc_1D103 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax mov eax, [rbp+var_5C] mov ecx, 1 cmp eax, ecx jnz loc_1D103 mov rdi, [rbp+var_58]; void * call ___cxa_begin_catch mov [rbp+var_88], rax mov rdi, [rbp+var_88] mov rax, [rdi] mov rax, [rax+10h] call rax mov rdi, [rbp+var_A0] mov rsi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) jmp short $+2 loc_1D094: call ___cxa_end_catch jmp short $+2 loc_1D09B: jmp short $+2 loc_1D09D: mov rdi, [rbp+var_A0] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_1D0C4 jmp short loc_1D0D6 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax call ___cxa_end_catch jmp short $+2 loc_1D0C2: jmp short loc_1D103 loc_1D0C4: jmp short $+2 loc_1D0C6: jmp short $+2 loc_1D0C8: lea rdi, [rbp+var_38] call _ZN9__gnu_cxx17__normal_iteratorIPKN3CLI9ValidatorESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<CLI::Validator const*,std::vector<CLI::Validator>>::operator++(void) jmp loc_1CFB9 loc_1D0D6: mov [rbp+var_1D], 1 mov [rbp+var_24], 1 loc_1D0E1: test [rbp+var_1D], 1 jnz short loc_1D0F3 mov rdi, [rbp+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1D0F3: mov rax, [rbp+var_98] add rsp, 0B0h pop rbp retn loc_1D103: mov rdi, [rbp+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rbp+var_58] call __Unwind_Resume mov rdi, rax call __clang_call_terminate
long long CLI::Option::_validate(long long a1, long long a2, long long a3, long long a4, long long a5, long long a6) { _BYTE v7[36]; // [rsp+30h] [rbp-80h] BYREF int application_index; // [rsp+64h] [rbp-4Ch] CLI::Validator *v9; // [rsp+68h] [rbp-48h] long long v10; // [rsp+70h] [rbp-40h] BYREF _QWORD v11[2]; // [rsp+78h] [rbp-38h] BYREF int v12; // [rsp+8Ch] [rbp-24h] char v13; // [rsp+93h] [rbp-1Dh] int v14; // [rsp+94h] [rbp-1Ch] long long v15; // [rsp+98h] [rbp-18h] long long v16; // [rsp+A0h] [rbp-10h] long long v17; // [rsp+A8h] [rbp-8h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = 0; std::string::basic_string(a1, a2, a3, a4, a5, a6); if ( (std::string::empty(v15) & 1) == 0 || *(_DWORD *)(a2 + 368) ) { v11[1] = a2 + 376; v11[0] = std::vector<CLI::Validator>::begin(a2 + 376); v10 = std::vector<CLI::Validator>::end(a2 + 376); while ( (__gnu_cxx::operator!=<CLI::Validator const*,std::vector<CLI::Validator>>(v11, &v10) & 1) != 0 ) { v9 = (CLI::Validator *)__gnu_cxx::__normal_iterator<CLI::Validator const*,std::vector<CLI::Validator>>::operator*(v11); application_index = CLI::Validator::get_application_index(v9); if ( application_index == -1 || application_index == v14 ) { CLI::Validator::operator()(v7, v9, v15); std::string::operator=(a1); std::string::~string(v7); if ( (std::string::empty(a1) & 1) == 0 ) break; } __gnu_cxx::__normal_iterator<CLI::Validator const*,std::vector<CLI::Validator>>::operator++(v11); } v13 = 1; v12 = 1; } else { v13 = 1; v12 = 1; } return a1; }
_validate: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0xa0],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x98],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x90],RAX MOV byte ptr [RBP + -0x1d],0x0 CALL 0x00109890 MOV RDI,qword ptr [RBP + -0x18] CALL 0x001099c0 TEST AL,0x1 JNZ 0x0011cf6e JMP 0x0011cf8e LAB_0011cf6e: MOV RAX,qword ptr [RBP + -0x90] CMP dword ptr [RAX + 0x170],0x0 JNZ 0x0011cf8e MOV byte ptr [RBP + -0x1d],0x1 MOV dword ptr [RBP + -0x24],0x1 JMP 0x0011d0e1 LAB_0011cf8e: MOV RAX,qword ptr [RBP + -0x90] ADD RAX,0x178 MOV qword ptr [RBP + -0x30],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x0011dcc0 MOV qword ptr [RBP + -0x38],RAX MOV RDI,qword ptr [RBP + -0x30] CALL 0x0011dcf0 MOV qword ptr [RBP + -0x40],RAX LAB_0011cfb9: LEA RDI,[RBP + -0x38] LEA RSI,[RBP + -0x40] CALL 0x0011dec0 TEST AL,0x1 JNZ 0x0011cfcf JMP 0x0011d0d6 LAB_0011cfcf: LEA RDI,[RBP + -0x38] CALL 0x0011df00 MOV qword ptr [RBP + -0x48],RAX MOV RDI,qword ptr [RBP + -0x48] LAB_0011cfe0: CALL 0x0011df20 MOV dword ptr [RBP + -0xa4],EAX JMP 0x0011cfed LAB_0011cfed: MOV EAX,dword ptr [RBP + -0xa4] MOV dword ptr [RBP + -0x4c],EAX CMP dword ptr [RBP + -0x4c],-0x1 JZ 0x0011d008 MOV EAX,dword ptr [RBP + -0x4c] CMP EAX,dword ptr [RBP + -0x1c] JNZ 0x0011d0c6 LAB_0011d008: MOV RSI,qword ptr [RBP + -0x48] MOV RDX,qword ptr [RBP + -0x18] LAB_0011d010: LEA RDI,[RBP + -0x80] CALL 0x0011df40 LAB_0011d019: JMP 0x0011d01b LAB_0011d01b: MOV RDI,qword ptr [RBP + -0xa0] LEA RSI,[RBP + -0x80] CALL 0x00109790 LEA RDI,[RBP + -0x80] CALL 0x00109b90 JMP 0x0011d09d LAB_0011d09d: MOV RDI,qword ptr [RBP + -0xa0] CALL 0x001099c0 TEST AL,0x1 JNZ 0x0011d0c4 JMP 0x0011d0d6 LAB_0011d0c4: JMP 0x0011d0c6 LAB_0011d0c6: JMP 0x0011d0c8 LAB_0011d0c8: LEA RDI,[RBP + -0x38] CALL 0x0011e090 JMP 0x0011cfb9 LAB_0011d0d6: MOV byte ptr [RBP + -0x1d],0x1 MOV dword ptr [RBP + -0x24],0x1 LAB_0011d0e1: TEST byte ptr [RBP + -0x1d],0x1 JNZ 0x0011d0f3 MOV RDI,qword ptr [RBP + -0xa0] CALL 0x00109b90 LAB_0011d0f3: MOV RAX,qword ptr [RBP + -0x98] ADD RSP,0xb0 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x0011d0e7) */ /* CLI::Option::_validate(std::__cxx11::string&, int) const */ string * CLI::Option::_validate(string *param_1,int param_2) { bool bVar1; ulong uVar2; int in_ECX; int4 in_register_00000034; long lVar3; Validator local_88 [52]; int local_54; string *local_50; int8 local_48; int8 local_40; vector<CLI::Validator,std::allocator<CLI::Validator>> *local_38; int1 local_25; int local_24; long local_18; string *local_10; lVar3 = CONCAT44(in_register_00000034,param_2); local_25 = 0; local_24 = in_ECX; local_18 = lVar3; local_10 = param_1; std::__cxx11::string::string(param_1); uVar2 = std::__cxx11::string::empty(); if (((uVar2 & 1) == 0) || (*(int *)(lVar3 + 0x170) != 0)) { local_38 = (vector<CLI::Validator,std::allocator<CLI::Validator>> *)(lVar3 + 0x178); local_40 = std::vector<CLI::Validator,std::allocator<CLI::Validator>>::begin(local_38); local_48 = std::vector<CLI::Validator,std::allocator<CLI::Validator>>::end(local_38); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_40,(__normal_iterator *)&local_48), bVar1) { local_50 = (string *) __gnu_cxx:: __normal_iterator<CLI::Validator_const*,std::vector<CLI::Validator,std::allocator<CLI::Validator>>> ::operator*((__normal_iterator<CLI::Validator_const*,std::vector<CLI::Validator,std::allocator<CLI::Validator>>> *)&local_40); /* try { // try from 0011cfe0 to 0011cfe4 has its CatchHandler @ 0011d036 */ local_54 = Validator::get_application_index((Validator *)local_50); if ((local_54 == -1) || (local_54 == local_24)) { /* try { // try from 0011d010 to 0011d018 has its CatchHandler @ 0011d047 */ Validator::operator()(local_88,local_50); std::__cxx11::string::operator=(param_1,(string *)local_88); std::__cxx11::string::~string((string *)local_88); uVar2 = std::__cxx11::string::empty(); if ((uVar2 & 1) == 0) { return param_1; } } __gnu_cxx:: __normal_iterator<CLI::Validator_const*,std::vector<CLI::Validator,std::allocator<CLI::Validator>>> ::operator++((__normal_iterator<CLI::Validator_const*,std::vector<CLI::Validator,std::allocator<CLI::Validator>>> *)&local_40); } } return param_1; }
50,309
fmt::v10::appender fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender, char>(fmt::v10::appender, fmt::v10::basic_string_view<char>) const
AlayaLite/build_O3/_deps/spdlog-src/include/spdlog/fmt/bundled/format.h
auto apply(Out out, basic_string_view<C> digits) const -> Out { auto num_digits = static_cast<int>(digits.size()); auto separators = basic_memory_buffer<int>(); separators.push_back(0); auto state = initial_state(); while (int i = next(state)) { if (i >= num_digits) break; separators.push_back(i); } for (int i = 0, sep_index = static_cast<int>(separators.size() - 1); i < num_digits; ++i) { if (num_digits - i == separators[sep_index]) { out = copy_str<Char>(thousands_sep_.data(), thousands_sep_.data() + thousands_sep_.size(), out); --sep_index; } *out++ = static_cast<Char>(digits[to_unsigned(i)]); } return out; }
O3
c
fmt::v10::appender fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender, char>(fmt::v10::appender, fmt::v10::basic_string_view<char>) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x808, %rsp # imm = 0x808 movq %rcx, %r14 movq %rdx, 0x10(%rsp) movq %rsi, %rbx movq %rdi, %r12 leaq 0x6dc42(%rip), %rax # 0xb2c18 addq $0x10, %rax leaq 0x38(%rsp), %rdi movq %rax, -0x20(%rdi) movq %rdi, -0x18(%rdi) movq $0x1f4, -0x8(%rdi) # imm = 0x1F4 movq $0x1, -0x10(%rdi) movl $0x0, (%rdi) movq 0x28(%r12), %rax testq %rax, %rax je 0x4508e movq (%r12), %rbp xorl %r15d, %r15d movl $0x1, %ecx movq (%r12), %rdx addq 0x8(%r12), %rdx cmpq %rdx, %rbp je 0x45036 movb (%rbp), %dl leal -0x7f(%rdx), %esi cmpb $-0x7e, %sil jb 0x45086 incq %rbp jmp 0x45039 movb -0x1(%rdx), %dl movsbl %dl, %edx addl %edx, %r15d je 0x45086 cmpl %r14d, %r15d jge 0x45086 leaq 0x1(%rcx), %r13 cmpq %r13, 0x30(%rsp) jae 0x45073 movq 0x18(%rsp), %rax leaq 0x18(%rsp), %rdi movq %r13, %rsi callq *(%rax) movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rcx leaq 0x1(%rcx), %r13 movq 0x28(%r12), %rax movq %r13, 0x28(%rsp) movl %r15d, (%rdi,%rcx,4) movq %r13, %rcx testq %rax, %rax jne 0x45017 jmp 0x45089 movq %rcx, %r13 decl %r13d jmp 0x45091 xorl %r13d, %r13d testl %r14d, %r14d jle 0x45115 movl %r14d, %r15d andl $0x7fffffff, %r15d # imm = 0x7FFFFFFF xorl %ebp, %ebp movq %r12, 0x8(%rsp) movq 0x20(%rsp), %rax movslq %r13d, %rcx cmpl (%rax,%rcx,4), %r14d jne 0x450cd movq 0x20(%r12), %rsi movq 0x28(%r12), %rdx addq %rsi, %rdx movq %rbx, %rdi callq 0x2fac6 decl %r13d movq 0x10(%rsp), %rax movb (%rax,%rbp), %r12b movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi cmpq %rsi, 0x18(%rbx) jae 0x450f4 movq (%rbx), %rax movq %rbx, %rdi callq *(%rax) movq 0x10(%rbx), %rax leaq 0x1(%rax), %rsi movq 0x8(%rbx), %rcx movq %rsi, 0x10(%rbx) movb %r12b, (%rcx,%rax) incq %rbp decl %r14d cmpq %rbp, %r15 movq 0x8(%rsp), %r12 jne 0x450a7 movq 0x20(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x4512d movq 0x30(%rsp), %rsi shlq $0x2, %rsi callq 0x11120 movq %rbx, %rax addq $0x808, %rsp # imm = 0x808 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x45146 jmp 0x45146 movq %rax, %rbx movq 0x20(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x45166 movq 0x30(%rsp), %rsi shlq $0x2, %rsi callq 0x11120 movq %rbx, %rdi callq 0x11760
_ZNK3fmt3v106detail14digit_groupingIcE5applyINS0_8appenderEcEET_S6_NS0_17basic_string_viewIT0_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 808h mov r14, rcx mov [rsp+838h+var_828], rdx mov rbx, rsi mov r12, rdi lea rax, _ZTVN3fmt3v1019basic_memory_bufferIiLm500ESaIiEEE; `vtable for'fmt::v10::basic_memory_buffer<int,500ul,std::allocator<int>> add rax, 10h lea rdi, [rsp+838h+var_800] mov [rdi-20h], rax mov [rdi-18h], rdi mov qword ptr [rdi-8], 1F4h mov qword ptr [rdi-10h], 1 mov dword ptr [rdi], 0 mov rax, [r12+28h] test rax, rax jz loc_4508E mov rbp, [r12] xor r15d, r15d mov ecx, 1 loc_45017: mov rdx, [r12] add rdx, [r12+8] cmp rbp, rdx jz short loc_45036 mov dl, [rbp+0] lea esi, [rdx-7Fh] cmp sil, 82h jb short loc_45086 inc rbp jmp short loc_45039 loc_45036: mov dl, [rdx-1] loc_45039: movsx edx, dl add r15d, edx jz short loc_45086 cmp r15d, r14d jge short loc_45086 lea r13, [rcx+1] cmp [rsp+838h+var_808], r13 jnb short loc_45073 mov rax, [rsp+838h+var_820] lea rdi, [rsp+838h+var_820] mov rsi, r13 call qword ptr [rax] mov rdi, [rsp+838h+var_818] mov rcx, [rsp+838h+var_810] lea r13, [rcx+1] mov rax, [r12+28h] loc_45073: mov [rsp+838h+var_810], r13 mov [rdi+rcx*4], r15d mov rcx, r13 test rax, rax jnz short loc_45017 jmp short loc_45089 loc_45086: mov r13, rcx loc_45089: dec r13d jmp short loc_45091 loc_4508E: xor r13d, r13d loc_45091: test r14d, r14d jle short loc_45115 mov r15d, r14d and r15d, 7FFFFFFFh xor ebp, ebp mov [rsp+838h+var_830], r12 loc_450A7: mov rax, [rsp+838h+var_818] movsxd rcx, r13d cmp r14d, [rax+rcx*4] jnz short loc_450CD mov rsi, [r12+20h] mov rdx, [r12+28h] add rdx, rsi mov rdi, rbx call _ZN3fmt3v106detail6bufferIcE6appendIcEEvPKT_S7_; fmt::v10::detail::buffer<char>::append<char>(char const*,char const*) dec r13d loc_450CD: mov rax, [rsp+838h+var_828] mov r12b, [rax+rbp] mov rax, [rbx+10h] lea rsi, [rax+1] cmp [rbx+18h], rsi jnb short loc_450F4 mov rax, [rbx] mov rdi, rbx call qword ptr [rax] mov rax, [rbx+10h] lea rsi, [rax+1] loc_450F4: mov rcx, [rbx+8] mov [rbx+10h], rsi mov [rcx+rax], r12b inc rbp dec r14d cmp r15, rbp mov r12, [rsp+838h+var_830] jnz short loc_450A7 mov rdi, [rsp+838h+var_818]; void * loc_45115: lea rax, [rsp+838h+var_800] cmp rdi, rax jz short loc_4512D mov rsi, [rsp+838h+var_808] shl rsi, 2; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4512D: mov rax, rbx add rsp, 808h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_45146 jmp short $+2 loc_45146: mov rbx, rax mov rdi, [rsp+arg_18]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_45166 mov rsi, [rsp+arg_28] shl rsi, 2; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_45166: mov rdi, rbx call __Unwind_Resume
long long fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char>( long long a1, long long a2, long long a3, int a4) { _DWORD *v7; // rdi long long v8; // rax char *v9; // rbp int v10; // r15d long long v11; // rcx char *v12; // rdx char v13; // dl long long v14; // r13 int v15; // r13d long long v16; // r15 long long v17; // rbp char v18; // r12 long long v19; // rax long long v20; // rsi long long v21; // rcx long long v23; // [rsp+8h] [rbp-830h] long long *v25; // [rsp+18h] [rbp-820h] BYREF void *v26; // [rsp+20h] [rbp-818h] long long v27; // [rsp+28h] [rbp-810h] unsigned long long v28; // [rsp+30h] [rbp-808h] _DWORD v29[512]; // [rsp+38h] [rbp-800h] BYREF v7 = v29; v25 = &`vtable for'fmt::v10::basic_memory_buffer<int,500ul,std::allocator<int>> + 2; v26 = v29; v28 = 500LL; v27 = 1LL; v29[0] = 0; v8 = *(_QWORD *)(a1 + 40); if ( v8 ) { v9 = *(char **)a1; v10 = 0; v11 = 1LL; while ( 1 ) { v12 = (char *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)a1); if ( v9 == v12 ) { v13 = *(v12 - 1); } else { v13 = *v9; if ( (unsigned __int8)(*v9 - 127) < 0x82u ) break; ++v9; } v10 += v13; if ( !v10 || v10 >= a4 ) break; v14 = v11 + 1; if ( v28 < v11 + 1 ) { ((void ( *)(long long **, long long))*v25)(&v25, v11 + 1); v7 = v26; v11 = v27; v14 = v27 + 1; v8 = *(_QWORD *)(a1 + 40); } v27 = v14; v7[v11] = v10; v11 = v14; if ( !v8 ) goto LABEL_14; } LODWORD(v14) = v11; LABEL_14: v15 = v14 - 1; } else { v15 = 0; } if ( a4 > 0 ) { v16 = a4 & 0x7FFFFFFF; v17 = 0LL; v23 = a1; do { if ( a4 == *((_DWORD *)v26 + v15) ) { fmt::v10::detail::buffer<char>::append<char>( a2, *(_QWORD *)(a1 + 32), *(_QWORD *)(a1 + 32) + *(_QWORD *)(a1 + 40)); --v15; } v18 = *(_BYTE *)(a3 + v17); v19 = *(_QWORD *)(a2 + 16); v20 = v19 + 1; if ( *(_QWORD *)(a2 + 24) < (unsigned long long)(v19 + 1) ) { (**(void ( ***)(long long))a2)(a2); v19 = *(_QWORD *)(a2 + 16); v20 = v19 + 1; } v21 = *(_QWORD *)(a2 + 8); *(_QWORD *)(a2 + 16) = v20; *(_BYTE *)(v21 + v19) = v18; ++v17; --a4; a1 = v23; } while ( v16 != v17 ); v7 = v26; } if ( v7 != v29 ) operator delete(v7, 4 * v28); return a2; }
apply<fmt::v10::appender,char>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x808 MOV R14,RCX MOV qword ptr [RSP + 0x10],RDX MOV RBX,RSI MOV R12,RDI LEA RAX,[0x1b2c18] ADD RAX,0x10 LEA RDI,[RSP + 0x38] MOV qword ptr [RDI + -0x20],RAX MOV qword ptr [RDI + -0x18],RDI MOV qword ptr [RDI + -0x8],0x1f4 MOV qword ptr [RDI + -0x10],0x1 MOV dword ptr [RDI],0x0 MOV RAX,qword ptr [R12 + 0x28] TEST RAX,RAX JZ 0x0014508e MOV RBP,qword ptr [R12] XOR R15D,R15D MOV ECX,0x1 LAB_00145017: MOV RDX,qword ptr [R12] ADD RDX,qword ptr [R12 + 0x8] CMP RBP,RDX JZ 0x00145036 MOV DL,byte ptr [RBP] LEA ESI,[RDX + -0x7f] CMP SIL,0x82 JC 0x00145086 INC RBP JMP 0x00145039 LAB_00145036: MOV DL,byte ptr [RDX + -0x1] LAB_00145039: MOVSX EDX,DL ADD R15D,EDX JZ 0x00145086 CMP R15D,R14D JGE 0x00145086 LEA R13,[RCX + 0x1] CMP qword ptr [RSP + 0x30],R13 JNC 0x00145073 MOV RAX,qword ptr [RSP + 0x18] LAB_00145056: LEA RDI,[RSP + 0x18] MOV RSI,R13 CALL qword ptr [RAX] MOV RDI,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x28] LEA R13,[RCX + 0x1] MOV RAX,qword ptr [R12 + 0x28] LAB_00145073: MOV qword ptr [RSP + 0x28],R13 MOV dword ptr [RDI + RCX*0x4],R15D MOV RCX,R13 TEST RAX,RAX JNZ 0x00145017 JMP 0x00145089 LAB_00145086: MOV R13,RCX LAB_00145089: DEC R13D JMP 0x00145091 LAB_0014508e: XOR R13D,R13D LAB_00145091: TEST R14D,R14D JLE 0x00145115 MOV R15D,R14D AND R15D,0x7fffffff XOR EBP,EBP MOV qword ptr [RSP + 0x8],R12 LAB_001450a7: MOV RAX,qword ptr [RSP + 0x20] MOVSXD RCX,R13D CMP R14D,dword ptr [RAX + RCX*0x4] JNZ 0x001450cd MOV RSI,qword ptr [R12 + 0x20] MOV RDX,qword ptr [R12 + 0x28] ADD RDX,RSI LAB_001450c2: MOV RDI,RBX CALL 0x0012fac6 DEC R13D LAB_001450cd: MOV RAX,qword ptr [RSP + 0x10] MOV R12B,byte ptr [RAX + RBP*0x1] MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] CMP qword ptr [RBX + 0x18],RSI JNC 0x001450f4 MOV RAX,qword ptr [RBX] LAB_001450e7: MOV RDI,RBX CALL qword ptr [RAX] LAB_001450ec: MOV RAX,qword ptr [RBX + 0x10] LEA RSI,[RAX + 0x1] LAB_001450f4: MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RBX + 0x10],RSI MOV byte ptr [RCX + RAX*0x1],R12B INC RBP DEC R14D CMP R15,RBP MOV R12,qword ptr [RSP + 0x8] JNZ 0x001450a7 MOV RDI,qword ptr [RSP + 0x20] LAB_00145115: LEA RAX,[RSP + 0x38] CMP RDI,RAX JZ 0x0014512d MOV RSI,qword ptr [RSP + 0x30] SHL RSI,0x2 CALL 0x00111120 LAB_0014512d: MOV RAX,RBX ADD RSP,0x808 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* fmt::v10::appender fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender, char>(fmt::v10::appender, fmt::v10::basic_string_view<char>) const */ buffer<char> * fmt::v10::detail::digit_grouping<char>::apply<fmt::v10::appender,char> (long *param_1,buffer<char> *param_2,long param_3,uint param_4) { int1 uVar1; long lVar2; char cVar3; char *pcVar4; ulong uVar5; ulong uVar6; int4 *puVar7; int iVar8; uint uVar9; int **local_820; int4 *local_818; ulong local_810; ulong local_808; int4 local_800 [500]; puVar7 = local_800; local_820 = &PTR_grow_001b2c28; local_808 = 500; local_810 = 1; local_800[0] = 0; lVar2 = param_1[5]; local_818 = puVar7; if (lVar2 != 0) { pcVar4 = (char *)*param_1; iVar8 = 0; do { if (pcVar4 == (char *)(*param_1 + param_1[1])) { cVar3 = ((char *)(*param_1 + param_1[1]))[-1]; } else { cVar3 = *pcVar4; if ((byte)(cVar3 + 0x81U) < 0x82) goto LAB_00145089; pcVar4 = pcVar4 + 1; } iVar8 = iVar8 + cVar3; if ((iVar8 == 0) || ((int)param_4 <= iVar8)) goto LAB_00145089; uVar5 = local_810 + 1; if (local_808 < uVar5) { /* try { // try from 00145056 to 0014505f has its CatchHandler @ 00145142 */ (*(code *)*local_820)(&local_820,uVar5); uVar5 = local_810 + 1; lVar2 = param_1[5]; puVar7 = local_818; } puVar7[local_810] = iVar8; local_810 = uVar5; if (lVar2 == 0) goto LAB_00145089; } while( true ); } iVar8 = 0; LAB_00145091: if (0 < (int)param_4) { uVar9 = param_4 & 0x7fffffff; uVar5 = 0; do { if (param_4 == local_818[iVar8]) { /* try { // try from 001450c2 to 001450c9 has its CatchHandler @ 00145144 */ buffer<char>::append<char>(param_2,(char *)param_1[4],(char *)param_1[4] + param_1[5]); iVar8 = iVar8 + -1; } uVar1 = *(int1 *)(param_3 + uVar5); lVar2 = *(long *)(param_2 + 0x10); uVar6 = lVar2 + 1; if (*(ulong *)(param_2 + 0x18) < uVar6) { /* try { // try from 001450e7 to 001450eb has its CatchHandler @ 00145146 */ (*(code *)**(int8 **)param_2)(param_2); lVar2 = *(long *)(param_2 + 0x10); uVar6 = lVar2 + 1; } *(ulong *)(param_2 + 0x10) = uVar6; *(int1 *)(*(long *)(param_2 + 8) + lVar2) = uVar1; uVar5 = uVar5 + 1; param_4 = param_4 - 1; puVar7 = local_818; } while (uVar9 != uVar5); } if (puVar7 != local_800) { operator_delete(puVar7,local_808 << 2); } return param_2; LAB_00145089: iVar8 = (int)local_810 + -1; goto LAB_00145091; }
50,310
inline_mysql_file_read
eloqsql/include/mysql/psi/mysql_file.h
static inline size_t inline_mysql_file_read( #ifdef HAVE_PSI_FILE_INTERFACE const char *src_file, uint src_line, #endif File file, uchar *buffer, size_t count, myf flags) { size_t result; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; size_t bytes_read; locker= PSI_FILE_CALL(get_thread_file_descriptor_locker)(&state, file, PSI_FILE_READ); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_wait)(locker, count, src_file, src_line); result= my_read(file, buffer, count, flags); if (flags & (MY_NABP | MY_FNABP)) bytes_read= (result == 0) ? count : 0; else bytes_read= (result != MY_FILE_ERROR) ? result : 0; PSI_FILE_CALL(end_file_wait)(locker, bytes_read); return result; } #endif result= my_read(file, buffer, count, flags); return result; }
O0
c
inline_mysql_file_read: pushq %rbp movq %rsp, %rbp subq $0xa0, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) leaq 0x1a3418(%rip), %rax # 0x1d0a60 movq (%rax), %rax movq 0x158(%rax), %rax movl -0x18(%rbp), %esi leaq -0x88(%rbp), %rdi movl $0x6, %edx callq *%rax movq %rax, -0x40(%rbp) cmpq $0x0, -0x40(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x2d757 leaq 0x1a33ce(%rip), %rax # 0x1d0a60 movq (%rax), %rax movq 0x210(%rax), %rax movq -0x40(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x10(%rbp), %rdx movl -0x14(%rbp), %ecx callq *%rax movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0x315e0 movq %rax, -0x38(%rbp) movq -0x30(%rbp), %rax andq $0x6, %rax cmpq $0x0, %rax je 0x2d702 cmpq $0x0, -0x38(%rbp) jne 0x2d6e7 movq -0x28(%rbp), %rax movq %rax, -0x98(%rbp) jmp 0x2d6f2 xorl %eax, %eax movq %rax, -0x98(%rbp) jmp 0x2d6f2 movq -0x98(%rbp), %rax movq %rax, -0x90(%rbp) jmp 0x2d72f cmpq $-0x1, -0x38(%rbp) je 0x2d716 movq -0x38(%rbp), %rax movq %rax, -0xa0(%rbp) jmp 0x2d721 xorl %eax, %eax movq %rax, -0xa0(%rbp) jmp 0x2d721 movq -0xa0(%rbp), %rax movq %rax, -0x90(%rbp) leaq 0x1a332a(%rip), %rax # 0x1d0a60 movq (%rax), %rax movq 0x218(%rax), %rax movq -0x40(%rbp), %rdi movq -0x90(%rbp), %rsi callq *%rax movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x2d777 movl -0x18(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rcx callq 0x315e0 movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0xa0, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_file_read: push rbp mov rbp, rsp sub rsp, 0A0h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 lea rax, PSI_server mov rax, [rax] mov rax, [rax+158h] mov esi, [rbp+var_18] lea rdi, [rbp+var_88] mov edx, 6 call rax mov [rbp+var_40], rax cmp [rbp+var_40], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz loc_2D757 lea rax, PSI_server mov rax, [rax] mov rax, [rax+210h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_28] mov rdx, [rbp+var_10] mov ecx, [rbp+var_14] call rax mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_read mov [rbp+var_38], rax mov rax, [rbp+var_30] and rax, 6 cmp rax, 0 jz short loc_2D702 cmp [rbp+var_38], 0 jnz short loc_2D6E7 mov rax, [rbp+var_28] mov [rbp+var_98], rax jmp short loc_2D6F2 loc_2D6E7: xor eax, eax mov [rbp+var_98], rax jmp short $+2 loc_2D6F2: mov rax, [rbp+var_98] mov [rbp+var_90], rax jmp short loc_2D72F loc_2D702: cmp [rbp+var_38], 0FFFFFFFFFFFFFFFFh jz short loc_2D716 mov rax, [rbp+var_38] mov [rbp+var_A0], rax jmp short loc_2D721 loc_2D716: xor eax, eax mov [rbp+var_A0], rax jmp short $+2 loc_2D721: mov rax, [rbp+var_A0] mov [rbp+var_90], rax loc_2D72F: lea rax, PSI_server mov rax, [rax] mov rax, [rax+218h] mov rdi, [rbp+var_40] mov rsi, [rbp+var_90] call rax mov rax, [rbp+var_38] mov [rbp+var_8], rax jmp short loc_2D777 loc_2D757: mov edi, [rbp+var_18] mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_30] call my_read mov [rbp+var_38], rax mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_2D777: mov rax, [rbp+var_8] add rsp, 0A0h pop rbp retn
long long inline_mysql_file_read( long long a1, unsigned int a2, unsigned int a3, long long a4, long long a5, long long a6) { long long v7; // [rsp+0h] [rbp-A0h] long long v8; // [rsp+8h] [rbp-98h] _BYTE v9[72]; // [rsp+18h] [rbp-88h] BYREF long long v10; // [rsp+60h] [rbp-40h] long long v11; // [rsp+68h] [rbp-38h] long long v12; // [rsp+70h] [rbp-30h] long long v13; // [rsp+78h] [rbp-28h] long long v14; // [rsp+80h] [rbp-20h] unsigned int v15; // [rsp+88h] [rbp-18h] unsigned int v16; // [rsp+8Ch] [rbp-14h] long long v17; // [rsp+90h] [rbp-10h] v17 = a1; v16 = a2; v15 = a3; v14 = a4; v13 = a5; v12 = a6; v10 = (*((long long ( **)(_BYTE *, _QWORD, long long))PSI_server[0] + 43))(v9, a3, 6LL); if ( v10 ) { (*((void ( **)(long long, long long, long long, _QWORD))PSI_server[0] + 66))(v10, v13, v17, v16); v11 = my_read(v15, v14, v13, v12); if ( (v12 & 6) != 0 ) { if ( v11 ) v8 = 0LL; else v8 = v13; (*((void ( **)(long long, long long))PSI_server[0] + 67))(v10, v8); } else { if ( v11 == -1 ) v7 = 0LL; else v7 = v11; (*((void ( **)(long long, long long))PSI_server[0] + 67))(v10, v7); } return v11; } else { return my_read(v15, v14, v13, v12); } }
inline_mysql_file_read: PUSH RBP MOV RBP,RSP SUB RSP,0xa0 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,[0x2d0a60] 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 0x0012d757 LEA RAX,[0x2d0a60] 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] CALL 0x001315e0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x30] AND RAX,0x6 CMP RAX,0x0 JZ 0x0012d702 CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0012d6e7 MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x98],RAX JMP 0x0012d6f2 LAB_0012d6e7: XOR EAX,EAX MOV qword ptr [RBP + -0x98],RAX JMP 0x0012d6f2 LAB_0012d6f2: MOV RAX,qword ptr [RBP + -0x98] MOV qword ptr [RBP + -0x90],RAX JMP 0x0012d72f LAB_0012d702: CMP qword ptr [RBP + -0x38],-0x1 JZ 0x0012d716 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0xa0],RAX JMP 0x0012d721 LAB_0012d716: XOR EAX,EAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x0012d721 LAB_0012d721: MOV RAX,qword ptr [RBP + -0xa0] MOV qword ptr [RBP + -0x90],RAX LAB_0012d72f: LEA RAX,[0x2d0a60] 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 0x0012d777 LAB_0012d757: MOV EDI,dword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x30] CALL 0x001315e0 MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_0012d777: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0xa0 POP RBP RET
long inline_mysql_file_read (int8 param_1,int4 param_2,int4 param_3,int8 param_4, long param_5,ulong param_6) { long local_a8; long local_a0; long local_98; int1 local_90 [72]; long local_48; long local_40; ulong 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_read(local_20,local_28,local_30,local_38); } else { (**(code **)(PSI_server + 0x210))(local_48,local_30,local_18,local_1c); local_40 = my_read(local_20,local_28,local_30,local_38); if ((local_38 & 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; }
50,311
mysql_set_server_option_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_set_server_option_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_set_server_option, (parms->mysql, parms->option), parms->mysql, int, r_int) }
O0
c
mysql_set_server_option_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 movl 0x8(%rax), %esi callq 0x26bf0 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_set_server_option_start_internal: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+480h] mov rax, [rax+28h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov rdi, [rax] mov rax, [rbp+var_10] mov esi, [rax+8] call mysql_set_server_option 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_set_server_option_start_internal(long long a1) { _DWORD *result; // rax _DWORD *v2; // [rsp+0h] [rbp-20h] v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)a1 + 1152LL) + 40LL); v2[2] = mysql_set_server_option(*(_QWORD *)a1, *(_DWORD *)(a1 + 8)); result = v2; *v2 = 0; return result; }
mysql_set_server_option_start_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x480] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0x8] CALL 0x00126bf0 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_set_server_option_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*param_1 + 0x480) + 0x28); uVar2 = mysql_set_server_option(*param_1,(int)param_1[1]); puVar1[2] = uVar2; *puVar1 = 0; return; }
50,312
repartition_key_cache_internal
eloqsql/mysys/mf_keycache.c
static int repartition_key_cache_internal(KEY_CACHE *keycache, uint key_cache_block_size, size_t use_mem, uint division_limit, uint age_threshold, uint changed_blocks_hash_size, uint partitions, my_bool use_op_lock) { uint blocks= -1; if (keycache->key_cache_inited) { if (use_op_lock) pthread_mutex_lock(&keycache->op_lock); keycache->interface_funcs->resize(keycache->keycache_cb, key_cache_block_size, 0, division_limit, age_threshold, changed_blocks_hash_size); end_key_cache_internal(keycache, 1, 0); blocks= init_key_cache_internal(keycache, key_cache_block_size, use_mem, division_limit, age_threshold, changed_blocks_hash_size, partitions, 0); if (use_op_lock) pthread_mutex_unlock(&keycache->op_lock); } return blocks; }
O0
c
repartition_key_cache_internal: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb 0x18(%rbp), %al movl 0x10(%rbp), %eax movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movl %ecx, -0x1c(%rbp) movl %r8d, -0x20(%rbp) movl %r9d, -0x24(%rbp) movl $0xffffffff, -0x28(%rbp) # imm = 0xFFFFFFFF movq -0x8(%rbp), %rax cmpb $0x0, 0x48(%rax) je 0xe49d6 cmpb $0x0, 0x18(%rbp) je 0xe495c movq -0x8(%rbp), %rdi addq $0x58, %rdi callq 0x2a220 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rdi movl -0xc(%rbp), %esi movl -0x1c(%rbp), %ecx movl -0x20(%rbp), %r8d movl -0x24(%rbp), %r9d xorl %edx, %edx callq *%rax movq -0x8(%rbp), %rdi movl $0x1, %esi xorl %edx, %edx callq 0xe4a70 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %ecx movl -0x20(%rbp), %r8d movl -0x24(%rbp), %r9d movl 0x10(%rbp), %eax xorl %r10d, %r10d movl %eax, (%rsp) movl $0x0, 0x8(%rsp) callq 0xe45d0 movl %eax, -0x28(%rbp) cmpb $0x0, 0x18(%rbp) je 0xe49d4 movq -0x8(%rbp), %rdi addq $0x58, %rdi callq 0x2a1f0 jmp 0xe49d6 movl -0x28(%rbp), %eax addq $0x40, %rsp popq %rbp retq nop
repartition_key_cache_internal: push rbp mov rbp, rsp sub rsp, 40h mov al, [rbp+arg_8] mov eax, [rbp+arg_0] mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_1C], ecx mov [rbp+var_20], r8d mov [rbp+var_24], r9d mov [rbp+var_28], 0FFFFFFFFh mov rax, [rbp+var_8] cmp byte ptr [rax+48h], 0 jz loc_E49D6 cmp [rbp+arg_8], 0 jz short loc_E495C mov rdi, [rbp+var_8] add rdi, 58h ; 'X' call _pthread_mutex_lock loc_E495C: mov rax, [rbp+var_8] mov rax, [rax+10h] mov rax, [rax+8] mov rcx, [rbp+var_8] mov rdi, [rcx+8] mov esi, [rbp+var_C] mov ecx, [rbp+var_1C] mov r8d, [rbp+var_20] mov r9d, [rbp+var_24] xor edx, edx call rax mov rdi, [rbp+var_8] mov esi, 1 xor edx, edx call end_key_cache_internal mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov ecx, [rbp+var_1C] mov r8d, [rbp+var_20] mov r9d, [rbp+var_24] mov eax, [rbp+arg_0] xor r10d, r10d mov [rsp+40h+var_40], eax mov [rsp+40h+var_38], 0 call init_key_cache_internal mov [rbp+var_28], eax cmp [rbp+arg_8], 0 jz short loc_E49D4 mov rdi, [rbp+var_8] add rdi, 58h ; 'X' call _pthread_mutex_unlock loc_E49D4: jmp short $+2 loc_E49D6: mov eax, [rbp+var_28] add rsp, 40h pop rbp retn
long long repartition_key_cache_internal( long long a1, unsigned int a2, long long a3, unsigned int a4, unsigned int a5, unsigned int a6, int a7, char a8) { unsigned int inited; // [rsp+18h] [rbp-28h] inited = -1; if ( *(_BYTE *)(a1 + 72) ) { if ( a8 ) pthread_mutex_lock(a1 + 88); (*(void ( **)(_QWORD, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(a1 + 16) + 8LL))( *(_QWORD *)(a1 + 8), a2, 0LL, a4, a5, a6); end_key_cache_internal(a1, 1LL, 0LL); inited = init_key_cache_internal(a1, a2, a3, a4, a5, a6, a7, 0); if ( a8 ) pthread_mutex_unlock(a1 + 88); } return inited; }
repartition_key_cache_internal: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,byte ptr [RBP + 0x18] MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV dword ptr [RBP + -0x1c],ECX MOV dword ptr [RBP + -0x20],R8D MOV dword ptr [RBP + -0x24],R9D MOV dword ptr [RBP + -0x28],0xffffffff MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x48],0x0 JZ 0x001e49d6 CMP byte ptr [RBP + 0x18],0x0 JZ 0x001e495c MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x58 CALL 0x0012a220 LAB_001e495c: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV ESI,dword ptr [RBP + -0xc] MOV ECX,dword ptr [RBP + -0x1c] MOV R8D,dword ptr [RBP + -0x20] MOV R9D,dword ptr [RBP + -0x24] XOR EDX,EDX CALL RAX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1 XOR EDX,EDX CALL 0x001e4a70 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x1c] MOV R8D,dword ptr [RBP + -0x20] MOV R9D,dword ptr [RBP + -0x24] MOV EAX,dword ptr [RBP + 0x10] XOR R10D,R10D MOV dword ptr [RSP],EAX MOV dword ptr [RSP + 0x8],0x0 CALL 0x001e45d0 MOV dword ptr [RBP + -0x28],EAX CMP byte ptr [RBP + 0x18],0x0 JZ 0x001e49d4 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x58 CALL 0x0012a1f0 LAB_001e49d4: JMP 0x001e49d6 LAB_001e49d6: MOV EAX,dword ptr [RBP + -0x28] ADD RSP,0x40 POP RBP RET
int4 repartition_key_cache_internal (long param_1,int4 param_2,int8 param_3,int4 param_4,int4 param_5, int4 param_6,int4 param_7,char param_8) { int4 local_30; local_30 = 0xffffffff; if (*(char *)(param_1 + 0x48) != '\0') { if (param_8 != '\0') { pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x58)); } (**(code **)(*(long *)(param_1 + 0x10) + 8)) (*(int8 *)(param_1 + 8),param_2,0,param_4,param_5,param_6); end_key_cache_internal(param_1,1,0); local_30 = init_key_cache_internal(param_1,param_2,param_3,param_4,param_5,param_6,param_7,0); if (param_8 != '\0') { pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x58)); } } return local_30; }
50,313
mi_read_mempack_record
eloqsql/storage/myisam/mi_packrec.c
static int _mi_read_mempack_record(MI_INFO *info, my_off_t filepos, uchar *buf) { MI_BLOCK_INFO block_info; MYISAM_SHARE *share=info->s; uchar *pos; DBUG_ENTER("mi_read_mempack_record"); if (filepos == HA_OFFSET_ERROR) DBUG_RETURN(-1); /* _search() didn't find record */ if (!(pos= (uchar*) _mi_mempack_get_block_info(info, &info->bit_buff, &block_info, &info->rec_buff, (uchar*) share->file_map+ filepos))) DBUG_RETURN(-1); /* No need to end-zero pos here for valgrind as data is memory mapped */ DBUG_RETURN(_mi_pack_rec_unpack(info, &info->bit_buff, buf, pos, block_info.rec_len)); }
O3
c
mi_read_mempack_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp movq %fs:0x28, %rax movq %rax, -0x20(%rbp) cmpq $-0x1, %rsi je 0x9d055 movq %rdx, %rbx movq %rsi, %r8 movq %rdi, %r14 movq (%rdi), %rax leaq 0x50(%rdi), %r15 leaq 0x120(%rdi), %rcx addq 0x270(%rax), %r8 leaq -0x78(%rbp), %rdx movq %r15, %rsi callq 0x9ea7e testq %rax, %rax je 0x9d055 movq -0x60(%rbp), %r8 movq %fs:0x28, %rcx cmpq -0x20(%rbp), %rcx jne 0x9d074 movq %r14, %rdi movq %r15, %rsi movq %rbx, %rdx movq %rax, %rcx addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp jmp 0x9cad7 movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x9d074 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x2a280
_mi_read_mempack_record: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 68h mov rax, fs:28h mov [rbp+var_20], rax cmp rsi, 0FFFFFFFFFFFFFFFFh jz short loc_9D055 mov rbx, rdx mov r8, rsi mov r14, rdi mov rax, [rdi] lea r15, [rdi+50h] lea rcx, [rdi+120h] add r8, [rax+270h] lea rdx, [rbp+var_78] mov rsi, r15 call _mi_mempack_get_block_info test rax, rax jz short loc_9D055 mov r8, [rbp+var_60] mov rcx, fs:28h cmp rcx, [rbp+var_20] jnz short loc_9D074 mov rdi, r14 mov rsi, r15 mov rdx, rbx mov rcx, rax add rsp, 68h pop rbx pop r14 pop r15 pop rbp jmp _mi_pack_rec_unpack loc_9D055: mov rax, fs:28h cmp rax, [rbp+var_20] jnz short loc_9D074 mov eax, 0FFFFFFFFh add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn loc_9D074: call ___stack_chk_fail
long long mi_read_mempack_record(_QWORD *a1, long long a2, long long a3) { long long block_info; // rax _BYTE v6[24]; // [rsp+8h] [rbp-78h] BYREF long long v7; // [rsp+20h] [rbp-60h] unsigned long long v8; // [rsp+60h] [rbp-20h] v8 = __readfsqword(0x28u); if ( a2 == -1 ) return 0xFFFFFFFFLL; block_info = mi_mempack_get_block_info(a1, a1 + 10, v6, a1 + 36, *(_QWORD *)(*a1 + 624LL) + a2); if ( !block_info ) return 0xFFFFFFFFLL; else return mi_pack_rec_unpack(a1, (long long)(a1 + 10), a3, block_info, v7); }
_mi_read_mempack_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x68 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX CMP RSI,-0x1 JZ 0x0019d055 MOV RBX,RDX MOV R8,RSI MOV R14,RDI MOV RAX,qword ptr [RDI] LEA R15,[RDI + 0x50] LEA RCX,[RDI + 0x120] ADD R8,qword ptr [RAX + 0x270] LEA RDX,[RBP + -0x78] MOV RSI,R15 CALL 0x0019ea7e TEST RAX,RAX JZ 0x0019d055 MOV R8,qword ptr [RBP + -0x60] MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x20] JNZ 0x0019d074 MOV RDI,R14 MOV RSI,R15 MOV RDX,RBX MOV RCX,RAX ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP JMP 0x0019cad7 LAB_0019d055: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x0019d074 MOV EAX,0xffffffff ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP RET LAB_0019d074: CALL 0x0012a280
int8 _mi_read_mempack_record(long *param_1,long param_2,int8 param_3) { long lVar1; int8 uVar2; long in_FS_OFFSET; int1 local_80 [24]; int8 local_68; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); if (param_2 != -1) { lVar1 = _mi_mempack_get_block_info (param_1,param_1 + 10,local_80,param_1 + 0x24, param_2 + *(long *)(*param_1 + 0x270)); if (lVar1 != 0) { if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { uVar2 = _mi_pack_rec_unpack(param_1,param_1 + 10,param_3,lVar1,local_68); return uVar2; } goto LAB_0019d074; } } if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return 0xffffffff; } LAB_0019d074: /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
50,314
rtree_find_next
eloqsql/storage/myisam/rt_index.c
int rtree_find_next(MI_INFO *info, uint keynr, uint search_flag) { my_off_t root; uint nod_cmp_flag; MI_KEYDEF *keyinfo = info->s->keyinfo + keynr; /* At the moment index can only properly handle the MBR_INTERSECT, so we use it for all sorts of queries. TODO: better searsh for CONTAINS/WITHIN. */ search_flag= nod_cmp_flag= MBR_INTERSECT; if (info->update & HA_STATE_DELETED) return rtree_find_first(info, keynr, info->lastkey, info->lastkey_length, search_flag); if (!info->buff_used) { uchar *key= info->int_keypos; while (key < info->int_maxpos) { if (!rtree_key_cmp(keyinfo->seg, info->first_mbr_key, key, info->last_rkey_length, search_flag)) { uchar *after_key = key + keyinfo->keylength; info->lastpos= _mi_dpos(info, 0, after_key); memcpy(info->lastkey, key, info->lastkey_length); if (after_key < info->int_maxpos) info->int_keypos= after_key; else info->buff_used= 1; return 0; } key+= keyinfo->keylength; } } if ((root = info->s->state.key_root[keynr]) == HA_OFFSET_ERROR) { my_errno= HA_ERR_END_OF_FILE; return -1; } /* TODO better search for CONTAINS/WITHIN. nod_cmp_flag= (((search_flag & (MBR_EQUAL | MBR_WITHIN)) ? MBR_WITHIN : MBR_INTERSECT)); */ return rtree_find_req(info, keyinfo, search_flag, nod_cmp_flag, root, 0); }
O0
c
rtree_find_next: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movl %edx, -0x18(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x218(%rax), %rax movl -0x14(%rbp), %ecx imulq $0x70, %rcx, %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movl $0x400, -0x24(%rbp) # imm = 0x400 movl $0x400, -0x18(%rbp) # imm = 0x400 movq -0x10(%rbp), %rax movl 0x1d0(%rax), %eax andl $0x8, %eax cmpl $0x0, %eax je 0xc8dab movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi movq -0x10(%rbp), %rax movq 0x108(%rax), %rdx movq -0x10(%rbp), %rax movl 0x1d8(%rax), %ecx movl -0x18(%rbp), %r8d callq 0xc87b0 movl %eax, -0x4(%rbp) jmp 0xc8f09 movq -0x10(%rbp), %rax cmpb $0x0, 0x33d(%rax) jne 0xc8eb9 movq -0x10(%rbp), %rax movq 0x128(%rax), %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x130(%rcx), %rax jae 0xc8eb7 movq -0x30(%rbp), %rax movq 0x28(%rax), %rdi movq -0x10(%rbp), %rax movq 0x118(%rax), %rsi movq -0x38(%rbp), %rdx movq -0x10(%rbp), %rax movl 0x1dc(%rax), %ecx movl -0x18(%rbp), %r8d callq 0xcb190 cmpl $0x0, %eax jne 0xc8e9c movq -0x38(%rbp), %rax movq -0x30(%rbp), %rcx movzwl 0x12(%rcx), %ecx movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x40(%rbp) movq -0x10(%rbp), %rdi movq -0x40(%rbp), %rdx xorl %esi, %esi callq 0xbf240 movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x170(%rax) movq -0x10(%rbp), %rax movq 0x108(%rax), %rdi movq -0x38(%rbp), %rsi movq -0x10(%rbp), %rax movl 0x1d8(%rax), %eax movl %eax, %edx callq 0x2a090 movq -0x40(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x130(%rcx), %rax jae 0xc8e88 movq -0x40(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x128(%rax) jmp 0xc8e93 movq -0x10(%rbp), %rax movb $0x1, 0x33d(%rax) movl $0x0, -0x4(%rbp) jmp 0xc8f09 movq -0x30(%rbp), %rax movzwl 0x12(%rax), %ecx movq -0x38(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x38(%rbp) jmp 0xc8dcb jmp 0xc8eb9 movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x98(%rax), %rax movl -0x14(%rbp), %ecx movq (%rax,%rcx,8), %rax movq %rax, -0x20(%rbp) cmpq $-0x1, %rax jne 0xc8eec callq 0xf60c0 movl $0x89, (%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0xc8f09 movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi movl -0x18(%rbp), %edx movl -0x24(%rbp), %ecx movq -0x20(%rbp), %r8 xorl %r9d, %r9d callq 0xc88a0 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rtree_find_next: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_18], edx mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+218h] mov ecx, [rbp+var_14] imul rcx, 70h ; 'p' add rax, rcx mov [rbp+var_30], rax mov [rbp+var_24], 400h mov [rbp+var_18], 400h mov rax, [rbp+var_10] mov eax, [rax+1D0h] and eax, 8 cmp eax, 0 jz short loc_C8DAB mov rdi, [rbp+var_10] mov esi, [rbp+var_14] mov rax, [rbp+var_10] mov rdx, [rax+108h] mov rax, [rbp+var_10] mov ecx, [rax+1D8h] mov r8d, [rbp+var_18] call rtree_find_first mov [rbp+var_4], eax jmp loc_C8F09 loc_C8DAB: mov rax, [rbp+var_10] cmp byte ptr [rax+33Dh], 0 jnz loc_C8EB9 mov rax, [rbp+var_10] mov rax, [rax+128h] mov [rbp+var_38], rax loc_C8DCB: mov rax, [rbp+var_38] mov rcx, [rbp+var_10] cmp rax, [rcx+130h] jnb loc_C8EB7 mov rax, [rbp+var_30] mov rdi, [rax+28h] mov rax, [rbp+var_10] mov rsi, [rax+118h] mov rdx, [rbp+var_38] mov rax, [rbp+var_10] mov ecx, [rax+1DCh] mov r8d, [rbp+var_18] call rtree_key_cmp cmp eax, 0 jnz loc_C8E9C mov rax, [rbp+var_38] mov rcx, [rbp+var_30] movzx ecx, word ptr [rcx+12h] movsxd rcx, ecx add rax, rcx mov [rbp+var_40], rax mov rdi, [rbp+var_10] mov rdx, [rbp+var_40] xor esi, esi call _mi_dpos mov rcx, rax mov rax, [rbp+var_10] mov [rax+170h], rcx mov rax, [rbp+var_10] mov rdi, [rax+108h] mov rsi, [rbp+var_38] mov rax, [rbp+var_10] mov eax, [rax+1D8h] mov edx, eax call _memcpy mov rax, [rbp+var_40] mov rcx, [rbp+var_10] cmp rax, [rcx+130h] jnb short loc_C8E88 mov rcx, [rbp+var_40] mov rax, [rbp+var_10] mov [rax+128h], rcx jmp short loc_C8E93 loc_C8E88: mov rax, [rbp+var_10] mov byte ptr [rax+33Dh], 1 loc_C8E93: mov [rbp+var_4], 0 jmp short loc_C8F09 loc_C8E9C: mov rax, [rbp+var_30] movzx ecx, word ptr [rax+12h] mov rax, [rbp+var_38] movsxd rcx, ecx add rax, rcx mov [rbp+var_38], rax jmp loc_C8DCB loc_C8EB7: jmp short $+2 loc_C8EB9: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+98h] mov ecx, [rbp+var_14] mov rax, [rax+rcx*8] mov [rbp+var_20], rax cmp rax, 0FFFFFFFFFFFFFFFFh jnz short loc_C8EEC call _my_thread_var mov dword ptr [rax], 89h mov [rbp+var_4], 0FFFFFFFFh jmp short loc_C8F09 loc_C8EEC: mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] mov edx, [rbp+var_18] mov ecx, [rbp+var_24] mov r8, [rbp+var_20] xor r9d, r9d call rtree_find_req mov [rbp+var_4], eax loc_C8F09: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long rtree_find_next(long long a1, const char *a2) { unsigned long long v3; // [rsp+0h] [rbp-40h] unsigned long long i; // [rsp+8h] [rbp-38h] long long v5; // [rsp+10h] [rbp-30h] long long v6; // [rsp+20h] [rbp-20h] unsigned int v7; // [rsp+2Ch] [rbp-14h] _QWORD *v8; // [rsp+30h] [rbp-10h] v8 = (_QWORD *)a1; v7 = (unsigned int)a2; v5 = 112LL * (unsigned int)a2 + *(_QWORD *)(*(_QWORD *)a1 + 536LL); if ( (*(_DWORD *)(a1 + 464) & 8) != 0 ) { return (unsigned int)rtree_find_first( a1, (const char *)(unsigned int)a2, *(_QWORD *)(a1 + 264), *(_DWORD *)(a1 + 472)); } else { if ( !*(_BYTE *)(a1 + 829) ) { for ( i = *(_QWORD *)(a1 + 296); i < v8[38]; i += *(unsigned __int16 *)(v5 + 18) ) { a1 = *(_QWORD *)(v5 + 40); a2 = (const char *)v8[35]; if ( !(unsigned int)rtree_key_cmp(a1, a2, i, *((unsigned int *)v8 + 119), 1024LL) ) { v3 = *(unsigned __int16 *)(v5 + 18) + i; v8[46] = mi_dpos((long long)v8, 0, v3); memcpy(v8[33], i, *((unsigned int *)v8 + 118)); if ( v3 >= v8[38] ) *((_BYTE *)v8 + 829) = 1; else v8[37] = v3; return 0; } } } v6 = *(_QWORD *)(*(_QWORD *)(*v8 + 152LL) + 8LL * v7); if ( v6 == -1 ) { *(_DWORD *)my_thread_var(a1, a2) = 137; return (unsigned int)-1; } else { return (unsigned int)rtree_find_req(v8, v5, 0x400u, 0x400u, v6, 0); } } }
rtree_find_next: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV dword ptr [RBP + -0x18],EDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,dword ptr [RBP + -0x14] IMUL RCX,RCX,0x70 ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV dword ptr [RBP + -0x24],0x400 MOV dword ptr [RBP + -0x18],0x400 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1d0] AND EAX,0x8 CMP EAX,0x0 JZ 0x001c8dab MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x108] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x1d8] MOV R8D,dword ptr [RBP + -0x18] CALL 0x001c87b0 MOV dword ptr [RBP + -0x4],EAX JMP 0x001c8f09 LAB_001c8dab: MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x33d],0x0 JNZ 0x001c8eb9 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x128] MOV qword ptr [RBP + -0x38],RAX LAB_001c8dcb: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x130] JNC 0x001c8eb7 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x118] MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x1dc] MOV R8D,dword ptr [RBP + -0x18] CALL 0x001cb190 CMP EAX,0x0 JNZ 0x001c8e9c MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,word ptr [RCX + 0x12] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x40],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x40] XOR ESI,ESI CALL 0x001bf240 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x170],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x108] MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x1d8] MOV EDX,EAX CALL 0x0012a090 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x130] JNC 0x001c8e88 MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x128],RCX JMP 0x001c8e93 LAB_001c8e88: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x33d],0x1 LAB_001c8e93: MOV dword ptr [RBP + -0x4],0x0 JMP 0x001c8f09 LAB_001c8e9c: MOV RAX,qword ptr [RBP + -0x30] MOVZX ECX,word ptr [RAX + 0x12] MOV RAX,qword ptr [RBP + -0x38] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX JMP 0x001c8dcb LAB_001c8eb7: JMP 0x001c8eb9 LAB_001c8eb9: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x98] MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x20],RAX CMP RAX,-0x1 JNZ 0x001c8eec CALL 0x001f60c0 MOV dword ptr [RAX],0x89 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x001c8f09 LAB_001c8eec: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x30] MOV EDX,dword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] MOV R8,qword ptr [RBP + -0x20] XOR R9D,R9D CALL 0x001c88a0 MOV dword ptr [RBP + -0x4],EAX LAB_001c8f09: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int4 rtree_find_next(long *param_1,uint param_2) { long lVar1; int iVar2; long lVar3; ulong uVar4; int4 *puVar5; void *local_40; int4 local_c; lVar3 = *(long *)(*param_1 + 0x218) + (ulong)param_2 * 0x70; if ((*(uint *)(param_1 + 0x3a) & 8) == 0) { if (*(char *)((long)param_1 + 0x33d) == '\0') { for (local_40 = (void *)param_1[0x25]; local_40 < (void *)param_1[0x26]; local_40 = (void *)((long)local_40 + (long)(int)(uint)*(ushort *)(lVar3 + 0x12))) { iVar2 = rtree_key_cmp(*(int8 *)(lVar3 + 0x28),param_1[0x23],local_40, *(int4 *)((long)param_1 + 0x1dc),0x400); if (iVar2 == 0) { uVar4 = (long)local_40 + (long)(int)(uint)*(ushort *)(lVar3 + 0x12); lVar3 = _mi_dpos(param_1,0,uVar4); param_1[0x2e] = lVar3; memcpy((void *)param_1[0x21],local_40,(ulong)*(uint *)(param_1 + 0x3b)); if (uVar4 < (ulong)param_1[0x26]) { param_1[0x25] = uVar4; } else { *(int1 *)((long)param_1 + 0x33d) = 1; } return 0; } } } lVar1 = *(long *)(*(long *)(*param_1 + 0x98) + (ulong)param_2 * 8); if (lVar1 == -1) { puVar5 = (int4 *)_my_thread_var(); *puVar5 = 0x89; local_c = 0xffffffff; } else { local_c = rtree_find_req(param_1,lVar3,0x400,0x400,lVar1,0); } } else { local_c = rtree_find_first(param_1,param_2,param_1[0x21],(int)param_1[0x3b],0x400); } return local_c; }
50,315
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
monkey531[P]llama/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const char * value_hint, const std::string & help, void (*handler)(common_params & params, const std::string &) ) : args(args), value_hint(value_hint), help(help), handler_string(handler) {}
O3
c
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %rbp movq %rdi, %rbx leaq 0x4(%rsp), %rsi movl $0x0, (%rsi) leaq 0x3(%rsp), %rcx leaq 0x2(%rsp), %r8 movl $0x1, %edx callq 0x5799c leaq 0x38(%rbx), %rax xorl %ecx, %ecx movq %rcx, 0x40(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq %rcx, 0x58(%rbx) leaq 0x60(%rbx), %r13 movq (%rbp), %rsi movq 0x8(%rbp), %rdx leaq 0x1(%rsp), %rcx movq %r13, %rdi callq 0x57a1e movq %r12, 0x78(%rbx) leaq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x80(%rbx) movq %rax, 0x90(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x21da0 movb $0x0, 0xb0(%rbx) movq $0x0, 0xb8(%rbx) movq %r14, 0xc0(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xc8(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%r13), %rdi testq %rdi, %rdi je 0x54460 movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x1a8f0 jmp 0x54460 movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x57a64 movq %rbx, %rdi callq 0x57a64 movq %r14, %rdi callq 0x1afb0 nop
_ZN10common_argC2ERKSt16initializer_listIPKcES2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_E: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov r12, rdx mov rbp, rsi mov rbx, rdi lea rsi, [rsp+38h+var_34] mov dword ptr [rsi], 0 lea rcx, [rsp+38h+var_35] lea r8, [rsp+38h+var_36] mov edx, 1 call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xor ecx, ecx mov [rbx+40h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 mov [rbx+48h], rax mov [rbx+50h], rax mov [rbx+58h], rcx lea r13, [rbx+60h] mov rsi, [rbp+0] mov rdx, [rbp+8] lea rcx, [rsp+38h+var_37] mov rdi, r13 call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) mov [rbx+78h], r12 lea rdi, [rbx+90h] lea rax, [rbx+0A0h] xorps xmm0, xmm0 movups xmmword ptr [rbx+80h], xmm0 mov [rbx+90h], rax mov rsi, [r15] mov rdx, [r15+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) mov byte ptr [rbx+0B0h], 0 mov qword ptr [rbx+0B8h], 0 mov [rbx+0C0h], r14 xorps xmm0, xmm0 movups xmmword ptr [rbx+0C8h], xmm0 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [r13+0]; void * test rdi, rdi jz short loc_54460 mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_54460 mov r14, rax loc_54460: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5) { int v5; // eax long long result; // rax int v10; // [rsp+0h] [rbp-38h] BYREF _DWORD v11[13]; // [rsp+4h] [rbp-34h] BYREF v10 = v5; v11[0] = 0; std::set<llama_example>::set(a1, v11, 1LL, (char *)&v10 + 3, (char *)&v10 + 2); *(_QWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], (char *)&v10 + 1); *(_QWORD *)(a1 + 120) = a3; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 160; result = std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a4, *(_QWORD *)a4 + *(_QWORD *)(a4 + 8)); *(_BYTE *)(a1 + 176) = 0; *(_QWORD *)(a1 + 184) = 0LL; *(_QWORD *)(a1 + 192) = a5; *(_OWORD *)(a1 + 200) = 0LL; return result; }
common_arg: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV RBP,RSI MOV RBX,RDI LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],0x0 LEA RCX,[RSP + 0x3] LEA R8,[RSP + 0x2] MOV EDX,0x1 CALL 0x0015799c LEA RAX,[RBX + 0x38] XOR ECX,ECX MOV qword ptr [RBX + 0x40],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],RCX LEA R13,[RBX + 0x60] MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] LAB_001543d2: LEA RCX,[RSP + 0x1] MOV RDI,R13 CALL 0x00157a1e MOV qword ptr [RBX + 0x78],R12 LEA RDI,[RBX + 0x90] LEA RAX,[RBX + 0xa0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x80],XMM0 MOV qword ptr [RBX + 0x90],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_0015440c: CALL 0x00121da0 LAB_00154411: MOV byte ptr [RBX + 0xb0],0x0 MOV qword ptr [RBX + 0xb8],0x0 MOV qword ptr [RBX + 0xc0],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xc8],XMM0 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,char *param_2,string *param_3, _func_void_common_params_ptr_string_ptr *param_4) { int4 in_EAX; int8 in_R9; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&stack0xffffffffffffffcc,1,&stack0xffffffffffffffcb,&stack0xffffffffffffffca,in_R9 ,in_EAX); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 001543d2 to 001543de has its CatchHandler @ 0015445d */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&stack0xffffffffffffffc9); *(char **)(this + 0x78) = param_2; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(common_arg **)(this + 0x90) = this + 0xa0; /* try { // try from 0015440c to 00154410 has its CatchHandler @ 00154443 */ std::__cxx11::string::_M_construct<char*> (this + 0x90,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3); this[0xb0] = (common_arg)0x0; *(int8 *)(this + 0xb8) = 0; *(_func_void_common_params_ptr_string_ptr **)(this + 0xc0) = param_4; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; return; }
50,316
rtree_add_key
eloqsql/storage/myisam/rt_key.c
int rtree_add_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, uchar *page_buf, my_off_t *new_page) { uint page_size = mi_getint(page_buf); uint nod_flag = mi_test_if_nod(page_buf); DBUG_ENTER("rtree_add_key"); if (page_size + key_length + info->s->base.rec_reflength <= keyinfo->block_length) { /* split won't be necessary */ if (nod_flag) { /* save key */ DBUG_ASSERT(_mi_kpos(nod_flag, key) < info->state->key_file_length); memcpy(rt_PAGE_END(page_buf), key - nod_flag, key_length + nod_flag); page_size += key_length + nod_flag; } else { /* save key */ DBUG_ASSERT(_mi_dpos(info, nod_flag, key + key_length + info->s->base.rec_reflength) < info->state->data_file_length + info->s->base.pack_reclength); memcpy(rt_PAGE_END(page_buf), key, key_length + info->s->base.rec_reflength); page_size += key_length + info->s->base.rec_reflength; } mi_putint(page_buf, page_size, nod_flag); DBUG_RETURN(0); } DBUG_RETURN((rtree_split_page(info, keyinfo, page_buf, key, key_length, new_page) ? -1 : 1)); }
O0
c
rtree_add_key: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x30(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x30(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF movl %eax, -0x3c(%rbp) movq -0x30(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xcc217 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x4c(%rbp) jmp 0xcc21e xorl %eax, %eax movl %eax, -0x4c(%rbp) jmp 0xcc21e movl -0x4c(%rbp), %eax movl %eax, -0x40(%rbp) movl -0x3c(%rbp), %eax addl -0x24(%rbp), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx addl 0x178(%rcx), %eax movq -0x18(%rbp), %rcx movzwl 0xe(%rcx), %ecx cmpl %ecx, %eax ja 0xcc352 cmpl $0x0, -0x40(%rbp) je 0xcc2aa jmp 0xcc24f jmp 0xcc251 movq -0x30(%rbp), %rdi movq -0x30(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x30(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF movl %eax, %eax addq %rax, %rdi movq -0x20(%rbp), %rsi movl -0x40(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rsi movl -0x24(%rbp), %eax addl -0x40(%rbp), %eax movl %eax, %eax movl %eax, %edx callq 0x2a090 movl -0x24(%rbp), %eax addl -0x40(%rbp), %eax addl -0x3c(%rbp), %eax movl %eax, -0x3c(%rbp) jmp 0xcc30c jmp 0xcc2ac jmp 0xcc2ae movq -0x30(%rbp), %rdi movq -0x30(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x30(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF movl %eax, %eax addq %rax, %rdi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx addl 0x178(%rcx), %eax movl %eax, %eax movl %eax, %edx callq 0x2a090 movl -0x24(%rbp), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx addl 0x178(%rcx), %eax addl -0x3c(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x40(%rbp), %edx xorl %eax, %eax movl $0x8000, %ecx # imm = 0x8000 cmpl $0x0, %edx cmovnel %ecx, %eax movl -0x3c(%rbp), %ecx movzwl %cx, %ecx addl %ecx, %eax movw %ax, -0x42(%rbp) movzwl -0x42(%rbp), %eax movl %eax, -0x48(%rbp) movl -0x48(%rbp), %eax movb %al, %cl movq -0x30(%rbp), %rax movb %cl, 0x1(%rax) movl -0x48(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x30(%rbp), %rax movb %cl, (%rax) movl $0x0, -0x4(%rbp) jmp 0xcc386 jmp 0xcc354 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rdx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %r8d movq -0x38(%rbp), %r9 callq 0xd6600 movl %eax, %edx movl $0x1, %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nop
rtree_add_key: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_30] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh mov [rbp+var_3C], eax mov rax, [rbp+var_30] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_CC217 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_4C], eax jmp short loc_CC21E loc_CC217: xor eax, eax mov [rbp+var_4C], eax jmp short $+2 loc_CC21E: mov eax, [rbp+var_4C] mov [rbp+var_40], eax mov eax, [rbp+var_3C] add eax, [rbp+var_24] mov rcx, [rbp+var_10] mov rcx, [rcx] add eax, [rcx+178h] mov rcx, [rbp+var_18] movzx ecx, word ptr [rcx+0Eh] cmp eax, ecx ja loc_CC352 cmp [rbp+var_40], 0 jz short loc_CC2AA jmp short $+2 loc_CC24F: jmp short $+2 loc_CC251: mov rdi, [rbp+var_30] mov rax, [rbp+var_30] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh mov eax, eax add rdi, rax mov rsi, [rbp+var_20] mov eax, [rbp+var_40] mov ecx, eax xor eax, eax sub rax, rcx add rsi, rax mov eax, [rbp+var_24] add eax, [rbp+var_40] mov eax, eax mov edx, eax call _memcpy mov eax, [rbp+var_24] add eax, [rbp+var_40] add eax, [rbp+var_3C] mov [rbp+var_3C], eax jmp short loc_CC30C loc_CC2AA: jmp short $+2 loc_CC2AC: jmp short $+2 loc_CC2AE: mov rdi, [rbp+var_30] mov rax, [rbp+var_30] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh mov eax, eax add rdi, rax mov rsi, [rbp+var_20] mov eax, [rbp+var_24] mov rcx, [rbp+var_10] mov rcx, [rcx] add eax, [rcx+178h] mov eax, eax mov edx, eax call _memcpy mov eax, [rbp+var_24] mov rcx, [rbp+var_10] mov rcx, [rcx] add eax, [rcx+178h] add eax, [rbp+var_3C] mov [rbp+var_3C], eax loc_CC30C: mov edx, [rbp+var_40] xor eax, eax mov ecx, 8000h cmp edx, 0 cmovnz eax, ecx mov ecx, [rbp+var_3C] movzx ecx, cx add eax, ecx mov [rbp+var_42], ax movzx eax, [rbp+var_42] mov [rbp+var_48], eax mov eax, [rbp+var_48] mov cl, al mov rax, [rbp+var_30] mov [rax+1], cl mov eax, [rbp+var_48] shr eax, 8 mov cl, al mov rax, [rbp+var_30] mov [rax], cl mov [rbp+var_4], 0 jmp short loc_CC386 loc_CC352: jmp short $+2 loc_CC354: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_30] mov rcx, [rbp+var_20] mov r8d, [rbp+var_24] mov r9, [rbp+var_38] call rtree_split_page mov edx, eax mov eax, 1 mov ecx, 0FFFFFFFFh cmp edx, 0 cmovnz eax, ecx mov [rbp+var_4], eax loc_CC386: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long rtree_add_key(long long a1, long long a2, long long a3, unsigned int a4, long long a5, long long a6) { __int16 v6; // ax int v7; // edx unsigned int v8; // eax unsigned int v10; // [rsp+4h] [rbp-4Ch] int v11; // [rsp+14h] [rbp-3Ch] v11 = _byteswap_ushort(*(_WORD *)a5) & 0x7FFF; if ( (*(_BYTE *)a5 & 0x80) != 0 ) v10 = *(_DWORD *)(*(_QWORD *)a1 + 380LL); else v10 = 0; if ( *(_DWORD *)(*(_QWORD *)a1 + 376LL) + a4 + v11 > *(unsigned __int16 *)(a2 + 14) ) { v7 = rtree_split_page(a1, a2, a5, a3, a4, a6); v8 = 1; if ( v7 ) return (unsigned int)-1; return v8; } else { if ( v10 ) { memcpy((_byteswap_ushort(*(_WORD *)a5) & 0x7FFF) + a5, a3 - v10, v10 + a4); LOWORD(v11) = v11 + v10 + a4; } else { memcpy((_byteswap_ushort(*(_WORD *)a5) & 0x7FFF) + a5, a3, *(_DWORD *)(*(_QWORD *)a1 + 376LL) + a4); v11 += *(_DWORD *)(*(_QWORD *)a1 + 376LL) + a4; } v6 = 0; if ( v10 ) v6 = 0x8000; *(_BYTE *)(a5 + 1) = v11 + v6; *(_BYTE *)a5 = (unsigned __int16)(v11 + v6) >> 8; return 0; } }
rtree_add_key: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001cc217 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x4c],EAX JMP 0x001cc21e LAB_001cc217: XOR EAX,EAX MOV dword ptr [RBP + -0x4c],EAX JMP 0x001cc21e LAB_001cc21e: MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] ADD EAX,dword ptr [RCX + 0x178] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RCX + 0xe] CMP EAX,ECX JA 0x001cc352 CMP dword ptr [RBP + -0x40],0x0 JZ 0x001cc2aa JMP 0x001cc24f LAB_001cc24f: JMP 0x001cc251 LAB_001cc251: MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff MOV EAX,EAX ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x40] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,dword ptr [RBP + -0x40] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a090 MOV EAX,dword ptr [RBP + -0x24] ADD EAX,dword ptr [RBP + -0x40] ADD EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x3c],EAX JMP 0x001cc30c LAB_001cc2aa: JMP 0x001cc2ac LAB_001cc2ac: JMP 0x001cc2ae LAB_001cc2ae: MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff MOV EAX,EAX ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] ADD EAX,dword ptr [RCX + 0x178] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a090 MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] ADD EAX,dword ptr [RCX + 0x178] ADD EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x3c],EAX LAB_001cc30c: MOV EDX,dword ptr [RBP + -0x40] XOR EAX,EAX MOV ECX,0x8000 CMP EDX,0x0 CMOVNZ EAX,ECX MOV ECX,dword ptr [RBP + -0x3c] MOVZX ECX,CX ADD EAX,ECX MOV word ptr [RBP + -0x42],AX MOVZX EAX,word ptr [RBP + -0x42] MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x48] MOV CL,AL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x48] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x0 JMP 0x001cc386 LAB_001cc352: JMP 0x001cc354 LAB_001cc354: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x20] MOV R8D,dword ptr [RBP + -0x24] MOV R9,qword ptr [RBP + -0x38] CALL 0x001d6600 MOV EDX,EAX MOV EAX,0x1 MOV ECX,0xffffffff CMP EDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_001cc386: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 rtree_add_key(long *param_1,long param_2,void *param_3,int param_4,byte *param_5,int8 param_6) { short sVar1; uint uVar2; int iVar3; uint local_54; short local_44; int4 local_c; uVar2 = (uint)param_5[1] | (*param_5 & 0x7f) << 8; if ((*param_5 & 0x80) == 0) { local_54 = 0; } else { local_54 = *(uint *)(*param_1 + 0x17c); } if ((uint)*(ushort *)(param_2 + 0xe) < uVar2 + param_4 + *(int *)(*param_1 + 0x178)) { iVar3 = rtree_split_page(param_1,param_2,param_5,param_3,param_4,param_6); local_c = 1; if (iVar3 != 0) { local_c = 0xffffffff; } } else { if (local_54 == 0) { memcpy(param_5 + ((uint)param_5[1] | (*param_5 & 0x7f) << 8),param_3, (ulong)(uint)(param_4 + *(int *)(*param_1 + 0x178))); sVar1 = (short)*(int4 *)(*param_1 + 0x178); } else { memcpy(param_5 + ((uint)param_5[1] | (*param_5 & 0x7f) << 8), (void *)((long)param_3 - (ulong)local_54),(ulong)(param_4 + local_54)); sVar1 = (short)local_54; } local_44 = (short)param_4 + sVar1 + (short)uVar2; sVar1 = 0; if (local_54 != 0) { sVar1 = -0x8000; } param_5[1] = (byte)(sVar1 + local_44); *param_5 = (byte)((ushort)(sVar1 + local_44) >> 8); local_c = 0; } return local_c; }
50,317
rtree_add_key
eloqsql/storage/myisam/rt_key.c
int rtree_add_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, uchar *page_buf, my_off_t *new_page) { uint page_size = mi_getint(page_buf); uint nod_flag = mi_test_if_nod(page_buf); DBUG_ENTER("rtree_add_key"); if (page_size + key_length + info->s->base.rec_reflength <= keyinfo->block_length) { /* split won't be necessary */ if (nod_flag) { /* save key */ DBUG_ASSERT(_mi_kpos(nod_flag, key) < info->state->key_file_length); memcpy(rt_PAGE_END(page_buf), key - nod_flag, key_length + nod_flag); page_size += key_length + nod_flag; } else { /* save key */ DBUG_ASSERT(_mi_dpos(info, nod_flag, key + key_length + info->s->base.rec_reflength) < info->state->data_file_length + info->s->base.pack_reclength); memcpy(rt_PAGE_END(page_buf), key, key_length + info->s->base.rec_reflength); page_size += key_length + info->s->base.rec_reflength; } mi_putint(page_buf, page_size, nod_flag); DBUG_RETURN(0); } DBUG_RETURN((rtree_split_page(info, keyinfo, page_buf, key, key_length, new_page) ? -1 : 1)); }
O3
c
rtree_add_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %r8, %rbx movl %ecx, %r14d movq %rdx, %rcx movq %rdi, %r15 movzbl 0x1(%r8), %eax movzbl (%r8), %edi movl %edi, %r12d andl $0x7f, %r12d shll $0x8, %r12d orl %eax, %r12d movq (%r15), %r8 testb %dil, %dil js 0x8c253 leal (%r12,%r14), %r10d movl 0x178(%r8), %edx addl %edx, %r10d movzwl 0xe(%rsi), %r8d cmpl %r8d, %r10d ja 0x8c26b andl $0x7f, %edi shll $0x8, %edi orq %rax, %rdi addq %rbx, %rdi addl %r14d, %edx movq %rcx, %rsi callq 0x29080 movq (%r15), %rax addl 0x178(%rax), %r14d xorl %eax, %eax jmp 0x8c2b4 movl 0x178(%r8), %edx leal (%r12,%r14), %r10d addl %edx, %r10d movzwl 0xe(%rsi), %r11d cmpl %r11d, %r10d jbe 0x8c286 movq %r15, %rdi movq %rbx, %rdx movl %r14d, %r8d callq 0x8f1bc movl %eax, %ecx xorl %eax, %eax negl %ecx sbbl %eax, %eax orl $0x1, %eax jmp 0x8c2c2 movl 0x17c(%r8), %esi testq %rsi, %rsi je 0x8c22e andl $0x7f, %edi shll $0x8, %edi orq %rax, %rdi addq %rbx, %rdi subq %rsi, %rcx addl %esi, %r14d movq %rcx, %rsi movq %r14, %rdx callq 0x29080 movl $0x8000, %eax # imm = 0x8000 addl %r12d, %r14d addl %r14d, %eax movb %r14b, 0x1(%rbx) movb %ah, (%rbx) xorl %eax, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
rtree_add_key: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, r8 mov r14d, ecx mov rcx, rdx mov r15, rdi movzx eax, byte ptr [r8+1] movzx edi, byte ptr [r8] mov r12d, edi and r12d, 7Fh shl r12d, 8 or r12d, eax mov r8, [r15] test dil, dil js short loc_8C253 lea r10d, [r12+r14] mov edx, [r8+178h] add r10d, edx movzx r8d, word ptr [rsi+0Eh] cmp r10d, r8d ja short loc_8C26B loc_8C22E: and edi, 7Fh shl edi, 8 or rdi, rax add rdi, rbx add edx, r14d mov rsi, rcx call _memcpy mov rax, [r15] add r14d, [rax+178h] xor eax, eax jmp short loc_8C2B4 loc_8C253: mov edx, [r8+178h] lea r10d, [r12+r14] add r10d, edx movzx r11d, word ptr [rsi+0Eh] cmp r10d, r11d jbe short loc_8C286 loc_8C26B: mov rdi, r15 mov rdx, rbx mov r8d, r14d call rtree_split_page mov ecx, eax xor eax, eax neg ecx sbb eax, eax or eax, 1 jmp short loc_8C2C2 loc_8C286: mov esi, [r8+17Ch] test rsi, rsi jz short loc_8C22E and edi, 7Fh shl edi, 8 or rdi, rax add rdi, rbx sub rcx, rsi add r14d, esi mov rsi, rcx mov rdx, r14 call _memcpy mov eax, 8000h loc_8C2B4: add r14d, r12d add eax, r14d mov [rbx+1], r14b mov [rbx], ah xor eax, eax loc_8C2C2: pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long rtree_add_key(long long *a1, long long a2, long long a3, unsigned int a4, char *a5) { long long v9; // rax char v10; // di int v11; // r12d long long v12; // r8 int v13; // edx long long v14; // r14 __int16 v15; // ax long long v17; // rsi __int16 v18; // r14 v9 = (unsigned __int8)a5[1]; v10 = *a5; v11 = v9 | ((*a5 & 0x7F) << 8); v12 = *a1; if ( v10 >= 0 ) { v13 = *(_DWORD *)(v12 + 376); if ( v13 + v11 + a4 <= *(unsigned __int16 *)(a2 + 14) ) goto LABEL_3; return (unsigned int)rtree_split_page(a1, a2, a5, a3, a4) != 0 ? -1 : 1; } v13 = *(_DWORD *)(v12 + 376); if ( v13 + v11 + a4 > *(unsigned __int16 *)(a2 + 14) ) return (unsigned int)rtree_split_page(a1, a2, a5, a3, a4) != 0 ? -1 : 1; v17 = *(unsigned int *)(v12 + 380); if ( *(_DWORD *)(v12 + 380) ) { v14 = (unsigned int)v17 + a4; memcpy(&a5[v9 | ((unsigned __int8)(v10 & 0x7F) << 8)], a3 - v17, v14); v15 = 0x8000; goto LABEL_8; } LABEL_3: memcpy(&a5[v9 | ((unsigned __int8)(v10 & 0x7F) << 8)], a3, a4 + v13); LODWORD(v14) = *(_DWORD *)(*a1 + 376) + a4; v15 = 0; LABEL_8: v18 = v11 + v14; a5[1] = v18; *a5 = (unsigned __int16)(v18 + v15) >> 8; return 0LL; }
rtree_add_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,R8 MOV R14D,ECX MOV RCX,RDX MOV R15,RDI MOVZX EAX,byte ptr [R8 + 0x1] MOVZX EDI,byte ptr [R8] MOV R12D,EDI AND R12D,0x7f SHL R12D,0x8 OR R12D,EAX MOV R8,qword ptr [R15] TEST DIL,DIL JS 0x0018c253 LEA R10D,[R12 + R14*0x1] MOV EDX,dword ptr [R8 + 0x178] ADD R10D,EDX MOVZX R8D,word ptr [RSI + 0xe] CMP R10D,R8D JA 0x0018c26b LAB_0018c22e: AND EDI,0x7f SHL EDI,0x8 OR RDI,RAX ADD RDI,RBX ADD EDX,R14D MOV RSI,RCX CALL 0x00129080 MOV RAX,qword ptr [R15] ADD R14D,dword ptr [RAX + 0x178] XOR EAX,EAX JMP 0x0018c2b4 LAB_0018c253: MOV EDX,dword ptr [R8 + 0x178] LEA R10D,[R12 + R14*0x1] ADD R10D,EDX MOVZX R11D,word ptr [RSI + 0xe] CMP R10D,R11D JBE 0x0018c286 LAB_0018c26b: MOV RDI,R15 MOV RDX,RBX MOV R8D,R14D CALL 0x0018f1bc MOV ECX,EAX XOR EAX,EAX NEG ECX SBB EAX,EAX OR EAX,0x1 JMP 0x0018c2c2 LAB_0018c286: MOV ESI,dword ptr [R8 + 0x17c] TEST RSI,RSI JZ 0x0018c22e AND EDI,0x7f SHL EDI,0x8 OR RDI,RAX ADD RDI,RBX SUB RCX,RSI ADD R14D,ESI MOV RSI,RCX MOV RDX,R14 CALL 0x00129080 MOV EAX,0x8000 LAB_0018c2b4: ADD R14D,R12D ADD EAX,R14D MOV byte ptr [RBX + 0x1],R14B MOV byte ptr [RBX],AH XOR EAX,EAX LAB_0018c2c2: POP RBX POP R12 POP R14 POP R15 POP RBP RET
uint rtree_add_key(long *param_1,long param_2,void *param_3,int param_4,byte *param_5) { byte bVar1; byte bVar2; uint uVar3; long lVar4; int iVar5; uint uVar6; uint uVar7; bVar1 = param_5[1]; bVar2 = *param_5; uVar6 = (bVar2 & 0x7f) << 8 | (uint)bVar1; lVar4 = *param_1; if ((char)bVar2 < '\0') { iVar5 = *(int *)(lVar4 + 0x178); if ((uint)*(ushort *)(param_2 + 0xe) < uVar6 + param_4 + iVar5) goto LAB_0018c26b; uVar3 = *(uint *)(lVar4 + 0x17c); if ((ulong)uVar3 != 0) { uVar7 = param_4 + uVar3; memcpy(param_5 + ((ulong)((bVar2 & 0x7f) << 8) | (ulong)bVar1), (void *)((long)param_3 - (ulong)uVar3),(ulong)uVar7); iVar5 = 0x8000; goto LAB_0018c2b4; } } else { iVar5 = *(int *)(lVar4 + 0x178); if ((uint)*(ushort *)(param_2 + 0xe) < uVar6 + param_4 + iVar5) { LAB_0018c26b: iVar5 = rtree_split_page(param_1,param_2,param_5,param_3,param_4); return -(uint)(iVar5 != 0) | 1; } } memcpy(param_5 + ((ulong)((bVar2 & 0x7f) << 8) | (ulong)bVar1),param_3, (ulong)(uint)(iVar5 + param_4)); uVar7 = param_4 + *(int *)(*param_1 + 0x178); iVar5 = 0; LAB_0018c2b4: param_5[1] = (byte)(uVar7 + uVar6); *param_5 = (byte)(iVar5 + uVar7 + uVar6 >> 8); return 0; }
50,318
ma_hashtbl_insert
eloqsql/libmariadb/libmariadb/ma_hashtbl.c
my_bool ma_hashtbl_insert(MA_HASHTBL *info,const uchar *record) { int flag; uint halfbuff,hash_nr,first_index,idx; uchar *ptr_to_rec= NULL,*ptr_to_rec2= NULL; MA_HASHTBL_LINK *data,*empty,*gpos= NULL,*gpos2 = NULL,*pos; LINT_INIT(gpos); LINT_INIT(gpos2); LINT_INIT(ptr_to_rec); LINT_INIT(ptr_to_rec2); flag=0; if (!(empty=(MA_HASHTBL_LINK*) ma_alloc_dynamic(&info->array))) return(TRUE); /* No more memory */ info->current_record= NO_RECORD; data=dynamic_element(&info->array,0,MA_HASHTBL_LINK*); halfbuff= info->blength >> 1; idx=first_index=info->records-halfbuff; if (idx != info->records) /* If some records */ { do { pos=data+idx; hash_nr=rec_hashnr(info,pos->data); if (flag == 0) /* First loop; Check if ok */ if (hash_mask(hash_nr,info->blength,info->records) != first_index) break; if (!(hash_nr & halfbuff)) { /* Key will not move */ if (!(flag & LOWFIND)) { if (flag & HIGHFIND) { flag=LOWFIND | HIGHFIND; /* key shall be moved to the current empty position */ gpos=empty; ptr_to_rec=pos->data; empty=pos; /* This place is now free */ } else { flag=LOWFIND | LOWUSED; /* key isn't changed */ gpos=pos; ptr_to_rec=pos->data; } } else { if (!(flag & LOWUSED)) { /* Change link of previous LOW-key */ gpos->data=ptr_to_rec; gpos->next=(uint) (pos-data); flag= (flag & HIGHFIND) | (LOWFIND | LOWUSED); } gpos=pos; ptr_to_rec=pos->data; } } else { /* key will be moved */ if (!(flag & HIGHFIND)) { flag= (flag & LOWFIND) | HIGHFIND; /* key shall be moved to the last (empty) position */ gpos2 = empty; empty=pos; ptr_to_rec2=pos->data; } else { if (!(flag & HIGHUSED)) { /* Change link of previous hash-key and save */ gpos2->data=ptr_to_rec2; gpos2->next=(uint) (pos-data); flag= (flag & LOWFIND) | (HIGHFIND | HIGHUSED); } gpos2=pos; ptr_to_rec2=pos->data; } } } while ((idx=pos->next) != NO_RECORD); if ((flag & (LOWFIND | LOWUSED)) == LOWFIND) { gpos->data=ptr_to_rec; gpos->next=NO_RECORD; } if ((flag & (HIGHFIND | HIGHUSED)) == HIGHFIND) { gpos2->data=ptr_to_rec2; gpos2->next=NO_RECORD; } } /* Check if we are at the empty position */ idx=hash_mask(rec_hashnr(info,record),info->blength,info->records+1); pos=data+idx; if (pos == empty) { pos->data=(uchar*) record; pos->next=NO_RECORD; } else { /* Check if more records in same hash-nr family */ empty[0]=pos[0]; gpos=data+hash_rec_mask(info,pos,info->blength,info->records+1); if (pos == gpos) { pos->data=(uchar*) record; pos->next=(uint) (empty - data); } else { pos->data=(uchar*) record; pos->next=NO_RECORD; movelink(data,(uint) (pos-data),(uint) (gpos-data),(uint) (empty-data)); } } if (++info->records == info->blength) info->blength+= info->blength; return(0); }
O0
c
ma_hashtbl_insert: pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq $0x0, -0x38(%rbp) movq $0x0, -0x40(%rbp) movq $0x0, -0x58(%rbp) movq $0x0, -0x60(%rbp) movl $0x0, -0x1c(%rbp) movq -0x10(%rbp), %rdi addq $0x18, %rdi callq 0x5d310 movq %rax, -0x50(%rbp) cmpq $0x0, %rax jne 0x5f607 movb $0x1, -0x1(%rbp) jmp 0x5f98d movq -0x10(%rbp), %rax movl $0xffffffff, 0x10(%rax) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x48(%rbp) movq -0x10(%rbp), %rax movl 0xc(%rax), %eax shrl %eax movl %eax, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x8(%rax), %eax subl -0x20(%rbp), %eax movl %eax, -0x28(%rbp) movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movq -0x10(%rbp), %rcx cmpl 0x8(%rcx), %eax je 0x5f831 jmp 0x5f64c movq -0x48(%rbp), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rdi movq -0x68(%rbp), %rax movq 0x8(%rax), %rsi callq 0x5f9a0 movl %eax, -0x24(%rbp) cmpl $0x0, -0x1c(%rbp) jne 0x5f69a movl -0x24(%rbp), %edi movq -0x10(%rbp), %rax movl 0xc(%rax), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx callq 0x5f3c0 cmpl -0x28(%rbp), %eax je 0x5f698 jmp 0x5f7ed jmp 0x5f69a movl -0x24(%rbp), %eax andl -0x20(%rbp), %eax cmpl $0x0, %eax jne 0x5f754 movl -0x1c(%rbp), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0x5f701 movl -0x1c(%rbp), %eax andl $0x4, %eax cmpl $0x0, %eax je 0x5f6e4 movl $0x5, -0x1c(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x68(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x50(%rbp) jmp 0x5f6ff movl $0x3, -0x1c(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x68(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) jmp 0x5f74f movl -0x1c(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x5f73b movq -0x38(%rbp), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x68(%rbp), %rax movq -0x48(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %ecx movq -0x58(%rbp), %rax movl %ecx, (%rax) movl -0x1c(%rbp), %eax andl $0x4, %eax orl $0x3, %eax movl %eax, -0x1c(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x68(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) jmp 0x5f7d9 movl -0x1c(%rbp), %eax andl $0x4, %eax cmpl $0x0, %eax jne 0x5f789 movl -0x1c(%rbp), %eax andl $0x1, %eax orl $0x4, %eax movl %eax, -0x1c(%rbp) movq -0x50(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x68(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) jmp 0x5f7d7 movl -0x1c(%rbp), %eax andl $0x8, %eax cmpl $0x0, %eax jne 0x5f7c3 movq -0x40(%rbp), %rcx movq -0x60(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x68(%rbp), %rax movq -0x48(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %ecx movq -0x60(%rbp), %rax movl %ecx, (%rax) movl -0x1c(%rbp), %eax andl $0x1, %eax orl $0xc, %eax movl %eax, -0x1c(%rbp) movq -0x68(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x68(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) jmp 0x5f7d9 jmp 0x5f7db movq -0x68(%rbp), %rax movl (%rax), %eax movl %eax, -0x2c(%rbp) cmpl $-0x1, %eax jne 0x5f64c movl -0x1c(%rbp), %eax andl $0x3, %eax cmpl $0x1, %eax jne 0x5f80e movq -0x38(%rbp), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x58(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movl -0x1c(%rbp), %eax andl $0xc, %eax cmpl $0x4, %eax jne 0x5f82f movq -0x40(%rbp), %rcx movq -0x60(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x60(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF jmp 0x5f831 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x5f9a0 movl %eax, %edi movq -0x10(%rbp), %rax movl 0xc(%rax), %esi movq -0x10(%rbp), %rax movl 0x8(%rax), %edx addl $0x1, %edx callq 0x5f3c0 movl %eax, -0x2c(%rbp) movq -0x48(%rbp), %rax movl -0x2c(%rbp), %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax cmpq -0x50(%rbp), %rax jne 0x5f890 movq -0x18(%rbp), %rcx movq -0x68(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x68(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF jmp 0x5f962 movq -0x50(%rbp), %rax movq -0x68(%rbp), %rcx movq (%rcx), %rdx movq %rdx, (%rax) movq 0x8(%rcx), %rcx movq %rcx, 0x8(%rax) movq -0x48(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x10(%rbp), %rdi movq -0x68(%rbp), %rsi movq -0x10(%rbp), %rax movl 0xc(%rax), %edx movq -0x10(%rbp), %rax movl 0x8(%rax), %ecx addl $0x1, %ecx callq 0x5f490 movl %eax, %ecx movq -0x70(%rbp), %rax movl %ecx, %ecx shlq $0x4, %rcx addq %rcx, %rax movq %rax, -0x58(%rbp) movq -0x68(%rbp), %rax cmpq -0x58(%rbp), %rax jne 0x5f90e movq -0x18(%rbp), %rcx movq -0x68(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x50(%rbp), %rax movq -0x48(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %ecx movq -0x68(%rbp), %rax movl %ecx, (%rax) jmp 0x5f960 movq -0x18(%rbp), %rcx movq -0x68(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x68(%rbp), %rax movl $0xffffffff, (%rax) # imm = 0xFFFFFFFF movq -0x48(%rbp), %rdi movq -0x68(%rbp), %rax movq -0x48(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %esi movq -0x58(%rbp), %rax movq -0x48(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %edx movq -0x50(%rbp), %rax movq -0x48(%rbp), %rcx subq %rcx, %rax sarq $0x4, %rax movl %eax, %ecx callq 0x5f9e0 jmp 0x5f962 movq -0x10(%rbp), %rcx movl 0x8(%rcx), %eax addl $0x1, %eax movl %eax, 0x8(%rcx) movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jne 0x5f989 movq -0x10(%rbp), %rax movl 0xc(%rax), %ecx movq -0x10(%rbp), %rax addl 0xc(%rax), %ecx movl %ecx, 0xc(%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x70, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_hashtbl_insert: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_38], 0 mov [rbp+var_40], 0 mov [rbp+var_58], 0 mov [rbp+var_60], 0 mov [rbp+var_1C], 0 mov rdi, [rbp+var_10] add rdi, 18h call ma_alloc_dynamic mov [rbp+var_50], rax cmp rax, 0 jnz short loc_5F607 mov [rbp+var_1], 1 jmp loc_5F98D loc_5F607: mov rax, [rbp+var_10] mov dword ptr [rax+10h], 0FFFFFFFFh mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_48], rax mov rax, [rbp+var_10] mov eax, [rax+0Ch] shr eax, 1 mov [rbp+var_20], eax mov rax, [rbp+var_10] mov eax, [rax+8] sub eax, [rbp+var_20] mov [rbp+var_28], eax mov [rbp+var_2C], eax mov eax, [rbp+var_2C] mov rcx, [rbp+var_10] cmp eax, [rcx+8] jz loc_5F831 jmp short $+2 loc_5F64C: mov rax, [rbp+var_48] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov [rbp+var_68], rax mov rdi, [rbp+var_10] mov rax, [rbp+var_68] mov rsi, [rax+8] call rec_hashnr mov [rbp+var_24], eax cmp [rbp+var_1C], 0 jnz short loc_5F69A mov edi, [rbp+var_24] mov rax, [rbp+var_10] mov esi, [rax+0Ch] mov rax, [rbp+var_10] mov edx, [rax+8] call hash_mask cmp eax, [rbp+var_28] jz short loc_5F698 jmp loc_5F7ED loc_5F698: jmp short $+2 loc_5F69A: mov eax, [rbp+var_24] and eax, [rbp+var_20] cmp eax, 0 jnz loc_5F754 mov eax, [rbp+var_1C] and eax, 1 cmp eax, 0 jnz short loc_5F701 mov eax, [rbp+var_1C] and eax, 4 cmp eax, 0 jz short loc_5F6E4 mov [rbp+var_1C], 5 mov rax, [rbp+var_50] mov [rbp+var_58], rax mov rax, [rbp+var_68] mov rax, [rax+8] mov [rbp+var_38], rax mov rax, [rbp+var_68] mov [rbp+var_50], rax jmp short loc_5F6FF loc_5F6E4: mov [rbp+var_1C], 3 mov rax, [rbp+var_68] mov [rbp+var_58], rax mov rax, [rbp+var_68] mov rax, [rax+8] mov [rbp+var_38], rax loc_5F6FF: jmp short loc_5F74F loc_5F701: mov eax, [rbp+var_1C] and eax, 2 cmp eax, 0 jnz short loc_5F73B mov rcx, [rbp+var_38] mov rax, [rbp+var_58] mov [rax+8], rcx mov rax, [rbp+var_68] mov rcx, [rbp+var_48] sub rax, rcx sar rax, 4 mov ecx, eax mov rax, [rbp+var_58] mov [rax], ecx mov eax, [rbp+var_1C] and eax, 4 or eax, 3 mov [rbp+var_1C], eax loc_5F73B: mov rax, [rbp+var_68] mov [rbp+var_58], rax mov rax, [rbp+var_68] mov rax, [rax+8] mov [rbp+var_38], rax loc_5F74F: jmp loc_5F7D9 loc_5F754: mov eax, [rbp+var_1C] and eax, 4 cmp eax, 0 jnz short loc_5F789 mov eax, [rbp+var_1C] and eax, 1 or eax, 4 mov [rbp+var_1C], eax mov rax, [rbp+var_50] mov [rbp+var_60], rax mov rax, [rbp+var_68] mov [rbp+var_50], rax mov rax, [rbp+var_68] mov rax, [rax+8] mov [rbp+var_40], rax jmp short loc_5F7D7 loc_5F789: mov eax, [rbp+var_1C] and eax, 8 cmp eax, 0 jnz short loc_5F7C3 mov rcx, [rbp+var_40] mov rax, [rbp+var_60] mov [rax+8], rcx mov rax, [rbp+var_68] mov rcx, [rbp+var_48] sub rax, rcx sar rax, 4 mov ecx, eax mov rax, [rbp+var_60] mov [rax], ecx mov eax, [rbp+var_1C] and eax, 1 or eax, 0Ch mov [rbp+var_1C], eax loc_5F7C3: mov rax, [rbp+var_68] mov [rbp+var_60], rax mov rax, [rbp+var_68] mov rax, [rax+8] mov [rbp+var_40], rax loc_5F7D7: jmp short $+2 loc_5F7D9: jmp short $+2 loc_5F7DB: mov rax, [rbp+var_68] mov eax, [rax] mov [rbp+var_2C], eax cmp eax, 0FFFFFFFFh jnz loc_5F64C loc_5F7ED: mov eax, [rbp+var_1C] and eax, 3 cmp eax, 1 jnz short loc_5F80E mov rcx, [rbp+var_38] mov rax, [rbp+var_58] mov [rax+8], rcx mov rax, [rbp+var_58] mov dword ptr [rax], 0FFFFFFFFh loc_5F80E: mov eax, [rbp+var_1C] and eax, 0Ch cmp eax, 4 jnz short loc_5F82F mov rcx, [rbp+var_40] mov rax, [rbp+var_60] mov [rax+8], rcx mov rax, [rbp+var_60] mov dword ptr [rax], 0FFFFFFFFh loc_5F82F: jmp short $+2 loc_5F831: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call rec_hashnr mov edi, eax mov rax, [rbp+var_10] mov esi, [rax+0Ch] mov rax, [rbp+var_10] mov edx, [rax+8] add edx, 1 call hash_mask mov [rbp+var_2C], eax mov rax, [rbp+var_48] mov ecx, [rbp+var_2C] shl rcx, 4 add rax, rcx mov [rbp+var_68], rax mov rax, [rbp+var_68] cmp rax, [rbp+var_50] jnz short loc_5F890 mov rcx, [rbp+var_18] mov rax, [rbp+var_68] mov [rax+8], rcx mov rax, [rbp+var_68] mov dword ptr [rax], 0FFFFFFFFh jmp loc_5F962 loc_5F890: mov rax, [rbp+var_50] mov rcx, [rbp+var_68] mov rdx, [rcx] mov [rax], rdx mov rcx, [rcx+8] mov [rax+8], rcx mov rax, [rbp+var_48] mov [rbp+var_70], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_68] mov rax, [rbp+var_10] mov edx, [rax+0Ch] mov rax, [rbp+var_10] mov ecx, [rax+8] add ecx, 1 call hash_rec_mask mov ecx, eax mov rax, [rbp+var_70] mov ecx, ecx shl rcx, 4 add rax, rcx mov [rbp+var_58], rax mov rax, [rbp+var_68] cmp rax, [rbp+var_58] jnz short loc_5F90E mov rcx, [rbp+var_18] mov rax, [rbp+var_68] mov [rax+8], rcx mov rax, [rbp+var_50] mov rcx, [rbp+var_48] sub rax, rcx sar rax, 4 mov ecx, eax mov rax, [rbp+var_68] mov [rax], ecx jmp short loc_5F960 loc_5F90E: mov rcx, [rbp+var_18] mov rax, [rbp+var_68] mov [rax+8], rcx mov rax, [rbp+var_68] mov dword ptr [rax], 0FFFFFFFFh mov rdi, [rbp+var_48] mov rax, [rbp+var_68] mov rcx, [rbp+var_48] sub rax, rcx sar rax, 4 mov esi, eax mov rax, [rbp+var_58] mov rcx, [rbp+var_48] sub rax, rcx sar rax, 4 mov edx, eax mov rax, [rbp+var_50] mov rcx, [rbp+var_48] sub rax, rcx sar rax, 4 mov ecx, eax call movelink loc_5F960: jmp short $+2 loc_5F962: mov rcx, [rbp+var_10] mov eax, [rcx+8] add eax, 1 mov [rcx+8], eax mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jnz short loc_5F989 mov rax, [rbp+var_10] mov ecx, [rax+0Ch] mov rax, [rbp+var_10] add ecx, [rax+0Ch] mov [rax+0Ch], ecx loc_5F989: mov [rbp+var_1], 0 loc_5F98D: mov al, [rbp+var_1] add rsp, 70h pop rbp retn
char ma_hashtbl_insert(long long a1, long long a2) { unsigned int v2; // eax int v3; // eax int *v5; // [rsp+8h] [rbp-68h] long long v6; // [rsp+8h] [rbp-68h] _QWORD *v7; // [rsp+10h] [rbp-60h] _QWORD *v8; // [rsp+18h] [rbp-58h] long long v9; // [rsp+18h] [rbp-58h] _QWORD *v10; // [rsp+20h] [rbp-50h] long long v11; // [rsp+28h] [rbp-48h] long long v12; // [rsp+30h] [rbp-40h] long long v13; // [rsp+38h] [rbp-38h] unsigned int v14; // [rsp+44h] [rbp-2Ch] unsigned int v15; // [rsp+48h] [rbp-28h] unsigned int v16; // [rsp+4Ch] [rbp-24h] int v17; // [rsp+50h] [rbp-20h] int v18; // [rsp+54h] [rbp-1Ch] v13 = 0LL; v12 = 0LL; v8 = 0LL; v7 = 0LL; v18 = 0; v10 = (_QWORD *)ma_alloc_dynamic((long long *)(a1 + 24)); if ( !v10 ) return 1; *(_DWORD *)(a1 + 16) = -1; v11 = *(_QWORD *)(a1 + 24); v17 = *(_DWORD *)(a1 + 12) >> 1; v15 = *(_DWORD *)(a1 + 8) - v17; v14 = v15; if ( v15 != *(_DWORD *)(a1 + 8) ) { do { v5 = (int *)(16LL * v14 + v11); v16 = rec_hashnr(a1, *((_QWORD *)v5 + 1)); if ( !v18 && (unsigned int)hash_mask(v16, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8)) != v15 ) break; if ( (v17 & v16) != 0 ) { if ( (v18 & 4) != 0 ) { if ( (v18 & 8) == 0 ) { v7[1] = v12; *(_DWORD *)v7 = (16LL * v14) >> 4; v18 = v18 & 1 | 0xC; } v7 = (_QWORD *)(16LL * v14 + v11); v12 = *((_QWORD *)v5 + 1); } else { v18 = v18 & 1 | 4; v7 = v10; v10 = (_QWORD *)(16LL * v14 + v11); v12 = *((_QWORD *)v5 + 1); } } else if ( (v18 & 1) != 0 ) { if ( (v18 & 2) == 0 ) { v8[1] = v13; *(_DWORD *)v8 = (16LL * v14) >> 4; v18 = v18 & 4 | 3; } v8 = (_QWORD *)(16LL * v14 + v11); v13 = *((_QWORD *)v5 + 1); } else if ( (v18 & 4) != 0 ) { v18 = 5; v8 = v10; v13 = *((_QWORD *)v5 + 1); v10 = (_QWORD *)(16LL * v14 + v11); } else { v18 = 3; v8 = (_QWORD *)(16LL * v14 + v11); v13 = *((_QWORD *)v5 + 1); } v14 = *v5; } while ( *v5 != -1 ); if ( (v18 & 3) == 1 ) { v8[1] = v13; *(_DWORD *)v8 = -1; } if ( (v18 & 0xC) == 4 ) { v7[1] = v12; *(_DWORD *)v7 = -1; } } v2 = rec_hashnr(a1, a2); v6 = 16LL * (unsigned int)hash_mask(v2, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8) + 1) + v11; if ( (_QWORD *)v6 == v10 ) { *(_QWORD *)(v6 + 8) = a2; *(_DWORD *)v6 = -1; } else { *v10 = *(_QWORD *)v6; v10[1] = *(_QWORD *)(v6 + 8); v9 = 16LL * (unsigned int)hash_rec_mask(a1, v6, *(_DWORD *)(a1 + 12), *(_DWORD *)(a1 + 8) + 1) + v11; *(_QWORD *)(v6 + 8) = a2; if ( v6 == v9 ) { *(_DWORD *)v6 = ((long long)v10 - v11) >> 4; } else { *(_DWORD *)v6 = -1; movelink( v11, (unsigned int)((v6 - v11) >> 4), (unsigned int)((v9 - v11) >> 4), (unsigned int)(((long long)v10 - v11) >> 4)); } } v3 = *(_DWORD *)(a1 + 8) + 1; *(_DWORD *)(a1 + 8) = v3; if ( v3 == *(_DWORD *)(a1 + 12) ) *(_DWORD *)(a1 + 12) *= 2; return 0; }
ma_hashtbl_insert: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x38],0x0 MOV qword ptr [RBP + -0x40],0x0 MOV qword ptr [RBP + -0x58],0x0 MOV qword ptr [RBP + -0x60],0x0 MOV dword ptr [RBP + -0x1c],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x18 CALL 0x0015d310 MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JNZ 0x0015f607 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0015f98d LAB_0015f607: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],0xffffffff MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] SHR EAX,0x1 MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] SUB EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x28],EAX MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0x8] JZ 0x0015f831 JMP 0x0015f64c LAB_0015f64c: MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x68],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x68] MOV RSI,qword ptr [RAX + 0x8] CALL 0x0015f9a0 MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x1c],0x0 JNZ 0x0015f69a MOV EDI,dword ptr [RBP + -0x24] MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] CALL 0x0015f3c0 CMP EAX,dword ptr [RBP + -0x28] JZ 0x0015f698 JMP 0x0015f7ed LAB_0015f698: JMP 0x0015f69a LAB_0015f69a: MOV EAX,dword ptr [RBP + -0x24] AND EAX,dword ptr [RBP + -0x20] CMP EAX,0x0 JNZ 0x0015f754 MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x1 CMP EAX,0x0 JNZ 0x0015f701 MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x4 CMP EAX,0x0 JZ 0x0015f6e4 MOV dword ptr [RBP + -0x1c],0x5 MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x50],RAX JMP 0x0015f6ff LAB_0015f6e4: MOV dword ptr [RBP + -0x1c],0x3 MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x38],RAX LAB_0015f6ff: JMP 0x0015f74f LAB_0015f701: MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x2 CMP EAX,0x0 JNZ 0x0015f73b MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x48] SUB RAX,RCX SAR RAX,0x4 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x4 OR EAX,0x3 MOV dword ptr [RBP + -0x1c],EAX LAB_0015f73b: MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x38],RAX LAB_0015f74f: JMP 0x0015f7d9 LAB_0015f754: MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x4 CMP EAX,0x0 JNZ 0x0015f789 MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x1 OR EAX,0x4 MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX JMP 0x0015f7d7 LAB_0015f789: MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x8 CMP EAX,0x0 JNZ 0x0015f7c3 MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x48] SUB RAX,RCX SAR RAX,0x4 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x1 OR EAX,0xc MOV dword ptr [RBP + -0x1c],EAX LAB_0015f7c3: MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX LAB_0015f7d7: JMP 0x0015f7d9 LAB_0015f7d9: JMP 0x0015f7db LAB_0015f7db: MOV RAX,qword ptr [RBP + -0x68] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX CMP EAX,-0x1 JNZ 0x0015f64c LAB_0015f7ed: MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0x3 CMP EAX,0x1 JNZ 0x0015f80e MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x58] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x58] MOV dword ptr [RAX],0xffffffff LAB_0015f80e: MOV EAX,dword ptr [RBP + -0x1c] AND EAX,0xc CMP EAX,0x4 JNZ 0x0015f82f MOV RCX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x60] MOV dword ptr [RAX],0xffffffff LAB_0015f82f: JMP 0x0015f831 LAB_0015f831: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0015f9a0 MOV EDI,EAX MOV RAX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x8] ADD EDX,0x1 CALL 0x0015f3c0 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RBP + -0x2c] SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x50] JNZ 0x0015f890 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x68] MOV dword ptr [RAX],0xffffffff JMP 0x0015f962 LAB_0015f890: MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x68] MOV RDX,qword ptr [RCX] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x70],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x68] MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x8] ADD ECX,0x1 CALL 0x0015f490 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x70] MOV ECX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x58] JNZ 0x0015f90e MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x48] SUB RAX,RCX SAR RAX,0x4 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x68] MOV dword ptr [RAX],ECX JMP 0x0015f960 LAB_0015f90e: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x68] MOV dword ptr [RAX],0xffffffff MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x48] SUB RAX,RCX SAR RAX,0x4 MOV ESI,EAX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x48] SUB RAX,RCX SAR RAX,0x4 MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x48] SUB RAX,RCX SAR RAX,0x4 MOV ECX,EAX CALL 0x0015f9e0 LAB_0015f960: JMP 0x0015f962 LAB_0015f962: MOV RCX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RCX + 0x8] ADD EAX,0x1 MOV dword ptr [RCX + 0x8],EAX MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JNZ 0x0015f989 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x10] ADD ECX,dword ptr [RAX + 0xc] MOV dword ptr [RAX + 0xc],ECX LAB_0015f989: MOV byte ptr [RBP + -0x1],0x0 LAB_0015f98d: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x70 POP RBP RET
int1 ma_hashtbl_insert(long param_1,int8 param_2) { long lVar1; uint uVar2; uint uVar3; uint uVar4; uint uVar5; int4 uVar6; int iVar7; uint *puVar8; uint *puVar9; uint *local_68; uint *local_60; uint *local_58; int8 local_48; int8 local_40; uint local_34; uint local_24; int1 local_9; local_40 = 0; local_48 = 0; local_60 = (uint *)0x0; local_68 = (uint *)0x0; local_24 = 0; local_58 = (uint *)ma_alloc_dynamic(param_1 + 0x18); if (local_58 == (uint *)0x0) { local_9 = 1; } else { *(int4 *)(param_1 + 0x10) = 0xffffffff; lVar1 = *(long *)(param_1 + 0x18); uVar2 = *(uint *)(param_1 + 0xc) >> 1; uVar3 = *(int *)(param_1 + 8) - uVar2; local_34 = uVar3; if (uVar3 != *(uint *)(param_1 + 8)) { do { puVar8 = (uint *)(lVar1 + (ulong)local_34 * 0x10); uVar4 = rec_hashnr(param_1,*(int8 *)(puVar8 + 2)); if ((local_24 == 0) && (uVar5 = hash_mask(uVar4,*(int4 *)(param_1 + 0xc),*(int4 *)(param_1 + 8)), uVar5 != uVar3)) break; if ((uVar4 & uVar2) == 0) { if ((local_24 & 1) == 0) { if ((local_24 & 4) == 0) { local_24 = 3; local_40 = *(int8 *)(puVar8 + 2); local_60 = puVar8; } else { local_24 = 5; local_60 = local_58; local_40 = *(int8 *)(puVar8 + 2); local_58 = puVar8; } } else { if ((local_24 & 2) == 0) { *(int8 *)(local_60 + 2) = local_40; *local_60 = (uint)((long)puVar8 - lVar1 >> 4); local_24 = local_24 & 4 | 3; } local_40 = *(int8 *)(puVar8 + 2); local_60 = puVar8; } } else if ((local_24 & 4) == 0) { local_24 = local_24 & 1 | 4; local_68 = local_58; local_48 = *(int8 *)(puVar8 + 2); local_58 = puVar8; } else { if ((local_24 & 8) == 0) { *(int8 *)(local_68 + 2) = local_48; *local_68 = (uint)((long)puVar8 - lVar1 >> 4); local_24 = local_24 & 1 | 0xc; } local_48 = *(int8 *)(puVar8 + 2); local_68 = puVar8; } local_34 = *puVar8; } while (*puVar8 != 0xffffffff); if ((local_24 & 3) == 1) { *(int8 *)(local_60 + 2) = local_40; *local_60 = 0xffffffff; } if ((local_24 & 0xc) == 4) { *(int8 *)(local_68 + 2) = local_48; *local_68 = 0xffffffff; } } uVar6 = rec_hashnr(param_1,param_2); uVar2 = hash_mask(uVar6,*(int4 *)(param_1 + 0xc),*(int *)(param_1 + 8) + 1); puVar8 = (uint *)(lVar1 + (ulong)uVar2 * 0x10); if (puVar8 == local_58) { *(int8 *)(puVar8 + 2) = param_2; *puVar8 = 0xffffffff; } else { *(int8 *)local_58 = *(int8 *)puVar8; *(int8 *)(local_58 + 2) = *(int8 *)(puVar8 + 2); uVar2 = hash_rec_mask(param_1,puVar8,*(int4 *)(param_1 + 0xc),*(int *)(param_1 + 8) + 1) ; puVar9 = (uint *)(lVar1 + (ulong)uVar2 * 0x10); if (puVar8 == puVar9) { *(int8 *)(puVar8 + 2) = param_2; *puVar8 = (uint)((long)local_58 - lVar1 >> 4); } else { *(int8 *)(puVar8 + 2) = param_2; *puVar8 = 0xffffffff; movelink(lVar1,(long)puVar8 - lVar1 >> 4 & 0xffffffff,(long)puVar9 - lVar1 >> 4 & 0xffffffff ,(long)local_58 - lVar1 >> 4 & 0xffffffff); } } iVar7 = *(int *)(param_1 + 8) + 1; *(int *)(param_1 + 8) = iVar7; if (iVar7 == *(int *)(param_1 + 0xc)) { *(int *)(param_1 + 0xc) = *(int *)(param_1 + 0xc) + *(int *)(param_1 + 0xc); } local_9 = 0; } return local_9; }
50,319
ggml_rope_multi
llama.cpp/ggml/src/ggml.c
struct ggml_tensor * ggml_rope_multi( struct ggml_context * ctx, struct ggml_tensor * a, struct ggml_tensor * b, struct ggml_tensor * c, int n_dims, int sections[4], int mode, int n_ctx_orig, float freq_base, float freq_scale, float ext_factor, float attn_factor, float beta_fast, float beta_slow) { // Multimodal Rotary Position Embedding GGML_ASSERT((mode & 1) == 0 && "mode & 1 == 1 is no longer supported"); GGML_ASSERT(ggml_is_vector(b)); GGML_ASSERT(b->type == GGML_TYPE_I32); GGML_ASSERT(a->ne[2] * 4 == b->ne[0]); // mrope expecting 4 position ids per token if (c) { GGML_ASSERT(c->type == GGML_TYPE_F32); GGML_ASSERT(c->ne[0] >= n_dims / 2); } struct ggml_tensor * result = ggml_dup_tensor(ctx, a); int32_t params[11 + 4] = { /*n_past*/ 0, n_dims, mode, /*n_ctx*/ 0, n_ctx_orig }; memcpy(params + 5, &freq_base, sizeof(float)); memcpy(params + 6, &freq_scale, sizeof(float)); memcpy(params + 7, &ext_factor, sizeof(float)); memcpy(params + 8, &attn_factor, sizeof(float)); memcpy(params + 9, &beta_fast, sizeof(float)); memcpy(params + 10, &beta_slow, sizeof(float)); memcpy(&params[11], sections, sizeof(int)*4); ggml_set_op_params(result, params, sizeof(params)); result->op = GGML_OP_ROPE; result->src[0] = a; result->src[1] = b; result->src[2] = c; return result; }
O3
c
ggml_rope_multi: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl 0x70(%rsp), %eax testb $0x1, %al jne 0x1cc5f movq %rdx, %r14 cmpq $0x1, 0x18(%rdx) jne 0x1cc40 cmpq $0x1, 0x20(%r14) jne 0x1cc40 cmpq $0x1, 0x28(%r14) jne 0x1cc40 cmpl $0x1a, (%r14) jne 0x1cc7e movq %rsi, %r15 movq 0x20(%rsi), %rax shlq $0x2, %rax cmpq 0x10(%r14), %rax jne 0x1cc9a movq %r9, %r12 movl %r8d, %ebp movq %rcx, %rbx movss %xmm0, 0x8(%rsp) movss %xmm1, 0xc(%rsp) movss %xmm2, 0x10(%rsp) movss %xmm3, 0x14(%rsp) movss %xmm4, 0x18(%rsp) movss %xmm5, 0x1c(%rsp) testq %rcx, %rcx je 0x1cb81 cmpl $0x0, (%rbx) jne 0x1ccd2 movl %ebp, %eax shrl $0x1f, %eax addl %ebp, %eax sarl %eax cltq cmpq %rax, 0x10(%rbx) jl 0x1ccee movl (%r15), %esi leaq 0x10(%r15), %rcx xorl %r13d, %r13d movl $0x4, %edx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x19be7 movups (%r12), %xmm0 movaps %xmm0, 0x20(%rsp) testq %rax, %rax je 0x1ccb6 movl 0x78(%rsp), %ecx movl %r13d, 0x54(%rax) movl %ebp, 0x58(%rax) movl 0x70(%rsp), %edx movl %edx, 0x5c(%rax) movl %r13d, 0x60(%rax) movl %ecx, 0x64(%rax) movss 0x8(%rsp), %xmm0 movss %xmm0, 0x68(%rax) movss 0xc(%rsp), %xmm0 movss %xmm0, 0x6c(%rax) movss 0x10(%rsp), %xmm0 movss %xmm0, 0x70(%rax) movss 0x14(%rsp), %xmm0 movss %xmm0, 0x74(%rax) movss 0x18(%rsp), %xmm0 movss %xmm0, 0x78(%rax) movss 0x1c(%rsp), %xmm0 movss %xmm0, 0x7c(%rax) movaps 0x20(%rsp), %xmm0 movups %xmm0, 0x80(%rax) movl $0x2d, 0x50(%rax) movq %r15, 0x98(%rax) movq %r14, 0xa0(%rax) movq %rbx, 0xa8(%rax) addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x2d9cc(%rip), %rdi # 0x4a613 leaq 0x2da00(%rip), %rdx # 0x4a64e leaq 0x2dfc6(%rip), %rcx # 0x4ac1b movl $0xe1b, %esi # imm = 0xE1B jmp 0x1cd08 leaq 0x2d9ad(%rip), %rdi # 0x4a613 leaq 0x2d9e1(%rip), %rdx # 0x4a64e leaq 0x2df6d(%rip), %rcx # 0x4abe1 movl $0xe19, %esi # imm = 0xE19 jmp 0x1cd08 leaq 0x2d98e(%rip), %rdi # 0x4a613 leaq 0x2d9c2(%rip), %rdx # 0x4a64e leaq 0x2defb(%rip), %rcx # 0x4ab8e movl $0xe1c, %esi # imm = 0xE1C jmp 0x1cd08 leaq 0x2d972(%rip), %rdi # 0x4a613 leaq 0x2d9a6(%rip), %rdx # 0x4a64e leaq 0x2df7e(%rip), %rcx # 0x4ac2d movl $0xe1d, %esi # imm = 0xE1D jmp 0x1cd08 leaq 0x2fac6(%rip), %rdi # 0x4c783 leaq 0x2d98a(%rip), %rdx # 0x4a64e leaq 0x2faf8(%rip), %rcx # 0x4c7c3 movl $0x70, %esi jmp 0x1cd08 leaq 0x2d93a(%rip), %rdi # 0x4a613 leaq 0x2d96e(%rip), %rdx # 0x4a64e leaq 0x2eb51(%rip), %rcx # 0x4b838 movl $0xe20, %esi # imm = 0xE20 jmp 0x1cd08 leaq 0x2d91e(%rip), %rdi # 0x4a613 leaq 0x2d952(%rip), %rdx # 0x4a64e leaq 0x2df43(%rip), %rcx # 0x4ac46 movl $0xe21, %esi # imm = 0xE21 xorl %eax, %eax callq 0x17c80
ggml_rope_multi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov eax, [rsp+68h+arg_0] test al, 1 jnz loc_1CC5F mov r14, rdx cmp qword ptr [rdx+18h], 1 jnz loc_1CC40 cmp qword ptr [r14+20h], 1 jnz loc_1CC40 cmp qword ptr [r14+28h], 1 jnz loc_1CC40 cmp dword ptr [r14], 1Ah jnz loc_1CC7E mov r15, rsi mov rax, [rsi+20h] shl rax, 2 cmp rax, [r14+10h] jnz loc_1CC9A mov r12, r9 mov ebp, r8d mov rbx, rcx movss [rsp+68h+var_60], xmm0 movss [rsp+68h+var_5C], xmm1 movss [rsp+68h+var_58], xmm2 movss [rsp+68h+var_54], xmm3 movss [rsp+68h+var_50], xmm4 movss [rsp+68h+var_4C], xmm5 test rcx, rcx jz short loc_1CB81 cmp dword ptr [rbx], 0 jnz loc_1CCD2 mov eax, ebp shr eax, 1Fh add eax, ebp sar eax, 1 cdqe cmp [rbx+10h], rax jl loc_1CCEE loc_1CB81: mov esi, [r15] lea rcx, [r15+10h] xor r13d, r13d mov edx, 4 xor r8d, r8d xor r9d, r9d call ggml_new_tensor_impl movups xmm0, xmmword ptr [r12] movaps [rsp+68h+var_48], xmm0 test rax, rax jz loc_1CCB6 mov ecx, [rsp+68h+arg_8] mov [rax+54h], r13d mov [rax+58h], ebp mov edx, [rsp+68h+arg_0] mov [rax+5Ch], edx mov [rax+60h], r13d mov [rax+64h], ecx movss xmm0, [rsp+68h+var_60] movss dword ptr [rax+68h], xmm0 movss xmm0, [rsp+68h+var_5C] movss dword ptr [rax+6Ch], xmm0 movss xmm0, [rsp+68h+var_58] movss dword ptr [rax+70h], xmm0 movss xmm0, [rsp+68h+var_54] movss dword ptr [rax+74h], xmm0 movss xmm0, [rsp+68h+var_50] movss dword ptr [rax+78h], xmm0 movss xmm0, [rsp+68h+var_4C] movss dword ptr [rax+7Ch], xmm0 movaps xmm0, [rsp+68h+var_48] movups xmmword ptr [rax+80h], xmm0 mov dword ptr [rax+50h], 2Dh ; '-' mov [rax+98h], r15 mov [rax+0A0h], r14 mov [rax+0A8h], rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1CC40: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsVectorB; "ggml_is_vector(b)" mov esi, 0E1Bh jmp loc_1CD08 loc_1CC5F: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMode10Mode11Is; "(mode & 1) == 0 && \"mode & 1 == 1 is n"... mov esi, 0E19h jmp loc_1CD08 loc_1CC7E: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixAG+2Ah; "b->type == GGML_TYPE_I32" mov esi, 0E1Ch jmp short loc_1CD08 loc_1CC9A: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aANe24BNe0; "a->ne[2] * 4 == b->ne[0]" mov esi, 0E1Dh jmp short loc_1CD08 loc_1CCB6: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aTensorNull; "tensor != NULL" mov esi, 70h ; 'p' jmp short loc_1CD08 loc_1CCD2: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGradAccTypeGgm+7; "c->type == GGML_TYPE_F32" mov esi, 0E20h jmp short loc_1CD08 loc_1CCEE: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCNe0NDims2; "c->ne[0] >= n_dims / 2" mov esi, 0E21h loc_1CD08: xor eax, eax call _ggml_abort
long long ggml_rope_multi( long long a1, long long a2, long long a3, long long a4, int a5, __int128 *a6, float a7, float a8, float a9, float a10, float a11, float a12, int a13, int a14) { long long result; // rax const char *v19; // rdi char *v20; // rcx int v21; // esi __int128 v24; // [rsp+20h] [rbp-48h] if ( (a13 & 1) != 0 ) { v19 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; v20 = "(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\""; v21 = 3609; goto LABEL_19; } if ( *(_QWORD *)(a3 + 24) != 1LL || *(_QWORD *)(a3 + 32) != 1LL || *(_QWORD *)(a3 + 40) != 1LL ) { v19 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; v20 = "ggml_is_vector(b)"; v21 = 3611; goto LABEL_19; } if ( *(_DWORD *)a3 != 26 ) { v19 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; v20 = "b->type == GGML_TYPE_I32"; v21 = 3612; goto LABEL_19; } if ( 4LL * *(_QWORD *)(a2 + 32) != *(_QWORD *)(a3 + 16) ) { v19 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; v20 = "a->ne[2] * 4 == b->ne[0]"; v21 = 3613; goto LABEL_19; } if ( a4 ) { if ( *(_DWORD *)a4 ) { v19 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; v20 = "c->type == GGML_TYPE_F32"; v21 = 3616; } else { if ( *(_QWORD *)(a4 + 16) >= a5 / 2 ) goto LABEL_10; v19 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; v20 = "c->ne[0] >= n_dims / 2"; v21 = 3617; } LABEL_19: ggml_abort((_DWORD)v19, v21, (unsigned int)"GGML_ASSERT(%s) failed", (_DWORD)v20, a5, (_DWORD)a6); } LABEL_10: result = ggml_new_tensor_impl(a1, *(_DWORD *)a2, 4u, (_QWORD *)(a2 + 16), 0LL, 0LL); v24 = *a6; if ( !result ) { v19 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-impl.h"; v20 = "tensor != NULL"; v21 = 112; goto LABEL_19; } *(_DWORD *)(result + 84) = 0; *(_DWORD *)(result + 88) = a5; *(_DWORD *)(result + 92) = a13; *(_DWORD *)(result + 96) = 0; *(_DWORD *)(result + 100) = a14; *(float *)(result + 104) = a7; *(float *)(result + 108) = a8; *(float *)(result + 112) = a9; *(float *)(result + 116) = a10; *(float *)(result + 120) = a11; *(float *)(result + 124) = a12; *(_OWORD *)(result + 128) = v24; *(_DWORD *)(result + 80) = 45; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; *(_QWORD *)(result + 168) = a4; return result; }
ggml_rope_multi: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV EAX,dword ptr [RSP + 0x70] TEST AL,0x1 JNZ 0x0011cc5f MOV R14,RDX CMP qword ptr [RDX + 0x18],0x1 JNZ 0x0011cc40 CMP qword ptr [R14 + 0x20],0x1 JNZ 0x0011cc40 CMP qword ptr [R14 + 0x28],0x1 JNZ 0x0011cc40 CMP dword ptr [R14],0x1a JNZ 0x0011cc7e MOV R15,RSI MOV RAX,qword ptr [RSI + 0x20] SHL RAX,0x2 CMP RAX,qword ptr [R14 + 0x10] JNZ 0x0011cc9a MOV R12,R9 MOV EBP,R8D MOV RBX,RCX MOVSS dword ptr [RSP + 0x8],XMM0 MOVSS dword ptr [RSP + 0xc],XMM1 MOVSS dword ptr [RSP + 0x10],XMM2 MOVSS dword ptr [RSP + 0x14],XMM3 MOVSS dword ptr [RSP + 0x18],XMM4 MOVSS dword ptr [RSP + 0x1c],XMM5 TEST RCX,RCX JZ 0x0011cb81 CMP dword ptr [RBX],0x0 JNZ 0x0011ccd2 MOV EAX,EBP SHR EAX,0x1f ADD EAX,EBP SAR EAX,0x1 CDQE CMP qword ptr [RBX + 0x10],RAX JL 0x0011ccee LAB_0011cb81: MOV ESI,dword ptr [R15] LEA RCX,[R15 + 0x10] XOR R13D,R13D MOV EDX,0x4 XOR R8D,R8D XOR R9D,R9D CALL 0x00119be7 MOVUPS XMM0,xmmword ptr [R12] MOVAPS xmmword ptr [RSP + 0x20],XMM0 TEST RAX,RAX JZ 0x0011ccb6 MOV ECX,dword ptr [RSP + 0x78] MOV dword ptr [RAX + 0x54],R13D MOV dword ptr [RAX + 0x58],EBP MOV EDX,dword ptr [RSP + 0x70] MOV dword ptr [RAX + 0x5c],EDX MOV dword ptr [RAX + 0x60],R13D MOV dword ptr [RAX + 0x64],ECX MOVSS XMM0,dword ptr [RSP + 0x8] MOVSS dword ptr [RAX + 0x68],XMM0 MOVSS XMM0,dword ptr [RSP + 0xc] MOVSS dword ptr [RAX + 0x6c],XMM0 MOVSS XMM0,dword ptr [RSP + 0x10] MOVSS dword ptr [RAX + 0x70],XMM0 MOVSS XMM0,dword ptr [RSP + 0x14] MOVSS dword ptr [RAX + 0x74],XMM0 MOVSS XMM0,dword ptr [RSP + 0x18] MOVSS dword ptr [RAX + 0x78],XMM0 MOVSS XMM0,dword ptr [RSP + 0x1c] MOVSS dword ptr [RAX + 0x7c],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RAX + 0x80],XMM0 MOV dword ptr [RAX + 0x50],0x2d MOV qword ptr [RAX + 0x98],R15 MOV qword ptr [RAX + 0xa0],R14 MOV qword ptr [RAX + 0xa8],RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011cc40: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14ac1b] MOV ESI,0xe1b JMP 0x0011cd08 LAB_0011cc5f: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14abe1] MOV ESI,0xe19 JMP 0x0011cd08 LAB_0011cc7e: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14ab8e] MOV ESI,0xe1c JMP 0x0011cd08 LAB_0011cc9a: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14ac2d] MOV ESI,0xe1d JMP 0x0011cd08 LAB_0011ccb6: LEA RDI,[0x14c783] LEA RDX,[0x14a64e] LEA RCX,[0x14c7c3] MOV ESI,0x70 JMP 0x0011cd08 LAB_0011ccd2: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14b838] MOV ESI,0xe20 JMP 0x0011cd08 LAB_0011ccee: LEA RDI,[0x14a613] LEA RDX,[0x14a64e] LEA RCX,[0x14ac46] MOV ESI,0xe21 LAB_0011cd08: XOR EAX,EAX CALL 0x00117c80
void ggml_rope_multi(int4 param_1,int4 param_2,int4 param_3,int4 param_4, int4 param_5,int4 param_6,int8 param_7,int4 *param_8, int *param_9,int *param_10,int param_11,int8 *param_12,uint param_13, int4 param_14) { int8 uVar1; long lVar2; char *pcVar3; int8 uVar4; char *pcVar5; if ((param_13 & 1) == 0) { if (((*(long *)(param_9 + 6) == 1) && (*(long *)(param_9 + 8) == 1)) && (*(long *)(param_9 + 10) == 1)) { if (*param_9 == 0x1a) { if (*(long *)(param_8 + 8) << 2 == *(long *)(param_9 + 4)) { if (param_10 != (int *)0x0) { if (*param_10 != 0) { pcVar5 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; pcVar3 = "c->type == GGML_TYPE_F32"; uVar4 = 0xe20; goto LAB_0011cd08; } if (*(long *)(param_10 + 4) < (long)(param_11 / 2)) { pcVar5 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; pcVar3 = "c->ne[0] >= n_dims / 2"; uVar4 = 0xe21; goto LAB_0011cd08; } } lVar2 = ggml_new_tensor_impl(param_7,*param_8,4,param_8 + 4,0,0); uVar4 = *param_12; uVar1 = param_12[1]; if (lVar2 != 0) { *(int4 *)(lVar2 + 0x54) = 0; *(int *)(lVar2 + 0x58) = param_11; *(uint *)(lVar2 + 0x5c) = param_13; *(int4 *)(lVar2 + 0x60) = 0; *(int4 *)(lVar2 + 100) = param_14; *(int4 *)(lVar2 + 0x68) = param_1; *(int4 *)(lVar2 + 0x6c) = param_2; *(int4 *)(lVar2 + 0x70) = param_3; *(int4 *)(lVar2 + 0x74) = param_4; *(int4 *)(lVar2 + 0x78) = param_5; *(int4 *)(lVar2 + 0x7c) = param_6; *(int8 *)(lVar2 + 0x80) = uVar4; *(int8 *)(lVar2 + 0x88) = uVar1; *(int4 *)(lVar2 + 0x50) = 0x2d; *(int4 **)(lVar2 + 0x98) = param_8; *(int **)(lVar2 + 0xa0) = param_9; *(int **)(lVar2 + 0xa8) = param_10; return; } pcVar5 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml-impl.h"; pcVar3 = "tensor != NULL"; uVar4 = 0x70; } else { pcVar5 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; pcVar3 = "a->ne[2] * 4 == b->ne[0]"; uVar4 = 0xe1d; } } else { pcVar5 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; pcVar3 = "b->type == GGML_TYPE_I32"; uVar4 = 0xe1c; } } else { pcVar5 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; pcVar3 = "ggml_is_vector(b)"; uVar4 = 0xe1b; } } else { pcVar5 = "/workspace/llm4binary/github2025/llama.cpp/ggml/src/ggml.c"; pcVar3 = "(mode & 1) == 0 && \"mode & 1 == 1 is no longer supported\""; uVar4 = 0xe19; } LAB_0011cd08: /* WARNING: Subroutine does not return */ ggml_abort(pcVar5,uVar4,"GGML_ASSERT(%s) failed",pcVar3); }
50,320
bc_get_leb128
bluesky950520[P]quickjs/quickjs.c
static int bc_get_leb128(BCReaderState *s, uint32_t *pval) { int ret; ret = get_leb128(pval, s->ptr, s->buf_end); if (unlikely(ret < 0)) return bc_read_error_end(s); s->ptr += ret; return 0; }
O2
c
bc_get_leb128: pushq %rbx movq %rsi, %rax movq %rdi, %rbx movq 0x10(%rdi), %rsi movq 0x18(%rdi), %rdx movq %rax, %rdi callq 0x3b072 testl %eax, %eax js 0x3d1b9 movl %eax, %eax addq %rax, 0x10(%rbx) xorl %eax, %eax popq %rbx retq movq %rbx, %rdi callq 0x3d27c pushq $-0x1 popq %rax jmp 0x3d1b7
bc_get_leb128: push rbx mov rax, rsi mov rbx, rdi mov rsi, [rdi+10h] mov rdx, [rdi+18h] mov rdi, rax call get_leb128 test eax, eax js short loc_3D1B9 mov eax, eax add [rbx+10h], rax xor eax, eax loc_3D1B7: pop rbx retn loc_3D1B9: mov rdi, rbx call bc_read_error_end push 0FFFFFFFFFFFFFFFFh pop rax jmp short loc_3D1B7
long long bc_get_leb128(long long a1, _DWORD *a2) { int leb128; // eax leb128 = get_leb128(a2, *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)); if ( leb128 < 0 ) { bc_read_error_end(a1); return -1LL; } else { *(_QWORD *)(a1 + 16) += (unsigned int)leb128; return 0LL; } }
bc_get_leb128: PUSH RBX MOV RAX,RSI MOV RBX,RDI MOV RSI,qword ptr [RDI + 0x10] MOV RDX,qword ptr [RDI + 0x18] MOV RDI,RAX CALL 0x0013b072 TEST EAX,EAX JS 0x0013d1b9 MOV EAX,EAX ADD qword ptr [RBX + 0x10],RAX XOR EAX,EAX LAB_0013d1b7: POP RBX RET LAB_0013d1b9: MOV RDI,RBX CALL 0x0013d27c PUSH -0x1 POP RAX JMP 0x0013d1b7
int8 bc_get_leb128(long param_1,int8 param_2) { uint uVar1; int8 uStack_10; uVar1 = get_leb128(param_2,*(int8 *)(param_1 + 0x10),*(int8 *)(param_1 + 0x18)); if ((int)uVar1 < 0) { bc_read_error_end(param_1); uStack_10 = 0xffffffffffffffff; } else { *(long *)(param_1 + 0x10) = *(long *)(param_1 + 0x10) + (ulong)uVar1; uStack_10 = 0; } return uStack_10; }
50,321
pvio_socket_keepalive
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
int pvio_socket_keepalive(MARIADB_PVIO *pvio) { int opt= 1; struct st_pvio_socket *csock= NULL; if (!pvio || !pvio->data) return 1; csock= (struct st_pvio_socket *)pvio->data; return setsockopt(csock->socket, SOL_SOCKET, SO_KEEPALIVE, #ifndef _WIN32 (const void *)&opt, sizeof(opt)); #else (char *)&opt, (int)sizeof(opt)); #endif }
O0
c
pvio_socket_keepalive: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl $0x1, -0x14(%rbp) movq $0x0, -0x20(%rbp) cmpq $0x0, -0x10(%rbp) je 0x6611c movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x66125 movl $0x1, -0x4(%rbp) jmp 0x66152 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movl (%rax), %edi movl $0x1, %esi movl $0x9, %edx leaq -0x14(%rbp), %rcx movl $0x4, %r8d callq 0x36130 movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
pvio_socket_keepalive: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], 1 mov [rbp+var_20], 0 cmp [rbp+var_10], 0 jz short loc_6611C mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_66125 loc_6611C: mov [rbp+var_4], 1 jmp short loc_66152 loc_66125: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov edi, [rax] mov esi, 1 mov edx, 9 lea rcx, [rbp+var_14] mov r8d, 4 call _setsockopt mov [rbp+var_4], eax loc_66152: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long pvio_socket_keepalive(_QWORD *a1) { int v2; // [rsp+Ch] [rbp-14h] BYREF _QWORD *v3; // [rsp+10h] [rbp-10h] v3 = a1; v2 = 1; if ( a1 && *v3 ) return (unsigned int)setsockopt(*(unsigned int *)*v3, 1LL, 9LL, &v2, 4LL); else return 1; }
pvio_socket_keepalive: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],0x1 MOV qword ptr [RBP + -0x20],0x0 CMP qword ptr [RBP + -0x10],0x0 JZ 0x0016611c MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x00166125 LAB_0016611c: MOV dword ptr [RBP + -0x4],0x1 JMP 0x00166152 LAB_00166125: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EDI,dword ptr [RAX] MOV ESI,0x1 MOV EDX,0x9 LEA RCX,[RBP + -0x14] MOV R8D,0x4 CALL 0x00136130 MOV dword ptr [RBP + -0x4],EAX LAB_00166152: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int pvio_socket_keepalive(long *param_1) { int4 local_1c; long *local_18; int local_c; local_1c = 1; if ((param_1 == (long *)0x0) || (*param_1 == 0)) { local_c = 1; } else { local_18 = param_1; local_c = setsockopt(*(int *)*param_1,1,9,&local_1c,4); } return local_c; }
50,322
stbi_load_from_file
monkey531[P]llama/examples/llava/../../common/stb_image.h
STBIDEF stbi_uc *stbi_load_from_file(FILE *f, int *x, int *y, int *comp, int req_comp) { unsigned char *result; stbi__context s; stbi__start_file(&s,f); result = stbi__load_and_postprocess_8bit(&s,x,y,comp,req_comp); if (result) { // need to 'unget' all the characters in the IO buffer fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); } return result; }
O0
c
stbi_load_from_file: subq $0x118, %rsp # imm = 0x118 movq %rdi, 0x110(%rsp) movq %rsi, 0x108(%rsp) movq %rdx, 0x100(%rsp) movq %rcx, 0xf8(%rsp) movl %r8d, 0xf4(%rsp) movq 0x110(%rsp), %rsi leaq 0x8(%rsp), %rdi callq 0x75ac0 movq 0x108(%rsp), %rsi movq 0x100(%rsp), %rdx movq 0xf8(%rsp), %rcx movl 0xf4(%rsp), %r8d leaq 0x8(%rsp), %rdi callq 0x75af0 movq %rax, 0xe8(%rsp) cmpq $0x0, 0xe8(%rsp) je 0x75aac movq 0x110(%rsp), %rdi movq 0xd0(%rsp), %rax movq 0xc8(%rsp), %rcx subq %rcx, %rax movl %eax, %ecx xorl %eax, %eax subl %ecx, %eax movslq %eax, %rsi movl $0x1, %edx callq 0x62bb0 movq 0xe8(%rsp), %rax addq $0x118, %rsp # imm = 0x118 retq nopl (%rax)
stbi_load_from_file: sub rsp, 118h mov [rsp+118h+var_8], rdi mov [rsp+118h+var_10], rsi mov [rsp+118h+var_18], rdx mov [rsp+118h+var_20], rcx mov [rsp+118h+var_24], r8d mov rsi, [rsp+118h+var_8] lea rdi, [rsp+118h+var_110] call _ZL16stbi__start_fileP13stbi__contextP8_IO_FILE; stbi__start_file(stbi__context *,_IO_FILE *) mov rsi, [rsp+118h+var_10] mov rdx, [rsp+118h+var_18] mov rcx, [rsp+118h+var_20] mov r8d, [rsp+118h+var_24] lea rdi, [rsp+118h+var_110] call _ZL31stbi__load_and_postprocess_8bitP13stbi__contextPiS1_S1_i; stbi__load_and_postprocess_8bit(stbi__context *,int *,int *,int *,int) mov [rsp+118h+var_30], rax cmp [rsp+118h+var_30], 0 jz short loc_75AAC mov rdi, [rsp+118h+var_8] mov rax, [rsp+118h+var_48] mov rcx, [rsp+118h+var_50] sub rax, rcx mov ecx, eax xor eax, eax sub eax, ecx movsxd rsi, eax mov edx, 1 call _fseek loc_75AAC: mov rax, [rsp+118h+var_30] add rsp, 118h retn
long long stbi_load_from_file(long long a1, long long a2, long long a3, long long a4, unsigned int a5) { _BYTE v6[192]; // [rsp+8h] [rbp-110h] BYREF long long v7; // [rsp+C8h] [rbp-50h] long long v8; // [rsp+D0h] [rbp-48h] long long v9; // [rsp+E8h] [rbp-30h] unsigned int v10; // [rsp+F4h] [rbp-24h] long long v11; // [rsp+F8h] [rbp-20h] long long v12; // [rsp+100h] [rbp-18h] long long v13; // [rsp+108h] [rbp-10h] long long v14; // [rsp+110h] [rbp-8h] v14 = a1; v13 = a2; v12 = a3; v11 = a4; v10 = a5; stbi__start_file(v6, a1); v9 = stbi__load_and_postprocess_8bit(v6, v13, v12, v11, v10); if ( v9 ) fseek(v14, (int)v7 - (int)v8, 1LL); return v9; }
stbi_load_from_file: SUB RSP,0x118 MOV qword ptr [RSP + 0x110],RDI MOV qword ptr [RSP + 0x108],RSI MOV qword ptr [RSP + 0x100],RDX MOV qword ptr [RSP + 0xf8],RCX MOV dword ptr [RSP + 0xf4],R8D MOV RSI,qword ptr [RSP + 0x110] LEA RDI,[RSP + 0x8] CALL 0x00175ac0 MOV RSI,qword ptr [RSP + 0x108] MOV RDX,qword ptr [RSP + 0x100] MOV RCX,qword ptr [RSP + 0xf8] MOV R8D,dword ptr [RSP + 0xf4] LEA RDI,[RSP + 0x8] CALL 0x00175af0 MOV qword ptr [RSP + 0xe8],RAX CMP qword ptr [RSP + 0xe8],0x0 JZ 0x00175aac MOV RDI,qword ptr [RSP + 0x110] MOV RAX,qword ptr [RSP + 0xd0] MOV RCX,qword ptr [RSP + 0xc8] SUB RAX,RCX MOV ECX,EAX XOR EAX,EAX SUB EAX,ECX MOVSXD RSI,EAX MOV EDX,0x1 CALL 0x00162bb0 LAB_00175aac: MOV RAX,qword ptr [RSP + 0xe8] ADD RSP,0x118 RET
long stbi_load_from_file(_IO_FILE *param_1,int *param_2,int *param_3,int *param_4,int param_5) { stbi__context local_110 [192]; int local_50; int local_48; long local_30; int local_24; int *local_20; int *local_18; int *local_10; _IO_FILE *local_8; local_24 = param_5; local_20 = param_4; local_18 = param_3; local_10 = param_2; local_8 = param_1; stbi__start_file(local_110,param_1); local_30 = stbi__load_and_postprocess_8bit(local_110,local_10,local_18,local_20,local_24); if (local_30 != 0) { fseek(local_8,(long)-(local_48 - local_50),1); } return local_30; }
50,323
llama_sampler_grammar_reset(llama_sampler*)
monkey531[P]llama/src/llama-sampling.cpp
static void llama_sampler_grammar_reset(struct llama_sampler * smpl) { auto * ctx = (llama_sampler_grammar *) smpl->ctx; if (!ctx->grammar) { return; } std::vector<const char *> trigger_words; for (auto & word : ctx->grammar->trigger_words) { trigger_words.push_back(word.c_str()); } auto * grammar_new = llama_grammar_init_impl(ctx->grammar->vocab, ctx->grammar_str.c_str(), ctx->grammar_root.c_str(), ctx->grammar->lazy, trigger_words.data(), trigger_words.size(), ctx->grammar->trigger_tokens.data(), ctx->grammar->trigger_tokens.size()); llama_grammar_free_impl(ctx->grammar); ctx->grammar = grammar_new; }
O3
cpp
llama_sampler_grammar_reset(llama_sampler*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x20, %rsp movq 0x8(%rdi), %r15 movq 0x48(%r15), %rax testq %rax, %rax je 0xdf8da xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movq 0x80(%rax), %r12 movq 0x88(%rax), %r13 cmpq %r13, %r12 je 0xdf87d movq %rsp, %rbx leaq 0x18(%rsp), %r14 movq (%r12), %rax movq %rax, 0x18(%rsp) movq %rbx, %rdi movq %r14, %rsi callq 0x67770 addq $0x20, %r12 cmpq %r13, %r12 jne 0xdf851 movq 0x48(%r15), %rax movq (%rsp), %r8 movq 0x8(%rsp), %r9 jmp 0xdf883 xorl %r9d, %r9d xorl %r8d, %r8d movq 0x8(%r15), %rsi movq 0x28(%r15), %rdx movzbl 0x40(%rax), %ecx subq %r8, %r9 sarq $0x3, %r9 movq (%rax), %rdi movq 0x68(%rax), %r10 movq 0x70(%rax), %rax subq %r10, %rax sarq $0x2, %rax pushq %rax pushq %r10 callq 0x69540 addq $0x10, %rsp movq %rax, %rbx movq 0x48(%r15), %rdi callq 0x69210 movq %rbx, 0x48(%r15) movq (%rsp), %rdi testq %rdi, %rdi je 0xdf8da movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x681a0 addq $0x20, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0xdf8ea movq %rax, %rbx movq (%rsp), %rdi testq %rdi, %rdi je 0xdf903 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x681a0 movq %rbx, %rdi callq 0x6b5d0
_ZL27llama_sampler_grammar_resetP13llama_sampler: push r15 push r14 push r13 push r12 push rbx sub rsp, 20h mov r15, [rdi+8] mov rax, [r15+48h] test rax, rax jz loc_DF8DA xorps xmm0, xmm0 movaps xmmword ptr [rsp+48h+var_48], xmm0 mov [rsp+48h+var_38], 0 mov r12, [rax+80h] mov r13, [rax+88h] cmp r12, r13 jz short loc_DF87D mov rbx, rsp lea r14, [rsp+48h+var_30] loc_DF851: mov rax, [r12] mov [rsp+48h+var_30], rax mov rdi, rbx mov rsi, r14 call __ZNSt6vectorIPKcSaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<char const*>::emplace_back<char const*>(char const* &&) add r12, 20h ; ' ' cmp r12, r13 jnz short loc_DF851 mov rax, [r15+48h] mov r8, [rsp+48h+var_48] mov r9, [rsp+48h+var_48+8] jmp short loc_DF883 loc_DF87D: xor r9d, r9d xor r8d, r8d; char ** loc_DF883: mov rsi, [r15+8]; char * mov rdx, [r15+28h]; char * movzx ecx, byte ptr [rax+40h]; bool sub r9, r8 sar r9, 3; unsigned __int64 mov rdi, [rax]; llama_vocab * mov r10, [rax+68h] mov rax, [rax+70h] sub rax, r10 sar rax, 2 push rax; unsigned __int64 push r10; int * call __Z23llama_grammar_init_implPK11llama_vocabPKcS3_bPS3_mPKim; llama_grammar_init_impl(llama_vocab const*,char const*,char const*,bool,char const**,ulong,int const*,ulong) add rsp, 10h mov rbx, rax mov rdi, [r15+48h]; void * call __Z23llama_grammar_free_implP13llama_grammar; llama_grammar_free_impl(llama_grammar *) mov [r15+48h], rbx mov rdi, [rsp+48h+var_48]; void * test rdi, rdi jz short loc_DF8DA mov rsi, [rsp+48h+var_38] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_DF8DA: add rsp, 20h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short $+2 loc_DF8EA: mov rbx, rax mov rdi, [rsp+0]; void * test rdi, rdi jz short loc_DF903 mov rsi, [rsp+arg_8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_DF903: mov rdi, rbx call __Unwind_Resume
void llama_sampler_grammar_reset(long long a1) { long long v1; // r15 long long v2; // rax _QWORD *v3; // r12 _QWORD *v4; // r13 const char **v5; // r8 _BYTE *v6; // r9 long long inited; // rbx void *v8[2]; // [rsp+0h] [rbp-48h] BYREF long long v9; // [rsp+10h] [rbp-38h] _QWORD v10[6]; // [rsp+18h] [rbp-30h] BYREF v1 = *(_QWORD *)(a1 + 8); v2 = *(_QWORD *)(v1 + 72); if ( v2 ) { *(_OWORD *)v8 = 0LL; v9 = 0LL; v3 = *(_QWORD **)(v2 + 128); v4 = *(_QWORD **)(v2 + 136); if ( v3 == v4 ) { v6 = 0LL; v5 = 0LL; } else { do { v10[0] = *v3; std::vector<char const*>::emplace_back<char const*>(v8, v10); v3 += 4; } while ( v3 != v4 ); v2 = *(_QWORD *)(v1 + 72); v5 = (const char **)v8[0]; v6 = v8[1]; } inited = llama_grammar_init_impl( *(const llama_vocab **)v2, *(const char **)(v1 + 8), *(const char **)(v1 + 40), *(_BYTE *)(v2 + 64), v5, (v6 - (_BYTE *)v5) >> 3, *(const int **)(v2 + 104), (long long)(*(_QWORD *)(v2 + 112) - *(_QWORD *)(v2 + 104)) >> 2); llama_grammar_free_impl(*(void **)(v1 + 72)); *(_QWORD *)(v1 + 72) = inited; if ( v8[0] ) operator delete(v8[0], v9 - (unsigned long long)v8[0]); } }
llama_sampler_grammar_reset: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R15,qword ptr [RDI + 0x8] MOV RAX,qword ptr [R15 + 0x48] TEST RAX,RAX JZ 0x001df8da XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 MOV R12,qword ptr [RAX + 0x80] MOV R13,qword ptr [RAX + 0x88] CMP R12,R13 JZ 0x001df87d MOV RBX,RSP LEA R14,[RSP + 0x18] LAB_001df851: MOV RAX,qword ptr [R12] MOV qword ptr [RSP + 0x18],RAX LAB_001df85a: MOV RDI,RBX MOV RSI,R14 CALL 0x00167770 ADD R12,0x20 CMP R12,R13 JNZ 0x001df851 MOV RAX,qword ptr [R15 + 0x48] MOV R8,qword ptr [RSP] MOV R9,qword ptr [RSP + 0x8] JMP 0x001df883 LAB_001df87d: XOR R9D,R9D XOR R8D,R8D LAB_001df883: MOV RSI,qword ptr [R15 + 0x8] MOV RDX,qword ptr [R15 + 0x28] MOVZX ECX,byte ptr [RAX + 0x40] SUB R9,R8 SAR R9,0x3 MOV RDI,qword ptr [RAX] MOV R10,qword ptr [RAX + 0x68] MOV RAX,qword ptr [RAX + 0x70] SUB RAX,R10 SAR RAX,0x2 LAB_001df8a8: PUSH RAX PUSH R10 CALL 0x00169540 ADD RSP,0x10 MOV RBX,RAX MOV RDI,qword ptr [R15 + 0x48] CALL 0x00169210 LAB_001df8c0: MOV qword ptr [R15 + 0x48],RBX MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x001df8da MOV RSI,qword ptr [RSP + 0x10] SUB RSI,RDI CALL 0x001681a0 LAB_001df8da: ADD RSP,0x20 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* llama_sampler_grammar_reset(llama_sampler*) */ void llama_sampler_grammar_reset(llama_sampler *param_1) { long lVar1; int8 *puVar2; int8 *puVar3; int8 uVar4; int8 *puVar5; char **local_48; long lStack_40; long local_38; char *local_30; lVar1 = *(long *)(param_1 + 8); puVar3 = *(int8 **)(lVar1 + 0x48); if (puVar3 != (int8 *)0x0) { local_48 = (char **)0x0; lStack_40 = 0; local_38 = 0; puVar5 = (int8 *)puVar3[0x10]; puVar2 = (int8 *)puVar3[0x11]; if (puVar5 != puVar2) { do { local_30 = (char *)*puVar5; /* try { // try from 001df85a to 001df864 has its CatchHandler @ 001df8ea */ std::vector<char_const*,std::allocator<char_const*>>::emplace_back<char_const*> ((vector<char_const*,std::allocator<char_const*>> *)&local_48,&local_30); puVar5 = puVar5 + 4; } while (puVar5 != puVar2); puVar3 = *(int8 **)(lVar1 + 0x48); } /* try { // try from 001df8a8 to 001df8bf has its CatchHandler @ 001df8e8 */ uVar4 = llama_grammar_init_impl ((llama_vocab *)*puVar3,*(char **)(lVar1 + 8),*(char **)(lVar1 + 0x28), *(bool *)(puVar3 + 8),local_48,lStack_40 - (long)local_48 >> 3, (int *)puVar3[0xd],puVar3[0xe] - (long)puVar3[0xd] >> 2); llama_grammar_free_impl(*(llama_grammar **)(lVar1 + 0x48)); *(int8 *)(lVar1 + 0x48) = uVar4; if (local_48 != (char **)0x0) { operator_delete(local_48,local_38 - (long)local_48); } } return; }
50,324
js_math_sumPrecise
bluesky950520[P]quickjs/quickjs.c
static JSValue js_math_sumPrecise(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue iter, next, item, ret; bf_t a, b; BOOL done; double d; int r; iter = JS_GetIterator(ctx, argv[0], /*async*/FALSE); if (JS_IsException(iter)) return JS_EXCEPTION; bf_init(ctx->bf_ctx, &a); bf_init(ctx->bf_ctx, &b); ret = JS_EXCEPTION; next = JS_GetProperty(ctx, iter, JS_ATOM_next); if (JS_IsException(next)) goto fail; bf_set_zero(&a, /*is_neg*/TRUE); for (;;) { item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done); if (JS_IsException(item)) goto fail; if (done) break; // item == JS_UNDEFINED switch (JS_VALUE_GET_TAG(item)) { default: JS_FreeValue(ctx, item); JS_ThrowTypeError(ctx, "not a number"); goto fail; case JS_TAG_INT: d = JS_VALUE_GET_INT(item); break; case JS_TAG_FLOAT64: d = JS_VALUE_GET_FLOAT64(item); break; } if (bf_set_float64(&b, d)) goto oom; // Infinity + -Infinity results in BF_ST_INVALID_OP, sets |a| to nan if ((r = bf_add(&a, &a, &b, BF_PREC_INF, BF_RNDN))) if (r != BF_ST_INVALID_OP) goto oom; } bf_get_float64(&a, &d, BF_RNDN); // return value deliberately ignored ret = js_float64(d); fail: JS_IteratorClose(ctx, iter, JS_IsException(ret)); JS_FreeValue(ctx, iter); JS_FreeValue(ctx, next); bf_delete(&a); bf_delete(&b); return ret; oom: JS_ThrowOutOfMemory(ctx); goto fail; }
O1
c
js_math_sumPrecise: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdi, %rbx movq (%r8), %rsi movq 0x8(%r8), %rdx xorl %r14d, %r14d xorl %ecx, %ecx callq 0x4180b movq %rdx, %r12 cmpl $0x6, %r12d jne 0x7e2b0 movl $0x6, %r13d jmp 0x7e4af movq %rax, %r15 movq 0x1d0(%rbx), %rdi leaq 0x28(%rsp), %rsi callq 0x84a50 movq 0x1d0(%rbx), %rdi leaq 0x50(%rsp), %rsi callq 0x84a50 movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx movl $0x6b, %ecx movq %r15, %r8 movq %r12, %r9 pushq $0x0 pushq $0x0 callq 0x22fa3 addq $0x10, %rsp movq %rax, 0x18(%rsp) movq %rdx, %rbp movl $0x6, %r13d cmpl $0x6, %ebp jne 0x7e31f movl $0x1, %ecx movq $0x0, 0x8(%rsp) xorl %r14d, %r14d jmp 0x7e444 leaq 0x28(%rsp), %r14 movq %r14, %rdi movl $0x1, %esi callq 0x84c03 movq $0x0, 0x8(%rsp) leaq 0x50(%rsp), %r13 movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx movq 0x18(%rsp), %rcx movq %rbp, %r8 xorl %r9d, %r9d leaq 0x14(%rsp), %rax pushq %rax pushq $0x0 callq 0x41afc addq $0x10, %rsp cmpl $0x6, %edx je 0x7e436 cmpl $0x0, 0x14(%rsp) jne 0x7e3db testl %edx, %edx je 0x7e382 cmpl $0x7, %edx je 0x7e38e jmp 0x7e410 xorps %xmm0, %xmm0 cvtsi2sd %eax, %xmm0 movq %xmm0, %rax movq %rax, 0x20(%rsp) movq %rax, %xmm0 movq %r13, %rdi callq 0x88626 testl %eax, %eax jne 0x7e3c8 movq %r14, %rdi movq %r14, %rsi movq %r13, %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF xorl %r8d, %r8d callq 0x87b31 cmpl $0x1, %eax jbe 0x7e33f movq %rbx, %rdi callq 0x1cb63 movq $0x0, 0x8(%rsp) jmp 0x7e436 leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %r14 movq %r14, %rsi xorl %edx, %edx callq 0x884ee xorl %ecx, %ecx movq (%r14), %rax movabsq $-0x100000000, %r14 # imm = 0xFFFFFFFF00000000 andq %rax, %r14 movl %eax, %eax movq %rax, 0x8(%rsp) movl $0x7, %r13d jmp 0x7e444 movq 0x18(%rbx), %rdi movq %rax, %rsi callq 0x1d8c6 leaq 0x21e27(%rip), %rsi # 0xa024a movq $0x0, 0x8(%rsp) movq %rbx, %rdi xorl %eax, %eax callq 0x22567 xorl %r14d, %r14d movl $0x6, %r13d movl $0x1, %ecx movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x3faa9 movq 0x18(%rbx), %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1d8c6 movq 0x18(%rbx), %rdi movq 0x18(%rsp), %rsi movq %rbp, %rdx callq 0x1d8c6 movq 0x28(%rsp), %rax testq %rax, %rax je 0x7e48e movq 0x48(%rsp), %rsi testq %rsi, %rsi je 0x7e48e movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x50(%rsp), %rax testq %rax, %rax je 0x7e4aa movq 0x70(%rsp), %rsi testq %rsi, %rsi je 0x7e4aa movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) orq 0x8(%rsp), %r14 movq %r14, %rax movq %r13, %rdx addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_math_sumPrecise: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rbx, rdi mov rsi, [r8] mov rdx, [r8+8] xor r14d, r14d xor ecx, ecx call JS_GetIterator mov r12, rdx cmp r12d, 6 jnz short loc_7E2B0 mov r13d, 6 jmp loc_7E4AF loc_7E2B0: mov r15, rax mov rdi, [rbx+1D0h] lea rsi, [rsp+0A8h+var_80] call bf_init mov rdi, [rbx+1D0h] lea rsi, [rsp+0A8h+var_58] call bf_init mov rdi, rbx mov rsi, r15 mov rdx, r12 mov ecx, 6Bh ; 'k' mov r8, r15 mov r9, r12 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov [rsp+0A8h+var_90], rax mov rbp, rdx mov r13d, 6 cmp ebp, 6 jnz short loc_7E31F mov ecx, 1 mov [rsp+0A8h+var_A0], 0 xor r14d, r14d jmp loc_7E444 loc_7E31F: lea r14, [rsp+0A8h+var_80] mov rdi, r14 mov esi, 1 call bf_set_zero mov [rsp+0A8h+var_A0], 0 lea r13, [rsp+0A8h+var_58] loc_7E33F: mov rdi, rbx mov rsi, r15 mov rdx, r12 mov rcx, [rsp+0A8h+var_90] mov r8, rbp xor r9d, r9d lea rax, [rsp+0A8h+var_94] push rax push 0 call JS_IteratorNext add rsp, 10h cmp edx, 6 jz loc_7E436 cmp [rsp+0A8h+var_94], 0 jnz short loc_7E3DB test edx, edx jz short loc_7E382 cmp edx, 7 jz short loc_7E38E jmp loc_7E410 loc_7E382: xorps xmm0, xmm0 cvtsi2sd xmm0, eax movq rax, xmm0 loc_7E38E: mov [rsp+0A8h+var_88], rax movq xmm0, rax mov rdi, r13 call bf_set_float64 test eax, eax jnz short loc_7E3C8 mov rdi, r14 mov rsi, r14 mov rdx, r13 mov rcx, 3FFFFFFFFFFFFFFFh xor r8d, r8d call bf_add cmp eax, 1 jbe loc_7E33F loc_7E3C8: mov rdi, rbx call JS_ThrowOutOfMemory mov [rsp+0A8h+var_A0], 0 jmp short loc_7E436 loc_7E3DB: lea rdi, [rsp+0A8h+var_80] lea r14, [rsp+0A8h+var_88] mov rsi, r14 xor edx, edx call bf_get_float64 xor ecx, ecx mov rax, [r14] mov r14, 0FFFFFFFF00000000h and r14, rax mov eax, eax mov [rsp+0A8h+var_A0], rax mov r13d, 7 jmp short loc_7E444 loc_7E410: mov rdi, [rbx+18h] mov rsi, rax call JS_FreeValueRT lea rsi, aSizeIsNotANumb+9; "not a number" mov [rsp+0A8h+var_A0], 0 mov rdi, rbx xor eax, eax call JS_ThrowTypeError loc_7E436: xor r14d, r14d mov r13d, 6 mov ecx, 1 loc_7E444: mov rdi, rbx mov rsi, r15 mov rdx, r12 call JS_IteratorClose mov rdi, [rbx+18h] mov rsi, r15 mov rdx, r12 call JS_FreeValueRT mov rdi, [rbx+18h] mov rsi, [rsp+0A8h+var_90] mov rdx, rbp call JS_FreeValueRT mov rax, [rsp+0A8h+var_80] test rax, rax jz short loc_7E48E mov rsi, [rsp+0A8h+var_60] test rsi, rsi jz short loc_7E48E mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_7E48E: mov rax, [rsp+0A8h+var_58] test rax, rax jz short loc_7E4AA mov rsi, [rsp+0A8h+var_38] test rsi, rsi jz short loc_7E4AA mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_7E4AA: or r14, [rsp+0A8h+var_A0] loc_7E4AF: mov rax, r14 mov rdx, r13 add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_math_sumPrecise( 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, long long a12, long long *a13) { long long v13; // r14 _DWORD *Iterator; // rax long long v15; // rdx long long v16; // r12 _DWORD *v17; // r15 double v18; // xmm4_8 double v19; // xmm5_8 long long v20; // rdx long long v21; // rbp int v22; // ecx unsigned long long v23; // r14 _QWORD *v24; // rsi double v25; // rax long long v26; // rdx int v27; // edx int v28; // ecx int v29; // r8d int v30; // r9d long long v31; // rdx long long v32; // rcx long long v33; // r8 long long v34; // r9 __m128 v35; // xmm4 __m128 v36; // xmm5 char v38; // [rsp+0h] [rbp-A8h] long long v39; // [rsp+8h] [rbp-A0h] int v40; // [rsp+14h] [rbp-94h] BYREF _DWORD *PropertyInternal2; // [rsp+18h] [rbp-90h] double v42; // [rsp+20h] [rbp-88h] BYREF _QWORD v43[4]; // [rsp+28h] [rbp-80h] BYREF long long v44; // [rsp+48h] [rbp-60h] _QWORD v45[4]; // [rsp+50h] [rbp-58h] BYREF long long v46; // [rsp+70h] [rbp-38h] v13 = 0LL; Iterator = JS_GetIterator(a1, *a13, a13[1], 0, a2, a3, a4, a5, a6, a7, a8, a9); v16 = v15; if ( (_DWORD)v15 != 6 ) { v17 = Iterator; bf_init(*(_QWORD *)(a1 + 464), v43); bf_init(*(_QWORD *)(a1 + 464), v45); PropertyInternal2 = (_DWORD *)JS_GetPropertyInternal2(a1, (long long)v17, v16, 0x6Bu, (long long)v17, v16, 0LL, 0); v21 = v20; if ( (_DWORD)v20 == 6 ) { v22 = 1; v39 = 0LL; v23 = 0LL; } else { bf_set_zero(v43, 1LL); v39 = 0LL; while ( 1 ) { v24 = v17; v25 = COERCE_DOUBLE(JS_IteratorNext(a1, (int)v17, v16, (int)PropertyInternal2, v21, 0, 0LL, &v40)); if ( (_DWORD)v26 == 6 ) break; if ( v40 ) { bf_get_float64(v43, &v42, 0LL); v22 = 0; v23 = *(_QWORD *)&v42 & 0xFFFFFFFF00000000LL; v39 = LODWORD(v42); goto LABEL_16; } if ( (_DWORD)v26 ) { if ( (_DWORD)v26 != 7 ) { JS_FreeValueRT(*(_QWORD *)(a1 + 24), *(_DWORD **)&v25, v26); v39 = 0LL; JS_ThrowTypeError(a1, (long long)"not a number", v31, v32, v33, v34, a2, a3, a4, a5, v35, v36, a8, a9, v38); break; } } else { v25 = (double)SLODWORD(v25); } v42 = v25; a2 = (__m128)*(unsigned long long *)&v25; if ( !(unsigned int)bf_set_float64(v45, v25) ) { v24 = v43; if ( (unsigned int)bf_add(v43, v43, v45, 0x3FFFFFFFFFFFFFFFLL, 0LL) <= 1 ) continue; } JS_ThrowOutOfMemory(a1, (long long)v24, v27, v28, v29, v30); v39 = 0LL; break; } v23 = 0LL; v22 = 1; } LABEL_16: JS_IteratorClose(a1, (long long)v17, v16, v22, a2, a3, a4, a5, v18, v19, a8, a9); JS_FreeValueRT(*(_QWORD *)(a1 + 24), v17, v16); JS_FreeValueRT(*(_QWORD *)(a1 + 24), PropertyInternal2, v21); if ( v43[0] && v44 ) (*(void ( **)(_QWORD, long long, _QWORD))(v43[0] + 8LL))(*(_QWORD *)v43[0], v44, 0LL); if ( v45[0] && v46 ) (*(void ( **)(_QWORD, long long, _QWORD))(v45[0] + 8LL))(*(_QWORD *)v45[0], v46, 0LL); return v39 | v23; } return v13; }
js_math_sumPrecise: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RBX,RDI MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] XOR R14D,R14D XOR ECX,ECX CALL 0x0014180b MOV R12,RDX CMP R12D,0x6 JNZ 0x0017e2b0 MOV R13D,0x6 JMP 0x0017e4af LAB_0017e2b0: MOV R15,RAX MOV RDI,qword ptr [RBX + 0x1d0] LEA RSI,[RSP + 0x28] CALL 0x00184a50 MOV RDI,qword ptr [RBX + 0x1d0] LEA RSI,[RSP + 0x50] CALL 0x00184a50 MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 MOV ECX,0x6b MOV R8,R15 MOV R9,R12 PUSH 0x0 PUSH 0x0 CALL 0x00122fa3 ADD RSP,0x10 MOV qword ptr [RSP + 0x18],RAX MOV RBP,RDX MOV R13D,0x6 CMP EBP,0x6 JNZ 0x0017e31f MOV ECX,0x1 MOV qword ptr [RSP + 0x8],0x0 XOR R14D,R14D JMP 0x0017e444 LAB_0017e31f: LEA R14,[RSP + 0x28] MOV RDI,R14 MOV ESI,0x1 CALL 0x00184c03 MOV qword ptr [RSP + 0x8],0x0 LEA R13,[RSP + 0x50] LAB_0017e33f: MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 MOV RCX,qword ptr [RSP + 0x18] MOV R8,RBP XOR R9D,R9D LEA RAX,[RSP + 0x14] PUSH RAX PUSH 0x0 CALL 0x00141afc ADD RSP,0x10 CMP EDX,0x6 JZ 0x0017e436 CMP dword ptr [RSP + 0x14],0x0 JNZ 0x0017e3db TEST EDX,EDX JZ 0x0017e382 CMP EDX,0x7 JZ 0x0017e38e JMP 0x0017e410 LAB_0017e382: XORPS XMM0,XMM0 CVTSI2SD XMM0,EAX MOVQ RAX,XMM0 LAB_0017e38e: MOV qword ptr [RSP + 0x20],RAX MOVQ XMM0,RAX MOV RDI,R13 CALL 0x00188626 TEST EAX,EAX JNZ 0x0017e3c8 MOV RDI,R14 MOV RSI,R14 MOV RDX,R13 MOV RCX,0x3fffffffffffffff XOR R8D,R8D CALL 0x00187b31 CMP EAX,0x1 JBE 0x0017e33f LAB_0017e3c8: MOV RDI,RBX CALL 0x0011cb63 MOV qword ptr [RSP + 0x8],0x0 JMP 0x0017e436 LAB_0017e3db: LEA RDI,[RSP + 0x28] LEA R14,[RSP + 0x20] MOV RSI,R14 XOR EDX,EDX CALL 0x001884ee XOR ECX,ECX MOV RAX,qword ptr [R14] MOV R14,-0x100000000 AND R14,RAX MOV EAX,EAX MOV qword ptr [RSP + 0x8],RAX MOV R13D,0x7 JMP 0x0017e444 LAB_0017e410: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,RAX CALL 0x0011d8c6 LEA RSI,[0x1a024a] MOV qword ptr [RSP + 0x8],0x0 MOV RDI,RBX XOR EAX,EAX CALL 0x00122567 LAB_0017e436: XOR R14D,R14D MOV R13D,0x6 MOV ECX,0x1 LAB_0017e444: MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 CALL 0x0013faa9 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R15 MOV RDX,R12 CALL 0x0011d8c6 MOV RDI,qword ptr [RBX + 0x18] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,RBP CALL 0x0011d8c6 MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX JZ 0x0017e48e MOV RSI,qword ptr [RSP + 0x48] TEST RSI,RSI JZ 0x0017e48e MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0017e48e: MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x0017e4aa MOV RSI,qword ptr [RSP + 0x70] TEST RSI,RSI JZ 0x0017e4aa MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_0017e4aa: OR R14,qword ptr [RSP + 0x8] LAB_0017e4af: MOV RAX,R14 MOV RDX,R13 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_math_sumPrecise(long param_1) { int iVar1; uint uVar2; int8 uVar3; int8 uVar4; int8 *in_R8; int8 uVar6; ulong uVar7; double dVar8; int1 auVar9 [12]; int1 auVar10 [16]; ulong local_a0; int local_94; int8 local_90; double local_88; int8 *local_80 [4]; long local_60; int8 *local_58 [4]; long local_38; int8 uVar5; uVar7 = 0; auVar10 = JS_GetIterator(param_1,*in_R8,in_R8[1],0); uVar5 = auVar10._8_8_; uVar3 = auVar10._0_8_; if (auVar10._8_4_ == 6) { uVar6 = 6; } else { bf_init(*(int8 *)(param_1 + 0x1d0),local_80); bf_init(*(int8 *)(param_1 + 0x1d0),local_58); auVar10 = JS_GetPropertyInternal2(param_1,uVar3,uVar5,0x6b,uVar3,uVar5,0,0); local_90 = auVar10._0_8_; uVar6 = 6; if (auVar10._8_4_ == 6) { uVar4 = 1; local_a0 = 0; uVar7 = 0; } else { bf_set_zero(local_80,1); do { auVar9 = JS_IteratorNext(param_1,uVar3,uVar5,local_90,auVar10._8_8_,0,0,&local_94); iVar1 = auVar9._8_4_; dVar8 = auVar9._0_8_; if (iVar1 == 6) goto LAB_0017e436; if (local_94 != 0) { bf_get_float64(local_80,&local_88,0); uVar4 = 0; uVar7 = (ulong)local_88 & 0xffffffff00000000; local_a0 = (ulong)local_88 & 0xffffffff; uVar6 = 7; goto LAB_0017e444; } if (iVar1 == 0) { dVar8 = (double)auVar9._0_4_; } else if (iVar1 != 7) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),dVar8); JS_ThrowTypeError(param_1,"not a number"); goto LAB_0017e436; } local_88 = dVar8; iVar1 = bf_set_float64(dVar8,local_58); if (iVar1 != 0) break; uVar2 = bf_add(local_80,local_80,local_58,0x3fffffffffffffff,0); } while (uVar2 < 2); JS_ThrowOutOfMemory(param_1); LAB_0017e436: local_a0 = 0; uVar7 = 0; uVar6 = 6; uVar4 = 1; } LAB_0017e444: JS_IteratorClose(param_1,uVar3,uVar5,uVar4); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar3,uVar5); JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_90,auVar10._8_8_); if ((local_80[0] != (int8 *)0x0) && (local_60 != 0)) { (*(code *)local_80[0][1])(*local_80[0],local_60,0); } if ((local_58[0] != (int8 *)0x0) && (local_38 != 0)) { (*(code *)local_58[0][1])(*local_58[0],local_38,0); } uVar7 = uVar7 | local_a0; } auVar10._8_8_ = uVar6; auVar10._0_8_ = uVar7; return auVar10; }
50,325
js_math_sumPrecise
bluesky950520[P]quickjs/quickjs.c
static JSValue js_math_sumPrecise(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue iter, next, item, ret; bf_t a, b; BOOL done; double d; int r; iter = JS_GetIterator(ctx, argv[0], /*async*/FALSE); if (JS_IsException(iter)) return JS_EXCEPTION; bf_init(ctx->bf_ctx, &a); bf_init(ctx->bf_ctx, &b); ret = JS_EXCEPTION; next = JS_GetProperty(ctx, iter, JS_ATOM_next); if (JS_IsException(next)) goto fail; bf_set_zero(&a, /*is_neg*/TRUE); for (;;) { item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done); if (JS_IsException(item)) goto fail; if (done) break; // item == JS_UNDEFINED switch (JS_VALUE_GET_TAG(item)) { default: JS_FreeValue(ctx, item); JS_ThrowTypeError(ctx, "not a number"); goto fail; case JS_TAG_INT: d = JS_VALUE_GET_INT(item); break; case JS_TAG_FLOAT64: d = JS_VALUE_GET_FLOAT64(item); break; } if (bf_set_float64(&b, d)) goto oom; // Infinity + -Infinity results in BF_ST_INVALID_OP, sets |a| to nan if ((r = bf_add(&a, &a, &b, BF_PREC_INF, BF_RNDN))) if (r != BF_ST_INVALID_OP) goto oom; } bf_get_float64(&a, &d, BF_RNDN); // return value deliberately ignored ret = js_float64(d); fail: JS_IteratorClose(ctx, iter, JS_IsException(ret)); JS_FreeValue(ctx, iter); JS_FreeValue(ctx, next); bf_delete(&a); bf_delete(&b); return ret; oom: JS_ThrowOutOfMemory(ctx); goto fail; }
O2
c
js_math_sumPrecise: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdi, %rbx movq (%r8), %rsi movq 0x8(%r8), %rdx xorl %r12d, %r12d xorl %ecx, %ecx callq 0x39687 movq %rdx, %r15 cmpl $0x6, %r15d jne 0x69e4a pushq $0x6 popq %r13 jmp 0x69fec movq %rax, %r14 movq 0x1d0(%rbx), %rdi leaq 0x28(%rsp), %rsi callq 0x6f4f2 movq 0x1d0(%rbx), %rdi leaq 0x50(%rsp), %rsi callq 0x6f4f2 pushq $0x6b popq %rcx movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1b043 movq %rax, 0x18(%rsp) pushq $0x6 popq %r13 movq %rdx, 0x10(%rsp) cmpl $0x6, %edx jne 0x69ea0 pushq $0x1 popq %rbp xorl %r12d, %r12d xorl %eax, %eax jmp 0x69fa5 leaq 0x28(%rsp), %r13 pushq $0x1 popq %rsi movq %r13, %rdi callq 0x6f612 xorl %r12d, %r12d leaq 0x50(%rsp), %rbp movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movq 0x18(%rsp), %rcx movq 0x10(%rsp), %r8 xorl %r9d, %r9d leaq 0xc(%rsp), %rax pushq %rax pushq $0x0 callq 0x398cc addq $0x10, %rsp cmpl $0x6, %edx je 0x69f9c cmpl $0x0, 0xc(%rsp) jne 0x69f4d testl %edx, %edx je 0x69efd cmpl $0x7, %edx je 0x69f06 jmp 0x69f7d cvtsi2sd %eax, %xmm0 movq %xmm0, %rax movq %rax, 0x20(%rsp) movq %rax, %xmm0 movq %rbp, %rdi callq 0x724d7 testl %eax, %eax jne 0x69f40 movq %r13, %rdi movq %r13, %rsi movq %rbp, %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF xorl %r8d, %r8d callq 0x71c49 cmpl $0x1, %eax jbe 0x69eb8 movq %rbx, %rdi callq 0x171e0 xorl %r12d, %r12d jmp 0x69f9c leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %r12 xorl %ebp, %ebp movq %r12, %rsi xorl %edx, %edx callq 0x723c2 movq (%r12), %rcx movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 andq %rcx, %rax movl %ecx, %r12d pushq $0x7 popq %r13 jmp 0x69fa5 movq %rbx, %rdi movq %rax, %rsi callq 0x1801e leaq 0x1d1f5(%rip), %rsi # 0x87184 xorl %r12d, %r12d movq %rbx, %rdi xorl %eax, %eax callq 0x1c64d xorl %eax, %eax pushq $0x6 popq %r13 pushq $0x1 popq %rbp orq %rax, %r12 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movl %ebp, %ecx callq 0x37d41 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1801e movq %rbx, %rdi movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdx callq 0x1801e leaq 0x28(%rsp), %rdi callq 0x352f0 leaq 0x50(%rsp), %rdi callq 0x352f0 movq %r12, %rax movq %r13, %rdx addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_math_sumPrecise: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov rbx, rdi mov rsi, [r8] mov rdx, [r8+8] xor r12d, r12d xor ecx, ecx call JS_GetIterator mov r15, rdx cmp r15d, 6 jnz short loc_69E4A push 6 pop r13 jmp loc_69FEC loc_69E4A: mov r14, rax mov rdi, [rbx+1D0h] lea rsi, [rsp+0A8h+var_80] call bf_init mov rdi, [rbx+1D0h] lea rsi, [rsp+0A8h+var_58] call bf_init push 6Bh ; 'k' pop rcx mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_GetProperty mov [rsp+0A8h+var_90], rax push 6 pop r13 mov [rsp+0A8h+var_98], rdx cmp edx, 6 jnz short loc_69EA0 push 1 pop rbp xor r12d, r12d xor eax, eax jmp loc_69FA5 loc_69EA0: lea r13, [rsp+0A8h+var_80] push 1 pop rsi mov rdi, r13 call bf_set_zero xor r12d, r12d lea rbp, [rsp+0A8h+var_58] loc_69EB8: mov rdi, rbx mov rsi, r14 mov rdx, r15 mov rcx, [rsp+0A8h+var_90] mov r8, [rsp+0A8h+var_98] xor r9d, r9d lea rax, [rsp+0A8h+var_9C] push rax push 0 call JS_IteratorNext add rsp, 10h cmp edx, 6 jz loc_69F9C cmp [rsp+0A8h+var_9C], 0 jnz short loc_69F4D test edx, edx jz short loc_69EFD cmp edx, 7 jz short loc_69F06 jmp loc_69F7D loc_69EFD: cvtsi2sd xmm0, eax movq rax, xmm0 loc_69F06: mov [rsp+0A8h+var_88], rax movq xmm0, rax mov rdi, rbp call bf_set_float64 test eax, eax jnz short loc_69F40 mov rdi, r13 mov rsi, r13 mov rdx, rbp mov rcx, 3FFFFFFFFFFFFFFFh xor r8d, r8d call bf_add cmp eax, 1 jbe loc_69EB8 loc_69F40: mov rdi, rbx call JS_ThrowOutOfMemory xor r12d, r12d jmp short loc_69F9C loc_69F4D: lea rdi, [rsp+0A8h+var_80] lea r12, [rsp+0A8h+var_88] xor ebp, ebp mov rsi, r12 xor edx, edx call bf_get_float64 mov rcx, [r12] mov rax, 0FFFFFFFF00000000h and rax, rcx mov r12d, ecx push 7 pop r13 jmp short loc_69FA5 loc_69F7D: mov rdi, rbx mov rsi, rax call JS_FreeValue lea rsi, aSizeIsNotANumb+9; "not a number" xor r12d, r12d mov rdi, rbx xor eax, eax call JS_ThrowTypeError loc_69F9C: xor eax, eax push 6 pop r13 push 1 pop rbp loc_69FA5: or r12, rax mov rdi, rbx mov rsi, r14 mov rdx, r15 mov ecx, ebp call JS_IteratorClose mov rdi, rbx mov rsi, r14 mov rdx, r15 call JS_FreeValue mov rdi, rbx mov rsi, [rsp+0A8h+var_90] mov rdx, [rsp+0A8h+var_98] call JS_FreeValue lea rdi, [rsp+0A8h+var_80] call bf_delete lea rdi, [rsp+0A8h+var_58] call bf_delete loc_69FEC: mov rax, r12 mov rdx, r13 add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_math_sumPrecise( 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, long long a12, long long *a13) { unsigned long long v13; // r12 _DWORD *Iterator; // rax long long v15; // rdx long long v16; // r15 long long v17; // r14 double v18; // xmm4_8 double v19; // xmm5_8 long long v20; // rdx int v21; // ebp long long v22; // r12 unsigned long long v23; // rax long long *v24; // rsi double v25; // rax long long v26; // rdx int v27; // edx int v28; // ecx int v29; // r8d int v30; // r9d long long v31; // rdx long long v32; // rcx long long v33; // r8 long long v34; // r9 __m128 v35; // xmm4 __m128 v36; // xmm5 char v38; // [rsp+0h] [rbp-A8h] int v39; // [rsp+Ch] [rbp-9Ch] BYREF long long v40; // [rsp+10h] [rbp-98h] long long Property; // [rsp+18h] [rbp-90h] double v42; // [rsp+20h] [rbp-88h] BYREF long long v43[5]; // [rsp+28h] [rbp-80h] BYREF long long v44[11]; // [rsp+50h] [rbp-58h] BYREF v13 = 0LL; Iterator = JS_GetIterator(a1, *a13, a13[1], 0, a2, a3, a4, a5, a6, a7, a8, a9); v16 = v15; if ( (_DWORD)v15 != 6 ) { v17 = (long long)Iterator; bf_init(*(_QWORD *)(a1 + 464), v43); bf_init(*(_QWORD *)(a1 + 464), v44); Property = JS_GetProperty(a1, v17, v16, 107); v40 = v20; if ( (_DWORD)v20 == 6 ) { v21 = 1; v22 = 0LL; v23 = 0LL; } else { bf_set_zero(v43, 1LL); v22 = 0LL; while ( 1 ) { v24 = (long long *)v17; v25 = COERCE_DOUBLE(JS_IteratorNext(a1, v17, v16, Property, v40, 0, 0LL, &v39)); if ( (_DWORD)v26 == 6 ) break; if ( v39 ) { v21 = 0; bf_get_float64(v43, &v42, 0LL); v23 = *(_QWORD *)&v42 & 0xFFFFFFFF00000000LL; v22 = LODWORD(v42); goto LABEL_16; } if ( (_DWORD)v26 ) { if ( (_DWORD)v26 != 7 ) { JS_FreeValue(a1, *(long long *)&v25, v26); v22 = 0LL; JS_ThrowTypeError(a1, (long long)"not a number", v31, v32, v33, v34, a2, a3, a4, a5, v35, v36, a8, a9, v38); break; } } else { v25 = (double)SLODWORD(v25); } v42 = v25; a2 = (__m128)*(unsigned long long *)&v25; if ( !(unsigned int)bf_set_float64(v44, v25) ) { v24 = v43; if ( (unsigned int)bf_add(v43, v43, v44, 0x3FFFFFFFFFFFFFFFLL, 0LL) <= 1 ) continue; } JS_ThrowOutOfMemory(a1, (long long)v24, v27, v28, v29, v30); v22 = 0LL; break; } v23 = 0LL; v21 = 1; } LABEL_16: v13 = v23 | v22; JS_IteratorClose(a1, v17, v16, v21, a2, a3, a4, a5, v18, v19, a8, a9); JS_FreeValue(a1, v17, v16); JS_FreeValue(a1, Property, v40); bf_delete(v43); bf_delete(v44); } return v13; }
js_math_sumPrecise: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV RBX,RDI MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] XOR R12D,R12D XOR ECX,ECX CALL 0x00139687 MOV R15,RDX CMP R15D,0x6 JNZ 0x00169e4a PUSH 0x6 POP R13 JMP 0x00169fec LAB_00169e4a: MOV R14,RAX MOV RDI,qword ptr [RBX + 0x1d0] LEA RSI,[RSP + 0x28] CALL 0x0016f4f2 MOV RDI,qword ptr [RBX + 0x1d0] LEA RSI,[RSP + 0x50] CALL 0x0016f4f2 PUSH 0x6b POP RCX MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0011b043 MOV qword ptr [RSP + 0x18],RAX PUSH 0x6 POP R13 MOV qword ptr [RSP + 0x10],RDX CMP EDX,0x6 JNZ 0x00169ea0 PUSH 0x1 POP RBP XOR R12D,R12D XOR EAX,EAX JMP 0x00169fa5 LAB_00169ea0: LEA R13,[RSP + 0x28] PUSH 0x1 POP RSI MOV RDI,R13 CALL 0x0016f612 XOR R12D,R12D LEA RBP,[RSP + 0x50] LAB_00169eb8: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV RCX,qword ptr [RSP + 0x18] MOV R8,qword ptr [RSP + 0x10] XOR R9D,R9D LEA RAX,[RSP + 0xc] PUSH RAX PUSH 0x0 CALL 0x001398cc ADD RSP,0x10 CMP EDX,0x6 JZ 0x00169f9c CMP dword ptr [RSP + 0xc],0x0 JNZ 0x00169f4d TEST EDX,EDX JZ 0x00169efd CMP EDX,0x7 JZ 0x00169f06 JMP 0x00169f7d LAB_00169efd: CVTSI2SD XMM0,EAX MOVQ RAX,XMM0 LAB_00169f06: MOV qword ptr [RSP + 0x20],RAX MOVQ XMM0,RAX MOV RDI,RBP CALL 0x001724d7 TEST EAX,EAX JNZ 0x00169f40 MOV RDI,R13 MOV RSI,R13 MOV RDX,RBP MOV RCX,0x3fffffffffffffff XOR R8D,R8D CALL 0x00171c49 CMP EAX,0x1 JBE 0x00169eb8 LAB_00169f40: MOV RDI,RBX CALL 0x001171e0 XOR R12D,R12D JMP 0x00169f9c LAB_00169f4d: LEA RDI,[RSP + 0x28] LEA R12,[RSP + 0x20] XOR EBP,EBP MOV RSI,R12 XOR EDX,EDX CALL 0x001723c2 MOV RCX,qword ptr [R12] MOV RAX,-0x100000000 AND RAX,RCX MOV R12D,ECX PUSH 0x7 POP R13 JMP 0x00169fa5 LAB_00169f7d: MOV RDI,RBX MOV RSI,RAX CALL 0x0011801e LEA RSI,[0x187184] XOR R12D,R12D MOV RDI,RBX XOR EAX,EAX CALL 0x0011c64d LAB_00169f9c: XOR EAX,EAX PUSH 0x6 POP R13 PUSH 0x1 POP RBP LAB_00169fa5: OR R12,RAX MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV ECX,EBP CALL 0x00137d41 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0011801e MOV RDI,RBX MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x10] CALL 0x0011801e LEA RDI,[RSP + 0x28] CALL 0x001352f0 LEA RDI,[RSP + 0x50] CALL 0x001352f0 LAB_00169fec: MOV RAX,R12 MOV RDX,R13 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_math_sumPrecise(long param_1) { int iVar1; uint uVar2; ulong uVar4; int8 uVar6; int8 *in_R8; ulong uVar7; int8 uVar8; double dVar9; int1 auVar10 [16]; int1 auVar11 [16]; int1 auVar12 [12]; int local_9c; int8 local_98; int8 local_90; double local_88; int1 local_80 [40]; int1 local_58 [40]; int8 uVar3; int8 uVar5; uVar7 = 0; auVar10 = JS_GetIterator(param_1,*in_R8,in_R8[1],0); uVar5 = auVar10._8_8_; uVar3 = auVar10._0_8_; if (auVar10._8_4_ == 6) { uVar8 = 6; } else { bf_init(*(int8 *)(param_1 + 0x1d0),local_80); bf_init(*(int8 *)(param_1 + 0x1d0),local_58); auVar10 = JS_GetProperty(param_1,uVar3,uVar5,0x6b); local_98 = auVar10._8_8_; local_90 = auVar10._0_8_; uVar8 = 6; if (auVar10._8_4_ == 6) { uVar6 = 1; uVar7 = 0; uVar4 = 0; } else { bf_set_zero(local_80,1); do { auVar12 = JS_IteratorNext(param_1,uVar3,uVar5,local_90,local_98,0,0,&local_9c); iVar1 = auVar12._8_4_; dVar9 = auVar12._0_8_; if (iVar1 == 6) goto LAB_00169f9c; if (local_9c != 0) { uVar6 = 0; bf_get_float64(local_80,&local_88,0); auVar10._8_8_ = local_98; auVar10._0_8_ = local_90; uVar4 = (ulong)local_88 & 0xffffffff00000000; uVar7 = (ulong)local_88 & 0xffffffff; uVar8 = 7; goto LAB_00169fa5; } if (iVar1 == 0) { dVar9 = (double)auVar12._0_4_; } else if (iVar1 != 7) { JS_FreeValue(param_1,dVar9); JS_ThrowTypeError(param_1,"not a number"); goto LAB_00169f9c; } local_88 = dVar9; iVar1 = bf_set_float64(dVar9,local_58); if (iVar1 != 0) break; uVar2 = bf_add(local_80,local_80,local_58,0x3fffffffffffffff,0); } while (uVar2 < 2); JS_ThrowOutOfMemory(param_1); LAB_00169f9c: auVar10._8_8_ = local_98; auVar10._0_8_ = local_90; uVar7 = 0; uVar4 = 0; uVar8 = 6; uVar6 = 1; } LAB_00169fa5: local_98 = auVar10._8_8_; local_90 = auVar10._0_8_; uVar7 = uVar7 | uVar4; JS_IteratorClose(param_1,uVar3,uVar5,uVar6); JS_FreeValue(param_1,uVar3,uVar5); JS_FreeValue(param_1,local_90,local_98); bf_delete(local_80); bf_delete(local_58); } auVar11._8_8_ = uVar8; auVar11._0_8_ = uVar7; return auVar11; }
50,326
js_math_sumPrecise
bluesky950520[P]quickjs/quickjs.c
static JSValue js_math_sumPrecise(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { JSValue iter, next, item, ret; bf_t a, b; BOOL done; double d; int r; iter = JS_GetIterator(ctx, argv[0], /*async*/FALSE); if (JS_IsException(iter)) return JS_EXCEPTION; bf_init(ctx->bf_ctx, &a); bf_init(ctx->bf_ctx, &b); ret = JS_EXCEPTION; next = JS_GetProperty(ctx, iter, JS_ATOM_next); if (JS_IsException(next)) goto fail; bf_set_zero(&a, /*is_neg*/TRUE); for (;;) { item = JS_IteratorNext(ctx, iter, next, 0, NULL, &done); if (JS_IsException(item)) goto fail; if (done) break; // item == JS_UNDEFINED switch (JS_VALUE_GET_TAG(item)) { default: JS_FreeValue(ctx, item); JS_ThrowTypeError(ctx, "not a number"); goto fail; case JS_TAG_INT: d = JS_VALUE_GET_INT(item); break; case JS_TAG_FLOAT64: d = JS_VALUE_GET_FLOAT64(item); break; } if (bf_set_float64(&b, d)) goto oom; // Infinity + -Infinity results in BF_ST_INVALID_OP, sets |a| to nan if ((r = bf_add(&a, &a, &b, BF_PREC_INF, BF_RNDN))) if (r != BF_ST_INVALID_OP) goto oom; } bf_get_float64(&a, &d, BF_RNDN); // return value deliberately ignored ret = js_float64(d); fail: JS_IteratorClose(ctx, iter, JS_IsException(ret)); JS_FreeValue(ctx, iter); JS_FreeValue(ctx, next); bf_delete(&a); bf_delete(&b); return ret; oom: JS_ThrowOutOfMemory(ctx); goto fail; }
O3
c
js_math_sumPrecise: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movq %rdi, %r14 movq (%r8), %rsi movq 0x8(%r8), %rdx xorl %ebx, %ebx xorl %ecx, %ecx callq 0x43211 movq %rdx, %r12 cmpl $0x6, %r12d jne 0x80dbb movl $0x6, %r13d jmp 0x80ff3 movq %rax, %r15 movq 0x1d0(%r14), %rdi leaq 0x28(%rsp), %rsi callq 0x87499 movq 0x1d0(%r14), %rdi leaq 0x50(%rsp), %rsi callq 0x87499 movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx movl $0x6b, %ecx movq %r15, %r8 movq %r12, %r9 pushq $0x0 pushq $0x0 callq 0x2384b addq $0x10, %rsp movq %rax, 0x10(%rsp) movq %rdx, %rbp movl $0x6, %r13d cmpl $0x6, %ebp jne 0x80e29 movl $0x1, %ecx movq $0x0, 0x8(%rsp) xorl %ebx, %ebx jmp 0x80f5e leaq 0x28(%rsp), %rbx movq %rbx, %rdi movl $0x1, %esi callq 0x8764c movq $0x0, 0x8(%rsp) leaq 0x50(%rsp), %r13 movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx movq 0x10(%rsp), %rcx movq %rbp, %r8 xorl %r9d, %r9d leaq 0x1c(%rsp), %rax pushq %rax pushq $0x0 callq 0x4360a addq $0x10, %rsp cmpl $0x6, %edx je 0x80f51 cmpl $0x0, 0x1c(%rsp) jne 0x80ee5 testl %edx, %edx je 0x80e8c cmpl $0x7, %edx je 0x80e98 jmp 0x80f1a xorps %xmm0, %xmm0 cvtsi2sd %eax, %xmm0 movq %xmm0, %rax movq %rax, 0x20(%rsp) movq %rax, %xmm0 movq %r13, %rdi callq 0x8b1c6 testl %eax, %eax jne 0x80ed2 movq %rbx, %rdi movq %rbx, %rsi movq %r13, %rdx movabsq $0x3fffffffffffffff, %rcx # imm = 0x3FFFFFFFFFFFFFFF xorl %r8d, %r8d callq 0x8a630 cmpl $0x1, %eax jbe 0x80e49 movq %r14, %rdi callq 0x1d44b movq $0x0, 0x8(%rsp) jmp 0x80f51 leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %rbx movq %rbx, %rsi xorl %edx, %edx callq 0x8b089 xorl %ecx, %ecx movq (%rbx), %rax movabsq $-0x100000000, %rbx # imm = 0xFFFFFFFF00000000 andq %rax, %rbx movl %eax, %eax movq %rax, 0x8(%rsp) movl $0x7, %r13d jmp 0x80f5e cmpl $-0x9, %edx jb 0x80f37 movq 0x18(%r14), %rdi movl (%rax), %ecx leal -0x1(%rcx), %esi movl %esi, (%rax) cmpl $0x1, %ecx jg 0x80f37 movq %rax, %rsi callq 0x219cc leaq 0x222b6(%rip), %rsi # 0xa31f4 movq $0x0, 0x8(%rsp) movq %r14, %rdi xorl %eax, %eax callq 0x22d8b xorl %ebx, %ebx movl $0x6, %r13d movl $0x1, %ecx movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x41301 movq 0x18(%r14), %rdi cmpl $-0x9, %r12d jb 0x80f93 movl (%r15), %eax leal -0x1(%rax), %ecx movl %ecx, (%r15) cmpl $0x1, %eax jg 0x80f93 movq %r15, %rsi movq %r12, %rdx callq 0x219cc movq 0x18(%r14), %rdi cmpl $-0x9, %ebp jb 0x80fb6 movq 0x10(%rsp), %rdx movl (%rdx), %eax leal -0x1(%rax), %ecx movl %ecx, (%rdx) cmpl $0x1, %eax jg 0x80fb6 movq 0x10(%rsp), %rsi movq %rbp, %rdx callq 0x219cc movq 0x28(%rsp), %rax testq %rax, %rax je 0x80fd2 movq 0x48(%rsp), %rsi testq %rsi, %rsi je 0x80fd2 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movq 0x50(%rsp), %rax testq %rax, %rax je 0x80fee movq 0x70(%rsp), %rsi testq %rsi, %rsi je 0x80fee movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) orq 0x8(%rsp), %rbx movq %rbx, %rax movq %r13, %rdx addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_math_sumPrecise: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h mov r14, rdi mov rsi, [r8] mov rdx, [r8+8] xor ebx, ebx xor ecx, ecx call JS_GetIterator mov r12, rdx cmp r12d, 6 jnz short loc_80DBB mov r13d, 6 jmp loc_80FF3 loc_80DBB: mov r15, rax mov rdi, [r14+1D0h] lea rsi, [rsp+0A8h+var_80] call bf_init mov rdi, [r14+1D0h] lea rsi, [rsp+0A8h+var_58] call bf_init mov rdi, r14 mov rsi, r15 mov rdx, r12 mov ecx, 6Bh ; 'k' mov r8, r15 mov r9, r12 push 0 push 0 call JS_GetPropertyInternal2 add rsp, 10h mov [rsp+0A8h+var_98], rax mov rbp, rdx mov r13d, 6 cmp ebp, 6 jnz short loc_80E29 mov ecx, 1 mov [rsp+0A8h+var_A0], 0 xor ebx, ebx jmp loc_80F5E loc_80E29: lea rbx, [rsp+0A8h+var_80] mov rdi, rbx mov esi, 1 call bf_set_zero mov [rsp+0A8h+var_A0], 0 lea r13, [rsp+0A8h+var_58] loc_80E49: mov rdi, r14 mov rsi, r15 mov rdx, r12 mov rcx, [rsp+0A8h+var_98] mov r8, rbp xor r9d, r9d lea rax, [rsp+0A8h+var_8C] push rax push 0 call JS_IteratorNext add rsp, 10h cmp edx, 6 jz loc_80F51 cmp [rsp+0A8h+var_8C], 0 jnz short loc_80EE5 test edx, edx jz short loc_80E8C cmp edx, 7 jz short loc_80E98 jmp loc_80F1A loc_80E8C: xorps xmm0, xmm0 cvtsi2sd xmm0, eax movq rax, xmm0 loc_80E98: mov [rsp+0A8h+var_88], rax movq xmm0, rax mov rdi, r13 call bf_set_float64 test eax, eax jnz short loc_80ED2 mov rdi, rbx mov rsi, rbx mov rdx, r13 mov rcx, 3FFFFFFFFFFFFFFFh xor r8d, r8d call bf_add cmp eax, 1 jbe loc_80E49 loc_80ED2: mov rdi, r14 call JS_ThrowOutOfMemory mov [rsp+0A8h+var_A0], 0 jmp short loc_80F51 loc_80EE5: lea rdi, [rsp+0A8h+var_80] lea rbx, [rsp+0A8h+var_88] mov rsi, rbx xor edx, edx call bf_get_float64 xor ecx, ecx mov rax, [rbx] mov rbx, 0FFFFFFFF00000000h and rbx, rax mov eax, eax mov [rsp+0A8h+var_A0], rax mov r13d, 7 jmp short loc_80F5E loc_80F1A: cmp edx, 0FFFFFFF7h jb short loc_80F37 mov rdi, [r14+18h] mov ecx, [rax] lea esi, [rcx-1] mov [rax], esi cmp ecx, 1 jg short loc_80F37 mov rsi, rax call js_free_value_rt loc_80F37: lea rsi, aSizeIsNotANumb+9; "not a number" mov [rsp+0A8h+var_A0], 0 mov rdi, r14 xor eax, eax call JS_ThrowTypeError loc_80F51: xor ebx, ebx mov r13d, 6 mov ecx, 1 loc_80F5E: mov rdi, r14 mov rsi, r15 mov rdx, r12 call JS_IteratorClose mov rdi, [r14+18h] cmp r12d, 0FFFFFFF7h jb short loc_80F93 mov eax, [r15] lea ecx, [rax-1] mov [r15], ecx cmp eax, 1 jg short loc_80F93 mov rsi, r15 mov rdx, r12 call js_free_value_rt mov rdi, [r14+18h] loc_80F93: cmp ebp, 0FFFFFFF7h jb short loc_80FB6 mov rdx, [rsp+0A8h+var_98] mov eax, [rdx] lea ecx, [rax-1] mov [rdx], ecx cmp eax, 1 jg short loc_80FB6 mov rsi, [rsp+0A8h+var_98] mov rdx, rbp call js_free_value_rt loc_80FB6: mov rax, [rsp+0A8h+var_80] test rax, rax jz short loc_80FD2 mov rsi, [rsp+0A8h+var_60] test rsi, rsi jz short loc_80FD2 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_80FD2: mov rax, [rsp+0A8h+var_58] test rax, rax jz short loc_80FEE mov rsi, [rsp+0A8h+var_38] test rsi, rsi jz short loc_80FEE mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_80FEE: or rbx, [rsp+0A8h+var_A0] loc_80FF3: mov rax, rbx mov rdx, r13 add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long js_math_sumPrecise( 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, long long a12, long long *a13) { long long v14; // rbx _QWORD *Iterator; // rax long long v16; // rdx long long v17; // r12 _QWORD *v18; // r15 __m128 v19; // xmm4 __m128 v20; // xmm5 unsigned int v21; // edx unsigned int v22; // ebp int v23; // ecx unsigned long long v24; // rbx _QWORD *v25; // rsi double v26; // rax long long v27; // rdx long long v28; // rcx long long v29; // r8 long long v30; // r9 int v31; // edx int v32; // ecx int v33; // r8d int v34; // r9d long long v35; // rdi long long v36; // rdi int v37; // eax int v38; // eax char v40; // [rsp+0h] [rbp-A8h] long long v41; // [rsp+8h] [rbp-A0h] _QWORD *PropertyInternal2; // [rsp+10h] [rbp-98h] int v43; // [rsp+1Ch] [rbp-8Ch] BYREF double v44; // [rsp+20h] [rbp-88h] BYREF _QWORD v45[4]; // [rsp+28h] [rbp-80h] BYREF long long v46; // [rsp+48h] [rbp-60h] _QWORD v47[4]; // [rsp+50h] [rbp-58h] BYREF long long v48; // [rsp+70h] [rbp-38h] v14 = 0LL; Iterator = JS_GetIterator(a1, *a13, a13[1], 0, a2, a3, a4, a5, a6, a7, a8, a9); v17 = v16; if ( (_DWORD)v16 != 6 ) { v18 = Iterator; bf_init(*(_QWORD *)(a1 + 464), v45); bf_init(*(_QWORD *)(a1 + 464), v47); PropertyInternal2 = (_QWORD *)JS_GetPropertyInternal2(a1, (long long)v18, v17, 0x6Bu, (long long)v18, v17, 0LL, 0); v22 = v21; if ( v21 == 6 ) { v23 = 1; v41 = 0LL; v24 = 0LL; } else { bf_set_zero(v45, 1LL); v41 = 0LL; while ( 1 ) { v25 = v18; v26 = COERCE_DOUBLE(JS_IteratorNext(a1, (int)v18, v17, (int)PropertyInternal2, v22, 0, 0LL, &v43)); if ( (_DWORD)v27 == 6 ) break; if ( v43 ) { bf_get_float64(v45, &v44, 0LL); v23 = 0; v24 = *(_QWORD *)&v44 & 0xFFFFFFFF00000000LL; v41 = LODWORD(v44); goto LABEL_20; } if ( (_DWORD)v27 ) { if ( (_DWORD)v27 != 7 ) { if ( (unsigned int)v27 >= 0xFFFFFFF7 ) { v35 = *(_QWORD *)(a1 + 24); v28 = (unsigned int)**(_DWORD **)&v26; **(_DWORD **)&v26 = v28 - 1; if ( (int)v28 <= 1 ) js_free_value_rt(v35, *(_QWORD **)&v26, v27); } v41 = 0LL; JS_ThrowTypeError(a1, (long long)"not a number", v27, v28, v29, v30, a2, a3, a4, a5, v19, v20, a8, a9, v40); break; } } else { v26 = (double)SLODWORD(v26); } v44 = v26; a2 = (__m128)*(unsigned long long *)&v26; if ( !(unsigned int)bf_set_float64(v47, v26) ) { v25 = v45; if ( (unsigned int)bf_add(v45, v45, v47, 0x3FFFFFFFFFFFFFFFLL, 0LL) <= 1 ) continue; } JS_ThrowOutOfMemory(a1, (long long)v25, v31, v32, v33, v34); v41 = 0LL; break; } v24 = 0LL; v23 = 1; } LABEL_20: JS_IteratorClose( a1, (long long)v18, v17, v23, a2, a3, a4, a5, *(double *)v19.m128_u64, *(double *)v20.m128_u64, a8, a9); v36 = *(_QWORD *)(a1 + 24); if ( (unsigned int)v17 >= 0xFFFFFFF7 ) { v37 = (*(_DWORD *)v18)--; if ( v37 <= 1 ) { js_free_value_rt(v36, v18, v17); v36 = *(_QWORD *)(a1 + 24); } } if ( v22 >= 0xFFFFFFF7 ) { v38 = (*(_DWORD *)PropertyInternal2)--; if ( v38 <= 1 ) js_free_value_rt(v36, PropertyInternal2, v22); } if ( v45[0] && v46 ) (*(void ( **)(_QWORD, long long, _QWORD))(v45[0] + 8LL))(*(_QWORD *)v45[0], v46, 0LL); if ( v47[0] && v48 ) (*(void ( **)(_QWORD, long long, _QWORD))(v47[0] + 8LL))(*(_QWORD *)v47[0], v48, 0LL); return v41 | v24; } return v14; }
js_math_sumPrecise: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOV R14,RDI MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] XOR EBX,EBX XOR ECX,ECX CALL 0x00143211 MOV R12,RDX CMP R12D,0x6 JNZ 0x00180dbb MOV R13D,0x6 JMP 0x00180ff3 LAB_00180dbb: MOV R15,RAX MOV RDI,qword ptr [R14 + 0x1d0] LEA RSI,[RSP + 0x28] CALL 0x00187499 MOV RDI,qword ptr [R14 + 0x1d0] LEA RSI,[RSP + 0x50] CALL 0x00187499 MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 MOV ECX,0x6b MOV R8,R15 MOV R9,R12 PUSH 0x0 PUSH 0x0 CALL 0x0012384b ADD RSP,0x10 MOV qword ptr [RSP + 0x10],RAX MOV RBP,RDX MOV R13D,0x6 CMP EBP,0x6 JNZ 0x00180e29 MOV ECX,0x1 MOV qword ptr [RSP + 0x8],0x0 XOR EBX,EBX JMP 0x00180f5e LAB_00180e29: LEA RBX,[RSP + 0x28] MOV RDI,RBX MOV ESI,0x1 CALL 0x0018764c MOV qword ptr [RSP + 0x8],0x0 LEA R13,[RSP + 0x50] LAB_00180e49: MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 MOV RCX,qword ptr [RSP + 0x10] MOV R8,RBP XOR R9D,R9D LEA RAX,[RSP + 0x1c] PUSH RAX PUSH 0x0 CALL 0x0014360a ADD RSP,0x10 CMP EDX,0x6 JZ 0x00180f51 CMP dword ptr [RSP + 0x1c],0x0 JNZ 0x00180ee5 TEST EDX,EDX JZ 0x00180e8c CMP EDX,0x7 JZ 0x00180e98 JMP 0x00180f1a LAB_00180e8c: XORPS XMM0,XMM0 CVTSI2SD XMM0,EAX MOVQ RAX,XMM0 LAB_00180e98: MOV qword ptr [RSP + 0x20],RAX MOVQ XMM0,RAX MOV RDI,R13 CALL 0x0018b1c6 TEST EAX,EAX JNZ 0x00180ed2 MOV RDI,RBX MOV RSI,RBX MOV RDX,R13 MOV RCX,0x3fffffffffffffff XOR R8D,R8D CALL 0x0018a630 CMP EAX,0x1 JBE 0x00180e49 LAB_00180ed2: MOV RDI,R14 CALL 0x0011d44b MOV qword ptr [RSP + 0x8],0x0 JMP 0x00180f51 LAB_00180ee5: LEA RDI,[RSP + 0x28] LEA RBX,[RSP + 0x20] MOV RSI,RBX XOR EDX,EDX CALL 0x0018b089 XOR ECX,ECX MOV RAX,qword ptr [RBX] MOV RBX,-0x100000000 AND RBX,RAX MOV EAX,EAX MOV qword ptr [RSP + 0x8],RAX MOV R13D,0x7 JMP 0x00180f5e LAB_00180f1a: CMP EDX,-0x9 JC 0x00180f37 MOV RDI,qword ptr [R14 + 0x18] MOV ECX,dword ptr [RAX] LEA ESI,[RCX + -0x1] MOV dword ptr [RAX],ESI CMP ECX,0x1 JG 0x00180f37 MOV RSI,RAX CALL 0x001219cc LAB_00180f37: LEA RSI,[0x1a31f4] MOV qword ptr [RSP + 0x8],0x0 MOV RDI,R14 XOR EAX,EAX CALL 0x00122d8b LAB_00180f51: XOR EBX,EBX MOV R13D,0x6 MOV ECX,0x1 LAB_00180f5e: MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 CALL 0x00141301 MOV RDI,qword ptr [R14 + 0x18] CMP R12D,-0x9 JC 0x00180f93 MOV EAX,dword ptr [R15] LEA ECX,[RAX + -0x1] MOV dword ptr [R15],ECX CMP EAX,0x1 JG 0x00180f93 MOV RSI,R15 MOV RDX,R12 CALL 0x001219cc MOV RDI,qword ptr [R14 + 0x18] LAB_00180f93: CMP EBP,-0x9 JC 0x00180fb6 MOV RDX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RDX] LEA ECX,[RAX + -0x1] MOV dword ptr [RDX],ECX CMP EAX,0x1 JG 0x00180fb6 MOV RSI,qword ptr [RSP + 0x10] MOV RDX,RBP CALL 0x001219cc LAB_00180fb6: MOV RAX,qword ptr [RSP + 0x28] TEST RAX,RAX JZ 0x00180fd2 MOV RSI,qword ptr [RSP + 0x48] TEST RSI,RSI JZ 0x00180fd2 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00180fd2: MOV RAX,qword ptr [RSP + 0x50] TEST RAX,RAX JZ 0x00180fee MOV RSI,qword ptr [RSP + 0x70] TEST RSI,RSI JZ 0x00180fee MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00180fee: OR RBX,qword ptr [RSP + 0x8] LAB_00180ff3: MOV RAX,RBX MOV RDX,R13 ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] js_math_sumPrecise(long param_1) { int iVar1; uint uVar2; int *piVar3; int *piVar4; int8 uVar5; ulong uVar7; int8 *in_R8; int8 uVar8; int *piVar9; int1 auVar10 [12]; int1 auVar11 [16]; int1 auVar12 [16]; ulong local_a0; int local_8c; int *local_88; int8 *local_80 [4]; long local_60; int8 *local_58 [4]; long local_38; int8 uVar6; uVar7 = 0; auVar11 = JS_GetIterator(param_1,*in_R8,in_R8[1],0); uVar6 = auVar11._8_8_; piVar3 = auVar11._0_8_; if (auVar11._8_4_ == 6) { uVar8 = 6; } else { bf_init(*(int8 *)(param_1 + 0x1d0),local_80); bf_init(*(int8 *)(param_1 + 0x1d0),local_58); auVar12 = JS_GetPropertyInternal2(param_1,piVar3,uVar6,0x6b,piVar3,uVar6,0,0); piVar4 = auVar12._0_8_; uVar8 = 6; if (auVar12._8_4_ == 6) { uVar5 = 1; local_a0 = 0; uVar7 = 0; } else { bf_set_zero(local_80,1); do { auVar10 = JS_IteratorNext(param_1,piVar3,uVar6,piVar4,auVar12._8_8_,0,0,&local_8c); uVar2 = auVar10._8_4_; piVar9 = auVar10._0_8_; if (uVar2 == 6) goto LAB_00180f51; if (local_8c != 0) { bf_get_float64(local_80,&local_88,0); uVar5 = 0; uVar7 = (ulong)local_88 & 0xffffffff00000000; local_a0 = (ulong)local_88 & 0xffffffff; uVar8 = 7; goto LAB_00180f5e; } if (uVar2 == 0) { piVar9 = (int *)(double)auVar10._0_4_; } else if (uVar2 != 7) { if (0xfffffff6 < uVar2) { uVar8 = *(int8 *)(param_1 + 0x18); iVar1 = *piVar9; *piVar9 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar8,piVar9); } } JS_ThrowTypeError(param_1,"not a number"); goto LAB_00180f51; } local_88 = piVar9; iVar1 = bf_set_float64(piVar9,local_58); if (iVar1 != 0) break; uVar2 = bf_add(local_80,local_80,local_58,0x3fffffffffffffff,0); } while (uVar2 < 2); JS_ThrowOutOfMemory(param_1); LAB_00180f51: local_a0 = 0; uVar7 = 0; uVar8 = 6; uVar5 = 1; } LAB_00180f5e: JS_IteratorClose(param_1,piVar3,uVar6,uVar5); uVar5 = *(int8 *)(param_1 + 0x18); if (0xfffffff6 < auVar11._8_4_) { iVar1 = *piVar3; *piVar3 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5,piVar3,uVar6); uVar5 = *(int8 *)(param_1 + 0x18); } } if (0xfffffff6 < auVar12._8_4_) { iVar1 = *piVar4; *piVar4 = iVar1 + -1; if (iVar1 < 2) { js_free_value_rt(uVar5,piVar4,auVar12._8_8_); } } if ((local_80[0] != (int8 *)0x0) && (local_60 != 0)) { (*(code *)local_80[0][1])(*local_80[0],local_60,0); } if ((local_58[0] != (int8 *)0x0) && (local_38 != 0)) { (*(code *)local_58[0][1])(*local_58[0],local_38,0); } uVar7 = uVar7 | local_a0; } auVar11._8_8_ = uVar8; auVar11._0_8_ = uVar7; return auVar11; }
50,327
LefDefParser::defiComponent::setGenerate(char const*, char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiComponent.cpp
void defiComponent::setGenerate(const char* newName, const char* macroName) { int len = strlen(newName) + 1; if (generateNameSize_ < len) { if (generateName_) free(generateName_); generateName_ = (char*)malloc(len); generateNameSize_ = len; } strcpy(generateName_, defData->DEFCASE(newName)); len = strlen(macroName) + 1; if (macroNameSize_ < len) { if (macroName_) free(macroName_); macroName_ = (char*)malloc(len); macroNameSize_ = len; } strcpy(macroName_, defData->DEFCASE(macroName)); hasGenerate_ = 1; // Ying Tan fix at 20010918 }
O3
cpp
LefDefParser::defiComponent::setGenerate(char const*, char const*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movq %rsi, %rdi callq 0x70d0 movq %rax, %r13 incl %r13d movq 0xd8(%rbx), %r12 cmpl %r13d, 0xd0(%rbx) jge 0x12b8f testq %r12, %r12 je 0x12b73 movq %r12, %rdi callq 0x7220 movslq %r13d, %r13 movq %r13, %rdi callq 0x7270 movq %rax, %r12 movq %rax, 0xd8(%rbx) movl %r13d, 0xd0(%rbx) movq 0x150(%rbx), %rdi movq %r15, %rsi callq 0x1b638 movq %r12, %rdi movq %rax, %rsi callq 0x7190 movq %r14, %rdi callq 0x70d0 movq %rax, %r12 incl %r12d movq 0xe8(%rbx), %r15 cmpl %r12d, 0xe0(%rbx) jge 0x12bf0 testq %r15, %r15 je 0x12bd4 movq %r15, %rdi callq 0x7220 movslq %r12d, %r12 movq %r12, %rdi callq 0x7270 movq %rax, %r15 movq %rax, 0xe8(%rbx) movl %r12d, 0xe0(%rbx) movq 0x150(%rbx), %rdi movq %r14, %rsi callq 0x1b638 movq %r15, %rdi movq %rax, %rsi callq 0x7190 movb $0x1, 0x22(%rbx) popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZN12LefDefParser13defiComponent11setGenerateEPKcS2_: push r15 push r14 push r13 push r12 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi mov rdi, rsi call _strlen mov r13, rax inc r13d mov r12, [rbx+0D8h] cmp [rbx+0D0h], r13d jge short loc_12B8F test r12, r12 jz short loc_12B73 mov rdi, r12 call _free loc_12B73: movsxd r13, r13d mov rdi, r13 call _malloc mov r12, rax mov [rbx+0D8h], rax mov [rbx+0D0h], r13d loc_12B8F: mov rdi, [rbx+150h]; this mov rsi, r15; char * call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*) mov rdi, r12 mov rsi, rax call _strcpy mov rdi, r14 call _strlen mov r12, rax inc r12d mov r15, [rbx+0E8h] cmp [rbx+0E0h], r12d jge short loc_12BF0 test r15, r15 jz short loc_12BD4 mov rdi, r15 call _free loc_12BD4: movsxd r12, r12d mov rdi, r12 call _malloc mov r15, rax mov [rbx+0E8h], rax mov [rbx+0E0h], r12d loc_12BF0: mov rdi, [rbx+150h]; this mov rsi, r14; char * call _ZN12LefDefParser8defrData7DEFCASEEPKc; LefDefParser::defrData::DEFCASE(char const*) mov rdi, r15 mov rsi, rax call _strcpy mov byte ptr [rbx+22h], 1 pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long LefDefParser::defiComponent::setGenerate( LefDefParser::defiComponent *this, const char *a2, const char *a3) { int v4; // r13d long long v5; // r12 long long v6; // rax int v7; // r12d long long v8; // r15 long long v9; // rax long long result; // rax v4 = strlen(a2) + 1; v5 = *((_QWORD *)this + 27); if ( *((_DWORD *)this + 52) < v4 ) { if ( v5 ) free(*((void **)this + 27)); v5 = malloc(v4); *((_QWORD *)this + 27) = v5; *((_DWORD *)this + 52) = v4; } v6 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 42), a2); strcpy(v5, v6); v7 = strlen(a3) + 1; v8 = *((_QWORD *)this + 29); if ( *((_DWORD *)this + 56) < v7 ) { if ( v8 ) free(*((void **)this + 29)); v8 = malloc(v7); *((_QWORD *)this + 29) = v8; *((_DWORD *)this + 56) = v7; } v9 = LefDefParser::defrData::DEFCASE(*((LefDefParser::defrData **)this + 42), a3); result = strcpy(v8, v9); *((_BYTE *)this + 34) = 1; return result; }
setGenerate: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV RDI,RSI CALL 0x001070d0 MOV R13,RAX INC R13D MOV R12,qword ptr [RBX + 0xd8] CMP dword ptr [RBX + 0xd0],R13D JGE 0x00112b8f TEST R12,R12 JZ 0x00112b73 MOV RDI,R12 CALL 0x00107220 LAB_00112b73: MOVSXD R13,R13D MOV RDI,R13 CALL 0x00107270 MOV R12,RAX MOV qword ptr [RBX + 0xd8],RAX MOV dword ptr [RBX + 0xd0],R13D LAB_00112b8f: MOV RDI,qword ptr [RBX + 0x150] MOV RSI,R15 CALL 0x0011b638 MOV RDI,R12 MOV RSI,RAX CALL 0x00107190 MOV RDI,R14 CALL 0x001070d0 MOV R12,RAX INC R12D MOV R15,qword ptr [RBX + 0xe8] CMP dword ptr [RBX + 0xe0],R12D JGE 0x00112bf0 TEST R15,R15 JZ 0x00112bd4 MOV RDI,R15 CALL 0x00107220 LAB_00112bd4: MOVSXD R12,R12D MOV RDI,R12 CALL 0x00107270 MOV R15,RAX MOV qword ptr [RBX + 0xe8],RAX MOV dword ptr [RBX + 0xe0],R12D LAB_00112bf0: MOV RDI,qword ptr [RBX + 0x150] MOV RSI,R14 CALL 0x0011b638 MOV RDI,R15 MOV RSI,RAX CALL 0x00107190 MOV byte ptr [RBX + 0x22],0x1 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* LefDefParser::defiComponent::setGenerate(char const*, char const*) */ void __thiscall LefDefParser::defiComponent::setGenerate(defiComponent *this,char *param_1,char *param_2) { size_t sVar1; char *pcVar2; char *pcVar3; int iVar4; sVar1 = strlen(param_1); iVar4 = (int)sVar1 + 1; pcVar2 = *(char **)(this + 0xd8); if (*(int *)(this + 0xd0) < iVar4) { if (pcVar2 != (char *)0x0) { free(pcVar2); } pcVar2 = (char *)malloc((long)iVar4); *(char **)(this + 0xd8) = pcVar2; *(int *)(this + 0xd0) = iVar4; } pcVar3 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x150),param_1); strcpy(pcVar2,pcVar3); sVar1 = strlen(param_2); iVar4 = (int)sVar1 + 1; pcVar2 = *(char **)(this + 0xe8); if (*(int *)(this + 0xe0) < iVar4) { if (pcVar2 != (char *)0x0) { free(pcVar2); } pcVar2 = (char *)malloc((long)iVar4); *(char **)(this + 0xe8) = pcVar2; *(int *)(this + 0xe0) = iVar4; } pcVar3 = (char *)defrData::DEFCASE(*(defrData **)(this + 0x150),param_2); strcpy(pcVar2,pcVar3); this[0x22] = (defiComponent)0x1; return; }
50,328
convert_to_datetime
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void convert_to_datetime(MYSQL_TIME *t, unsigned char **row, uint len, enum enum_field_types type) { memset(t, 0, sizeof(MYSQL_TIME)); /* binary protocol for datetime: 4-bytes: DATE 7-bytes: DATE + TIME >7 bytes: DATE + TIME with second_part */ if (len) { unsigned char *to= *row; int has_date= 0; uint offset= 7; if (type == MYSQL_TYPE_TIME) { t->neg= to[0]; t->day= (ulong) sint4korr(to + 1); t->time_type= MYSQL_TIMESTAMP_TIME; offset= 8; to++; } else { t->year= (uint) sint2korr(to); t->month= (uint) to[2]; t->day= (uint) to[3]; t->time_type= MYSQL_TIMESTAMP_DATE; if (type == MYSQL_TYPE_DATE) return; has_date= 1; } if (len > 4) { t->hour= (uint) to[4]; if (type == MYSQL_TYPE_TIME) t->hour+= t->day * 24; t->minute= (uint) to[5]; t->second= (uint) to[6]; if (has_date) t->time_type= MYSQL_TIMESTAMP_DATETIME; } if (len > offset) { t->second_part= (ulong)sint4korr(to+7); } } }
O0
c
convert_to_datetime: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl %ecx, -0x18(%rbp) movq -0x8(%rbp), %rdi xorl %esi, %esi movl $0x28, %edx callq 0x3b390 cmpl $0x0, -0x14(%rbp) je 0x8c61a movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movl $0x0, -0x24(%rbp) movl $0x7, -0x28(%rbp) cmpl $0xb, -0x18(%rbp) jne 0x8c519 movq -0x20(%rbp), %rax movb (%rax), %cl movq -0x8(%rbp), %rax movb %cl, 0x20(%rax) movq -0x20(%rbp), %rax movzbl 0x1(%rax), %eax movq -0x20(%rbp), %rcx movzbl 0x2(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0x3(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0x4(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax cltq movl %eax, %ecx movq -0x8(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x8(%rbp), %rax movl $0x2, 0x24(%rax) movl $0x8, -0x28(%rbp) movq -0x20(%rbp), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0x8c575 movq -0x20(%rbp), %rax movzbl (%rax), %eax cwtl movq -0x20(%rbp), %rcx movzbl 0x1(%rcx), %ecx movswl %cx, %ecx shll $0x8, %ecx addl %ecx, %eax movswl %ax, %ecx movq -0x8(%rbp), %rax movl %ecx, (%rax) movq -0x20(%rbp), %rax movzbl 0x2(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x4(%rax) movq -0x20(%rbp), %rax movzbl 0x3(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x24(%rax) cmpl $0xa, -0x18(%rbp) jne 0x8c56e jmp 0x8c61a movl $0x1, -0x24(%rbp) cmpl $0x4, -0x14(%rbp) jbe 0x8c5d3 movq -0x20(%rbp), %rax movzbl 0x4(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0xc(%rax) cmpl $0xb, -0x18(%rbp) jne 0x8c5a2 movq -0x8(%rbp), %rax imull $0x18, 0x8(%rax), %ecx movq -0x8(%rbp), %rax addl 0xc(%rax), %ecx movl %ecx, 0xc(%rax) movq -0x20(%rbp), %rax movzbl 0x5(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x20(%rbp), %rax movzbl 0x6(%rax), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x14(%rax) cmpl $0x0, -0x24(%rbp) je 0x8c5d1 movq -0x8(%rbp), %rax movl $0x1, 0x24(%rax) jmp 0x8c5d3 movl -0x14(%rbp), %eax cmpl -0x28(%rbp), %eax jbe 0x8c618 movq -0x20(%rbp), %rax movzbl 0x7(%rax), %eax movq -0x20(%rbp), %rcx movzbl 0x8(%rcx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0x9(%rcx), %ecx shll $0x10, %ecx addl %ecx, %eax movq -0x20(%rbp), %rcx movzbl 0xa(%rcx), %ecx movswl %cx, %ecx shll $0x18, %ecx addl %ecx, %eax movslq %eax, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x18(%rax) jmp 0x8c61a addq $0x30, %rsp popq %rbp retq
convert_to_datetime: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_18], ecx mov rdi, [rbp+var_8] xor esi, esi mov edx, 28h ; '(' call _memset cmp [rbp+var_14], 0 jz loc_8C61A mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov [rbp+var_24], 0 mov [rbp+var_28], 7 cmp [rbp+var_18], 0Bh jnz short loc_8C519 mov rax, [rbp+var_20] mov cl, [rax] mov rax, [rbp+var_8] mov [rax+20h], cl mov rax, [rbp+var_20] movzx eax, byte ptr [rax+1] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+2] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+3] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+4] movsx ecx, cx shl ecx, 18h add eax, ecx cdqe mov ecx, eax mov rax, [rbp+var_8] mov [rax+8], ecx mov rax, [rbp+var_8] mov dword ptr [rax+24h], 2 mov [rbp+var_28], 8 mov rax, [rbp+var_20] add rax, 1 mov [rbp+var_20], rax jmp short loc_8C575 loc_8C519: mov rax, [rbp+var_20] movzx eax, byte ptr [rax] cwde mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+1] movsx ecx, cx shl ecx, 8 add eax, ecx movsx ecx, ax mov rax, [rbp+var_8] mov [rax], ecx mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+2] mov rax, [rbp+var_8] mov [rax+4], ecx mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+3] mov rax, [rbp+var_8] mov [rax+8], ecx mov rax, [rbp+var_8] mov dword ptr [rax+24h], 0 cmp [rbp+var_18], 0Ah jnz short loc_8C56E jmp loc_8C61A loc_8C56E: mov [rbp+var_24], 1 loc_8C575: cmp [rbp+var_14], 4 jbe short loc_8C5D3 mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+4] mov rax, [rbp+var_8] mov [rax+0Ch], ecx cmp [rbp+var_18], 0Bh jnz short loc_8C5A2 mov rax, [rbp+var_8] imul ecx, [rax+8], 18h mov rax, [rbp+var_8] add ecx, [rax+0Ch] mov [rax+0Ch], ecx loc_8C5A2: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+5] mov rax, [rbp+var_8] mov [rax+10h], ecx mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+6] mov rax, [rbp+var_8] mov [rax+14h], ecx cmp [rbp+var_24], 0 jz short loc_8C5D1 mov rax, [rbp+var_8] mov dword ptr [rax+24h], 1 loc_8C5D1: jmp short $+2 loc_8C5D3: mov eax, [rbp+var_14] cmp eax, [rbp+var_28] jbe short loc_8C618 mov rax, [rbp+var_20] movzx eax, byte ptr [rax+7] mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+8] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+9] shl ecx, 10h add eax, ecx mov rcx, [rbp+var_20] movzx ecx, byte ptr [rcx+0Ah] movsx ecx, cx shl ecx, 18h add eax, ecx movsxd rcx, eax mov rax, [rbp+var_8] mov [rax+18h], rcx loc_8C618: jmp short $+2 loc_8C61A: add rsp, 30h pop rbp retn
long long convert_to_datetime(long long a1, unsigned __int8 **a2, unsigned int a3, int a4) { long long result; // rax unsigned int v5; // [rsp+8h] [rbp-28h] int v6; // [rsp+Ch] [rbp-24h] unsigned __int8 *v7; // [rsp+10h] [rbp-20h] result = memset(a1, 0LL, 40LL); if ( a3 ) { v7 = *a2; v6 = 0; v5 = 7; if ( a4 == 11 ) { *(_BYTE *)(a1 + 32) = *v7; *(_DWORD *)(a1 + 8) = (v7[4] << 24) + (v7[3] << 16) + (v7[2] << 8) + v7[1]; *(_DWORD *)(a1 + 36) = 2; v5 = 8; ++v7; } else { *(_DWORD *)a1 = (__int16)((v7[1] << 8) + *v7); *(_DWORD *)(a1 + 4) = v7[2]; *(_DWORD *)(a1 + 8) = v7[3]; result = a1; *(_DWORD *)(a1 + 36) = 0; if ( a4 == 10 ) return result; v6 = 1; } if ( a3 > 4 ) { *(_DWORD *)(a1 + 12) = v7[4]; if ( a4 == 11 ) *(_DWORD *)(a1 + 12) += 24 * *(_DWORD *)(a1 + 8); *(_DWORD *)(a1 + 16) = v7[5]; *(_DWORD *)(a1 + 20) = v7[6]; if ( v6 ) *(_DWORD *)(a1 + 36) = 1; } result = a3; if ( a3 > v5 ) { result = a1; *(_QWORD *)(a1 + 24) = (v7[10] << 24) + (v7[9] << 16) + (v7[8] << 8) + v7[7]; } } return result; }
convert_to_datetime: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV dword ptr [RBP + -0x18],ECX MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI MOV EDX,0x28 CALL 0x0013b390 CMP dword ptr [RBP + -0x14],0x0 JZ 0x0018c61a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0x24],0x0 MOV dword ptr [RBP + -0x28],0x7 CMP dword ptr [RBP + -0x18],0xb JNZ 0x0018c519 MOV RAX,qword ptr [RBP + -0x20] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x20],CL MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x1] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x2] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x3] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x4] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX CDQE MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],0x2 MOV dword ptr [RBP + -0x28],0x8 MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x0018c575 LAB_0018c519: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX] CWDE MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x1] MOVSX ECX,CX SHL ECX,0x8 ADD EAX,ECX MOVSX ECX,AX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x2] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x3] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],0x0 CMP dword ptr [RBP + -0x18],0xa JNZ 0x0018c56e JMP 0x0018c61a LAB_0018c56e: MOV dword ptr [RBP + -0x24],0x1 LAB_0018c575: CMP dword ptr [RBP + -0x14],0x4 JBE 0x0018c5d3 MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0xc],ECX CMP dword ptr [RBP + -0x18],0xb JNZ 0x0018c5a2 MOV RAX,qword ptr [RBP + -0x8] IMUL ECX,dword ptr [RAX + 0x8],0x18 MOV RAX,qword ptr [RBP + -0x8] ADD ECX,dword ptr [RAX + 0xc] MOV dword ptr [RAX + 0xc],ECX LAB_0018c5a2: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x5] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0x6] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x14],ECX CMP dword ptr [RBP + -0x24],0x0 JZ 0x0018c5d1 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x24],0x1 LAB_0018c5d1: JMP 0x0018c5d3 LAB_0018c5d3: MOV EAX,dword ptr [RBP + -0x14] CMP EAX,dword ptr [RBP + -0x28] JBE 0x0018c618 MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0x7] MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x8] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0x9] SHL ECX,0x10 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RCX + 0xa] MOVSX ECX,CX SHL ECX,0x18 ADD EAX,ECX MOVSXD RCX,EAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x18],RCX LAB_0018c618: JMP 0x0018c61a LAB_0018c61a: ADD RSP,0x30 POP RBP RET
void convert_to_datetime(int *param_1,int8 *param_2,uint param_3,int param_4) { bool bVar1; uint local_30; byte *local_28; memset(param_1,0,0x28); if (param_3 != 0) { local_28 = (byte *)*param_2; bVar1 = false; local_30 = 7; if (param_4 == 0xb) { *(byte *)(param_1 + 8) = *local_28; param_1[2] = (uint)local_28[1] + (uint)local_28[2] * 0x100 + (uint)local_28[3] * 0x10000 + (short)(ushort)local_28[4] * 0x1000000; param_1[9] = 2; local_30 = 8; local_28 = local_28 + 1; } else { *param_1 = (int)(short)((ushort)*local_28 + (short)((int)(short)(ushort)local_28[1] << 8)); param_1[1] = (uint)local_28[2]; param_1[2] = (uint)local_28[3]; param_1[9] = 0; if (param_4 == 10) { return; } bVar1 = true; } if (4 < param_3) { param_1[3] = (uint)local_28[4]; if (param_4 == 0xb) { param_1[3] = param_1[2] * 0x18 + param_1[3]; } param_1[4] = (uint)local_28[5]; param_1[5] = (uint)local_28[6]; if (bVar1) { param_1[9] = 1; } } if (local_30 < param_3) { *(long *)(param_1 + 6) = (long)(int)((uint)local_28[7] + (uint)local_28[8] * 0x100 + (uint)local_28[9] * 0x10000 + (short)(ushort)local_28[10] * 0x1000000); } } return; }
50,329
js_parse_template
bluesky950520[P]quickjs/quickjs.c
static __exception int js_parse_template(JSParseState *s, int call, int *argc) { JSContext *ctx = s->ctx; JSValue raw_array, template_object; JSToken cooked; int depth, ret; raw_array = JS_UNDEFINED; /* avoid warning */ template_object = JS_UNDEFINED; /* avoid warning */ if (call) { /* Create a template object: an array of cooked strings */ /* Create an array of raw strings and store it to the raw property */ template_object = JS_NewArray(ctx); if (JS_IsException(template_object)) return -1; // pool_idx = s->cur_func->cpool_count; ret = emit_push_const(s, template_object, 0); JS_FreeValue(ctx, template_object); if (ret) return -1; raw_array = JS_NewArray(ctx); if (JS_IsException(raw_array)) return -1; if (JS_DefinePropertyValue(ctx, template_object, JS_ATOM_raw, raw_array, JS_PROP_THROW) < 0) { return -1; } } depth = 0; while (s->token.val == TOK_TEMPLATE) { const uint8_t *p = s->token.ptr + 1; cooked = s->token; if (call) { if (JS_DefinePropertyValueUint32(ctx, raw_array, depth, js_dup(s->token.u.str.str), JS_PROP_ENUMERABLE | JS_PROP_THROW) < 0) { return -1; } /* re-parse the string with escape sequences but do not throw a syntax error if it contains invalid sequences */ if (js_parse_string(s, '`', FALSE, p, &cooked, &p)) { cooked.u.str.str = JS_UNDEFINED; } if (JS_DefinePropertyValueUint32(ctx, template_object, depth, cooked.u.str.str, JS_PROP_ENUMERABLE | JS_PROP_THROW) < 0) { return -1; } } else { JSString *str; /* re-parse the string with escape sequences and throw a syntax error if it contains invalid sequences */ JS_FreeValue(ctx, s->token.u.str.str); s->token.u.str.str = JS_UNDEFINED; if (js_parse_string(s, '`', TRUE, p, &cooked, &p)) return -1; str = JS_VALUE_GET_STRING(cooked.u.str.str); if (str->len != 0 || depth == 0) { ret = emit_push_const(s, cooked.u.str.str, 1); JS_FreeValue(s->ctx, cooked.u.str.str); if (ret) return -1; if (depth == 0) { if (s->token.u.str.sep == '`') goto done1; emit_op(s, OP_get_field2); emit_atom(s, JS_ATOM_concat); emit_ic(s, JS_ATOM_concat); } depth++; } else { JS_FreeValue(s->ctx, cooked.u.str.str); } } if (s->token.u.str.sep == '`') goto done; if (next_token(s)) return -1; if (js_parse_expr(s)) return -1; depth++; if (s->token.val != '}') { return js_parse_error(s, "expected '}' after template expression"); } /* XXX: should convert to string at this stage? */ free_token(s, &s->token); /* Resume TOK_TEMPLATE parsing (s->token.line_num and * s->token.ptr are OK) */ s->got_lf = FALSE; s->last_line_num = s->token.line_num; s->last_col_num = s->token.col_num; if (js_parse_template_part(s, s->buf_ptr)) return -1; } return js_parse_expect(s, TOK_TEMPLATE); done: if (call) { /* Seal the objects */ seal_template_obj(ctx, raw_array); seal_template_obj(ctx, template_object); *argc = depth + 1; } else { emit_op(s, OP_call_method); emit_u16(s, depth - 1); } done1: return next_token(s); }
O3
c
js_parse_template: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %rdx, %r15 movq %rdi, %rbx movq (%rdi), %rdi movl %esi, 0x34(%rsp) testl %esi, %esi movq %rdi, 0x18(%rsp) jne 0x6a052 movl $0x3, %ebp xorl %r12d, %r12d movq $0x0, 0x28(%rsp) movl $0x3, %eax movq %rax, 0x50(%rsp) movq %rbp, 0x60(%rsp) movq %r12, 0x20(%rsp) movq %r15, 0x58(%rsp) cmpl $-0x7e, 0x20(%rbx) jne 0x6a03d leaq 0x20(%rbx), %r13 leaq 0x90(%rbx), %rax movq %rax, 0x48(%rsp) xorl %ebp, %ebp movq 0x30(%rbx), %r12 incq %r12 movq 0x30(%r13), %rax movq %rax, 0xa0(%rsp) movups (%r13), %xmm0 movups 0x10(%r13), %xmm1 movups 0x20(%r13), %xmm2 movaps %xmm2, 0x90(%rsp) movaps %xmm1, 0x80(%rsp) movaps %xmm0, 0x70(%rsp) movq 0x38(%rbx), %rsi movq 0x40(%rbx), %rdx cmpl $0x0, 0x34(%rsp) je 0x69e5e cmpl $-0x9, %edx jb 0x69dbf incl (%rsi) movq %rsi, 0x38(%rsp) movl %ebp, %eax xorps %xmm0, %xmm0 cvtsi2sd %rax, %xmm0 testl %ebp, %ebp movq %xmm0, %r14 cmovnsq %rax, %r14 movq %rdx, 0x40(%rsp) movl $0x7, %r15d movl $0x0, %eax cmovnsq %rax, %r15 movups 0x38(%rsp), %xmm0 movups %xmm0, (%rsp) movq 0x28(%rsp), %rsi movq 0x50(%rsp), %rdx movq %r14, %rcx movq %r15, %r8 movl $0x4004, %r9d # imm = 0x4004 callq 0x265c6 testl %eax, %eax js 0x6a120 movq %rbx, %rdi movl $0x60, %esi xorl %edx, %edx movq %r12, %rcx leaq 0x70(%rsp), %r8 leaq 0x68(%rsp), %r9 callq 0x61451 testl %eax, %eax je 0x69f03 movl $0x0, 0x88(%rsp) movq $0x3, 0x90(%rsp) movl $0x3, %eax jmp 0x69f0b cmpl $-0x9, %edx jb 0x69e78 movq 0x18(%rdi), %rdi movl (%rsi), %eax leal -0x1(%rax), %ecx movl %ecx, (%rsi) cmpl $0x1, %eax jg 0x69e78 callq 0x20d90 movl $0x0, 0x38(%rbx) movq $0x3, 0x40(%rbx) movq %rbx, %rdi movl $0x60, %esi movl $0x1, %edx movq %r12, %rcx leaq 0x70(%rsp), %r8 leaq 0x68(%rsp), %r9 callq 0x61451 testl %eax, %eax jne 0x6a120 movq 0x88(%rsp), %r14 testl $0x7fffffff, 0x4(%r14) # imm = 0x7FFFFFFF jne 0x69f59 testl %ebp, %ebp je 0x69f59 movq 0x90(%rsp), %rdx cmpl $-0x9, %edx jb 0x69fc3 movq (%rbx), %rax movq 0x18(%rax), %rdi movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x69fc3 movq %r14, %rsi callq 0x20d90 jmp 0x69fc3 movq 0x90(%rsp), %rax movq 0x18(%rsp), %rdi movq 0x20(%rsp), %rsi movq 0x88(%rsp), %rcx movq %rcx, 0x38(%rsp) movq %rax, 0x40(%rsp) movups 0x38(%rsp), %xmm0 movups %xmm0, (%rsp) movq 0x60(%rsp), %rdx movq %r14, %rcx movq %r15, %r8 movl $0x4004, %r9d # imm = 0x4004 callq 0x265c6 testl %eax, %eax js 0x6a120 cmpl $0x60, 0x48(%rbx) jne 0x69fcd jmp 0x6a13b movq 0x90(%rsp), %r15 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movl $0x1, %ecx callq 0x69c1c movl %eax, %r12d cmpl $-0x9, %r15d jb 0x69f9d movq (%rbx), %rax movq 0x18(%rax), %rdi movl (%r14), %eax leal -0x1(%rax), %ecx movl %ecx, (%r14) cmpl $0x1, %eax jg 0x69f9d movq %r14, %rsi movq %r15, %rdx callq 0x20d90 testl %r12d, %r12d jne 0x6a120 testl %ebp, %ebp jne 0x69fc1 cmpl $0x60, 0x48(%rbx) je 0x6a1a7 movq 0x48(%rsp), %rdi movq %rbx, %rsi callq 0x1415d incl %ebp cmpl $0x60, 0x48(%rbx) je 0x6a165 movq %rbx, %rdi callq 0x5f46a testl %eax, %eax jne 0x6a120 movq %rbx, %rdi movl $0x1, %esi callq 0x6bfae testl %eax, %eax jne 0x6a120 cmpl $0x7d, (%r13) jne 0x6a10f movq %rbx, %rdi movq %r13, %rsi callq 0x346e8 movl $0x0, 0x58(%rbx) movq 0x24(%rbx), %rax movq 0x70(%rbx), %rsi movq %rax, 0x8(%rbx) movq %rbx, %rdi callq 0x612d0 testl %eax, %eax jne 0x6a120 incl %ebp cmpl $-0x7e, (%r13) movq 0x18(%rsp), %rdi je 0x69d6e movq %rbx, %rdi movl $0xffffff82, %esi # imm = 0xFFFFFF82 callq 0x654fc movl %eax, %r13d jmp 0x6a126 movq 0x38(%rdi), %rsi incl (%rsi) movl $0x2, %edx callq 0xf4c7 movq %rdx, %rbp movl $0xffffffff, %r13d # imm = 0xFFFFFFFF cmpl $0x6, %ebp je 0x6a126 movq %rax, %r12 movq %rbx, %rdi movq %rax, %rsi movq %rbp, %rdx xorl %ecx, %ecx callq 0x69c1c movl %eax, %r14d cmpl $-0x9, %ebp movq 0x18(%rsp), %r8 jb 0x6a0b8 movq 0x18(%r8), %rdi movl (%r12), %eax leal -0x1(%rax), %ecx movl %ecx, (%r12) cmpl $0x1, %eax jg 0x6a0b8 movq %r12, %rsi movq %rbp, %rdx callq 0x20d90 movq 0x18(%rsp), %r8 testl %r14d, %r14d jne 0x6a126 movq 0x38(%r8), %rsi incl (%rsi) movq %r8, %rdi movl $0x2, %edx movq %r8, %r14 callq 0xf4c7 cmpl $0x6, %edx je 0x6a126 movl $0x4000, (%rsp) # imm = 0x4000 movq %r14, %rdi movq %r12, %rsi movq %rdx, %r9 movq %rbp, %rdx movl $0x71, %ecx movq %rax, %r8 movq %rax, 0x28(%rsp) movq %r9, 0x50(%rsp) callq 0x26541 testl %eax, %eax movq %r14, %rdi jns 0x69d43 jmp 0x6a126 leaq 0x38642(%rip), %rsi # 0xa2758 movq %rbx, %rdi xorl %eax, %eax callq 0x2fed1 movl $0xffffffff, %r13d # imm = 0xFFFFFFFF movl %r13d, %eax addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq 0x18(%rsp), %r14 movq %r14, %rdi movq 0x28(%rsp), %rsi callq 0x6bb3e movq %r14, %rdi movq 0x20(%rsp), %rsi callq 0x6bb3e incl %ebp movq 0x58(%rsp), %rax movl %ebp, (%rax) jmp 0x6a1a7 movq 0x48(%rsp), %r15 movq (%r15), %rax movl $0x138, %r14d # imm = 0x138 leaq (%rax,%r14), %rdi movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0x24, %esi callq 0x1b1c5 decl %ebp addq (%r15), %r14 leaq 0x38(%rsp), %rsi movw %bp, (%rsi) movl $0x2, %edx movq %r14, %rdi callq 0x1b116 movq %rbx, %rdi callq 0x5f46a jmp 0x6a04a
js_parse_template: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov r15, rdx mov rbx, rdi mov rdi, [rdi] mov [rsp+0D8h+var_A4], esi test esi, esi mov [rsp+0D8h+var_C0], rdi jnz loc_6A052 mov ebp, 3 xor r12d, r12d mov [rsp+0D8h+var_B0], 0 mov eax, 3 mov [rsp+0D8h+var_88], rax loc_69D43: mov [rsp+0D8h+var_78], rbp mov [rsp+0D8h+var_B8], r12 mov [rsp+0D8h+var_80], r15 cmp dword ptr [rbx+20h], 0FFFFFF82h jnz loc_6A03D lea r13, [rbx+20h] lea rax, [rbx+90h] mov [rsp+0D8h+var_90], rax xor ebp, ebp loc_69D6E: mov r12, [rbx+30h] inc r12 mov rax, [r13+30h] mov [rsp+0D8h+var_38], rax movups xmm0, xmmword ptr [r13+0] movups xmm1, xmmword ptr [r13+10h] movups xmm2, xmmword ptr [r13+20h] movaps [rsp+0D8h+var_48], xmm2 movaps [rsp+0D8h+var_58], xmm1 movaps [rsp+0D8h+var_68], xmm0 mov rsi, [rbx+38h] mov rdx, [rbx+40h] cmp [rsp+0D8h+var_A4], 0 jz loc_69E5E cmp edx, 0FFFFFFF7h jb short loc_69DBF inc dword ptr [rsi] loc_69DBF: mov qword ptr [rsp+0D8h+var_A0], rsi mov eax, ebp xorps xmm0, xmm0 cvtsi2sd xmm0, rax test ebp, ebp movq r14, xmm0 cmovns r14, rax mov qword ptr [rsp+0D8h+var_A0+8], rdx mov r15d, 7 mov eax, 0 cmovns r15, rax movups xmm0, [rsp+0D8h+var_A0] movups [rsp+0D8h+var_D8], xmm0 mov rsi, [rsp+0D8h+var_B0] mov rdx, [rsp+0D8h+var_88] mov rcx, r14 mov r8, r15 mov r9d, 4004h call JS_DefinePropertyValueValue test eax, eax js loc_6A120 mov rdi, rbx mov esi, 60h ; '`' xor edx, edx mov rcx, r12 lea r8, [rsp+0D8h+var_68] lea r9, [rsp+0D8h+var_70] call js_parse_string test eax, eax jz loc_69F03 mov dword ptr [rsp+0D8h+var_58+8], 0 mov qword ptr [rsp+0D8h+var_48], 3 mov eax, 3 jmp loc_69F0B loc_69E5E: cmp edx, 0FFFFFFF7h jb short loc_69E78 mov rdi, [rdi+18h] mov eax, [rsi] lea ecx, [rax-1] mov [rsi], ecx cmp eax, 1 jg short loc_69E78 call js_free_value_rt loc_69E78: mov dword ptr [rbx+38h], 0 mov qword ptr [rbx+40h], 3 mov rdi, rbx mov esi, 60h ; '`' mov edx, 1 mov rcx, r12 lea r8, [rsp+0D8h+var_68] lea r9, [rsp+0D8h+var_70] call js_parse_string test eax, eax jnz loc_6A120 mov r14, qword ptr [rsp+0D8h+var_58+8] test dword ptr [r14+4], 7FFFFFFFh jnz loc_69F59 test ebp, ebp jz loc_69F59 mov rdx, qword ptr [rsp+0D8h+var_48] cmp edx, 0FFFFFFF7h jb loc_69FC3 mov rax, [rbx] mov rdi, [rax+18h] mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg loc_69FC3 mov rsi, r14 call js_free_value_rt jmp loc_69FC3 loc_69F03: mov rax, qword ptr [rsp+0D8h+var_48] loc_69F0B: mov rdi, [rsp+0D8h+var_C0] mov rsi, [rsp+0D8h+var_B8] mov rcx, qword ptr [rsp+0D8h+var_58+8] mov qword ptr [rsp+0D8h+var_A0], rcx mov qword ptr [rsp+0D8h+var_A0+8], rax movups xmm0, [rsp+0D8h+var_A0] movups [rsp+0D8h+var_D8], xmm0 mov rdx, [rsp+0D8h+var_78] mov rcx, r14 mov r8, r15 mov r9d, 4004h call JS_DefinePropertyValueValue test eax, eax js loc_6A120 cmp dword ptr [rbx+48h], 60h ; '`' jnz short loc_69FCD jmp loc_6A13B loc_69F59: mov r15, qword ptr [rsp+0D8h+var_48] mov rdi, rbx mov rsi, r14 mov rdx, r15 mov ecx, 1 call emit_push_const mov r12d, eax cmp r15d, 0FFFFFFF7h jb short loc_69F9D mov rax, [rbx] mov rdi, [rax+18h] mov eax, [r14] lea ecx, [rax-1] mov [r14], ecx cmp eax, 1 jg short loc_69F9D mov rsi, r14 mov rdx, r15 call js_free_value_rt loc_69F9D: test r12d, r12d jnz loc_6A120 test ebp, ebp jnz short loc_69FC1 cmp dword ptr [rbx+48h], 60h ; '`' jz loc_6A1A7 mov rdi, [rsp+0D8h+var_90] mov rsi, rbx call js_parse_template_cold_1 loc_69FC1: inc ebp loc_69FC3: cmp dword ptr [rbx+48h], 60h ; '`' jz loc_6A165 loc_69FCD: mov rdi, rbx call next_token test eax, eax jnz loc_6A120 mov rdi, rbx mov esi, 1 call js_parse_expr2 test eax, eax jnz loc_6A120 cmp dword ptr [r13+0], 7Dh ; '}' jnz loc_6A10F mov rdi, rbx mov rsi, r13 call free_token mov dword ptr [rbx+58h], 0 mov rax, [rbx+24h] mov rsi, [rbx+70h] mov [rbx+8], rax mov rdi, rbx call js_parse_template_part test eax, eax jnz loc_6A120 inc ebp cmp dword ptr [r13+0], 0FFFFFF82h mov rdi, [rsp+0D8h+var_C0] jz loc_69D6E loc_6A03D: mov rdi, rbx mov esi, 0FFFFFF82h call js_parse_expect loc_6A04A: mov r13d, eax jmp loc_6A126 loc_6A052: mov rsi, [rdi+38h] inc dword ptr [rsi] mov edx, 2 call JS_NewObjectFromShape mov rbp, rdx mov r13d, 0FFFFFFFFh cmp ebp, 6 jz loc_6A126 mov r12, rax mov rdi, rbx mov rsi, rax mov rdx, rbp xor ecx, ecx call emit_push_const mov r14d, eax cmp ebp, 0FFFFFFF7h mov r8, [rsp+0D8h+var_C0] jb short loc_6A0B8 mov rdi, [r8+18h] mov eax, [r12] lea ecx, [rax-1] mov [r12], ecx cmp eax, 1 jg short loc_6A0B8 mov rsi, r12 mov rdx, rbp call js_free_value_rt mov r8, [rsp+0D8h+var_C0] loc_6A0B8: test r14d, r14d jnz short loc_6A126 mov rsi, [r8+38h] inc dword ptr [rsi] mov rdi, r8 mov edx, 2 mov r14, r8 call JS_NewObjectFromShape cmp edx, 6 jz short loc_6A126 mov dword ptr [rsp+0D8h+var_D8], 4000h mov rdi, r14 mov rsi, r12 mov r9, rdx mov rdx, rbp mov ecx, 71h ; 'q' mov r8, rax mov [rsp+0D8h+var_B0], rax mov [rsp+0D8h+var_88], r9 call JS_DefinePropertyValue test eax, eax mov rdi, r14 jns loc_69D43 jmp short loc_6A126 loc_6A10F: lea rsi, aExpectedAfterT; "expected '}' after template expression" mov rdi, rbx xor eax, eax call js_parse_error loc_6A120: mov r13d, 0FFFFFFFFh loc_6A126: mov eax, r13d add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6A13B: mov r14, [rsp+0D8h+var_C0] mov rdi, r14 mov rsi, [rsp+0D8h+var_B0] call seal_template_obj mov rdi, r14 mov rsi, [rsp+0D8h+var_B8] call seal_template_obj inc ebp mov rax, [rsp+0D8h+var_80] mov [rax], ebp jmp short loc_6A1A7 loc_6A165: mov r15, [rsp+0D8h+var_90] mov rax, [r15] mov r14d, 138h lea rdi, [rax+r14] mov ecx, [rax+140h] mov [rax+168h], ecx mov esi, 24h ; '$' call dbuf_putc dec ebp add r14, [r15] lea rsi, [rsp+0D8h+var_A0] mov [rsi], bp mov edx, 2 mov rdi, r14 call dbuf_put loc_6A1A7: mov rdi, rbx call next_token jmp loc_6A04A
long long js_parse_template( long long a1, int a2, long long a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v16; // rdi long long v17; // rbp _QWORD *v18; // r12 __m128 *v19; // r13 int i; // ebp char *v21; // r12 _QWORD *v22; // rsi long long v23; // rdx double v24; // r14 long long v25; // r15 double v26; // xmm4_8 double v27; // xmm5_8 double v28; // xmm4_8 double v29; // xmm5_8 long long v30; // rax long long v31; // rdi int v32; // eax long long v33; // rcx __m128 *v34; // rsi long long v35; // rcx long long v36; // r8 long long v37; // r9 __m128 v38; // xmm4 __m128 v39; // xmm5 __m128 *v40; // r14 long long v41; // rdx long long v42; // rdi int v43; // eax long long v44; // r15 int v45; // r12d long long v46; // rdi int v47; // eax long long v48; // rdx long long v49; // rcx long long v50; // r8 long long v51; // r9 __m128 v52; // xmm4 __m128 v53; // xmm5 char *v54; // rsi double v55; // xmm4_8 double v56; // xmm5_8 unsigned int v58; // r13d _DWORD *v59; // rsi _DWORD *v60; // rax long long v61; // rdx long long v62; // r9 int v63; // r14d long long v64; // r8 long long v65; // rdi int v66; // eax long long v67; // rcx _DWORD *v68; // rsi long long v69; // r14 int *v70; // rax long long v71; // rdx __m128 v72; // xmm4 __m128 v73; // xmm5 long long *v75; // r15 _QWORD *v76; // rdi _QWORD *v77; // r14 char v78; // [rsp+0h] [rbp-D8h] long long v79; // [rsp+18h] [rbp-C0h] long long v80; // [rsp+20h] [rbp-B8h] long long v81; // [rsp+28h] [rbp-B0h] __m128 v83; // [rsp+38h] [rbp-A0h] BYREF long long *v84; // [rsp+48h] [rbp-90h] long long v85; // [rsp+50h] [rbp-88h] _DWORD *v86; // [rsp+58h] [rbp-80h] long long v87; // [rsp+60h] [rbp-78h] char *v88; // [rsp+68h] [rbp-70h] BYREF __m128 v89; // [rsp+70h] [rbp-68h] BYREF __m128 v90; // [rsp+80h] [rbp-58h] __m128 v91; // [rsp+90h] [rbp-48h] long long v92; // [rsp+A0h] [rbp-38h] v16 = *(_QWORD *)a1; v79 = v16; if ( a2 ) { v59 = *(_DWORD **)(v16 + 56); ++*v59; v60 = (_DWORD *)JS_NewObjectFromShape(v16, v59, 2u); v17 = v61; v58 = -1; if ( (_DWORD)v61 == 6 ) return v58; v18 = v60; v63 = emit_push_const((long long *)a1, v60, v61, 0); v64 = v16; if ( (unsigned int)v17 >= 0xFFFFFFF7 ) { v65 = *(_QWORD *)(v16 + 24); v66 = *(_DWORD *)v18; v67 = (unsigned int)(*(_DWORD *)v18 - 1); *(_DWORD *)v18 = v67; if ( v66 <= 1 ) { js_free_value_rt(v65, v18, v17, v67, v79, v62); v64 = v79; } } if ( v63 ) return v58; v68 = *(_DWORD **)(v64 + 56); ++*v68; v69 = v64; v70 = (int *)JS_NewObjectFromShape(v64, v68, 2u); if ( (_DWORD)v71 == 6 ) return v58; v81 = (long long)v70; v85 = v71; v16 = v69; if ( (int)JS_DefinePropertyValue( v69, (long long)v18, v17, 113LL, v70, v71, *(double *)a7.m128_u64, a8, a9, a10, v72, v73, a13, a14, 0x4000) < 0 ) return v58; } else { v17 = 3LL; v18 = 0LL; v81 = 0LL; v85 = 3LL; } v87 = v17; v80 = (long long)v18; v86 = (_DWORD *)a3; if ( *(_DWORD *)(a1 + 32) != -126 ) return (unsigned int)js_parse_expect( (long long *)a1, 4294967170LL, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); v19 = (__m128 *)(a1 + 32); v84 = (long long *)(a1 + 144); for ( i = 0; ; ++i ) { v21 = (char *)(*(_QWORD *)(a1 + 48) + 1LL); v92 = *(_QWORD *)(a1 + 80); a7 = *v19; a8 = *(__m128 *)(a1 + 48); a9 = *(__m128 *)(a1 + 64); v91 = a9; v90 = a8; v89 = a7; v22 = *(_QWORD **)(a1 + 56); v23 = *(_QWORD *)(a1 + 64); if ( !a2 ) break; if ( (unsigned int)v23 >= 0xFFFFFFF7 ) ++*(_DWORD *)v22; v83.m128_u64[0] = (unsigned long long)v22; v24 = (double)i; if ( i >= 0 ) *(_QWORD *)&v24 = (unsigned int)i; v83.m128_u64[1] = v23; v25 = 7LL; if ( i >= 0 ) v25 = 0LL; if ( (int)JS_DefinePropertyValueValue( v16, v81, v85, *(_QWORD **)&v24, v25, 16388, *(double *)v83.m128_u64, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14, (int *)v83.m128_u64[0], v83.m128_i64[1]) < 0 ) return (unsigned int)-1; if ( (unsigned int)js_parse_string( a1, 96, 0, v21, &v89, &v88, *(double *)v83.m128_u64, a8, a9, a10, v26, v27, a13, a14) ) { v90.m128_i32[2] = 0; v91.m128_u64[0] = 3LL; v30 = 3LL; } else { v30 = v91.m128_u64[0]; } v34 = (__m128 *)v80; v83.m128_u64[0] = v90.m128_u64[1]; v83.m128_u64[1] = v30; a7 = v83; if ( (int)JS_DefinePropertyValueValue( v79, v80, v87, *(_QWORD **)&v24, v25, 16388, *(double *)v83.m128_u64, a8, a9, a10, v28, v29, a13, a14, (int *)v83.m128_u64[0], v30) < 0 ) return (unsigned int)-1; if ( *(_DWORD *)(a1 + 72) == 96 ) { seal_template_obj(v79, v81); v34 = (__m128 *)v80; seal_template_obj(v79, v80); *v86 = i + 1; return (unsigned int)next_token(a1, a7, a8, a9, a10, v38, v39, a13, a14, (long long)v34, v41, v35, v36, v37); } LABEL_37: if ( (unsigned int)next_token(a1, a7, a8, a9, a10, v38, v39, a13, a14, (long long)v34, v41, v35, v36, v37) || (unsigned int)js_parse_expr2(a1, 1LL) ) { return (unsigned int)-1; } if ( v19->m128_i32[0] != 125 ) { js_parse_error( (long long *)a1, (long long)"expected '}' after template expression", v48, v49, v50, v51, a7, a8, a9, a10, v52, v53, a13, a14, v78); return (unsigned int)-1; } free_token((long long *)a1, (unsigned int *)(a1 + 32), v48, v49, v50, v51); *(_DWORD *)(a1 + 88) = 0; v54 = *(char **)(a1 + 112); *(_QWORD *)(a1 + 8) = *(_QWORD *)(a1 + 36); if ( (unsigned int)js_parse_template_part(a1, v54, *(double *)a7.m128_u64, a8, a9, a10, v55, v56, a13, a14) ) return (unsigned int)-1; v16 = v79; if ( v19->m128_i32[0] != -126 ) return (unsigned int)js_parse_expect( (long long *)a1, 4294967170LL, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14); } if ( (unsigned int)v23 >= 0xFFFFFFF7 ) { v31 = *(_QWORD *)(v16 + 24); v32 = *(_DWORD *)v22; v33 = (unsigned int)(*(_DWORD *)v22 - 1); *(_DWORD *)v22 = v33; if ( v32 <= 1 ) js_free_value_rt(v31, v22, v23, v33, a5, a6); } *(_DWORD *)(a1 + 56) = 0; *(_QWORD *)(a1 + 64) = 3LL; v34 = (__m128 *)&qword_60; if ( (unsigned int)js_parse_string( a1, 96, 1, v21, &v89, &v88, *(double *)a7.m128_u64, a8, a9, a10, *(double *)a11.m128_u64, *(double *)a12.m128_u64, a13, a14) ) return (unsigned int)-1; v40 = (__m128 *)v90.m128_u64[1]; if ( (*(_DWORD *)(v90.m128_u64[1] + 4) & 0x7FFFFFFF) != 0 || !i ) { v44 = v91.m128_u64[0]; v34 = (__m128 *)v90.m128_u64[1]; v45 = emit_push_const((long long *)a1, (_DWORD *)v90.m128_u64[1], v91.m128_i64[0], 1); if ( (unsigned int)v44 >= 0xFFFFFFF7 ) { v46 = *(_QWORD *)(*(_QWORD *)a1 + 24LL); v47 = v40->m128_i32[0]; v35 = (unsigned int)(v40->m128_i32[0] - 1); v40->m128_i32[0] = v35; if ( v47 <= 1 ) { v34 = v40; js_free_value_rt(v46, v40, v44, v35, v36, v37); } } if ( v45 ) return (unsigned int)-1; if ( !i ) { if ( *(_DWORD *)(a1 + 72) == 96 ) return (unsigned int)next_token(a1, a7, a8, a9, a10, v38, v39, a13, a14, (long long)v34, v41, v35, v36, v37); v34 = (__m128 *)a1; js_parse_template_cold_1(v84, (long long *)a1); } ++i; } else { v41 = v91.m128_u64[0]; if ( v91.m128_i32[0] >= 0xFFFFFFF7 ) { v42 = *(_QWORD *)(*(_QWORD *)a1 + 24LL); v43 = *(_DWORD *)v90.m128_u64[1]; v35 = (unsigned int)(*(_DWORD *)v90.m128_u64[1] - 1); *(_DWORD *)v90.m128_u64[1] = v35; if ( v43 <= 1 ) { v34 = v40; js_free_value_rt(v42, v40, v41, v35, v36, v37); } } } if ( *(_DWORD *)(a1 + 72) != 96 ) goto LABEL_37; v75 = v84; v76 = (_QWORD *)(*v84 + 312); *(_DWORD *)(*v84 + 360) = *(_DWORD *)(*v84 + 320); dbuf_putc(v76, 36); v77 = (_QWORD *)(*v75 + 312); v34 = &v83; v83.m128_i16[0] = i - 1; dbuf_put(v77, (long long)&v83, 2LL); return (unsigned int)next_token(a1, a7, a8, a9, a10, v38, v39, a13, a14, (long long)v34, v41, v35, v36, v37); }
js_parse_template: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV R15,RDX MOV RBX,RDI MOV RDI,qword ptr [RDI] MOV dword ptr [RSP + 0x34],ESI TEST ESI,ESI MOV qword ptr [RSP + 0x18],RDI JNZ 0x0016a052 MOV EBP,0x3 XOR R12D,R12D MOV qword ptr [RSP + 0x28],0x0 MOV EAX,0x3 MOV qword ptr [RSP + 0x50],RAX LAB_00169d43: MOV qword ptr [RSP + 0x60],RBP MOV qword ptr [RSP + 0x20],R12 MOV qword ptr [RSP + 0x58],R15 CMP dword ptr [RBX + 0x20],-0x7e JNZ 0x0016a03d LEA R13,[RBX + 0x20] LEA RAX,[RBX + 0x90] MOV qword ptr [RSP + 0x48],RAX XOR EBP,EBP LAB_00169d6e: MOV R12,qword ptr [RBX + 0x30] INC R12 MOV RAX,qword ptr [R13 + 0x30] MOV qword ptr [RSP + 0xa0],RAX MOVUPS XMM0,xmmword ptr [R13] MOVUPS XMM1,xmmword ptr [R13 + 0x10] MOVUPS XMM2,xmmword ptr [R13 + 0x20] MOVAPS xmmword ptr [RSP + 0x90],XMM2 MOVAPS xmmword ptr [RSP + 0x80],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOV RSI,qword ptr [RBX + 0x38] MOV RDX,qword ptr [RBX + 0x40] CMP dword ptr [RSP + 0x34],0x0 JZ 0x00169e5e CMP EDX,-0x9 JC 0x00169dbf INC dword ptr [RSI] LAB_00169dbf: MOV qword ptr [RSP + 0x38],RSI MOV EAX,EBP XORPS XMM0,XMM0 CVTSI2SD XMM0,RAX TEST EBP,EBP MOVQ R14,XMM0 CMOVNS R14,RAX MOV qword ptr [RSP + 0x40],RDX MOV R15D,0x7 MOV EAX,0x0 CMOVNS R15,RAX MOVUPS XMM0,xmmword ptr [RSP + 0x38] MOVUPS xmmword ptr [RSP],XMM0 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x50] MOV RCX,R14 MOV R8,R15 MOV R9D,0x4004 CALL 0x001265c6 TEST EAX,EAX JS 0x0016a120 MOV RDI,RBX MOV ESI,0x60 XOR EDX,EDX MOV RCX,R12 LEA R8,[RSP + 0x70] LEA R9,[RSP + 0x68] CALL 0x00161451 TEST EAX,EAX JZ 0x00169f03 MOV dword ptr [RSP + 0x88],0x0 MOV qword ptr [RSP + 0x90],0x3 MOV EAX,0x3 JMP 0x00169f0b LAB_00169e5e: CMP EDX,-0x9 JC 0x00169e78 MOV RDI,qword ptr [RDI + 0x18] MOV EAX,dword ptr [RSI] LEA ECX,[RAX + -0x1] MOV dword ptr [RSI],ECX CMP EAX,0x1 JG 0x00169e78 CALL 0x00120d90 LAB_00169e78: MOV dword ptr [RBX + 0x38],0x0 MOV qword ptr [RBX + 0x40],0x3 MOV RDI,RBX MOV ESI,0x60 MOV EDX,0x1 MOV RCX,R12 LEA R8,[RSP + 0x70] LEA R9,[RSP + 0x68] CALL 0x00161451 TEST EAX,EAX JNZ 0x0016a120 MOV R14,qword ptr [RSP + 0x88] TEST dword ptr [R14 + 0x4],0x7fffffff JNZ 0x00169f59 TEST EBP,EBP JZ 0x00169f59 MOV RDX,qword ptr [RSP + 0x90] CMP EDX,-0x9 JC 0x00169fc3 MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX + 0x18] MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x00169fc3 MOV RSI,R14 CALL 0x00120d90 JMP 0x00169fc3 LAB_00169f03: MOV RAX,qword ptr [RSP + 0x90] LAB_00169f0b: MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x38],RCX MOV qword ptr [RSP + 0x40],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x38] MOVUPS xmmword ptr [RSP],XMM0 MOV RDX,qword ptr [RSP + 0x60] MOV RCX,R14 MOV R8,R15 MOV R9D,0x4004 CALL 0x001265c6 TEST EAX,EAX JS 0x0016a120 CMP dword ptr [RBX + 0x48],0x60 JNZ 0x00169fcd JMP 0x0016a13b LAB_00169f59: MOV R15,qword ptr [RSP + 0x90] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV ECX,0x1 CALL 0x00169c1c MOV R12D,EAX CMP R15D,-0x9 JC 0x00169f9d MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RAX + 0x18] MOV EAX,dword ptr [R14] LEA ECX,[RAX + -0x1] MOV dword ptr [R14],ECX CMP EAX,0x1 JG 0x00169f9d MOV RSI,R14 MOV RDX,R15 CALL 0x00120d90 LAB_00169f9d: TEST R12D,R12D JNZ 0x0016a120 TEST EBP,EBP JNZ 0x00169fc1 CMP dword ptr [RBX + 0x48],0x60 JZ 0x0016a1a7 MOV RDI,qword ptr [RSP + 0x48] MOV RSI,RBX CALL 0x0011415d LAB_00169fc1: INC EBP LAB_00169fc3: CMP dword ptr [RBX + 0x48],0x60 JZ 0x0016a165 LAB_00169fcd: MOV RDI,RBX CALL 0x0015f46a TEST EAX,EAX JNZ 0x0016a120 MOV RDI,RBX MOV ESI,0x1 CALL 0x0016bfae TEST EAX,EAX JNZ 0x0016a120 CMP dword ptr [R13],0x7d JNZ 0x0016a10f MOV RDI,RBX MOV RSI,R13 CALL 0x001346e8 MOV dword ptr [RBX + 0x58],0x0 MOV RAX,qword ptr [RBX + 0x24] MOV RSI,qword ptr [RBX + 0x70] MOV qword ptr [RBX + 0x8],RAX MOV RDI,RBX CALL 0x001612d0 TEST EAX,EAX JNZ 0x0016a120 INC EBP CMP dword ptr [R13],-0x7e MOV RDI,qword ptr [RSP + 0x18] JZ 0x00169d6e LAB_0016a03d: MOV RDI,RBX MOV ESI,0xffffff82 CALL 0x001654fc LAB_0016a04a: MOV R13D,EAX JMP 0x0016a126 LAB_0016a052: MOV RSI,qword ptr [RDI + 0x38] INC dword ptr [RSI] MOV EDX,0x2 CALL 0x0010f4c7 MOV RBP,RDX MOV R13D,0xffffffff CMP EBP,0x6 JZ 0x0016a126 MOV R12,RAX MOV RDI,RBX MOV RSI,RAX MOV RDX,RBP XOR ECX,ECX CALL 0x00169c1c MOV R14D,EAX CMP EBP,-0x9 MOV R8,qword ptr [RSP + 0x18] JC 0x0016a0b8 MOV RDI,qword ptr [R8 + 0x18] MOV EAX,dword ptr [R12] LEA ECX,[RAX + -0x1] MOV dword ptr [R12],ECX CMP EAX,0x1 JG 0x0016a0b8 MOV RSI,R12 MOV RDX,RBP CALL 0x00120d90 MOV R8,qword ptr [RSP + 0x18] LAB_0016a0b8: TEST R14D,R14D JNZ 0x0016a126 MOV RSI,qword ptr [R8 + 0x38] INC dword ptr [RSI] MOV RDI,R8 MOV EDX,0x2 MOV R14,R8 CALL 0x0010f4c7 CMP EDX,0x6 JZ 0x0016a126 MOV dword ptr [RSP],0x4000 MOV RDI,R14 MOV RSI,R12 MOV R9,RDX MOV RDX,RBP MOV ECX,0x71 MOV R8,RAX MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x50],R9 CALL 0x00126541 TEST EAX,EAX MOV RDI,R14 JNS 0x00169d43 JMP 0x0016a126 LAB_0016a10f: LEA RSI,[0x1a2758] MOV RDI,RBX XOR EAX,EAX CALL 0x0012fed1 LAB_0016a120: MOV R13D,0xffffffff LAB_0016a126: MOV EAX,R13D ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016a13b: MOV R14,qword ptr [RSP + 0x18] MOV RDI,R14 MOV RSI,qword ptr [RSP + 0x28] CALL 0x0016bb3e MOV RDI,R14 MOV RSI,qword ptr [RSP + 0x20] CALL 0x0016bb3e INC EBP MOV RAX,qword ptr [RSP + 0x58] MOV dword ptr [RAX],EBP JMP 0x0016a1a7 LAB_0016a165: MOV R15,qword ptr [RSP + 0x48] MOV RAX,qword ptr [R15] MOV R14D,0x138 LEA RDI,[RAX + R14*0x1] MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV ESI,0x24 CALL 0x0011b1c5 DEC EBP ADD R14,qword ptr [R15] LEA RSI,[RSP + 0x38] MOV word ptr [RSI],BP MOV EDX,0x2 MOV RDI,R14 CALL 0x0011b116 LAB_0016a1a7: MOV RDI,RBX CALL 0x0015f46a JMP 0x0016a04a
int4 js_parse_template(long *param_1,int param_2,int *param_3) { long *plVar1; int iVar2; long lVar3; long lVar4; long lVar5; int8 uVar6; int *piVar7; long *plVar8; int iVar9; int4 uVar10; int *piVar11; uint uVar12; int iVar13; double dVar14; double dVar15; int8 uVar16; int1 auVar17 [16]; int1 auVar18 [16]; int8 local_b0; int *local_a0; long lStack_98; long *local_90; int8 local_88; int *local_80; int8 local_78; int1 local_70 [8]; int local_68; int4 uStack_64; int4 uStack_60; int4 uStack_5c; int4 local_58; int4 uStack_54; int4 uStack_50; int4 uStack_4c; long local_48; int4 uStack_40; int4 uStack_3c; long local_38; lVar3 = *param_1; if (param_2 == 0) { auVar17 = ZEXT816(3) << 0x40; local_b0 = 0; local_88 = 3; } else { piVar11 = *(int **)(lVar3 + 0x38); *piVar11 = *piVar11 + 1; auVar17 = JS_NewObjectFromShape(lVar3,piVar11,2); uVar16 = auVar17._8_8_; piVar11 = auVar17._0_8_; if (auVar17._8_4_ == 6) { return 0xffffffff; } iVar13 = emit_push_const(param_1,piVar11,uVar16,0); if (0xfffffff6 < auVar17._8_4_) { uVar6 = *(int8 *)(lVar3 + 0x18); iVar9 = *piVar11; *piVar11 = iVar9 + -1; if (iVar9 < 2) { js_free_value_rt(uVar6,piVar11,uVar16); } } if (iVar13 != 0) { return 0xffffffff; } piVar7 = *(int **)(lVar3 + 0x38); *piVar7 = *piVar7 + 1; auVar18 = JS_NewObjectFromShape(lVar3,piVar7,2); local_88 = auVar18._8_8_; local_b0 = auVar18._0_8_; if (auVar18._8_4_ == 6) { return 0xffffffff; } iVar13 = JS_DefinePropertyValue(lVar3,piVar11,uVar16,0x71,local_b0,local_88,0x4000); if (iVar13 < 0) { return 0xffffffff; } } local_78 = auVar17._8_8_; local_80 = param_3; if ((int)param_1[4] == -0x7e) { plVar1 = param_1 + 4; local_90 = param_1 + 0x12; dVar14 = 0.0; do { lVar4 = param_1[6]; local_38 = param_1[10]; local_68 = (int)*plVar1; uStack_64 = *(int4 *)((long)param_1 + 0x24); uStack_60 = (int4)param_1[5]; uStack_5c = *(int4 *)((long)param_1 + 0x2c); local_58 = (int4)param_1[6]; uStack_54 = *(int4 *)((long)param_1 + 0x34); uStack_50 = (int4)param_1[7]; uStack_4c = *(int4 *)((long)param_1 + 0x3c); local_48 = param_1[8]; uStack_40 = (int4)param_1[9]; uStack_3c = *(int4 *)((long)param_1 + 0x4c); piVar11 = (int *)param_1[7]; lVar5 = param_1[8]; uVar12 = (uint)lVar5; iVar13 = SUB84(dVar14,0); if (param_2 == 0) { if (0xfffffff6 < uVar12) { uVar16 = *(int8 *)(lVar3 + 0x18); iVar9 = *piVar11; *piVar11 = iVar9 + -1; if (iVar9 < 2) { js_free_value_rt(uVar16); } } *(int4 *)(param_1 + 7) = 0; param_1[8] = 3; iVar9 = js_parse_string(param_1,0x60,1,lVar4 + 1,&local_68,local_70); lVar4 = local_48; if (iVar9 != 0) { return 0xffffffff; } piVar11 = (int *)CONCAT44(uStack_4c,uStack_50); uVar12 = (uint)local_48; if (((piVar11[1] & 0x7fffffffU) == 0) && (iVar13 != 0)) { if (0xfffffff6 < uVar12) { uVar16 = *(int8 *)(*param_1 + 0x18); iVar9 = *piVar11; *piVar11 = iVar9 + -1; if (iVar9 < 2) { js_free_value_rt(uVar16,piVar11); } } } else { iVar9 = emit_push_const(param_1,piVar11,local_48,1); if (0xfffffff6 < uVar12) { uVar16 = *(int8 *)(*param_1 + 0x18); iVar2 = *piVar11; *piVar11 = iVar2 + -1; if (iVar2 < 2) { js_free_value_rt(uVar16,piVar11,lVar4); } } if (iVar9 != 0) { return 0xffffffff; } if (iVar13 == 0) { if ((int)param_1[9] == 0x60) goto LAB_0016a1a7; js_parse_template_cold_1(local_90,param_1); } iVar13 = iVar13 + 1; } plVar8 = local_90; if ((int)param_1[9] == 0x60) { lVar3 = *local_90; *(int4 *)(lVar3 + 0x168) = *(int4 *)(lVar3 + 0x140); dbuf_putc(lVar3 + 0x138,0x24); local_a0 = (int *)CONCAT62(local_a0._2_6_,(short)iVar13 + -1); dbuf_put(*plVar8 + 0x138,&local_a0,2); LAB_0016a1a7: uVar10 = next_token(param_1); return uVar10; } } else { if (0xfffffff6 < uVar12) { *piVar11 = *piVar11 + 1; } dVar15 = (double)(long)dVar14; if (-1 < iVar13) { dVar15 = dVar14; } uVar16 = 7; if (-1 < iVar13) { uVar16 = 0; } local_a0._0_4_ = SUB84(piVar11,0); uVar10 = local_a0._0_4_; local_a0 = piVar11; lStack_98 = lVar5; iVar9 = JS_DefinePropertyValueValue (lVar3,local_b0,local_88,dVar15,uVar16,0x4004,uVar10,uVar12); if (iVar9 < 0) { return 0xffffffff; } iVar9 = js_parse_string(param_1,0x60,0,lVar4 + 1,&local_68,local_70); if (iVar9 != 0) { uStack_50 = 0; local_48 = 3; } local_a0 = (int *)CONCAT44(uStack_4c,uStack_50); lStack_98._0_4_ = (int4)local_48; uVar10 = (int4)lStack_98; lStack_98 = local_48; iVar9 = JS_DefinePropertyValueValue (lVar3,auVar17._0_8_,local_78,dVar15,uVar16,0x4004,uStack_50,uVar10); if (iVar9 < 0) { return 0xffffffff; } if ((int)param_1[9] == 0x60) { seal_template_obj(lVar3,local_b0); seal_template_obj(lVar3,auVar17._0_8_); *local_80 = iVar13 + 1; goto LAB_0016a1a7; } } iVar9 = next_token(param_1); if ((iVar9 != 0) || (iVar9 = js_parse_expr2(param_1,1), iVar9 != 0)) { return 0xffffffff; } if ((int)*plVar1 != 0x7d) { js_parse_error(param_1,"expected \'}\' after template expression"); return 0xffffffff; } free_token(param_1,plVar1); *(int4 *)(param_1 + 0xb) = 0; param_1[1] = *(long *)((long)param_1 + 0x24); iVar9 = js_parse_template_part(param_1,param_1[0xe]); if (iVar9 != 0) { return 0xffffffff; } dVar14 = (double)(ulong)(iVar13 + 1); } while ((int)*plVar1 == -0x7e); } uVar10 = js_parse_expect(param_1,0xffffff82); return uVar10; }
50,330
ma_net_safe_read
eloqsql/libmariadb/libmariadb/mariadb_lib.c
ulong ma_net_safe_read(MYSQL *mysql) { NET *net= &mysql->net; ulong len=0; restart: if (net->pvio != 0) len=ma_net_read(net); if (len == packet_error || len == 0) { end_server(mysql); #ifdef HAVE_TLS /* don't overwrite possible tls protocol errors */ if (net->last_errno != CR_SSL_CONNECTION_ERROR) #endif { my_set_error(mysql, net->last_errno == ER_NET_PACKET_TOO_LARGE ? CR_NET_PACKET_TOO_LARGE: CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0, errno); } return(packet_error); } if (net->read_pos[0] == 255) { if (len > 3) { char *pos=(char*) net->read_pos+1; uint last_errno=uint2korr(pos); pos+=2; len-=2; if (last_errno== 65535 && ((mariadb_connection(mysql) && (mysql->server_capabilities & CLIENT_PROGRESS)) || (!(mysql->extension->mariadb_server_capabilities & MARIADB_CLIENT_PROGRESS << 32)))) { if (cli_report_progress(mysql, (uchar *)pos, (uint) (len-1))) { /* Wrong packet */ my_set_error(mysql, CR_MALFORMED_PACKET, SQLSTATE_UNKNOWN, 0); return (packet_error); } goto restart; } net->last_errno= last_errno; if (pos[0]== '#') { ma_strmake(net->sqlstate, pos+1, SQLSTATE_LENGTH); pos+= SQLSTATE_LENGTH + 1; } else { strncpy(net->sqlstate, SQLSTATE_UNKNOWN, SQLSTATE_LENGTH); } ma_strmake(net->last_error,(char*) pos, min(len,sizeof(net->last_error)-1)); } else { my_set_error(mysql, CR_UNKNOWN_ERROR, SQLSTATE_UNKNOWN, 0); } mysql->server_status&= ~SERVER_MORE_RESULTS_EXIST; return(packet_error); } return len; }
O3
c
ma_net_safe_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx xorl %r12d, %r12d cmpq $0x0, (%rbx) movq %r12, %r14 je 0x1a66b movq %rbx, %rdi callq 0x368a8 movq %rax, %r14 movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpq %rax, %r14 je 0x1a792 testq %r14, %r14 je 0x1a792 movq 0x20(%rbx), %r15 cmpb $-0x1, (%r15) jne 0x1a898 cmpq $0x4, %r14 jb 0x1a814 movzwl 0x1(%r15), %eax leaq 0x3(%r15), %r13 leaq -0x2(%r14), %r12 cmpl $0xffff, %eax # imm = 0xFFFF jne 0x1a831 addl $-0x3, %r14d cmpl $0x5, %r14d jb 0x1a7ee movq 0x480(%rbx), %rax testq %rax, %rax je 0x1a657 movq 0x80(%rax), %rax testq %rax, %rax je 0x1a657 movzbl 0x9(%r15), %r8d cmpq $0xfa, %r8 ja 0x1a738 leaq 0xa(%r15), %rcx movl %r8d, %edx addq %rcx, %rdx movl %r14d, %esi addq %rsi, %r13 cmpq %r13, %rdx ja 0x1a7ee movzbl 0x4(%r15), %esi movzbl 0x5(%r15), %edx movzwl 0x6(%r15), %edi movzbl 0x8(%r15), %r9d shll $0x10, %r9d orl %edi, %r9d xorps %xmm0, %xmm0 cvtsi2sd %r9d, %xmm0 divsd 0x1e8ea(%rip), %xmm0 # 0x39018 movq %rbx, %rdi callq *%rax jmp 0x1a657 cmpq $0xfd, %r8 je 0x1a76b cmpl $0xfc, %r8d je 0x1a760 cmpl $0xfb, %r8d jne 0x1a785 leaq 0xa(%r15), %rcx movq $-0x1, %r8 jmp 0x1a6ee leaq 0xc(%r15), %rcx movzwl 0xa(%r15), %r8d jmp 0x1a6ee leaq 0xd(%r15), %rcx movzwl 0xa(%r15), %edx movzbl 0xc(%r15), %r8d shll $0x10, %r8d orq %rdx, %r8 jmp 0x1a6ee leaq 0x12(%r15), %rcx movl 0xa(%r15), %r8d jmp 0x1a6ee movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movq %rbx, %rdi callq 0x1a8aa movl 0x90(%rbx), %eax cmpl $0x7ea, %eax # imm = 0x7EA je 0x1a898 cmpl $0x481, %eax # imm = 0x481 movl $0x7e4, %eax # imm = 0x7E4 movl $0x7dd, %r15d # imm = 0x7DD cmovel %eax, %r15d leaq 0x36714(%rip), %rax # 0x50ee0 movq (%rax), %r12 callq 0x13060 movl (%rax), %r8d movq %rbx, %rdi movl %r15d, %esi movq %r12, %rdx xorl %ecx, %ecx xorl %eax, %eax callq 0x1a8dd jmp 0x1a898 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF leaq 0x366e5(%rip), %rax # 0x50ee0 movq (%rax), %rdx movq %rbx, %rdi movl $0x7eb, %esi # imm = 0x7EB xorl %ecx, %ecx xorl %eax, %eax callq 0x1a8dd jmp 0x1a898 leaq 0x366c5(%rip), %rax # 0x50ee0 movq (%rax), %rdx movq %rbx, %rdi movl $0x7d0, %esi # imm = 0x7D0 xorl %ecx, %ecx xorl %eax, %eax callq 0x1a8dd jmp 0x1a88b movl %eax, 0x90(%rbx) leaq 0x297(%rbx), %rdi cmpb $0x23, (%r13) jne 0x1a85c leaq 0x4(%r15), %rsi movl $0x5, %edx callq 0x2a20f addq $0x9, %r15 movq %r15, %r13 jmp 0x1a870 leaq 0x3667d(%rip), %rax # 0x50ee0 movq (%rax), %rsi movl $0x5, %edx callq 0x13220 leaq 0x97(%rbx), %rdi movl $0x1ff, %edx # imm = 0x1FF cmpq %rdx, %r12 cmovbq %r12, %rdx movq %r13, %rsi callq 0x2a20f movl $0xffffffff, %r14d # imm = 0xFFFFFFFF andb $-0x9, 0x380(%rbx) movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
ma_net_safe_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi xor r12d, r12d loc_1A657: cmp qword ptr [rbx], 0 mov r14, r12 jz short loc_1A66B mov rdi, rbx call ma_net_read mov r14, rax loc_1A66B: mov eax, 0FFFFFFFFh cmp r14, rax jz loc_1A792 test r14, r14 jz loc_1A792 mov r15, [rbx+20h] cmp byte ptr [r15], 0FFh jnz loc_1A898 cmp r14, 4 jb loc_1A814 movzx eax, word ptr [r15+1] lea r13, [r15+3] lea r12, [r14-2] cmp eax, 0FFFFh jnz loc_1A831 add r14d, 0FFFFFFFDh cmp r14d, 5 jb loc_1A7EE mov rax, [rbx+480h] test rax, rax jz short loc_1A657 mov rax, [rax+80h] test rax, rax jz loc_1A657 movzx r8d, byte ptr [r15+9] cmp r8, 0FAh ja short loc_1A738 lea rcx, [r15+0Ah] loc_1A6EE: mov edx, r8d add rdx, rcx mov esi, r14d add r13, rsi cmp rdx, r13 ja loc_1A7EE movzx esi, byte ptr [r15+4] movzx edx, byte ptr [r15+5] movzx edi, word ptr [r15+6] movzx r9d, byte ptr [r15+8] shl r9d, 10h or r9d, edi xorps xmm0, xmm0 cvtsi2sd xmm0, r9d divsd xmm0, cs:qword_39018 mov rdi, rbx call rax jmp loc_1A657 loc_1A738: cmp r8, 0FDh jz short loc_1A76B cmp r8d, 0FCh jz short loc_1A760 cmp r8d, 0FBh jnz short loc_1A785 lea rcx, [r15+0Ah] mov r8, 0FFFFFFFFFFFFFFFFh jmp short loc_1A6EE loc_1A760: lea rcx, [r15+0Ch] movzx r8d, word ptr [r15+0Ah] jmp short loc_1A6EE loc_1A76B: lea rcx, [r15+0Dh] movzx edx, word ptr [r15+0Ah] movzx r8d, byte ptr [r15+0Ch] shl r8d, 10h or r8, rdx jmp loc_1A6EE loc_1A785: lea rcx, [r15+12h] mov r8d, [r15+0Ah] jmp loc_1A6EE loc_1A792: mov r14d, 0FFFFFFFFh mov rdi, rbx call end_server mov eax, [rbx+90h] cmp eax, 7EAh jz loc_1A898 cmp eax, 481h mov eax, 7E4h mov r15d, 7DDh cmovz r15d, eax lea rax, SQLSTATE_UNKNOWN mov r12, [rax] call ___errno_location mov r8d, [rax] mov rdi, rbx mov esi, r15d mov rdx, r12 xor ecx, ecx xor eax, eax call my_set_error jmp loc_1A898 loc_1A7EE: mov r14d, 0FFFFFFFFh lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 7EBh xor ecx, ecx xor eax, eax call my_set_error jmp loc_1A898 loc_1A814: lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov rdi, rbx mov esi, 7D0h xor ecx, ecx xor eax, eax call my_set_error jmp short loc_1A88B loc_1A831: mov [rbx+90h], eax lea rdi, [rbx+297h] cmp byte ptr [r13+0], 23h ; '#' jnz short loc_1A85C lea rsi, [r15+4] mov edx, 5 call ma_strmake add r15, 9 mov r13, r15 jmp short loc_1A870 loc_1A85C: lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy loc_1A870: lea rdi, [rbx+97h] mov edx, 1FFh cmp r12, rdx cmovb rdx, r12 mov rsi, r13 call ma_strmake loc_1A88B: mov r14d, 0FFFFFFFFh and byte ptr [rbx+380h], 0F7h loc_1A898: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long ma_net_safe_read( long long a1, long long a2, long long a3, long long a4, unsigned long long a5, int a6) { char v6; // al unsigned long long v8; // r12 unsigned long long v9; // r14 long long v10; // r15 int v11; // eax _BYTE *v12; // r13 unsigned int v13; // r14d long long v14; // rax void ( *v15)(long long, _QWORD, _QWORD, double); // rax long long v16; // rcx int v17; // eax int v18; // r15d int v19; // r12d _DWORD *v20; // rax int v21; // r9d long long v22; // rdi long long v23; // rdx char v25; // [rsp-8h] [rbp-30h] v25 = v6; v8 = 0LL; while ( 1 ) { v9 = v8; if ( *(_QWORD *)a1 ) v9 = ma_net_read(a1); if ( v9 == 0xFFFFFFFF || !v9 ) break; v10 = *(_QWORD *)(a1 + 32); if ( *(_BYTE *)v10 != 0xFF ) return v9; if ( v9 < 4 ) { my_set_error(a1, 2000, (_DWORD)SQLSTATE_UNKNOWN, 0, a5, a6, v25); LABEL_35: v9 = 0xFFFFFFFFLL; *(_BYTE *)(a1 + 896) &= ~8u; return v9; } v11 = *(unsigned __int16 *)(v10 + 1); v12 = (_BYTE *)(v10 + 3); v8 = v9 - 2; if ( v11 != 0xFFFF ) { *(_DWORD *)(a1 + 144) = v11; v22 = a1 + 663; if ( *v12 == 35 ) { ma_strmake(v22, v10 + 4, 5LL); v12 = (_BYTE *)(v10 + 9); } else { strncpy(v22, SQLSTATE_UNKNOWN, 5LL); } v23 = 511LL; if ( v8 < 0x1FF ) v23 = v9 - 2; ma_strmake(a1 + 151, v12, v23); goto LABEL_35; } v13 = v9 - 3; if ( v13 < 5 ) goto LABEL_27; v14 = *(_QWORD *)(a1 + 1152); if ( v14 ) { v15 = *(void ( **)(long long, _QWORD, _QWORD, double))(v14 + 128); if ( v15 ) { a5 = *(unsigned __int8 *)(v10 + 9); if ( a5 > 0xFA ) { if ( a5 == 253 ) { v16 = v10 + 13; LODWORD(a5) = *(unsigned __int16 *)(v10 + 10) | (*(unsigned __int8 *)(v10 + 12) << 16); } else if ( (_DWORD)a5 == 252 ) { v16 = v10 + 12; LODWORD(a5) = *(unsigned __int16 *)(v10 + 10); } else if ( (_DWORD)a5 == 251 ) { v16 = v10 + 10; LODWORD(a5) = -1; } else { v16 = v10 + 18; LODWORD(a5) = *(_DWORD *)(v10 + 10); } } else { v16 = v10 + 10; } if ( v16 + (unsigned long long)(unsigned int)a5 > (unsigned long long)&v12[v13] ) { LABEL_27: v9 = 0xFFFFFFFFLL; my_set_error(a1, 2027, (_DWORD)SQLSTATE_UNKNOWN, 0, a5, a6, v25); return v9; } v15( a1, *(unsigned __int8 *)(v10 + 4), *(unsigned __int8 *)(v10 + 5), (double)(*(unsigned __int16 *)(v10 + 6) | (*(unsigned __int8 *)(v10 + 8) << 16)) / 1000.0); } } } v9 = 0xFFFFFFFFLL; end_server(a1); v17 = *(_DWORD *)(a1 + 144); if ( v17 != 2026 ) { v18 = 2013; if ( v17 == 1153 ) v18 = 2020; v19 = (int)SQLSTATE_UNKNOWN; v20 = (_DWORD *)__errno_location(); my_set_error(a1, v18, v19, 0, *v20, v21, v25); } return v9; }
ma_net_safe_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI XOR R12D,R12D LAB_0011a657: CMP qword ptr [RBX],0x0 MOV R14,R12 JZ 0x0011a66b MOV RDI,RBX CALL 0x001368a8 MOV R14,RAX LAB_0011a66b: MOV EAX,0xffffffff CMP R14,RAX JZ 0x0011a792 TEST R14,R14 JZ 0x0011a792 MOV R15,qword ptr [RBX + 0x20] CMP byte ptr [R15],0xff JNZ 0x0011a898 CMP R14,0x4 JC 0x0011a814 MOVZX EAX,word ptr [R15 + 0x1] LEA R13,[R15 + 0x3] LEA R12,[R14 + -0x2] CMP EAX,0xffff JNZ 0x0011a831 ADD R14D,-0x3 CMP R14D,0x5 JC 0x0011a7ee MOV RAX,qword ptr [RBX + 0x480] TEST RAX,RAX JZ 0x0011a657 MOV RAX,qword ptr [RAX + 0x80] TEST RAX,RAX JZ 0x0011a657 MOVZX R8D,byte ptr [R15 + 0x9] CMP R8,0xfa JA 0x0011a738 LEA RCX,[R15 + 0xa] LAB_0011a6ee: MOV EDX,R8D ADD RDX,RCX MOV ESI,R14D ADD R13,RSI CMP RDX,R13 JA 0x0011a7ee MOVZX ESI,byte ptr [R15 + 0x4] MOVZX EDX,byte ptr [R15 + 0x5] MOVZX EDI,word ptr [R15 + 0x6] MOVZX R9D,byte ptr [R15 + 0x8] SHL R9D,0x10 OR R9D,EDI XORPS XMM0,XMM0 CVTSI2SD XMM0,R9D DIVSD XMM0,qword ptr [0x00139018] MOV RDI,RBX CALL RAX JMP 0x0011a657 LAB_0011a738: CMP R8,0xfd JZ 0x0011a76b CMP R8D,0xfc JZ 0x0011a760 CMP R8D,0xfb JNZ 0x0011a785 LEA RCX,[R15 + 0xa] MOV R8,-0x1 JMP 0x0011a6ee LAB_0011a760: LEA RCX,[R15 + 0xc] MOVZX R8D,word ptr [R15 + 0xa] JMP 0x0011a6ee LAB_0011a76b: LEA RCX,[R15 + 0xd] MOVZX EDX,word ptr [R15 + 0xa] MOVZX R8D,byte ptr [R15 + 0xc] SHL R8D,0x10 OR R8,RDX JMP 0x0011a6ee LAB_0011a785: LEA RCX,[R15 + 0x12] MOV R8D,dword ptr [R15 + 0xa] JMP 0x0011a6ee LAB_0011a792: MOV R14D,0xffffffff MOV RDI,RBX CALL 0x0011a8aa MOV EAX,dword ptr [RBX + 0x90] CMP EAX,0x7ea JZ 0x0011a898 CMP EAX,0x481 MOV EAX,0x7e4 MOV R15D,0x7dd CMOVZ R15D,EAX LEA RAX,[0x150ee0] MOV R12,qword ptr [RAX] CALL 0x00113060 MOV R8D,dword ptr [RAX] MOV RDI,RBX MOV ESI,R15D MOV RDX,R12 XOR ECX,ECX XOR EAX,EAX CALL 0x0011a8dd JMP 0x0011a898 LAB_0011a7ee: MOV R14D,0xffffffff LEA RAX,[0x150ee0] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x7eb XOR ECX,ECX XOR EAX,EAX CALL 0x0011a8dd JMP 0x0011a898 LAB_0011a814: LEA RAX,[0x150ee0] MOV RDX,qword ptr [RAX] MOV RDI,RBX MOV ESI,0x7d0 XOR ECX,ECX XOR EAX,EAX CALL 0x0011a8dd JMP 0x0011a88b LAB_0011a831: MOV dword ptr [RBX + 0x90],EAX LEA RDI,[RBX + 0x297] CMP byte ptr [R13],0x23 JNZ 0x0011a85c LEA RSI,[R15 + 0x4] MOV EDX,0x5 CALL 0x0012a20f ADD R15,0x9 MOV R13,R15 JMP 0x0011a870 LAB_0011a85c: LEA RAX,[0x150ee0] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00113220 LAB_0011a870: LEA RDI,[RBX + 0x97] MOV EDX,0x1ff CMP R12,RDX CMOVC RDX,R12 MOV RSI,R13 CALL 0x0012a20f LAB_0011a88b: MOV R14D,0xffffffff AND byte ptr [RBX + 0x380],0xf7 LAB_0011a898: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ ulong ma_net_safe_read(long *param_1) { byte bVar1; char *pcVar2; code *pcVar3; int *puVar4; ulong uVar5; int *piVar6; char *pcVar7; uint uVar8; ulong uVar9; uint uVar10; int4 uVar11; char *pcVar12; uVar9 = 0; do { do { uVar5 = uVar9; if (*param_1 != 0) { uVar5 = ma_net_read(param_1); } if ((uVar5 == 0xffffffff) || (uVar5 == 0)) { end_server(param_1); puVar4 = SQLSTATE_UNKNOWN; if ((int)param_1[0x12] == 0x7ea) { return 0xffffffff; } uVar11 = 0x7dd; if ((int)param_1[0x12] == 0x481) { uVar11 = 0x7e4; } piVar6 = __errno_location(); my_set_error(param_1,uVar11,puVar4,0,*piVar6); return 0xffffffff; } pcVar2 = (char *)param_1[4]; if (*pcVar2 != -1) { return uVar5; } if (uVar5 < 4) { my_set_error(param_1,2000,SQLSTATE_UNKNOWN,0); LAB_0011a88b: *(byte *)(param_1 + 0x70) = *(byte *)(param_1 + 0x70) & 0xf7; return 0xffffffff; } pcVar12 = pcVar2 + 3; uVar9 = uVar5 - 2; if (*(ushort *)(pcVar2 + 1) != 0xffff) { *(uint *)(param_1 + 0x12) = (uint)*(ushort *)(pcVar2 + 1); if (*pcVar12 == '#') { ma_strmake((char *)((long)param_1 + 0x297),pcVar2 + 4,5); pcVar12 = pcVar2 + 9; } else { strncpy((char *)((long)param_1 + 0x297),SQLSTATE_UNKNOWN,5); } uVar5 = 0x1ff; if (uVar9 < 0x1ff) { uVar5 = uVar9; } ma_strmake((long)param_1 + 0x97,pcVar12,uVar5); goto LAB_0011a88b; } uVar10 = (int)uVar5 - 3; if (uVar10 < 5) goto LAB_0011a7ee; } while ((param_1[0x90] == 0) || (pcVar3 = *(code **)(param_1[0x90] + 0x80), pcVar3 == (code *)0x0)); bVar1 = pcVar2[9]; uVar8 = (uint)bVar1; if (uVar8 < 0xfb) { pcVar7 = pcVar2 + 10; } else if (uVar8 == 0xfd) { pcVar7 = pcVar2 + 0xd; uVar8 = (uint)*(uint3 *)(pcVar2 + 10); } else if (bVar1 == 0xfc) { pcVar7 = pcVar2 + 0xc; uVar8 = (uint)*(ushort *)(pcVar2 + 10); } else if (bVar1 == 0xfb) { pcVar7 = pcVar2 + 10; uVar8 = 0xffffffff; } else { pcVar7 = pcVar2 + 0x12; uVar8 = *(uint *)(pcVar2 + 10); } if (pcVar12 + uVar10 < pcVar7 + uVar8) { LAB_0011a7ee: my_set_error(param_1,0x7eb,SQLSTATE_UNKNOWN,0); return 0xffffffff; } (*pcVar3)((double)*(uint3 *)(pcVar2 + 6) / _DAT_00139018,param_1,pcVar2[4],pcVar2[5]); } while( true ); }
50,331
my_ll10tostr_mb2_or_mb4
eloqsql/strings/ctype-ucs2.c
static size_t my_ll10tostr_mb2_or_mb4(CHARSET_INFO *cs, char *dst, size_t len, int radix, longlong val) { char buffer[65]; register char *p, *db, *de; long long_val; int sl= 0; ulonglong uval= (ulonglong) val; if (radix < 0) { if (val < 0) { sl= 1; /* Avoid integer overflow in (-val) for LONGLONG_MIN (BUG#31799). */ uval = (ulonglong)0 - uval; } } p= &buffer[sizeof(buffer)-1]; *p='\0'; if (uval == 0) { *--p= '0'; goto cnv; } while (uval > (ulonglong) LONG_MAX) { ulonglong quo= uval/(uint) 10; uint rem= (uint) (uval- quo* (uint) 10); *--p= '0' + rem; uval= quo; } long_val= (long) uval; while (long_val != 0) { long quo= long_val/10; *--p= (char) ('0' + (long_val - quo*10)); long_val= quo; } cnv: if (sl) { *--p= '-'; } for ( db= dst, de= dst + len ; (dst < de) && *p ; p++) { int cnvres= my_ci_wc_mb(cs, (my_wc_t) p[0], (uchar*) dst, (uchar*) de); if (cnvres > 0) dst+= cnvres; else break; } return (int) (dst -db); }
O3
c
my_ll10tostr_mb2_or_mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %r15 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) testl %ecx, %ecx setns %al testq %r8, %r8 setns %sil orb %al, %sil movq %r8, %rcx negq %rcx testb %sil, %sil cmovneq %r8, %rcx movb $0x0, -0x40(%rbp) testq %rcx, %rcx je 0x45c9a movabsq $-0x3333333333333333, %rdi # imm = 0xCCCCCCCCCCCCCCCD js 0x45ca5 leaq -0x40(%rbp), %r13 jmp 0x45cc5 leaq -0x41(%rbp), %r13 movb $0x30, (%r13) jmp 0x45ce9 movq %rcx, %rax mulq %rdi shrq $0x3, %rdx leaq -0x41(%rbp), %r13 imull $0xf6, %edx, %eax addl %eax, %ecx addb $0x30, %cl movb %cl, (%r13) movq %rdx, %rcx movq %rcx, %rax mulq %rdi shrq $0x3, %rdx imull $0xf6, %edx, %eax addl %ecx, %eax addb $0x30, %al movb %al, -0x1(%r13) decq %r13 cmpq $0x9, %rcx movq %rdx, %rcx ja 0x45cc5 testb %sil, %sil jne 0x45cf6 movb $0x2d, -0x1(%r13) decq %r13 movq %rbx, %r12 testq %r14, %r14 jle 0x45d32 addq %rbx, %r14 movq %rbx, %r12 movsbq (%r13), %rsi testq %rsi, %rsi je 0x45d32 movq 0xb8(%r15), %rax movq %r15, %rdi movq %r12, %rdx movq %r14, %rcx callq *0x30(%rax) testl %eax, %eax jle 0x45d32 movl %eax, %eax addq %rax, %r12 incq %r13 cmpq %r14, %r12 jb 0x45d04 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x45d56 subl %ebx, %r12d movslq %r12d, %rax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x24340
my_ll10tostr_mb2_or_mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rdx mov rbx, rsi mov r15, rdi mov rax, fs:28h mov [rbp+var_30], rax test ecx, ecx setns al test r8, r8 setns sil or sil, al mov rcx, r8 neg rcx test sil, sil cmovnz rcx, r8 mov [rbp+var_40], 0 test rcx, rcx jz short loc_45C9A mov rdi, 0CCCCCCCCCCCCCCCDh js short loc_45CA5 lea r13, [rbp+var_40] jmp short loc_45CC5 loc_45C9A: lea r13, [rbp+var_41] mov byte ptr [r13+0], 30h ; '0' jmp short loc_45CE9 loc_45CA5: mov rax, rcx mul rdi shr rdx, 3 lea r13, [rbp+var_41] imul eax, edx, 0F6h add ecx, eax add cl, 30h ; '0' mov [r13+0], cl mov rcx, rdx loc_45CC5: mov rax, rcx mul rdi shr rdx, 3 imul eax, edx, 0F6h add eax, ecx add al, 30h ; '0' mov [r13-1], al dec r13 cmp rcx, 9 mov rcx, rdx ja short loc_45CC5 loc_45CE9: test sil, sil jnz short loc_45CF6 mov byte ptr [r13-1], 2Dh ; '-' dec r13 loc_45CF6: mov r12, rbx test r14, r14 jle short loc_45D32 add r14, rbx mov r12, rbx loc_45D04: movsx rsi, byte ptr [r13+0] test rsi, rsi jz short loc_45D32 mov rax, [r15+0B8h] mov rdi, r15 mov rdx, r12 mov rcx, r14 call qword ptr [rax+30h] test eax, eax jle short loc_45D32 mov eax, eax add r12, rax inc r13 cmp r12, r14 jb short loc_45D04 loc_45D32: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_45D56 sub r12d, ebx movsxd rax, r12d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_45D56: call ___stack_chk_fail
long long my_ll10tostr_mb2_or_mb4(long long a1, unsigned long long a2, long long a3, int a4, signed long long a5) { bool v6; // si unsigned long long v7; // rcx char *v8; // r13 bool v9; // cc unsigned long long v10; // r12 unsigned long long v11; // r14 int v12; // eax char v14; // [rsp+3Fh] [rbp-41h] BYREF char v15; // [rsp+40h] [rbp-40h] BYREF unsigned long long v16; // [rsp+50h] [rbp-30h] v16 = __readfsqword(0x28u); v6 = a4 >= 0 || a5 >= 0; v7 = -a5; if ( v6 ) v7 = a5; v15 = 0; if ( v7 ) { if ( (v7 & 0x8000000000000000LL) != 0LL ) { v8 = &v14; v14 = v7 % 0xA + 48; v7 /= 0xAuLL; } else { v8 = &v15; } do { *--v8 = v7 % 0xA + 48; v9 = v7 <= 9; v7 /= 0xAuLL; } while ( !v9 ); } else { v8 = &v14; v14 = 48; } if ( !v6 ) *--v8 = 45; LODWORD(v10) = a2; if ( a3 > 0 ) { v11 = a2 + a3; v10 = a2; do { if ( !*v8 ) break; v12 = (*(long long ( **)(long long, _QWORD, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 48LL))( a1, *v8, v10, v11); if ( v12 <= 0 ) break; v10 += (unsigned int)v12; ++v8; } while ( v10 < v11 ); } return (int)v10 - (int)a2; }
my_ll10tostr_mb2_or_mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RDX MOV RBX,RSI MOV R15,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX TEST ECX,ECX SETNS AL TEST R8,R8 SETNS SIL OR SIL,AL MOV RCX,R8 NEG RCX TEST SIL,SIL CMOVNZ RCX,R8 MOV byte ptr [RBP + -0x40],0x0 TEST RCX,RCX JZ 0x00145c9a MOV RDI,-0x3333333333333333 JS 0x00145ca5 LEA R13,[RBP + -0x40] JMP 0x00145cc5 LAB_00145c9a: LEA R13,[RBP + -0x41] MOV byte ptr [R13],0x30 JMP 0x00145ce9 LAB_00145ca5: MOV RAX,RCX MUL RDI SHR RDX,0x3 LEA R13,[RBP + -0x41] IMUL EAX,EDX,0xf6 ADD ECX,EAX ADD CL,0x30 MOV byte ptr [R13],CL MOV RCX,RDX LAB_00145cc5: MOV RAX,RCX MUL RDI SHR RDX,0x3 IMUL EAX,EDX,0xf6 ADD EAX,ECX ADD AL,0x30 MOV byte ptr [R13 + -0x1],AL DEC R13 CMP RCX,0x9 MOV RCX,RDX JA 0x00145cc5 LAB_00145ce9: TEST SIL,SIL JNZ 0x00145cf6 MOV byte ptr [R13 + -0x1],0x2d DEC R13 LAB_00145cf6: MOV R12,RBX TEST R14,R14 JLE 0x00145d32 ADD R14,RBX MOV R12,RBX LAB_00145d04: MOVSX RSI,byte ptr [R13] TEST RSI,RSI JZ 0x00145d32 MOV RAX,qword ptr [R15 + 0xb8] MOV RDI,R15 MOV RDX,R12 MOV RCX,R14 CALL qword ptr [RAX + 0x30] TEST EAX,EAX JLE 0x00145d32 MOV EAX,EAX ADD R12,RAX INC R13 CMP R12,R14 JC 0x00145d04 LAB_00145d32: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x00145d56 SUB R12D,EBX MOVSXD RAX,R12D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00145d56: CALL 0x00124340
long my_ll10tostr_mb2_or_mb4(long param_1,ulong param_2,long param_3,int param_4,ulong param_5) { bool bVar1; uint uVar2; ulong uVar3; ulong uVar4; char *pcVar5; long in_FS_OFFSET; char local_49 [17]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); uVar4 = -param_5; if ((long)param_5 >= 0 || param_4 >= 0) { uVar4 = param_5; } local_49[1] = 0; if (uVar4 == 0) { pcVar5 = local_49; local_49[0] = '0'; } else { if ((long)uVar4 < 0) { uVar3 = uVar4 / 10; pcVar5 = local_49; local_49[0] = (char)uVar4 + (char)uVar3 * -10 + '0'; } else { pcVar5 = local_49 + 1; uVar3 = uVar4; } do { pcVar5[-1] = (char)(uVar3 / 10) * -10 + (char)uVar3 + '0'; pcVar5 = pcVar5 + -1; bVar1 = 9 < uVar3; uVar3 = uVar3 / 10; } while (bVar1); } if ((long)param_5 < 0 && param_4 < 0) { pcVar5[-1] = '-'; pcVar5 = pcVar5 + -1; } uVar4 = param_2; if (0 < param_3) { do { if ((long)*pcVar5 == 0) break; uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x30)) (param_1,(long)*pcVar5,uVar4,param_3 + param_2); if ((int)uVar2 < 1) break; uVar4 = uVar4 + uVar2; pcVar5 = pcVar5 + 1; } while (uVar4 < param_3 + param_2); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return (long)((int)uVar4 - (int)param_2); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
50,332
translog_get_file_size
eloqsql/storage/maria/ma_loghandler.c
uint32 translog_get_file_size() { uint32 res; translog_lock(); res= log_descriptor.log_file_max_size; translog_unlock(); return (res); }
O3
c
translog_get_file_size: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx callq 0x48bf7 movl 0x3b0bdf(%rip), %ebx # 0x3fe7c0 movq 0xbb1840(%rip), %r14 # 0xbff428 movq 0x1000d0(%r14), %rdi testq %rdi, %rdi jne 0x4dc0a addq $0x100090, %r14 # imm = 0x100090 movq %r14, %rdi callq 0x291e0 movl %ebx, %eax popq %rbx popq %r14 popq %rbp retq leaq 0x3383ff(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x160(%rax) jmp 0x4dbf4
translog_get_file_size: push rbp mov rbp, rsp push r14 push rbx call translog_lock mov ebx, cs:dword_3FE7C0 mov r14, qword ptr cs:xmmword_BFF420+8 mov rdi, ds:qword_1000D0[r14] test rdi, rdi jnz short loc_4DC0A loc_4DBF4: add r14, 100090h mov rdi, r14 call _pthread_mutex_unlock mov eax, ebx pop rbx pop r14 pop rbp retn loc_4DC0A: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_4DBF4
long long translog_get_file_size() { unsigned int v0; // ebx long long v1; // r14 translog_lock(); v0 = dword_3FE7C0; v1 = *((_QWORD *)&xmmword_BFF420 + 1); if ( *(long long *)((char *)&qword_1000D0 + *((_QWORD *)&xmmword_BFF420 + 1)) ) PSI_server[44](); pthread_mutex_unlock(v1 + 1048720); return v0; }
translog_get_file_size: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX CALL 0x00148bf7 MOV EBX,dword ptr [0x004fe7c0] MOV R14,qword ptr [0x00cff428] MOV RDI,qword ptr [R14 + 0x1000d0] TEST RDI,RDI JNZ 0x0014dc0a LAB_0014dbf4: ADD R14,0x100090 MOV RDI,R14 CALL 0x001291e0 MOV EAX,EBX POP RBX POP R14 POP RBP RET LAB_0014dc0a: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014dbf4
int4 translog_get_file_size(void) { int4 uVar1; long lVar2; translog_lock(); lVar2 = DAT_00cff428; uVar1 = DAT_004fe7c0; if (*(long *)((long)&Elf64_Phdr_ARRAY_00100040[2].p_filesz + DAT_00cff428) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)((long)&Elf64_Phdr_ARRAY_00100040[1].p_paddr + lVar2)); return uVar1; }
50,333
psi_prlock_wrlock
eloqsql/mysys/my_thr_init.c
ATTRIBUTE_COLD int psi_prlock_wrlock(mysql_prlock_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_WRITELOCK, file, line); int result= rw_pr_wrlock(&that->m_prlock); if (locker) PSI_RWLOCK_CALL(end_rwlock_wrwait)(locker, result); return result; }
O0
c
psi_prlock_wrlock: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) leaq 0x1b9666(%rip), %rax # 0x214320 movq (%rax), %rax movq 0x1b0(%rax), %rax movq -0x8(%rbp), %rcx movq 0x68(%rcx), %rsi movq -0x10(%rbp), %rcx movl -0x14(%rbp), %r8d leaq -0x48(%rbp), %rdi movl $0x1, %edx callq *%rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rdi callq 0x5b370 movl %eax, -0x54(%rbp) cmpq $0x0, -0x50(%rbp) je 0x5ad10 leaq 0x1b9623(%rip), %rax # 0x214320 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_prlock_wrlock: 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+68h] mov rcx, [rbp+var_10] mov r8d, [rbp+var_14] lea rdi, [rbp+var_48] mov edx, 1 call rax mov [rbp+var_50], rax mov rdi, [rbp+var_8] call rw_pr_wrlock mov [rbp+var_54], eax cmp [rbp+var_50], 0 jz short loc_5AD10 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1B8h] mov rdi, [rbp+var_50] mov esi, [rbp+var_54] call rax loc_5AD10: mov eax, [rbp+var_54] add rsp, 60h pop rbp retn
long long psi_prlock_wrlock(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 + 104), 1LL, a2, a3); v4 = rw_pr_wrlock(v9); if ( v5 ) ((void ( *)(long long, _QWORD))PSI_server[55])(v5, v4); return v4; }
psi_prlock_wrlock: 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,[0x314320] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1b0] 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] MOV EDX,0x1 CALL RAX MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x8] CALL 0x0015b370 MOV dword ptr [RBP + -0x54],EAX CMP qword ptr [RBP + -0x50],0x0 JZ 0x0015ad10 LEA RAX,[0x314320] 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_0015ad10: MOV EAX,dword ptr [RBP + -0x54] ADD RSP,0x60 POP RBP RET
int4 psi_prlock_wrlock(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 + 0x68),1,param_2,param_3); uVar1 = rw_pr_wrlock(local_10); if (lVar2 != 0) { (**(code **)(PSI_server + 0x1b8))(lVar2,uVar1); } return uVar1; }
50,334
testing::internal::PrintTo(wchar_t const*, std::ostream*)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-printers.cc
void PrintTo(const wchar_t* s, ostream* os) { PrintCStringTo(s, os); }
O1
cpp
testing::internal::PrintTo(wchar_t const*, std::ostream*): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx testq %rdi, %rdi je 0x17ec3 movq %rdi, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x83b0 leaq 0x2c82b(%rip), %rsi # 0x446c4 movl $0xd, %edx movq %rax, %rdi callq 0x85b0 movq %r14, %rdi callq 0x8400 movq %r14, %rdi movq %rax, %rsi movq %rbx, %rdx addq $0x8, %rsp popq %rbx popq %r14 jmp 0x183e3 leaq 0x2c704(%rip), %rsi # 0x445ce movl $0x4, %edx movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x85b0
_ZN7testing8internal7PrintToEPKwPSo: push r14 push rbx push rax mov rbx, rsi test rdi, rdi jz short loc_17EC3 mov r14, rdi mov rdi, rbx mov rsi, r14 call __ZNSo9_M_insertIPKvEERSoT_; std::ostream::_M_insert<void const*>(void const*) lea rsi, aPointingTo; " pointing to " mov edx, 0Dh mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, r14 call _wcslen mov rdi, r14 mov rsi, rax mov rdx, rbx add rsp, 8 pop rbx pop r14 jmp _ZN7testing8internalL20PrintCharsAsStringToIwEENS0_10CharFormatEPKT_mPSo; testing::internal::PrintCharsAsStringTo<wchar_t>(wchar_t const*,ulong,std::ostream *) loc_17EC3: lea rsi, aNull_0; "NULL" mov edx, 4 mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long)
long long testing::internal::PrintTo(long long a1, long long a2, long long a3) { long long v3; // rax long long v4; // rax if ( !a1 ) return std::__ostream_insert<char,std::char_traits<char>>(a2, "NULL", 4LL); v3 = std::ostream::_M_insert<void const*>(a2, a1, a3); std::__ostream_insert<char,std::char_traits<char>>(v3, " pointing to ", 13LL); v4 = wcslen(a1); return testing::internal::PrintCharsAsStringTo<wchar_t>(a1, v4, a2); }
PrintTo: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RSI TEST RDI,RDI JZ 0x00117ec3 MOV R14,RDI MOV RDI,RBX MOV RSI,R14 CALL 0x001083b0 LEA RSI,[0x1446c4] MOV EDX,0xd MOV RDI,RAX CALL 0x001085b0 MOV RDI,R14 CALL 0x00108400 MOV RDI,R14 MOV RSI,RAX MOV RDX,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001183e3 LAB_00117ec3: LEA RSI,[0x1445ce] MOV EDX,0x4 MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001085b0
/* testing::internal::PrintTo(wchar_t const*, std::ostream*) */ void testing::internal::PrintTo(wchar_t *param_1,ostream *param_2) { ostream *poVar1; size_t sVar2; if (param_1 != (wchar_t *)0x0) { poVar1 = std::ostream::_M_insert<void_const*>(param_2); std::__ostream_insert<char,std::char_traits<char>>(poVar1," pointing to ",0xd); sVar2 = wcslen(param_1); PrintCharsAsStringTo<wchar_t>(param_1,sVar2,param_2); return; } std::__ostream_insert<char,std::char_traits<char>>(param_2,"NULL",4); return; }
50,335
my_like_range_win1250ch
eloqsql/strings/ctype-win1250ch.c
static my_bool my_like_range_win1250ch(CHARSET_INFO *cs __attribute__((unused)), const char *ptr, size_t ptr_length, pbool escape, pbool w_one, pbool w_many, size_t res_length, char *min_str, char *max_str, size_t *min_length, size_t *max_length) { int only_min_found= 1; const char *end = ptr + ptr_length; char *min_org = min_str; char *min_end = min_str + res_length; /* return 1; */ for (; ptr != end && min_str != min_end ; ptr++) { if (*ptr == escape && ptr+1 != end) ptr++; /* Skip escape */ else if (*ptr == w_one || *ptr == w_many) /* '_' or '%' in SQL */ break; *min_str= like_range_prefix_min_win1250ch[(uint) (uchar) (*ptr)]; if (*min_str != min_sort_char) only_min_found= 0; min_str++; *max_str++= like_range_prefix_max_win1250ch[(uint) (uchar) (*ptr)]; } if (cs->state & MY_CS_BINSORT) *min_length= (size_t) (min_str - min_org); else { /* 'a\0\0... is the smallest possible string */ *min_length= res_length; } /* a\ff\ff... is the biggest possible string */ *max_length= res_length; while (min_str != min_end) { *min_str++ = min_sort_char; *max_str++ = max_sort_char; } return (only_min_found); }
O0
c
my_like_range_win1250ch: pushq %rbp movq %rsp, %rbp movl %r8d, -0x50(%rbp) movl %ecx, %eax movl -0x50(%rbp), %ecx movl %eax, -0x4c(%rbp) movq %rdx, %rax movl -0x4c(%rbp), %edx movq %rax, -0x48(%rbp) movq %rsi, %rax movq -0x48(%rbp), %rsi movq %rax, -0x40(%rbp) movq %rdi, %r8 movq -0x40(%rbp), %rdi movb %r9b, %al movq 0x30(%rbp), %r9 movq 0x28(%rbp), %r9 movq 0x20(%rbp), %r9 movq 0x18(%rbp), %r9 movq 0x10(%rbp), %r9 movq %r8, -0x8(%rbp) movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movb %dl, -0x19(%rbp) movb %cl, -0x1a(%rbp) movb %al, -0x1b(%rbp) movl $0x1, -0x20(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x28(%rbp) movq 0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq 0x18(%rbp), %rax addq 0x10(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rcx xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x51(%rbp) je 0x6b1fc movq 0x18(%rbp), %rax cmpq -0x38(%rbp), %rax setne %al movb %al, -0x51(%rbp) movb -0x51(%rbp), %al testb $0x1, %al jne 0x6b208 jmp 0x6b2c6 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x19(%rbp), %ecx cmpl %ecx, %eax jne 0x6b233 movq -0x10(%rbp), %rax addq $0x1, %rax cmpq -0x28(%rbp), %rax je 0x6b233 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x6b255 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x1a(%rbp), %ecx cmpl %ecx, %eax je 0x6b251 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x1b(%rbp), %ecx cmpl %ecx, %eax jne 0x6b253 jmp 0x6b2c6 jmp 0x6b255 movq -0x10(%rbp), %rax movzbl (%rax), %eax movl %eax, %eax movl %eax, %ecx leaq 0x149419(%rip), %rax # 0x1b4680 movb (%rax,%rcx), %cl movq 0x18(%rbp), %rax movb %cl, (%rax) movq 0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x20, %eax je 0x6b283 movl $0x0, -0x20(%rbp) movq 0x18(%rbp), %rax addq $0x1, %rax movq %rax, 0x18(%rbp) movq -0x10(%rbp), %rax movzbl (%rax), %eax movl %eax, %eax movl %eax, %ecx leaq 0x317dbf(%rip), %rax # 0x383060 movb (%rax,%rcx), %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x6b1df movq -0x8(%rbp), %rax movl 0xc(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x6b2e9 movq 0x18(%rbp), %rcx movq -0x30(%rbp), %rax subq %rax, %rcx movq 0x28(%rbp), %rax movq %rcx, (%rax) jmp 0x6b2f4 movq 0x10(%rbp), %rcx movq 0x28(%rbp), %rax movq %rcx, (%rax) movq 0x10(%rbp), %rcx movq 0x30(%rbp), %rax movq %rcx, (%rax) movq 0x18(%rbp), %rax cmpq -0x38(%rbp), %rax je 0x6b32f movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x20, (%rax) movq 0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x20(%rbp) movb $-0x1, (%rax) jmp 0x6b2ff movl -0x20(%rbp), %eax popq %rbp retq nopw %cs:(%rax,%rax) nop
my_like_range_win1250ch: push rbp mov rbp, rsp mov [rbp+var_50], r8d mov eax, ecx mov ecx, [rbp+var_50] mov [rbp+var_4C], eax mov rax, rdx mov edx, [rbp+var_4C] mov [rbp+var_48], rax mov rax, rsi mov rsi, [rbp+var_48] mov [rbp+var_40], rax mov r8, rdi mov rdi, [rbp+var_40] mov al, r9b mov r9, [rbp+arg_20] mov r9, [rbp+arg_18] mov r9, [rbp+arg_10] mov r9, [rbp+arg_8] mov r9, [rbp+arg_0] mov [rbp+var_8], r8 mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_19], dl mov [rbp+var_1A], cl mov [rbp+var_1B], al mov [rbp+var_20], 1 mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_28], rax mov rax, [rbp+arg_8] mov [rbp+var_30], rax mov rax, [rbp+arg_8] add rax, [rbp+arg_0] mov [rbp+var_38], rax loc_6B1DF: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_51], al jz short loc_6B1FC mov rax, [rbp+arg_8] cmp rax, [rbp+var_38] setnz al mov [rbp+var_51], al loc_6B1FC: mov al, [rbp+var_51] test al, 1 jnz short loc_6B208 jmp loc_6B2C6 loc_6B208: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_19] cmp eax, ecx jnz short loc_6B233 mov rax, [rbp+var_10] add rax, 1 cmp rax, [rbp+var_28] jz short loc_6B233 mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_6B255 loc_6B233: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_1A] cmp eax, ecx jz short loc_6B251 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_1B] cmp eax, ecx jnz short loc_6B253 loc_6B251: jmp short loc_6B2C6 loc_6B253: jmp short $+2 loc_6B255: mov rax, [rbp+var_10] movzx eax, byte ptr [rax] mov eax, eax mov ecx, eax lea rax, like_range_prefix_min_win1250ch mov cl, [rax+rcx] mov rax, [rbp+arg_8] mov [rax], cl mov rax, [rbp+arg_8] movsx eax, byte ptr [rax] cmp eax, 20h ; ' ' jz short loc_6B283 mov [rbp+var_20], 0 loc_6B283: mov rax, [rbp+arg_8] add rax, 1 mov [rbp+arg_8], rax mov rax, [rbp+var_10] movzx eax, byte ptr [rax] mov eax, eax mov ecx, eax lea rax, like_range_prefix_max_win1250ch mov cl, [rax+rcx] mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp loc_6B1DF loc_6B2C6: mov rax, [rbp+var_8] mov eax, [rax+0Ch] and eax, 10h cmp eax, 0 jz short loc_6B2E9 mov rcx, [rbp+arg_8] mov rax, [rbp+var_30] sub rcx, rax mov rax, [rbp+arg_18] mov [rax], rcx jmp short loc_6B2F4 loc_6B2E9: mov rcx, [rbp+arg_0] mov rax, [rbp+arg_18] mov [rax], rcx loc_6B2F4: mov rcx, [rbp+arg_0] mov rax, [rbp+arg_20] mov [rax], rcx loc_6B2FF: mov rax, [rbp+arg_8] cmp rax, [rbp+var_38] jz short loc_6B32F mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 20h ; ' ' mov rax, [rbp+arg_10] mov rcx, rax add rcx, 1 mov [rbp+arg_10], rcx mov byte ptr [rax], 0FFh jmp short loc_6B2FF loc_6B32F: mov eax, [rbp+var_20] pop rbp retn
long long my_like_range_win1250ch( long long a1, unsigned __int8 *a2, long long a3, char a4, char a5, char a6, long long a7, _BYTE *a8, _BYTE *a9, _QWORD *a10, _QWORD *a11) { _BYTE *v11; // rax _BYTE *v12; // rax _BYTE *v13; // rax bool v15; // [rsp+1h] [rbp-51h] _BYTE *v16; // [rsp+1Ah] [rbp-38h] _BYTE *v17; // [rsp+22h] [rbp-30h] char *v18; // [rsp+2Ah] [rbp-28h] unsigned int v19; // [rsp+32h] [rbp-20h] unsigned __int8 *v20; // [rsp+42h] [rbp-10h] v20 = a2; v19 = 1; v18 = (char *)&a2[a3]; v17 = a8; v16 = &a8[a7]; while ( 1 ) { v15 = 0; if ( v20 != (unsigned __int8 *)v18 ) v15 = a8 != v16; if ( !v15 ) break; if ( (char)*v20 != a4 || v20 + 1 == (unsigned __int8 *)v18 ) { if ( (char)*v20 == a5 || (char)*v20 == a6 ) break; } else { ++v20; } *a8 = like_range_prefix_min_win1250ch[*v20]; if ( *a8 != 32 ) v19 = 0; ++a8; v11 = a9++; *v11 = like_range_prefix_max_win1250ch[*v20++]; } if ( (*(_DWORD *)(a1 + 12) & 0x10) != 0 ) *a10 = a8 - v17; else *a10 = a7; *a11 = a7; while ( a8 != v16 ) { v12 = a8++; *v12 = 32; v13 = a9++; *v13 = -1; } return v19; }
my_like_range_win1250ch: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x50],R8D MOV EAX,ECX MOV ECX,dword ptr [RBP + -0x50] MOV dword ptr [RBP + -0x4c],EAX MOV RAX,RDX MOV EDX,dword ptr [RBP + -0x4c] MOV qword ptr [RBP + -0x48],RAX MOV RAX,RSI MOV RSI,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x40],RAX MOV R8,RDI MOV RDI,qword ptr [RBP + -0x40] MOV AL,R9B MOV R9,qword ptr [RBP + 0x30] MOV R9,qword ptr [RBP + 0x28] MOV R9,qword ptr [RBP + 0x20] MOV R9,qword ptr [RBP + 0x18] MOV R9,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x8],R8 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV byte ptr [RBP + -0x19],DL MOV byte ptr [RBP + -0x1a],CL MOV byte ptr [RBP + -0x1b],AL MOV dword ptr [RBP + -0x20],0x1 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + 0x18] ADD RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x38],RAX LAB_0016b1df: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x51],AL JZ 0x0016b1fc MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x38] SETNZ AL MOV byte ptr [RBP + -0x51],AL LAB_0016b1fc: MOV AL,byte ptr [RBP + -0x51] TEST AL,0x1 JNZ 0x0016b208 JMP 0x0016b2c6 LAB_0016b208: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x19] CMP EAX,ECX JNZ 0x0016b233 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x28] JZ 0x0016b233 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x0016b255 LAB_0016b233: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x1a] CMP EAX,ECX JZ 0x0016b251 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x1b] CMP EAX,ECX JNZ 0x0016b253 LAB_0016b251: JMP 0x0016b2c6 LAB_0016b253: JMP 0x0016b255 LAB_0016b255: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x2b4680] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + 0x18] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] MOVSX EAX,byte ptr [RAX] CMP EAX,0x20 JZ 0x0016b283 MOV dword ptr [RBP + -0x20],0x0 LAB_0016b283: MOV RAX,qword ptr [RBP + 0x18] ADD RAX,0x1 MOV qword ptr [RBP + 0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x483060] 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 RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x0016b1df LAB_0016b2c6: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x10 CMP EAX,0x0 JZ 0x0016b2e9 MOV RCX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + -0x30] SUB RCX,RAX MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX JMP 0x0016b2f4 LAB_0016b2e9: MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX LAB_0016b2f4: MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],RCX LAB_0016b2ff: MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0016b32f MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x20 MOV RAX,qword ptr [RBP + 0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x20],RCX MOV byte ptr [RAX],0xff JMP 0x0016b2ff LAB_0016b32f: MOV EAX,dword ptr [RBP + -0x20] POP RBP RET
int4 my_like_range_win1250ch (long param_1,byte *param_2,long param_3,byte param_4,byte param_5,byte param_6, long param_7,char *param_8,int1 *param_9,long *param_10,long *param_11) { char *pcVar1; char *pcVar2; int4 local_28; byte *local_18; pcVar1 = param_8; local_28 = 1; pcVar2 = param_8 + param_7; for (local_18 = param_2; local_18 != param_2 + param_3 && param_8 != pcVar2; local_18 = local_18 + 1) { if ((*local_18 == param_4) && (local_18 + 1 != param_2 + param_3)) { local_18 = local_18 + 1; } else if ((*local_18 == param_5) || (*local_18 == param_6)) break; *param_8 = like_range_prefix_min_win1250ch[*local_18]; if (*param_8 != ' ') { local_28 = 0; } param_8 = param_8 + 1; *param_9 = like_range_prefix_max_win1250ch[*local_18]; param_9 = param_9 + 1; } if ((*(uint *)(param_1 + 0xc) & 0x10) == 0) { *param_10 = param_7; } else { *param_10 = (long)param_8 - (long)pcVar1; } *param_11 = param_7; while (param_8 != pcVar2) { *param_8 = ' '; *param_9 = 0xff; param_8 = param_8 + 1; param_9 = param_9 + 1; } return local_28; }
50,336
void rapidjson::GenericReader<rapidjson::UTF8<char>, rapidjson::UTF8<char>, rapidjson::CrtAllocator>::ParseTrue<0u, rapidjson::GenericStringStream<rapidjson::UTF8<char>>, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>>&, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>&)
mnn-tts/MNN/3rd_party/rapidjson/reader.h
void ParseTrue(InputStream& is, Handler& handler) { RAPIDJSON_ASSERT(is.Peek() == 't'); is.Take(); if (RAPIDJSON_LIKELY(Consume(is, 'r') && Consume(is, 'u') && Consume(is, 'e'))) { if (RAPIDJSON_UNLIKELY(!handler.Bool(true))) RAPIDJSON_PARSE_ERROR(kParseErrorTermination, is.Tell()); } else RAPIDJSON_PARSE_ERROR(kParseErrorValueInvalid, is.Tell()); }
O0
c
void rapidjson::GenericReader<rapidjson::UTF8<char>, rapidjson::UTF8<char>, rapidjson::CrtAllocator>::ParseTrue<0u, rapidjson::GenericStringStream<rapidjson::UTF8<char>>, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>>&, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>&): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x18(%rsp), %rdi callq 0x7420 movsbl %al, %eax cmpl $0x74, %eax jne 0x7901 jmp 0x7920 leaq 0x8f1e(%rip), %rdi # 0x10826 leaq 0x8af6(%rip), %rsi # 0x10405 movl $0x364, %edx # imm = 0x364 leaq 0x8f1c(%rip), %rcx # 0x10837 callq 0x30c0 movq 0x18(%rsp), %rdi callq 0x76b0 movq 0x18(%rsp), %rdi movl $0x72, %esi callq 0x9980 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0x7(%rsp) jne 0x7948 jmp 0x7979 movq 0x18(%rsp), %rdi movl $0x75, %esi callq 0x9980 movb %al, %cl xorl %eax, %eax testb $0x1, %cl movb %al, 0x7(%rsp) jne 0x7966 jmp 0x7979 movq 0x18(%rsp), %rdi movl $0x65, %esi callq 0x9980 movb %al, 0x7(%rsp) movb 0x7(%rsp), %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x798a jmp 0x7a18 movq 0x10(%rsp), %rdi movl $0x1, %esi callq 0x9d30 xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x79a5 jmp 0x7a16 jmp 0x79a7 jmp 0x79a9 movq 0x8(%rsp), %rdi callq 0x7400 xorb $-0x1, %al testb $0x1, %al jne 0x79bb jmp 0x79bd jmp 0x79dc leaq 0x8a30(%rip), %rdi # 0x103f4 leaq 0x8a3a(%rip), %rsi # 0x10405 movl $0x369, %edx # imm = 0x369 leaq 0x8e60(%rip), %rcx # 0x10837 callq 0x30c0 movq 0x18(%rsp), %rdi callq 0x7460 movq 0x8(%rsp), %rdi movq %rax, %rdx movl $0x10, %esi callq 0x7430 jmp 0x79fa movq 0x8(%rsp), %rdi callq 0x7400 xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x7a0e jmp 0x7a10 jmp 0x7a89 jmp 0x7a12 jmp 0x7a14 jmp 0x7a16 jmp 0x7a89 jmp 0x7a1a jmp 0x7a1c movq 0x8(%rsp), %rdi callq 0x7400 xorb $-0x1, %al testb $0x1, %al jne 0x7a2e jmp 0x7a30 jmp 0x7a4f leaq 0x89bd(%rip), %rdi # 0x103f4 leaq 0x89c7(%rip), %rsi # 0x10405 movl $0x36c, %edx # imm = 0x36C leaq 0x8ded(%rip), %rcx # 0x10837 callq 0x30c0 movq 0x18(%rsp), %rdi callq 0x7460 movq 0x8(%rsp), %rdi movq %rax, %rdx movl $0x3, %esi callq 0x7430 jmp 0x7a6d movq 0x8(%rsp), %rdi callq 0x7400 xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x7a81 jmp 0x7a83 jmp 0x7a89 jmp 0x7a85 jmp 0x7a87 jmp 0x7a89 addq $0x28, %rsp retq nop
_ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE9ParseTrueILj0ENS_19GenericStringStreamIS2_EENS_15GenericDocumentIS2_NS_19MemoryPoolAllocatorIS3_EES3_EEEEvRT0_RT1_: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_18], rdx mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax mov rdi, [rsp+28h+var_10] call _ZNK9rapidjson19GenericStringStreamINS_4UTF8IcEEE4PeekEv; rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Peek(void) movsx eax, al cmp eax, 74h ; 't' jnz short loc_7901 jmp short loc_7920 loc_7901: lea rdi, aIsPeekT; "is.Peek() == 't'" lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/mnn-tt"... mov edx, 364h lea rcx, aVoidRapidjsonG_0; "void rapidjson::GenericReader<rapidjson"... call ___assert_fail loc_7920: mov rdi, [rsp+28h+var_10] call _ZN9rapidjson19GenericStringStreamINS_4UTF8IcEEE4TakeEv; rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Take(void) mov rdi, [rsp+28h+var_10] mov esi, 72h ; 'r' call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE7ConsumeINS_19GenericStringStreamIS2_EEEEbRT_NS8_2ChE; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>> &,rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Ch) mov cl, al xor eax, eax test cl, 1 mov [rsp+28h+var_21], al jnz short loc_7948 jmp short loc_7979 loc_7948: mov rdi, [rsp+28h+var_10] mov esi, 75h ; 'u' call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE7ConsumeINS_19GenericStringStreamIS2_EEEEbRT_NS8_2ChE; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>> &,rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Ch) mov cl, al xor eax, eax test cl, 1 mov [rsp+28h+var_21], al jnz short loc_7966 jmp short loc_7979 loc_7966: mov rdi, [rsp+28h+var_10] mov esi, 65h ; 'e' call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE7ConsumeINS_19GenericStringStreamIS2_EEEEbRT_NS8_2ChE; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(rapidjson::GenericStringStream<rapidjson::UTF8<char>> &,rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Ch) mov [rsp+28h+var_21], al loc_7979: mov al, [rsp+28h+var_21] xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_798A jmp loc_7A18 loc_798A: mov rdi, [rsp+28h+var_18] mov esi, 1 call _ZN9rapidjson15GenericDocumentINS_4UTF8IcEENS_19MemoryPoolAllocatorINS_12CrtAllocatorEEES4_E4BoolEb; rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>::Bool(bool) xor al, 0FFh xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_79A5 jmp short loc_7A16 loc_79A5: jmp short $+2 loc_79A7: jmp short $+2 loc_79A9: mov rdi, [rsp+28h+var_20] call _ZNK9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE13HasParseErrorEv; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(void) xor al, 0FFh test al, 1 jnz short loc_79BB jmp short loc_79BD loc_79BB: jmp short loc_79DC loc_79BD: lea rdi, aHasparseerror; "!HasParseError()" lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/mnn-tt"... mov edx, 369h lea rcx, aVoidRapidjsonG_0; "void rapidjson::GenericReader<rapidjson"... call ___assert_fail loc_79DC: mov rdi, [rsp+28h+var_10] call _ZNK9rapidjson19GenericStringStreamINS_4UTF8IcEEE4TellEv; rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Tell(void) mov rdi, [rsp+28h+var_20] mov rdx, rax mov esi, 10h call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE13SetParseErrorENS_14ParseErrorCodeEm; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::SetParseError(rapidjson::ParseErrorCode,ulong) jmp short $+2 loc_79FA: mov rdi, [rsp+28h+var_20] call _ZNK9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE13HasParseErrorEv; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(void) xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_7A0E jmp short loc_7A10 loc_7A0E: jmp short loc_7A89 loc_7A10: jmp short $+2 loc_7A12: jmp short $+2 loc_7A14: jmp short $+2 loc_7A16: jmp short loc_7A89 loc_7A18: jmp short $+2 loc_7A1A: jmp short $+2 loc_7A1C: mov rdi, [rsp+28h+var_20] call _ZNK9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE13HasParseErrorEv; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(void) xor al, 0FFh test al, 1 jnz short loc_7A2E jmp short loc_7A30 loc_7A2E: jmp short loc_7A4F loc_7A30: lea rdi, aHasparseerror; "!HasParseError()" lea rsi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/mnn-tt"... mov edx, 36Ch lea rcx, aVoidRapidjsonG_0; "void rapidjson::GenericReader<rapidjson"... call ___assert_fail loc_7A4F: mov rdi, [rsp+28h+var_10] call _ZNK9rapidjson19GenericStringStreamINS_4UTF8IcEEE4TellEv; rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Tell(void) mov rdi, [rsp+28h+var_20] mov rdx, rax mov esi, 3 call _ZN9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE13SetParseErrorENS_14ParseErrorCodeEm; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::SetParseError(rapidjson::ParseErrorCode,ulong) jmp short $+2 loc_7A6D: mov rdi, [rsp+28h+var_20] call _ZNK9rapidjson13GenericReaderINS_4UTF8IcEES2_NS_12CrtAllocatorEE13HasParseErrorEv; rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(void) xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_7A81 jmp short loc_7A83 loc_7A81: jmp short loc_7A89 loc_7A83: jmp short $+2 loc_7A85: jmp short $+2 loc_7A87: jmp short $+2 loc_7A89: add rsp, 28h retn
char rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::ParseTrue<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>( long long a1, _QWORD *a2, long long a3) { char result; // al long long v4; // rax long long v5; // rax char v6; // [rsp+7h] [rbp-21h] if ( rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Peek((long long)a2) != 116 ) __assert_fail( "is.Peek() == 't'", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/reader.h", 868LL, "void rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<>>::ParseTrue(InputStream &, Handler &) [SourceEn" "coding = rapidjson::UTF8<>, TargetEncoding = rapidjson::UTF8<>, StackAllocator = rapidjson::CrtAllocator, parseFla" "gs = 0U, InputStream = rapidjson::GenericStringStream<rapidjson::UTF8<>>, Handler = rapidjson::GenericDocument<rap" "idjson::UTF8<>>]"); rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Take(a2); v6 = 0; if ( (rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>( a2, 114LL) & 1) != 0 ) { v6 = 0; if ( (rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>( a2, 117LL) & 1) != 0 ) v6 = rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>( a2, 101LL); } if ( (v6 & 1) != 0 ) { result = ~(unsigned __int8)rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>::Bool( a3, 1LL); if ( (result & 1) != 0 ) { if ( (rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(a1) & 1) != 0 ) __assert_fail( "!HasParseError()", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/reader.h", 873LL, "void rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<>>::ParseTrue(InputStream &, Handler &) [Sour" "ceEncoding = rapidjson::UTF8<>, TargetEncoding = rapidjson::UTF8<>, StackAllocator = rapidjson::CrtAllocator, " "parseFlags = 0U, InputStream = rapidjson::GenericStringStream<rapidjson::UTF8<>>, Handler = rapidjson::Generic" "Document<rapidjson::UTF8<>>]"); v4 = rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Tell(a2); rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::SetParseError( a1, 0x10u, v4); return rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(a1); } } else { if ( (rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(a1) & 1) != 0 ) __assert_fail( "!HasParseError()", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/reader.h", 876LL, "void rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<>>::ParseTrue(InputStream &, Handler &) [Source" "Encoding = rapidjson::UTF8<>, TargetEncoding = rapidjson::UTF8<>, StackAllocator = rapidjson::CrtAllocator, pars" "eFlags = 0U, InputStream = rapidjson::GenericStringStream<rapidjson::UTF8<>>, Handler = rapidjson::GenericDocume" "nt<rapidjson::UTF8<>>]"); v5 = rapidjson::GenericStringStream<rapidjson::UTF8<char>>::Tell(a2); rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::SetParseError( a1, 3u, v5); return rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>::HasParseError(a1); } return result; }
ParseTrue<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>>: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV RDI,qword ptr [RSP + 0x18] CALL 0x00107420 MOVSX EAX,AL CMP EAX,0x74 JNZ 0x00107901 JMP 0x00107920 LAB_00107901: LEA RDI,[0x110826] LEA RSI,[0x110405] MOV EDX,0x364 LEA RCX,[0x110837] CALL 0x001030c0 LAB_00107920: MOV RDI,qword ptr [RSP + 0x18] CALL 0x001076b0 MOV RDI,qword ptr [RSP + 0x18] MOV ESI,0x72 CALL 0x00109980 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RSP + 0x7],AL JNZ 0x00107948 JMP 0x00107979 LAB_00107948: MOV RDI,qword ptr [RSP + 0x18] MOV ESI,0x75 CALL 0x00109980 MOV CL,AL XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RSP + 0x7],AL JNZ 0x00107966 JMP 0x00107979 LAB_00107966: MOV RDI,qword ptr [RSP + 0x18] MOV ESI,0x65 CALL 0x00109980 MOV byte ptr [RSP + 0x7],AL LAB_00107979: MOV AL,byte ptr [RSP + 0x7] XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x0010798a JMP 0x00107a18 LAB_0010798a: MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0x1 CALL 0x00109d30 XOR AL,0xff XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x001079a5 JMP 0x00107a16 LAB_001079a5: JMP 0x001079a7 LAB_001079a7: JMP 0x001079a9 LAB_001079a9: MOV RDI,qword ptr [RSP + 0x8] CALL 0x00107400 XOR AL,0xff TEST AL,0x1 JNZ 0x001079bb JMP 0x001079bd LAB_001079bb: JMP 0x001079dc LAB_001079bd: LEA RDI,[0x1103f4] LEA RSI,[0x110405] MOV EDX,0x369 LEA RCX,[0x110837] CALL 0x001030c0 LAB_001079dc: MOV RDI,qword ptr [RSP + 0x18] CALL 0x00107460 MOV RDI,qword ptr [RSP + 0x8] MOV RDX,RAX MOV ESI,0x10 CALL 0x00107430 JMP 0x001079fa LAB_001079fa: MOV RDI,qword ptr [RSP + 0x8] CALL 0x00107400 XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x00107a0e JMP 0x00107a10 LAB_00107a0e: JMP 0x00107a89 LAB_00107a10: JMP 0x00107a12 LAB_00107a12: JMP 0x00107a14 LAB_00107a14: JMP 0x00107a16 LAB_00107a16: JMP 0x00107a89 LAB_00107a18: JMP 0x00107a1a LAB_00107a1a: JMP 0x00107a1c LAB_00107a1c: MOV RDI,qword ptr [RSP + 0x8] CALL 0x00107400 XOR AL,0xff TEST AL,0x1 JNZ 0x00107a2e JMP 0x00107a30 LAB_00107a2e: JMP 0x00107a4f LAB_00107a30: LEA RDI,[0x1103f4] LEA RSI,[0x110405] MOV EDX,0x36c LEA RCX,[0x110837] CALL 0x001030c0 LAB_00107a4f: MOV RDI,qword ptr [RSP + 0x18] CALL 0x00107460 MOV RDI,qword ptr [RSP + 0x8] MOV RDX,RAX MOV ESI,0x3 CALL 0x00107430 JMP 0x00107a6d LAB_00107a6d: MOV RDI,qword ptr [RSP + 0x8] CALL 0x00107400 XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x00107a81 JMP 0x00107a83 LAB_00107a81: JMP 0x00107a89 LAB_00107a83: JMP 0x00107a85 LAB_00107a85: JMP 0x00107a87 LAB_00107a87: JMP 0x00107a89 LAB_00107a89: ADD RSP,0x28 RET
/* void rapidjson::GenericReader<rapidjson::UTF8<char>, rapidjson::UTF8<char>, rapidjson::CrtAllocator>::ParseTrue<0u, rapidjson::GenericStringStream<rapidjson::UTF8<char> >, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator> >(rapidjson::GenericStringStream<rapidjson::UTF8<char> >&, rapidjson::GenericDocument<rapidjson::UTF8<char>, rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>, rapidjson::CrtAllocator>&) */ void __thiscall rapidjson::GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator>:: ParseTrue<0u,rapidjson::GenericStringStream<rapidjson::UTF8<char>>,rapidjson::GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator>> (GenericReader<rapidjson::UTF8<char>,rapidjson::UTF8<char>,rapidjson::CrtAllocator> *this, GenericStringStream *param_1,GenericDocument *param_2) { char cVar1; bool bVar2; byte bVar3; int8 uVar4; bool local_21; cVar1 = GenericStringStream<rapidjson::UTF8<char>>::Peek ((GenericStringStream<rapidjson::UTF8<char>> *)param_1); if (cVar1 != 't') { /* WARNING: Subroutine does not return */ __assert_fail("is.Peek() == \'t\'", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/reader.h",0x364, "void rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<>>::ParseTrue(InputStream &, Handler &) [SourceEncoding = rapidjson::UTF8<>, TargetEncoding = rapidjson::UTF8<>, StackAllocator = rapidjson::CrtAllocator, parseFlags = 0U, InputStream = rapidjson::GenericStringStream<rapidjson::UTF8<>>, Handler = rapidjson::GenericDocument<rapidjson::UTF8<>>]" ); } GenericStringStream<rapidjson::UTF8<char>>::Take ((GenericStringStream<rapidjson::UTF8<char>> *)param_1); bVar2 = Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(param_1,0x72); local_21 = false; if (bVar2) { bVar2 = Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(param_1,0x75); local_21 = false; if (bVar2) { local_21 = Consume<rapidjson::GenericStringStream<rapidjson::UTF8<char>>>(param_1,0x65); } } if (local_21 == false) { bVar3 = HasParseError(this); if (((bVar3 ^ 0xff) & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("!HasParseError()", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/reader.h", 0x36c, "void rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<>>::ParseTrue(InputStream &, Handler &) [SourceEncoding = rapidjson::UTF8<>, TargetEncoding = rapidjson::UTF8<>, StackAllocator = rapidjson::CrtAllocator, parseFlags = 0U, InputStream = rapidjson::GenericStringStream<rapidjson::UTF8<>>, Handler = rapidjson::GenericDocument<rapidjson::UTF8<>>]" ); } uVar4 = GenericStringStream<rapidjson::UTF8<char>>::Tell ((GenericStringStream<rapidjson::UTF8<char>> *)param_1); SetParseError(this,3,uVar4); HasParseError(this); } else { bVar3 = GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> ::Bool((GenericDocument<rapidjson::UTF8<char>,rapidjson::MemoryPoolAllocator<rapidjson::CrtAllocator>,rapidjson::CrtAllocator> *)param_2,true); if (((bVar3 ^ 0xff) & 1) != 0) { bVar3 = HasParseError(this); if (((bVar3 ^ 0xff) & 1) == 0) { /* WARNING: Subroutine does not return */ __assert_fail("!HasParseError()", "/workspace/llm4binary/github2025/mnn-tts/MNN/3rd_party/rapidjson/reader.h", 0x369, "void rapidjson::GenericReader<rapidjson::UTF8<>, rapidjson::UTF8<>>::ParseTrue(InputStream &, Handler &) [SourceEncoding = rapidjson::UTF8<>, TargetEncoding = rapidjson::UTF8<>, StackAllocator = rapidjson::CrtAllocator, parseFlags = 0U, InputStream = rapidjson::GenericStringStream<rapidjson::UTF8<>>, Handler = rapidjson::GenericDocument<rapidjson::UTF8<>>]" ); } uVar4 = GenericStringStream<rapidjson::UTF8<char>>::Tell ((GenericStringStream<rapidjson::UTF8<char>> *)param_1); SetParseError(this,0x10,uVar4); HasParseError(this); } } return; }
50,337
translog_scanner_get_page
eloqsql/storage/maria/ma_loghandler.c
static my_bool translog_scanner_get_page(TRANSLOG_SCANNER_DATA *scanner) { TRANSLOG_VALIDATOR_DATA data; DBUG_ENTER("translog_scanner_get_page"); data.addr= &scanner->page_addr; data.was_recovered= 0; DBUG_RETURN((scanner->page= translog_get_page(&data, scanner->buffer, (scanner->use_direct_link ? &scanner->direct_link : NULL))) == NULL); }
O0
c
translog_scanner_get_page: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x2000, %rax # imm = 0x2000 movq %rax, -0x18(%rbp) movb $0x0, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax movsbl 0x202d(%rax), %eax cmpl $0x0, %eax je 0x560a6 movq -0x8(%rbp), %rax addq $0x2020, %rax # imm = 0x2020 movq %rax, -0x28(%rbp) jmp 0x560ae xorl %eax, %eax movq %rax, -0x28(%rbp) jmp 0x560ae movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx leaq -0x18(%rbp), %rdi callq 0x53510 movq -0x8(%rbp), %rcx movq %rax, 0x2018(%rcx) cmpq $0x0, %rax sete %al andb $0x1, %al movzbl %al, %eax movb %al, -0x29(%rbp) movb -0x29(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
translog_scanner_get_page: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov rax, [rbp+var_8] add rax, 2000h mov [rbp+var_18], rax mov [rbp+var_10], 0 mov rax, [rbp+var_8] mov [rbp+var_20], rax mov rax, [rbp+var_8] movsx eax, byte ptr [rax+202Dh] cmp eax, 0 jz short loc_560A6 mov rax, [rbp+var_8] add rax, 2020h mov [rbp+var_28], rax jmp short loc_560AE loc_560A6: xor eax, eax mov [rbp+var_28], rax jmp short $+2 loc_560AE: mov rsi, [rbp+var_20] mov rdx, [rbp+var_28] lea rdi, [rbp+var_18] call translog_get_page mov rcx, [rbp+var_8] mov [rcx+2018h], rax cmp rax, 0 setz al and al, 1 movzx eax, al mov [rbp+var_29], al mov al, [rbp+var_29] add rsp, 30h pop rbp retn
_BOOL8 translog_scanner_get_page(long long a1) { long long page; // rax long long *v3; // [rsp+18h] [rbp-18h] BYREF char v4; // [rsp+20h] [rbp-10h] long long v5; // [rsp+28h] [rbp-8h] v5 = a1; v3 = (long long *)(a1 + 0x2000); v4 = 0; if ( *(_BYTE *)(a1 + 8237) ) page = translog_get_page(&v3, a1, (char *)(v5 + 8224)); else page = translog_get_page(&v3, a1, 0LL); *(_QWORD *)(v5 + 8216) = page; return page == 0; }
translog_scanner_get_page: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2000 MOV qword ptr [RBP + -0x18],RAX MOV byte ptr [RBP + -0x10],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] MOVSX EAX,byte ptr [RAX + 0x202d] CMP EAX,0x0 JZ 0x001560a6 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x2020 MOV qword ptr [RBP + -0x28],RAX JMP 0x001560ae LAB_001560a6: XOR EAX,EAX MOV qword ptr [RBP + -0x28],RAX JMP 0x001560ae LAB_001560ae: MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] LEA RDI,[RBP + -0x18] CALL 0x00153510 MOV RCX,qword ptr [RBP + -0x8] MOV qword ptr [RCX + 0x2018],RAX CMP RAX,0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x29],AL MOV AL,byte ptr [RBP + -0x29] ADD RSP,0x30 POP RBP RET
bool translog_scanner_get_page(long param_1) { long lVar1; long local_30; long local_20; int1 local_18; long local_10; local_20 = param_1 + 0x2000; local_18 = 0; if (*(char *)(param_1 + 0x202d) == '\0') { local_30 = 0; } else { local_30 = param_1 + 0x2020; } local_10 = param_1; lVar1 = translog_get_page(&local_20,param_1,local_30); *(long *)(local_10 + 0x2018) = lVar1; return lVar1 == 0; }
50,338
JS_NewObjectFromShape
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_NewObjectFromShape(JSContext *ctx, JSShape *sh, JSClassID class_id) { JSObject *p; js_trigger_gc(ctx->rt, sizeof(JSObject)); p = js_malloc(ctx, sizeof(JSObject)); if (unlikely(!p)) goto fail; p->class_id = class_id; p->extensible = TRUE; p->free_mark = 0; p->is_exotic = 0; p->fast_array = 0; p->is_constructor = 0; p->is_uncatchable_error = 0; p->tmp_mark = 0; p->is_HTMLDDA = 0; p->first_weak_ref = NULL; p->u.opaque = NULL; p->shape = sh; p->prop = js_malloc(ctx, sizeof(JSProperty) * sh->prop_size); if (unlikely(!p->prop)) { js_free(ctx, p); fail: js_free_shape(ctx->rt, sh); return JS_EXCEPTION; } switch(class_id) { case JS_CLASS_OBJECT: break; case JS_CLASS_ARRAY: { JSProperty *pr; p->is_exotic = 1; p->fast_array = 1; p->u.array.u.values = NULL; p->u.array.count = 0; p->u.array.u1.size = 0; /* the length property is always the first one */ if (likely(sh == ctx->array_shape)) { pr = &p->prop[0]; } else { /* only used for the first array */ /* cannot fail */ pr = add_property(ctx, p, JS_ATOM_length, JS_PROP_WRITABLE | JS_PROP_LENGTH); } pr->u.value = js_int32(0); } break; case JS_CLASS_C_FUNCTION: p->prop[0].u.value = JS_UNDEFINED; break; case JS_CLASS_ARGUMENTS: case JS_CLASS_UINT8C_ARRAY: case JS_CLASS_INT8_ARRAY: case JS_CLASS_UINT8_ARRAY: case JS_CLASS_INT16_ARRAY: case JS_CLASS_UINT16_ARRAY: case JS_CLASS_INT32_ARRAY: case JS_CLASS_UINT32_ARRAY: case JS_CLASS_BIG_INT64_ARRAY: case JS_CLASS_BIG_UINT64_ARRAY: case JS_CLASS_FLOAT16_ARRAY: case JS_CLASS_FLOAT32_ARRAY: case JS_CLASS_FLOAT64_ARRAY: p->is_exotic = 1; p->fast_array = 1; p->u.array.u.ptr = NULL; p->u.array.count = 0; break; case JS_CLASS_DATAVIEW: p->u.array.u.ptr = NULL; p->u.array.count = 0; break; case JS_CLASS_NUMBER: case JS_CLASS_STRING: case JS_CLASS_BOOLEAN: case JS_CLASS_SYMBOL: case JS_CLASS_DATE: case JS_CLASS_BIG_INT: p->u.object_data = JS_UNDEFINED; goto set_exotic; case JS_CLASS_REGEXP: p->u.regexp.pattern = NULL; p->u.regexp.bytecode = NULL; goto set_exotic; default: set_exotic: if (ctx->rt->class_array[class_id].exotic) { p->is_exotic = 1; } break; } p->header.ref_count = 1; add_gc_object(ctx->rt, &p->header, JS_GC_OBJ_TYPE_JS_OBJECT); return JS_MKPTR(JS_TAG_OBJECT, p); }
O0
c
JS_NewObjectFromShape: subq $0x78, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movl %edx, 0x54(%rsp) movq 0x60(%rsp), %rax movq 0x18(%rax), %rdi movl $0x48, %esi callq 0x5dcd0 movq 0x60(%rsp), %rdi movl $0x48, %esi callq 0x21cb0 movq %rax, 0x48(%rsp) cmpq $0x0, 0x48(%rsp) setne %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x2a0fa jmp 0x2a20c movl 0x54(%rsp), %eax movw %ax, %cx movq 0x48(%rsp), %rax movw %cx, 0x6(%rax) movq 0x48(%rsp), %rax movb 0x5(%rax), %cl andb $-0x2, %cl orb $0x1, %cl movb %cl, 0x5(%rax) movq 0x48(%rsp), %rax movb 0x5(%rax), %cl andb $-0x3, %cl orb $0x0, %cl movb %cl, 0x5(%rax) movq 0x48(%rsp), %rax movb 0x5(%rax), %cl andb $-0x5, %cl orb $0x0, %cl movb %cl, 0x5(%rax) movq 0x48(%rsp), %rax movb 0x5(%rax), %cl andb $-0x9, %cl orb $0x0, %cl movb %cl, 0x5(%rax) movq 0x48(%rsp), %rax movb 0x5(%rax), %cl andb $-0x11, %cl orb $0x0, %cl movb %cl, 0x5(%rax) movq 0x48(%rsp), %rax movb 0x5(%rax), %cl andb $-0x21, %cl orb $0x0, %cl movb %cl, 0x5(%rax) movq 0x48(%rsp), %rax movb 0x5(%rax), %cl andb $-0x41, %cl orb $0x0, %cl movb %cl, 0x5(%rax) movq 0x48(%rsp), %rax movb 0x5(%rax), %cl andb $0x7f, %cl orb $0x0, %cl movb %cl, 0x5(%rax) movq 0x48(%rsp), %rax movq $0x0, 0x28(%rax) movq 0x48(%rsp), %rax movq $0x0, 0x30(%rax) movq 0x58(%rsp), %rcx movq 0x48(%rsp), %rax movq %rcx, 0x18(%rax) movq 0x60(%rsp), %rdi movq 0x58(%rsp), %rax movslq 0x24(%rax), %rsi shlq $0x4, %rsi callq 0x21cb0 movq %rax, %rcx movq 0x48(%rsp), %rax movq %rcx, 0x20(%rax) movq 0x48(%rsp), %rax cmpq $0x0, 0x20(%rax) setne %al xorb $-0x1, %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x2a235 movq 0x60(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x21db0 movq 0x60(%rsp), %rax movq 0x18(%rax), %rdi movq 0x58(%rsp), %rsi callq 0x5d690 movl $0x0, 0x68(%rsp) movq $0x6, 0x70(%rsp) jmp 0x2a46e movl 0x54(%rsp), %eax decl %eax movl %eax, %ecx movq %rcx, 0x8(%rsp) subl $0x21, %eax ja 0x2a404 movq 0x8(%rsp), %rax leaq 0xe028d(%rip), %rcx # 0x10a4e4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax jmp 0x2a43b movq 0x48(%rsp), %rax movb 0x5(%rax), %cl andb $-0x5, %cl orb $0x4, %cl movb %cl, 0x5(%rax) movq 0x48(%rsp), %rax movb 0x5(%rax), %cl andb $-0x9, %cl orb $0x8, %cl movb %cl, 0x5(%rax) movq 0x48(%rsp), %rax movq $0x0, 0x38(%rax) movq 0x48(%rsp), %rax movl $0x0, 0x40(%rax) movq 0x48(%rsp), %rax movl $0x0, 0x30(%rax) movq 0x58(%rsp), %rax movq 0x60(%rsp), %rcx cmpq 0x38(%rcx), %rax sete %al xorb $-0x1, %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x2a2de movq 0x48(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x40(%rsp) jmp 0x2a2fc movq 0x60(%rsp), %rdi movq 0x48(%rsp), %rsi movl $0x32, %edx movl $0xa, %ecx callq 0x5dd40 movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax movq %rax, (%rsp) xorl %edi, %edi callq 0x33cc0 movq %rax, %rcx movq (%rsp), %rax movq %rcx, 0x30(%rsp) movq %rdx, 0x38(%rsp) movq 0x30(%rsp), %rcx movq %rcx, (%rax) movq 0x38(%rsp), %rcx movq %rcx, 0x8(%rax) jmp 0x2a43b movq 0x48(%rsp), %rax movq 0x20(%rax), %rax movl $0x0, 0x20(%rsp) movq $0x3, 0x28(%rsp) movq 0x20(%rsp), %rcx movq %rcx, (%rax) movq 0x28(%rsp), %rcx movq %rcx, 0x8(%rax) jmp 0x2a43b movq 0x48(%rsp), %rax movb 0x5(%rax), %cl andb $-0x5, %cl orb $0x4, %cl movb %cl, 0x5(%rax) movq 0x48(%rsp), %rax movb 0x5(%rax), %cl andb $-0x9, %cl orb $0x8, %cl movb %cl, 0x5(%rax) movq 0x48(%rsp), %rax movq $0x0, 0x38(%rax) movq 0x48(%rsp), %rax movl $0x0, 0x40(%rax) jmp 0x2a43b movq 0x48(%rsp), %rax movq $0x0, 0x38(%rax) movq 0x48(%rsp), %rax movl $0x0, 0x40(%rax) jmp 0x2a43b movq 0x48(%rsp), %rax movl $0x0, 0x10(%rsp) movq $0x3, 0x18(%rsp) movq 0x10(%rsp), %rcx movq %rcx, 0x30(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x38(%rax) jmp 0x2a406 movq 0x48(%rsp), %rax movq $0x0, 0x30(%rax) movq 0x48(%rsp), %rax movq $0x0, 0x38(%rax) jmp 0x2a406 jmp 0x2a406 movq 0x60(%rsp), %rax movq 0x18(%rax), %rax movq 0x80(%rax), %rax movl 0x54(%rsp), %ecx imulq $0x28, %rcx, %rcx addq %rcx, %rax cmpq $0x0, 0x20(%rax) je 0x2a439 movq 0x48(%rsp), %rax movb 0x5(%rax), %cl andb $-0x5, %cl orb $0x4, %cl movb %cl, 0x5(%rax) jmp 0x2a43b movq 0x48(%rsp), %rax movl $0x1, (%rax) movq 0x60(%rsp), %rax movq 0x18(%rax), %rdi movq 0x48(%rsp), %rsi xorl %edx, %edx callq 0x240d0 movq 0x48(%rsp), %rax movq %rax, 0x68(%rsp) movq $-0x1, 0x70(%rsp) movq 0x68(%rsp), %rax movq 0x70(%rsp), %rdx addq $0x78, %rsp retq nopl (%rax)
JS_NewObjectFromShape: sub rsp, 78h mov [rsp+78h+var_18], rdi mov [rsp+78h+var_20], rsi mov [rsp+78h+var_24], edx mov rax, [rsp+78h+var_18] mov rdi, [rax+18h] mov esi, 48h ; 'H' call js_trigger_gc mov rdi, [rsp+78h+var_18] mov esi, 48h ; 'H' call js_malloc mov [rsp+78h+var_30], rax cmp [rsp+78h+var_30], 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_2A0FA jmp loc_2A20C loc_2A0FA: mov eax, [rsp+78h+var_24] mov cx, ax mov rax, [rsp+78h+var_30] mov [rax+6], cx mov rax, [rsp+78h+var_30] mov cl, [rax+5] and cl, 0FEh or cl, 1 mov [rax+5], cl mov rax, [rsp+78h+var_30] mov cl, [rax+5] and cl, 0FDh or cl, 0 mov [rax+5], cl mov rax, [rsp+78h+var_30] mov cl, [rax+5] and cl, 0FBh or cl, 0 mov [rax+5], cl mov rax, [rsp+78h+var_30] mov cl, [rax+5] and cl, 0F7h or cl, 0 mov [rax+5], cl mov rax, [rsp+78h+var_30] mov cl, [rax+5] and cl, 0EFh or cl, 0 mov [rax+5], cl mov rax, [rsp+78h+var_30] mov cl, [rax+5] and cl, 0DFh or cl, 0 mov [rax+5], cl mov rax, [rsp+78h+var_30] mov cl, [rax+5] and cl, 0BFh or cl, 0 mov [rax+5], cl mov rax, [rsp+78h+var_30] mov cl, [rax+5] and cl, 7Fh or cl, 0 mov [rax+5], cl mov rax, [rsp+78h+var_30] mov qword ptr [rax+28h], 0 mov rax, [rsp+78h+var_30] mov qword ptr [rax+30h], 0 mov rcx, [rsp+78h+var_20] mov rax, [rsp+78h+var_30] mov [rax+18h], rcx mov rdi, [rsp+78h+var_18] mov rax, [rsp+78h+var_20] movsxd rsi, dword ptr [rax+24h] shl rsi, 4 call js_malloc mov rcx, rax mov rax, [rsp+78h+var_30] mov [rax+20h], rcx mov rax, [rsp+78h+var_30] cmp qword ptr [rax+20h], 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_2A235 mov rdi, [rsp+78h+var_18] mov rsi, [rsp+78h+var_30] call js_free loc_2A20C: mov rax, [rsp+78h+var_18] mov rdi, [rax+18h] mov rsi, [rsp+78h+var_20] call js_free_shape mov dword ptr [rsp+78h+var_10], 0 mov [rsp+78h+var_8], 6 jmp loc_2A46E loc_2A235: mov eax, [rsp+78h+var_24] dec eax; switch 34 cases mov ecx, eax mov [rsp+78h+var_70], rcx sub eax, 21h ja def_2A25E; jumptable 000000000002A25E default case, cases 3,9,11,13-17,19,20 mov rax, [rsp+78h+var_70] lea rcx, jpt_2A25E movsxd rax, ds:(jpt_2A25E - 10A4E4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_2A260: jmp loc_2A43B; jumptable 000000000002A25E case 1 loc_2A265: mov rax, [rsp+78h+var_30]; jumptable 000000000002A25E case 2 mov cl, [rax+5] and cl, 0FBh or cl, 4 mov [rax+5], cl mov rax, [rsp+78h+var_30] mov cl, [rax+5] and cl, 0F7h or cl, 8 mov [rax+5], cl mov rax, [rsp+78h+var_30] mov qword ptr [rax+38h], 0 mov rax, [rsp+78h+var_30] mov dword ptr [rax+40h], 0 mov rax, [rsp+78h+var_30] mov dword ptr [rax+30h], 0 mov rax, [rsp+78h+var_20] mov rcx, [rsp+78h+var_18] cmp rax, [rcx+38h] setz al xor al, 0FFh xor al, 0FFh and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_2A2DE mov rax, [rsp+78h+var_30] mov rax, [rax+20h] mov [rsp+78h+var_38], rax jmp short loc_2A2FC loc_2A2DE: mov rdi, [rsp+78h+var_18] mov rsi, [rsp+78h+var_30] mov edx, 32h ; '2' mov ecx, 0Ah call add_property mov [rsp+78h+var_38], rax loc_2A2FC: mov rax, [rsp+78h+var_38] mov [rsp+78h+var_78], rax xor edi, edi call js_int32 mov rcx, rax mov rax, [rsp+78h+var_78] mov [rsp+78h+var_48], rcx mov [rsp+78h+var_40], rdx mov rcx, [rsp+78h+var_48] mov [rax], rcx mov rcx, [rsp+78h+var_40] mov [rax+8], rcx jmp loc_2A43B loc_2A333: mov rax, [rsp+78h+var_30]; jumptable 000000000002A25E case 12 mov rax, [rax+20h] mov dword ptr [rsp+78h+var_58], 0 mov [rsp+78h+var_50], 3 mov rcx, [rsp+78h+var_58] mov [rax], rcx mov rcx, [rsp+78h+var_50] mov [rax+8], rcx jmp loc_2A43B loc_2A363: mov rax, [rsp+78h+var_30]; jumptable 000000000002A25E cases 8,21-32 mov cl, [rax+5] and cl, 0FBh or cl, 4 mov [rax+5], cl mov rax, [rsp+78h+var_30] mov cl, [rax+5] and cl, 0F7h or cl, 8 mov [rax+5], cl mov rax, [rsp+78h+var_30] mov qword ptr [rax+38h], 0 mov rax, [rsp+78h+var_30] mov dword ptr [rax+40h], 0 jmp loc_2A43B loc_2A3A3: mov rax, [rsp+78h+var_30]; jumptable 000000000002A25E case 33 mov qword ptr [rax+38h], 0 mov rax, [rsp+78h+var_30] mov dword ptr [rax+40h], 0 jmp short loc_2A43B loc_2A3BE: mov rax, [rsp+78h+var_30]; jumptable 000000000002A25E cases 4-7,10,34 mov dword ptr [rsp+78h+var_68], 0 mov [rsp+78h+var_60], 3 mov rcx, [rsp+78h+var_68] mov [rax+30h], rcx mov rcx, [rsp+78h+var_60] mov [rax+38h], rcx jmp short loc_2A406 loc_2A3E8: mov rax, [rsp+78h+var_30]; jumptable 000000000002A25E case 18 mov qword ptr [rax+30h], 0 mov rax, [rsp+78h+var_30] mov qword ptr [rax+38h], 0 jmp short loc_2A406 def_2A25E: jmp short $+2; jumptable 000000000002A25E default case, cases 3,9,11,13-17,19,20 loc_2A406: mov rax, [rsp+78h+var_18] mov rax, [rax+18h] mov rax, [rax+80h] mov ecx, [rsp+78h+var_24] imul rcx, 28h ; '(' add rax, rcx cmp qword ptr [rax+20h], 0 jz short loc_2A439 mov rax, [rsp+78h+var_30] mov cl, [rax+5] and cl, 0FBh or cl, 4 mov [rax+5], cl loc_2A439: jmp short $+2 loc_2A43B: mov rax, [rsp+78h+var_30] mov dword ptr [rax], 1 mov rax, [rsp+78h+var_18] mov rdi, [rax+18h] mov rsi, [rsp+78h+var_30] xor edx, edx call add_gc_object mov rax, [rsp+78h+var_30] mov [rsp+78h+var_10], rax mov [rsp+78h+var_8], 0FFFFFFFFFFFFFFFFh loc_2A46E: mov rax, [rsp+78h+var_10] mov rdx, [rsp+78h+var_8] add rsp, 78h retn
long long JS_NewObjectFromShape(long long a1, long long a2, unsigned int a3) { long long v3; // rdx _QWORD *v4; // rax long long v6; // [rsp+10h] [rbp-68h] long long v7; // [rsp+20h] [rbp-58h] _QWORD *v8; // [rsp+40h] [rbp-38h] long long v9; // [rsp+48h] [rbp-30h] long long v11; // [rsp+68h] [rbp-10h] js_trigger_gc(*(_QWORD *)(a1 + 24), 72LL); v9 = js_malloc(a1, 72LL); if ( !v9 ) goto LABEL_4; *(_WORD *)(v9 + 6) = a3; *(_BYTE *)(v9 + 5) = *(_BYTE *)(v9 + 5) & 0xFE | 1; *(_BYTE *)(v9 + 5) &= ~2u; *(_BYTE *)(v9 + 5) &= ~4u; *(_BYTE *)(v9 + 5) &= ~8u; *(_BYTE *)(v9 + 5) &= ~0x10u; *(_BYTE *)(v9 + 5) &= ~0x20u; *(_BYTE *)(v9 + 5) &= ~0x40u; *(_BYTE *)(v9 + 5) &= ~0x80u; *(_QWORD *)(v9 + 40) = 0LL; *(_QWORD *)(v9 + 48) = 0LL; *(_QWORD *)(v9 + 24) = a2; *(_QWORD *)(v9 + 32) = js_malloc(a1, 16LL * *(int *)(a2 + 36)); if ( !*(_QWORD *)(v9 + 32) ) { js_free(a1, v9); LABEL_4: js_free_shape(*(_QWORD *)(a1 + 24), a2); LODWORD(v11) = 0; return v11; } switch ( a3 ) { case 1u: goto LABEL_17; case 2u: *(_BYTE *)(v9 + 5) = *(_BYTE *)(v9 + 5) & 0xFB | 4; *(_BYTE *)(v9 + 5) = *(_BYTE *)(v9 + 5) & 0xF7 | 8; *(_QWORD *)(v9 + 56) = 0LL; *(_DWORD *)(v9 + 64) = 0; *(_DWORD *)(v9 + 48) = 0; if ( a2 == *(_QWORD *)(a1 + 56) ) v8 = *(_QWORD **)(v9 + 32); else v8 = (_QWORD *)add_property(a1, v9, 50LL, 10LL); *v8 = js_int32(0LL); v8[1] = v3; goto LABEL_17; case 4u: case 5u: case 6u: case 7u: case 0xAu: case 0x22u: LODWORD(v6) = 0; *(_QWORD *)(v9 + 48) = v6; *(_QWORD *)(v9 + 56) = 3LL; goto LABEL_15; case 8u: case 0x15u: case 0x16u: case 0x17u: case 0x18u: case 0x19u: case 0x1Au: case 0x1Bu: case 0x1Cu: case 0x1Du: case 0x1Eu: case 0x1Fu: case 0x20u: *(_BYTE *)(v9 + 5) = *(_BYTE *)(v9 + 5) & 0xFB | 4; *(_BYTE *)(v9 + 5) = *(_BYTE *)(v9 + 5) & 0xF7 | 8; *(_QWORD *)(v9 + 56) = 0LL; *(_DWORD *)(v9 + 64) = 0; goto LABEL_17; case 0xCu: v4 = *(_QWORD **)(v9 + 32); LODWORD(v7) = 0; *v4 = v7; v4[1] = 3LL; goto LABEL_17; case 0x12u: *(_QWORD *)(v9 + 48) = 0LL; *(_QWORD *)(v9 + 56) = 0LL; goto LABEL_15; case 0x21u: *(_QWORD *)(v9 + 56) = 0LL; *(_DWORD *)(v9 + 64) = 0; goto LABEL_17; default: LABEL_15: if ( *(_QWORD *)(40LL * a3 + *(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 32) ) *(_BYTE *)(v9 + 5) = *(_BYTE *)(v9 + 5) & 0xFB | 4; LABEL_17: *(_DWORD *)v9 = 1; add_gc_object(*(_QWORD *)(a1 + 24), v9, 0); v11 = v9; break; } return v11; }
JS_NewObjectFromShape: SUB RSP,0x78 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV dword ptr [RSP + 0x54],EDX MOV RAX,qword ptr [RSP + 0x60] MOV RDI,qword ptr [RAX + 0x18] MOV ESI,0x48 CALL 0x0015dcd0 MOV RDI,qword ptr [RSP + 0x60] MOV ESI,0x48 CALL 0x00121cb0 MOV qword ptr [RSP + 0x48],RAX CMP qword ptr [RSP + 0x48],0x0 SETNZ AL XOR AL,0xff XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0012a0fa JMP 0x0012a20c LAB_0012a0fa: MOV EAX,dword ptr [RSP + 0x54] MOV CX,AX MOV RAX,qword ptr [RSP + 0x48] MOV word ptr [RAX + 0x6],CX MOV RAX,qword ptr [RSP + 0x48] MOV CL,byte ptr [RAX + 0x5] AND CL,0xfe OR CL,0x1 MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RSP + 0x48] MOV CL,byte ptr [RAX + 0x5] AND CL,0xfd OR CL,0x0 MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RSP + 0x48] MOV CL,byte ptr [RAX + 0x5] AND CL,0xfb OR CL,0x0 MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RSP + 0x48] MOV CL,byte ptr [RAX + 0x5] AND CL,0xf7 OR CL,0x0 MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RSP + 0x48] MOV CL,byte ptr [RAX + 0x5] AND CL,0xef OR CL,0x0 MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RSP + 0x48] MOV CL,byte ptr [RAX + 0x5] AND CL,0xdf OR CL,0x0 MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RSP + 0x48] MOV CL,byte ptr [RAX + 0x5] AND CL,0xbf OR CL,0x0 MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RSP + 0x48] MOV CL,byte ptr [RAX + 0x5] AND CL,0x7f OR CL,0x0 MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x28],0x0 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x30],0x0 MOV RCX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x18],RCX MOV RDI,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RSP + 0x58] MOVSXD RSI,dword ptr [RAX + 0x24] SHL RSI,0x4 CALL 0x00121cb0 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RSP + 0x48] CMP qword ptr [RAX + 0x20],0x0 SETNZ AL XOR AL,0xff XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0012a235 MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00121db0 LAB_0012a20c: MOV RAX,qword ptr [RSP + 0x60] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x58] CALL 0x0015d690 MOV dword ptr [RSP + 0x68],0x0 MOV qword ptr [RSP + 0x70],0x6 JMP 0x0012a46e LAB_0012a235: MOV EAX,dword ptr [RSP + 0x54] DEC EAX MOV ECX,EAX MOV qword ptr [RSP + 0x8],RCX SUB EAX,0x21 JA 0x0012a404 MOV RAX,qword ptr [RSP + 0x8] LEA RCX,[0x20a4e4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: JMP 0x0012a43b caseD_2: MOV RAX,qword ptr [RSP + 0x48] MOV CL,byte ptr [RAX + 0x5] AND CL,0xfb OR CL,0x4 MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RSP + 0x48] MOV CL,byte ptr [RAX + 0x5] AND CL,0xf7 OR CL,0x8 MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x38],0x0 MOV RAX,qword ptr [RSP + 0x48] MOV dword ptr [RAX + 0x40],0x0 MOV RAX,qword ptr [RSP + 0x48] MOV dword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RSP + 0x60] CMP RAX,qword ptr [RCX + 0x38] SETZ AL XOR AL,0xff XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x0012a2de MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x40],RAX JMP 0x0012a2fc LAB_0012a2de: MOV RDI,qword ptr [RSP + 0x60] MOV RSI,qword ptr [RSP + 0x48] MOV EDX,0x32 MOV ECX,0xa CALL 0x0015dd40 MOV qword ptr [RSP + 0x40],RAX LAB_0012a2fc: MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP],RAX XOR EDI,EDI CALL 0x00133cc0 MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV qword ptr [RSP + 0x30],RCX MOV qword ptr [RSP + 0x38],RDX MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x8],RCX JMP 0x0012a43b caseD_c: MOV RAX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RAX + 0x20] MOV dword ptr [RSP + 0x20],0x0 MOV qword ptr [RSP + 0x28],0x3 MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x8],RCX JMP 0x0012a43b caseD_8: MOV RAX,qword ptr [RSP + 0x48] MOV CL,byte ptr [RAX + 0x5] AND CL,0xfb OR CL,0x4 MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RSP + 0x48] MOV CL,byte ptr [RAX + 0x5] AND CL,0xf7 OR CL,0x8 MOV byte ptr [RAX + 0x5],CL MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x38],0x0 MOV RAX,qword ptr [RSP + 0x48] MOV dword ptr [RAX + 0x40],0x0 JMP 0x0012a43b caseD_21: MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x38],0x0 MOV RAX,qword ptr [RSP + 0x48] MOV dword ptr [RAX + 0x40],0x0 JMP 0x0012a43b caseD_4: MOV RAX,qword ptr [RSP + 0x48] MOV dword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x18],0x3 MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x30],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x38],RCX JMP 0x0012a406 caseD_12: MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x30],0x0 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x38],0x0 JMP 0x0012a406 caseD_3: JMP 0x0012a406 LAB_0012a406: MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RSP + 0x54] IMUL RCX,RCX,0x28 ADD RAX,RCX CMP qword ptr [RAX + 0x20],0x0 JZ 0x0012a439 MOV RAX,qword ptr [RSP + 0x48] MOV CL,byte ptr [RAX + 0x5] AND CL,0xfb OR CL,0x4 MOV byte ptr [RAX + 0x5],CL LAB_0012a439: JMP 0x0012a43b LAB_0012a43b: MOV RAX,qword ptr [RSP + 0x48] MOV dword ptr [RAX],0x1 MOV RAX,qword ptr [RSP + 0x60] MOV RDI,qword ptr [RAX + 0x18] MOV RSI,qword ptr [RSP + 0x48] XOR EDX,EDX CALL 0x001240d0 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],-0x1 LAB_0012a46e: MOV RAX,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x70] ADD RSP,0x78 RET
int1 [16] JS_NewObjectFromShape(long param_1,long param_2,uint param_3) { long *plVar1; int4 *puVar2; int8 uVar3; int1 auVar4 [16]; uint uStack_64; uint uStack_54; int1 (*local_38) [16]; int4 local_10; int4 uStack_c; int8 local_8; js_trigger_gc(*(int8 *)(param_1 + 0x18),0x48); puVar2 = (int4 *)js_malloc(param_1,0x48); if (puVar2 == (int4 *)0x0) { LAB_0012a20c: js_free_shape(*(int8 *)(param_1 + 0x18),param_2); local_10 = 0; local_8 = 6; goto LAB_0012a46e; } *(short *)((long)puVar2 + 6) = (short)param_3; *(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xfe | 1; *(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xfd; *(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xfb; *(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xf7; *(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xef; *(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xdf; *(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xbf; *(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0x7f; *(int8 *)(puVar2 + 10) = 0; *(int8 *)(puVar2 + 0xc) = 0; *(long *)(puVar2 + 6) = param_2; uVar3 = js_malloc(param_1,(long)*(int *)(param_2 + 0x24) << 4); *(int8 *)(puVar2 + 8) = uVar3; if (*(long *)(puVar2 + 8) == 0) { js_free(param_1,puVar2); goto LAB_0012a20c; } switch(param_3) { case 1: break; case 2: *(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xfb | 4; *(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xf7 | 8; *(int8 *)(puVar2 + 0xe) = 0; puVar2[0x10] = 0; puVar2[0xc] = 0; if (param_2 == *(long *)(param_1 + 0x38)) { local_38 = *(int1 (**) [16])(puVar2 + 8); } else { local_38 = (int1 (*) [16])add_property(param_1,puVar2,0x32,10); } auVar4 = js_int32(0); *local_38 = auVar4; break; default: goto LAB_0012a406; case 4: case 5: case 6: case 7: case 10: case 0x22: *(ulong *)(puVar2 + 0xc) = (ulong)uStack_64 << 0x20; *(int8 *)(puVar2 + 0xe) = 3; goto LAB_0012a406; case 8: case 0x15: case 0x16: case 0x17: case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: case 0x20: *(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xfb | 4; *(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xf7 | 8; *(int8 *)(puVar2 + 0xe) = 0; puVar2[0x10] = 0; break; case 0xc: plVar1 = *(long **)(puVar2 + 8); *plVar1 = (ulong)uStack_54 << 0x20; plVar1[1] = 3; break; case 0x12: *(int8 *)(puVar2 + 0xc) = 0; *(int8 *)(puVar2 + 0xe) = 0; LAB_0012a406: if (*(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + (ulong)param_3 * 0x28 + 0x20) != 0) { *(byte *)((long)puVar2 + 5) = *(byte *)((long)puVar2 + 5) & 0xfb | 4; } break; case 0x21: *(int8 *)(puVar2 + 0xe) = 0; puVar2[0x10] = 0; } *puVar2 = 1; add_gc_object(*(int8 *)(param_1 + 0x18),puVar2,0); local_10 = SUB84(puVar2,0); uStack_c = (int4)((ulong)puVar2 >> 0x20); local_8 = 0xffffffffffffffff; LAB_0012a46e: auVar4._4_4_ = uStack_c; auVar4._0_4_ = local_10; auVar4._8_8_ = local_8; return auVar4; }
50,339
JS_NewObjectFromShape
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_NewObjectFromShape(JSContext *ctx, JSShape *sh, JSClassID class_id) { JSObject *p; js_trigger_gc(ctx->rt, sizeof(JSObject)); p = js_malloc(ctx, sizeof(JSObject)); if (unlikely(!p)) goto fail; p->class_id = class_id; p->extensible = TRUE; p->free_mark = 0; p->is_exotic = 0; p->fast_array = 0; p->is_constructor = 0; p->is_uncatchable_error = 0; p->tmp_mark = 0; p->is_HTMLDDA = 0; p->first_weak_ref = NULL; p->u.opaque = NULL; p->shape = sh; p->prop = js_malloc(ctx, sizeof(JSProperty) * sh->prop_size); if (unlikely(!p->prop)) { js_free(ctx, p); fail: js_free_shape(ctx->rt, sh); return JS_EXCEPTION; } switch(class_id) { case JS_CLASS_OBJECT: break; case JS_CLASS_ARRAY: { JSProperty *pr; p->is_exotic = 1; p->fast_array = 1; p->u.array.u.values = NULL; p->u.array.count = 0; p->u.array.u1.size = 0; /* the length property is always the first one */ if (likely(sh == ctx->array_shape)) { pr = &p->prop[0]; } else { /* only used for the first array */ /* cannot fail */ pr = add_property(ctx, p, JS_ATOM_length, JS_PROP_WRITABLE | JS_PROP_LENGTH); } pr->u.value = js_int32(0); } break; case JS_CLASS_C_FUNCTION: p->prop[0].u.value = JS_UNDEFINED; break; case JS_CLASS_ARGUMENTS: case JS_CLASS_UINT8C_ARRAY: case JS_CLASS_INT8_ARRAY: case JS_CLASS_UINT8_ARRAY: case JS_CLASS_INT16_ARRAY: case JS_CLASS_UINT16_ARRAY: case JS_CLASS_INT32_ARRAY: case JS_CLASS_UINT32_ARRAY: case JS_CLASS_BIG_INT64_ARRAY: case JS_CLASS_BIG_UINT64_ARRAY: case JS_CLASS_FLOAT16_ARRAY: case JS_CLASS_FLOAT32_ARRAY: case JS_CLASS_FLOAT64_ARRAY: p->is_exotic = 1; p->fast_array = 1; p->u.array.u.ptr = NULL; p->u.array.count = 0; break; case JS_CLASS_DATAVIEW: p->u.array.u.ptr = NULL; p->u.array.count = 0; break; case JS_CLASS_NUMBER: case JS_CLASS_STRING: case JS_CLASS_BOOLEAN: case JS_CLASS_SYMBOL: case JS_CLASS_DATE: case JS_CLASS_BIG_INT: p->u.object_data = JS_UNDEFINED; goto set_exotic; case JS_CLASS_REGEXP: p->u.regexp.pattern = NULL; p->u.regexp.bytecode = NULL; goto set_exotic; default: set_exotic: if (ctx->rt->class_array[class_id].exotic) { p->is_exotic = 1; } break; } p->header.ref_count = 1; add_gc_object(ctx->rt, &p->header, JS_GC_OBJ_TYPE_JS_OBJECT); return JS_MKPTR(JS_TAG_OBJECT, p); }
O1
c
JS_NewObjectFromShape: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movl %edx, %r12d movq %rsi, %r15 movq %rdi, %rbx movq 0x18(%rdi), %r14 movq 0x30(%r14), %rax addq $0x48, %rax cmpq 0xd0(%r14), %rax jbe 0xf558 movq %r14, %rdi callq 0x1d8ec movq 0x30(%r14), %rax movq %rax, %rcx shrq %rcx addq %rax, %rcx movq %rcx, 0xd0(%r14) pushq $0x48 popq %rsi movq %rbx, %rdi callq 0xede6 testq %rax, %rax je 0xf6b3 movq %rax, %r14 movw %r12w, 0x6(%rax) movb $0x1, 0x5(%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rax) movq %r15, 0x18(%rax) movslq 0x24(%r15), %rsi shlq $0x4, %rsi movq %rbx, %rdi callq 0xede6 movq %rax, 0x20(%r14) testq %rax, %rax je 0xf684 leal -0x1(%r12), %ecx cmpl $0x21, %ecx ja 0xf5d8 leaq 0x8ce53(%rip), %rdx # 0x9c404 movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx orb $0xc, 0x5(%r14) andq $0x0, 0x38(%r14) andl $0x0, 0x40(%r14) jmp 0xf5f7 andl $0x0, 0x30(%r14) movq $0x3, 0x38(%r14) movq 0x18(%rbx), %rax movq 0x80(%rax), %rax movl %r12d, %ecx imulq $0x28, %rcx, %rcx cmpq $0x0, 0x20(%rax,%rcx) je 0xf5f7 orb $0x4, 0x5(%r14) movl $0x1, (%r14) movq 0x18(%rbx), %rax movb $0x0, 0x4(%r14) movq %r14, %rcx addq $0x8, %rcx leaq 0x98(%rax), %rdx movq 0x98(%rax), %rsi movq %rcx, 0x8(%rsi) movq %rsi, 0x8(%r14) movq %rdx, 0x10(%r14) movq %rcx, 0x98(%rax) movq %r14, (%rsp) pushq $-0x1 popq %rdx movq (%rsp), %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x30(%r14), %rax xorps %xmm0, %xmm0 movups %xmm0, (%rax) jmp 0xf5d8 andl $0x0, (%rax) movq $0x3, 0x8(%rax) jmp 0xf5f7 orb $0xc, 0x5(%r14) andq $0x0, 0x38(%r14) andl $0x0, 0x40(%r14) andl $0x0, 0x30(%r14) cmpq %r15, 0x38(%rbx) jne 0xf6d0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) jmp 0xf5f7 movq 0x18(%rbx), %r12 decq 0x28(%r12) movq %r14, %rdi callq *0x20(%r12) movq 0x30(%r12), %rcx movq 0x40(%r12), %rdi subq %rax, %rcx addq $-0x8, %rcx movq %rcx, 0x30(%r12) movq %r14, %rsi callq *0x10(%r12) movq 0x18(%rbx), %rdi movl (%r15), %eax leal -0x1(%rax), %ecx movl %ecx, (%r15) cmpl $0x1, %eax jle 0xf6e3 andl $0x0, (%rsp) pushq $0x6 jmp 0xf635 pushq $0x32 popq %rdx pushq $0xa popq %rcx movq %rbx, %rdi movq %r14, %rsi callq 0x3bf45 jmp 0xf679 movq %r15, %rsi callq 0x3bc6e jmp 0xf6c5
JS_NewObjectFromShape: push r15 push r14 push r12 push rbx push rax mov r12d, edx mov r15, rsi mov rbx, rdi mov r14, [rdi+18h] mov rax, [r14+30h] add rax, 48h ; 'H' cmp rax, [r14+0D0h] jbe short loc_F558 mov rdi, r14 call JS_RunGC mov rax, [r14+30h] mov rcx, rax shr rcx, 1 add rcx, rax mov [r14+0D0h], rcx loc_F558: push 48h ; 'H' pop rsi mov rdi, rbx call js_malloc test rax, rax jz loc_F6B3 mov r14, rax mov [rax+6], r12w mov byte ptr [rax+5], 1 xorps xmm0, xmm0 movups xmmword ptr [rax+28h], xmm0 mov [rax+18h], r15 movsxd rsi, dword ptr [r15+24h] shl rsi, 4 mov rdi, rbx call js_malloc mov [r14+20h], rax test rax, rax jz loc_F684 lea ecx, [r12-1]; switch 34 cases cmp ecx, 21h ja short def_F5B8; jumptable 000000000000F5B8 default case, cases 3,9,11,13-17,19,20 lea rdx, jpt_F5B8 movsxd rcx, ds:(jpt_F5B8 - 9C404h)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_F5BA: or byte ptr [r14+5], 0Ch; jumptable 000000000000F5B8 cases 8,21-32 loc_F5BF: and qword ptr [r14+38h], 0; jumptable 000000000000F5B8 case 33 and dword ptr [r14+40h], 0 jmp short loc_F5F7; jumptable 000000000000F5B8 case 1 loc_F5CB: and dword ptr [r14+30h], 0; jumptable 000000000000F5B8 cases 4-7,10,34 mov qword ptr [r14+38h], 3 def_F5B8: mov rax, [rbx+18h]; jumptable 000000000000F5B8 default case, cases 3,9,11,13-17,19,20 mov rax, [rax+80h] mov ecx, r12d imul rcx, 28h ; '(' cmp qword ptr [rax+rcx+20h], 0 jz short loc_F5F7; jumptable 000000000000F5B8 case 1 or byte ptr [r14+5], 4 loc_F5F7: mov dword ptr [r14], 1; jumptable 000000000000F5B8 case 1 mov rax, [rbx+18h] mov byte ptr [r14+4], 0 mov rcx, r14 add rcx, 8 lea rdx, [rax+98h] mov rsi, [rax+98h] mov [rsi+8], rcx mov [r14+8], rsi mov [r14+10h], rdx mov [rax+98h], rcx mov [rsp+28h+var_28], r14 push 0FFFFFFFFFFFFFFFFh loc_F635: pop rdx mov rax, [rsp+28h+var_28] add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_F646: lea rax, [r14+30h]; jumptable 000000000000F5B8 case 18 xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 jmp short def_F5B8; jumptable 000000000000F5B8 default case, cases 3,9,11,13-17,19,20 loc_F652: and dword ptr [rax], 0; jumptable 000000000000F5B8 case 12 mov qword ptr [rax+8], 3 jmp short loc_F5F7; jumptable 000000000000F5B8 case 1 loc_F65F: or byte ptr [r14+5], 0Ch; jumptable 000000000000F5B8 case 2 and qword ptr [r14+38h], 0 and dword ptr [r14+40h], 0 and dword ptr [r14+30h], 0 cmp [rbx+38h], r15 jnz short loc_F6D0 loc_F679: xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 jmp loc_F5F7; jumptable 000000000000F5B8 case 1 loc_F684: mov r12, [rbx+18h] dec qword ptr [r12+28h] mov rdi, r14 call qword ptr [r12+20h] mov rcx, [r12+30h] mov rdi, [r12+40h] sub rcx, rax add rcx, 0FFFFFFFFFFFFFFF8h mov [r12+30h], rcx mov rsi, r14 call qword ptr [r12+10h] loc_F6B3: mov rdi, [rbx+18h] mov eax, [r15] lea ecx, [rax-1] mov [r15], ecx cmp eax, 1 jle short loc_F6E3 loc_F6C5: and dword ptr [rsp+28h+var_28], 0 push 6 jmp loc_F635 loc_F6D0: push 32h ; '2' pop rdx push 0Ah pop rcx mov rdi, rbx mov rsi, r14 call add_property jmp short loc_F679 loc_F6E3: mov rsi, r15 call js_free_shape0 jmp short loc_F6C5
long long JS_NewObjectFromShape(long long a1, _DWORD *a2, unsigned int a3) { long long v3; // rax long long v6; // r14 long long v7; // rax long long v8; // r14 long long v9; // rax long long v10; // rax long long v11; // rsi long long v13; // r12 long long v14; // rax long long v15; // rdi long long v16; // rdi int v17; // eax long long v18; // [rsp+0h] [rbp-28h] HIDWORD(v18) = HIDWORD(v3); v6 = *(_QWORD *)(a1 + 24); if ( (unsigned long long)(*(_QWORD *)(v6 + 48) + 72LL) > *(_QWORD *)(v6 + 208) ) { JS_RunGC(*(_QWORD *)(a1 + 24)); *(_QWORD *)(v6 + 208) = *(_QWORD *)(v6 + 48) + (*(_QWORD *)(v6 + 48) >> 1); } v7 = js_malloc(a1, 72LL); if ( v7 ) { v8 = v7; *(_WORD *)(v7 + 6) = a3; *(_BYTE *)(v7 + 5) = 1; *(_OWORD *)(v7 + 40) = 0LL; *(_QWORD *)(v7 + 24) = a2; v9 = js_malloc(a1, 16LL * (int)a2[9]); *(_QWORD *)(v8 + 32) = v9; if ( v9 ) { switch ( a3 ) { case 1u: break; case 2u: *(_BYTE *)(v8 + 5) |= 0xCu; *(_QWORD *)(v8 + 56) = 0LL; *(_DWORD *)(v8 + 64) = 0; *(_DWORD *)(v8 + 48) = 0; if ( *(_DWORD **)(a1 + 56) != a2 ) v9 = add_property(a1, v8, 50LL, 10LL); *(_OWORD *)v9 = 0LL; break; case 4u: case 5u: case 6u: case 7u: case 0xAu: case 0x22u: *(_DWORD *)(v8 + 48) = 0; *(_QWORD *)(v8 + 56) = 3LL; goto LABEL_9; case 8u: case 0x15u: case 0x16u: case 0x17u: case 0x18u: case 0x19u: case 0x1Au: case 0x1Bu: case 0x1Cu: case 0x1Du: case 0x1Eu: case 0x1Fu: case 0x20u: *(_BYTE *)(v8 + 5) |= 0xCu; goto LABEL_7; case 0xCu: *(_DWORD *)v9 = 0; *(_QWORD *)(v9 + 8) = 3LL; break; case 0x12u: *(_OWORD *)(v8 + 48) = 0LL; goto LABEL_9; case 0x21u: LABEL_7: *(_QWORD *)(v8 + 56) = 0LL; *(_DWORD *)(v8 + 64) = 0; break; default: LABEL_9: if ( *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40LL * a3 + 32) ) *(_BYTE *)(v8 + 5) |= 4u; break; } *(_DWORD *)v8 = 1; v10 = *(_QWORD *)(a1 + 24); *(_BYTE *)(v8 + 4) = 0; v11 = *(_QWORD *)(v10 + 152); *(_QWORD *)(v11 + 8) = v8 + 8; *(_QWORD *)(v8 + 8) = v11; *(_QWORD *)(v8 + 16) = v10 + 152; *(_QWORD *)(v10 + 152) = v8 + 8; return v8; } v13 = *(_QWORD *)(a1 + 24); --*(_QWORD *)(v13 + 40); v14 = (*(long long ( **)(long long))(v13 + 32))(v8); v15 = *(_QWORD *)(v13 + 64); *(_QWORD *)(v13 + 48) = *(_QWORD *)(v13 + 48) - v14 - 8; (*(void ( **)(long long, long long))(v13 + 16))(v15, v8); } v16 = *(_QWORD *)(a1 + 24); v17 = (*a2)--; if ( v17 <= 1 ) js_free_shape0(v16, a2); LODWORD(v18) = 0; return v18; }
JS_NewObjectFromShape: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R12D,EDX MOV R15,RSI MOV RBX,RDI MOV R14,qword ptr [RDI + 0x18] MOV RAX,qword ptr [R14 + 0x30] ADD RAX,0x48 CMP RAX,qword ptr [R14 + 0xd0] JBE 0x0010f558 MOV RDI,R14 CALL 0x0011d8ec MOV RAX,qword ptr [R14 + 0x30] MOV RCX,RAX SHR RCX,0x1 ADD RCX,RAX MOV qword ptr [R14 + 0xd0],RCX LAB_0010f558: PUSH 0x48 POP RSI MOV RDI,RBX CALL 0x0010ede6 TEST RAX,RAX JZ 0x0010f6b3 MOV R14,RAX MOV word ptr [RAX + 0x6],R12W MOV byte ptr [RAX + 0x5],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x28],XMM0 MOV qword ptr [RAX + 0x18],R15 MOVSXD RSI,dword ptr [R15 + 0x24] SHL RSI,0x4 MOV RDI,RBX CALL 0x0010ede6 MOV qword ptr [R14 + 0x20],RAX TEST RAX,RAX JZ 0x0010f684 LEA ECX,[R12 + -0x1] CMP ECX,0x21 JA 0x0010f5d8 LEA RDX,[0x19c404] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_8: OR byte ptr [R14 + 0x5],0xc caseD_21: AND qword ptr [R14 + 0x38],0x0 AND dword ptr [R14 + 0x40],0x0 JMP 0x0010f5f7 caseD_4: AND dword ptr [R14 + 0x30],0x0 MOV qword ptr [R14 + 0x38],0x3 caseD_3: MOV RAX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,R12D IMUL RCX,RCX,0x28 CMP qword ptr [RAX + RCX*0x1 + 0x20],0x0 JZ 0x0010f5f7 OR byte ptr [R14 + 0x5],0x4 caseD_1: MOV dword ptr [R14],0x1 MOV RAX,qword ptr [RBX + 0x18] MOV byte ptr [R14 + 0x4],0x0 MOV RCX,R14 ADD RCX,0x8 LEA RDX,[RAX + 0x98] MOV RSI,qword ptr [RAX + 0x98] MOV qword ptr [RSI + 0x8],RCX MOV qword ptr [R14 + 0x8],RSI MOV qword ptr [R14 + 0x10],RDX MOV qword ptr [RAX + 0x98],RCX MOV qword ptr [RSP],R14 PUSH -0x1 LAB_0010f635: POP RDX MOV RAX,qword ptr [RSP] ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET caseD_12: LEA RAX,[R14 + 0x30] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 JMP 0x0010f5d8 caseD_c: AND dword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],0x3 JMP 0x0010f5f7 caseD_2: OR byte ptr [R14 + 0x5],0xc AND qword ptr [R14 + 0x38],0x0 AND dword ptr [R14 + 0x40],0x0 AND dword ptr [R14 + 0x30],0x0 CMP qword ptr [RBX + 0x38],R15 JNZ 0x0010f6d0 LAB_0010f679: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 JMP 0x0010f5f7 LAB_0010f684: MOV R12,qword ptr [RBX + 0x18] DEC qword ptr [R12 + 0x28] MOV RDI,R14 CALL qword ptr [R12 + 0x20] MOV RCX,qword ptr [R12 + 0x30] MOV RDI,qword ptr [R12 + 0x40] SUB RCX,RAX ADD RCX,-0x8 MOV qword ptr [R12 + 0x30],RCX MOV RSI,R14 CALL qword ptr [R12 + 0x10] LAB_0010f6b3: MOV RDI,qword ptr [RBX + 0x18] MOV EAX,dword ptr [R15] LEA ECX,[RAX + -0x1] MOV dword ptr [R15],ECX CMP EAX,0x1 JLE 0x0010f6e3 LAB_0010f6c5: AND dword ptr [RSP],0x0 PUSH 0x6 JMP 0x0010f635 LAB_0010f6d0: PUSH 0x32 POP RDX PUSH 0xa POP RCX MOV RDI,RBX MOV RSI,R14 CALL 0x0013bf45 JMP 0x0010f679 LAB_0010f6e3: MOV RSI,R15 CALL 0x0013bc6e JMP 0x0010f6c5
int1 [16] JS_NewObjectFromShape(long param_1,int *param_2,uint param_3) { int iVar1; long lVar2; int8 uVar3; ulong in_RAX; int8 *puVar4; long lVar5; int1 auVar6 [16]; int8 uStack_30; int4 *local_28; lVar2 = *(long *)(param_1 + 0x18); if (*(ulong *)(lVar2 + 0xd0) < *(long *)(lVar2 + 0x30) + 0x48U) { JS_RunGC(lVar2); *(ulong *)(lVar2 + 0xd0) = (*(ulong *)(lVar2 + 0x30) >> 1) + *(ulong *)(lVar2 + 0x30); } local_28 = (int4 *)js_malloc(param_1,0x48); if (local_28 == (int4 *)0x0) { LAB_0010f6b3: uVar3 = *(int8 *)(param_1 + 0x18); iVar1 = *param_2; *param_2 = iVar1 + -1; if (iVar1 < 2) { js_free_shape0(uVar3,param_2); } local_28 = (int4 *)(in_RAX & 0xffffffff00000000); uStack_30 = 6; goto LAB_0010f635; } *(short *)((long)local_28 + 6) = (short)param_3; *(int1 *)((long)local_28 + 5) = 1; *(int8 *)(local_28 + 10) = 0; *(int8 *)(local_28 + 0xc) = 0; *(int **)(local_28 + 6) = param_2; puVar4 = (int8 *)js_malloc(param_1,(long)param_2[9] << 4); *(int8 **)(local_28 + 8) = puVar4; if (puVar4 == (int8 *)0x0) { lVar2 = *(long *)(param_1 + 0x18); *(long *)(lVar2 + 0x28) = *(long *)(lVar2 + 0x28) + -1; lVar5 = (**(code **)(lVar2 + 0x20))(local_28); *(long *)(lVar2 + 0x30) = (*(long *)(lVar2 + 0x30) - lVar5) + -8; (**(code **)(lVar2 + 0x10))(*(int8 *)(lVar2 + 0x40),local_28); goto LAB_0010f6b3; } switch(param_3) { case 1: break; case 2: *(byte *)((long)local_28 + 5) = *(byte *)((long)local_28 + 5) | 0xc; *(int8 *)(local_28 + 0xe) = 0; local_28[0x10] = 0; local_28[0xc] = 0; if (*(int **)(param_1 + 0x38) != param_2) { puVar4 = (int8 *)add_property(param_1,local_28,0x32,10); } *puVar4 = 0; puVar4[1] = 0; break; default: goto switchD_0010f5b8_caseD_3; case 4: case 5: case 6: case 7: case 10: case 0x22: local_28[0xc] = 0; *(int8 *)(local_28 + 0xe) = 3; goto switchD_0010f5b8_caseD_3; case 8: case 0x15: case 0x16: case 0x17: case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: case 0x20: *(byte *)((long)local_28 + 5) = *(byte *)((long)local_28 + 5) | 0xc; case 0x21: *(int8 *)(local_28 + 0xe) = 0; local_28[0x10] = 0; break; case 0xc: *(int4 *)puVar4 = 0; puVar4[1] = 3; break; case 0x12: *(int8 *)(local_28 + 0xc) = 0; *(int8 *)(local_28 + 0xe) = 0; switchD_0010f5b8_caseD_3: if (*(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x20 + (ulong)param_3 * 0x28) != 0) { *(byte *)((long)local_28 + 5) = *(byte *)((long)local_28 + 5) | 4; } } *local_28 = 1; lVar2 = *(long *)(param_1 + 0x18); *(int1 *)(local_28 + 1) = 0; lVar5 = *(long *)(lVar2 + 0x98); *(int4 **)(lVar5 + 8) = local_28 + 2; *(long *)(local_28 + 2) = lVar5; *(long *)(local_28 + 4) = lVar2 + 0x98; *(int4 **)(lVar2 + 0x98) = local_28 + 2; uStack_30 = 0xffffffffffffffff; LAB_0010f635: auVar6._8_8_ = uStack_30; auVar6._0_8_ = local_28; return auVar6; }
50,340
JS_NewObjectFromShape
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_NewObjectFromShape(JSContext *ctx, JSShape *sh, JSClassID class_id) { JSObject *p; js_trigger_gc(ctx->rt, sizeof(JSObject)); p = js_malloc(ctx, sizeof(JSObject)); if (unlikely(!p)) goto fail; p->class_id = class_id; p->extensible = TRUE; p->free_mark = 0; p->is_exotic = 0; p->fast_array = 0; p->is_constructor = 0; p->is_uncatchable_error = 0; p->tmp_mark = 0; p->is_HTMLDDA = 0; p->first_weak_ref = NULL; p->u.opaque = NULL; p->shape = sh; p->prop = js_malloc(ctx, sizeof(JSProperty) * sh->prop_size); if (unlikely(!p->prop)) { js_free(ctx, p); fail: js_free_shape(ctx->rt, sh); return JS_EXCEPTION; } switch(class_id) { case JS_CLASS_OBJECT: break; case JS_CLASS_ARRAY: { JSProperty *pr; p->is_exotic = 1; p->fast_array = 1; p->u.array.u.values = NULL; p->u.array.count = 0; p->u.array.u1.size = 0; /* the length property is always the first one */ if (likely(sh == ctx->array_shape)) { pr = &p->prop[0]; } else { /* only used for the first array */ /* cannot fail */ pr = add_property(ctx, p, JS_ATOM_length, JS_PROP_WRITABLE | JS_PROP_LENGTH); } pr->u.value = js_int32(0); } break; case JS_CLASS_C_FUNCTION: p->prop[0].u.value = JS_UNDEFINED; break; case JS_CLASS_ARGUMENTS: case JS_CLASS_UINT8C_ARRAY: case JS_CLASS_INT8_ARRAY: case JS_CLASS_UINT8_ARRAY: case JS_CLASS_INT16_ARRAY: case JS_CLASS_UINT16_ARRAY: case JS_CLASS_INT32_ARRAY: case JS_CLASS_UINT32_ARRAY: case JS_CLASS_BIG_INT64_ARRAY: case JS_CLASS_BIG_UINT64_ARRAY: case JS_CLASS_FLOAT16_ARRAY: case JS_CLASS_FLOAT32_ARRAY: case JS_CLASS_FLOAT64_ARRAY: p->is_exotic = 1; p->fast_array = 1; p->u.array.u.ptr = NULL; p->u.array.count = 0; break; case JS_CLASS_DATAVIEW: p->u.array.u.ptr = NULL; p->u.array.count = 0; break; case JS_CLASS_NUMBER: case JS_CLASS_STRING: case JS_CLASS_BOOLEAN: case JS_CLASS_SYMBOL: case JS_CLASS_DATE: case JS_CLASS_BIG_INT: p->u.object_data = JS_UNDEFINED; goto set_exotic; case JS_CLASS_REGEXP: p->u.regexp.pattern = NULL; p->u.regexp.bytecode = NULL; goto set_exotic; default: set_exotic: if (ctx->rt->class_array[class_id].exotic) { p->is_exotic = 1; } break; } p->header.ref_count = 1; add_gc_object(ctx->rt, &p->header, JS_GC_OBJ_TYPE_JS_OBJECT); return JS_MKPTR(JS_TAG_OBJECT, p); }
O2
c
JS_NewObjectFromShape: pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movl %edx, %r12d movq %rsi, %r15 movq %rdi, %rbx movq 0x18(%rdi), %r14 movq 0x30(%r14), %rax addq $0x48, %rax cmpq 0xd0(%r14), %rax jbe 0x1b13e movq %r14, %rdi callq 0x1813d movq 0x30(%r14), %rax movq %rax, %rcx shrq %rcx addq %rax, %rcx movq %rcx, 0xd0(%r14) pushq $0x48 popq %rsi movq %rbx, %rdi callq 0x17214 testq %rax, %rax je 0x1b270 movq %rax, %r14 movw %r12w, 0x6(%rax) movb $0x1, 0x5(%rax) xorps %xmm0, %xmm0 movups %xmm0, 0x28(%rax) movq %r15, 0x18(%rax) movslq 0x24(%r15), %rsi shlq $0x4, %rsi movq %rbx, %rdi callq 0x17214 movq %rax, 0x20(%r14) testq %rax, %rax je 0x1b265 leal -0x1(%r12), %ecx cmpl $0x21, %ecx ja 0x1b1be leaq 0x681f1(%rip), %rdx # 0x83388 movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx orb $0xc, 0x5(%r14) andq $0x0, 0x38(%r14) andl $0x0, 0x40(%r14) jmp 0x1b1dd andl $0x0, 0x30(%r14) movq $0x3, 0x38(%r14) movq 0x18(%rbx), %rax movq 0x80(%rax), %rax movl %r12d, %ecx imulq $0x28, %rcx, %rcx cmpq $0x0, 0x20(%rax,%rcx) je 0x1b1dd orb $0x4, 0x5(%r14) movl $0x1, (%r14) movq 0x18(%rbx), %rax movb $0x0, 0x4(%r14) movq %r14, %rcx addq $0x8, %rcx leaq 0x98(%rax), %rdx movq 0x98(%rax), %rsi movq %rcx, 0x8(%rsi) movq %rsi, 0x8(%r14) movq %rdx, 0x10(%r14) movq %rcx, 0x98(%rax) pushq $-0x1 popq %rdx movq %r14, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x30(%r14), %rax xorps %xmm0, %xmm0 movups %xmm0, (%rax) jmp 0x1b1be andl $0x0, (%rax) movq $0x3, 0x8(%rax) jmp 0x1b1dd orb $0xc, 0x5(%r14) andq $0x0, 0x38(%r14) andl $0x0, 0x40(%r14) andl $0x0, 0x30(%r14) cmpq %r15, 0x38(%rbx) jne 0x1b284 xorps %xmm0, %xmm0 movups %xmm0, (%rax) jmp 0x1b1dd movq %rbx, %rdi movq %r14, %rsi callq 0x1726e movq 0x18(%rbx), %rdi movq %r15, %rsi callq 0x34aa8 pushq $0x6 popq %rdx xorl %r14d, %r14d jmp 0x1b218 pushq $0x32 popq %rdx pushq $0xa popq %rcx movq %rbx, %rdi movq %r14, %rsi callq 0x34d1a jmp 0x1b25a
JS_NewObjectFromShape: push r15 push r14 push r12 push rbx push rax mov r12d, edx mov r15, rsi mov rbx, rdi mov r14, [rdi+18h] mov rax, [r14+30h] add rax, 48h ; 'H' cmp rax, [r14+0D0h] jbe short loc_1B13E mov rdi, r14 call JS_RunGC mov rax, [r14+30h] mov rcx, rax shr rcx, 1 add rcx, rax mov [r14+0D0h], rcx loc_1B13E: push 48h ; 'H' pop rsi mov rdi, rbx call js_malloc test rax, rax jz loc_1B270 mov r14, rax mov [rax+6], r12w mov byte ptr [rax+5], 1 xorps xmm0, xmm0 movups xmmword ptr [rax+28h], xmm0 mov [rax+18h], r15 movsxd rsi, dword ptr [r15+24h] shl rsi, 4 mov rdi, rbx call js_malloc mov [r14+20h], rax test rax, rax jz loc_1B265 lea ecx, [r12-1]; switch 34 cases cmp ecx, 21h ja short def_1B19E; jumptable 000000000001B19E default case, cases 3,9,11,13-17,19,20 lea rdx, jpt_1B19E movsxd rcx, ds:(jpt_1B19E - 83388h)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_1B1A0: or byte ptr [r14+5], 0Ch; jumptable 000000000001B19E cases 8,21-32 loc_1B1A5: and qword ptr [r14+38h], 0; jumptable 000000000001B19E case 33 and dword ptr [r14+40h], 0 jmp short loc_1B1DD; jumptable 000000000001B19E case 1 loc_1B1B1: and dword ptr [r14+30h], 0; jumptable 000000000001B19E cases 4-7,10,34 mov qword ptr [r14+38h], 3 def_1B19E: mov rax, [rbx+18h]; jumptable 000000000001B19E default case, cases 3,9,11,13-17,19,20 mov rax, [rax+80h] mov ecx, r12d imul rcx, 28h ; '(' cmp qword ptr [rax+rcx+20h], 0 jz short loc_1B1DD; jumptable 000000000001B19E case 1 or byte ptr [r14+5], 4 loc_1B1DD: mov dword ptr [r14], 1; jumptable 000000000001B19E case 1 mov rax, [rbx+18h] mov byte ptr [r14+4], 0 mov rcx, r14 add rcx, 8 lea rdx, [rax+98h] mov rsi, [rax+98h] mov [rsi+8], rcx mov [r14+8], rsi mov [r14+10h], rdx mov [rax+98h], rcx push 0FFFFFFFFFFFFFFFFh pop rdx loc_1B218: mov rax, r14 add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn loc_1B227: lea rax, [r14+30h]; jumptable 000000000001B19E case 18 xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 jmp short def_1B19E; jumptable 000000000001B19E default case, cases 3,9,11,13-17,19,20 loc_1B233: and dword ptr [rax], 0; jumptable 000000000001B19E case 12 mov qword ptr [rax+8], 3 jmp short loc_1B1DD; jumptable 000000000001B19E case 1 loc_1B240: or byte ptr [r14+5], 0Ch; jumptable 000000000001B19E case 2 and qword ptr [r14+38h], 0 and dword ptr [r14+40h], 0 and dword ptr [r14+30h], 0 cmp [rbx+38h], r15 jnz short loc_1B284 loc_1B25A: xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 jmp loc_1B1DD; jumptable 000000000001B19E case 1 loc_1B265: mov rdi, rbx mov rsi, r14 call js_free loc_1B270: mov rdi, [rbx+18h] mov rsi, r15 call js_free_shape push 6 pop rdx xor r14d, r14d jmp short loc_1B218 loc_1B284: push 32h ; '2' pop rdx push 0Ah pop rcx mov rdi, rbx mov rsi, r14 call add_property jmp short loc_1B25A
long long JS_NewObjectFromShape(long long a1, long long a2, unsigned int a3) { long long v4; // r14 long long v5; // rax long long v6; // r14 long long v7; // rax long long v8; // rax long long v9; // rsi v4 = *(_QWORD *)(a1 + 24); if ( (unsigned long long)(*(_QWORD *)(v4 + 48) + 72LL) > *(_QWORD *)(v4 + 208) ) { JS_RunGC(*(_QWORD *)(a1 + 24)); *(_QWORD *)(v4 + 208) = *(_QWORD *)(v4 + 48) + (*(_QWORD *)(v4 + 48) >> 1); } v5 = js_malloc(a1, 72LL); if ( !v5 ) goto LABEL_19; v6 = v5; *(_WORD *)(v5 + 6) = a3; *(_BYTE *)(v5 + 5) = 1; *(_OWORD *)(v5 + 40) = 0LL; *(_QWORD *)(v5 + 24) = a2; v7 = js_malloc(a1, 16LL * *(int *)(a2 + 36)); *(_QWORD *)(v6 + 32) = v7; if ( !v7 ) { js_free(a1, v6); LABEL_19: js_free_shape(*(_QWORD *)(a1 + 24), a2); return 0LL; } switch ( a3 ) { case 1u: break; case 2u: *(_BYTE *)(v6 + 5) |= 0xCu; *(_QWORD *)(v6 + 56) = 0LL; *(_DWORD *)(v6 + 64) = 0; *(_DWORD *)(v6 + 48) = 0; if ( *(_QWORD *)(a1 + 56) != a2 ) v7 = add_property(a1, v6, 50LL, 10LL); *(_OWORD *)v7 = 0LL; break; case 4u: case 5u: case 6u: case 7u: case 0xAu: case 0x22u: *(_DWORD *)(v6 + 48) = 0; *(_QWORD *)(v6 + 56) = 3LL; goto LABEL_9; case 8u: case 0x15u: case 0x16u: case 0x17u: case 0x18u: case 0x19u: case 0x1Au: case 0x1Bu: case 0x1Cu: case 0x1Du: case 0x1Eu: case 0x1Fu: case 0x20u: *(_BYTE *)(v6 + 5) |= 0xCu; goto LABEL_7; case 0xCu: *(_DWORD *)v7 = 0; *(_QWORD *)(v7 + 8) = 3LL; break; case 0x12u: *(_OWORD *)(v6 + 48) = 0LL; goto LABEL_9; case 0x21u: LABEL_7: *(_QWORD *)(v6 + 56) = 0LL; *(_DWORD *)(v6 + 64) = 0; break; default: LABEL_9: if ( *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 24) + 128LL) + 40LL * a3 + 32) ) *(_BYTE *)(v6 + 5) |= 4u; break; } *(_DWORD *)v6 = 1; v8 = *(_QWORD *)(a1 + 24); *(_BYTE *)(v6 + 4) = 0; v9 = *(_QWORD *)(v8 + 152); *(_QWORD *)(v9 + 8) = v6 + 8; *(_QWORD *)(v6 + 8) = v9; *(_QWORD *)(v6 + 16) = v8 + 152; *(_QWORD *)(v8 + 152) = v6 + 8; return v6; }
JS_NewObjectFromShape: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R12D,EDX MOV R15,RSI MOV RBX,RDI MOV R14,qword ptr [RDI + 0x18] MOV RAX,qword ptr [R14 + 0x30] ADD RAX,0x48 CMP RAX,qword ptr [R14 + 0xd0] JBE 0x0011b13e MOV RDI,R14 CALL 0x0011813d MOV RAX,qword ptr [R14 + 0x30] MOV RCX,RAX SHR RCX,0x1 ADD RCX,RAX MOV qword ptr [R14 + 0xd0],RCX LAB_0011b13e: PUSH 0x48 POP RSI MOV RDI,RBX CALL 0x00117214 TEST RAX,RAX JZ 0x0011b270 MOV R14,RAX MOV word ptr [RAX + 0x6],R12W MOV byte ptr [RAX + 0x5],0x1 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX + 0x28],XMM0 MOV qword ptr [RAX + 0x18],R15 MOVSXD RSI,dword ptr [R15 + 0x24] SHL RSI,0x4 MOV RDI,RBX CALL 0x00117214 MOV qword ptr [R14 + 0x20],RAX TEST RAX,RAX JZ 0x0011b265 LEA ECX,[R12 + -0x1] CMP ECX,0x21 JA 0x0011b1be LEA RDX,[0x183388] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_8: OR byte ptr [R14 + 0x5],0xc caseD_21: AND qword ptr [R14 + 0x38],0x0 AND dword ptr [R14 + 0x40],0x0 JMP 0x0011b1dd caseD_4: AND dword ptr [R14 + 0x30],0x0 MOV qword ptr [R14 + 0x38],0x3 caseD_3: MOV RAX,qword ptr [RBX + 0x18] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,R12D IMUL RCX,RCX,0x28 CMP qword ptr [RAX + RCX*0x1 + 0x20],0x0 JZ 0x0011b1dd OR byte ptr [R14 + 0x5],0x4 caseD_1: MOV dword ptr [R14],0x1 MOV RAX,qword ptr [RBX + 0x18] MOV byte ptr [R14 + 0x4],0x0 MOV RCX,R14 ADD RCX,0x8 LEA RDX,[RAX + 0x98] MOV RSI,qword ptr [RAX + 0x98] MOV qword ptr [RSI + 0x8],RCX MOV qword ptr [R14 + 0x8],RSI MOV qword ptr [R14 + 0x10],RDX MOV qword ptr [RAX + 0x98],RCX PUSH -0x1 POP RDX LAB_0011b218: MOV RAX,R14 ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET caseD_12: LEA RAX,[R14 + 0x30] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 JMP 0x0011b1be caseD_c: AND dword ptr [RAX],0x0 MOV qword ptr [RAX + 0x8],0x3 JMP 0x0011b1dd caseD_2: OR byte ptr [R14 + 0x5],0xc AND qword ptr [R14 + 0x38],0x0 AND dword ptr [R14 + 0x40],0x0 AND dword ptr [R14 + 0x30],0x0 CMP qword ptr [RBX + 0x38],R15 JNZ 0x0011b284 LAB_0011b25a: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 JMP 0x0011b1dd LAB_0011b265: MOV RDI,RBX MOV RSI,R14 CALL 0x0011726e LAB_0011b270: MOV RDI,qword ptr [RBX + 0x18] MOV RSI,R15 CALL 0x00134aa8 PUSH 0x6 POP RDX XOR R14D,R14D JMP 0x0011b218 LAB_0011b284: PUSH 0x32 POP RDX PUSH 0xa POP RCX MOV RDI,RBX MOV RSI,R14 CALL 0x00134d1a JMP 0x0011b25a
int1 [16] JS_NewObjectFromShape(long param_1,long param_2,uint param_3) { long lVar1; long lVar2; int4 *puVar3; int8 *puVar4; int1 auVar5 [16]; int8 uStack_30; lVar1 = *(long *)(param_1 + 0x18); if (*(ulong *)(lVar1 + 0xd0) < *(long *)(lVar1 + 0x30) + 0x48U) { JS_RunGC(lVar1); *(ulong *)(lVar1 + 0xd0) = (*(ulong *)(lVar1 + 0x30) >> 1) + *(ulong *)(lVar1 + 0x30); } puVar3 = (int4 *)js_malloc(param_1,0x48); if (puVar3 == (int4 *)0x0) { LAB_0011b270: js_free_shape(*(int8 *)(param_1 + 0x18),param_2); uStack_30 = 6; puVar3 = (int4 *)0x0; goto LAB_0011b218; } *(short *)((long)puVar3 + 6) = (short)param_3; *(int1 *)((long)puVar3 + 5) = 1; *(int8 *)(puVar3 + 10) = 0; *(int8 *)(puVar3 + 0xc) = 0; *(long *)(puVar3 + 6) = param_2; puVar4 = (int8 *)js_malloc(param_1,(long)*(int *)(param_2 + 0x24) << 4); *(int8 **)(puVar3 + 8) = puVar4; if (puVar4 == (int8 *)0x0) { js_free(param_1,puVar3); goto LAB_0011b270; } switch(param_3) { case 1: break; case 2: *(byte *)((long)puVar3 + 5) = *(byte *)((long)puVar3 + 5) | 0xc; *(int8 *)(puVar3 + 0xe) = 0; puVar3[0x10] = 0; puVar3[0xc] = 0; if (*(long *)(param_1 + 0x38) != param_2) { puVar4 = (int8 *)add_property(param_1,puVar3,0x32,10); } *puVar4 = 0; puVar4[1] = 0; break; default: goto switchD_0011b19e_caseD_3; case 4: case 5: case 6: case 7: case 10: case 0x22: puVar3[0xc] = 0; *(int8 *)(puVar3 + 0xe) = 3; goto switchD_0011b19e_caseD_3; case 8: case 0x15: case 0x16: case 0x17: case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: case 0x20: *(byte *)((long)puVar3 + 5) = *(byte *)((long)puVar3 + 5) | 0xc; case 0x21: *(int8 *)(puVar3 + 0xe) = 0; puVar3[0x10] = 0; break; case 0xc: *(int4 *)puVar4 = 0; puVar4[1] = 3; break; case 0x12: *(int8 *)(puVar3 + 0xc) = 0; *(int8 *)(puVar3 + 0xe) = 0; switchD_0011b19e_caseD_3: if (*(long *)(*(long *)(*(long *)(param_1 + 0x18) + 0x80) + 0x20 + (ulong)param_3 * 0x28) != 0) { *(byte *)((long)puVar3 + 5) = *(byte *)((long)puVar3 + 5) | 4; } } *puVar3 = 1; lVar1 = *(long *)(param_1 + 0x18); *(int1 *)(puVar3 + 1) = 0; lVar2 = *(long *)(lVar1 + 0x98); *(int4 **)(lVar2 + 8) = puVar3 + 2; *(long *)(puVar3 + 2) = lVar2; *(long *)(puVar3 + 4) = lVar1 + 0x98; *(int4 **)(lVar1 + 0x98) = puVar3 + 2; uStack_30 = 0xffffffffffffffff; LAB_0011b218: auVar5._8_8_ = uStack_30; auVar5._0_8_ = puVar3; return auVar5; }
50,341
common_chat_tool_choice_parse_oaicompat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
llama.cpp/common/chat.cpp
common_chat_tool_choice common_chat_tool_choice_parse_oaicompat(const std::string & tool_choice) { if (tool_choice == "auto") { return COMMON_CHAT_TOOL_CHOICE_AUTO; } if (tool_choice == "none") { return COMMON_CHAT_TOOL_CHOICE_NONE; } if (tool_choice == "required") { return COMMON_CHAT_TOOL_CHOICE_REQUIRED; } throw std::runtime_error("Invalid tool_choice: " + tool_choice); }
O3
cpp
common_chat_tool_choice_parse_oaicompat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x20, %rsp movq %rdi, %r14 leaq 0x8ead2(%rip), %rsi # 0x11d8ec callq 0x20f60 testl %eax, %eax je 0x8ee95 leaq 0x84a29(%rip), %rsi # 0x113853 movq %r14, %rdi callq 0x20f60 testl %eax, %eax je 0x8ee99 leaq 0x8eab4(%rip), %rsi # 0x11d8f1 movq %r14, %rdi callq 0x20f60 movl %eax, %ecx movl $0x1, %eax testl %ecx, %ecx je 0x8ee9e movl $0x10, %edi callq 0x20660 movq %rax, %rbx leaq 0x8ea96(%rip), %rsi # 0x11d8fa movq %rsp, %rdi movq %r14, %rdx callq 0x63969 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x20480 xorl %ebp, %ebp movq 0xd213a(%rip), %rsi # 0x160fc0 movq 0xd20f3(%rip), %rdx # 0x160f80 movq %rbx, %rdi callq 0x20a60 xorl %eax, %eax jmp 0x8ee9e movl $0x2, %eax addq $0x20, %rsp popq %rbx popq %r14 popq %rbp retq movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x8eec5 movq 0x10(%rsp), %rsi incq %rsi callq 0x20190 testb %bpl, %bpl jne 0x8eecf jmp 0x8eed7 movq %rax, %r14 movq %rbx, %rdi callq 0x20f00 movq %r14, %rdi callq 0x20b00
_Z39common_chat_tool_choice_parse_oaicompatRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r14 push rbx sub rsp, 20h mov r14, rdi lea rsi, aAuto; "auto" call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_8EE95 lea rsi, aNone; "none" mov rdi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_8EE99 lea rsi, aRequired; "required" mov rdi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) mov ecx, eax mov eax, 1 test ecx, ecx jz short loc_8EE9E mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aInvalidToolCho; "Invalid tool_choice: " mov rdi, rsp mov rdx, r14 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) mov bpl, 1 mov rsi, rsp mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_8EE95: xor eax, eax jmp short loc_8EE9E loc_8EE99: mov eax, 2 loc_8EE9E: add rsp, 20h pop rbx pop r14 pop rbp retn mov r14, rax lea rax, [rsp+arg_8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_8EEC5 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8EEC5: test bpl, bpl jnz short loc_8EECF jmp short loc_8EED7 mov r14, rax loc_8EECF: mov rdi, rbx; void * call ___cxa_free_exception loc_8EED7: mov rdi, r14 call __Unwind_Resume
long long common_chat_tool_choice_parse_oaicompat(_QWORD *a1) { int v1; // ecx long long result; // rax void *exception; // rbx _BYTE v4[56]; // [rsp+0h] [rbp-38h] BYREF if ( !(unsigned int)std::string::compare(a1, "auto") ) return 0LL; if ( !(unsigned int)std::string::compare(a1, "none") ) return 2LL; v1 = std::string::compare(a1, "required"); result = 1LL; if ( v1 ) { exception = __cxa_allocate_exception(0x10uLL); std::operator+<char>((long long)v4, (long long)"Invalid tool_choice: ", a1); std::runtime_error::runtime_error(exception, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return result; }
common_chat_tool_choice_parse_oaicompat: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x20 MOV R14,RDI LEA RSI,[0x21d8ec] CALL 0x00120f60 TEST EAX,EAX JZ 0x0018ee95 LEA RSI,[0x213853] MOV RDI,R14 CALL 0x00120f60 TEST EAX,EAX JZ 0x0018ee99 LEA RSI,[0x21d8f1] MOV RDI,R14 CALL 0x00120f60 MOV ECX,EAX MOV EAX,0x1 TEST ECX,ECX JZ 0x0018ee9e MOV EDI,0x10 CALL 0x00120660 MOV RBX,RAX LAB_0018ee5d: LEA RSI,[0x21d8fa] MOV RDI,RSP MOV RDX,R14 CALL 0x00163969 MOV BPL,0x1 LAB_0018ee72: MOV RSI,RSP MOV RDI,RBX CALL 0x00120480 XOR EBP,EBP MOV RSI,qword ptr [0x00260fc0] MOV RDX,qword ptr [0x00260f80] MOV RDI,RBX CALL 0x00120a60 LAB_0018ee95: XOR EAX,EAX JMP 0x0018ee9e LAB_0018ee99: MOV EAX,0x2 LAB_0018ee9e: ADD RSP,0x20 POP RBX POP R14 POP RBP RET
/* common_chat_tool_choice_parse_oaicompat(std::__cxx11::string const&) */ int8 common_chat_tool_choice_parse_oaicompat(string *param_1) { int iVar1; int8 uVar2; runtime_error *this; string asStack_38 [32]; iVar1 = std::__cxx11::string::compare((char *)param_1); if (iVar1 == 0) { uVar2 = 0; } else { iVar1 = std::__cxx11::string::compare((char *)param_1); if (iVar1 == 0) { uVar2 = 2; } else { iVar1 = std::__cxx11::string::compare((char *)param_1); uVar2 = 1; if (iVar1 != 0) { this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0018ee5d to 0018ee6e has its CatchHandler @ 0018eecc */ std::operator+((char *)asStack_38,(string *)"Invalid tool_choice: "); /* try { // try from 0018ee72 to 0018ee94 has its CatchHandler @ 0018eea7 */ std::runtime_error::runtime_error(this,asStack_38); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00260fc0,PTR__runtime_error_00260f80); } } } return uVar2; }
50,342
strmake
eloqsql/strings/strmake.c
char *strmake(register char *dst, register const char *src, size_t length) { while (length--) { if (! (*dst++ = *src++)) { #ifdef EXTRA_DEBUG /* 'length' is the maximum length of the string; the buffer needs to be one character larger to accommodate the terminating '\0'. This is easy to get wrong, so we make sure we write to the entire length of the buffer to identify incorrect buffer-sizes. We only initialism the "unused" part of the buffer here, a) for efficiency, and b) because dst==src is allowed, so initializing the entire buffer would overwrite the source-string. Also, we write a character rather than '\0' as this makes spotting these problems in the results easier. If we are using purify/valgrind, we only set one character at end to be able to detect also wrong accesses after the end of dst. */ if (length) { #ifdef HAVE_valgrind dst[length-1]= 'Z'; #else bfill(dst, length-1, (int) 'Z'); #endif /* HAVE_valgrind */ } #endif /* EXTRA_DEBUG */ return dst-1; } } *dst=0; return dst; }
O0
c
strmake: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, %rcx addq $-0x1, %rcx movq %rcx, -0x20(%rbp) cmpq $0x0, %rax je 0x7fd9b movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movb (%rax), %al movq -0x10(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x10(%rbp) movb %al, (%rcx) cmpb $0x0, %al jne 0x7fd99 movq -0x10(%rbp), %rax addq $-0x1, %rax movq %rax, -0x8(%rbp) jmp 0x7fdaa jmp 0x7fd50 movq -0x10(%rbp), %rax movb $0x0, (%rax) movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq
strmake: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx loc_7FD50: mov rax, [rbp+var_20] mov rcx, rax add rcx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rcx cmp rax, 0 jz short loc_7FD9B mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx mov al, [rax] mov rcx, [rbp+var_10] mov rdx, rcx add rdx, 1 mov [rbp+var_10], rdx mov [rcx], al cmp al, 0 jnz short loc_7FD99 mov rax, [rbp+var_10] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_8], rax jmp short loc_7FDAA loc_7FD99: jmp short loc_7FD50 loc_7FD9B: mov rax, [rbp+var_10] mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_7FDAA: mov rax, [rbp+var_8] pop rbp retn
_BYTE * strmake(_BYTE *a1, _BYTE *a2, long long a3) { _BYTE *v4; // rax _BYTE *v5; // rcx while ( a3-- ) { v4 = a2++; LOBYTE(v4) = *v4; v5 = a1++; *v5 = (_BYTE)v4; if ( !(_BYTE)v4 ) return a1 - 1; } *a1 = 0; return a1; }
strmake: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX LAB_0017fd50: MOV RAX,qword ptr [RBP + -0x20] MOV RCX,RAX ADD RCX,-0x1 MOV qword ptr [RBP + -0x20],RCX CMP RAX,0x0 JZ 0x0017fd9b MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOV AL,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x10],RDX MOV byte ptr [RCX],AL CMP AL,0x0 JNZ 0x0017fd99 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,-0x1 MOV qword ptr [RBP + -0x8],RAX JMP 0x0017fdaa LAB_0017fd99: JMP 0x0017fd50 LAB_0017fd9b: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x8],RAX LAB_0017fdaa: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
char * strmake(char *param_1,char *param_2,long param_3) { char cVar1; char *pcVar2; long local_28; char *local_20; char *local_18; local_28 = param_3; local_20 = param_2; pcVar2 = param_1; do { local_18 = pcVar2; if (local_28 == 0) { *local_18 = '\0'; return local_18; } cVar1 = *local_20; *local_18 = cVar1; local_28 = local_28 + -1; local_20 = local_20 + 1; pcVar2 = local_18 + 1; } while (cVar1 != '\0'); return local_18; }
50,343
blst_fp_from_uint64
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c
void blst_fp_from_uint64(vec384 ret, const unsigned long long a[6]) { const union { long one; char little; } is_endian = { 1 }; if (sizeof(limb_t) == 4 && !is_endian.little) { int i; for (i = 0; i < 6; i++) { unsigned long long limb = a[i]; ret[2*i] = (limb_t)limb; ret[2*i+1] = (limb_t)(limb >> 32); } a = (const unsigned long long *)ret; } mul_fp(ret, (const limb_t *)a, BLS12_381_RR); }
O3
c
blst_fp_from_uint64: pushq %rbp movq %rsp, %rbp leaq 0x277ba(%rip), %rdx # 0x8cf20 leaq 0x27533(%rip), %rcx # 0x8cca0 movabsq $-0x760c000300030003, %r8 # imm = 0x89F3FFFCFFFCFFFD popq %rbp jmp 0x74ea0
blst_fp_from_uint64: push rbp mov rbp, rsp lea rdx, BLS12_381_RR lea rcx, BLS12_381_P mov r8, 89F3FFFCFFFCFFFDh pop rbp jmp mul_mont_384
long long blst_fp_from_uint64(long long a1, long long a2) { return mul_mont_384(a1, a2, &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); }
blst_fp_from_uint64: PUSH RBP MOV RBP,RSP LEA RDX,[0x18cf20] LEA RCX,[0x18cca0] MOV R8,-0x760c000300030003 POP RBP JMP 0x00174ea0
void blst_fp_from_uint64(int8 param_1,int8 param_2) { mul_mont_384(param_1,param_2,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd); return; }
50,344
nglog::(anonymous namespace)::LogFileObject::~LogFileObject()
ng-log[P]ng-log/src/logging.cc
LogFileObject::~LogFileObject() { std::lock_guard<std::mutex> l{mutex_}; file_ = nullptr; }
O2
cpp
nglog::(anonymous namespace)::LogFileObject::~LogFileObject(): pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx leaq 0x2a231(%rip), %rax # 0x41800 movq %rax, (%rdi) leaq 0x8(%rdi), %r14 movq %r14, %rdi callq 0x169e6 leaq 0x98(%rbx), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x15748 movq %r14, %rdi callq 0x8510 movq %r15, %rdi callq 0x15516 leaq 0x78(%rbx), %rdi callq 0x8d88 leaq 0x58(%rbx), %rdi callq 0x8d88 addq $0x38, %rbx movq %rbx, %rdi popq %rbx popq %r14 popq %r15 jmp 0x8d88 movq %rax, %rdi callq 0x142b9
_ZN5nglog12_GLOBAL__N_113LogFileObjectD2Ev: push r15 push r14 push rbx mov rbx, rdi lea rax, off_41800 mov [rdi], rax lea r14, [rdi+8] mov rdi, r14; this call _ZNSt5mutex4lockEv; std::mutex::lock(void) lea r15, [rbx+98h] mov rdi, r15 xor esi, esi call _ZNSt15__uniq_ptr_implI8_IO_FILESt14default_deleteIS0_EE5resetEPS0_; std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset(_IO_FILE*) mov rdi, r14 call _pthread_mutex_unlock mov rdi, r15 call _ZNSt10unique_ptrI8_IO_FILESt14default_deleteIS0_EED2Ev; std::unique_ptr<_IO_FILE>::~unique_ptr() lea rdi, [rbx+78h]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rbx+58h]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add rbx, 38h ; '8' mov rdi, rbx; void * pop rbx pop r14 pop r15 jmp _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rax call __clang_call_terminate
void nglog::`anonymous namespace'::LogFileObject::~LogFileObject( nglog::_anonymous_namespace_::LogFileObject *this) { *(_QWORD *)this = off_41800; std::mutex::lock((nglog::_anonymous_namespace_::LogFileObject *)((char *)this + 8)); std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset((_QWORD *)this + 19, 0LL); pthread_mutex_unlock((char *)this + 8); std::unique_ptr<_IO_FILE>::~unique_ptr((_QWORD *)this + 19); std::string::~string((char *)this + 120); std::string::~string((char *)this + 88); std::string::~string((char *)this + 56); }
~LogFileObject: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI LEA RAX,[0x141800] MOV qword ptr [RDI],RAX LEA R14,[RDI + 0x8] LAB_001175d6: MOV RDI,R14 CALL 0x001169e6 LEA R15,[RBX + 0x98] MOV RDI,R15 XOR ESI,ESI CALL 0x00115748 MOV RDI,R14 CALL 0x00108510 MOV RDI,R15 CALL 0x00115516 LEA RDI,[RBX + 0x78] CALL 0x00108d88 LEA RDI,[RBX + 0x58] CALL 0x00108d88 ADD RBX,0x38 MOV RDI,RBX POP RBX POP R14 POP R15 JMP 0x00108d88
/* nglog::(anonymous namespace)::LogFileObject::~LogFileObject() */ void __thiscall nglog::(anonymous_namespace)::LogFileObject::~LogFileObject(LogFileObject *this) { *(int ***)this = &PTR__LogFileObject_00141800; /* try { // try from 001175d6 to 001175dd has its CatchHandler @ 00117622 */ std::mutex::lock((mutex *)&((pthread_mutex_t *)(this + 8))->__data); std::__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>>::reset ((__uniq_ptr_impl<_IO_FILE,std::default_delete<_IO_FILE>> *)(this + 0x98), (_IO_FILE *)0x0); pthread_mutex_unlock((pthread_mutex_t *)(this + 8)); std::unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>>::~unique_ptr ((unique_ptr<_IO_FILE,std::default_delete<_IO_FILE>> *)(this + 0x98)); std::__cxx11::string::~string((string *)(this + 0x78)); std::__cxx11::string::~string((string *)(this + 0x58)); std::__cxx11::string::~string((string *)(this + 0x38)); return; }
50,345
nglog::(anonymous namespace)::LogFileObject::~LogFileObject()
ng-log[P]ng-log/src/logging.cc
LogFileObject::~LogFileObject() { std::lock_guard<std::mutex> l{mutex_}; file_ = nullptr; }
O3
cpp
nglog::(anonymous namespace)::LogFileObject::~LogFileObject(): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x2b736(%rip), %rax # 0x447e0 movq %rax, (%rdi) leaq 0x8(%rdi), %r14 movq %r14, %rdi callq 0x89e0 testl %eax, %eax jne 0x1915b movq 0x98(%rbx), %rdi movq $0x0, 0x98(%rbx) testq %rdi, %rdi je 0x190dd callq 0x8620 movq %r14, %rdi callq 0x8490 movq 0x98(%rbx), %rdi testq %rdi, %rdi je 0x190f6 callq 0x8620 movq $0x0, 0x98(%rbx) movq 0x78(%rbx), %rdi leaq 0x88(%rbx), %rax cmpq %rax, %rdi je 0x1911c movq (%rax), %rsi incq %rsi callq 0xa89c movq 0x58(%rbx), %rdi leaq 0x68(%rbx), %rax cmpq %rax, %rdi je 0x19134 movq (%rax), %rsi incq %rsi callq 0xa89c movq 0x38(%rbx), %rdi addq $0x48, %rbx cmpq %rbx, %rdi je 0x19153 movq (%rbx), %rsi incq %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0xa89c addq $0x8, %rsp popq %rbx popq %r14 retq movl %eax, %edi callq 0x83f0 movq %rax, %rdi callq 0x15c57
_ZN5nglog12_GLOBAL__N_113LogFileObjectD2Ev: push r14 push rbx push rax mov rbx, rdi lea rax, off_447E0 mov [rdi], rax lea r14, [rdi+8] mov rdi, r14 call _pthread_mutex_lock test eax, eax jnz loc_1915B mov rdi, [rbx+98h] mov qword ptr [rbx+98h], 0 test rdi, rdi jz short loc_190DD call _fclose loc_190DD: mov rdi, r14 call _pthread_mutex_unlock mov rdi, [rbx+98h] test rdi, rdi jz short loc_190F6 call _fclose loc_190F6: mov qword ptr [rbx+98h], 0 mov rdi, [rbx+78h]; void * lea rax, [rbx+88h] cmp rdi, rax jz short loc_1911C mov rsi, [rax] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_1911C: mov rdi, [rbx+58h]; void * lea rax, [rbx+68h] cmp rdi, rax jz short loc_19134 mov rsi, [rax] inc rsi; unsigned __int64 call _ZdlPvm; operator delete(void *,ulong) loc_19134: mov rdi, [rbx+38h]; void * add rbx, 48h ; 'H' cmp rdi, rbx jz short loc_19153 mov rsi, [rbx] inc rsi; unsigned __int64 add rsp, 8 pop rbx pop r14 jmp _ZdlPvm; operator delete(void *,ulong) loc_19153: add rsp, 8 pop rbx pop r14 retn loc_1915B: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov rdi, rax call __clang_call_terminate
void nglog::`anonymous namespace'::LogFileObject::~LogFileObject( nglog::_anonymous_namespace_::LogFileObject *this) { char *v2; // r14 int v3; // eax long long v4; // rdi long long v5; // rdi char *v6; // rdi char *v7; // rdi char *v8; // rdi *(_QWORD *)this = off_447E0; v2 = (char *)this + 8; v3 = pthread_mutex_lock((char *)this + 8); if ( v3 ) std::__throw_system_error(v3); v4 = *((_QWORD *)this + 19); *((_QWORD *)this + 19) = 0LL; if ( v4 ) fclose(v4); pthread_mutex_unlock(v2); v5 = *((_QWORD *)this + 19); if ( v5 ) fclose(v5); *((_QWORD *)this + 19) = 0LL; v6 = (char *)*((_QWORD *)this + 15); if ( v6 != (char *)this + 136 ) operator delete(v6); v7 = (char *)*((_QWORD *)this + 11); if ( v7 != (char *)this + 104 ) operator delete(v7); v8 = (char *)*((_QWORD *)this + 7); if ( v8 != (char *)this + 72 ) operator delete(v8); }
~LogFileObject: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA RAX,[0x1447e0] MOV qword ptr [RDI],RAX LEA R14,[RDI + 0x8] MOV RDI,R14 CALL 0x001089e0 TEST EAX,EAX JNZ 0x0011915b MOV RDI,qword ptr [RBX + 0x98] MOV qword ptr [RBX + 0x98],0x0 TEST RDI,RDI JZ 0x001190dd CALL 0x00108620 LAB_001190dd: MOV RDI,R14 CALL 0x00108490 MOV RDI,qword ptr [RBX + 0x98] TEST RDI,RDI JZ 0x001190f6 CALL 0x00108620 LAB_001190f6: MOV qword ptr [RBX + 0x98],0x0 MOV RDI,qword ptr [RBX + 0x78] LEA RAX,[RBX + 0x88] CMP RDI,RAX JZ 0x0011911c MOV RSI,qword ptr [RAX] INC RSI CALL 0x0010a89c LAB_0011911c: MOV RDI,qword ptr [RBX + 0x58] LEA RAX,[RBX + 0x68] CMP RDI,RAX JZ 0x00119134 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0010a89c LAB_00119134: MOV RDI,qword ptr [RBX + 0x38] ADD RBX,0x48 CMP RDI,RBX JZ 0x00119153 MOV RSI,qword ptr [RBX] INC RSI ADD RSP,0x8 POP RBX POP R14 JMP 0x0010a89c LAB_00119153: ADD RSP,0x8 POP RBX POP R14 RET LAB_0011915b: MOV EDI,EAX CALL 0x001083f0
/* nglog::(anonymous namespace)::LogFileObject::~LogFileObject() */ void __thiscall nglog::(anonymous_namespace)::LogFileObject::~LogFileObject(LogFileObject *this) { FILE *__stream; int iVar1; *(int ***)this = &PTR__LogFileObject_001447e0; iVar1 = pthread_mutex_lock((pthread_mutex_t *)(this + 8)); if (iVar1 != 0) { /* try { // try from 0011915b to 00119161 has its CatchHandler @ 00119162 */ /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); } __stream = *(FILE **)(this + 0x98); *(int8 *)(this + 0x98) = 0; if (__stream != (FILE *)0x0) { fclose(__stream); } pthread_mutex_unlock((pthread_mutex_t *)(this + 8)); if (*(FILE **)(this + 0x98) != (FILE *)0x0) { fclose(*(FILE **)(this + 0x98)); } *(int8 *)(this + 0x98) = 0; if (*(LogFileObject **)(this + 0x78) != this + 0x88) { operator_delete(*(LogFileObject **)(this + 0x78),*(long *)(this + 0x88) + 1); } if (*(LogFileObject **)(this + 0x58) != this + 0x68) { operator_delete(*(LogFileObject **)(this + 0x58),*(long *)(this + 0x68) + 1); } if (*(LogFileObject **)(this + 0x38) != this + 0x48) { operator_delete(*(LogFileObject **)(this + 0x38),*(long *)(this + 0x48) + 1); return; } return; }
50,346
ImPlot3D::RendererSurfaceFill<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<short>, ImPlot3D::IndexerIdx<short>, ImPlot3D::IndexerIdx<short>>>::Init(ImDrawList3D&) const
zkingston[P]unknot/build_O1/_deps/implot3d-src/implot3d_items.cpp
void Init(ImDrawList3D& draw_list_3d) const { UV = draw_list_3d._SharedData->TexUvWhitePixel; // Compute min and max values for the colormap (if not solid fill) const ImPlot3DNextItemData& n = GetItemData(); if (n.IsAutoFill) { Min = FLT_MAX; Max = -FLT_MAX; for (int i = 0; i < Getter.Count; i++) { float z = Getter(i).z; Min = ImMin(Min, z); Max = ImMax(Max, z); } } }
O1
cpp
ImPlot3D::RendererSurfaceFill<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<short>, ImPlot3D::IndexerIdx<short>, ImPlot3D::IndexerIdx<short>>>::Init(ImDrawList3D&) const: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x58(%rsi), %rax movq (%rax), %rax movq %rax, 0x18(%rdi) callq 0x5459e cmpb $0x1, 0x58(%rax) jne 0xaccb5 movsd 0x1e8c93(%rip), %xmm0 # 0x295890 movsd %xmm0, 0x20(%rbx) movq 0x10(%rbx), %rax movslq 0x48(%rax), %rsi testq %rsi, %rsi jle 0xaccb5 movss 0x20(%rbx), %xmm0 movss 0x24(%rbx), %xmm1 movq 0x30(%rax), %rdi movl 0x38(%rax), %r8d movl 0x3c(%rax), %ecx movslq 0x40(%rax), %r9 xorl %eax, %eax cmpq $0x8, %r9 sete %al xorl %edx, %edx testl %ecx, %ecx sete %dl leal (%rdx,%rax,2), %eax xorl %r10d, %r10d movl %eax, %eax leaq 0x1ec81d(%rip), %rdx # 0x299468 movslq (%rdx,%rax,4), %r11 addq %rdx, %r11 movq %rdi, %r14 jmpq *%r11 movl %ecx, %eax cltd idivl %r8d movslq %edx, %rax imulq %r9, %rax addq %rdi, %rax jmp 0xacc82 movl %ecx, %eax cltd idivl %r8d movslq %edx, %rax leaq (%rdi,%rax,8), %rax jmp 0xacc82 leaq (%rdi,%r10,8), %rax jmp 0xacc82 movq %r14, %rax xorps %xmm2, %xmm2 cvtsd2ss (%rax), %xmm2 minss %xmm2, %xmm0 movss %xmm0, 0x20(%rbx) movaps %xmm2, %xmm3 cmpless %xmm1, %xmm3 andps %xmm3, %xmm1 andnps %xmm2, %xmm3 orps %xmm3, %xmm1 movss %xmm1, 0x24(%rbx) incq %r10 incl %ecx addq %r9, %r14 decq %rsi jne 0xacc55 addq $0x8, %rsp popq %rbx popq %r14 retq
_ZNK8ImPlot3D19RendererSurfaceFillINS_9GetterXYZINS_10IndexerIdxIdEES3_S3_EEE4InitER12ImDrawList3D: push r14 push rbx push rax mov rbx, rdi mov rax, [rsi+58h] mov rax, [rax] mov [rdi+18h], rax call _ZN8ImPlot3D11GetItemDataEv; ImPlot3D::GetItemData(void) cmp byte ptr [rax+58h], 1 jnz loc_ACCB5 movsd xmm0, cs:qword_295890 movsd qword ptr [rbx+20h], xmm0 mov rax, [rbx+10h] movsxd rsi, dword ptr [rax+48h] test rsi, rsi jle loc_ACCB5 movss xmm0, dword ptr [rbx+20h] movss xmm1, dword ptr [rbx+24h] mov rdi, [rax+30h] mov r8d, [rax+38h] mov ecx, [rax+3Ch] movsxd r9, dword ptr [rax+40h] xor eax, eax cmp r9, 8 setz al xor edx, edx test ecx, ecx setz dl lea eax, [rdx+rax*2] xor r10d, r10d mov eax, eax lea rdx, jpt_ACC55 movsxd r11, ds:(jpt_ACC55 - 299468h)[rdx+rax*4]; switch 4 cases add r11, rdx mov r14, rdi loc_ACC55: jmp r11; switch jump loc_ACC58: mov eax, ecx; jumptable 00000000000ACC55 case 0 cdq idiv r8d movsxd rax, edx imul rax, r9 add rax, rdi jmp short loc_ACC82 loc_ACC6A: mov eax, ecx; jumptable 00000000000ACC55 case 2 cdq idiv r8d movsxd rax, edx lea rax, [rdi+rax*8] jmp short loc_ACC82 loc_ACC79: lea rax, [rdi+r10*8]; jumptable 00000000000ACC55 case 3 jmp short loc_ACC82 loc_ACC7F: mov rax, r14; jumptable 00000000000ACC55 case 1 loc_ACC82: xorps xmm2, xmm2 cvtsd2ss xmm2, qword ptr [rax] minss xmm0, xmm2 movss dword ptr [rbx+20h], xmm0 movaps xmm3, xmm2 cmpless xmm3, xmm1 andps xmm1, xmm3 andnps xmm3, xmm2 orps xmm1, xmm3 movss dword ptr [rbx+24h], xmm1 inc r10 inc ecx add r14, r9 dec rsi jnz short loc_ACC55 loc_ACCB5: add rsp, 8 pop rbx pop r14 retn
long long ImPlot3D::RendererSurfaceFill<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>>::Init( long long a1, long long a2) { long long result; // rax long long v4; // rsi float v5; // xmm0_4 __m128 v6; // xmm1 long long v7; // rdi int v8; // r8d int v9; // ecx long long v10; // r9 long long v11; // r10 long long v12; // r14 __m128 v13; // xmm2 __m128 v14; // xmm3 *(_QWORD *)(a1 + 24) = **(_QWORD **)(a2 + 88); result = ImPlot3D::GetItemData((ImPlot3D *)a1); if ( *(_BYTE *)(result + 88) == 1 ) { *(_QWORD *)(a1 + 32) = 0xFF7FFFFF7F7FFFFFLL; result = *(_QWORD *)(a1 + 16); v4 = *(int *)(result + 72); if ( v4 > 0 ) { v5 = *(float *)(a1 + 32); v6 = (__m128)*(unsigned int *)(a1 + 36); v7 = *(_QWORD *)(result + 48); v8 = *(_DWORD *)(result + 56); v9 = *(_DWORD *)(result + 60); v10 = *(int *)(result + 64); v11 = 0LL; result = (v9 == 0) + 2 * (unsigned int)(v10 == 8); v12 = v7; do { switch ( result ) { case 0LL: result = v7 + v10 * (v9 % v8); break; case 1LL: result = v12; break; case 2LL: result = v7 + 8LL * (v9 % v8); break; case 3LL: result = v7 + 8 * v11; break; } v13 = 0LL; v13.m128_f32[0] = *(double *)result; v5 = fminf(v5, v13.m128_f32[0]); *(float *)(a1 + 32) = v5; v14 = _mm_cmple_ss(v13, v6); v6 = _mm_or_ps(_mm_and_ps(v6, v14), _mm_andnot_ps(v14, v13)); *(_DWORD *)(a1 + 36) = v6.m128_i32[0]; ++v11; ++v9; v12 += v10; --v4; } while ( v4 ); } } return result; }
Init: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV RAX,qword ptr [RSI + 0x58] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0x18],RAX CALL 0x0015459e CMP byte ptr [RAX + 0x58],0x1 JNZ 0x001accb5 MOVSD XMM0,qword ptr [0x00395890] MOVSD qword ptr [RBX + 0x20],XMM0 MOV RAX,qword ptr [RBX + 0x10] MOVSXD RSI,dword ptr [RAX + 0x48] TEST RSI,RSI JLE 0x001accb5 MOVSS XMM0,dword ptr [RBX + 0x20] MOVSS XMM1,dword ptr [RBX + 0x24] MOV RDI,qword ptr [RAX + 0x30] MOV R8D,dword ptr [RAX + 0x38] MOV ECX,dword ptr [RAX + 0x3c] MOVSXD R9,dword ptr [RAX + 0x40] XOR EAX,EAX CMP R9,0x8 SETZ AL XOR EDX,EDX TEST ECX,ECX SETZ DL LEA EAX,[RDX + RAX*0x2] XOR R10D,R10D MOV EAX,EAX LEA RDX,[0x399468] MOVSXD R11,dword ptr [RDX + RAX*0x4] ADD R11,RDX MOV R14,RDI JMP R11 LAB_001accb5: ADD RSP,0x8 POP RBX POP R14 RET
/* ImPlot3D::RendererSurfaceFill<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>, ImPlot3D::IndexerIdx<double>, ImPlot3D::IndexerIdx<double> > >::Init(ImDrawList3D&) const */ void __thiscall ImPlot3D:: RendererSurfaceFill<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>> ::Init(RendererSurfaceFill<ImPlot3D::GetterXYZ<ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>,ImPlot3D::IndexerIdx<double>>> *this,ImDrawList3D *param_1) { long lVar1; *(int8 *)(this + 0x18) = **(int8 **)(param_1 + 0x58); lVar1 = GetItemData(); if (*(char *)(lVar1 + 0x58) == '\x01') { *(int8 *)(this + 0x20) = DAT_00395890; lVar1 = *(long *)(this + 0x10); if (0 < *(int *)(lVar1 + 0x48)) { /* WARNING: Could not recover jumptable at 0x001acc55. Too many branches */ /* WARNING: Treating indirect jump as call */ (*(code *)(&DAT_00399468 + *(int *)(&DAT_00399468 + (ulong)((uint)(*(int *)(lVar1 + 0x3c) == 0) + (uint)(*(int *)(lVar1 + 0x40) == 8) * 2) * 4))) (*(int4 *)(this + 0x20),*(int4 *)(this + 0x24), *(int8 *)(lVar1 + 0x30)); return; } } return; }
50,347
google::protobuf::compiler::cpp::IsWellKnownMessage(google::protobuf::FileDescriptor const*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/cpp/helpers.cc
bool IsWellKnownMessage(const FileDescriptor* file) { static const std::unordered_set<std::string> well_known_files{ "google/protobuf/any.proto", "google/protobuf/api.proto", "google/protobuf/compiler/plugin.proto", "google/protobuf/descriptor.proto", "google/protobuf/duration.proto", "google/protobuf/empty.proto", "google/protobuf/field_mask.proto", "google/protobuf/source_context.proto", "google/protobuf/struct.proto", "google/protobuf/timestamp.proto", "google/protobuf/type.proto", "google/protobuf/wrappers.proto", }; return well_known_files.find(file->name()) != well_known_files.end(); }
O3
cpp
google::protobuf::compiler::cpp::IsWellKnownMessage(google::protobuf::FileDescriptor const*): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x198, %rsp # imm = 0x198 movq %rdi, %r14 movb 0x24b1ff(%rip), %al # 0x2800d0 testb %al, %al je 0x34efa movq 0x8(%r14), %rsi leaq 0x24b1b8(%rip), %rdi # 0x280098 callq 0x3b1ae testq %rax, %rax setne %al addq $0x198, %rsp # imm = 0x198 popq %rbx popq %r12 popq %r14 popq %r15 retq leaq 0x24b1cf(%rip), %rdi # 0x2800d0 callq 0x1f880 testl %eax, %eax je 0x34ed5 leaq 0x28(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x1682a6(%rip), %rsi # 0x19d1c0 leaq 0x1682b8(%rip), %rdx # 0x19d1d9 leaq 0x18(%rsp), %rbx movq %rbx, %rdi callq 0x250b2 leaq 0x38(%rsp), %r15 leaq 0x48(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x168823(%rip), %rsi # 0x19d766 leaq 0x168835(%rip), %rdx # 0x19d77f movq %r15, %rdi callq 0x250b2 leaq 0x58(%rsp), %r15 leaq 0x68(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x168819(%rip), %rsi # 0x19d780 leaq 0x168837(%rip), %rdx # 0x19d7a5 movq %r15, %rdi callq 0x250b2 leaq 0x78(%rsp), %r15 leaq 0x88(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x167c6a(%rip), %rsi # 0x19cbf8 leaq 0x167c83(%rip), %rdx # 0x19cc18 movq %r15, %rdi callq 0x250b2 leaq 0x98(%rsp), %r15 leaq 0xa8(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x1687ee(%rip), %rsi # 0x19d7a6 leaq 0x168805(%rip), %rdx # 0x19d7c4 movq %r15, %rdi callq 0x250b2 leaq 0xb8(%rsp), %r15 leaq 0xc8(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x1687e3(%rip), %rsi # 0x19d7c5 leaq 0x1687f7(%rip), %rdx # 0x19d7e0 movq %r15, %rdi callq 0x250b2 leaq 0xd8(%rsp), %r15 leaq 0xe8(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x1687d5(%rip), %rsi # 0x19d7e1 leaq 0x1687ee(%rip), %rdx # 0x19d801 movq %r15, %rdi callq 0x250b2 leaq 0xf8(%rsp), %r15 leaq 0x108(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x1687cc(%rip), %rsi # 0x19d802 leaq 0x1687e9(%rip), %rdx # 0x19d826 movq %r15, %rdi callq 0x250b2 leaq 0x118(%rsp), %r15 leaq 0x128(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x1687c7(%rip), %rsi # 0x19d827 leaq 0x1687dc(%rip), %rdx # 0x19d843 movq %r15, %rdi callq 0x250b2 leaq 0x138(%rsp), %r15 leaq 0x148(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x1687ba(%rip), %rsi # 0x19d844 leaq 0x1687d2(%rip), %rdx # 0x19d863 movq %r15, %rdi callq 0x250b2 leaq 0x158(%rsp), %r15 leaq 0x168(%rsp), %rax movq %rax, -0x10(%rax) leaq 0x1687b0(%rip), %rsi # 0x19d864 leaq 0x1687c3(%rip), %rdx # 0x19d87e movq %r15, %rdi callq 0x250b2 leaq 0x178(%rsp), %r15 leaq 0x188(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x1687a0(%rip), %rsi # 0x19d87f leaq 0x1687b7(%rip), %rdx # 0x19d89d movq %r15, %rdi callq 0x250b2 leaq 0x198(%rsp), %rdx leaq 0x15(%rsp), %rax movq %rax, (%rsp) leaq 0x24af92(%rip), %rdi # 0x280098 leaq 0x18(%rsp), %rsi leaq 0x17(%rsp), %r8 leaq 0x16(%rsp), %r9 xorl %ecx, %ecx callq 0x3b1e8 leaq 0x188(%rsp), %rbx xorl %r15d, %r15d movq 0x178(%rsp,%r15), %rdi leaq (%rbx,%r15), %rax cmpq %rdi, %rax je 0x3513d callq 0x1f4a0 addq $-0x20, %r15 cmpq $-0x180, %r15 # imm = 0xFE80 jne 0x35127 leaq 0x405f(%rip), %rdi # 0x391b0 leaq 0x24af40(%rip), %rsi # 0x280098 leaq 0x24a359(%rip), %rdx # 0x27f4b8 callq 0x1f430 leaq 0x24af65(%rip), %rdi # 0x2800d0 callq 0x1f2e0 jmp 0x34ed5 movq %rax, %r14 movq $-0x180, %rbx # imm = 0xFE80 movq -0x10(%r12), %rdi cmpq %rdi, %r12 je 0x3518e callq 0x1f4a0 addq $-0x20, %r12 addq $0x20, %rbx jne 0x3517f jmp 0x351d3 jmp 0x351ae jmp 0x351ae jmp 0x351ae jmp 0x351ae jmp 0x351ae jmp 0x351ae jmp 0x351ae jmp 0x351ae jmp 0x351ae jmp 0x351ae movq %rax, %r14 addq $-0x10, %r15 movq -0x10(%r15), %rdi cmpq %rdi, %r15 je 0x351c3 callq 0x1f4a0 leaq -0x20(%r15), %rax addq $-0x10, %r15 cmpq %rbx, %r15 movq %rax, %r15 jne 0x351b5 leaq 0x24aef6(%rip), %rdi # 0x2800d0 callq 0x1f2d0 movq %r14, %rdi callq 0x1f860 movq %rax, %r14 jmp 0x351d3
_ZN6google8protobuf8compiler3cpp18IsWellKnownMessageEPKNS0_14FileDescriptorE: push r15 push r14 push r12 push rbx sub rsp, 198h mov r14, rdi mov al, cs:_ZGVZN6google8protobuf8compiler3cpp18IsWellKnownMessageEPKNS0_14FileDescriptorEE16well_known_filesB5cxx11; `guard variable for'google::protobuf::compiler::cpp::IsWellKnownMessage(google::protobuf::FileDescriptor const*)::well_known_files test al, al jz short loc_34EFA loc_34ED5: mov rsi, [r14+8] lea rdi, _ZZN6google8protobuf8compiler3cpp18IsWellKnownMessageEPKNS0_14FileDescriptorEE16well_known_filesB5cxx11; google::protobuf::compiler::cpp::IsWellKnownMessage(google::protobuf::FileDescriptor const*)::well_known_files call _ZNKSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEE4findERKS5_; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find(std::string const&) test rax, rax setnz al add rsp, 198h pop rbx pop r12 pop r14 pop r15 retn loc_34EFA: lea rdi, _ZGVZN6google8protobuf8compiler3cpp18IsWellKnownMessageEPKNS0_14FileDescriptorEE16well_known_filesB5cxx11; __guard * call ___cxa_guard_acquire test eax, eax jz short loc_34ED5 lea rax, [rsp+1B8h+var_190] mov [rax-10h], rax lea rsi, aGoogleProtobuf_1; "google/protobuf/any.proto" lea rdx, aGoogleProtobuf_1+19h; "" lea rbx, [rsp+1B8h+var_1A0] mov rdi, rbx 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 r15, [rsp+1B8h+var_180] lea rax, [rsp+1B8h+var_170] mov [rax-10h], rax lea rsi, aGoogleProtobuf_2; "google/protobuf/api.proto" lea rdx, aGoogleProtobuf_2+19h; "" mov rdi, r15 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 r15, [rsp+1B8h+var_160] lea rax, [rsp+1B8h+var_150] mov [rax-10h], rax lea rsi, aGoogleProtobuf_3; "google/protobuf/compiler/plugin.proto" lea rdx, aGoogleProtobuf_3+25h; "" mov rdi, r15 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 r15, [rsp+1B8h+var_140] lea rax, [rsp+1B8h+var_130] mov [rax-10h], rax lea rsi, xmmword_19CBF8 lea rdx, unk_19CC18 mov rdi, r15 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 r15, [rsp+1B8h+var_120] lea rax, [rsp+1B8h+var_110] mov [rax-10h], rax lea rsi, aGoogleProtobuf_4; "google/protobuf/duration.proto" lea rdx, aGoogleProtobuf_4+1Eh; "" mov rdi, r15 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 r15, [rsp+1B8h+var_100] lea rax, [rsp+1B8h+var_F0] mov [rax-10h], rax lea rsi, xmmword_19D7C5 lea rdx, aEmptyProto+0Bh; "" mov rdi, r15 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 r15, [rsp+1B8h+var_E0] lea rax, [rsp+1B8h+var_D0] mov [rax-10h], rax lea rsi, aGoogleProtobuf_5; "google/protobuf/field_mask.proto" lea rdx, aGoogleProtobuf_5+20h; "" mov rdi, r15 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 r15, [rsp+1B8h+var_C0] lea rax, [rsp+1B8h+var_B0] mov [rax-10h], rax lea rsi, aGoogleProtobuf_6; "google/protobuf/source_context.proto" lea rdx, aGoogleProtobuf_6+24h; "" mov rdi, r15 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 r15, [rsp+1B8h+var_A0] lea rax, [rsp+1B8h+var_90] mov [rax-10h], rax lea rsi, aGoogleProtobuf_7; "google/protobuf/struct.proto" lea rdx, aGoogleProtobuf_7+1Ch; "" mov rdi, r15 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 r15, [rsp+1B8h+var_80] lea rax, [rsp+1B8h+var_70] mov [rax-10h], rax lea rsi, aGoogleProtobuf_8; "google/protobuf/timestamp.proto" lea rdx, aGoogleProtobuf_8+1Fh; "" mov rdi, r15 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 r15, [rsp+1B8h+var_60] lea rax, [rsp+1B8h+var_50] mov [rax-10h], rax lea rsi, aGoogleProtobuf_9; "google/protobuf/type.proto" lea rdx, aGoogleProtobuf_9+1Ah; "" mov rdi, r15 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 r15, [rsp+1B8h+var_40] lea r12, [rsp+1B8h+var_30] mov [r12-10h], r12 lea rsi, aGoogleProtobuf_10; "google/protobuf/wrappers.proto" lea rdx, aGoogleProtobuf_10+1Eh; "" mov rdi, r15 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 rdx, [rsp+1B8h+var_20] lea rax, [rsp+1B8h+var_1A3] mov [rsp+1B8h+var_1B8], rax lea rdi, _ZZN6google8protobuf8compiler3cpp18IsWellKnownMessageEPKNS0_14FileDescriptorEE16well_known_filesB5cxx11; google::protobuf::compiler::cpp::IsWellKnownMessage(google::protobuf::FileDescriptor const*)::well_known_files lea rsi, [rsp+1B8h+var_1A0] lea r8, [rsp+1B8h+var_1A1] lea r9, [rsp+1B8h+var_1A2] xor ecx, ecx call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEEC2IPKS5_EET_SM_mRKSC_RKSA_RKS6_St17integral_constantIbLb1EE; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_Hashtable<std::string const*>(std::string const*,std::string const*,ulong,std::hash<std::string> const&,std::equal_to<std::string> const&,std::allocator<std::string> const&,std::integral_constant<bool,true>) lea rbx, [rsp+1B8h+var_30] xor r15d, r15d loc_35127: mov rdi, [rsp+r15+1B8h+var_40]; void * lea rax, [rbx+r15] cmp rax, rdi jz short loc_3513D call __ZdlPv; operator delete(void *) loc_3513D: add r15, 0FFFFFFFFFFFFFFE0h cmp r15, 0FFFFFFFFFFFFFE80h jnz short loc_35127 lea rdi, _ZNSt13unordered_setINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4hashIS5_ESt8equal_toIS5_ESaIS5_EED2Ev; lpfunc lea rsi, _ZZN6google8protobuf8compiler3cpp18IsWellKnownMessageEPKNS0_14FileDescriptorEE16well_known_filesB5cxx11; obj lea rdx, __dso_handle; lpdso_handle call ___cxa_atexit lea rdi, _ZGVZN6google8protobuf8compiler3cpp18IsWellKnownMessageEPKNS0_14FileDescriptorEE16well_known_filesB5cxx11; __guard * call ___cxa_guard_release jmp loc_34ED5 mov r14, rax mov rbx, 0FFFFFFFFFFFFFE80h loc_3517F: mov rdi, [r12-10h]; void * cmp r12, rdi jz short loc_3518E call __ZdlPv; operator delete(void *) loc_3518E: add r12, 0FFFFFFFFFFFFFFE0h add rbx, 20h ; ' ' jnz short loc_3517F jmp short loc_351D3 jmp short loc_351AE jmp short loc_351AE jmp short loc_351AE jmp short loc_351AE jmp short loc_351AE jmp short loc_351AE jmp short loc_351AE jmp short loc_351AE jmp short loc_351AE jmp short $+2 loc_351AE: mov r14, rax add r15, 0FFFFFFFFFFFFFFF0h loc_351B5: mov rdi, [r15-10h]; void * cmp r15, rdi jz short loc_351C3 call __ZdlPv; operator delete(void *) loc_351C3: lea rax, [r15-20h] add r15, 0FFFFFFFFFFFFFFF0h cmp r15, rbx mov r15, rax jnz short loc_351B5 loc_351D3: lea rdi, _ZGVZN6google8protobuf8compiler3cpp18IsWellKnownMessageEPKNS0_14FileDescriptorEE16well_known_filesB5cxx11; __guard * call ___cxa_guard_abort mov rdi, r14 call __Unwind_Resume mov r14, rax jmp short loc_351D3
bool google::protobuf::compiler::cpp::IsWellKnownMessage( google::protobuf::compiler::cpp *this, const google::protobuf::FileDescriptor *a2) { long long i; // r15 _BYTE *v4; // rdi char v5; // [rsp+15h] [rbp-1A3h] BYREF char v6; // [rsp+16h] [rbp-1A2h] BYREF char v7; // [rsp+17h] [rbp-1A1h] BYREF _QWORD v8[2]; // [rsp+18h] [rbp-1A0h] BYREF char v9; // [rsp+28h] [rbp-190h] BYREF char *v10; // [rsp+38h] [rbp-180h] BYREF char v11; // [rsp+48h] [rbp-170h] BYREF char *v12; // [rsp+58h] [rbp-160h] BYREF char v13; // [rsp+68h] [rbp-150h] BYREF char *v14; // [rsp+78h] [rbp-140h] BYREF char v15; // [rsp+88h] [rbp-130h] BYREF char *v16; // [rsp+98h] [rbp-120h] BYREF char v17; // [rsp+A8h] [rbp-110h] BYREF char *v18; // [rsp+B8h] [rbp-100h] BYREF char v19; // [rsp+C8h] [rbp-F0h] BYREF char *v20; // [rsp+D8h] [rbp-E0h] BYREF char v21; // [rsp+E8h] [rbp-D0h] BYREF char *v22; // [rsp+F8h] [rbp-C0h] BYREF char v23; // [rsp+108h] [rbp-B0h] BYREF char *v24; // [rsp+118h] [rbp-A0h] BYREF char v25; // [rsp+128h] [rbp-90h] BYREF char *v26; // [rsp+138h] [rbp-80h] BYREF char v27; // [rsp+148h] [rbp-70h] BYREF char *v28; // [rsp+158h] [rbp-60h] BYREF char v29; // [rsp+168h] [rbp-50h] BYREF void *v30[2]; // [rsp+178h] [rbp-40h] BYREF _BYTE v31[16]; // [rsp+188h] [rbp-30h] BYREF char v32; // [rsp+198h] [rbp-20h] BYREF if ( !(_BYTE)`guard variable for'google::protobuf::compiler::cpp::IsWellKnownMessage(google::protobuf::FileDescriptor const*)::well_known_files[abi:cxx11] && __cxa_guard_acquire(&`guard variable for'google::protobuf::compiler::cpp::IsWellKnownMessage(google::protobuf::FileDescriptor const*)::well_known_files[abi:cxx11]) ) { v8[0] = &v9; std::string::_M_construct<char const*>((long long)v8, "google/protobuf/any.proto", (long long)""); v10 = &v11; std::string::_M_construct<char const*>((long long)&v10, "google/protobuf/api.proto", (long long)""); v12 = &v13; std::string::_M_construct<char const*>((long long)&v12, "google/protobuf/compiler/plugin.proto", (long long)""); v14 = &v15; std::string::_M_construct<char const*>((long long)&v14, &xmmword_19CBF8, (long long)&unk_19CC18); v16 = &v17; std::string::_M_construct<char const*>((long long)&v16, "google/protobuf/duration.proto", (long long)""); v18 = &v19; std::string::_M_construct<char const*>((long long)&v18, &xmmword_19D7C5, (long long)""); v20 = &v21; std::string::_M_construct<char const*>((long long)&v20, "google/protobuf/field_mask.proto", (long long)""); v22 = &v23; std::string::_M_construct<char const*>((long long)&v22, "google/protobuf/source_context.proto", (long long)""); v24 = &v25; std::string::_M_construct<char const*>((long long)&v24, "google/protobuf/struct.proto", (long long)""); v26 = &v27; std::string::_M_construct<char const*>((long long)&v26, "google/protobuf/timestamp.proto", (long long)""); v28 = &v29; std::string::_M_construct<char const*>((long long)&v28, "google/protobuf/type.proto", (long long)""); v30[0] = v31; std::string::_M_construct<char const*>((long long)v30, "google/protobuf/wrappers.proto", (long long)""); std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::_Hashtable<std::string const*>( (unsigned int)&google::protobuf::compiler::cpp::IsWellKnownMessage(google::protobuf::FileDescriptor const*)::well_known_files[abi:cxx11], (unsigned int)v8, (unsigned int)&v32, 0, (unsigned int)&v7, (unsigned int)&v6, (long long)&v5); for ( i = 0LL; i != -48; i -= 4LL ) { v4 = v30[i]; if ( &v31[i * 8] != v4 ) operator delete(v4); } __cxa_atexit( std::unordered_set<std::string>::~unordered_set, &google::protobuf::compiler::cpp::IsWellKnownMessage(google::protobuf::FileDescriptor const*)::well_known_files[abi:cxx11], &_dso_handle); __cxa_guard_release(&`guard variable for'google::protobuf::compiler::cpp::IsWellKnownMessage(google::protobuf::FileDescriptor const*)::well_known_files[abi:cxx11]); } return std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::find(&google::protobuf::compiler::cpp::IsWellKnownMessage(google::protobuf::FileDescriptor const*)::well_known_files[abi:cxx11]) != 0; }
IsWellKnownMessage: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x198 MOV R14,RDI MOV AL,byte ptr [0x003800d0] TEST AL,AL JZ 0x00134efa LAB_00134ed5: MOV RSI,qword ptr [R14 + 0x8] LEA RDI,[0x380098] CALL 0x0013b1ae TEST RAX,RAX SETNZ AL ADD RSP,0x198 POP RBX POP R12 POP R14 POP R15 RET LAB_00134efa: LEA RDI,[0x3800d0] CALL 0x0011f880 TEST EAX,EAX JZ 0x00134ed5 LEA RAX,[RSP + 0x28] MOV qword ptr [RAX + -0x10],RAX LAB_00134f13: LEA RSI,[0x29d1c0] LEA RDX,[0x29d1d9] LEA RBX,[RSP + 0x18] MOV RDI,RBX CALL 0x001250b2 LEA R15,[RSP + 0x38] LEA RAX,[RSP + 0x48] MOV qword ptr [RAX + -0x10],RAX LAB_00134f3c: LEA RSI,[0x29d766] LEA RDX,[0x29d77f] MOV RDI,R15 CALL 0x001250b2 LEA R15,[RSP + 0x58] LEA RAX,[RSP + 0x68] MOV qword ptr [RAX + -0x10],RAX LAB_00134f60: LEA RSI,[0x29d780] LEA RDX,[0x29d7a5] MOV RDI,R15 CALL 0x001250b2 LEA R15,[RSP + 0x78] LEA RAX,[RSP + 0x88] MOV qword ptr [RAX + -0x10],RAX LAB_00134f87: LEA RSI,[0x29cbf8] LEA RDX,[0x29cc18] MOV RDI,R15 CALL 0x001250b2 LEA R15,[RSP + 0x98] LEA RAX,[RSP + 0xa8] MOV qword ptr [RAX + -0x10],RAX LAB_00134fb1: LEA RSI,[0x29d7a6] LEA RDX,[0x29d7c4] MOV RDI,R15 CALL 0x001250b2 LEA R15,[RSP + 0xb8] LEA RAX,[RSP + 0xc8] MOV qword ptr [RAX + -0x10],RAX LAB_00134fdb: LEA RSI,[0x29d7c5] LEA RDX,[0x29d7e0] MOV RDI,R15 CALL 0x001250b2 LEA R15,[RSP + 0xd8] LEA RAX,[RSP + 0xe8] MOV qword ptr [RAX + -0x10],RAX LAB_00135005: LEA RSI,[0x29d7e1] LEA RDX,[0x29d801] MOV RDI,R15 CALL 0x001250b2 LEA R15,[RSP + 0xf8] LEA RAX,[RSP + 0x108] MOV qword ptr [RAX + -0x10],RAX LAB_0013502f: LEA RSI,[0x29d802] LEA RDX,[0x29d826] MOV RDI,R15 CALL 0x001250b2 LEA R15,[RSP + 0x118] LEA RAX,[RSP + 0x128] MOV qword ptr [RAX + -0x10],RAX LAB_00135059: LEA RSI,[0x29d827] LEA RDX,[0x29d843] MOV RDI,R15 CALL 0x001250b2 LEA R15,[RSP + 0x138] LEA RAX,[RSP + 0x148] MOV qword ptr [RAX + -0x10],RAX LAB_00135083: LEA RSI,[0x29d844] LEA RDX,[0x29d863] MOV RDI,R15 CALL 0x001250b2 LEA R15,[RSP + 0x158] LEA RAX,[RSP + 0x168] MOV qword ptr [RAX + -0x10],RAX LAB_001350ad: LEA RSI,[0x29d864] LEA RDX,[0x29d87e] MOV RDI,R15 CALL 0x001250b2 LEA R15,[RSP + 0x178] LEA R12,[RSP + 0x188] MOV qword ptr [R12 + -0x10],R12 LAB_001350d8: LEA RSI,[0x29d87f] LEA RDX,[0x29d89d] MOV RDI,R15 CALL 0x001250b2 LEA RDX,[RSP + 0x198] LAB_001350f6: LEA RAX,[RSP + 0x15] MOV qword ptr [RSP],RAX LEA RDI,[0x380098] LEA RSI,[RSP + 0x18] LEA R8,[RSP + 0x17] LEA R9,[RSP + 0x16] XOR ECX,ECX CALL 0x0013b1e8 LAB_0013511c: LEA RBX,[RSP + 0x188] XOR R15D,R15D LAB_00135127: MOV RDI,qword ptr [RSP + R15*0x1 + 0x178] LEA RAX,[RBX + R15*0x1] CMP RAX,RDI JZ 0x0013513d CALL 0x0011f4a0 LAB_0013513d: ADD R15,-0x20 CMP R15,-0x180 JNZ 0x00135127 LEA RDI,[0x1391b0] LEA RSI,[0x380098] LEA RDX,[0x37f4b8] CALL 0x0011f430 LEA RDI,[0x3800d0] CALL 0x0011f2e0 JMP 0x00134ed5
/* google::protobuf::compiler::cpp::IsWellKnownMessage(google::protobuf::FileDescriptor const*) */ bool google::protobuf::compiler::cpp::IsWellKnownMessage(FileDescriptor *param_1) { int iVar1; long lVar2; int1 local_1a3; int1 local_1a2; int1 local_1a1; int1 *local_1a0 [2]; int1 local_190 [16]; int1 *local_180 [2]; int1 local_170 [16]; int1 *local_160 [2]; int1 local_150 [16]; int1 *local_140 [2]; int1 local_130 [16]; int1 *local_120 [2]; int1 local_110 [16]; int1 *local_100 [2]; int1 local_f0 [16]; int1 *local_e0 [2]; int1 local_d0 [16]; int1 *local_c0 [2]; int1 local_b0 [16]; int1 *local_a0 [2]; int1 local_90 [16]; int1 *local_80 [2]; int1 local_70 [16]; int1 *local_60 [2]; int1 local_50 [16]; int1 *local_40 [2]; int1 local_30 [16]; if (IsWellKnownMessage(google::protobuf::FileDescriptor_const*)::well_known_files_abi_cxx11_ == '\0') { iVar1 = __cxa_guard_acquire(&IsWellKnownMessage(google::protobuf::FileDescriptor_const*):: well_known_files_abi_cxx11_); if (iVar1 != 0) { local_1a0[0] = local_190; /* try { // try from 00134f13 to 00134f2d has its CatchHandler @ 001351e7 */ std::__cxx11::string::_M_construct<char_const*>(local_1a0,"google/protobuf/any.proto",""); local_180[0] = local_170; /* try { // try from 00134f3c to 00134f51 has its CatchHandler @ 001351ae */ std::__cxx11::string::_M_construct<char_const*>(local_180,"google/protobuf/api.proto",""); local_160[0] = local_150; /* try { // try from 00134f60 to 00134f75 has its CatchHandler @ 001351ac */ std::__cxx11::string::_M_construct<char_const*> (local_160,"google/protobuf/compiler/plugin.proto",""); local_140[0] = local_130; /* try { // try from 00134f87 to 00134f9c has its CatchHandler @ 001351aa */ std::__cxx11::string::_M_construct<char_const*> (local_140,"google/protobuf/descriptor.proto",""); local_120[0] = local_110; /* try { // try from 00134fb1 to 00134fc6 has its CatchHandler @ 001351a8 */ std::__cxx11::string::_M_construct<char_const*>(local_120,"google/protobuf/duration.proto","") ; local_100[0] = local_f0; /* try { // try from 00134fdb to 00134ff0 has its CatchHandler @ 001351a6 */ std::__cxx11::string::_M_construct<char_const*>(local_100,"google/protobuf/empty.proto",""); local_e0[0] = local_d0; /* try { // try from 00135005 to 0013501a has its CatchHandler @ 001351a4 */ std::__cxx11::string::_M_construct<char_const*> (local_e0,"google/protobuf/field_mask.proto",""); local_c0[0] = local_b0; /* try { // try from 0013502f to 00135044 has its CatchHandler @ 001351a2 */ std::__cxx11::string::_M_construct<char_const*> (local_c0,"google/protobuf/source_context.proto",""); local_a0[0] = local_90; /* try { // try from 00135059 to 0013506e has its CatchHandler @ 001351a0 */ std::__cxx11::string::_M_construct<char_const*>(local_a0,"google/protobuf/struct.proto",""); local_80[0] = local_70; /* try { // try from 00135083 to 00135098 has its CatchHandler @ 0013519e */ std::__cxx11::string::_M_construct<char_const*>(local_80,"google/protobuf/timestamp.proto","") ; local_60[0] = local_50; /* try { // try from 001350ad to 001350c2 has its CatchHandler @ 0013519c */ std::__cxx11::string::_M_construct<char_const*>(local_60,"google/protobuf/type.proto",""); local_40[0] = local_30; /* try { // try from 001350d8 to 001350ed has its CatchHandler @ 0013519a */ std::__cxx11::string::_M_construct<char_const*>(local_40,"google/protobuf/wrappers.proto",""); /* try { // try from 001350f6 to 0013511b has its CatchHandler @ 00135175 */ std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::_Hashtable<std::__cxx11::string_const*> (IsWellKnownMessage(google::protobuf::FileDescriptor_const*):: well_known_files_abi_cxx11_,local_1a0,&stack0xffffffffffffffe0,0,&local_1a1, &local_1a2,&local_1a3); lVar2 = 0; do { if (local_30 + lVar2 != *(int1 **)((long)local_40 + lVar2)) { operator_delete(*(int1 **)((long)local_40 + lVar2)); } lVar2 = lVar2 + -0x20; } while (lVar2 != -0x180); __cxa_atexit(std:: unordered_set<std::__cxx11::string,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::__cxx11::string>> ::~unordered_set, IsWellKnownMessage(google::protobuf::FileDescriptor_const*):: well_known_files_abi_cxx11_,&__dso_handle); __cxa_guard_release(&IsWellKnownMessage(google::protobuf::FileDescriptor_const*):: well_known_files_abi_cxx11_); } } lVar2 = std:: _Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> ::find((_Hashtable<std::__cxx11::string,std::__cxx11::string,std::allocator<std::__cxx11::string>,std::__detail::_Identity,std::equal_to<std::__cxx11::string>,std::hash<std::__cxx11::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>> *)IsWellKnownMessage(google::protobuf::FileDescriptor_const*):: well_known_files_abi_cxx11_,*(string **)(param_1 + 8)); return lVar2 != 0; }
50,348
mi_enable_indexes
eloqsql/storage/myisam/mi_open.c
int mi_enable_indexes(MI_INFO *info) { int error= 0; MYISAM_SHARE *share= info->s; if (share->state.state.data_file_length || (share->state.state.key_file_length != share->base.keystart)) { mi_print_error(info->s, HA_ERR_CRASHED); error= HA_ERR_CRASHED; } else mi_set_all_keys_active(share->state.key_map, share->base.keys); return error; }
O0
c
mi_enable_indexes: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl $0x0, -0xc(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpq $0x0, 0x40(%rax) jne 0xbcdce movq -0x18(%rbp), %rax movq 0x38(%rax), %rax movq -0x18(%rbp), %rcx cmpq 0x108(%rcx), %rax je 0xbcdef movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0xb1420 movl $0x7e, -0xc(%rbp) jmp 0xbce36 movq -0x18(%rbp), %rax cmpl $0x40, 0x180(%rax) jae 0xbce1a movq -0x18(%rbp), %rax movl 0x180(%rax), %eax movl %eax, %ecx movl $0x1, %eax shlq %cl, %rax subq $0x1, %rax movq %rax, -0x20(%rbp) jmp 0xbce27 movq $-0x1, %rax movq %rax, -0x20(%rbp) jmp 0xbce27 movq -0x20(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0xc0(%rax) movl -0xc(%rbp), %eax addq $0x20, %rsp popq %rbp retq nop
mi_enable_indexes: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], 0 mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov rax, [rbp+var_18] cmp qword ptr [rax+40h], 0 jnz short loc_BCDCE mov rax, [rbp+var_18] mov rax, [rax+38h] mov rcx, [rbp+var_18] cmp rax, [rcx+108h] jz short loc_BCDEF loc_BCDCE: mov rax, [rbp+var_8] mov rax, [rax] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error mov [rbp+var_C], 7Eh ; '~' jmp short loc_BCE36 loc_BCDEF: mov rax, [rbp+var_18] cmp dword ptr [rax+180h], 40h ; '@' jnb short loc_BCE1A mov rax, [rbp+var_18] mov eax, [rax+180h] mov ecx, eax mov eax, 1 shl rax, cl sub rax, 1 mov [rbp+var_20], rax jmp short loc_BCE27 loc_BCE1A: mov rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_20], rax jmp short $+2 loc_BCE27: mov rcx, [rbp+var_20] mov rax, [rbp+var_18] mov [rax+0C0h], rcx loc_BCE36: mov eax, [rbp+var_C] add rsp, 20h pop rbp retn
long long mi_enable_indexes(long long *a1) { long long v2; // [rsp+0h] [rbp-20h] long long v3; // [rsp+8h] [rbp-18h] unsigned int v4; // [rsp+14h] [rbp-Ch] v4 = 0; v3 = *a1; if ( !*(_QWORD *)(*a1 + 64) && *(_QWORD *)(v3 + 56) == *(_QWORD *)(v3 + 264) ) { if ( *(_DWORD *)(v3 + 384) >= 0x40u ) v2 = -1LL; else v2 = (1LL << *(_DWORD *)(v3 + 384)) - 1; *(_QWORD *)(v3 + 192) = v2; } else { mi_report_error(126, *(_QWORD *)(*a1 + 616)); return 126; } return v4; }
mi_enable_indexes: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x001bcdce MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RBP + -0x18] CMP RAX,qword ptr [RCX + 0x108] JZ 0x001bcdef LAB_001bcdce: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x001b1420 MOV dword ptr [RBP + -0xc],0x7e JMP 0x001bce36 LAB_001bcdef: MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x180],0x40 JNC 0x001bce1a MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x180] MOV ECX,EAX MOV EAX,0x1 SHL RAX,CL SUB RAX,0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x001bce27 LAB_001bce1a: MOV RAX,-0x1 MOV qword ptr [RBP + -0x20],RAX JMP 0x001bce27 LAB_001bce27: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0xc0],RCX LAB_001bce36: MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x20 POP RBP RET
int4 mi_enable_indexes(long *param_1) { long lVar1; int8 local_28; int4 local_14; local_14 = 0; lVar1 = *param_1; if ((*(long *)(lVar1 + 0x40) == 0) && (*(long *)(lVar1 + 0x38) == *(long *)(lVar1 + 0x108))) { if (*(uint *)(lVar1 + 0x180) < 0x40) { local_28 = (1L << ((byte)*(int4 *)(lVar1 + 0x180) & 0x3f)) + -1; } else { local_28 = -1; } *(long *)(lVar1 + 0xc0) = local_28; } else { mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268)); local_14 = 0x7e; } return local_14; }
50,349
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array()
monkey531[P]llama/common/json.hpp
bool end_array() { JSON_ASSERT(!ref_stack.empty()); JSON_ASSERT(ref_stack.back()->is_array()); ref_stack.back()->set_parents(); ref_stack.pop_back(); return true; }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::end_array(): pushq %rax movq 0x10(%rdi), %rax cmpq %rax, 0x8(%rdi) je 0x608a2 movq -0x8(%rax), %rcx cmpb $0x2, (%rcx) jne 0x608be addq $-0x8, %rax movq %rax, 0x10(%rdi) movb $0x1, %al popq %rcx retq leaq 0x8f33a(%rip), %rdi # 0xefbe3 leaq 0x89890(%rip), %rdx # 0xea140 leaq 0x90317(%rip), %rcx # 0xf0bce movl $0x1b01, %esi # imm = 0x1B01 jmp 0x608d8 leaq 0x8f31e(%rip), %rdi # 0xefbe3 leaq 0x89874(%rip), %rdx # 0xea140 leaq 0x905c6(%rip), %rcx # 0xf0e99 movl $0x1b02, %esi # imm = 0x1B02 xorl %eax, %eax callq 0x1be80 nop
_ZN8nlohmann16json_abi_v3_11_36detail19json_sax_dom_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE9end_arrayEv: push rax mov rax, [rdi+10h] cmp [rdi+8], rax jz short loc_608A2 mov rcx, [rax-8] cmp byte ptr [rcx], 2 jnz short loc_608BE add rax, 0FFFFFFFFFFFFFFF8h mov [rdi+10h], rax mov al, 1 pop rcx retn loc_608A2: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackEmpty; "!ref_stack.empty()" mov esi, 1B01h jmp short loc_608D8 loc_608BE: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRefStackBackIs_0; "ref_stack.back()->is_array()" mov esi, 1B02h loc_608D8: xor eax, eax call _ggml_abort nop
char nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::end_array( long long a1) { long long v1; // rax long long v3; // rsi long long v4; // rdx long long v5; // rcx v1 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v1 ) { v3 = 6913LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 6913LL, "GGML_ASSERT(%s) failed", "!ref_stack.empty()"); } else { if ( **(_BYTE **)(v1 - 8) == 2 ) { *(_QWORD *)(a1 + 16) = v1 - 8; return 1; } v3 = 6914LL; ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 6914LL, "GGML_ASSERT(%s) failed", "ref_stack.back()->is_array()"); } return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::parse_error<nlohmann::json_abi_v3_11_3::detail::out_of_range>( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", v3, v4, v5); }
end_array: PUSH RAX MOV RAX,qword ptr [RDI + 0x10] CMP qword ptr [RDI + 0x8],RAX JZ 0x001608a2 MOV RCX,qword ptr [RAX + -0x8] CMP byte ptr [RCX],0x2 JNZ 0x001608be ADD RAX,-0x8 MOV qword ptr [RDI + 0x10],RAX MOV AL,0x1 POP RCX RET LAB_001608a2: LEA RDI,[0x1efbe3] LEA RDX,[0x1ea140] LEA RCX,[0x1f0bce] MOV ESI,0x1b01 JMP 0x001608d8 LAB_001608be: LEA RDI,[0x1efbe3] LEA RDX,[0x1ea140] LEA RCX,[0x1f0e99] MOV ESI,0x1b02 LAB_001608d8: XOR EAX,EAX CALL 0x0011be80
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::end_array() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::end_array(json_sax_dom_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { long lVar1; char *pcVar2; int8 uVar3; lVar1 = *(long *)(this + 0x10); if (*(long *)(this + 8) == lVar1) { pcVar2 = "!ref_stack.empty()"; uVar3 = 0x1b01; } else { if (**(char **)(lVar1 + -8) == '\x02') { *(long *)(this + 0x10) = lVar1 + -8; return CONCAT71((int7)((ulong)(lVar1 + -8) >> 8),1); } pcVar2 = "ref_stack.back()->is_array()"; uVar3 = 0x1b02; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
50,350
string_get_sortable_timestamp[abi:cxx11]()
monkey531[P]llama/common/common.cpp
std::string string_get_sortable_timestamp() { using clock = std::chrono::system_clock; const clock::time_point current_time = clock::now(); const time_t as_time_t = clock::to_time_t(current_time); char timestamp_no_ns[100]; std::strftime(timestamp_no_ns, 100, "%Y_%m_%d-%H_%M_%S", std::localtime(&as_time_t)); const int64_t ns = std::chrono::duration_cast<std::chrono::nanoseconds>( current_time.time_since_epoch() % 1000000000).count(); char timestamp_ns[11]; snprintf(timestamp_ns, 11, "%09" PRId64, ns); return std::string(timestamp_no_ns) + "." + std::string(timestamp_ns); }
O3
cpp
string_get_sortable_timestamp[abi:cxx11](): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf0, %rsp movq %rdi, %rbx callq 0x1a090 movq %rax, %r14 movabsq $0x112e0be826d694b3, %rcx # imm = 0x112E0BE826D694B3 imulq %rcx movq %rdx, %r12 movq %rdx, %rax shrq $0x3f, %rax sarq $0x1a, %r12 addq %rax, %r12 leaq 0x78(%rsp), %rdi movq %r12, (%rdi) callq 0x1a6b0 leaq 0x7c5a6(%rip), %rdx # 0xedbf7 leaq 0x80(%rsp), %r15 movl $0x64, %esi movq %r15, %rdi movq %rax, %rcx callq 0x1a730 imulq $0x3b9aca00, %r12, %rax # imm = 0x3B9ACA00 subq %rax, %r14 leaq 0x7c58f(%rip), %rdx # 0xedc09 leaq 0x4d(%rsp), %rdi movl $0xb, %esi movq %r14, %rcx xorl %eax, %eax callq 0x1adf0 leaq 0x68(%rsp), %r12 movq %r12, -0x10(%r12) movq %r15, %rdi callq 0x1a3e0 leaq (%rsp,%rax), %rdx addq $0x80, %rdx leaq 0x58(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0x214e2 leaq 0x77bef(%rip), %rsi # 0xe92b1 movq %r14, %rdi callq 0x1b0f0 leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x716f1 movq %rdx, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x716f8 movups (%rcx), %xmm0 movups %xmm0, (%r15) movq 0x8(%rax), %rdx movq %rdx, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x4d(%rsp), %r14 movq %r14, %rdi callq 0x1a3e0 leaq (%rsp,%rax), %rdx addq $0x4d, %rdx leaq 0x28(%rsp), %rdi movq %r14, %rsi callq 0x214e2 movq 0x8(%rsp), %rcx movq 0x10(%rsp), %r8 movq 0x30(%rsp), %rdx leaq (%rdx,%r8), %rax movl $0xf, %edi cmpq %r15, %rcx je 0x7175d movq 0x18(%rsp), %rdi movq 0x28(%rsp), %rsi cmpq %rdi, %rax jbe 0x7177b movl $0xf, %edi cmpq %r13, %rsi je 0x71776 movq 0x38(%rsp), %rdi cmpq %rdi, %rax jbe 0x71787 leaq 0x8(%rsp), %rdi callq 0x1a260 jmp 0x71795 leaq 0x28(%rsp), %rdi xorl %esi, %esi xorl %edx, %edx callq 0x1a9e0 leaq 0x10(%rbx), %rdx movq %rdx, (%rbx) movq (%rax), %rsi leaq 0x10(%rax), %rcx cmpq %rcx, %rsi je 0x717b4 movq %rsi, (%rbx) movq (%rcx), %rdx movq %rdx, 0x10(%rbx) jmp 0x717ba movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq %rax, %rdx addq $0x8, %rdx movq 0x8(%rax), %rsi movq %rsi, 0x8(%rbx) movq %rcx, (%rax) movq $0x0, (%rdx) movb $0x0, (%rcx) movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x717ed movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8e0 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x71804 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 movq 0x58(%rsp), %rdi cmpq %r12, %rdi je 0x7181b movq 0x68(%rsp), %rsi incq %rsi callq 0x1a8e0 movq %rbx, %rax addq $0xf0, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x7184e movq 0x38(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0x7184e movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0x7186a movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 jmp 0x7186a movq %rax, %rbx movq 0x58(%rsp), %rdi cmpq %r12, %rdi je 0x71881 movq 0x68(%rsp), %rsi incq %rsi callq 0x1a8e0 movq %rbx, %rdi callq 0x1afa0
_Z29string_get_sortable_timestampB5cxx11v: push r15 push r14 push r13 push r12 push rbx sub rsp, 0F0h mov rbx, rdi call __ZNSt6chrono3_V212system_clock3nowEv; std::chrono::_V2::system_clock::now(void) mov r14, rax mov rcx, 112E0BE826D694B3h imul rcx mov r12, rdx mov rax, rdx shr rax, 3Fh sar r12, 1Ah add r12, rax lea rdi, [rsp+118h+var_A0] mov [rdi], r12 call _localtime lea rdx, aYMDHMS; "%Y_%m_%d-%H_%M_%S" lea r15, [rsp+118h+var_98] mov esi, 64h ; 'd' mov rdi, r15 mov rcx, rax call _strftime imul rax, r12, 3B9ACA00h sub r14, rax lea rdx, a09ld; "%09ld" lea rdi, [rsp+118h+var_CB] mov esi, 0Bh mov rcx, r14 xor eax, eax call _snprintf lea r12, [rsp+118h+var_B0] mov [r12-10h], r12 mov rdi, r15 call _strlen lea rdx, [rsp+rax+118h+var_118] add rdx, 80h lea r14, [rsp+118h+var_C0] mov rdi, r14 mov rsi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, aN0N1+8; "." mov rdi, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r15, [rsp+118h+var_100] mov [r15-10h], r15 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_716F1 mov [rsp+118h+var_110], rdx mov rdx, [rcx] mov [rsp+118h+var_100], rdx jmp short loc_716F8 loc_716F1: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r15], xmm0 loc_716F8: mov rdx, [rax+8] mov [rsp+118h+var_108], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea r13, [rsp+118h+var_E0] mov [r13-10h], r13 lea r14, [rsp+118h+var_CB] mov rdi, r14 call _strlen lea rdx, [rsp+rax+118h+var_118] add rdx, 4Dh ; 'M' lea rdi, [rsp+118h+var_F0] mov rsi, 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) mov rcx, [rsp+118h+var_110] mov r8, [rsp+118h+var_108] mov rdx, [rsp+118h+var_E8] lea rax, [rdx+r8] mov edi, 0Fh cmp rcx, r15 jz short loc_7175D mov rdi, [rsp+118h+var_100] loc_7175D: mov rsi, [rsp+118h+var_F0] cmp rax, rdi jbe short loc_7177B mov edi, 0Fh cmp rsi, r13 jz short loc_71776 mov rdi, [rsp+118h+var_E0] loc_71776: cmp rax, rdi jbe short loc_71787 loc_7177B: lea rdi, [rsp+118h+var_110] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) jmp short loc_71795 loc_71787: lea rdi, [rsp+118h+var_F0] xor esi, esi xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) loc_71795: lea rdx, [rbx+10h] mov [rbx], rdx mov rsi, [rax] lea rcx, [rax+10h] cmp rsi, rcx jz short loc_717B4 mov [rbx], rsi mov rdx, [rcx] mov [rbx+10h], rdx jmp short loc_717BA loc_717B4: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_717BA: mov rdx, rax add rdx, 8 mov rsi, [rax+8] mov [rbx+8], rsi mov [rax], rcx mov qword ptr [rdx], 0 mov byte ptr [rcx], 0 mov rdi, [rsp+118h+var_F0]; void * cmp rdi, r13 jz short loc_717ED mov rsi, [rsp+118h+var_E0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_717ED: mov rdi, [rsp+118h+var_110]; void * cmp rdi, r15 jz short loc_71804 mov rsi, [rsp+118h+var_100] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71804: mov rdi, [rsp+118h+var_C0]; void * cmp rdi, r12 jz short loc_7181B mov rsi, [rsp+118h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7181B: mov rax, rbx add rsp, 0F0h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov rbx, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_7184E mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7184E mov rbx, rax loc_7184E: mov rdi, [rsp+arg_0]; void * cmp rdi, r15 jz short loc_7186A mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_7186A mov rbx, rax loc_7186A: mov rdi, [rsp+arg_50]; void * cmp rdi, r12 jz short loc_71881 mov rsi, [rsp+arg_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_71881: mov rdi, rbx call __Unwind_Resume
long long string_get_sortable_timestamp[abi:cxx11](long long a1) { long long v2; // r14 long long v3; // rax long long v4; // rax long long v5; // rax __int128 *v6; // rcx long long v7; // rax unsigned long long v8; // rax unsigned long long v9; // rdi unsigned long long v10; // rdi _QWORD *v11; // rax _OWORD *v12; // rcx void *v14; // [rsp+8h] [rbp-110h] BYREF long long v15; // [rsp+10h] [rbp-108h] __int128 v16; // [rsp+18h] [rbp-100h] BYREF void *v17; // [rsp+28h] [rbp-F0h] BYREF long long v18; // [rsp+30h] [rbp-E8h] _QWORD v19[2]; // [rsp+38h] [rbp-E0h] BYREF _BYTE v20[11]; // [rsp+4Dh] [rbp-CBh] BYREF void *v21[2]; // [rsp+58h] [rbp-C0h] BYREF _QWORD v22[3]; // [rsp+68h] [rbp-B0h] BYREF _BYTE v23[152]; // [rsp+80h] [rbp-98h] BYREF v2 = std::chrono::_V2::system_clock::now((std::chrono::_V2::system_clock *)a1); v22[2] = v2 / 1000000000; v3 = localtime(); strftime(v23, 100LL, "%Y_%m_%d-%H_%M_%S", v3); snprintf(v20, 11LL, "%09ld", v2 % 1000000000); v21[0] = v22; v4 = strlen(v23); std::string::_M_construct<char const*>((long long)v21, v23, (long long)&v23[v4]); v5 = std::string::append(v21, "."); v14 = &v16; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v16 = *v6; } else { v14 = *(void **)v5; *(_QWORD *)&v16 = *(_QWORD *)v6; } v15 = *(_QWORD *)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; v17 = v19; v7 = strlen(v20); std::string::_M_construct<char const*>((long long)&v17, v20, (long long)&v20[v7]); v8 = v18 + v15; v9 = 15LL; if ( v14 != &v16 ) v9 = v16; if ( v8 <= v9 ) goto LABEL_10; v10 = 15LL; if ( v17 != v19 ) v10 = v19[0]; if ( v8 <= v10 ) v11 = (_QWORD *)std::string::replace(&v17, 0LL, 0LL, v14, v15); else LABEL_10: v11 = (_QWORD *)std::string::_M_append(&v14, v17, v18); *(_QWORD *)a1 = a1 + 16; v12 = v11 + 2; if ( (_QWORD *)*v11 == v11 + 2 ) { *(_OWORD *)(a1 + 16) = *v12; } else { *(_QWORD *)a1 = *v11; *(_QWORD *)(a1 + 16) = *(_QWORD *)v12; } *(_QWORD *)(a1 + 8) = v11[1]; *v11 = v12; v11[1] = 0LL; *(_BYTE *)v12 = 0; if ( v17 != v19 ) operator delete(v17, v19[0] + 1LL); if ( v14 != &v16 ) operator delete(v14, v16 + 1); if ( v21[0] != v22 ) operator delete(v21[0], v22[0] + 1LL); return a1; }
string_get_sortable_timestamp[abi:cxx11]: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf0 MOV RBX,RDI CALL 0x0011a090 MOV R14,RAX MOV RCX,0x112e0be826d694b3 IMUL RCX MOV R12,RDX MOV RAX,RDX SHR RAX,0x3f SAR R12,0x1a ADD R12,RAX LEA RDI,[RSP + 0x78] MOV qword ptr [RDI],R12 CALL 0x0011a6b0 LEA RDX,[0x1edbf7] LEA R15,[RSP + 0x80] MOV ESI,0x64 MOV RDI,R15 MOV RCX,RAX CALL 0x0011a730 IMUL RAX,R12,0x3b9aca00 SUB R14,RAX LEA RDX,[0x1edc09] LEA RDI,[RSP + 0x4d] MOV ESI,0xb MOV RCX,R14 XOR EAX,EAX CALL 0x0011adf0 LEA R12,[RSP + 0x68] MOV qword ptr [R12 + -0x10],R12 MOV RDI,R15 CALL 0x0011a3e0 LEA RDX,[RSP + RAX*0x1] ADD RDX,0x80 LEA R14,[RSP + 0x58] MOV RDI,R14 MOV RSI,R15 CALL 0x001214e2 LAB_001716bb: LEA RSI,[0x1e92b1] MOV RDI,R14 CALL 0x0011b0f0 LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x001716f1 MOV qword ptr [RSP + 0x8],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x001716f8 LAB_001716f1: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R15],XMM0 LAB_001716f8: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LEA R14,[RSP + 0x4d] MOV RDI,R14 CALL 0x0011a3e0 LEA RDX,[RSP + RAX*0x1] ADD RDX,0x4d LAB_0017172e: LEA RDI,[RSP + 0x28] MOV RSI,R14 CALL 0x001214e2 MOV RCX,qword ptr [RSP + 0x8] MOV R8,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x30] LEA RAX,[RDX + R8*0x1] MOV EDI,0xf CMP RCX,R15 JZ 0x0017175d MOV RDI,qword ptr [RSP + 0x18] LAB_0017175d: MOV RSI,qword ptr [RSP + 0x28] CMP RAX,RDI JBE 0x0017177b MOV EDI,0xf CMP RSI,R13 JZ 0x00171776 MOV RDI,qword ptr [RSP + 0x38] LAB_00171776: CMP RAX,RDI JBE 0x00171787 LAB_0017177b: LEA RDI,[RSP + 0x8] CALL 0x0011a260 JMP 0x00171795 LAB_00171787: LEA RDI,[RSP + 0x28] XOR ESI,ESI XOR EDX,EDX CALL 0x0011a9e0 LAB_00171795: LEA RDX,[RBX + 0x10] MOV qword ptr [RBX],RDX MOV RSI,qword ptr [RAX] LEA RCX,[RAX + 0x10] CMP RSI,RCX JZ 0x001717b4 MOV qword ptr [RBX],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RBX + 0x10],RDX JMP 0x001717ba LAB_001717b4: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_001717ba: MOV RDX,RAX ADD RDX,0x8 MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x8],RSI MOV qword ptr [RAX],RCX MOV qword ptr [RDX],0x0 MOV byte ptr [RCX],0x0 MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x001717ed MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x0011a8e0 LAB_001717ed: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R15 JZ 0x00171804 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8e0 LAB_00171804: MOV RDI,qword ptr [RSP + 0x58] CMP RDI,R12 JZ 0x0017181b MOV RSI,qword ptr [RSP + 0x68] INC RSI CALL 0x0011a8e0 LAB_0017181b: MOV RAX,RBX ADD RSP,0xf0 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* string_get_sortable_timestamp[abi:cxx11]() */ void string_get_sortable_timestamp_abi_cxx11_(void) { int8 *puVar1; int8 uVar2; long lVar3; tm *__tp; size_t sVar4; long *plVar5; int8 *puVar6; ulong *puVar7; int8 *in_RDI; ulong uVar8; ulong *local_110; long local_108; ulong local_100; long lStack_f8; ulong *local_f0; long local_e8; ulong local_e0 [2]; char local_cb [11]; long *local_c0 [2]; long local_b0 [2]; long local_a0; char local_98 [112]; lVar3 = std::chrono::_V2::system_clock::now(); local_a0 = lVar3 / 1000000000; __tp = localtime(&local_a0); strftime(local_98,100,"%Y_%m_%d-%H_%M_%S",__tp); snprintf(local_cb,0xb,"%09ld",lVar3 % 1000000000); local_c0[0] = local_b0; sVar4 = strlen(local_98); std::__cxx11::string::_M_construct<char_const*>(local_c0,local_98,local_98 + sVar4); /* try { // try from 001716bb to 001716c9 has its CatchHandler @ 00171867 */ plVar5 = (long *)std::__cxx11::string::append((char *)local_c0); puVar7 = (ulong *)(plVar5 + 2); if ((ulong *)*plVar5 == puVar7) { local_100 = *puVar7; lStack_f8 = plVar5[3]; local_110 = &local_100; } else { local_100 = *puVar7; local_110 = (ulong *)*plVar5; } local_108 = plVar5[1]; *plVar5 = (long)puVar7; plVar5[1] = 0; *(int1 *)(plVar5 + 2) = 0; local_f0 = local_e0; sVar4 = strlen(local_cb); /* try { // try from 0017172e to 0017173a has its CatchHandler @ 0017184b */ std::__cxx11::string::_M_construct<char_const*>(&local_f0,local_cb,local_cb + sVar4); uVar8 = 0xf; if (local_110 != &local_100) { uVar8 = local_100; } if (uVar8 < (ulong)(local_e8 + local_108)) { uVar8 = 0xf; if (local_f0 != local_e0) { uVar8 = local_e0[0]; } if ((ulong)(local_e8 + local_108) <= uVar8) { puVar6 = (int8 *) std::__cxx11::string::replace((ulong)&local_f0,0,(char *)0x0,(ulong)local_110); goto LAB_00171795; } } /* try { // try from 0017177b to 00171794 has its CatchHandler @ 0017182f */ puVar6 = (int8 *)std::__cxx11::string::_M_append((char *)&local_110,(ulong)local_f0); LAB_00171795: *in_RDI = in_RDI + 2; puVar1 = puVar6 + 2; if ((int8 *)*puVar6 == puVar1) { uVar2 = puVar6[3]; in_RDI[2] = *puVar1; in_RDI[3] = uVar2; } else { *in_RDI = (int8 *)*puVar6; in_RDI[2] = *puVar1; } in_RDI[1] = puVar6[1]; *puVar6 = puVar1; puVar6[1] = 0; *(int1 *)puVar1 = 0; if (local_f0 != local_e0) { operator_delete(local_f0,local_e0[0] + 1); } if (local_110 != &local_100) { operator_delete(local_110,local_100 + 1); } if (local_c0[0] != local_b0) { operator_delete(local_c0[0],local_b0[0] + 1); } return; }
50,351
hash_string
bluesky950520[P]quickjs/quickjs.c
static uint32_t hash_string(const JSString *str, uint32_t h) { if (str->is_wide_char) h = hash_string16(str->u.str16, str->len, h); else h = hash_string8(str->u.str8, str->len, h); return h; }
O1
c
hash_string: movl %esi, %eax movq 0x4(%rdi), %rdx movl %edx, %ecx andl $0x7fffffff, %ecx # imm = 0x7FFFFFFF testl %edx, %edx js 0x3fbd2 testq %rcx, %rcx je 0x3fbee xorl %edx, %edx imull $0x107, %eax, %esi # imm = 0x107 movzbl 0x18(%rdi,%rdx), %eax addl %esi, %eax incq %rdx cmpq %rdx, %rcx jne 0x3fbbb jmp 0x3fbee testq %rcx, %rcx je 0x3fbee xorl %edx, %edx imull $0x107, %eax, %esi # imm = 0x107 movzwl 0x18(%rdi,%rdx,2), %eax addl %esi, %eax incq %rdx cmpq %rdx, %rcx jne 0x3fbd9 retq
hash_string: mov eax, esi mov rdx, [rdi+4] mov ecx, edx and ecx, 7FFFFFFFh test edx, edx js short loc_3FBD2 test rcx, rcx jz short locret_3FBEE xor edx, edx loc_3FBBB: imul esi, eax, 107h movzx eax, byte ptr [rdi+rdx+18h] add eax, esi inc rdx cmp rcx, rdx jnz short loc_3FBBB jmp short locret_3FBEE loc_3FBD2: test rcx, rcx jz short locret_3FBEE xor edx, edx loc_3FBD9: imul esi, eax, 107h movzx eax, word ptr [rdi+rdx*2+18h] add eax, esi inc rdx cmp rcx, rdx jnz short loc_3FBD9 locret_3FBEE: retn
long long hash_string(long long a1, unsigned int a2) { long long result; // rax long long v3; // rcx long long j; // rdx long long i; // rdx result = a2; v3 = *(_QWORD *)(a1 + 4) & 0x7FFFFFFFLL; if ( (int)*(_QWORD *)(a1 + 4) < 0 ) { if ( v3 ) { for ( i = 0LL; i != v3; ++i ) result = 263 * (_DWORD)result + (unsigned int)*(unsigned __int16 *)(a1 + 2 * i + 24); } } else if ( v3 ) { for ( j = 0LL; j != v3; ++j ) result = 263 * (_DWORD)result + (unsigned int)*(unsigned __int8 *)(a1 + j + 24); } return result; }
hash_string: MOV EAX,ESI MOV RDX,qword ptr [RDI + 0x4] MOV ECX,EDX AND ECX,0x7fffffff TEST EDX,EDX JS 0x0013fbd2 TEST RCX,RCX JZ 0x0013fbee XOR EDX,EDX LAB_0013fbbb: IMUL ESI,EAX,0x107 MOVZX EAX,byte ptr [RDI + RDX*0x1 + 0x18] ADD EAX,ESI INC RDX CMP RCX,RDX JNZ 0x0013fbbb JMP 0x0013fbee LAB_0013fbd2: TEST RCX,RCX JZ 0x0013fbee XOR EDX,EDX LAB_0013fbd9: IMUL ESI,EAX,0x107 MOVZX EAX,word ptr [RDI + RDX*0x2 + 0x18] ADD EAX,ESI INC RDX CMP RCX,RDX JNZ 0x0013fbd9 LAB_0013fbee: RET
int hash_string(long param_1,int param_2) { ulong uVar1; uint uVar2; ulong uVar3; uVar2 = (uint)*(int8 *)(param_1 + 4); uVar1 = (ulong)(uVar2 & 0x7fffffff); if ((int)uVar2 < 0) { if (uVar1 != 0) { uVar3 = 0; do { param_2 = (uint)*(ushort *)(param_1 + 0x18 + uVar3 * 2) + param_2 * 0x107; uVar3 = uVar3 + 1; } while (uVar1 != uVar3); } } else if (uVar1 != 0) { uVar3 = 0; do { param_2 = (uint)*(byte *)(param_1 + 0x18 + uVar3) + param_2 * 0x107; uVar3 = uVar3 + 1; } while (uVar1 != uVar3); } return param_2; }
50,352
alaya::SearchTest::SearchTest()
AlayaLite/tests/executor/search_test.cpp
void SetUp() override { if (!std::filesystem::exists(dir_name_)) { int ret = std::system("wget ftp://ftp.irisa.fr/local/texmex/corpus/siftsmall.tar.gz"); if (ret != 0) { throw std::runtime_error("Download siftsmall.tar.gz failed"); } ret = std::system("tar -zxvf siftsmall.tar.gz"); if (ret != 0) { throw std::runtime_error("Unzip siftsmall.tar.gz failed"); } } alaya::load_fvecs(data_file_, data_, points_num_, dim_); alaya::load_fvecs(query_file_, queries_, query_num_, query_dim_); assert(dim_ == query_dim_); alaya::load_ivecs(gt_file_, answers_, ans_num_, gt_col_); assert(ans_num_ == query_num_); }
O0
cpp
alaya::SearchTest::SearchTest(): movq %rdi, -0x8(%rsp) ud2 nopw (%rax,%rax)
_ZN5alaya10SearchTestD0Ev: mov [rsp+var_8], rdi ud2
void __noreturn alaya::SearchTest::~SearchTest(alaya::SearchTest *this) { BUG(); }
~SearchTest: MOV qword ptr [RSP + -0x8],RDI UD2
/* alaya::SearchTest::~SearchTest() */ void __thiscall alaya::SearchTest::~SearchTest(SearchTest *this) { code *pcVar1; /* WARNING: Does not return */ pcVar1 = (code *)invalidInstructionException(); (*pcVar1)(); }
50,353
alaya::SearchTest::SearchTest()
AlayaLite/tests/executor/search_test.cpp
void SetUp() override { if (!std::filesystem::exists(dir_name_)) { int ret = std::system("wget ftp://ftp.irisa.fr/local/texmex/corpus/siftsmall.tar.gz"); if (ret != 0) { throw std::runtime_error("Download siftsmall.tar.gz failed"); } ret = std::system("tar -zxvf siftsmall.tar.gz"); if (ret != 0) { throw std::runtime_error("Unzip siftsmall.tar.gz failed"); } } alaya::load_fvecs(data_file_, data_, points_num_, dim_); alaya::load_fvecs(query_file_, queries_, query_num_, query_dim_); assert(dim_ == query_dim_); alaya::load_ivecs(gt_file_, answers_, ans_num_, gt_col_); assert(ans_num_ == query_num_); }
O3
cpp
alaya::SearchTest::SearchTest(): pushq %rbx movq %rdi, %rbx leaq 0x97639(%rip), %rax # 0xb0028 addq $0x10, %rax movq %rax, (%rdi) movq 0xf0(%rdi), %rdi testq %rdi, %rdi je 0x18a11 movq 0x100(%rbx), %rsi subq %rdi, %rsi callq 0x11120 movq 0xd0(%rbx), %rdi testq %rdi, %rdi je 0x18a2c movq 0xe0(%rbx), %rsi subq %rdi, %rsi callq 0x11120 movq 0xb0(%rbx), %rdi testq %rdi, %rdi je 0x18a47 movq 0xc0(%rbx), %rsi subq %rdi, %rsi callq 0x11120 leaq 0x88(%rbx), %rdi callq 0x18280 leaq 0x60(%rbx), %rdi callq 0x18280 leaq 0x38(%rbx), %rdi callq 0x18280 leaq 0x10(%rbx), %rdi callq 0x18280 movq %rbx, %rdi popq %rbx jmp 0x61a5a nop
_ZN5alaya10SearchTestD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5alaya10SearchTestE; `vtable for'alaya::SearchTest add rax, 10h mov [rdi], rax mov rdi, [rdi+0F0h]; void * test rdi, rdi jz short loc_18A11 mov rsi, [rbx+100h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_18A11: mov rdi, [rbx+0D0h]; void * test rdi, rdi jz short loc_18A2C mov rsi, [rbx+0E0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_18A2C: mov rdi, [rbx+0B0h]; void * test rdi, rdi jz short loc_18A47 mov rsi, [rbx+0C0h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_18A47: lea rdi, [rbx+88h]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() lea rdi, [rbx+60h]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() lea rdi, [rbx+38h]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() lea rdi, [rbx+10h]; this call _ZNSt10filesystem7__cxx114pathD2Ev; std::filesystem::__cxx11::path::~path() mov rdi, rbx; this pop rbx jmp _ZN7testing4TestD2Ev; testing::Test::~Test()
void alaya::SearchTest::~SearchTest(alaya::SearchTest *this) { void *v2; // rdi void *v3; // rdi void *v4; // rdi *(_QWORD *)this = &`vtable for'alaya::SearchTest + 2; v2 = (void *)*((_QWORD *)this + 30); if ( v2 ) operator delete(v2, *((_QWORD *)this + 32) - (_QWORD)v2); v3 = (void *)*((_QWORD *)this + 26); if ( v3 ) operator delete(v3, *((_QWORD *)this + 28) - (_QWORD)v3); v4 = (void *)*((_QWORD *)this + 22); if ( v4 ) operator delete(v4, *((_QWORD *)this + 24) - (_QWORD)v4); std::filesystem::__cxx11::path::~path((alaya::SearchTest *)((char *)this + 136)); std::filesystem::__cxx11::path::~path((alaya::SearchTest *)((char *)this + 96)); std::filesystem::__cxx11::path::~path((alaya::SearchTest *)((char *)this + 56)); std::filesystem::__cxx11::path::~path((alaya::SearchTest *)((char *)this + 16)); testing::Test::~Test(this); }
~SearchTest: PUSH RBX MOV RBX,RDI LEA RAX,[0x1b0028] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0xf0] TEST RDI,RDI JZ 0x00118a11 MOV RSI,qword ptr [RBX + 0x100] SUB RSI,RDI CALL 0x00111120 LAB_00118a11: MOV RDI,qword ptr [RBX + 0xd0] TEST RDI,RDI JZ 0x00118a2c MOV RSI,qword ptr [RBX + 0xe0] SUB RSI,RDI CALL 0x00111120 LAB_00118a2c: MOV RDI,qword ptr [RBX + 0xb0] TEST RDI,RDI JZ 0x00118a47 MOV RSI,qword ptr [RBX + 0xc0] SUB RSI,RDI CALL 0x00111120 LAB_00118a47: LEA RDI,[RBX + 0x88] CALL 0x00118280 LEA RDI,[RBX + 0x60] CALL 0x00118280 LEA RDI,[RBX + 0x38] CALL 0x00118280 LEA RDI,[RBX + 0x10] CALL 0x00118280 MOV RDI,RBX POP RBX JMP 0x00161a5a
/* alaya::SearchTest::~SearchTest() */ void __thiscall alaya::SearchTest::~SearchTest(SearchTest *this) { void *pvVar1; *(int ***)this = &PTR__SearchTest_001b0038; pvVar1 = *(void **)(this + 0xf0); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0x100) - (long)pvVar1); } pvVar1 = *(void **)(this + 0xd0); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0xe0) - (long)pvVar1); } pvVar1 = *(void **)(this + 0xb0); if (pvVar1 != (void *)0x0) { operator_delete(pvVar1,*(long *)(this + 0xc0) - (long)pvVar1); } std::filesystem::__cxx11::path::~path((path *)(this + 0x88)); std::filesystem::__cxx11::path::~path((path *)(this + 0x60)); std::filesystem::__cxx11::path::~path((path *)(this + 0x38)); std::filesystem::__cxx11::path::~path((path *)(this + 0x10)); testing::Test::~Test((Test *)this); return; }
50,354
nglog::(anonymous namespace)::LogFileObject::LogSize()
ng-log[P]ng-log/src/logging.cc
uint32 LogSize() override { std::lock_guard<std::mutex> l{mutex_}; return file_length_; }
O1
cpp
nglog::(anonymous namespace)::LogFileObject::LogSize(): pushq %rbp pushq %r14 pushq %rbx movq %rdi, %r14 leaq 0x8(%rdi), %rbx movq %rbx, %rdi callq 0x77f0 testl %eax, %eax jne 0x107e1 movl 0xac(%r14), %ebp movq %rbx, %rdi callq 0x73f0 movl %ebp, %eax popq %rbx popq %r14 popq %rbp retq movl %eax, %edi callq 0x7350
_ZN5nglog12_GLOBAL__N_113LogFileObject7LogSizeEv: push rbp push r14 push rbx mov r14, rdi lea rbx, [rdi+8] mov rdi, rbx call _pthread_mutex_lock test eax, eax jnz short loc_107E1 mov ebp, [r14+0ACh] mov rdi, rbx call _pthread_mutex_unlock mov eax, ebp pop rbx pop r14 pop rbp retn loc_107E1: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int)
long long nglog::`anonymous namespace'::LogFileObject::LogSize( nglog::_anonymous_namespace_::LogFileObject *this) { int v1; // eax unsigned int v2; // ebp v1 = pthread_mutex_lock((char *)this + 8); if ( v1 ) std::__throw_system_error(v1); v2 = *((_DWORD *)this + 43); pthread_mutex_unlock((char *)this + 8); return v2; }
LogSize: PUSH RBP PUSH R14 PUSH RBX MOV R14,RDI LEA RBX,[RDI + 0x8] MOV RDI,RBX CALL 0x001077f0 TEST EAX,EAX JNZ 0x001107e1 MOV EBP,dword ptr [R14 + 0xac] MOV RDI,RBX CALL 0x001073f0 MOV EAX,EBP POP RBX POP R14 POP RBP RET LAB_001107e1: MOV EDI,EAX CALL 0x00107350
/* nglog::(anonymous namespace)::LogFileObject::LogSize() */ int4 __thiscall nglog::(anonymous_namespace)::LogFileObject::LogSize(LogFileObject *this) { int4 uVar1; int iVar2; iVar2 = pthread_mutex_lock((pthread_mutex_t *)(this + 8)); if (iVar2 == 0) { uVar1 = *(int4 *)(this + 0xac); pthread_mutex_unlock((pthread_mutex_t *)(this + 8)); return uVar1; } /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar2); }
50,355
common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool)
monkey531[P]llama/common/common.cpp
std::string common_chat_format_single( const common_chat_template & tmpl, const std::vector<common_chat_msg> & past_msg, const common_chat_msg & new_msg, bool add_ass, bool use_jinja) { std::ostringstream ss; auto fmt_past_msg = past_msg.empty() ? "" : common_chat_apply_template(tmpl, past_msg, false, use_jinja); std::vector<common_chat_msg> chat_new(past_msg); // if the past_msg ends with a newline, we must preserve it in the formatted version if (add_ass && !fmt_past_msg.empty() && fmt_past_msg.back() == '\n') { ss << "\n"; }; // format chat with new_msg chat_new.push_back(new_msg); auto fmt_new_msg = common_chat_apply_template(tmpl, chat_new, add_ass, use_jinja); // get the diff part ss << fmt_new_msg.substr(fmt_past_msg.size(), fmt_new_msg.size() - fmt_past_msg.size()); return ss.str(); }
O2
cpp
common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg>> const&, common_chat_msg const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1f8, %rsp # imm = 0x1F8 movl %r9d, %r15d movl %r8d, %ebp movq %rcx, %r12 movq %rdx, %r13 movq %rsi, %r14 movq %rdi, %rbx leaq 0x80(%rsp), %rdi callq 0x22a60 movq (%r13), %rax movzbl %r15b, %r15d cmpq 0x8(%r13), %rax je 0x419c5 leaq 0x8(%rsp), %rdi movq %r14, %rsi movq %r13, %rdx xorl %ecx, %ecx movl %r15d, %r8d callq 0x414ba jmp 0x419db leaq 0x5b275(%rip), %rsi # 0x9cc41 leaq 0x8(%rsp), %rdi leaq 0x40(%rsp), %rdx callq 0x29014 leaq 0x28(%rsp), %rdi movq %r13, %rsi callq 0x46f6e testb %bpl, %bpl je 0x41a17 movq 0x10(%rsp), %rax testq %rax, %rax je 0x41a17 movq 0x8(%rsp), %rcx cmpb $0xa, -0x1(%rcx,%rax) jne 0x41a17 leaq 0x5b236(%rip), %rsi # 0x9cc40 leaq 0x80(%rsp), %rdi callq 0x227c0 leaq 0x28(%rsp), %rdi movq %r12, %rsi callq 0x46fc8 movzbl %bpl, %ecx leaq 0x40(%rsp), %rdi leaq 0x28(%rsp), %rdx movq %r14, %rsi movl %r15d, %r8d callq 0x414ba movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rsi movq 0x8(%rsi), %rcx subq %rdx, %rcx leaq 0x60(%rsp), %rdi callq 0x22850 leaq 0x80(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x226d0 leaq 0x60(%rsp), %rdi callq 0x22f98 leaq 0x88(%rsp), %rsi movq %rbx, %rdi callq 0x22c00 leaq 0x40(%rsp), %rdi callq 0x22f98 leaq 0x28(%rsp), %rdi callq 0x46ff4 leaq 0x8(%rsp), %rdi callq 0x22f98 leaq 0x80(%rsp), %rdi callq 0x22180 movq %rbx, %rax addq $0x1f8, %rsp # imm = 0x1F8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x41ac6 movq %rax, %rbx jmp 0x41b09 jmp 0x41adc movq %rax, %rbx leaq 0x60(%rsp), %rdi callq 0x22f98 jmp 0x41adf movq %rax, %rbx leaq 0x40(%rsp), %rdi callq 0x22f98 jmp 0x41af5 jmp 0x41af2 movq %rax, %rbx jmp 0x41aff movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x46ff4 leaq 0x8(%rsp), %rdi callq 0x22f98 leaq 0x80(%rsp), %rdi callq 0x22180 movq %rbx, %rdi callq 0x22da0
_Z25common_chat_format_singleB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EERKS4_bb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1F8h mov r15d, r9d mov ebp, r8d mov r12, rcx mov r13, rdx mov r14, rsi mov rbx, rdi lea rdi, [rsp+228h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov rax, [r13+0] movzx r15d, r15b cmp rax, [r13+8] jz short loc_419C5 lea rdi, [rsp+228h+var_220] mov rsi, r14 mov rdx, r13 xor ecx, ecx mov r8d, r15d call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) jmp short loc_419DB loc_419C5: lea rsi, aEndIndexOutOfB+19h; "" lea rdi, [rsp+228h+var_220] lea rdx, [rsp+228h+var_1E8] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) loc_419DB: lea rdi, [rsp+228h+var_200] mov rsi, r13 call _ZNSt6vectorI15common_chat_msgSaIS0_EEC2ERKS2_; std::vector<common_chat_msg>::vector(std::vector<common_chat_msg> const&) test bpl, bpl jz short loc_41A17 mov rax, [rsp+228h+var_218] test rax, rax jz short loc_41A17 mov rcx, [rsp+228h+var_220] cmp byte ptr [rcx+rax-1], 0Ah jnz short loc_41A17 lea rsi, aEndIndexOutOfB+18h; "\n" lea rdi, [rsp+228h+var_1A8] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) loc_41A17: lea rdi, [rsp+228h+var_200] mov rsi, r12 call _ZNSt6vectorI15common_chat_msgSaIS0_EE9push_backERKS0_; std::vector<common_chat_msg>::push_back(common_chat_msg const&) movzx ecx, bpl lea rdi, [rsp+228h+var_1E8] lea rdx, [rsp+228h+var_200] mov rsi, r14 mov r8d, r15d call _Z26common_chat_apply_templateB5cxx11RKN5minja13chat_templateERKSt6vectorI15common_chat_msgSaIS4_EEbb; common_chat_apply_template(minja::chat_template const&,std::vector<common_chat_msg> const&,bool,bool) mov rdx, [rsp+228h+var_218] lea rsi, [rsp+228h+var_1E8] mov rcx, [rsi+8] sub rcx, rdx lea rdi, [rsp+228h+var_1C8] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) lea rdi, [rsp+228h+var_1A8] lea rsi, [rsp+228h+var_1C8] call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) lea rdi, [rsp+228h+var_1C8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rsi, [rsp+228h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) lea rdi, [rsp+228h+var_1E8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+228h+var_200] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() lea rdi, [rsp+228h+var_220]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+228h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() mov rax, rbx add rsp, 1F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_41AC6: mov rbx, rax jmp short loc_41B09 jmp short loc_41ADC mov rbx, rax lea rdi, [rsp+arg_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_41ADF loc_41ADC: mov rbx, rax loc_41ADF: lea rdi, [rsp+arg_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_41AF5 jmp short loc_41AF2 mov rbx, rax jmp short loc_41AFF loc_41AF2: mov rbx, rax loc_41AF5: lea rdi, [rsp+arg_20] call _ZNSt6vectorI15common_chat_msgSaIS0_EED2Ev; std::vector<common_chat_msg>::~vector() loc_41AFF: lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_41B09: lea rdi, [rsp+arg_78] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED1Ev; std::ostringstream::~ostringstream() mov rdi, rbx call __Unwind_Resume
long long common_chat_format_single[abi:cxx11]( long long a1, common_chat_inputs *a2, _QWORD *a3, long long a4, unsigned __int8 a5, unsigned __int8 a6) { long long v11; // [rsp+8h] [rbp-220h] BYREF long long v12; // [rsp+10h] [rbp-218h] _QWORD v13[3]; // [rsp+28h] [rbp-200h] BYREF _QWORD v14[4]; // [rsp+40h] [rbp-1E8h] BYREF _BYTE v15[32]; // [rsp+60h] [rbp-1C8h] BYREF _BYTE v16[8]; // [rsp+80h] [rbp-1A8h] BYREF _BYTE v17[416]; // [rsp+88h] [rbp-1A0h] BYREF std::ostringstream::basic_ostringstream(v16); if ( *a3 == a3[1] ) std::string::basic_string<std::allocator<char>>(&v11, (long long)""); else common_chat_apply_template[abi:cxx11](&v11, a2, a3, 0, a6); std::vector<common_chat_msg>::vector(v13, a3); if ( a5 && v12 && *(_BYTE *)(v11 + v12 - 1) == 10 ) std::operator<<<std::char_traits<char>>(v16, "\n"); std::vector<common_chat_msg>::push_back(v13, a4); common_chat_apply_template[abi:cxx11](v14, a2, v13, a5, a6); std::string::substr(v15, v14, v12, v14[1] - v12); std::operator<<<char>(v16, v15); std::string::~string(v15); std::stringbuf::str(a1, v17); std::string::~string(v14); std::vector<common_chat_msg>::~vector(v13); std::string::~string(&v11); std::ostringstream::~ostringstream(v16); return a1; }
common_chat_format_single[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1f8 MOV R15D,R9D MOV EBP,R8D MOV R12,RCX MOV R13,RDX MOV R14,RSI MOV RBX,RDI LEA RDI,[RSP + 0x80] CALL 0x00122a60 MOV RAX,qword ptr [R13] MOVZX R15D,R15B CMP RAX,qword ptr [R13 + 0x8] JZ 0x001419c5 LAB_001419ae: LEA RDI,[RSP + 0x8] MOV RSI,R14 MOV RDX,R13 XOR ECX,ECX MOV R8D,R15D CALL 0x001414ba JMP 0x001419db LAB_001419c5: LEA RSI,[0x19cc41] LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x40] CALL 0x00129014 LAB_001419db: LEA RDI,[RSP + 0x28] MOV RSI,R13 CALL 0x00146f6e TEST BPL,BPL JZ 0x00141a17 MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x00141a17 MOV RCX,qword ptr [RSP + 0x8] CMP byte ptr [RCX + RAX*0x1 + -0x1],0xa JNZ 0x00141a17 LAB_00141a03: LEA RSI,[0x19cc40] LEA RDI,[RSP + 0x80] CALL 0x001227c0 LAB_00141a17: LEA RDI,[RSP + 0x28] MOV RSI,R12 CALL 0x00146fc8 LAB_00141a24: MOVZX ECX,BPL LEA RDI,[RSP + 0x40] LEA RDX,[RSP + 0x28] MOV RSI,R14 MOV R8D,R15D CALL 0x001414ba MOV RDX,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x40] MOV RCX,qword ptr [RSI + 0x8] SUB RCX,RDX LAB_00141a4e: LEA RDI,[RSP + 0x60] CALL 0x00122850 LAB_00141a58: LEA RDI,[RSP + 0x80] LEA RSI,[RSP + 0x60] CALL 0x001226d0 LEA RDI,[RSP + 0x60] CALL 0x00122f98 LEA RSI,[RSP + 0x88] LAB_00141a7c: MOV RDI,RBX CALL 0x00122c00 LAB_00141a84: LEA RDI,[RSP + 0x40] CALL 0x00122f98 LEA RDI,[RSP + 0x28] CALL 0x00146ff4 LEA RDI,[RSP + 0x8] CALL 0x00122f98 LEA RDI,[RSP + 0x80] CALL 0x00122180 MOV RAX,RBX ADD RSP,0x1f8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_chat_format_single[abi:cxx11](minja::chat_template const&, std::vector<common_chat_msg, std::allocator<common_chat_msg> > const&, common_chat_msg const&, bool, bool) */ chat_template * common_chat_format_single_abi_cxx11_ (chat_template *param_1,vector *param_2,common_chat_msg *param_3,bool param_4,bool param_5 ) { int7 in_register_00000009; long local_220; long local_218; vector<common_chat_msg,std::allocator<common_chat_msg>> local_200 [24]; allocator local_1e8 [32]; string local_1c8 [32]; ostringstream local_1a8 [376]; std::__cxx11::ostringstream::ostringstream(local_1a8); if (*(long *)param_3 == *(long *)(param_3 + 8)) { /* try { // try from 001419c5 to 001419da has its CatchHandler @ 00141ac4 */ std::__cxx11::string::string<std::allocator<char>>((string *)&local_220,"",local_1e8); } else { /* try { // try from 001419ae to 001419c2 has its CatchHandler @ 00141ac6 */ common_chat_apply_template_abi_cxx11_ ((chat_template *)&local_220,param_2,SUB81(param_3,0),false); } /* try { // try from 001419db to 001419e7 has its CatchHandler @ 00141aed */ std::vector<common_chat_msg,std::allocator<common_chat_msg>>::vector(local_200,(vector *)param_3); if (((param_5) && (local_218 != 0)) && (*(char *)(local_220 + -1 + local_218) == '\n')) { /* try { // try from 00141a03 to 00141a23 has its CatchHandler @ 00141af2 */ std::operator<<((ostream *)local_1a8,"\n"); } std::vector<common_chat_msg,std::allocator<common_chat_msg>>::push_back (local_200,(common_chat_msg *)CONCAT71(in_register_00000009,param_4)); /* try { // try from 00141a24 to 00141a3c has its CatchHandler @ 00141aeb */ common_chat_apply_template_abi_cxx11_((chat_template *)local_1e8,param_2,false,param_5); /* try { // try from 00141a4e to 00141a57 has its CatchHandler @ 00141adc */ std::__cxx11::string::substr((ulong)local_1c8,(ulong)local_1e8); /* try { // try from 00141a58 to 00141a69 has its CatchHandler @ 00141acd */ std::operator<<((ostream *)local_1a8,local_1c8); std::__cxx11::string::~string(local_1c8); /* try { // try from 00141a7c to 00141a83 has its CatchHandler @ 00141acb */ std::__cxx11::stringbuf::str(); std::__cxx11::string::~string((string *)local_1e8); std::vector<common_chat_msg,std::allocator<common_chat_msg>>::~vector(local_200); std::__cxx11::string::~string((string *)&local_220); std::__cxx11::ostringstream::~ostringstream(local_1a8); return param_1; }
50,356
makeContextCurrentGLX
untodesu[P]riteg/build_O0/_deps/glfw-src/src/glx_context.c
static void makeContextCurrentGLX(_GLFWwindow* window) { if (window) { if (!glXMakeCurrent(_glfw.x11.display, window->context.glx.window, window->context.glx.handle)) { _glfwInputError(GLFW_PLATFORM_ERROR, "GLX: Failed to make context current"); return; } } else { if (!glXMakeCurrent(_glfw.x11.display, None, NULL)) { _glfwInputError(GLFW_PLATFORM_ERROR, "GLX: Failed to clear current context"); return; } } _glfwPlatformSetTls(&_glfw.contextSlot, window); }
O0
c
makeContextCurrentGLX: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x380a3 leaq 0xa8c0e(%rip), %rax # 0xe0c68 movq 0x207b8(%rax), %rax leaq 0xa8c00(%rip), %rcx # 0xe0c68 movq 0x1fec0(%rcx), %rdi movq -0x8(%rbp), %rcx movq 0x278(%rcx), %rsi movq -0x8(%rbp), %rcx movq 0x270(%rcx), %rdx callq *%rax cmpl $0x0, %eax jne 0x380a1 movl $0x10008, %edi # imm = 0x10008 leaq 0x83e43(%rip), %rsi # 0xbbedb movb $0x0, %al callq 0x221a0 jmp 0x380fb jmp 0x380e4 leaq 0xa8bbe(%rip), %rax # 0xe0c68 movq 0x207b8(%rax), %rax leaq 0xa8bb0(%rip), %rcx # 0xe0c68 movq 0x1fec0(%rcx), %rdi xorl %ecx, %ecx movl %ecx, %edx movq %rdx, %rsi callq *%rax cmpl $0x0, %eax jne 0x380e2 movl $0x10008, %edi # imm = 0x10008 leaq 0x83e26(%rip), %rsi # 0xbbeff movb $0x0, %al callq 0x221a0 jmp 0x380fb jmp 0x380e4 movq -0x8(%rbp), %rsi leaq 0xa8b79(%rip), %rdi # 0xe0c68 addq $0x1fe1c, %rdi # imm = 0x1FE1C callq 0x367e0 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
makeContextCurrentGLX: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jz short loc_380A3 lea rax, _glfw mov rax, [rax+207B8h] lea rcx, _glfw mov rdi, qword ptr ds:loc_1FEC0[rcx] mov rcx, [rbp+var_8] mov rsi, [rcx+278h] mov rcx, [rbp+var_8] mov rdx, [rcx+270h] call rax cmp eax, 0 jnz short loc_380A1 mov edi, 10008h lea rsi, aGlxFailedToMak; "GLX: Failed to make context current" mov al, 0 call _glfwInputError jmp short loc_380FB loc_380A1: jmp short loc_380E4 loc_380A3: lea rax, _glfw mov rax, [rax+207B8h] lea rcx, _glfw mov rdi, qword ptr ds:loc_1FEC0[rcx] xor ecx, ecx mov edx, ecx mov rsi, rdx call rax cmp eax, 0 jnz short loc_380E2 mov edi, 10008h lea rsi, aGlxFailedToCle; "GLX: Failed to clear current context" mov al, 0 call _glfwInputError jmp short loc_380FB loc_380E2: jmp short $+2 loc_380E4: mov rsi, [rbp+var_8] lea rdi, _glfw add rdi, 1FE1Ch call _glfwPlatformSetTls loc_380FB: add rsp, 10h pop rbp retn
long long makeContextCurrentGLX(long long a1) { if ( a1 ) { if ( !(*(unsigned int ( **)(_QWORD, _QWORD, _QWORD))&glfw[33262])( *(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw), *(_QWORD *)(a1 + 632), *(_QWORD *)(a1 + 624)) ) return glfwInputError(0x10008u, (long long)"GLX: Failed to make context current"); } else if ( !(*(unsigned int ( **)(_QWORD, _QWORD))&glfw[33262])( *(_QWORD *)((char *)&loc_1FEC0 + (_QWORD)glfw), 0LL) ) { return glfwInputError(0x10008u, (long long)"GLX: Failed to clear current context"); } return glfwPlatformSetTls(&glfw[32647], a1); }
makeContextCurrentGLX: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JZ 0x001380a3 LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x207b8] LEA RCX,[0x1e0c68] MOV RDI,qword ptr [RCX + 0x1fec0] MOV RCX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RCX + 0x278] MOV RCX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RCX + 0x270] CALL RAX CMP EAX,0x0 JNZ 0x001380a1 MOV EDI,0x10008 LEA RSI,[0x1bbedb] MOV AL,0x0 CALL 0x001221a0 JMP 0x001380fb LAB_001380a1: JMP 0x001380e4 LAB_001380a3: LEA RAX,[0x1e0c68] MOV RAX,qword ptr [RAX + 0x207b8] LEA RCX,[0x1e0c68] MOV RDI,qword ptr [RCX + 0x1fec0] XOR ECX,ECX MOV EDX,ECX MOV RSI,RDX CALL RAX CMP EAX,0x0 JNZ 0x001380e2 MOV EDI,0x10008 LEA RSI,[0x1bbeff] MOV AL,0x0 CALL 0x001221a0 JMP 0x001380fb LAB_001380e2: JMP 0x001380e4 LAB_001380e4: MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x1e0c68] ADD RDI,0x1fe1c CALL 0x001367e0 LAB_001380fb: ADD RSP,0x10 POP RBP RET
void makeContextCurrentGLX(long param_1) { int iVar1; if (param_1 == 0) { iVar1 = (*DAT_00201420)(DAT_00200b28,0); if (iVar1 == 0) { _glfwInputError(0x10008,"GLX: Failed to clear current context"); return; } } else { iVar1 = (*DAT_00201420)(DAT_00200b28,*(int8 *)(param_1 + 0x278), *(int8 *)(param_1 + 0x270)); if (iVar1 == 0) { _glfwInputError(0x10008,"GLX: Failed to make context current"); return; } } _glfwPlatformSetTls(&DAT_00200a84,param_1); return; }
50,357
maria_scan_init
eloqsql/storage/maria/ma_scan.c
int maria_scan_init(register MARIA_HA *info) { DBUG_ENTER("maria_scan_init"); info->cur_row.nextpos= info->s->pack.header_length; /* Read first record */ info->lastinx= -1; /* Can't forward or backward */ if (info->opt_flag & WRITE_CACHE_USED && flush_io_cache(&info->rec_cache)) DBUG_RETURN(my_errno); if ((*info->s->scan_init)(info)) DBUG_RETURN(my_errno); DBUG_RETURN(0); }
O0
c
maria_scan_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x590(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x10(%rbp), %rax movl $0xffffffff, 0x62c(%rax) # imm = 0xFFFFFFFF movq -0x10(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x72b3d movq -0x10(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x1, %esi callq 0xe0be0 cmpl $0x0, %eax je 0x72b3d jmp 0x72b31 callq 0xf60c0 movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x72b6c movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x650(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax cmpb $0x0, %al je 0x72b63 jmp 0x72b57 callq 0xf60c0 movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x72b6c jmp 0x72b65 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
maria_scan_init: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rax+590h] mov rax, [rbp+var_10] mov [rax+0A0h], rcx mov rax, [rbp+var_10] mov dword ptr [rax+62Ch], 0FFFFFFFFh mov rax, [rbp+var_10] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_72B3D mov rdi, [rbp+var_10] add rdi, 4B8h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_72B3D jmp short $+2 loc_72B31: call _my_thread_var mov eax, [rax] mov [rbp+var_4], eax jmp short loc_72B6C loc_72B3D: mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+650h] mov rdi, [rbp+var_10] call rax cmp al, 0 jz short loc_72B63 jmp short $+2 loc_72B57: call _my_thread_var mov eax, [rax] mov [rbp+var_4], eax jmp short loc_72B6C loc_72B63: jmp short $+2 loc_72B65: mov [rbp+var_4], 0 loc_72B6C: mov eax, [rbp+var_4] add rsp, 10h pop rbp retn
long long maria_scan_init(long long a1, const char *a2) { long long v2; // rdi *(_QWORD *)(a1 + 160) = *(_QWORD *)(*(_QWORD *)a1 + 1424LL); *(_DWORD *)(a1 + 1580) = -1; if ( (*(_DWORD *)(a1 + 1564) & 0x10) != 0 ) { v2 = a1 + 1208; a2 = (_BYTE *)(&dword_0 + 1); if ( (unsigned int)my_b_flush_io_cache(a1 + 1208, 1LL) ) return *(unsigned int *)my_thread_var(v2, a2); } v2 = a1; if ( (*(unsigned __int8 ( **)(long long))(*(_QWORD *)a1 + 1616LL))(a1) ) return *(unsigned int *)my_thread_var(v2, a2); else return 0; }
maria_scan_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x590] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x62c],0xffffffff MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x00172b3d MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x4b8 MOV ESI,0x1 CALL 0x001e0be0 CMP EAX,0x0 JZ 0x00172b3d JMP 0x00172b31 LAB_00172b31: CALL 0x001f60c0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00172b6c LAB_00172b3d: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x650] MOV RDI,qword ptr [RBP + -0x10] CALL RAX CMP AL,0x0 JZ 0x00172b63 JMP 0x00172b57 LAB_00172b57: CALL 0x001f60c0 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x00172b6c LAB_00172b63: JMP 0x00172b65 LAB_00172b65: MOV dword ptr [RBP + -0x4],0x0 LAB_00172b6c: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x10 POP RBP RET
int4 maria_scan_init(long *param_1) { char cVar1; int iVar2; int4 *puVar3; int4 local_c; param_1[0x14] = *(long *)(*param_1 + 0x590); *(int4 *)((long)param_1 + 0x62c) = 0xffffffff; if (((*(uint *)((long)param_1 + 0x61c) & 0x10) != 0) && (iVar2 = my_b_flush_io_cache(param_1 + 0x97,1), iVar2 != 0)) { puVar3 = (int4 *)_my_thread_var(); return *puVar3; } cVar1 = (**(code **)(*param_1 + 0x650))(param_1); if (cVar1 == '\0') { local_c = 0; } else { puVar3 = (int4 *)_my_thread_var(); local_c = *puVar3; } return local_c; }
50,358
js_regexp_string_iterator_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_regexp_string_iterator_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); JSRegExpStringIteratorData *it = p->u.regexp_string_iterator_data; if (it) { JS_FreeValueRT(rt, it->iterating_regexp); JS_FreeValueRT(rt, it->iterated_string); js_free_rt(rt, it); } }
O0
c
js_regexp_string_iterator_finalizer: subq $0x28, %rsp movq %rsi, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq %rdi, 0x10(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movq 0x30(%rax), %rax movq %rax, (%rsp) cmpq $0x0, (%rsp) je 0x5ac6a movq 0x10(%rsp), %rdi movq (%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x22a50 movq 0x10(%rsp), %rdi movq (%rsp), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx callq 0x22a50 movq 0x10(%rsp), %rdi movq (%rsp), %rsi callq 0x206a0 addq $0x28, %rsp retq nop
js_regexp_string_iterator_finalizer: sub rsp, 28h mov [rsp+28h+var_10], rsi mov [rsp+28h+var_8], rdx mov [rsp+28h+var_18], rdi mov rax, [rsp+28h+var_10] mov [rsp+28h+var_20], rax mov rax, [rsp+28h+var_20] mov rax, [rax+30h] mov [rsp+28h+var_28], rax cmp [rsp+28h+var_28], 0 jz short loc_5AC6A mov rdi, [rsp+28h+var_18] mov rax, [rsp+28h+var_28] mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValueRT mov rdi, [rsp+28h+var_18] mov rax, [rsp+28h+var_28] mov rsi, [rax+10h] mov rdx, [rax+18h] call JS_FreeValueRT mov rdi, [rsp+28h+var_18] mov rsi, [rsp+28h+var_28] call js_free_rt loc_5AC6A: add rsp, 28h retn
void js_regexp_string_iterator_finalizer(long long a1, long long a2) { long long v2; // [rsp+0h] [rbp-28h] v2 = *(_QWORD *)(a2 + 48); if ( v2 ) { JS_FreeValueRT(a1, *(_DWORD **)v2, *(_QWORD *)(v2 + 8)); JS_FreeValueRT(a1, *(_DWORD **)(v2 + 16), *(_QWORD *)(v2 + 24)); js_free_rt(a1, v2); } }
js_regexp_string_iterator_finalizer: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP],RAX CMP qword ptr [RSP],0x0 JZ 0x0015ac6a MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x00122a50 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x00122a50 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP] CALL 0x001206a0 LAB_0015ac6a: ADD RSP,0x28 RET
void js_regexp_string_iterator_finalizer(int8 param_1,long param_2) { int8 *puVar1; puVar1 = *(int8 **)(param_2 + 0x30); if (puVar1 != (int8 *)0x0) { JS_FreeValueRT(param_1,*puVar1,puVar1[1]); JS_FreeValueRT(param_1,puVar1[2],puVar1[3]); js_free_rt(param_1,puVar1); } return; }
50,359
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&)
monkey531[P]llama/common/json.hpp
static std::string position_string(const position_t& pos) { return concat(" at line ", std::to_string(pos.lines_read + 1), ", column ", std::to_string(pos.chars_read_current_line)); }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&): pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rsi), %rsi incq %rsi leaq 0x28(%rsp), %rdi callq 0x42b0f movq 0x8(%r14), %rsi leaq 0x8(%rsp), %rdi callq 0x42b0f leaq 0x634c4(%rip), %rsi # 0xcf421 leaq 0x634c7(%rip), %rcx # 0xcf42b leaq 0x28(%rsp), %rdx leaq 0x8(%rsp), %r8 movq %rbx, %rdi callq 0x6c154 leaq 0x8(%rsp), %rdi callq 0x27998 leaq 0x28(%rsp), %rdi callq 0x27998 movq %rbx, %rax addq $0x48, %rsp popq %rbx popq %r14 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x27998 jmp 0x6bfa7 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x27998 movq %rbx, %rdi callq 0x27660 nop
_ZN8nlohmann16json_abi_v3_11_36detail11parse_error15position_stringB5cxx11ERKNS1_10position_tE: push r14 push rbx sub rsp, 48h mov r14, rsi mov rbx, rdi mov rsi, [rsi+10h] inc rsi; unsigned __int64 lea rdi, [rsp+58h+var_30]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) mov rsi, [r14+8]; unsigned __int64 lea rdi, [rsp+58h+var_50]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) lea rsi, aAtLine; " at line " lea rcx, aColumn; ", column " lea rdx, [rsp+58h+var_30] lea r8, [rsp+58h+var_50] mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA10_KcS8_SB_S8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>(char const(&)[10],std::string,char const(&)[10],std::string &&) lea rdi, [rsp+58h+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+58h+var_30]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 48h pop rbx pop r14 retn mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6BFA7 mov rbx, rax loc_6BFA7: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](long long a1, long long a2) { _BYTE v3[32]; // [rsp+8h] [rbp-50h] BYREF _BYTE v4[48]; // [rsp+28h] [rbp-30h] BYREF std::to_string((std::__cxx11 *)v4, *(_QWORD *)(a2 + 16) + 1LL); std::to_string((std::__cxx11 *)v3, *(_QWORD *)(a2 + 8)); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[10],std::string,char const(&)[10],std::string>( a1, " at line ", v4, ", column ", v3); std::string::~string(v3); std::string::~string(v4); return a1; }
position_string[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x10] INC RSI LEA RDI,[RSP + 0x28] CALL 0x00142b0f MOV RSI,qword ptr [R14 + 0x8] LAB_0016bf4c: LEA RDI,[RSP + 0x8] CALL 0x00142b0f LAB_0016bf56: LEA RSI,[0x1cf421] LEA RCX,[0x1cf42b] LEA RDX,[RSP + 0x28] LEA R8,[RSP + 0x8] MOV RDI,RBX CALL 0x0016c154 LAB_0016bf76: LEA RDI,[RSP + 0x8] CALL 0x00127998 LEA RDI,[RSP + 0x28] CALL 0x00127998 MOV RAX,RBX ADD RSP,0x48 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::parse_error::position_string[abi:cxx11](nlohmann::json_abi_v3_11_3::detail::position_t const&) */ parse_error * __thiscall nlohmann::json_abi_v3_11_3::detail::parse_error::position_string_abi_cxx11_ (parse_error *this,position_t *param_1) { __cxx11 local_50 [32]; __cxx11 local_30 [32]; std::__cxx11::to_string(local_30,*(long *)(param_1 + 0x10) + 1); /* try { // try from 0016bf4c to 0016bf55 has its CatchHandler @ 0016bfa4 */ std::__cxx11::to_string(local_50,*(ulong *)(param_1 + 8)); /* try { // try from 0016bf56 to 0016bf75 has its CatchHandler @ 0016bf95 */ concat<std::__cxx11::string,char_const(&)[10],std::__cxx11::string,char_const(&)[10],std::__cxx11::string> ((detail *)this," at line ",(string *)local_30,", column ",(string *)local_50); std::__cxx11::string::~string((string *)local_50); std::__cxx11::string::~string((string *)local_30); return this; }
50,360
POINTonE2_Deserialize_Z
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e2.c
static BLST_ERROR POINTonE2_Deserialize_Z(POINTonE2_affine *out, const unsigned char in[192]) { unsigned char in0 = in[0]; if ((in0 & 0xe0) == 0) return POINTonE2_Deserialize_BE(out, in); if (in0 & 0x80) /* compressed bit */ return POINTonE2_Uncompress_Z(out, in); if (in0 & 0x40) { /* infinity bit */ if (byte_is_zero(in0 & 0x3f) & bytes_are_zero(in+1, 191)) { vec_zero(out, sizeof(*out)); return BLST_SUCCESS; } } return BLST_BAD_ENCODING; }
O1
c
POINTonE2_Deserialize_Z: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xf8, %rsp movq %rdi, %rbx movzbl (%rsi), %eax cmpq $0x1f, %rax ja 0x1cd16 leaq -0xf0(%rbp), %r14 movl $0x2f, %eax xorl %ecx, %ecx movq %rsi, %rdx shlq $0x8, %rcx movzbl (%rdx), %edi incq %rdx orq %rdi, %rcx movq %rax, %rdi andq $-0x8, %rdi movq %rcx, -0xf0(%rbp,%rdi) addq $-0x1, %rax jb 0x1cada leaq 0x30(%rsi), %rax movl $0x2f, %ecx xorl %edx, %edx shlq $0x8, %rdx movzbl (%rax), %edi incq %rax orq %rdi, %rdx movq %rcx, %rdi andq $-0x8, %rdi movq %rdx, -0x120(%rbp,%rdi) addq $-0x1, %rcx jb 0x1cb07 leaq -0x90(%rbp), %r12 leaq 0x60(%rsi), %rax movl $0x2f, %ecx xorl %edx, %edx shlq $0x8, %rdx movzbl (%rax), %edi incq %rax orq %rdi, %rdx movq %rcx, %rdi andq $-0x8, %rdi movq %rdx, -0x90(%rbp,%rdi) addq $-0x1, %rcx jb 0x1cb3b addq $0x90, %rsi movl $0x2f, %eax xorl %ecx, %ecx shlq $0x8, %rcx movzbl (%rsi), %edx incq %rsi orq %rdx, %rcx movq %rax, %rdx andq $-0x8, %rdx movq %rcx, -0xc0(%rbp,%rdx) addq $-0x1, %rax jb 0x1cb6b andb $0x1f, -0xc1(%rbp) leaq 0x22fed(%rip), %rdx # 0x3fb88 leaq 0x22f7e(%rip), %rcx # 0x3fb20 leaq -0x60(%rbp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x2f380 movl $0x30, %edx movq %r15, %rdi movq %r14, %rsi callq 0x306c0 movl $0x1, %r13d testq %rax, %rax je 0x1cd69 movq %r12, %r14 leaq 0x22fae(%rip), %rdx # 0x3fb88 leaq 0x22f3f(%rip), %rcx # 0x3fb20 leaq -0x120(%rbp), %r12 movq %r15, %rdi movq %r12, %rsi callq 0x2f380 movl $0x30, %edx movq %r15, %rdi movq %r12, %rsi callq 0x306c0 testq %rax, %rax je 0x1cd69 leaq 0x22f75(%rip), %rdx # 0x3fb88 leaq 0x22f06(%rip), %rcx # 0x3fb20 movq %r15, %rdi movq %r14, %rsi callq 0x2f380 movl $0x30, %edx movq %r15, %rdi movq %r14, %rsi callq 0x306c0 testq %rax, %rax je 0x1cd69 leaq 0x22f43(%rip), %rdx # 0x3fb88 leaq 0x22ed4(%rip), %rcx # 0x3fb20 movq %r15, %rdi leaq -0xc0(%rbp), %r14 movq %r14, %rsi callq 0x2f380 movl $0x30, %edx movq %r15, %rdi movq %r14, %rsi callq 0x306c0 testq %rax, %rax je 0x1cd69 leaq 0x23122(%rip), %r15 # 0x3fda0 leaq 0x22e9b(%rip), %r13 # 0x3fb20 leaq -0x120(%rbp), %rdi movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD movq %rdi, %rsi movq %r15, %rdx movq %r13, %rcx movq %r12, %r8 callq 0x34be0 leaq -0xf0(%rbp), %rdi movq %rdi, %rsi movq %r15, %rdx movq %r13, %rcx movq %r12, %r8 callq 0x34be0 movq %r14, %rdi movq %r14, %rsi movq %r15, %rdx movq %r13, %rcx movq %r12, %r8 callq 0x34be0 leaq -0x90(%rbp), %rdi movq %rdi, %rsi movq %r15, %rdx movq %r13, %rcx movq %r12, %r8 callq 0x34be0 leaq -0x120(%rbp), %rdi callq 0x1c238 testq %rax, %rax je 0x1cd97 leaq -0x120(%rbp), %rsi movl $0xc0, %edx movq %rbx, %rdi callq 0x5060 jmp 0x1cd66 testb %al, %al js 0x1cd7e movl $0x1, %r13d cmpb $0x40, %al jb 0x1cd69 andl $0x3f, %eax decq %rax shrq $0x3f, %rax movl $0x1, %edx xorl %ecx, %ecx orb (%rsi,%rdx), %cl incq %rdx cmpq $0xc0, %rdx jne 0x1cd35 movzbl %cl, %ecx decq %rcx shrq $0x3f, %rcx testq %rax, %rcx je 0x1cd69 xorl %eax, %eax movq $0x0, (%rbx,%rax,8) incq %rax cmpq $0x18, %rax jne 0x1cd55 xorl %r13d, %r13d movl %r13d, %eax addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi addq $0xf8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x1c7fb movl $0x2, %r13d jmp 0x1cd69
POINTonE2_Deserialize_Z: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0F8h mov rbx, rdi movzx eax, byte ptr [rsi] cmp rax, 1Fh ja loc_1CD16 lea r14, [rbp+var_F0] mov eax, 2Fh ; '/' xor ecx, ecx mov rdx, rsi loc_1CADA: shl rcx, 8 movzx edi, byte ptr [rdx] inc rdx or rcx, rdi mov rdi, rax and rdi, 0FFFFFFFFFFFFFFF8h mov [rbp+rdi+var_F0], rcx add rax, 0FFFFFFFFFFFFFFFFh jb short loc_1CADA lea rax, [rsi+30h] mov ecx, 2Fh ; '/' xor edx, edx loc_1CB07: shl rdx, 8 movzx edi, byte ptr [rax] inc rax or rdx, rdi mov rdi, rcx and rdi, 0FFFFFFFFFFFFFFF8h mov [rbp+rdi+var_120], rdx add rcx, 0FFFFFFFFFFFFFFFFh jb short loc_1CB07 lea r12, [rbp+var_90] lea rax, [rsi+60h] mov ecx, 2Fh ; '/' xor edx, edx loc_1CB3B: shl rdx, 8 movzx edi, byte ptr [rax] inc rax or rdx, rdi mov rdi, rcx and rdi, 0FFFFFFFFFFFFFFF8h mov [rbp+rdi+var_90], rdx add rcx, 0FFFFFFFFFFFFFFFFh jb short loc_1CB3B add rsi, 90h mov eax, 2Fh ; '/' xor ecx, ecx loc_1CB6B: shl rcx, 8 movzx edx, byte ptr [rsi] inc rsi or rcx, rdx mov rdx, rax and rdx, 0FFFFFFFFFFFFFFF8h mov [rbp+rdx+var_C0], rcx add rax, 0FFFFFFFFFFFFFFFFh jb short loc_1CB6B and [rbp+var_C1], 1Fh lea rdx, unk_3FB88 lea rcx, BLS12_381_P lea r15, [rbp+var_60] mov rdi, r15 mov rsi, r14 call add_mod_384 mov edx, 30h ; '0' mov rdi, r15 mov rsi, r14 call vec_is_equal_16x mov r13d, 1 test rax, rax jz loc_1CD69 mov r14, r12 lea rdx, unk_3FB88 lea rcx, BLS12_381_P lea r12, [rbp+var_120] mov rdi, r15 mov rsi, r12 call add_mod_384 mov edx, 30h ; '0' mov rdi, r15 mov rsi, r12 call vec_is_equal_16x test rax, rax jz loc_1CD69 lea rdx, unk_3FB88 lea rcx, BLS12_381_P mov rdi, r15 mov rsi, r14 call add_mod_384 mov edx, 30h ; '0' mov rdi, r15 mov rsi, r14 call vec_is_equal_16x test rax, rax jz loc_1CD69 lea rdx, unk_3FB88 lea rcx, BLS12_381_P mov rdi, r15 lea r14, [rbp+var_C0] mov rsi, r14 call add_mod_384 mov edx, 30h ; '0' mov rdi, r15 mov rsi, r14 call vec_is_equal_16x test rax, rax jz loc_1CD69 lea r15, BLS12_381_RR lea r13, BLS12_381_P lea rdi, [rbp+var_120] mov r12, 89F3FFFCFFFCFFFDh mov rsi, rdi mov rdx, r15 mov rcx, r13 mov r8, r12 call mul_mont_384 lea rdi, [rbp+var_F0] mov rsi, rdi mov rdx, r15 mov rcx, r13 mov r8, r12 call mul_mont_384 mov rdi, r14 mov rsi, r14 mov rdx, r15 mov rcx, r13 mov r8, r12 call mul_mont_384 lea rdi, [rbp+var_90] mov rsi, rdi mov rdx, r15 mov rcx, r13 mov r8, r12 call mul_mont_384 lea rdi, [rbp+var_120] call POINTonE2_affine_on_curve test rax, rax jz loc_1CD97 lea rsi, [rbp+var_120] mov edx, 0C0h mov rdi, rbx call _memcpy jmp short loc_1CD66 loc_1CD16: test al, al js short loc_1CD7E mov r13d, 1 cmp al, 40h ; '@' jb short loc_1CD69 and eax, 3Fh dec rax shr rax, 3Fh mov edx, 1 xor ecx, ecx loc_1CD35: or cl, [rsi+rdx] inc rdx cmp rdx, 0C0h jnz short loc_1CD35 movzx ecx, cl dec rcx shr rcx, 3Fh test rcx, rax jz short loc_1CD69 xor eax, eax loc_1CD55: mov qword ptr [rbx+rax*8], 0 inc rax cmp rax, 18h jnz short loc_1CD55 loc_1CD66: xor r13d, r13d loc_1CD69: mov eax, r13d add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1CD7E: mov rdi, rbx add rsp, 0F8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp POINTonE2_Uncompress_Z loc_1CD97: mov r13d, 2 jmp short loc_1CD69
long long POINTonE2_Deserialize_Z(long long a1, unsigned __int8 *a2) { unsigned long long v3; // rax long long v4; // rax long long v5; // rcx unsigned __int8 *v6; // rdx long long v7; // rdi bool v8; // cf unsigned __int8 *v9; // rax long long v10; // rcx long long v11; // rdx long long v12; // rdi unsigned __int8 *v13; // rax long long v14; // rcx long long v15; // rdx long long v16; // rdi unsigned __int8 *v17; // rsi long long v18; // rax long long v19; // rcx long long v20; // rdx unsigned int v21; // r13d unsigned long long v22; // rax long long v23; // rdx unsigned __int8 v24; // cl long long i; // rax _QWORD v27[6]; // [rsp+0h] [rbp-120h] BYREF _QWORD v28[5]; // [rsp+30h] [rbp-F0h] BYREF char v29; // [rsp+5Fh] [rbp-C1h] _QWORD v30[6]; // [rsp+60h] [rbp-C0h] BYREF _QWORD v31[6]; // [rsp+90h] [rbp-90h] BYREF _BYTE v32[96]; // [rsp+C0h] [rbp-60h] BYREF v3 = *a2; if ( v3 <= 0x1F ) { v4 = 47LL; v5 = 0LL; v6 = a2; do { v7 = *v6++; v5 = v7 | (v5 << 8); *(_QWORD *)((char *)v28 + (v4 & 0xFFFFFFFFFFFFFFF8LL)) = v5; v8 = v4-- != 0; } while ( v8 ); v9 = a2 + 48; v10 = 47LL; v11 = 0LL; do { v12 = *v9++; v11 = v12 | (v11 << 8); *(_QWORD *)((char *)v27 + (v10 & 0xFFFFFFFFFFFFFFF8LL)) = v11; v8 = v10-- != 0; } while ( v8 ); v13 = a2 + 96; v14 = 47LL; v15 = 0LL; do { v16 = *v13++; v15 = v16 | (v15 << 8); *(_QWORD *)((char *)v31 + (v14 & 0xFFFFFFFFFFFFFFF8LL)) = v15; v8 = v14-- != 0; } while ( v8 ); v17 = a2 + 144; v18 = 47LL; v19 = 0LL; do { v20 = *v17++; v19 = v20 | (v19 << 8); *(_QWORD *)((char *)v30 + (v18 & 0xFFFFFFFFFFFFFFF8LL)) = v19; v8 = v18-- != 0; } while ( v8 ); v29 &= 0x1Fu; add_mod_384(v32, v28, &unk_3FB88, &BLS12_381_P); v21 = 1; if ( !vec_is_equal_16x(v32, v28, 48LL) ) return v21; add_mod_384(v32, v27, &unk_3FB88, &BLS12_381_P); if ( !vec_is_equal_16x(v32, v27, 48LL) ) return v21; add_mod_384(v32, v31, &unk_3FB88, &BLS12_381_P); if ( !vec_is_equal_16x(v32, v31, 48LL) ) return v21; add_mod_384(v32, v30, &unk_3FB88, &BLS12_381_P); if ( !vec_is_equal_16x(v32, v30, 48LL) ) return v21; mul_mont_384(v27, v27, &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v28, v28, &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v30, v30, &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(v31, v31, &BLS12_381_RR, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); if ( !POINTonE2_affine_on_curve((long long)v27) ) return 2; memcpy(a1, v27, 192LL); return 0; } if ( (v3 & 0x80u) == 0LL ) { v21 = 1; if ( (unsigned __int8)v3 < 0x40u ) return v21; v22 = ((v3 & 0x3F) - 1) >> 63; v23 = 1LL; v24 = 0; do v24 |= a2[v23++]; while ( v23 != 192 ); if ( (v22 & (((unsigned long long)v24 - 1) >> 63)) == 0 ) return v21; for ( i = 0LL; i != 24; ++i ) *(_QWORD *)(a1 + 8 * i) = 0LL; return 0; } return POINTonE2_Uncompress_Z(a1, a2); }
POINTonE2_Deserialize_Z: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xf8 MOV RBX,RDI MOVZX EAX,byte ptr [RSI] CMP RAX,0x1f JA 0x0011cd16 LEA R14,[RBP + -0xf0] MOV EAX,0x2f XOR ECX,ECX MOV RDX,RSI LAB_0011cada: SHL RCX,0x8 MOVZX EDI,byte ptr [RDX] INC RDX OR RCX,RDI MOV RDI,RAX AND RDI,-0x8 MOV qword ptr [RBP + RDI*0x1 + -0xf0],RCX ADD RAX,-0x1 JC 0x0011cada LEA RAX,[RSI + 0x30] MOV ECX,0x2f XOR EDX,EDX LAB_0011cb07: SHL RDX,0x8 MOVZX EDI,byte ptr [RAX] INC RAX OR RDX,RDI MOV RDI,RCX AND RDI,-0x8 MOV qword ptr [RBP + RDI*0x1 + -0x120],RDX ADD RCX,-0x1 JC 0x0011cb07 LEA R12,[RBP + -0x90] LEA RAX,[RSI + 0x60] MOV ECX,0x2f XOR EDX,EDX LAB_0011cb3b: SHL RDX,0x8 MOVZX EDI,byte ptr [RAX] INC RAX OR RDX,RDI MOV RDI,RCX AND RDI,-0x8 MOV qword ptr [RBP + RDI*0x1 + -0x90],RDX ADD RCX,-0x1 JC 0x0011cb3b ADD RSI,0x90 MOV EAX,0x2f XOR ECX,ECX LAB_0011cb6b: SHL RCX,0x8 MOVZX EDX,byte ptr [RSI] INC RSI OR RCX,RDX MOV RDX,RAX AND RDX,-0x8 MOV qword ptr [RBP + RDX*0x1 + -0xc0],RCX ADD RAX,-0x1 JC 0x0011cb6b AND byte ptr [RBP + -0xc1],0x1f LEA RDX,[0x13fb88] LEA RCX,[0x13fb20] LEA R15,[RBP + -0x60] MOV RDI,R15 MOV RSI,R14 CALL 0x0012f380 MOV EDX,0x30 MOV RDI,R15 MOV RSI,R14 CALL 0x001306c0 MOV R13D,0x1 TEST RAX,RAX JZ 0x0011cd69 MOV R14,R12 LEA RDX,[0x13fb88] LEA RCX,[0x13fb20] LEA R12,[RBP + -0x120] MOV RDI,R15 MOV RSI,R12 CALL 0x0012f380 MOV EDX,0x30 MOV RDI,R15 MOV RSI,R12 CALL 0x001306c0 TEST RAX,RAX JZ 0x0011cd69 LEA RDX,[0x13fb88] LEA RCX,[0x13fb20] MOV RDI,R15 MOV RSI,R14 CALL 0x0012f380 MOV EDX,0x30 MOV RDI,R15 MOV RSI,R14 CALL 0x001306c0 TEST RAX,RAX JZ 0x0011cd69 LEA RDX,[0x13fb88] LEA RCX,[0x13fb20] MOV RDI,R15 LEA R14,[RBP + -0xc0] MOV RSI,R14 CALL 0x0012f380 MOV EDX,0x30 MOV RDI,R15 MOV RSI,R14 CALL 0x001306c0 TEST RAX,RAX JZ 0x0011cd69 LEA R15,[0x13fda0] LEA R13,[0x13fb20] LEA RDI,[RBP + -0x120] MOV R12,-0x760c000300030003 MOV RSI,RDI MOV RDX,R15 MOV RCX,R13 MOV R8,R12 CALL 0x00134be0 LEA RDI,[RBP + -0xf0] MOV RSI,RDI MOV RDX,R15 MOV RCX,R13 MOV R8,R12 CALL 0x00134be0 MOV RDI,R14 MOV RSI,R14 MOV RDX,R15 MOV RCX,R13 MOV R8,R12 CALL 0x00134be0 LEA RDI,[RBP + -0x90] MOV RSI,RDI MOV RDX,R15 MOV RCX,R13 MOV R8,R12 CALL 0x00134be0 LEA RDI,[RBP + -0x120] CALL 0x0011c238 TEST RAX,RAX JZ 0x0011cd97 LEA RSI,[RBP + -0x120] MOV EDX,0xc0 MOV RDI,RBX CALL 0x00105060 JMP 0x0011cd66 LAB_0011cd16: TEST AL,AL JS 0x0011cd7e MOV R13D,0x1 CMP AL,0x40 JC 0x0011cd69 AND EAX,0x3f DEC RAX SHR RAX,0x3f MOV EDX,0x1 XOR ECX,ECX LAB_0011cd35: OR CL,byte ptr [RSI + RDX*0x1] INC RDX CMP RDX,0xc0 JNZ 0x0011cd35 MOVZX ECX,CL DEC RCX SHR RCX,0x3f TEST RCX,RAX JZ 0x0011cd69 XOR EAX,EAX LAB_0011cd55: MOV qword ptr [RBX + RAX*0x8],0x0 INC RAX CMP RAX,0x18 JNZ 0x0011cd55 LAB_0011cd66: XOR R13D,R13D LAB_0011cd69: MOV EAX,R13D ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011cd7e: MOV RDI,RBX ADD RSP,0xf8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0011c7fb LAB_0011cd97: MOV R13D,0x2 JMP 0x0011cd69
int8 POINTonE2_Deserialize_Z(void *param_1,byte *param_2) { byte bVar1; ulong uVar2; long lVar3; int8 uVar4; byte bVar5; ulong uVar6; byte *pbVar7; bool bVar8; ulong local_128 [6]; ulong local_f8 [5]; byte local_c9; ulong local_c8 [6]; ulong local_98 [6]; int1 local_68 [56]; bVar1 = *param_2; if (bVar1 < 0x20) { uVar2 = 0x2f; uVar6 = 0; pbVar7 = param_2; do { bVar1 = *pbVar7; pbVar7 = pbVar7 + 1; uVar6 = uVar6 << 8 | (ulong)bVar1; *(ulong *)((long)local_f8 + (uVar2 & 0xfffffffffffffff8)) = uVar6; bVar8 = uVar2 != 0; uVar2 = uVar2 - 1; } while (bVar8); pbVar7 = param_2 + 0x30; uVar2 = 0x2f; uVar6 = 0; do { bVar1 = *pbVar7; pbVar7 = pbVar7 + 1; uVar6 = uVar6 << 8 | (ulong)bVar1; *(ulong *)((long)local_128 + (uVar2 & 0xfffffffffffffff8)) = uVar6; bVar8 = uVar2 != 0; uVar2 = uVar2 - 1; } while (bVar8); pbVar7 = param_2 + 0x60; uVar2 = 0x2f; uVar6 = 0; do { bVar1 = *pbVar7; pbVar7 = pbVar7 + 1; uVar6 = uVar6 << 8 | (ulong)bVar1; *(ulong *)((long)local_98 + (uVar2 & 0xfffffffffffffff8)) = uVar6; bVar8 = uVar2 != 0; uVar2 = uVar2 - 1; } while (bVar8); param_2 = param_2 + 0x90; uVar2 = 0x2f; uVar6 = 0; do { bVar1 = *param_2; param_2 = param_2 + 1; uVar6 = uVar6 << 8 | (ulong)bVar1; *(ulong *)((long)local_c8 + (uVar2 & 0xfffffffffffffff8)) = uVar6; bVar8 = uVar2 != 0; uVar2 = uVar2 - 1; } while (bVar8); local_c9 = local_c9 & 0x1f; add_mod_384(local_68,local_f8,&DAT_0013fb88,BLS12_381_P); lVar3 = vec_is_equal_16x(local_68,local_f8,0x30); if (lVar3 == 0) { return 1; } add_mod_384(local_68,local_128,&DAT_0013fb88,BLS12_381_P); lVar3 = vec_is_equal_16x(local_68,local_128,0x30); if (lVar3 == 0) { return 1; } add_mod_384(local_68,local_98,&DAT_0013fb88,BLS12_381_P); lVar3 = vec_is_equal_16x(local_68,local_98,0x30); if (lVar3 == 0) { return 1; } add_mod_384(local_68,local_c8,&DAT_0013fb88,BLS12_381_P); lVar3 = vec_is_equal_16x(local_68,local_c8,0x30); if (lVar3 == 0) { return 1; } mul_mont_384(local_128,local_128,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_f8,local_f8,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_c8,local_c8,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(local_98,local_98,BLS12_381_RR,BLS12_381_P,0x89f3fffcfffcfffd); lVar3 = POINTonE2_affine_on_curve(local_128); if (lVar3 == 0) { return 2; } memcpy(param_1,local_128,0xc0); } else { if ((char)bVar1 < '\0') { uVar4 = POINTonE2_Uncompress_Z(param_1); return uVar4; } if (bVar1 < 0x40) { return 1; } lVar3 = 1; bVar5 = 0; do { bVar5 = bVar5 | param_2[lVar3]; lVar3 = lVar3 + 1; } while (lVar3 != 0xc0); if (-1 < (long)((ulong)bVar5 - 1 & (ulong)(bVar1 & 0x3f) - 1)) { return 1; } lVar3 = 0; do { *(int8 *)((long)param_1 + lVar3 * 8) = 0; lVar3 = lVar3 + 1; } while (lVar3 != 0x18); } return 0; }
50,361
my_freopen
eloqsql/mysys/my_fopen.c
FILE *my_freopen(const char *path, const char *mode, FILE *stream) { FILE *result; #if defined(_WIN32) result= my_win_freopen(path, mode, stream); #else result= freopen(path, mode, stream); #endif return result; }
O0
c
my_freopen: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x36680 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_freopen: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _freopen64 mov [rbp+var_20], rax mov rax, [rbp+var_20] add rsp, 20h pop rbp retn
long long my_freopen(long long a1, long long a2, long long a3) { return freopen64(a1, a2, a3); }
my_freopen: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x00136680 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RSP,0x20 POP RBP RET
FILE * my_freopen(char *param_1,char *param_2,FILE *param_3) { FILE *pFVar1; pFVar1 = freopen64(param_1,param_2,param_3); return pFVar1; }
50,362
my_strnncoll_czech
eloqsql/strings/ctype-czech.c
static int my_strnncoll_czech(CHARSET_INFO *cs __attribute__((unused)), const uchar *s1, size_t len1, const uchar *s2, size_t len2, my_bool s2_is_prefix) { int v1, v2; const uchar *p1, * p2, * store1, * store2; int pass1 = 0, pass2 = 0; if (s2_is_prefix && len1 > len2) len1=len2; p1 = s1; p2 = s2; store1 = s1; store2 = s2; do { int diff; NEXT_CMP_VALUE(s1, p1, store1, pass1, v1, (int)len1); NEXT_CMP_VALUE(s2, p2, store2, pass2, v2, (int)len2); if ((diff = v1 - v2)) return diff; } while (v1); return 0; }
O3
c
my_strnncoll_czech: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rcx, %r12 movq %rsi, %r14 cmpq %r8, %rdx movslq %r8d, %rdi cmovbq %rdx, %r8 testb %r9b, %r9b cmoveq %rdx, %r8 movslq %r8d, %rdx movl $0x1, %ecx movl $0x1, %esi subq %r14, %rsi movq %rsi, -0x68(%rbp) subq %r12, %rcx movq %rcx, -0x70(%rbp) xorl %r15d, %r15d movq %r12, %rcx movq %r14, %r13 movq %r12, -0x58(%rbp) movq $0x0, -0x30(%rbp) movq %r14, %rsi movq %r12, -0x50(%rbp) movq %r13, -0x38(%rbp) movq %rsi, %r9 subq %r14, %r9 cmpq %rdx, %r9 jge 0xae6de movslq %r15d, %rax leaq 0x2cdc8c(%rip), %r8 # 0x37c2f0 movq (%r8,%rax,8), %r9 movzbl (%rsi), %r10d movzbl (%r9,%r10), %r10d testl %r10d, %r10d je 0xae6ac cmpl $0x2, %r10d jne 0xae71b incq %rsi movq %rsi, %r10 subq %r14, %r10 movq %rsi, %rbx cmpq %rdx, %r10 jge 0xae6ba movzbl (%rbx), %r11d cmpb $0x2, (%r9,%r11) jne 0xae6ba incq %rbx incq %r10 movq %rbx, %r11 cmpq %rdx, %r10 jl 0xae691 jmp 0xae6bd incq %rsi movq %rsi, %r10 subq %r14, %r10 movq %rsi, %rbx jmp 0xae6d7 movq %rsi, %r11 cmpl $0x3, %r15d cmovgeq %r11, %rbx movq %rbx, %r10 subq %r14, %r10 cmpq %rdx, %r10 jl 0xae7a3 movq %rbx, %rsi cmpq %rdx, %r10 jl 0xae668 jmp 0xae6e1 movq %rsi, %rbx cmpl $0x3, %r15d jne 0xae6f8 xorl %eax, %eax movl $0x3, %r15d movq -0x38(%rbp), %r13 movq %rbx, %rsi jmp 0xae712 testl %r15d, %r15d movq %r14, %rsi movq -0x38(%rbp), %r13 cmoveq %r13, %rsi leal 0x1(%r15), %r9d movl $0x1, %eax movl %r9d, %r15d movq -0x30(%rbp), %r11 jmp 0xae7fe cmpl $0xff, %r10d jne 0xae79d movq %r15, -0x40(%rbp) movq %rsi, %r9 subq %r14, %r9 movq -0x68(%rbp), %r8 addq %rsi, %r8 movq %r8, -0x60(%rbp) xorl %r10d, %r10d movq %r10, %r11 shlq $0x4, %r11 leaq 0x2cdbc6(%rip), %r8 # 0x37c310 movq (%r11,%r8), %rbx movb (%rbx), %r12b testb %r12b, %r12b je 0xae787 cmpq %rdx, %r9 jge 0xae787 incq %rbx movq -0x60(%rbp), %r15 movq %rsi, %r13 cmpb %r12b, (%r13) jne 0xae78f incq %r13 movb (%rbx), %r12b testb %r12b, %r12b je 0xae78a incq %rbx leaq 0x1(%r15), %r8 cmpq %rdx, %r15 movq %r8, %r15 jl 0xae765 jmp 0xae78a movq %rsi, %r13 testb %r12b, %r12b je 0xae7cf incq %r10 cmpq $0x50, %r10 jne 0xae73c movb $-0x1, %r10b jmp 0xae7e7 movq -0x30(%rbp), %r11 jmp 0xae7f3 movl $0x2, %eax cmpl $0x1, %r15d movq -0x30(%rbp), %r11 jle 0xae7bb movq -0x38(%rbp), %r13 movq %rbx, %rsi jmp 0xae7fe movl $0x1, %esi subl %r15d, %esi movq %rbx, %r13 movl %esi, %r15d movq -0x38(%rbp), %rsi jmp 0xae7fe leaq 0x2cdb3a(%rip), %rsi # 0x37c310 addq %rsi, %r11 movq 0x8(%r11), %rsi movb (%rsi,%rax), %r10b decq %r13 movq %r13, %rsi movq -0x40(%rbp), %r15 movq -0x30(%rbp), %r11 movq -0x50(%rbp), %r12 movq -0x38(%rbp), %r13 movzbl %r10b, %eax incq %rsi movq %rcx, %r8 subq %r12, %r8 cmpq %rdi, %r8 jge 0xae895 movslq %r11d, %r9 leaq 0x2cdad9(%rip), %r8 # 0x37c2f0 movq %r9, -0x60(%rbp) movq (%r8,%r9,8), %rbx movzbl (%rcx), %r8d movzbl (%rbx,%r8), %r8d testl %r8d, %r8d je 0xae863 cmpl $0x2, %r8d jne 0xae8d0 incq %rcx movq %rcx, %r8 subq %r12, %r8 movq %rcx, %r10 cmpq %rdi, %r8 jge 0xae871 movzbl (%r10), %r9d cmpb $0x2, (%rbx,%r9) jne 0xae871 incq %r10 incq %r8 movq %r10, %r9 cmpq %rdi, %r8 jl 0xae848 jmp 0xae874 incq %rcx movq %rcx, %r8 subq %r12, %r8 movq %rcx, %r10 jmp 0xae88e movq %rcx, %r9 cmpl $0x3, %r11d cmovgeq %r9, %r10 movq %r10, %r8 subq %r12, %r8 cmpq %rdi, %r8 jl 0xae968 movq %r10, %rcx cmpq %rdi, %r8 jl 0xae81f jmp 0xae898 movq %rcx, %r10 cmpl $0x3, %r11d jne 0xae8b2 xorl %r11d, %r11d movl $0x3, %ecx movq %rcx, -0x30(%rbp) movq %r10, %rcx jmp 0xae9c1 testl %r11d, %r11d leal 0x1(%r11), %r8d movq %r12, %rcx cmoveq -0x58(%rbp), %rcx movl $0x1, %r11d movq %r8, -0x30(%rbp) jmp 0xae9c1 cmpl $0xff, %r8d jne 0xae9ba movq %r13, -0x40(%rbp) movl %eax, -0x44(%rbp) movq %rcx, %rax subq %r12, %rax movq -0x70(%rbp), %r8 addq %rcx, %r8 movq %r8, -0x38(%rbp) xorl %r11d, %r11d movq %r15, %rbx movq %r11, %r8 shlq $0x4, %r8 leaq 0x2cda07(%rip), %r9 # 0x37c310 movq (%r8,%r9), %r13 movb (%r13), %r9b testb %r9b, %r9b je 0xae948 cmpq %rdi, %rax jge 0xae948 incq %r13 movq -0x38(%rbp), %r15 movq %rcx, %r12 cmpb %r9b, (%r12) jne 0xae950 incq %r12 movb (%r13), %r9b testb %r9b, %r9b je 0xae94b incq %r13 leaq 0x1(%r15), %r10 cmpq %rdi, %r15 movq %r10, %r15 jl 0xae925 jmp 0xae94b movq %rcx, %r12 testb %r9b, %r9b je 0xae990 incq %r11 cmpq $0x50, %r11 movq -0x50(%rbp), %r12 jne 0xae8fb movq %rbx, %r15 movb $-0x1, %r8b movl -0x44(%rbp), %eax jmp 0xae9b6 movq %r11, %rcx movl $0x2, %r11d cmpl $0x1, %ecx jg 0xae8aa movl $0x1, %r8d subl %ecx, %r8d movq -0x58(%rbp), %rcx movq %r10, -0x58(%rbp) jmp 0xae8c7 leaq 0x2cd979(%rip), %rcx # 0x37c310 addq %rcx, %r8 movq 0x8(%r8), %rcx movq -0x60(%rbp), %r8 movb (%rcx,%r8), %r8b decq %r12 movq %r12, %rcx movq %rbx, %r15 movl -0x44(%rbp), %eax movq -0x50(%rbp), %r12 movq -0x40(%rbp), %r13 movzbl %r8b, %r11d incq %rcx testl %eax, %eax je 0xae9ce cmpl %r11d, %eax je 0xae647 subl %r11d, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnncoll_czech: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov r12, rcx mov r14, rsi cmp rdx, r8 movsxd rdi, r8d cmovb r8, rdx test r9b, r9b cmovz r8, rdx movsxd rdx, r8d mov ecx, 1 mov esi, 1 sub rsi, r14 mov [rbp+var_68], rsi sub rcx, r12 mov [rbp+var_70], rcx xor r15d, r15d mov rcx, r12 mov r13, r14 mov [rbp+var_58], r12 mov [rbp+var_30], 0 mov rsi, r14 mov [rbp+var_50], r12 loc_AE647: mov [rbp+var_38], r13 mov r9, rsi sub r9, r14 cmp r9, rdx jge loc_AE6DE movsxd rax, r15d lea r8, CZ_SORT_TABLE mov r9, [r8+rax*8] loc_AE668: movzx r10d, byte ptr [rsi] movzx r10d, byte ptr [r9+r10] test r10d, r10d jz short loc_AE6AC cmp r10d, 2 jnz loc_AE71B inc rsi mov r10, rsi sub r10, r14 mov rbx, rsi cmp r10, rdx jge short loc_AE6BA loc_AE691: movzx r11d, byte ptr [rbx] cmp byte ptr [r9+r11], 2 jnz short loc_AE6BA inc rbx inc r10 mov r11, rbx cmp r10, rdx jl short loc_AE691 jmp short loc_AE6BD loc_AE6AC: inc rsi mov r10, rsi sub r10, r14 mov rbx, rsi jmp short loc_AE6D7 loc_AE6BA: mov r11, rsi loc_AE6BD: cmp r15d, 3 cmovge rbx, r11 mov r10, rbx sub r10, r14 cmp r10, rdx jl loc_AE7A3 mov rsi, rbx loc_AE6D7: cmp r10, rdx jl short loc_AE668 jmp short loc_AE6E1 loc_AE6DE: mov rbx, rsi loc_AE6E1: cmp r15d, 3 jnz short loc_AE6F8 xor eax, eax mov r15d, 3 mov r13, [rbp+var_38] mov rsi, rbx jmp short loc_AE712 loc_AE6F8: test r15d, r15d mov rsi, r14 mov r13, [rbp+var_38] cmovz rsi, r13 lea r9d, [r15+1] mov eax, 1 mov r15d, r9d loc_AE712: mov r11, [rbp+var_30] jmp loc_AE7FE loc_AE71B: cmp r10d, 0FFh jnz short loc_AE79D mov [rbp+var_40], r15 mov r9, rsi sub r9, r14 mov r8, [rbp+var_68] add r8, rsi mov [rbp+var_60], r8 xor r10d, r10d loc_AE73C: mov r11, r10 shl r11, 4 lea r8, doubles mov rbx, [r11+r8] mov r12b, [rbx] test r12b, r12b jz short loc_AE787 cmp r9, rdx jge short loc_AE787 inc rbx mov r15, [rbp+var_60] mov r13, rsi loc_AE765: cmp [r13+0], r12b jnz short loc_AE78F inc r13 mov r12b, [rbx] test r12b, r12b jz short loc_AE78A inc rbx lea r8, [r15+1] cmp r15, rdx mov r15, r8 jl short loc_AE765 jmp short loc_AE78A loc_AE787: mov r13, rsi loc_AE78A: test r12b, r12b jz short loc_AE7CF loc_AE78F: inc r10 cmp r10, 50h ; 'P' jnz short loc_AE73C mov r10b, 0FFh jmp short loc_AE7E7 loc_AE79D: mov r11, [rbp+var_30] jmp short loc_AE7F3 loc_AE7A3: mov eax, 2 cmp r15d, 1 mov r11, [rbp+var_30] jle short loc_AE7BB mov r13, [rbp+var_38] mov rsi, rbx jmp short loc_AE7FE loc_AE7BB: mov esi, 1 sub esi, r15d mov r13, rbx mov r15d, esi mov rsi, [rbp+var_38] jmp short loc_AE7FE loc_AE7CF: lea rsi, doubles add r11, rsi mov rsi, [r11+8] mov r10b, [rsi+rax] dec r13 mov rsi, r13 loc_AE7E7: mov r15, [rbp+var_40] mov r11, [rbp+var_30] mov r12, [rbp+var_50] loc_AE7F3: mov r13, [rbp+var_38] movzx eax, r10b inc rsi loc_AE7FE: mov r8, rcx sub r8, r12 cmp r8, rdi jge loc_AE895 movsxd r9, r11d lea r8, CZ_SORT_TABLE mov [rbp+var_60], r9 mov rbx, [r8+r9*8] loc_AE81F: movzx r8d, byte ptr [rcx] movzx r8d, byte ptr [rbx+r8] test r8d, r8d jz short loc_AE863 cmp r8d, 2 jnz loc_AE8D0 inc rcx mov r8, rcx sub r8, r12 mov r10, rcx cmp r8, rdi jge short loc_AE871 loc_AE848: movzx r9d, byte ptr [r10] cmp byte ptr [rbx+r9], 2 jnz short loc_AE871 inc r10 inc r8 mov r9, r10 cmp r8, rdi jl short loc_AE848 jmp short loc_AE874 loc_AE863: inc rcx mov r8, rcx sub r8, r12 mov r10, rcx jmp short loc_AE88E loc_AE871: mov r9, rcx loc_AE874: cmp r11d, 3 cmovge r10, r9 mov r8, r10 sub r8, r12 cmp r8, rdi jl loc_AE968 mov rcx, r10 loc_AE88E: cmp r8, rdi jl short loc_AE81F jmp short loc_AE898 loc_AE895: mov r10, rcx loc_AE898: cmp r11d, 3 jnz short loc_AE8B2 xor r11d, r11d mov ecx, 3 mov [rbp+var_30], rcx loc_AE8AA: mov rcx, r10 jmp loc_AE9C1 loc_AE8B2: test r11d, r11d lea r8d, [r11+1] mov rcx, r12 cmovz rcx, [rbp+var_58] mov r11d, 1 loc_AE8C7: mov [rbp+var_30], r8 jmp loc_AE9C1 loc_AE8D0: cmp r8d, 0FFh jnz loc_AE9BA mov [rbp+var_40], r13 mov [rbp+var_44], eax mov rax, rcx sub rax, r12 mov r8, [rbp+var_70] add r8, rcx mov [rbp+var_38], r8 xor r11d, r11d mov rbx, r15 loc_AE8FB: mov r8, r11 shl r8, 4 lea r9, doubles mov r13, [r8+r9] mov r9b, [r13+0] test r9b, r9b jz short loc_AE948 cmp rax, rdi jge short loc_AE948 inc r13 mov r15, [rbp+var_38] mov r12, rcx loc_AE925: cmp [r12], r9b jnz short loc_AE950 inc r12 mov r9b, [r13+0] test r9b, r9b jz short loc_AE94B inc r13 lea r10, [r15+1] cmp r15, rdi mov r15, r10 jl short loc_AE925 jmp short loc_AE94B loc_AE948: mov r12, rcx loc_AE94B: test r9b, r9b jz short loc_AE990 loc_AE950: inc r11 cmp r11, 50h ; 'P' mov r12, [rbp+var_50] jnz short loc_AE8FB mov r15, rbx mov r8b, 0FFh mov eax, [rbp+var_44] jmp short loc_AE9B6 loc_AE968: mov rcx, r11 mov r11d, 2 cmp ecx, 1 jg loc_AE8AA mov r8d, 1 sub r8d, ecx mov rcx, [rbp+var_58] mov [rbp+var_58], r10 jmp loc_AE8C7 loc_AE990: lea rcx, doubles add r8, rcx mov rcx, [r8+8] mov r8, [rbp+var_60] mov r8b, [rcx+r8] dec r12 mov rcx, r12 mov r15, rbx mov eax, [rbp+var_44] mov r12, [rbp+var_50] loc_AE9B6: mov r13, [rbp+var_40] loc_AE9BA: movzx r11d, r8b inc rcx loc_AE9C1: test eax, eax jz short loc_AE9CE cmp eax, r11d jz loc_AE647 loc_AE9CE: sub eax, r11d pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnncoll_czech( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5, char a6) { unsigned __int8 *v6; // r12 unsigned __int8 *v7; // r14 long long v8; // rdi long long v9; // rdx long long v10; // r15 unsigned __int8 *v11; // r13 long long v12; // rax long long v13; // r9 long long v14; // r10 unsigned __int8 *v15; // rsi long long v16; // r10 unsigned __int8 *v17; // rbx unsigned __int8 *v18; // r11 unsigned __int8 *v19; // r10 int v20; // eax int v21; // r11d char *v22; // rbx char v23; // r12 char *v24; // rbx unsigned __int8 *v25; // r15 _BYTE *v26; // r13 bool v27; // cc long long v28; // rbx int v29; // r8d unsigned __int8 *v30; // rcx long long v31; // r8 unsigned __int8 *v32; // r10 unsigned __int8 *v33; // r9 unsigned __int8 *v34; // r8 int v35; // r11d int v36; // r8d unsigned __int8 *v37; // rax long long v38; // r11 long long v39; // rbx char *v40; // r13 char v41; // r9 char *v42; // r13 unsigned __int8 *v43; // r15 _BYTE *v44; // r12 int v45; // ecx long long v47; // [rsp+0h] [rbp-70h] long long v48; // [rsp+8h] [rbp-68h] long long v49; // [rsp+10h] [rbp-60h] unsigned __int8 *v50; // [rsp+18h] [rbp-58h] unsigned __int8 *v51; // [rsp+20h] [rbp-50h] int v52; // [rsp+2Ch] [rbp-44h] long long v53; // [rsp+30h] [rbp-40h] unsigned __int8 *v54; // [rsp+30h] [rbp-40h] unsigned __int8 *v55; // [rsp+38h] [rbp-38h] int v56; // [rsp+40h] [rbp-30h] v6 = a4; v7 = a2; v8 = (int)a5; if ( a3 < a5 ) LODWORD(a5) = a3; if ( !a6 ) LODWORD(a5) = a3; v9 = (int)a5; v48 = 1LL - (_QWORD)a2; v47 = 1LL - (_QWORD)a4; v10 = 0LL; v11 = a2; v50 = a4; v56 = 0; v51 = a4; do { v55 = v11; if ( a2 - v7 >= v9 ) { v17 = a2; LABEL_23: if ( (_DWORD)v10 == 3 ) { v20 = 0; v10 = 3LL; a2 = v17; } else { a2 = v7; if ( !(_DWORD)v10 ) a2 = v11; v20 = 1; v10 = (unsigned int)(v10 + 1); } v21 = v56; goto LABEL_49; } v12 = (int)v10; v13 = (long long)*(&CZ_SORT_TABLE + (int)v10); while ( 1 ) { LODWORD(v14) = *(unsigned __int8 *)(v13 + *a2); if ( *(_BYTE *)(v13 + *a2) ) break; v19 = (unsigned __int8 *)(++a2 - v7); v17 = a2; LABEL_20: if ( (long long)v19 >= v9 ) goto LABEL_23; } if ( (_DWORD)v14 == 2 ) { v15 = a2 + 1; v16 = v15 - v7; v17 = v15; if ( v15 - v7 < v9 ) { while ( *(_BYTE *)(v13 + *v17) == 2 ) { ++v17; ++v16; v18 = v17; if ( v16 >= v9 ) goto LABEL_16; } } v18 = v15; LABEL_16: if ( (int)v10 >= 3 ) v17 = v18; v19 = (unsigned __int8 *)(v17 - v7); if ( v17 - v7 < v9 ) { v20 = 2; v21 = v56; if ( (int)v10 <= 1 ) { v11 = v17; v10 = (unsigned int)(1 - v10); a2 = v55; } else { a2 = v17; } goto LABEL_49; } a2 = v17; goto LABEL_20; } if ( (_DWORD)v14 != 255 ) { v21 = v56; goto LABEL_48; } v53 = v10; v14 = 0LL; while ( 2 ) { v22 = (char *)*(&doubles + 2 * v14); v23 = *v22; if ( *v22 && a2 - v7 < v9 ) { v24 = v22 + 1; v25 = &a2[v48]; v26 = a2; while ( *v26 == v23 ) { ++v26; v23 = *v24; if ( *v24 ) { ++v24; v27 = (long long)v25++ < v9; if ( v27 ) continue; } goto LABEL_39; } goto LABEL_40; } v26 = a2; LABEL_39: if ( v23 ) { LABEL_40: if ( ++v14 == 80 ) { LOBYTE(v14) = -1; goto LABEL_47; } continue; } break; } LOBYTE(v14) = *((_BYTE *)*(&doubles + 2 * v14 + 1) + v12); a2 = v26 - 1; LABEL_47: v10 = v53; v21 = v56; v6 = v51; LABEL_48: v11 = v55; v20 = (unsigned __int8)v14; ++a2; LABEL_49: if ( a4 - v6 >= v8 ) { v32 = a4; LABEL_66: if ( v21 != 3 ) { v36 = v21 + 1; a4 = v6; if ( !v21 ) a4 = v50; v35 = 1; goto LABEL_72; } v35 = 0; v56 = 3; LABEL_68: a4 = v32; continue; } v49 = v21; v28 = (long long)*(&CZ_SORT_TABLE + v21); while ( 2 ) { v29 = *(unsigned __int8 *)(v28 + *a4); if ( !*(_BYTE *)(v28 + *a4) ) { v34 = (unsigned __int8 *)(++a4 - v6); v32 = a4; LABEL_63: if ( (long long)v34 >= v8 ) goto LABEL_66; continue; } break; } if ( v29 == 2 ) { v30 = a4 + 1; v31 = v30 - v6; v32 = v30; if ( v30 - v6 < v8 ) { while ( *(_BYTE *)(v28 + *v32) == 2 ) { ++v32; ++v31; v33 = v32; if ( v31 >= v8 ) goto LABEL_59; } } v33 = v30; LABEL_59: if ( v21 >= 3 ) v32 = v33; v34 = (unsigned __int8 *)(v32 - v6); if ( v32 - v6 < v8 ) { v45 = v21; v35 = 2; if ( v45 <= 1 ) { v36 = 1 - v45; a4 = v50; v50 = v32; LABEL_72: v56 = v36; continue; } goto LABEL_68; } a4 = v32; goto LABEL_63; } if ( v29 != 255 ) goto LABEL_90; v54 = v11; v52 = v20; v37 = (unsigned __int8 *)(a4 - v6); v38 = 0LL; v39 = v10; while ( 2 ) { v40 = (char *)*(&doubles + 2 * v38); v41 = *v40; if ( *v40 && (long long)v37 < v8 ) { v42 = v40 + 1; v43 = &a4[v47]; v44 = a4; while ( *v44 == v41 ) { ++v44; v41 = *v42; if ( *v42 ) { ++v42; v27 = (long long)v43++ < v8; if ( v27 ) continue; } goto LABEL_83; } goto LABEL_84; } v44 = a4; LABEL_83: if ( v41 ) { LABEL_84: ++v38; v6 = v51; if ( v38 == 80 ) { v10 = v39; LOBYTE(v29) = -1; v20 = v52; goto LABEL_89; } continue; } break; } LOBYTE(v29) = *((_BYTE *)*(&doubles + 2 * v38 + 1) + v49); a4 = v44 - 1; v10 = v39; v20 = v52; v6 = v51; LABEL_89: v11 = v54; LABEL_90: v35 = (unsigned __int8)v29; ++a4; } while ( v20 && v20 == v35 ); return (unsigned int)(v20 - v35); }
my_strnncoll_czech: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R12,RCX MOV R14,RSI CMP RDX,R8 MOVSXD RDI,R8D CMOVC R8,RDX TEST R9B,R9B CMOVZ R8,RDX MOVSXD RDX,R8D MOV ECX,0x1 MOV ESI,0x1 SUB RSI,R14 MOV qword ptr [RBP + -0x68],RSI SUB RCX,R12 MOV qword ptr [RBP + -0x70],RCX XOR R15D,R15D MOV RCX,R12 MOV R13,R14 MOV qword ptr [RBP + -0x58],R12 MOV qword ptr [RBP + -0x30],0x0 MOV RSI,R14 MOV qword ptr [RBP + -0x50],R12 LAB_001ae647: MOV qword ptr [RBP + -0x38],R13 MOV R9,RSI SUB R9,R14 CMP R9,RDX JGE 0x001ae6de MOVSXD RAX,R15D LEA R8,[0x47c2f0] MOV R9,qword ptr [R8 + RAX*0x8] LAB_001ae668: MOVZX R10D,byte ptr [RSI] MOVZX R10D,byte ptr [R9 + R10*0x1] TEST R10D,R10D JZ 0x001ae6ac CMP R10D,0x2 JNZ 0x001ae71b INC RSI MOV R10,RSI SUB R10,R14 MOV RBX,RSI CMP R10,RDX JGE 0x001ae6ba LAB_001ae691: MOVZX R11D,byte ptr [RBX] CMP byte ptr [R9 + R11*0x1],0x2 JNZ 0x001ae6ba INC RBX INC R10 MOV R11,RBX CMP R10,RDX JL 0x001ae691 JMP 0x001ae6bd LAB_001ae6ac: INC RSI MOV R10,RSI SUB R10,R14 MOV RBX,RSI JMP 0x001ae6d7 LAB_001ae6ba: MOV R11,RSI LAB_001ae6bd: CMP R15D,0x3 CMOVGE RBX,R11 MOV R10,RBX SUB R10,R14 CMP R10,RDX JL 0x001ae7a3 MOV RSI,RBX LAB_001ae6d7: CMP R10,RDX JL 0x001ae668 JMP 0x001ae6e1 LAB_001ae6de: MOV RBX,RSI LAB_001ae6e1: CMP R15D,0x3 JNZ 0x001ae6f8 XOR EAX,EAX MOV R15D,0x3 MOV R13,qword ptr [RBP + -0x38] MOV RSI,RBX JMP 0x001ae712 LAB_001ae6f8: TEST R15D,R15D MOV RSI,R14 MOV R13,qword ptr [RBP + -0x38] CMOVZ RSI,R13 LEA R9D,[R15 + 0x1] MOV EAX,0x1 MOV R15D,R9D LAB_001ae712: MOV R11,qword ptr [RBP + -0x30] JMP 0x001ae7fe LAB_001ae71b: CMP R10D,0xff JNZ 0x001ae79d MOV qword ptr [RBP + -0x40],R15 MOV R9,RSI SUB R9,R14 MOV R8,qword ptr [RBP + -0x68] ADD R8,RSI MOV qword ptr [RBP + -0x60],R8 XOR R10D,R10D LAB_001ae73c: MOV R11,R10 SHL R11,0x4 LEA R8,[0x47c310] MOV RBX,qword ptr [R11 + R8*0x1] MOV R12B,byte ptr [RBX] TEST R12B,R12B JZ 0x001ae787 CMP R9,RDX JGE 0x001ae787 INC RBX MOV R15,qword ptr [RBP + -0x60] MOV R13,RSI LAB_001ae765: CMP byte ptr [R13],R12B JNZ 0x001ae78f INC R13 MOV R12B,byte ptr [RBX] TEST R12B,R12B JZ 0x001ae78a INC RBX LEA R8,[R15 + 0x1] CMP R15,RDX MOV R15,R8 JL 0x001ae765 JMP 0x001ae78a LAB_001ae787: MOV R13,RSI LAB_001ae78a: TEST R12B,R12B JZ 0x001ae7cf LAB_001ae78f: INC R10 CMP R10,0x50 JNZ 0x001ae73c MOV R10B,0xff JMP 0x001ae7e7 LAB_001ae79d: MOV R11,qword ptr [RBP + -0x30] JMP 0x001ae7f3 LAB_001ae7a3: MOV EAX,0x2 CMP R15D,0x1 MOV R11,qword ptr [RBP + -0x30] JLE 0x001ae7bb MOV R13,qword ptr [RBP + -0x38] MOV RSI,RBX JMP 0x001ae7fe LAB_001ae7bb: MOV ESI,0x1 SUB ESI,R15D MOV R13,RBX MOV R15D,ESI MOV RSI,qword ptr [RBP + -0x38] JMP 0x001ae7fe LAB_001ae7cf: LEA RSI,[0x47c310] ADD R11,RSI MOV RSI,qword ptr [R11 + 0x8] MOV R10B,byte ptr [RSI + RAX*0x1] DEC R13 MOV RSI,R13 LAB_001ae7e7: MOV R15,qword ptr [RBP + -0x40] MOV R11,qword ptr [RBP + -0x30] MOV R12,qword ptr [RBP + -0x50] LAB_001ae7f3: MOV R13,qword ptr [RBP + -0x38] MOVZX EAX,R10B INC RSI LAB_001ae7fe: MOV R8,RCX SUB R8,R12 CMP R8,RDI JGE 0x001ae895 MOVSXD R9,R11D LEA R8,[0x47c2f0] MOV qword ptr [RBP + -0x60],R9 MOV RBX,qword ptr [R8 + R9*0x8] LAB_001ae81f: MOVZX R8D,byte ptr [RCX] MOVZX R8D,byte ptr [RBX + R8*0x1] TEST R8D,R8D JZ 0x001ae863 CMP R8D,0x2 JNZ 0x001ae8d0 INC RCX MOV R8,RCX SUB R8,R12 MOV R10,RCX CMP R8,RDI JGE 0x001ae871 LAB_001ae848: MOVZX R9D,byte ptr [R10] CMP byte ptr [RBX + R9*0x1],0x2 JNZ 0x001ae871 INC R10 INC R8 MOV R9,R10 CMP R8,RDI JL 0x001ae848 JMP 0x001ae874 LAB_001ae863: INC RCX MOV R8,RCX SUB R8,R12 MOV R10,RCX JMP 0x001ae88e LAB_001ae871: MOV R9,RCX LAB_001ae874: CMP R11D,0x3 CMOVGE R10,R9 MOV R8,R10 SUB R8,R12 CMP R8,RDI JL 0x001ae968 MOV RCX,R10 LAB_001ae88e: CMP R8,RDI JL 0x001ae81f JMP 0x001ae898 LAB_001ae895: MOV R10,RCX LAB_001ae898: CMP R11D,0x3 JNZ 0x001ae8b2 XOR R11D,R11D MOV ECX,0x3 MOV qword ptr [RBP + -0x30],RCX LAB_001ae8aa: MOV RCX,R10 JMP 0x001ae9c1 LAB_001ae8b2: TEST R11D,R11D LEA R8D,[R11 + 0x1] MOV RCX,R12 CMOVZ RCX,qword ptr [RBP + -0x58] MOV R11D,0x1 LAB_001ae8c7: MOV qword ptr [RBP + -0x30],R8 JMP 0x001ae9c1 LAB_001ae8d0: CMP R8D,0xff JNZ 0x001ae9ba MOV qword ptr [RBP + -0x40],R13 MOV dword ptr [RBP + -0x44],EAX MOV RAX,RCX SUB RAX,R12 MOV R8,qword ptr [RBP + -0x70] ADD R8,RCX MOV qword ptr [RBP + -0x38],R8 XOR R11D,R11D MOV RBX,R15 LAB_001ae8fb: MOV R8,R11 SHL R8,0x4 LEA R9,[0x47c310] MOV R13,qword ptr [R8 + R9*0x1] MOV R9B,byte ptr [R13] TEST R9B,R9B JZ 0x001ae948 CMP RAX,RDI JGE 0x001ae948 INC R13 MOV R15,qword ptr [RBP + -0x38] MOV R12,RCX LAB_001ae925: CMP byte ptr [R12],R9B JNZ 0x001ae950 INC R12 MOV R9B,byte ptr [R13] TEST R9B,R9B JZ 0x001ae94b INC R13 LEA R10,[R15 + 0x1] CMP R15,RDI MOV R15,R10 JL 0x001ae925 JMP 0x001ae94b LAB_001ae948: MOV R12,RCX LAB_001ae94b: TEST R9B,R9B JZ 0x001ae990 LAB_001ae950: INC R11 CMP R11,0x50 MOV R12,qword ptr [RBP + -0x50] JNZ 0x001ae8fb MOV R15,RBX MOV R8B,0xff MOV EAX,dword ptr [RBP + -0x44] JMP 0x001ae9b6 LAB_001ae968: MOV RCX,R11 MOV R11D,0x2 CMP ECX,0x1 JG 0x001ae8aa MOV R8D,0x1 SUB R8D,ECX MOV RCX,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x58],R10 JMP 0x001ae8c7 LAB_001ae990: LEA RCX,[0x47c310] ADD R8,RCX MOV RCX,qword ptr [R8 + 0x8] MOV R8,qword ptr [RBP + -0x60] MOV R8B,byte ptr [RCX + R8*0x1] DEC R12 MOV RCX,R12 MOV R15,RBX MOV EAX,dword ptr [RBP + -0x44] MOV R12,qword ptr [RBP + -0x50] LAB_001ae9b6: MOV R13,qword ptr [RBP + -0x40] LAB_001ae9ba: MOVZX R11D,R8B INC RCX LAB_001ae9c1: TEST EAX,EAX JZ 0x001ae9ce CMP EAX,R11D JZ 0x001ae647 LAB_001ae9ce: SUB EAX,R11D POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int my_strnncoll_czech(int8 param_1,byte *param_2,ulong param_3,byte *param_4,ulong param_5, char param_6) { byte *pbVar1; byte *pbVar2; byte *pbVar3; long lVar4; byte *pbVar5; byte *pbVar6; long lVar7; int iVar8; uint uVar9; int iVar10; uint uVar11; long lVar12; byte *pbVar13; byte bVar14; byte *pbVar15; byte *pbVar16; byte *local_60; lVar7 = (long)(int)param_5; if (param_3 < param_5) { param_5 = param_3; } iVar8 = (int)param_5; if (param_6 == '\0') { iVar8 = (int)param_3; } lVar4 = (long)iVar8; iVar10 = 0; iVar8 = 0; pbVar13 = param_4; pbVar6 = param_2; pbVar16 = param_2; local_60 = param_4; LAB_001ae647: if ((long)pbVar6 - (long)param_2 < lVar4) { do { bVar14 = (&CZ_SORT_TABLE)[iVar10][*pbVar6]; uVar11 = (uint)bVar14; if (bVar14 == 0) { lVar12 = (long)(pbVar6 + 1) - (long)param_2; pbVar6 = pbVar6 + 1; } else { if (bVar14 != 2) { if (bVar14 != 0xff) goto LAB_001ae7f3; lVar12 = 0; goto LAB_001ae73c; } pbVar6 = pbVar6 + 1; lVar12 = (long)pbVar6 - (long)param_2; pbVar5 = pbVar6; while ((pbVar15 = pbVar5, lVar12 < lVar4 && (pbVar15 = pbVar6, (&CZ_SORT_TABLE)[iVar10][*pbVar5] == '\x02'))) { pbVar5 = pbVar5 + 1; lVar12 = lVar12 + 1; } if (2 < iVar10) { pbVar5 = pbVar15; } lVar12 = (long)pbVar5 - (long)param_2; pbVar6 = pbVar5; if (lVar12 < lVar4) { uVar11 = 2; if (iVar10 < 2) { iVar10 = 1 - iVar10; pbVar6 = pbVar16; pbVar16 = pbVar5; } goto LAB_001ae7fe; } } } while (lVar12 < lVar4); } if (iVar10 == 3) { uVar11 = 0; iVar10 = 3; } else { pbVar6 = param_2; if (iVar10 == 0) { pbVar6 = pbVar16; } iVar10 = iVar10 + 1; uVar11 = 1; } goto LAB_001ae7fe; LAB_001ae73c: do { pbVar5 = (&doubles)[lVar12 * 2]; bVar14 = *pbVar5; pbVar15 = pbVar6; pbVar3 = pbVar6 + (1 - (long)param_2); pbVar2 = pbVar6 + -(long)param_2; if (bVar14 != 0) { while (pbVar1 = pbVar3, (long)pbVar2 < lVar4) { pbVar5 = pbVar5 + 1; if (*pbVar15 != bVar14) goto LAB_001ae78f; pbVar15 = pbVar15 + 1; bVar14 = *pbVar5; if (bVar14 == 0) break; pbVar3 = pbVar1 + 1; pbVar2 = pbVar1; } } if (bVar14 == 0) { uVar11 = (uint)(byte)(&PTR_DAT_0047c318)[lVar12 * 2][iVar10]; pbVar6 = pbVar15 + -1; goto LAB_001ae7f3; } LAB_001ae78f: lVar12 = lVar12 + 1; } while (lVar12 != 0x50); uVar11 = 0xff; LAB_001ae7f3: pbVar6 = pbVar6 + 1; LAB_001ae7fe: if ((long)pbVar13 - (long)param_4 < lVar7) { do { bVar14 = (&CZ_SORT_TABLE)[iVar8][*pbVar13]; uVar9 = (uint)bVar14; if (bVar14 == 0) { pbVar13 = pbVar13 + 1; lVar12 = (long)pbVar13 - (long)param_4; } else { if (bVar14 != 2) { if (bVar14 != 0xff) goto LAB_001ae9ba; lVar12 = 0; goto LAB_001ae8fb; } pbVar5 = pbVar13 + 1; lVar12 = (long)pbVar5 - (long)param_4; pbVar13 = pbVar5; while ((pbVar15 = pbVar13, lVar12 < lVar7 && (pbVar15 = pbVar5, (&CZ_SORT_TABLE)[iVar8][*pbVar13] == '\x02'))) { pbVar13 = pbVar13 + 1; lVar12 = lVar12 + 1; } if (2 < iVar8) { pbVar13 = pbVar15; } lVar12 = (long)pbVar13 - (long)param_4; if (lVar12 < lVar7) { uVar9 = 2; if (1 < iVar8) goto LAB_001ae9c1; iVar8 = -iVar8; pbVar5 = local_60; local_60 = pbVar13; goto LAB_001ae8c7; } } } while (lVar12 < lVar7); } if (iVar8 == 3) { uVar9 = 0; iVar8 = 3; } else { pbVar5 = param_4; if (iVar8 == 0) { pbVar5 = local_60; } uVar9 = 1; LAB_001ae8c7: iVar8 = iVar8 + 1; pbVar13 = pbVar5; } LAB_001ae9c1: if ((uVar11 == 0) || (uVar11 != uVar9)) { return uVar11 - uVar9; } goto LAB_001ae647; LAB_001ae8fb: do { pbVar5 = (&doubles)[lVar12 * 2]; bVar14 = *pbVar5; pbVar15 = pbVar13; pbVar3 = pbVar13 + (1 - (long)param_4); pbVar2 = pbVar13 + -(long)param_4; if (bVar14 != 0) { while (pbVar1 = pbVar3, (long)pbVar2 < lVar7) { pbVar5 = pbVar5 + 1; if (*pbVar15 != bVar14) goto LAB_001ae950; pbVar15 = pbVar15 + 1; bVar14 = *pbVar5; if (bVar14 == 0) break; pbVar3 = pbVar1 + 1; pbVar2 = pbVar1; } } if (bVar14 == 0) { uVar9 = (uint)(byte)(&PTR_DAT_0047c318)[lVar12 * 2][iVar8]; pbVar13 = pbVar15 + -1; goto LAB_001ae9ba; } LAB_001ae950: lVar12 = lVar12 + 1; } while (lVar12 != 0x50); uVar9 = 0xff; LAB_001ae9ba: pbVar13 = pbVar13 + 1; goto LAB_001ae9c1; }
50,363
my_rw_init
eloqsql/mysys/thr_rwlock.c
int my_rw_init(my_rw_lock_t *rwp) { pthread_condattr_t cond_attr; pthread_mutex_init( &rwp->lock, MY_MUTEX_INIT_FAST); pthread_condattr_init( &cond_attr ); pthread_cond_init( &rwp->readers, &cond_attr ); pthread_cond_init( &rwp->writers, &cond_attr ); pthread_condattr_destroy(&cond_attr); rwp->state = 0; rwp->waiters = 0; #ifdef SAFE_MUTEX rwp->write_thread = 0; #endif return(0); }
O0
c
my_rw_init: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi leaq 0x368d09(%rip), %rsi # 0x39c980 callq 0x25550 leaq -0xc(%rbp), %rdi callq 0x25080 movq -0x8(%rbp), %rdi addq $0x28, %rdi leaq -0xc(%rbp), %rsi callq 0x25430 movq -0x8(%rbp), %rdi addq $0x58, %rdi leaq -0xc(%rbp), %rsi callq 0x25430 leaq -0xc(%rbp), %rdi callq 0x251b0 movq -0x8(%rbp), %rax movl $0x0, 0x88(%rax) movq -0x8(%rbp), %rax movl $0x0, 0x8c(%rax) xorl %eax, %eax addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_rw_init: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] lea rsi, my_fast_mutexattr call _pthread_mutex_init lea rdi, [rbp+var_C] call _pthread_condattr_init mov rdi, [rbp+var_8] add rdi, 28h ; '(' lea rsi, [rbp+var_C] call _pthread_cond_init mov rdi, [rbp+var_8] add rdi, 58h ; 'X' lea rsi, [rbp+var_C] call _pthread_cond_init lea rdi, [rbp+var_C] call _pthread_condattr_destroy mov rax, [rbp+var_8] mov dword ptr [rax+88h], 0 mov rax, [rbp+var_8] mov dword ptr [rax+8Ch], 0 xor eax, eax add rsp, 10h pop rbp retn
long long my_rw_init(long long a1) { _BYTE v2[4]; // [rsp+4h] [rbp-Ch] BYREF long long v3; // [rsp+8h] [rbp-8h] v3 = a1; pthread_mutex_init(a1, &my_fast_mutexattr); pthread_condattr_init(v2); pthread_cond_init(v3 + 40, v2); pthread_cond_init(v3 + 88, v2); pthread_condattr_destroy(v2); *(_DWORD *)(v3 + 136) = 0; *(_DWORD *)(v3 + 140) = 0; return 0LL; }
my_rw_init: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[0x49c980] CALL 0x00125550 LEA RDI,[RBP + -0xc] CALL 0x00125080 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 LEA RSI,[RBP + -0xc] CALL 0x00125430 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x58 LEA RSI,[RBP + -0xc] CALL 0x00125430 LEA RDI,[RBP + -0xc] CALL 0x001251b0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x88],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x8c],0x0 XOR EAX,EAX ADD RSP,0x10 POP RBP RET
int8 my_rw_init(pthread_mutex_t *param_1) { pthread_condattr_t local_14; pthread_mutex_t *local_10; local_10 = param_1; pthread_mutex_init(param_1,(pthread_mutexattr_t *)&my_fast_mutexattr); pthread_condattr_init(&local_14); pthread_cond_init((pthread_cond_t *)(local_10 + 1),&local_14); pthread_cond_init((pthread_cond_t *)((long)local_10 + 0x58),&local_14); pthread_condattr_destroy(&local_14); *(int4 *)((long)local_10 + 0x88) = 0; *(int4 *)((long)local_10 + 0x8c) = 0; return 0; }
50,364
skip_trailing_space
eloqsql/strings/strings_def.h
static inline const uchar *skip_trailing_space(const uchar *ptr,size_t len) { const uchar *end= ptr + len; if (len > 20) { const uchar *end_words= (const uchar *)(intptr) (((ulonglong)(intptr)end) / SIZEOF_INT * SIZEOF_INT); const uchar *start_words= (const uchar *)(intptr) ((((ulonglong)(intptr)ptr) + SIZEOF_INT - 1) / SIZEOF_INT * SIZEOF_INT); DBUG_ASSERT(((ulonglong)(intptr)ptr) >= SIZEOF_INT); if (end_words > ptr) { while (end > end_words && end[-1] == 0x20) end--; if (end[-1] == 0x20 && start_words < end_words) while (end > start_words && ((unsigned *)end)[-1] == SPACE_INT) end -= SIZEOF_INT; } } while (end > ptr && end[-1] == 0x20) end--; return (end); }
O0
c
skip_trailing_space: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) cmpq $0x14, -0x10(%rbp) jbe 0xc5f9a movq -0x18(%rbp), %rax shrq $0x2, %rax shlq $0x2, %rax movq %rax, -0x20(%rbp) movq -0x8(%rbp), %rax addq $0x4, %rax subq $0x1, %rax shrq $0x2, %rax shlq $0x2, %rax movq %rax, -0x28(%rbp) jmp 0xc5efd movq -0x20(%rbp), %rax cmpq -0x8(%rbp), %rax jbe 0xc5f98 jmp 0xc5f0d movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x20(%rbp), %rcx movb %al, -0x29(%rbp) jbe 0xc5f2d movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax cmpl $0x20, %eax sete %al movb %al, -0x29(%rbp) movb -0x29(%rbp), %al testb $0x1, %al jne 0xc5f36 jmp 0xc5f44 movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0xc5f0d movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax cmpl $0x20, %eax jne 0xc5f96 movq -0x28(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0xc5f96 jmp 0xc5f5d movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x28(%rbp), %rcx movb %al, -0x2a(%rbp) jbe 0xc5f7d movq -0x18(%rbp), %rax cmpl $0x20202020, -0x4(%rax) # imm = 0x20202020 sete %al movb %al, -0x2a(%rbp) movb -0x2a(%rbp), %al testb $0x1, %al jne 0xc5f86 jmp 0xc5f94 movq -0x18(%rbp), %rax addq $-0x4, %rax movq %rax, -0x18(%rbp) jmp 0xc5f5d jmp 0xc5f96 jmp 0xc5f98 jmp 0xc5f9a jmp 0xc5f9c movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x8(%rbp), %rcx movb %al, -0x2b(%rbp) jbe 0xc5fbc movq -0x18(%rbp), %rax movzbl -0x1(%rax), %eax cmpl $0x20, %eax sete %al movb %al, -0x2b(%rbp) movb -0x2b(%rbp), %al testb $0x1, %al jne 0xc5fc5 jmp 0xc5fd3 movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0xc5f9c movq -0x18(%rbp), %rax popq %rbp retq nopl (%rax)
skip_trailing_space_3: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] add rax, [rbp+var_10] mov [rbp+var_18], rax cmp [rbp+var_10], 14h jbe loc_C5F9A mov rax, [rbp+var_18] shr rax, 2 shl rax, 2 mov [rbp+var_20], rax mov rax, [rbp+var_8] add rax, 4 sub rax, 1 shr rax, 2 shl rax, 2 mov [rbp+var_28], rax jmp short $+2 loc_C5EFD: mov rax, [rbp+var_20] cmp rax, [rbp+var_8] jbe loc_C5F98 jmp short $+2 loc_C5F0D: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_20] mov [rbp+var_29], al jbe short loc_C5F2D mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] cmp eax, 20h ; ' ' setz al mov [rbp+var_29], al loc_C5F2D: mov al, [rbp+var_29] test al, 1 jnz short loc_C5F36 jmp short loc_C5F44 loc_C5F36: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_C5F0D loc_C5F44: mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] cmp eax, 20h ; ' ' jnz short loc_C5F96 mov rax, [rbp+var_28] cmp rax, [rbp+var_20] jnb short loc_C5F96 jmp short $+2 loc_C5F5D: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_2A], al jbe short loc_C5F7D mov rax, [rbp+var_18] cmp dword ptr [rax-4], 20202020h setz al mov [rbp+var_2A], al loc_C5F7D: mov al, [rbp+var_2A] test al, 1 jnz short loc_C5F86 jmp short loc_C5F94 loc_C5F86: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFCh mov [rbp+var_18], rax jmp short loc_C5F5D loc_C5F94: jmp short $+2 loc_C5F96: jmp short $+2 loc_C5F98: jmp short $+2 loc_C5F9A: jmp short $+2 loc_C5F9C: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_8] mov [rbp+var_2B], al jbe short loc_C5FBC mov rax, [rbp+var_18] movzx eax, byte ptr [rax-1] cmp eax, 20h ; ' ' setz al mov [rbp+var_2B], al loc_C5FBC: mov al, [rbp+var_2B] test al, 1 jnz short loc_C5FC5 jmp short loc_C5FD3 loc_C5FC5: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax jmp short loc_C5F9C loc_C5FD3: mov rax, [rbp+var_18] pop rbp retn
unsigned long long skip_trailing_space_3(unsigned long long a1, unsigned long long a2) { bool v3; // [rsp+1h] [rbp-2Bh] bool v4; // [rsp+2h] [rbp-2Ah] bool v5; // [rsp+3h] [rbp-29h] unsigned long long v6; // [rsp+4h] [rbp-28h] unsigned long long v7; // [rsp+Ch] [rbp-20h] unsigned long long v8; // [rsp+14h] [rbp-18h] v8 = a2 + a1; if ( a2 > 0x14 ) { v7 = 4 * (v8 >> 2); v6 = 4 * ((a1 + 3) >> 2); if ( v7 > a1 ) { while ( 1 ) { v5 = 0; if ( v8 > v7 ) v5 = *(_BYTE *)(v8 - 1) == 32; if ( !v5 ) break; --v8; } if ( *(_BYTE *)(v8 - 1) == 32 && v6 < v7 ) { while ( 1 ) { v4 = 0; if ( v8 > v6 ) v4 = *(_DWORD *)(v8 - 4) == 538976288; if ( !v4 ) break; v8 -= 4LL; } } } } while ( 1 ) { v3 = 0; if ( v8 > a1 ) v3 = *(_BYTE *)(v8 - 1) == 32; if ( !v3 ) break; --v8; } return v8; }
skip_trailing_space: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x10],0x14 JBE 0x001c5f9a MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x2 SHL RAX,0x2 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x4 SUB RAX,0x1 SHR RAX,0x2 SHL RAX,0x2 MOV qword ptr [RBP + -0x28],RAX JMP 0x001c5efd LAB_001c5efd: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x8] JBE 0x001c5f98 JMP 0x001c5f0d LAB_001c5f0d: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x20] MOV byte ptr [RBP + -0x29],AL JBE 0x001c5f2d MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] CMP EAX,0x20 SETZ AL MOV byte ptr [RBP + -0x29],AL LAB_001c5f2d: MOV AL,byte ptr [RBP + -0x29] TEST AL,0x1 JNZ 0x001c5f36 JMP 0x001c5f44 LAB_001c5f36: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x001c5f0d LAB_001c5f44: MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] CMP EAX,0x20 JNZ 0x001c5f96 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x20] JNC 0x001c5f96 JMP 0x001c5f5d LAB_001c5f5d: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x2a],AL JBE 0x001c5f7d MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + -0x4],0x20202020 SETZ AL MOV byte ptr [RBP + -0x2a],AL LAB_001c5f7d: MOV AL,byte ptr [RBP + -0x2a] TEST AL,0x1 JNZ 0x001c5f86 JMP 0x001c5f94 LAB_001c5f86: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x4 MOV qword ptr [RBP + -0x18],RAX JMP 0x001c5f5d LAB_001c5f94: JMP 0x001c5f96 LAB_001c5f96: JMP 0x001c5f98 LAB_001c5f98: JMP 0x001c5f9a LAB_001c5f9a: JMP 0x001c5f9c LAB_001c5f9c: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x8] MOV byte ptr [RBP + -0x2b],AL JBE 0x001c5fbc MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,byte ptr [RAX + -0x1] CMP EAX,0x20 SETZ AL MOV byte ptr [RBP + -0x2b],AL LAB_001c5fbc: MOV AL,byte ptr [RBP + -0x2b] TEST AL,0x1 JNZ 0x001c5fc5 JMP 0x001c5fd3 LAB_001c5fc5: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x001c5f9c LAB_001c5fd3: MOV RAX,qword ptr [RBP + -0x18] POP RBP RET
ulong skip_trailing_space(ulong param_1,ulong param_2) { ulong uVar1; ulong uVar2; bool bVar3; ulong local_20; local_20 = param_1 + param_2; if (0x14 < param_2) { uVar1 = local_20 & 0xfffffffffffffffc; uVar2 = param_1 + 3 & 0xfffffffffffffffc; if (param_1 < uVar1) { while( true ) { bVar3 = false; if (uVar1 < local_20) { bVar3 = *(char *)(local_20 - 1) == ' '; } if (!bVar3) break; local_20 = local_20 - 1; } if ((*(char *)(local_20 - 1) == ' ') && (uVar2 < uVar1)) { while( true ) { bVar3 = false; if (uVar2 < local_20) { bVar3 = *(int *)(local_20 - 4) == 0x20202020; } if (!bVar3) break; local_20 = local_20 - 4; } } } } while( true ) { bVar3 = false; if (param_1 < local_20) { bVar3 = *(char *)(local_20 - 1) == ' '; } if (!bVar3) break; local_20 = local_20 - 1; } return local_20; }
50,365
Rpl_filter::db_ok_with_wild_table(char const*)
eloqsql/sql/rpl_filter.cc
bool Rpl_filter::db_ok_with_wild_table(const char *db) { DBUG_ENTER("Rpl_filter::db_ok_with_wild_table"); char hash_key[SAFE_NAME_LEN+2]; char *end; int len; end= strmov(hash_key, db); *end++= '.'; len= (int)(end - hash_key); if (wild_do_table_inited && find_wild(&wild_do_table, hash_key, len)) { DBUG_PRINT("return",("1")); DBUG_RETURN(1); } if (wild_ignore_table_inited && find_wild(&wild_ignore_table, hash_key, len)) { DBUG_PRINT("return",("0")); DBUG_RETURN(0); } /* If no explicit rule found and there was a do list, do not replicate. If there was no do list, go ahead */ DBUG_PRINT("return",("db=%s,retval=%d", db, !wild_do_table_inited)); DBUG_RETURN(!wild_do_table_inited); }
O0
cpp
Rpl_filter::db_ok_with_wild_table(char const*): pushq %rbp movq %rsp, %rbp subq $0x120, %rsp # imm = 0x120 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0xf0(%rbp) movq %rsi, -0xf8(%rbp) movq -0xf0(%rbp), %rax movq %rax, -0x110(%rbp) leaq -0xe0(%rbp), %rdi movq -0xf8(%rbp), %rsi callq 0x777300 movq %rax, %rcx movq -0x110(%rbp), %rax movq %rcx, -0x100(%rbp) movq -0x100(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x100(%rbp) movb $0x2e, (%rcx) movq -0x100(%rbp), %rcx leaq -0xe0(%rbp), %rdx subq %rdx, %rcx movl %ecx, -0x104(%rbp) testb $0x1, 0x137(%rax) je 0x8e0028 movq -0x110(%rbp), %rdi movq %rdi, %rsi addq $0xe0, %rsi leaq -0xe0(%rbp), %rdx movl -0x104(%rbp), %ecx callq 0x8dfd60 cmpq $0x0, %rax je 0x8e0028 jmp 0x8e001b jmp 0x8e001d jmp 0x8e001f movb $0x1, -0xe1(%rbp) jmp 0x8e008d movq -0x110(%rbp), %rax testb $0x1, 0x138(%rax) je 0x8e0070 movq -0x110(%rbp), %rdi movq %rdi, %rsi addq $0x108, %rsi # imm = 0x108 leaq -0xe0(%rbp), %rdx movl -0x104(%rbp), %ecx callq 0x8dfd60 cmpq $0x0, %rax je 0x8e0070 jmp 0x8e0063 jmp 0x8e0065 jmp 0x8e0067 movb $0x0, -0xe1(%rbp) jmp 0x8e008d jmp 0x8e0072 jmp 0x8e0074 jmp 0x8e0076 movq -0x110(%rbp), %rax movb 0x137(%rax), %al xorb $-0x1, %al andb $0x1, %al movb %al, -0xe1(%rbp) movb -0xe1(%rbp), %al movb %al, -0x111(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x8e00bc movb -0x111(%rbp), %al andb $0x1, %al addq $0x120, %rsp # imm = 0x120 popq %rbp retq callq 0x7754c0 nopw %cs:(%rax,%rax)
_ZN10Rpl_filter21db_ok_with_wild_tableEPKc: push rbp mov rbp, rsp sub rsp, 120h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_F0], rdi mov [rbp+var_F8], rsi mov rax, [rbp+var_F0] mov [rbp+var_110], rax lea rdi, [rbp+var_E0] mov rsi, [rbp+var_F8] call _stpcpy mov rcx, rax mov rax, [rbp+var_110] mov [rbp+var_100], rcx mov rcx, [rbp+var_100] mov rdx, rcx add rdx, 1 mov [rbp+var_100], rdx mov byte ptr [rcx], 2Eh ; '.' mov rcx, [rbp+var_100] lea rdx, [rbp+var_E0] sub rcx, rdx mov [rbp+var_104], ecx test byte ptr [rax+137h], 1 jz short loc_8E0028 mov rdi, [rbp+var_110] mov rsi, rdi add rsi, 0E0h lea rdx, [rbp+var_E0] mov ecx, [rbp+var_104] call _ZN10Rpl_filter9find_wildEP16st_dynamic_arrayPKci; Rpl_filter::find_wild(st_dynamic_array *,char const*,int) cmp rax, 0 jz short loc_8E0028 jmp short $+2 loc_8E001B: jmp short $+2 loc_8E001D: jmp short $+2 loc_8E001F: mov [rbp+var_E1], 1 jmp short loc_8E008D loc_8E0028: mov rax, [rbp+var_110] test byte ptr [rax+138h], 1 jz short loc_8E0070 mov rdi, [rbp+var_110] mov rsi, rdi add rsi, 108h lea rdx, [rbp+var_E0] mov ecx, [rbp+var_104] call _ZN10Rpl_filter9find_wildEP16st_dynamic_arrayPKci; Rpl_filter::find_wild(st_dynamic_array *,char const*,int) cmp rax, 0 jz short loc_8E0070 jmp short $+2 loc_8E0063: jmp short $+2 loc_8E0065: jmp short $+2 loc_8E0067: mov [rbp+var_E1], 0 jmp short loc_8E008D loc_8E0070: jmp short $+2 loc_8E0072: jmp short $+2 loc_8E0074: jmp short $+2 loc_8E0076: mov rax, [rbp+var_110] mov al, [rax+137h] xor al, 0FFh and al, 1 mov [rbp+var_E1], al loc_8E008D: mov al, [rbp+var_E1] mov [rbp+var_111], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_8E00BC mov al, [rbp+var_111] and al, 1 add rsp, 120h pop rbp retn loc_8E00BC: call ___stack_chk_fail
bool Rpl_filter::db_ok_with_wild_table(Rpl_filter *this, const char *a2) { _BYTE *v2; // rax int v4; // [rsp+1Ch] [rbp-104h] char v6[216]; // [rsp+40h] [rbp-E0h] BYREF unsigned long long v7; // [rsp+118h] [rbp-8h] v7 = __readfsqword(0x28u); v2 = (_BYTE *)stpcpy(v6, a2); *v2 = 46; v4 = v2 + 1 - v6; return (*((_BYTE *)this + 311) & 1) != 0 && Rpl_filter::find_wild((long long)this, (long long)this + 224, v6, v4) || ((*((_BYTE *)this + 312) & 1) == 0 || !Rpl_filter::find_wild((long long)this, (long long)this + 264, v6, v4)) && (*((_BYTE *)this + 311) & 1) == 0; }
__cxx_global_var_init.7: PUSH RBP MOV RBP,RSP LEA RDI,[0x270fd9c] MOV ESI,0x2000000 CALL 0x008fd530 POP RBP RET
void __cxx_global_var_init_7(void) { date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_INVALID_DATES,0x2000000); return; }
50,366
my_uca_implicit_weight_put
eloqsql/strings/ctype-uca.c
static inline void my_uca_implicit_weight_put(uint16 *to, my_wc_t code, uint level) { switch (level) { case 1: to[0]= 0x0020; to[1]= 0; break; /* Secondary level */ case 2: to[0]= 0x0002; to[1]= 0; break; /* Tertiary level */ case 3: to[0]= 0x0001; to[1]= 0; break; /* Quaternary level */ default: DBUG_ASSERT(0); case 0: break; } /* Primary level */ to[0]= (uint16)(code >> 15) + my_uca_implicit_weight_base(code); to[1]= (code & 0x7FFF) | 0x8000; to[2]= 0; }
O0
c
my_uca_implicit_weight_put: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl -0x14(%rbp), %eax movq %rax, -0x20(%rbp) subq $0x3, %rax ja 0xaec53 movq -0x20(%rbp), %rax leaq 0xfc241(%rip), %rcx # 0x1aae4c movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x8(%rbp), %rax movw $0x20, (%rax) movq -0x8(%rbp), %rax movw $0x0, 0x2(%rax) jmp 0xaec5b movq -0x8(%rbp), %rax movw $0x2, (%rax) movq -0x8(%rbp), %rax movw $0x0, 0x2(%rax) jmp 0xaec5b movq -0x8(%rbp), %rax movw $0x1, (%rax) movq -0x8(%rbp), %rax movw $0x0, 0x2(%rax) jmp 0xaec5b jmp 0xaec55 jmp 0xaec57 jmp 0xaec59 jmp 0xaec5b movq -0x10(%rbp), %rax shrq $0xf, %rax movzwl %ax, %eax movl %eax, -0x24(%rbp) movq -0x10(%rbp), %rdi callq 0xaecc0 movw %ax, %cx movl -0x24(%rbp), %eax movzwl %cx, %ecx addl %ecx, %eax movw %ax, %cx movq -0x8(%rbp), %rax movw %cx, (%rax) movq -0x10(%rbp), %rax andq $0x7fff, %rax # imm = 0x7FFF orq $0x8000, %rax # imm = 0x8000 movw %ax, %cx movq -0x8(%rbp), %rax movw %cx, 0x2(%rax) movq -0x8(%rbp), %rax movw $0x0, 0x4(%rax) addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_uca_implicit_weight_put: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov eax, [rbp+var_14] mov [rbp+var_20], rax sub rax, 3; switch 4 cases ja short def_AEC12; jumptable 00000000000AEC12 default case mov rax, [rbp+var_20] lea rcx, jpt_AEC12 movsxd rax, ds:(jpt_AEC12 - 1AAE4Ch)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_AEC14: mov rax, [rbp+var_8]; jumptable 00000000000AEC12 case 1 mov word ptr [rax], 20h ; ' ' mov rax, [rbp+var_8] mov word ptr [rax+2], 0 jmp short loc_AEC5B loc_AEC29: mov rax, [rbp+var_8]; jumptable 00000000000AEC12 case 2 mov word ptr [rax], 2 mov rax, [rbp+var_8] mov word ptr [rax+2], 0 jmp short loc_AEC5B loc_AEC3E: mov rax, [rbp+var_8]; jumptable 00000000000AEC12 case 3 mov word ptr [rax], 1 mov rax, [rbp+var_8] mov word ptr [rax+2], 0 jmp short loc_AEC5B def_AEC12: jmp short $+2; jumptable 00000000000AEC12 default case loc_AEC55: jmp short $+2 loc_AEC57: jmp short $+2; jumptable 00000000000AEC12 case 0 loc_AEC59: jmp short $+2; jumptable 00000000000AEC12 case 0 loc_AEC5B: mov rax, [rbp+var_10] shr rax, 0Fh movzx eax, ax mov [rbp+var_24], eax mov rdi, [rbp+var_10] call my_uca_implicit_weight_base mov cx, ax mov eax, [rbp+var_24] movzx ecx, cx add eax, ecx mov cx, ax mov rax, [rbp+var_8] mov [rax], cx mov rax, [rbp+var_10] and rax, 7FFFh or rax, 8000h mov cx, ax mov rax, [rbp+var_8] mov [rax+2], cx mov rax, [rbp+var_8] mov word ptr [rax+4], 0 add rsp, 30h pop rbp retn
_WORD * my_uca_implicit_weight_put(_WORD *a1, unsigned long long a2, int a3) { _WORD *result; // rax switch ( a3 ) { case 1: *a1 = 32; a1[1] = 0; break; case 2: *a1 = 2; a1[1] = 0; break; case 3: *a1 = 1; a1[1] = 0; break; default: break; } *a1 = my_uca_implicit_weight_base(a2) + (a2 >> 15); a1[1] = a2 & 0x7FFF | 0x8000; result = a1; a1[2] = 0; return result; }
my_uca_implicit_weight_put: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV EAX,dword ptr [RBP + -0x14] MOV qword ptr [RBP + -0x20],RAX SUB RAX,0x3 JA 0x001aec53 MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x2aae4c] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX],0x20 MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX + 0x2],0x0 JMP 0x001aec5b caseD_2: MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX],0x2 MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX + 0x2],0x0 JMP 0x001aec5b caseD_3: MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX + 0x2],0x0 JMP 0x001aec5b LAB_001aec53: JMP 0x001aec55 LAB_001aec55: JMP 0x001aec57 LAB_001aec57: JMP 0x001aec59 caseD_0: JMP 0x001aec5b LAB_001aec5b: MOV RAX,qword ptr [RBP + -0x10] SHR RAX,0xf MOVZX EAX,AX MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x001aecc0 MOV CX,AX MOV EAX,dword ptr [RBP + -0x24] MOVZX ECX,CX ADD EAX,ECX MOV CX,AX MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX],CX MOV RAX,qword ptr [RBP + -0x10] AND RAX,0x7fff OR RAX,0x8000 MOV CX,AX MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX + 0x2],CX MOV RAX,qword ptr [RBP + -0x8] MOV word ptr [RAX + 0x4],0x0 ADD RSP,0x30 POP RBP RET
void my_uca_implicit_weight_put(short *param_1,ulong param_2,int4 param_3) { short sVar1; switch(param_3) { default: break; case 1: *param_1 = 0x20; param_1[1] = 0; break; case 2: *param_1 = 2; param_1[1] = 0; break; case 3: *param_1 = 1; param_1[1] = 0; } sVar1 = my_uca_implicit_weight_base(param_2); *param_1 = (short)(param_2 >> 0xf) + sVar1; param_1[1] = (ushort)param_2 & 0x7fff | 0x8000; param_1[2] = 0; return; }
50,367
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
monkey531[P]llama/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const char * value_hint, const std::string & help, void (*handler)(common_params & params, const std::string &) ) : args(args), value_hint(value_hint), help(help), handler_string(handler) {}
O3
c
common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r8, %r14 movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %rbp movq %rdi, %rbx leaq 0x4(%rsp), %rsi movl $0x0, (%rsi) leaq 0x3(%rsp), %rcx leaq 0x2(%rsp), %r8 movl $0x1, %edx callq 0x5a1cc leaq 0x38(%rbx), %rax xorl %ecx, %ecx movq %rcx, 0x40(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) movq %rcx, 0x58(%rbx) leaq 0x60(%rbx), %r13 movq (%rbp), %rsi movq 0x8(%rbp), %rdx leaq 0x1(%rsp), %rcx movq %r13, %rdi callq 0x5a24e movq %r12, 0x78(%rbx) leaq 0x90(%rbx), %rdi leaq 0xa0(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x80(%rbx) movq %rax, 0x90(%rbx) movq (%r15), %rsi movq 0x8(%r15), %rdx addq %rsi, %rdx callq 0x24328 movb $0x0, 0xb0(%rbx) movq $0x0, 0xb8(%rbx) movq %r14, 0xc0(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xc8(%rbx) addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 movq (%r13), %rdi testq %rdi, %rdi je 0x56cec movq 0x70(%rbx), %rsi subq %rdi, %rsi callq 0x1b8e0 jmp 0x56cec movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x5a294 movq %rbx, %rdi callq 0x5a294 movq %r14, %rdi callq 0x1c030 nop
_ZN10common_argC2ERKSt16initializer_listIPKcES2_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsSD_E: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r8 mov r15, rcx mov r12, rdx mov rbp, rsi mov rbx, rdi lea rsi, [rsp+38h+var_34] mov dword ptr [rsi], 0 lea rcx, [rsp+38h+var_35] lea r8, [rsp+38h+var_36] mov edx, 1 call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xor ecx, ecx mov [rbx+40h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 mov [rbx+48h], rax mov [rbx+50h], rax mov [rbx+58h], rcx lea r13, [rbx+60h] mov rsi, [rbp+0] mov rdx, [rbp+8] lea rcx, [rsp+38h+var_37] mov rdi, r13 call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) mov [rbx+78h], r12 lea rdi, [rbx+90h] lea rax, [rbx+0A0h] xorps xmm0, xmm0 movups xmmword ptr [rbx+80h], xmm0 mov [rbx+90h], rax mov rsi, [r15] mov rdx, [r15+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) mov byte ptr [rbx+0B0h], 0 mov qword ptr [rbx+0B8h], 0 mov [rbx+0C0h], r14 xorps xmm0, xmm0 movups xmmword ptr [rbx+0C8h], xmm0 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax mov rdi, [r13+0]; void * test rdi, rdi jz short loc_56CEC mov rsi, [rbx+70h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_56CEC mov r14, rax loc_56CEC: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4, long long a5) { int v5; // eax long long result; // rax int v10; // [rsp+0h] [rbp-38h] BYREF _DWORD v11[13]; // [rsp+4h] [rbp-34h] BYREF v10 = v5; v11[0] = 0; std::set<llama_example>::set(a1, v11, 1LL, (char *)&v10 + 3, (char *)&v10 + 2); *(_QWORD *)(a1 + 64) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], (char *)&v10 + 1); *(_QWORD *)(a1 + 120) = a3; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 160; result = std::string::_M_construct<char *>(a1 + 144, *(_BYTE **)a4, *(_QWORD *)a4 + *(_QWORD *)(a4 + 8)); *(_BYTE *)(a1 + 176) = 0; *(_QWORD *)(a1 + 184) = 0LL; *(_QWORD *)(a1 + 192) = a5; *(_OWORD *)(a1 + 200) = 0LL; return result; }
common_arg: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R8 MOV R15,RCX MOV R12,RDX MOV RBP,RSI MOV RBX,RDI LEA RSI,[RSP + 0x4] MOV dword ptr [RSI],0x0 LEA RCX,[RSP + 0x3] LEA R8,[RSP + 0x2] MOV EDX,0x1 CALL 0x0015a1cc LEA RAX,[RBX + 0x38] XOR ECX,ECX MOV qword ptr [RBX + 0x40],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX MOV qword ptr [RBX + 0x58],RCX LEA R13,[RBX + 0x60] MOV RSI,qword ptr [RBP] MOV RDX,qword ptr [RBP + 0x8] LAB_00156c5e: LEA RCX,[RSP + 0x1] MOV RDI,R13 CALL 0x0015a24e MOV qword ptr [RBX + 0x78],R12 LEA RDI,[RBX + 0x90] LEA RAX,[RBX + 0xa0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x80],XMM0 MOV qword ptr [RBX + 0x90],RAX MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] ADD RDX,RSI LAB_00156c98: CALL 0x00124328 LAB_00156c9d: MOV byte ptr [RBX + 0xb0],0x0 MOV qword ptr [RBX + 0xb8],0x0 MOV qword ptr [RBX + 0xc0],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xc8],XMM0 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, char const*, std::__cxx11::string const&, void (*)(common_params&, std::__cxx11::string const&)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,char *param_2,string *param_3, _func_void_common_params_ptr_string_ptr *param_4) { int4 in_EAX; int8 in_R9; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&stack0xffffffffffffffcc,1,&stack0xffffffffffffffcb,&stack0xffffffffffffffca,in_R9 ,in_EAX); *(int8 *)(this + 0x40) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 00156c5e to 00156c6a has its CatchHandler @ 00156ce9 */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&stack0xffffffffffffffc9); *(char **)(this + 0x78) = param_2; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(common_arg **)(this + 0x90) = this + 0xa0; /* try { // try from 00156c98 to 00156c9c has its CatchHandler @ 00156ccf */ std::__cxx11::string::_M_construct<char*> (this + 0x90,*(long *)param_3,*(long *)(param_3 + 8) + *(long *)param_3); this[0xb0] = (common_arg)0x0; *(int8 *)(this + 0xb8) = 0; *(_func_void_common_params_ptr_string_ptr **)(this + 0xc0) = param_4; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; return; }
50,368
int fmt::v11::detail::get_dynamic_spec<fmt::v11::context>(fmt::v11::arg_id_kind, fmt::v11::detail::arg_ref<fmt::v11::context::char_type> const&, fmt::v11::context&)
zkingston[P]unknot/build_O1/_deps/fmt-src/include/fmt/format.h
FMT_CONSTEXPR int get_dynamic_spec( arg_id_kind kind, const arg_ref<typename Context::char_type>& ref, Context& ctx) { FMT_ASSERT(kind != arg_id_kind::none, ""); auto arg = kind == arg_id_kind::index ? ctx.arg(ref.index) : ctx.arg(ref.name); if (!arg) report_error("argument not found"); unsigned long long value = arg.visit(dynamic_spec_getter()); if (value > to_unsigned(max_value<int>())) report_error("width/precision is out of range"); return static_cast<int>(value); }
O1
c
int fmt::v11::detail::get_dynamic_spec<fmt::v11::context>(fmt::v11::arg_id_kind, fmt::v11::detail::arg_ref<fmt::v11::context::char_type> const&, fmt::v11::context&): subq $0x28, %rsp cmpl $0x1, %edi jne 0x46f1d movl (%rsi), %eax addq $0x8, %rdx movq %rsp, %rdi movq %rdx, %rsi movl %eax, %edx callq 0x3eb3a jmp 0x46f36 movq (%rsi), %rax movq 0x8(%rsi), %rcx addq $0x8, %rdx movq %rsp, %rdi movq %rdx, %rsi movq %rax, %rdx callq 0x46fc2 movl 0x10(%rsp), %eax cmpq $0xf, %rax ja 0x46f9e leaq 0x24c929(%rip), %rcx # 0x293870 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq (%rsp), %rax jmp 0x46f90 movl (%rsp), %eax jmp 0x46f90 movl (%rsp), %eax testl %eax, %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmovnsl %eax, %ecx movslq %ecx, %rax jmp 0x46f90 cmpq $0x0, 0x8(%rsp) movq $-0x1, %rax jns 0x46f50 jmp 0x46f90 movq (%rsp), %rcx testq %rcx, %rcx movq $-0x1, %rax cmovnsq %rcx, %rax movq %rax, %rcx shrq $0x1f, %rcx jne 0x46faa addq $0x28, %rsp retq leaq 0x24cb2d(%rip), %rdi # 0x293ad2 callq 0x3d5e8 leaq 0x24cb01(%rip), %rdi # 0x293ab2 callq 0x3d5e8 leaq 0x24c994(%rip), %rdi # 0x293951 callq 0x3d5e8
_ZN3fmt3v116detail16get_dynamic_specINS0_7contextEEEiNS0_11arg_id_kindERKNS1_7arg_refINT_9char_typeEEERS6_: sub rsp, 28h cmp edi, 1 jnz short loc_46F1D mov eax, [rsi] add rdx, 8 mov rdi, rsp mov rsi, rdx mov edx, eax call _ZNK3fmt3v1117basic_format_argsINS0_7contextEE3getEi; fmt::v11::basic_format_args<fmt::v11::context>::get(int) jmp short loc_46F36 loc_46F1D: mov rax, [rsi] mov rcx, [rsi+8] add rdx, 8 mov rdi, rsp mov rsi, rdx; char * mov rdx, rax call _ZNK3fmt3v1117basic_format_argsINS0_7contextEE3getIcEENS0_16basic_format_argIS2_EENS0_17basic_string_viewIT_EE; fmt::v11::basic_format_args<fmt::v11::context>::get<char>(fmt::v11::basic_string_view<char>) loc_46F36: mov eax, [rsp+28h+var_18] cmp rax, 0Fh; switch 16 cases ja short def_46F4E; jumptable 0000000000046F4E default case, cases 7-15 lea rcx, jpt_46F4E movsxd rax, ds:(jpt_46F4E - 293870h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_46F50: mov rax, [rsp+28h+var_28]; jumptable 0000000000046F4E cases 4,6 jmp short loc_46F90 loc_46F56: mov eax, dword ptr [rsp+28h+var_28]; jumptable 0000000000046F4E case 2 jmp short loc_46F90 loc_46F5B: mov eax, dword ptr [rsp+28h+var_28]; jumptable 0000000000046F4E case 1 test eax, eax mov ecx, 0FFFFFFFFh cmovns ecx, eax movsxd rax, ecx jmp short loc_46F90 loc_46F6D: cmp [rsp+28h+var_20], 0; jumptable 0000000000046F4E case 5 mov rax, 0FFFFFFFFFFFFFFFFh jns short loc_46F50; jumptable 0000000000046F4E cases 4,6 jmp short loc_46F90 loc_46F7E: mov rcx, [rsp+28h+var_28]; jumptable 0000000000046F4E case 3 test rcx, rcx mov rax, 0FFFFFFFFFFFFFFFFh cmovns rax, rcx loc_46F90: mov rcx, rax shr rcx, 1Fh jnz short loc_46FAA add rsp, 28h retn def_46F4E: lea rdi, aWidthPrecision; jumptable 0000000000046F4E default case, cases 7-15 call _ZN3fmt3v1112report_errorEPKc; fmt::v11::report_error(char const*) loc_46FAA: lea rdi, aWidthPrecision_0; "width/precision is out of range" call _ZN3fmt3v1112report_errorEPKc; fmt::v11::report_error(char const*) loc_46FB6: lea rdi, aArgumentNotFou; jumptable 0000000000046F4E case 0 call _ZN3fmt3v1112report_errorEPKc; fmt::v11::report_error(char const*)
unsigned long long fmt::v11::detail::get_dynamic_spec<fmt::v11::context>(int a1, long long *a2, long long a3) { int v3; // eax const char *v4; // rsi long long v5; // rax long long v6; // rcx unsigned long long result; // rax int v8; // ecx _QWORD v9[2]; // [rsp+0h] [rbp-28h] BYREF int v10; // [rsp+10h] [rbp-18h] if ( a1 == 1 ) { v3 = *(_DWORD *)a2; v4 = (const char *)(a3 + 8); fmt::v11::basic_format_args<fmt::v11::context>::get((long long)v9, (unsigned long long *)(a3 + 8), v3); } else { v5 = *a2; v6 = a2[1]; v4 = (const char *)(a3 + 8); fmt::v11::basic_format_args<fmt::v11::context>::get<char>(v9, a3 + 8, v5, v6); } switch ( v10 ) { case 0: fmt::v11::report_error((fmt::v11 *)"argument not found", v4); case 1: v8 = -1; if ( SLODWORD(v9[0]) >= 0 ) v8 = v9[0]; result = v8; goto LABEL_14; case 2: result = LODWORD(v9[0]); goto LABEL_14; case 3: result = -1LL; if ( v9[0] >= 0LL ) result = v9[0]; goto LABEL_14; case 4: case 6: goto LABEL_5; case 5: result = -1LL; if ( v9[1] < 0LL ) goto LABEL_14; LABEL_5: result = v9[0]; LABEL_14: if ( result >> 31 ) fmt::v11::report_error((fmt::v11 *)"width/precision is out of range", v4); return result; default: fmt::v11::report_error((fmt::v11 *)"width/precision is not integer", v4); } }
get_dynamic_spec<fmt::v11::context>: SUB RSP,0x28 CMP EDI,0x1 JNZ 0x00146f1d MOV EAX,dword ptr [RSI] ADD RDX,0x8 MOV RDI,RSP MOV RSI,RDX MOV EDX,EAX CALL 0x0013eb3a JMP 0x00146f36 LAB_00146f1d: MOV RAX,qword ptr [RSI] MOV RCX,qword ptr [RSI + 0x8] ADD RDX,0x8 MOV RDI,RSP MOV RSI,RDX MOV RDX,RAX CALL 0x00146fc2 LAB_00146f36: MOV EAX,dword ptr [RSP + 0x10] CMP RAX,0xf JA 0x00146f9e LEA RCX,[0x393870] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_4: MOV RAX,qword ptr [RSP] JMP 0x00146f90 caseD_2: MOV EAX,dword ptr [RSP] JMP 0x00146f90 caseD_1: MOV EAX,dword ptr [RSP] TEST EAX,EAX MOV ECX,0xffffffff CMOVNS ECX,EAX MOVSXD RAX,ECX JMP 0x00146f90 caseD_5: CMP qword ptr [RSP + 0x8],0x0 MOV RAX,-0x1 JNS 0x00146f50 JMP 0x00146f90 caseD_3: MOV RCX,qword ptr [RSP] TEST RCX,RCX MOV RAX,-0x1 CMOVNS RAX,RCX LAB_00146f90: MOV RCX,RAX SHR RCX,0x1f JNZ 0x00146faa ADD RSP,0x28 RET caseD_7: LEA RDI,[0x393ad2] CALL 0x0013d5e8 LAB_00146faa: LEA RDI,[0x393ab2] CALL 0x0013d5e8 caseD_0: LEA RDI,[0x393951] CALL 0x0013d5e8
/* int fmt::v11::detail::get_dynamic_spec<fmt::v11::context>(fmt::v11::arg_id_kind, fmt::v11::detail::arg_ref<fmt::v11::context::char_type> const&, fmt::v11::context&) */ int fmt::v11::detail::get_dynamic_spec<fmt::v11::context> (int param_1,int8 *param_2,long param_3) { ulong uVar1; uint uVar2; uint local_28; int iStack_24; long local_20; int4 local_18; if (param_1 == 1) { basic_format_args<fmt::v11::context>::get((int)&local_28); } else { basic_format_args<fmt::v11::context>::get<char>(&local_28,param_3 + 8,*param_2,param_2[1]); } switch(local_18) { case 0: /* WARNING: Subroutine does not return */ report_error("argument not found"); case 1: uVar2 = 0xffffffff; if (-1 < (int)local_28) { uVar2 = local_28; } uVar1 = (ulong)(int)uVar2; break; case 2: uVar1 = (ulong)local_28; break; case 3: uVar1 = 0xffffffffffffffff; if (-1 < iStack_24) { uVar1 = CONCAT44(iStack_24,local_28); } break; case 5: uVar1 = 0xffffffffffffffff; if (local_20 < 0) break; case 4: case 6: uVar1 = CONCAT44(iStack_24,local_28); break; default: /* WARNING: Subroutine does not return */ report_error("width/precision is not integer"); } if (uVar1 >> 0x1f == 0) { return (int)uVar1; } /* WARNING: Subroutine does not return */ report_error("width/precision is out of range"); }
50,369
ma_real_read
eloqsql/libmariadb/libmariadb/ma_net.c
static ulong ma_real_read(NET *net, size_t *complen) { uchar *pos; ssize_t length; uint i; ulong len=packet_error; size_t remain= (net->compress ? NET_HEADER_SIZE+COMP_HEADER_SIZE : NET_HEADER_SIZE); *complen = 0; net->reading_or_writing=1; pos = net->buff + net->where_b; /* net->packet -4 */ for (i=0 ; i < 2 ; i++) { while (remain > 0) { /* First read is done with non blocking mode */ if ((length=ma_pvio_cache_read(net->pvio, pos,remain)) <= 0L) { len= packet_error; net->error=2; /* Close socket */ goto end; } remain -= (ulong) length; pos+= (ulong) length; } if (i == 0) { /* First parts is packet length */ ulong helping; net->pkt_nr= net->buff[net->where_b + 3]; net->compress_pkt_nr= ++net->pkt_nr; #ifdef HAVE_COMPRESS if (net->compress) { /* complen is > 0 if package is really compressed */ *complen=uint3korr(&(net->buff[net->where_b + NET_HEADER_SIZE])); } #endif len=uint3korr(net->buff+net->where_b); if (!len) goto end; helping = max(len,(ulong)*complen) + net->where_b; /* The necessary size of net->buff */ if (helping >= net->max_packet) { if (net_realloc(net, helping)) { len= packet_error; /* Return error */ goto end; } } pos=net->buff + net->where_b; remain = len; } } end: net->reading_or_writing=0; return(len); }
O0
c
ma_real_read: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movsbl 0x84(%rax), %edx movl $0x4, %eax movl $0x7, %ecx cmpl $0x0, %edx cmovnel %ecx, %eax cltq movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq $0x0, (%rax) movq -0x8(%rbp), %rax movb $0x1, 0x80(%rax) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx addq 0x48(%rcx), %rax movq %rax, -0x18(%rbp) movl $0x0, -0x24(%rbp) cmpl $0x2, -0x24(%rbp) jae 0x46971 jmp 0x46797 cmpq $0x0, -0x38(%rbp) jbe 0x467f2 movq -0x8(%rbp), %rax movq (%rax), %rdi movq -0x18(%rbp), %rsi movq -0x38(%rbp), %rdx callq 0x23540 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jg 0x467d5 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x30(%rbp) movq -0x8(%rbp), %rax movb $0x2, 0x94(%rax) jmp 0x46973 movq -0x20(%rbp), %rcx movq -0x38(%rbp), %rax subq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x20(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x18(%rbp) jmp 0x46797 cmpl $0x0, -0x24(%rbp) jne 0x46961 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx movq 0x48(%rcx), %rcx movzbl 0x3(%rax,%rcx), %ecx movq -0x8(%rbp), %rax movl %ecx, 0x60(%rax) movq -0x8(%rbp), %rax movl 0x60(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x60(%rax) movq -0x8(%rbp), %rax movl %ecx, 0x64(%rax) movq -0x8(%rbp), %rax cmpb $0x0, 0x84(%rax) je 0x4688d movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx movq 0x48(%rcx), %rcx movzbl 0x4(%rax,%rcx), %eax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x8(%rbp), %rdx movq 0x48(%rdx), %rdx movzbl 0x5(%rcx,%rdx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x8(%rbp), %rdx movq 0x48(%rdx), %rdx movzbl 0x6(%rcx,%rdx), %ecx shll $0x10, %ecx addl %ecx, %eax movl %eax, %eax movl %eax, %ecx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx movq 0x48(%rcx), %rcx movzbl (%rax,%rcx), %eax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x8(%rbp), %rdx movq 0x48(%rdx), %rdx movzbl 0x1(%rcx,%rdx), %ecx shll $0x8, %ecx addl %ecx, %eax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rcx movq -0x8(%rbp), %rdx movq 0x48(%rdx), %rdx movzbl 0x2(%rcx,%rdx), %ecx shll $0x10, %ecx addl %ecx, %eax movl %eax, %eax movq %rax, -0x30(%rbp) cmpq $0x0, -0x30(%rbp) jne 0x468e7 jmp 0x46973 movq -0x30(%rbp), %rax movq -0x10(%rbp), %rcx cmpq (%rcx), %rax jbe 0x468fe movq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) jmp 0x46909 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq -0x8(%rbp), %rcx addq 0x48(%rcx), %rax movq %rax, -0x40(%rbp) movq -0x40(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x50(%rcx), %rax jb 0x46945 movq -0x8(%rbp), %rdi movq -0x40(%rbp), %rsi callq 0x46a10 cmpb $0x0, %al je 0x46943 movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x30(%rbp) jmp 0x46973 jmp 0x46945 movq -0x8(%rbp), %rax movq 0x8(%rax), %rax movq -0x8(%rbp), %rcx addq 0x48(%rcx), %rax movq %rax, -0x18(%rbp) movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x46963 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x4678b jmp 0x46973 movq -0x8(%rbp), %rax movb $0x0, 0x80(%rax) movq -0x30(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
ma_real_read: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov eax, 0FFFFFFFFh mov [rbp+var_30], rax mov rax, [rbp+var_8] movsx edx, byte ptr [rax+84h] mov eax, 4 mov ecx, 7 cmp edx, 0 cmovnz eax, ecx cdqe mov [rbp+var_38], rax mov rax, [rbp+var_10] mov qword ptr [rax], 0 mov rax, [rbp+var_8] mov byte ptr [rax+80h], 1 mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] add rax, [rcx+48h] mov [rbp+var_18], rax mov [rbp+var_24], 0 loc_4678B: cmp [rbp+var_24], 2 jnb loc_46971 jmp short $+2 loc_46797: cmp [rbp+var_38], 0 jbe short loc_467F2 mov rax, [rbp+var_8] mov rdi, [rax] mov rsi, [rbp+var_18] mov rdx, [rbp+var_38] call ma_pvio_cache_read mov [rbp+var_20], rax cmp rax, 0 jg short loc_467D5 mov eax, 0FFFFFFFFh mov [rbp+var_30], rax mov rax, [rbp+var_8] mov byte ptr [rax+94h], 2 jmp loc_46973 loc_467D5: mov rcx, [rbp+var_20] mov rax, [rbp+var_38] sub rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_20] add rax, [rbp+var_18] mov [rbp+var_18], rax jmp short loc_46797 loc_467F2: cmp [rbp+var_24], 0 jnz loc_46961 mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] mov rcx, [rcx+48h] movzx ecx, byte ptr [rax+rcx+3] mov rax, [rbp+var_8] mov [rax+60h], ecx mov rax, [rbp+var_8] mov ecx, [rax+60h] add ecx, 1 mov [rax+60h], ecx mov rax, [rbp+var_8] mov [rax+64h], ecx mov rax, [rbp+var_8] cmp byte ptr [rax+84h], 0 jz short loc_4688D mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] mov rcx, [rcx+48h] movzx eax, byte ptr [rax+rcx+4] mov rcx, [rbp+var_8] mov rcx, [rcx+8] mov rdx, [rbp+var_8] mov rdx, [rdx+48h] movzx ecx, byte ptr [rcx+rdx+5] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_8] mov rcx, [rcx+8] mov rdx, [rbp+var_8] mov rdx, [rdx+48h] movzx ecx, byte ptr [rcx+rdx+6] shl ecx, 10h add eax, ecx mov eax, eax mov ecx, eax mov rax, [rbp+var_10] mov [rax], rcx loc_4688D: mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] mov rcx, [rcx+48h] movzx eax, byte ptr [rax+rcx] mov rcx, [rbp+var_8] mov rcx, [rcx+8] mov rdx, [rbp+var_8] mov rdx, [rdx+48h] movzx ecx, byte ptr [rcx+rdx+1] shl ecx, 8 add eax, ecx mov rcx, [rbp+var_8] mov rcx, [rcx+8] mov rdx, [rbp+var_8] mov rdx, [rdx+48h] movzx ecx, byte ptr [rcx+rdx+2] shl ecx, 10h add eax, ecx mov eax, eax mov [rbp+var_30], rax cmp [rbp+var_30], 0 jnz short loc_468E7 jmp loc_46973 loc_468E7: mov rax, [rbp+var_30] mov rcx, [rbp+var_10] cmp rax, [rcx] jbe short loc_468FE mov rax, [rbp+var_30] mov [rbp+var_48], rax jmp short loc_46909 loc_468FE: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_48], rax loc_46909: mov rax, [rbp+var_48] mov rcx, [rbp+var_8] add rax, [rcx+48h] mov [rbp+var_40], rax mov rax, [rbp+var_40] mov rcx, [rbp+var_8] cmp rax, [rcx+50h] jb short loc_46945 mov rdi, [rbp+var_8] mov rsi, [rbp+var_40] call net_realloc cmp al, 0 jz short loc_46943 mov eax, 0FFFFFFFFh mov [rbp+var_30], rax jmp short loc_46973 loc_46943: jmp short $+2 loc_46945: mov rax, [rbp+var_8] mov rax, [rax+8] mov rcx, [rbp+var_8] add rax, [rcx+48h] mov [rbp+var_18], rax mov rax, [rbp+var_30] mov [rbp+var_38], rax loc_46961: jmp short $+2 loc_46963: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp loc_4678B loc_46971: jmp short $+2 loc_46973: mov rax, [rbp+var_8] mov byte ptr [rax+80h], 0 mov rax, [rbp+var_30] add rsp, 50h pop rbp retn
unsigned long long ma_real_read(long long a1, unsigned long long *a2) { int v2; // eax int v3; // ecx long long v4; // rdx unsigned long long v6; // [rsp+8h] [rbp-48h] unsigned long long v7; // [rsp+10h] [rbp-40h] unsigned long long v8; // [rsp+18h] [rbp-38h] unsigned long long v9; // [rsp+20h] [rbp-30h] unsigned int i; // [rsp+2Ch] [rbp-24h] long long v11; // [rsp+30h] [rbp-20h] long long v12; // [rsp+38h] [rbp-18h] v9 = 0xFFFFFFFFLL; v2 = 4; if ( *(_BYTE *)(a1 + 132) ) v2 = 7; v8 = v2; *a2 = 0LL; *(_BYTE *)(a1 + 128) = 1; v12 = *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8); for ( i = 0; i < 2; ++i ) { while ( v8 ) { v11 = ma_pvio_cache_read(*(_QWORD **)a1, v12, v8); if ( v11 <= 0 ) { v9 = 0xFFFFFFFFLL; *(_BYTE *)(a1 + 148) = 2; goto LABEL_21; } v8 -= v11; v12 += v11; } if ( !i ) { *(_DWORD *)(a1 + 96) = *(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 3LL); v3 = *(_DWORD *)(a1 + 96) + 1; *(_DWORD *)(a1 + 96) = v3; *(_DWORD *)(a1 + 100) = v3; if ( *(_BYTE *)(a1 + 132) ) *a2 = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 6LL) << 16) + (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 5LL) << 8) + (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 4LL); v4 = *(_QWORD *)(a1 + 72); v9 = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 2) << 16) + (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 1) << 8) + (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4); if ( !((*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 2) << 16) + (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 1) << 8) + *(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4)) ) break; if ( v9 <= *a2 ) v6 = *a2; else v6 = (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + v4 + 2) << 16) + (*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72) + 1LL) << 8) + (unsigned int)*(unsigned __int8 *)(*(_QWORD *)(a1 + 8) + *(_QWORD *)(a1 + 72)); v7 = *(_QWORD *)(a1 + 72) + v6; if ( v7 >= *(_QWORD *)(a1 + 80) && (unsigned __int8)net_realloc(a1, v7) ) { v9 = 0xFFFFFFFFLL; break; } v12 = *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8); v8 = v9; } } LABEL_21: *(_BYTE *)(a1 + 128) = 0; return v9; }
ma_real_read: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV EAX,0xffffffff MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOVSX EDX,byte ptr [RAX + 0x84] MOV EAX,0x4 MOV ECX,0x7 CMP EDX,0x0 CMOVNZ EAX,ECX CDQE MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x80],0x1 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x48] MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x24],0x0 LAB_0014678b: CMP dword ptr [RBP + -0x24],0x2 JNC 0x00146971 JMP 0x00146797 LAB_00146797: CMP qword ptr [RBP + -0x38],0x0 JBE 0x001467f2 MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x38] CALL 0x00123540 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JG 0x001467d5 MOV EAX,0xffffffff MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x94],0x2 JMP 0x00146973 LAB_001467d5: MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x38] SUB RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x18],RAX JMP 0x00146797 LAB_001467f2: CMP dword ptr [RBP + -0x24],0x0 JNZ 0x00146961 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x48] MOVZX ECX,byte ptr [RAX + RCX*0x1 + 0x3] MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x60],ECX MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x60] ADD ECX,0x1 MOV dword ptr [RAX + 0x60],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x64],ECX MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x84],0x0 JZ 0x0014688d MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x48] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x4] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x48] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x5] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x48] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x6] SHL ECX,0x10 ADD EAX,ECX MOV EAX,EAX MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX LAB_0014688d: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x48] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x48] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x1] SHL ECX,0x8 ADD EAX,ECX MOV RCX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RDX + 0x48] MOVZX ECX,byte ptr [RCX + RDX*0x1 + 0x2] SHL ECX,0x10 ADD EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x30],RAX CMP qword ptr [RBP + -0x30],0x0 JNZ 0x001468e7 JMP 0x00146973 LAB_001468e7: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX] JBE 0x001468fe MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX JMP 0x00146909 LAB_001468fe: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x48],RAX LAB_00146909: MOV RAX,qword ptr [RBP + -0x48] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x48] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x50] JC 0x00146945 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x40] CALL 0x00146a10 CMP AL,0x0 JZ 0x00146943 MOV EAX,0xffffffff MOV qword ptr [RBP + -0x30],RAX JMP 0x00146973 LAB_00146943: JMP 0x00146945 LAB_00146945: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RCX + 0x48] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX LAB_00146961: JMP 0x00146963 LAB_00146963: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0014678b LAB_00146971: JMP 0x00146973 LAB_00146973: MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX + 0x80],0x0 MOV RAX,qword ptr [RBP + -0x30] ADD RSP,0x50 POP RBP RET
ulong ma_real_read(int8 *param_1,ulong *param_2) { char cVar1; int iVar2; long lVar3; ulong local_50; ulong local_40; ulong local_38; uint local_2c; long local_20; local_38 = 0xffffffff; iVar2 = 4; if (*(char *)((long)param_1 + 0x84) != '\0') { iVar2 = 7; } local_40 = (ulong)iVar2; *param_2 = 0; *(int1 *)(param_1 + 0x10) = 1; local_20 = param_1[1] + param_1[9]; local_2c = 0; do { if (1 < local_2c) { LAB_00146973: *(int1 *)(param_1 + 0x10) = 0; return local_38; } for (; local_40 != 0; local_40 = local_40 - lVar3) { lVar3 = ma_pvio_cache_read(*param_1,local_20,local_40); if (lVar3 < 1) { local_38 = 0xffffffff; *(int1 *)((long)param_1 + 0x94) = 2; goto LAB_00146973; } local_20 = lVar3 + local_20; } if (local_2c == 0) { *(uint *)(param_1 + 0xc) = (uint)*(byte *)(param_1[1] + 3 + param_1[9]); iVar2 = *(int *)(param_1 + 0xc); *(int *)(param_1 + 0xc) = iVar2 + 1; *(int *)((long)param_1 + 100) = iVar2 + 1; if (*(char *)((long)param_1 + 0x84) != '\0') { *param_2 = (ulong)((uint)*(byte *)(param_1[1] + 4 + param_1[9]) + (uint)*(byte *)(param_1[1] + 5 + param_1[9]) * 0x100 + (uint)*(byte *)(param_1[1] + 6 + param_1[9]) * 0x10000); } local_40 = (ulong)((uint)*(byte *)(param_1[1] + param_1[9]) + (uint)*(byte *)(param_1[1] + 1 + param_1[9]) * 0x100 + (uint)*(byte *)(param_1[1] + 2 + param_1[9]) * 0x10000); local_38 = local_40; if (local_40 == 0) goto LAB_00146973; local_50 = local_40; if (local_40 <= *param_2) { local_50 = *param_2; } if (((ulong)param_1[10] <= local_50 + param_1[9]) && (cVar1 = net_realloc(param_1,local_50 + param_1[9]), cVar1 != '\0')) { local_38 = 0xffffffff; goto LAB_00146973; } local_20 = param_1[1] + param_1[9]; } local_2c = local_2c + 1; } while( true ); }
50,370
u32toa_pair
bluesky950520[P]quickjs/tests/test_conv.c
size_t u32toa_pair(char buf[minimum_length(11)], uint32_t n) { #ifdef USE_SINGLE_CASE if (n < 10) { buf[0] = (char)('0' + n); buf[1] = '\0'; return 1; } #endif char *p = buf; char *q = buf + 10; while (n >= 100) { uint32_t quo = n % 100; n /= 100; *--q = digits100[2 * quo + 1]; *--q = digits100[2 * quo]; } *p = digits100[2 * n]; p += *p != '0'; *p++ = digits100[2 * n + 1]; while (q < buf + 10) { *p++ = *q++; *p++ = *q++; } *p = '\0'; return p - buf; }
O0
c
u32toa_pair: movq %rdi, -0x8(%rsp) movl %esi, -0xc(%rsp) movq -0x8(%rsp), %rax movq %rax, -0x18(%rsp) movq -0x8(%rsp), %rax addq $0xa, %rax movq %rax, -0x20(%rsp) cmpl $0x64, -0xc(%rsp) jb 0x274f movl -0xc(%rsp), %eax movl $0x64, %ecx xorl %edx, %edx divl %ecx movl %edx, -0x24(%rsp) movl -0xc(%rsp), %eax movl $0x64, %ecx xorl %edx, %edx divl %ecx movl %eax, -0xc(%rsp) movl -0x24(%rsp), %eax shll %eax addl $0x1, %eax movl %eax, %eax movl %eax, %ecx leaq 0xa942(%rip), %rax # 0xd050 movb (%rax,%rcx), %cl movq -0x20(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x20(%rsp) movb %cl, -0x1(%rax) movl -0x24(%rsp), %eax shll %eax movl %eax, %eax movl %eax, %ecx leaq 0xa91a(%rip), %rax # 0xd050 movb (%rax,%rcx), %cl movq -0x20(%rsp), %rax movq %rax, %rdx addq $-0x1, %rdx movq %rdx, -0x20(%rsp) movb %cl, -0x1(%rax) jmp 0x26d1 movl -0xc(%rsp), %eax shll %eax movl %eax, %eax movl %eax, %ecx leaq 0xa8f0(%rip), %rax # 0xd050 movb (%rax,%rcx), %cl movq -0x18(%rsp), %rax movb %cl, (%rax) movq -0x18(%rsp), %rax movzbl (%rax), %eax cmpl $0x30, %eax setne %al andb $0x1, %al movzbl %al, %ecx movq -0x18(%rsp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x18(%rsp) movl -0xc(%rsp), %eax shll %eax addl $0x1, %eax movl %eax, %eax movl %eax, %ecx leaq 0xa8af(%rip), %rax # 0xd050 movb (%rax,%rcx), %cl movq -0x18(%rsp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x18(%rsp) movb %cl, (%rax) movq -0x20(%rsp), %rax movq -0x8(%rsp), %rcx addq $0xa, %rcx cmpq %rcx, %rax jae 0x2818 movq -0x20(%rsp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rsp) movb (%rax), %cl movq -0x18(%rsp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x18(%rsp) movb %cl, (%rax) movq -0x20(%rsp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x20(%rsp) movb (%rax), %cl movq -0x18(%rsp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x18(%rsp) movb %cl, (%rax) jmp 0x27b7 movq -0x18(%rsp), %rax movb $0x0, (%rax) movq -0x18(%rsp), %rax movq -0x8(%rsp), %rcx subq %rcx, %rax retq nop
u32toa_pair: mov [rsp+var_8], rdi mov [rsp+var_C], esi mov rax, [rsp+var_8] mov [rsp+var_18], rax mov rax, [rsp+var_8] add rax, 0Ah mov [rsp+var_20], rax loc_26D1: cmp [rsp+var_C], 64h ; 'd' jb short loc_274F mov eax, [rsp+var_C] mov ecx, 64h ; 'd' xor edx, edx div ecx mov [rsp+var_24], edx mov eax, [rsp+var_C] mov ecx, 64h ; 'd' xor edx, edx div ecx mov [rsp+var_C], eax mov eax, [rsp+var_24] shl eax, 1 add eax, 1 mov eax, eax mov ecx, eax lea rax, digits100 mov cl, [rax+rcx] mov rax, [rsp+var_20] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+var_20], rdx mov [rax-1], cl mov eax, [rsp+var_24] shl eax, 1 mov eax, eax mov ecx, eax lea rax, digits100 mov cl, [rax+rcx] mov rax, [rsp+var_20] mov rdx, rax add rdx, 0FFFFFFFFFFFFFFFFh mov [rsp+var_20], rdx mov [rax-1], cl jmp short loc_26D1 loc_274F: mov eax, [rsp+var_C] shl eax, 1 mov eax, eax mov ecx, eax lea rax, digits100 mov cl, [rax+rcx] mov rax, [rsp+var_18] mov [rax], cl mov rax, [rsp+var_18] movzx eax, byte ptr [rax] cmp eax, 30h ; '0' setnz al and al, 1 movzx ecx, al mov rax, [rsp+var_18] movsxd rcx, ecx add rax, rcx mov [rsp+var_18], rax mov eax, [rsp+var_C] shl eax, 1 add eax, 1 mov eax, eax mov ecx, eax lea rax, digits100 mov cl, [rax+rcx] mov rax, [rsp+var_18] mov rdx, rax add rdx, 1 mov [rsp+var_18], rdx mov [rax], cl loc_27B7: mov rax, [rsp+var_20] mov rcx, [rsp+var_8] add rcx, 0Ah cmp rax, rcx jnb short loc_2818 mov rax, [rsp+var_20] mov rcx, rax add rcx, 1 mov [rsp+var_20], rcx mov cl, [rax] mov rax, [rsp+var_18] mov rdx, rax add rdx, 1 mov [rsp+var_18], rdx mov [rax], cl mov rax, [rsp+var_20] mov rcx, rax add rcx, 1 mov [rsp+var_20], rcx mov cl, [rax] mov rax, [rsp+var_18] mov rdx, rax add rdx, 1 mov [rsp+var_18], rdx mov [rax], cl jmp short loc_27B7 loc_2818: mov rax, [rsp+var_18] mov byte ptr [rax], 0 mov rax, [rsp+var_18] mov rcx, [rsp+var_8] sub rax, rcx retn
long long u32toa_pair(_BYTE *a1, unsigned int a2) { _BYTE *v2; // rax char *v3; // rax char v4; // cl _BYTE *v5; // rax unsigned int v7; // [rsp+0h] [rbp-24h] _BYTE *v8; // [rsp+4h] [rbp-20h] _BYTE *v9; // [rsp+Ch] [rbp-18h] v8 = a1 + 10; while ( a2 >= 0x64 ) { v7 = a2 % 0x64; a2 /= 0x64u; *(v8 - 1) = digits100[2 * v7 + 1]; v8 -= 2; *v8 = digits100[2 * v7]; } *a1 = digits100[2 * a2]; v2 = &a1[*a1 != 48]; v9 = v2 + 1; *v2 = digits100[2 * a2 + 1]; while ( v8 < a1 + 10 ) { *v9 = *v8; v3 = v8 + 1; v8 += 2; v4 = *v3; v5 = v9 + 1; v9 += 2; *v5 = v4; } *v9 = 0; return v9 - a1; }
u32toa_pair: MOV qword ptr [RSP + -0x8],RDI MOV dword ptr [RSP + -0xc],ESI MOV RAX,qword ptr [RSP + -0x8] MOV qword ptr [RSP + -0x18],RAX MOV RAX,qword ptr [RSP + -0x8] ADD RAX,0xa MOV qword ptr [RSP + -0x20],RAX LAB_001026d1: CMP dword ptr [RSP + -0xc],0x64 JC 0x0010274f MOV EAX,dword ptr [RSP + -0xc] MOV ECX,0x64 XOR EDX,EDX DIV ECX MOV dword ptr [RSP + -0x24],EDX MOV EAX,dword ptr [RSP + -0xc] MOV ECX,0x64 XOR EDX,EDX DIV ECX MOV dword ptr [RSP + -0xc],EAX MOV EAX,dword ptr [RSP + -0x24] SHL EAX,0x1 ADD EAX,0x1 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x10d050] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RSP + -0x20] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RSP + -0x20],RDX MOV byte ptr [RAX + -0x1],CL MOV EAX,dword ptr [RSP + -0x24] SHL EAX,0x1 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x10d050] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RSP + -0x20] MOV RDX,RAX ADD RDX,-0x1 MOV qword ptr [RSP + -0x20],RDX MOV byte ptr [RAX + -0x1],CL JMP 0x001026d1 LAB_0010274f: MOV EAX,dword ptr [RSP + -0xc] SHL EAX,0x1 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x10d050] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX],CL MOV RAX,qword ptr [RSP + -0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0x30 SETNZ AL AND AL,0x1 MOVZX ECX,AL MOV RAX,qword ptr [RSP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RSP + -0x18],RAX MOV EAX,dword ptr [RSP + -0xc] SHL EAX,0x1 ADD EAX,0x1 MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x10d050] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RSP + -0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RSP + -0x18],RDX MOV byte ptr [RAX],CL LAB_001027b7: MOV RAX,qword ptr [RSP + -0x20] MOV RCX,qword ptr [RSP + -0x8] ADD RCX,0xa CMP RAX,RCX JNC 0x00102818 MOV RAX,qword ptr [RSP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RSP + -0x20],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RSP + -0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RSP + -0x18],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RSP + -0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RSP + -0x20],RCX MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RSP + -0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RSP + -0x18],RDX MOV byte ptr [RAX],CL JMP 0x001027b7 LAB_00102818: MOV RAX,qword ptr [RSP + -0x18] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RSP + -0x18] MOV RCX,qword ptr [RSP + -0x8] SUB RAX,RCX RET
long u32toa_pair(char *param_1,uint param_2) { char *pcVar1; uint uVar2; char *pcVar3; char *local_20; char *local_18; uint local_c; local_20 = param_1 + 10; local_c = param_2; while (99 < local_c) { uVar2 = local_c % 100; local_c = local_c / 100; local_20[-1] = digits100[uVar2 * 2 + 1]; local_20[-2] = digits100[uVar2 << 1]; local_20 = local_20 + -2; } *param_1 = digits100[local_c << 1]; local_18 = param_1 + (int)(uint)(*param_1 != '0') + 1; param_1[(int)(uint)(*param_1 != '0')] = digits100[local_c * 2 + 1]; while (local_20 < param_1 + 10) { pcVar1 = local_20 + 1; pcVar3 = local_18 + 1; *local_18 = *local_20; local_20 = local_20 + 2; local_18 = local_18 + 2; *pcVar3 = *pcVar1; } *local_18 = '\0'; return (long)local_18 - (long)param_1; }
50,371
u32toa_pair
bluesky950520[P]quickjs/tests/test_conv.c
size_t u32toa_pair(char buf[minimum_length(11)], uint32_t n) { #ifdef USE_SINGLE_CASE if (n < 10) { buf[0] = (char)('0' + n); buf[1] = '\0'; return 1; } #endif char *p = buf; char *q = buf + 10; while (n >= 100) { uint32_t quo = n % 100; n /= 100; *--q = digits100[2 * quo + 1]; *--q = digits100[2 * quo]; } *p = digits100[2 * n]; p += *p != '0'; *p++ = digits100[2 * n + 1]; while (q < buf + 10) { *p++ = *q++; *p++ = *q++; } *p = '\0'; return p - buf; }
O2
c
u32toa_pair: movl %esi, %eax pushq $0xa popq %rcx pushq $0x64 popq %r8 leaq 0x3cc5(%rip), %rsi # 0x6080 cmpl $0x64, %eax jb 0x23d4 xorl %edx, %edx divl %r8d movzwl (%rsi,%rdx,2), %edx movw %dx, -0x2(%rdi,%rcx) addq $-0x2, %rcx jmp 0x23bb movl %eax, %edx movb (%rsi,%rdx,2), %r8b addq %rdx, %rdx movb %r8b, (%rdi) xorl %eax, %eax cmpb $0x30, %r8b setne %al movl %edx, %edx movb 0x1(%rdx,%rsi), %dl movb %dl, (%rdi,%rax) incq %rax cmpq $0x9, %rcx jg 0x2413 movb (%rdi,%rcx), %dl movb %dl, (%rdi,%rax) movb 0x1(%rdi,%rcx), %dl addq $0x2, %rcx movb %dl, 0x1(%rdi,%rax) addq $0x2, %rax jmp 0x23f5 movb $0x0, (%rdi,%rax) retq
u32toa_pair: mov eax, esi push 0Ah pop rcx push 64h ; 'd' pop r8 lea rsi, digits100; "000102030405060708091011121314151617181"... loc_23BB: cmp eax, 64h ; 'd' jb short loc_23D4 xor edx, edx div r8d movzx edx, word ptr [rsi+rdx*2] mov [rdi+rcx-2], dx add rcx, 0FFFFFFFFFFFFFFFEh jmp short loc_23BB loc_23D4: mov edx, eax mov r8b, [rsi+rdx*2] add rdx, rdx mov [rdi], r8b xor eax, eax cmp r8b, 30h ; '0' setnz al mov edx, edx mov dl, [rdx+rsi+1] mov [rdi+rax], dl inc rax loc_23F5: cmp rcx, 9 jg short loc_2413 mov dl, [rdi+rcx] mov [rdi+rax], dl mov dl, [rdi+rcx+1] add rcx, 2 mov [rdi+rax+1], dl add rax, 2 jmp short loc_23F5 loc_2413: mov byte ptr [rdi+rax], 0 retn
long long u32toa_pair(char *a1, unsigned int a2) { long long v3; // rcx unsigned int v4; // edx char v5; // r8 int v6; // edx _BOOL8 v7; // rax long long result; // rax char v9; // dl v3 = 10LL; while ( a2 >= 0x64 ) { v4 = a2 % 0x64; a2 /= 0x64u; *(_WORD *)&a1[v3 - 2] = *(_WORD *)&digits100[2 * v4]; v3 -= 2LL; } v5 = digits100[2 * a2]; v6 = 2 * a2; *a1 = v5; v7 = v5 != 48; a1[v7] = digits100[v6 + 1]; result = v7 + 1; while ( v3 <= 9 ) { a1[result] = a1[v3]; v9 = a1[v3 + 1]; v3 += 2LL; a1[result + 1] = v9; result += 2LL; } a1[result] = 0; return result; }
u32toa_pair: MOV EAX,ESI PUSH 0xa POP RCX PUSH 0x64 POP R8 LEA RSI,[0x106080] LAB_001023bb: CMP EAX,0x64 JC 0x001023d4 XOR EDX,EDX DIV R8D MOVZX EDX,word ptr [RSI + RDX*0x2] MOV word ptr [RDI + RCX*0x1 + -0x2],DX ADD RCX,-0x2 JMP 0x001023bb LAB_001023d4: MOV EDX,EAX MOV R8B,byte ptr [RSI + RDX*0x2] ADD RDX,RDX MOV byte ptr [RDI],R8B XOR EAX,EAX CMP R8B,0x30 SETNZ AL MOV EDX,EDX MOV DL,byte ptr [RDX + RSI*0x1 + 0x1] MOV byte ptr [RDI + RAX*0x1],DL INC RAX LAB_001023f5: CMP RCX,0x9 JG 0x00102413 MOV DL,byte ptr [RDI + RCX*0x1] MOV byte ptr [RDI + RAX*0x1],DL MOV DL,byte ptr [RDI + RCX*0x1 + 0x1] ADD RCX,0x2 MOV byte ptr [RDI + RAX*0x1 + 0x1],DL ADD RAX,0x2 JMP 0x001023f5 LAB_00102413: MOV byte ptr [RDI + RAX*0x1],0x0 RET
void u32toa_pair(char *param_1,uint param_2) { char cVar1; ulong uVar2; long lVar3; long lVar4; lVar4 = 10; for (; 99 < param_2; param_2 = param_2 / 100) { *(int2 *)(param_1 + lVar4 + -2) = *(int2 *)(digits100 + ((ulong)param_2 % 100) * 2); lVar4 = lVar4 + -2; } cVar1 = digits100[(ulong)param_2 * 2]; *param_1 = cVar1; uVar2 = (ulong)(cVar1 != '0'); param_1[uVar2] = digits100[(ulong)(param_2 * 2) + 1]; lVar3 = uVar2 + 1; for (; lVar4 < 10; lVar4 = lVar4 + 2) { param_1[lVar3] = param_1[lVar4]; param_1[lVar3 + 1] = param_1[lVar4 + 1]; lVar3 = lVar3 + 2; } param_1[lVar3] = '\0'; return; }
50,372
ftxui::ScreenInteractive::RunOnceBlocking(std::shared_ptr<ftxui::ComponentBase>)
Andrewchistyakov[P]flashcards_lyc/build_O1/_deps/ftxui-src/src/ftxui/component/screen_interactive.cpp
void ScreenInteractive::RunOnceBlocking(Component component) { ExecuteSignalHandlers(); Task task; if (task_receiver_->Receive(&task)) { HandleTask(component, task); } RunOnce(component); }
O1
cpp
ftxui::ScreenInteractive::RunOnceBlocking(std::shared_ptr<ftxui::ComponentBase>): pushq %r14 pushq %rbx subq $0x68, %rsp movq %rsi, %r14 movq %rdi, %rbx callq 0x2f03a xorps %xmm0, %xmm0 leaq 0x50(%rsp), %rax movaps %xmm0, -0x30(%rax) movaps %xmm0, -0x20(%rax) movaps %xmm0, -0x10(%rax) movaps %xmm0, (%rax) movl $0x3, -0x24(%rax) movl $0x1, -0x20(%rax) movw $0x0, -0x1c(%rax) xorl %ecx, %ecx movb %cl, -0x1a(%rax) movq %rcx, -0x18(%rax) movq %rax, -0x10(%rax) movq %rcx, -0x8(%rax) movb %cl, (%rax) movb %cl, 0x10(%rax) movq 0x70(%rbx), %rdi leaq 0x20(%rsp), %rsi callq 0x31618 testb %al, %al je 0x2efb1 movq (%r14), %rax movq %rax, 0x10(%rsp) movq 0x8(%r14), %rax movq %rax, 0x18(%rsp) testq %rax, %rax je 0x2ef90 movq 0x2b02e(%rip), %rcx # 0x59fb0 cmpb $0x0, (%rcx) je 0x2ef8c incl 0x8(%rax) jmp 0x2ef90 lock incl 0x8(%rax) leaq 0x10(%rsp), %rsi leaq 0x20(%rsp), %rdx movq %rbx, %rdi callq 0x2f09c movq 0x18(%rsp), %rdi testq %rdi, %rdi je 0x2efb1 callq 0x14c7c movq (%r14), %rax movq %rax, (%rsp) movq 0x8(%r14), %rax movq %rax, 0x8(%rsp) testq %rax, %rax je 0x2efdb movq 0x2afe3(%rip), %rcx # 0x59fb0 cmpb $0x0, (%rcx) je 0x2efd7 incl 0x8(%rax) jmp 0x2efdb lock incl 0x8(%rax) movq %rsp, %rsi movq %rbx, %rdi callq 0x2f102 movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x2eff5 callq 0x14c7c leaq 0x20(%rsp), %rdi callq 0x14e26 addq $0x68, %rsp popq %rbx popq %r14 retq movq %rax, %rbx movq 0x18(%rsp), %rdi jmp 0x2f019 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x2f028 callq 0x14c7c jmp 0x2f028 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x14e26 movq %rbx, %rdi callq 0xb780
_ZN5ftxui17ScreenInteractive15RunOnceBlockingESt10shared_ptrINS_13ComponentBaseEE: push r14 push rbx sub rsp, 68h mov r14, rsi mov rbx, rdi call _ZN5ftxui12_GLOBAL__N_121ExecuteSignalHandlersEv; ftxui::`anonymous namespace'::ExecuteSignalHandlers(void) xorps xmm0, xmm0 lea rax, [rsp+78h+var_28] movaps xmmword ptr [rax-30h], xmm0 movaps xmmword ptr [rax-20h], xmm0 movaps xmmword ptr [rax-10h], xmm0 movaps xmmword ptr [rax], xmm0 mov dword ptr [rax-24h], 3 mov dword ptr [rax-20h], 1 mov word ptr [rax-1Ch], 0 xor ecx, ecx mov [rax-1Ah], cl mov [rax-18h], rcx mov [rax-10h], rax mov [rax-8], rcx mov [rax], cl mov [rax+10h], cl mov rdi, [rbx+70h] lea rsi, [rsp+78h+var_58] call _ZN5ftxui12ReceiverImplISt7variantIJNS_5EventESt8functionIFvvEENS_13AnimationTaskEEEE7ReceiveEPS7_; ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>::Receive(std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>*) test al, al jz short loc_2EFB1 mov rax, [r14] mov qword ptr [rsp+78h+var_68], rax; int mov rax, [r14+8] mov qword ptr [rsp+78h+var_60], rax; char test rax, rax jz short loc_2EF90 mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_2EF8C inc dword ptr [rax+8] jmp short loc_2EF90 loc_2EF8C: lock inc dword ptr [rax+8] loc_2EF90: lea rsi, [rsp+78h+var_68] lea rdx, [rsp+78h+var_58] mov rdi, rbx call _ZN5ftxui17ScreenInteractive10HandleTaskESt10shared_ptrINS_13ComponentBaseEERSt7variantIJNS_5EventESt8functionIFvvEENS_13AnimationTaskEEE; ftxui::ScreenInteractive::HandleTask(std::shared_ptr<ftxui::ComponentBase>,std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask> &) mov rdi, qword ptr [rsp+78h+var_60] test rdi, rdi jz short loc_2EFB1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2EFB1: mov rax, [r14] mov [rsp+78h+var_78], rax; __int64 mov rax, [r14+8] mov qword ptr [rsp+78h+var_70], rax; int test rax, rax jz short loc_2EFDB mov rcx, cs:__libc_single_threaded_ptr cmp byte ptr [rcx], 0 jz short loc_2EFD7 inc dword ptr [rax+8] jmp short loc_2EFDB loc_2EFD7: lock inc dword ptr [rax+8] loc_2EFDB: mov rsi, rsp mov rdi, rbx; this call _ZN5ftxui17ScreenInteractive7RunOnceESt10shared_ptrINS_13ComponentBaseEE; ftxui::ScreenInteractive::RunOnce(std::shared_ptr<ftxui::ComponentBase>) mov rdi, qword ptr [rsp+78h+var_70] test rdi, rdi jz short loc_2EFF5 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_2EFF5: lea rdi, [rsp+78h+var_58] call _ZNSt8__detail9__variant16_Variant_storageILb0EJN5ftxui5EventESt8functionIFvvEENS2_13AnimationTaskEEED2Ev; std::__detail::__variant::_Variant_storage<false,ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>::~_Variant_storage() add rsp, 68h pop rbx pop r14 retn mov rbx, rax mov rdi, [rsp+arg_10] jmp short loc_2F019 mov rbx, rax mov rdi, [rsp+arg_0] loc_2F019: test rdi, rdi jz short loc_2F028 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) jmp short loc_2F028 mov rbx, rax loc_2F028: lea rdi, [rsp+arg_18] call _ZNSt8__detail9__variant16_Variant_storageILb0EJN5ftxui5EventESt8functionIFvvEENS2_13AnimationTaskEEED2Ev; std::__detail::__variant::_Variant_storage<false,ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>::~_Variant_storage() mov rdi, rbx call __Unwind_Resume
long long ftxui::ScreenInteractive::RunOnceBlocking(ftxui::Screen *this, long long *a2) { long long v2; // rax long long v3; // rax long long v5; // [rsp+0h] [rbp-78h] volatile signed __int32 *v6; // [rsp+8h] [rbp-70h] int v7[2]; // [rsp+10h] [rbp-68h] BYREF char v8[8]; // [rsp+18h] [rbp-60h] __int128 v9; // [rsp+20h] [rbp-58h] BYREF int v10; // [rsp+30h] [rbp-48h] __int16 v11; // [rsp+34h] [rbp-44h] char v12; // [rsp+36h] [rbp-42h] char v13; // [rsp+37h] [rbp-41h] long long v14; // [rsp+38h] [rbp-40h] __int128 *v15; // [rsp+40h] [rbp-38h] long long v16; // [rsp+48h] [rbp-30h] __int128 v17; // [rsp+50h] [rbp-28h] BYREF char v18; // [rsp+60h] [rbp-18h] ftxui::`anonymous namespace'::ExecuteSignalHandlers(this); v9 = 0LL; v13 = 0; v17 = 0LL; HIDWORD(v9) = 3; v10 = 1; v11 = 0; v12 = 0; v14 = 0LL; v15 = &v17; v16 = 0LL; LOBYTE(v17) = 0; v18 = 0; if ( (unsigned __int8)ftxui::ReceiverImpl<std::variant<ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>>::Receive( *((_QWORD *)this + 14), &v9) ) { *(_QWORD *)v7 = *a2; v2 = a2[1]; *(_QWORD *)v8 = v2; if ( v2 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v2 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v2 + 8)); } ftxui::ScreenInteractive::HandleTask((_DWORD)this, (unsigned int)v7, (unsigned int)&v9); if ( *(_QWORD *)v8 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*(volatile signed __int32 **)v8); } v5 = *a2; v3 = a2[1]; if ( v3 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v3 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v3 + 8)); } ftxui::ScreenInteractive::RunOnce(this, v5, v3, v7[0], v8[0]); if ( v6 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v6); return std::__detail::__variant::_Variant_storage<false,ftxui::Event,std::function<void ()(void)>,ftxui::AnimationTask>::~_Variant_storage((long long)&v9); }
RunOnceBlocking: PUSH R14 PUSH RBX SUB RSP,0x68 MOV R14,RSI MOV RBX,RDI CALL 0x0012f03a XORPS XMM0,XMM0 LEA RAX,[RSP + 0x50] MOVAPS xmmword ptr [RAX + -0x30],XMM0 MOVAPS xmmword ptr [RAX + -0x20],XMM0 MOVAPS xmmword ptr [RAX + -0x10],XMM0 MOVAPS xmmword ptr [RAX],XMM0 MOV dword ptr [RAX + -0x24],0x3 MOV dword ptr [RAX + -0x20],0x1 MOV word ptr [RAX + -0x1c],0x0 XOR ECX,ECX MOV byte ptr [RAX + -0x1a],CL MOV qword ptr [RAX + -0x18],RCX MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],RCX MOV byte ptr [RAX],CL MOV byte ptr [RAX + 0x10],CL MOV RDI,qword ptr [RBX + 0x70] LAB_0012ef57: LEA RSI,[RSP + 0x20] CALL 0x00131618 TEST AL,AL JZ 0x0012efb1 MOV RAX,qword ptr [R14] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x18],RAX TEST RAX,RAX JZ 0x0012ef90 MOV RCX,qword ptr [0x00159fb0] CMP byte ptr [RCX],0x0 JZ 0x0012ef8c INC dword ptr [RAX + 0x8] JMP 0x0012ef90 LAB_0012ef8c: INC.LOCK dword ptr [RAX + 0x8] LAB_0012ef90: LEA RSI,[RSP + 0x10] LEA RDX,[RSP + 0x20] MOV RDI,RBX CALL 0x0012f09c MOV RDI,qword ptr [RSP + 0x18] TEST RDI,RDI JZ 0x0012efb1 CALL 0x00114c7c LAB_0012efb1: MOV RAX,qword ptr [R14] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RSP + 0x8],RAX TEST RAX,RAX JZ 0x0012efdb MOV RCX,qword ptr [0x00159fb0] CMP byte ptr [RCX],0x0 JZ 0x0012efd7 INC dword ptr [RAX + 0x8] JMP 0x0012efdb LAB_0012efd7: INC.LOCK dword ptr [RAX + 0x8] LAB_0012efdb: MOV RSI,RSP MOV RDI,RBX CALL 0x0012f102 LAB_0012efe6: MOV RDI,qword ptr [RSP + 0x8] TEST RDI,RDI JZ 0x0012eff5 CALL 0x00114c7c LAB_0012eff5: LEA RDI,[RSP + 0x20] CALL 0x00114e26 ADD RSP,0x68 POP RBX POP R14 RET
/* ftxui::ScreenInteractive::RunOnceBlocking(std::shared_ptr<ftxui::ComponentBase>) */ void __thiscall ftxui::ScreenInteractive::RunOnceBlocking(ScreenInteractive *this,int8 *param_2) { char cVar1; int8 local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_70; int8 local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_60; int8 local_58; int8 uStack_50; int8 local_48; int8 uStack_40; int8 *local_38; int8 uStack_30; int8 local_28; int8 uStack_20; int1 local_18; (anonymous_namespace)::ExecuteSignalHandlers(); local_38 = &local_28; local_58 = 0; uStack_20 = 0; uStack_50 = 0x300000000; local_48 = 1; uStack_40 = 0; uStack_30 = 0; local_28 = 0; local_18 = 0; /* try { // try from 0012ef57 to 0012ef60 has its CatchHandler @ 0012f025 */ cVar1 = ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>>:: Receive(*(ReceiverImpl<std::variant<ftxui::Event,std::function<void()>,ftxui::AnimationTask>> **)(this + 0x70),(variant *)&local_58); if (cVar1 != '\0') { local_68 = *param_2; local_60 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1]; if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_00159fb0 == '\0') { LOCK(); *(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1; UNLOCK(); } else { *(int *)(local_60 + 8) = *(int *)(local_60 + 8) + 1; } } /* try { // try from 0012ef90 to 0012efa1 has its CatchHandler @ 0012f007 */ HandleTask(this,&local_68,&local_58); if (local_60 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_60); } } local_78 = *param_2; local_70 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)param_2[1]; if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { if (*PTR___libc_single_threaded_00159fb0 == '\0') { LOCK(); *(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1; UNLOCK(); } else { *(int *)(local_70 + 8) = *(int *)(local_70 + 8) + 1; } } /* try { // try from 0012efdb to 0012efe5 has its CatchHandler @ 0012f011 */ RunOnce(this,&local_78); if (local_70 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_70); } std::__detail::__variant:: _Variant_storage<false,ftxui::Event,std::function<void()>,ftxui::AnimationTask>::~_Variant_storage ((_Variant_storage<false,ftxui::Event,std::function<void()>,ftxui::AnimationTask> *) &local_58); return; }
50,373
testing::internal::UnitTestImpl::PostFlagParsingInit()
seiftnesse[P]memoryallocator/build_O3/_deps/googletest-src/googletest/src/gtest.cc
void UnitTestImpl::PostFlagParsingInit() { // Ensures that this function does not execute more than once. if (!post_flag_parse_init_performed_) { post_flag_parse_init_performed_ = true; #if defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_) // Register to send notifications about key process state changes. listeners()->Append(new GTEST_CUSTOM_TEST_EVENT_LISTENER_()); #endif // defined(GTEST_CUSTOM_TEST_EVENT_LISTENER_) #if GTEST_HAS_DEATH_TEST InitDeathTestSubprocessControlInfo(); SuppressTestEventsIfInSubprocess(); #endif // GTEST_HAS_DEATH_TEST // Registers parameterized tests. This makes parameterized tests // available to the UnitTest reflection API without running // RUN_ALL_TESTS. RegisterParameterizedTests(); // Configures listeners for XML output. This makes it possible for users // to shut down the default XML output before invoking RUN_ALL_TESTS. ConfigureXmlOutput(); if (GTEST_FLAG_GET(brief)) { listeners()->SetDefaultResultPrinter(new BriefUnitTestResultPrinter); } #if GTEST_CAN_STREAM_RESULTS_ // Configures listeners for streaming test results to the specified server. ConfigureStreamingOutput(); #endif // GTEST_CAN_STREAM_RESULTS_ #if GTEST_HAS_ABSL if (GTEST_FLAG_GET(install_failure_signal_handler)) { absl::FailureSignalHandlerOptions options; absl::InstallFailureSignalHandler(options); } #endif // GTEST_HAS_ABSL } }
O3
cpp
testing::internal::UnitTestImpl::PostFlagParsingInit(): cmpb $0x0, 0x218(%rdi) je 0x31bb6 retq pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx movb $0x1, 0x218(%rdi) leaq 0x238(%rdi), %r14 callq 0x182ed movq %r14, %rdi movq %rax, %rsi callq 0x3c37c cmpq $0x0, 0x238(%rbx) je 0x31bf0 movq 0x1f8(%rbx), %rax movb $0x0, 0x8(%rax) movq %rbx, %rdi callq 0x2504a movq %rbx, %rdi callq 0x317ea cmpb $0x1, 0x412c299(%rip) # 0x415dea0 jne 0x31c2f leaq 0x1f8(%rbx), %r14 movl $0x8, %edi callq 0x9490 leaq 0x27807(%rip), %rcx # 0x59428 movq %rcx, (%rax) movq %r14, %rdi movq %rax, %rsi callq 0x30726 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x319d4
_ZN7testing8internal12UnitTestImpl19PostFlagParsingInitEv: cmp byte ptr [rdi+218h], 0 jz short loc_31BB6 retn loc_31BB6: push r14 push rbx push rax mov rbx, rdi mov byte ptr [rdi+218h], 1 lea r14, [rdi+238h] call _ZN7testing8internal29ParseInternalRunDeathTestFlagEv; testing::internal::ParseInternalRunDeathTestFlag(void) mov rdi, r14 mov rsi, rax call _ZNSt15__uniq_ptr_implIN7testing8internal24InternalRunDeathTestFlagESt14default_deleteIS2_EE5resetEPS2_; std::__uniq_ptr_impl<testing::internal::InternalRunDeathTestFlag,std::default_delete<testing::internal::InternalRunDeathTestFlag>>::reset(testing::internal::InternalRunDeathTestFlag*) cmp qword ptr [rbx+238h], 0 jz short loc_31BF0 mov rax, [rbx+1F8h] mov byte ptr [rax+8], 0 loc_31BF0: mov rdi, rbx; this call _ZN7testing8internal12UnitTestImpl26RegisterParameterizedTestsEv; testing::internal::UnitTestImpl::RegisterParameterizedTests(void) mov rdi, rbx; this call _ZN7testing8internal12UnitTestImpl18ConfigureXmlOutputEv; testing::internal::UnitTestImpl::ConfigureXmlOutput(void) cmp cs:_ZN7testing17FLAGS_gtest_briefE, 1; testing::FLAGS_gtest_brief jnz short loc_31C2F lea r14, [rbx+1F8h] mov edi, 8; unsigned __int64 call __Znwm; operator new(ulong) lea rcx, off_59428 mov [rax], rcx mov rdi, r14; this mov rsi, rax; testing::TestEventListener * call _ZN7testing18TestEventListeners23SetDefaultResultPrinterEPNS_17TestEventListenerE; testing::TestEventListeners::SetDefaultResultPrinter(testing::TestEventListener *) loc_31C2F: mov rdi, rbx; this add rsp, 8 pop rbx pop r14 jmp _ZN7testing8internal12UnitTestImpl24ConfigureStreamingOutputEv; testing::internal::UnitTestImpl::ConfigureStreamingOutput(void)
void testing::internal::UnitTestImpl::PostFlagParsingInit(testing::internal::UnitTestImpl *this) { long long v1; // rax testing::TestEventListener *v2; // rax if ( !*((_BYTE *)this + 536) ) { *((_BYTE *)this + 536) = 1; v1 = testing::internal::ParseInternalRunDeathTestFlag(this); std::__uniq_ptr_impl<testing::internal::InternalRunDeathTestFlag,std::default_delete<testing::internal::InternalRunDeathTestFlag>>::reset( (char *)this + 568, v1); if ( *((_QWORD *)this + 71) ) *(_BYTE *)(*((_QWORD *)this + 63) + 8LL) = 0; testing::internal::UnitTestImpl::RegisterParameterizedTests(this); testing::internal::UnitTestImpl::ConfigureXmlOutput(this); if ( testing::FLAGS_gtest_brief == 1 ) { v2 = (testing::TestEventListener *)operator new(8uLL); *(_QWORD *)v2 = off_59428; testing::TestEventListeners::SetDefaultResultPrinter((testing::internal::UnitTestImpl *)((char *)this + 504), v2); } testing::internal::UnitTestImpl::ConfigureStreamingOutput((testing::internal::TestEventRepeater **)this); } }
PostFlagParsingInit: CMP byte ptr [RDI + 0x218],0x0 JZ 0x00131bb6 RET LAB_00131bb6: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI MOV byte ptr [RDI + 0x218],0x1 LEA R14,[RDI + 0x238] CALL 0x001182ed MOV RDI,R14 MOV RSI,RAX CALL 0x0013c37c CMP qword ptr [RBX + 0x238],0x0 JZ 0x00131bf0 MOV RAX,qword ptr [RBX + 0x1f8] MOV byte ptr [RAX + 0x8],0x0 LAB_00131bf0: MOV RDI,RBX CALL 0x0012504a MOV RDI,RBX CALL 0x001317ea CMP byte ptr [0x0425dea0],0x1 JNZ 0x00131c2f LEA R14,[RBX + 0x1f8] MOV EDI,0x8 CALL 0x00109490 LEA RCX,[0x159428] MOV qword ptr [RAX],RCX MOV RDI,R14 MOV RSI,RAX CALL 0x00130726 LAB_00131c2f: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x001319d4
/* testing::internal::UnitTestImpl::PostFlagParsingInit() */ void __thiscall testing::internal::UnitTestImpl::PostFlagParsingInit(UnitTestImpl *this) { InternalRunDeathTestFlag *pIVar1; TestEventListener *pTVar2; if (this[0x218] != (UnitTestImpl)0x0) { return; } this[0x218] = (UnitTestImpl)0x1; pIVar1 = (InternalRunDeathTestFlag *)ParseInternalRunDeathTestFlag(); std:: __uniq_ptr_impl<testing::internal::InternalRunDeathTestFlag,std::default_delete<testing::internal::InternalRunDeathTestFlag>> ::reset((__uniq_ptr_impl<testing::internal::InternalRunDeathTestFlag,std::default_delete<testing::internal::InternalRunDeathTestFlag>> *)(this + 0x238),pIVar1); if (*(long *)(this + 0x238) != 0) { *(int1 *)(*(long *)(this + 0x1f8) + 8) = 0; } RegisterParameterizedTests(this); ConfigureXmlOutput(this); if (FLAGS_gtest_brief == '\x01') { pTVar2 = (TestEventListener *)operator_new(8); *(int ***)pTVar2 = &PTR__TestEventListener_00159428; TestEventListeners::SetDefaultResultPrinter((TestEventListeners *)(this + 0x1f8),pTVar2); } ConfigureStreamingOutput(this); return; }
50,374
add_arg
bluesky950520[P]quickjs/quickjs.c
static int add_arg(JSContext *ctx, JSFunctionDef *fd, JSAtom name) { JSVarDef *vd; /* the local variable indexes are currently stored on 16 bits */ if (fd->arg_count >= JS_MAX_LOCAL_VARS) { // XXX: add_arg() should take JSParseState *s and use js_parse_error JS_ThrowSyntaxError(ctx, "too many parameters in function definition (only %d allowed)", JS_MAX_LOCAL_VARS - 1); return -1; } if (js_resize_array(ctx, (void **)&fd->args, sizeof(fd->args[0]), &fd->arg_size, fd->arg_count + 1)) return -1; vd = &fd->args[fd->arg_count++]; memset(vd, 0, sizeof(*vd)); vd->var_name = JS_DupAtom(ctx, name); vd->func_pool_idx = -1; return fd->arg_count - 1; }
O0
c
add_arg: subq $0x38, %rsp movq %rdi, 0x28(%rsp) movq %rsi, 0x20(%rsp) movl %edx, 0x1c(%rsp) movq 0x20(%rsp), %rax cmpl $0xffff, 0xb4(%rax) # imm = 0xFFFF jl 0xab331 movq 0x28(%rsp), %rdi leaq 0x6a9b2(%rip), %rsi # 0x115cc1 movl $0xfffe, %edx # imm = 0xFFFE movb $0x0, %al callq 0x33500 movq %rax, (%rsp) movq %rdx, 0x8(%rsp) movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF jmp 0xab3fc movq 0x28(%rsp), %rdi movq 0x20(%rsp), %rsi addq $0xa8, %rsi movq 0x20(%rsp), %rcx addq $0xb0, %rcx movq 0x20(%rsp), %rax movl 0xb4(%rax), %r8d addl $0x1, %r8d movl $0x10, %edx callq 0x79430 cmpl $0x0, %eax je 0xab37a movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF jmp 0xab3fc movq 0x20(%rsp), %rax movq 0xa8(%rax), %rax movq 0x20(%rsp), %rdx movl 0xb4(%rdx), %ecx movl %ecx, %esi addl $0x1, %esi movl %esi, 0xb4(%rdx) movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rdi xorl %esi, %esi movl $0x10, %edx callq 0xe370 movq 0x28(%rsp), %rdi movl 0x1c(%rsp), %esi callq 0x2e290 movl %eax, %ecx movq 0x10(%rsp), %rax movl %ecx, (%rax) movq 0x10(%rsp), %rax movl 0xc(%rax), %ecx andl $0xff, %ecx orl $0xffffff00, %ecx # imm = 0xFFFFFF00 movl %ecx, 0xc(%rax) movq 0x20(%rsp), %rax movl 0xb4(%rax), %eax subl $0x1, %eax movl %eax, 0x34(%rsp) movl 0x34(%rsp), %eax addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
add_arg: sub rsp, 38h mov [rsp+38h+var_10], rdi mov [rsp+38h+var_18], rsi mov [rsp+38h+var_1C], edx mov rax, [rsp+38h+var_18] cmp dword ptr [rax+0B4h], 0FFFFh jl short loc_AB331 mov rdi, [rsp+38h+var_10] lea rsi, aTooManyParamet; "too many parameters in function definit"... mov edx, 0FFFEh mov al, 0 call JS_ThrowSyntaxError mov [rsp+38h+var_38], rax mov [rsp+38h+var_30], rdx mov [rsp+38h+var_4], 0FFFFFFFFh jmp loc_AB3FC loc_AB331: mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_18] add rsi, 0A8h mov rcx, [rsp+38h+var_18] add rcx, 0B0h mov rax, [rsp+38h+var_18] mov r8d, [rax+0B4h] add r8d, 1 mov edx, 10h call js_resize_array cmp eax, 0 jz short loc_AB37A mov [rsp+38h+var_4], 0FFFFFFFFh jmp loc_AB3FC loc_AB37A: mov rax, [rsp+38h+var_18] mov rax, [rax+0A8h] mov rdx, [rsp+38h+var_18] mov ecx, [rdx+0B4h] mov esi, ecx add esi, 1 mov [rdx+0B4h], esi movsxd rcx, ecx shl rcx, 4 add rax, rcx mov [rsp+38h+var_28], rax mov rdi, [rsp+38h+var_28] xor esi, esi mov edx, 10h call _memset mov rdi, [rsp+38h+var_10] mov esi, [rsp+38h+var_1C] call JS_DupAtom mov ecx, eax mov rax, [rsp+38h+var_28] mov [rax], ecx mov rax, [rsp+38h+var_28] mov ecx, [rax+0Ch] and ecx, 0FFh or ecx, 0FFFFFF00h mov [rax+0Ch], ecx mov rax, [rsp+38h+var_18] mov eax, [rax+0B4h] sub eax, 1 mov [rsp+38h+var_4], eax loc_AB3FC: mov eax, [rsp+38h+var_4] add rsp, 38h retn
long long add_arg( long long a1, long long a2, unsigned int a3, long long a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v14; // rax int v15; // ecx char v17; // [rsp+0h] [rbp-38h] _DWORD *v18; // [rsp+10h] [rbp-28h] if ( *(int *)(a2 + 180) < 0xFFFF ) { if ( (unsigned int)js_resize_array(a1, a2 + 168, 0x10u, (_DWORD *)(a2 + 176), *(_DWORD *)(a2 + 180) + 1) ) { return (unsigned int)-1; } else { v14 = *(_QWORD *)(a2 + 168); v15 = *(_DWORD *)(a2 + 180); *(_DWORD *)(a2 + 180) = v15 + 1; v18 = (_DWORD *)(16LL * v15 + v14); memset(v18, 0LL, 16LL); *v18 = JS_DupAtom(a1, a3); v18[3] |= 0xFFFFFF00; return (unsigned int)(*(_DWORD *)(a2 + 180) - 1); } } else { JS_ThrowSyntaxError( a1, (long long)"too many parameters in function definition (only %d allowed)", 65534LL, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, v17); return (unsigned int)-1; } }
add_arg: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RDI MOV qword ptr [RSP + 0x20],RSI MOV dword ptr [RSP + 0x1c],EDX MOV RAX,qword ptr [RSP + 0x20] CMP dword ptr [RAX + 0xb4],0xffff JL 0x001ab331 MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[0x215cc1] MOV EDX,0xfffe MOV AL,0x0 CALL 0x00133500 MOV qword ptr [RSP],RAX MOV qword ptr [RSP + 0x8],RDX MOV dword ptr [RSP + 0x34],0xffffffff JMP 0x001ab3fc LAB_001ab331: MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x20] ADD RSI,0xa8 MOV RCX,qword ptr [RSP + 0x20] ADD RCX,0xb0 MOV RAX,qword ptr [RSP + 0x20] MOV R8D,dword ptr [RAX + 0xb4] ADD R8D,0x1 MOV EDX,0x10 CALL 0x00179430 CMP EAX,0x0 JZ 0x001ab37a MOV dword ptr [RSP + 0x34],0xffffffff JMP 0x001ab3fc LAB_001ab37a: MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + 0xa8] MOV RDX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RDX + 0xb4] MOV ESI,ECX ADD ESI,0x1 MOV dword ptr [RDX + 0xb4],ESI MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0x10] XOR ESI,ESI MOV EDX,0x10 CALL 0x0010e370 MOV RDI,qword ptr [RSP + 0x28] MOV ESI,dword ptr [RSP + 0x1c] CALL 0x0012e290 MOV ECX,EAX MOV RAX,qword ptr [RSP + 0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RAX + 0xc] AND ECX,0xff OR ECX,0xffffff00 MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RSP + 0x20] MOV EAX,dword ptr [RAX + 0xb4] SUB EAX,0x1 MOV dword ptr [RSP + 0x34],EAX LAB_001ab3fc: MOV EAX,dword ptr [RSP + 0x34] ADD RSP,0x38 RET
int add_arg(int8 param_1,long param_2,int4 param_3) { int iVar1; int4 uVar2; int4 *__s; int local_4; if (*(int *)(param_2 + 0xb4) < 0xffff) { iVar1 = js_resize_array(param_1,param_2 + 0xa8,0x10,param_2 + 0xb0,*(int *)(param_2 + 0xb4) + 1) ; if (iVar1 == 0) { iVar1 = *(int *)(param_2 + 0xb4); *(int *)(param_2 + 0xb4) = iVar1 + 1; __s = (int4 *)(*(long *)(param_2 + 0xa8) + (long)iVar1 * 0x10); memset(__s,0,0x10); uVar2 = JS_DupAtom(param_1,param_3); *__s = uVar2; __s[3] = __s[3] & 0xff | 0xffffff00; local_4 = *(int *)(param_2 + 0xb4) + -1; } else { local_4 = -1; } } else { JS_ThrowSyntaxError(param_1,"too many parameters in function definition (only %d allowed)", 0xfffe); local_4 = -1; } return local_4; }
50,375
ggml_compute_bf16_to_fp32
ngxson[P]ggml-easy/ggml/src/./ggml-impl.h
static inline float ggml_compute_bf16_to_fp32(ggml_bf16_t h) { union { float f; uint32_t i; } u; u.i = (uint32_t)h.bits << 16; return u.f; }
O0
c
ggml_compute_bf16_to_fp32: movw %di, %ax movw %ax, -0x2(%rsp) movzwl -0x2(%rsp), %eax shll $0x10, %eax movl %eax, -0x8(%rsp) vmovss -0x8(%rsp), %xmm0 retq nopl (%rax,%rax)
ggml_compute_bf16_to_fp32: mov ax, di mov [rsp+var_2], ax movzx eax, [rsp+var_2] shl eax, 10h mov [rsp+var_8], eax vmovss xmm0, [rsp+var_8] retn
__int128 __usercall ggml_compute_bf16_to_fp32@<xmm0>(unsigned __int16 a1@<di>) { __int128 result; // xmm0 int v2; // [rsp+0h] [rbp-8h] v2 = a1 << 16; __asm { vmovss xmm0, [rsp+var_8] } return result; }
ggml_compute_bf16_to_fp32: MOV AX,DI MOV word ptr [RSP + -0x2],AX MOVZX EAX,word ptr [RSP + -0x2] SHL EAX,0x10 MOV dword ptr [RSP + -0x8],EAX VMOVSS XMM0,dword ptr [RSP + -0x8] RET
long ggml_compute_bf16_to_fp32(ushort param_1) { return (ulong)param_1 << 0x10; }
50,376
dequantize_row_q8_K
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
void dequantize_row_q8_K(const block_q8_K * restrict x, float * restrict y, int64_t k) { assert(k % QK_K == 0); const int64_t nb = k / QK_K; for (int i = 0; i < nb; i++) { for (int j = 0; j < QK_K; ++j) { *y++ = x[i].d * x[i].qs[j]; } } }
O0
c
dequantize_row_q8_K: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax movl $0x100, %ecx # imm = 0x100 cqto idivq %rcx cmpq $0x0, %rdx jne 0x7a46a jmp 0x7a489 leaq 0x46cd3(%rip), %rdi # 0xc1144 leaq 0x468e4(%rip), %rsi # 0xc0d5c movl $0x9d7, %edx # imm = 0x9D7 leaq 0x4747e(%rip), %rcx # 0xc1902 callq 0x44810 movq -0x18(%rbp), %rax movl $0x100, %ecx # imm = 0x100 cqto idivq %rcx movq %rax, -0x20(%rbp) movl $0x0, -0x24(%rbp) movslq -0x24(%rbp), %rax cmpq -0x20(%rbp), %rax jge 0x7a520 movl $0x0, -0x28(%rbp) cmpl $0x100, -0x28(%rbp) # imm = 0x100 jge 0x7a513 movq -0x8(%rbp), %rax movslq -0x24(%rbp), %rcx imulq $0x124, %rcx, %rcx # imm = 0x124 addq %rcx, %rax movss (%rax), %xmm0 movq -0x8(%rbp), %rax movslq -0x24(%rbp), %rcx imulq $0x124, %rcx, %rcx # imm = 0x124 addq %rcx, %rax movslq -0x28(%rbp), %rcx movsbl 0x4(%rax,%rcx), %eax cvtsi2ss %eax, %xmm1 mulss %xmm1, %xmm0 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x4, %rcx movq %rcx, -0x10(%rbp) movss %xmm0, (%rax) movl -0x28(%rbp), %eax addl $0x1, %eax movl %eax, -0x28(%rbp) jmp 0x7a4b3 jmp 0x7a515 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0x7a4a2 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
dequantize_row_q8_K: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_18] mov ecx, 100h cqo idiv rcx cmp rdx, 0 jnz short loc_7A46A jmp short loc_7A489 loc_7A46A: lea rdi, aKQkK0; "k % QK_K == 0" lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... mov edx, 9D7h lea rcx, aVoidDequantize_20; "void dequantize_row_q8_K(const block_q8"... call ___assert_fail loc_7A489: mov rax, [rbp+var_18] mov ecx, 100h cqo idiv rcx mov [rbp+var_20], rax mov [rbp+var_24], 0 loc_7A4A2: movsxd rax, [rbp+var_24] cmp rax, [rbp+var_20] jge short loc_7A520 mov [rbp+var_28], 0 loc_7A4B3: cmp [rbp+var_28], 100h jge short loc_7A513 mov rax, [rbp+var_8] movsxd rcx, [rbp+var_24] imul rcx, 124h add rax, rcx movss xmm0, dword ptr [rax] mov rax, [rbp+var_8] movsxd rcx, [rbp+var_24] imul rcx, 124h add rax, rcx movsxd rcx, [rbp+var_28] movsx eax, byte ptr [rax+rcx+4] cvtsi2ss xmm1, eax mulss xmm0, xmm1 mov rax, [rbp+var_10] mov rcx, rax add rcx, 4 mov [rbp+var_10], rcx movss dword ptr [rax], xmm0 mov eax, [rbp+var_28] add eax, 1 mov [rbp+var_28], eax jmp short loc_7A4B3 loc_7A513: jmp short $+2 loc_7A515: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_7A4A2 loc_7A520: add rsp, 30h pop rbp retn
long long dequantize_row_q8_K(long long a1, float *a2, long long a3) { long long result; // rax float *v4; // rax int j; // [rsp+8h] [rbp-28h] int i; // [rsp+Ch] [rbp-24h] if ( a3 % 256 ) __assert_fail( "k % QK_K == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", 2519LL, "void dequantize_row_q8_K(const block_q8_K *restrict, float *restrict, int64_t)"); for ( i = 0; ; ++i ) { result = i; if ( i >= a3 / 256 ) break; for ( j = 0; j < 256; ++j ) { v4 = a2++; *v4 = *(float *)(292LL * i + a1) * (float)*(char *)(292LL * i + a1 + j + 4); } } return result; }
dequantize_row_q8_K: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,0x100 CQO IDIV RCX CMP RDX,0x0 JNZ 0x0017a46a JMP 0x0017a489 LAB_0017a46a: LEA RDI,[0x1c1144] LEA RSI,[0x1c0d5c] MOV EDX,0x9d7 LEA RCX,[0x1c1902] CALL 0x00144810 LAB_0017a489: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,0x100 CQO IDIV RCX MOV qword ptr [RBP + -0x20],RAX MOV dword ptr [RBP + -0x24],0x0 LAB_0017a4a2: MOVSXD RAX,dword ptr [RBP + -0x24] CMP RAX,qword ptr [RBP + -0x20] JGE 0x0017a520 MOV dword ptr [RBP + -0x28],0x0 LAB_0017a4b3: CMP dword ptr [RBP + -0x28],0x100 JGE 0x0017a513 MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x24] IMUL RCX,RCX,0x124 ADD RAX,RCX MOVSS XMM0,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,dword ptr [RBP + -0x24] IMUL RCX,RCX,0x124 ADD RAX,RCX MOVSXD RCX,dword ptr [RBP + -0x28] MOVSX EAX,byte ptr [RAX + RCX*0x1 + 0x4] CVTSI2SS XMM1,EAX MULSS XMM0,XMM1 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x4 MOV qword ptr [RBP + -0x10],RCX MOVSS dword ptr [RAX],XMM0 MOV EAX,dword ptr [RBP + -0x28] ADD EAX,0x1 MOV dword ptr [RBP + -0x28],EAX JMP 0x0017a4b3 LAB_0017a513: JMP 0x0017a515 LAB_0017a515: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x0017a4a2 LAB_0017a520: ADD RSP,0x30 POP RBP RET
void dequantize_row_q8_K(long param_1,float *param_2,long param_3) { int local_30; int local_2c; float *local_18; if (param_3 % 0x100 == 0) { local_18 = param_2; for (local_2c = 0; (long)local_2c < param_3 / 0x100; local_2c = local_2c + 1) { for (local_30 = 0; local_30 < 0x100; local_30 = local_30 + 1) { *local_18 = *(float *)(param_1 + (long)local_2c * 0x124) * (float)(int)*(char *)(param_1 + (long)local_2c * 0x124 + 4 + (long)local_30); local_18 = local_18 + 1; } } return; } /* WARNING: Subroutine does not return */ __assert_fail("k % QK_K == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,0x9d7, "void dequantize_row_q8_K(const block_q8_K *restrict, float *restrict, int64_t)"); }
50,377
dequantize_row_q8_K
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
void dequantize_row_q8_K(const block_q8_K * restrict x, float * restrict y, int64_t k) { assert(k % QK_K == 0); const int64_t nb = k / QK_K; for (int i = 0; i < nb; i++) { for (int j = 0; j < QK_K; ++j) { *y++ = x[i].d * x[i].qs[j]; } } }
O1
c
dequantize_row_q8_K: pushq %rax testb %dl, %dl jne 0x34fd8 sarq $0x8, %rdx testq %rdx, %rdx jle 0x34fd6 leaq 0x4(%rdi), %rax xorl %ecx, %ecx imulq $0x124, %rcx, %r8 # imm = 0x124 movss (%rdi,%r8), %xmm0 xorl %r8d, %r8d xorl %r9d, %r9d movsbl (%rax,%r9), %r10d xorps %xmm1, %xmm1 cvtsi2ss %r10d, %xmm1 mulss %xmm0, %xmm1 movss %xmm1, (%rsi,%r9,4) incq %r9 addq $-0x4, %r8 cmpq $0x100, %r9 # imm = 0x100 jne 0x34f9e incq %rcx addq $0x124, %rax # imm = 0x124 subq %r8, %rsi cmpq %rdx, %rcx jne 0x34f8b popq %rax retq leaq 0x26c0d(%rip), %rdi # 0x5bbec leaq 0x2681e(%rip), %rsi # 0x5b804 leaq 0x273bd(%rip), %rcx # 0x5c3aa movl $0x9d7, %edx # imm = 0x9D7 callq 0x17b00
dequantize_row_q8_K: push rax test dl, dl jnz short loc_34FD8 sar rdx, 8 test rdx, rdx jle short loc_34FD6 lea rax, [rdi+4] xor ecx, ecx loc_34F8B: imul r8, rcx, 124h movss xmm0, dword ptr [rdi+r8] xor r8d, r8d xor r9d, r9d loc_34F9E: movsx r10d, byte ptr [rax+r9] xorps xmm1, xmm1 cvtsi2ss xmm1, r10d mulss xmm1, xmm0 movss dword ptr [rsi+r9*4], xmm1 inc r9 add r8, 0FFFFFFFFFFFFFFFCh cmp r9, 100h jnz short loc_34F9E inc rcx add rax, 124h sub rsi, r8 cmp rcx, rdx jnz short loc_34F8B loc_34FD6: pop rax retn loc_34FD8: lea rdi, aKQkK0; "k % QK_K == 0" lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidDequantize_20; "void dequantize_row_q8_K(const block_q8"... mov edx, 9D7h call ___assert_fail
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm0,xmm4,xmm5> dequantize_row_q8_K(long long a1, long long a2, long long a3) { long long v3; // rdx long long v4; // rax long long i; // rcx float v6; // xmm0_4 long long v7; // r8 long long j; // r9 if ( (_BYTE)a3 ) __assert_fail( "k % QK_K == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", 2519LL, "void dequantize_row_q8_K(const block_q8_K *restrict, float *restrict, int64_t)"); v3 = a3 >> 8; if ( v3 > 0 ) { v4 = a1 + 4; for ( i = 0LL; i != v3; ++i ) { v6 = *(float *)(a1 + 292 * i); v7 = 0LL; for ( j = 0LL; j != 256; ++j ) { *(float *)(a2 + 4 * j) = (float)*(char *)(v4 + j) * v6; v7 -= 4LL; } v4 += 292LL; a2 -= v7; } } }
dequantize_row_q8_K: PUSH RAX TEST DL,DL JNZ 0x00134fd8 SAR RDX,0x8 TEST RDX,RDX JLE 0x00134fd6 LEA RAX,[RDI + 0x4] XOR ECX,ECX LAB_00134f8b: IMUL R8,RCX,0x124 MOVSS XMM0,dword ptr [RDI + R8*0x1] XOR R8D,R8D XOR R9D,R9D LAB_00134f9e: MOVSX R10D,byte ptr [RAX + R9*0x1] XORPS XMM1,XMM1 CVTSI2SS XMM1,R10D MULSS XMM1,XMM0 MOVSS dword ptr [RSI + R9*0x4],XMM1 INC R9 ADD R8,-0x4 CMP R9,0x100 JNZ 0x00134f9e INC RCX ADD RAX,0x124 SUB RSI,R8 CMP RCX,RDX JNZ 0x00134f8b LAB_00134fd6: POP RAX RET LAB_00134fd8: LEA RDI,[0x15bbec] LEA RSI,[0x15b804] LEA RCX,[0x15c3aa] MOV EDX,0x9d7 CALL 0x00117b00
int8 dequantize_row_q8_K(long param_1,long param_2,long param_3) { float fVar1; int8 in_RAX; long lVar2; long lVar3; long lVar4; long lVar5; if ((char)param_3 == '\0') { if (0 < param_3 >> 8) { lVar2 = param_1 + 4; lVar3 = 0; do { fVar1 = *(float *)(param_1 + lVar3 * 0x124); lVar4 = 0; lVar5 = 0; do { *(float *)(param_2 + lVar5 * 4) = (float)(int)*(char *)(lVar2 + lVar5) * fVar1; lVar5 = lVar5 + 1; lVar4 = lVar4 + -4; } while (lVar5 != 0x100); lVar3 = lVar3 + 1; lVar2 = lVar2 + 0x124; param_2 = param_2 - lVar4; } while (lVar3 != param_3 >> 8); } return in_RAX; } /* WARNING: Subroutine does not return */ __assert_fail("k % QK_K == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,0x9d7, "void dequantize_row_q8_K(const block_q8_K *restrict, float *restrict, int64_t)"); }
50,378
dequantize_row_q8_K
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c
void dequantize_row_q8_K(const block_q8_K * restrict x, float * restrict y, int64_t k) { assert(k % QK_K == 0); const int64_t nb = k / QK_K; for (int i = 0; i < nb; i++) { for (int j = 0; j < QK_K; ++j) { *y++ = x[i].d * x[i].qs[j]; } } }
O2
c
dequantize_row_q8_K: pushq %rax testb %dl, %dl jne 0x38589 sarq $0x8, %rdx xorl %eax, %eax testq %rdx, %rdx cmovleq %rax, %rdx leaq 0x4(%rdi), %rcx cmpq %rdx, %rax je 0x38587 imulq $0x124, %rax, %r8 # imm = 0x124 movss (%rdi,%r8), %xmm0 xorl %r8d, %r8d cmpq $0x100, %r8 # imm = 0x100 je 0x3857b movsbl (%rcx,%r8), %r9d cvtsi2ss %r9d, %xmm1 mulss %xmm0, %xmm1 movss %xmm1, (%rsi) addq $0x4, %rsi incq %r8 jmp 0x38557 incq %rax addq $0x124, %rcx # imm = 0x124 jmp 0x38542 popq %rax retq leaq 0x258bc(%rip), %rdi # 0x5de4c leaq 0x254cd(%rip), %rsi # 0x5da64 leaq 0x2606c(%rip), %rcx # 0x5e60a movl $0x9d7, %edx # imm = 0x9D7 callq 0x1dfb0
dequantize_row_q8_K: push rax test dl, dl jnz short loc_38589 sar rdx, 8 xor eax, eax test rdx, rdx cmovle rdx, rax lea rcx, [rdi+4] loc_38542: cmp rax, rdx jz short loc_38587 imul r8, rax, 124h movss xmm0, dword ptr [rdi+r8] xor r8d, r8d loc_38557: cmp r8, 100h jz short loc_3857B movsx r9d, byte ptr [rcx+r8] cvtsi2ss xmm1, r9d mulss xmm1, xmm0 movss dword ptr [rsi], xmm1 add rsi, 4 inc r8 jmp short loc_38557 loc_3857B: inc rax add rcx, 124h jmp short loc_38542 loc_38587: pop rax retn loc_38589: lea rdi, aKQkK0; "k % QK_K == 0" lea rsi, aWorkspaceLlm4b_4; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidDequantize_20; "void dequantize_row_q8_K(const block_q8"... mov edx, 9D7h call ___assert_fail
void __spoils<rdx,rcx,r8,r9,r10,r11,xmm0,xmm4,xmm5> dequantize_row_q8_K(long long a1, float *a2, long long a3) { long long v3; // rdx long long v4; // rax long long v5; // rcx float v6; // xmm0_4 long long i; // r8 if ( (_BYTE)a3 ) __assert_fail( "k % QK_K == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c", 2519LL, "void dequantize_row_q8_K(const block_q8_K *restrict, float *restrict, int64_t)"); v3 = a3 >> 8; v4 = 0LL; if ( v3 <= 0 ) v3 = 0LL; v5 = a1 + 4; while ( v4 != v3 ) { v6 = *(float *)(a1 + 292 * v4); for ( i = 0LL; i != 256; ++i ) *a2++ = (float)*(char *)(v5 + i) * v6; ++v4; v5 += 292LL; } }
dequantize_row_q8_K: PUSH RAX TEST DL,DL JNZ 0x00138589 SAR RDX,0x8 XOR EAX,EAX TEST RDX,RDX CMOVLE RDX,RAX LEA RCX,[RDI + 0x4] LAB_00138542: CMP RAX,RDX JZ 0x00138587 IMUL R8,RAX,0x124 MOVSS XMM0,dword ptr [RDI + R8*0x1] XOR R8D,R8D LAB_00138557: CMP R8,0x100 JZ 0x0013857b MOVSX R9D,byte ptr [RCX + R8*0x1] CVTSI2SS XMM1,R9D MULSS XMM1,XMM0 MOVSS dword ptr [RSI],XMM1 ADD RSI,0x4 INC R8 JMP 0x00138557 LAB_0013857b: INC RAX ADD RCX,0x124 JMP 0x00138542 LAB_00138587: POP RAX RET LAB_00138589: LEA RDI,[0x15de4c] LEA RSI,[0x15da64] LEA RCX,[0x15e60a] MOV EDX,0x9d7 CALL 0x0011dfb0
int8 dequantize_row_q8_K(long param_1,float *param_2,long param_3) { float fVar1; int8 in_RAX; long lVar2; long lVar3; long lVar4; long lVar5; if ((char)param_3 == '\0') { lVar2 = 0; lVar4 = param_3 >> 8; if (param_3 >> 8 < 1) { lVar4 = lVar2; } lVar3 = param_1 + 4; for (; lVar2 != lVar4; lVar2 = lVar2 + 1) { fVar1 = *(float *)(param_1 + lVar2 * 0x124); for (lVar5 = 0; lVar5 != 0x100; lVar5 = lVar5 + 1) { *param_2 = (float)(int)*(char *)(lVar3 + lVar5) * fVar1; param_2 = param_2 + 1; } lVar3 = lVar3 + 0x124; } return in_RAX; } /* WARNING: Subroutine does not return */ __assert_fail("k % QK_K == 0", "/workspace/llm4binary/github/2025_star3/Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-quants.c" ,0x9d7, "void dequantize_row_q8_K(const block_q8_K *restrict, float *restrict, int64_t)"); }
50,379
std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
monkey531[P]llama/common/common.h
static std::vector<T> string_split(const std::string & str, char delim) { static_assert(!std::is_same<T, std::string>::value, "Please use the specialized version for std::string"); std::vector<T> values; std::istringstream str_stream(str); std::string token; while (std::getline(str_stream, token, delim)) { T value; std::istringstream token_stream(token); token_stream >> value; values.push_back(value); } return values; }
O1
c
std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x328, %rsp # imm = 0x328 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq $0x0, 0x10(%rdi) leaq 0x28(%rsp), %rdi movl $0x8, %edx callq 0x1bea0 leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movq $0x0, -0x8(%rax) movb $0x0, (%rax) leaq 0x28(%rsp), %r15 leaq 0x8(%rsp), %r12 leaq 0x1a8(%rsp), %r13 leaq 0x4(%rsp), %rbp movq 0xde46c(%rip), %r14 # 0x12ff48 movq %r15, %rdi movq %r12, %rsi movl $0x2c, %edx callq 0x1c050 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x51b54 movq %r13, %rdi movq %r12, %rsi movl $0x8, %edx callq 0x1bea0 movq %r13, %rdi movq %rbp, %rsi callq 0x1b550 movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0x51b2f movl 0x4(%rsp), %eax movl %eax, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0x51b3a movq %rbx, %rdi movq %rbp, %rdx callq 0x229c4 movq %r13, %rdi movq %r14, %rsi callq 0x1bc70 leaq 0x220(%rsp), %rdi callq 0x1b2b0 jmp 0x51adc movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x51b70 movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8c0 movq 0xde3d1(%rip), %rsi # 0x12ff48 leaq 0x28(%rsp), %rdi callq 0x1bc70 leaq 0xa0(%rsp), %rdi callq 0x1b2b0 movq %rbx, %rax addq $0x328, %rsp # imm = 0x328 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 jmp 0x51c0d jmp 0x51baa movq %rax, %r14 jmp 0x51bd3 movq %rax, %r14 movq 0xde38f(%rip), %rsi # 0x12ff48 leaq 0x1a8(%rsp), %rdi callq 0x1bc70 leaq 0x220(%rsp), %rdi callq 0x1b2b0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x51bef movq 0x18(%rsp), %rsi incq %rsi callq 0x1b8c0 movq 0xde352(%rip), %rsi # 0x12ff48 leaq 0x28(%rsp), %rdi callq 0x1bc70 leaq 0xa0(%rsp), %rdi callq 0x1b2b0 movq (%rbx), %rdi testq %rdi, %rdi je 0x51c21 movq 0x10(%rbx), %rsi subq %rdi, %rsi callq 0x1b8c0 movq %r14, %rdi callq 0x1bf90 nop
_ZL12string_splitIiESt6vectorIT_SaIS1_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 328h mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov qword ptr [rdi+10h], 0 lea rdi, [rsp+358h+var_330] mov edx, 8 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea rax, [rsp+358h+var_340] mov [rax-10h], rax mov qword ptr [rax-8], 0 mov byte ptr [rax], 0 lea r15, [rsp+358h+var_330] lea r12, [rsp+358h+var_350] lea r13, [rsp+358h+var_1B0] lea rbp, [rsp+358h+var_354] mov r14, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr loc_51ADC: mov rdi, r15 mov rsi, r12 mov edx, 2Ch ; ',' call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_51B54 mov rdi, r13 mov rsi, r12 mov edx, 8 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) mov rdi, r13 mov rsi, rbp call __ZNSirsERi; std::istream::operator>>(int &) mov rsi, [rbx+8] cmp rsi, [rbx+10h] jz short loc_51B2F mov eax, [rsp+358h+var_354] mov [rsi], eax add rsi, 4 mov [rbx+8], rsi jmp short loc_51B3A loc_51B2F: mov rdi, rbx mov rdx, rbp 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&) loc_51B3A: mov rdi, r13 mov rsi, r14 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+358h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() jmp short loc_51ADC loc_51B54: mov rdi, [rsp+358h+var_350]; void * lea rax, [rsp+358h+var_340] cmp rdi, rax jz short loc_51B70 mov rsi, [rsp+358h+var_340] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_51B70: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+358h+var_330] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+358h+var_2B8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 328h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax jmp short loc_51C0D jmp short $+2 loc_51BAA: mov r14, rax jmp short loc_51BD3 mov r14, rax mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_1A0] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+arg_218]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_51BD3: mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_51BEF mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_51BEF: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_20] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+arg_98]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_51C0D: mov rdi, [rbx]; void * test rdi, rdi jz short loc_51C21 mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_51C21: mov rdi, r14 call __Unwind_Resume
long long * string_split<int>(long long *a1, long long a2) { _QWORD *v2; // rax _DWORD *v3; // rsi int v5; // [rsp+4h] [rbp-354h] BYREF void *v6[2]; // [rsp+8h] [rbp-350h] BYREF _QWORD v7[2]; // [rsp+18h] [rbp-340h] BYREF _BYTE v8[120]; // [rsp+28h] [rbp-330h] BYREF _BYTE v9[264]; // [rsp+A0h] [rbp-2B8h] BYREF _BYTE v10[120]; // [rsp+1A8h] [rbp-1B0h] BYREF _BYTE v11[312]; // [rsp+220h] [rbp-138h] BYREF *(_OWORD *)a1 = 0LL; a1[2] = 0LL; std::istringstream::basic_istringstream(v8, a2, 8LL); v6[0] = v7; v6[1] = 0LL; LOBYTE(v7[0]) = 0; while ( 1 ) { v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v8, v6, 44LL); if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 ) break; std::istringstream::basic_istringstream(v10, v6, 8LL); std::istream::operator>>(v10, &v5); v3 = (_DWORD *)a1[1]; if ( v3 == (_DWORD *)a1[2] ) { std::vector<int>::_M_realloc_insert<int const&>(a1, (long long)v3, &v5); } else { *v3 = v5; a1[1] = (long long)(v3 + 1); } std::istringstream::~istringstream(v10, &`VTT for'std::istringstream); std::ios_base::~ios_base((std::ios_base *)v11); } if ( v6[0] != v7 ) operator delete(v6[0], v7[0] + 1LL); std::istringstream::~istringstream(v8, &`VTT for'std::istringstream); std::ios_base::~ios_base((std::ios_base *)v9); return a1; }
string_split<int>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x328 MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RDI + 0x10],0x0 LAB_00151a9b: LEA RDI,[RSP + 0x28] MOV EDX,0x8 CALL 0x0011bea0 LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 LEA R15,[RSP + 0x28] LEA R12,[RSP + 0x8] LEA R13,[RSP + 0x1a8] LEA RBP,[RSP + 0x4] MOV R14,qword ptr [0x0022ff48] LAB_00151adc: MOV RDI,R15 MOV RSI,R12 MOV EDX,0x2c CALL 0x0011c050 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x00151b54 LAB_00151afa: MOV RDI,R13 MOV RSI,R12 MOV EDX,0x8 CALL 0x0011bea0 LAB_00151b0a: MOV RDI,R13 MOV RSI,RBP CALL 0x0011b550 MOV RSI,qword ptr [RBX + 0x8] CMP RSI,qword ptr [RBX + 0x10] JZ 0x00151b2f MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [RSI],EAX ADD RSI,0x4 MOV qword ptr [RBX + 0x8],RSI JMP 0x00151b3a LAB_00151b2f: MOV RDI,RBX MOV RDX,RBP CALL 0x001229c4 LAB_00151b3a: MOV RDI,R13 MOV RSI,R14 CALL 0x0011bc70 LEA RDI,[RSP + 0x220] CALL 0x0011b2b0 JMP 0x00151adc LAB_00151b54: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00151b70 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011b8c0 LAB_00151b70: MOV RSI,qword ptr [0x0022ff48] LEA RDI,[RSP + 0x28] CALL 0x0011bc70 LEA RDI,[RSP + 0xa0] CALL 0x0011b2b0 MOV RAX,RBX ADD RSP,0x328 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* std::vector<int, std::allocator<int> > string_split<int>(std::__cxx11::string const&, char) */ string * string_split<int>(string *param_1,char param_2) { int *piVar1; istream *piVar2; int7 in_register_00000031; int local_354; int1 *local_350; int8 local_348; int1 local_340; int7 uStack_33f; istringstream local_330 [120]; ios_base local_2b8 [264]; istream local_1b0 [120]; ios_base local_138 [264]; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; /* try { // try from 00151a9b to 00151aa9 has its CatchHandler @ 00151ba3 */ std::__cxx11::istringstream::istringstream(local_330,CONCAT71(in_register_00000031,param_2),8); local_350 = &local_340; local_348 = 0; local_340 = 0; while( true ) { /* try { // try from 00151adc to 00151aeb has its CatchHandler @ 00151baa */ piVar2 = std::getline<char,std::char_traits<char>,std::allocator<char>> ((istream *)local_330,(string *)&local_350,','); if (((byte)piVar2[*(long *)(*(long *)piVar2 + -0x18) + 0x20] & 5) != 0) break; /* try { // try from 00151afa to 00151b09 has its CatchHandler @ 00151ba8 */ std::__cxx11::istringstream::istringstream((istringstream *)local_1b0,(string *)&local_350,8); /* try { // try from 00151b0a to 00151b39 has its CatchHandler @ 00151baf */ std::istream::operator>>(local_1b0,&local_354); piVar1 = *(int **)(param_1 + 8); if (piVar1 == *(int **)(param_1 + 0x10)) { std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&> ((vector<int,std::allocator<int>> *)param_1,piVar1,&local_354); } else { *piVar1 = local_354; *(int **)(param_1 + 8) = piVar1 + 1; } std::__cxx11::istringstream::~istringstream((istringstream *)local_1b0); std::ios_base::~ios_base(local_138); } if (local_350 != &local_340) { operator_delete(local_350,CONCAT71(uStack_33f,local_340) + 1); } std::__cxx11::istringstream::~istringstream(local_330); std::ios_base::~ios_base(local_2b8); return param_1; }
50,380
maria_get_pointer_length
eloqsql/storage/maria/ma_create.c
uint maria_get_pointer_length(ulonglong file_length, uint def) { DBUG_ASSERT(def >= 2 && def <= 7); if (file_length) /* If not default */ { #ifdef NOT_YET_READY_FOR_8_BYTE_POINTERS if (file_length >= (1ULL << 56)) def=8; else #endif if (file_length >= (1ULL << 48)) def=7; else if (file_length >= (1ULL << 40)) def=6; else if (file_length >= (1ULL << 32)) def=5; else if (file_length >= (1ULL << 24)) def=4; else if (file_length >= (1ULL << 16)) def=3; else def=2; } return def; }
O3
c
maria_get_pointer_length: pushq %rbp movq %rsp, %rbp movl %esi, %eax testq %rdi, %rdi je 0x59f25 movq %rdi, %rax shrq $0x30, %rax movl $0x7, %eax jne 0x59f25 movq %rdi, %rax shrq $0x28, %rax movl $0x6, %eax jne 0x59f25 movq %rdi, %rax shrq $0x20, %rax movl $0x5, %eax jne 0x59f25 movl $0x4, %eax cmpq $0xffffff, %rdi # imm = 0xFFFFFF ja 0x59f25 cmpq $0x10000, %rdi # imm = 0x10000 movl $0x2, %eax sbbl $-0x1, %eax popq %rbp retq
maria_get_pointer_length: push rbp mov rbp, rsp mov eax, esi test rdi, rdi jz short loc_59F25 mov rax, rdi shr rax, 30h mov eax, 7 jnz short loc_59F25 mov rax, rdi shr rax, 28h mov eax, 6 jnz short loc_59F25 mov rax, rdi shr rax, 20h mov eax, 5 jnz short loc_59F25 mov eax, 4 cmp rdi, 0FFFFFFh ja short loc_59F25 cmp rdi, 10000h mov eax, 2 sbb eax, 0FFFFFFFFh loc_59F25: pop rbp retn
long long maria_get_pointer_length(unsigned long long a1, unsigned int a2) { long long result; // rax result = a2; if ( a1 ) { result = 7LL; if ( !HIWORD(a1) ) { result = 6LL; if ( !(a1 >> 40) ) { result = 5LL; if ( !HIDWORD(a1) ) { result = 4LL; if ( a1 <= 0xFFFFFF ) return 2 - ((unsigned int)(a1 < 0x10000) - 1); } } } } return result; }
maria_get_pointer_length: PUSH RBP MOV RBP,RSP MOV EAX,ESI TEST RDI,RDI JZ 0x00159f25 MOV RAX,RDI SHR RAX,0x30 MOV EAX,0x7 JNZ 0x00159f25 MOV RAX,RDI SHR RAX,0x28 MOV EAX,0x6 JNZ 0x00159f25 MOV RAX,RDI SHR RAX,0x20 MOV EAX,0x5 JNZ 0x00159f25 MOV EAX,0x4 CMP RDI,0xffffff JA 0x00159f25 CMP RDI,0x10000 MOV EAX,0x2 SBB EAX,-0x1 LAB_00159f25: POP RBP RET
int maria_get_pointer_length(ulong param_1,int param_2) { if ((((param_1 != 0) && (param_2 = 7, param_1 >> 0x30 == 0)) && (param_2 = 6, param_1 >> 0x28 == 0)) && ((param_2 = 5, param_1 >> 0x20 == 0 && (param_2 = 4, param_1 < 0x1000000)))) { param_2 = 3 - (uint)(param_1 < 0x10000); } return param_2; }
50,381
testing::internal::UnitTestImpl::RegisterParameterizedTests()
seiftnesse[P]memoryallocator/build_O1/_deps/googletest-src/googletest/src/gtest.cc
void UnitTestImpl::RegisterParameterizedTests() { if (!parameterized_tests_registered_) { parameterized_test_registry_.RegisterTests(); type_parameterized_test_registry_.CheckForInstantiations(); parameterized_tests_registered_ = true; } }
O1
cpp
testing::internal::UnitTestImpl::RegisterParameterizedTests(): cmpb $0x0, 0x160(%rdi) jne 0x25479 pushq %r15 pushq %r14 pushq %rbx movq %rdi, %rbx movq 0xe8(%rdi), %r14 movq 0xf0(%rdi), %r15 cmpq %r15, %r14 je 0x25461 movq (%r14), %rdi movq (%rdi), %rax callq *0x20(%rax) addq $0x8, %r14 jmp 0x2544d leaq 0x100(%rbx), %rdi callq 0x1e37e movb $0x1, 0x160(%rbx) popq %rbx popq %r14 popq %r15 retq
_ZN7testing8internal12UnitTestImpl26RegisterParameterizedTestsEv: cmp byte ptr [rdi+160h], 0 jnz short locret_25479 push r15 push r14 push rbx mov rbx, rdi mov r14, [rdi+0E8h] mov r15, [rdi+0F0h] loc_2544D: cmp r14, r15 jz short loc_25461 mov rdi, [r14] mov rax, [rdi] call qword ptr [rax+20h] add r14, 8 jmp short loc_2544D loc_25461: lea rdi, [rbx+100h]; this call _ZN7testing8internal34TypeParameterizedTestSuiteRegistry22CheckForInstantiationsEv; testing::internal::TypeParameterizedTestSuiteRegistry::CheckForInstantiations(void) mov byte ptr [rbx+160h], 1 pop rbx pop r14 pop r15 locret_25479: retn
char * testing::internal::UnitTestImpl::RegisterParameterizedTests(testing::internal::UnitTestImpl *this) { _QWORD *v1; // r14 _QWORD *v2; // r15 char *result; // rax if ( !*((_BYTE *)this + 352) ) { v1 = (_QWORD *)*((_QWORD *)this + 29); v2 = (_QWORD *)*((_QWORD *)this + 30); while ( v1 != v2 ) { (*(void ( **)(_QWORD))(*(_QWORD *)*v1 + 32LL))(*v1); ++v1; } result = testing::internal::TypeParameterizedTestSuiteRegistry::CheckForInstantiations((testing::internal::UnitTestImpl *)((char *)this + 256)); *((_BYTE *)this + 352) = 1; } return result; }
RegisterParameterizedTests: CMP byte ptr [RDI + 0x160],0x0 JNZ 0x00125479 PUSH R15 PUSH R14 PUSH RBX MOV RBX,RDI MOV R14,qword ptr [RDI + 0xe8] MOV R15,qword ptr [RDI + 0xf0] LAB_0012544d: CMP R14,R15 JZ 0x00125461 MOV RDI,qword ptr [R14] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x20] ADD R14,0x8 JMP 0x0012544d LAB_00125461: LEA RDI,[RBX + 0x100] CALL 0x0011e37e MOV byte ptr [RBX + 0x160],0x1 POP RBX POP R14 POP R15 LAB_00125479: RET
/* testing::internal::UnitTestImpl::RegisterParameterizedTests() */ void __thiscall testing::internal::UnitTestImpl::RegisterParameterizedTests(UnitTestImpl *this) { int8 *puVar1; int8 *puVar2; if (this[0x160] == (UnitTestImpl)0x0) { puVar1 = *(int8 **)(this + 0xf0); for (puVar2 = *(int8 **)(this + 0xe8); puVar2 != puVar1; puVar2 = puVar2 + 1) { (**(code **)(*(long *)*puVar2 + 0x20))(); } TypeParameterizedTestSuiteRegistry::CheckForInstantiations ((TypeParameterizedTestSuiteRegistry *)(this + 0x100)); this[0x160] = (UnitTestImpl)0x1; } return; }
50,382
postprocess_cpu_params(cpu_params&, cpu_params const*)
monkey531[P]llama/common/common.cpp
void postprocess_cpu_params(cpu_params& cpuparams, const cpu_params* role_model) { int32_t n_set = 0; if (cpuparams.n_threads < 0) { // Assuming everything about cpuparams is invalid if (role_model != nullptr) { cpuparams = *role_model; } else { cpuparams.n_threads = cpu_get_num_math(); } } for (int32_t i = 0; i < GGML_MAX_N_THREADS; i++) { if (cpuparams.cpumask[i]) { n_set++; } } if (n_set && n_set < cpuparams.n_threads) { // Not enough set bits, may experience performance issues. LOG_WRN("Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", n_set, cpuparams.n_threads); } }
O2
cpp
postprocess_cpu_params(cpu_params&, cpu_params const*): pushq %rbp pushq %rbx pushq %rax movq %rdi, %rbx cmpl $0x0, (%rdi) jns 0x58079 testq %rsi, %rsi je 0x58072 movl $0x214, %edx # imm = 0x214 movq %rbx, %rdi callq 0x24780 jmp 0x58079 callq 0x57e7f movl %eax, (%rbx) xorl %ebp, %ebp pushq $0x4 popq %rax cmpq $0x204, %rax # imm = 0x204 je 0x58091 movzbl (%rbx,%rax), %ecx addl %ecx, %ebp incq %rax jmp 0x5807e testl %ebp, %ebp je 0x580c9 cmpl (%rbx), %ebp jge 0x580c9 leaq 0xad460(%rip), %rax # 0x105500 cmpl $0x0, (%rax) js 0x580c9 callq 0x9a7a6 movl (%rbx), %r8d leaq 0x5fb97(%rip), %rdx # 0xb7c4b pushq $0x3 popq %rsi movq %rax, %rdi movl %ebp, %ecx xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp jmp 0x9a83e addq $0x8, %rsp popq %rbx popq %rbp retq
_Z22postprocess_cpu_paramsR10cpu_paramsPKS_: push rbp push rbx push rax mov rbx, rdi cmp dword ptr [rdi], 0 jns short loc_58079 test rsi, rsi jz short loc_58072 mov edx, 214h mov rdi, rbx call _memcpy jmp short loc_58079 loc_58072: call _Z16cpu_get_num_mathv; cpu_get_num_math(void) mov [rbx], eax loc_58079: xor ebp, ebp push 4 pop rax loc_5807E: cmp rax, 204h jz short loc_58091 movzx ecx, byte ptr [rbx+rax] add ebp, ecx inc rax jmp short loc_5807E loc_58091: test ebp, ebp jz short loc_580C9 cmp ebp, [rbx] jge short loc_580C9 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_580C9 call _Z15common_log_mainv; common_log_main(void) mov r8d, [rbx] lea rdx, aNotEnoughSetBi; "Not enough set bits in CPU mask (%d) to"... push 3 pop rsi mov rdi, rax mov ecx, ebp xor eax, eax add rsp, 8 pop rbx pop rbp jmp _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_580C9: add rsp, 8 pop rbx pop rbp retn
int * postprocess_cpu_params(_DWORD *a1, long long a2) { int v2; // ebp int *result; // rax int v4; // eax int v5; // r9d if ( (int)*a1 < 0 ) { if ( a2 ) memcpy(a1, a2, 532LL); else *a1 = cpu_get_num_math(); } v2 = 0; for ( result = (_DWORD *)&byte_4; result != &dword_204; result = (int *)((char *)result + 1) ) v2 += *((unsigned __int8 *)result + (_QWORD)a1); if ( v2 && v2 < *a1 ) { result = (int *)&common_log_verbosity_thold; if ( common_log_verbosity_thold >= 0 ) { v4 = common_log_main(); return (int *)common_log_add( v4, 3, (unsigned int)"Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", v2, *a1, v5); } } return result; }
postprocess_cpu_params: PUSH RBP PUSH RBX PUSH RAX MOV RBX,RDI CMP dword ptr [RDI],0x0 JNS 0x00158079 TEST RSI,RSI JZ 0x00158072 MOV EDX,0x214 MOV RDI,RBX CALL 0x00124780 JMP 0x00158079 LAB_00158072: CALL 0x00157e7f MOV dword ptr [RBX],EAX LAB_00158079: XOR EBP,EBP PUSH 0x4 POP RAX LAB_0015807e: CMP RAX,0x204 JZ 0x00158091 MOVZX ECX,byte ptr [RBX + RAX*0x1] ADD EBP,ECX INC RAX JMP 0x0015807e LAB_00158091: TEST EBP,EBP JZ 0x001580c9 CMP EBP,dword ptr [RBX] JGE 0x001580c9 LEA RAX,[0x205500] CMP dword ptr [RAX],0x0 JS 0x001580c9 CALL 0x0019a7a6 MOV R8D,dword ptr [RBX] LEA RDX,[0x1b7c4b] PUSH 0x3 POP RSI MOV RDI,RAX MOV ECX,EBP XOR EAX,EAX ADD RSP,0x8 POP RBX POP RBP JMP 0x0019a83e LAB_001580c9: ADD RSP,0x8 POP RBX POP RBP RET
/* postprocess_cpu_params(cpu_params&, cpu_params const*) */ void postprocess_cpu_params(cpu_params *param_1,cpu_params *param_2) { int4 uVar1; long lVar2; int8 uVar3; int iVar4; if (*(int *)param_1 < 0) { if (param_2 == (cpu_params *)0x0) { uVar1 = cpu_get_num_math(); *(int4 *)param_1 = uVar1; } else { memcpy(param_1,param_2,0x214); } } iVar4 = 0; for (lVar2 = 4; lVar2 != 0x204; lVar2 = lVar2 + 1) { iVar4 = iVar4 + (uint)(byte)param_1[lVar2]; } if (((iVar4 != 0) && (iVar4 < *(int *)param_1)) && (-1 < common_log_verbosity_thold)) { uVar3 = common_log_main(); common_log_add(uVar3,3, "Not enough set bits in CPU mask (%d) to satisfy requested thread count: %d\n", iVar4,*(int4 *)param_1); return; } return; }
50,383
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool)
llama.cpp/common/json.hpp
std::pair<bool, BasicJsonType*> handle_value(Value&& v, const bool skip_callback = false) { JSON_ASSERT(!keep_stack.empty()); // do not handle this value if we know it would be added to a discarded // container if (!keep_stack.back()) { return {false, nullptr}; } // create value auto value = BasicJsonType(std::forward<Value>(v)); // check callback const bool keep = skip_callback || callback(static_cast<int>(ref_stack.size()), parse_event_t::value, value); // do not handle this value if we just learnt it shall be discarded if (!keep) { return {false, nullptr}; } if (ref_stack.empty()) { root = std::move(value); return {true, & root}; } // skip this value if we already decided to skip the parent // (https://github.com/nlohmann/json/issues/971#issuecomment-413678360) if (!ref_stack.back()) { return {false, nullptr}; } // we now only expect arrays and objects JSON_ASSERT(ref_stack.back()->is_array() || ref_stack.back()->is_object()); // array if (ref_stack.back()->is_array()) { ref_stack.back()->m_data.m_value.array->emplace_back(std::move(value)); return {true, & (ref_stack.back()->m_data.m_value.array->back())}; } // object JSON_ASSERT(ref_stack.back()->is_object()); // check if we should store an element for the current key JSON_ASSERT(!key_keep_stack.empty()); const bool store_element = key_keep_stack.back(); key_keep_stack.pop_back(); if (!store_element) { return {false, nullptr}; } JSON_ASSERT(object_element); *object_element = std::move(value); return {true, object_element}; }
O3
cpp
std::pair<bool, nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>*> nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::handle_value<std::nullptr_t>(std::nullptr_t&&, bool): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movl %edx, %ebp movq %rdi, %rbx movq 0x30(%rdi), %rax movl 0x38(%rdi), %ecx cmpq %rax, 0x20(%rdi) sete %dl testl %ecx, %ecx sete %dil andb %dl, %dil cmpb $0x1, %dil je 0x8831a movl %ecx, %ecx movabsq $-0x8000000000000000, %r14 # imm = 0x8000000000000000 leaq -0x1(%rcx), %rdx addq $0x3e, %rcx testq %rdx, %rdx cmovnsq %rdx, %rcx sarq $0x6, %rcx leaq (%rax,%rcx,8), %rax leaq 0x3f(%r14), %rcx andq %rdx, %rcx xorl %edi, %edi cmpq %r14, %rcx setbe %dil movq -0x8(%rax,%rdi,8), %rax btq %rdx, %rax jae 0x881ad movzbl (%rsi), %esi leaq 0x10(%rsp), %rdi movb %sil, -0x8(%rdi) callq 0x84816 leaq 0x8(%rsp), %rdi movl $0x1, %esi callq 0x84776 testb %bpl, %bpl jne 0x8815a movq 0x10(%rbx), %rax subq 0x8(%rbx), %rax shrq $0x3, %rax movl %eax, 0x1c(%rsp) movb $0x5, 0x7(%rsp) cmpq $0x0, 0x90(%rbx) je 0x8833b leaq 0x80(%rbx), %rdi leaq 0x1c(%rsp), %rsi leaq 0x7(%rsp), %rdx leaq 0x8(%rsp), %rcx callq *0x98(%rbx) testb %al, %al je 0x882ee movq 0x10(%rbx), %rax cmpq %rax, 0x8(%rbx) je 0x881b7 movq -0x8(%rax), %rax testq %rax, %rax je 0x882ee movzbl (%rax), %ecx cmpl $0x1, %ecx je 0x88211 cmpl $0x2, %ecx jne 0x88340 movq 0x8(%rax), %rdi leaq 0x8(%rsp), %rsi callq 0x8858c movq 0x10(%rbx), %rax movq -0x8(%rax), %rax movq 0x8(%rax), %rax movq 0x8(%rax), %r14 addq $-0x10, %r14 jmp 0x882ea xorl %ebx, %ebx xorl %r14d, %r14d jmp 0x8830a leaq 0x8(%rsp), %r14 movups (%r14), %xmm0 leaq 0x30(%rsp), %r15 movaps %xmm0, (%r15) movq %r14, %rdi xorl %esi, %esi callq 0x84776 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %r15, %rdi movl $0x1, %esi callq 0x84776 movq (%rbx), %rdi movq %r15, %rsi callq 0x868e2 movq %r15, %rdi xorl %esi, %esi callq 0x84776 movq %r15, %rdi callq 0x88e90 movq (%rbx), %r14 jmp 0x882ea movq 0x58(%rbx), %rax movl 0x60(%rbx), %ecx cmpq %rax, 0x48(%rbx) sete %dl testl %ecx, %ecx sete %sil andb %dl, %sil cmpb $0x1, %sil je 0x8834e movl %ecx, %esi leaq -0x1(%rsi), %rcx movq %rsi, %rdx addq $0x3e, %rdx testq %rcx, %rcx cmovnsq %rcx, %rdx sarq $0x6, %rdx leaq (%rax,%rdx,8), %rdi leaq 0x3f(%r14), %rdx andq %rcx, %rdx xorl %r8d, %r8d cmpq %r14, %rdx setbe %r8b movl $0x1, %edx shlq %cl, %rdx andq -0x8(%rdi,%r8,8), %rdx subl $0x1, %esi movl %esi, 0x60(%rbx) jae 0x88283 movl $0x3f, 0x60(%rbx) addq $-0x8, %rax movq %rax, 0x58(%rbx) testq %rdx, %rdx je 0x882ee cmpq $0x0, 0x70(%rbx) je 0x8836f leaq 0x8(%rsp), %r14 movups (%r14), %xmm0 leaq 0x20(%rsp), %r15 movaps %xmm0, (%r15) movq %r14, %rdi xorl %esi, %esi callq 0x84776 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %r15, %rdi movl $0x1, %esi callq 0x84776 movq 0x70(%rbx), %rdi movq %r15, %rsi callq 0x868e2 movq %r15, %rdi xorl %esi, %esi callq 0x84776 movq %r15, %rdi callq 0x88e90 movq 0x70(%rbx), %r14 movb $0x1, %bl jmp 0x882f3 xorl %ebx, %ebx xorl %r14d, %r14d leaq 0x8(%rsp), %r15 movq %r15, %rdi xorl %esi, %esi callq 0x84776 movq %r15, %rdi callq 0x88e90 movl %ebx, %eax movq %r14, %rdx addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x931f1(%rip), %rdi # 0x11b512 leaq 0x8be09(%rip), %rdx # 0x114131 leaq 0x94139(%rip), %rcx # 0x11c468 movl $0x1c28, %esi # imm = 0x1C28 xorl %eax, %eax callq 0x21e60 callq 0x22280 leaq 0x94135(%rip), %rcx # 0x11c47c movl $0x1c4b, %esi # imm = 0x1C4B jmp 0x8835a leaq 0x94165(%rip), %rcx # 0x11c4ba movl $0x1c57, %esi # imm = 0x1C57 leaq 0x931b1(%rip), %rdi # 0x11b512 leaq 0x8bdc9(%rip), %rdx # 0x114131 xorl %eax, %eax callq 0x21e60 leaq 0x9319c(%rip), %rdi # 0x11b512 leaq 0x8bdb4(%rip), %rdx # 0x114131 leaq 0x9414e(%rip), %rcx # 0x11c4d2 movl $0x1c60, %esi # imm = 0x1C60 xorl %eax, %eax callq 0x21e60 jmp 0x88392 movq %rax, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi xorl %esi, %esi callq 0x84776 movq %r14, %rdi callq 0x88e90 movq %rbx, %rdi callq 0x21af0
_ZN8nlohmann16json_abi_v3_11_36detail28json_sax_dom_callback_parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE12handle_valueINS1_7value_tEEESt4pairIbPSF_EOT_b: push rbp push r15 push r14 push rbx sub rsp, 48h mov ebp, edx mov rbx, rdi mov rax, [rdi+30h] mov ecx, [rdi+38h] cmp [rdi+20h], rax setz dl test ecx, ecx setz dil and dil, dl cmp dil, 1 jz loc_8831A mov ecx, ecx mov r14, 8000000000000000h lea rdx, [rcx-1] add rcx, 3Eh ; '>' test rdx, rdx cmovns rcx, rdx sar rcx, 6 lea rax, [rax+rcx*8] lea rcx, [r14+3Fh] and rcx, rdx xor edi, edi cmp rcx, r14 setbe dil mov rax, [rax+rdi*8-8] bt rax, rdx jnb loc_881AD movzx esi, byte ptr [rsi] lea rdi, [rsp+68h+var_58] mov [rdi-8], sil call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_valueC2ENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::json_value::json_value(nlohmann::json_abi_v3_11_3::detail::value_t) lea rdi, [rsp+68h+var_60] 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) test bpl, bpl jnz short loc_8815A mov rax, [rbx+10h] sub rax, [rbx+8] shr rax, 3 mov [rsp+68h+var_4C], eax mov [rsp+68h+var_61], 5 cmp qword ptr [rbx+90h], 0 jz loc_8833B lea rdi, [rbx+80h] lea rsi, [rsp+68h+var_4C] lea rdx, [rsp+68h+var_61] lea rcx, [rsp+68h+var_60] call qword ptr [rbx+98h] test al, al jz loc_882EE loc_8815A: mov rax, [rbx+10h] cmp [rbx+8], rax jz short loc_881B7 mov rax, [rax-8] test rax, rax jz loc_882EE movzx ecx, byte ptr [rax] cmp ecx, 1 jz loc_88211 cmp ecx, 2 jnz loc_88340 mov rdi, [rax+8] lea rsi, [rsp+68h+var_60] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE12emplace_backIJSD_EEERSD_DpOT_; 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>>::emplace_back<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(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 rax, [rbx+10h] mov rax, [rax-8] mov rax, [rax+8] mov r14, [rax+8] add r14, 0FFFFFFFFFFFFFFF0h jmp loc_882EA loc_881AD: xor ebx, ebx xor r14d, r14d jmp loc_8830A loc_881B7: lea r14, [rsp+68h+var_60] movups xmm0, xmmword ptr [r14] lea r15, [rsp+68h+var_38] movaps xmmword ptr [r15], xmm0 mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, [rbx] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(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() mov r14, [rbx] jmp loc_882EA loc_88211: mov rax, [rbx+58h] mov ecx, [rbx+60h] cmp [rbx+48h], rax setz dl test ecx, ecx setz sil and sil, dl cmp sil, 1 jz loc_8834E mov esi, ecx lea rcx, [rsi-1] mov rdx, rsi add rdx, 3Eh ; '>' test rcx, rcx cmovns rdx, rcx sar rdx, 6 lea rdi, [rax+rdx*8] lea rdx, [r14+3Fh] and rdx, rcx xor r8d, r8d cmp rdx, r14 setbe r8b mov edx, 1 shl rdx, cl and rdx, [rdi+r8*8-8] sub esi, 1 mov [rbx+60h], esi jnb short loc_88283 mov dword ptr [rbx+60h], 3Fh ; '?' add rax, 0FFFFFFFFFFFFFFF8h mov [rbx+58h], rax loc_88283: test rdx, rdx jz short loc_882EE cmp qword ptr [rbx+70h], 0 jz loc_8836F lea r14, [rsp+68h+var_60] movups xmm0, xmmword ptr [r14] lea r15, [rsp+68h+var_48] movaps xmmword ptr [r15], xmm0 mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, [rbx+70h] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEaSESD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::operator=(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() mov r14, [rbx+70h] loc_882EA: mov bl, 1 jmp short loc_882F3 loc_882EE: xor ebx, ebx xor r14d, r14d loc_882F3: lea r15, [rsp+68h+var_60] 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() loc_8830A: mov eax, ebx mov rdx, r14 add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_8831A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKeepStackEmpty; "!keep_stack.empty()" mov esi, 1C28h xor eax, eax call _ggml_abort loc_8833B: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) loc_88340: lea rcx, aRefStackBackIs; "ref_stack.back()->is_array() || ref_sta"... mov esi, 1C4Bh jmp short loc_8835A loc_8834E: lea rcx, aKeyKeepStackEm; "!key_keep_stack.empty()" mov esi, 1C57h loc_8835A: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" xor eax, eax call _ggml_abort loc_8836F: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aObjectElement; "object_element" mov esi, 1C60h xor eax, eax call _ggml_abort jmp short $+2 loc_88392: mov rbx, rax lea r14, [rsp+68h+var_60] mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>( long long a1, unsigned __int8 *a2, char a3) { unsigned int v4; // ebx long long v5; // rax unsigned int v6; // ecx signed long long v7; // rdx long long v8; // rcx long long v9; // rax unsigned int v10; // esi long long v11; // rax unsigned __int8 *v12; // rax int v13; // ecx long long v14; // rax unsigned int v15; // ecx long long v16; // rsi long long v17; // rcx long long v18; // rdx long long v19; // rdx const char *v21; // rcx long long v22; // rsi long long v23; // rax long long v24; // rbx char v25; // [rsp+7h] [rbp-61h] BYREF __int128 v26; // [rsp+8h] [rbp-60h] BYREF int v27; // [rsp+1Ch] [rbp-4Ch] BYREF __int128 v28; // [rsp+20h] [rbp-48h] BYREF _OWORD v29[3]; // [rsp+30h] [rbp-38h] BYREF v4 = a1; v5 = *(_QWORD *)(a1 + 48); v6 = *(_DWORD *)(a1 + 56); if ( *(_QWORD *)(a1 + 32) == v5 && v6 == 0 ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7208LL, "GGML_ASSERT(%s) failed", "!keep_stack.empty()"); goto LABEL_28; } v7 = v6 - 1LL; v8 = v6 + 62LL; if ( v7 >= 0 ) v8 = v7; v9 = *(_QWORD *)(v5 + 8 * (v8 >> 6) + 8LL * ((v7 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8); if ( _bittest64(&v9, v7) ) { v10 = *a2; LOBYTE(v26) = 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>::json_value::json_value( (_BYTE *)&v26 + 8, 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 *)&v26); if ( a3 ) { LABEL_8: v11 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(a1 + 8) == v11 ) { v29[0] = v26; 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 *)&v26); LOBYTE(v26) = 0; *((_QWORD *)&v26 + 1) = 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 *)v29); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( *(_QWORD *)a1, (long long)v29); 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 *)v29); 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(v29); goto LABEL_23; } v12 = *(unsigned __int8 **)(v11 - 8); if ( v12 ) { v13 = *v12; if ( v13 != 1 ) { if ( v13 == 2 ) { std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::emplace_back<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 *)v12 + 1), &v26); LABEL_23: LOBYTE(v4) = 1; LABEL_25: 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 *)&v26); 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(&v26); return v4; } v21 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()"; v22 = 7243LL; goto LABEL_31; } v14 = *(_QWORD *)(a1 + 88); v15 = *(_DWORD *)(a1 + 96); if ( *(_QWORD *)(a1 + 72) == v14 && v15 == 0 ) { v21 = "!key_keep_stack.empty()"; v22 = 7255LL; LABEL_31: ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", v22, "GGML_ASSERT(%s) failed", v21); goto LABEL_32; } v16 = v15; v17 = v15 - 1LL; v18 = v16 + 62; if ( v17 >= 0 ) v18 = v17; v19 = *(_QWORD *)(v14 + 8 * (v18 >> 6) + 8LL * ((v17 & 0x800000000000003FLL) <= 0x8000000000000000LL) - 8) & (1LL << v17); *(_DWORD *)(a1 + 96) = v16 - 1; if ( !(_DWORD)v16 ) { *(_DWORD *)(a1 + 96) = 63; *(_QWORD *)(a1 + 88) = v14 - 8; } if ( v19 ) { if ( *(_QWORD *)(a1 + 112) ) { v28 = v26; 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 *)&v26); LOBYTE(v26) = 0; *((_QWORD *)&v26 + 1) = 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 *)&v28); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator=( *(_QWORD *)(a1 + 112), (long long)&v28); 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 *)&v28); 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(&v28); goto LABEL_23; } LABEL_32: ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7264LL, "GGML_ASSERT(%s) failed", "object_element"); v24 = v23; 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 *)&v26); 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(&v26); _Unwind_Resume(v24); } } LABEL_24: v4 = 0; goto LABEL_25; } v27 = (*(_QWORD *)(a1 + 16) - *(_QWORD *)(a1 + 8)) >> 3; v25 = 5; if ( *(_QWORD *)(a1 + 144) ) { if ( !(*(unsigned __int8 ( **)(long long, int *, char *, __int128 *))(a1 + 152))( a1 + 128, &v27, &v25, &v26) ) goto LABEL_24; goto LABEL_8; } LABEL_28: std::__throw_bad_function_call(); } return 0; }
handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV EBP,EDX MOV RBX,RDI MOV RAX,qword ptr [RDI + 0x30] MOV ECX,dword ptr [RDI + 0x38] CMP qword ptr [RDI + 0x20],RAX SETZ DL TEST ECX,ECX SETZ DIL AND DIL,DL CMP DIL,0x1 JZ 0x0018831a MOV ECX,ECX MOV R14,-0x8000000000000000 LEA RDX,[RCX + -0x1] ADD RCX,0x3e TEST RDX,RDX CMOVNS RCX,RDX SAR RCX,0x6 LEA RAX,[RAX + RCX*0x8] LEA RCX,[R14 + 0x3f] AND RCX,RDX XOR EDI,EDI CMP RCX,R14 SETBE DIL MOV RAX,qword ptr [RAX + RDI*0x8 + -0x8] BT RAX,RDX JNC 0x001881ad MOVZX ESI,byte ptr [RSI] LEA RDI,[RSP + 0x10] MOV byte ptr [RDI + -0x8],SIL CALL 0x00184816 LEA RDI,[RSP + 0x8] MOV ESI,0x1 CALL 0x00184776 TEST BPL,BPL JNZ 0x0018815a MOV RAX,qword ptr [RBX + 0x10] SUB RAX,qword ptr [RBX + 0x8] SHR RAX,0x3 MOV dword ptr [RSP + 0x1c],EAX MOV byte ptr [RSP + 0x7],0x5 CMP qword ptr [RBX + 0x90],0x0 JZ 0x0018833b LEA RDI,[RBX + 0x80] LAB_0018813d: LEA RSI,[RSP + 0x1c] LEA RDX,[RSP + 0x7] LEA RCX,[RSP + 0x8] CALL qword ptr [RBX + 0x98] TEST AL,AL JZ 0x001882ee LAB_0018815a: MOV RAX,qword ptr [RBX + 0x10] CMP qword ptr [RBX + 0x8],RAX JZ 0x001881b7 MOV RAX,qword ptr [RAX + -0x8] TEST RAX,RAX JZ 0x001882ee MOVZX ECX,byte ptr [RAX] CMP ECX,0x1 JZ 0x00188211 CMP ECX,0x2 JNZ 0x00188340 MOV RDI,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x8] CALL 0x0018858c LAB_00188194: MOV RAX,qword ptr [RBX + 0x10] MOV RAX,qword ptr [RAX + -0x8] MOV RAX,qword ptr [RAX + 0x8] MOV R14,qword ptr [RAX + 0x8] ADD R14,-0x10 JMP 0x001882ea LAB_001881ad: XOR EBX,EBX XOR R14D,R14D JMP 0x0018830a LAB_001881b7: LEA R14,[RSP + 0x8] MOVUPS XMM0,xmmword ptr [R14] LEA R15,[RSP + 0x30] MOVAPS xmmword ptr [R15],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x00184776 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x00184776 MOV RDI,qword ptr [RBX] MOV RSI,R15 CALL 0x001868e2 MOV RDI,R15 XOR ESI,ESI CALL 0x00184776 MOV RDI,R15 CALL 0x00188e90 MOV R14,qword ptr [RBX] JMP 0x001882ea LAB_00188211: MOV RAX,qword ptr [RBX + 0x58] MOV ECX,dword ptr [RBX + 0x60] CMP qword ptr [RBX + 0x48],RAX SETZ DL TEST ECX,ECX SETZ SIL AND SIL,DL CMP SIL,0x1 JZ 0x0018834e MOV ESI,ECX LEA RCX,[RSI + -0x1] MOV RDX,RSI ADD RDX,0x3e TEST RCX,RCX CMOVNS RDX,RCX SAR RDX,0x6 LEA RDI,[RAX + RDX*0x8] LEA RDX,[R14 + 0x3f] AND RDX,RCX XOR R8D,R8D CMP RDX,R14 SETBE R8B MOV EDX,0x1 SHL RDX,CL AND RDX,qword ptr [RDI + R8*0x8 + -0x8] SUB ESI,0x1 MOV dword ptr [RBX + 0x60],ESI JNC 0x00188283 MOV dword ptr [RBX + 0x60],0x3f ADD RAX,-0x8 MOV qword ptr [RBX + 0x58],RAX LAB_00188283: TEST RDX,RDX JZ 0x001882ee CMP qword ptr [RBX + 0x70],0x0 JZ 0x0018836f LEA R14,[RSP + 0x8] MOVUPS XMM0,xmmword ptr [R14] LEA R15,[RSP + 0x20] MOVAPS xmmword ptr [R15],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x00184776 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x00184776 MOV RDI,qword ptr [RBX + 0x70] MOV RSI,R15 CALL 0x001868e2 MOV RDI,R15 XOR ESI,ESI CALL 0x00184776 MOV RDI,R15 CALL 0x00188e90 MOV R14,qword ptr [RBX + 0x70] LAB_001882ea: MOV BL,0x1 JMP 0x001882f3 LAB_001882ee: XOR EBX,EBX XOR R14D,R14D LAB_001882f3: LEA R15,[RSP + 0x8] MOV RDI,R15 XOR ESI,ESI CALL 0x00184776 MOV RDI,R15 CALL 0x00188e90 LAB_0018830a: MOV EAX,EBX MOV RDX,R14 ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_0018831a: LEA RDI,[0x21b512] LEA RDX,[0x214131] LEA RCX,[0x21c468] MOV ESI,0x1c28 XOR EAX,EAX CALL 0x00121e60 LAB_0018833b: CALL 0x00122280 LAB_00188340: LEA RCX,[0x21c47c] MOV ESI,0x1c4b JMP 0x0018835a LAB_0018834e: LEA RCX,[0x21c4ba] MOV ESI,0x1c57 LAB_0018835a: LEA RDI,[0x21b512] LEA RDX,[0x214131] XOR EAX,EAX CALL 0x00121e60 LAB_0018836f: LEA RDI,[0x21b512] LEA RDX,[0x214131] LEA RCX,[0x21c4d2] MOV ESI,0x1c60 XOR EAX,EAX CALL 0x00121e60
/* std::pair<bool, 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_sax_dom_callback_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> >::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t>(nlohmann::json_abi_v3_11_3::detail::value_t&&, bool) */ int1 [16] __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_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>> ::handle_value<nlohmann::json_abi_v3_11_3::detail::value_t> (json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this,value_t *param_1,bool param_2) { uint uVar1; char cVar2; ulong uVar3; char *pcVar4; ulong uVar5; int8 uVar6; bool bVar7; long lVar8; int1 auVar9 [16]; int1 local_61; basic_json local_60; int7 uStack_5f; int8 uStack_58; int4 local_4c; int8 local_48; int8 uStack_40; int8 local_38; int8 uStack_30; uVar1 = *(uint *)(this + 0x38); if (uVar1 == 0 && *(long *)(this + 0x20) == *(long *)(this + 0x30)) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c28, "GGML_ASSERT(%s) failed","!keep_stack.empty()"); } uVar5 = (ulong)uVar1 - 1; uVar3 = (ulong)uVar1 + 0x3e; if (-1 < (long)uVar5) { uVar3 = uVar5; } if ((*(ulong *)(*(long *)(this + 0x30) + ((long)uVar3 >> 6) * 8 + -8 + (ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8) >> (uVar5 & 0x3f) & 1) == 0) { uVar5 = 0; lVar8 = 0; goto LAB_0018830a; } local_60 = (basic_json)*param_1; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::json_value::json_value(); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_60,0)); if (param_2) { LAB_0018815a: if (*(long *)(this + 8) == *(long *)(this + 0x10)) { local_38 = CONCAT71(uStack_5f,local_60); uStack_30 = uStack_58; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_60,0)); local_60 = (basic_json)0x0; uStack_58 = 0; bVar7 = SUB81((data *)&local_38,0); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)this,(data *)&local_38); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_38); lVar8 = *(long *)this; } else { pcVar4 = *(char **)(*(long *)(this + 0x10) + -8); if (pcVar4 == (char *)0x0) goto LAB_001882ee; if (*pcVar4 == '\x01') { lVar8 = *(long *)(this + 0x58); uVar1 = *(uint *)(this + 0x60); if (uVar1 == 0 && *(long *)(this + 0x48) == lVar8) { pcVar4 = "!key_keep_stack.empty()"; uVar6 = 0x1c57; goto LAB_0018835a; } uVar5 = (ulong)uVar1 - 1; uVar3 = (ulong)uVar1 + 0x3e; if (-1 < (long)uVar5) { uVar3 = uVar5; } uVar3 = *(ulong *)(lVar8 + ((long)uVar3 >> 6) * 8 + -8 + (ulong)((uVar5 & 0x800000000000003f) < 0x8000000000000001) * 8); *(uint *)(this + 0x60) = uVar1 - 1; if (uVar1 == 0) { *(int4 *)(this + 0x60) = 0x3f; *(long *)(this + 0x58) = lVar8 + -8; } if ((1L << ((byte)uVar5 & 0x3f) & uVar3) == 0) goto LAB_001882ee; if (*(long *)(this + 0x70) == 0) { /* try { // try from 0018836f to 0018838f has its CatchHandler @ 00188390 */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1c60, "GGML_ASSERT(%s) failed","object_element"); } local_48 = CONCAT71(uStack_5f,local_60); uStack_40 = uStack_58; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(&local_60,0)); local_60 = (basic_json)0x0; uStack_58 = 0; bVar7 = SUB81((data *)&local_48,0); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=(*(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> **)(this + 0x70),(data *)&local_48); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar7); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_48); lVar8 = *(long *)(this + 0x70); } else { if (*pcVar4 != '\x02') { pcVar4 = "ref_stack.back()->is_array() || ref_stack.back()->is_object()"; uVar6 = 0x1c4b; LAB_0018835a: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",uVar6, "GGML_ASSERT(%s) failed",pcVar4); } 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>>> :: emplace_back<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<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>>> **)(pcVar4 + 8),&local_60); lVar8 = *(long *)(*(long *)(*(long *)(*(long *)(this + 0x10) + -8) + 8) + 8) + -0x10; } } uVar5 = CONCAT71((int7)((ulong)this >> 8),1); } else { local_4c = (int4)((ulong)(*(long *)(this + 0x10) - *(long *)(this + 8)) >> 3); local_61 = 5; if (*(long *)(this + 0x90) == 0) { /* WARNING: Subroutine does not return */ /* try { // try from 0018833b to 0018836e has its CatchHandler @ 00188392 */ std::__throw_bad_function_call(); } /* try { // try from 0018813d to 00188193 has its CatchHandler @ 00188392 */ cVar2 = (**(code **)(this + 0x98))(this + 0x80,&local_4c,&local_61,&local_60); if (cVar2 != '\0') goto LAB_0018815a; LAB_001882ee: uVar5 = 0; lVar8 = 0; } basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81((data *)&local_60,0)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)&local_60); LAB_0018830a: auVar9._0_8_ = uVar5 & 0xffffffff; auVar9._8_8_ = lVar8; return auVar9; }
50,384
my_scan_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_scan_mb2(CHARSET_INFO *cs __attribute__((unused)), const char *str, const char *end, int sequence_type) { const char *str0= str; my_wc_t wc; my_charset_conv_mb_wc mb_wc= cs->cset->mb_wc; int res; switch (sequence_type) { case MY_SEQ_SPACES: for (res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end); res > 0 && wc == ' '; str+= res, res= mb_wc(cs, &wc, (const uchar *) str, (const uchar *) end)) { } return (size_t) (str - str0); case MY_SEQ_NONSPACES: DBUG_ASSERT(0); /* Not implemented */ /* pass through */ default: return 0; } }
O0
c
my_scan_mb2: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x40(%rbp) movl -0x24(%rbp), %eax movl %eax, -0x48(%rbp) subl $0x2, %eax je 0xaa929 jmp 0xaa91f movl -0x48(%rbp), %eax subl $0x3, %eax je 0xaa9a0 jmp 0xaa9a6 movq -0x40(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx leaq -0x38(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) xorl %eax, %eax cmpl $0x0, -0x44(%rbp) movb %al, -0x49(%rbp) jle 0xaa958 cmpq $0x20, -0x38(%rbp) sete %al movb %al, -0x49(%rbp) movb -0x49(%rbp), %al testb $0x1, %al jne 0xaa961 jmp 0xaa98f jmp 0xaa963 movl -0x44(%rbp), %ecx movq -0x18(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) movq -0x40(%rbp), %rax movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx movq -0x20(%rbp), %rcx leaq -0x38(%rbp), %rsi callq *%rax movl %eax, -0x44(%rbp) jmp 0xaa942 movq -0x18(%rbp), %rax movq -0x30(%rbp), %rcx subq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xaa9ae jmp 0xaa9a2 jmp 0xaa9a4 jmp 0xaa9a6 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopl (%rax,%rax)
my_scan_mb2: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov rax, [rbp+var_18] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_40], rax mov eax, [rbp+var_24] mov [rbp+var_48], eax sub eax, 2 jz short loc_AA929 jmp short $+2 loc_AA91F: mov eax, [rbp+var_48] sub eax, 3 jz short loc_AA9A0 jmp short loc_AA9A6 loc_AA929: mov rax, [rbp+var_40] mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] lea rsi, [rbp+var_38] call rax mov [rbp+var_44], eax loc_AA942: xor eax, eax cmp [rbp+var_44], 0 mov [rbp+var_49], al jle short loc_AA958 cmp [rbp+var_38], 20h ; ' ' setz al mov [rbp+var_49], al loc_AA958: mov al, [rbp+var_49] test al, 1 jnz short loc_AA961 jmp short loc_AA98F loc_AA961: jmp short $+2 loc_AA963: mov ecx, [rbp+var_44] mov rax, [rbp+var_18] movsxd rcx, ecx add rax, rcx mov [rbp+var_18], rax mov rax, [rbp+var_40] mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] mov rcx, [rbp+var_20] lea rsi, [rbp+var_38] call rax mov [rbp+var_44], eax jmp short loc_AA942 loc_AA98F: mov rax, [rbp+var_18] mov rcx, [rbp+var_30] sub rax, rcx mov [rbp+var_8], rax jmp short loc_AA9AE loc_AA9A0: jmp short $+2 loc_AA9A2: jmp short $+2 loc_AA9A4: jmp short $+2 loc_AA9A6: mov [rbp+var_8], 0 loc_AA9AE: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
long long my_scan_mb2(long long a1, long long a2, long long a3, int a4) { bool v5; // [rsp+7h] [rbp-49h] int i; // [rsp+Ch] [rbp-44h] long long ( *v7)(long long, long long *, long long, long long); // [rsp+10h] [rbp-40h] long long v8; // [rsp+18h] [rbp-38h] BYREF long long v9; // [rsp+20h] [rbp-30h] int v10; // [rsp+2Ch] [rbp-24h] long long v11; // [rsp+30h] [rbp-20h] long long v12; // [rsp+38h] [rbp-18h] long long v13; // [rsp+40h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = a2; v7 = *(long long ( **)(long long, long long *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL); if ( a4 != 2 ) return 0LL; for ( i = v7(v13, &v8, v12, v11); ; i = v7(v13, &v8, v12, v11) ) { v5 = 0; if ( i > 0 ) v5 = v8 == 32; if ( !v5 ) break; v12 += i; } return v12 - v9; }
my_scan_mb2: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x40],RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x48],EAX SUB EAX,0x2 JZ 0x001aa929 JMP 0x001aa91f LAB_001aa91f: MOV EAX,dword ptr [RBP + -0x48] SUB EAX,0x3 JZ 0x001aa9a0 JMP 0x001aa9a6 LAB_001aa929: MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x38] CALL RAX MOV dword ptr [RBP + -0x44],EAX LAB_001aa942: XOR EAX,EAX CMP dword ptr [RBP + -0x44],0x0 MOV byte ptr [RBP + -0x49],AL JLE 0x001aa958 CMP qword ptr [RBP + -0x38],0x20 SETZ AL MOV byte ptr [RBP + -0x49],AL LAB_001aa958: MOV AL,byte ptr [RBP + -0x49] TEST AL,0x1 JNZ 0x001aa961 JMP 0x001aa98f LAB_001aa961: JMP 0x001aa963 LAB_001aa963: MOV ECX,dword ptr [RBP + -0x44] MOV RAX,qword ptr [RBP + -0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x40] MOV RDI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x20] LEA RSI,[RBP + -0x38] CALL RAX MOV dword ptr [RBP + -0x44],EAX JMP 0x001aa942 LAB_001aa98f: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x30] SUB RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001aa9ae LAB_001aa9a0: JMP 0x001aa9a2 LAB_001aa9a2: JMP 0x001aa9a4 LAB_001aa9a4: JMP 0x001aa9a6 LAB_001aa9a6: MOV qword ptr [RBP + -0x8],0x0 LAB_001aa9ae: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
long my_scan_mb2(long param_1,long param_2,int8 param_3,int param_4) { code *pcVar1; int local_4c; long local_40; long local_38; int local_2c; int8 local_28; long local_20; long local_18; long local_10; pcVar1 = *(code **)(*(long *)(param_1 + 0xb8) + 0x28); if (param_4 == 2) { local_38 = param_2; local_2c = param_4; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_4c = (*pcVar1)(param_1,&local_40,param_2,param_3); while (0 < local_4c && local_40 == 0x20) { local_20 = local_20 + local_4c; local_4c = (*pcVar1)(local_18,&local_40,local_20,local_28); } local_10 = local_20 - local_38; } else { local_10 = 0; } return local_10; }
50,385
test_connection_timeout
eloqsql/libmariadb/unittest/libmariadb/connection.c
int test_connection_timeout(MYSQL *unused __attribute__((unused))) { unsigned int timeout= 5; time_t start, elapsed; MYSQL *mysql= mysql_init(NULL); mysql_options(mysql, MYSQL_OPT_CONNECT_TIMEOUT, (unsigned int *)&timeout); start= time(NULL); if (my_test_connect(mysql, "192.168.1.101", "notexistinguser", "password", schema, port, NULL, CLIENT_REMEMBER_OPTIONS)) { diag("Error expected - maybe you have to change hostname"); return FAIL; } elapsed= time(NULL) - start; diag("elapsed: %lu", (unsigned long)elapsed); mysql_close(mysql); FAIL_IF((unsigned int)elapsed > 2 * timeout, "timeout ignored"); return OK; }
O3
c
test_connection_timeout: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp leaq -0x24(%rbp), %r15 movl $0x5, (%r15) xorl %ebx, %ebx xorl %edi, %edi callq 0x1efb5 movq %rax, %r14 movq %rax, %rdi xorl %esi, %esi movq %r15, %rdx callq 0x23221 xorl %edi, %edi callq 0x13400 movq %rax, %r15 movq 0x3d8dd(%rip), %r8 # 0x52658 movl 0x3d8de(%rip), %r9d # 0x52660 movl $0x80000000, %eax # imm = 0x80000000 leaq 0x2692a(%rip), %rsi # 0x3b6b8 leaq 0x268d0(%rip), %rdx # 0x3b665 leaq 0x27307(%rip), %rcx # 0x3c0a3 movq %r14, %rdi pushq %rax pushq $0x0 callq 0x1422d addq $0x10, %rsp testq %rax, %rax je 0x14dc0 leaq 0x2690f(%rip), %rdi # 0x3b6c6 xorl %eax, %eax callq 0x1bb8f jmp 0x14e11 xorl %edi, %edi callq 0x13400 movq %rax, %r12 subq %r15, %r12 leaq 0x26925(%rip), %rdi # 0x3b6f9 movq %r12, %rsi xorl %eax, %eax callq 0x1bb8f movq %r14, %rdi callq 0x20d0c movl -0x24(%rbp), %eax addl %eax, %eax cmpl %r12d, %eax jae 0x14e16 leaq 0x26211(%rip), %rdi # 0x3b008 leaq 0x26908(%rip), %rsi # 0x3b706 leaq 0x267b0(%rip), %rdx # 0x3b5b5 movl $0x2a1, %ecx # imm = 0x2A1 xorl %eax, %eax callq 0x1bb8f movl $0x1, %ebx movl %ebx, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
test_connection_timeout: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h lea r15, [rbp+var_24] mov dword ptr [r15], 5 xor ebx, ebx xor edi, edi call mysql_init mov r14, rax mov rdi, rax xor esi, esi mov rdx, r15 call mysql_options xor edi, edi call _time mov r15, rax mov r8, cs:schema mov r9d, cs:port mov eax, 80000000h lea rsi, a1921681101; "192.168.1.101" lea rdx, aNotexistinguse; "notexistinguser" lea rcx, aCachingSha2Pas+0Dh; "password" mov rdi, r14 push rax push 0 call my_test_connect add rsp, 10h test rax, rax jz short loc_14DC0 lea rdi, aErrorExpectedM; "Error expected - maybe you have to chan"... xor eax, eax call diag jmp short loc_14E11 loc_14DC0: xor edi, edi call _time mov r12, rax sub r12, r15 lea rdi, aElapsedLu; "elapsed: %lu" mov rsi, r12 xor eax, eax call diag mov rdi, r14 call mysql_close mov eax, [rbp+var_24] add eax, eax cmp eax, r12d jnb short loc_14E16 lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aTimeoutIgnored; "timeout ignored" lea rdx, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 2A1h xor eax, eax call diag loc_14E11: mov ebx, 1 loc_14E16: mov eax, ebx add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long test_connection_timeout() { unsigned int v0; // ebx long long v1; // r14 int v2; // r15d int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d unsigned int v7; // r12d int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d int v12; // r8d int v13; // r9d int v15[9]; // [rsp+Ch] [rbp-24h] BYREF v15[0] = 5; v0 = 0; v1 = mysql_init(0LL); mysql_options(v1, 0LL, v15); v2 = time(0LL); if ( my_test_connect( v1, (int)"192.168.1.101", (int)"notexistinguser", (int)"password", schema, port, 0LL, 0x80000000LL) ) { diag( (unsigned int)"Error expected - maybe you have to change hostname", (unsigned int)"192.168.1.101", v3, v4, v5, v6); return 1; } v7 = time(0LL) - v2; diag((unsigned int)"elapsed: %lu", v7, v8, v9, v10, v11); mysql_close(v1); if ( 2 * v15[0] < v7 ) { diag( (unsigned int)"Error: %s (%s: %d)", (unsigned int)"timeout ignored", (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/connection.c", 673, v12, v13); return 1; } return v0; }
test_connection_timeout: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 LEA R15,[RBP + -0x24] MOV dword ptr [R15],0x5 XOR EBX,EBX XOR EDI,EDI CALL 0x0011efb5 MOV R14,RAX MOV RDI,RAX XOR ESI,ESI MOV RDX,R15 CALL 0x00123221 XOR EDI,EDI CALL 0x00113400 MOV R15,RAX MOV R8,qword ptr [0x00152658] MOV R9D,dword ptr [0x00152660] MOV EAX,0x80000000 LEA RSI,[0x13b6b8] LEA RDX,[0x13b665] LEA RCX,[0x13c0a3] MOV RDI,R14 PUSH RAX PUSH 0x0 CALL 0x0011422d ADD RSP,0x10 TEST RAX,RAX JZ 0x00114dc0 LEA RDI,[0x13b6c6] XOR EAX,EAX CALL 0x0011bb8f JMP 0x00114e11 LAB_00114dc0: XOR EDI,EDI CALL 0x00113400 MOV R12,RAX SUB R12,R15 LEA RDI,[0x13b6f9] MOV RSI,R12 XOR EAX,EAX CALL 0x0011bb8f MOV RDI,R14 CALL 0x00120d0c MOV EAX,dword ptr [RBP + -0x24] ADD EAX,EAX CMP EAX,R12D JNC 0x00114e16 LEA RDI,[0x13b008] LEA RSI,[0x13b706] LEA RDX,[0x13b5b5] MOV ECX,0x2a1 XOR EAX,EAX CALL 0x0011bb8f LAB_00114e11: MOV EBX,0x1 LAB_00114e16: MOV EAX,EBX ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 test_connection_timeout(void) { int8 uVar1; time_t tVar2; long lVar3; time_t tVar4; int local_2c; local_2c = 5; uVar1 = mysql_init(0); mysql_options(uVar1,0,&local_2c); tVar2 = time((time_t *)0x0); lVar3 = my_test_connect(uVar1,"192.168.1.101","notexistinguser","password",schema,port,0, 0x80000000); if (lVar3 == 0) { tVar4 = time((time_t *)0x0); diag("elapsed: %lu",tVar4 - tVar2); mysql_close(uVar1); if ((uint)(tVar4 - tVar2) <= (uint)(local_2c * 2)) { return 0; } diag("Error: %s (%s: %d)","timeout ignored", "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/connection.c", 0x2a1); } else { diag("Error expected - maybe you have to change hostname"); } return 1; }
50,386
my_like_range_simple
eloqsql/strings/ctype-simple.c
my_bool my_like_range_simple(CHARSET_INFO *cs, const char *ptr, size_t ptr_length, pbool escape, pbool w_one, pbool w_many, size_t res_length, char *min_str,char *max_str, size_t *min_length, size_t *max_length) { const char *end= ptr + ptr_length; char *min_org=min_str; char *min_end=min_str+res_length; size_t charlen= res_length / cs->mbmaxlen; for (; ptr != end && min_str != min_end && charlen > 0 ; ptr++, charlen--) { if (*ptr == escape && ptr+1 != end) { ptr++; /* Skip escape */ *min_str++= *max_str++ = *ptr; continue; } if (*ptr == w_one) /* '_' in SQL */ { *min_str++='\0'; /* This should be min char */ *max_str++= (char) cs->max_sort_char; continue; } if (*ptr == w_many) /* '%' in SQL */ { /* Calculate length of keys */ *min_length= (cs->state & (MY_CS_BINSORT | MY_CS_NOPAD)) ? (size_t) (min_str - min_org) : res_length; *max_length= res_length; do { *min_str++= 0; *max_str++= (char) cs->max_sort_char; } while (min_str != min_end); return 0; } *min_str++= *max_str++ = *ptr; } *min_length= *max_length = (size_t) (min_str - min_org); while (min_str != min_end) *min_str++= *max_str++ = ' '; /* Because if key compression */ return 0; }
O0
c
my_like_range_simple: pushq %rbp movq %rsp, %rbp movl %r8d, -0x60(%rbp) movl %ecx, %eax movl -0x60(%rbp), %ecx movl %eax, -0x5c(%rbp) movq %rdx, %rax movl -0x5c(%rbp), %edx movq %rax, -0x58(%rbp) movq %rsi, %rax movq -0x58(%rbp), %rsi movq %rax, -0x50(%rbp) movq %rdi, %r8 movq -0x50(%rbp), %rdi movb %r9b, %al movq 0x30(%rbp), %r9 movq 0x28(%rbp), %r9 movq 0x20(%rbp), %r9 movq 0x18(%rbp), %r9 movq 0x10(%rbp), %r9 movq %r8, -0x10(%rbp) movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movb %dl, -0x21(%rbp) movb %cl, -0x22(%rbp) movb %al, -0x23(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x30(%rbp) movq 0x18(%rbp), %rax movq %rax, -0x38(%rbp) movq 0x18(%rbp), %rax addq 0x10(%rbp), %rax movq %rax, -0x40(%rbp) movq 0x10(%rbp), %rax movq -0x10(%rbp), %rcx movl 0x9c(%rcx), %ecx xorl %edx, %edx divq %rcx movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x30(%rbp), %rcx movb %al, -0x61(%rbp) je 0x795f8 movq 0x18(%rbp), %rcx xorl %eax, %eax cmpq -0x40(%rbp), %rcx movb %al, -0x61(%rbp) je 0x795f8 cmpq $0x0, -0x48(%rbp) seta %al movb %al, -0x61(%rbp) movb -0x61(%rbp), %al testb $0x1, %al jne 0x79604 jmp 0x79779 movq -0x18(%rbp), %rax movsbl (%rax), %eax movsbl -0x21(%rbp), %ecx cmpl %ecx, %eax jne 0x7965a movq -0x18(%rbp), %rax addq $0x1, %rax cmpq -0x30(%rbp), %rax je 0x7965a movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movb (%rax), %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq 0x18(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x18(%rbp) movb %cl, (%rax) jmp 0x7975c movq -0x18(%rbp), %rax movsbl (%rax), %eax movsbl -0x22(%rbp), %ecx cmpl %ecx, %eax jne 0x7969e movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x0, (%rax) movq -0x10(%rbp), %rax movq 0xa8(%rax), %rax movb %al, %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) jmp 0x7975c movq -0x18(%rbp), %rax movsbl (%rax), %eax movsbl -0x23(%rbp), %ecx cmpl %ecx, %eax jne 0x79734 movq -0x10(%rbp), %rax movl 0xc(%rax), %eax andl $0x20010, %eax # imm = 0x20010 cmpl $0x0, %eax je 0x796d3 movq 0x18(%rbp), %rax movq -0x38(%rbp), %rcx subq %rcx, %rax movq %rax, -0x70(%rbp) jmp 0x796db movq 0x10(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rcx movq 0x28(%rbp), %rax movq %rcx, (%rax) movq 0x10(%rbp), %rcx movq 0x30(%rbp), %rax movq %rcx, (%rax) movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x0, (%rax) movq -0x10(%rbp), %rax movq 0xa8(%rax), %rax movb %al, %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq 0x18(%rbp), %rax cmpq -0x40(%rbp), %rax jne 0x796f1 movb $0x0, -0x1(%rbp) jmp 0x797c6 movq -0x18(%rbp), %rax movb (%rax), %cl movq 0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x20(%rbp) movb %cl, (%rax) movq 0x18(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0x18(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) movq -0x48(%rbp), %rax addq $-0x1, %rax movq %rax, -0x48(%rbp) jmp 0x795cf movq 0x18(%rbp), %rcx movq -0x38(%rbp), %rax subq %rax, %rcx movq 0x30(%rbp), %rax movq %rcx, (%rax) movq 0x28(%rbp), %rax movq %rcx, (%rax) movq 0x18(%rbp), %rax cmpq -0x40(%rbp), %rax je 0x797c2 movq 0x20(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x20(%rbp) movb $0x20, (%rax) movq 0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, 0x18(%rbp) movb $0x20, (%rax) jmp 0x79792 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al popq %rbp retq nopl (%rax,%rax)
my_like_range_simple: push rbp mov rbp, rsp mov [rbp+var_60], r8d mov eax, ecx mov ecx, [rbp+var_60] mov [rbp+var_5C], eax mov rax, rdx mov edx, [rbp+var_5C] mov [rbp+var_58], rax mov rax, rsi mov rsi, [rbp+var_58] mov [rbp+var_50], rax mov r8, rdi mov rdi, [rbp+var_50] mov al, r9b mov r9, [rbp+arg_20] mov r9, [rbp+arg_18] mov r9, [rbp+arg_10] mov r9, [rbp+arg_8] mov r9, [rbp+arg_0] mov [rbp+var_10], r8 mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov [rbp+var_21], dl mov [rbp+var_22], cl mov [rbp+var_23], al mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_30], rax mov rax, [rbp+arg_8] mov [rbp+var_38], rax mov rax, [rbp+arg_8] add rax, [rbp+arg_0] mov [rbp+var_40], rax mov rax, [rbp+arg_0] mov rcx, [rbp+var_10] mov ecx, [rcx+9Ch] xor edx, edx div rcx mov [rbp+var_48], rax loc_795CF: mov rcx, [rbp+var_18] xor eax, eax cmp rcx, [rbp+var_30] mov [rbp+var_61], al jz short loc_795F8 mov rcx, [rbp+arg_8] xor eax, eax cmp rcx, [rbp+var_40] mov [rbp+var_61], al jz short loc_795F8 cmp [rbp+var_48], 0 setnbe al mov [rbp+var_61], al loc_795F8: mov al, [rbp+var_61] test al, 1 jnz short loc_79604 jmp loc_79779 loc_79604: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_21] cmp eax, ecx jnz short loc_7965A mov rax, [rbp+var_18] add rax, 1 cmp rax, [rbp+var_30] jz short loc_7965A mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rax, [rbp+var_18] mov cl, [rax] mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+arg_8] mov rdx, rax add rdx, 1 mov [rbp+arg_8], rdx mov [rax], cl jmp loc_7975C loc_7965A: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_22] cmp eax, ecx jnz short loc_7969E mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rax, [rax+0A8h] mov cl, al mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl jmp loc_7975C loc_7969E: mov rax, [rbp+var_18] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_23] cmp eax, ecx jnz loc_79734 mov rax, [rbp+var_10] mov eax, [rax+0Ch] and eax, 20010h cmp eax, 0 jz short loc_796D3 mov rax, [rbp+arg_8] mov rcx, [rbp+var_38] sub rax, rcx mov [rbp+var_70], rax jmp short loc_796DB loc_796D3: mov rax, [rbp+arg_0] mov [rbp+var_70], rax loc_796DB: mov rcx, [rbp+var_70] mov rax, [rbp+arg_18] mov [rax], rcx mov rcx, [rbp+arg_0] mov rax, [rbp+arg_20] mov [rax], rcx loc_796F1: mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_10] mov rax, [rax+0A8h] mov cl, al mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+arg_8] cmp rax, [rbp+var_40] jnz short loc_796F1 mov [rbp+var_1], 0 jmp loc_797C6 loc_79734: mov rax, [rbp+var_18] mov cl, [rax] mov rax, [rbp+arg_10] mov rdx, rax add rdx, 1 mov [rbp+arg_10], rdx mov [rax], cl mov rax, [rbp+arg_8] mov rdx, rax add rdx, 1 mov [rbp+arg_8], rdx mov [rax], cl loc_7975C: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax mov rax, [rbp+var_48] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_48], rax jmp loc_795CF loc_79779: mov rcx, [rbp+arg_8] mov rax, [rbp+var_38] sub rcx, rax mov rax, [rbp+arg_20] mov [rax], rcx mov rax, [rbp+arg_18] mov [rax], rcx loc_79792: mov rax, [rbp+arg_8] cmp rax, [rbp+var_40] jz short loc_797C2 mov rax, [rbp+arg_10] mov rcx, rax add rcx, 1 mov [rbp+arg_10], rcx mov byte ptr [rax], 20h ; ' ' mov rax, [rbp+arg_8] mov rcx, rax add rcx, 1 mov [rbp+arg_8], rcx mov byte ptr [rax], 20h ; ' ' jmp short loc_79792 loc_797C2: mov [rbp+var_1], 0 loc_797C6: mov al, [rbp+var_1] pop rbp retn
char my_like_range_simple( long long a1, _BYTE *a2, long long a3, char a4, char a5, char a6, unsigned long long a7, _BYTE *a8, _BYTE *a9, unsigned long long *a10, _QWORD *a11) { char v11; // cl _BYTE *v12; // rax _BYTE *v13; // rax _BYTE *v14; // rax _BYTE *v15; // rax _BYTE *v16; // rax _BYTE *v17; // rax char v18; // cl _BYTE *v19; // rax _BYTE *v20; // rax _BYTE *v21; // rax _BYTE *v22; // rax unsigned long long v24; // [rsp+0h] [rbp-70h] bool v25; // [rsp+Fh] [rbp-61h] unsigned long long i; // [rsp+28h] [rbp-48h] _BYTE *v27; // [rsp+30h] [rbp-40h] long long v28; // [rsp+38h] [rbp-38h] _BYTE *v29; // [rsp+40h] [rbp-30h] _BYTE *v31; // [rsp+58h] [rbp-18h] v31 = a2; v29 = &a2[a3]; v28 = (long long)a8; v27 = &a8[a7]; for ( i = a7 / *(unsigned int *)(a1 + 156); ; --i ) { v25 = 0; if ( v31 != v29 ) { v25 = 0; if ( a8 != v27 ) v25 = i != 0; } if ( !v25 ) { *a11 = &a8[-v28]; *a10 = (unsigned long long)&a8[-v28]; while ( a8 != v27 ) { v21 = a9++; *v21 = 32; v22 = a8++; *v22 = 32; } return 0; } if ( (char)*v31 == a4 && v31 + 1 != v29 ) { v11 = *++v31; v12 = a9++; *v12 = *v31; v13 = a8++; *v13 = v11; goto LABEL_19; } if ( (char)*v31 == a5 ) { v14 = a8++; *v14 = 0; v15 = a9++; *v15 = *(_QWORD *)(a1 + 168); goto LABEL_19; } if ( (char)*v31 == a6 ) break; v18 = *v31; v19 = a9++; *v19 = *v31; v20 = a8++; *v20 = v18; LABEL_19: ++v31; } if ( (*(_DWORD *)(a1 + 12) & 0x20010) != 0 ) v24 = (unsigned long long)&a8[-v28]; else v24 = a7; *a10 = v24; *a11 = a7; do { v16 = a8++; *v16 = 0; v17 = a9++; *v17 = *(_QWORD *)(a1 + 168); } while ( a8 != v27 ); return 0; }
my_like_range_simple: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x60],R8D MOV EAX,ECX MOV ECX,dword ptr [RBP + -0x60] MOV dword ptr [RBP + -0x5c],EAX MOV RAX,RDX MOV EDX,dword ptr [RBP + -0x5c] MOV qword ptr [RBP + -0x58],RAX MOV RAX,RSI MOV RSI,qword ptr [RBP + -0x58] MOV qword ptr [RBP + -0x50],RAX MOV R8,RDI MOV RDI,qword ptr [RBP + -0x50] MOV AL,R9B MOV R9,qword ptr [RBP + 0x30] MOV R9,qword ptr [RBP + 0x28] MOV R9,qword ptr [RBP + 0x20] MOV R9,qword ptr [RBP + 0x18] MOV R9,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],R8 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV byte ptr [RBP + -0x21],DL MOV byte ptr [RBP + -0x22],CL MOV byte ptr [RBP + -0x23],AL MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + 0x18] ADD RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + 0x10] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x9c] XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x48],RAX LAB_001795cf: MOV RCX,qword ptr [RBP + -0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x30] MOV byte ptr [RBP + -0x61],AL JZ 0x001795f8 MOV RCX,qword ptr [RBP + 0x18] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x40] MOV byte ptr [RBP + -0x61],AL JZ 0x001795f8 CMP qword ptr [RBP + -0x48],0x0 SETA AL MOV byte ptr [RBP + -0x61],AL LAB_001795f8: MOV AL,byte ptr [RBP + -0x61] TEST AL,0x1 JNZ 0x00179604 JMP 0x00179779 LAB_00179604: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x21] CMP EAX,ECX JNZ 0x0017965a MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x30] JZ 0x0017965a MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x18],RDX MOV byte ptr [RAX],CL JMP 0x0017975c LAB_0017965a: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x22] CMP EAX,ECX JNZ 0x0017969e MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa8] 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 JMP 0x0017975c LAB_0017969e: MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x23] CMP EAX,ECX JNZ 0x00179734 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x20010 CMP EAX,0x0 JZ 0x001796d3 MOV RAX,qword ptr [RBP + 0x18] MOV RCX,qword ptr [RBP + -0x38] SUB RAX,RCX MOV qword ptr [RBP + -0x70],RAX JMP 0x001796db LAB_001796d3: MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x70],RAX LAB_001796db: MOV RCX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],RCX LAB_001796f1: MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0xa8] 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 RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x40] JNZ 0x001796f1 MOV byte ptr [RBP + -0x1],0x0 JMP 0x001797c6 LAB_00179734: MOV RAX,qword ptr [RBP + -0x18] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + 0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + 0x18] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + 0x18],RDX MOV byte ptr [RAX],CL LAB_0017975c: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,-0x1 MOV qword ptr [RBP + -0x48],RAX JMP 0x001795cf LAB_00179779: MOV RCX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + -0x38] SUB RCX,RAX MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX LAB_00179792: MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x40] JZ 0x001797c2 MOV RAX,qword ptr [RBP + 0x20] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x20],RCX MOV byte ptr [RAX],0x20 MOV RAX,qword ptr [RBP + 0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + 0x18],RCX MOV byte ptr [RAX],0x20 JMP 0x00179792 LAB_001797c2: MOV byte ptr [RBP + -0x1],0x0 LAB_001797c6: MOV AL,byte ptr [RBP + -0x1] POP RBP RET
int8 my_like_range_simple (long param_1,char *param_2,long param_3,char param_4,char param_5,char param_6, ulong param_7,char *param_8,char *param_9,ulong *param_10,ulong *param_11) { char cVar1; char *pcVar2; char *pcVar3; ulong uVar4; bool bVar5; ulong local_78; ulong local_50; char *local_20; pcVar3 = param_8; pcVar2 = param_8 + param_7; local_50 = param_7 / *(uint *)(param_1 + 0x9c); local_20 = param_2; while( true ) { bVar5 = false; if ((local_20 != param_2 + param_3) && (bVar5 = false, param_8 != pcVar2)) { bVar5 = local_50 != 0; } if (!bVar5) break; if ((*local_20 == param_4) && (local_20 + 1 != param_2 + param_3)) { local_20 = local_20 + 1; cVar1 = *local_20; *param_9 = cVar1; *param_8 = cVar1; } else if (*local_20 == param_5) { *param_8 = '\0'; *param_9 = (char)*(int8 *)(param_1 + 0xa8); } else { if (*local_20 == param_6) { if ((*(uint *)(param_1 + 0xc) & 0x20010) == 0) { local_78 = param_7; } else { local_78 = (long)param_8 - (long)pcVar3; } *param_10 = local_78; *param_11 = param_7; do { pcVar3 = param_8 + 1; *param_8 = '\0'; *param_9 = (char)*(int8 *)(param_1 + 0xa8); param_8 = pcVar3; param_9 = param_9 + 1; } while (pcVar3 != pcVar2); return 0; } cVar1 = *local_20; *param_9 = cVar1; *param_8 = cVar1; } param_9 = param_9 + 1; param_8 = param_8 + 1; local_20 = local_20 + 1; local_50 = local_50 - 1; } uVar4 = (long)param_8 - (long)pcVar3; *param_11 = uVar4; *param_10 = uVar4; while (param_8 != pcVar2) { *param_9 = ' '; *param_8 = ' '; param_8 = param_8 + 1; param_9 = param_9 + 1; } return 0; }
50,387
common_log::set_file(char const*)
monkey531[P]llama/common/log.cpp
void set_file(const char * path) { pause(); if (file) { fclose(file); } if (path) { file = fopen(path, "w"); } else { file = nullptr; } resume(); }
O2
cpp
common_log::set_file(char const*): pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx callq 0x970d6 movq 0x60(%rbx), %rdi testq %rdi, %rdi je 0x973fd callq 0x238e0 testq %r14, %r14 je 0x97413 leaq 0x15de1(%rip), %rsi # 0xad1ea movq %r14, %rdi callq 0x23a90 jmp 0x97415 xorl %eax, %eax movq %rax, 0x60(%rbx) movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x9714c
_ZN10common_log8set_fileEPKc: push r14 push rbx push rax mov r14, rsi mov rbx, rdi call _ZN10common_log5pauseEv; common_log::pause(void) mov rdi, [rbx+60h] test rdi, rdi jz short loc_973FD call _fclose loc_973FD: test r14, r14 jz short loc_97413 lea rsi, aGrpAttnW+0Bh; "w" mov rdi, r14 call _fopen jmp short loc_97415 loc_97413: xor eax, eax loc_97415: mov [rbx+60h], rax mov rdi, rbx; this add rsp, 8 pop rbx pop r14 jmp _ZN10common_log6resumeEv; common_log::resume(void)
long long common_log::set_file(common_log *this, const char *a2) { long long v3; // rdi long long v4; // rax common_log::pause(this); v3 = *((_QWORD *)this + 12); if ( v3 ) fclose(v3); if ( a2 ) v4 = fopen(a2, "w"); else v4 = 0LL; *((_QWORD *)this + 12) = v4; return common_log::resume(this); }
set_file: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI CALL 0x001970d6 MOV RDI,qword ptr [RBX + 0x60] TEST RDI,RDI JZ 0x001973fd CALL 0x001238e0 LAB_001973fd: TEST R14,R14 JZ 0x00197413 LEA RSI,[0x1ad1ea] MOV RDI,R14 CALL 0x00123a90 JMP 0x00197415 LAB_00197413: XOR EAX,EAX LAB_00197415: MOV qword ptr [RBX + 0x60],RAX MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x0019714c
/* common_log::set_file(char const*) */ void __thiscall common_log::set_file(common_log *this,char *param_1) { FILE *pFVar1; pause(this); if (*(FILE **)(this + 0x60) != (FILE *)0x0) { fclose(*(FILE **)(this + 0x60)); } if (param_1 == (char *)0x0) { pFVar1 = (FILE *)0x0; } else { pFVar1 = fopen(param_1,"w"); } *(FILE **)(this + 0x60) = pFVar1; resume(this); return; }
50,388
rtree_add_key
eloqsql/storage/myisam/rt_key.c
int rtree_add_key(MI_INFO *info, MI_KEYDEF *keyinfo, uchar *key, uint key_length, uchar *page_buf, my_off_t *new_page) { uint page_size = mi_getint(page_buf); uint nod_flag = mi_test_if_nod(page_buf); DBUG_ENTER("rtree_add_key"); if (page_size + key_length + info->s->base.rec_reflength <= keyinfo->block_length) { /* split won't be necessary */ if (nod_flag) { /* save key */ DBUG_ASSERT(_mi_kpos(nod_flag, key) < info->state->key_file_length); memcpy(rt_PAGE_END(page_buf), key - nod_flag, key_length + nod_flag); page_size += key_length + nod_flag; } else { /* save key */ DBUG_ASSERT(_mi_dpos(info, nod_flag, key + key_length + info->s->base.rec_reflength) < info->state->data_file_length + info->s->base.pack_reclength); memcpy(rt_PAGE_END(page_buf), key, key_length + info->s->base.rec_reflength); page_size += key_length + info->s->base.rec_reflength; } mi_putint(page_buf, page_size, nod_flag); DBUG_RETURN(0); } DBUG_RETURN((rtree_split_page(info, keyinfo, page_buf, key, key_length, new_page) ? -1 : 1)); }
O0
c
rtree_add_key: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x30(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x30(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF movl %eax, -0x3c(%rbp) movq -0x30(%rbp), %rax movzbl (%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xcae97 movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x17c(%rax), %eax movl %eax, -0x4c(%rbp) jmp 0xcae9e xorl %eax, %eax movl %eax, -0x4c(%rbp) jmp 0xcae9e movl -0x4c(%rbp), %eax movl %eax, -0x40(%rbp) movl -0x3c(%rbp), %eax addl -0x24(%rbp), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx addl 0x178(%rcx), %eax movq -0x18(%rbp), %rcx movzwl 0xe(%rcx), %ecx cmpl %ecx, %eax ja 0xcafd2 cmpl $0x0, -0x40(%rbp) je 0xcaf2a jmp 0xcaecf jmp 0xcaed1 movq -0x30(%rbp), %rdi movq -0x30(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x30(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF movl %eax, %eax addq %rax, %rdi movq -0x20(%rbp), %rsi movl -0x40(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax addq %rax, %rsi movl -0x24(%rbp), %eax addl -0x40(%rbp), %eax movl %eax, %eax movl %eax, %edx callq 0x2a090 movl -0x24(%rbp), %eax addl -0x40(%rbp), %eax addl -0x3c(%rbp), %eax movl %eax, -0x3c(%rbp) jmp 0xcaf8c jmp 0xcaf2c jmp 0xcaf2e movq -0x30(%rbp), %rdi movq -0x30(%rbp), %rax movzbl 0x1(%rax), %eax movzwl %ax, %eax movq -0x30(%rbp), %rcx movzbl (%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax andl $0x7fff, %eax # imm = 0x7FFF movl %eax, %eax addq %rax, %rdi movq -0x20(%rbp), %rsi movl -0x24(%rbp), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx addl 0x178(%rcx), %eax movl %eax, %eax movl %eax, %edx callq 0x2a090 movl -0x24(%rbp), %eax movq -0x10(%rbp), %rcx movq (%rcx), %rcx addl 0x178(%rcx), %eax addl -0x3c(%rbp), %eax movl %eax, -0x3c(%rbp) movl -0x40(%rbp), %edx xorl %eax, %eax movl $0x8000, %ecx # imm = 0x8000 cmpl $0x0, %edx cmovnel %ecx, %eax movl -0x3c(%rbp), %ecx movzwl %cx, %ecx addl %ecx, %eax movw %ax, -0x42(%rbp) movzwl -0x42(%rbp), %eax movl %eax, -0x48(%rbp) movl -0x48(%rbp), %eax movb %al, %cl movq -0x30(%rbp), %rax movb %cl, 0x1(%rax) movl -0x48(%rbp), %eax shrl $0x8, %eax movb %al, %cl movq -0x30(%rbp), %rax movb %cl, (%rax) movl $0x0, -0x4(%rbp) jmp 0xcb006 jmp 0xcafd4 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x30(%rbp), %rdx movq -0x20(%rbp), %rcx movl -0x24(%rbp), %r8d movq -0x38(%rbp), %r9 callq 0xd5280 movl %eax, %edx movl $0x1, %eax movl $0xffffffff, %ecx # imm = 0xFFFFFFFF cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x50, %rsp popq %rbp retq nop
rtree_add_key: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], ecx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_30] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh mov [rbp+var_3C], eax mov rax, [rbp+var_30] movzx eax, byte ptr [rax] and eax, 80h cmp eax, 0 jz short loc_CAE97 mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+17Ch] mov [rbp+var_4C], eax jmp short loc_CAE9E loc_CAE97: xor eax, eax mov [rbp+var_4C], eax jmp short $+2 loc_CAE9E: mov eax, [rbp+var_4C] mov [rbp+var_40], eax mov eax, [rbp+var_3C] add eax, [rbp+var_24] mov rcx, [rbp+var_10] mov rcx, [rcx] add eax, [rcx+178h] mov rcx, [rbp+var_18] movzx ecx, word ptr [rcx+0Eh] cmp eax, ecx ja loc_CAFD2 cmp [rbp+var_40], 0 jz short loc_CAF2A jmp short $+2 loc_CAECF: jmp short $+2 loc_CAED1: mov rdi, [rbp+var_30] mov rax, [rbp+var_30] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh mov eax, eax add rdi, rax mov rsi, [rbp+var_20] mov eax, [rbp+var_40] mov ecx, eax xor eax, eax sub rax, rcx add rsi, rax mov eax, [rbp+var_24] add eax, [rbp+var_40] mov eax, eax mov edx, eax call _memcpy mov eax, [rbp+var_24] add eax, [rbp+var_40] add eax, [rbp+var_3C] mov [rbp+var_3C], eax jmp short loc_CAF8C loc_CAF2A: jmp short $+2 loc_CAF2C: jmp short $+2 loc_CAF2E: mov rdi, [rbp+var_30] mov rax, [rbp+var_30] movzx eax, byte ptr [rax+1] movzx eax, ax mov rcx, [rbp+var_30] movzx ecx, byte ptr [rcx] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax and eax, 7FFFh mov eax, eax add rdi, rax mov rsi, [rbp+var_20] mov eax, [rbp+var_24] mov rcx, [rbp+var_10] mov rcx, [rcx] add eax, [rcx+178h] mov eax, eax mov edx, eax call _memcpy mov eax, [rbp+var_24] mov rcx, [rbp+var_10] mov rcx, [rcx] add eax, [rcx+178h] add eax, [rbp+var_3C] mov [rbp+var_3C], eax loc_CAF8C: mov edx, [rbp+var_40] xor eax, eax mov ecx, 8000h cmp edx, 0 cmovnz eax, ecx mov ecx, [rbp+var_3C] movzx ecx, cx add eax, ecx mov [rbp+var_42], ax movzx eax, [rbp+var_42] mov [rbp+var_48], eax mov eax, [rbp+var_48] mov cl, al mov rax, [rbp+var_30] mov [rax+1], cl mov eax, [rbp+var_48] shr eax, 8 mov cl, al mov rax, [rbp+var_30] mov [rax], cl mov [rbp+var_4], 0 jmp short loc_CB006 loc_CAFD2: jmp short $+2 loc_CAFD4: mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rdx, [rbp+var_30] mov rcx, [rbp+var_20] mov r8d, [rbp+var_24] mov r9, [rbp+var_38] call rtree_split_page mov edx, eax mov eax, 1 mov ecx, 0FFFFFFFFh cmp edx, 0 cmovnz eax, ecx mov [rbp+var_4], eax loc_CB006: mov eax, [rbp+var_4] add rsp, 50h pop rbp retn
long long rtree_add_key(long long a1, long long a2, long long a3, unsigned int a4, long long a5, long long a6) { __int16 v6; // ax int v7; // edx unsigned int v8; // eax unsigned int v10; // [rsp+4h] [rbp-4Ch] int v11; // [rsp+14h] [rbp-3Ch] v11 = _byteswap_ushort(*(_WORD *)a5) & 0x7FFF; if ( (*(_BYTE *)a5 & 0x80) != 0 ) v10 = *(_DWORD *)(*(_QWORD *)a1 + 380LL); else v10 = 0; if ( *(_DWORD *)(*(_QWORD *)a1 + 376LL) + a4 + v11 > *(unsigned __int16 *)(a2 + 14) ) { v7 = rtree_split_page(a1, a2, a5, a3, a4, a6); v8 = 1; if ( v7 ) return (unsigned int)-1; return v8; } else { if ( v10 ) { memcpy((_byteswap_ushort(*(_WORD *)a5) & 0x7FFF) + a5, a3 - v10, v10 + a4); LOWORD(v11) = v11 + v10 + a4; } else { memcpy((_byteswap_ushort(*(_WORD *)a5) & 0x7FFF) + a5, a3, *(_DWORD *)(*(_QWORD *)a1 + 376LL) + a4); v11 += *(_DWORD *)(*(_QWORD *)a1 + 376LL) + a4; } v6 = 0; if ( v10 ) v6 = 0x8000; *(_BYTE *)(a5 + 1) = v11 + v6; *(_BYTE *)a5 = (unsigned __int16)(v11 + v6) >> 8; return 0; } }
rtree_add_key: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],ECX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff MOV dword ptr [RBP + -0x3c],EAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX] AND EAX,0x80 CMP EAX,0x0 JZ 0x001cae97 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x17c] MOV dword ptr [RBP + -0x4c],EAX JMP 0x001cae9e LAB_001cae97: XOR EAX,EAX MOV dword ptr [RBP + -0x4c],EAX JMP 0x001cae9e LAB_001cae9e: MOV EAX,dword ptr [RBP + -0x4c] MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x3c] ADD EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] ADD EAX,dword ptr [RCX + 0x178] MOV RCX,qword ptr [RBP + -0x18] MOVZX ECX,word ptr [RCX + 0xe] CMP EAX,ECX JA 0x001cafd2 CMP dword ptr [RBP + -0x40],0x0 JZ 0x001caf2a JMP 0x001caecf LAB_001caecf: JMP 0x001caed1 LAB_001caed1: MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff MOV EAX,EAX ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x40] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX ADD RSI,RAX MOV EAX,dword ptr [RBP + -0x24] ADD EAX,dword ptr [RBP + -0x40] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a090 MOV EAX,dword ptr [RBP + -0x24] ADD EAX,dword ptr [RBP + -0x40] ADD EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x3c],EAX JMP 0x001caf8c LAB_001caf2a: JMP 0x001caf2c LAB_001caf2c: JMP 0x001caf2e LAB_001caf2e: MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x1] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,byte ptr [RCX] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX AND EAX,0x7fff MOV EAX,EAX ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] ADD EAX,dword ptr [RCX + 0x178] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a090 MOV EAX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] ADD EAX,dword ptr [RCX + 0x178] ADD EAX,dword ptr [RBP + -0x3c] MOV dword ptr [RBP + -0x3c],EAX LAB_001caf8c: MOV EDX,dword ptr [RBP + -0x40] XOR EAX,EAX MOV ECX,0x8000 CMP EDX,0x0 CMOVNZ EAX,ECX MOV ECX,dword ptr [RBP + -0x3c] MOVZX ECX,CX ADD EAX,ECX MOV word ptr [RBP + -0x42],AX MOVZX EAX,word ptr [RBP + -0x42] MOV dword ptr [RBP + -0x48],EAX MOV EAX,dword ptr [RBP + -0x48] MOV CL,AL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX + 0x1],CL MOV EAX,dword ptr [RBP + -0x48] SHR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x30] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x0 JMP 0x001cb006 LAB_001cafd2: JMP 0x001cafd4 LAB_001cafd4: MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x20] MOV R8D,dword ptr [RBP + -0x24] MOV R9,qword ptr [RBP + -0x38] CALL 0x001d5280 MOV EDX,EAX MOV EAX,0x1 MOV ECX,0xffffffff CMP EDX,0x0 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x4],EAX LAB_001cb006: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x50 POP RBP RET
int4 rtree_add_key(long *param_1,long param_2,void *param_3,int param_4,byte *param_5,int8 param_6) { short sVar1; uint uVar2; int iVar3; uint local_54; short local_44; int4 local_c; uVar2 = (uint)param_5[1] | (*param_5 & 0x7f) << 8; if ((*param_5 & 0x80) == 0) { local_54 = 0; } else { local_54 = *(uint *)(*param_1 + 0x17c); } if ((uint)*(ushort *)(param_2 + 0xe) < uVar2 + param_4 + *(int *)(*param_1 + 0x178)) { iVar3 = rtree_split_page(param_1,param_2,param_5,param_3,param_4,param_6); local_c = 1; if (iVar3 != 0) { local_c = 0xffffffff; } } else { if (local_54 == 0) { memcpy(param_5 + ((uint)param_5[1] | (*param_5 & 0x7f) << 8),param_3, (ulong)(uint)(param_4 + *(int *)(*param_1 + 0x178))); sVar1 = (short)*(int4 *)(*param_1 + 0x178); } else { memcpy(param_5 + ((uint)param_5[1] | (*param_5 & 0x7f) << 8), (void *)((long)param_3 - (ulong)local_54),(ulong)(param_4 + local_54)); sVar1 = (short)local_54; } local_44 = (short)param_4 + sVar1 + (short)uVar2; sVar1 = 0; if (local_54 != 0) { sVar1 = -0x8000; } param_5[1] = (byte)(sVar1 + local_44); *param_5 = (byte)((ushort)(sVar1 + local_44) >> 8); local_c = 0; } return local_c; }
50,389
js_weakref_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_weakref_finalizer(JSRuntime *rt, JSValue val) { JSWeakRefData *wrd = JS_GetOpaque(val, JS_CLASS_WEAK_REF); if (!wrd || wrd == &js_weakref_sentinel) return; /* Delete weak ref */ JSWeakRefRecord **pwr, *wr; pwr = get_first_weak_ref(wrd->target); for(;;) { wr = *pwr; assert(wr != NULL); if (wr->kind == JS_WEAK_REF_KIND_WEAK_REF && wr->u.weak_ref_data == wrd) break; pwr = &wr->next_weak_ref; } *pwr = wr->next_weak_ref; js_free_rt(rt, wrd); js_free_rt(rt, wr); }
O0
c
js_weakref_finalizer: subq $0x38, %rsp movq %rsi, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq %rdi, 0x20(%rsp) movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi movl $0x3a, %edx callq 0x38350 movq %rax, 0x18(%rsp) cmpq $0x0, 0x18(%rsp) je 0xe5242 leaq 0x51425(%rip), %rax # 0x136660 cmpq %rax, 0x18(%rsp) jne 0xe5244 jmp 0xe52c2 movq 0x18(%rsp), %rax movq (%rax), %rdi movq 0x8(%rax), %rsi callq 0x5c110 movq %rax, 0x10(%rsp) movq 0x10(%rsp), %rax movq (%rax), %rax movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax cmpl $0x1, (%rax) jne 0xe5283 movq 0x8(%rsp), %rax movq 0x10(%rax), %rax cmpq 0x18(%rsp), %rax jne 0xe5283 jmp 0xe5293 movq 0x8(%rsp), %rax addq $0x8, %rax movq %rax, 0x10(%rsp) jmp 0xe525a movq 0x8(%rsp), %rax movq 0x8(%rax), %rcx movq 0x10(%rsp), %rax movq %rcx, (%rax) movq 0x20(%rsp), %rdi movq 0x18(%rsp), %rsi callq 0x21960 movq 0x20(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x21960 addq $0x38, %rsp retq nopw (%rax,%rax)
js_weakref_finalizer: sub rsp, 38h mov [rsp+38h+var_10], rsi mov [rsp+38h+var_8], rdx mov [rsp+38h+var_18], rdi mov rdi, [rsp+38h+var_10] mov rsi, [rsp+38h+var_8] mov edx, 3Ah ; ':' call JS_GetOpaque mov [rsp+38h+var_20], rax cmp [rsp+38h+var_20], 0 jz short loc_E5242 lea rax, js_weakref_sentinel cmp [rsp+38h+var_20], rax jnz short loc_E5244 loc_E5242: jmp short loc_E52C2 loc_E5244: mov rax, [rsp+38h+var_20] mov rdi, [rax] mov rsi, [rax+8] call get_first_weak_ref mov [rsp+38h+var_28], rax loc_E525A: mov rax, [rsp+38h+var_28] mov rax, [rax] mov [rsp+38h+var_30], rax mov rax, [rsp+38h+var_30] cmp dword ptr [rax], 1 jnz short loc_E5283 mov rax, [rsp+38h+var_30] mov rax, [rax+10h] cmp rax, [rsp+38h+var_20] jnz short loc_E5283 jmp short loc_E5293 loc_E5283: mov rax, [rsp+38h+var_30] add rax, 8 mov [rsp+38h+var_28], rax jmp short loc_E525A loc_E5293: mov rax, [rsp+38h+var_30] mov rcx, [rax+8] mov rax, [rsp+38h+var_28] mov [rax], rcx mov rdi, [rsp+38h+var_18] mov rsi, [rsp+38h+var_20] call js_free_rt mov rdi, [rsp+38h+var_18] mov rsi, [rsp+38h+var_30] call js_free_rt loc_E52C2: add rsp, 38h retn
void js_weakref_finalizer(long long a1, long long a2, int a3) { _DWORD *v3; // [rsp+8h] [rbp-30h] char *i; // [rsp+10h] [rbp-28h] long long Opaque; // [rsp+18h] [rbp-20h] Opaque = JS_GetOpaque(a2, a3, 58); if ( Opaque && (_UNKNOWN *)Opaque != &js_weakref_sentinel ) { for ( i = (char *)get_first_weak_ref(*(const char **)Opaque, *(_QWORD *)(Opaque + 8)); ; i = (char *)(v3 + 2) ) { v3 = *(_DWORD **)i; if ( **(_DWORD **)i == 1 && *((_QWORD *)v3 + 2) == Opaque ) break; } *(_QWORD *)i = *((_QWORD *)v3 + 1); js_free_rt(a1, Opaque); js_free_rt(a1, (long long)v3); } }
js_weakref_finalizer: SUB RSP,0x38 MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x30],RDX MOV qword ptr [RSP + 0x20],RDI MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] MOV EDX,0x3a CALL 0x00138350 MOV qword ptr [RSP + 0x18],RAX CMP qword ptr [RSP + 0x18],0x0 JZ 0x001e5242 LEA RAX,[0x236660] CMP qword ptr [RSP + 0x18],RAX JNZ 0x001e5244 LAB_001e5242: JMP 0x001e52c2 LAB_001e5244: MOV RAX,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RAX + 0x8] CALL 0x0015c110 MOV qword ptr [RSP + 0x10],RAX LAB_001e525a: MOV RAX,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] CMP dword ptr [RAX],0x1 JNZ 0x001e5283 MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x10] CMP RAX,qword ptr [RSP + 0x18] JNZ 0x001e5283 JMP 0x001e5293 LAB_001e5283: MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x8 MOV qword ptr [RSP + 0x10],RAX JMP 0x001e525a LAB_001e5293: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RAX],RCX MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] CALL 0x00121960 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x8] CALL 0x00121960 LAB_001e52c2: ADD RSP,0x38 RET
void js_weakref_finalizer(int8 param_1,int8 param_2,int8 param_3) { int *piVar1; int8 *puVar2; int *local_28; puVar2 = (int8 *)JS_GetOpaque(param_2,param_3,0x3a); if ((puVar2 != (int8 *)0x0) && (puVar2 != (int8 *)js_weakref_sentinel)) { local_28 = (int *)get_first_weak_ref(*puVar2,puVar2[1]); while ((piVar1 = *(int **)local_28, *piVar1 != 1 || (*(int8 **)(piVar1 + 4) != puVar2))) { local_28 = piVar1 + 2; } *(int8 *)local_28 = *(int8 *)(piVar1 + 2); js_free_rt(param_1,puVar2); js_free_rt(param_1,piVar1); } return; }
50,390
js_weakref_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_weakref_finalizer(JSRuntime *rt, JSValue val) { JSWeakRefData *wrd = JS_GetOpaque(val, JS_CLASS_WEAK_REF); if (!wrd || wrd == &js_weakref_sentinel) return; /* Delete weak ref */ JSWeakRefRecord **pwr, *wr; pwr = get_first_weak_ref(wrd->target); for(;;) { wr = *pwr; assert(wr != NULL); if (wr->kind == JS_WEAK_REF_KIND_WEAK_REF && wr->u.weak_ref_data == wrd) break; pwr = &wr->next_weak_ref; } *pwr = wr->next_weak_ref; js_free_rt(rt, wrd); js_free_rt(rt, wr); }
O1
c
js_weakref_finalizer: pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq %rsi, 0x8(%rsp) cmpl $-0x1, %edx jne 0x84058 movq 0x8(%rsp), %rax cmpw $0x3a, 0x6(%rax) jne 0x84058 movq 0x30(%rax), %r14 jmp 0x8405b xorl %r14d, %r14d testq %r14, %r14 sete %al leaq 0x495a0(%rip), %rcx # 0xcd608 cmpq %rcx, %r14 sete %cl orb %al, %cl je 0x8407c addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movsd (%r14), %xmm0 movl 0x8(%r14), %eax movsd %xmm0, 0x8(%rsp) cmpl $-0x8, %eax je 0x840a4 cmpl $-0x1, %eax jne 0x8411e movq 0x8(%rsp), %rax addq $0x28, %rax jmp 0x840b6 movq 0x8(%rsp), %rax addq $0x10, %rax jmp 0x840b6 addq $0x8, %r15 movq %r15, %rax movq (%rax), %r15 cmpl $0x1, (%r15) jne 0x840af cmpq %r14, 0x10(%r15) jne 0x840af movq 0x8(%r15), %rcx movq %rcx, (%rax) decq 0x28(%rbx) movq %r14, %rdi callq *0x20(%rbx) movq 0x30(%rbx), %rcx movq 0x40(%rbx), %rdi subq %rax, %rcx addq $-0x8, %rcx movq %rcx, 0x30(%rbx) movq %r14, %rsi callq *0x10(%rbx) decq 0x28(%rbx) movq %r15, %rdi callq *0x20(%rbx) movq 0x10(%rbx), %rcx movq 0x30(%rbx), %rdx subq %rax, %rdx addq $-0x8, %rdx movq %rdx, 0x30(%rbx) movq 0x40(%rbx), %rdi movq %r15, %rsi addq $0x10, %rsp popq %rbx popq %r14 popq %r15 jmpq *%rcx callq 0xe090
js_weakref_finalizer: push r15 push r14 push rbx sub rsp, 10h mov rbx, rdi mov [rsp+28h+var_20], rsi cmp edx, 0FFFFFFFFh jnz short loc_84058 mov rax, [rsp+28h+var_20] cmp word ptr [rax+6], 3Ah ; ':' jnz short loc_84058 mov r14, [rax+30h] jmp short loc_8405B loc_84058: xor r14d, r14d loc_8405B: test r14, r14 setz al lea rcx, js_weakref_sentinel cmp r14, rcx setz cl or cl, al jz short loc_8407C add rsp, 10h pop rbx pop r14 pop r15 retn loc_8407C: movsd xmm0, qword ptr [r14] mov eax, [r14+8] movsd [rsp+28h+var_20], xmm0 cmp eax, 0FFFFFFF8h jz short loc_840A4 cmp eax, 0FFFFFFFFh jnz loc_8411E mov rax, [rsp+28h+var_20] add rax, 28h ; '(' jmp short loc_840B6 loc_840A4: mov rax, [rsp+28h+var_20] add rax, 10h jmp short loc_840B6 loc_840AF: add r15, 8 mov rax, r15 loc_840B6: mov r15, [rax] cmp dword ptr [r15], 1 jnz short loc_840AF cmp [r15+10h], r14 jnz short loc_840AF mov rcx, [r15+8] mov [rax], rcx dec qword ptr [rbx+28h] mov rdi, r14 call qword ptr [rbx+20h] mov rcx, [rbx+30h] mov rdi, [rbx+40h] sub rcx, rax add rcx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rcx mov rsi, r14 call qword ptr [rbx+10h] dec qword ptr [rbx+28h] mov rdi, r15 call qword ptr [rbx+20h] mov rcx, [rbx+10h] mov rdx, [rbx+30h] sub rdx, rax add rdx, 0FFFFFFFFFFFFFFF8h mov [rbx+30h], rdx mov rdi, [rbx+40h] mov rsi, r15 add rsp, 10h pop rbx pop r14 pop r15 jmp rcx loc_8411E: call _abort
char js_weakref_finalizer(long long a1, long long a2, int a3) { _DWORD *v4; // r14 char result; // al int v6; // eax _QWORD *v7; // rax _DWORD *v8; // r15 long long v9; // rax long long v10; // rdi long long v11; // rax long long ( *v12)(_QWORD, _DWORD *); // rcx long long v13; // [rsp+8h] [rbp-20h] if ( a3 == -1 && *(_WORD *)(a2 + 6) == 58 ) v4 = *(_DWORD **)(a2 + 48); else v4 = 0LL; result = v4 == 0LL; if ( v4 != 0LL && v4 != (_DWORD *)&js_weakref_sentinel ) { v6 = v4[2]; v13 = *(_QWORD *)v4; if ( v6 == -8 ) { v7 = (_QWORD *)(v13 + 16); } else { if ( v6 != -1 ) abort((const char *)a1); v7 = (_QWORD *)(v13 + 40); } while ( 1 ) { v8 = (_DWORD *)*v7; if ( *(_DWORD *)*v7 == 1 && *((_DWORD **)v8 + 2) == v4 ) break; v7 = v8 + 2; } *v7 = *((_QWORD *)v8 + 1); --*(_QWORD *)(a1 + 40); v9 = (*(long long ( **)(_DWORD *))(a1 + 32))(v4); v10 = *(_QWORD *)(a1 + 64); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v9 - 8; (*(void ( **)(long long, _DWORD *))(a1 + 16))(v10, v4); --*(_QWORD *)(a1 + 40); v11 = (*(long long ( **)(_DWORD *))(a1 + 32))(v8); v12 = *(long long ( **)(_QWORD, _DWORD *))(a1 + 16); *(_QWORD *)(a1 + 48) = *(_QWORD *)(a1 + 48) - v11 - 8; return v12(*(_QWORD *)(a1 + 64), v8); } return result; }
50,391
js_weakref_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_weakref_finalizer(JSRuntime *rt, JSValue val) { JSWeakRefData *wrd = JS_GetOpaque(val, JS_CLASS_WEAK_REF); if (!wrd || wrd == &js_weakref_sentinel) return; /* Delete weak ref */ JSWeakRefRecord **pwr, *wr; pwr = get_first_weak_ref(wrd->target); for(;;) { wr = *pwr; assert(wr != NULL); if (wr->kind == JS_WEAK_REF_KIND_WEAK_REF && wr->u.weak_ref_data == wrd) break; pwr = &wr->next_weak_ref; } *pwr = wr->next_weak_ref; js_free_rt(rt, wrd); js_free_rt(rt, wr); }
O2
c
js_weakref_finalizer: pushq %r15 pushq %r14 pushq %rbx cmpl $-0x1, %edx jne 0x6ed8d cmpw $0x3a, 0x6(%rsi) jne 0x6ed8d movq 0x30(%rsi), %r14 testq %r14, %r14 sete %al leaq 0x4c895(%rip), %rcx # 0xbb618 cmpq %rcx, %r14 sete %cl orb %al, %cl je 0x6ed93 popq %rbx popq %r14 popq %r15 retq movq %rdi, %rbx movq (%r14), %rdi movq 0x8(%r14), %rsi callq 0x34219 movq (%rax), %r15 cmpl $0x1, (%r15) jne 0x6edb1 cmpq %r14, 0x10(%r15) je 0x6edba addq $0x8, %r15 movq %r15, %rax jmp 0x6eda2 movq 0x8(%r15), %rcx movq %rcx, (%rax) movq %rbx, %rdi movq %r14, %rsi callq 0x170cb movq %rbx, %rdi movq %r15, %rsi popq %rbx popq %r14 popq %r15 jmp 0x170cb
js_weakref_finalizer: push r15 push r14 push rbx cmp edx, 0FFFFFFFFh jnz short loc_6ED8D cmp word ptr [rsi+6], 3Ah ; ':' jnz short loc_6ED8D mov r14, [rsi+30h] test r14, r14 setz al lea rcx, js_weakref_sentinel cmp r14, rcx setz cl or cl, al jz short loc_6ED93 loc_6ED8D: pop rbx pop r14 pop r15 retn loc_6ED93: mov rbx, rdi mov rdi, [r14] mov rsi, [r14+8] call get_first_weak_ref loc_6EDA2: mov r15, [rax] cmp dword ptr [r15], 1 jnz short loc_6EDB1 cmp [r15+10h], r14 jz short loc_6EDBA loc_6EDB1: add r15, 8 mov rax, r15 jmp short loc_6EDA2 loc_6EDBA: mov rcx, [r15+8] mov [rax], rcx mov rdi, rbx mov rsi, r14 call js_free_rt mov rdi, rbx mov rsi, r15 pop rbx pop r14 pop r15 jmp js_free_rt
void js_weakref_finalizer(long long a1, long long a2, int a3) { const char **v3; // r14 char *i; // rax _DWORD *v5; // r15 if ( a3 == -1 && *(_WORD *)(a2 + 6) == 58 ) { v3 = *(const char ***)(a2 + 48); if ( v3 != 0LL && v3 != (const char **)&js_weakref_sentinel ) { for ( i = (char *)get_first_weak_ref(*v3, (int)v3[1]); ; i = (char *)(v5 + 2) ) { v5 = *(_DWORD **)i; if ( **(_DWORD **)i == 1 && *((const char ***)v5 + 2) == v3 ) break; } *(_QWORD *)i = *((_QWORD *)v5 + 1); js_free_rt(a1, (long long)v3); js_free_rt(a1, (long long)v5); } } }
js_weakref_finalizer: PUSH R15 PUSH R14 PUSH RBX CMP EDX,-0x1 JNZ 0x0016ed8d CMP word ptr [RSI + 0x6],0x3a JNZ 0x0016ed8d MOV R14,qword ptr [RSI + 0x30] TEST R14,R14 SETZ AL LEA RCX,[0x1bb618] CMP R14,RCX SETZ CL OR CL,AL JZ 0x0016ed93 LAB_0016ed8d: POP RBX POP R14 POP R15 RET LAB_0016ed93: MOV RBX,RDI MOV RDI,qword ptr [R14] MOV RSI,qword ptr [R14 + 0x8] CALL 0x00134219 LAB_0016eda2: MOV R15,qword ptr [RAX] CMP dword ptr [R15],0x1 JNZ 0x0016edb1 CMP qword ptr [R15 + 0x10],R14 JZ 0x0016edba LAB_0016edb1: ADD R15,0x8 MOV RAX,R15 JMP 0x0016eda2 LAB_0016edba: MOV RCX,qword ptr [R15 + 0x8] MOV qword ptr [RAX],RCX MOV RDI,RBX MOV RSI,R14 CALL 0x001170cb MOV RDI,RBX MOV RSI,R15 POP RBX POP R14 POP R15 JMP 0x001170cb
void js_weakref_finalizer(int8 param_1,long param_2,int param_3) { int8 *puVar1; int *piVar2; int *piVar3; if ((param_3 == -1) && (*(short *)(param_2 + 6) == 0x3a)) { puVar1 = *(int8 **)(param_2 + 0x30); if (puVar1 != (int8 *)js_weakref_sentinel && puVar1 != (int8 *)0x0) { piVar3 = (int *)get_first_weak_ref(*puVar1,puVar1[1]); while ((piVar2 = *(int **)piVar3, *piVar2 != 1 || (*(int8 **)(piVar2 + 4) != puVar1))) { piVar3 = piVar2 + 2; } *(int8 *)piVar3 = *(int8 *)(piVar2 + 2); js_free_rt(param_1,puVar1); js_free_rt(param_1,piVar2); return; } } return; }
50,392
PFS_memory_stat::count_builtin_alloc(unsigned long)
eloqsql/storage/perfschema/pfs_stat.h
void count_builtin_alloc(size_t size) { m_used= true; m_alloc_count++; m_free_count_capacity++; m_alloc_size+= size; m_free_size_capacity+= size; if (m_alloc_count_capacity >= 1) { m_alloc_count_capacity--; } if (m_alloc_size_capacity >= size) { m_alloc_size_capacity-= size; } return; }
O0
c
PFS_memory_stat::count_builtin_alloc(unsigned long): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movb $0x1, (%rax) movq 0x8(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x8(%rax) movq 0x30(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x30(%rax) movq -0x10(%rbp), %rcx addq 0x18(%rax), %rcx movq %rcx, 0x18(%rax) movq -0x10(%rbp), %rcx addq 0x40(%rax), %rcx movq %rcx, 0x40(%rax) cmpq $0x1, 0x28(%rax) jb 0x328de movq -0x18(%rbp), %rax movq 0x28(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x28(%rax) movq -0x18(%rbp), %rax movq 0x38(%rax), %rax cmpq -0x10(%rbp), %rax jb 0x328ff movq -0x18(%rbp), %rax movq -0x10(%rbp), %rdx movq 0x38(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x38(%rax) popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
_ZN15PFS_memory_stat19count_builtin_allocEm: 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 mov byte ptr [rax], 1 mov rcx, [rax+8] add rcx, 1 mov [rax+8], rcx mov rcx, [rax+30h] add rcx, 1 mov [rax+30h], rcx mov rcx, [rbp+var_10] add rcx, [rax+18h] mov [rax+18h], rcx mov rcx, [rbp+var_10] add rcx, [rax+40h] mov [rax+40h], rcx cmp qword ptr [rax+28h], 1 jb short loc_328DE mov rax, [rbp+var_18] mov rcx, [rax+28h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+28h], rcx loc_328DE: mov rax, [rbp+var_18] mov rax, [rax+38h] cmp rax, [rbp+var_10] jb short loc_328FF mov rax, [rbp+var_18] mov rdx, [rbp+var_10] mov rcx, [rax+38h] sub rcx, rdx mov [rax+38h], rcx loc_328FF: pop rbp retn
PFS_memory_stat * PFS_memory_stat::count_builtin_alloc(PFS_memory_stat *this, unsigned long long a2) { PFS_memory_stat *result; // rax *(_BYTE *)this = 1; ++*((_QWORD *)this + 1); ++*((_QWORD *)this + 6); *((_QWORD *)this + 3) += a2; *((_QWORD *)this + 8) += a2; if ( *((_QWORD *)this + 5) ) --*((_QWORD *)this + 5); result = (PFS_memory_stat *)*((_QWORD *)this + 7); if ( (unsigned long long)result >= a2 ) { result = this; *((_QWORD *)this + 7) -= a2; } return result; }
count_builtin_alloc: 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 MOV byte ptr [RAX],0x1 MOV RCX,qword ptr [RAX + 0x8] ADD RCX,0x1 MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RAX + 0x30] ADD RCX,0x1 MOV qword ptr [RAX + 0x30],RCX MOV RCX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x18] MOV qword ptr [RAX + 0x18],RCX MOV RCX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x40] MOV qword ptr [RAX + 0x40],RCX CMP qword ptr [RAX + 0x28],0x1 JC 0x001328de MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x28] ADD RCX,-0x1 MOV qword ptr [RAX + 0x28],RCX LAB_001328de: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x38] CMP RAX,qword ptr [RBP + -0x10] JC 0x001328ff MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x38] SUB RCX,RDX MOV qword ptr [RAX + 0x38],RCX LAB_001328ff: POP RBP RET
/* PFS_memory_stat::count_builtin_alloc(unsigned long) */ void __thiscall PFS_memory_stat::count_builtin_alloc(PFS_memory_stat *this,ulong param_1) { *this = (PFS_memory_stat)0x1; *(long *)(this + 8) = *(long *)(this + 8) + 1; *(long *)(this + 0x30) = *(long *)(this + 0x30) + 1; *(ulong *)(this + 0x18) = param_1 + *(long *)(this + 0x18); *(ulong *)(this + 0x40) = param_1 + *(long *)(this + 0x40); if (*(long *)(this + 0x28) != 0) { *(long *)(this + 0x28) = *(long *)(this + 0x28) + -1; } if (param_1 <= *(ulong *)(this + 0x38)) { *(ulong *)(this + 0x38) = *(long *)(this + 0x38) - param_1; } return; }
50,393
mi_rec_pack
eloqsql/storage/myisam/mi_dynrec.c
uint _mi_rec_pack(MI_INFO *info, register uchar *to, register const uchar *from) { uint length,new_length,flag,bit,i; uchar *pos,*end,*startpos,*packpos; enum en_fieldtype type; reg3 MI_COLUMNDEF *rec; MI_BLOB *blob; DBUG_ENTER("_mi_rec_pack"); flag=0 ; bit=1; startpos=packpos=to; to+= info->s->base.pack_bits; blob=info->blobs; rec=info->s->rec; for (i=info->s->base.fields ; i-- > 0; from+= length,rec++) { length=(uint) rec->length; if ((type = (enum en_fieldtype) rec->type) != FIELD_NORMAL) { if (type == FIELD_BLOB) { if (!blob->length) flag|=bit; else { char *temp_pos; size_t tmp_length=length-portable_sizeof_char_ptr; memcpy((uchar*) to,from,tmp_length); memcpy(&temp_pos,from+tmp_length,sizeof(char*)); memcpy(to+tmp_length,temp_pos,(size_t) blob->length); to+=tmp_length+blob->length; } blob++; } else if (type == FIELD_SKIP_ZERO) { if (memcmp((uchar*) from,zero_string,length) == 0) flag|=bit; else { memcpy((uchar*) to,from,(size_t) length); to+=length; } } else if (type == FIELD_SKIP_ENDSPACE || type == FIELD_SKIP_PRESPACE) { pos= (uchar*) from; end= (uchar*) from + length; if (type == FIELD_SKIP_ENDSPACE) { /* Pack trailing spaces */ while (end > from && *(end-1) == ' ') end--; } else { /* Pack pref-spaces */ while (pos < end && *pos == ' ') pos++; } new_length=(uint) (end-pos); if (new_length + 1 + MY_TEST(rec->length > 255 && new_length > 127) < length) { if (rec->length > 255 && new_length > 127) { to[0]= (uchar) ((new_length & 127) + 128); to[1]= (uchar) (new_length >> 7); to+=2; } else *to++= (uchar) new_length; memcpy((uchar*) to,pos,(size_t) new_length); to+=new_length; flag|=bit; } else { memcpy(to,from,(size_t) length); to+=length; } } else if (type == FIELD_VARCHAR) { uint pack_length= HA_VARCHAR_PACKLENGTH(rec->length -1); uint tmp_length; if (pack_length == 1) { tmp_length= (uint) *(uchar*) from; *to++= *from; } else { tmp_length= uint2korr(from); store_key_length_inc(to,tmp_length); } memcpy(to, from+pack_length,tmp_length); to+= tmp_length; continue; } else { memcpy(to,from,(size_t) length); to+=length; continue; /* Normal field */ } if ((bit= bit << 1) >= 256) { *packpos++= (uchar) flag; bit=1; flag=0; } } else { memcpy(to,from,(size_t) length); to+=length; } } if (bit != 1) *packpos= (uchar) flag; if (info->s->calc_checksum) *to++= (uchar) info->checksum; DBUG_PRINT("exit",("packed length: %d",(int) (to-startpos))); DBUG_RETURN((uint) (to-startpos)); }
O3
c
mi_rec_pack: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq (%rdi), %rax movl 0x168(%rax), %r13d movl 0x18c(%rax), %ebx addq %rsi, %rbx testl %r13d, %r13d je 0x7c615 movq %rdx, %r12 movq 0x230(%rax), %r15 movq 0x48(%rdi), %rdx movq %rsi, -0x58(%rbp) movq %rsi, -0x50(%rbp) movq %rdi, -0x48(%rbp) movl $0x1, -0x30(%rbp) movl $0x0, -0x2c(%rbp) decl %r13d movzwl 0x4(%r15), %r8d movl (%r15), %ecx testl %ecx, %ecx je 0x7c3d1 cmpl $0x3, %ecx je 0x7c39a cmpl $0x4, %ecx jne 0x7c401 cmpq $0x0, 0x10(%rdx) je 0x7c478 movl %r13d, -0x3c(%rbp) movq %rbx, %r13 leal -0x8(%r8), %ebx movq %r13, %rdi movq %r12, %rsi movq %rdx, %r14 movq %rbx, %rdx movq %r8, -0x60(%rbp) callq 0x2a0a0 movq (%r12,%rbx), %rsi leaq (%rbx,%r13), %rdi movq 0x10(%r14), %rdx callq 0x2a0a0 movq -0x60(%rbp), %r8 movq %r14, %rdx addq 0x10(%r14), %rbx addq %rbx, %r13 movq %r13, %rbx movl -0x3c(%rbp), %r13d jmp 0x7c481 movq %rdx, -0x38(%rbp) movq %r12, %rdi leaq 0xb8f7e8(%rip), %rsi # 0xc0bb90 movq %r8, %rdx movq %r8, %r14 callq 0x2a560 testl %eax, %eax je 0x7c466 movq %rbx, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x2a0a0 addq %r14, %rbx jmp 0x7c46f movq %rbx, %rdi movq %r12, %rsi movq %rbx, -0x68(%rbp) movq %rdx, %rbx movq %r8, %rdx movl %r13d, %r14d movq %r8, %r13 callq 0x2a0a0 movq %r13, %r8 movl %r14d, %r13d movq %rbx, %rdx movq -0x68(%rbp), %rbx addq %r8, %rbx jmp 0x7c498 cmpl $0x2, %ecx ja 0x7c431 leaq (%r12,%r8), %rax cmpl $0x1, %ecx movq %rdx, -0x38(%rbp) jne 0x7c4ad movq %rax, %rcx cmpq %r12, %rax jbe 0x7c429 leaq -0x1(%rcx), %rax cmpb $0x20, -0x1(%rcx) je 0x7c417 movq %rcx, %rax jmp 0x7c4c4 cmpl $0x8, %ecx jne 0x7c536 cmpl $0x100, %r8d # imm = 0x100 movl %r13d, -0x3c(%rbp) movq %rdx, -0x38(%rbp) ja 0x7c580 movq %r8, %r14 movzbl (%r12), %eax movb %al, (%rbx) incq %rbx movl $0x1, %esi jmp 0x7c5a8 movl -0x2c(%rbp), %eax orl -0x30(%rbp), %eax movl %eax, -0x2c(%rbp) movq -0x38(%rbp), %rdx movq %r14, %r8 jmp 0x7c485 movl -0x2c(%rbp), %eax orl -0x30(%rbp), %eax movl %eax, -0x2c(%rbp) addq $0x18, %rdx movl -0x30(%rbp), %eax addl %eax, %eax movl %eax, -0x30(%rbp) cmpl $0xff, %eax ja 0x7c5d1 addq %r8, %r12 addq $0x30, %r15 testl %r13d, %r13d jne 0x7c323 jmp 0x7c5fe movq %r12, %rsi testq %r8, %r8 je 0x7c4c4 cmpb $0x20, (%rsi) jne 0x7c4c7 incq %rsi cmpq %rax, %rsi jb 0x7c4b5 jmp 0x7c4c7 movq %r12, %rsi subq %rsi, %rax cmpl $0x100, %r8d # imm = 0x100 setae %dl cmpl $0x7f, %eax seta %cl andb %dl, %cl movzbl %cl, %edx addl %eax, %edx incl %edx cmpl %r8d, %edx jae 0x7c560 movq %rbx, %rdi movl $0x1, %ebx testb %cl, %cl movq %r8, -0x60(%rbp) movl %eax, %ecx je 0x7c50a orb $-0x80, %cl movl %eax, %edx shrl $0x7, %edx movb %dl, 0x1(%rdi) movl $0x2, %ebx addq %rdi, %rbx movb %cl, (%rdi) movl %eax, %r14d movq %rbx, %rdi movq %r14, %rdx callq 0x2a0a0 addq %r14, %rbx movl -0x2c(%rbp), %eax orl -0x30(%rbp), %eax movl %eax, -0x2c(%rbp) movq -0x38(%rbp), %rdx movq -0x60(%rbp), %r8 jmp 0x7c485 movq %rbx, %rdi movq %r12, %rsi movq %rbx, -0x68(%rbp) movq %rdx, %rbx movq %r8, %rdx movq %r8, %r14 callq 0x2a0a0 movq %r14, %r8 movq %rbx, %rdx movq -0x68(%rbp), %rbx addq %r14, %rbx jmp 0x7c498 movq %rbx, %rdi movq %r12, %rsi movq %r8, %rdx movq %r8, %r14 callq 0x2a0a0 movq %r14, %r8 addq %r14, %rbx movq -0x38(%rbp), %rdx jmp 0x7c485 movzwl (%r12), %eax movq %r8, %r14 cmpl $0xfe, %eax ja 0x7c596 movb %al, (%rbx) incq %rbx jmp 0x7c5a3 movb $-0x1, (%rbx) movb %al, 0x2(%rbx) movb %ah, 0x1(%rbx) addq $0x3, %rbx movl $0x2, %esi movq %rbx, %r13 addq %r12, %rsi movl %eax, %ebx movq %r13, %rdi movq %rbx, %rdx callq 0x2a0a0 addq %rbx, %r13 movq %r13, %rbx movl -0x3c(%rbp), %r13d movq -0x38(%rbp), %rdx movq %r14, %r8 jmp 0x7c498 movq -0x58(%rbp), %rax movl -0x2c(%rbp), %ecx movb %cl, (%rax) incq %rax movq %rax, -0x58(%rbp) movl %r8d, %eax addq %rax, %r12 addq $0x30, %r15 testl %r13d, %r13d movq -0x50(%rbp), %rsi movq -0x48(%rbp), %rdi jne 0x7c315 jmp 0x7c615 cmpl $0x1, -0x30(%rbp) je 0x7c60d movq -0x58(%rbp), %rax movl -0x2c(%rbp), %ecx movb %cl, (%rax) movq -0x50(%rbp), %rsi movq -0x48(%rbp), %rdi movq (%rdi), %rax cmpq $0x0, 0x2c8(%rax) je 0x7c62d movb 0x1a8(%rdi), %al movb %al, (%rbx) incq %rbx subl %esi, %ebx movl %ebx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_rec_pack: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov rax, [rdi] mov r13d, [rax+168h] mov ebx, [rax+18Ch] add rbx, rsi test r13d, r13d jz loc_7C615 mov r12, rdx mov r15, [rax+230h] mov rdx, [rdi+48h] mov [rbp+var_58], rsi mov [rbp+var_50], rsi mov [rbp+var_48], rdi loc_7C315: mov [rbp+var_30], 1 mov [rbp+var_2C], 0 loc_7C323: dec r13d movzx r8d, word ptr [r15+4] mov ecx, [r15] test ecx, ecx jz loc_7C3D1 cmp ecx, 3 jz short loc_7C39A cmp ecx, 4 jnz loc_7C401 cmp qword ptr [rdx+10h], 0 jz loc_7C478 mov [rbp+var_3C], r13d mov r13, rbx lea ebx, [r8-8] mov rdi, r13 mov rsi, r12 mov r14, rdx mov rdx, rbx mov [rbp+var_60], r8 call _memcpy mov rsi, [r12+rbx] lea rdi, [rbx+r13] mov rdx, [r14+10h] call _memcpy mov r8, [rbp+var_60] mov rdx, r14 add rbx, [r14+10h] add r13, rbx mov rbx, r13 mov r13d, [rbp+var_3C] jmp loc_7C481 loc_7C39A: mov [rbp+var_38], rdx mov rdi, r12 lea rsi, zero_string mov rdx, r8 mov r14, r8 call _bcmp test eax, eax jz loc_7C466 mov rdi, rbx mov rsi, r12 mov rdx, r14 call _memcpy add rbx, r14 jmp loc_7C46F loc_7C3D1: mov rdi, rbx mov rsi, r12 mov [rbp+var_68], rbx mov rbx, rdx mov rdx, r8 mov r14d, r13d mov r13, r8 call _memcpy mov r8, r13 mov r13d, r14d mov rdx, rbx mov rbx, [rbp+var_68] add rbx, r8 jmp loc_7C498 loc_7C401: cmp ecx, 2 ja short loc_7C431 lea rax, [r12+r8] cmp ecx, 1 mov [rbp+var_38], rdx jnz loc_7C4AD loc_7C417: mov rcx, rax cmp rax, r12 jbe short loc_7C429 lea rax, [rcx-1] cmp byte ptr [rcx-1], 20h ; ' ' jz short loc_7C417 loc_7C429: mov rax, rcx jmp loc_7C4C4 loc_7C431: cmp ecx, 8 jnz loc_7C536 cmp r8d, 100h mov [rbp+var_3C], r13d mov [rbp+var_38], rdx ja loc_7C580 mov r14, r8 movzx eax, byte ptr [r12] mov [rbx], al inc rbx mov esi, 1 jmp loc_7C5A8 loc_7C466: mov eax, [rbp+var_2C] or eax, [rbp+var_30] mov [rbp+var_2C], eax loc_7C46F: mov rdx, [rbp+var_38] mov r8, r14 jmp short loc_7C485 loc_7C478: mov eax, [rbp+var_2C] or eax, [rbp+var_30] mov [rbp+var_2C], eax loc_7C481: add rdx, 18h loc_7C485: mov eax, [rbp+var_30] add eax, eax mov [rbp+var_30], eax cmp eax, 0FFh ja loc_7C5D1 loc_7C498: add r12, r8 add r15, 30h ; '0' test r13d, r13d jnz loc_7C323 jmp loc_7C5FE loc_7C4AD: mov rsi, r12 test r8, r8 jz short loc_7C4C4 loc_7C4B5: cmp byte ptr [rsi], 20h ; ' ' jnz short loc_7C4C7 inc rsi cmp rsi, rax jb short loc_7C4B5 jmp short loc_7C4C7 loc_7C4C4: mov rsi, r12 loc_7C4C7: sub rax, rsi cmp r8d, 100h setnb dl cmp eax, 7Fh setnbe cl and cl, dl movzx edx, cl add edx, eax inc edx cmp edx, r8d jnb short loc_7C560 mov rdi, rbx mov ebx, 1 test cl, cl mov [rbp+var_60], r8 mov ecx, eax jz short loc_7C50A or cl, 80h mov edx, eax shr edx, 7 mov [rdi+1], dl mov ebx, 2 loc_7C50A: add rbx, rdi mov [rdi], cl mov r14d, eax mov rdi, rbx mov rdx, r14 call _memcpy add rbx, r14 mov eax, [rbp+var_2C] or eax, [rbp+var_30] mov [rbp+var_2C], eax mov rdx, [rbp+var_38] mov r8, [rbp+var_60] jmp loc_7C485 loc_7C536: mov rdi, rbx mov rsi, r12 mov [rbp+var_68], rbx mov rbx, rdx mov rdx, r8 mov r14, r8 call _memcpy mov r8, r14 mov rdx, rbx mov rbx, [rbp+var_68] add rbx, r14 jmp loc_7C498 loc_7C560: mov rdi, rbx mov rsi, r12 mov rdx, r8 mov r14, r8 call _memcpy mov r8, r14 add rbx, r14 mov rdx, [rbp+var_38] jmp loc_7C485 loc_7C580: movzx eax, word ptr [r12] mov r14, r8 cmp eax, 0FEh ja short loc_7C596 mov [rbx], al inc rbx jmp short loc_7C5A3 loc_7C596: mov byte ptr [rbx], 0FFh mov [rbx+2], al mov [rbx+1], ah add rbx, 3 loc_7C5A3: mov esi, 2 loc_7C5A8: mov r13, rbx add rsi, r12 mov ebx, eax mov rdi, r13 mov rdx, rbx call _memcpy add r13, rbx mov rbx, r13 mov r13d, [rbp+var_3C] mov rdx, [rbp+var_38] mov r8, r14 jmp loc_7C498 loc_7C5D1: mov rax, [rbp+var_58] mov ecx, [rbp+var_2C] mov [rax], cl inc rax mov [rbp+var_58], rax mov eax, r8d add r12, rax add r15, 30h ; '0' test r13d, r13d mov rsi, [rbp+var_50] mov rdi, [rbp+var_48] jnz loc_7C315 jmp short loc_7C615 loc_7C5FE: cmp [rbp+var_30], 1 jz short loc_7C60D mov rax, [rbp+var_58] mov ecx, [rbp+var_2C] mov [rax], cl loc_7C60D: mov rsi, [rbp+var_50] mov rdi, [rbp+var_48] loc_7C615: mov rax, [rdi] cmp qword ptr [rax+2C8h], 0 jz short loc_7C62D mov al, [rdi+1A8h] mov [rbx], al inc rbx loc_7C62D: sub ebx, esi mov eax, ebx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_rec_pack(long long a1, _BYTE *a2, char *a3) { int v3; // r13d _BYTE *v4; // rbx long long v6; // r15 long long v7; // rdx long long v8; // r8 unsigned int v9; // ecx _BYTE *v10; // r13 long long v11; // rbx long long v12; // r14 long long v13; // r14 _BYTE *v14; // rdi long long v15; // rbx int v16; // r14d long long v17; // r13 char *v18; // rax char *v19; // rcx long long v20; // r14 unsigned int v21; // eax _BYTE *v22; // rbx long long v23; // rsi char *v24; // rsi unsigned int v25; // eax bool v26; // cl _BYTE *v27; // rdi long long v28; // rbx bool v29; // zf char v30; // cl _BYTE *v31; // rbx long long v32; // r14 _BYTE *v33; // rdi long long v34; // rbx long long v35; // r14 long long v36; // r14 _BYTE *v37; // r13 long long v38; // rbx _BYTE *v40; // [rsp+8h] [rbp-68h] _BYTE *v41; // [rsp+8h] [rbp-68h] long long v42; // [rsp+10h] [rbp-60h] long long v43; // [rsp+10h] [rbp-60h] _BYTE *v44; // [rsp+18h] [rbp-58h] int v45; // [rsp+20h] [rbp-50h] long long v46; // [rsp+28h] [rbp-48h] int v47; // [rsp+34h] [rbp-3Ch] int v48; // [rsp+34h] [rbp-3Ch] long long v49; // [rsp+38h] [rbp-38h] long long v50; // [rsp+38h] [rbp-38h] long long v51; // [rsp+38h] [rbp-38h] unsigned int v52; // [rsp+40h] [rbp-30h] int v53; // [rsp+44h] [rbp-2Ch] v3 = *(_DWORD *)(*(_QWORD *)a1 + 360LL); v4 = &a2[*(unsigned int *)(*(_QWORD *)a1 + 396LL)]; if ( !v3 ) goto LABEL_48; v6 = *(_QWORD *)(*(_QWORD *)a1 + 560LL); v7 = *(_QWORD *)(a1 + 72); v44 = a2; v45 = (int)a2; v46 = a1; while ( 2 ) { v52 = 1; v53 = 0; while ( 1 ) { --v3; v8 = *(unsigned __int16 *)(v6 + 4); v9 = *(_DWORD *)v6; if ( *(_DWORD *)v6 ) break; v14 = v4; v40 = v4; v15 = v7; v16 = v3; v17 = *(unsigned __int16 *)(v6 + 4); memcpy(v14, a3, v8); v8 = v17; v3 = v16; v7 = v15; v4 = &v40[v8]; LABEL_25: a3 += v8; v6 += 48LL; if ( !v3 ) { if ( v52 != 1 ) *v44 = v53; LODWORD(a2) = v45; a1 = v46; goto LABEL_48; } } if ( v9 == 3 ) { v49 = v7; v13 = *(unsigned __int16 *)(v6 + 4); if ( (unsigned int)bcmp(a3, &zero_string, v8) ) { memcpy(v4, a3, v13); v4 += v13; } else { v53 |= v52; } v7 = v49; v8 = v13; goto LABEL_24; } if ( v9 == 4 ) { if ( *(_QWORD *)(v7 + 16) ) { v47 = v3; v10 = v4; v11 = (unsigned int)(v8 - 8); v12 = v7; v42 = *(unsigned __int16 *)(v6 + 4); memcpy(v10, a3, v11); memcpy(&v10[v11], *(_QWORD *)&a3[v11], *(_QWORD *)(v12 + 16)); v8 = v42; v7 = v12; v4 = &v10[*(_QWORD *)(v12 + 16) + v11]; v3 = v47; } else { v53 |= v52; } v7 += 24LL; goto LABEL_24; } if ( v9 > 2 ) { if ( v9 == 8 ) { v48 = v3; v51 = v7; if ( (unsigned int)v8 > 0x100 ) { v21 = *(unsigned __int16 *)a3; v20 = *(unsigned __int16 *)(v6 + 4); if ( v21 > 0xFE ) { *v4 = -1; v4[2] = v21; v4[1] = BYTE1(v21); v22 = v4 + 3; } else { *v4 = v21; v22 = v4 + 1; } v23 = 2LL; } else { v20 = *(unsigned __int16 *)(v6 + 4); v21 = (unsigned __int8)*a3; *v4 = v21; v22 = v4 + 1; v23 = 1LL; } v37 = v22; v38 = v21; memcpy(v37, &a3[v23], v21); v4 = &v37[v38]; v3 = v48; v7 = v51; v8 = v20; } else { v33 = v4; v41 = v4; v34 = v7; v35 = *(unsigned __int16 *)(v6 + 4); memcpy(v33, a3, v8); v8 = v35; v7 = v34; v4 = &v41[v35]; } goto LABEL_25; } v18 = &a3[v8]; v50 = v7; if ( v9 == 1 ) { do { v19 = v18; if ( v18 <= a3 ) break; --v18; } while ( *(v19 - 1) == 32 ); LODWORD(v18) = (_DWORD)v19; goto LABEL_31; } v24 = a3; if ( !*(_WORD *)(v6 + 4) ) { LABEL_31: v24 = a3; goto LABEL_32; } do { if ( *v24 != 32 ) break; ++v24; } while ( v24 < v18 ); LABEL_32: v25 = (_DWORD)v18 - (_DWORD)v24; v26 = (unsigned int)v8 >= 0x100 && v25 > 0x7F; if ( v25 + v26 + 1 >= (unsigned int)v8 ) { v36 = *(unsigned __int16 *)(v6 + 4); memcpy(v4, a3, v8); v8 = v36; v4 += v36; v7 = v50; } else { v27 = v4; v28 = 1LL; v29 = !v26; v43 = *(unsigned __int16 *)(v6 + 4); v30 = v25; if ( !v29 ) { v30 = v25 | 0x80; v27[1] = v25 >> 7; v28 = 2LL; } v31 = &v27[v28]; *v27 = v30; v32 = v25; memcpy(v31, v24, v25); v4 = &v31[v32]; v53 |= v52; v7 = v50; v8 = v43; } LABEL_24: v52 *= 2; if ( v52 <= 0xFF ) goto LABEL_25; *v44++ = v53; a3 += (unsigned int)v8; v6 += 48LL; LODWORD(a2) = v45; a1 = v46; if ( v3 ) continue; break; } LABEL_48: if ( *(_QWORD *)(*(_QWORD *)a1 + 712LL) ) { *v4 = *(_BYTE *)(a1 + 424); LODWORD(v4) = (_DWORD)v4 + 1; } return (unsigned int)((_DWORD)v4 - (_DWORD)a2); }
_mi_rec_pack: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RAX,qword ptr [RDI] MOV R13D,dword ptr [RAX + 0x168] MOV EBX,dword ptr [RAX + 0x18c] ADD RBX,RSI TEST R13D,R13D JZ 0x0017c615 MOV R12,RDX MOV R15,qword ptr [RAX + 0x230] MOV RDX,qword ptr [RDI + 0x48] MOV qword ptr [RBP + -0x58],RSI MOV qword ptr [RBP + -0x50],RSI MOV qword ptr [RBP + -0x48],RDI LAB_0017c315: MOV dword ptr [RBP + -0x30],0x1 MOV dword ptr [RBP + -0x2c],0x0 LAB_0017c323: DEC R13D MOVZX R8D,word ptr [R15 + 0x4] MOV ECX,dword ptr [R15] TEST ECX,ECX JZ 0x0017c3d1 CMP ECX,0x3 JZ 0x0017c39a CMP ECX,0x4 JNZ 0x0017c401 CMP qword ptr [RDX + 0x10],0x0 JZ 0x0017c478 MOV dword ptr [RBP + -0x3c],R13D MOV R13,RBX LEA EBX,[R8 + -0x8] MOV RDI,R13 MOV RSI,R12 MOV R14,RDX MOV RDX,RBX MOV qword ptr [RBP + -0x60],R8 CALL 0x0012a0a0 MOV RSI,qword ptr [R12 + RBX*0x1] LEA RDI,[RBX + R13*0x1] MOV RDX,qword ptr [R14 + 0x10] CALL 0x0012a0a0 MOV R8,qword ptr [RBP + -0x60] MOV RDX,R14 ADD RBX,qword ptr [R14 + 0x10] ADD R13,RBX MOV RBX,R13 MOV R13D,dword ptr [RBP + -0x3c] JMP 0x0017c481 LAB_0017c39a: MOV qword ptr [RBP + -0x38],RDX MOV RDI,R12 LEA RSI,[0xd0bb90] MOV RDX,R8 MOV R14,R8 CALL 0x0012a560 TEST EAX,EAX JZ 0x0017c466 MOV RDI,RBX MOV RSI,R12 MOV RDX,R14 CALL 0x0012a0a0 ADD RBX,R14 JMP 0x0017c46f LAB_0017c3d1: MOV RDI,RBX MOV RSI,R12 MOV qword ptr [RBP + -0x68],RBX MOV RBX,RDX MOV RDX,R8 MOV R14D,R13D MOV R13,R8 CALL 0x0012a0a0 MOV R8,R13 MOV R13D,R14D MOV RDX,RBX MOV RBX,qword ptr [RBP + -0x68] ADD RBX,R8 JMP 0x0017c498 LAB_0017c401: CMP ECX,0x2 JA 0x0017c431 LEA RAX,[R12 + R8*0x1] CMP ECX,0x1 MOV qword ptr [RBP + -0x38],RDX JNZ 0x0017c4ad LAB_0017c417: MOV RCX,RAX CMP RAX,R12 JBE 0x0017c429 LEA RAX,[RCX + -0x1] CMP byte ptr [RCX + -0x1],0x20 JZ 0x0017c417 LAB_0017c429: MOV RAX,RCX JMP 0x0017c4c4 LAB_0017c431: CMP ECX,0x8 JNZ 0x0017c536 CMP R8D,0x100 MOV dword ptr [RBP + -0x3c],R13D MOV qword ptr [RBP + -0x38],RDX JA 0x0017c580 MOV R14,R8 MOVZX EAX,byte ptr [R12] MOV byte ptr [RBX],AL INC RBX MOV ESI,0x1 JMP 0x0017c5a8 LAB_0017c466: MOV EAX,dword ptr [RBP + -0x2c] OR EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x2c],EAX LAB_0017c46f: MOV RDX,qword ptr [RBP + -0x38] MOV R8,R14 JMP 0x0017c485 LAB_0017c478: MOV EAX,dword ptr [RBP + -0x2c] OR EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x2c],EAX LAB_0017c481: ADD RDX,0x18 LAB_0017c485: MOV EAX,dword ptr [RBP + -0x30] ADD EAX,EAX MOV dword ptr [RBP + -0x30],EAX CMP EAX,0xff JA 0x0017c5d1 LAB_0017c498: ADD R12,R8 ADD R15,0x30 TEST R13D,R13D JNZ 0x0017c323 JMP 0x0017c5fe LAB_0017c4ad: MOV RSI,R12 TEST R8,R8 JZ 0x0017c4c4 LAB_0017c4b5: CMP byte ptr [RSI],0x20 JNZ 0x0017c4c7 INC RSI CMP RSI,RAX JC 0x0017c4b5 JMP 0x0017c4c7 LAB_0017c4c4: MOV RSI,R12 LAB_0017c4c7: SUB RAX,RSI CMP R8D,0x100 SETNC DL CMP EAX,0x7f SETA CL AND CL,DL MOVZX EDX,CL ADD EDX,EAX INC EDX CMP EDX,R8D JNC 0x0017c560 MOV RDI,RBX MOV EBX,0x1 TEST CL,CL MOV qword ptr [RBP + -0x60],R8 MOV ECX,EAX JZ 0x0017c50a OR CL,0x80 MOV EDX,EAX SHR EDX,0x7 MOV byte ptr [RDI + 0x1],DL MOV EBX,0x2 LAB_0017c50a: ADD RBX,RDI MOV byte ptr [RDI],CL MOV R14D,EAX MOV RDI,RBX MOV RDX,R14 CALL 0x0012a0a0 ADD RBX,R14 MOV EAX,dword ptr [RBP + -0x2c] OR EAX,dword ptr [RBP + -0x30] MOV dword ptr [RBP + -0x2c],EAX MOV RDX,qword ptr [RBP + -0x38] MOV R8,qword ptr [RBP + -0x60] JMP 0x0017c485 LAB_0017c536: MOV RDI,RBX MOV RSI,R12 MOV qword ptr [RBP + -0x68],RBX MOV RBX,RDX MOV RDX,R8 MOV R14,R8 CALL 0x0012a0a0 MOV R8,R14 MOV RDX,RBX MOV RBX,qword ptr [RBP + -0x68] ADD RBX,R14 JMP 0x0017c498 LAB_0017c560: MOV RDI,RBX MOV RSI,R12 MOV RDX,R8 MOV R14,R8 CALL 0x0012a0a0 MOV R8,R14 ADD RBX,R14 MOV RDX,qword ptr [RBP + -0x38] JMP 0x0017c485 LAB_0017c580: MOVZX EAX,word ptr [R12] MOV R14,R8 CMP EAX,0xfe JA 0x0017c596 MOV byte ptr [RBX],AL INC RBX JMP 0x0017c5a3 LAB_0017c596: MOV byte ptr [RBX],0xff MOV byte ptr [RBX + 0x2],AL MOV byte ptr [RBX + 0x1],AH ADD RBX,0x3 LAB_0017c5a3: MOV ESI,0x2 LAB_0017c5a8: MOV R13,RBX ADD RSI,R12 MOV EBX,EAX MOV RDI,R13 MOV RDX,RBX CALL 0x0012a0a0 ADD R13,RBX MOV RBX,R13 MOV R13D,dword ptr [RBP + -0x3c] MOV RDX,qword ptr [RBP + -0x38] MOV R8,R14 JMP 0x0017c498 LAB_0017c5d1: MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x2c] MOV byte ptr [RAX],CL INC RAX MOV qword ptr [RBP + -0x58],RAX MOV EAX,R8D ADD R12,RAX ADD R15,0x30 TEST R13D,R13D MOV RSI,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RBP + -0x48] JNZ 0x0017c315 JMP 0x0017c615 LAB_0017c5fe: CMP dword ptr [RBP + -0x30],0x1 JZ 0x0017c60d MOV RAX,qword ptr [RBP + -0x58] MOV ECX,dword ptr [RBP + -0x2c] MOV byte ptr [RAX],CL LAB_0017c60d: MOV RSI,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RBP + -0x48] LAB_0017c615: MOV RAX,qword ptr [RDI] CMP qword ptr [RAX + 0x2c8],0x0 JZ 0x0017c62d MOV AL,byte ptr [RDI + 0x1a8] MOV byte ptr [RBX],AL INC RBX LAB_0017c62d: SUB EBX,ESI MOV EAX,EBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int _mi_rec_pack(long *param_1,int1 *param_2,ushort *param_3) { ushort uVar1; ushort *puVar2; int iVar3; uint uVar4; ulong uVar5; byte bVar7; long lVar8; byte *pbVar9; long lVar10; ushort *puVar11; uint uVar12; ulong __n; int iVar13; uint *puVar14; int1 *local_60; uint local_38; uint local_34; ushort *puVar6; lVar8 = *param_1; iVar13 = *(int *)(lVar8 + 0x168); pbVar9 = param_2 + *(uint *)(lVar8 + 0x18c); if (iVar13 == 0) { LAB_0017c615: if (*(long *)(*param_1 + 0x2c8) != 0) { *pbVar9 = *(byte *)(param_1 + 0x35); pbVar9 = pbVar9 + 1; } return (int)pbVar9 - (int)param_2; } puVar14 = *(uint **)(lVar8 + 0x230); lVar8 = param_1[9]; local_60 = param_2; LAB_0017c315: local_38 = 1; local_34 = 0; do { iVar13 = iVar13 + -1; uVar1 = (ushort)puVar14[1]; __n = (ulong)uVar1; uVar4 = *puVar14; if (uVar4 == 0) { memcpy(pbVar9,param_3,__n); pbVar9 = pbVar9 + __n; } else { if (uVar4 == 3) { iVar3 = bcmp(param_3,zero_string,__n); if (iVar3 == 0) { local_34 = local_34 | local_38; } else { memcpy(pbVar9,param_3,__n); pbVar9 = pbVar9 + __n; } } else if (uVar4 == 4) { if (*(long *)(lVar8 + 0x10) == 0) { local_34 = local_34 | local_38; } else { uVar5 = (ulong)(uVar1 - 8); memcpy(pbVar9,param_3,uVar5); memcpy(pbVar9 + uVar5,*(void **)((long)param_3 + uVar5),*(size_t *)(lVar8 + 0x10)); pbVar9 = pbVar9 + uVar5 + *(long *)(lVar8 + 0x10); } lVar8 = lVar8 + 0x18; } else { uVar12 = (uint)uVar1; if (2 < uVar4) { if (uVar4 == 8) { if (uVar12 < 0x101) { uVar4 = (uint)(byte)*param_3; *pbVar9 = (byte)*param_3; pbVar9 = pbVar9 + 1; lVar10 = 1; } else { uVar1 = *param_3; uVar4 = (uint)uVar1; if (uVar1 < 0xff) { *pbVar9 = (byte)uVar1; pbVar9 = pbVar9 + 1; } else { *pbVar9 = 0xff; pbVar9[2] = (byte)uVar1; pbVar9[1] = (byte)(uVar1 >> 8); pbVar9 = pbVar9 + 3; } lVar10 = 2; } memcpy(pbVar9,(byte *)(lVar10 + (long)param_3),(ulong)uVar4); pbVar9 = pbVar9 + uVar4; } else { memcpy(pbVar9,param_3,__n); pbVar9 = pbVar9 + __n; } goto LAB_0017c498; } puVar6 = (ushort *)((long)param_3 + __n); puVar2 = puVar6; puVar11 = param_3; if (uVar4 == 1) { do { puVar6 = puVar2; if (puVar6 <= param_3) break; puVar2 = (ushort *)((long)puVar6 + -1); } while (*(byte *)((long)puVar6 + -1) == 0x20); } else if (__n != 0) { do { if ((byte)*puVar11 != 0x20) break; puVar11 = (ushort *)((long)puVar11 + 1); } while (puVar11 < puVar6); } uVar5 = (long)puVar6 - (long)puVar11; uVar4 = (uint)uVar5; if ((0x7f < uVar4 && 0xff < uVar12) + uVar4 + 1 < uVar12) { lVar10 = 1; bVar7 = (byte)uVar5; if (0x7f < uVar4 && 0xff < uVar12) { bVar7 = bVar7 | 0x80; pbVar9[1] = (byte)(uVar5 >> 7); lVar10 = 2; } *pbVar9 = bVar7; memcpy(pbVar9 + lVar10,puVar11,uVar5 & 0xffffffff); pbVar9 = pbVar9 + lVar10 + (uVar5 & 0xffffffff); local_34 = local_34 | local_38; } else { memcpy(pbVar9,param_3,__n); pbVar9 = pbVar9 + __n; } } local_38 = local_38 * 2; if (0xff < local_38) break; } LAB_0017c498: param_3 = (ushort *)((long)param_3 + __n); puVar14 = puVar14 + 0xc; if (iVar13 == 0) { if (local_38 != 1) { *local_60 = (char)local_34; } goto LAB_0017c615; } } while( true ); *local_60 = (char)local_34; local_60 = local_60 + 1; param_3 = (ushort *)((long)param_3 + __n); puVar14 = puVar14 + 0xc; if (iVar13 == 0) goto LAB_0017c615; goto LAB_0017c315; }
50,394
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::next_byte_in_range(std::initializer_list<int>)
llama.cpp/common/json.hpp
bool next_byte_in_range(std::initializer_list<char_int_type> ranges) { JSON_ASSERT(ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6); add(current); for (auto range = ranges.begin(); range != ranges.end(); ++range) { get(); if (JSON_HEDLEY_LIKELY(*range <= current && current <= *(++range))) // NOLINT(bugprone-inc-dec-in-conditions) { add(current); } else { error_message = "invalid string: ill-formed UTF-8 byte"; return false; } } return true; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::input_stream_adapter>::next_byte_in_range(std::initializer_list<int>): pushq %rbx subq $0x10, %rsp cmpq $0x6, %rdx ja 0x86769 movl $0x54, %eax btq %rdx, %rax jae 0x86769 leaq 0xf(%rsp), %rbx movq %rbx, %rcx callq 0x21e4e movb (%rbx), %al andb $0x1, %al addq $0x10, %rsp popq %rbx retq leaq 0x932cc(%rip), %rdi # 0x119a3c leaq 0x93300(%rip), %rdx # 0x119a77 leaq 0x94018(%rip), %rcx # 0x11a796 movl $0x1da8, %esi # imm = 0x1DA8 xorl %eax, %eax callq 0x20e20
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE: push rbx sub rsp, 10h cmp rdx, 6 ja short loc_86769 mov eax, 54h ; 'T' bt rax, rdx jnb short loc_86769 lea rbx, [rsp+18h+var_9] mov rcx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE18next_byte_in_rangeESt16initializer_listIiE_cold_1; 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>>>::next_byte_in_range(std::initializer_list<int>) [clone] mov al, [rbx] and al, 1 add rsp, 10h pop rbx retn loc_86769: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aRangesSize2Ran; "ranges.size() == 2 || ranges.size() == "... mov esi, 1DA8h xor eax, eax call _ggml_abort
char 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>>>::next_byte_in_range( __m128i *a1, __int32 *a2, unsigned long long a3) { long long v3; // rax long long v5; // rdx long long v6; // rcx char v7[9]; // [rsp+Fh] [rbp-9h] BYREF if ( a3 <= 6 && (v3 = 84LL, _bittest64(&v3, a3)) ) { 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>>>::next_byte_in_range( a1, a2, a3, v7); return v7[0] & 1; } else { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7592LL, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); return nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_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>>::json_sax_dom_callback_parser( "/workspace/llm4binary/github2025/llama.cpp/common/json.hpp", 7592LL, v5, v6); } }
next_byte_in_range: PUSH RBX SUB RSP,0x10 CMP RDX,0x6 JA 0x00186769 MOV EAX,0x54 BT RAX,RDX JNC 0x00186769 LEA RBX,[RSP + 0xf] MOV RCX,RBX CALL 0x00121e4e MOV AL,byte ptr [RBX] AND AL,0x1 ADD RSP,0x10 POP RBX RET LAB_00186769: LEA RDI,[0x219a3c] LEA RDX,[0x219a77] LEA RCX,[0x21a796] MOV ESI,0x1da8 XOR EAX,EAX CALL 0x00120e20
/* nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::__cxx11::string > > >::next_byte_in_range(std::initializer_list<int>) */ ulong nlohmann::json_abi_v3_11_3::detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::next_byte_in_range(int8 param_1,int8 param_2,ulong param_3) { int8 uVar1; int1 local_9; if ((param_3 < 7) && ((0x54UL >> (param_3 & 0x3f) & 1) != 0)) { uVar1 = next_byte_in_range(); return CONCAT71((int7)((ulong)uVar1 >> 8),local_9) & 0xffffffffffffff01; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/json.hpp",0x1da8, "GGML_ASSERT(%s) failed", "ranges.size() == 2 || ranges.size() == 4 || ranges.size() == 6"); }
50,395
ma_get_dynamic
eloqsql/libmariadb/libmariadb/ma_array.c
void ma_get_dynamic(DYNAMIC_ARRAY *array, void * element, uint idx) { if (idx >= array->elements) { memset(element, 0, array->size_of_element); return; } memcpy(element,array->buffer+idx*array->size_of_element, (size_t) array->size_of_element); }
O0
c
ma_get_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movl -0x14(%rbp), %eax movq -0x8(%rbp), %rcx cmpl 0x8(%rcx), %eax jb 0x5d565 movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx xorl %esi, %esi callq 0x14260 jmp 0x5d58e movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movq (%rax), %rsi movl -0x14(%rbp), %eax movq -0x8(%rbp), %rcx imull 0x14(%rcx), %eax movl %eax, %eax addq %rax, %rsi movq -0x8(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx callq 0x14370 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_get_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov eax, [rbp+var_14] mov rcx, [rbp+var_8] cmp eax, [rcx+8] jb short loc_5D565 mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov eax, [rax+14h] mov edx, eax xor esi, esi call _memset jmp short loc_5D58E loc_5D565: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov rsi, [rax] mov eax, [rbp+var_14] mov rcx, [rbp+var_8] imul eax, [rcx+14h] mov eax, eax add rsi, rax mov rax, [rbp+var_8] mov eax, [rax+14h] mov edx, eax call _memcpy loc_5D58E: add rsp, 20h pop rbp retn
long long ma_get_dynamic(long long a1, long long a2, unsigned int a3) { if ( a3 < *(_DWORD *)(a1 + 8) ) return memcpy(a2, *(_DWORD *)(a1 + 20) * a3 + *(_QWORD *)a1, *(unsigned int *)(a1 + 20)); else return memset(a2, 0LL, *(unsigned int *)(a1 + 20)); }
ma_get_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x8] JC 0x0015d565 MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX XOR ESI,ESI CALL 0x00114260 JMP 0x0015d58e LAB_0015d565: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RBP + -0x14] MOV RCX,qword ptr [RBP + -0x8] IMUL EAX,dword ptr [RCX + 0x14] MOV EAX,EAX ADD RSI,RAX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX CALL 0x00114370 LAB_0015d58e: ADD RSP,0x20 POP RBP RET
void ma_get_dynamic(long *param_1,void *param_2,uint param_3) { if (param_3 < *(uint *)(param_1 + 1)) { memcpy(param_2,(void *)(*param_1 + (ulong)(param_3 * *(int *)((long)param_1 + 0x14))), (ulong)*(uint *)((long)param_1 + 0x14)); } else { memset(param_2,0,(ulong)*(uint *)((long)param_1 + 0x14)); } return; }
50,396
google::protobuf::compiler::objectivec::(anonymous namespace)::PathSplit(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>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_helpers.cc
void PathSplit(const std::string& path, std::string* directory, std::string* basename) { std::string::size_type last_slash = path.rfind('/'); if (last_slash == std::string::npos) { if (directory) { *directory = ""; } if (basename) { *basename = path; } } else { if (directory) { *directory = path.substr(0, last_slash); } if (basename) { *basename = path.substr(last_slash + 1); } } }
O0
cpp
google::protobuf::compiler::objectivec::(anonymous namespace)::PathSplit(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>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq %rdx, 0x50(%rsp) movq 0x60(%rsp), %rdi movl $0x2f, %esi movq $-0x1, %rdx callq 0x214c0 movq %rax, 0x48(%rsp) cmpq $-0x1, 0x48(%rsp) jne 0x81ae8 cmpq $0x0, 0x58(%rsp) je 0x81acf movq 0x58(%rsp), %rdi leaq 0x326a9f(%rip), %rsi # 0x3a8569 callq 0x21450 cmpq $0x0, 0x50(%rsp) je 0x81ae6 movq 0x60(%rsp), %rsi movq 0x50(%rsp), %rdi callq 0x21be0 jmp 0x81b63 cmpq $0x0, 0x58(%rsp) je 0x81b21 movq 0x60(%rsp), %rsi movq 0x48(%rsp), %rcx leaq 0x28(%rsp), %rdi xorl %eax, %eax movl %eax, %edx callq 0x21a50 movq 0x58(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x215e0 leaq 0x28(%rsp), %rdi callq 0x21cc8 cmpq $0x0, 0x50(%rsp) je 0x81b61 movq 0x60(%rsp), %rsi movq 0x48(%rsp), %rdx addq $0x1, %rdx leaq 0x8(%rsp), %rdi movq $-0x1, %rcx callq 0x21a50 movq 0x50(%rsp), %rdi leaq 0x8(%rsp), %rsi callq 0x215e0 leaq 0x8(%rsp), %rdi callq 0x21cc8 jmp 0x81b63 addq $0x68, %rsp retq nopl (%rax,%rax)
_ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_19PathSplitERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPS9_SC_: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_18], rdx mov rdi, [rsp+68h+var_8] mov esi, 2Fh ; '/' mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm; std::string::rfind(char,ulong) mov [rsp+68h+var_20], rax cmp [rsp+68h+var_20], 0FFFFFFFFFFFFFFFFh jnz short loc_81AE8 cmp [rsp+68h+var_10], 0 jz short loc_81ACF mov rdi, [rsp+68h+var_10] lea rsi, asc_3A8567+2; "" call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) loc_81ACF: cmp [rsp+68h+var_18], 0 jz short loc_81AE6 mov rsi, [rsp+68h+var_8] mov rdi, [rsp+68h+var_18] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) loc_81AE6: jmp short loc_81B63 loc_81AE8: cmp [rsp+68h+var_10], 0 jz short loc_81B21 mov rsi, [rsp+68h+var_8] mov rcx, [rsp+68h+var_20] lea rdi, [rsp+68h+var_40] xor eax, eax mov edx, eax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, [rsp+68h+var_10] lea rsi, [rsp+68h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_81B21: cmp [rsp+68h+var_18], 0 jz short loc_81B61 mov rsi, [rsp+68h+var_8] mov rdx, [rsp+68h+var_20] add rdx, 1 lea rdi, [rsp+68h+var_60] mov rcx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, [rsp+68h+var_18] lea rsi, [rsp+68h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_; std::string::operator=(std::string&&) lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_81B61: jmp short $+2 loc_81B63: add rsp, 68h retn
void google::protobuf::compiler::objectivec::`anonymous namespace'::PathSplit( long long a1, long long a2, long long a3) { _BYTE v3[32]; // [rsp+8h] [rbp-60h] BYREF _BYTE v4[32]; // [rsp+28h] [rbp-40h] BYREF long long v5; // [rsp+48h] [rbp-20h] long long v6; // [rsp+50h] [rbp-18h] long long v7; // [rsp+58h] [rbp-10h] long long v8; // [rsp+60h] [rbp-8h] v8 = a1; v7 = a2; v6 = a3; v5 = std::string::rfind(a1, 47LL, -1LL); if ( v5 == -1 ) { if ( v7 ) std::string::operator=(v7, ""); if ( v6 ) std::string::operator=(v6, v8); } else { if ( v7 ) { std::string::substr(v4, v8, 0LL, v5); std::string::operator=(v7, v4); std::string::~string(v4); } if ( v6 ) { std::string::substr(v3, v8, v5 + 1, -1LL); std::string::operator=(v6, v3); std::string::~string(v3); } } }
PathSplit: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x50],RDX MOV RDI,qword ptr [RSP + 0x60] MOV ESI,0x2f MOV RDX,-0x1 CALL 0x001214c0 MOV qword ptr [RSP + 0x48],RAX CMP qword ptr [RSP + 0x48],-0x1 JNZ 0x00181ae8 CMP qword ptr [RSP + 0x58],0x0 JZ 0x00181acf MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[0x4a8569] CALL 0x00121450 LAB_00181acf: CMP qword ptr [RSP + 0x50],0x0 JZ 0x00181ae6 MOV RSI,qword ptr [RSP + 0x60] MOV RDI,qword ptr [RSP + 0x50] CALL 0x00121be0 LAB_00181ae6: JMP 0x00181b63 LAB_00181ae8: CMP qword ptr [RSP + 0x58],0x0 JZ 0x00181b21 MOV RSI,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RSP + 0x48] LEA RDI,[RSP + 0x28] XOR EAX,EAX MOV EDX,EAX CALL 0x00121a50 MOV RDI,qword ptr [RSP + 0x58] LEA RSI,[RSP + 0x28] CALL 0x001215e0 LEA RDI,[RSP + 0x28] CALL 0x00121cc8 LAB_00181b21: CMP qword ptr [RSP + 0x50],0x0 JZ 0x00181b61 MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x48] ADD RDX,0x1 LEA RDI,[RSP + 0x8] MOV RCX,-0x1 CALL 0x00121a50 MOV RDI,qword ptr [RSP + 0x50] LEA RSI,[RSP + 0x8] CALL 0x001215e0 LEA RDI,[RSP + 0x8] CALL 0x00121cc8 LAB_00181b61: JMP 0x00181b63 LAB_00181b63: ADD RSP,0x68 RET
/* google::protobuf::compiler::objectivec::(anonymous namespace)::PathSplit(std::__cxx11::string const&, std::__cxx11::string*, std::__cxx11::string*) */ void google::protobuf::compiler::objectivec::(anonymous_namespace)::PathSplit (string *param_1,string *param_2,string *param_3) { string local_60 [32]; string local_40 [32]; long local_20; string *local_18; string *local_10; string *local_8; local_18 = param_3; local_10 = param_2; local_8 = param_1; local_20 = std::__cxx11::string::rfind((char)param_1,0x2f); if (local_20 == -1) { if (local_10 != (string *)0x0) { std::__cxx11::string::operator=(local_10,""); } if (local_18 != (string *)0x0) { std::__cxx11::string::operator=(local_18,local_8); } } else { if (local_10 != (string *)0x0) { std::__cxx11::string::substr((ulong)local_40,(ulong)local_8); std::__cxx11::string::operator=(local_10,local_40); std::__cxx11::string::~string(local_40); } if (local_18 != (string *)0x0) { std::__cxx11::string::substr((ulong)local_60,(ulong)local_8); std::__cxx11::string::operator=(local_18,local_60); std::__cxx11::string::~string(local_60); } } return; }
50,397
to_printable_8bit
eloqsql/strings/ctype.c
static uint to_printable_8bit(uchar *dst, my_wc_t wc, uint bs) { /* This function is used only in context of error messages for now. All non-BMP characters are currently replaced to question marks when a message is put into diagnostics area. */ DBUG_ASSERT(wc < 0x10000); *dst++= (char) bs; *dst++= _dig_vec_upper[(wc >> 12) & 0x0F]; *dst++= _dig_vec_upper[(wc >> 8) & 0x0F]; *dst++= _dig_vec_upper[(wc >> 4) & 0x0F]; *dst++= _dig_vec_upper[wc & 0x0F]; return MY_CS_PRINTABLE_CHAR_LENGTH; }
O0
c
to_printable_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) jmp 0xcc2c1 movl -0x14(%rbp), %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx shrq $0xc, %rcx andq $0xf, %rcx leaq 0x14c706(%rip), %rax # 0x2189f0 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx shrq $0x8, %rcx andq $0xf, %rcx leaq 0x14c6df(%rip), %rax # 0x2189f0 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx shrq $0x4, %rcx andq $0xf, %rcx leaq 0x14c6b8(%rip), %rax # 0x2189f0 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x10(%rbp), %rcx andq $0xf, %rcx leaq 0x14c695(%rip), %rax # 0x2189f0 movb (%rax,%rcx), %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movl $0x5, %eax popq %rbp retq nopw %cs:(%rax,%rax)
to_printable_8bit: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx jmp short $+2 loc_CC2C1: mov eax, [rbp+var_14] mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] shr rcx, 0Ch and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] shr rcx, 8 and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] shr rcx, 4 and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rcx, [rbp+var_10] and rcx, 0Fh lea rax, _dig_vec_upper; "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ" mov cl, [rax+rcx] mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov eax, 5 pop rbp retn
long long to_printable_8bit(_BYTE *a1, unsigned long long a2, char a3) { *a1 = a3; a1[1] = dig_vec_upper[(unsigned __int16)a2 >> 12]; a1[2] = dig_vec_upper[(a2 >> 8) & 0xF]; a1[3] = dig_vec_upper[(unsigned __int8)a2 >> 4]; a1[4] = dig_vec_upper[a2 & 0xF]; return 5LL; }
to_printable_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX JMP 0x001cc2c1 LAB_001cc2c1: MOV EAX,dword ptr [RBP + -0x14] MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] SHR RCX,0xc AND RCX,0xf LEA RAX,[0x3189f0] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] SHR RCX,0x8 AND RCX,0xf LEA RAX,[0x3189f0] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] SHR RCX,0x4 AND RCX,0xf LEA RAX,[0x3189f0] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RCX,qword ptr [RBP + -0x10] AND RCX,0xf LEA RAX,[0x3189f0] MOV CL,byte ptr [RAX + RCX*0x1] MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV EAX,0x5 POP RBP RET
int8 to_printable_8bit(int1 *param_1,ulong param_2,int1 param_3) { *param_1 = param_3; param_1[1] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 0xc & 0xf]; param_1[2] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 8 & 0xf]; param_1[3] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 >> 4 & 0xf]; param_1[4] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"[param_2 & 0xf]; return 5; }
50,398
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>>>::at<unsigned long&, 0>(unsigned long&)
monkey531[P]llama/common/./json.hpp
T & at(KeyType && key) // NOLINT(cppcoreguidelines-missing-std-forward) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it->second; } } JSON_THROW(std::out_of_range("key not found")); }
O2
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>>>::at<unsigned long&, 0>(unsigned long&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %r15 movq (%rdi), %rbx cmpq 0x8(%r15), %rbx je 0xb92dc movq (%r14), %rsi movq %rbx, %rdi callq 0xb931f testb %al, %al jne 0xb92cf addq $0x60, %rbx jmp 0xb92b4 addq $0x10, %rbx movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x28580 movq %rax, %rbx leaq 0x4869f(%rip), %rsi # 0x10198d movq %rax, %rdi callq 0x28130 movq 0xadcbb(%rip), %rsi # 0x166fb8 movq 0xadc94(%rip), %rdx # 0x166f98 movq %rbx, %rdi callq 0x29320 movq %rax, %r14 movq %rbx, %rdi callq 0x28830 movq %r14, %rdi callq 0x293c0
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_: push r15 push r14 push rbx mov r14, rsi mov r15, rdi mov rbx, [rdi] loc_B92B4: cmp rbx, [r15+8] jz short loc_B92DC mov rsi, [r14] mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_ test al, al jnz short loc_B92CF add rbx, 60h ; '`' jmp short loc_B92B4 loc_B92CF: add rbx, 10h mov rax, rbx pop rbx pop r14 pop r15 retn loc_B92DC: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aKeyNotFound; "key not found" mov rdi, rax; this call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*) mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_( long long *a1, _QWORD *a2) { long long i; // rbx std::out_of_range *exception; // rbx for ( i = *a1; ; i += 96LL ) { if ( i == a1[1] ) { exception = (std::out_of_range *)__cxa_allocate_exception(0x10uLL); std::out_of_range::out_of_range(exception, "key not found"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::out_of_range, (void (*)(void *))&std::out_of_range::~out_of_range); } if ( (unsigned __int8)ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_( i, *a2) ) break; } return i + 16; }
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV R15,RDI MOV RBX,qword ptr [RDI] LAB_001b92b4: CMP RBX,qword ptr [R15 + 0x8] JZ 0x001b92dc MOV RSI,qword ptr [R14] MOV RDI,RBX CALL 0x001b931f TEST AL,AL JNZ 0x001b92cf ADD RBX,0x60 JMP 0x001b92b4 LAB_001b92cf: ADD RBX,0x10 MOV RAX,RBX POP RBX POP R14 POP R15 RET LAB_001b92dc: PUSH 0x10 POP RDI CALL 0x00128580 MOV RBX,RAX LAB_001b92e7: LEA RSI,[0x20198d] MOV RDI,RAX CALL 0x00128130 LAB_001b92f6: MOV RSI,qword ptr [0x00266fb8] MOV RDX,qword ptr [0x00266f98] MOV RDI,RBX CALL 0x00129320
long _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atIRmTnNSt9enable_ifIXsr6detail21is_usable_as_key_typeISt8equal_toIvESD_T_EE5valueEiE4typeELi0EEERSF_OSS_ (long *param_1,int8 *param_2) { char cVar1; out_of_range *this; long lVar2; lVar2 = *param_1; while( true ) { if (lVar2 == param_1[1]) { this = (out_of_range *)__cxa_allocate_exception(0x10); /* try { // try from 001b92e7 to 001b92f5 has its CatchHandler @ 001b930c */ std::out_of_range::out_of_range(this,"key not found"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00266fb8,PTR__out_of_range_00266f98); } cVar1 = _ZN8nlohmann16json_abi_v3_11_3eqImTnNSt9enable_ifIXsr3std9is_scalarIT_EE5valueEiE4typeELi0EEEbRKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEES3_ (lVar2,*param_2); if (cVar1 != '\0') break; lVar2 = lVar2 + 0x60; } return lVar2 + 0x10; }
50,399
my_hash_sort_simple
eloqsql/strings/ctype-simple.c
void my_hash_sort_simple(CHARSET_INFO *cs, const uchar *key, size_t len, ulong *nr1, ulong *nr2) { register const uchar *sort_order=cs->sort_order; const uchar *end; uint16 space_weight= sort_order[' ']; /* Remove all trailing characters that are equal to space. We have to do this to be able to compare 'A ' and 'A' as identical. If the key is long enough, cut the trailing spaces (0x20) using an optimized function implemented in skip_trailing_spaces(). "len > 16" is just some heuristic here. Calling skip_triling_space() for short values is not desirable, because its initialization block may be more expensive than the performance gained. */ end= len > 16 ? skip_trailing_space(key, len) : key + len; /* We removed all trailing characters that are binary equal to space 0x20. Now remove all trailing characters that have weights equal to space. Some 8bit simple collations may have such characters: - cp1250_general_ci 0xA0 NO-BREAK SPACE == 0x20 SPACE - cp1251_ukrainian_ci 0x60 GRAVE ACCENT == 0x20 SPACE - koi8u_general_ci 0x60 GRAVE ACCENT == 0x20 SPACE */ for ( ; key < end ; ) { if (sort_order[*--end] != space_weight) { end++; break; } } my_hash_sort_simple_nopad(cs, key, end - key, nr1, nr2); }
O0
c
my_hash_sort_simple: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0x58(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movzbl 0x20(%rax), %eax movw %ax, -0x3a(%rbp) cmpq $0x10, -0x18(%rbp) jbe 0x7c8ae movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x7c930 movq %rax, -0x48(%rbp) jmp 0x7c8ba movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x48(%rbp), %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax cmpq -0x38(%rbp), %rax jae 0x7c8ff movq -0x30(%rbp), %rax movq -0x38(%rbp), %rcx movq %rcx, %rdx addq $-0x1, %rdx movq %rdx, -0x38(%rbp) movzbl -0x1(%rcx), %ecx movzbl (%rax,%rcx), %eax movzwl -0x3a(%rbp), %ecx cmpl %ecx, %eax je 0x7c8fd movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0x7c8ff jmp 0x7c8c2 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x38(%rbp), %rdx movq -0x10(%rbp), %rax subq %rax, %rdx movq -0x20(%rbp), %rcx movq -0x28(%rbp), %r8 callq 0x7c7a0 addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_simple: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov rax, [rbp+var_8] mov rax, [rax+58h] mov [rbp+var_30], rax mov rax, [rbp+var_30] movzx eax, byte ptr [rax+20h] mov [rbp+var_3A], ax cmp [rbp+var_18], 10h jbe short loc_7C8AE mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call skip_trailing_space_2 mov [rbp+var_48], rax jmp short loc_7C8BA loc_7C8AE: mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_48], rax loc_7C8BA: mov rax, [rbp+var_48] mov [rbp+var_38], rax loc_7C8C2: mov rax, [rbp+var_10] cmp rax, [rbp+var_38] jnb short loc_7C8FF mov rax, [rbp+var_30] mov rcx, [rbp+var_38] mov rdx, rcx add rdx, 0FFFFFFFFFFFFFFFFh mov [rbp+var_38], rdx movzx ecx, byte ptr [rcx-1] movzx eax, byte ptr [rax+rcx] movzx ecx, [rbp+var_3A] cmp eax, ecx jz short loc_7C8FD mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short loc_7C8FF loc_7C8FD: jmp short loc_7C8C2 loc_7C8FF: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_38] mov rax, [rbp+var_10] sub rdx, rax mov rcx, [rbp+var_20] mov r8, [rbp+var_28] call my_hash_sort_simple_nopad add rsp, 50h pop rbp retn
_QWORD * my_hash_sort_simple(long long a1, unsigned __int8 *a2, unsigned long long a3, long long *a4, _QWORD *a5) { unsigned long long v5; // rcx long long v7; // [rsp+8h] [rbp-48h] __int16 v8; // [rsp+16h] [rbp-3Ah] unsigned long long v9; // [rsp+18h] [rbp-38h] long long v10; // [rsp+20h] [rbp-30h] v10 = *(_QWORD *)(a1 + 88); v8 = *(unsigned __int8 *)(v10 + 32); if ( a3 <= 0x10 ) v7 = (long long)&a2[a3]; else v7 = skip_trailing_space_2(a2, a3); v9 = v7; while ( (unsigned long long)a2 < v9 ) { v5 = v9--; if ( *(unsigned __int8 *)(v10 + *(unsigned __int8 *)(v5 - 1)) != v8 ) return my_hash_sort_simple_nopad(a1, a2, ++v9 - (_QWORD)a2, a4, a5); } return my_hash_sort_simple_nopad(a1, a2, v9 - (_QWORD)a2, a4, a5); }
my_hash_sort_simple: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,byte ptr [RAX + 0x20] MOV word ptr [RBP + -0x3a],AX CMP qword ptr [RBP + -0x18],0x10 JBE 0x0017c8ae MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0017c930 MOV qword ptr [RBP + -0x48],RAX JMP 0x0017c8ba LAB_0017c8ae: MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RAX LAB_0017c8ba: MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x38],RAX LAB_0017c8c2: MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x38] JNC 0x0017c8ff MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RBP + -0x38] MOV RDX,RCX ADD RDX,-0x1 MOV qword ptr [RBP + -0x38],RDX MOVZX ECX,byte ptr [RCX + -0x1] MOVZX EAX,byte ptr [RAX + RCX*0x1] MOVZX ECX,word ptr [RBP + -0x3a] CMP EAX,ECX JZ 0x0017c8fd MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x0017c8ff LAB_0017c8fd: JMP 0x0017c8c2 LAB_0017c8ff: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x10] SUB RDX,RAX MOV RCX,qword ptr [RBP + -0x20] MOV R8,qword ptr [RBP + -0x28] CALL 0x0017c7a0 ADD RSP,0x50 POP RBP RET
void my_hash_sort_simple(long param_1,ulong param_2,ulong param_3,int8 param_4, int8 param_5) { char cVar1; long lVar2; ulong uVar3; ulong local_50; ulong local_40; lVar2 = *(long *)(param_1 + 0x58); cVar1 = *(char *)(lVar2 + 0x20); if (param_3 < 0x11) { local_50 = param_2 + param_3; } else { local_50 = skip_trailing_space(param_2,param_3); } local_40 = local_50; uVar3 = local_40; do { local_40 = uVar3; if (local_40 <= param_2) break; uVar3 = local_40 - 1; } while (*(char *)(lVar2 + (ulong)*(byte *)(local_40 - 1)) == cVar1); my_hash_sort_simple_nopad(param_1,param_2,local_40 - param_2,param_4,param_5); return; }