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
26,100
createDotAST(SEMANTICANALYZER::Dot const&)
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/test/test.cpp
AST::Node* createDotAST(SEMANTICANALYZER::Dot const& strDot) { AST::Node* dot = new AST::Node(DOT); { dot->addChild(new AST::Node(GRAMMERCONSTANTS::START_INTERNAL_BLOCK)); for(auto& property : strDot.internalProperties) { dot->addChild(createPropertyAST(property)); } dot->addChild(new AST::Node(GRAMMERCONSTANTS::END_INTERNAL_BLOCK)); } return dot; }
O0
cpp
createDotAST(SEMANTICANALYZER::Dot const&): pushq %rbp movq %rsp, %rbp subq $0x100, %rsp # imm = 0x100 movq %rdi, -0x8(%rbp) movl $0x38, %edi callq 0x2c7c0 movq %rax, -0xc8(%rbp) movb $0x1, -0x45(%rbp) leaq -0x31(%rbp), %rdi movq %rdi, -0xc0(%rbp) callq 0x2ce40 movq -0xc0(%rbp), %rdx leaq 0xde6ad(%rip), %rsi # 0x11a1bf leaq -0x30(%rbp), %rdi callq 0x3bdf0 jmp 0x3bb1d movq -0xc8(%rbp), %rdi leaq -0x30(%rbp), %rsi callq 0x3c550 jmp 0x3bb2f movb $0x0, -0x45(%rbp) leaq -0x30(%rbp), %rdi callq 0x2c500 leaq -0x31(%rbp), %rdi callq 0x2c8a0 movq -0xc8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xe0(%rbp) movl $0x38, %edi callq 0x2c7c0 movq %rax, -0xd8(%rbp) movb $0x1, -0x6a(%rbp) leaq -0x69(%rbp), %rdi movq %rdi, -0xd0(%rbp) callq 0x2ce40 movq -0xd0(%rbp), %rdx leaq 0xde5f6(%rip), %rsi # 0x11a184 leaq -0x68(%rbp), %rdi callq 0x3bdf0 jmp 0x3bb99 movq -0xd8(%rbp), %rdi leaq -0x68(%rbp), %rsi callq 0x3c550 jmp 0x3bbab movq -0xd8(%rbp), %rsi movq -0xe0(%rbp), %rdi movb $0x0, -0x6a(%rbp) callq 0x3c590 jmp 0x3bbc4 leaq -0x68(%rbp), %rdi callq 0x2c500 leaq -0x69(%rbp), %rdi callq 0x2c8a0 movq -0x8(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x78(%rbp), %rdi callq 0x3c660 movq %rax, -0x80(%rbp) movq -0x78(%rbp), %rdi callq 0x3c690 movq %rax, -0x88(%rbp) leaq -0x80(%rbp), %rdi leaq -0x88(%rbp), %rsi callq 0x3c6c0 testb $0x1, %al jne 0x3bc14 jmp 0x3bce9 leaq -0x80(%rbp), %rdi callq 0x3c700 movq %rax, -0x90(%rbp) movq -0x10(%rbp), %rax movq %rax, -0xe8(%rbp) movq -0x90(%rbp), %rdi callq 0x39b50 movq -0xe8(%rbp), %rdi movq %rax, %rsi callq 0x3c590 leaq -0x80(%rbp), %rdi callq 0x3c720 jmp 0x3bbfb movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x3bc78 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x30(%rbp), %rdi callq 0x2c500 leaq -0x31(%rbp), %rdi callq 0x2c8a0 testb $0x1, -0x45(%rbp) jne 0x3bc89 jmp 0x3bc9a movq -0xc8(%rbp), %rdi movl $0x38, %esi callq 0x2c7f0 jmp 0x3bde1 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x3bcc2 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0x68(%rbp), %rdi callq 0x2c500 leaq -0x69(%rbp), %rdi callq 0x2c8a0 testb $0x1, -0x6a(%rbp) jne 0x3bcd3 jmp 0x3bce4 movq -0xd8(%rbp), %rdi movl $0x38, %esi callq 0x2c7f0 jmp 0x3bde1 movq -0x10(%rbp), %rax movq %rax, -0x100(%rbp) movl $0x38, %edi callq 0x2c7c0 movq %rax, -0xf8(%rbp) movb $0x1, -0xb2(%rbp) leaq -0xb1(%rbp), %rdi movq %rdi, -0xf0(%rbp) callq 0x2ce40 movq -0xf0(%rbp), %rdx leaq 0xe837b(%rip), %rsi # 0x1240a8 leaq -0xb0(%rbp), %rdi callq 0x3bdf0 jmp 0x3bd3b movq -0xf8(%rbp), %rdi leaq -0xb0(%rbp), %rsi callq 0x3c550 jmp 0x3bd50 movq -0xf8(%rbp), %rsi movq -0x100(%rbp), %rdi movb $0x0, -0xb2(%rbp) callq 0x3c590 jmp 0x3bd6c leaq -0xb0(%rbp), %rdi callq 0x2c500 leaq -0xb1(%rbp), %rdi callq 0x2c8a0 movq -0x10(%rbp), %rax addq $0x100, %rsp # imm = 0x100 popq %rbp retq movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x3bdb7 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) leaq -0xb0(%rbp), %rdi callq 0x2c500 leaq -0xb1(%rbp), %rdi callq 0x2c8a0 testb $0x1, -0xb2(%rbp) jne 0x3bdce jmp 0x3bddf movq -0xf8(%rbp), %rdi movl $0x38, %esi callq 0x2c7f0 jmp 0x3bde1 movq -0x40(%rbp), %rdi callq 0x2ce30 nopw (%rax,%rax)
_Z12createDotASTRKN16SEMANTICANALYZER3DotE: push rbp mov rbp, rsp sub rsp, 100h mov [rbp+var_8], rdi mov edi, 38h ; '8'; unsigned __int64 call __Znwm; operator new(ulong) mov [rbp+var_C8], rax mov [rbp+var_45], 1 lea rdi, [rbp+var_31] mov [rbp+var_C0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_C0] lea rsi, aDot_1; "dot" lea rdi, [rbp+var_30] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_3BB1D: mov rdi, [rbp+var_C8] lea rsi, [rbp+var_30] call _ZN3AST4NodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; AST::Node::Node(std::string const&) jmp short $+2 loc_3BB2F: mov [rbp+var_45], 0 lea rdi, [rbp+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_31] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rbp+var_C8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov [rbp+var_E0], rax mov edi, 38h ; '8'; unsigned __int64 call __Znwm; operator new(ulong) mov [rbp+var_D8], rax mov [rbp+var_6A], 1 lea rdi, [rbp+var_69] mov [rbp+var_D0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_D0] lea rsi, asc_11A184; "{" lea rdi, [rbp+var_68] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_3BB99: mov rdi, [rbp+var_D8] lea rsi, [rbp+var_68] call _ZN3AST4NodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; AST::Node::Node(std::string const&) jmp short $+2 loc_3BBAB: mov rsi, [rbp+var_D8]; AST::Node * mov rdi, [rbp+var_E0]; this mov [rbp+var_6A], 0 call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*) jmp short $+2 loc_3BBC4: lea rdi, [rbp+var_68] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_69] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rbp+var_8] mov [rbp+var_78], rax mov rdi, [rbp+var_78] call _ZNKSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EE5beginEv; std::vector<SEMANTICANALYZER::Property>::begin(void) mov [rbp+var_80], rax mov rdi, [rbp+var_78] call _ZNKSt6vectorIN16SEMANTICANALYZER8PropertyESaIS1_EE3endEv; std::vector<SEMANTICANALYZER::Property>::end(void) mov [rbp+var_88], rax loc_3BBFB: lea rdi, [rbp+var_80] lea rsi, [rbp+var_88] call _ZN9__gnu_cxxneIPKN16SEMANTICANALYZER8PropertyESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<SEMANTICANALYZER::Property const*,std::vector<SEMANTICANALYZER::Property>>(__gnu_cxx::__normal_iterator<SEMANTICANALYZER::Property const*,std::vector<SEMANTICANALYZER::Property>> const&,__gnu_cxx::__normal_iterator<SEMANTICANALYZER::Property const*,std::vector<SEMANTICANALYZER::Property>> const&) test al, 1 jnz short loc_3BC14 jmp loc_3BCE9 loc_3BC14: lea rdi, [rbp+var_80] call _ZNK9__gnu_cxx17__normal_iteratorIPKN16SEMANTICANALYZER8PropertyESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<SEMANTICANALYZER::Property const*,std::vector<SEMANTICANALYZER::Property>>::operator*(void) mov [rbp+var_90], rax mov rax, [rbp+var_10] mov [rbp+var_E8], rax mov rdi, [rbp+var_90]; SEMANTICANALYZER::Property * call _Z17createPropertyASTRKN16SEMANTICANALYZER8PropertyE; createPropertyAST(SEMANTICANALYZER::Property const&) mov rdi, [rbp+var_E8]; this mov rsi, rax; AST::Node * call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*) lea rdi, [rbp+var_80] call _ZN9__gnu_cxx17__normal_iteratorIPKN16SEMANTICANALYZER8PropertyESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<SEMANTICANALYZER::Property const*,std::vector<SEMANTICANALYZER::Property>>::operator++(void) jmp short loc_3BBFB mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_3BC78 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_30] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_3BC78: lea rdi, [rbp+var_31] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rbp+var_45], 1 jnz short loc_3BC89 jmp short loc_3BC9A loc_3BC89: mov rdi, [rbp+var_C8]; void * mov esi, 38h ; '8'; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3BC9A: jmp loc_3BDE1 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_3BCC2 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_68] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_3BCC2: lea rdi, [rbp+var_69] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rbp+var_6A], 1 jnz short loc_3BCD3 jmp short loc_3BCE4 loc_3BCD3: mov rdi, [rbp+var_D8]; void * mov esi, 38h ; '8'; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3BCE4: jmp loc_3BDE1 loc_3BCE9: mov rax, [rbp+var_10] mov [rbp+var_100], rax mov edi, 38h ; '8'; unsigned __int64 call __Znwm; operator new(ulong) mov [rbp+var_F8], rax mov [rbp+var_B2], 1 lea rdi, [rbp+var_B1] mov [rbp+var_F0], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_F0] lea rsi, aErrorUnchecked+33h; "}" lea rdi, [rbp+var_B0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_3BD3B: mov rdi, [rbp+var_F8] lea rsi, [rbp+var_B0] call _ZN3AST4NodeC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; AST::Node::Node(std::string const&) jmp short $+2 loc_3BD50: mov rsi, [rbp+var_F8]; AST::Node * mov rdi, [rbp+var_100]; this mov [rbp+var_B2], 0 call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*) jmp short $+2 loc_3BD6C: lea rdi, [rbp+var_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_B1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rax, [rbp+var_10] add rsp, 100h pop rbp retn mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_3BDB7 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax lea rdi, [rbp+var_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_3BDB7: lea rdi, [rbp+var_B1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rbp+var_B2], 1 jnz short loc_3BDCE jmp short loc_3BDDF loc_3BDCE: mov rdi, [rbp+var_F8]; void * mov esi, 38h ; '8'; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3BDDF: jmp short $+2 loc_3BDE1: mov rdi, [rbp+var_40] call __Unwind_Resume
AST::Node * createDotAST(const SEMANTICANALYZER::Dot *a1, long long a2) { AST::Node *PropertyAST; // rax AST::Node *v4; // [rsp+0h] [rbp-100h] AST::Node *v5; // [rsp+8h] [rbp-F8h] AST::Node *v6; // [rsp+18h] [rbp-E8h] AST::Node *v7; // [rsp+28h] [rbp-D8h] AST::Node *v8; // [rsp+38h] [rbp-C8h] char v9; // [rsp+4Fh] [rbp-B1h] BYREF _BYTE v10[32]; // [rsp+50h] [rbp-B0h] BYREF SEMANTICANALYZER::Property *v11; // [rsp+70h] [rbp-90h] long long v12; // [rsp+78h] [rbp-88h] BYREF long long v13; // [rsp+80h] [rbp-80h] BYREF const SEMANTICANALYZER::Dot *v14; // [rsp+88h] [rbp-78h] char v15; // [rsp+96h] [rbp-6Ah] char v16; // [rsp+97h] [rbp-69h] BYREF _BYTE v17[36]; // [rsp+98h] [rbp-68h] BYREF char v18; // [rsp+CFh] [rbp-31h] BYREF _BYTE v19[32]; // [rsp+D0h] [rbp-30h] BYREF AST::Node *v20; // [rsp+F0h] [rbp-10h] const SEMANTICANALYZER::Dot *v21; // [rsp+F8h] [rbp-8h] v21 = a1; v8 = (AST::Node *)operator new(0x38uLL); std::allocator<char>::allocator(&v18, a2); std::string::basic_string<std::allocator<char>>(v19, "dot", &v18); AST::Node::Node(v8, v19); v17[35] = 0; std::string::~string(v19); std::allocator<char>::~allocator(&v18); v20 = v8; v7 = (AST::Node *)operator new(0x38uLL); std::allocator<char>::allocator(&v16, v19); std::string::basic_string<std::allocator<char>>(v17, "{", &v16); AST::Node::Node(v7, v17); v15 = 0; AST::Node::addChild(v8, v7); std::string::~string(v17); std::allocator<char>::~allocator(&v16); v14 = v21; v13 = std::vector<SEMANTICANALYZER::Property>::begin(v21); v12 = std::vector<SEMANTICANALYZER::Property>::end(v14); while ( (__gnu_cxx::operator!=<SEMANTICANALYZER::Property const*,std::vector<SEMANTICANALYZER::Property>>(&v13, &v12) & 1) != 0 ) { v11 = (SEMANTICANALYZER::Property *)__gnu_cxx::__normal_iterator<SEMANTICANALYZER::Property const*,std::vector<SEMANTICANALYZER::Property>>::operator*(&v13); v6 = v20; PropertyAST = createPropertyAST(v11, (long long)&v12); AST::Node::addChild(v6, PropertyAST); __gnu_cxx::__normal_iterator<SEMANTICANALYZER::Property const*,std::vector<SEMANTICANALYZER::Property>>::operator++(&v13); } v4 = v20; v5 = (AST::Node *)operator new(0x38uLL); std::allocator<char>::allocator(&v9, &v12); std::string::basic_string<std::allocator<char>>(v10, "}", &v9); AST::Node::Node(v5, v10); AST::Node::addChild(v4, v5); std::string::~string(v10); std::allocator<char>::~allocator(&v9); return v20; }
createDotAST: PUSH RBP MOV RBP,RSP SUB RSP,0x100 MOV qword ptr [RBP + -0x8],RDI MOV EDI,0x38 CALL 0x0012c7c0 MOV qword ptr [RBP + -0xc8],RAX MOV byte ptr [RBP + -0x45],0x1 LEA RDI,[RBP + -0x31] MOV qword ptr [RBP + -0xc0],RDI CALL 0x0012ce40 MOV RDX,qword ptr [RBP + -0xc0] LAB_0013bb0b: LEA RSI,[0x21a1bf] LEA RDI,[RBP + -0x30] CALL 0x0013bdf0 JMP 0x0013bb1d LAB_0013bb1d: MOV RDI,qword ptr [RBP + -0xc8] LEA RSI,[RBP + -0x30] CALL 0x0013c550 LAB_0013bb2d: JMP 0x0013bb2f LAB_0013bb2f: MOV byte ptr [RBP + -0x45],0x0 LEA RDI,[RBP + -0x30] CALL 0x0012c500 LEA RDI,[RBP + -0x31] CALL 0x0012c8a0 MOV RAX,qword ptr [RBP + -0xc8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xe0],RAX MOV EDI,0x38 CALL 0x0012c7c0 MOV qword ptr [RBP + -0xd8],RAX MOV byte ptr [RBP + -0x6a],0x1 LEA RDI,[RBP + -0x69] MOV qword ptr [RBP + -0xd0],RDI CALL 0x0012ce40 MOV RDX,qword ptr [RBP + -0xd0] LAB_0013bb87: LEA RSI,[0x21a184] LEA RDI,[RBP + -0x68] CALL 0x0013bdf0 JMP 0x0013bb99 LAB_0013bb99: MOV RDI,qword ptr [RBP + -0xd8] LEA RSI,[RBP + -0x68] CALL 0x0013c550 JMP 0x0013bbab LAB_0013bbab: MOV RSI,qword ptr [RBP + -0xd8] MOV RDI,qword ptr [RBP + -0xe0] MOV byte ptr [RBP + -0x6a],0x0 CALL 0x0013c590 LAB_0013bbc2: JMP 0x0013bbc4 LAB_0013bbc4: LEA RDI,[RBP + -0x68] CALL 0x0012c500 LEA RDI,[RBP + -0x69] CALL 0x0012c8a0 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x78],RAX MOV RDI,qword ptr [RBP + -0x78] CALL 0x0013c660 MOV qword ptr [RBP + -0x80],RAX MOV RDI,qword ptr [RBP + -0x78] CALL 0x0013c690 MOV qword ptr [RBP + -0x88],RAX LAB_0013bbfb: LEA RDI,[RBP + -0x80] LEA RSI,[RBP + -0x88] CALL 0x0013c6c0 TEST AL,0x1 JNZ 0x0013bc14 JMP 0x0013bce9 LAB_0013bc14: LEA RDI,[RBP + -0x80] CALL 0x0013c700 MOV qword ptr [RBP + -0x90],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0xe8],RAX MOV RDI,qword ptr [RBP + -0x90] CALL 0x00139b50 MOV RDI,qword ptr [RBP + -0xe8] MOV RSI,RAX CALL 0x0013c590 LEA RDI,[RBP + -0x80] CALL 0x0013c720 JMP 0x0013bbfb LAB_0013bce9: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x100],RAX MOV EDI,0x38 CALL 0x0012c7c0 MOV qword ptr [RBP + -0xf8],RAX MOV byte ptr [RBP + -0xb2],0x1 LEA RDI,[RBP + -0xb1] MOV qword ptr [RBP + -0xf0],RDI CALL 0x0012ce40 MOV RDX,qword ptr [RBP + -0xf0] LAB_0013bd26: LEA RSI,[0x2240a8] LEA RDI,[RBP + -0xb0] CALL 0x0013bdf0 JMP 0x0013bd3b LAB_0013bd3b: MOV RDI,qword ptr [RBP + -0xf8] LEA RSI,[RBP + -0xb0] CALL 0x0013c550 JMP 0x0013bd50 LAB_0013bd50: MOV RSI,qword ptr [RBP + -0xf8] MOV RDI,qword ptr [RBP + -0x100] MOV byte ptr [RBP + -0xb2],0x0 CALL 0x0013c590 LAB_0013bd6a: JMP 0x0013bd6c LAB_0013bd6c: LEA RDI,[RBP + -0xb0] CALL 0x0012c500 LEA RDI,[RBP + -0xb1] CALL 0x0012c8a0 MOV RAX,qword ptr [RBP + -0x10] ADD RSP,0x100 POP RBP RET
/* createDotAST(SEMANTICANALYZER::Dot const&) */ Node * createDotAST(Dot *param_1) { bool bVar1; Node *pNVar2; Node *pNVar3; allocator local_b9; string local_b8 [32]; Property *local_98; int8 local_90; int8 local_88; vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>> *local_80; int1 local_72; allocator local_71; string local_70 [35]; int1 local_4d; allocator local_39; string local_38 [32]; Node *local_18; Dot *local_10; local_10 = param_1; pNVar2 = (Node *)operator_new(0x38); local_4d = 1; std::allocator<char>::allocator(); /* try { // try from 0013bb0b to 0013bb1a has its CatchHandler @ 0013bc55 */ std::__cxx11::string::string<std::allocator<char>>(local_38,"dot",&local_39); /* try { // try from 0013bb1d to 0013bb2c has its CatchHandler @ 0013bc63 */ AST::Node::Node(pNVar2,local_38); local_4d = 0; std::__cxx11::string::~string(local_38); std::allocator<char>::~allocator((allocator<char> *)&local_39); local_18 = pNVar2; pNVar3 = (Node *)operator_new(0x38); local_72 = 1; std::allocator<char>::allocator(); /* try { // try from 0013bb87 to 0013bb96 has its CatchHandler @ 0013bc9f */ std::__cxx11::string::string<std::allocator<char>>(local_70,"{",&local_71); /* try { // try from 0013bb99 to 0013bbc1 has its CatchHandler @ 0013bcad */ AST::Node::Node(pNVar3,local_70); local_72 = 0; AST::Node::addChild(pNVar2,pNVar3); std::__cxx11::string::~string(local_70); std::allocator<char>::~allocator((allocator<char> *)&local_71); local_80 = (vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>> *) local_10; local_88 = std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>:: begin((vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>> *) local_10); local_90 = std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>::end (local_80); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_88,(__normal_iterator *)&local_90); pNVar2 = local_18; if (!bVar1) break; local_98 = (Property *) __gnu_cxx:: __normal_iterator<SEMANTICANALYZER::Property_const*,std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>> ::operator*((__normal_iterator<SEMANTICANALYZER::Property_const*,std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>> *)&local_88); pNVar2 = local_18; pNVar3 = (Node *)createPropertyAST(local_98); AST::Node::addChild(pNVar2,pNVar3); __gnu_cxx:: __normal_iterator<SEMANTICANALYZER::Property_const*,std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>> ::operator++((__normal_iterator<SEMANTICANALYZER::Property_const*,std::vector<SEMANTICANALYZER::Property,std::allocator<SEMANTICANALYZER::Property>>> *)&local_88); } pNVar3 = (Node *)operator_new(0x38); std::allocator<char>::allocator(); /* try { // try from 0013bd26 to 0013bd38 has its CatchHandler @ 0013bd91 */ std::__cxx11::string::string<std::allocator<char>>(local_b8,"}",&local_b9); /* try { // try from 0013bd3b to 0013bd69 has its CatchHandler @ 0013bd9f */ AST::Node::Node(pNVar3,local_b8); AST::Node::addChild(pNVar2,pNVar3); std::__cxx11::string::~string(local_b8); std::allocator<char>::~allocator((allocator<char> *)&local_b9); return local_18; }
26,101
createDotAST(SEMANTICANALYZER::Dot const&)
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/test/test.cpp
AST::Node* createDotAST(SEMANTICANALYZER::Dot const& strDot) { AST::Node* dot = new AST::Node(DOT); { dot->addChild(new AST::Node(GRAMMERCONSTANTS::START_INTERNAL_BLOCK)); for(auto& property : strDot.internalProperties) { dot->addChild(createPropertyAST(property)); } dot->addChild(new AST::Node(GRAMMERCONSTANTS::END_INTERNAL_BLOCK)); } return dot; }
O1
cpp
createDotAST(SEMANTICANALYZER::Dot const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdi, %r15 movl $0x38, %edi callq 0x144e0 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x4ff45(%rip), %rsi # 0x721d1 leaq 0x4ff41(%rip), %rdx # 0x721d4 movq %rsp, %rdi callq 0x250c6 movq %rbx, %rax addq $0x10, %rax movq %rax, (%rbx) movq (%rsp), %rsi movq 0x8(%rsp), %rdx addq %rsi, %rdx movq %rbx, %rdi callq 0x22970 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rbx) movq $0x0, 0x30(%rbx) movq (%rsp), %rdi cmpq %r12, %rdi je 0x222de movq 0x10(%rsp), %rsi incq %rsi callq 0x14510 movl $0x38, %edi callq 0x144e0 movq %rax, %r14 movq %rsp, %rdi movq %r12, (%rdi) leaq 0x4fe9e(%rip), %rsi # 0x72196 leaq 0x4fe98(%rip), %rdx # 0x72197 callq 0x250c6 movq %r14, %rax addq $0x10, %rax movq %rax, (%r14) movq (%rsp), %rsi movq 0x8(%rsp), %rdx addq %rsi, %rdx movb $0x1, %bpl movq %r14, %rdi callq 0x22970 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%r14) movq $0x0, 0x30(%r14) xorl %ebp, %ebp movq %rbx, %rdi movq %r14, %rsi callq 0x2277c movq (%rsp), %rdi cmpq %r12, %rdi je 0x22358 movq 0x10(%rsp), %rsi incq %rsi callq 0x14510 movq (%r15), %r14 movq 0x8(%r15), %r15 cmpq %r15, %r14 je 0x2237d movq %r14, %rdi callq 0x20e5f movq %rbx, %rdi movq %rax, %rsi callq 0x2277c addq $0x40, %r14 jmp 0x2235f movl $0x38, %edi callq 0x144e0 movq %rax, %r14 movq %rsp, %rdi movq %r12, (%rdi) leaq 0x596b9(%rip), %rsi # 0x7ba50 leaq 0x596b3(%rip), %rdx # 0x7ba51 callq 0x250c6 movq %r14, %rax addq $0x10, %rax movq %rax, (%r14) movq (%rsp), %rsi movq 0x8(%rsp), %rdx addq %rsi, %rdx movb $0x1, %bpl movq %r14, %rdi callq 0x22970 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%r14) movq $0x0, 0x30(%r14) xorl %ebp, %ebp movq %rbx, %rdi movq %r14, %rsi callq 0x2277c movq (%rsp), %rdi cmpq %r12, %rdi je 0x223f7 movq 0x10(%rsp), %rsi incq %rsi callq 0x14510 movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0x22409 movq %rax, %r15 movb $0x1, %bpl jmp 0x2244f movq %rax, %r15 movq (%rsp), %rdi cmpq %r12, %rdi je 0x2242f movq 0x10(%rsp), %rsi incq %rsi callq 0x14510 jmp 0x2242f movq %rax, %r15 movq %rbx, %r14 jmp 0x22454 jmp 0x22436 movq %rax, %r15 movq (%rsp), %rdi cmpq %r12, %rdi je 0x2244f movq 0x10(%rsp), %rsi incq %rsi callq 0x14510 testb %bpl, %bpl je 0x22461 movl $0x38, %esi movq %r14, %rdi callq 0x14510 movq %r15, %rdi callq 0x14960 nop
_Z12createDotASTRKN16SEMANTICANALYZER3DotE: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov r15, rdi mov edi, 38h ; '8'; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax lea r12, [rsp+48h+var_38] mov [r12-10h], r12 lea rsi, aDot_1; "dot" lea rdx, aDot_1+3; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx add rax, 10h mov [rbx], rax mov rsi, [rsp+48h+var_48] mov rdx, [rsp+48h+var_40] add rdx, rsi mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) xorps xmm0, xmm0 movups xmmword ptr [rbx+20h], xmm0 mov qword ptr [rbx+30h], 0 mov rdi, [rsp+48h+var_48]; void * cmp rdi, r12 jz short loc_222DE mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_222DE: mov edi, 38h ; '8'; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax mov rdi, rsp mov [rdi], r12 lea rsi, asc_72196; "{" lea rdx, asc_72196+1; "" 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 rax, r14 add rax, 10h mov [r14], rax mov rsi, [rsp+48h+var_48] mov rdx, [rsp+48h+var_40] add rdx, rsi mov bpl, 1 mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) xorps xmm0, xmm0 movups xmmword ptr [r14+20h], xmm0 mov qword ptr [r14+30h], 0 xor ebp, ebp mov rdi, rbx; this mov rsi, r14; AST::Node * call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*) mov rdi, [rsp+48h+var_48]; void * cmp rdi, r12 jz short loc_22358 mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_22358: mov r14, [r15] mov r15, [r15+8] loc_2235F: cmp r14, r15 jz short loc_2237D mov rdi, r14; SEMANTICANALYZER::Property * call _Z17createPropertyASTRKN16SEMANTICANALYZER8PropertyE; createPropertyAST(SEMANTICANALYZER::Property const&) mov rdi, rbx; this mov rsi, rax; AST::Node * call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*) add r14, 40h ; '@' jmp short loc_2235F loc_2237D: mov edi, 38h ; '8'; unsigned __int64 call __Znwm; operator new(ulong) mov r14, rax mov rdi, rsp mov [rdi], r12 lea rsi, aErrorUnchecked+33h; "}" lea rdx, aErrorUnchecked+34h; "" 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 rax, r14 add rax, 10h mov [r14], rax mov rsi, [rsp+48h+var_48] mov rdx, [rsp+48h+var_40] add rdx, rsi mov bpl, 1 mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) xorps xmm0, xmm0 movups xmmword ptr [r14+20h], xmm0 mov qword ptr [r14+30h], 0 xor ebp, ebp mov rdi, rbx; this mov rsi, r14; AST::Node * call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*) mov rdi, [rsp+48h+var_48]; void * cmp rdi, r12 jz short loc_223F7 mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_223F7: mov rax, rbx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp short $+2 loc_22409: mov r15, rax mov bpl, 1 jmp short loc_2244F mov r15, rax mov rdi, [rsp+0]; void * cmp rdi, r12 jz short loc_2242F mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_2242F mov r15, rax loc_2242F: mov r14, rbx jmp short loc_22454 jmp short $+2 loc_22436: mov r15, rax mov rdi, [rsp+0]; void * cmp rdi, r12 jz short loc_2244F mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2244F: test bpl, bpl jz short loc_22461 loc_22454: mov esi, 38h ; '8'; unsigned __int64 mov rdi, r14; void * call __ZdlPvm; operator delete(void *,ulong) loc_22461: mov rdi, r15 call __Unwind_Resume
long long createDotAST(const SEMANTICANALYZER::Property **a1) { long long v1; // rbx long long v2; // r14 const SEMANTICANALYZER::Property *v3; // r14 const SEMANTICANALYZER::Property *v4; // r15 AST::Node *PropertyAST; // rax long long v6; // r14 void *v8; // [rsp+0h] [rbp-48h] BYREF long long v9; // [rsp+8h] [rbp-40h] _QWORD v10[7]; // [rsp+10h] [rbp-38h] BYREF v1 = operator new(0x38uLL); v8 = v10; std::string::_M_construct<char const*>(&v8, "dot", ""); *(_QWORD *)v1 = v1 + 16; std::string::_M_construct<char *>(v1, v8, (char *)v8 + v9); *(_OWORD *)(v1 + 32) = 0LL; *(_QWORD *)(v1 + 48) = 0LL; if ( v8 != v10 ) operator delete(v8, v10[0] + 1LL); v2 = operator new(0x38uLL); v8 = v10; std::string::_M_construct<char const*>(&v8, "{", ""); *(_QWORD *)v2 = v2 + 16; std::string::_M_construct<char *>(v2, v8, (char *)v8 + v9); *(_OWORD *)(v2 + 32) = 0LL; *(_QWORD *)(v2 + 48) = 0LL; AST::Node::addChild((AST::Node *)v1, (AST::Node *)v2); if ( v8 != v10 ) operator delete(v8, v10[0] + 1LL); v3 = *a1; v4 = a1[1]; while ( v3 != v4 ) { PropertyAST = (AST::Node *)createPropertyAST(v3); AST::Node::addChild((AST::Node *)v1, PropertyAST); v3 = (const SEMANTICANALYZER::Property *)((char *)v3 + 64); } v6 = operator new(0x38uLL); v8 = v10; std::string::_M_construct<char const*>(&v8, "}", ""); *(_QWORD *)v6 = v6 + 16; std::string::_M_construct<char *>(v6, v8, (char *)v8 + v9); *(_OWORD *)(v6 + 32) = 0LL; *(_QWORD *)(v6 + 48) = 0LL; AST::Node::addChild((AST::Node *)v1, (AST::Node *)v6); if ( v8 != v10 ) operator delete(v8, v10[0] + 1LL); return v1; }
createDotAST: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R15,RDI MOV EDI,0x38 CALL 0x001144e0 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 LAB_00122285: LEA RSI,[0x1721d1] LEA RDX,[0x1721d4] MOV RDI,RSP CALL 0x001250c6 MOV RAX,RBX ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] ADD RDX,RSI LAB_001222b1: MOV RDI,RBX CALL 0x00122970 LAB_001222b9: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOV qword ptr [RBX + 0x30],0x0 MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x001222de MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00114510 LAB_001222de: MOV EDI,0x38 CALL 0x001144e0 MOV R14,RAX MOV RDI,RSP MOV qword ptr [RDI],R12 LAB_001222f1: LEA RSI,[0x172196] LEA RDX,[0x172197] CALL 0x001250c6 MOV RAX,R14 ADD RAX,0x10 MOV qword ptr [R14],RAX MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] ADD RDX,RSI MOV BPL,0x1 LAB_0012231d: MOV RDI,R14 CALL 0x00122970 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x20],XMM0 MOV qword ptr [R14 + 0x30],0x0 XOR EBP,EBP MOV RDI,RBX MOV RSI,R14 CALL 0x0012277c LAB_00122342: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x00122358 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00114510 LAB_00122358: MOV R14,qword ptr [R15] MOV R15,qword ptr [R15 + 0x8] LAB_0012235f: CMP R14,R15 JZ 0x0012237d MOV RDI,R14 CALL 0x00120e5f MOV RDI,RBX MOV RSI,RAX CALL 0x0012277c ADD R14,0x40 JMP 0x0012235f LAB_0012237d: MOV EDI,0x38 CALL 0x001144e0 MOV R14,RAX MOV RDI,RSP MOV qword ptr [RDI],R12 LAB_00122390: LEA RSI,[0x17ba50] LEA RDX,[0x17ba51] CALL 0x001250c6 MOV RAX,R14 ADD RAX,0x10 MOV qword ptr [R14],RAX MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] ADD RDX,RSI MOV BPL,0x1 LAB_001223bc: MOV RDI,R14 CALL 0x00122970 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R14 + 0x20],XMM0 MOV qword ptr [R14 + 0x30],0x0 XOR EBP,EBP MOV RDI,RBX MOV RSI,R14 CALL 0x0012277c LAB_001223e1: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x001223f7 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00114510 LAB_001223f7: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* createDotAST(SEMANTICANALYZER::Dot const&) */ Node * createDotAST(Dot *param_1) { Property *pPVar1; Node *this; Node *pNVar2; Property *pPVar3; long *local_48; long local_40; long local_38 [2]; this = (Node *)operator_new(0x38); local_48 = local_38; /* try { // try from 00122285 to 0012229a has its CatchHandler @ 0012242c */ std::__cxx11::string::_M_construct<char_const*>(&local_48,&DAT_001721d1,&DAT_001721d4); *(Node **)this = this + 0x10; /* try { // try from 001222b1 to 001222b8 has its CatchHandler @ 00122411 */ std::__cxx11::string::_M_construct<char*>(this,local_48,local_40 + (long)local_48); *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } pNVar2 = (Node *)operator_new(0x38); local_48 = local_38; /* try { // try from 001222f1 to 00122303 has its CatchHandler @ 00122409 */ std::__cxx11::string::_M_construct<char_const*>(&local_48,&DAT_00172196,&DAT_00172197); *(Node **)pNVar2 = pNVar2 + 0x10; /* try { // try from 0012231d to 00122341 has its CatchHandler @ 00122436 */ std::__cxx11::string::_M_construct<char*>(pNVar2,local_48,local_40 + (long)local_48); *(int8 *)(pNVar2 + 0x20) = 0; *(int8 *)(pNVar2 + 0x28) = 0; *(int8 *)(pNVar2 + 0x30) = 0; AST::Node::addChild(this,pNVar2); if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } pPVar1 = *(Property **)(param_1 + 8); for (pPVar3 = *(Property **)param_1; pPVar3 != pPVar1; pPVar3 = pPVar3 + 0x40) { pNVar2 = (Node *)createPropertyAST(pPVar3); AST::Node::addChild(this,pNVar2); } pNVar2 = (Node *)operator_new(0x38); local_48 = local_38; /* try { // try from 00122390 to 001223a2 has its CatchHandler @ 00122407 */ std::__cxx11::string::_M_construct<char_const*>(&local_48,"}",""); *(Node **)pNVar2 = pNVar2 + 0x10; /* try { // try from 001223bc to 001223e0 has its CatchHandler @ 00122434 */ std::__cxx11::string::_M_construct<char*>(pNVar2,local_48,local_40 + (long)local_48); *(int8 *)(pNVar2 + 0x20) = 0; *(int8 *)(pNVar2 + 0x28) = 0; *(int8 *)(pNVar2 + 0x30) = 0; AST::Node::addChild(this,pNVar2); if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } return this; }
26,102
createDotAST(SEMANTICANALYZER::Dot const&)
11AgReS1SoR11[P]Graph/Common/SemanticAnalyzer/test/test.cpp
AST::Node* createDotAST(SEMANTICANALYZER::Dot const& strDot) { AST::Node* dot = new AST::Node(DOT); { dot->addChild(new AST::Node(GRAMMERCONSTANTS::START_INTERNAL_BLOCK)); for(auto& property : strDot.internalProperties) { dot->addChild(createPropertyAST(property)); } dot->addChild(new AST::Node(GRAMMERCONSTANTS::END_INTERNAL_BLOCK)); } return dot; }
O3
cpp
createDotAST(SEMANTICANALYZER::Dot const&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movq %rdi, %r14 movl $0x38, %edi callq 0x144e0 movq %rax, %rbx leaq 0x10(%rsp), %r12 movq %r12, -0x10(%r12) leaq 0x4fb96(%rip), %rsi # 0x721d1 leaq 0x4fb92(%rip), %rdx # 0x721d4 movq %rsp, %rdi callq 0x25408 movq %rbx, %rax addq $0x10, %rax movq %rax, (%rbx) movq (%rsp), %rsi movq 0x8(%rsp), %rdx addq %rsi, %rdx movq %rbx, %rdi callq 0x22d20 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%rbx) movq $0x0, 0x30(%rbx) movq (%rsp), %rdi cmpq %r12, %rdi je 0x2268d movq 0x10(%rsp), %rsi incq %rsi callq 0x14510 movl $0x38, %edi callq 0x144e0 movq %rax, %r15 movq %rsp, %rdi movq %r12, (%rdi) leaq 0x4faef(%rip), %rsi # 0x72196 leaq 0x4fae9(%rip), %rdx # 0x72197 callq 0x25408 movq %r15, %rax addq $0x10, %rax movq %rax, (%r15) movq (%rsp), %rsi movq 0x8(%rsp), %rdx addq %rsi, %rdx movb $0x1, %bpl movq %r15, %rdi callq 0x22d20 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%r15) movq $0x0, 0x30(%r15) xorl %ebp, %ebp movq %rbx, %rdi movq %r15, %rsi callq 0x22b2c movq (%rsp), %rdi cmpq %r12, %rdi je 0x22707 movq 0x10(%rsp), %rsi incq %rsi callq 0x14510 movq (%r14), %r15 movq 0x8(%r14), %r14 cmpq %r14, %r15 je 0x2272c movq %r15, %rdi callq 0x211fb movq %rbx, %rdi movq %rax, %rsi callq 0x22b2c addq $0x40, %r15 jmp 0x2270e movl $0x38, %edi callq 0x144e0 movq %rax, %r15 movq %rsp, %rdi movq %r12, (%rdi) leaq 0x5924a(%rip), %rsi # 0x7b990 leaq 0x59244(%rip), %rdx # 0x7b991 callq 0x25408 movq %r15, %rax addq $0x10, %rax movq %rax, (%r15) movq (%rsp), %rsi movq 0x8(%rsp), %rdx addq %rsi, %rdx movb $0x1, %bpl movq %r15, %rdi callq 0x22d20 xorps %xmm0, %xmm0 movups %xmm0, 0x20(%r15) movq $0x0, 0x30(%r15) xorl %ebp, %ebp movq %rbx, %rdi movq %r15, %rsi callq 0x22b2c movq (%rsp), %rdi cmpq %r12, %rdi je 0x227a6 movq 0x10(%rsp), %rsi incq %rsi callq 0x14510 movq %rbx, %rax addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0x227b8 movq %rax, %r14 movq %r15, %rbx jmp 0x22803 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0x22803 movq 0x10(%rsp), %rsi incq %rsi callq 0x14510 jmp 0x22803 movq %rax, %r14 jmp 0x22803 jmp 0x227e2 movq %rax, %r14 movq (%rsp), %rdi cmpq %r12, %rdi je 0x227fb movq 0x10(%rsp), %rsi incq %rsi callq 0x14510 movq %r15, %rbx testb %bpl, %bpl je 0x22810 movl $0x38, %esi movq %rbx, %rdi callq 0x14510 movq %r14, %rdi callq 0x14960
_Z12createDotASTRKN16SEMANTICANALYZER3DotE: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov r14, rdi mov edi, 38h ; '8'; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax lea r12, [rsp+48h+var_38] mov [r12-10h], r12 lea rsi, aDot_1; "dot" lea rdx, aDot_1+3; "" mov rdi, rsp call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx add rax, 10h mov [rbx], rax mov rsi, [rsp+48h+var_48] mov rdx, [rsp+48h+var_40] add rdx, rsi mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) xorps xmm0, xmm0 movups xmmword ptr [rbx+20h], xmm0 mov qword ptr [rbx+30h], 0 mov rdi, [rsp+48h+var_48]; void * cmp rdi, r12 jz short loc_2268D mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_2268D: mov edi, 38h ; '8'; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rsp mov [rdi], r12 lea rsi, asc_72196; "{" lea rdx, asc_72196+1; "" 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 rax, r15 add rax, 10h mov [r15], rax mov rsi, [rsp+48h+var_48] mov rdx, [rsp+48h+var_40] add rdx, rsi mov bpl, 1 mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) xorps xmm0, xmm0 movups xmmword ptr [r15+20h], xmm0 mov qword ptr [r15+30h], 0 xor ebp, ebp mov rdi, rbx; this mov rsi, r15; AST::Node * call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*) mov rdi, [rsp+48h+var_48]; void * cmp rdi, r12 jz short loc_22707 mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_22707: mov r15, [r14] mov r14, [r14+8] loc_2270E: cmp r15, r14 jz short loc_2272C mov rdi, r15; SEMANTICANALYZER::Property * call _Z17createPropertyASTRKN16SEMANTICANALYZER8PropertyE; createPropertyAST(SEMANTICANALYZER::Property const&) mov rdi, rbx; this mov rsi, rax; AST::Node * call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*) add r15, 40h ; '@' jmp short loc_2270E loc_2272C: mov edi, 38h ; '8'; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rsp mov [rdi], r12 lea rsi, aErrorUnchecked+33h; "}" lea rdx, aErrorUnchecked+34h; "" 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 rax, r15 add rax, 10h mov [r15], rax mov rsi, [rsp+48h+var_48] mov rdx, [rsp+48h+var_40] add rdx, rsi mov bpl, 1 mov rdi, r15 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) xorps xmm0, xmm0 movups xmmword ptr [r15+20h], xmm0 mov qword ptr [r15+30h], 0 xor ebp, ebp mov rdi, rbx; this mov rsi, r15; AST::Node * call _ZN3AST4Node8addChildEPS0_; AST::Node::addChild(AST::Node*) mov rdi, [rsp+48h+var_48]; void * cmp rdi, r12 jz short loc_227A6 mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_227A6: mov rax, rbx add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp short $+2 loc_227B8: mov r14, rax mov rbx, r15 jmp short loc_22803 mov r14, rax mov rdi, [rsp+0]; void * cmp rdi, r12 jz short loc_22803 mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_22803 mov r14, rax jmp short loc_22803 jmp short $+2 loc_227E2: mov r14, rax mov rdi, [rsp+0]; void * cmp rdi, r12 jz short loc_227FB mov rsi, [rsp+arg_8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_227FB: mov rbx, r15 test bpl, bpl jz short loc_22810 loc_22803: mov esi, 38h ; '8'; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) loc_22810: mov rdi, r14 call __Unwind_Resume
long long createDotAST(const SEMANTICANALYZER::Property **a1) { long long v1; // rbx long long v2; // r15 const SEMANTICANALYZER::Property *v3; // r15 const SEMANTICANALYZER::Property *v4; // r14 AST::Node *PropertyAST; // rax long long v6; // r15 void *v8; // [rsp+0h] [rbp-48h] BYREF long long v9; // [rsp+8h] [rbp-40h] _QWORD v10[7]; // [rsp+10h] [rbp-38h] BYREF v1 = operator new(0x38uLL); v8 = v10; std::string::_M_construct<char const*>(&v8, "dot", ""); *(_QWORD *)v1 = v1 + 16; std::string::_M_construct<char *>(v1, v8, (char *)v8 + v9); *(_OWORD *)(v1 + 32) = 0LL; *(_QWORD *)(v1 + 48) = 0LL; if ( v8 != v10 ) operator delete(v8, v10[0] + 1LL); v2 = operator new(0x38uLL); v8 = v10; std::string::_M_construct<char const*>(&v8, "{", ""); *(_QWORD *)v2 = v2 + 16; std::string::_M_construct<char *>(v2, v8, (char *)v8 + v9); *(_OWORD *)(v2 + 32) = 0LL; *(_QWORD *)(v2 + 48) = 0LL; AST::Node::addChild((AST::Node *)v1, (AST::Node *)v2); if ( v8 != v10 ) operator delete(v8, v10[0] + 1LL); v3 = *a1; v4 = a1[1]; while ( v3 != v4 ) { PropertyAST = (AST::Node *)createPropertyAST(v3); AST::Node::addChild((AST::Node *)v1, PropertyAST); v3 = (const SEMANTICANALYZER::Property *)((char *)v3 + 64); } v6 = operator new(0x38uLL); v8 = v10; std::string::_M_construct<char const*>(&v8, "}", ""); *(_QWORD *)v6 = v6 + 16; std::string::_M_construct<char *>(v6, v8, (char *)v8 + v9); *(_OWORD *)(v6 + 32) = 0LL; *(_QWORD *)(v6 + 48) = 0LL; AST::Node::addChild((AST::Node *)v1, (AST::Node *)v6); if ( v8 != v10 ) operator delete(v8, v10[0] + 1LL); return v1; }
createDotAST: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV R14,RDI MOV EDI,0x38 CALL 0x001144e0 MOV RBX,RAX LEA R12,[RSP + 0x10] MOV qword ptr [R12 + -0x10],R12 LAB_00122634: LEA RSI,[0x1721d1] LEA RDX,[0x1721d4] MOV RDI,RSP CALL 0x00125408 MOV RAX,RBX ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] ADD RDX,RSI LAB_00122660: MOV RDI,RBX CALL 0x00122d20 LAB_00122668: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOV qword ptr [RBX + 0x30],0x0 MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x0012268d MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00114510 LAB_0012268d: MOV EDI,0x38 CALL 0x001144e0 MOV R15,RAX MOV RDI,RSP MOV qword ptr [RDI],R12 LAB_001226a0: LEA RSI,[0x172196] LEA RDX,[0x172197] CALL 0x00125408 MOV RAX,R15 ADD RAX,0x10 MOV qword ptr [R15],RAX MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] ADD RDX,RSI MOV BPL,0x1 LAB_001226cc: MOV RDI,R15 CALL 0x00122d20 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x20],XMM0 MOV qword ptr [R15 + 0x30],0x0 XOR EBP,EBP MOV RDI,RBX MOV RSI,R15 CALL 0x00122b2c LAB_001226f1: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x00122707 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00114510 LAB_00122707: MOV R15,qword ptr [R14] MOV R14,qword ptr [R14 + 0x8] LAB_0012270e: CMP R15,R14 JZ 0x0012272c MOV RDI,R15 CALL 0x001211fb MOV RDI,RBX MOV RSI,RAX CALL 0x00122b2c ADD R15,0x40 JMP 0x0012270e LAB_0012272c: MOV EDI,0x38 CALL 0x001144e0 MOV R15,RAX MOV RDI,RSP MOV qword ptr [RDI],R12 LAB_0012273f: LEA RSI,[0x17b990] LEA RDX,[0x17b991] CALL 0x00125408 MOV RAX,R15 ADD RAX,0x10 MOV qword ptr [R15],RAX MOV RSI,qword ptr [RSP] MOV RDX,qword ptr [RSP + 0x8] ADD RDX,RSI MOV BPL,0x1 LAB_0012276b: MOV RDI,R15 CALL 0x00122d20 XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x20],XMM0 MOV qword ptr [R15 + 0x30],0x0 XOR EBP,EBP MOV RDI,RBX MOV RSI,R15 CALL 0x00122b2c LAB_00122790: MOV RDI,qword ptr [RSP] CMP RDI,R12 JZ 0x001227a6 MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x00114510 LAB_001227a6: MOV RAX,RBX ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* createDotAST(SEMANTICANALYZER::Dot const&) */ Node * createDotAST(Dot *param_1) { Property *pPVar1; Node *this; Node *pNVar2; Property *pPVar3; long *local_48; long local_40; long local_38 [2]; this = (Node *)operator_new(0x38); local_48 = local_38; /* try { // try from 00122634 to 00122649 has its CatchHandler @ 001227db */ std::__cxx11::string::_M_construct<char_const*>(&local_48,&DAT_001721d1,&DAT_001721d4); *(Node **)this = this + 0x10; /* try { // try from 00122660 to 00122667 has its CatchHandler @ 001227c0 */ std::__cxx11::string::_M_construct<char*>(this,local_48,local_40 + (long)local_48); *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } pNVar2 = (Node *)operator_new(0x38); local_48 = local_38; /* try { // try from 001226a0 to 001226b2 has its CatchHandler @ 001227b8 */ std::__cxx11::string::_M_construct<char_const*>(&local_48,&DAT_00172196,&DAT_00172197); *(Node **)pNVar2 = pNVar2 + 0x10; /* try { // try from 001226cc to 001226f0 has its CatchHandler @ 001227e2 */ std::__cxx11::string::_M_construct<char*>(pNVar2,local_48,local_40 + (long)local_48); *(int8 *)(pNVar2 + 0x20) = 0; *(int8 *)(pNVar2 + 0x28) = 0; *(int8 *)(pNVar2 + 0x30) = 0; AST::Node::addChild(this,pNVar2); if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } pPVar1 = *(Property **)(param_1 + 8); for (pPVar3 = *(Property **)param_1; pPVar3 != pPVar1; pPVar3 = pPVar3 + 0x40) { pNVar2 = (Node *)createPropertyAST(pPVar3); AST::Node::addChild(this,pNVar2); } pNVar2 = (Node *)operator_new(0x38); local_48 = local_38; /* try { // try from 0012273f to 00122751 has its CatchHandler @ 001227b6 */ std::__cxx11::string::_M_construct<char_const*>(&local_48,"}",""); *(Node **)pNVar2 = pNVar2 + 0x10; /* try { // try from 0012276b to 0012278f has its CatchHandler @ 001227e0 */ std::__cxx11::string::_M_construct<char*>(pNVar2,local_48,local_40 + (long)local_48); *(int8 *)(pNVar2 + 0x20) = 0; *(int8 *)(pNVar2 + 0x28) = 0; *(int8 *)(pNVar2 + 0x30) = 0; AST::Node::addChild(this,pNVar2); if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } return this; }
26,103
POINTonE1_in_G1
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/map_to_g1.c
static bool_t POINTonE1_in_G1(const POINTonE1 *P) { POINTonE1 t0, t1; /* Scott, M., https://eprint.iacr.org/2021/1130 */ POINTonE1_times_minus_z(&t0, P); POINTonE1_times_minus_z(&t1, &t0); POINTonE1_cneg(&t1, 1); /* [-z²]P */ sigma(&t0, P); /* σ(P) */ sigma(&t0, &t0); /* σ²(P) */ return POINTonE1_is_equal(&t0, &t1); }
O2
c
POINTonE1_in_G1: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x128, %rsp # imm = 0x128 movq %rdi, %rbx leaq -0x138(%rbp), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x5bfbe leaq -0xa8(%rbp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x5bfbe pushq $0x1 popq %rsi movq %r15, %rdi callq 0x50ee5 movq %r14, %rdi movq %rbx, %rsi callq 0x5c245 movq %r14, %rdi movq %r14, %rsi callq 0x5c245 movq %r14, %rdi movq %r15, %rsi callq 0x52386 addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r14 popq %r15 popq %rbp retq
POINTonE1_in_G1: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 128h mov rbx, rdi lea r14, [rbp+var_138] mov rdi, r14 mov rsi, rbx call POINTonE1_times_minus_z lea r15, [rbp+var_A8] mov rdi, r15 mov rsi, r14 call POINTonE1_times_minus_z push 1 pop rsi mov rdi, r15 call POINTonE1_cneg mov rdi, r14 mov rsi, rbx call sigma mov rdi, r14 mov rsi, r14 call sigma mov rdi, r14 mov rsi, r15 call POINTonE1_is_equal add rsp, 128h pop rbx pop r14 pop r15 pop rbp retn
long long POINTonE1_in_G1(long long a1) { _BYTE v2[144]; // [rsp+8h] [rbp-138h] BYREF _BYTE v3[168]; // [rsp+98h] [rbp-A8h] BYREF POINTonE1_times_minus_z(v2, a1); POINTonE1_times_minus_z(v3, v2); POINTonE1_cneg((long long)v3, 1LL); sigma(v2, a1); sigma(v2, v2); return POINTonE1_is_equal((long long)v2, (long long)v3); }
POINTonE1_in_G1: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x128 MOV RBX,RDI LEA R14,[RBP + -0x138] MOV RDI,R14 MOV RSI,RBX CALL 0x0015bfbe LEA R15,[RBP + -0xa8] MOV RDI,R15 MOV RSI,R14 CALL 0x0015bfbe PUSH 0x1 POP RSI MOV RDI,R15 CALL 0x00150ee5 MOV RDI,R14 MOV RSI,RBX CALL 0x0015c245 MOV RDI,R14 MOV RSI,R14 CALL 0x0015c245 MOV RDI,R14 MOV RSI,R15 CALL 0x00152386 ADD RSP,0x128 POP RBX POP R14 POP R15 POP RBP RET
void POINTonE1_in_G1(int8 param_1) { int1 local_140 [144]; int1 local_b0 [144]; POINTonE1_times_minus_z(local_140,param_1); POINTonE1_times_minus_z(local_b0,local_140); POINTonE1_cneg(local_b0,1); sigma(local_140,param_1); sigma(local_140,local_140); POINTonE1_is_equal(local_140,local_b0); return; }
26,104
arena_destroy
tsotchke[P]eshkol/src/core/memory/arena.c
void arena_destroy(Arena* arena) { assert(arena != NULL); // Free all blocks Block* block = arena->first; while (block) { Block* next = block->next; free(block); block = next; } // Free arena control structure free(arena); }
O3
c
arena_destroy: pushq %r14 pushq %rbx pushq %rax testq %rdi, %rdi je 0x3536 movq %rdi, %rbx movq 0x8(%rdi), %rdi testq %rdi, %rdi je 0x3527 movq (%rdi), %r14 callq 0x2030 movq %r14, %rdi testq %r14, %r14 jne 0x3517 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x2030 leaq 0x163c3(%rip), %rdi # 0x19900 leaq 0x163ca(%rip), %rsi # 0x1990e leaq 0x164e2(%rip), %rcx # 0x19a2d movl $0xba, %edx callq 0x2180
arena_destroy: push r14 push rbx push rax test rdi, rdi jz short loc_3536 mov rbx, rdi mov rdi, [rdi+8] test rdi, rdi jz short loc_3527 loc_3517: mov r14, [rdi] call _free mov rdi, r14 test r14, r14 jnz short loc_3517 loc_3527: mov rdi, rbx add rsp, 8 pop rbx pop r14 jmp _free loc_3536: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidArenaDestr; "void arena_destroy(Arena *)" mov edx, 0BAh call ___assert_fail
long long arena_destroy(long long a1) { _QWORD *v2; // rdi _QWORD *v3; // r14 if ( !a1 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c", 186LL, "void arena_destroy(Arena *)"); v2 = *(_QWORD **)(a1 + 8); if ( v2 ) { do { v3 = (_QWORD *)*v2; free(v2); v2 = v3; } while ( v3 ); } return free(a1); }
arena_destroy: PUSH R14 PUSH RBX PUSH RAX TEST RDI,RDI JZ 0x00103536 MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x8] TEST RDI,RDI JZ 0x00103527 LAB_00103517: MOV R14,qword ptr [RDI] CALL 0x00102030 MOV RDI,R14 TEST R14,R14 JNZ 0x00103517 LAB_00103527: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x00102030 LAB_00103536: LEA RDI,[0x119900] LEA RSI,[0x11990e] LEA RCX,[0x119a2d] MOV EDX,0xba CALL 0x00102180
void arena_destroy(void *param_1) { int8 *puVar1; int8 *__ptr; if (param_1 == (void *)0x0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/memory/arena.c" ,0xba,"void arena_destroy(Arena *)"); } __ptr = *(int8 **)((long)param_1 + 8); while (__ptr != (int8 *)0x0) { puVar1 = (int8 *)*__ptr; free(__ptr); __ptr = puVar1; } free(param_1); return; }
26,105
mysql_stat
eloqsql/libmariadb/libmariadb/mariadb_lib.c
char * STDCALL mysql_stat(MYSQL *mysql) { if (ma_simple_command(mysql, COM_STATISTICS,0,0,0,0)) return mysql->net.last_error; mysql->net.read_pos[mysql->packet_length]=0; /* End of stat string */ if (!mysql->net.read_pos[0]) { SET_CLIENT_ERROR(mysql, CR_WRONG_HOST_INFO , SQLSTATE_UNKNOWN, 0); return mysql->net.last_error; } return((char*) mysql->net.read_pos); }
O0
c
mysql_stat: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movl $0x9, %esi xorl %eax, %eax movl %eax, %r9d xorl %r8d, %r8d movq %r9, %rdx movq %r9, %rcx callq 0x3dce0 cmpl $0x0, %eax je 0x47530 movq -0x10(%rbp), %rax addq $0x97, %rax movq %rax, -0x8(%rbp) jmp 0x475d5 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq -0x10(%rbp), %rcx movq 0x358(%rcx), %rcx movb $0x0, (%rax,%rcx) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax cmpb $0x0, (%rax) jne 0x475c9 jmp 0x47556 movq -0x10(%rbp), %rax movl $0x7d9, 0x90(%rax) # imm = 0x7D9 movq -0x10(%rbp), %rdi addq $0x297, %rdi # imm = 0x297 leaq 0x1f01da(%rip), %rax # 0x237750 movq (%rax), %rsi movl $0x5, %edx callq 0x37150 movq -0x10(%rbp), %rax movb $0x0, 0x29c(%rax) movq -0x10(%rbp), %rdi addq $0x97, %rdi leaq 0x1f01c0(%rip), %rax # 0x237760 movq 0x48(%rax), %rsi movl $0x1ff, %edx # imm = 0x1FF callq 0x37150 movq -0x10(%rbp), %rax movb $0x0, 0x296(%rax) movq -0x10(%rbp), %rax addq $0x97, %rax movq %rax, -0x8(%rbp) jmp 0x475d5 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x10, %rsp popq %rbp retq nop
mysql_stat: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] mov esi, 9 xor eax, eax mov r9d, eax xor r8d, r8d mov rdx, r9 mov rcx, r9 call ma_simple_command cmp eax, 0 jz short loc_47530 mov rax, [rbp+var_10] add rax, 97h mov [rbp+var_8], rax jmp loc_475D5 loc_47530: mov rax, [rbp+var_10] mov rax, [rax+20h] mov rcx, [rbp+var_10] mov rcx, [rcx+358h] mov byte ptr [rax+rcx], 0 mov rax, [rbp+var_10] mov rax, [rax+20h] cmp byte ptr [rax], 0 jnz short loc_475C9 jmp short $+2 loc_47556: mov rax, [rbp+var_10] mov dword ptr [rax+90h], 7D9h mov rdi, [rbp+var_10] add rdi, 297h lea rax, SQLSTATE_UNKNOWN mov rsi, [rax] mov edx, 5 call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+29Ch], 0 mov rdi, [rbp+var_10] add rdi, 97h lea rax, client_errors mov rsi, [rax+48h] mov edx, 1FFh call _strncpy mov rax, [rbp+var_10] mov byte ptr [rax+296h], 0 mov rax, [rbp+var_10] add rax, 97h mov [rbp+var_8], rax jmp short loc_475D5 loc_475C9: mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_8], rax loc_475D5: mov rax, [rbp+var_8] add rsp, 10h pop rbp retn
long long mysql_stat(long long a1) { if ( (unsigned int)ma_simple_command(a1, 9u, 0LL, 0LL, 0, 0LL) ) return a1 + 151; *(_BYTE *)(*(_QWORD *)(a1 + 32) + *(_QWORD *)(a1 + 856)) = 0; if ( **(_BYTE **)(a1 + 32) ) return *(_QWORD *)(a1 + 32); *(_DWORD *)(a1 + 144) = 2009; strncpy(a1 + 663, SQLSTATE_UNKNOWN, 5LL); *(_BYTE *)(a1 + 668) = 0; strncpy(a1 + 151, client_errors[9], 511LL); *(_BYTE *)(a1 + 662) = 0; return a1 + 151; }
mysql_stat: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x9 XOR EAX,EAX MOV R9D,EAX XOR R8D,R8D MOV RDX,R9 MOV RCX,R9 CALL 0x0013dce0 CMP EAX,0x0 JZ 0x00147530 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x97 MOV qword ptr [RBP + -0x8],RAX JMP 0x001475d5 LAB_00147530: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x358] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] CMP byte ptr [RAX],0x0 JNZ 0x001475c9 JMP 0x00147556 LAB_00147556: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x90],0x7d9 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x297 LEA RAX,[0x337750] MOV RSI,qword ptr [RAX] MOV EDX,0x5 CALL 0x00137150 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x29c],0x0 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x97 LEA RAX,[0x337760] MOV RSI,qword ptr [RAX + 0x48] MOV EDX,0x1ff CALL 0x00137150 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x296],0x0 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x97 MOV qword ptr [RBP + -0x8],RAX JMP 0x001475d5 LAB_001475c9: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RBP + -0x8],RAX LAB_001475d5: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x10 POP RBP RET
long mysql_stat(long param_1) { int iVar1; int8 local_10; iVar1 = ma_simple_command(param_1,9,0,0,0); if (iVar1 == 0) { *(int1 *)(*(long *)(param_1 + 0x20) + *(long *)(param_1 + 0x358)) = 0; if (**(char **)(param_1 + 0x20) == '\0') { *(int4 *)(param_1 + 0x90) = 0x7d9; strncpy((char *)(param_1 + 0x297),SQLSTATE_UNKNOWN,5); *(int1 *)(param_1 + 0x29c) = 0; strncpy((char *)(param_1 + 0x97),PTR_s_Wrong_host_info_003377a8,0x1ff); *(int1 *)(param_1 + 0x296) = 0; local_10 = param_1 + 0x97; } else { local_10 = *(long *)(param_1 + 0x20); } } else { local_10 = param_1 + 0x97; } return local_10; }
26,106
my_charset_file_tailoring_realloc
eloqsql/strings/ctype.c
static int my_charset_file_tailoring_realloc(MY_CHARSET_FILE *i, size_t newlen) { if (i->tailoring_alloced_length > newlen || (i->tailoring= i->loader->realloc(i->tailoring, (i->tailoring_alloced_length= (newlen + 32*1024))))) { return MY_XML_OK; } return MY_XML_ERROR; }
O0
c
my_charset_file_tailoring_realloc: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x698(%rax), %rax cmpq -0x18(%rbp), %rax ja 0x7ceb7 movq -0x10(%rbp), %rax movq 0x7a8(%rax), %rax movq 0x90(%rax), %rax movq -0x10(%rbp), %rcx movq 0x688(%rcx), %rdi movq -0x18(%rbp), %rsi addq $0x8000, %rsi # imm = 0x8000 movq -0x10(%rbp), %rcx movq %rsi, 0x698(%rcx) callq *%rax movq -0x10(%rbp), %rcx movq %rax, 0x688(%rcx) cmpq $0x0, %rax je 0x7cec0 movl $0x0, -0x4(%rbp) jmp 0x7cec7 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq
my_charset_file_tailoring_realloc: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov rax, [rax+698h] cmp rax, [rbp+var_18] ja short loc_7CEB7 mov rax, [rbp+var_10] mov rax, [rax+7A8h] mov rax, [rax+90h] mov rcx, [rbp+var_10] mov rdi, [rcx+688h] mov rsi, [rbp+var_18] add rsi, 8000h mov rcx, [rbp+var_10] mov [rcx+698h], rsi call rax mov rcx, [rbp+var_10] mov [rcx+688h], rax cmp rax, 0 jz short loc_7CEC0 loc_7CEB7: mov [rbp+var_4], 0 jmp short loc_7CEC7 loc_7CEC0: mov [rbp+var_4], 1 loc_7CEC7: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long my_charset_file_tailoring_realloc(_QWORD *a1, unsigned long long a2) { long long ( *v2)(long long); // rax long long v3; // rdi long long v4; // rax unsigned int v7; // [rsp+1Ch] [rbp-4h] v7 = 0; if ( a1[211] <= a2 ) { v2 = *(long long ( **)(long long))(a1[245] + 144LL); v3 = a1[209]; a1[211] = a2 + 0x8000; v4 = v2(v3); a1[209] = v4; if ( !v4 ) return 1; } return v7; }
my_charset_file_tailoring_realloc: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x698] CMP RAX,qword ptr [RBP + -0x18] JA 0x0017ceb7 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x7a8] MOV RAX,qword ptr [RAX + 0x90] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x688] MOV RSI,qword ptr [RBP + -0x18] ADD RSI,0x8000 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x698],RSI CALL RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x688],RAX CMP RAX,0x0 JZ 0x0017cec0 LAB_0017ceb7: MOV dword ptr [RBP + -0x4],0x0 JMP 0x0017cec7 LAB_0017cec0: MOV dword ptr [RBP + -0x4],0x1 LAB_0017cec7: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 my_charset_file_tailoring_realloc(long param_1,ulong param_2) { code *pcVar1; long lVar2; if (*(ulong *)(param_1 + 0x698) <= param_2) { pcVar1 = *(code **)(*(long *)(param_1 + 0x7a8) + 0x90); *(ulong *)(param_1 + 0x698) = param_2 + 0x8000; lVar2 = (*pcVar1)(*(int8 *)(param_1 + 0x688)); *(long *)(param_1 + 0x688) = lVar2; if (lVar2 == 0) { return 1; } } return 0; }
26,107
my_strerror
eloqsql/strings/my_vsnprintf.c
const char* my_strerror(char *buf, size_t len, int nr) { char *msg= NULL; buf[0]= '\0'; /* failsafe */ if (nr <= 0) { strmake(buf, (nr == 0 ? "Internal error/check (Not system error)" : "Internal error < 0 (Not system error)"), len-1); return buf; } /* These (handler-) error messages are shared by perror, as required by the principle of least surprise. */ if ((nr >= HA_ERR_FIRST) && (nr <= HA_ERR_LAST)) { msg= (char *) handler_error_messages[nr - HA_ERR_FIRST]; strmake(buf, msg, len - 1); } else { /* On Windows, do things the Windows way. On a system that supports both the GNU and the XSI variant, use whichever was configured (GNU); if this choice is not advertised, use the default (POSIX/XSI). Testing for __GNUC__ is not sufficient to determine whether this choice exists. */ #if defined(_WIN32) strerror_s(buf, len, nr); #elif ((defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE >= 200112L)) || \ (defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \ ! defined _GNU_SOURCE strerror_r(nr, buf, len); /* I can build with or without GNU */ #elif defined(__GLIBC__) && defined (_GNU_SOURCE) char *r= strerror_r(nr, buf, len); if (r != buf) /* Want to help, GNU? */ strmake(buf, r, len - 1); /* Then don't. */ #else strerror_r(nr, buf, len); #endif } /* strerror() return values are implementation-dependent, so let's be pragmatic. */ if (!buf[0]) strmake(buf, "unknown error", len - 1); return buf; }
O0
c
my_strerror: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq $0x0, -0x28(%rbp) movq -0x10(%rbp), %rax movb $0x0, (%rax) cmpl $0x0, -0x1c(%rbp) jg 0x14cbee movq -0x10(%rbp), %rdi movl -0x1c(%rbp), %ecx leaq 0x9fb9(%rip), %rsi # 0x156b7f leaq 0x9f8a(%rip), %rax # 0x156b57 cmpl $0x0, %ecx cmoveq %rax, %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0x14d810 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x14cc8a cmpl $0x78, -0x1c(%rbp) jl 0x14cc2c cmpl $0xc6, -0x1c(%rbp) jg 0x14cc2c movl -0x1c(%rbp), %eax subl $0x78, %eax movslq %eax, %rcx leaq 0x328fe3(%rip), %rax # 0x475bf0 movq (%rax,%rcx,8), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rdi movq -0x28(%rbp), %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0x14d810 jmp 0x14cc61 movl -0x1c(%rbp), %edi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x2a8e0 movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax cmpq -0x10(%rbp), %rax je 0x14cc5f movq -0x10(%rbp), %rdi movq -0x30(%rbp), %rsi movq -0x18(%rbp), %rdx subq $0x1, %rdx callq 0x14d810 jmp 0x14cc61 movq -0x10(%rbp), %rax cmpb $0x0, (%rax) jne 0x14cc82 movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rdx subq $0x1, %rdx leaq 0x9f28(%rip), %rsi # 0x156ba5 callq 0x14d810 movq -0x10(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_strerror: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], 0 mov rax, [rbp+var_10] mov byte ptr [rax], 0 cmp [rbp+var_1C], 0 jg short loc_14CBEE mov rdi, [rbp+var_10] mov ecx, [rbp+var_1C] lea rsi, aInternalError0; "Internal error < 0 (Not system error)" lea rax, aInternalErrorC; "Internal error/check (Not system error)" cmp ecx, 0 cmovz rsi, rax mov rdx, [rbp+var_18] sub rdx, 1 call strmake mov rax, [rbp+var_10] mov [rbp+var_8], rax jmp loc_14CC8A loc_14CBEE: cmp [rbp+var_1C], 78h ; 'x' jl short loc_14CC2C cmp [rbp+var_1C], 0C6h jg short loc_14CC2C mov eax, [rbp+var_1C] sub eax, 78h ; 'x' movsxd rcx, eax lea rax, handler_error_messages mov rax, [rax+rcx*8] mov [rbp+var_28], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_28] mov rdx, [rbp+var_18] sub rdx, 1 call strmake jmp short loc_14CC61 loc_14CC2C: mov edi, [rbp+var_1C] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _strerror_r mov [rbp+var_30], rax mov rax, [rbp+var_30] cmp rax, [rbp+var_10] jz short loc_14CC5F mov rdi, [rbp+var_10] mov rsi, [rbp+var_30] mov rdx, [rbp+var_18] sub rdx, 1 call strmake loc_14CC5F: jmp short $+2 loc_14CC61: mov rax, [rbp+var_10] cmp byte ptr [rax], 0 jnz short loc_14CC82 mov rdi, [rbp+var_10] mov rdx, [rbp+var_18] sub rdx, 1 lea rsi, aUnknownError; "unknown error" call strmake loc_14CC82: mov rax, [rbp+var_10] mov [rbp+var_8], rax loc_14CC8A: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
_BYTE * my_strerror(_BYTE *a1, long long a2, int a3) { const char *v3; // rsi long long v5; // [rsp+0h] [rbp-30h] *a1 = 0; if ( a3 > 0 ) { if ( a3 < 120 || a3 > 198 ) { v5 = strerror_r((unsigned int)a3, a1, a2); if ( (_BYTE *)v5 != a1 ) strmake(a1, v5, a2 - 1); } else { strmake(a1, handler_error_messages[a3 - 120], a2 - 1); } if ( !*a1 ) strmake(a1, "unknown error", a2 - 1); return a1; } else { v3 = "Internal error < 0 (Not system error)"; if ( !a3 ) v3 = "Internal error/check (Not system error)"; strmake(a1, v3, a2 - 1); return a1; } }
trnman_new_statement: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI POP RBP RET
void trnman_new_statement(void) { return; }
26,108
my_strerror
eloqsql/strings/my_vsnprintf.c
const char* my_strerror(char *buf, size_t len, int nr) { char *msg= NULL; buf[0]= '\0'; /* failsafe */ if (nr <= 0) { strmake(buf, (nr == 0 ? "Internal error/check (Not system error)" : "Internal error < 0 (Not system error)"), len-1); return buf; } /* These (handler-) error messages are shared by perror, as required by the principle of least surprise. */ if ((nr >= HA_ERR_FIRST) && (nr <= HA_ERR_LAST)) { msg= (char *) handler_error_messages[nr - HA_ERR_FIRST]; strmake(buf, msg, len - 1); } else { /* On Windows, do things the Windows way. On a system that supports both the GNU and the XSI variant, use whichever was configured (GNU); if this choice is not advertised, use the default (POSIX/XSI). Testing for __GNUC__ is not sufficient to determine whether this choice exists. */ #if defined(_WIN32) strerror_s(buf, len, nr); #elif ((defined _POSIX_C_SOURCE && (_POSIX_C_SOURCE >= 200112L)) || \ (defined _XOPEN_SOURCE && (_XOPEN_SOURCE >= 600))) && \ ! defined _GNU_SOURCE strerror_r(nr, buf, len); /* I can build with or without GNU */ #elif defined(__GLIBC__) && defined (_GNU_SOURCE) char *r= strerror_r(nr, buf, len); if (r != buf) /* Want to help, GNU? */ strmake(buf, r, len - 1); /* Then don't. */ #else strerror_r(nr, buf, len); #endif } /* strerror() return values are implementation-dependent, so let's be pragmatic. */ if (!buf[0]) strmake(buf, "unknown error", len - 1); return buf; }
O3
c
my_strerror: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx movb $0x0, (%rdi) testl %edx, %edx jle 0xd68e2 leal -0x78(%rdx), %eax cmpl $0x4e, %eax ja 0xd68f6 movl %eax, %eax leaq 0x285463(%rip), %rcx # 0x35bd3c movslq (%rcx,%rax,4), %rsi addq %rcx, %rsi jmp 0xd690b leaq 0x9252(%rip), %rax # 0xdfb3b leaq 0x9273(%rip), %rsi # 0xdfb63 cmoveq %rax, %rsi jmp 0xd6923 movl %edx, %edi movq %rbx, %rsi movq %r14, %rdx callq 0x29940 movq %rax, %rsi cmpq %rbx, %rax je 0xd6917 leaq -0x1(%r14), %rdx movq %rbx, %rdi callq 0xd6d28 cmpb $0x0, (%rbx) jne 0xd6931 leaq 0x9266(%rip), %rsi # 0xdfb89 decq %r14 movq %rbx, %rdi movq %r14, %rdx callq 0xd6d28 movq %rbx, %rax popq %rbx popq %r14 popq %rbp retq
my_strerror: push rbp mov rbp, rsp push r14 push rbx mov r14, rsi mov rbx, rdi mov byte ptr [rdi], 0 test edx, edx jle short loc_D68E2 lea eax, [rdx-78h] cmp eax, 4Eh ; 'N' ja short loc_D68F6 mov eax, eax lea rcx, handler_error_messages_rel movsxd rsi, dword ptr [rcx+rax*4] add rsi, rcx jmp short loc_D690B loc_D68E2: lea rax, aInternalErrorC; "Internal error/check (Not system error)" lea rsi, aInternalError0; "Internal error < 0 (Not system error)" cmovz rsi, rax jmp short loc_D6923 loc_D68F6: mov edi, edx mov rsi, rbx mov rdx, r14 call _strerror_r mov rsi, rax cmp rax, rbx jz short loc_D6917 loc_D690B: lea rdx, [r14-1] mov rdi, rbx call strmake loc_D6917: cmp byte ptr [rbx], 0 jnz short loc_D6931 lea rsi, aUnknownError; "unknown error" loc_D6923: dec r14 mov rdi, rbx mov rdx, r14 call strmake loc_D6931: mov rax, rbx pop rbx pop r14 pop rbp retn
char * my_strerror(char *a1, long long a2, int a3) { char *v4; // rsi const char *v5; // rsi *a1 = 0; if ( a3 <= 0 ) { v5 = "Internal error < 0 (Not system error)"; if ( !a3 ) v5 = "Internal error/check (Not system error)"; goto LABEL_11; } if ( (unsigned int)(a3 - 120) > 0x4E ) { v4 = (char *)strerror_r((unsigned int)a3, a1, a2); if ( v4 == a1 ) goto LABEL_9; } else { v4 = (char *)handler_error_messages_rel + handler_error_messages_rel[a3 - 120]; } strmake(a1, v4, a2 - 1); LABEL_9: if ( !*a1 ) { v5 = "unknown error"; LABEL_11: strmake(a1, v5, a2 - 1); } return a1; }
my_strerror: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI MOV byte ptr [RDI],0x0 TEST EDX,EDX JLE 0x001d68e2 LEA EAX,[RDX + -0x78] CMP EAX,0x4e JA 0x001d68f6 MOV EAX,EAX LEA RCX,[0x45bd3c] MOVSXD RSI,dword ptr [RCX + RAX*0x4] ADD RSI,RCX JMP 0x001d690b LAB_001d68e2: LEA RAX,[0x1dfb3b] LEA RSI,[0x1dfb63] CMOVZ RSI,RAX JMP 0x001d6923 LAB_001d68f6: MOV EDI,EDX MOV RSI,RBX MOV RDX,R14 CALL 0x00129940 MOV RSI,RAX CMP RAX,RBX JZ 0x001d6917 LAB_001d690b: LEA RDX,[R14 + -0x1] MOV RDI,RBX CALL 0x001d6d28 LAB_001d6917: CMP byte ptr [RBX],0x0 JNZ 0x001d6931 LEA RSI,[0x1dfb89] LAB_001d6923: DEC R14 MOV RDI,RBX MOV RDX,R14 CALL 0x001d6d28 LAB_001d6931: MOV RAX,RBX POP RBX POP R14 POP RBP RET
char * my_strerror(char *param_1,size_t param_2,int param_3) { char *pcVar1; *param_1 = '\0'; if (param_3 < 1) { pcVar1 = "Internal error < 0 (Not system error)"; if (param_3 == 0) { pcVar1 = "Internal error/check (Not system error)"; } goto LAB_001d6923; } if (param_3 - 0x78U < 0x4f) { pcVar1 = handler_error_messages_rel + *(int *)(handler_error_messages_rel + (ulong)(param_3 - 0x78U) * 4); LAB_001d690b: strmake(param_1,pcVar1,param_2 - 1); } else { pcVar1 = strerror_r(param_3,param_1,param_2); if (pcVar1 != param_1) goto LAB_001d690b; } if (*param_1 != '\0') { return param_1; } pcVar1 = "unknown error"; LAB_001d6923: strmake(param_1,pcVar1,param_2 - 1); return param_1; }
26,109
safe_lexcstrdup_root
eloqsql/mysys/my_alloc.c
LEX_CSTRING safe_lexcstrdup_root(MEM_ROOT *root, const LEX_CSTRING str) { LEX_CSTRING res; if (str.length) res.str= strmake_root(root, str.str, str.length); else res.str= (const char *)""; res.length= str.length; return res; }
O0
c
safe_lexcstrdup_root: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rsi, -0x20(%rbp) movq %rdx, -0x18(%rbp) movq %rdi, -0x28(%rbp) cmpq $0x0, -0x18(%rbp) je 0x68de2 movq -0x28(%rbp), %rdi movq -0x20(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x68d00 movq %rax, -0x10(%rbp) jmp 0x68ded leaq 0x49fe6(%rip), %rax # 0xb2dcf movq %rax, -0x10(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x10(%rbp), %rax movq -0x8(%rbp), %rdx addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
safe_lexcstrdup_root: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_20], rsi mov [rbp+var_18], rdx mov [rbp+var_28], rdi cmp [rbp+var_18], 0 jz short loc_68DE2 mov rdi, [rbp+var_28] mov rsi, [rbp+var_20] mov rdx, [rbp+var_18] call strmake_root mov [rbp+var_10], rax jmp short loc_68DED loc_68DE2: lea rax, asc_B2DCB+4; "" mov [rbp+var_10], rax loc_68DED: mov rax, [rbp+var_18] mov [rbp+var_8], rax mov rax, [rbp+var_10] mov rdx, [rbp+var_8] add rsp, 30h pop rbp retn
char * safe_lexcstrdup_root(_QWORD **a1, long long a2, long long a3) { if ( a3 ) return strmake_root(a1, a2, a3); else return ""; }
safe_lexcstrdup_root: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x20],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x28],RDI CMP qword ptr [RBP + -0x18],0x0 JZ 0x00168de2 MOV RDI,qword ptr [RBP + -0x28] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x18] CALL 0x00168d00 MOV qword ptr [RBP + -0x10],RAX JMP 0x00168ded LAB_00168de2: LEA RAX,[0x1b2dcf] MOV qword ptr [RBP + -0x10],RAX LAB_00168ded: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
int1 [16] safe_lexcstrdup_root(int8 param_1,int8 param_2,long param_3) { int1 auVar1 [16]; int *local_18; if (param_3 == 0) { local_18 = &DAT_001b2dcf; } else { local_18 = (int *)strmake_root(param_1,param_2,param_3); } auVar1._8_8_ = param_3; auVar1._0_8_ = local_18; return auVar1; }
26,110
common_params_get_system_info[abi:cxx11](common_params const&)
llama.cpp/common/common.cpp
std::string common_params_get_system_info(const common_params & params) { std::ostringstream os; os << "system_info: n_threads = " << params.cpuparams.n_threads; if (params.cpuparams_batch.n_threads != -1) { os << " (n_threads_batch = " << params.cpuparams_batch.n_threads << ")"; } #if defined(_WIN32) && (_WIN32_WINNT >= 0x0601) && !defined(__MINGW64__) // windows 7 and later // TODO: windows + arm64 + mingw64 DWORD logicalProcessorCount = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS); os << " / " << logicalProcessorCount << " | " << llama_print_system_info(); #else os << " / " << std::thread::hardware_concurrency() << " | " << llama_print_system_info(); #endif return os.str(); }
O3
cpp
common_params_get_system_info[abi:cxx11](common_params const&): pushq %r15 pushq %r14 pushq %rbx subq $0x180, %rsp # imm = 0x180 movq %rsi, %r14 movq %rdi, %rbx leaq 0x8(%rsp), %r15 movq %r15, %rdi callq 0x17a50 leaq 0xf3bd(%rip), %rsi # 0x62a5e movl $0x19, %edx movq %r15, %rdi callq 0x17a80 movl 0x274(%r14), %esi leaq 0x8(%rsp), %rdi callq 0x17310 cmpl $-0x1, 0x488(%r14) je 0x53704 leaq 0xf3a8(%rip), %rsi # 0x62a78 leaq 0x8(%rsp), %rdi movl $0x14, %edx callq 0x17a80 movl 0x488(%r14), %esi leaq 0x8(%rsp), %rdi callq 0x17310 leaq 0xcbb4(%rip), %rsi # 0x602ab movl $0x1, %edx movq %rax, %rdi callq 0x17a80 leaq 0xf382(%rip), %rsi # 0x62a8d leaq 0x8(%rsp), %rdi movl $0x3, %edx callq 0x17a80 callq 0x178f0 movl %eax, %esi leaq 0x8(%rsp), %rdi callq 0x17590 movq %rax, %r14 leaq 0xa49d(%rip), %rsi # 0x5dbd2 movl $0x3, %edx movq %rax, %rdi callq 0x17a80 callq 0x17040 movq %rax, %r15 testq %rax, %rax je 0x53767 movq %r15, %rdi callq 0x17430 movq %r14, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x17a80 jmp 0x53781 movq (%r14), %rax movq -0x18(%rax), %rax movq %r14, %rdi addq %rax, %rdi movl 0x20(%r14,%rax), %esi orl $0x1, %esi callq 0x17bf0 leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x17410 movq 0x247e3(%rip), %rsi # 0x77f78 leaq 0x8(%rsp), %rdi callq 0x17810 leaq 0x78(%rsp), %rdi callq 0x177f0 movq %rbx, %rax addq $0x180, %rsp # imm = 0x180 popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x247b5(%rip), %rsi # 0x77f78 leaq 0x8(%rsp), %rdi callq 0x17810 leaq 0x78(%rsp), %rdi callq 0x177f0 movq %rbx, %rdi callq 0x17710
_Z29common_params_get_system_infoB5cxx11RK13common_params: push r15 push r14 push rbx sub rsp, 180h mov r14, rsi mov rbx, rdi lea r15, [rsp+198h+var_190] mov rdi, r15 call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) lea rsi, aSystemInfoNThr; "system_info: n_threads = " mov edx, 19h mov rdi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov esi, [r14+274h] lea rdi, [rsp+198h+var_190] call __ZNSolsEi; std::ostream::operator<<(int) cmp dword ptr [r14+488h], 0FFFFFFFFh jz short loc_53704 lea rsi, aNThreadsBatch; " (n_threads_batch = " lea rdi, [rsp+198h+var_190] mov edx, 14h call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov esi, [r14+488h] lea rdi, [rsp+198h+var_190] call __ZNSolsEi; std::ostream::operator<<(int) lea rsi, a09401910201912+51h; ")" mov edx, 1 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) loc_53704: lea rsi, asc_62A8D; " / " lea rdi, [rsp+198h+var_190]; this mov edx, 3 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) call __ZNSt6thread20hardware_concurrencyEv; std::thread::hardware_concurrency(void) mov esi, eax lea rdi, [rsp+198h+var_190] call __ZNSo9_M_insertImEERSoT_; std::ostream::_M_insert<ulong>(ulong) mov r14, rax lea rsi, aRootAsdfAsdfAF_0+79h; " | " mov edx, 3 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) call _llama_print_system_info mov r15, rax test rax, rax jz short loc_53767 mov rdi, r15 call _strlen mov rdi, r14 mov rsi, r15 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_53781 loc_53767: mov rax, [r14] mov rax, [rax-18h] mov rdi, r14 add rdi, rax mov esi, [r14+rax+20h] or esi, 1 call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) loc_53781: lea rsi, [rsp+198h+var_188] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+198h+var_190] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+198h+var_120]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 180h pop rbx pop r14 pop r15 retn mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_0] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_70]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long common_params_get_system_info[abi:cxx11](long long a1, long long a2) { long long v2; // rax unsigned int v3; // eax _QWORD *v4; // r14 long long v5; // rax long long v6; // r15 long long v7; // rax _BYTE v9[8]; // [rsp+8h] [rbp-190h] BYREF _BYTE v10[104]; // [rsp+10h] [rbp-188h] BYREF _BYTE v11[288]; // [rsp+78h] [rbp-120h] BYREF std::ostringstream::basic_ostringstream(v9); std::__ostream_insert<char,std::char_traits<char>>(v9, "system_info: n_threads = ", 25LL); std::ostream::operator<<(v9, *(unsigned int *)(a2 + 628)); if ( *(_DWORD *)(a2 + 1160) != -1 ) { std::__ostream_insert<char,std::char_traits<char>>(v9, " (n_threads_batch = ", 20LL); v2 = std::ostream::operator<<(v9, *(unsigned int *)(a2 + 1160)); std::__ostream_insert<char,std::char_traits<char>>(v2, ")", 1LL); } std::__ostream_insert<char,std::char_traits<char>>(v9, " / ", 3LL); v3 = std::thread::hardware_concurrency((std::thread *)v9); v4 = (_QWORD *)std::ostream::_M_insert<unsigned long>(v9, v3); std::__ostream_insert<char,std::char_traits<char>>(v4, " | ", 3LL); v5 = llama_print_system_info(); v6 = v5; if ( v5 ) { v7 = strlen(v5); std::__ostream_insert<char,std::char_traits<char>>(v4, v6, v7); } else { std::ios::clear((char *)v4 + *(_QWORD *)(*v4 - 24LL), *(_DWORD *)((char *)v4 + *(_QWORD *)(*v4 - 24LL) + 32) | 1u); } std::stringbuf::str(a1, v10); std::ostringstream::~ostringstream(v9, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v11); return a1; }
common_params_get_system_info[abi:cxx11]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x180 MOV R14,RSI MOV RBX,RDI LEA R15,[RSP + 0x8] MOV RDI,R15 CALL 0x00117a50 LAB_0015369a: LEA RSI,[0x162a5e] MOV EDX,0x19 MOV RDI,R15 CALL 0x00117a80 MOV ESI,dword ptr [R14 + 0x274] LEA RDI,[RSP + 0x8] CALL 0x00117310 CMP dword ptr [R14 + 0x488],-0x1 JZ 0x00153704 LEA RSI,[0x162a78] LEA RDI,[RSP + 0x8] MOV EDX,0x14 CALL 0x00117a80 MOV ESI,dword ptr [R14 + 0x488] LEA RDI,[RSP + 0x8] CALL 0x00117310 LEA RSI,[0x1602ab] MOV EDX,0x1 MOV RDI,RAX CALL 0x00117a80 LAB_00153704: LEA RSI,[0x162a8d] LEA RDI,[RSP + 0x8] MOV EDX,0x3 CALL 0x00117a80 CALL 0x001178f0 MOV ESI,EAX LEA RDI,[RSP + 0x8] CALL 0x00117590 MOV R14,RAX LEA RSI,[0x15dbd2] MOV EDX,0x3 MOV RDI,RAX CALL 0x00117a80 CALL 0x00117040 MOV R15,RAX TEST RAX,RAX JZ 0x00153767 MOV RDI,R15 CALL 0x00117430 MOV RDI,R14 MOV RSI,R15 MOV RDX,RAX CALL 0x00117a80 JMP 0x00153781 LAB_00153767: MOV RAX,qword ptr [R14] MOV RAX,qword ptr [RAX + -0x18] MOV RDI,R14 ADD RDI,RAX MOV ESI,dword ptr [R14 + RAX*0x1 + 0x20] OR ESI,0x1 CALL 0x00117bf0 LAB_00153781: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00117410 LAB_0015378e: MOV RSI,qword ptr [0x00177f78] LEA RDI,[RSP + 0x8] CALL 0x00117810 LEA RDI,[RSP + 0x78] CALL 0x001177f0 MOV RAX,RBX ADD RSP,0x180 POP RBX POP R14 POP R15 RET
/* common_params_get_system_info[abi:cxx11](common_params const&) */ common_params * common_params_get_system_info_abi_cxx11_(common_params *param_1) { ostream *poVar1; char *__s; size_t sVar2; long in_RSI; ostringstream local_190 [112]; ios_base local_120 [264]; std::__cxx11::ostringstream::ostringstream(local_190); /* try { // try from 0015369a to 0015378d has its CatchHandler @ 001537b9 */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_190,"system_info: n_threads = ",0x19); std::ostream::operator<<((ostream *)local_190,*(int *)(in_RSI + 0x274)); if (*(int *)(in_RSI + 0x488) != -1) { std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_190," (n_threads_batch = ",0x14); poVar1 = (ostream *)std::ostream::operator<<((ostream *)local_190,*(int *)(in_RSI + 0x488)); std::__ostream_insert<char,std::char_traits<char>>(poVar1,")",1); } std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_190," / ",3); std::thread::hardware_concurrency(); poVar1 = std::ostream::_M_insert<unsigned_long>((ulong)local_190); std::__ostream_insert<char,std::char_traits<char>>(poVar1," | ",3); __s = (char *)llama_print_system_info(); if (__s == (char *)0x0) { std::ios::clear(poVar1 + *(long *)(*(long *)poVar1 + -0x18), *(uint *)(poVar1 + *(long *)(*(long *)poVar1 + -0x18) + 0x20) | 1); } else { sVar2 = strlen(__s); std::__ostream_insert<char,std::char_traits<char>>(poVar1,__s,sVar2); } std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream(local_190); std::ios_base::~ios_base(local_120); return param_1; }
26,111
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&)
monkey531[P]llama/common/common.cpp
std::string string_from(const std::vector<int> & values) { std::stringstream buf; buf << "[ "; bool first = true; for (auto e : values) { if (first) { first = false; } else { buf << ", "; } buf << std::to_string(e); } buf << " ]"; return buf.str(); }
O3
cpp
string_from[abi:cxx11](std::vector<int, std::allocator<int>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq %rsi, %rbx movq %rdi, 0x28(%rsp) leaq 0x30(%rsp), %rdi callq 0x1a650 leaq 0x40(%rsp), %rdi leaq 0x7c7e3(%rip), %rsi # 0xeecbf movl $0x2, %edx callq 0x1aa00 movq (%rbx), %r12 movq 0x8(%rbx), %r15 cmpq %r15, %r12 je 0x725dc movb $0x1, %al movl $0xd1b71759, %r14d # imm = 0xD1B71759 movl (%r12), %r13d testb $0x1, %al jne 0x7251c movl $0x2, %edx leaq 0x40(%rsp), %rdi leaq 0x7d14c(%rip), %rsi # 0xef663 callq 0x1aa00 movl %r13d, %ebp negl %ebp cmovsl %r13d, %ebp movl $0x1, %ebx cmpl $0xa, %ebp jb 0x7256b movl $0x4, %ebx movl %ebp, %eax cmpl $0x63, %eax jbe 0x72564 cmpl $0x3e7, %eax # imm = 0x3E7 jbe 0x72569 cmpl $0x2710, %eax # imm = 0x2710 jb 0x7256b movl %eax, %ecx imulq %r14, %rcx shrq $0x2d, %rcx addl $0x4, %ebx cmpl $0x1869f, %eax # imm = 0x1869F movl %ecx, %eax ja 0x72536 addl $-0x3, %ebx jmp 0x7256b addl $-0x2, %ebx jmp 0x7256b decl %ebx shrl $0x1f, %r13d leal (%rbx,%r13), %esi leaq 0x18(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x8(%rsp), %rdi movl $0x2d, %edx callq 0x1aa30 addq 0x8(%rsp), %r13 movq %r13, %rdi movl %ebx, %esi movl %ebp, %edx callq 0x58a27 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x40(%rsp), %rdi callq 0x1aa00 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x725cd movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8d0 addq $0x4, %r12 xorl %eax, %eax cmpq %r15, %r12 jne 0x724fe leaq 0x7c6df(%rip), %rsi # 0xeecc2 movl $0x2, %edx leaq 0x40(%rsp), %rdi callq 0x1aa00 movq 0x28(%rsp), %rbx leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x1ade0 movq 0xb991d(%rip), %rsi # 0x12bf28 leaq 0x30(%rsp), %rdi callq 0x1a690 leaq 0xb0(%rsp), %rdi callq 0x1a2c0 movq %rbx, %rax addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x7263d jmp 0x7263d jmp 0x7263d movq %rax, %rbx jmp 0x72661 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x72661 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8d0 movq 0xb98c0(%rip), %rsi # 0x12bf28 leaq 0x30(%rsp), %rdi callq 0x1a690 leaq 0xb0(%rsp), %rdi callq 0x1a2c0 movq %rbx, %rdi callq 0x1afc0
_Z11string_fromB5cxx11RKSt6vectorIiSaIiEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1B8h mov rbx, rsi mov [rsp+1E8h+var_1C0], rdi lea rdi, [rsp+1E8h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea rdi, [rsp+1E8h+var_1A8] lea rsi, asc_EECBF; "[ " mov edx, 2 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r12, [rbx] mov r15, [rbx+8] cmp r12, r15 jz loc_725DC mov al, 1 mov r14d, 0D1B71759h loc_724FE: mov r13d, [r12] test al, 1 jnz short loc_7251C mov edx, 2 lea rdi, [rsp+1E8h+var_1A8] lea rsi, aZuD+6; ", " call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_7251C: mov ebp, r13d neg ebp cmovs ebp, r13d mov ebx, 1 cmp ebp, 0Ah jb short loc_7256B mov ebx, 4 mov eax, ebp loc_72536: cmp eax, 63h ; 'c' jbe short loc_72564 cmp eax, 3E7h jbe short loc_72569 cmp eax, 2710h jb short loc_7256B mov ecx, eax imul rcx, r14 shr rcx, 2Dh add ebx, 4 cmp eax, 1869Fh mov eax, ecx ja short loc_72536 add ebx, 0FFFFFFFDh jmp short loc_7256B loc_72564: add ebx, 0FFFFFFFEh jmp short loc_7256B loc_72569: dec ebx loc_7256B: shr r13d, 1Fh lea esi, [rbx+r13] lea rax, [rsp+1E8h+var_1D0] mov [rsp+1E8h+var_1E0], rax lea rdi, [rsp+1E8h+var_1E0] mov edx, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) add r13, [rsp+1E8h+var_1E0] mov rdi, r13 mov esi, ebx mov edx, ebp call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint) mov rsi, [rsp+1E8h+var_1E0] mov rdx, [rsp+1E8h+var_1D8] lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+1E8h+var_1E0]; void * lea rax, [rsp+1E8h+var_1D0] cmp rdi, rax jz short loc_725CD mov rsi, [rsp+1E8h+var_1D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_725CD: add r12, 4 xor eax, eax cmp r12, r15 jnz loc_724FE loc_725DC: lea rsi, asc_EECC2; " ]" mov edx, 2 lea rdi, [rsp+1E8h+var_1A8] call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbx, [rsp+1E8h+var_1C0] lea rsi, [rsp+1E8h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1E8h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+1E8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 1B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_7263D jmp short loc_7263D jmp short $+2 loc_7263D: mov rbx, rax jmp short loc_72661 mov rbx, rax mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_72661 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_72661: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_28] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_A8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long string_from[abi:cxx11](long long a1, int **a2) { int *v2; // r12 int *v3; // r15 char v4; // al int v5; // r13d unsigned int v6; // ebp int v7; // ebx unsigned int v8; // eax bool v9; // cc unsigned int v10; // r13d long long v11; // rbx void *v13[2]; // [rsp+8h] [rbp-1E0h] BYREF _QWORD v14[2]; // [rsp+18h] [rbp-1D0h] BYREF long long v15; // [rsp+28h] [rbp-1C0h] _BYTE v16[16]; // [rsp+30h] [rbp-1B8h] BYREF char v17[8]; // [rsp+40h] [rbp-1A8h] BYREF char v18[104]; // [rsp+48h] [rbp-1A0h] BYREF char v19[312]; // [rsp+B0h] [rbp-138h] BYREF v15 = a1; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v16); std::__ostream_insert<char,std::char_traits<char>>(v17, "[ ", 2LL); v2 = *a2; v3 = a2[1]; if ( *a2 != v3 ) { v4 = 1; do { v5 = *v2; if ( (v4 & 1) == 0 ) std::__ostream_insert<char,std::char_traits<char>>(v17, ", ", 2LL); v6 = -v5; if ( v5 > 0 ) v6 = v5; v7 = 1; if ( v6 >= 0xA ) { v7 = 4; v8 = v6; while ( 1 ) { if ( v8 <= 0x63 ) { v7 -= 2; goto LABEL_16; } if ( v8 <= 0x3E7 ) break; if ( v8 < 0x2710 ) goto LABEL_16; v7 += 4; v9 = v8 <= 0x1869F; v8 /= 0x2710u; if ( v9 ) { v7 -= 3; goto LABEL_16; } } --v7; } LABEL_16: v10 = (unsigned int)v5 >> 31; v13[0] = v14; std::string::_M_construct(v13, v7 + v10, 45LL); std::__detail::__to_chars_10_impl<unsigned int>((char *)v13[0] + v10, v7, v6); std::__ostream_insert<char,std::char_traits<char>>(v17, v13[0], v13[1]); if ( v13[0] != v14 ) operator delete(v13[0], v14[0] + 1LL); ++v2; v4 = 0; } while ( v2 != v3 ); } std::__ostream_insert<char,std::char_traits<char>>(v17, " ]", 2LL); v11 = v15; std::stringbuf::str(v15, v18); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v16, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v19); return v11; }
string_from[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1b8 MOV RBX,RSI MOV qword ptr [RSP + 0x28],RDI LEA RDI,[RSP + 0x30] CALL 0x0011a650 LEA RDI,[RSP + 0x40] LAB_001724d5: LEA RSI,[0x1eecbf] MOV EDX,0x2 CALL 0x0011aa00 MOV R12,qword ptr [RBX] MOV R15,qword ptr [RBX + 0x8] CMP R12,R15 JZ 0x001725dc MOV AL,0x1 MOV R14D,0xd1b71759 LAB_001724fe: MOV R13D,dword ptr [R12] TEST AL,0x1 JNZ 0x0017251c LAB_00172506: MOV EDX,0x2 LEA RDI,[RSP + 0x40] LEA RSI,[0x1ef663] CALL 0x0011aa00 LAB_0017251c: MOV EBP,R13D NEG EBP CMOVS EBP,R13D MOV EBX,0x1 CMP EBP,0xa JC 0x0017256b MOV EBX,0x4 MOV EAX,EBP LAB_00172536: CMP EAX,0x63 JBE 0x00172564 CMP EAX,0x3e7 JBE 0x00172569 CMP EAX,0x2710 JC 0x0017256b MOV ECX,EAX IMUL RCX,R14 SHR RCX,0x2d ADD EBX,0x4 CMP EAX,0x1869f MOV EAX,ECX JA 0x00172536 ADD EBX,-0x3 JMP 0x0017256b LAB_00172564: ADD EBX,-0x2 JMP 0x0017256b LAB_00172569: DEC EBX LAB_0017256b: SHR R13D,0x1f LEA ESI,[RBX + R13*0x1] LEA RAX,[RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX LAB_0017257d: LEA RDI,[RSP + 0x8] MOV EDX,0x2d CALL 0x0011aa30 ADD R13,qword ptr [RSP + 0x8] MOV RDI,R13 MOV ESI,EBX MOV EDX,EBP CALL 0x00158a27 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_001725a7: LEA RDI,[RSP + 0x40] CALL 0x0011aa00 MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x001725cd MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8d0 LAB_001725cd: ADD R12,0x4 XOR EAX,EAX CMP R12,R15 JNZ 0x001724fe LAB_001725dc: LEA RSI,[0x1eecc2] MOV EDX,0x2 LEA RDI,[RSP + 0x40] CALL 0x0011aa00 MOV RBX,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x0011ade0 LAB_00172604: MOV RSI,qword ptr [0x0022bf28] LEA RDI,[RSP + 0x30] CALL 0x0011a690 LEA RDI,[RSP + 0xb0] CALL 0x0011a2c0 MOV RAX,RBX ADD RSP,0x1b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_from[abi:cxx11](std::vector<int, std::allocator<int> > const&) */ vector * string_from_abi_cxx11_(vector *param_1) { uint uVar1; uint *puVar2; uint uVar3; vector *pvVar4; uint uVar5; bool bVar6; uint uVar7; ulong uVar8; uint uVar9; int8 *in_RSI; uint *puVar10; long *local_1e0; long local_1d8; long local_1d0 [2]; vector *local_1c0; stringstream local_1b8 [16]; ostream local_1a8 [112]; ios_base local_138 [264]; local_1c0 = param_1; std::__cxx11::stringstream::stringstream(local_1b8); /* try { // try from 001724d5 to 001724e5 has its CatchHandler @ 00172637 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"[ ",2); puVar10 = (uint *)*in_RSI; puVar2 = (uint *)in_RSI[1]; if (puVar10 != puVar2) { bVar6 = true; do { uVar1 = *puVar10; if (!bVar6) { /* try { // try from 00172506 to 0017251b has its CatchHandler @ 0017263b */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,", ",2); } uVar3 = -uVar1; if (0 < (int)uVar1) { uVar3 = uVar1; } uVar9 = 1; if (9 < uVar3) { uVar8 = (ulong)uVar3; uVar5 = 4; do { uVar9 = uVar5; uVar7 = (uint)uVar8; if (uVar7 < 100) { uVar9 = uVar9 - 2; goto LAB_0017256b; } if (uVar7 < 1000) { uVar9 = uVar9 - 1; goto LAB_0017256b; } if (uVar7 < 10000) goto LAB_0017256b; uVar8 = uVar8 / 10000; uVar5 = uVar9 + 4; } while (99999 < uVar7); uVar9 = uVar9 + 1; } LAB_0017256b: local_1e0 = local_1d0; /* try { // try from 0017257d to 0017258b has its CatchHandler @ 0017263d */ std::__cxx11::string::_M_construct((ulong)&local_1e0,(char)uVar9 - (char)((int)uVar1 >> 0x1f)) ; std::__detail::__to_chars_10_impl<unsigned_int> ((char *)((long)local_1e0 + (ulong)(uVar1 >> 0x1f)),uVar9,uVar3); /* try { // try from 001725a7 to 001725b0 has its CatchHandler @ 00172642 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,(char *)local_1e0,local_1d8); if (local_1e0 != local_1d0) { operator_delete(local_1e0,local_1d0[0] + 1); } puVar10 = puVar10 + 1; bVar6 = false; } while (puVar10 != puVar2); } /* try { // try from 001725dc to 00172603 has its CatchHandler @ 00172639 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8," ]",2); pvVar4 = local_1c0; std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(local_1b8); std::ios_base::~ios_base(local_138); return pvVar4; }
26,112
Trie::Search(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&)
MikePodsytnik[P]TCRtrie/src/Trie.cpp
std::vector<AIRREntity> Trie::Search(const std::string& query, int maxEdits, const std::optional<std::string>& vGeneFilter, const std::optional<std::string>& jGeneFilter) { std::vector<AIRREntity> results; int queryLength = query.size(); if (queryLength > maxQueryLength_) { std::cerr << query << " :query length exceeds maximum allowed length(32)" << std::endl; return results; } int initialRow[maxQueryLength_ + 1]; for (int i = 0; i <= queryLength; ++i) { initialRow[i] = i; } SearchRecursive(query, maxEdits, "", root_, initialRow, queryLength, results, vGeneFilter, jGeneFilter); return results; }
O0
cpp
Trie::Search(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&): pushq %rbp movq %rsp, %rbp pushq %rbx subq $0xd8, %rsp movq %rdi, -0xa8(%rbp) movq %rdi, %rax movq %rax, -0xa0(%rbp) movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl %ecx, -0x24(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x98(%rbp) movb $0x0, -0x39(%rbp) callq 0x59f10 movq -0x20(%rbp), %rdi callq 0x9410 movq -0x98(%rbp), %rcx movl %eax, -0x40(%rbp) movl -0x40(%rbp), %eax cmpl 0xc(%rcx), %eax jle 0x5287e movq -0x20(%rbp), %rsi movq 0x4f7d2(%rip), %rdi # 0xa1ff0 callq 0x9550 movq %rax, -0xb0(%rbp) jmp 0x5282c movq -0xb0(%rbp), %rdi leaq 0x1f6f2(%rip), %rsi # 0x71f2c callq 0x95e0 movq %rax, -0xb8(%rbp) jmp 0x52848 movq -0xb8(%rbp), %rdi movq 0x4f702(%rip), %rsi # 0xa1f58 callq 0x9660 jmp 0x5285d movb $0x1, -0x39(%rbp) movl $0x1, -0x50(%rbp) jmp 0x529d7 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) jmp 0x529f7 movq -0x98(%rbp), %rax movl 0xc(%rax), %eax incl %eax movq %rsp, %rcx movq %rcx, -0x58(%rbp) leaq 0xf(,%rax,4), %rdx andq $-0x10, %rdx movq %rsp, %rcx subq %rdx, %rcx movq %rcx, -0xc0(%rbp) movq %rcx, %rsp movq %rax, -0x60(%rbp) movl $0x0, -0x64(%rbp) movl -0x64(%rbp), %eax cmpl -0x40(%rbp), %eax jg 0x528dc movq -0xc0(%rbp), %rax movl -0x64(%rbp), %edx movslq -0x64(%rbp), %rcx movl %edx, (%rax,%rcx,4) movl -0x64(%rbp), %eax addl $0x1, %eax movl %eax, -0x64(%rbp) jmp 0x528b8 movq -0x20(%rbp), %rax movq %rax, -0xd8(%rbp) movl -0x24(%rbp), %eax movl %eax, -0xcc(%rbp) leaq -0x89(%rbp), %rdi movq %rdi, -0xc8(%rbp) callq 0x9a80 movq -0xc8(%rbp), %rdx leaq 0x1d6fd(%rip), %rsi # 0x7000e leaq -0x88(%rbp), %rdi callq 0xbb20 jmp 0x5291f movq -0xc0(%rbp), %r9 movl -0xcc(%rbp), %edx movq -0xd8(%rbp), %rsi movq -0x98(%rbp), %rdi movq -0xa8(%rbp), %r10 movq 0x48(%rdi), %r8 movl -0x40(%rbp), %ecx movq -0x30(%rbp), %r11 movq -0x38(%rbp), %rbx subq $0x20, %rsp movq %rsp, %rax movq %rbx, 0x18(%rax) movq %r11, 0x10(%rax) movq %r10, 0x8(%rax) movl %ecx, (%rax) leaq -0x88(%rbp), %rcx callq 0x52a10 addq $0x20, %rsp jmp 0x52977 leaq -0x88(%rbp), %rdi callq 0x9b90 leaq -0x89(%rbp), %rdi callq 0x9690 movb $0x1, -0x39(%rbp) movl $0x1, -0x50(%rbp) movq -0x58(%rbp), %rax movq %rax, %rsp jmp 0x529d7 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) jmp 0x529c9 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x48(%rbp) movl %eax, -0x4c(%rbp) leaq -0x88(%rbp), %rdi callq 0x9b90 leaq -0x89(%rbp), %rdi callq 0x9690 jmp 0x529f7 testb $0x1, -0x39(%rbp) jne 0x529e9 movq -0xa8(%rbp), %rdi callq 0x59f70 movq -0xa0(%rbp), %rax leaq -0x8(%rbp), %rsp popq %rbx popq %rbp retq movq -0xa8(%rbp), %rdi callq 0x59f70 movq -0x48(%rbp), %rdi callq 0x9a70 nopl (%rax)
_ZN4Trie6SearchERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiRKSt8optionalIS5_ESB_: push rbp mov rbp, rsp push rbx sub rsp, 0D8h mov [rbp+var_A8], rdi mov rax, rdi mov [rbp+var_A0], rax 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_18] mov [rbp+var_98], rax mov [rbp+var_39], 0 call _ZNSt6vectorI10AIRREntitySaIS0_EEC2Ev; std::vector<AIRREntity>::vector(void) mov rdi, [rbp+var_20] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4sizeEv; std::string::size(void) mov rcx, [rbp+var_98] mov [rbp+var_40], eax mov eax, [rbp+var_40] cmp eax, [rcx+0Ch] jle short loc_5287E mov rsi, [rbp+var_20] mov rdi, cs:_ZSt4cerr_ptr call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov [rbp+var_B0], rax jmp short $+2 loc_5282C: mov rdi, [rbp+var_B0] lea rsi, aQueryLengthExc; " :query length exceeds maximum allowed "... call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov [rbp+var_B8], rax jmp short $+2 loc_52848: mov rdi, [rbp+var_B8] mov rsi, cs:_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6__ptr call __ZNSolsEPFRSoS_E; std::ostream::operator<<(std::ostream & (*)(std::ostream &)) jmp short $+2 loc_5285D: mov [rbp+var_39], 1 mov [rbp+var_50], 1 jmp loc_529D7 mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax jmp loc_529F7 loc_5287E: mov rax, [rbp+var_98] mov eax, [rax+0Ch] inc eax mov rcx, rsp mov [rbp+var_58], rcx lea rdx, ds:0Fh[rax*4] and rdx, 0FFFFFFFFFFFFFFF0h mov rcx, rsp sub rcx, rdx mov [rbp+var_C0], rcx mov rsp, rcx mov [rbp+var_60], rax mov [rbp+var_64], 0 loc_528B8: mov eax, [rbp+var_64] cmp eax, [rbp+var_40] jg short loc_528DC mov rax, [rbp+var_C0] mov edx, [rbp+var_64] movsxd rcx, [rbp+var_64] mov [rax+rcx*4], edx mov eax, [rbp+var_64] add eax, 1 mov [rbp+var_64], eax jmp short loc_528B8 loc_528DC: mov rax, [rbp+var_20] mov [rbp+var_D8], rax mov eax, [rbp+var_24] mov [rbp+var_CC], eax lea rdi, [rbp+var_89] mov [rbp+var_C8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rbp+var_C8] lea rsi, asc_7000C+2; "" lea rdi, [rbp+var_88] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_5291F: mov r9, [rbp+var_C0] mov edx, [rbp+var_CC] mov rsi, [rbp+var_D8] mov rdi, [rbp+var_98] mov r10, [rbp+var_A8] mov r8, [rdi+48h] mov ecx, [rbp+var_40] mov r11, [rbp+var_30] mov rbx, [rbp+var_38] sub rsp, 20h mov rax, rsp mov [rax+18h], rbx mov [rax+10h], r11 mov [rax+8], r10 mov [rax], ecx lea rcx, [rbp+var_88] call _ZN4Trie15SearchRecursiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS7_PNS_8TrieNodeEPKiiRSt6vectorI10AIRREntitySaISD_EERKSt8optionalIS5_ESK_; Trie::SearchRecursive(std::string const&,int,std::string const&,Trie::TrieNode *,int const*,int,std::vector<AIRREntity> &,std::optional<std::string> const&,std::optional<std::string> const&) add rsp, 20h jmp short $+2 loc_52977: lea rdi, [rbp+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rbp+var_89] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov [rbp+var_39], 1 mov [rbp+var_50], 1 mov rax, [rbp+var_58] mov rsp, rax jmp short loc_529D7 mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax jmp short loc_529C9 mov rcx, rax mov eax, edx mov [rbp+var_48], rcx mov [rbp+var_4C], eax lea rdi, [rbp+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_529C9: lea rdi, [rbp+var_89] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_529F7 loc_529D7: test [rbp+var_39], 1 jnz short loc_529E9 mov rdi, [rbp+var_A8] call _ZNSt6vectorI10AIRREntitySaIS0_EED2Ev; std::vector<AIRREntity>::~vector() loc_529E9: mov rax, [rbp+var_A0] lea rsp, [rbp-8] pop rbx pop rbp retn loc_529F7: mov rdi, [rbp+var_A8] call _ZNSt6vectorI10AIRREntitySaIS0_EED2Ev; std::vector<AIRREntity>::~vector() mov rdi, [rbp+var_48] call __Unwind_Resume
long long Trie::Search(long long a1, long long a2, long long a3, int a4, long long a5, long long a6) { long long v6; // rax unsigned long long v7; // rdx long long v9; // [rsp+0h] [rbp-E0h] BYREF long long v10; // [rsp+8h] [rbp-D8h] int v11; // [rsp+14h] [rbp-CCh] char *v12; // [rsp+18h] [rbp-C8h] char *v13; // [rsp+20h] [rbp-C0h] long long v14; // [rsp+28h] [rbp-B8h] long long v15; // [rsp+30h] [rbp-B0h] long long v16; // [rsp+38h] [rbp-A8h] long long v17; // [rsp+40h] [rbp-A0h] long long v18; // [rsp+48h] [rbp-98h] char v19; // [rsp+57h] [rbp-89h] BYREF _BYTE v20[36]; // [rsp+58h] [rbp-88h] BYREF unsigned int i; // [rsp+7Ch] [rbp-64h] long long v22; // [rsp+80h] [rbp-60h] long long *v23; // [rsp+88h] [rbp-58h] int v24; // [rsp+90h] [rbp-50h] int v25; // [rsp+A0h] [rbp-40h] char v26; // [rsp+A7h] [rbp-39h] long long v27; // [rsp+A8h] [rbp-38h] long long v28; // [rsp+B0h] [rbp-30h] int v29; // [rsp+BCh] [rbp-24h] long long v30; // [rsp+C0h] [rbp-20h] long long v31; // [rsp+C8h] [rbp-18h] long long v32; // [rsp+D0h] [rbp-10h] v16 = a1; v17 = a1; v32 = a1; v31 = a2; v30 = a3; v29 = a4; v28 = a5; v27 = a6; v18 = a2; v26 = 0; std::vector<AIRREntity>::vector(a1); v25 = std::string::size(v30); if ( v25 <= *(_DWORD *)(a2 + 12) ) { v6 = (unsigned int)(*(_DWORD *)(v18 + 12) + 1); v23 = &v9; v7 = (4 * v6 + 15) & 0xFFFFFFFFFFFFFFF0LL; v13 = (char *)&v9 - v7; v22 = v6; for ( i = 0; (int)i <= v25; ++i ) { v7 = i; *(_DWORD *)&v13[4 * i] = i; } v10 = v30; v11 = v29; v12 = &v19; std::allocator<char>::allocator(&v19, a2, v7); std::string::basic_string<std::allocator<char>>((long long)v20, (long long)"", (long long)v12); Trie::SearchRecursive(v18, v10, v11, (unsigned int)v20, *(_QWORD *)(v18 + 72), (_DWORD)v13, v25, v16, v28, v27); std::string::~string(v20); std::allocator<char>::~allocator(&v19); v26 = 1; v24 = 1; } else { v15 = std::operator<<<char>(&std::cerr, v30); v14 = std::operator<<<std::char_traits<char>>(v15, " :query length exceeds maximum allowed length(32)"); std::ostream::operator<<(v14, &std::endl<char,std::char_traits<char>>); v26 = 1; v24 = 1; } return v17; }
Search: PUSH RBP MOV RBP,RSP PUSH RBX SUB RSP,0xd8 MOV qword ptr [RBP + -0xa8],RDI MOV RAX,RDI MOV qword ptr [RBP + -0xa0],RAX 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 + -0x18] MOV qword ptr [RBP + -0x98],RAX MOV byte ptr [RBP + -0x39],0x0 CALL 0x00159f10 MOV RDI,qword ptr [RBP + -0x20] CALL 0x00109410 MOV RCX,qword ptr [RBP + -0x98] MOV dword ptr [RBP + -0x40],EAX MOV EAX,dword ptr [RBP + -0x40] CMP EAX,dword ptr [RCX + 0xc] JLE 0x0015287e MOV RSI,qword ptr [RBP + -0x20] LAB_00152817: MOV RDI,qword ptr [0x001a1ff0] CALL 0x00109550 MOV qword ptr [RBP + -0xb0],RAX JMP 0x0015282c LAB_0015282c: MOV RDI,qword ptr [RBP + -0xb0] LEA RSI,[0x171f2c] CALL 0x001095e0 MOV qword ptr [RBP + -0xb8],RAX JMP 0x00152848 LAB_00152848: MOV RDI,qword ptr [RBP + -0xb8] MOV RSI,qword ptr [0x001a1f58] CALL 0x00109660 JMP 0x0015285d LAB_0015285d: MOV byte ptr [RBP + -0x39],0x1 MOV dword ptr [RBP + -0x50],0x1 JMP 0x001529d7 LAB_0015287e: MOV RAX,qword ptr [RBP + -0x98] MOV EAX,dword ptr [RAX + 0xc] INC EAX MOV RCX,RSP MOV qword ptr [RBP + -0x58],RCX LEA RDX,[0xf + RAX*0x4] AND RDX,-0x10 MOV RCX,RSP SUB RCX,RDX MOV qword ptr [RBP + -0xc0],RCX MOV RSP,RCX MOV qword ptr [RBP + -0x60],RAX MOV dword ptr [RBP + -0x64],0x0 LAB_001528b8: MOV EAX,dword ptr [RBP + -0x64] CMP EAX,dword ptr [RBP + -0x40] JG 0x001528dc MOV RAX,qword ptr [RBP + -0xc0] MOV EDX,dword ptr [RBP + -0x64] MOVSXD RCX,dword ptr [RBP + -0x64] MOV dword ptr [RAX + RCX*0x4],EDX MOV EAX,dword ptr [RBP + -0x64] ADD EAX,0x1 MOV dword ptr [RBP + -0x64],EAX JMP 0x001528b8 LAB_001528dc: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0xd8],RAX MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0xcc],EAX LEA RDI,[RBP + -0x89] MOV qword ptr [RBP + -0xc8],RDI CALL 0x00109a80 MOV RDX,qword ptr [RBP + -0xc8] LAB_0015290a: LEA RSI,[0x17000e] LEA RDI,[RBP + -0x88] CALL 0x0010bb20 JMP 0x0015291f LAB_0015291f: MOV R9,qword ptr [RBP + -0xc0] MOV EDX,dword ptr [RBP + -0xcc] MOV RSI,qword ptr [RBP + -0xd8] MOV RDI,qword ptr [RBP + -0x98] MOV R10,qword ptr [RBP + -0xa8] MOV R8,qword ptr [RDI + 0x48] MOV ECX,dword ptr [RBP + -0x40] MOV R11,qword ptr [RBP + -0x30] MOV RBX,qword ptr [RBP + -0x38] LAB_00152950: SUB RSP,0x20 MOV RAX,RSP MOV qword ptr [RAX + 0x18],RBX MOV qword ptr [RAX + 0x10],R11 MOV qword ptr [RAX + 0x8],R10 MOV dword ptr [RAX],ECX LEA RCX,[RBP + -0x88] CALL 0x00152a10 ADD RSP,0x20 LAB_00152975: JMP 0x00152977 LAB_00152977: LEA RDI,[RBP + -0x88] CALL 0x00109b90 LEA RDI,[RBP + -0x89] CALL 0x00109690 MOV byte ptr [RBP + -0x39],0x1 MOV dword ptr [RBP + -0x50],0x1 MOV RAX,qword ptr [RBP + -0x58] MOV RSP,RAX JMP 0x001529d7 LAB_001529d7: TEST byte ptr [RBP + -0x39],0x1 JNZ 0x001529e9 MOV RDI,qword ptr [RBP + -0xa8] CALL 0x00159f70 LAB_001529e9: MOV RAX,qword ptr [RBP + -0xa0] LEA RSP,[RBP + -0x8] POP RBX POP RBP RET
/* WARNING: Removing unreachable block (ram,0x001529dd) */ /* Trie::Search(std::__cxx11::string const&, int, std::optional<std::__cxx11::string > const&, std::optional<std::__cxx11::string > const&) */ string * Trie::Search(string *param_1,int param_2,optional *param_3,optional *param_4) { TrieNode *pTVar1; long lVar2; string *psVar3; int iVar4; allocator *paVar5; int *piVar6; string *psVar7; Trie *this; int iVar8; int4 in_register_00000034; int8 in_R8; int8 in_R9; int8 uStack_110; int aiStack_108 [2]; int8 auStack_100 [3]; int aiStack_e8 [2]; string *local_e0; int local_d4; allocator *local_d0; int *local_c8; ostream *local_c0; ostream *local_b8; string *local_b0; string *local_a8; Trie *local_a0; allocator local_91; string local_90 [36]; int local_6c; ulong local_68; int1 *local_60; int local_48; int1 local_41; int8 local_40; int8 local_38; int local_2c; optional *local_28; Trie *local_20; string *local_18; local_a0 = (Trie *)CONCAT44(in_register_00000034,param_2); local_2c = (int)param_4; local_41 = 0; auStack_100[2] = 0x1527f8; local_b0 = param_1; local_a8 = param_1; local_40 = in_R9; local_38 = in_R8; local_28 = param_3; local_20 = local_a0; local_18 = param_1; std::vector<AIRREntity,std::allocator<AIRREntity>>::vector ((vector<AIRREntity,std::allocator<AIRREntity>> *)param_1); auStack_100[2] = 0x152801; local_48 = std::__cxx11::string::size(); if (*(int *)(local_a0 + 0xc) < local_48) { /* try { // try from 00152817 to 0015285a has its CatchHandler @ 0015286d */ auStack_100[2] = 0x152823; local_b8 = std::operator<<((ostream *)PTR_cerr_001a1ff0,(string *)local_28); auStack_100[2] = 0x15283f; local_c0 = std::operator<<(local_b8," :query length exceeds maximum allowed length(32)"); auStack_100[2] = 0x15285b; std::ostream::operator<< (local_c0,(_func_ostream_ptr_ostream_ptr *) PTR_endl<char,std_char_traits<char>>_001a1f58); } else { local_68 = (ulong)(*(int *)(local_a0 + 0xc) + 1); lVar2 = -(local_68 * 4 + 0xf & 0xfffffffffffffff0); local_c8 = (int *)((long)aiStack_e8 + lVar2); for (local_6c = 0; local_6c <= local_48; local_6c = local_6c + 1) { local_c8[local_6c] = local_6c; } local_e0 = (string *)local_28; local_d4 = local_2c; local_d0 = &local_91; local_60 = (int1 *)aiStack_e8; *(int8 *)((long)aiStack_e8 + lVar2 + -8) = 0x152903; std::allocator<char>::allocator(); paVar5 = local_d0; /* try { // try from 0015290a to 0015291c has its CatchHandler @ 001529a3 */ *(int8 *)((long)aiStack_e8 + lVar2 + -8) = 0x15291d; std::__cxx11::string::string<std::allocator<char>>(local_90,"",paVar5); iVar8 = local_48; this = local_a0; psVar7 = local_b0; piVar6 = local_c8; iVar4 = local_d4; psVar3 = local_e0; pTVar1 = *(TrieNode **)(local_a0 + 0x48); /* try { // try from 00152950 to 00152974 has its CatchHandler @ 001529b1 */ *(int8 *)((long)aiStack_e8 + lVar2 + -8) = local_40; *(int8 *)((long)auStack_100 + lVar2 + 8) = local_38; *(string **)((long)auStack_100 + lVar2) = psVar7; *(int *)((long)aiStack_108 + lVar2) = iVar8; *(int8 *)((long)&uStack_110 + lVar2) = 0x152971; SearchRecursive(this,psVar3,iVar4,local_90,pTVar1,piVar6,*(int *)((long)aiStack_108 + lVar2), *(vector **)((long)auStack_100 + lVar2), *(optional **)((long)auStack_100 + lVar2 + 8), *(optional **)((long)aiStack_e8 + lVar2 + -8)); *(int8 *)((long)aiStack_e8 + lVar2 + -8) = 0x152983; std::__cxx11::string::~string(local_90); *(int8 *)((long)aiStack_e8 + lVar2 + -8) = 0x15298f; std::allocator<char>::~allocator((allocator<char> *)&local_91); } return local_a8; }
26,113
Trie::Search(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&)
MikePodsytnik[P]TCRtrie/src/Trie.cpp
std::vector<AIRREntity> Trie::Search(const std::string& query, int maxEdits, const std::optional<std::string>& vGeneFilter, const std::optional<std::string>& jGeneFilter) { std::vector<AIRREntity> results; int queryLength = query.size(); if (queryLength > maxQueryLength_) { std::cerr << query << " :query length exceeds maximum allowed length(32)" << std::endl; return results; } int initialRow[maxQueryLength_ + 1]; for (int i = 0; i <= queryLength; ++i) { initialRow[i] = i; } SearchRecursive(query, maxEdits, "", root_, initialRow, queryLength, results, vGeneFilter, jGeneFilter); return results; }
O2
cpp
Trie::Search(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&, std::optional<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r12 movq %rdi, %rbx xorps %xmm0, %xmm0 andq $0x0, 0x10(%rdi) movups %xmm0, (%rdi) movq 0x8(%rdx), %r13 movl 0xc(%rsi), %eax cmpl %r13d, %eax jge 0x21945 movq 0x1e6cf(%rip), %rdi # 0x3fff0 movq %r12, %rsi callq 0x7400 leaq 0x964c(%rip), %rsi # 0x2af7c movq %rax, %rdi callq 0x7460 movq %rax, %rdi callq 0x7200 jmp 0x219c8 movq %rsi, %r14 movl %ecx, -0x30(%rbp) movq %r9, -0x40(%rbp) movq %r8, -0x48(%rbp) movq %rsp, -0x38(%rbp) incl %eax movq %rsp, %r15 leaq 0xf(,%rax,4), %rax andq $-0x10, %rax subq %rax, %r15 movq %r15, %rsp movslq %r13d, %rax xorl %ecx, %ecx cmpq %rax, %rcx jg 0x21981 movl %ecx, (%r15,%rcx,4) incq %rcx jmp 0x21973 leaq 0x841e(%rip), %rsi # 0x29da6 leaq -0x68(%rbp), %rdi leaq -0x29(%rbp), %rdx callq 0x8762 movq 0x48(%r14), %r8 leaq -0x68(%rbp), %rcx movq %r14, %rdi movq %r12, %rsi movl -0x30(%rbp), %edx movq %r15, %r9 pushq -0x40(%rbp) pushq -0x48(%rbp) pushq %rbx pushq %r13 callq 0x219fe addq $0x20, %rsp leaq -0x68(%rbp), %rdi callq 0x7860 movq -0x38(%rbp), %rsp movq %rbx, %rax leaq -0x28(%rbp), %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r14 leaq -0x68(%rbp), %rdi callq 0x7860 jmp 0x219ed jmp 0x219ea movq %rax, %r14 movq %rbx, %rdi callq 0x239c4 movq %r14, %rdi callq 0x7770 nop
_ZN4Trie6SearchERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiRKSt8optionalIS5_ESB_: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r12, rdx mov rbx, rdi xorps xmm0, xmm0 and qword ptr [rdi+10h], 0 movups xmmword ptr [rdi], xmm0 mov r13, [rdx+8] mov eax, [rsi+0Ch] cmp eax, r13d jge short loc_21945 mov rdi, cs:_ZSt4cerr_ptr mov rsi, r12 call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) lea rsi, aQueryLengthExc; " :query length exceeds maximum allowed "... mov rdi, rax call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) jmp loc_219C8 loc_21945: mov r14, rsi mov [rbp+var_30], ecx mov [rbp+var_40], r9 mov [rbp+var_48], r8 mov [rbp+var_38], rsp inc eax mov r15, rsp lea rax, ds:0Fh[rax*4] and rax, 0FFFFFFFFFFFFFFF0h sub r15, rax mov rsp, r15 movsxd rax, r13d xor ecx, ecx loc_21973: cmp rcx, rax jg short loc_21981 mov [r15+rcx*4], ecx inc rcx jmp short loc_21973 loc_21981: lea rsi, asc_29DA4+2; "" lea rdi, [rbp+var_68] lea rdx, [rbp+var_29] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov r8, [r14+48h] lea rcx, [rbp+var_68] mov rdi, r14 mov rsi, r12 mov edx, [rbp+var_30] mov r9, r15 push [rbp+var_40] push [rbp+var_48] push rbx push r13 call _ZN4Trie15SearchRecursiveERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiS7_PNS_8TrieNodeEPKiiRSt6vectorI10AIRREntitySaISD_EERKSt8optionalIS5_ESK_; Trie::SearchRecursive(std::string const&,int,std::string const&,Trie::TrieNode *,int const*,int,std::vector<AIRREntity> &,std::optional<std::string> const&,std::optional<std::string> const&) add rsp, 20h lea rdi, [rbp+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rsp, [rbp+var_38] loc_219C8: mov rax, rbx lea rsp, [rbp-28h] pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r14, rax lea rdi, [rbp+var_68]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_219ED jmp short $+2 loc_219EA: mov r14, rax loc_219ED: mov rdi, rbx call _ZNSt6vectorI10AIRREntitySaIS0_EED2Ev; std::vector<AIRREntity>::~vector() mov rdi, r14 call __Unwind_Resume
long long Trie::Search(long long a1, long long a2, long long a3, int a4, long long a5, long long a6) { int v6; // r12d long long v7; // r13 int v8; // eax long long v9; // rax long long v10; // rax char *v11; // r15 long long i; // rcx long long v14; // [rsp+0h] [rbp-70h] BYREF _QWORD v15[4]; // [rsp+8h] [rbp-68h] BYREF long long v16; // [rsp+28h] [rbp-48h] long long v17; // [rsp+30h] [rbp-40h] long long *v18; // [rsp+38h] [rbp-38h] int v19; // [rsp+40h] [rbp-30h] v6 = a3; *(_QWORD *)(a1 + 16) = 0LL; *(_OWORD *)a1 = 0LL; v7 = *(_QWORD *)(a3 + 8); v8 = *(_DWORD *)(a2 + 12); if ( v8 >= (int)v7 ) { v19 = a4; v17 = a6; v16 = a5; v18 = &v14; v11 = (char *)&v15[-1] - ((4LL * (unsigned int)(v8 + 1) + 15) & 0xFFFFFFFFFFFFFFF0LL); for ( i = 0LL; i <= (int)v7; ++i ) *(_DWORD *)&v11[4 * i] = i; std::string::basic_string<std::allocator<char>>(v15, (long long)""); Trie::SearchRecursive(a2, v6, v19, (unsigned int)v15, *(_QWORD *)(a2 + 72), (_DWORD)v11, v7, a1, v16, v17); std::string::~string(v15); } else { v9 = std::operator<<<char>(&std::cerr, a3); v10 = std::operator<<<std::char_traits<char>>(v9, " :query length exceeds maximum allowed length(32)"); std::endl<char,std::char_traits<char>>(v10); } return a1; }
Search: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R12,RDX MOV RBX,RDI XORPS XMM0,XMM0 AND qword ptr [RDI + 0x10],0x0 MOVUPS xmmword ptr [RDI],XMM0 MOV R13,qword ptr [RDX + 0x8] MOV EAX,dword ptr [RSI + 0xc] CMP EAX,R13D JGE 0x00121945 LAB_0012191a: MOV RDI,qword ptr [0x0013fff0] MOV RSI,R12 CALL 0x00107400 LEA RSI,[0x12af7c] MOV RDI,RAX CALL 0x00107460 MOV RDI,RAX CALL 0x00107200 JMP 0x001219c8 LAB_00121945: MOV R14,RSI MOV dword ptr [RBP + -0x30],ECX MOV qword ptr [RBP + -0x40],R9 MOV qword ptr [RBP + -0x48],R8 MOV qword ptr [RBP + -0x38],RSP INC EAX MOV R15,RSP LEA RAX,[0xf + RAX*0x4] AND RAX,-0x10 SUB R15,RAX MOV RSP,R15 MOVSXD RAX,R13D XOR ECX,ECX LAB_00121973: CMP RCX,RAX JG 0x00121981 MOV dword ptr [R15 + RCX*0x4],ECX INC RCX JMP 0x00121973 LAB_00121981: LEA RSI,[0x129da6] LEA RDI,[RBP + -0x68] LEA RDX,[RBP + -0x29] CALL 0x00108762 MOV R8,qword ptr [R14 + 0x48] LAB_00121999: LEA RCX,[RBP + -0x68] MOV RDI,R14 MOV RSI,R12 MOV EDX,dword ptr [RBP + -0x30] MOV R9,R15 PUSH qword ptr [RBP + -0x40] PUSH qword ptr [RBP + -0x48] PUSH RBX PUSH R13 CALL 0x001219fe ADD RSP,0x20 LAB_001219bb: LEA RDI,[RBP + -0x68] CALL 0x00107860 MOV RSP,qword ptr [RBP + -0x38] LAB_001219c8: MOV RAX,RBX LEA RSP,[RBP + -0x28] POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* Trie::Search(std::__cxx11::string const&, int, std::optional<std::__cxx11::string > const&, std::optional<std::__cxx11::string > const&) */ string * Trie::Search(string *param_1,int param_2,optional *param_3,optional *param_4) { int8 uVar1; TrieNode *pTVar2; long lVar3; ostream *poVar4; long lVar5; int4 in_register_00000034; Trie *this; int8 in_R8; int8 in_R9; int iVar6; int8 uStack_a0; int aiStack_98 [2]; int8 auStack_90 [3]; int aiStack_78 [2]; string local_70 [32]; int8 local_50; int8 local_48; int1 *local_40; int local_38; allocator local_31; this = (Trie *)CONCAT44(in_register_00000034,param_2); local_40 = (int1 *)aiStack_78; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; uVar1 = *(int8 *)(param_3 + 8); iVar6 = (int)uVar1; if (*(int *)(this + 0xc) < iVar6) { /* try { // try from 0012191a to 0012193f has its CatchHandler @ 001219ea */ auStack_90[2] = 0x121929; poVar4 = std::operator<<((ostream *)PTR_cerr_0013fff0,(string *)param_3); auStack_90[2] = 0x121938; poVar4 = std::operator<<(poVar4," :query length exceeds maximum allowed length(32)"); auStack_90[2] = 0x121940; std::endl<char,std::char_traits<char>>(poVar4); } else { local_38 = (int)param_4; lVar3 = -((ulong)(*(int *)(this + 0xc) + 1) * 4 + 0xf & 0xfffffffffffffff0); local_50 = in_R8; local_48 = in_R9; for (lVar5 = 0; lVar5 <= iVar6; lVar5 = lVar5 + 1) { ((int *)((long)aiStack_78 + lVar3))[lVar5] = (int)lVar5; } /* try { // try from 00121981 to 00121994 has its CatchHandler @ 001219e8 */ *(int8 *)((long)aiStack_78 + lVar3 + -8) = 0x121995; std::__cxx11::string::string<std::allocator<char>>(local_70,"",&local_31); iVar6 = local_38; pTVar2 = *(TrieNode **)(this + 0x48); /* try { // try from 00121999 to 001219ba has its CatchHandler @ 001219da */ *(int8 *)((long)aiStack_78 + lVar3 + -8) = local_48; *(int8 *)((long)auStack_90 + lVar3 + 8) = local_50; *(string **)((long)auStack_90 + lVar3) = param_1; *(int8 *)((long)aiStack_98 + lVar3) = uVar1; *(int8 *)((long)&uStack_a0 + lVar3) = 0x1219b7; SearchRecursive(this,(string *)param_3,iVar6,local_70,pTVar2,(int *)((long)aiStack_78 + lVar3), *(int *)((long)aiStack_98 + lVar3),*(vector **)((long)auStack_90 + lVar3), *(optional **)((long)auStack_90 + lVar3 + 8), *(optional **)((long)aiStack_78 + lVar3 + -8)); *(int8 *)((long)aiStack_78 + lVar3 + -8) = 0x1219c4; std::__cxx11::string::~string(local_70); } return param_1; }
26,114
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
monkey531[P]llama/common/common.cpp
void string_process_escapes(std::string & input) { std::size_t input_len = input.length(); std::size_t output_idx = 0; for (std::size_t input_idx = 0; input_idx < input_len; ++input_idx) { if (input[input_idx] == '\\' && input_idx + 1 < input_len) { switch (input[++input_idx]) { case 'n': input[output_idx++] = '\n'; break; case 'r': input[output_idx++] = '\r'; break; case 't': input[output_idx++] = '\t'; break; case '\'': input[output_idx++] = '\''; break; case '\"': input[output_idx++] = '\"'; break; case '\\': input[output_idx++] = '\\'; break; case 'x': // Handle \x12, etc if (input_idx + 2 < input_len) { const char x[3] = { input[input_idx + 1], input[input_idx + 2], 0 }; char *err_p = nullptr; const long val = std::strtol(x, &err_p, 16); if (err_p == x + 2) { input_idx += 2; input[output_idx++] = char(val); break; } } // fall through default: input[output_idx++] = '\\'; input[output_idx++] = input[input_idx]; break; } } else { input[output_idx++] = input[input_idx]; } } input.resize(output_idx); }
O1
cpp
string_process_escapes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movq 0x8(%rdi), %r13 testq %r13, %r13 je 0x77ab0 leaq 0xf(%rsp), %rbp xorl %r14d, %r14d leaq 0xd(%rsp), %rdi leaq 0x10(%rsp), %rsi xorl %eax, %eax movq (%rbx), %rcx movb (%rcx,%rax), %dl cmpb $0x5c, %dl jne 0x779d9 leaq 0x1(%rax), %r15 cmpq %r13, %r15 jae 0x779d9 movzbl (%rcx,%r15), %edx cmpl $0x6d, %edx jle 0x779e5 cmpl $0x73, %edx jg 0x779ff cmpl $0x6e, %edx je 0x77a50 cmpl $0x72, %edx jne 0x77a87 movb $0xd, (%rcx,%r14) jmp 0x77a63 movb %dl, (%rcx,%r14) incq %r14 jmp 0x77aa2 cmpl $0x22, %edx je 0x77a49 cmpl $0x27, %edx je 0x77a5e cmpl $0x5c, %edx jne 0x77a87 movb $0x5c, (%rcx,%r14) jmp 0x77a63 cmpl $0x74, %edx je 0x77a57 cmpl $0x78, %edx jne 0x77a87 leaq 0x3(%rax), %r12 cmpq %r13, %r12 jae 0x77a87 movb 0x2(%rcx,%rax), %dl movb %dl, 0xd(%rsp) movb 0x3(%rcx,%rax), %al movb %al, 0xe(%rsp) movb $0x0, 0xf(%rsp) movq $0x0, 0x10(%rsp) movl $0x10, %edx callq 0x1bcd0 movq 0x10(%rsp), %rcx cmpq %rbp, %rcx je 0x77a68 movq %r15, %r12 jmp 0x77a75 movb $0x22, (%rcx,%r14) jmp 0x77a63 movb $0xa, (%rcx,%r14) jmp 0x77a63 movb $0x9, (%rcx,%r14) jmp 0x77a63 movb $0x27, (%rcx,%r14) incq %r14 jmp 0x77a9f movq (%rbx), %rdx movb %al, (%rdx,%r14) incq %r14 movq %r12, %r15 movq %r12, %rax cmpq %rbp, %rcx leaq 0xd(%rsp), %rdi leaq 0x10(%rsp), %rsi je 0x77aa2 movq (%rbx), %rax movb $0x5c, (%rax,%r14) movq (%rbx), %rax movb (%rax,%r15), %cl movb %cl, 0x1(%rax,%r14) addq $0x2, %r14 movq %r15, %rax incq %rax cmpq %r13, %rax jb 0x7799a jmp 0x77ab3 xorl %r14d, %r14d movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x1b260 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_Z22string_process_escapesRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rdi mov r13, [rdi+8] test r13, r13 jz loc_77AB0 lea rbp, [rsp+48h+var_39] xor r14d, r14d lea rdi, [rsp+48h+var_3B] lea rsi, [rsp+48h+var_38] xor eax, eax loc_7799A: mov rcx, [rbx] mov dl, [rcx+rax] cmp dl, 5Ch ; '\' jnz short loc_779D9 lea r15, [rax+1] cmp r15, r13 jnb short loc_779D9 movzx edx, byte ptr [rcx+r15] cmp edx, 6Dh ; 'm' jle short loc_779E5 cmp edx, 73h ; 's' jg short loc_779FF cmp edx, 6Eh ; 'n' jz loc_77A50 cmp edx, 72h ; 'r' jnz loc_77A87 mov byte ptr [rcx+r14], 0Dh jmp loc_77A63 loc_779D9: mov [rcx+r14], dl inc r14 jmp loc_77AA2 loc_779E5: cmp edx, 22h ; '"' jz short loc_77A49 cmp edx, 27h ; ''' jz short loc_77A5E cmp edx, 5Ch ; '\' jnz loc_77A87 mov byte ptr [rcx+r14], 5Ch ; '\' jmp short loc_77A63 loc_779FF: cmp edx, 74h ; 't' jz short loc_77A57 cmp edx, 78h ; 'x' jnz short loc_77A87 lea r12, [rax+3] cmp r12, r13 jnb short loc_77A87 mov dl, [rcx+rax+2] mov [rsp+48h+var_3B], dl mov al, [rcx+rax+3] mov [rsp+48h+var_3A], al mov [rsp+48h+var_39], 0 mov [rsp+48h+var_38], 0 mov edx, 10h call _strtol mov rcx, [rsp+48h+var_38] cmp rcx, rbp jz short loc_77A68 mov r12, r15 jmp short loc_77A75 loc_77A49: mov byte ptr [rcx+r14], 22h ; '"' jmp short loc_77A63 loc_77A50: mov byte ptr [rcx+r14], 0Ah jmp short loc_77A63 loc_77A57: mov byte ptr [rcx+r14], 9 jmp short loc_77A63 loc_77A5E: mov byte ptr [rcx+r14], 27h ; ''' loc_77A63: inc r14 jmp short loc_77A9F loc_77A68: mov rdx, [rbx] mov [rdx+r14], al inc r14 mov r15, r12 loc_77A75: mov rax, r12 cmp rcx, rbp lea rdi, [rsp+48h+var_3B] lea rsi, [rsp+48h+var_38] jz short loc_77AA2 loc_77A87: mov rax, [rbx] mov byte ptr [rax+r14], 5Ch ; '\' mov rax, [rbx] mov cl, [rax+r15] mov [rax+r14+1], cl add r14, 2 loc_77A9F: mov rax, r15 loc_77AA2: inc rax cmp rax, r13 jb loc_7799A jmp short loc_77AB3 loc_77AB0: xor r14d, r14d loc_77AB3: mov rdi, rbx mov rsi, r14 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long string_process_escapes(long long *a1) { unsigned long long v1; // r13 long long v2; // r14 long long v3; // rax long long v4; // rcx char v5; // dl long long v6; // r15 unsigned int v7; // edx long long v8; // r12 char v9; // al char *v10; // rcx _BYTE v12[2]; // [rsp+Dh] [rbp-3Bh] BYREF char v13; // [rsp+Fh] [rbp-39h] BYREF char *v14; // [rsp+10h] [rbp-38h] BYREF v1 = a1[1]; if ( v1 ) { v2 = 0LL; v3 = 0LL; while ( 1 ) { v4 = *a1; v5 = *(_BYTE *)(*a1 + v3); if ( v5 == 92 ) { v6 = v3 + 1; if ( v3 + 1 < v1 ) break; } *(_BYTE *)(v4 + v2++) = v5; LABEL_29: if ( ++v3 >= v1 ) return std::string::resize(a1, v2, 0LL); } v7 = *(unsigned __int8 *)(v4 + v6); if ( v7 <= 0x6D ) { switch ( v7 ) { case '"': *(_BYTE *)(v4 + v2) = 34; goto LABEL_24; case '\'': *(_BYTE *)(v4 + v2) = 39; goto LABEL_24; case '\\': *(_BYTE *)(v4 + v2) = 92; goto LABEL_24; } } else if ( *(unsigned __int8 *)(v4 + v6) > 0x73u ) { if ( v7 == 116 ) { *(_BYTE *)(v4 + v2) = 9; goto LABEL_24; } if ( v7 == 120 ) { v8 = v3 + 3; if ( v3 + 3 < v1 ) { v12[0] = *(_BYTE *)(v4 + v3 + 2); v12[1] = *(_BYTE *)(v4 + v3 + 3); v13 = 0; v14 = 0LL; v9 = strtol(v12, &v14, 16LL); v10 = v14; if ( v14 == &v13 ) { *(_BYTE *)(*a1 + v2++) = v9; v6 = v8; } else { v8 = v6; } v3 = v8; if ( v10 == &v13 ) goto LABEL_29; } } } else { if ( v7 == 110 ) { *(_BYTE *)(v4 + v2) = 10; goto LABEL_24; } if ( v7 == 114 ) { *(_BYTE *)(v4 + v2) = 13; LABEL_24: ++v2; LABEL_28: v3 = v6; goto LABEL_29; } } *(_BYTE *)(*a1 + v2) = 92; *(_BYTE *)(*a1 + v2 + 1) = *(_BYTE *)(*a1 + v6); v2 += 2LL; goto LABEL_28; } v2 = 0LL; return std::string::resize(a1, v2, 0LL); }
string_process_escapes: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV R13,qword ptr [RDI + 0x8] TEST R13,R13 JZ 0x00177ab0 LEA RBP,[RSP + 0xf] XOR R14D,R14D LEA RDI,[RSP + 0xd] LEA RSI,[RSP + 0x10] XOR EAX,EAX LAB_0017799a: MOV RCX,qword ptr [RBX] MOV DL,byte ptr [RCX + RAX*0x1] CMP DL,0x5c JNZ 0x001779d9 LEA R15,[RAX + 0x1] CMP R15,R13 JNC 0x001779d9 MOVZX EDX,byte ptr [RCX + R15*0x1] CMP EDX,0x6d JLE 0x001779e5 CMP EDX,0x73 JG 0x001779ff CMP EDX,0x6e JZ 0x00177a50 CMP EDX,0x72 JNZ 0x00177a87 MOV byte ptr [RCX + R14*0x1],0xd JMP 0x00177a63 LAB_001779d9: MOV byte ptr [RCX + R14*0x1],DL INC R14 JMP 0x00177aa2 LAB_001779e5: CMP EDX,0x22 JZ 0x00177a49 CMP EDX,0x27 JZ 0x00177a5e CMP EDX,0x5c JNZ 0x00177a87 MOV byte ptr [RCX + R14*0x1],0x5c JMP 0x00177a63 LAB_001779ff: CMP EDX,0x74 JZ 0x00177a57 CMP EDX,0x78 JNZ 0x00177a87 LEA R12,[RAX + 0x3] CMP R12,R13 JNC 0x00177a87 MOV DL,byte ptr [RCX + RAX*0x1 + 0x2] MOV byte ptr [RSP + 0xd],DL MOV AL,byte ptr [RCX + RAX*0x1 + 0x3] MOV byte ptr [RSP + 0xe],AL MOV byte ptr [RSP + 0xf],0x0 MOV qword ptr [RSP + 0x10],0x0 MOV EDX,0x10 CALL 0x0011bcd0 MOV RCX,qword ptr [RSP + 0x10] CMP RCX,RBP JZ 0x00177a68 MOV R12,R15 JMP 0x00177a75 LAB_00177a49: MOV byte ptr [RCX + R14*0x1],0x22 JMP 0x00177a63 LAB_00177a50: MOV byte ptr [RCX + R14*0x1],0xa JMP 0x00177a63 LAB_00177a57: MOV byte ptr [RCX + R14*0x1],0x9 JMP 0x00177a63 LAB_00177a5e: MOV byte ptr [RCX + R14*0x1],0x27 LAB_00177a63: INC R14 JMP 0x00177a9f LAB_00177a68: MOV RDX,qword ptr [RBX] MOV byte ptr [RDX + R14*0x1],AL INC R14 MOV R15,R12 LAB_00177a75: MOV RAX,R12 CMP RCX,RBP LEA RDI,[RSP + 0xd] LEA RSI,[RSP + 0x10] JZ 0x00177aa2 LAB_00177a87: MOV RAX,qword ptr [RBX] MOV byte ptr [RAX + R14*0x1],0x5c MOV RAX,qword ptr [RBX] MOV CL,byte ptr [RAX + R15*0x1] MOV byte ptr [RAX + R14*0x1 + 0x1],CL ADD R14,0x2 LAB_00177a9f: MOV RAX,R15 LAB_00177aa2: INC RAX CMP RAX,R13 JC 0x0017799a JMP 0x00177ab3 LAB_00177ab0: XOR R14D,R14D LAB_00177ab3: MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x0011b260 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_process_escapes(std::__cxx11::string&) */ void string_process_escapes(string *param_1) { byte bVar1; ulong uVar2; long lVar3; ulong uVar4; long lVar6; char local_3b; int1 local_3a; char local_39; char *local_38; ulong uVar5; uVar2 = *(ulong *)(param_1 + 8); if (uVar2 == 0) { lVar6 = 0; } else { lVar6 = 0; uVar4 = 0; do { lVar3 = *(long *)param_1; if ((*(char *)(lVar3 + uVar4) == '\\') && (uVar5 = uVar4 + 1, uVar5 < uVar2)) { bVar1 = *(byte *)(lVar3 + uVar5); if (bVar1 < 0x6e) { if (bVar1 == 0x22) { *(int1 *)(lVar3 + lVar6) = 0x22; } else if (bVar1 == 0x27) { *(int1 *)(lVar3 + lVar6) = 0x27; } else { if (bVar1 != 0x5c) goto LAB_00177a87; *(int1 *)(lVar3 + lVar6) = 0x5c; } } else if (bVar1 < 0x74) { if (bVar1 == 0x6e) { *(int1 *)(lVar3 + lVar6) = 10; } else { if (bVar1 != 0x72) goto LAB_00177a87; *(int1 *)(lVar3 + lVar6) = 0xd; } } else { if (bVar1 != 0x74) { if ((bVar1 == 0x78) && (uVar4 + 3 < uVar2)) { local_3b = *(char *)(lVar3 + 2 + uVar4); local_3a = *(int1 *)(lVar3 + 3 + uVar4); local_39 = '\0'; local_38 = (char *)0x0; lVar3 = strtol(&local_3b,&local_38,0x10); if (local_38 == &local_39) { *(char *)(*(long *)param_1 + lVar6) = (char)lVar3; lVar6 = lVar6 + 1; uVar5 = uVar4 + 3; goto LAB_00177aa2; } } LAB_00177a87: *(int1 *)(*(long *)param_1 + lVar6) = 0x5c; *(int1 *)(*(long *)param_1 + 1 + lVar6) = *(int1 *)(*(long *)param_1 + uVar5); lVar6 = lVar6 + 2; goto LAB_00177aa2; } *(int1 *)(lVar3 + lVar6) = 9; } lVar6 = lVar6 + 1; } else { *(char *)(lVar3 + lVar6) = *(char *)(lVar3 + uVar4); lVar6 = lVar6 + 1; uVar5 = uVar4; } LAB_00177aa2: uVar4 = uVar5 + 1; } while (uVar4 < uVar2); } std::__cxx11::string::resize((ulong)param_1,(char)lVar6); return; }
26,115
ma_tls_init
eloqsql/libmariadb/libmariadb/secure/openssl.c
void *ma_tls_init(MYSQL *mysql) { SSL *ssl= NULL; SSL_CTX *ctx= NULL; long default_options= SSL_OP_ALL | SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3; long options= 0; pthread_mutex_lock(&LOCK_openssl_config); #if OPENSSL_VERSION_NUMBER >= 0x10100000L if (!(ctx= SSL_CTX_new(TLS_client_method()))) #else if (!(ctx= SSL_CTX_new(SSLv23_client_method()))) #endif goto error; if (mysql->options.extension) options= ma_tls_version_options(mysql->options.extension->tls_version); SSL_CTX_set_options(ctx, options ? options : default_options); if (ma_tls_set_certs(mysql, ctx)) { goto error; } if (!(ssl= SSL_new(ctx))) goto error; if (!SSL_set_app_data(ssl, mysql)) goto error; pthread_mutex_unlock(&LOCK_openssl_config); return (void *)ssl; error: pthread_mutex_unlock(&LOCK_openssl_config); if (ctx) SSL_CTX_free(ctx); if (ssl) SSL_free(ssl); return NULL; }
O0
c
ma_tls_init: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq $0x0, -0x18(%rbp) movq $0x0, -0x20(%rbp) movl $0x82000850, %eax # imm = 0x82000850 movq %rax, -0x28(%rbp) movq $0x0, -0x30(%rbp) leaq 0x3927bc(%rip), %rdi # 0x3ed090 callq 0x36270 callq 0x36960 movq %rax, %rdi callq 0x366c0 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x5a8f5 jmp 0x5a9a1 movq -0x10(%rbp), %rax cmpq $0x0, 0x480(%rax) je 0x5a91e movq -0x10(%rbp), %rax movq 0x480(%rax), %rax movq 0xc0(%rax), %rdi callq 0x5a9e0 movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x30(%rbp) je 0x5a937 movq -0x30(%rbp), %rax movq %rax, -0x40(%rbp) jmp 0x5a93f movq -0x28(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rdi movq -0x40(%rbp), %rsi callq 0x36540 movq -0x10(%rbp), %rdi movq -0x20(%rbp), %rsi callq 0x5aad0 cmpl $0x0, %eax je 0x5a960 jmp 0x5a9a1 movq -0x20(%rbp), %rdi callq 0x368f0 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x5a975 jmp 0x5a9a1 movq -0x18(%rbp), %rdi movq -0x10(%rbp), %rdx xorl %esi, %esi callq 0x36470 cmpl $0x0, %eax jne 0x5a98b jmp 0x5a9a1 leaq 0x3926fe(%rip), %rdi # 0x3ed090 callq 0x36240 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x5a9d5 leaq 0x3926e8(%rip), %rdi # 0x3ed090 callq 0x36240 cmpq $0x0, -0x20(%rbp) je 0x5a9bd movq -0x20(%rbp), %rdi callq 0x36490 cmpq $0x0, -0x18(%rbp) je 0x5a9cd movq -0x18(%rbp), %rdi callq 0x360d0 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nop
ma_tls_init: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], 0 mov [rbp+var_20], 0 mov eax, 82000850h mov [rbp+var_28], rax mov [rbp+var_30], 0 lea rdi, LOCK_openssl_config call _pthread_mutex_lock call _TLS_client_method mov rdi, rax call _SSL_CTX_new mov [rbp+var_20], rax cmp rax, 0 jnz short loc_5A8F5 jmp loc_5A9A1 loc_5A8F5: mov rax, [rbp+var_10] cmp qword ptr [rax+480h], 0 jz short loc_5A91E mov rax, [rbp+var_10] mov rax, [rax+480h] mov rdi, [rax+0C0h] call ma_tls_version_options mov [rbp+var_30], rax loc_5A91E: mov rax, [rbp+var_20] mov [rbp+var_38], rax cmp [rbp+var_30], 0 jz short loc_5A937 mov rax, [rbp+var_30] mov [rbp+var_40], rax jmp short loc_5A93F loc_5A937: mov rax, [rbp+var_28] mov [rbp+var_40], rax loc_5A93F: mov rdi, [rbp+var_38] mov rsi, [rbp+var_40] call _SSL_CTX_set_options mov rdi, [rbp+var_10] mov rsi, [rbp+var_20] call ma_tls_set_certs cmp eax, 0 jz short loc_5A960 jmp short loc_5A9A1 loc_5A960: mov rdi, [rbp+var_20] call _SSL_new mov [rbp+var_18], rax cmp rax, 0 jnz short loc_5A975 jmp short loc_5A9A1 loc_5A975: mov rdi, [rbp+var_18] mov rdx, [rbp+var_10] xor esi, esi call _SSL_set_ex_data cmp eax, 0 jnz short loc_5A98B jmp short loc_5A9A1 loc_5A98B: lea rdi, LOCK_openssl_config call _pthread_mutex_unlock mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_5A9D5 loc_5A9A1: lea rdi, LOCK_openssl_config call _pthread_mutex_unlock cmp [rbp+var_20], 0 jz short loc_5A9BD mov rdi, [rbp+var_20] call _SSL_CTX_free loc_5A9BD: cmp [rbp+var_18], 0 jz short loc_5A9CD mov rdi, [rbp+var_18] call _SSL_free loc_5A9CD: mov [rbp+var_8], 0 loc_5A9D5: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long ma_tls_init(long long a1) { long long v1; // rax long long v3; // [rsp+10h] [rbp-30h] long long v4; // [rsp+20h] [rbp-20h] long long v5; // [rsp+28h] [rbp-18h] v5 = 0LL; v3 = 0LL; pthread_mutex_lock(&LOCK_openssl_config); v1 = TLS_client_method(); v4 = SSL_CTX_new(v1); if ( !v4 ) goto LABEL_11; if ( *(_QWORD *)(a1 + 1152) ) v3 = ma_tls_version_options(*(_QWORD *)(*(_QWORD *)(a1 + 1152) + 192LL)); if ( v3 ) SSL_CTX_set_options(v4, v3); else SSL_CTX_set_options(v4, 2181040208LL); if ( !(unsigned int)ma_tls_set_certs(a1, v4) && (v5 = SSL_new(v4)) != 0 && (unsigned int)SSL_set_ex_data(v5, 0LL, a1) ) { pthread_mutex_unlock(&LOCK_openssl_config); return v5; } else { LABEL_11: pthread_mutex_unlock(&LOCK_openssl_config); if ( v4 ) SSL_CTX_free(v4); if ( v5 ) SSL_free(v5); return 0LL; } }
ma_tls_init: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],0x0 MOV qword ptr [RBP + -0x20],0x0 MOV EAX,0x82000850 MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x30],0x0 LEA RDI,[0x4ed090] CALL 0x00136270 CALL 0x00136960 MOV RDI,RAX CALL 0x001366c0 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x0015a8f5 JMP 0x0015a9a1 LAB_0015a8f5: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x480],0x0 JZ 0x0015a91e MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x480] MOV RDI,qword ptr [RAX + 0xc0] CALL 0x0015a9e0 MOV qword ptr [RBP + -0x30],RAX LAB_0015a91e: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x30],0x0 JZ 0x0015a937 MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x40],RAX JMP 0x0015a93f LAB_0015a937: MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x40],RAX LAB_0015a93f: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x40] CALL 0x00136540 MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x20] CALL 0x0015aad0 CMP EAX,0x0 JZ 0x0015a960 JMP 0x0015a9a1 LAB_0015a960: MOV RDI,qword ptr [RBP + -0x20] CALL 0x001368f0 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0015a975 JMP 0x0015a9a1 LAB_0015a975: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x00136470 CMP EAX,0x0 JNZ 0x0015a98b JMP 0x0015a9a1 LAB_0015a98b: LEA RDI,[0x4ed090] CALL 0x00136240 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x0015a9d5 LAB_0015a9a1: LEA RDI,[0x4ed090] CALL 0x00136240 CMP qword ptr [RBP + -0x20],0x0 JZ 0x0015a9bd MOV RDI,qword ptr [RBP + -0x20] CALL 0x00136490 LAB_0015a9bd: CMP qword ptr [RBP + -0x18],0x0 JZ 0x0015a9cd MOV RDI,qword ptr [RBP + -0x18] CALL 0x001360d0 LAB_0015a9cd: MOV qword ptr [RBP + -0x8],0x0 LAB_0015a9d5: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
SSL * ma_tls_init(void *param_1) { int iVar1; SSL_METHOD *meth; SSL_CTX *ctx; long local_48; long local_38; SSL *local_20; local_20 = (SSL *)0x0; local_38 = 0; pthread_mutex_lock((pthread_mutex_t *)LOCK_openssl_config); meth = (SSL_METHOD *)TLS_client_method(); ctx = SSL_CTX_new(meth); if (ctx != (SSL_CTX *)0x0) { if (*(long *)((long)param_1 + 0x480) != 0) { local_38 = ma_tls_version_options(*(int8 *)(*(long *)((long)param_1 + 0x480) + 0xc0)); } if (local_38 == 0) { local_48 = 0x82000850; } else { local_48 = local_38; } SSL_CTX_set_options(ctx,local_48); iVar1 = ma_tls_set_certs(param_1); if (((iVar1 == 0) && (local_20 = SSL_new(ctx), local_20 != (SSL *)0x0)) && (iVar1 = SSL_set_ex_data(local_20,0,param_1), iVar1 != 0)) { pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config); return local_20; } } pthread_mutex_unlock((pthread_mutex_t *)LOCK_openssl_config); if (ctx != (SSL_CTX *)0x0) { SSL_CTX_free(ctx); } if (local_20 != (SSL *)0x0) { SSL_free(local_20); } return (SSL *)0x0; }
26,116
Item_args::excl_dep_on_in_subq_left_part(Item_in_subselect*)
eloqsql/sql/item.h
bool excl_dep_on_in_subq_left_part(Item_in_subselect *subq_pred) { for (uint i= 0; i < arg_count; i++) { if (args[i]->const_item()) continue; if (!args[i]->excl_dep_on_in_subq_left_part(subq_pred)) return false; } return true; }
O0
c
Item_args::excl_dep_on_in_subq_left_part(Item_in_subselect*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movl $0x0, -0x1c(%rbp) movq -0x28(%rbp), %rcx movl -0x1c(%rbp), %eax cmpl 0x18(%rcx), %eax jae 0xf0cc movq -0x28(%rbp), %rax movq (%rax), %rax movl -0x1c(%rbp), %ecx movq (%rax,%rcx,8), %rdi movq (%rdi), %rax callq *0x208(%rax) testb $0x1, %al jne 0xf098 jmp 0xf09a jmp 0xf0c1 movq -0x28(%rbp), %rax movq (%rax), %rax movl -0x1c(%rbp), %ecx movq (%rax,%rcx,8), %rdi movq -0x18(%rbp), %rsi movq (%rdi), %rax callq *0x438(%rax) testb $0x1, %al jne 0xf0bf movb $0x0, -0x1(%rbp) jmp 0xf0d0 jmp 0xf0c1 movl -0x1c(%rbp), %eax addl $0x1, %eax movl %eax, -0x1c(%rbp) jmp 0xf06f movb $0x1, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
_ZN9Item_args29excl_dep_on_in_subq_left_partEP17Item_in_subselect: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov [rbp+var_28], rax mov [rbp+var_1C], 0 loc_F06F: mov rcx, [rbp+var_28] mov eax, [rbp+var_1C] cmp eax, [rcx+18h] jnb short loc_F0CC mov rax, [rbp+var_28] mov rax, [rax] mov ecx, [rbp+var_1C] mov rdi, [rax+rcx*8] mov rax, [rdi] call qword ptr [rax+208h] test al, 1 jnz short loc_F098 jmp short loc_F09A loc_F098: jmp short loc_F0C1 loc_F09A: mov rax, [rbp+var_28] mov rax, [rax] mov ecx, [rbp+var_1C] mov rdi, [rax+rcx*8] mov rsi, [rbp+var_18] mov rax, [rdi] call qword ptr [rax+438h] test al, 1 jnz short loc_F0BF mov [rbp+var_1], 0 jmp short loc_F0D0 loc_F0BF: jmp short $+2 loc_F0C1: mov eax, [rbp+var_1C] add eax, 1 mov [rbp+var_1C], eax jmp short loc_F06F loc_F0CC: mov [rbp+var_1], 1 loc_F0D0: mov al, [rbp+var_1] and al, 1 add rsp, 30h pop rbp retn
char Item_args::excl_dep_on_in_subq_left_part(long long a1, long long a2) { long long v2; // rdi long long v3; // rdi unsigned int i; // [rsp+14h] [rbp-1Ch] for ( i = 0; i < *(_DWORD *)(a1 + 24); ++i ) { v2 = *(_QWORD *)(*(_QWORD *)a1 + 8LL * i); if ( ((*(long long ( **)(long long))(*(_QWORD *)v2 + 520LL))(v2) & 1) == 0 ) { v3 = *(_QWORD *)(*(_QWORD *)a1 + 8LL * i); if ( ((*(long long ( **)(long long, long long))(*(_QWORD *)v3 + 1080LL))(v3, a2) & 1) == 0 ) return 0; } } return 1; }
excl_dep_on_in_subq_left_part: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV dword ptr [RBP + -0x1c],0x0 LAB_0010f06f: MOV RCX,qword ptr [RBP + -0x28] MOV EAX,dword ptr [RBP + -0x1c] CMP EAX,dword ptr [RCX + 0x18] JNC 0x0010f0cc MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x208] TEST AL,0x1 JNZ 0x0010f098 JMP 0x0010f09a LAB_0010f098: JMP 0x0010f0c1 LAB_0010f09a: MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RBP + -0x1c] MOV RDI,qword ptr [RAX + RCX*0x8] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x438] TEST AL,0x1 JNZ 0x0010f0bf MOV byte ptr [RBP + -0x1],0x0 JMP 0x0010f0d0 LAB_0010f0bf: JMP 0x0010f0c1 LAB_0010f0c1: MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x1 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0010f06f LAB_0010f0cc: MOV byte ptr [RBP + -0x1],0x1 LAB_0010f0d0: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x30 POP RBP RET
/* Item_args::excl_dep_on_in_subq_left_part(Item_in_subselect*) */ int1 __thiscall Item_args::excl_dep_on_in_subq_left_part(Item_args *this,Item_in_subselect *param_1) { long *plVar1; ulong uVar2; uint local_24; local_24 = 0; while( true ) { if (*(uint *)(this + 0x18) <= local_24) { return 1; } uVar2 = (**(code **)(**(long **)(*(long *)this + (ulong)local_24 * 8) + 0x208))(); if (((uVar2 & 1) == 0) && (plVar1 = *(long **)(*(long *)this + (ulong)local_24 * 8), uVar2 = (**(code **)(*plVar1 + 0x438))(plVar1,param_1), (uVar2 & 1) == 0)) break; local_24 = local_24 + 1; } return 0; }
26,117
httplib::Server::read_content_core(httplib::Stream&, httplib::Request&, httplib::Response&, std::function<bool (char const*, unsigned long)>, std::function<bool (httplib::MultipartFormData const&)>, std::function<bool (char const*, unsigned long)>) const
hkr04[P]cpp-mcp/common/httplib.h
inline bool Server::read_content_core(Stream &strm, Request &req, Response &res, ContentReceiver receiver, MultipartContentHeader multipart_header, ContentReceiver multipart_receiver) const { detail::MultipartFormDataParser multipart_form_data_parser; ContentReceiverWithProgress out; if (req.is_multipart_form_data()) { const auto &content_type = req.get_header_value("Content-Type"); std::string boundary; if (!detail::parse_multipart_boundary(content_type, boundary)) { res.status = StatusCode::BadRequest_400; return false; } multipart_form_data_parser.set_boundary(std::move(boundary)); out = [&](const char *buf, size_t n, uint64_t /*off*/, uint64_t /*len*/) { /* For debug size_t pos = 0; while (pos < n) { auto read_size = (std::min)<size_t>(1, n - pos); auto ret = multipart_form_data_parser.parse( buf + pos, read_size, multipart_receiver, multipart_header); if (!ret) { return false; } pos += read_size; } return true; */ return multipart_form_data_parser.parse(buf, n, multipart_receiver, multipart_header); }; } else { out = [receiver](const char *buf, size_t n, uint64_t /*off*/, uint64_t /*len*/) { return receiver(buf, n); }; } if (req.method == "DELETE" && !req.has_header("Content-Length")) { return true; } if (!detail::read_content(strm, req, payload_max_length_, res.status, nullptr, out, true)) { return false; } if (req.is_multipart_form_data()) { if (!multipart_form_data_parser.is_valid()) { res.status = StatusCode::BadRequest_400; return false; } } return true; }
O0
c
httplib::Server::read_content_core(httplib::Stream&, httplib::Request&, httplib::Response&, std::function<bool (char const*, unsigned long)>, std::function<bool (httplib::MultipartFormData const&)>, std::function<bool (char const*, unsigned long)>) const: subq $0x378, %rsp # imm = 0x378 movq %r9, 0x70(%rsp) movq %r8, 0x78(%rsp) movq 0x380(%rsp), %rax movq %rax, 0x80(%rsp) movq %rdi, 0x368(%rsp) movq %rsi, 0x360(%rsp) movq %rdx, 0x358(%rsp) movq %rcx, 0x350(%rsp) movq %r8, 0x348(%rsp) movq %r9, 0x340(%rsp) movq 0x368(%rsp), %rax movq %rax, 0x88(%rsp) leaq 0x1e0(%rsp), %rdi callq 0x35780 leaq 0x1c0(%rsp), %rdi callq 0x1ad10 movq 0x358(%rsp), %rdi callq 0x358d0 movb %al, 0x97(%rsp) jmp 0x35111 movb 0x97(%rsp), %al testb $0x1, %al jne 0x35121 jmp 0x35334 movq 0x358(%rsp), %rax movq %rax, 0x60(%rsp) leaq 0x167(%rsp), %rdi movq %rdi, 0x68(%rsp) callq 0xbe20 movq 0x68(%rsp), %rdx leaq 0x98de7(%rip), %rsi # 0xcdf33 leaq 0x168(%rsp), %rdi callq 0xf160 jmp 0x3515b movq 0x60(%rsp), %rsi leaq 0x9e959(%rip), %rcx # 0xd3ac0 xorl %eax, %eax movl %eax, %r8d leaq 0x188(%rsp), %rdi leaq 0x168(%rsp), %rdx callq 0x17b80 jmp 0x35183 leaq 0x168(%rsp), %rdi callq 0xbfb0 leaq 0x167(%rsp), %rdi callq 0xb8e0 leaq 0x188(%rsp), %rax movq %rax, 0x1a8(%rsp) leaq 0x140(%rsp), %rdi movq %rdi, 0x50(%rsp) callq 0xbb80 movq 0x50(%rsp), %rsi movq 0x1a8(%rsp), %rdi callq 0x359f0 movb %al, 0x5f(%rsp) jmp 0x351d7 movb 0x5f(%rsp), %al testb $0x1, %al jne 0x352a1 jmp 0x351e5 movq 0x350(%rsp), %rax movl $0x190, 0x20(%rax) # imm = 0x190 movb $0x0, 0x377(%rsp) movl $0x1, 0x13c(%rsp) jmp 0x35307 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1b8(%rsp) movl %eax, 0x1b4(%rsp) jmp 0x356bb movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1b8(%rsp) movl %eax, 0x1b4(%rsp) jmp 0x3525c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1b8(%rsp) movl %eax, 0x1b4(%rsp) leaq 0x168(%rsp), %rdi callq 0xbfb0 leaq 0x167(%rsp), %rdi callq 0xb8e0 jmp 0x356bb movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1b8(%rsp) movl %eax, 0x1b4(%rsp) leaq 0x140(%rsp), %rdi callq 0xbfb0 leaq 0x188(%rsp), %rdi callq 0xbfb0 jmp 0x356bb leaq 0x1e0(%rsp), %rdi leaq 0x140(%rsp), %rsi callq 0x35b30 jmp 0x352b8 movq 0x70(%rsp), %rax movq 0x80(%rsp), %rcx leaq 0x1e0(%rsp), %rdx movq %rdx, 0x120(%rsp) movq %rcx, 0x128(%rsp) movq %rax, 0x130(%rsp) leaq 0x1c0(%rsp), %rdi leaq 0x120(%rsp), %rsi callq 0x35c70 jmp 0x352fc movl $0x0, 0x13c(%rsp) leaq 0x140(%rsp), %rdi callq 0xbfb0 leaq 0x188(%rsp), %rdi callq 0xbfb0 movl 0x13c(%rsp), %eax testl %eax, %eax jne 0x35690 jmp 0x35332 jmp 0x35394 movq 0x78(%rsp), %rsi leaq 0x100(%rsp), %rdi callq 0x35cc0 jmp 0x35348 leaq 0x1c0(%rsp), %rdi leaq 0x100(%rsp), %rsi callq 0x35d70 jmp 0x3535f leaq 0x100(%rsp), %rdi callq 0x35dc0 jmp 0x35394 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1b8(%rsp) movl %eax, 0x1b4(%rsp) leaq 0x100(%rsp), %rdi callq 0x35dc0 jmp 0x356bb movq 0x358(%rsp), %rdi leaq 0x98cdd(%rip), %rsi # 0xce080 callq 0x17b50 movb %al, %cl movb $0x0, 0xde(%rsp) movb $0x0, 0xdd(%rsp) xorl %eax, %eax testb $0x1, %cl movb %al, 0x4f(%rsp) jne 0x353c7 jmp 0x35433 movq 0x358(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0xdf(%rsp), %rdi movq %rdi, 0x40(%rsp) callq 0xbe20 movq 0x40(%rsp), %rdx movb $0x1, 0xde(%rsp) leaq 0x98b51(%rip), %rsi # 0xcdf4b leaq 0xe0(%rsp), %rdi callq 0xf160 jmp 0x35409 movq 0x38(%rsp), %rdi movb $0x1, 0xdd(%rsp) leaq 0xe0(%rsp), %rsi callq 0x17cc0 movb %al, 0x37(%rsp) jmp 0x35429 movb 0x37(%rsp), %al xorb $-0x1, %al movb %al, 0x4f(%rsp) movb 0x4f(%rsp), %al movb %al, 0x36(%rsp) testb $0x1, 0xdd(%rsp) jne 0x35447 jmp 0x35454 leaq 0xe0(%rsp), %rdi callq 0xbfb0 testb $0x1, 0xde(%rsp) jne 0x35460 jmp 0x3546d leaq 0xdf(%rsp), %rdi callq 0xb8e0 movb 0x36(%rsp), %al testb $0x1, %al jne 0x35477 jmp 0x354f2 movb $0x1, 0x377(%rsp) movl $0x1, 0x13c(%rsp) jmp 0x35690 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1b8(%rsp) movl %eax, 0x1b4(%rsp) jmp 0x354d4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1b8(%rsp) movl %eax, 0x1b4(%rsp) testb $0x1, 0xdd(%rsp) jne 0x354c5 jmp 0x354d2 leaq 0xe0(%rsp), %rdi callq 0xbfb0 jmp 0x354d4 testb $0x1, 0xde(%rsp) jne 0x354e0 jmp 0x354ed leaq 0xdf(%rsp), %rdi callq 0xb8e0 jmp 0x356bb movq 0x88(%rsp), %rax movq 0x360(%rsp), %rcx movq %rcx, 0x10(%rsp) movq 0x358(%rsp), %rcx movq %rcx, 0x18(%rsp) movq 0x70(%rax), %rax movq %rax, 0x20(%rsp) movq 0x350(%rsp), %rax addq $0x20, %rax movq %rax, 0x28(%rsp) xorl %eax, %eax movl %eax, %esi leaq 0xb8(%rsp), %rdi callq 0x35f30 leaq 0x98(%rsp), %rdi leaq 0x1c0(%rsp), %rsi callq 0x35f70 jmp 0x35556 movq 0x28(%rsp), %rcx movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rsi movq 0x10(%rsp), %rdi movq %rsp, %rax movl $0x1, (%rax) leaq 0xb8(%rsp), %r8 leaq 0x98(%rsp), %r9 callq 0x35dd0 movb %al, 0xf(%rsp) jmp 0x3558e movb 0xf(%rsp), %al xorb $-0x1, %al movb %al, 0xe(%rsp) leaq 0x98(%rsp), %rdi callq 0x36020 leaq 0xb8(%rsp), %rdi callq 0x36030 movb 0xe(%rsp), %al testb $0x1, %al jne 0x355bc jmp 0x3561d movb $0x0, 0x377(%rsp) movl $0x1, 0x13c(%rsp) jmp 0x35690 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1b8(%rsp) movl %eax, 0x1b4(%rsp) jmp 0x3560b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1b8(%rsp) movl %eax, 0x1b4(%rsp) leaq 0x98(%rsp), %rdi callq 0x36020 leaq 0xb8(%rsp), %rdi callq 0x36030 jmp 0x356bb movq 0x358(%rsp), %rdi callq 0x358d0 movb %al, 0xd(%rsp) jmp 0x35630 movb 0xd(%rsp), %al testb $0x1, %al jne 0x3563a jmp 0x3567d leaq 0x1e0(%rsp), %rdi callq 0x36040 movb %al, 0xc(%rsp) jmp 0x3564d movb 0xc(%rsp), %al testb $0x1, %al jne 0x3567b jmp 0x35657 movq 0x350(%rsp), %rax movl $0x190, 0x20(%rax) # imm = 0x190 movb $0x0, 0x377(%rsp) movl $0x1, 0x13c(%rsp) jmp 0x35690 jmp 0x3567d movb $0x1, 0x377(%rsp) movl $0x1, 0x13c(%rsp) leaq 0x1c0(%rsp), %rdi callq 0x36020 leaq 0x1e0(%rsp), %rdi callq 0x36060 movb 0x377(%rsp), %al andb $0x1, %al addq $0x378, %rsp # imm = 0x378 retq leaq 0x1c0(%rsp), %rdi callq 0x36020 leaq 0x1e0(%rsp), %rdi callq 0x36060 movq 0x1b8(%rsp), %rdi callq 0xbe10 nopw %cs:(%rax,%rax) nopl (%rax)
_ZNK7httplib6Server17read_content_coreERNS_6StreamERNS_7RequestERNS_8ResponseESt8functionIFbPKcmEES7_IFbRKNS_17MultipartFormDataEEESB_: sub rsp, 378h mov [rsp+378h+var_308], r9 mov [rsp+378h+var_300], r8 mov rax, [rsp+378h+arg_0] mov [rsp+378h+var_2F8], rax mov [rsp+378h+var_10], rdi mov [rsp+378h+var_18], rsi mov [rsp+378h+var_20], rdx mov [rsp+378h+var_28], rcx mov [rsp+378h+var_30], r8 mov [rsp+378h+var_38], r9 mov rax, [rsp+378h+var_10] mov [rsp+378h+var_2F0], rax lea rdi, [rsp+378h+var_198]; this call _ZN7httplib6detail23MultipartFormDataParserC2Ev; httplib::detail::MultipartFormDataParser::MultipartFormDataParser(void) lea rdi, [rsp+378h+var_1B8] call _ZNSt8functionIFbPKcmmmEEC2Ev; std::function<bool ()(char const*,ulong,ulong,ulong)>::function(void) mov rdi, [rsp+378h+var_20]; this call _ZNK7httplib7Request22is_multipart_form_dataEv; httplib::Request::is_multipart_form_data(void) mov [rsp+378h+var_2E1], al jmp short $+2 loc_35111: mov al, [rsp+378h+var_2E1] test al, 1 jnz short loc_35121 jmp loc_35334 loc_35121: mov rax, [rsp+378h+var_20] mov [rsp+378h+var_318], rax lea rdi, [rsp+378h+var_211] mov [rsp+378h+var_310], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+378h+var_310] lea rsi, aContentType; "Content-Type" lea rdi, [rsp+378h+var_210] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_3515B: mov rsi, [rsp+378h+var_318] lea rcx, asc_D3ABE+2; "" xor eax, eax mov r8d, eax lea rdi, [rsp+378h+var_1F0] lea rdx, [rsp+378h+var_210] call _ZNK7httplib7Request16get_header_valueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKcm; httplib::Request::get_header_value(std::string const&,char const*,ulong) jmp short $+2 loc_35183: lea rdi, [rsp+378h+var_210]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+378h+var_211] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rax, [rsp+378h+var_1F0] mov [rsp+378h+var_1D0], rax lea rdi, [rsp+378h+var_238] mov [rsp+378h+var_328], rdi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1Ev; std::string::basic_string(void) mov rsi, [rsp+378h+var_328] mov rdi, [rsp+378h+var_1D0] call _ZN7httplib6detail24parse_multipart_boundaryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_; httplib::detail::parse_multipart_boundary(std::string const&,std::string&) mov [rsp+378h+var_319], al jmp short $+2 loc_351D7: mov al, [rsp+378h+var_319] test al, 1 jnz loc_352A1 jmp short $+2 loc_351E5: mov rax, [rsp+378h+var_28] mov dword ptr [rax+20h], 190h mov [rsp+378h+var_1], 0 mov [rsp+378h+var_23C], 1 jmp loc_35307 mov rcx, rax mov eax, edx mov [rsp+arg_1B0], rcx mov [rsp+arg_1AC], eax jmp loc_356BB mov rcx, rax mov eax, edx mov [rsp+arg_1B0], rcx mov [rsp+arg_1AC], eax jmp short loc_3525C mov rcx, rax mov eax, edx mov [rsp+arg_1B0], rcx mov [rsp+arg_1AC], eax lea rdi, [rsp+arg_160]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_3525C: lea rdi, [rsp+arg_15F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_356BB mov rcx, rax mov eax, edx mov [rsp+arg_1B0], rcx mov [rsp+arg_1AC], eax lea rdi, [rsp+arg_138]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+arg_180]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_356BB loc_352A1: lea rdi, [rsp+378h+var_198] lea rsi, [rsp+378h+var_238] call _ZN7httplib6detail23MultipartFormDataParser12set_boundaryEONSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; httplib::detail::MultipartFormDataParser::set_boundary(std::string &&) jmp short $+2 loc_352B8: mov rax, [rsp+378h+var_308] mov rcx, [rsp+378h+var_2F8] lea rdx, [rsp+378h+var_198] mov [rsp+378h+var_258], rdx mov [rsp+378h+var_250], rcx mov [rsp+378h+var_248], rax lea rdi, [rsp+378h+var_1B8] lea rsi, [rsp+378h+var_258] call _ZNSt8functionIFbPKcmmmEEaSIZNK7httplib6Server17read_content_coreERNS5_6StreamERNS5_7RequestERNS5_8ResponseES_IFbS1_mEES_IFbRKNS5_17MultipartFormDataEEESE_EUlS1_mmmE_EENSt9enable_ifIXsrNS3_9_CallableIT_NSL_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISN_E4typeEE4typeES3_EE5valueESt5decayISN_EE4type4typeESt15__invoke_resultIRSY_JS1_mmmEEEE5valueERS3_E4typeEOSN_ jmp short $+2 loc_352FC: mov [rsp+378h+var_23C], 0 loc_35307: lea rdi, [rsp+378h+var_238]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+378h+var_1F0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov eax, [rsp+378h+var_23C] test eax, eax jnz loc_35690 jmp short $+2 loc_35332: jmp short loc_35394 loc_35334: mov rsi, [rsp+378h+var_300] lea rdi, [rsp+378h+var_278] call _ZNSt8functionIFbPKcmEEC2ERKS3_; std::function<bool ()(char const*,ulong)>::function(std::function<bool ()(char const*,ulong)> const&) jmp short $+2 loc_35348: lea rdi, [rsp+378h+var_1B8] lea rsi, [rsp+378h+var_278] call _ZNSt8functionIFbPKcmmmEEaSIZNK7httplib6Server17read_content_coreERNS5_6StreamERNS5_7RequestERNS5_8ResponseES_IFbS1_mEES_IFbRKNS5_17MultipartFormDataEEESE_EUlS1_mmmE0_EENSt9enable_ifIXsrNS3_9_CallableIT_NSL_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISN_E4typeEE4typeES3_EE5valueESt5decayISN_EE4type4typeESt15__invoke_resultIRSY_JS1_mmmEEEE5valueERS3_E4typeEOSN_ jmp short $+2 loc_3535F: lea rdi, [rsp+378h+var_278] call _ZZNK7httplib6Server17read_content_coreERNS_6StreamERNS_7RequestERNS_8ResponseESt8functionIFbPKcmEES7_IFbRKNS_17MultipartFormDataEEESB_ENUlS9_mmmE0_D2Ev; httplib::Server::read_content_core(httplib::Stream &,httplib::Request &,httplib::Response &,std::function<bool ()(char const*,ulong)>,std::function<bool ()(httplib::MultipartFormData const&)>,std::function<bool ()(char const*,ulong)>)::{lambda(char const*,ulong,ulong,ulong)#2}::~function() jmp short loc_35394 mov rcx, rax mov eax, edx mov [rsp+arg_1B0], rcx mov [rsp+arg_1AC], eax lea rdi, [rsp+arg_F8] call _ZZNK7httplib6Server17read_content_coreERNS_6StreamERNS_7RequestERNS_8ResponseESt8functionIFbPKcmEES7_IFbRKNS_17MultipartFormDataEEESB_ENUlS9_mmmE0_D2Ev; httplib::Server::read_content_core(httplib::Stream &,httplib::Request &,httplib::Response &,std::function<bool ()(char const*,ulong)>,std::function<bool ()(httplib::MultipartFormData const&)>,std::function<bool ()(char const*,ulong)>)::{lambda(char const*,ulong,ulong,ulong)#2}::~function() jmp loc_356BB loc_35394: mov rdi, [rsp+378h+var_20] lea rsi, aDelete; "DELETE" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov cl, al mov [rsp+378h+var_29A], 0 mov [rsp+378h+var_29B], 0 xor eax, eax test cl, 1 mov [rsp+378h+var_329], al jnz short loc_353C7 jmp short loc_35433 loc_353C7: mov rax, [rsp+378h+var_20] mov [rsp+378h+var_340], rax lea rdi, [rsp+378h+var_299] mov [rsp+378h+var_338], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+378h+var_338] mov [rsp+378h+var_29A], 1 lea rsi, aContentLength; "Content-Length" lea rdi, [rsp+378h+var_298] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_35409: mov rdi, [rsp+378h+var_340] mov [rsp+378h+var_29B], 1 lea rsi, [rsp+378h+var_298] call _ZNK7httplib7Request10has_headerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; httplib::Request::has_header(std::string const&) mov [rsp+378h+var_341], al jmp short $+2 loc_35429: mov al, [rsp+378h+var_341] xor al, 0FFh mov [rsp+378h+var_329], al loc_35433: mov al, [rsp+378h+var_329] mov [rsp+378h+var_342], al test [rsp+378h+var_29B], 1 jnz short loc_35447 jmp short loc_35454 loc_35447: lea rdi, [rsp+378h+var_298]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_35454: test [rsp+378h+var_29A], 1 jnz short loc_35460 jmp short loc_3546D loc_35460: lea rdi, [rsp+378h+var_299] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_3546D: mov al, [rsp+378h+var_342] test al, 1 jnz short loc_35477 jmp short loc_354F2 loc_35477: mov [rsp+378h+var_1], 1 mov [rsp+378h+var_23C], 1 jmp loc_35690 mov rcx, rax mov eax, edx mov [rsp+arg_1B0], rcx mov [rsp+arg_1AC], eax jmp short loc_354D4 mov rcx, rax mov eax, edx mov [rsp+arg_1B0], rcx mov [rsp+arg_1AC], eax test [rsp+arg_D5], 1 jnz short loc_354C5 jmp short loc_354D2 loc_354C5: lea rdi, [rsp+arg_D8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_354D2: jmp short $+2 loc_354D4: test [rsp+arg_D6], 1 jnz short loc_354E0 jmp short loc_354ED loc_354E0: lea rdi, [rsp+arg_D7] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_354ED: jmp loc_356BB loc_354F2: mov rax, [rsp+378h+var_2F0] mov rcx, [rsp+378h+var_18] mov [rsp+378h+var_368], rcx mov rcx, [rsp+378h+var_20] mov [rsp+378h+var_360], rcx mov rax, [rax+70h] mov [rsp+378h+var_358], rax mov rax, [rsp+378h+var_28] add rax, 20h ; ' ' mov [rsp+378h+var_350], rax xor eax, eax mov esi, eax lea rdi, [rsp+378h+var_2C0] call _ZNSt8functionIFbmmEEC2EDn; std::function<bool ()(ulong,ulong)>::function(decltype(nullptr)) lea rdi, [rsp+378h+var_2E0] lea rsi, [rsp+378h+var_1B8] call _ZNSt8functionIFbPKcmmmEEC2ERKS3_; std::function<bool ()(char const*,ulong,ulong,ulong)>::function(std::function<bool ()(char const*,ulong,ulong,ulong)> const&) jmp short $+2 loc_35556: mov rcx, [rsp+378h+var_350] mov rdx, [rsp+378h+var_358] mov rsi, [rsp+378h+var_360] mov rdi, [rsp+378h+var_368] mov rax, rsp mov dword ptr [rax], 1 lea r8, [rsp+378h+var_2C0] lea r9, [rsp+378h+var_2E0] call _ZN7httplib6detail12read_contentINS_7RequestEEEbRNS_6StreamERT_mRiSt8functionIFbmmEES8_IFbPKcmmmEEb; httplib::detail::read_content<httplib::Request>(httplib::Stream &,httplib::Request &,ulong,int &,std::function<bool ()(ulong,ulong)>,std::function<bool ()(char const*,ulong,ulong,ulong)>,bool) mov [rsp+378h+var_369], al jmp short $+2 loc_3558E: mov al, [rsp+378h+var_369] xor al, 0FFh mov [rsp+378h+var_36A], al lea rdi, [rsp+378h+var_2E0] call _ZNSt8functionIFbPKcmmmEED2Ev; std::function<bool ()(char const*,ulong,ulong,ulong)>::~function() lea rdi, [rsp+378h+var_2C0] call _ZNSt8functionIFbmmEED2Ev; std::function<bool ()(ulong,ulong)>::~function() mov al, [rsp+378h+var_36A] test al, 1 jnz short loc_355BC jmp short loc_3561D loc_355BC: mov [rsp+378h+var_1], 0 mov [rsp+378h+var_23C], 1 jmp loc_35690 mov rcx, rax mov eax, edx mov [rsp+arg_1B0], rcx mov [rsp+arg_1AC], eax jmp short loc_3560B mov rcx, rax mov eax, edx mov [rsp+arg_1B0], rcx mov [rsp+arg_1AC], eax lea rdi, [rsp+arg_90] call _ZNSt8functionIFbPKcmmmEED2Ev; std::function<bool ()(char const*,ulong,ulong,ulong)>::~function() loc_3560B: lea rdi, [rsp+arg_B0] call _ZNSt8functionIFbmmEED2Ev; std::function<bool ()(ulong,ulong)>::~function() jmp loc_356BB loc_3561D: mov rdi, [rsp+378h+var_20]; this call _ZNK7httplib7Request22is_multipart_form_dataEv; httplib::Request::is_multipart_form_data(void) mov [rsp+378h+var_36B], al jmp short $+2 loc_35630: mov al, [rsp+378h+var_36B] test al, 1 jnz short loc_3563A jmp short loc_3567D loc_3563A: lea rdi, [rsp+378h+var_198]; this call _ZNK7httplib6detail23MultipartFormDataParser8is_validEv; httplib::detail::MultipartFormDataParser::is_valid(void) mov [rsp+378h+var_36C], al jmp short $+2 loc_3564D: mov al, [rsp+378h+var_36C] test al, 1 jnz short loc_3567B jmp short $+2 loc_35657: mov rax, [rsp+378h+var_28] mov dword ptr [rax+20h], 190h mov [rsp+378h+var_1], 0 mov [rsp+378h+var_23C], 1 jmp short loc_35690 loc_3567B: jmp short $+2 loc_3567D: mov [rsp+378h+var_1], 1 mov [rsp+378h+var_23C], 1 loc_35690: lea rdi, [rsp+378h+var_1B8] call _ZNSt8functionIFbPKcmmmEED2Ev; std::function<bool ()(char const*,ulong,ulong,ulong)>::~function() lea rdi, [rsp+378h+var_198]; this call _ZN7httplib6detail23MultipartFormDataParserD2Ev; httplib::detail::MultipartFormDataParser::~MultipartFormDataParser() mov al, [rsp+378h+var_1] and al, 1 add rsp, 378h retn loc_356BB: lea rdi, [rsp+arg_1B8] call _ZNSt8functionIFbPKcmmmEED2Ev; std::function<bool ()(char const*,ulong,ulong,ulong)>::~function() lea rdi, [rsp+arg_1D8]; this call _ZN7httplib6detail23MultipartFormDataParserD2Ev; httplib::detail::MultipartFormDataParser::~MultipartFormDataParser() mov rdi, [rsp+arg_1B0] call __Unwind_Resume
char httplib::Server::read_content_core( long long a1, long long a2, httplib::Request *a3, long long a4, long long a5, long long a6, long long a7) { long long v7; // rdx int v8; // ecx int v9; // r8d int v10; // r9d int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d int v15; // edx int v16; // ecx int v17; // r8d int v18; // r9d long long v19; // rdx int v20; // edx int v21; // ecx int v22; // r8d int v23; // r9d int v25; // [rsp+0h] [rbp-378h] long long v26; // [rsp+8h] [rbp-370h] int v27; // [rsp+8h] [rbp-370h] char v28; // [rsp+Eh] [rbp-36Ah] int v29; // [rsp+10h] [rbp-368h] int v30; // [rsp+10h] [rbp-368h] int v31; // [rsp+18h] [rbp-360h] int v32; // [rsp+18h] [rbp-360h] long long v33; // [rsp+20h] [rbp-358h] int v34; // [rsp+28h] [rbp-350h] httplib::Request *v35; // [rsp+38h] [rbp-340h] char v36; // [rsp+4Fh] [rbp-329h] httplib::Request *v37; // [rsp+60h] [rbp-318h] int v39; // [rsp+78h] [rbp-300h] _BYTE v40[32]; // [rsp+98h] [rbp-2E0h] BYREF _BYTE v41[37]; // [rsp+B8h] [rbp-2C0h] BYREF char v42; // [rsp+DDh] [rbp-29Bh] char v43; // [rsp+DEh] [rbp-29Ah] char v44; // [rsp+DFh] [rbp-299h] BYREF _BYTE v45[32]; // [rsp+E0h] [rbp-298h] BYREF _BYTE v46[32]; // [rsp+100h] [rbp-278h] BYREF _QWORD v47[3]; // [rsp+120h] [rbp-258h] BYREF int v48; // [rsp+13Ch] [rbp-23Ch] _BYTE v49[39]; // [rsp+140h] [rbp-238h] BYREF char v50; // [rsp+167h] [rbp-211h] BYREF _BYTE v51[32]; // [rsp+168h] [rbp-210h] BYREF _BYTE v52[32]; // [rsp+188h] [rbp-1F0h] BYREF _BYTE *v53; // [rsp+1A8h] [rbp-1D0h] _BYTE v54[32]; // [rsp+1C0h] [rbp-1B8h] BYREF _BYTE v55[352]; // [rsp+1E0h] [rbp-198h] BYREF long long v56; // [rsp+340h] [rbp-38h] long long v57; // [rsp+348h] [rbp-30h] long long v58; // [rsp+350h] [rbp-28h] httplib::Request *v59; // [rsp+358h] [rbp-20h] long long v60; // [rsp+360h] [rbp-18h] long long v61; // [rsp+368h] [rbp-10h] char v62; // [rsp+377h] [rbp-1h] v39 = a5; v61 = a1; v60 = a2; v59 = a3; v58 = a4; v57 = a5; v56 = a6; httplib::detail::MultipartFormDataParser::MultipartFormDataParser((httplib::detail::MultipartFormDataParser *)v55); std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>::function((std::_Function_base *)v54); if ( (httplib::Request::is_multipart_form_data(v59) & 1) != 0 ) { v37 = v59; std::allocator<char>::allocator(&v50, a2, v7); std::string::basic_string<std::allocator<char>>((long long)v51, (long long)"Content-Type", (long long)&v50); httplib::Request::get_header_value((long long)v52, (long long)v37, (long long)v51, (long long)"", 0LL); std::string::~string(v51); std::allocator<char>::~allocator(&v50); v53 = v52; std::string::basic_string(v49); if ( (httplib::detail::parse_multipart_boundary((_DWORD)v53, (unsigned int)v49, v11, v12, v13, v14) & 1) != 0 ) { httplib::detail::MultipartFormDataParser::set_boundary( (unsigned int)v55, (unsigned int)v49, v15, v16, v17, v18, v25, v26, v29, v31); v47[0] = v55; v47[1] = a7; v47[2] = a6; std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>::operator=<httplib::Server::read_content_core(httplib::Stream &,httplib::Request &,httplib::Response &,std::function<bool ()(char const*,unsigned long)>,std::function<bool ()(httplib::MultipartFormData const&)>,std::function<bool ()(char const*,unsigned long)>)::{lambda(char const*,unsigned long,unsigned long,unsigned long)#1}>( v54, v47); v48 = 0; } else { *(_DWORD *)(v58 + 32) = 400; v62 = 0; v48 = 1; } std::string::~string(v49); std::string::~string(v52); if ( v48 ) goto LABEL_22; } else { std::function<bool ()(char const*,unsigned long)>::function((unsigned int)v46, v39, v7, v8, v9, v10); std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>::operator=<httplib::Server::read_content_core(httplib::Stream &,httplib::Request &,httplib::Response &,std::function<bool ()(char const*,unsigned long)>,std::function<bool ()(httplib::MultipartFormData const&)>,std::function<bool ()(char const*,unsigned long)>)::{lambda(char const*,unsigned long,unsigned long,unsigned long)#2}>( v54, v46); httplib::Server::read_content_core(httplib::Stream &,httplib::Request &,httplib::Response &,std::function<bool ()(char const*,unsigned long)>,std::function<bool ()(httplib::MultipartFormData const&)>,std::function<bool ()(char const*,unsigned long)>)const::{lambda(char const*,unsigned long,unsigned long,unsigned long)#2}::~function(v46); } v43 = 0; v42 = 0; v36 = 0; if ( std::operator==<char>((long long)v59, (long long)"DELETE") ) { v35 = v59; std::allocator<char>::allocator(&v44, "DELETE", v19); v43 = 1; std::string::basic_string<std::allocator<char>>((long long)v45, (long long)"Content-Length", (long long)&v44); v42 = 1; v36 = ~httplib::Request::has_header((long long)v35, (long long)v45); } if ( (v42 & 1) != 0 ) std::string::~string(v45); if ( (v43 & 1) != 0 ) std::allocator<char>::~allocator(&v44); if ( (v36 & 1) != 0 ) { v62 = 1; v48 = 1; } else { v30 = v60; v32 = (int)v59; v33 = *(_QWORD *)(a1 + 112); v34 = v58 + 32; std::function<bool ()(unsigned long,unsigned long)>::function(v41, 0LL); std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>::function( (unsigned int)v40, (unsigned int)v54, v20, v21, v22, v23, v25, v26); v28 = ~(unsigned __int8)httplib::detail::read_content<httplib::Request>( v30, v32, v33, v34, (unsigned int)v41, (unsigned int)v40, 1, v27, v30, v32, v33, v34); std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>::~function(v40); std::function<bool ()(unsigned long,unsigned long)>::~function(v41); if ( (v28 & 1) != 0 ) { v62 = 0; v48 = 1; } else if ( (httplib::Request::is_multipart_form_data(v59) & 1) == 0 || (httplib::detail::MultipartFormDataParser::is_valid((httplib::detail::MultipartFormDataParser *)v55) & 1) != 0 ) { v62 = 1; v48 = 1; } else { *(_DWORD *)(v58 + 32) = 400; v62 = 0; v48 = 1; } } LABEL_22: std::function<bool ()(char const*,unsigned long,unsigned long,unsigned long)>::~function(v54); httplib::detail::MultipartFormDataParser::~MultipartFormDataParser((httplib::detail::MultipartFormDataParser *)v55); return v62 & 1; }
read_content_core: SUB RSP,0x378 MOV qword ptr [RSP + 0x70],R9 MOV qword ptr [RSP + 0x78],R8 MOV RAX,qword ptr [RSP + 0x380] MOV qword ptr [RSP + 0x80],RAX MOV qword ptr [RSP + 0x368],RDI MOV qword ptr [RSP + 0x360],RSI MOV qword ptr [RSP + 0x358],RDX MOV qword ptr [RSP + 0x350],RCX MOV qword ptr [RSP + 0x348],R8 MOV qword ptr [RSP + 0x340],R9 MOV RAX,qword ptr [RSP + 0x368] MOV qword ptr [RSP + 0x88],RAX LEA RDI,[RSP + 0x1e0] CALL 0x00135780 LEA RDI,[RSP + 0x1c0] CALL 0x0011ad10 MOV RDI,qword ptr [RSP + 0x358] LAB_00135103: CALL 0x001358d0 MOV byte ptr [RSP + 0x97],AL JMP 0x00135111 LAB_00135111: MOV AL,byte ptr [RSP + 0x97] TEST AL,0x1 JNZ 0x00135121 JMP 0x00135334 LAB_00135121: MOV RAX,qword ptr [RSP + 0x358] MOV qword ptr [RSP + 0x60],RAX LEA RDI,[RSP + 0x167] MOV qword ptr [RSP + 0x68],RDI CALL 0x0010be20 MOV RDX,qword ptr [RSP + 0x68] LAB_00135145: LEA RSI,[0x1cdf33] LEA RDI,[RSP + 0x168] CALL 0x0010f160 JMP 0x0013515b LAB_0013515b: MOV RSI,qword ptr [RSP + 0x60] LEA RCX,[0x1d3ac0] XOR EAX,EAX MOV R8D,EAX LEA RDI,[RSP + 0x188] LEA RDX,[RSP + 0x168] CALL 0x00117b80 JMP 0x00135183 LAB_00135183: LEA RDI,[RSP + 0x168] CALL 0x0010bfb0 LEA RDI,[RSP + 0x167] CALL 0x0010b8e0 LEA RAX,[RSP + 0x188] MOV qword ptr [RSP + 0x1a8],RAX LEA RDI,[RSP + 0x140] MOV qword ptr [RSP + 0x50],RDI CALL 0x0010bb80 MOV RSI,qword ptr [RSP + 0x50] MOV RDI,qword ptr [RSP + 0x1a8] LAB_001351cc: CALL 0x001359f0 MOV byte ptr [RSP + 0x5f],AL JMP 0x001351d7 LAB_001351d7: MOV AL,byte ptr [RSP + 0x5f] TEST AL,0x1 JNZ 0x001352a1 JMP 0x001351e5 LAB_001351e5: MOV RAX,qword ptr [RSP + 0x350] MOV dword ptr [RAX + 0x20],0x190 MOV byte ptr [RSP + 0x377],0x0 MOV dword ptr [RSP + 0x13c],0x1 JMP 0x00135307 LAB_001352a1: LEA RDI,[RSP + 0x1e0] LEA RSI,[RSP + 0x140] CALL 0x00135b30 JMP 0x001352b8 LAB_001352b8: MOV RAX,qword ptr [RSP + 0x70] MOV RCX,qword ptr [RSP + 0x80] LEA RDX,[RSP + 0x1e0] MOV qword ptr [RSP + 0x120],RDX MOV qword ptr [RSP + 0x128],RCX MOV qword ptr [RSP + 0x130],RAX LEA RDI,[RSP + 0x1c0] LEA RSI,[RSP + 0x120] CALL 0x00135c70 JMP 0x001352fc LAB_001352fc: MOV dword ptr [RSP + 0x13c],0x0 LAB_00135307: LEA RDI,[RSP + 0x140] CALL 0x0010bfb0 LEA RDI,[RSP + 0x188] CALL 0x0010bfb0 MOV EAX,dword ptr [RSP + 0x13c] TEST EAX,EAX JNZ 0x00135690 JMP 0x00135332 LAB_00135332: JMP 0x00135394 LAB_00135334: MOV RSI,qword ptr [RSP + 0x78] LEA RDI,[RSP + 0x100] CALL 0x00135cc0 JMP 0x00135348 LAB_00135348: LEA RDI,[RSP + 0x1c0] LEA RSI,[RSP + 0x100] CALL 0x00135d70 JMP 0x0013535f LAB_0013535f: LEA RDI,[RSP + 0x100] CALL 0x00135dc0 JMP 0x00135394 LAB_00135394: MOV RDI,qword ptr [RSP + 0x358] LEA RSI,[0x1ce080] CALL 0x00117b50 MOV CL,AL MOV byte ptr [RSP + 0xde],0x0 MOV byte ptr [RSP + 0xdd],0x0 XOR EAX,EAX TEST CL,0x1 MOV byte ptr [RSP + 0x4f],AL JNZ 0x001353c7 JMP 0x00135433 LAB_001353c7: MOV RAX,qword ptr [RSP + 0x358] MOV qword ptr [RSP + 0x38],RAX LEA RDI,[RSP + 0xdf] MOV qword ptr [RSP + 0x40],RDI CALL 0x0010be20 MOV RDX,qword ptr [RSP + 0x40] MOV byte ptr [RSP + 0xde],0x1 LAB_001353f3: LEA RSI,[0x1cdf4b] LEA RDI,[RSP + 0xe0] CALL 0x0010f160 JMP 0x00135409 LAB_00135409: MOV RDI,qword ptr [RSP + 0x38] MOV byte ptr [RSP + 0xdd],0x1 LAB_00135416: LEA RSI,[RSP + 0xe0] CALL 0x00117cc0 MOV byte ptr [RSP + 0x37],AL JMP 0x00135429 LAB_00135429: MOV AL,byte ptr [RSP + 0x37] XOR AL,0xff MOV byte ptr [RSP + 0x4f],AL LAB_00135433: MOV AL,byte ptr [RSP + 0x4f] MOV byte ptr [RSP + 0x36],AL TEST byte ptr [RSP + 0xdd],0x1 JNZ 0x00135447 JMP 0x00135454 LAB_00135447: LEA RDI,[RSP + 0xe0] CALL 0x0010bfb0 LAB_00135454: TEST byte ptr [RSP + 0xde],0x1 JNZ 0x00135460 JMP 0x0013546d LAB_00135460: LEA RDI,[RSP + 0xdf] CALL 0x0010b8e0 LAB_0013546d: MOV AL,byte ptr [RSP + 0x36] TEST AL,0x1 JNZ 0x00135477 JMP 0x001354f2 LAB_00135477: MOV byte ptr [RSP + 0x377],0x1 MOV dword ptr [RSP + 0x13c],0x1 JMP 0x00135690 LAB_001354f2: MOV RAX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x360] MOV qword ptr [RSP + 0x10],RCX MOV RCX,qword ptr [RSP + 0x358] MOV qword ptr [RSP + 0x18],RCX MOV RAX,qword ptr [RAX + 0x70] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x350] ADD RAX,0x20 MOV qword ptr [RSP + 0x28],RAX XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0xb8] CALL 0x00135f30 LAB_0013553f: LEA RDI,[RSP + 0x98] LEA RSI,[RSP + 0x1c0] CALL 0x00135f70 JMP 0x00135556 LAB_00135556: MOV RCX,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RSP + 0x10] MOV RAX,RSP MOV dword ptr [RAX],0x1 LEA R8,[RSP + 0xb8] LEA R9,[RSP + 0x98] CALL 0x00135dd0 MOV byte ptr [RSP + 0xf],AL JMP 0x0013558e LAB_0013558e: MOV AL,byte ptr [RSP + 0xf] XOR AL,0xff MOV byte ptr [RSP + 0xe],AL LEA RDI,[RSP + 0x98] CALL 0x00136020 LEA RDI,[RSP + 0xb8] CALL 0x00136030 MOV AL,byte ptr [RSP + 0xe] TEST AL,0x1 JNZ 0x001355bc JMP 0x0013561d LAB_001355bc: MOV byte ptr [RSP + 0x377],0x0 MOV dword ptr [RSP + 0x13c],0x1 JMP 0x00135690 LAB_0013561d: MOV RDI,qword ptr [RSP + 0x358] LAB_00135625: CALL 0x001358d0 MOV byte ptr [RSP + 0xd],AL JMP 0x00135630 LAB_00135630: MOV AL,byte ptr [RSP + 0xd] TEST AL,0x1 JNZ 0x0013563a JMP 0x0013567d LAB_0013563a: LEA RDI,[RSP + 0x1e0] CALL 0x00136040 LAB_00135647: MOV byte ptr [RSP + 0xc],AL JMP 0x0013564d LAB_0013564d: MOV AL,byte ptr [RSP + 0xc] TEST AL,0x1 JNZ 0x0013567b JMP 0x00135657 LAB_00135657: MOV RAX,qword ptr [RSP + 0x350] MOV dword ptr [RAX + 0x20],0x190 MOV byte ptr [RSP + 0x377],0x0 MOV dword ptr [RSP + 0x13c],0x1 JMP 0x00135690 LAB_0013567b: JMP 0x0013567d LAB_0013567d: MOV byte ptr [RSP + 0x377],0x1 MOV dword ptr [RSP + 0x13c],0x1 LAB_00135690: LEA RDI,[RSP + 0x1c0] CALL 0x00136020 LEA RDI,[RSP + 0x1e0] CALL 0x00136060 MOV AL,byte ptr [RSP + 0x377] AND AL,0x1 ADD RSP,0x378 RET
/* httplib::Server::read_content_core(httplib::Stream&, httplib::Request&, httplib::Response&, std::function<bool (char const*, unsigned long)>, std::function<bool (httplib::MultipartFormData const&)>, std::function<bool (char const*, unsigned long)>) const */ ulong __thiscall httplib::Server::read_content_core (Server *this,int8 param_1,Request *param_2,long param_3,function *param_5, int8 param_6,int8 param_7) { int8 uVar1; Request *pRVar2; byte bVar3; bool bVar4; long lVar5; int8 uVar6; byte local_329; function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)> local_2e0 [32]; function<bool(unsigned_long,unsigned_long)> local_2c0 [37]; byte local_29b; byte local_29a; allocator local_299; string local_298 [32]; function<bool(char_const*,unsigned_long)> local_278 [32]; MultipartFormDataParser *local_258; int8 local_250; int8 local_248; uint local_23c; string local_238 [39]; allocator local_211; string local_210 [32]; string local_1f0 [32]; string *local_1d0; function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)> local_1b8 [32]; MultipartFormDataParser local_198 [352]; int8 local_38; function *local_30; long local_28; Request *local_20; int8 local_18; Server *local_10; int1 local_1; local_38 = param_6; local_30 = param_5; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_10 = this; detail::MultipartFormDataParser::MultipartFormDataParser(local_198); std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>::function(local_1b8); /* try { // try from 00135103 to 00135107 has its CatchHandler @ 0013520c */ bVar3 = Request::is_multipart_form_data(local_20); pRVar2 = local_20; if ((bVar3 & 1) == 0) { /* try { // try from 00135334 to 00135345 has its CatchHandler @ 0013520c */ std::function<bool(char_const*,unsigned_long)>::function(local_278,param_5); /* try { // try from 00135348 to 0013535c has its CatchHandler @ 0013536e */ std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>::operator= (local_1b8, (_lambda_char_const__unsigned_long_unsigned_long_unsigned_long__2_ *)local_278); const::{lambda(char_const*,unsigned_long,unsigned_long,unsigned_long)#2}::~function ((_lambda_char_const__unsigned_long_unsigned_long_unsigned_long__2_ *)local_278); } else { std::allocator<char>::allocator(); /* try { // try from 00135145 to 00135158 has its CatchHandler @ 00135225 */ std::__cxx11::string::string<std::allocator<char>>(local_210,"Content-Type",&local_211); /* try { // try from 0013515b to 00135180 has its CatchHandler @ 0013523b */ Request::get_header_value(local_1f0,(char *)pRVar2,(ulong)local_210); std::__cxx11::string::~string(local_210); std::allocator<char>::~allocator((allocator<char> *)&local_211); local_1d0 = local_1f0; std::__cxx11::string::string(local_238); /* try { // try from 001351cc to 001352f9 has its CatchHandler @ 0013526e */ bVar3 = detail::parse_multipart_boundary(local_1d0,local_238); bVar4 = (bVar3 & 1) != 0; if (bVar4) { detail::MultipartFormDataParser::set_boundary(local_198,local_238); local_258 = local_198; local_250 = param_7; local_248 = param_6; std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>::operator= (local_1b8, (_lambda_char_const__unsigned_long_unsigned_long_unsigned_long__1_ *)&local_258); } else { *(int4 *)(local_28 + 0x20) = 400; local_1 = 0; } local_23c = (uint)!bVar4; std::__cxx11::string::~string(local_238); std::__cxx11::string::~string(local_1f0); if (local_23c != 0) goto LAB_00135690; } bVar4 = std::operator==((string *)local_20,"DELETE"); pRVar2 = local_20; local_29a = 0; local_29b = 0; local_329 = 0; if (bVar4) { std::allocator<char>::allocator(); local_29a = 1; /* try { // try from 001353f3 to 00135406 has its CatchHandler @ 0013548f */ std::__cxx11::string::string<std::allocator<char>>(local_298,"Content-Length",&local_299); local_29b = 1; /* try { // try from 00135416 to 00135422 has its CatchHandler @ 001354a5 */ local_329 = Request::has_header(pRVar2,local_298); local_329 = local_329 ^ 0xff; } if ((local_29b & 1) != 0) { std::__cxx11::string::~string(local_298); } if ((local_29a & 1) != 0) { std::allocator<char>::~allocator((allocator<char> *)&local_299); } uVar6 = local_18; pRVar2 = local_20; if ((local_329 & 1) == 0) { uVar1 = *(int8 *)(this + 0x70); lVar5 = local_28 + 0x20; std::function<bool(unsigned_long,unsigned_long)>::function((_func_decltype_nullptr *)local_2c0); /* try { // try from 0013553f to 00135553 has its CatchHandler @ 001355d4 */ std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>::function (local_2e0,(function *)local_1b8); /* try { // try from 00135556 to 00135587 has its CatchHandler @ 001355ea */ bVar4 = detail::read_content<httplib::Request>(uVar6,pRVar2,uVar1,lVar5,local_2c0,local_2e0,1); std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>::~function(local_2e0) ; std::function<bool(unsigned_long,unsigned_long)>::~function(local_2c0); if (((bVar4 ^ 0xffU) & 1) == 0) { /* try { // try from 00135625 to 00135646 has its CatchHandler @ 0013520c */ bVar3 = Request::is_multipart_form_data(local_20); if (((bVar3 & 1) == 0) || (bVar3 = detail::MultipartFormDataParser::is_valid(local_198), (bVar3 & 1) != 0)) { local_1 = 1; local_23c = 1; } else { *(int4 *)(local_28 + 0x20) = 400; local_1 = 0; local_23c = 1; } } else { local_1 = 0; local_23c = 1; } } else { local_1 = 1; local_23c = 1; } LAB_00135690: std::function<bool(char_const*,unsigned_long,unsigned_long,unsigned_long)>::~function(local_1b8); uVar6 = detail::MultipartFormDataParser::~MultipartFormDataParser(local_198); return CONCAT71((int7)((ulong)uVar6 >> 8),local_1) & 0xffffffffffffff01; }
26,118
verify_call_proof
corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_call.c
bool verify_call_proof(verify_ctx_t* ctx) { bytes32_t body_root = {0}; bytes32_t state_root = {0}; ssz_ob_t state_proof = ssz_get(&ctx->proof, "state_proof"); ssz_ob_t accounts = ssz_get(&ctx->proof, "accounts"); ssz_ob_t header = ssz_get(&state_proof, "header"); ssz_ob_t sync_committee_bits = ssz_get(&state_proof, "sync_committee_bits"); ssz_ob_t sync_committee_signature = ssz_get(&state_proof, "sync_committee_signature"); bytes_t call_result = NULL_BYTES; call_code_t* call_codes = NULL; bool match = false; CHECK_JSON_VERIFY(ctx->args, "[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]", "Invalid transaction"); if (eth_get_call_codes(ctx, &call_codes, accounts) != C4_SUCCESS) return false; #ifdef EVMONE c4_status_t call_status = eth_run_call_evmone(ctx, call_codes, accounts, json_at(ctx->args, 0), &call_result); #else c4_status_t call_status = c4_state_add_error(&ctx->state, "no EVM is enabled, build with -DEVMONE=1"); #endif if (call_result.data && (ctx->data.def == NULL || ctx->data.def->type == SSZ_TYPE_NONE)) { ctx->data = (ssz_ob_t) {.bytes = call_result, .def = eth_ssz_verification_type(ETH_SSZ_DATA_BYTES)}; ctx->flags |= VERIFY_FLAG_FREE_DATA; match = true; } else { match = call_result.data && bytes_eq(call_result, ctx->data.bytes); safe_free(call_result.data); } eth_free_codes(call_codes); if (call_status != C4_SUCCESS) return false; if (!match) RETURN_VERIFY_ERROR(ctx, "Call result mismatch"); if (!verify_accounts(ctx, accounts, state_root)) RETURN_VERIFY_ERROR(ctx, "Failed to verify accounts"); if (!eth_verify_state_proof(ctx, state_proof, state_root)) false; if (c4_verify_blockroot_signature(ctx, &header, &sync_committee_bits, &sync_committee_signature, 0) != C4_SUCCESS) return false; ctx->success = true; return ctx->success; }
O0
c
verify_call_proof: pushq %rbp movq %rsp, %rbp subq $0x180, %rsp # imm = 0x180 movq %rdi, -0x10(%rbp) leaq -0x30(%rbp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0x231c0 leaq -0x50(%rbp), %rdi xorl %esi, %esi movl $0x20, %edx callq 0x231c0 movq -0x10(%rbp), %rsi addq $0x20, %rsi leaq -0x68(%rbp), %rdi leaq 0xb05a5(%rip), %rdx # 0xdcbe7 callq 0xa1c10 movq -0x10(%rbp), %rsi addq $0x20, %rsi leaq -0x80(%rbp), %rdi leaq 0xb0f5a(%rip), %rdx # 0xdd5b4 callq 0xa1c10 leaq -0x98(%rbp), %rdi leaq -0x68(%rbp), %rsi leaq 0xb0084(%rip), %rdx # 0xdc6f5 callq 0xa1c10 leaq -0xb0(%rbp), %rdi leaq -0x68(%rbp), %rsi leaq 0xb0584(%rip), %rdx # 0xdcc0c callq 0xa1c10 leaq -0xc8(%rbp), %rdi leaq -0x68(%rbp), %rsi leaq 0xb0581(%rip), %rdx # 0xdcc20 callq 0xa1c10 leaq -0xd8(%rbp), %rdi xorl %esi, %esi movl $0x10, %edx callq 0x231c0 movq $0x0, -0xe0(%rbp) movb $0x0, -0xe1(%rbp) movq -0x10(%rbp), %rax addq $0x8, %rax leaq 0xb0e46(%rip), %rdi # 0xdd51e leaq 0xb0e9b(%rip), %rsi # 0xdd57a movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa6220 movq %rax, -0xf0(%rbp) cmpq $0x0, -0xf0(%rbp) je 0x2c72e movq -0xf0(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x78(%rax) movq -0x10(%rbp), %rax movb $0x0, 0x68(%rax) movb $0x0, -0x1(%rbp) jmp 0x2ca1a jmp 0x2c730 movq -0x10(%rbp), %rdi leaq -0xe0(%rbp), %rsi leaq -0x80(%rbp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x33870 cmpl $0x0, %eax je 0x2c76b movb $0x0, -0x1(%rbp) jmp 0x2ca1a movq -0x10(%rbp), %rax movq %rax, -0x138(%rbp) movq -0xe0(%rbp), %rax movq %rax, -0x130(%rbp) movq -0x10(%rbp), %rax addq $0x8, %rax leaq -0x110(%rbp), %rdi xorl %ecx, %ecx movl %ecx, %esi movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0xa5b10 movq -0x138(%rbp), %rdi movq -0x130(%rbp), %rsi leaq -0x80(%rbp), %rcx leaq -0x110(%rbp), %rax leaq -0xd8(%rbp), %rdx movq (%rcx), %r8 movq %r8, (%rsp) movq 0x8(%rcx), %r8 movq %r8, 0x8(%rsp) movq 0x10(%rcx), %rcx movq %rcx, 0x10(%rsp) movq (%rax), %rcx movq %rcx, 0x18(%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x20(%rsp) movq 0x10(%rax), %rax movq %rax, 0x28(%rsp) callq 0x2cc80 movl %eax, -0xf4(%rbp) cmpq $0x0, -0xd0(%rbp) je 0x2c8b9 movq -0x10(%rbp), %rax cmpq $0x0, 0x48(%rax) je 0x2c83a movq -0x10(%rbp), %rax movq 0x48(%rax), %rax cmpl $0x8, 0x8(%rax) jne 0x2c8b9 movq -0x10(%rbp), %rax movq %rax, -0x140(%rbp) movq -0xd8(%rbp), %rax movq %rax, -0x128(%rbp) movq -0xd0(%rbp), %rax movq %rax, -0x120(%rbp) movl $0x12, %edi callq 0x27de0 movq %rax, %rcx movq -0x140(%rbp), %rax movq %rcx, -0x118(%rbp) movq -0x128(%rbp), %rcx movq %rcx, 0x38(%rax) movq -0x120(%rbp), %rcx movq %rcx, 0x40(%rax) movq -0x118(%rbp), %rcx movq %rcx, 0x48(%rax) movq -0x10(%rbp), %rax movl 0x84(%rax), %ecx orl $0x1, %ecx movl %ecx, 0x84(%rax) movb $0x1, -0xe1(%rbp) jmp 0x2c908 xorl %eax, %eax cmpq $0x0, -0xd0(%rbp) movb %al, -0x141(%rbp) je 0x2c8ee movq -0x10(%rbp), %rax movl -0xd8(%rbp), %edi movq -0xd0(%rbp), %rsi movl 0x38(%rax), %edx movq 0x40(%rax), %rcx callq 0x9f500 movb %al, -0x141(%rbp) movb -0x141(%rbp), %al andb $0x1, %al movb %al, -0xe1(%rbp) movq -0xd0(%rbp), %rdi callq 0x9dbf0 movq -0xe0(%rbp), %rdi callq 0x33f50 cmpl $0x0, -0xf4(%rbp) je 0x2c926 movb $0x0, -0x1(%rbp) jmp 0x2ca1a testb $0x1, -0xe1(%rbp) jne 0x2c956 jmp 0x2c931 movq -0x10(%rbp), %rdi addq $0x70, %rdi leaq 0xb0c4e(%rip), %rsi # 0xdd58e callq 0xa79c0 movq -0x10(%rbp), %rax movb $0x0, 0x68(%rax) movb $0x0, -0x1(%rbp) jmp 0x2ca1a movq -0x10(%rbp), %rdi leaq -0x50(%rbp), %rsi leaq -0x80(%rbp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x2ca30 testb $0x1, %al jne 0x2c9a8 jmp 0x2c986 movq -0x10(%rbp), %rdi addq $0x70, %rdi leaq 0xb0c0e(%rip), %rsi # 0xdd5a3 callq 0xa79c0 movq -0x10(%rbp), %rax movb $0x0, 0x68(%rax) movb $0x0, -0x1(%rbp) jmp 0x2ca1a movq -0x10(%rbp), %rdi leaq -0x50(%rbp), %rsi leaq -0x68(%rbp), %rax movq (%rax), %rcx movq %rcx, (%rsp) movq 0x8(%rax), %rcx movq %rcx, 0x8(%rsp) movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) callq 0x34010 testb $0x1, %al jne 0x2c9d8 jmp 0x2c9d8 movq -0x10(%rbp), %rdi leaq -0x98(%rbp), %rsi leaq -0xb0(%rbp), %rdx leaq -0xc8(%rbp), %rcx xorl %eax, %eax movl %eax, %r8d callq 0x2fec0 cmpl $0x0, %eax je 0x2ca06 movb $0x0, -0x1(%rbp) jmp 0x2ca1a movq -0x10(%rbp), %rax movb $0x1, 0x68(%rax) movq -0x10(%rbp), %rax movb 0x68(%rax), %al andb $0x1, %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x180, %rsp # imm = 0x180 popq %rbp retq nopl (%rax,%rax)
verify_call_proof: push rbp mov rbp, rsp sub rsp, 180h mov [rbp+var_10], rdi lea rdi, [rbp+var_30] xor esi, esi mov edx, 20h ; ' ' call _memset lea rdi, [rbp+var_50] xor esi, esi mov edx, 20h ; ' ' call _memset mov rsi, [rbp+var_10] add rsi, 20h ; ' ' lea rdi, [rbp+var_68] lea rdx, aStateProof; "state_proof" call ssz_get mov rsi, [rbp+var_10] add rsi, 20h ; ' ' lea rdi, [rbp+var_80] lea rdx, aFailedToVerify+11h; "accounts" call ssz_get lea rdi, [rbp+var_98] lea rsi, [rbp+var_68] lea rdx, aInvalidRespons+15h; "header" call ssz_get lea rdi, [rbp+var_B0] lea rsi, [rbp+var_68] lea rdx, aSyncCommitteeB; "sync_committee_bits" call ssz_get lea rdi, [rbp+var_C8] lea rsi, [rbp+var_68] lea rdx, aSyncCommitteeS; "sync_committee_signature" call ssz_get lea rdi, [rbp+var_D8] xor esi, esi mov edx, 10h call _memset mov [rbp+var_E0], 0 mov [rbp+var_E1], 0 mov rax, [rbp+var_10] add rax, 8 lea rdi, aToAddressDataB; "[{to:address,data:bytes,gas?:hexuint,va"... lea rsi, aInvalidTransac; "Invalid transaction" mov rcx, [rax] mov [rsp+180h+var_180], rcx mov rcx, [rax+8] mov [rsp+180h+var_178], rcx mov rax, [rax+10h] mov [rsp+180h+var_170], rax call json_validate mov [rbp+var_F0], rax cmp [rbp+var_F0], 0 jz short loc_2C72E mov rcx, [rbp+var_F0] mov rax, [rbp+var_10] mov [rax+78h], rcx mov rax, [rbp+var_10] mov byte ptr [rax+68h], 0 mov [rbp+var_1], 0 jmp loc_2CA1A loc_2C72E: jmp short $+2 loc_2C730: mov rdi, [rbp+var_10] lea rsi, [rbp+var_E0] lea rax, [rbp+var_80] mov rcx, [rax] mov [rsp+180h+var_180], rcx mov rcx, [rax+8] mov [rsp+180h+var_178], rcx mov rax, [rax+10h] mov [rsp+180h+var_170], rax call eth_get_call_codes cmp eax, 0 jz short loc_2C76B mov [rbp+var_1], 0 jmp loc_2CA1A loc_2C76B: mov rax, [rbp+var_10] mov [rbp+var_138], rax mov rax, [rbp+var_E0] mov [rbp+var_130], rax mov rax, [rbp+var_10] add rax, 8 lea rdi, [rbp+var_110] xor ecx, ecx mov esi, ecx mov rcx, [rax] mov [rsp+180h+var_180], rcx mov rcx, [rax+8] mov [rsp+180h+var_178], rcx mov rax, [rax+10h] mov [rsp+180h+var_170], rax call json_at mov rdi, [rbp+var_138] mov rsi, [rbp+var_130] lea rcx, [rbp+var_80] lea rax, [rbp+var_110] lea rdx, [rbp+var_D8] mov r8, [rcx] mov [rsp+180h+var_180], r8 mov r8, [rcx+8] mov [rsp+180h+var_178], r8 mov rcx, [rcx+10h] mov [rsp+180h+var_170], rcx mov rcx, [rax] mov [rsp+180h+var_168], rcx mov rcx, [rax+8] mov [rsp+180h+var_160], rcx mov rax, [rax+10h] mov [rsp+180h+var_158], rax call eth_run_call_evmone mov [rbp+var_F4], eax cmp [rbp+var_D0], 0 jz loc_2C8B9 mov rax, [rbp+var_10] cmp qword ptr [rax+48h], 0 jz short loc_2C83A mov rax, [rbp+var_10] mov rax, [rax+48h] cmp dword ptr [rax+8], 8 jnz short loc_2C8B9 loc_2C83A: mov rax, [rbp+var_10] mov [rbp+var_140], rax mov rax, [rbp+var_D8] mov [rbp+var_128], rax mov rax, [rbp+var_D0] mov [rbp+var_120], rax mov edi, 12h call eth_ssz_verification_type mov rcx, rax mov rax, [rbp+var_140] mov [rbp+var_118], rcx mov rcx, [rbp+var_128] mov [rax+38h], rcx mov rcx, [rbp+var_120] mov [rax+40h], rcx mov rcx, [rbp+var_118] mov [rax+48h], rcx mov rax, [rbp+var_10] mov ecx, [rax+84h] or ecx, 1 mov [rax+84h], ecx mov [rbp+var_E1], 1 jmp short loc_2C908 loc_2C8B9: xor eax, eax cmp [rbp+var_D0], 0 mov [rbp+var_141], al jz short loc_2C8EE mov rax, [rbp+var_10] mov edi, dword ptr [rbp+var_D8] mov rsi, [rbp+var_D0] mov edx, [rax+38h] mov rcx, [rax+40h] call bytes_eq mov [rbp+var_141], al loc_2C8EE: mov al, [rbp+var_141] and al, 1 mov [rbp+var_E1], al mov rdi, [rbp+var_D0] call safe_free loc_2C908: mov rdi, [rbp+var_E0] call eth_free_codes cmp [rbp+var_F4], 0 jz short loc_2C926 mov [rbp+var_1], 0 jmp loc_2CA1A loc_2C926: test [rbp+var_E1], 1 jnz short loc_2C956 jmp short $+2 loc_2C931: mov rdi, [rbp+var_10] add rdi, 70h ; 'p' lea rsi, aCallResultMism; "Call result mismatch" call c4_state_add_error mov rax, [rbp+var_10] mov byte ptr [rax+68h], 0 mov [rbp+var_1], 0 jmp loc_2CA1A loc_2C956: mov rdi, [rbp+var_10] lea rsi, [rbp+var_50] lea rax, [rbp+var_80] mov rcx, [rax] mov [rsp+180h+var_180], rcx mov rcx, [rax+8] mov [rsp+180h+var_178], rcx mov rax, [rax+10h] mov [rsp+180h+var_170], rax call verify_accounts test al, 1 jnz short loc_2C9A8 jmp short $+2 loc_2C986: mov rdi, [rbp+var_10] add rdi, 70h ; 'p' lea rsi, aFailedToVerify; "Failed to verify accounts" call c4_state_add_error mov rax, [rbp+var_10] mov byte ptr [rax+68h], 0 mov [rbp+var_1], 0 jmp short loc_2CA1A loc_2C9A8: mov rdi, [rbp+var_10] lea rsi, [rbp+var_50] lea rax, [rbp+var_68] mov rcx, [rax] mov [rsp+180h+var_180], rcx mov rcx, [rax+8] mov [rsp+180h+var_178], rcx mov rax, [rax+10h] mov [rsp+180h+var_170], rax call eth_verify_state_proof test al, 1 jnz short loc_2C9D8 jmp short $+2 loc_2C9D8: mov rdi, [rbp+var_10] lea rsi, [rbp+var_98] lea rdx, [rbp+var_B0] lea rcx, [rbp+var_C8] xor eax, eax mov r8d, eax call c4_verify_blockroot_signature cmp eax, 0 jz short loc_2CA06 mov [rbp+var_1], 0 jmp short loc_2CA1A loc_2CA06: mov rax, [rbp+var_10] mov byte ptr [rax+68h], 1 mov rax, [rbp+var_10] mov al, [rax+68h] and al, 1 mov [rbp+var_1], al loc_2CA1A: mov al, [rbp+var_1] and al, 1 add rsp, 180h pop rbp retn
char verify_call_proof(long long a1) { int v1; // edx int v2; // r8d int v3; // r9d int v4; // edx int v5; // r8d int v6; // r9d int v7; // edx int v8; // r8d int v9; // r9d int v10; // r9d int v11; // edx int v12; // r8d int v13; // r9d int v14; // edx int v15; // r8d int v16; // r9d char v18; // [rsp+3Fh] [rbp-141h] _QWORD *v19; // [rsp+40h] [rbp-140h] int v20; // [rsp+48h] [rbp-138h] int v21; // [rsp+50h] [rbp-130h] long long v22; // [rsp+58h] [rbp-128h] long long v23; // [rsp+60h] [rbp-120h] char **v24; // [rsp+68h] [rbp-118h] long long v25; // [rsp+70h] [rbp-110h] BYREF long long v26; // [rsp+78h] [rbp-108h] long long v27; // [rsp+80h] [rbp-100h] int v28; // [rsp+8Ch] [rbp-F4h] long long v29; // [rsp+90h] [rbp-F0h] char v30; // [rsp+9Fh] [rbp-E1h] long long v31; // [rsp+A0h] [rbp-E0h] BYREF long long v32; // [rsp+A8h] [rbp-D8h] BYREF long long v33; // [rsp+B0h] [rbp-D0h] _BYTE v34[24]; // [rsp+B8h] [rbp-C8h] BYREF _BYTE v35[24]; // [rsp+D0h] [rbp-B0h] BYREF _BYTE v36[24]; // [rsp+E8h] [rbp-98h] BYREF long long v37; // [rsp+100h] [rbp-80h] BYREF long long v38; // [rsp+108h] [rbp-78h] long long v39; // [rsp+110h] [rbp-70h] long long v40; // [rsp+118h] [rbp-68h] BYREF long long v41; // [rsp+120h] [rbp-60h] long long v42; // [rsp+128h] [rbp-58h] _BYTE v43[32]; // [rsp+130h] [rbp-50h] BYREF _BYTE v44[32]; // [rsp+150h] [rbp-30h] BYREF long long v45; // [rsp+170h] [rbp-10h] v45 = a1; memset(v44, 0LL, sizeof(v44)); memset(v43, 0LL, sizeof(v43)); ssz_get(&v40, v45 + 32, "state_proof"); ssz_get(&v37, v45 + 32, "accounts"); ssz_get(v36, &v40, "header"); ssz_get(v35, &v40, "sync_committee_bits"); ssz_get(v34, &v40, "sync_committee_signature"); memset(&v32, 0LL, 16LL); v31 = 0LL; v30 = 0; v29 = json_validate( (unsigned int)"[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]", (unsigned int)"Invalid transaction", v1, *(_QWORD *)(v45 + 16), v2, v3, *(_QWORD *)(v45 + 8), *(_QWORD *)(v45 + 16), *(_QWORD *)(v45 + 24)); if ( v29 ) { *(_QWORD *)(v45 + 120) = v29; *(_BYTE *)(v45 + 104) = 0; return 0; } else if ( (unsigned int)eth_get_call_codes(v45, (unsigned int)&v31, v4, v38, v5, v6, v37, v38, v39) ) { return 0; } else { v20 = v45; v21 = v31; json_at( (unsigned int)&v25, 0, v7, *(_QWORD *)(v45 + 16), v8, v9, *(_QWORD *)(v45 + 8), *(_QWORD *)(v45 + 16), *(_QWORD *)(v45 + 24)); v28 = eth_run_call_evmone(v20, v21, (unsigned int)&v32, v26, v38, v10, v37, v38, v39, v25, v26, v27); if ( v33 && (!*(_QWORD *)(v45 + 72) || *(_DWORD *)(*(_QWORD *)(v45 + 72) + 8LL) == 8) ) { v19 = (_QWORD *)v45; v22 = v32; v23 = v33; v24 = eth_ssz_verification_type(18); v19[7] = v22; v19[8] = v23; v19[9] = v24; *(_DWORD *)(v45 + 132) |= 1u; v30 = 1; } else { v18 = 0; if ( v33 ) v18 = bytes_eq((unsigned int)v32, v33, *(unsigned int *)(v45 + 56), *(_QWORD *)(v45 + 64)); v30 = v18 & 1; safe_free(v33); } eth_free_codes(v31); if ( v28 ) { return 0; } else if ( (v30 & 1) != 0 ) { if ( (verify_accounts(v45, (unsigned int)v43, v11, v38, v12, v13, v37, v38, v39) & 1) != 0 ) { eth_verify_state_proof(v45, (unsigned int)v43, v14, v41, v15, v16, v40, v41, v42); if ( (unsigned int)c4_verify_blockroot_signature(v45, v36, v35, v34, 0LL) ) { return 0; } else { *(_BYTE *)(v45 + 104) = 1; return *(_BYTE *)(v45 + 104) & 1; } } else { c4_state_add_error(v45 + 112, "Failed to verify accounts"); *(_BYTE *)(v45 + 104) = 0; return 0; } } else { c4_state_add_error(v45 + 112, "Call result mismatch"); *(_BYTE *)(v45 + 104) = 0; return 0; } } }
verify_call_proof: PUSH RBP MOV RBP,RSP SUB RSP,0x180 MOV qword ptr [RBP + -0x10],RDI LEA RDI,[RBP + -0x30] XOR ESI,ESI MOV EDX,0x20 CALL 0x001231c0 LEA RDI,[RBP + -0x50] XOR ESI,ESI MOV EDX,0x20 CALL 0x001231c0 MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x20 LEA RDI,[RBP + -0x68] LEA RDX,[0x1dcbe7] CALL 0x001a1c10 MOV RSI,qword ptr [RBP + -0x10] ADD RSI,0x20 LEA RDI,[RBP + -0x80] LEA RDX,[0x1dd5b4] CALL 0x001a1c10 LEA RDI,[RBP + -0x98] LEA RSI,[RBP + -0x68] LEA RDX,[0x1dc6f5] CALL 0x001a1c10 LEA RDI,[RBP + -0xb0] LEA RSI,[RBP + -0x68] LEA RDX,[0x1dcc0c] CALL 0x001a1c10 LEA RDI,[RBP + -0xc8] LEA RSI,[RBP + -0x68] LEA RDX,[0x1dcc20] CALL 0x001a1c10 LEA RDI,[RBP + -0xd8] XOR ESI,ESI MOV EDX,0x10 CALL 0x001231c0 MOV qword ptr [RBP + -0xe0],0x0 MOV byte ptr [RBP + -0xe1],0x0 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x8 LEA RDI,[0x1dd51e] LEA RSI,[0x1dd57a] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a6220 MOV qword ptr [RBP + -0xf0],RAX CMP qword ptr [RBP + -0xf0],0x0 JZ 0x0012c72e MOV RCX,qword ptr [RBP + -0xf0] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x78],RCX MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x68],0x0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012ca1a LAB_0012c72e: JMP 0x0012c730 LAB_0012c730: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0xe0] LEA RAX,[RBP + -0x80] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x00133870 CMP EAX,0x0 JZ 0x0012c76b MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012ca1a LAB_0012c76b: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x138],RAX MOV RAX,qword ptr [RBP + -0xe0] MOV qword ptr [RBP + -0x130],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x8 LEA RDI,[RBP + -0x110] XOR ECX,ECX MOV ESI,ECX MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x001a5b10 MOV RDI,qword ptr [RBP + -0x138] MOV RSI,qword ptr [RBP + -0x130] LEA RCX,[RBP + -0x80] LEA RAX,[RBP + -0x110] LEA RDX,[RBP + -0xd8] MOV R8,qword ptr [RCX] MOV qword ptr [RSP],R8 MOV R8,qword ptr [RCX + 0x8] MOV qword ptr [RSP + 0x8],R8 MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RSP + 0x10],RCX MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0x18],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x20],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x28],RAX CALL 0x0012cc80 MOV dword ptr [RBP + -0xf4],EAX CMP qword ptr [RBP + -0xd0],0x0 JZ 0x0012c8b9 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x48],0x0 JZ 0x0012c83a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] CMP dword ptr [RAX + 0x8],0x8 JNZ 0x0012c8b9 LAB_0012c83a: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x140],RAX MOV RAX,qword ptr [RBP + -0xd8] MOV qword ptr [RBP + -0x128],RAX MOV RAX,qword ptr [RBP + -0xd0] MOV qword ptr [RBP + -0x120],RAX MOV EDI,0x12 CALL 0x00127de0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x140] MOV qword ptr [RBP + -0x118],RCX MOV RCX,qword ptr [RBP + -0x128] MOV qword ptr [RAX + 0x38],RCX MOV RCX,qword ptr [RBP + -0x120] MOV qword ptr [RAX + 0x40],RCX MOV RCX,qword ptr [RBP + -0x118] MOV qword ptr [RAX + 0x48],RCX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x84] OR ECX,0x1 MOV dword ptr [RAX + 0x84],ECX MOV byte ptr [RBP + -0xe1],0x1 JMP 0x0012c908 LAB_0012c8b9: XOR EAX,EAX CMP qword ptr [RBP + -0xd0],0x0 MOV byte ptr [RBP + -0x141],AL JZ 0x0012c8ee MOV RAX,qword ptr [RBP + -0x10] MOV EDI,dword ptr [RBP + -0xd8] MOV RSI,qword ptr [RBP + -0xd0] MOV EDX,dword ptr [RAX + 0x38] MOV RCX,qword ptr [RAX + 0x40] CALL 0x0019f500 MOV byte ptr [RBP + -0x141],AL LAB_0012c8ee: MOV AL,byte ptr [RBP + -0x141] AND AL,0x1 MOV byte ptr [RBP + -0xe1],AL MOV RDI,qword ptr [RBP + -0xd0] CALL 0x0019dbf0 LAB_0012c908: MOV RDI,qword ptr [RBP + -0xe0] CALL 0x00133f50 CMP dword ptr [RBP + -0xf4],0x0 JZ 0x0012c926 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012ca1a LAB_0012c926: TEST byte ptr [RBP + -0xe1],0x1 JNZ 0x0012c956 JMP 0x0012c931 LAB_0012c931: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x70 LEA RSI,[0x1dd58e] CALL 0x001a79c0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x68],0x0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012ca1a LAB_0012c956: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x50] LEA RAX,[RBP + -0x80] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x0012ca30 TEST AL,0x1 JNZ 0x0012c9a8 JMP 0x0012c986 LAB_0012c986: MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x70 LEA RSI,[0x1dd5a3] CALL 0x001a79c0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x68],0x0 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012ca1a LAB_0012c9a8: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x50] LEA RAX,[RBP + -0x68] MOV RCX,qword ptr [RAX] MOV qword ptr [RSP],RCX MOV RCX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX CALL 0x00134010 TEST AL,0x1 JNZ 0x0012c9d8 JMP 0x0012c9d8 LAB_0012c9d8: MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[RBP + -0x98] LEA RDX,[RBP + -0xb0] LEA RCX,[RBP + -0xc8] XOR EAX,EAX MOV R8D,EAX CALL 0x0012fec0 CMP EAX,0x0 JZ 0x0012ca06 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012ca1a LAB_0012ca06: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x68],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV AL,byte ptr [RAX + 0x68] AND AL,0x1 MOV byte ptr [RBP + -0x1],AL LAB_0012ca1a: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x180 POP RBP RET
byte verify_call_proof(long param_1) { long lVar1; int iVar2; int8 uVar3; ulong uVar4; int8 in_R9; byte local_149; int1 local_118 [28]; int local_fc; long local_f8; byte local_e9; int8 local_e8; int4 local_e0; int4 uStack_dc; long local_d8; int1 local_d0 [24]; int1 local_b8 [24]; int1 local_a0 [24]; int1 local_88 [24]; int8 local_70; int8 local_68; int8 local_60; int1 local_58 [32]; int1 local_38 [32]; long local_18; byte local_9; local_18 = param_1; memset(local_38,0,0x20); memset(local_58,0,0x20); ssz_get(&local_70,local_18 + 0x20,"state_proof"); ssz_get(local_88,local_18 + 0x20,"accounts"); ssz_get(local_a0,&local_70,"header"); ssz_get(local_b8,&local_70,"sync_committee_bits"); ssz_get(local_d0,&local_70,"sync_committee_signature"); memset(&local_e0,0,0x10); local_e8 = 0; local_e9 = 0; local_f8 = json_validate("[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]" ,"Invalid transaction"); if (local_f8 == 0) { iVar2 = eth_get_call_codes(local_18,&local_e8); lVar1 = local_18; uVar3 = local_e8; if (iVar2 == 0) { json_at(local_118,0); local_fc = eth_run_call_evmone(lVar1,uVar3,&local_e0); lVar1 = local_18; if ((local_d8 == 0) || ((*(long *)(local_18 + 0x48) != 0 && (*(int *)(*(long *)(local_18 + 0x48) + 8) != 8)))) { local_149 = 0; if (local_d8 != 0) { local_149 = bytes_eq(local_e0,local_d8,*(int4 *)(local_18 + 0x38), *(int8 *)(local_18 + 0x40)); } local_e9 = local_149 & 1; safe_free(local_d8); } else { uVar3 = eth_ssz_verification_type(0x12); *(ulong *)(lVar1 + 0x38) = CONCAT44(uStack_dc,local_e0); *(long *)(lVar1 + 0x40) = local_d8; *(int8 *)(lVar1 + 0x48) = uVar3; *(uint *)(local_18 + 0x84) = *(uint *)(local_18 + 0x84) | 1; local_e9 = 1; } eth_free_codes(local_e8); if (local_fc == 0) { if ((local_e9 & 1) == 0) { c4_state_add_error(local_18 + 0x70,"Call result mismatch"); *(int1 *)(local_18 + 0x68) = 0; local_9 = 0; } else { uVar4 = verify_accounts(local_18,local_58); if ((uVar4 & 1) == 0) { c4_state_add_error(local_18 + 0x70,"Failed to verify accounts"); *(int1 *)(local_18 + 0x68) = 0; local_9 = 0; } else { eth_verify_state_proof(local_18,local_58); iVar2 = c4_verify_blockroot_signature (local_18,local_a0,local_b8,local_d0,0,in_R9,local_70,local_68, local_60); if (iVar2 == 0) { *(int1 *)(local_18 + 0x68) = 1; local_9 = *(byte *)(local_18 + 0x68) & 1; } else { local_9 = 0; } } } } else { local_9 = 0; } } else { local_9 = 0; } } else { *(long *)(local_18 + 0x78) = local_f8; *(int1 *)(local_18 + 0x68) = 0; local_9 = 0; } return local_9; }
26,119
verify_call_proof
corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_call.c
bool verify_call_proof(verify_ctx_t* ctx) { bytes32_t body_root = {0}; bytes32_t state_root = {0}; ssz_ob_t state_proof = ssz_get(&ctx->proof, "state_proof"); ssz_ob_t accounts = ssz_get(&ctx->proof, "accounts"); ssz_ob_t header = ssz_get(&state_proof, "header"); ssz_ob_t sync_committee_bits = ssz_get(&state_proof, "sync_committee_bits"); ssz_ob_t sync_committee_signature = ssz_get(&state_proof, "sync_committee_signature"); bytes_t call_result = NULL_BYTES; call_code_t* call_codes = NULL; bool match = false; CHECK_JSON_VERIFY(ctx->args, "[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]", "Invalid transaction"); if (eth_get_call_codes(ctx, &call_codes, accounts) != C4_SUCCESS) return false; #ifdef EVMONE c4_status_t call_status = eth_run_call_evmone(ctx, call_codes, accounts, json_at(ctx->args, 0), &call_result); #else c4_status_t call_status = c4_state_add_error(&ctx->state, "no EVM is enabled, build with -DEVMONE=1"); #endif if (call_result.data && (ctx->data.def == NULL || ctx->data.def->type == SSZ_TYPE_NONE)) { ctx->data = (ssz_ob_t) {.bytes = call_result, .def = eth_ssz_verification_type(ETH_SSZ_DATA_BYTES)}; ctx->flags |= VERIFY_FLAG_FREE_DATA; match = true; } else { match = call_result.data && bytes_eq(call_result, ctx->data.bytes); safe_free(call_result.data); } eth_free_codes(call_codes); if (call_status != C4_SUCCESS) return false; if (!match) RETURN_VERIFY_ERROR(ctx, "Call result mismatch"); if (!verify_accounts(ctx, accounts, state_root)) RETURN_VERIFY_ERROR(ctx, "Failed to verify accounts"); if (!eth_verify_state_proof(ctx, state_proof, state_root)) false; if (c4_verify_blockroot_signature(ctx, &header, &sync_committee_bits, &sync_committee_signature, 0) != C4_SUCCESS) return false; ctx->success = true; return ctx->success; }
O2
c
verify_call_proof: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1c8, %rsp # imm = 0x1C8 movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, 0x80(%rsp) movaps %xmm0, 0x70(%rsp) leaq 0x20(%rdi), %r15 leaq 0x4c610(%rip), %rdx # 0x74c13 leaq 0xf8(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0x4d119 leaq 0x4cfd7(%rip), %rdx # 0x755f4 leaq 0x48(%rsp), %rdi movq %r15, %rsi callq 0x4d119 leaq 0x4c03c(%rip), %rdx # 0x7466d leaq 0x180(%rsp), %rdi movq %r14, %rsi callq 0x4d119 leaq 0x4c5f0(%rip), %rdx # 0x74c38 leaq 0x168(%rsp), %rdi movq %r14, %rsi callq 0x4d119 leaq 0x4c5ed(%rip), %rdx # 0x74c4c leaq 0x150(%rsp), %rdi movq %r14, %rsi callq 0x4d119 xorps %xmm0, %xmm0 movaps %xmm0, 0x60(%rsp) andq $0x0, 0x40(%rsp) movq 0x18(%rbx), %rax movq %rax, 0x10(%rsp) movups 0x8(%rbx), %xmm0 movups %xmm0, (%rsp) leaq 0x4cec9(%rip), %rdi # 0x7555e leaq 0x4cf1e(%rip), %rsi # 0x755ba callq 0x4fa48 testq %rax, %rax je 0x286b7 movq %rax, 0x78(%rbx) xorl %eax, %eax xorl %r14d, %r14d movb %al, 0x68(%rbx) jmp 0x287cd movq 0x58(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x48(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x40(%rsp), %rsi movq %rbx, %rdi callq 0x2c72e testl %eax, %eax jne 0x287ca leaq 0x8(%rbx), %rax movq 0x40(%rsp), %r15 movq 0x10(%rax), %rcx movq %rcx, 0x10(%rsp) movups (%rax), %xmm0 movups %xmm0, (%rsp) xorl %r14d, %r14d leaq 0x198(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x4f646 movq 0x10(%r12), %rax movq %rax, 0x28(%rsp) movups (%r12), %xmm0 movups %xmm0, 0x18(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x48(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x60(%rsp), %r12 movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x28a38 movl %eax, %ebp movq 0x8(%r12), %rsi testq %rsi, %rsi je 0x28797 movq 0x48(%rbx), %rax testq %rax, %rax je 0x28762 cmpl $0x8, 0x8(%rax) jne 0x2879c leaq 0x38(%rbx), %r14 movaps 0x60(%rsp), %xmm0 movaps %xmm0, 0xe0(%rsp) pushq $0x12 popq %rdi callq 0x258a4 movaps 0xe0(%rsp), %xmm0 movups %xmm0, (%r14) movq %rax, 0x48(%rbx) orb $0x1, 0x84(%rbx) movb $0x1, %r15b jmp 0x287bc xorl %r15d, %r15d jmp 0x287b4 movl 0x60(%rsp), %edi movl 0x38(%rbx), %edx movq 0x40(%rbx), %rcx callq 0x4bb90 movl %eax, %r15d movq 0x68(%rsp), %r14 movq %r14, %rdi callq 0x4aff8 movq 0x40(%rsp), %rdi callq 0x2cb94 testl %ebp, %ebp je 0x287e2 xorl %r14d, %r14d movl %r14d, %eax addq $0x1c8, %rsp # imm = 0x1C8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq testb %r15b, %r15b je 0x28974 movq 0x58(%rsp), %rax movq %rax, 0xa0(%rsp) movups 0x48(%rsp), %xmm0 movaps %xmm0, 0x90(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x10(%rsp) movups 0x48(%rsp), %xmm0 movups %xmm0, (%rsp) callq 0x4c626 movl %eax, 0x3c(%rsp) xorps %xmm0, %xmm0 leaq 0xc0(%rsp), %rax movaps %xmm0, 0x10(%rax) movaps %xmm0, (%rax) leaq 0x130(%rsp), %rax movaps %xmm0, 0x10(%rax) movaps %xmm0, (%rax) xorl %r12d, %r12d leaq 0x1b0(%rsp), %r13 pushq $0x20 popq %r15 leaq 0x70(%rsp), %r14 cmpl %r12d, 0x3c(%rsp) je 0x289d7 movq 0xa0(%rsp), %rax movq %rax, 0x10(%rsp) movaps 0x90(%rsp), %xmm0 movups %xmm0, (%rsp) movq %r13, %rdi movl %r12d, %esi callq 0x4c4b1 movq %rbx, %rdi movq %r13, %rsi leaq 0xc0(%rsp), %rdx pushq $0x4 popq %rcx movl %r15d, %r8d leaq 0x130(%rsp), %r9 callq 0x2c12c testb %al, %al je 0x28981 leaq 0xa8(%rsp), %rdi movq %r13, %rsi leaq 0x4c40c(%rip), %rdx # 0x74ccc callq 0x4d119 movq 0xb8(%rsp), %rax cmpl $0x4, 0x8(%rax) jne 0x28922 movl %r12d, %ebp xorps %xmm0, %xmm0 movaps %xmm0, 0x120(%rsp) movaps %xmm0, 0x110(%rsp) movl 0xa8(%rsp), %edi movq 0xb0(%rsp), %rsi leaq 0x110(%rsp), %r12 movq %r12, %rdx callq 0x4ebe8 leaq 0x130(%rsp), %rdi movq %r12, %rsi pushq $0x20 popq %rdx callq 0x22380 testl %eax, %eax jne 0x2898e movl %ebp, %r12d movl %r15d, %edi movq %r14, %rbp movq %r14, %rsi xorl %edx, %edx callq 0x4b20e testb %al, %al je 0x28955 movaps 0xc0(%rsp), %xmm0 movaps 0xd0(%rsp), %xmm1 movaps %xmm1, 0x80(%rsp) movaps %xmm0, 0x70(%rsp) jmp 0x2896c movq %rbp, %rdi leaq 0xc0(%rsp), %rsi pushq $0x20 popq %rdx callq 0x22380 testl %eax, %eax jne 0x289a7 incl %r12d jmp 0x28856 leaq 0x70(%rbx), %rdi leaq 0x4cc4f(%rip), %rsi # 0x755ce jmp 0x289cd leaq 0x70(%rbx), %rdi leaq 0x4cc71(%rip), %rsi # 0x755fd jmp 0x289b2 leaq 0x70(%rbx), %rdi leaq 0x4cc83(%rip), %rsi # 0x7561c callq 0x50675 movb $0x0, 0x68(%rbx) movl %ebp, %r12d jmp 0x289bb leaq 0x70(%rbx), %rdi leaq 0x4cc7d(%rip), %rsi # 0x7562f callq 0x50675 movb $0x0, 0x68(%rbx) cmpl 0x3c(%rsp), %r12d jae 0x289d7 leaq 0x70(%rbx), %rdi leaq 0x4cc16(%rip), %rsi # 0x755e3 callq 0x50675 jmp 0x286aa movq 0x108(%rsp), %rax movq %rax, 0x10(%rsp) movups 0xf8(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x70(%rsp), %rsi movq %rbx, %rdi callq 0x2cbff xorl %r14d, %r14d leaq 0x180(%rsp), %rsi leaq 0x168(%rsp), %rdx leaq 0x150(%rsp), %rcx movq %rbx, %rdi xorl %r8d, %r8d callq 0x2a2e4 testl %eax, %eax jne 0x287cd movb $0x1, %al movb $0x1, %r14b jmp 0x286af nopl (%rax)
verify_call_proof: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1C8h mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+1F8h+var_178], xmm0 movaps [rsp+1F8h+var_188], xmm0 lea r15, [rdi+20h] lea rdx, aStateProof; "state_proof" lea r14, [rsp+1F8h+var_100] mov rdi, r14 mov rsi, r15 call ssz_get lea rdx, aFailedToVerify_0+11h; "accounts" lea rdi, [rsp+1F8h+var_1B0] mov rsi, r15 call ssz_get lea rdx, aInvalidRespons+15h; "header" lea rdi, [rsp+1F8h+var_78] mov rsi, r14 call ssz_get lea rdx, aSyncCommitteeB; "sync_committee_bits" lea rdi, [rsp+1F8h+var_90] mov rsi, r14 call ssz_get lea rdx, aSyncCommitteeS; "sync_committee_signature" lea rdi, [rsp+1F8h+var_A8] mov rsi, r14 call ssz_get xorps xmm0, xmm0 movaps [rsp+1F8h+var_198], xmm0 and [rsp+1F8h+var_1B8], 0 mov rax, [rbx+18h] mov [rsp+1F8h+var_1E8], rax movups xmm0, xmmword ptr [rbx+8] movups [rsp+1F8h+var_1F8], xmm0 lea rdi, aToAddressDataB; "[{to:address,data:bytes,gas?:hexuint,va"... lea rsi, aInvalidTransac; "Invalid transaction" call json_validate test rax, rax jz short loc_286B7 mov [rbx+78h], rax loc_286AA: xor eax, eax xor r14d, r14d loc_286AF: mov [rbx+68h], al jmp loc_287CD loc_286B7: mov rax, [rsp+1F8h+var_1A0] mov [rsp+1F8h+var_1E8], rax movups xmm0, [rsp+1F8h+var_1B0] movups [rsp+1F8h+var_1F8], xmm0 lea rsi, [rsp+1F8h+var_1B8] mov rdi, rbx call eth_get_call_codes test eax, eax jnz loc_287CA lea rax, [rbx+8] mov r15, [rsp+1F8h+var_1B8] mov rcx, [rax+10h] mov [rsp+1F8h+var_1E8], rcx movups xmm0, xmmword ptr [rax] movups [rsp+1F8h+var_1F8], xmm0 xor r14d, r14d lea r12, [rsp+1F8h+var_60] mov rdi, r12 xor esi, esi call json_at mov rax, [r12+10h] mov [rsp+1F8h+var_1D0], rax movups xmm0, xmmword ptr [r12] movups [rsp+1F8h+var_1E0], xmm0 mov rax, [rsp+1F8h+var_1A0] mov [rsp+1F8h+var_1E8], rax movups xmm0, [rsp+1F8h+var_1B0] movups [rsp+1F8h+var_1F8], xmm0 lea r12, [rsp+1F8h+var_198] mov rdi, rbx mov rsi, r15 mov rdx, r12 call eth_run_call_evmone mov ebp, eax mov rsi, [r12+8] test rsi, rsi jz short loc_28797 mov rax, [rbx+48h] test rax, rax jz short loc_28762 cmp dword ptr [rax+8], 8 jnz short loc_2879C loc_28762: lea r14, [rbx+38h] movaps xmm0, [rsp+1F8h+var_198] movaps [rsp+1F8h+var_118], xmm0 push 12h pop rdi call eth_ssz_verification_type movaps xmm0, [rsp+1F8h+var_118] movups xmmword ptr [r14], xmm0 mov [rbx+48h], rax or byte ptr [rbx+84h], 1 mov r15b, 1 jmp short loc_287BC loc_28797: xor r15d, r15d jmp short loc_287B4 loc_2879C: mov edi, dword ptr [rsp+1F8h+var_198] mov edx, [rbx+38h] mov rcx, [rbx+40h] call bytes_eq mov r15d, eax mov r14, qword ptr [rsp+1F8h+var_198+8] loc_287B4: mov rdi, r14 call safe_free loc_287BC: mov rdi, [rsp+1F8h+var_1B8] call eth_free_codes test ebp, ebp jz short loc_287E2 loc_287CA: xor r14d, r14d loc_287CD: mov eax, r14d add rsp, 1C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_287E2: test r15b, r15b jz loc_28974 mov rax, [rsp+1F8h+var_1A0] mov [rsp+1F8h+var_158], rax movups xmm0, [rsp+1F8h+var_1B0] movaps [rsp+1F8h+var_168], xmm0 mov rax, [rsp+1F8h+var_1A0] mov [rsp+1F8h+var_1E8], rax movups xmm0, [rsp+1F8h+var_1B0] movups [rsp+1F8h+var_1F8], xmm0 call ssz_len mov [rsp+1F8h+var_1BC], eax xorps xmm0, xmm0 lea rax, [rsp+1F8h+var_138] movaps xmmword ptr [rax+10h], xmm0 movaps xmmword ptr [rax], xmm0 lea rax, [rsp+1F8h+var_C8] movaps xmmword ptr [rax+10h], xmm0 movaps xmmword ptr [rax], xmm0 xor r12d, r12d lea r13, [rsp+1F8h+var_48] push 20h ; ' ' pop r15 lea r14, [rsp+1F8h+var_188] loc_28856: cmp [rsp+1F8h+var_1BC], r12d jz loc_289D7 mov rax, [rsp+1F8h+var_158] mov [rsp+1F8h+var_1E8], rax movaps xmm0, [rsp+1F8h+var_168] movups [rsp+1F8h+var_1F8], xmm0 mov rdi, r13 mov esi, r12d call ssz_at mov rdi, rbx mov rsi, r13 lea rdx, [rsp+1F8h+var_138] push 4 pop rcx mov r8d, r15d lea r9, [rsp+1F8h+var_C8] call eth_verify_account_proof_exec test al, al jz loc_28981 lea rdi, [rsp+1F8h+var_150] mov rsi, r13 lea rdx, aCode; "code" call ssz_get mov rax, [rsp+1F8h+var_140] cmp dword ptr [rax+8], 4 jnz short loc_28922 mov ebp, r12d xorps xmm0, xmm0 movaps [rsp+1F8h+var_D8], xmm0 movaps [rsp+1F8h+var_E8], xmm0 mov edi, [rsp+1F8h+var_150] mov rsi, [rsp+1F8h+var_148] lea r12, [rsp+1F8h+var_E8] mov rdx, r12 call keccak lea rdi, [rsp+1F8h+var_C8] mov rsi, r12 push 20h ; ' ' pop rdx call _bcmp test eax, eax jnz short loc_2898E mov r12d, ebp loc_28922: mov edi, r15d mov rbp, r14 mov rsi, r14 xor edx, edx call bytes_all_equal test al, al jz short loc_28955 movaps xmm0, [rsp+1F8h+var_138] movaps xmm1, [rsp+1F8h+var_128] movaps [rsp+1F8h+var_178], xmm1 movaps [rsp+1F8h+var_188], xmm0 jmp short loc_2896C loc_28955: mov rdi, rbp lea rsi, [rsp+1F8h+var_138] push 20h ; ' ' pop rdx call _bcmp test eax, eax jnz short loc_289A7 loc_2896C: inc r12d jmp loc_28856 loc_28974: lea rdi, [rbx+70h] lea rsi, aCallResultMism; "Call result mismatch" jmp short loc_289CD loc_28981: lea rdi, [rbx+70h] lea rsi, aFailedToVerify; "Failed to verify account proof" jmp short loc_289B2 loc_2898E: lea rdi, [rbx+70h] lea rsi, aCodeHashMismat; "Code hash mismatch" call c4_state_add_error mov byte ptr [rbx+68h], 0 mov r12d, ebp jmp short loc_289BB loc_289A7: lea rdi, [rbx+70h] lea rsi, aStateRootMisma; "State root mismatch" loc_289B2: call c4_state_add_error mov byte ptr [rbx+68h], 0 loc_289BB: cmp r12d, [rsp+1F8h+var_1BC] jnb short loc_289D7 lea rdi, [rbx+70h] lea rsi, aFailedToVerify_0; "Failed to verify accounts" loc_289CD: call c4_state_add_error jmp loc_286AA loc_289D7: mov rax, [rsp+1F8h+var_F0] mov [rsp+1F8h+var_1E8], rax movups xmm0, [rsp+1F8h+var_100] movups [rsp+1F8h+var_1F8], xmm0 lea rsi, [rsp+1F8h+var_188] mov rdi, rbx call eth_verify_state_proof xor r14d, r14d lea rsi, [rsp+1F8h+var_78] lea rdx, [rsp+1F8h+var_90] lea rcx, [rsp+1F8h+var_A8] mov rdi, rbx xor r8d, r8d call c4_verify_blockroot_signature test eax, eax jnz loc_287CD mov al, 1 mov r14b, 1 jmp loc_286AF
long long verify_call_proof(long long a1) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d long long v6; // rax int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d char v11; // al unsigned int v12; // r14d int v13; // edx int v14; // r8d int v15; // r9d int v16; // r15d long long v17; // r14 int v18; // ecx int v19; // r8d int v20; // r9d int v21; // ebp int v22; // esi long long v23; // rax char **v24; // rax char v25; // r15 int v26; // edi int v27; // edx int v28; // ecx int v29; // r8d int v30; // r9d int v32; // edx int v33; // ecx int v34; // r8d int v35; // r9d unsigned int i; // r12d long long v37; // rdi const char *v38; // rsi long long v39; // rdi const char *v40; // rsi unsigned int v41; // [rsp+3Ch] [rbp-1BCh] long long v42; // [rsp+40h] [rbp-1B8h] BYREF __int128 v43; // [rsp+48h] [rbp-1B0h] BYREF long long v44; // [rsp+58h] [rbp-1A0h] __int128 v45; // [rsp+60h] [rbp-198h] BYREF __int128 v46; // [rsp+70h] [rbp-188h] BYREF __int128 v47; // [rsp+80h] [rbp-178h] __int128 v48; // [rsp+90h] [rbp-168h] long long v49; // [rsp+A0h] [rbp-158h] unsigned int v50; // [rsp+A8h] [rbp-150h] BYREF long long v51; // [rsp+B0h] [rbp-148h] long long v52; // [rsp+B8h] [rbp-140h] __int128 v53; // [rsp+C0h] [rbp-138h] BYREF __int128 v54; // [rsp+D0h] [rbp-128h] __int128 v55; // [rsp+E0h] [rbp-118h] __int128 v56; // [rsp+F8h] [rbp-100h] BYREF long long v57; // [rsp+108h] [rbp-F0h] _OWORD v58[2]; // [rsp+110h] [rbp-E8h] BYREF _BYTE v59[32]; // [rsp+130h] [rbp-C8h] BYREF _BYTE v60[24]; // [rsp+150h] [rbp-A8h] BYREF _BYTE v61[24]; // [rsp+168h] [rbp-90h] BYREF _BYTE v62[24]; // [rsp+180h] [rbp-78h] BYREF __int128 v63; // [rsp+198h] [rbp-60h] BYREF long long v64; // [rsp+1A8h] [rbp-50h] _BYTE v65[72]; // [rsp+1B0h] [rbp-48h] BYREF v47 = 0LL; v46 = 0LL; ssz_get(&v56, a1 + 32, "state_proof"); ssz_get(&v43, a1 + 32, "accounts"); ssz_get(v62, &v56, "header"); ssz_get(v61, &v56, "sync_committee_bits"); ssz_get(v60, &v56, "sync_committee_signature"); v45 = 0LL; v42 = 0LL; v6 = json_validate( (unsigned int)"[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]", (unsigned int)"Invalid transaction", v2, v3, v4, v5, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)); if ( v6 ) { *(_QWORD *)(a1 + 120) = v6; LABEL_3: v11 = 0; v12 = 0; LABEL_4: *(_BYTE *)(a1 + 104) = v11; return v12; } if ( (unsigned int)eth_get_call_codes(a1, (unsigned int)&v42, v7, v8, v9, v10, v43, v44) ) return 0; v16 = v42; v17 = 0LL; json_at( (unsigned int)&v63, 0, v13, *(_QWORD *)(a1 + 24), v14, v15, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)); v21 = eth_run_call_evmone(a1, v16, (unsigned int)&v45, v18, v19, v20, v43, DWORD2(v43), v44, v63, v64); v22 = DWORD2(v45); if ( *((_QWORD *)&v45 + 1) ) { v23 = *(_QWORD *)(a1 + 72); if ( !v23 || *(_DWORD *)(v23 + 8) == 8 ) { v55 = v45; v24 = eth_ssz_verification_type(18); *(_OWORD *)(a1 + 56) = v55; *(_QWORD *)(a1 + 72) = v24; *(_BYTE *)(a1 + 132) |= 1u; v25 = 1; goto LABEL_13; } v25 = bytes_eq((unsigned int)v45, *((_QWORD *)&v45 + 1), *(unsigned int *)(a1 + 56), *(_QWORD *)(a1 + 64)); v17 = *((_QWORD *)&v45 + 1); } else { v25 = 0; } safe_free(v17); LABEL_13: v26 = v42; eth_free_codes(v42); if ( v21 ) return 0; if ( !v25 ) { v37 = a1 + 112; v38 = "Call result mismatch"; LABEL_33: c4_state_add_error(v37, v38); goto LABEL_3; } v49 = v44; v48 = v43; v41 = ssz_len(v26, v22, v27, v28, v29, v30, v43, DWORD2(v43), v44); v54 = 0LL; v53 = 0LL; memset(v59, 0, sizeof(v59)); for ( i = 0; v41 != i; ++i ) { ssz_at((unsigned int)v65, i, v32, v33, v34, v35, v48, *((long long *)&v48 + 1), v49); if ( !(unsigned __int8)eth_verify_account_proof_exec(a1, v65, &v53, 4LL, 32LL, v59) ) { v39 = a1 + 112; v40 = "Failed to verify account proof"; LABEL_30: c4_state_add_error(v39, v40); *(_BYTE *)(a1 + 104) = 0; LABEL_31: if ( i < v41 ) { v37 = a1 + 112; v38 = "Failed to verify accounts"; goto LABEL_33; } break; } ssz_get(&v50, v65, "code"); if ( *(_DWORD *)(v52 + 8) == 4 ) { memset(v58, 0, sizeof(v58)); keccak(v50, v51, v58); if ( (unsigned int)bcmp(v59, v58, 32LL) ) { c4_state_add_error(a1 + 112, "Code hash mismatch"); *(_BYTE *)(a1 + 104) = 0; goto LABEL_31; } } if ( (unsigned __int8)bytes_all_equal(32LL, &v46, 0LL) ) { v47 = v54; v46 = v53; } else if ( (unsigned int)bcmp(&v46, &v53, 32LL) ) { v39 = a1 + 112; v40 = "State root mismatch"; goto LABEL_30; } } eth_verify_state_proof(a1, (unsigned int)&v46, v32, v33, v34, v35, v56, v57); v12 = 0; if ( !(unsigned int)c4_verify_blockroot_signature(a1, v62, v61, v60, 0LL) ) { v11 = 1; LOBYTE(v12) = 1; goto LABEL_4; } return v12; }
verify_call_proof: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1c8 MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x80],XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 LEA R15,[RDI + 0x20] LEA RDX,[0x174c13] LEA R14,[RSP + 0xf8] MOV RDI,R14 MOV RSI,R15 CALL 0x0014d119 LEA RDX,[0x1755f4] LEA RDI,[RSP + 0x48] MOV RSI,R15 CALL 0x0014d119 LEA RDX,[0x17466d] LEA RDI,[RSP + 0x180] MOV RSI,R14 CALL 0x0014d119 LEA RDX,[0x174c38] LEA RDI,[RSP + 0x168] MOV RSI,R14 CALL 0x0014d119 LEA RDX,[0x174c4c] LEA RDI,[RSP + 0x150] MOV RSI,R14 CALL 0x0014d119 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 AND qword ptr [RSP + 0x40],0x0 MOV RAX,qword ptr [RBX + 0x18] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RBX + 0x8] MOVUPS xmmword ptr [RSP],XMM0 LEA RDI,[0x17555e] LEA RSI,[0x1755ba] CALL 0x0014fa48 TEST RAX,RAX JZ 0x001286b7 MOV qword ptr [RBX + 0x78],RAX LAB_001286aa: XOR EAX,EAX XOR R14D,R14D LAB_001286af: MOV byte ptr [RBX + 0x68],AL JMP 0x001287cd LAB_001286b7: MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[RSP + 0x40] MOV RDI,RBX CALL 0x0012c72e TEST EAX,EAX JNZ 0x001287ca LEA RAX,[RBX + 0x8] MOV R15,qword ptr [RSP + 0x40] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RCX MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RSP],XMM0 XOR R14D,R14D LEA R12,[RSP + 0x198] MOV RDI,R12 XOR ESI,ESI CALL 0x0014f646 MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x28],RAX MOVUPS XMM0,xmmword ptr [R12] MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVUPS xmmword ptr [RSP],XMM0 LEA R12,[RSP + 0x60] MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 CALL 0x00128a38 MOV EBP,EAX MOV RSI,qword ptr [R12 + 0x8] TEST RSI,RSI JZ 0x00128797 MOV RAX,qword ptr [RBX + 0x48] TEST RAX,RAX JZ 0x00128762 CMP dword ptr [RAX + 0x8],0x8 JNZ 0x0012879c LAB_00128762: LEA R14,[RBX + 0x38] MOVAPS XMM0,xmmword ptr [RSP + 0x60] MOVAPS xmmword ptr [RSP + 0xe0],XMM0 PUSH 0x12 POP RDI CALL 0x001258a4 MOVAPS XMM0,xmmword ptr [RSP + 0xe0] MOVUPS xmmword ptr [R14],XMM0 MOV qword ptr [RBX + 0x48],RAX OR byte ptr [RBX + 0x84],0x1 MOV R15B,0x1 JMP 0x001287bc LAB_00128797: XOR R15D,R15D JMP 0x001287b4 LAB_0012879c: MOV EDI,dword ptr [RSP + 0x60] MOV EDX,dword ptr [RBX + 0x38] MOV RCX,qword ptr [RBX + 0x40] CALL 0x0014bb90 MOV R15D,EAX MOV R14,qword ptr [RSP + 0x68] LAB_001287b4: MOV RDI,R14 CALL 0x0014aff8 LAB_001287bc: MOV RDI,qword ptr [RSP + 0x40] CALL 0x0012cb94 TEST EBP,EBP JZ 0x001287e2 LAB_001287ca: XOR R14D,R14D LAB_001287cd: MOV EAX,R14D ADD RSP,0x1c8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001287e2: TEST R15B,R15B JZ 0x00128974 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xa0],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVAPS xmmword ptr [RSP + 0x90],XMM0 MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x48] MOVUPS xmmword ptr [RSP],XMM0 CALL 0x0014c626 MOV dword ptr [RSP + 0x3c],EAX XORPS XMM0,XMM0 LEA RAX,[RSP + 0xc0] MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPS xmmword ptr [RAX],XMM0 LEA RAX,[RSP + 0x130] MOVAPS xmmword ptr [RAX + 0x10],XMM0 MOVAPS xmmword ptr [RAX],XMM0 XOR R12D,R12D LEA R13,[RSP + 0x1b0] PUSH 0x20 POP R15 LEA R14,[RSP + 0x70] LAB_00128856: CMP dword ptr [RSP + 0x3c],R12D JZ 0x001289d7 MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x10],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x90] MOVUPS xmmword ptr [RSP],XMM0 MOV RDI,R13 MOV ESI,R12D CALL 0x0014c4b1 MOV RDI,RBX MOV RSI,R13 LEA RDX,[RSP + 0xc0] PUSH 0x4 POP RCX MOV R8D,R15D LEA R9,[RSP + 0x130] CALL 0x0012c12c TEST AL,AL JZ 0x00128981 LEA RDI,[RSP + 0xa8] MOV RSI,R13 LEA RDX,[0x174ccc] CALL 0x0014d119 MOV RAX,qword ptr [RSP + 0xb8] CMP dword ptr [RAX + 0x8],0x4 JNZ 0x00128922 MOV EBP,R12D XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x120],XMM0 MOVAPS xmmword ptr [RSP + 0x110],XMM0 MOV EDI,dword ptr [RSP + 0xa8] MOV RSI,qword ptr [RSP + 0xb0] LEA R12,[RSP + 0x110] MOV RDX,R12 CALL 0x0014ebe8 LEA RDI,[RSP + 0x130] MOV RSI,R12 PUSH 0x20 POP RDX CALL 0x00122380 TEST EAX,EAX JNZ 0x0012898e MOV R12D,EBP LAB_00128922: MOV EDI,R15D MOV RBP,R14 MOV RSI,R14 XOR EDX,EDX CALL 0x0014b20e TEST AL,AL JZ 0x00128955 MOVAPS XMM0,xmmword ptr [RSP + 0xc0] MOVAPS XMM1,xmmword ptr [RSP + 0xd0] MOVAPS xmmword ptr [RSP + 0x80],XMM1 MOVAPS xmmword ptr [RSP + 0x70],XMM0 JMP 0x0012896c LAB_00128955: MOV RDI,RBP LEA RSI,[RSP + 0xc0] PUSH 0x20 POP RDX CALL 0x00122380 TEST EAX,EAX JNZ 0x001289a7 LAB_0012896c: INC R12D JMP 0x00128856 LAB_00128974: LEA RDI,[RBX + 0x70] LEA RSI,[0x1755ce] JMP 0x001289cd LAB_00128981: LEA RDI,[RBX + 0x70] LEA RSI,[0x1755fd] JMP 0x001289b2 LAB_0012898e: LEA RDI,[RBX + 0x70] LEA RSI,[0x17561c] CALL 0x00150675 MOV byte ptr [RBX + 0x68],0x0 MOV R12D,EBP JMP 0x001289bb LAB_001289a7: LEA RDI,[RBX + 0x70] LEA RSI,[0x17562f] LAB_001289b2: CALL 0x00150675 MOV byte ptr [RBX + 0x68],0x0 LAB_001289bb: CMP R12D,dword ptr [RSP + 0x3c] JNC 0x001289d7 LEA RDI,[RBX + 0x70] LEA RSI,[0x1755e3] LAB_001289cd: CALL 0x00150675 JMP 0x001286aa LAB_001289d7: MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RSP + 0xf8] MOVUPS xmmword ptr [RSP],XMM0 LEA RSI,[RSP + 0x70] MOV RDI,RBX CALL 0x0012cbff XOR R14D,R14D LEA RSI,[RSP + 0x180] LEA RDX,[RSP + 0x168] LEA RCX,[RSP + 0x150] MOV RDI,RBX XOR R8D,R8D CALL 0x0012a2e4 TEST EAX,EAX JNZ 0x001287cd MOV AL,0x1 MOV R14B,0x1 JMP 0x001286af
int8 verify_call_proof(long param_1) { int1 uVar1; char cVar2; int iVar3; uint uVar4; long lVar5; int8 uVar6; char *pcVar7; uint uVar8; int4 uVar9; int4 uVar10; int8 local_1b8; uint local_1b0 [2]; uint uStack_1a8; int8 local_1a0; int8 local_198; int8 uStack_190; int8 local_188; int8 uStack_180; int8 local_178; int8 uStack_170; ulong local_168; ulong uStack_160; int8 local_158; int4 local_150 [2]; int8 local_148; long local_140; int8 local_138; int8 uStack_130; int8 local_128; int8 uStack_120; int4 local_118; int4 uStack_114; int4 uStack_110; int4 uStack_10c; int1 local_100 [24]; int8 local_e8; int8 uStack_e0; int8 local_d8; int8 uStack_d0; int8 local_c8; int8 uStack_c0; int8 local_b8; int8 uStack_b0; int1 local_a8 [24]; int1 local_90 [24]; int1 local_78 [24]; int1 local_60 [24]; int1 local_48 [24]; local_178 = 0; uStack_170 = 0; local_188 = 0; uStack_180 = 0; ssz_get(local_100,param_1 + 0x20,"state_proof"); ssz_get(local_1b0,param_1 + 0x20,"accounts"); ssz_get(local_78,local_100,"header"); ssz_get(local_90,local_100,"sync_committee_bits"); ssz_get(local_a8,local_100,"sync_committee_signature"); local_198 = 0; uStack_190 = 0; local_1b8 = 0; lVar5 = json_validate("[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]" ,"Invalid transaction"); if (lVar5 == 0) { iVar3 = eth_get_call_codes(param_1,&local_1b8); uVar6 = local_1b8; if (iVar3 == 0) { lVar5 = 0; json_at(local_60,0); iVar3 = eth_run_call_evmone(param_1,uVar6,&local_198); if (uStack_190 == 0) { cVar2 = '\0'; LAB_001287b4: safe_free(lVar5); } else { if ((*(long *)(param_1 + 0x48) != 0) && (*(int *)(*(long *)(param_1 + 0x48) + 8) != 8)) { cVar2 = bytes_eq(local_198 & 0xffffffff,uStack_190,*(int4 *)(param_1 + 0x38), *(int8 *)(param_1 + 0x40)); lVar5 = uStack_190; goto LAB_001287b4; } local_118 = (int4)local_198; uStack_114 = local_198._4_4_; uStack_110 = (int4)uStack_190; uStack_10c = uStack_190._4_4_; uVar6 = eth_ssz_verification_type(0x12); *(int4 *)(param_1 + 0x38) = local_118; *(int4 *)(param_1 + 0x3c) = uStack_114; *(int4 *)(param_1 + 0x40) = uStack_110; *(int4 *)(param_1 + 0x44) = uStack_10c; *(int8 *)(param_1 + 0x48) = uVar6; *(byte *)(param_1 + 0x84) = *(byte *)(param_1 + 0x84) | 1; cVar2 = '\x01'; } eth_free_codes(local_1b8); if (iVar3 == 0) { if (cVar2 == '\0') { pcVar7 = "Call result mismatch"; LAB_001289cd: c4_state_add_error(param_1 + 0x70,pcVar7); goto LAB_001286aa; } local_158 = local_1a0; local_168 = (ulong)local_1b0[0]; uStack_160 = (ulong)uStack_1a8; uVar4 = ssz_len(); local_128 = 0; uStack_120 = 0; local_138 = 0; uStack_130 = 0; local_b8 = 0; uStack_b0 = 0; local_c8 = 0; uStack_c0 = 0; for (uVar8 = 0; uVar4 != uVar8; uVar8 = uVar8 + 1) { uVar9 = (int4)local_168; uVar10 = (int4)uStack_160; uVar6 = local_158; ssz_at(local_48,uVar8); cVar2 = eth_verify_account_proof_exec (param_1,local_48,&local_138,4,0x20,&local_c8,uVar9,uVar10,uVar6); if (cVar2 == '\0') { pcVar7 = "Failed to verify account proof"; LAB_001289b2: c4_state_add_error(param_1 + 0x70,pcVar7); *(int1 *)(param_1 + 0x68) = 0; LAB_001289bb: if (uVar8 < uVar4) { pcVar7 = "Failed to verify accounts"; goto LAB_001289cd; } break; } ssz_get(local_150,local_48,&DAT_00174ccc); if (*(int *)(local_140 + 8) == 4) { local_d8 = 0; uStack_d0 = 0; local_e8 = 0; uStack_e0 = 0; keccak(local_150[0],local_148,&local_e8); iVar3 = bcmp(&local_c8,&local_e8,0x20); if (iVar3 == 0) goto LAB_00128922; c4_state_add_error(param_1 + 0x70,"Code hash mismatch"); *(int1 *)(param_1 + 0x68) = 0; goto LAB_001289bb; } LAB_00128922: cVar2 = bytes_all_equal(0x20,&local_188,0); if (cVar2 == '\0') { iVar3 = bcmp(&local_188,&local_138,0x20); if (iVar3 != 0) { pcVar7 = "State root mismatch"; goto LAB_001289b2; } } else { local_178 = local_128; uStack_170 = uStack_120; local_188 = local_138; uStack_180 = uStack_130; } } eth_verify_state_proof(param_1,&local_188); iVar3 = c4_verify_blockroot_signature(param_1,local_78,local_90,local_a8,0); if (iVar3 != 0) { return 0; } uVar1 = 1; uVar6 = 1; goto LAB_001286af; } } uVar6 = 0; } else { *(long *)(param_1 + 0x78) = lVar5; LAB_001286aa: uVar1 = 0; uVar6 = 0; LAB_001286af: *(int1 *)(param_1 + 0x68) = uVar1; } return uVar6; }
26,120
verify_call_proof
corpus-core[P]colibri-stateless/src/chains/eth/verifier/verify_call.c
bool verify_call_proof(verify_ctx_t* ctx) { bytes32_t body_root = {0}; bytes32_t state_root = {0}; ssz_ob_t state_proof = ssz_get(&ctx->proof, "state_proof"); ssz_ob_t accounts = ssz_get(&ctx->proof, "accounts"); ssz_ob_t header = ssz_get(&state_proof, "header"); ssz_ob_t sync_committee_bits = ssz_get(&state_proof, "sync_committee_bits"); ssz_ob_t sync_committee_signature = ssz_get(&state_proof, "sync_committee_signature"); bytes_t call_result = NULL_BYTES; call_code_t* call_codes = NULL; bool match = false; CHECK_JSON_VERIFY(ctx->args, "[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]", "Invalid transaction"); if (eth_get_call_codes(ctx, &call_codes, accounts) != C4_SUCCESS) return false; #ifdef EVMONE c4_status_t call_status = eth_run_call_evmone(ctx, call_codes, accounts, json_at(ctx->args, 0), &call_result); #else c4_status_t call_status = c4_state_add_error(&ctx->state, "no EVM is enabled, build with -DEVMONE=1"); #endif if (call_result.data && (ctx->data.def == NULL || ctx->data.def->type == SSZ_TYPE_NONE)) { ctx->data = (ssz_ob_t) {.bytes = call_result, .def = eth_ssz_verification_type(ETH_SSZ_DATA_BYTES)}; ctx->flags |= VERIFY_FLAG_FREE_DATA; match = true; } else { match = call_result.data && bytes_eq(call_result, ctx->data.bytes); safe_free(call_result.data); } eth_free_codes(call_codes); if (call_status != C4_SUCCESS) return false; if (!match) RETURN_VERIFY_ERROR(ctx, "Call result mismatch"); if (!verify_accounts(ctx, accounts, state_root)) RETURN_VERIFY_ERROR(ctx, "Failed to verify accounts"); if (!eth_verify_state_proof(ctx, state_proof, state_root)) false; if (c4_verify_blockroot_signature(ctx, &header, &sync_committee_bits, &sync_committee_signature, 0) != C4_SUCCESS) return false; ctx->success = true; return ctx->success; }
O3
c
verify_call_proof: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1b8, %rsp # imm = 0x1B8 movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, 0x70(%rsp) movaps %xmm0, 0x60(%rsp) leaq 0x20(%rdi), %r15 leaq 0x58477(%rip), %rdx # 0x81c13 leaq 0x128(%rsp), %r14 movq %r14, %rdi movq %r15, %rsi callq 0x5525d leaq 0x58e3e(%rip), %rdx # 0x825f4 leaq 0x38(%rsp), %rdi movq %r15, %rsi callq 0x5525d leaq 0x57ea3(%rip), %rdx # 0x8166d leaq 0x170(%rsp), %rdi movq %r14, %rsi callq 0x5525d leaq 0x58457(%rip), %rdx # 0x81c38 leaq 0x158(%rsp), %rdi movq %r14, %rsi callq 0x5525d leaq 0x58454(%rip), %rdx # 0x81c4c leaq 0x140(%rsp), %rdi movq %r14, %rsi callq 0x5525d xorps %xmm0, %xmm0 movaps %xmm0, 0x50(%rsp) movq $0x0, 0x30(%rsp) movq 0x18(%rbx), %rax movq %rax, 0x10(%rsp) movdqu 0x8(%rbx), %xmm0 movdqu %xmm0, (%rsp) leaq 0x58d2b(%rip), %rdi # 0x8255e leaq 0x58d80(%rip), %rsi # 0x825ba callq 0x57c74 testq %rax, %rax je 0x29852 movq %rax, 0x78(%rbx) xorl %eax, %eax xorl %r14d, %r14d movb %al, 0x68(%rbx) jmp 0x2987b movq 0x48(%rsp), %rax movq %rax, 0x10(%rsp) movdqu 0x38(%rsp), %xmm0 movdqu %xmm0, (%rsp) leaq 0x30(%rsp), %rsi movq %rbx, %rdi callq 0x2dc84 testl %eax, %eax je 0x29890 xorl %r14d, %r14d movl %r14d, %eax addq $0x1b8, %rsp # imm = 0x1B8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x8(%rbx), %rax movq 0x30(%rsp), %r15 movq 0x10(%rax), %rcx movq %rcx, 0x10(%rsp) movups (%rax), %xmm0 movups %xmm0, (%rsp) xorl %r14d, %r14d leaq 0x188(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x57847 movq 0x10(%r12), %rax movq %rax, 0x28(%rsp) movups (%r12), %xmm0 movups %xmm0, 0x18(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x10(%rsp) movdqu 0x38(%rsp), %xmm0 movdqu %xmm0, (%rsp) leaq 0x50(%rsp), %r12 movq %rbx, %rdi movq %r15, %rsi movq %r12, %rdx callq 0x29c24 movl %eax, %ebp movq 0x8(%r12), %rsi testq %rsi, %rsi je 0x2995d movq 0x48(%rbx), %rax testq %rax, %rax je 0x29915 cmpl $0x8, 0x8(%rax) jne 0x29962 leaq 0x38(%rbx), %r14 movaps 0x50(%rsp), %xmm0 movaps %xmm0, 0x110(%rsp) movl $0x12, %edi callq 0x26680 movdqa 0x110(%rsp), %xmm0 movdqu %xmm0, (%r14) movq %rax, 0x48(%rbx) orb $0x1, 0x84(%rbx) movq 0x30(%rsp), %rdi callq 0x2e15e testl %ebp, %ebp jne 0x29878 jmp 0x2999d xorl %r15d, %r15d jmp 0x2997a movl 0x50(%rsp), %edi movl 0x38(%rbx), %edx movq 0x40(%rbx), %rcx callq 0x53c49 movl %eax, %r15d movq 0x58(%rsp), %r14 movq %r14, %rdi callq 0x52f98 movq 0x30(%rsp), %rdi callq 0x2e15e testl %ebp, %ebp jne 0x29878 testb %r15b, %r15b je 0x29b6a movq 0x48(%rsp), %rax movq %rax, 0xb0(%rsp) movups 0x38(%rsp), %xmm0 movaps %xmm0, 0xa0(%rsp) movq 0x48(%rsp), %rax movq %rax, 0x10(%rsp) movdqu 0x38(%rsp), %xmm0 movdqu %xmm0, (%rsp) callq 0x547b8 pxor %xmm0, %xmm0 movdqa %xmm0, 0x90(%rsp) movdqa %xmm0, 0x80(%rsp) movdqa %xmm0, 0x100(%rsp) movdqa %xmm0, 0xf0(%rsp) testl %eax, %eax je 0x29bae movl %eax, %ebp xorl %r13d, %r13d leaq 0x1a0(%rsp), %r14 leaq 0xf0(%rsp), %r12 xorl %r15d, %r15d movq 0xb0(%rsp), %rax movq %rax, 0x10(%rsp) movdqa 0xa0(%rsp), %xmm0 movdqu %xmm0, (%rsp) movq %r14, %rdi movl %r15d, %esi callq 0x5463d movq %rbx, %rdi movq %r14, %rsi leaq 0x80(%rsp), %rdx movl $0x4, %ecx movl $0x20, %r8d movq %r12, %r9 callq 0x2d65c testb %al, %al je 0x29b7a leaq 0xb8(%rsp), %rdi movq %r14, %rsi leaq 0x58252(%rip), %rdx # 0x81ccc callq 0x5525d movq 0xc8(%rsp), %rax cmpl $0x4, 0x8(%rax) jne 0x29af6 pxor %xmm0, %xmm0 movdqa %xmm0, 0xe0(%rsp) movdqa %xmm0, 0xd0(%rsp) movl 0xb8(%rsp), %edi movq 0xc0(%rsp), %rsi leaq 0xd0(%rsp), %rdx callq 0x56d5c movdqa 0xf0(%rsp), %xmm0 movdqa 0x100(%rsp), %xmm1 pcmpeqb 0xe0(%rsp), %xmm1 pcmpeqb 0xd0(%rsp), %xmm0 pand %xmm1, %xmm0 pmovmskb %xmm0, %eax cmpl $0xffff, %eax # imm = 0xFFFF jne 0x29b87 movl $0x20, %edi leaq 0x60(%rsp), %rsi xorl %edx, %edx callq 0x531b1 testb %al, %al je 0x29b2b movdqa 0x80(%rsp), %xmm0 movdqa 0x90(%rsp), %xmm1 movdqa %xmm1, 0x70(%rsp) movdqa %xmm0, 0x60(%rsp) jmp 0x29b58 movdqa 0x60(%rsp), %xmm0 movdqa 0x70(%rsp), %xmm1 pcmpeqb 0x90(%rsp), %xmm1 pcmpeqb 0x80(%rsp), %xmm0 pand %xmm1, %xmm0 pmovmskb %xmm0, %eax cmpl $0xffff, %eax # imm = 0xFFFF jne 0x29b94 incl %r15d cmpl %ebp, %r15d setae %r13b jne 0x29a19 jmp 0x29bae leaq 0x70(%rbx), %rdi leaq 0x58a59(%rip), %rsi # 0x825ce jmp 0x29c19 leaq 0x70(%rbx), %rdi leaq 0x58a78(%rip), %rsi # 0x825fd jmp 0x29b9f leaq 0x70(%rbx), %rdi leaq 0x58a8a(%rip), %rsi # 0x8261c jmp 0x29b9f leaq 0x70(%rbx), %rdi leaq 0x58a90(%rip), %rsi # 0x8262f callq 0x589cd movb $0x0, 0x68(%rbx) testb $0x1, %r13b je 0x29c0e movq 0x138(%rsp), %rax movq %rax, 0x10(%rsp) movdqu 0x128(%rsp), %xmm0 movdqu %xmm0, (%rsp) leaq 0x60(%rsp), %rsi movq %rbx, %rdi callq 0x2e1cc xorl %r14d, %r14d leaq 0x170(%rsp), %rsi leaq 0x158(%rsp), %rdx leaq 0x140(%rsp), %rcx movq %rbx, %rdi xorl %r8d, %r8d callq 0x2b65b testl %eax, %eax jne 0x2987b movb $0x1, %al movb $0x1, %r14b jmp 0x2984d leaq 0x70(%rbx), %rdi leaq 0x589ca(%rip), %rsi # 0x825e3 callq 0x589cd jmp 0x29848 nop
verify_call_proof: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1B8h mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+1E8h+var_178], xmm0 movaps [rsp+1E8h+var_188], xmm0 lea r15, [rdi+20h] lea rdx, aStateProof; "state_proof" lea r14, [rsp+1E8h+var_C0] mov rdi, r14 mov rsi, r15 call ssz_get lea rdx, aFailedToVerify_0+11h; "accounts" lea rdi, [rsp+1E8h+var_1B0] mov rsi, r15 call ssz_get lea rdx, aInvalidRespons+15h; "header" lea rdi, [rsp+1E8h+var_78] mov rsi, r14 call ssz_get lea rdx, aSyncCommitteeB; "sync_committee_bits" lea rdi, [rsp+1E8h+var_90] mov rsi, r14 call ssz_get lea rdx, aSyncCommitteeS; "sync_committee_signature" lea rdi, [rsp+1E8h+var_A8] mov rsi, r14 call ssz_get xorps xmm0, xmm0 movaps [rsp+1E8h+var_198], xmm0 mov [rsp+1E8h+var_1B8], 0 mov rax, [rbx+18h] mov [rsp+1E8h+var_1D8], rax movdqu xmm0, xmmword ptr [rbx+8] movdqu [rsp+1E8h+var_1E8], xmm0 lea rdi, aToAddressDataB; "[{to:address,data:bytes,gas?:hexuint,va"... lea rsi, aInvalidTransac; "Invalid transaction" call json_validate test rax, rax jz short loc_29852 mov [rbx+78h], rax loc_29848: xor eax, eax xor r14d, r14d loc_2984D: mov [rbx+68h], al jmp short loc_2987B loc_29852: mov rax, [rsp+1E8h+var_1A0] mov [rsp+1E8h+var_1D8], rax movdqu xmm0, [rsp+1E8h+var_1B0] movdqu [rsp+1E8h+var_1E8], xmm0 lea rsi, [rsp+1E8h+var_1B8] mov rdi, rbx call eth_get_call_codes test eax, eax jz short loc_29890 loc_29878: xor r14d, r14d loc_2987B: mov eax, r14d add rsp, 1B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_29890: lea rax, [rbx+8] mov r15, [rsp+1E8h+var_1B8] mov rcx, [rax+10h] mov [rsp+1E8h+var_1D8], rcx movups xmm0, xmmword ptr [rax] movups [rsp+1E8h+var_1E8], xmm0 xor r14d, r14d lea r12, [rsp+1E8h+var_60] mov rdi, r12 xor esi, esi call json_at mov rax, [r12+10h] mov [rsp+1E8h+var_1C0], rax movups xmm0, xmmword ptr [r12] movups [rsp+1E8h+var_1D0], xmm0 mov rax, [rsp+1E8h+var_1A0] mov [rsp+1E8h+var_1D8], rax movdqu xmm0, [rsp+1E8h+var_1B0] movdqu [rsp+1E8h+var_1E8], xmm0 lea r12, [rsp+1E8h+var_198] mov rdi, rbx mov rsi, r15 mov rdx, r12 call eth_run_call_evmone mov ebp, eax mov rsi, [r12+8] test rsi, rsi jz short loc_2995D mov rax, [rbx+48h] test rax, rax jz short loc_29915 cmp dword ptr [rax+8], 8 jnz short loc_29962 loc_29915: lea r14, [rbx+38h] movaps xmm0, [rsp+1E8h+var_198] movaps [rsp+1E8h+var_D8], xmm0 mov edi, 12h call eth_ssz_verification_type movdqa xmm0, [rsp+1E8h+var_D8] movdqu xmmword ptr [r14], xmm0 mov [rbx+48h], rax or byte ptr [rbx+84h], 1 mov rdi, [rsp+1E8h+var_1B8] call eth_free_codes test ebp, ebp jnz loc_29878 jmp short loc_2999D loc_2995D: xor r15d, r15d jmp short loc_2997A loc_29962: mov edi, dword ptr [rsp+1E8h+var_198] mov edx, [rbx+38h] mov rcx, [rbx+40h] call bytes_eq mov r15d, eax mov r14, qword ptr [rsp+1E8h+var_198+8] loc_2997A: mov rdi, r14 call safe_free mov rdi, [rsp+1E8h+var_1B8] call eth_free_codes test ebp, ebp jnz loc_29878 test r15b, r15b jz loc_29B6A loc_2999D: mov rax, [rsp+1E8h+var_1A0] mov [rsp+1E8h+var_138], rax movups xmm0, [rsp+1E8h+var_1B0] movaps [rsp+1E8h+var_148], xmm0 mov rax, [rsp+1E8h+var_1A0] mov [rsp+1E8h+var_1D8], rax movdqu xmm0, [rsp+1E8h+var_1B0] movdqu [rsp+1E8h+var_1E8], xmm0 call ssz_len pxor xmm0, xmm0 movdqa [rsp+1E8h+var_158], xmm0 movdqa [rsp+1E8h+var_168], xmm0 movdqa [rsp+1E8h+var_E8], xmm0 movdqa [rsp+1E8h+var_F8], xmm0 test eax, eax jz loc_29BAE mov ebp, eax xor r13d, r13d lea r14, [rsp+1E8h+var_48] lea r12, [rsp+1E8h+var_F8] xor r15d, r15d loc_29A19: mov rax, [rsp+1E8h+var_138] mov [rsp+1E8h+var_1D8], rax movdqa xmm0, [rsp+1E8h+var_148] movdqu [rsp+1E8h+var_1E8], xmm0 mov rdi, r14 mov esi, r15d call ssz_at mov rdi, rbx mov rsi, r14 lea rdx, [rsp+1E8h+var_168] mov ecx, 4 mov r8d, 20h ; ' ' mov r9, r12 call eth_verify_account_proof_exec test al, al jz loc_29B7A lea rdi, [rsp+1E8h+var_130] mov rsi, r14 lea rdx, aCode; "code" call ssz_get mov rax, [rsp+1E8h+var_120] cmp dword ptr [rax+8], 4 jnz short loc_29AF6 pxor xmm0, xmm0 movdqa [rsp+1E8h+var_108], xmm0 movdqa [rsp+1E8h+var_118], xmm0 mov edi, [rsp+1E8h+var_130] mov rsi, [rsp+1E8h+var_128] lea rdx, [rsp+1E8h+var_118] call keccak movdqa xmm0, [rsp+1E8h+var_F8] movdqa xmm1, [rsp+1E8h+var_E8] pcmpeqb xmm1, [rsp+1E8h+var_108] pcmpeqb xmm0, [rsp+1E8h+var_118] pand xmm0, xmm1 pmovmskb eax, xmm0 cmp eax, 0FFFFh jnz loc_29B87 loc_29AF6: mov edi, 20h ; ' ' lea rsi, [rsp+1E8h+var_188] xor edx, edx call bytes_all_equal test al, al jz short loc_29B2B movdqa xmm0, [rsp+1E8h+var_168] movdqa xmm1, [rsp+1E8h+var_158] movdqa [rsp+1E8h+var_178], xmm1 movdqa [rsp+1E8h+var_188], xmm0 jmp short loc_29B58 loc_29B2B: movdqa xmm0, [rsp+1E8h+var_188] movdqa xmm1, [rsp+1E8h+var_178] pcmpeqb xmm1, [rsp+1E8h+var_158] pcmpeqb xmm0, [rsp+1E8h+var_168] pand xmm0, xmm1 pmovmskb eax, xmm0 cmp eax, 0FFFFh jnz short loc_29B94 loc_29B58: inc r15d cmp r15d, ebp setnb r13b jnz loc_29A19 jmp short loc_29BAE loc_29B6A: lea rdi, [rbx+70h] lea rsi, aCallResultMism; "Call result mismatch" jmp loc_29C19 loc_29B7A: lea rdi, [rbx+70h] lea rsi, aFailedToVerify; "Failed to verify account proof" jmp short loc_29B9F loc_29B87: lea rdi, [rbx+70h] lea rsi, aCodeHashMismat; "Code hash mismatch" jmp short loc_29B9F loc_29B94: lea rdi, [rbx+70h] lea rsi, aStateRootMisma; "State root mismatch" loc_29B9F: call c4_state_add_error mov byte ptr [rbx+68h], 0 test r13b, 1 jz short loc_29C0E loc_29BAE: mov rax, [rsp+1E8h+var_B0] mov [rsp+1E8h+var_1D8], rax movdqu xmm0, [rsp+1E8h+var_C0] movdqu [rsp+1E8h+var_1E8], xmm0 lea rsi, [rsp+1E8h+var_188] mov rdi, rbx call eth_verify_state_proof xor r14d, r14d lea rsi, [rsp+1E8h+var_78] lea rdx, [rsp+1E8h+var_90] lea rcx, [rsp+1E8h+var_A8] mov rdi, rbx xor r8d, r8d call c4_verify_blockroot_signature test eax, eax jnz loc_2987B mov al, 1 mov r14b, 1 jmp loc_2984D loc_29C0E: lea rdi, [rbx+70h] lea rsi, aFailedToVerify_0; "Failed to verify accounts" loc_29C19: call c4_state_add_error jmp loc_29848
long long verify_call_proof(long long a1) { int v2; // edx int v3; // ecx int v4; // r8d int v5; // r9d long long v6; // rax int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d char v11; // al unsigned int v12; // r14d int v13; // edx int v14; // r8d int v15; // r9d int v17; // r15d long long v18; // r14 __m128i v19; // xmm0 int v20; // ecx int v21; // r8d int v22; // r9d int v23; // ebp __int32 v24; // esi long long v25; // rax char **v26; // rax int v27; // edi int v28; // edx int v29; // ecx int v30; // r8d int v31; // r9d char v32; // r15 unsigned int v33; // eax int v34; // edx int v35; // ecx int v36; // r8d int v37; // r9d unsigned int v38; // ebp bool v39; // r13 int v40; // r15d __m128i v41; // xmm0 __m128i v42; // xmm0 long long v43; // rdi const char *v44; // rsi long long v45; // rdi const char *v46; // rsi __m128i v47; // [rsp+0h] [rbp-1E8h] long long v48; // [rsp+30h] [rbp-1B8h] BYREF __m128i v49; // [rsp+38h] [rbp-1B0h] BYREF long long v50; // [rsp+48h] [rbp-1A0h] __m128i v51; // [rsp+50h] [rbp-198h] BYREF __m128i v52; // [rsp+60h] [rbp-188h] BYREF __m128i v53; // [rsp+70h] [rbp-178h] BYREF __m128i v54; // [rsp+80h] [rbp-168h] BYREF __m128i v55; // [rsp+90h] [rbp-158h] BYREF __m128i v56; // [rsp+A0h] [rbp-148h] BYREF long long v57; // [rsp+B0h] [rbp-138h] unsigned int v58; // [rsp+B8h] [rbp-130h] BYREF long long v59; // [rsp+C0h] [rbp-128h] long long v60; // [rsp+C8h] [rbp-120h] __m128i v61; // [rsp+D0h] [rbp-118h] BYREF __m128i v62; // [rsp+E0h] [rbp-108h] __m128i v63; // [rsp+F0h] [rbp-F8h] BYREF __m128i v64; // [rsp+100h] [rbp-E8h] BYREF __m128i v65; // [rsp+110h] [rbp-D8h] BYREF __m128i v66; // [rsp+128h] [rbp-C0h] BYREF long long v67; // [rsp+138h] [rbp-B0h] _BYTE v68[24]; // [rsp+140h] [rbp-A8h] BYREF _BYTE v69[24]; // [rsp+158h] [rbp-90h] BYREF _BYTE v70[24]; // [rsp+170h] [rbp-78h] BYREF __int128 v71; // [rsp+188h] [rbp-60h] BYREF long long v72; // [rsp+198h] [rbp-50h] _BYTE v73[72]; // [rsp+1A0h] [rbp-48h] BYREF v53 = 0LL; v52 = 0LL; ssz_get(&v66, a1 + 32, "state_proof"); ssz_get(&v49, a1 + 32, "accounts"); ssz_get(v70, &v66, "header"); ssz_get(v69, &v66, "sync_committee_bits"); ssz_get(v68, &v66, "sync_committee_signature"); v51 = 0LL; v48 = 0LL; v6 = json_validate( (unsigned int)"[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]", (unsigned int)"Invalid transaction", v2, v3, v4, v5, _mm_loadu_si128((const __m128i *)(a1 + 8)), *(_QWORD *)(a1 + 24)); if ( v6 ) { *(_QWORD *)(a1 + 120) = v6; LABEL_3: v11 = 0; v12 = 0; goto LABEL_4; } if ( (unsigned int)eth_get_call_codes(a1, (unsigned int)&v48, v7, v8, v9, v10, *(_OWORD *)&_mm_loadu_si128(&v49), v50) ) return 0; v17 = v48; v18 = 0LL; json_at( (unsigned int)&v71, 0, v13, *(_QWORD *)(a1 + 24), v14, v15, *(_QWORD *)(a1 + 8), *(_QWORD *)(a1 + 16), *(_QWORD *)(a1 + 24)); v19 = _mm_loadu_si128(&v49); v23 = eth_run_call_evmone( a1, v17, (unsigned int)&v51, v20, v21, v22, v19.m128i_i8[0], v19.m128i_i32[2], v50, v71, v72); v24 = v51.m128i_i32[2]; if ( v51.m128i_i64[1] ) { v25 = *(_QWORD *)(a1 + 72); if ( !v25 || *(_DWORD *)(v25 + 8) == 8 ) { v65 = v51; v26 = eth_ssz_verification_type(18); *(__m128i *)(a1 + 56) = _mm_load_si128(&v65); *(_QWORD *)(a1 + 72) = v26; *(_BYTE *)(a1 + 132) |= 1u; v27 = v48; eth_free_codes(v48); if ( v23 ) return 0; goto LABEL_17; } v32 = bytes_eq(v51.m128i_u32[0], v51.m128i_i64[1], *(unsigned int *)(a1 + 56), *(_QWORD *)(a1 + 64)); v18 = v51.m128i_i64[1]; } else { v32 = 0; } safe_free(v18); v27 = v48; eth_free_codes(v48); if ( v23 ) return 0; if ( !v32 ) { v43 = a1 + 112; v44 = "Call result mismatch"; LABEL_35: c4_state_add_error(v43, v44); goto LABEL_3; } LABEL_17: v57 = v50; v56 = v49; v47 = _mm_loadu_si128(&v49); v33 = ssz_len(v27, v24, v28, v29, v30, v31, v47.m128i_i8[0], v47.m128i_i32[2], v50); v55 = 0LL; v54 = 0LL; v64 = 0LL; v63 = 0LL; if ( !v33 ) goto LABEL_32; v38 = v33; v39 = 0; v40 = 0; while ( 1 ) { v41 = _mm_load_si128(&v56); ssz_at((unsigned int)v73, v40, v34, v35, v36, v37, v41.m128i_i32[0], v41.m128i_i64[1], v57); if ( !(unsigned __int8)eth_verify_account_proof_exec(a1, v73, &v54, 4LL, 32LL, &v63) ) { v45 = a1 + 112; v46 = "Failed to verify account proof"; goto LABEL_31; } ssz_get(&v58, v73, "code"); if ( *(_DWORD *)(v60 + 8) == 4 ) { v62 = 0LL; v61 = 0LL; keccak(v58, v59, &v61); if ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_load_si128(&v63), v61), _mm_cmpeq_epi8(_mm_load_si128(&v64), v62))) != 0xFFFF ) { v45 = a1 + 112; v46 = "Code hash mismatch"; goto LABEL_31; } } if ( !(unsigned __int8)bytes_all_equal(32LL, &v52, 0LL) ) break; v42 = _mm_load_si128(&v54); v53 = _mm_load_si128(&v55); v52 = v42; LABEL_25: v39 = ++v40 >= v38; if ( v40 == v38 ) goto LABEL_32; } if ( _mm_movemask_epi8(_mm_and_si128(_mm_cmpeq_epi8(_mm_load_si128(&v52), v54), _mm_cmpeq_epi8(_mm_load_si128(&v53), v55))) == 0xFFFF ) goto LABEL_25; v45 = a1 + 112; v46 = "State root mismatch"; LABEL_31: c4_state_add_error(v45, v46); *(_BYTE *)(a1 + 104) = 0; if ( !v39 ) { v43 = a1 + 112; v44 = "Failed to verify accounts"; goto LABEL_35; } LABEL_32: eth_verify_state_proof(a1, (unsigned int)&v52, v34, v35, v36, v37, _mm_loadu_si128(&v66), v67); v12 = 0; if ( !(unsigned int)c4_verify_blockroot_signature(a1, v70, v69, v68, 0LL) ) { v11 = 1; LOBYTE(v12) = 1; LABEL_4: *(_BYTE *)(a1 + 104) = v11; } return v12; }
verify_call_proof: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1b8 MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOVAPS xmmword ptr [RSP + 0x60],XMM0 LEA R15,[RDI + 0x20] LEA RDX,[0x181c13] LEA R14,[RSP + 0x128] MOV RDI,R14 MOV RSI,R15 CALL 0x0015525d LEA RDX,[0x1825f4] LEA RDI,[RSP + 0x38] MOV RSI,R15 CALL 0x0015525d LEA RDX,[0x18166d] LEA RDI,[RSP + 0x170] MOV RSI,R14 CALL 0x0015525d LEA RDX,[0x181c38] LEA RDI,[RSP + 0x158] MOV RSI,R14 CALL 0x0015525d LEA RDX,[0x181c4c] LEA RDI,[RSP + 0x140] MOV RSI,R14 CALL 0x0015525d XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x50],XMM0 MOV qword ptr [RSP + 0x30],0x0 MOV RAX,qword ptr [RBX + 0x18] MOV qword ptr [RSP + 0x10],RAX MOVDQU XMM0,xmmword ptr [RBX + 0x8] MOVDQU xmmword ptr [RSP],XMM0 LEA RDI,[0x18255e] LEA RSI,[0x1825ba] CALL 0x00157c74 TEST RAX,RAX JZ 0x00129852 MOV qword ptr [RBX + 0x78],RAX LAB_00129848: XOR EAX,EAX XOR R14D,R14D LAB_0012984d: MOV byte ptr [RBX + 0x68],AL JMP 0x0012987b LAB_00129852: MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x10],RAX MOVDQU XMM0,xmmword ptr [RSP + 0x38] MOVDQU xmmword ptr [RSP],XMM0 LEA RSI,[RSP + 0x30] MOV RDI,RBX CALL 0x0012dc84 TEST EAX,EAX JZ 0x00129890 LAB_00129878: XOR R14D,R14D LAB_0012987b: MOV EAX,R14D ADD RSP,0x1b8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00129890: LEA RAX,[RBX + 0x8] MOV R15,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RCX MOVUPS XMM0,xmmword ptr [RAX] MOVUPS xmmword ptr [RSP],XMM0 XOR R14D,R14D LEA R12,[RSP + 0x188] MOV RDI,R12 XOR ESI,ESI CALL 0x00157847 MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x28],RAX MOVUPS XMM0,xmmword ptr [R12] MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x10],RAX MOVDQU XMM0,xmmword ptr [RSP + 0x38] MOVDQU xmmword ptr [RSP],XMM0 LEA R12,[RSP + 0x50] MOV RDI,RBX MOV RSI,R15 MOV RDX,R12 CALL 0x00129c24 MOV EBP,EAX MOV RSI,qword ptr [R12 + 0x8] TEST RSI,RSI JZ 0x0012995d MOV RAX,qword ptr [RBX + 0x48] TEST RAX,RAX JZ 0x00129915 CMP dword ptr [RAX + 0x8],0x8 JNZ 0x00129962 LAB_00129915: LEA R14,[RBX + 0x38] MOVAPS XMM0,xmmword ptr [RSP + 0x50] MOVAPS xmmword ptr [RSP + 0x110],XMM0 MOV EDI,0x12 CALL 0x00126680 MOVDQA XMM0,xmmword ptr [RSP + 0x110] MOVDQU xmmword ptr [R14],XMM0 MOV qword ptr [RBX + 0x48],RAX OR byte ptr [RBX + 0x84],0x1 MOV RDI,qword ptr [RSP + 0x30] CALL 0x0012e15e TEST EBP,EBP JNZ 0x00129878 JMP 0x0012999d LAB_0012995d: XOR R15D,R15D JMP 0x0012997a LAB_00129962: MOV EDI,dword ptr [RSP + 0x50] MOV EDX,dword ptr [RBX + 0x38] MOV RCX,qword ptr [RBX + 0x40] CALL 0x00153c49 MOV R15D,EAX MOV R14,qword ptr [RSP + 0x58] LAB_0012997a: MOV RDI,R14 CALL 0x00152f98 MOV RDI,qword ptr [RSP + 0x30] CALL 0x0012e15e TEST EBP,EBP JNZ 0x00129878 TEST R15B,R15B JZ 0x00129b6a LAB_0012999d: MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0xb0],RAX MOVUPS XMM0,xmmword ptr [RSP + 0x38] MOVAPS xmmword ptr [RSP + 0xa0],XMM0 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x10],RAX MOVDQU XMM0,xmmword ptr [RSP + 0x38] MOVDQU xmmword ptr [RSP],XMM0 CALL 0x001547b8 PXOR XMM0,XMM0 MOVDQA xmmword ptr [RSP + 0x90],XMM0 MOVDQA xmmword ptr [RSP + 0x80],XMM0 MOVDQA xmmword ptr [RSP + 0x100],XMM0 MOVDQA xmmword ptr [RSP + 0xf0],XMM0 TEST EAX,EAX JZ 0x00129bae MOV EBP,EAX XOR R13D,R13D LEA R14,[RSP + 0x1a0] LEA R12,[RSP + 0xf0] XOR R15D,R15D LAB_00129a19: MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x10],RAX MOVDQA XMM0,xmmword ptr [RSP + 0xa0] MOVDQU xmmword ptr [RSP],XMM0 MOV RDI,R14 MOV ESI,R15D CALL 0x0015463d MOV RDI,RBX MOV RSI,R14 LEA RDX,[RSP + 0x80] MOV ECX,0x4 MOV R8D,0x20 MOV R9,R12 CALL 0x0012d65c TEST AL,AL JZ 0x00129b7a LEA RDI,[RSP + 0xb8] MOV RSI,R14 LEA RDX,[0x181ccc] CALL 0x0015525d MOV RAX,qword ptr [RSP + 0xc8] CMP dword ptr [RAX + 0x8],0x4 JNZ 0x00129af6 PXOR XMM0,XMM0 MOVDQA xmmword ptr [RSP + 0xe0],XMM0 MOVDQA xmmword ptr [RSP + 0xd0],XMM0 MOV EDI,dword ptr [RSP + 0xb8] MOV RSI,qword ptr [RSP + 0xc0] LEA RDX,[RSP + 0xd0] CALL 0x00156d5c MOVDQA XMM0,xmmword ptr [RSP + 0xf0] MOVDQA XMM1,xmmword ptr [RSP + 0x100] PCMPEQB XMM1,xmmword ptr [RSP + 0xe0] PCMPEQB XMM0,xmmword ptr [RSP + 0xd0] PAND XMM0,XMM1 PMOVMSKB EAX,XMM0 CMP EAX,0xffff JNZ 0x00129b87 LAB_00129af6: MOV EDI,0x20 LEA RSI,[RSP + 0x60] XOR EDX,EDX CALL 0x001531b1 TEST AL,AL JZ 0x00129b2b MOVDQA XMM0,xmmword ptr [RSP + 0x80] MOVDQA XMM1,xmmword ptr [RSP + 0x90] MOVDQA xmmword ptr [RSP + 0x70],XMM1 MOVDQA xmmword ptr [RSP + 0x60],XMM0 JMP 0x00129b58 LAB_00129b2b: MOVDQA XMM0,xmmword ptr [RSP + 0x60] MOVDQA XMM1,xmmword ptr [RSP + 0x70] PCMPEQB XMM1,xmmword ptr [RSP + 0x90] PCMPEQB XMM0,xmmword ptr [RSP + 0x80] PAND XMM0,XMM1 PMOVMSKB EAX,XMM0 CMP EAX,0xffff JNZ 0x00129b94 LAB_00129b58: INC R15D CMP R15D,EBP SETNC R13B JNZ 0x00129a19 JMP 0x00129bae LAB_00129b6a: LEA RDI,[RBX + 0x70] LEA RSI,[0x1825ce] JMP 0x00129c19 LAB_00129b7a: LEA RDI,[RBX + 0x70] LEA RSI,[0x1825fd] JMP 0x00129b9f LAB_00129b87: LEA RDI,[RBX + 0x70] LEA RSI,[0x18261c] JMP 0x00129b9f LAB_00129b94: LEA RDI,[RBX + 0x70] LEA RSI,[0x18262f] LAB_00129b9f: CALL 0x001589cd MOV byte ptr [RBX + 0x68],0x0 TEST R13B,0x1 JZ 0x00129c0e LAB_00129bae: MOV RAX,qword ptr [RSP + 0x138] MOV qword ptr [RSP + 0x10],RAX MOVDQU XMM0,xmmword ptr [RSP + 0x128] MOVDQU xmmword ptr [RSP],XMM0 LEA RSI,[RSP + 0x60] MOV RDI,RBX CALL 0x0012e1cc XOR R14D,R14D LEA RSI,[RSP + 0x170] LEA RDX,[RSP + 0x158] LEA RCX,[RSP + 0x140] MOV RDI,RBX XOR R8D,R8D CALL 0x0012b65b TEST EAX,EAX JNZ 0x0012987b MOV AL,0x1 MOV R14B,0x1 JMP 0x0012984d LAB_00129c0e: LEA RDI,[RBX + 0x70] LEA RSI,[0x1825e3] LAB_00129c19: CALL 0x001589cd JMP 0x00129848
int8 verify_call_proof(long param_1) { int1 uVar1; char cVar2; int iVar3; uint uVar4; long lVar5; int8 uVar6; char *pcVar7; uint uVar8; bool bVar9; int1 auVar10 [16]; int1 auVar11 [16]; int1 auVar12 [16]; int1 auVar13 [16]; int8 uVar14; int8 uVar15; int8 local_1b8; int8 local_1b0; int8 uStack_1a8; int8 local_1a0; ulong local_198; long lStack_190; int8 local_188; int8 uStack_180; int8 local_178; int8 uStack_170; int1 local_168 [16]; int1 local_158 [16]; int8 local_148; int8 uStack_140; int8 local_138; int4 local_130 [2]; int8 local_128; long local_120; int1 local_118 [16]; int1 local_108 [16]; int1 local_f8 [16]; int1 local_e8 [16]; ulong local_d8; long lStack_d0; int1 local_c0 [24]; int1 local_a8 [24]; int1 local_90 [24]; int1 local_78 [24]; int1 local_60 [24]; int1 local_48 [24]; local_178 = 0; uStack_170 = 0; local_188 = 0; uStack_180 = 0; ssz_get(local_c0,param_1 + 0x20,"state_proof"); ssz_get(&local_1b0,param_1 + 0x20,"accounts"); ssz_get(local_78,local_c0,"header"); ssz_get(local_90,local_c0,"sync_committee_bits"); ssz_get(local_a8,local_c0,"sync_committee_signature"); local_198 = 0; lStack_190 = 0; local_1b8 = 0; lVar5 = json_validate("[{to:address,data:bytes,gas?:hexuint,value?:hexuint,gasPrice?:hexuint,from?:address},block]" ,"Invalid transaction"); if (lVar5 == 0) { iVar3 = eth_get_call_codes(param_1,&local_1b8); uVar6 = local_1b8; if (iVar3 != 0) { return 0; } lVar5 = 0; json_at(local_60,0); iVar3 = eth_run_call_evmone(param_1,uVar6,&local_198); if (lStack_190 == 0) { cVar2 = '\0'; LAB_0012997a: safe_free(lVar5); eth_free_codes(local_1b8); if (iVar3 != 0) { return 0; } if (cVar2 == '\0') { pcVar7 = "Call result mismatch"; LAB_00129c19: c4_state_add_error(param_1 + 0x70,pcVar7); goto LAB_00129848; } } else { if ((*(long *)(param_1 + 0x48) != 0) && (*(int *)(*(long *)(param_1 + 0x48) + 8) != 8)) { cVar2 = bytes_eq(local_198 & 0xffffffff,lStack_190,*(int4 *)(param_1 + 0x38), *(int8 *)(param_1 + 0x40)); lVar5 = lStack_190; goto LAB_0012997a; } local_d8 = local_198; lStack_d0 = lStack_190; uVar6 = eth_ssz_verification_type(0x12); *(ulong *)(param_1 + 0x38) = local_d8; *(long *)(param_1 + 0x40) = lStack_d0; *(int8 *)(param_1 + 0x48) = uVar6; *(byte *)(param_1 + 0x84) = *(byte *)(param_1 + 0x84) | 1; eth_free_codes(local_1b8); if (iVar3 != 0) { return 0; } } local_138 = local_1a0; local_148 = local_1b0; uStack_140 = uStack_1a8; uVar4 = ssz_len(); local_158 = (int1 [16])0x0; local_168 = (int1 [16])0x0; local_e8 = (int1 [16])0x0; local_f8 = (int1 [16])0x0; if (uVar4 != 0) { bVar9 = false; uVar8 = 0; do { uVar6 = local_148; uVar14 = uStack_140; uVar15 = local_138; ssz_at(local_48,uVar8); cVar2 = eth_verify_account_proof_exec (param_1,local_48,local_168,4,0x20,local_f8,uVar6,uVar14,uVar15); if (cVar2 == '\0') { pcVar7 = "Failed to verify account proof"; LAB_00129b9f: c4_state_add_error(param_1 + 0x70,pcVar7); *(int1 *)(param_1 + 0x68) = 0; if (!bVar9) { pcVar7 = "Failed to verify accounts"; goto LAB_00129c19; } break; } ssz_get(local_130,local_48,&DAT_00181ccc); if (*(int *)(local_120 + 8) == 4) { local_108 = (int1 [16])0x0; local_118 = (int1 [16])0x0; keccak(local_130[0],local_128,local_118); auVar12[0] = -(local_e8[0] == local_108[0]); auVar12[1] = -(local_e8[1] == local_108[1]); auVar12[2] = -(local_e8[2] == local_108[2]); auVar12[3] = -(local_e8[3] == local_108[3]); auVar12[4] = -(local_e8[4] == local_108[4]); auVar12[5] = -(local_e8[5] == local_108[5]); auVar12[6] = -(local_e8[6] == local_108[6]); auVar12[7] = -(local_e8[7] == local_108[7]); auVar12[8] = -(local_e8[8] == local_108[8]); auVar12[9] = -(local_e8[9] == local_108[9]); auVar12[10] = -(local_e8[10] == local_108[10]); auVar12[0xb] = -(local_e8[0xb] == local_108[0xb]); auVar12[0xc] = -(local_e8[0xc] == local_108[0xc]); auVar12[0xd] = -(local_e8[0xd] == local_108[0xd]); auVar12[0xe] = -(local_e8[0xe] == local_108[0xe]); auVar12[0xf] = -(local_e8[0xf] == local_108[0xf]); auVar10[0] = -(local_f8[0] == local_118[0]); auVar10[1] = -(local_f8[1] == local_118[1]); auVar10[2] = -(local_f8[2] == local_118[2]); auVar10[3] = -(local_f8[3] == local_118[3]); auVar10[4] = -(local_f8[4] == local_118[4]); auVar10[5] = -(local_f8[5] == local_118[5]); auVar10[6] = -(local_f8[6] == local_118[6]); auVar10[7] = -(local_f8[7] == local_118[7]); auVar10[8] = -(local_f8[8] == local_118[8]); auVar10[9] = -(local_f8[9] == local_118[9]); auVar10[10] = -(local_f8[10] == local_118[10]); auVar10[0xb] = -(local_f8[0xb] == local_118[0xb]); auVar10[0xc] = -(local_f8[0xc] == local_118[0xc]); auVar10[0xd] = -(local_f8[0xd] == local_118[0xd]); auVar10[0xe] = -(local_f8[0xe] == local_118[0xe]); auVar10[0xf] = -(local_f8[0xf] == local_118[0xf]); auVar10 = auVar10 & auVar12; if ((ushort)((ushort)(SUB161(auVar10 >> 7,0) & 1) | (ushort)(SUB161(auVar10 >> 0xf,0) & 1) << 1 | (ushort)(SUB161(auVar10 >> 0x17,0) & 1) << 2 | (ushort)(SUB161(auVar10 >> 0x1f,0) & 1) << 3 | (ushort)(SUB161(auVar10 >> 0x27,0) & 1) << 4 | (ushort)(SUB161(auVar10 >> 0x2f,0) & 1) << 5 | (ushort)(SUB161(auVar10 >> 0x37,0) & 1) << 6 | (ushort)(SUB161(auVar10 >> 0x3f,0) & 1) << 7 | (ushort)(SUB161(auVar10 >> 0x47,0) & 1) << 8 | (ushort)(SUB161(auVar10 >> 0x4f,0) & 1) << 9 | (ushort)(SUB161(auVar10 >> 0x57,0) & 1) << 10 | (ushort)(SUB161(auVar10 >> 0x5f,0) & 1) << 0xb | (ushort)(SUB161(auVar10 >> 0x67,0) & 1) << 0xc | (ushort)(SUB161(auVar10 >> 0x6f,0) & 1) << 0xd | (ushort)(SUB161(auVar10 >> 0x77,0) & 1) << 0xe | (ushort)(byte)(auVar10[0xf] >> 7) << 0xf) != 0xffff) { pcVar7 = "Code hash mismatch"; goto LAB_00129b9f; } } cVar2 = bytes_all_equal(0x20,&local_188,0); if (cVar2 == '\0') { auVar13[0] = -((char)local_178 == local_158[0]); auVar13[1] = -(local_178._1_1_ == local_158[1]); auVar13[2] = -(local_178._2_1_ == local_158[2]); auVar13[3] = -(local_178._3_1_ == local_158[3]); auVar13[4] = -(local_178._4_1_ == local_158[4]); auVar13[5] = -(local_178._5_1_ == local_158[5]); auVar13[6] = -(local_178._6_1_ == local_158[6]); auVar13[7] = -(local_178._7_1_ == local_158[7]); auVar13[8] = -((char)uStack_170 == local_158[8]); auVar13[9] = -(uStack_170._1_1_ == local_158[9]); auVar13[10] = -(uStack_170._2_1_ == local_158[10]); auVar13[0xb] = -(uStack_170._3_1_ == local_158[0xb]); auVar13[0xc] = -(uStack_170._4_1_ == local_158[0xc]); auVar13[0xd] = -(uStack_170._5_1_ == local_158[0xd]); auVar13[0xe] = -(uStack_170._6_1_ == local_158[0xe]); auVar13[0xf] = -(uStack_170._7_1_ == local_158[0xf]); auVar11[0] = -((char)local_188 == local_168[0]); auVar11[1] = -(local_188._1_1_ == local_168[1]); auVar11[2] = -(local_188._2_1_ == local_168[2]); auVar11[3] = -(local_188._3_1_ == local_168[3]); auVar11[4] = -(local_188._4_1_ == local_168[4]); auVar11[5] = -(local_188._5_1_ == local_168[5]); auVar11[6] = -(local_188._6_1_ == local_168[6]); auVar11[7] = -(local_188._7_1_ == local_168[7]); auVar11[8] = -((char)uStack_180 == local_168[8]); auVar11[9] = -(uStack_180._1_1_ == local_168[9]); auVar11[10] = -(uStack_180._2_1_ == local_168[10]); auVar11[0xb] = -(uStack_180._3_1_ == local_168[0xb]); auVar11[0xc] = -(uStack_180._4_1_ == local_168[0xc]); auVar11[0xd] = -(uStack_180._5_1_ == local_168[0xd]); auVar11[0xe] = -(uStack_180._6_1_ == local_168[0xe]); auVar11[0xf] = -(uStack_180._7_1_ == local_168[0xf]); auVar11 = auVar11 & auVar13; if ((ushort)((ushort)(SUB161(auVar11 >> 7,0) & 1) | (ushort)(SUB161(auVar11 >> 0xf,0) & 1) << 1 | (ushort)(SUB161(auVar11 >> 0x17,0) & 1) << 2 | (ushort)(SUB161(auVar11 >> 0x1f,0) & 1) << 3 | (ushort)(SUB161(auVar11 >> 0x27,0) & 1) << 4 | (ushort)(SUB161(auVar11 >> 0x2f,0) & 1) << 5 | (ushort)(SUB161(auVar11 >> 0x37,0) & 1) << 6 | (ushort)(SUB161(auVar11 >> 0x3f,0) & 1) << 7 | (ushort)(SUB161(auVar11 >> 0x47,0) & 1) << 8 | (ushort)(SUB161(auVar11 >> 0x4f,0) & 1) << 9 | (ushort)(SUB161(auVar11 >> 0x57,0) & 1) << 10 | (ushort)(SUB161(auVar11 >> 0x5f,0) & 1) << 0xb | (ushort)(SUB161(auVar11 >> 0x67,0) & 1) << 0xc | (ushort)(SUB161(auVar11 >> 0x6f,0) & 1) << 0xd | (ushort)(SUB161(auVar11 >> 0x77,0) & 1) << 0xe | (ushort)(byte)(auVar11[0xf] >> 7) << 0xf) != 0xffff) { pcVar7 = "State root mismatch"; goto LAB_00129b9f; } } else { local_178 = local_158._0_8_; uStack_170 = local_158._8_8_; local_188 = local_168._0_8_; uStack_180 = local_168._8_8_; } uVar8 = uVar8 + 1; bVar9 = uVar4 <= uVar8; } while (uVar8 != uVar4); } eth_verify_state_proof(param_1,&local_188); iVar3 = c4_verify_blockroot_signature(param_1,local_78,local_90,local_a8,0); if (iVar3 != 0) { return 0; } uVar1 = 1; uVar6 = 1; } else { *(long *)(param_1 + 0x78) = lVar5; LAB_00129848: uVar1 = 0; uVar6 = 0; } *(int1 *)(param_1 + 0x68) = uVar1; return uVar6; }
26,121
insert_dynamic
eloqsql/mysys/array.c
my_bool insert_dynamic(DYNAMIC_ARRAY *array, const void * element) { void *buffer; if (array->elements == array->max_element) { /* Call only when necessary */ if (!(buffer=alloc_dynamic(array))) return TRUE; } else { buffer=array->buffer+(array->elements * array->size_of_element); array->elements++; } memcpy(buffer,element,(size_t) array->size_of_element); return FALSE; }
O0
c
insert_dynamic: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movl 0x8(%rax), %eax movq -0x10(%rbp), %rcx cmpl 0xc(%rcx), %eax jne 0x325db movq -0x10(%rbp), %rdi callq 0x32630 movq %rax, -0x20(%rbp) cmpq $0x0, %rax jne 0x325d9 movb $0x1, -0x1(%rbp) jmp 0x32621 jmp 0x32607 movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rcx movl 0x8(%rcx), %ecx movq -0x10(%rbp), %rdx imull 0x14(%rdx), %ecx movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x8(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movl 0x14(%rax), %eax movl %eax, %edx callq 0x24200 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
insert_dynamic: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] mov eax, [rax+8] mov rcx, [rbp+var_10] cmp eax, [rcx+0Ch] jnz short loc_325DB mov rdi, [rbp+var_10] call alloc_dynamic mov [rbp+var_20], rax cmp rax, 0 jnz short loc_325D9 mov [rbp+var_1], 1 jmp short loc_32621 loc_325D9: jmp short loc_32607 loc_325DB: mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_10] mov ecx, [rcx+8] mov rdx, [rbp+var_10] imul ecx, [rdx+14h] mov ecx, ecx add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_10] mov ecx, [rax+8] add ecx, 1 mov [rax+8], ecx loc_32607: mov rdi, [rbp+var_20] mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov eax, [rax+14h] mov edx, eax call _memcpy mov [rbp+var_1], 0 loc_32621: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char insert_dynamic(long long a1, long long a2) { long long v3; // [rsp+0h] [rbp-20h] if ( *(_DWORD *)(a1 + 8) != *(_DWORD *)(a1 + 12) ) { v3 = (unsigned int)(*(_DWORD *)(a1 + 20) * (*(_DWORD *)(a1 + 8))++) + *(_QWORD *)a1; LABEL_6: memcpy(v3, a2, *(unsigned int *)(a1 + 20)); return 0; } v3 = alloc_dynamic(a1); if ( v3 ) goto LABEL_6; return 1; }
insert_dynamic: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x10] CMP EAX,dword ptr [RCX + 0xc] JNZ 0x001325db MOV RDI,qword ptr [RBP + -0x10] CALL 0x00132630 MOV qword ptr [RBP + -0x20],RAX CMP RAX,0x0 JNZ 0x001325d9 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00132621 LAB_001325d9: JMP 0x00132607 LAB_001325db: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RCX + 0x8] MOV RDX,qword ptr [RBP + -0x10] IMUL ECX,dword ptr [RDX + 0x14] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x8] ADD ECX,0x1 MOV dword ptr [RAX + 0x8],ECX LAB_00132607: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x14] MOV EDX,EAX CALL 0x00124200 MOV byte ptr [RBP + -0x1],0x0 LAB_00132621: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 insert_dynamic(long *param_1,void *param_2) { void *local_28; if ((int)param_1[1] == *(int *)((long)param_1 + 0xc)) { local_28 = (void *)alloc_dynamic(param_1); if (local_28 == (void *)0x0) { return 1; } } else { local_28 = (void *)(*param_1 + (ulong)(uint)((int)param_1[1] * *(int *)((long)param_1 + 0x14))); *(int *)(param_1 + 1) = (int)param_1[1] + 1; } memcpy(local_28,param_2,(ulong)*(uint *)((long)param_1 + 0x14)); return 0; }
26,122
queue_remove
eloqsql/mysys/queues.c
uchar *queue_remove(QUEUE *queue, uint idx) { uchar *element; DBUG_ASSERT(idx >= 1); DBUG_ASSERT(idx <= queue->elements); element= queue->root[idx]; queue->root[idx]= queue->root[queue->elements--]; queue_replace(queue, idx); return element; }
O3
c
queue_remove: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rax movl %esi, %ecx movq (%rax,%rcx,8), %rbx movl 0x10(%rdi), %edx leal -0x1(%rdx), %r8d movl %r8d, 0x10(%rdi) movq (%rax,%rdx,8), %rdx movq %rdx, (%rax,%rcx,8) callq 0xa31ff movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %rbp retq
queue_remove: push rbp mov rbp, rsp push rbx push rax mov rax, [rdi] mov ecx, esi mov rbx, [rax+rcx*8] mov edx, [rdi+10h] lea r8d, [rdx-1] mov [rdi+10h], r8d mov rdx, [rax+rdx*8] mov [rax+rcx*8], rdx call queue_replace mov rax, rbx add rsp, 8 pop rbx pop rbp retn
long long queue_remove(long long *a1, unsigned int a2) { long long v2; // rax long long v3; // rbx long long v4; // rdx v2 = *a1; v3 = *(_QWORD *)(*a1 + 8LL * a2); v4 = *((unsigned int *)a1 + 4); *((_DWORD *)a1 + 4) = v4 - 1; *(_QWORD *)(v2 + 8LL * a2) = *(_QWORD *)(v2 + 8 * v4); queue_replace(a1); return v3; }
queue_remove: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RAX,qword ptr [RDI] MOV ECX,ESI MOV RBX,qword ptr [RAX + RCX*0x8] MOV EDX,dword ptr [RDI + 0x10] LEA R8D,[RDX + -0x1] MOV dword ptr [RDI + 0x10],R8D MOV RDX,qword ptr [RAX + RDX*0x8] MOV qword ptr [RAX + RCX*0x8],RDX CALL 0x001a31ff MOV RAX,RBX ADD RSP,0x8 POP RBX POP RBP RET
int8 queue_remove(long *param_1,uint param_2) { uint uVar1; long lVar2; int8 uVar3; lVar2 = *param_1; uVar3 = *(int8 *)(lVar2 + (ulong)param_2 * 8); uVar1 = *(uint *)(param_1 + 2); *(uint *)(param_1 + 2) = uVar1 - 1; *(int8 *)(lVar2 + (ulong)param_2 * 8) = *(int8 *)(lVar2 + (ulong)uVar1 * 8); queue_replace(); return uVar3; }
26,123
check_mb_ujis
eloqsql/libmariadb/libmariadb/ma_charset.c
static unsigned int check_mb_ujis(const char *start, const char *end) { if (*(uchar*)start < 0x80) { return 0; /* invalid ujis character */ } if (valid_ujis(*(start)) && valid_ujis(*((start)+1))) { return 2; } if (valid_ujis_ss2(*(start)) && valid_ujis_kata(*((start)+1))) { return 2; } if (valid_ujis_ss3(*(start)) && (end-start) > 2 && valid_ujis(*((start)+1)) && valid_ujis(*((start)+2))) { return 3; } return 0; }
O0
c
check_mb_ujis: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0x80, %eax jge 0x49776 movl $0x0, -0x4(%rbp) jmp 0x498aa movq -0x10(%rbp), %rax movsbl (%rax), %ecx andl $0xff, %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x497d6 movq -0x10(%rbp), %rax movsbl (%rax), %eax andl $0xff, %eax cmpl $0xfe, %eax jg 0x497d6 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %ecx andl $0xff, %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x497d6 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax andl $0xff, %eax cmpl $0xfe, %eax jg 0x497d6 movl $0x2, -0x4(%rbp) jmp 0x498aa movq -0x10(%rbp), %rax movsbl (%rax), %eax andl $0xff, %eax cmpl $0x8e, %eax jne 0x49820 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %ecx andl $0xff, %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x49820 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax andl $0xff, %eax cmpl $0xdf, %eax jg 0x49820 movl $0x2, -0x4(%rbp) jmp 0x498aa movq -0x10(%rbp), %rax movsbl (%rax), %eax andl $0xff, %eax cmpl $0x8f, %eax jne 0x498a3 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax cmpq $0x2, %rax jle 0x498a3 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %ecx andl $0xff, %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x498a3 movq -0x10(%rbp), %rax movsbl 0x1(%rax), %eax andl $0xff, %eax cmpl $0xfe, %eax jg 0x498a3 movq -0x10(%rbp), %rax movsbl 0x2(%rax), %ecx andl $0xff, %ecx movl $0xa1, %eax cmpl %ecx, %eax jg 0x498a3 movq -0x10(%rbp), %rax movsbl 0x2(%rax), %eax andl $0xff, %eax cmpl $0xfe, %eax jg 0x498a3 movl $0x3, -0x4(%rbp) jmp 0x498aa movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nop
check_mb_ujis: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 80h jge short loc_49776 mov [rbp+var_4], 0 jmp loc_498AA loc_49776: mov rax, [rbp+var_10] movsx ecx, byte ptr [rax] and ecx, 0FFh mov eax, 0A1h cmp eax, ecx jg short loc_497D6 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] and eax, 0FFh cmp eax, 0FEh jg short loc_497D6 mov rax, [rbp+var_10] movsx ecx, byte ptr [rax+1] and ecx, 0FFh mov eax, 0A1h cmp eax, ecx jg short loc_497D6 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] and eax, 0FFh cmp eax, 0FEh jg short loc_497D6 mov [rbp+var_4], 2 jmp loc_498AA loc_497D6: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] and eax, 0FFh cmp eax, 8Eh jnz short loc_49820 mov rax, [rbp+var_10] movsx ecx, byte ptr [rax+1] and ecx, 0FFh mov eax, 0A1h cmp eax, ecx jg short loc_49820 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] and eax, 0FFh cmp eax, 0DFh jg short loc_49820 mov [rbp+var_4], 2 jmp loc_498AA loc_49820: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] and eax, 0FFh cmp eax, 8Fh jnz short loc_498A3 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] sub rax, rcx cmp rax, 2 jle short loc_498A3 mov rax, [rbp+var_10] movsx ecx, byte ptr [rax+1] and ecx, 0FFh mov eax, 0A1h cmp eax, ecx jg short loc_498A3 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+1] and eax, 0FFh cmp eax, 0FEh jg short loc_498A3 mov rax, [rbp+var_10] movsx ecx, byte ptr [rax+2] and ecx, 0FFh mov eax, 0A1h cmp eax, ecx jg short loc_498A3 mov rax, [rbp+var_10] movsx eax, byte ptr [rax+2] and eax, 0FFh cmp eax, 0FEh jg short loc_498A3 mov [rbp+var_4], 3 jmp short loc_498AA loc_498A3: mov [rbp+var_4], 0 loc_498AA: mov eax, [rbp+var_4] pop rbp retn
long long check_mb_ujis(unsigned __int8 *a1, long long a2) { if ( *a1 >= 0x80u ) { if ( *a1 < 0xA1u || *a1 == 255 || a1[1] < 0xA1u || a1[1] == 255 ) { if ( *a1 == 142 && a1[1] >= 0xA1u && a1[1] <= 0xDFu ) { return 2; } else if ( *a1 != 143 || a2 - (long long)a1 <= 2 || a1[1] < 0xA1u || a1[1] == 255 || a1[2] < 0xA1u || a1[2] == 255 ) { return 0; } else { return 3; } } else { return 2; } } else { return 0; } }
check_mb_ujis: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0x80 JGE 0x00149776 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001498aa LAB_00149776: MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX] AND ECX,0xff MOV EAX,0xa1 CMP EAX,ECX JG 0x001497d6 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] AND EAX,0xff CMP EAX,0xfe JG 0x001497d6 MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX + 0x1] AND ECX,0xff MOV EAX,0xa1 CMP EAX,ECX JG 0x001497d6 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] AND EAX,0xff CMP EAX,0xfe JG 0x001497d6 MOV dword ptr [RBP + -0x4],0x2 JMP 0x001498aa LAB_001497d6: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] AND EAX,0xff CMP EAX,0x8e JNZ 0x00149820 MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX + 0x1] AND ECX,0xff MOV EAX,0xa1 CMP EAX,ECX JG 0x00149820 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] AND EAX,0xff CMP EAX,0xdf JG 0x00149820 MOV dword ptr [RBP + -0x4],0x2 JMP 0x001498aa LAB_00149820: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] AND EAX,0xff CMP EAX,0x8f JNZ 0x001498a3 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX CMP RAX,0x2 JLE 0x001498a3 MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX + 0x1] AND ECX,0xff MOV EAX,0xa1 CMP EAX,ECX JG 0x001498a3 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x1] AND EAX,0xff CMP EAX,0xfe JG 0x001498a3 MOV RAX,qword ptr [RBP + -0x10] MOVSX ECX,byte ptr [RAX + 0x2] AND ECX,0xff MOV EAX,0xa1 CMP EAX,ECX JG 0x001498a3 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX + 0x2] AND EAX,0xff CMP EAX,0xfe JG 0x001498a3 MOV dword ptr [RBP + -0x4],0x3 JMP 0x001498aa LAB_001498a3: MOV dword ptr [RBP + -0x4],0x0 LAB_001498aa: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 check_mb_ujis(byte *param_1,long param_2) { int4 local_c; if (*param_1 < 0x80) { local_c = 0; } else if ((((*param_1 < 0xa1) || (0xfe < *param_1)) || (param_1[1] < 0xa1)) || (0xfe < param_1[1])) { if (((*param_1 == 0x8e) && (0xa0 < param_1[1])) && (param_1[1] < 0xe0)) { local_c = 2; } else if (((*param_1 == 0x8f) && (2 < param_2 - (long)param_1)) && ((0xa0 < param_1[1] && (((param_1[1] < 0xff && (0xa0 < param_1[2])) && (param_1[2] < 0xff)))))) { local_c = 3; } else { local_c = 0; } } else { local_c = 2; } return local_c; }
26,124
string_repeat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long)
monkey531[P]llama/common/common.cpp
std::string string_repeat(const std::string & str, size_t n) { if (n == 0) { return ""; } std::string result; result.reserve(str.length() * n); for (size_t i = 0; i < n; ++i) { result += str; } return result; }
O1
cpp
string_repeat(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, unsigned long): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x10(%rdi), %r12 movq %r12, (%rdi) testq %rdx, %rdx je 0x52bda movq %rdx, %r14 movq %rsi, %r15 movq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) movq 0x8(%rsi), %rsi imulq %rdx, %rsi movq %rbx, %rdi callq 0x19a90 movq (%r15), %rsi movq 0x8(%r15), %rdx movq %rbx, %rdi callq 0x191f0 decq %r14 jne 0x52bc4 jmp 0x52bec leaq 0x64c5c(%rip), %rdx # 0xb783d movq %rbx, %rdi movq %rdx, %rsi callq 0x22f42 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq jmp 0x52bfd movq %rax, %r14 movq (%rbx), %rdi cmpq %r12, %rdi je 0x52c14 movq (%r12), %rsi incq %rsi callq 0x196d0 movq %r14, %rdi callq 0x19c00
_Z13string_repeatRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm: push r15 push r14 push r12 push rbx push rax mov rbx, rdi lea r12, [rdi+10h] mov [rdi], r12 test rdx, rdx jz short loc_52BDA mov r14, rdx mov r15, rsi mov qword ptr [rbx+8], 0 mov byte ptr [rbx+10h], 0 mov rsi, [rsi+8] imul rsi, rdx mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm; std::string::reserve(ulong) loc_52BC4: mov rsi, [r15] mov rdx, [r15+8] mov rdi, rbx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) dec r14 jnz short loc_52BC4 jmp short loc_52BEC loc_52BDA: lea rdx, asc_B7839+4; "" mov rdi, rbx mov rsi, rdx 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) loc_52BEC: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn jmp short $+2 loc_52BFD: mov r14, rax mov rdi, [rbx]; void * cmp rdi, r12 jz short loc_52C14 mov rsi, [r12] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_52C14: mov rdi, r14 call __Unwind_Resume
long long string_repeat(long long a1, _QWORD *a2, long long a3) { long long v3; // r14 *(_QWORD *)a1 = a1 + 16; if ( a3 ) { v3 = a3; *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; std::string::reserve(a1, a3 * a2[1]); do { std::string::_M_append(a1, *a2, a2[1]); --v3; } while ( v3 ); } else { std::string::_M_construct<char const*>((_QWORD *)a1, "", (long long)""); } return a1; }
string_repeat: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA R12,[RDI + 0x10] MOV qword ptr [RDI],R12 TEST RDX,RDX JZ 0x00152bda MOV R14,RDX MOV R15,RSI MOV qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x10],0x0 MOV RSI,qword ptr [RSI + 0x8] IMUL RSI,RDX LAB_00152bbc: MOV RDI,RBX CALL 0x00119a90 LAB_00152bc4: MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R15 + 0x8] LAB_00152bcb: MOV RDI,RBX CALL 0x001191f0 LAB_00152bd3: DEC R14 JNZ 0x00152bc4 JMP 0x00152bec LAB_00152bda: LEA RDX,[0x1b783d] MOV RDI,RBX MOV RSI,RDX CALL 0x00122f42 LAB_00152bec: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* string_repeat(std::__cxx11::string const&, unsigned long) */ string * string_repeat(string *param_1,ulong param_2) { long in_RDX; *(string **)param_1 = param_1 + 0x10; if (in_RDX == 0) { std::__cxx11::string::_M_construct<char_const*>(param_1,&DAT_001b783d); } else { *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string)0x0; /* try { // try from 00152bbc to 00152bc3 has its CatchHandler @ 00152bfb */ std::__cxx11::string::reserve((ulong)param_1); do { /* try { // try from 00152bcb to 00152bd2 has its CatchHandler @ 00152bfd */ std::__cxx11::string::_M_append((char *)param_1,*(ulong *)param_2); in_RDX = in_RDX + -1; } while (in_RDX != 0); } return param_1; }
26,125
count_square
eloqsql/storage/maria/ma_rt_split.c
static double count_square(const double *a, int n_dim) { const double *end= a + n_dim * 2; double square= 1.0; do { square *= a[1] - a[0]; a+= 2; } while (a != end); return square; }
O0
c
count_square: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq -0x8(%rbp), %rax movl -0xc(%rbp), %ecx shll %ecx movslq %ecx, %rcx shlq $0x3, %rcx addq %rcx, %rax movq %rax, -0x18(%rbp) movsd 0xbd0ee(%rip), %xmm0 # 0x158c58 movsd %xmm0, -0x20(%rbp) movq -0x8(%rbp), %rax movsd 0x8(%rax), %xmm0 movq -0x8(%rbp), %rax subsd (%rax), %xmm0 mulsd -0x20(%rbp), %xmm0 movsd %xmm0, -0x20(%rbp) movq -0x8(%rbp), %rax addq $0x10, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq -0x18(%rbp), %rax jne 0x9bb6f movsd -0x20(%rbp), %xmm0 popq %rbp retq nopw (%rax,%rax)
count_square: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov rax, [rbp+var_8] mov ecx, [rbp+var_C] shl ecx, 1 movsxd rcx, ecx shl rcx, 3 add rax, rcx mov [rbp+var_18], rax movsd xmm0, cs:qword_158C58 movsd [rbp+var_20], xmm0 loc_9BB6F: mov rax, [rbp+var_8] movsd xmm0, qword ptr [rax+8] mov rax, [rbp+var_8] subsd xmm0, qword ptr [rax] mulsd xmm0, [rbp+var_20] movsd [rbp+var_20], xmm0 mov rax, [rbp+var_8] add rax, 10h mov [rbp+var_8], rax mov rax, [rbp+var_8] cmp rax, [rbp+var_18] jnz short loc_9BB6F movsd xmm0, [rbp+var_20] pop rbp retn
double count_square(double *a1, int a2) { double v3; // [rsp+0h] [rbp-20h] double *v4; // [rsp+18h] [rbp-8h] v4 = a1; v3 = 1.0; do { v3 = (v4[1] - *v4) * v3; v4 += 2; } while ( v4 != &a1[2 * a2] ); return v3; }
count_square: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RBP + -0xc] SHL ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x3 ADD RAX,RCX MOV qword ptr [RBP + -0x18],RAX MOVSD XMM0,qword ptr [0x00258c58] MOVSD qword ptr [RBP + -0x20],XMM0 LAB_0019bb6f: MOV RAX,qword ptr [RBP + -0x8] MOVSD XMM0,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x8] SUBSD XMM0,qword ptr [RAX] MULSD XMM0,qword ptr [RBP + -0x20] MOVSD qword ptr [RBP + -0x20],XMM0 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x10 MOV qword ptr [RBP + -0x8],RAX MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x18] JNZ 0x0019bb6f MOVSD XMM0,qword ptr [RBP + -0x20] POP RBP RET
double count_square(double *param_1,int param_2) { double local_28; double *local_10; local_28 = DAT_00258c58; local_10 = param_1; do { local_28 = (local_10[1] - *local_10) * local_28; local_10 = local_10 + 2; } while (local_10 != param_1 + (param_2 << 1)); return local_28; }
26,126
ma_gets
eloqsql/libmariadb/libmariadb/ma_io.c
char *ma_gets(char *ptr, size_t size, MA_FILE *file) { if (!file) return NULL; switch (file->type) { case MA_FILE_LOCAL: return fgets(ptr, (int)size, (FILE *)file->ptr); break; #ifdef HAVE_REMOTEIO case MA_FILE_REMOTE: return rio_plugin->methods->mgets(ptr, size, file); break; #endif default: return NULL; } }
O3
c
ma_gets: pushq %rbp movq %rsp, %rbp testq %rdx, %rdx je 0x297a6 movl (%rdx), %eax cmpl $0x2, %eax je 0x297aa cmpl $0x1, %eax jne 0x297a6 movq 0x8(%rdx), %rdx popq %rbp jmp 0x13700 xorl %eax, %eax popq %rbp retq leaq 0x240ff(%rip), %rax # 0x4d8b0 movq (%rax), %rax movq 0x58(%rax), %rax movq 0x20(%rax), %rax popq %rbp jmpq *%rax nop
ma_gets: push rbp mov rbp, rsp test rdx, rdx jz short loc_297A6 mov eax, [rdx] cmp eax, 2 jz short loc_297AA cmp eax, 1 jnz short loc_297A6 mov rdx, [rdx+8] pop rbp jmp _fgets loc_297A6: xor eax, eax pop rbp retn loc_297AA: lea rax, rio_plugin mov rax, [rax] mov rax, [rax+58h] mov rax, [rax+20h] pop rbp jmp rax
long long ma_gets(long long a1, long long a2, long long a3) { if ( !a3 ) return 0LL; if ( *(_DWORD *)a3 != 2 ) { if ( *(_DWORD *)a3 == 1 ) return fgets(a1, a2, *(_QWORD *)(a3 + 8)); return 0LL; } return (*(long long (**)(void))(*(_QWORD *)(rio_plugin + 88LL) + 32LL))(); }
ma_gets: PUSH RBP MOV RBP,RSP TEST RDX,RDX JZ 0x001297a6 MOV EAX,dword ptr [RDX] CMP EAX,0x2 JZ 0x001297aa CMP EAX,0x1 JNZ 0x001297a6 MOV RDX,qword ptr [RDX + 0x8] POP RBP JMP 0x00113700 LAB_001297a6: XOR EAX,EAX POP RBP RET LAB_001297aa: LEA RAX,[0x14d8b0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x58] MOV RAX,qword ptr [RAX + 0x20] POP RBP JMP RAX
char * ma_gets(char *param_1,int param_2,int *param_3) { char *pcVar1; if (param_3 != (int *)0x0) { if (*param_3 == 2) { /* WARNING: Could not recover jumptable at 0x001297bd. Too many branches */ /* WARNING: Treating indirect jump as call */ pcVar1 = (char *)(**(code **)(*(long *)(rio_plugin + 0x58) + 0x20))(); return pcVar1; } if (*param_3 == 1) { pcVar1 = fgets(param_1,param_2,*(FILE **)(param_3 + 2)); return pcVar1; } } return (char *)0x0; }
26,127
my_end
eloqsql/mysys/my_init.c
void my_end(int infoflag) { /* this code is suboptimal to workaround a bug in Sun CC: Sun C++ 5.6 2004/06/02 for x86, and should not be optimized until this compiler is not in use anymore */ FILE *info_file= DBUG_FILE; my_bool print_info= (info_file != stderr); if (!my_init_done) return; /* We do not use DBUG_ENTER here, as after cleanup DBUG is no longer operational, so we cannot use DBUG_RETURN. */ DBUG_PRINT("info",("Shutting down: infoflag: %d print_info: %d", infoflag, print_info)); if (!info_file) { info_file= stderr; print_info= 0; } if ((infoflag & MY_CHECK_ERROR) || print_info) { /* Test if some file is left open */ char ebuff[512]; uint i, open_files, open_streams; for (open_streams= open_files= i= 0 ; i < my_file_limit ; i++) { if (my_file_info[i].type == UNOPEN) continue; if (my_file_info[i].type == STREAM_BY_FOPEN || my_file_info[i].type == STREAM_BY_FDOPEN) open_streams++; else open_files++; #ifdef EXTRA_DEBUG fprintf(stderr, EE(EE_FILE_NOT_CLOSED), my_file_info[i].name, i); fputc('\n', stderr); #endif } if (open_files || open_streams) { my_snprintf(ebuff, sizeof(ebuff), EE(EE_OPEN_WARNING), open_files, open_streams); my_message_stderr(EE_OPEN_WARNING, ebuff, ME_BELL); DBUG_PRINT("error", ("%s", ebuff)); } #ifdef CHECK_UNLIKELY end_my_likely(info_file); #endif } free_charsets(); my_error_unregister_all(); my_once_free(); if ((infoflag & MY_GIVE_INFO) || print_info) { #ifdef HAVE_GETRUSAGE struct rusage rus; #ifdef HAVE_valgrind /* Purify assumes that rus is uninitialized after getrusage call */ bzero((char*) &rus, sizeof(rus)); #endif if (!getrusage(RUSAGE_SELF, &rus)) fprintf(info_file,"\n\ User time %.2f, System time %.2f\n\ Maximum resident set size %ld, Integral resident set size %ld\n\ Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n\ Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n\ Voluntary context switches %ld, Involuntary context switches %ld\n", (rus.ru_utime.tv_sec * SCALE_SEC + rus.ru_utime.tv_usec / SCALE_USEC) / 100.0, (rus.ru_stime.tv_sec * SCALE_SEC + rus.ru_stime.tv_usec / SCALE_USEC) / 100.0, rus.ru_maxrss, rus.ru_idrss, rus.ru_minflt, rus.ru_majflt, rus.ru_nswap, rus.ru_inblock, rus.ru_oublock, rus.ru_msgsnd, rus.ru_msgrcv, rus.ru_nsignals, rus.ru_nvcsw, rus.ru_nivcsw); #endif #if defined(_MSC_VER) _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR ); _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDERR ); _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDERR ); _CrtCheckMemory(); #endif } my_thread_end(); my_thread_global_end(); if (!(infoflag & MY_DONT_FREE_DBUG)) DBUG_END(); /* Must be done as late as possible */ my_mutex_end(); #if defined(SAFE_MUTEX) /* Check on destroying of mutexes. A few may be left that will get cleaned up by C++ destructors */ safe_mutex_end((infoflag & (MY_GIVE_INFO | MY_CHECK_ERROR)) ? stderr : (FILE *) 0); #endif /* defined(SAFE_MUTEX) */ #ifdef _WIN32 WSACleanup(); #endif /* At very last, delete mysys key, it is used everywhere including DBUG */ pthread_key_delete(THR_KEY_mysys); my_init_done= my_thr_key_mysys_exists= 0; }
O3
c
my_end: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x28(%rbp) leaq 0x33ea6b(%rip), %r12 # 0x364bb8 cmpb $0x0, (%r12) je 0x26323 movl %edi, %r14d movq 0x2c7e76(%rip), %rax # 0x2edfd8 movq (%rax), %rbx testb $0x1, %r14b je 0x261f8 leaq 0x2c81da(%rip), %rax # 0x2ee350 movl (%rax), %eax testq %rax, %rax je 0x261b6 leaq 0x2c81d4(%rip), %rcx # 0x2ee358 movq (%rcx), %rdx shlq $0x4, %rax xorl %esi, %esi xorl %r8d, %r8d xorl %ecx, %ecx movl 0x8(%rdx,%rsi), %edi leal -0x3(%rdi), %r9d cmpl $0x2, %r9d jae 0x261a5 incl %r8d jmp 0x261ab testl %edi, %edi je 0x261ab incl %ecx addq $0x10, %rsi cmpq %rsi, %rax jne 0x26192 jmp 0x261bb xorl %ecx, %ecx xorl %r8d, %r8d movl %ecx, %eax orl %r8d, %eax je 0x261f8 leaq 0x2c8677(%rip), %rax # 0x2ee840 movq 0x90(%rax), %rdx leaq -0x230(%rbp), %r15 movl $0x200, %esi # imm = 0x200 movq %r15, %rdi xorl %eax, %eax callq 0x58f3a movl $0x4, %edx movl $0x13, %edi movq %r15, %rsi callq 0x26760 callq 0x281d4 callq 0x2a35e callq 0x2696c testb $0x2, %r14b je 0x262f7 leaq -0x230(%rbp), %rsi xorl %edi, %edi callq 0x24180 testl %eax, %eax jne 0x262f7 imulq $0x64, -0x230(%rbp), %rsi movabsq $0x346dc5d63886594b, %rcx # imm = 0x346DC5D63886594B movq %rcx, %rax imulq -0x228(%rbp) movq %rdx, %rax shrq $0x3f, %rax sarq $0xb, %rdx addq %rax, %rdx addq %rsi, %rdx cvtsi2sd %rdx, %xmm0 movsd 0x396c7(%rip), %xmm2 # 0x5f928 divsd %xmm2, %xmm0 imulq $0x64, -0x220(%rbp), %rsi movq %rcx, %rax imulq -0x218(%rbp) movq %rdx, %rax shrq $0x3f, %rax sarq $0xb, %rdx addq %rax, %rdx addq %rsi, %rdx cvtsi2sd %rdx, %xmm1 divsd %xmm2, %xmm1 movq -0x210(%rbp), %rcx movq -0x200(%rbp), %r8 movq -0x1f0(%rbp), %r9 movups -0x1e8(%rbp), %xmm2 movups -0x1d8(%rbp), %xmm3 movups -0x1c8(%rbp), %xmm4 movups -0x1b8(%rbp), %xmm5 movq -0x1a8(%rbp), %rax movq %rax, 0x40(%rsp) movups %xmm5, 0x30(%rsp) movups %xmm4, 0x20(%rsp) movups %xmm3, 0x10(%rsp) movups %xmm2, (%rsp) leaq 0x34db5(%rip), %rdx # 0x5b09d movq %rbx, %rdi movl $0x1, %esi movb $0x2, %al callq 0x244d0 callq 0x2720c callq 0x270a3 callq 0x27390 leaq 0x33f58f(%rip), %rax # 0x36589c movl (%rax), %edi callq 0x24330 leaq 0x33f2b9(%rip), %rax # 0x3655d4 xorl %ecx, %ecx movb %cl, (%rax) movb %cl, (%r12) movq %fs:0x28, %rax cmpq -0x28(%rbp), %rax jne 0x26342 addq $0x260, %rsp # imm = 0x260 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq callq 0x242e0
my_end: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 260h mov rax, fs:28h mov [rbp+var_28], rax lea r12, my_init_done cmp byte ptr [r12], 0 jz loc_26323 mov r14d, edi mov rax, cs:stderr_ptr mov rbx, [rax] test r14b, 1 jz loc_261F8 lea rax, my_file_limit mov eax, [rax] test rax, rax jz short loc_261B6 lea rcx, my_file_info mov rdx, [rcx] shl rax, 4 xor esi, esi xor r8d, r8d xor ecx, ecx loc_26192: mov edi, [rdx+rsi+8] lea r9d, [rdi-3] cmp r9d, 2 jnb short loc_261A5 inc r8d jmp short loc_261AB loc_261A5: test edi, edi jz short loc_261AB inc ecx loc_261AB: add rsi, 10h cmp rax, rsi jnz short loc_26192 jmp short loc_261BB loc_261B6: xor ecx, ecx xor r8d, r8d loc_261BB: mov eax, ecx or eax, r8d jz short loc_261F8 lea rax, globerrs mov rdx, [rax+90h] lea r15, [rbp+var_230] mov esi, 200h mov rdi, r15 xor eax, eax call my_snprintf mov edx, 4 mov edi, 13h mov rsi, r15 call my_message_stderr loc_261F8: call free_charsets call my_error_unregister_all call my_once_free test r14b, 2 jz loc_262F7 lea rsi, [rbp+var_230] xor edi, edi call _getrusage test eax, eax jnz loc_262F7 imul rsi, [rbp+var_230], 64h ; 'd' mov rcx, 346DC5D63886594Bh mov rax, rcx imul [rbp+var_228] mov rax, rdx shr rax, 3Fh sar rdx, 0Bh add rdx, rax add rdx, rsi cvtsi2sd xmm0, rdx movsd xmm2, cs:qword_5F928 divsd xmm0, xmm2 imul rsi, [rbp+var_220], 64h ; 'd' mov rax, rcx imul [rbp+var_218] mov rax, rdx shr rax, 3Fh sar rdx, 0Bh add rdx, rax add rdx, rsi cvtsi2sd xmm1, rdx divsd xmm1, xmm2 mov rcx, [rbp+var_210] mov r8, [rbp+var_200] mov r9, [rbp+var_1F0] movups xmm2, [rbp+var_1E8] movups xmm3, [rbp+var_1D8] movups xmm4, [rbp+var_1C8] movups xmm5, [rbp+var_1B8] mov rax, [rbp+var_1A8] mov [rsp+280h+var_240], rax movups [rsp+280h+var_250], xmm5 movups [rsp+280h+var_260], xmm4 movups [rsp+280h+var_270], xmm3 movups [rsp+280h+var_280], xmm2 lea rdx, aUserTime2fSyst; "\nUser time %.2f, System time %.2f\nMax"... mov rdi, rbx mov esi, 1 mov al, 2 call ___fprintf_chk loc_262F7: call my_thread_end call my_thread_global_end call my_mutex_end lea rax, THR_KEY_mysys mov edi, [rax] call _pthread_key_delete lea rax, my_thr_key_mysys_exists xor ecx, ecx mov [rax], cl mov [r12], cl loc_26323: mov rax, fs:28h cmp rax, [rbp+var_28] jnz short loc_26342 add rsp, 260h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_26342: call ___stack_chk_fail
unsigned long long my_end(char a1, long long a2, long long a3, long long a4, long long a5, int a6) { long long v7; // rbx long long v8; // rsi int v9; // r8d int v10; // ecx int v11; // edi long long v13; // [rsp+50h] [rbp-230h] BYREF long long v14; // [rsp+58h] [rbp-228h] long long v15; // [rsp+60h] [rbp-220h] long long v16; // [rsp+68h] [rbp-218h] long long v17; // [rsp+70h] [rbp-210h] long long v18; // [rsp+80h] [rbp-200h] long long v19; // [rsp+90h] [rbp-1F0h] long long v20; // [rsp+98h] [rbp-1E8h] long long v21; // [rsp+A0h] [rbp-1E0h] long long v22; // [rsp+A8h] [rbp-1D8h] long long v23; // [rsp+B0h] [rbp-1D0h] long long v24; // [rsp+B8h] [rbp-1C8h] long long v25; // [rsp+C0h] [rbp-1C0h] long long v26; // [rsp+C8h] [rbp-1B8h] long long v27; // [rsp+D0h] [rbp-1B0h] long long v28; // [rsp+D8h] [rbp-1A8h] unsigned long long v29; // [rsp+258h] [rbp-28h] v29 = __readfsqword(0x28u); if ( my_init_done ) { v7 = stderr; if ( (a1 & 1) != 0 ) { if ( my_file_limit ) { v8 = 0LL; v9 = 0; v10 = 0; do { v11 = *(_DWORD *)((char *)my_file_info + v8 + 8); a6 = v11 - 3; if ( (unsigned int)(v11 - 3) >= 2 ) { if ( v11 ) ++v10; } else { ++v9; } v8 += 16LL; } while ( 16LL * my_file_limit != v8 ); } else { v10 = 0; v9 = 0; } if ( v9 | v10 ) { my_snprintf((unsigned int)&v13, 512, (unsigned int)globerrs[18], v10, v9, a6); my_message_stderr(19LL, &v13, 4LL); } } free_charsets(); my_error_unregister_all(); my_once_free(); if ( (a1 & 2) != 0 && !(unsigned int)getrusage(0LL, &v13) ) __fprintf_chk( v7, 1LL, "\n" "User time %.2f, System time %.2f\n" "Maximum resident set size %ld, Integral resident set size %ld\n" "Non-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\n" "Blocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\n" "Voluntary context switches %ld, Involuntary context switches %ld\n", (double)(100 * (int)v13 + (int)v14 / 10000) / 100.0, (double)(int)(100 * v15 + v16 / 10000) / 100.0, v17, v18, v19, v20, v21, v22, v23, v24, v25, v26, v27, v28); my_thread_end(); my_thread_global_end(); my_mutex_end(); pthread_key_delete(THR_KEY_mysys); my_thr_key_mysys_exists = 0; my_init_done = 0; } return __readfsqword(0x28u); }
my_end: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x28],RAX LEA R12,[0x464bb8] CMP byte ptr [R12],0x0 JZ 0x00126323 MOV R14D,EDI MOV RAX,qword ptr [0x003edfd8] MOV RBX,qword ptr [RAX] TEST R14B,0x1 JZ 0x001261f8 LEA RAX,[0x3ee350] MOV EAX,dword ptr [RAX] TEST RAX,RAX JZ 0x001261b6 LEA RCX,[0x3ee358] MOV RDX,qword ptr [RCX] SHL RAX,0x4 XOR ESI,ESI XOR R8D,R8D XOR ECX,ECX LAB_00126192: MOV EDI,dword ptr [RDX + RSI*0x1 + 0x8] LEA R9D,[RDI + -0x3] CMP R9D,0x2 JNC 0x001261a5 INC R8D JMP 0x001261ab LAB_001261a5: TEST EDI,EDI JZ 0x001261ab INC ECX LAB_001261ab: ADD RSI,0x10 CMP RAX,RSI JNZ 0x00126192 JMP 0x001261bb LAB_001261b6: XOR ECX,ECX XOR R8D,R8D LAB_001261bb: MOV EAX,ECX OR EAX,R8D JZ 0x001261f8 LEA RAX,[0x3ee840] MOV RDX,qword ptr [RAX + 0x90] LEA R15,[RBP + -0x230] MOV ESI,0x200 MOV RDI,R15 XOR EAX,EAX CALL 0x00158f3a MOV EDX,0x4 MOV EDI,0x13 MOV RSI,R15 CALL 0x00126760 LAB_001261f8: CALL 0x001281d4 CALL 0x0012a35e CALL 0x0012696c TEST R14B,0x2 JZ 0x001262f7 LEA RSI,[RBP + -0x230] XOR EDI,EDI CALL 0x00124180 TEST EAX,EAX JNZ 0x001262f7 IMUL RSI,qword ptr [RBP + -0x230],0x64 MOV RCX,0x346dc5d63886594b MOV RAX,RCX IMUL qword ptr [RBP + -0x228] MOV RAX,RDX SHR RAX,0x3f SAR RDX,0xb ADD RDX,RAX ADD RDX,RSI CVTSI2SD XMM0,RDX MOVSD XMM2,qword ptr [0x0015f928] DIVSD XMM0,XMM2 IMUL RSI,qword ptr [RBP + -0x220],0x64 MOV RAX,RCX IMUL qword ptr [RBP + -0x218] MOV RAX,RDX SHR RAX,0x3f SAR RDX,0xb ADD RDX,RAX ADD RDX,RSI CVTSI2SD XMM1,RDX DIVSD XMM1,XMM2 MOV RCX,qword ptr [RBP + -0x210] MOV R8,qword ptr [RBP + -0x200] MOV R9,qword ptr [RBP + -0x1f0] MOVUPS XMM2,xmmword ptr [RBP + -0x1e8] MOVUPS XMM3,xmmword ptr [RBP + -0x1d8] MOVUPS XMM4,xmmword ptr [RBP + -0x1c8] MOVUPS XMM5,xmmword ptr [RBP + -0x1b8] MOV RAX,qword ptr [RBP + -0x1a8] MOV qword ptr [RSP + 0x40],RAX MOVUPS xmmword ptr [RSP + 0x30],XMM5 MOVUPS xmmword ptr [RSP + 0x20],XMM4 MOVUPS xmmword ptr [RSP + 0x10],XMM3 MOVUPS xmmword ptr [RSP],XMM2 LEA RDX,[0x15b09d] MOV RDI,RBX MOV ESI,0x1 MOV AL,0x2 CALL 0x001244d0 LAB_001262f7: CALL 0x0012720c CALL 0x001270a3 CALL 0x00127390 LEA RAX,[0x46589c] MOV EDI,dword ptr [RAX] CALL 0x00124330 LEA RAX,[0x4655d4] XOR ECX,ECX MOV byte ptr [RAX],CL MOV byte ptr [R12],CL LAB_00126323: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x28] JNZ 0x00126342 ADD RSP,0x260 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00126342: CALL 0x001242e0
void my_end(ulong param_1) { int8 uVar1; int iVar2; long lVar3; int iVar4; long in_FS_OFFSET; rusage local_238 [3]; long local_30; local_30 = *(long *)(in_FS_OFFSET + 0x28); if (my_init_done != '\0') { uVar1 = *(int8 *)PTR_stderr_003edfd8; if ((param_1 & 1) != 0) { if ((ulong)my_file_limit == 0) { iVar2 = 0; iVar4 = 0; } else { lVar3 = 0; iVar4 = 0; iVar2 = 0; do { if (*(int *)(my_file_info + lVar3 + 8) - 3U < 2) { iVar4 = iVar4 + 1; } else if (*(int *)(my_file_info + lVar3 + 8) != 0) { iVar2 = iVar2 + 1; } lVar3 = lVar3 + 0x10; } while ((ulong)my_file_limit << 4 != lVar3); } if (iVar2 != 0 || iVar4 != 0) { my_snprintf(local_238,0x200,globerrs._144_8_); my_message_stderr(0x13,local_238,4); } } free_charsets(); my_error_unregister_all(); my_once_free(); if (((param_1 & 2) != 0) && (iVar2 = getrusage(RUSAGE_SELF,local_238), iVar2 == 0)) { __fprintf_chk((double)(local_238[0].ru_utime.tv_usec / 10000 + local_238[0].ru_utime.tv_sec * 100) / DAT_0015f928, (double)(local_238[0].ru_stime.tv_usec / 10000 + local_238[0].ru_stime.tv_sec * 100) / DAT_0015f928,uVar1,1, "\nUser time %.2f, System time %.2f\nMaximum resident set size %ld, Integral resident set size %ld\nNon-physical pagefaults %ld, Physical pagefaults %ld, Swaps %ld\nBlocks in %ld out %ld, Messages in %ld out %ld, Signals %ld\nVoluntary context switches %ld, Involuntary context switches %ld\n" ,local_238[0].ru_maxrss,local_238[0].ru_idrss,local_238[0].ru_minflt, (int4)local_238[0].ru_majflt,(int4)local_238[0].ru_nswap, (int4)local_238[0].ru_inblock,(int4)local_238[0].ru_oublock, (int4)local_238[0].ru_msgsnd,(int4)local_238[0].ru_msgrcv, (int4)local_238[0].ru_nsignals,(int4)local_238[0].ru_nvcsw, local_238[0].ru_nivcsw); } my_thread_end(); my_thread_global_end(); my_mutex_end(); pthread_key_delete(THR_KEY_mysys); my_thr_key_mysys_exists = 0; my_init_done = '\0'; } if (*(long *)(in_FS_OFFSET + 0x28) != local_30) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
26,128
main
giladroyz[P]FindPeaks/examples/usage_cpp.cpp
int main() { std::cout << "===== Basic Example =====\n\n"; basic_example(); std::cout << "=========================\n\n"; std::cout << "===== Medium Example =====\n\n"; medium_example(); std::cout << "==========================\n\n"; std::cout << "===== Advance Example =====\n\n"; advance_example(); std::cout << "===========================\n\n"; }
O2
cpp
main: pushq %rbx movq 0x770e(%rip), %rbx # 0x8fd8 leaq 0x383d(%rip), %rsi # 0x510e movq %rbx, %rdi callq 0x10d0 callq 0x126c leaq 0x3882(%rip), %rsi # 0x5167 movq %rbx, %rdi callq 0x10d0 leaq 0x3836(%rip), %rsi # 0x512a movq %rbx, %rdi callq 0x10d0 callq 0x1453 leaq 0x385e(%rip), %rsi # 0x5166 movq %rbx, %rdi callq 0x10d0 leaq 0x3830(%rip), %rsi # 0x5147 movq %rbx, %rdi callq 0x10d0 callq 0x1664 leaq 0x383a(%rip), %rsi # 0x5165 movq %rbx, %rdi callq 0x10d0 xorl %eax, %eax popq %rbx retq nop
main: push rbx mov rbx, cs:_ZSt4cout_ptr lea rsi, aBasicExample; "===== Basic Example =====\n\n" mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) call _Z13basic_examplev; basic_example(void) lea rsi, asc_5165+2; "=========================\n\n" mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, aMediumExample; "===== Medium Example =====\n\n" mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) call _Z14medium_examplev; medium_example(void) lea rsi, asc_5165+1; "==========================\n\n" mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) lea rsi, aAdvanceExample; "===== Advance Example =====\n\n" mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) call _Z15advance_examplev; advance_example(void) lea rsi, asc_5165; "===========================\n\n" mov rdi, rbx call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) xor eax, eax pop rbx retn
int main(int argc, const char **argv, const char **envp) { long long v3; // rdx long long v4; // rdx long long v5; // rdx long long v6; // rdx long long v7; // rdx std::operator<<<std::char_traits<char>>(&std::cout, "===== Basic Example =====\n\n", envp); basic_example(); std::operator<<<std::char_traits<char>>(&std::cout, "=========================\n\n", v3); std::operator<<<std::char_traits<char>>(&std::cout, "===== Medium Example =====\n\n", v4); medium_example(); std::operator<<<std::char_traits<char>>(&std::cout, "==========================\n\n", v5); std::operator<<<std::char_traits<char>>(&std::cout, "===== Advance Example =====\n\n", v6); advance_example(); std::operator<<<std::char_traits<char>>(&std::cout, "===========================\n\n", v7); return 0; }
main: PUSH RBX MOV RBX,qword ptr [0x00108fd8] LEA RSI,[0x10510e] MOV RDI,RBX CALL 0x001010d0 CALL 0x0010126c LEA RSI,[0x105167] MOV RDI,RBX CALL 0x001010d0 LEA RSI,[0x10512a] MOV RDI,RBX CALL 0x001010d0 CALL 0x00101453 LEA RSI,[0x105166] MOV RDI,RBX CALL 0x001010d0 LEA RSI,[0x105147] MOV RDI,RBX CALL 0x001010d0 CALL 0x00101664 LEA RSI,[0x105165] MOV RDI,RBX CALL 0x001010d0 XOR EAX,EAX POP RBX RET
int8 main(void) { int *puVar1; puVar1 = PTR_cout_00108fd8; std::operator<<((ostream *)PTR_cout_00108fd8,"===== Basic Example =====\n\n"); basic_example(); std::operator<<((ostream *)puVar1,"=========================\n\n"); std::operator<<((ostream *)puVar1,"===== Medium Example =====\n\n"); medium_example(); std::operator<<((ostream *)puVar1,"==========================\n\n"); std::operator<<((ostream *)puVar1,"===== Advance Example =====\n\n"); advance_example(); std::operator<<((ostream *)puVar1,"===========================\n\n"); return 0; }
26,129
bf_remquo
bluesky950520[P]quickjs/libbf.c
int bf_remquo(slimb_t *pq, bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags, int rnd_mode) { bf_t q_s, *q = &q_s; int ret; bf_init(r->ctx, q); ret = bf_divrem(q, r, a, b, prec, flags, rnd_mode); bf_get_limb(pq, q, BF_GET_INT_MOD); bf_delete(q); return ret; }
O0
c
bf_remquo: subq $0x78, %rsp movl 0x80(%rsp), %eax movq %rdi, 0x70(%rsp) movq %rsi, 0x68(%rsp) movq %rdx, 0x60(%rsp) movq %rcx, 0x58(%rsp) movq %r8, 0x50(%rsp) movl %r9d, 0x4c(%rsp) leaq 0x20(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x68(%rsp), %rax movq (%rax), %rdi movq 0x18(%rsp), %rsi callq 0xe4cb0 movq 0x18(%rsp), %rdi movq 0x68(%rsp), %rsi movq 0x60(%rsp), %rdx movq 0x58(%rsp), %rcx movq 0x50(%rsp), %r8 movl 0x4c(%rsp), %r9d movl 0x80(%rsp), %eax movl %eax, (%rsp) callq 0xe79f0 movl %eax, 0x14(%rsp) movq 0x70(%rsp), %rdi movq 0x18(%rsp), %rsi movl $0x1, %edx callq 0xe8200 movq 0x18(%rsp), %rdi callq 0xe8110 movl 0x14(%rsp), %eax addq $0x78, %rsp retq nopl (%rax)
bf_remquo: sub rsp, 78h mov eax, [rsp+78h+arg_0] mov [rsp+78h+var_8], rdi mov [rsp+78h+var_10], rsi mov [rsp+78h+var_18], rdx mov [rsp+78h+var_20], rcx mov [rsp+78h+var_28], r8 mov [rsp+78h+var_2C], r9d lea rax, [rsp+78h+var_58] mov [rsp+78h+var_60], rax mov rax, [rsp+78h+var_10] mov rdi, [rax] mov rsi, [rsp+78h+var_60] call bf_init mov rdi, [rsp+78h+var_60] mov rsi, [rsp+78h+var_10] mov rdx, [rsp+78h+var_18] mov rcx, [rsp+78h+var_20] mov r8, [rsp+78h+var_28] mov r9d, [rsp+78h+var_2C] mov eax, [rsp+78h+arg_0] mov [rsp+78h+var_78], eax call bf_divrem mov [rsp+78h+var_64], eax mov rdi, [rsp+78h+var_8] mov rsi, [rsp+78h+var_60] mov edx, 1 call bf_get_limb mov rdi, [rsp+78h+var_60] call bf_delete_0 mov eax, [rsp+78h+var_64] add rsp, 78h retn
long long bf_remquo(long long a1, _QWORD *a2, long long a3, long long a4, long long a5, unsigned int a6, int a7) { long long v7; // rdx long long v8; // rcx long long v9; // r8 long long v10; // r9 unsigned int v12; // [rsp+14h] [rbp-64h] long long v13[5]; // [rsp+20h] [rbp-58h] BYREF unsigned int v14; // [rsp+4Ch] [rbp-2Ch] long long v15; // [rsp+50h] [rbp-28h] long long v16; // [rsp+58h] [rbp-20h] long long v17; // [rsp+60h] [rbp-18h] _QWORD *v18; // [rsp+68h] [rbp-10h] long long v19; // [rsp+70h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = a5; v14 = a6; bf_init(*a2, (long long)v13); v12 = bf_divrem((long long)v13, v18, v17, v16, v15, v14, a7); bf_get_limb(v19, v13, 1LL); bf_delete_0(v13, (long long)v13, v7, v8, v9, v10); return v12; }
bf_remquo: SUB RSP,0x78 MOV EAX,dword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x70],RDI MOV qword ptr [RSP + 0x68],RSI MOV qword ptr [RSP + 0x60],RDX MOV qword ptr [RSP + 0x58],RCX MOV qword ptr [RSP + 0x50],R8 MOV dword ptr [RSP + 0x4c],R9D LEA RAX,[RSP + 0x20] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RSP + 0x18] CALL 0x001e4cb0 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x68] MOV RDX,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RSP + 0x58] MOV R8,qword ptr [RSP + 0x50] MOV R9D,dword ptr [RSP + 0x4c] MOV EAX,dword ptr [RSP + 0x80] MOV dword ptr [RSP],EAX CALL 0x001e79f0 MOV dword ptr [RSP + 0x14],EAX MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x18] MOV EDX,0x1 CALL 0x001e8200 MOV RDI,qword ptr [RSP + 0x18] CALL 0x001e8110 MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x78 RET
int4 bf_remquo(int8 param_1,int8 *param_2,int8 param_3,int8 param_4, int8 param_5,int4 param_6,int4 param_7) { int4 uVar1; int1 local_58 [44]; int4 local_2c; int8 local_28; int8 local_20; int8 local_18; int8 *local_10; int8 local_8; local_2c = param_6; local_28 = param_5; local_20 = param_4; local_18 = param_3; local_10 = param_2; local_8 = param_1; bf_init(*param_2,local_58); uVar1 = bf_divrem(local_58,local_10,local_18,local_20,local_28,local_2c,param_7); bf_get_limb(local_8,local_58,1); bf_delete(local_58); return uVar1; }
26,130
bf_remquo
bluesky950520[P]quickjs/libbf.c
int bf_remquo(slimb_t *pq, bf_t *r, const bf_t *a, const bf_t *b, limb_t prec, bf_flags_t flags, int rnd_mode) { bf_t q_s, *q = &q_s; int ret; bf_init(r->ctx, q); ret = bf_divrem(q, r, a, b, prec, flags, rnd_mode); bf_get_limb(pq, q, BF_GET_INT_MOD); bf_delete(q); return ret; }
O3
c
bf_remquo: pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 movl 0x50(%rsp), %eax movq (%rsi), %rdi leaq 0x8(%rsp), %r15 movq %rdi, (%r15) movl $0x0, 0x8(%r15) movabsq $-0x8000000000000000, %rdi # imm = 0x8000000000000000 movq %rdi, 0x10(%r15) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%r15) movl %eax, (%rsp) movq %r15, %rdi callq 0x888f2 movl %eax, %ebx movq %r14, %rdi movq %r15, %rsi movl $0x1, %edx callq 0x8a844 movq (%r15), %rax testq %rax, %rax je 0x88f25 movq 0x28(%rsp), %rsi testq %rsi, %rsi je 0x88f25 movq (%rax), %rdi xorl %edx, %edx callq *0x8(%rax) movl %ebx, %eax addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq
bf_remquo: push r15 push r14 push rbx sub rsp, 30h mov r14, rdi mov eax, [rsp+48h+arg_0] mov rdi, [rsi] lea r15, [rsp+48h+var_40] mov [r15], rdi mov dword ptr [r15+8], 0 mov rdi, 8000000000000000h mov [r15+10h], rdi xorps xmm0, xmm0 movups xmmword ptr [r15+18h], xmm0 mov [rsp+48h+var_48], eax mov rdi, r15 call bf_divrem mov ebx, eax mov rdi, r14 mov rsi, r15 mov edx, 1 call bf_get_int64 mov rax, [r15] test rax, rax jz short loc_88F25 mov rsi, [rsp+48h+var_20] test rsi, rsi jz short loc_88F25 mov rdi, [rax] xor edx, edx call qword ptr [rax+8] loc_88F25: mov eax, ebx add rsp, 30h pop rbx pop r14 pop r15 retn
long long bf_remquo(long long a1, __int128 *a2, long long a3, long long a4, long long a5, unsigned int a6, int a7) { unsigned int v7; // ebx _QWORD *v9; // [rsp+8h] [rbp-40h] BYREF int v10; // [rsp+10h] [rbp-38h] unsigned long long v11; // [rsp+18h] [rbp-30h] __int128 v12; // [rsp+20h] [rbp-28h] v9 = *(_QWORD **)a2; v10 = 0; v11 = 0x8000000000000000LL; v12 = 0LL; v7 = bf_divrem(&v9, a2, a3, a4, a5, a6, a7); bf_get_int64(a1, &v9, 1LL); if ( v9 && *((_QWORD *)&v12 + 1) ) ((void ( *)(_QWORD, _QWORD, _QWORD))v9[1])(*v9, *((_QWORD *)&v12 + 1), 0LL); return v7; }
bf_remquo: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI MOV EAX,dword ptr [RSP + 0x50] MOV RDI,qword ptr [RSI] LEA R15,[RSP + 0x8] MOV qword ptr [R15],RDI MOV dword ptr [R15 + 0x8],0x0 MOV RDI,-0x8000000000000000 MOV qword ptr [R15 + 0x10],RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [R15 + 0x18],XMM0 MOV dword ptr [RSP],EAX MOV RDI,R15 CALL 0x001888f2 MOV EBX,EAX MOV RDI,R14 MOV RSI,R15 MOV EDX,0x1 CALL 0x0018a844 MOV RAX,qword ptr [R15] TEST RAX,RAX JZ 0x00188f25 MOV RSI,qword ptr [RSP + 0x28] TEST RSI,RSI JZ 0x00188f25 MOV RDI,qword ptr [RAX] XOR EDX,EDX CALL qword ptr [RAX + 0x8] LAB_00188f25: MOV EAX,EBX ADD RSP,0x30 POP RBX POP R14 POP R15 RET
int4 bf_remquo(int8 param_1,int8 *param_2) { int4 uVar1; int8 *local_40; int4 local_38; int8 local_30; int8 local_28; long lStack_20; local_40 = (int8 *)*param_2; local_38 = 0; local_30 = 0x8000000000000000; local_28 = 0; lStack_20 = 0; uVar1 = bf_divrem(&local_40); bf_get_int64(param_1,&local_40,1); if ((local_40 != (int8 *)0x0) && (lStack_20 != 0)) { (*(code *)local_40[1])(*local_40,lStack_20,0); } return uVar1; }
26,131
cxxopts::exceptions::option_already_exists::~option_already_exists()
shubhamoy[P]dir2txt/include/cxxopts.hpp
explicit option_already_exists(const std::string& option) : specification("Option " + LQUOTE + option + RQUOTE + " already exists") { }
O3
cpp
cxxopts::exceptions::option_already_exists::~option_already_exists(): pushq %rbx movq %rdi, %rbx leaq 0x2ecaf(%rip), %rax # 0x4d368 movq %rax, (%rdi) movq 0x8(%rdi), %rdi leaq 0x18(%rbx), %rax cmpq %rax, %rdi je 0x1e6d4 movq (%rax), %rsi incq %rsi callq 0x8380 movq %rbx, %rdi callq 0x8610 movl $0x28, %esi movq %rbx, %rdi popq %rbx jmp 0x8380
_ZN7cxxopts10exceptions21option_already_existsD0Ev: push rbx mov rbx, rdi lea rax, off_4D368 mov [rdi], rax mov rdi, [rdi+8]; void * lea rax, [rbx+18h] cmp rdi, rax jz short loc_1E6D4 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_1E6D4: mov rdi, rbx; this call __ZNSt9exceptionD2Ev; std::exception::~exception() mov esi, 28h ; '('; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void cxxopts::exceptions::option_already_exists::~option_already_exists( cxxopts::exceptions::option_already_exists *this) { char *v2; // rdi *(_QWORD *)this = off_4D368; v2 = (char *)*((_QWORD *)this + 1); if ( v2 != (char *)this + 24 ) operator delete(v2, *((_QWORD *)this + 3) + 1LL); std::exception::~exception(this); operator delete(this, 0x28uLL); }
~option_already_exists: PUSH RBX MOV RBX,RDI LEA RAX,[0x14d368] MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x8] LEA RAX,[RBX + 0x18] CMP RDI,RAX JZ 0x0011e6d4 MOV RSI,qword ptr [RAX] INC RSI CALL 0x00108380 LAB_0011e6d4: MOV RDI,RBX CALL 0x00108610 MOV ESI,0x28 MOV RDI,RBX POP RBX JMP 0x00108380
/* cxxopts::exceptions::option_already_exists::~option_already_exists() */ void __thiscall cxxopts::exceptions::option_already_exists::~option_already_exists(option_already_exists *this) { *(int ***)this = &PTR__exception_0014d368; if (*(option_already_exists **)(this + 8) != this + 0x18) { operator_delete(*(option_already_exists **)(this + 8),*(long *)(this + 0x18) + 1); } std::exception::~exception((exception *)this); operator_delete(this,0x28); return; }
26,132
append_field(st_dynamic_string*, unsigned int, st_mysql_field*, char*, unsigned long, char)
eloqsql/client/mysqltest.cc
void append_field(DYNAMIC_STRING *ds, uint col_idx, MYSQL_FIELD* field, char* val, size_t len, my_bool is_null) { char null[]= "NULL"; if (col_idx < max_replace_column && replace_column[col_idx]) { val= replace_column[col_idx]; len= strlen(val); } else if (is_null) { val= null; len= 4; } #ifdef _WIN32 else if ((field->type == MYSQL_TYPE_DOUBLE || field->type == MYSQL_TYPE_FLOAT ) && field->decimals >= 31) { /* Convert 1.2e+018 to 1.2e+18 and 1.2e-018 to 1.2e-18 */ char *start= strchr(val, 'e'); if (start && strlen(start) >= 5 && (start[1] == '-' || start[1] == '+') && start[2] == '0') { start+=2; /* Now points at first '0' */ if (field->flags & ZEROFILL_FLAG) { /* Move all chars before the first '0' one step right */ memmove(val + 1, val, start - val); *val= '0'; } else { /* Move all chars after the first '0' one step left */ memmove(start, start + 1, strlen(start)); len--; } } } #endif if (!display_result_vertically) { if (col_idx) dynstr_append_mem(ds, "\t", 1); replace_dynstr_append_mem(ds, val, len); } else { dynstr_append(ds, field->name); dynstr_append_mem(ds, "\t", 1); replace_dynstr_append_mem(ds, val, len); dynstr_append_mem(ds, "\n", 1); } }
O3
cpp
append_field(st_dynamic_string*, unsigned int, st_mysql_field*, char*, unsigned long, char): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r12 movl %esi, %r13d movq %rdi, %rbx movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movb $0x0, -0x34(%rbp) movl $0x4c4c554e, -0x38(%rbp) # imm = 0x4C4C554E cmpl %esi, 0x3f26e7(%rip) # 0x45da04 jbe 0x6b33f movl %r13d, %eax leaq 0x3f26e7(%rip), %rdx # 0x45da10 movq (%rdx,%rax,8), %r14 testq %r14, %r14 je 0x6b33f movq %r14, %rdi callq 0x5f480 movq %rax, %r15 jmp 0x6b354 testb %r9b, %r9b movl $0x4, %r15d cmoveq %r8, %r15 leaq -0x38(%rbp), %r14 cmoveq %rcx, %r14 cmpb $0x0, 0x3f2eb5(%rip) # 0x45e210 je 0x6b3a1 movq (%r12), %rsi movq %rbx, %rdi callq 0x9eced leaq 0x85afc(%rip), %rsi # 0xf0e6c movl $0x1, %edx movq %rbx, %rdi callq 0x9ed13 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x63b1a leaq 0x858a9(%rip), %rsi # 0xf0c3b movl $0x1, %edx movq %rbx, %rdi callq 0x9ed13 jmp 0x6b3c8 testl %r13d, %r13d je 0x6b3ba leaq 0x85abf(%rip), %rsi # 0xf0e6c movl $0x1, %edx movq %rbx, %rdi callq 0x9ed13 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x63b1a movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x6b3e6 addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x5f320
_Z12append_fieldP17st_dynamic_stringjP14st_mysql_fieldPcmc: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rdx mov r13d, esi mov rbx, rdi mov rax, fs:28h mov [rbp+var_30], rax mov [rbp+var_34], 0 mov [rbp+var_38], 4C4C554Eh cmp cs:_ZL18max_replace_column, esi; max_replace_column jbe short loc_6B33F mov eax, r13d lea rdx, _ZL14replace_column; replace_column mov r14, [rdx+rax*8] test r14, r14 jz short loc_6B33F mov rdi, r14 call _strlen mov r15, rax jmp short loc_6B354 loc_6B33F: test r9b, r9b mov r15d, 4 cmovz r15, r8 lea r14, [rbp+var_38] cmovz r14, rcx loc_6B354: cmp cs:_ZL25display_result_vertically, 0; display_result_vertically jz short loc_6B3A1 mov rsi, [r12] mov rdi, rbx call dynstr_append lea rsi, asc_F0E6C; "\t" mov edx, 1 mov rdi, rbx call dynstr_append_mem mov rdi, rbx mov rsi, r14 mov rdx, r15 call _Z25replace_dynstr_append_memP17st_dynamic_stringPKcm; replace_dynstr_append_mem(st_dynamic_string *,char const*,ulong) lea rsi, aTheTwoFilesDif+14Fh; "\n" mov edx, 1 mov rdi, rbx call dynstr_append_mem jmp short loc_6B3C8 loc_6B3A1: test r13d, r13d jz short loc_6B3BA lea rsi, asc_F0E6C; "\t" mov edx, 1 mov rdi, rbx call dynstr_append_mem loc_6B3BA: mov rdi, rbx mov rsi, r14 mov rdx, r15 call _Z25replace_dynstr_append_memP17st_dynamic_stringPKcm; replace_dynstr_append_mem(st_dynamic_string *,char const*,ulong) loc_6B3C8: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_6B3E6 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6B3E6: call ___stack_chk_fail
unsigned long long append_field( long long a1, unsigned int a2, _QWORD *a3, unsigned __int8 *a4, unsigned long long a5, char a6) { unsigned __int8 *v7; // r14 unsigned long long v8; // r15 char v10[8]; // [rsp+8h] [rbp-38h] BYREF unsigned long long v11; // [rsp+10h] [rbp-30h] v11 = __readfsqword(0x28u); strcpy(v10, "NULL"); if ( max_replace_column > a2 && (v7 = (unsigned __int8 *)replace_column[a2]) != 0LL ) { v8 = strlen(replace_column[a2]); } else { v8 = 4LL; if ( !a6 ) v8 = a5; v7 = (unsigned __int8 *)v10; if ( !a6 ) v7 = a4; } if ( display_result_vertically ) { dynstr_append(a1, *a3); dynstr_append_mem(a1, "\t", 1LL); replace_dynstr_append_mem(a1, v7, v8); dynstr_append_mem(a1, "\n", 1LL); } else { if ( a2 ) dynstr_append_mem(a1, "\t", 1LL); replace_dynstr_append_mem(a1, v7, v8); } return __readfsqword(0x28u); }
append_field: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDX MOV R13D,ESI MOV RBX,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV byte ptr [RBP + -0x34],0x0 MOV dword ptr [RBP + -0x38],0x4c4c554e CMP dword ptr [0x0055da04],ESI JBE 0x0016b33f MOV EAX,R13D LEA RDX,[0x55da10] MOV R14,qword ptr [RDX + RAX*0x8] TEST R14,R14 JZ 0x0016b33f MOV RDI,R14 CALL 0x0015f480 MOV R15,RAX JMP 0x0016b354 LAB_0016b33f: TEST R9B,R9B MOV R15D,0x4 CMOVZ R15,R8 LEA R14,[RBP + -0x38] CMOVZ R14,RCX LAB_0016b354: CMP byte ptr [0x0055e210],0x0 JZ 0x0016b3a1 MOV RSI,qword ptr [R12] MOV RDI,RBX CALL 0x0019eced LEA RSI,[0x1f0e6c] MOV EDX,0x1 MOV RDI,RBX CALL 0x0019ed13 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00163b1a LEA RSI,[0x1f0c3b] MOV EDX,0x1 MOV RDI,RBX CALL 0x0019ed13 JMP 0x0016b3c8 LAB_0016b3a1: TEST R13D,R13D JZ 0x0016b3ba LEA RSI,[0x1f0e6c] MOV EDX,0x1 MOV RDI,RBX CALL 0x0019ed13 LAB_0016b3ba: MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x00163b1a LAB_0016b3c8: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0016b3e6 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016b3e6: CALL 0x0015f320
/* append_field(st_dynamic_string*, unsigned int, st_mysql_field*, char*, unsigned long, char) */ void append_field(st_dynamic_string *param_1,uint param_2,st_mysql_field *param_3,char *param_4, ulong param_5,char param_6) { ulong uVar1; char *__s; long in_FS_OFFSET; char local_40 [8]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); builtin_strncpy(local_40,"NULL",5); if ((param_2 < max_replace_column) && (__s = (char *)(&replace_column)[param_2], __s != (char *)0x0)) { uVar1 = strlen(__s); } else { uVar1 = 4; if (param_6 == '\0') { uVar1 = param_5; } __s = local_40; if (param_6 == '\0') { __s = param_4; } } if (display_result_vertically == '\0') { if (param_2 != 0) { dynstr_append_mem(param_1,&DAT_001f0e6c,1); } replace_dynstr_append_mem(param_1,__s,uVar1); } else { dynstr_append(param_1,*(int8 *)param_3); dynstr_append_mem(param_1,&DAT_001f0e6c,1); replace_dynstr_append_mem(param_1,__s,uVar1); dynstr_append_mem(param_1,"\n",1); } if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
26,133
inline_mysql_cond_destroy
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_destroy( mysql_cond_t *that) { #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) { PSI_COND_CALL(destroy_cond)(that->m_psi); that->m_psi= NULL; } #endif return pthread_cond_destroy(&that->m_cond); }
O0
c
inline_mysql_cond_destroy: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x30(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xfc014 leaq 0x1cb5a9(%rip), %rax # 0x2c75a0 movq (%rax), %rax movq 0x68(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rax movq $0x0, 0x30(%rax) movq -0x8(%rbp), %rdi callq 0x2a260 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
inline_mysql_cond_destroy_4: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_FC014 lea rax, PSI_server mov rax, [rax] mov rax, [rax+68h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax mov rax, [rbp+var_8] mov qword ptr [rax+30h], 0 loc_FC014: mov rdi, [rbp+var_8] call _pthread_cond_destroy add rsp, 10h pop rbp retn
long long inline_mysql_cond_destroy_4(long long a1) { if ( *(_QWORD *)(a1 + 48) ) { ((void ( *)(_QWORD))PSI_server[13])(*(_QWORD *)(a1 + 48)); *(_QWORD *)(a1 + 48) = 0LL; } return pthread_cond_destroy(a1); }
inline_mysql_cond_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001fc014 LEA RAX,[0x3c75a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x68] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x30],0x0 LAB_001fc014: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a260 ADD RSP,0x10 POP RBP RET
void inline_mysql_cond_destroy(pthread_cond_t *param_1) { if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x68))(param_1[1].__align); param_1[1].__align = 0; } pthread_cond_destroy(param_1); return; }
26,134
StartTree::BoundingMatrix<float, StartTree::NJMatrix<float>>::purgeRow(unsigned long)
iqtree3/utils/bionj2.cpp
void purgeRow(size_t r /*row index*/) { //Scan a row of the I matrix, so as to remove //entries that refer to clusters that are no longer //being processed. Remove the corresponding values //in the same row of the S matrix. T* values = entriesSorted.rows[r]; int* clusterIndices = entryToCluster.rows[r]; size_t w = 0; size_t i = 0; for (; i<n ; ++i ) { values[w] = values[i]; clusterIndices[w] = clusterIndices[i]; if ( infiniteDistance <= values[i] ) { break; } if ( clusterToRow[clusterIndices[i]] != notMappedToRow ) { ++w; } } if (w<n) { values[w] = infiniteDistance; } }
O0
cpp
StartTree::BoundingMatrix<float, StartTree::NJMatrix<float>>::purgeRow(unsigned long): subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq 0x30(%rsp), %rax movq %rax, (%rsp) movq 0x158(%rax), %rcx movq 0x28(%rsp), %rdx movq (%rcx,%rdx,8), %rcx movq %rcx, 0x20(%rsp) movq 0x188(%rax), %rax movq 0x28(%rsp), %rcx movq (%rax,%rcx,8), %rax movq %rax, 0x18(%rsp) movq $0x0, 0x10(%rsp) movq $0x0, 0x8(%rsp) movq (%rsp), %rcx movq 0x8(%rsp), %rax cmpq 0x8(%rcx), %rax jae 0x4dbd2 movq 0x20(%rsp), %rax movq 0x8(%rsp), %rcx movss (%rax,%rcx,4), %xmm0 movq 0x20(%rsp), %rax movq 0x10(%rsp), %rcx movss %xmm0, (%rax,%rcx,4) movq 0x18(%rsp), %rax movq 0x8(%rsp), %rcx movl (%rax,%rcx,4), %edx movq 0x18(%rsp), %rax movq 0x10(%rsp), %rcx movl %edx, (%rax,%rcx,4) movq 0x20(%rsp), %rax movq 0x8(%rsp), %rcx movss (%rax,%rcx,4), %xmm0 movss 0x1bb43(%rip), %xmm1 # 0x696c8 ucomiss %xmm1, %xmm0 jb 0x4db8c jmp 0x4dbd2 movq (%rsp), %rdi addq $0x98, %rdi movq 0x18(%rsp), %rax movq 0x8(%rsp), %rcx movslq (%rax,%rcx,4), %rsi callq 0x4d700 cmpl $-0x1, (%rax) je 0x4dbbd movq 0x10(%rsp), %rax addq $0x1, %rax movq %rax, 0x10(%rsp) jmp 0x4dbbf movq 0x8(%rsp), %rax addq $0x1, %rax movq %rax, 0x8(%rsp) jmp 0x4db23 movq (%rsp), %rcx movq 0x10(%rsp), %rax cmpq 0x8(%rcx), %rax jae 0x4dbf8 movq 0x20(%rsp), %rax movq 0x10(%rsp), %rcx movss 0x1bad5(%rip), %xmm0 # 0x696c8 movss %xmm0, (%rax,%rcx,4) addq $0x38, %rsp retq nopl (%rax)
_ZN9StartTree14BoundingMatrixIfNS_8NJMatrixIfEEE8purgeRowEm: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov rax, [rsp+38h+var_8] mov [rsp+38h+var_38], rax mov rcx, [rax+158h] mov rdx, [rsp+38h+var_10] mov rcx, [rcx+rdx*8] mov [rsp+38h+var_18], rcx mov rax, [rax+188h] mov rcx, [rsp+38h+var_10] mov rax, [rax+rcx*8] mov [rsp+38h+var_20], rax mov [rsp+38h+var_28], 0 mov [rsp+38h+var_30], 0 loc_4DB23: mov rcx, [rsp+38h+var_38] mov rax, [rsp+38h+var_30] cmp rax, [rcx+8] jnb loc_4DBD2 mov rax, [rsp+38h+var_18] mov rcx, [rsp+38h+var_30] movss xmm0, dword ptr [rax+rcx*4] mov rax, [rsp+38h+var_18] mov rcx, [rsp+38h+var_28] movss dword ptr [rax+rcx*4], xmm0 mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_30] mov edx, [rax+rcx*4] mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_28] mov [rax+rcx*4], edx mov rax, [rsp+38h+var_18] mov rcx, [rsp+38h+var_30] movss xmm0, dword ptr [rax+rcx*4] movss xmm1, cs:flt_696C8 ucomiss xmm0, xmm1 jb short loc_4DB8C jmp short loc_4DBD2 loc_4DB8C: mov rdi, [rsp+38h+var_38] add rdi, 98h mov rax, [rsp+38h+var_20] mov rcx, [rsp+38h+var_30] movsxd rsi, dword ptr [rax+rcx*4] call _ZNSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong) cmp dword ptr [rax], 0FFFFFFFFh jz short loc_4DBBD mov rax, [rsp+38h+var_28] add rax, 1 mov [rsp+38h+var_28], rax loc_4DBBD: jmp short $+2 loc_4DBBF: mov rax, [rsp+38h+var_30] add rax, 1 mov [rsp+38h+var_30], rax jmp loc_4DB23 loc_4DBD2: mov rcx, [rsp+38h+var_38] mov rax, [rsp+38h+var_28] cmp rax, [rcx+8] jnb short loc_4DBF8 mov rax, [rsp+38h+var_18] mov rcx, [rsp+38h+var_28] movss xmm0, cs:flt_696C8 movss dword ptr [rax+rcx*4], xmm0 loc_4DBF8: add rsp, 38h retn
unsigned long long StartTree::BoundingMatrix<float,StartTree::NJMatrix<float>>::purgeRow( _QWORD *a1, long long a2) { unsigned long long result; // rax unsigned long long i; // [rsp+8h] [rbp-30h] unsigned long long v4; // [rsp+10h] [rbp-28h] long long v5; // [rsp+18h] [rbp-20h] unsigned long long v6; // [rsp+20h] [rbp-18h] v6 = *(_QWORD *)(a1[43] + 8 * a2); v5 = *(_QWORD *)(a1[49] + 8 * a2); v4 = 0LL; for ( i = 0LL; i < a1[1]; ++i ) { *(_DWORD *)(v6 + 4 * v4) = *(_DWORD *)(v6 + 4 * i); *(_DWORD *)(v5 + 4 * v4) = *(_DWORD *)(v5 + 4 * i); if ( *(float *)(v6 + 4 * i) >= 9.9999996e35 ) break; if ( *(_DWORD *)std::vector<int>::operator[](a1 + 19, *(int *)(v5 + 4 * i)) != -1 ) ++v4; } result = v4; if ( v4 < a1[1] ) { result = v6; *(_DWORD *)(v6 + 4 * v4) = 2067830734; } return result; }
purgeRow: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP],RAX MOV RCX,qword ptr [RAX + 0x158] MOV RDX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RCX + RDX*0x8] MOV qword ptr [RSP + 0x20],RCX MOV RAX,qword ptr [RAX + 0x188] MOV RCX,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10],0x0 MOV qword ptr [RSP + 0x8],0x0 LAB_0014db23: MOV RCX,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x8] CMP RAX,qword ptr [RCX + 0x8] JNC 0x0014dbd2 MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x8] MOVSS XMM0,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x10] MOVSS dword ptr [RAX + RCX*0x4],XMM0 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x8] MOV EDX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOV dword ptr [RAX + RCX*0x4],EDX MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x8] MOVSS XMM0,dword ptr [RAX + RCX*0x4] MOVSS XMM1,dword ptr [0x001696c8] UCOMISS XMM0,XMM1 JC 0x0014db8c JMP 0x0014dbd2 LAB_0014db8c: MOV RDI,qword ptr [RSP] ADD RDI,0x98 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x8] MOVSXD RSI,dword ptr [RAX + RCX*0x4] CALL 0x0014d700 CMP dword ptr [RAX],-0x1 JZ 0x0014dbbd MOV RAX,qword ptr [RSP + 0x10] ADD RAX,0x1 MOV qword ptr [RSP + 0x10],RAX LAB_0014dbbd: JMP 0x0014dbbf LAB_0014dbbf: MOV RAX,qword ptr [RSP + 0x8] ADD RAX,0x1 MOV qword ptr [RSP + 0x8],RAX JMP 0x0014db23 LAB_0014dbd2: MOV RCX,qword ptr [RSP] MOV RAX,qword ptr [RSP + 0x10] CMP RAX,qword ptr [RCX + 0x8] JNC 0x0014dbf8 MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x10] MOVSS XMM0,dword ptr [0x001696c8] MOVSS dword ptr [RAX + RCX*0x4],XMM0 LAB_0014dbf8: ADD RSP,0x38 RET
/* StartTree::BoundingMatrix<float, StartTree::NJMatrix<float> >::purgeRow(unsigned long) */ void __thiscall StartTree::BoundingMatrix<float,StartTree::NJMatrix<float>>::purgeRow (BoundingMatrix<float,StartTree::NJMatrix<float>> *this,ulong param_1) { long lVar1; long lVar2; int *piVar3; ulong local_30; ulong local_28; lVar1 = *(long *)(*(long *)(this + 0x158) + param_1 * 8); lVar2 = *(long *)(*(long *)(this + 0x188) + param_1 * 8); local_28 = 0; for (local_30 = 0; local_30 < *(ulong *)(this + 8); local_30 = local_30 + 1) { *(int4 *)(lVar1 + local_28 * 4) = *(int4 *)(lVar1 + local_30 * 4); *(int4 *)(lVar2 + local_28 * 4) = *(int4 *)(lVar2 + local_30 * 4); if (DAT_001696c8 <= *(float *)(lVar1 + local_30 * 4)) break; piVar3 = (int *)std::vector<int,std::allocator<int>>::operator[] ((vector<int,std::allocator<int>> *)(this + 0x98), (long)*(int *)(lVar2 + local_30 * 4)); if (*piVar3 != -1) { local_28 = local_28 + 1; } } if (local_28 < *(ulong *)(this + 8)) { *(float *)(lVar1 + local_28 * 4) = DAT_001696c8; } return; }
26,135
StartTree::BoundingMatrix<float, StartTree::NJMatrix<float>>::purgeRow(unsigned long)
iqtree3/utils/bionj2.cpp
void purgeRow(size_t r /*row index*/) { //Scan a row of the I matrix, so as to remove //entries that refer to clusters that are no longer //being processed. Remove the corresponding values //in the same row of the S matrix. T* values = entriesSorted.rows[r]; int* clusterIndices = entryToCluster.rows[r]; size_t w = 0; size_t i = 0; for (; i<n ; ++i ) { values[w] = values[i]; clusterIndices[w] = clusterIndices[i]; if ( infiniteDistance <= values[i] ) { break; } if ( clusterToRow[clusterIndices[i]] != notMappedToRow ) { ++w; } } if (w<n) { values[w] = infiniteDistance; } }
O3
cpp
StartTree::BoundingMatrix<float, StartTree::NJMatrix<float>>::purgeRow(unsigned long): movq 0x8(%rdi), %rcx movq 0x188(%rdi), %rax movq (%rax,%rsi,8), %rax testq %rcx, %rcx je 0x27597 movq 0x1b8(%rdi), %rdx movq (%rdx,%rsi,8), %rsi movq 0xc8(%rdi), %rdi xorl %r8d, %r8d movsd 0x4245(%rip), %xmm0 # 0x2b7a8 xorl %edx, %edx movsd (%rax,%r8,8), %xmm1 movsd %xmm1, (%rax,%rdx,8) movslq (%rsi,%r8,4), %r9 movl %r9d, (%rsi,%rdx,4) ucomisd %xmm0, %xmm1 jae 0x27599 xorl %r10d, %r10d cmpl $-0x1, (%rdi,%r9,4) setne %r10b addq %r10, %rdx incq %r8 cmpq %r8, %rcx jne 0x27565 jmp 0x27599 xorl %edx, %edx cmpq %rcx, %rdx jae 0x275ac movabsq $0x476812f9c0000000, %rcx # imm = 0x476812F9C0000000 movq %rcx, (%rax,%rdx,8) retq nop
_ZN9StartTree14BoundingMatrixIdNS_11BIONJMatrixIdEEE8purgeRowEm: mov rcx, [rdi+8] mov rax, [rdi+188h] mov rax, [rax+rsi*8] test rcx, rcx jz short loc_27597 mov rdx, [rdi+1B8h] mov rsi, [rdx+rsi*8] mov rdi, [rdi+0C8h] xor r8d, r8d movsd xmm0, cs:qword_2B7A8 xor edx, edx loc_27565: movsd xmm1, qword ptr [rax+r8*8] movsd qword ptr [rax+rdx*8], xmm1 movsxd r9, dword ptr [rsi+r8*4] mov [rsi+rdx*4], r9d ucomisd xmm1, xmm0 jnb short loc_27599 xor r10d, r10d cmp dword ptr [rdi+r9*4], 0FFFFFFFFh setnz r10b add rdx, r10 inc r8 cmp rcx, r8 jnz short loc_27565 jmp short loc_27599 loc_27597: xor edx, edx loc_27599: cmp rdx, rcx jnb short locret_275AC mov rcx, 476812F9C0000000h mov [rax+rdx*8], rcx locret_275AC: retn
long long StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>::purgeRow(_QWORD *a1, long long a2) { unsigned long long v2; // rcx long long result; // rax long long v4; // rsi long long v5; // rdi long long v6; // r8 unsigned long long v7; // rdx double v8; // xmm1_8 long long v9; // r9 v2 = a1[1]; result = *(_QWORD *)(a1[49] + 8 * a2); if ( v2 ) { v4 = *(_QWORD *)(a1[55] + 8 * a2); v5 = a1[25]; v6 = 0LL; v7 = 0LL; do { v8 = *(double *)(result + 8 * v6); *(double *)(result + 8 * v7) = v8; v9 = *(int *)(v4 + 4 * v6); *(_DWORD *)(v4 + 4 * v7) = v9; if ( v8 >= 9.999999616903162e35 ) break; v7 += *(_DWORD *)(v5 + 4 * v9) != -1; ++v6; } while ( v2 != v6 ); } else { v7 = 0LL; } if ( v7 < v2 ) *(_QWORD *)(result + 8 * v7) = 0x476812F9C0000000LL; return result; }
purgeRow: MOV RCX,qword ptr [RDI + 0x8] MOV RAX,qword ptr [RDI + 0x188] MOV RAX,qword ptr [RAX + RSI*0x8] TEST RCX,RCX JZ 0x00127597 MOV RDX,qword ptr [RDI + 0x1b8] MOV RSI,qword ptr [RDX + RSI*0x8] MOV RDI,qword ptr [RDI + 0xc8] XOR R8D,R8D MOVSD XMM0,qword ptr [0x0012b7a8] XOR EDX,EDX LAB_00127565: MOVSD XMM1,qword ptr [RAX + R8*0x8] MOVSD qword ptr [RAX + RDX*0x8],XMM1 MOVSXD R9,dword ptr [RSI + R8*0x4] MOV dword ptr [RSI + RDX*0x4],R9D UCOMISD XMM1,XMM0 JNC 0x00127599 XOR R10D,R10D CMP dword ptr [RDI + R9*0x4],-0x1 SETNZ R10B ADD RDX,R10 INC R8 CMP RCX,R8 JNZ 0x00127565 JMP 0x00127599 LAB_00127597: XOR EDX,EDX LAB_00127599: CMP RDX,RCX JNC 0x001275ac MOV RCX,0x476812f9c0000000 MOV qword ptr [RAX + RDX*0x8],RCX LAB_001275ac: RET
/* StartTree::BoundingMatrix<double, StartTree::BIONJMatrix<double> >::purgeRow(unsigned long) */ void __thiscall StartTree::BoundingMatrix<double,StartTree::BIONJMatrix<double>>::purgeRow (BoundingMatrix<double,StartTree::BIONJMatrix<double>> *this,ulong param_1) { double dVar1; int iVar2; ulong uVar3; long lVar4; long lVar5; long lVar6; double dVar7; ulong uVar8; ulong uVar9; dVar7 = DAT_0012b7a8; uVar3 = *(ulong *)(this + 8); lVar4 = *(long *)(*(long *)(this + 0x188) + param_1 * 8); if (uVar3 == 0) { uVar8 = 0; } else { lVar5 = *(long *)(*(long *)(this + 0x1b8) + param_1 * 8); lVar6 = *(long *)(this + 200); uVar9 = 0; uVar8 = 0; do { dVar1 = *(double *)(lVar4 + uVar9 * 8); *(double *)(lVar4 + uVar8 * 8) = dVar1; iVar2 = *(int *)(lVar5 + uVar9 * 4); *(int *)(lVar5 + uVar8 * 4) = iVar2; if (dVar7 <= dVar1) break; uVar8 = uVar8 + (*(int *)(lVar6 + (long)iVar2 * 4) != -1); uVar9 = uVar9 + 1; } while (uVar3 != uVar9); } if (uVar8 < uVar3) { *(int8 *)(lVar4 + uVar8 * 8) = 0x476812f9c0000000; } return; }
26,136
js_parse_skip_parens_token
bluesky950520[P]quickjs/quickjs.c
static int js_parse_skip_parens_token(JSParseState *s, int *pbits, BOOL no_line_terminator) { char state[256]; size_t level = 0; JSParsePos pos; int last_tok, tok = TOK_EOF; int c, tok_len, bits = 0; /* protect from underflow */ state[level++] = 0; js_parse_get_pos(s, &pos); last_tok = 0; for (;;) { switch(s->token.val) { case '(': case '[': case '{': if (level >= sizeof(state)) goto done; state[level++] = s->token.val; break; case ')': if (state[--level] != '(') goto done; break; case ']': if (state[--level] != '[') goto done; break; case '}': c = state[--level]; if (c == '`') { /* continue the parsing of the template */ 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)) goto done; goto handle_template; } else if (c != '{') { goto done; } break; case TOK_TEMPLATE: handle_template: if (s->token.u.str.sep != '`') { /* '${' inside the template : closing '}' and continue parsing the template */ if (level >= sizeof(state)) goto done; state[level++] = '`'; } break; case TOK_EOF: goto done; case ';': if (level == 2) { bits |= SKIP_HAS_SEMI; } break; case TOK_ELLIPSIS: if (level == 2) { bits |= SKIP_HAS_ELLIPSIS; } break; case '=': bits |= SKIP_HAS_ASSIGNMENT; break; case TOK_DIV_ASSIGN: tok_len = 2; goto parse_regexp; case '/': tok_len = 1; parse_regexp: if (is_regexp_allowed(last_tok)) { s->buf_ptr -= tok_len; if (js_parse_regexp(s)) { /* XXX: should clear the exception */ goto done; } } break; } /* last_tok is only used to recognize regexps */ if (s->token.val == TOK_IDENT && (token_is_pseudo_keyword(s, JS_ATOM_of) || token_is_pseudo_keyword(s, JS_ATOM_yield))) { last_tok = TOK_OF; } else { last_tok = s->token.val; } if (next_token(s)) { /* XXX: should clear the exception generated by next_token() */ break; } if (level <= 1) { tok = s->token.val; if (token_is_pseudo_keyword(s, JS_ATOM_of)) tok = TOK_OF; if (no_line_terminator && s->last_line_num != s->token.line_num) tok = '\n'; break; } } done: if (pbits) { *pbits = bits; } if (js_parse_seek_token(s, &pos)) return -1; return tok; }
O1
c
js_parse_skip_parens_token: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x158, %rsp # imm = 0x158 movl %edx, 0x8(%rsp) movq %rsi, 0x18(%rsp) movq %rdi, %rbx movb $0x0, 0x50(%rsp) movsd 0x8(%rdi), %xmm0 movaps %xmm0, 0x40(%rsp) movsd 0x24(%rdi), %xmm0 movaps %xmm0, 0x30(%rsp) movq 0x30(%rdi), %rax movq %rax, 0x10(%rsp) movups 0x80(%rdi), %xmm0 movaps %xmm0, 0x20(%rsp) movl 0x58(%rdi), %eax movl %eax, 0xc(%rsp) leaq 0x20(%rdi), %r15 xorl %r14d, %r14d movl $0x1, %r12d xorl %ebp, %ebp movl (%r15), %r13d cmpl $0x3a, %r13d jg 0x63566 cmpl $-0x57, %r13d jle 0x6358f cmpl $0x28, %r13d jle 0x63609 cmpl $0x29, %r13d je 0x636b4 cmpl $0x2f, %r13d jne 0x636bf movq $-0x1, %rax jmp 0x635d8 cmpl $0x5c, %r13d jg 0x635c1 cmpl $0x3b, %r13d je 0x63629 cmpl $0x3d, %r13d je 0x63646 cmpl $0x5b, %r13d je 0x6360f jmp 0x636bf cmpl $-0x7e, %r13d je 0x63696 movq $-0x2, %rax cmpl $-0x7a, %r13d je 0x635d8 cmpl $-0x5b, %r13d jne 0x636bf movl %ebp, %eax orl $0x2, %eax cmpq $0x2, %r12 cmovel %eax, %ebp jmp 0x636bf cmpl $0x5d, %r13d je 0x63639 cmpl $0x7d, %r13d je 0x6364b cmpl $0x7b, %r13d je 0x6360f jmp 0x636bf cmpl $0x28, %r14d jg 0x636fe subl $-0x80, %r14d cmpl $0x32, %r14d ja 0x63710 movabsq $0x438000030001b, %rcx # imm = 0x438000030001B btq %r14, %rcx jb 0x636bf jmp 0x63710 jne 0x63722 cmpq $0xff, %r12 ja 0x6372a movb %r13b, 0x50(%rsp,%r12) incq %r12 jmp 0x636bf xorl %eax, %eax cmpq $0x2, %r12 sete %al orl %eax, %ebp jmp 0x636bf cmpb $0x5b, 0x4f(%rsp,%r12) je 0x636bc jmp 0x6372a orl $0x4, %ebp jmp 0x636bf movzbl 0x4f(%rsp,%r12), %eax decq %r12 cmpl $0x7b, %eax je 0x636bf movl $0xffffffaa, %r13d # imm = 0xFFFFFFAA cmpl $0x60, %eax jne 0x63765 movq %rbx, %rdi movq %r15, %rsi callq 0x344fa movl $0x0, 0x58(%rbx) movq 0x24(%rbx), %rax movq 0x70(%rbx), %rsi movq %rax, 0x8(%rbx) movq %rbx, %rdi callq 0x5f0a7 testl %eax, %eax jne 0x63765 cmpl $0x60, 0x48(%rbx) je 0x636bf cmpq $0xff, %r12 ja 0x6372a movb $0x60, 0x50(%rsp,%r12) jmp 0x63621 cmpb $0x28, 0x4f(%rsp,%r12) jne 0x6372a decq %r12 movl (%r15), %r14d cmpl $-0x7d, %r14d jne 0x636e6 cmpl $0x44, 0x38(%rbx) jne 0x636d4 cmpl $0x0, 0x3c(%rbx) je 0x636e0 cmpl $0x2d, 0x38(%rbx) jne 0x636e6 cmpl $0x0, 0x3c(%rbx) jne 0x636e6 movl $0xffffffd9, %r14d # imm = 0xFFFFFFD9 movq %rbx, %rdi callq 0x5d1cf testl %eax, %eax jne 0x6372a cmpq $0x1, %r12 ja 0x63530 jmp 0x63732 cmpl $0x29, %r14d je 0x636bf cmpl $0x5d, %r14d je 0x636bf cmpl $0x7d, %r14d je 0x636bf addq %rax, 0x70(%rbx) movq %rbx, %rdi callq 0x652b2 testl %eax, %eax je 0x636bf jmp 0x6372a cmpl $-0x56, %r13d jne 0x636bf jmp 0x63765 movl $0xffffffaa, %r13d # imm = 0xFFFFFFAA jmp 0x63765 movl (%r15), %r13d cmpl $-0x7d, %r13d jne 0x6374e cmpl $0x44, 0x38(%rbx) jne 0x6374e cmpl $0x0, 0x3c(%rbx) movl $0xffffffd9, %eax # imm = 0xFFFFFFD9 cmovel %eax, %r13d movl 0x8(%rsp), %eax testl %eax, %eax je 0x63765 movl 0x8(%rbx), %eax cmpl 0x24(%rbx), %eax movl $0xa, %eax cmovnel %eax, %r13d movq 0x18(%rsp), %rax testq %rax, %rax je 0x63771 movl %ebp, (%rax) movaps 0x40(%rsp), %xmm0 movlps %xmm0, 0x24(%rbx) movaps 0x30(%rsp), %xmm0 movlps %xmm0, 0x10(%rbx) movq 0x10(%rsp), %rax movq %rax, 0x70(%rbx) movaps 0x20(%rsp), %xmm0 movups %xmm0, 0x80(%rbx) movl 0xc(%rsp), %eax movl %eax, 0x58(%rbx) movq %rbx, %rdi callq 0x5d1cf xorl %ecx, %ecx negl %eax sbbl %ecx, %ecx orl %r13d, %ecx movl %ecx, %eax addq $0x158, %rsp # imm = 0x158 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_parse_skip_parens_token: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 158h mov [rsp+188h+var_180], edx mov [rsp+188h+var_170], rsi mov rbx, rdi mov [rsp+188h+var_138], 0 movsd xmm0, qword ptr [rdi+8] movaps [rsp+188h+var_148], xmm0 movsd xmm0, qword ptr [rdi+24h] movaps [rsp+188h+var_158], xmm0 mov rax, [rdi+30h] mov [rsp+188h+var_178], rax movups xmm0, xmmword ptr [rdi+80h] movaps [rsp+188h+var_168], xmm0 mov eax, [rdi+58h] mov [rsp+188h+var_17C], eax lea r15, [rdi+20h] xor r14d, r14d mov r12d, 1 xor ebp, ebp loc_63530: mov r13d, [r15] cmp r13d, 3Ah ; ':' jg short loc_63566 cmp r13d, 0FFFFFFA9h jle short loc_6358F cmp r13d, 28h ; '(' jle loc_63609 cmp r13d, 29h ; ')' jz loc_636B4 cmp r13d, 2Fh ; '/' jnz loc_636BF mov rax, 0FFFFFFFFFFFFFFFFh jmp short loc_635D8 loc_63566: cmp r13d, 5Ch ; '\' jg short loc_635C1 cmp r13d, 3Bh ; ';' jz loc_63629 cmp r13d, 3Dh ; '=' jz loc_63646 cmp r13d, 5Bh ; '[' jz loc_6360F jmp loc_636BF loc_6358F: cmp r13d, 0FFFFFF82h jz loc_63696 mov rax, 0FFFFFFFFFFFFFFFEh cmp r13d, 0FFFFFF86h jz short loc_635D8 cmp r13d, 0FFFFFFA5h jnz loc_636BF mov eax, ebp or eax, 2 cmp r12, 2 cmovz ebp, eax jmp loc_636BF loc_635C1: cmp r13d, 5Dh ; ']' jz short loc_63639 cmp r13d, 7Dh ; '}' jz short loc_6364B cmp r13d, 7Bh ; '{' jz short loc_6360F jmp loc_636BF loc_635D8: cmp r14d, 28h ; '(' jg loc_636FE sub r14d, 0FFFFFF80h cmp r14d, 32h ; '2' ja loc_63710 mov rcx, 438000030001Bh bt rcx, r14 jb loc_636BF jmp loc_63710 loc_63609: jnz loc_63722 loc_6360F: cmp r12, 0FFh ja loc_6372A mov [rsp+r12+188h+var_138], r13b loc_63621: inc r12 jmp loc_636BF loc_63629: xor eax, eax cmp r12, 2 setz al or ebp, eax jmp loc_636BF loc_63639: cmp byte ptr [rsp+r12+188h+var_148+0Fh], 5Bh ; '[' jz short loc_636BC jmp loc_6372A loc_63646: or ebp, 4 jmp short loc_636BF loc_6364B: movzx eax, byte ptr [rsp+r12+188h+var_148+0Fh] dec r12 cmp eax, 7Bh ; '{' jz short loc_636BF mov r13d, 0FFFFFFAAh cmp eax, 60h ; '`' jnz loc_63765 mov rdi, rbx mov rsi, r15 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_63765 loc_63696: cmp dword ptr [rbx+48h], 60h ; '`' jz short loc_636BF cmp r12, 0FFh ja loc_6372A mov [rsp+r12+188h+var_138], 60h ; '`' jmp loc_63621 loc_636B4: cmp byte ptr [rsp+r12+188h+var_148+0Fh], 28h ; '(' jnz short loc_6372A loc_636BC: dec r12 loc_636BF: mov r14d, [r15] cmp r14d, 0FFFFFF83h jnz short loc_636E6 cmp dword ptr [rbx+38h], 44h ; 'D' jnz short loc_636D4 cmp dword ptr [rbx+3Ch], 0 jz short loc_636E0 loc_636D4: cmp dword ptr [rbx+38h], 2Dh ; '-' jnz short loc_636E6 cmp dword ptr [rbx+3Ch], 0 jnz short loc_636E6 loc_636E0: mov r14d, 0FFFFFFD9h loc_636E6: mov rdi, rbx call next_token test eax, eax jnz short loc_6372A cmp r12, 1 ja loc_63530 jmp short loc_63732 loc_636FE: cmp r14d, 29h ; ')' jz short loc_636BF cmp r14d, 5Dh ; ']' jz short loc_636BF cmp r14d, 7Dh ; '}' jz short loc_636BF loc_63710: add [rbx+70h], rax mov rdi, rbx call js_parse_regexp test eax, eax jz short loc_636BF jmp short loc_6372A loc_63722: cmp r13d, 0FFFFFFAAh jnz short loc_636BF jmp short loc_63765 loc_6372A: mov r13d, 0FFFFFFAAh jmp short loc_63765 loc_63732: mov r13d, [r15] cmp r13d, 0FFFFFF83h jnz short loc_6374E cmp dword ptr [rbx+38h], 44h ; 'D' jnz short loc_6374E cmp dword ptr [rbx+3Ch], 0 mov eax, 0FFFFFFD9h cmovz r13d, eax loc_6374E: mov eax, [rsp+188h+var_180] test eax, eax jz short loc_63765 mov eax, [rbx+8] cmp eax, [rbx+24h] mov eax, 0Ah cmovnz r13d, eax loc_63765: mov rax, [rsp+188h+var_170] test rax, rax jz short loc_63771 mov [rax], ebp loc_63771: movaps xmm0, [rsp+188h+var_148] movlps qword ptr [rbx+24h], xmm0 movaps xmm0, [rsp+188h+var_158] movlps qword ptr [rbx+10h], xmm0 mov rax, [rsp+188h+var_178] mov [rbx+70h], rax movaps xmm0, [rsp+188h+var_168] movups xmmword ptr [rbx+80h], xmm0 mov eax, [rsp+188h+var_17C] mov [rbx+58h], eax mov rdi, rbx call next_token xor ecx, ecx neg eax sbb ecx, ecx or ecx, r13d mov eax, ecx add rsp, 158h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_parse_skip_parens_token( long long a1, char *a2, long long a3, long long a4, long long a5, long long a6, double a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { __m128 v14; // xmm0 int *v15; // r15 int v16; // r14d unsigned long long v17; // r12 int v18; // ebp int v19; // r13d long long v20; // rax unsigned long long v21; // r14 int v22; // eax double v23; // xmm4_8 double v24; // xmm5_8 int v26; // [rsp+8h] [rbp-180h] int v27; // [rsp+Ch] [rbp-17Ch] long long v28; // [rsp+10h] [rbp-178h] char *v29; // [rsp+18h] [rbp-170h] __m128 v30; // [rsp+30h] [rbp-158h] __m128 v31; // [rsp+40h] [rbp-148h] _BYTE v32[312]; // [rsp+50h] [rbp-138h] v26 = a3; v29 = a2; v32[0] = 0; v31 = (__m128)*(unsigned long long *)(a1 + 8); v30 = (__m128)*(unsigned long long *)(a1 + 36); v28 = *(_QWORD *)(a1 + 48); v14 = *(__m128 *)(a1 + 128); v27 = *(_DWORD *)(a1 + 88); v15 = (int *)(a1 + 32); v16 = 0; v17 = 1LL; v18 = 0; do { v19 = *v15; if ( *v15 > 58 ) { if ( v19 > 92 ) { if ( v19 == 93 ) { if ( v31.m128_i8[v17 + 15] != 91 ) goto LABEL_59; goto LABEL_42; } if ( v19 == 125 ) { v22 = v31.m128_u8[v17-- + 15]; if ( v22 == 123 ) goto LABEL_43; v19 = -86; if ( v22 != 96 ) goto LABEL_67; free_token((long long *)a1, v15); *(_DWORD *)(a1 + 88) = 0; a2 = *(char **)(a1 + 112); *(_QWORD *)(a1 + 8) = *(_QWORD *)(a1 + 36); if ( (unsigned int)js_parse_template_part(a1, a2, *(double *)v14.m128_u64, a8, a9, a10, v23, v24, a13, a14) ) goto LABEL_67; LABEL_38: if ( *(_DWORD *)(a1 + 72) == 96 ) goto LABEL_43; if ( v17 > 0xFF ) goto LABEL_59; v32[v17] = 96; LABEL_30: ++v17; goto LABEL_43; } if ( v19 != 123 ) goto LABEL_43; } else { if ( v19 == 59 ) { v18 |= v17 == 2; goto LABEL_43; } if ( v19 == 61 ) { v18 |= 4u; goto LABEL_43; } if ( v19 != 91 ) goto LABEL_43; } LABEL_28: if ( v17 > 0xFF ) goto LABEL_59; v32[v17] = v19; goto LABEL_30; } if ( v19 <= -87 ) { if ( v19 == -126 ) goto LABEL_38; v20 = -2LL; if ( v19 != -122 ) { if ( v19 == -91 && v17 == 2 ) v18 |= 2u; goto LABEL_43; } goto LABEL_23; } if ( v19 > 40 ) { if ( v19 != 41 ) { if ( v19 != 47 ) goto LABEL_43; v20 = -1LL; LABEL_23: if ( v16 > 40 ) { if ( v16 == 41 || v16 == 93 || v16 == 125 ) goto LABEL_43; } else { v21 = (unsigned int)(v16 + 128); if ( (unsigned int)v21 <= 0x32 ) { a4 = 0x438000030001BLL; if ( _bittest64(&a4, v21) ) goto LABEL_43; } } *(_QWORD *)(a1 + 112) += v20; if ( (unsigned int)js_parse_regexp(a1) ) goto LABEL_59; goto LABEL_43; } if ( v31.m128_i8[v17 + 15] != 40 ) goto LABEL_59; LABEL_42: --v17; goto LABEL_43; } if ( v19 == 40 ) goto LABEL_28; if ( v19 == -86 ) goto LABEL_67; LABEL_43: v16 = *v15; if ( *v15 == -125 && (*(_DWORD *)(a1 + 56) == 68 && !*(_DWORD *)(a1 + 60) || *(_DWORD *)(a1 + 56) == 45 && !*(_DWORD *)(a1 + 60)) ) { v16 = -39; } if ( (unsigned int)next_token(a1, v14, a8, a9, a10, a11, a12, a13, a14, (long long)a2, a3, a4, a5, a6) ) { LABEL_59: v19 = -86; goto LABEL_67; } } while ( v17 > 1 ); v19 = *v15; if ( *v15 == -125 && *(_DWORD *)(a1 + 56) == 68 && !*(_DWORD *)(a1 + 60) ) v19 = -39; if ( v26 && *(_DWORD *)(a1 + 8) != *(_DWORD *)(a1 + 36) ) v19 = 10; LABEL_67: if ( v29 ) *(_DWORD *)v29 = v18; _mm_storel_ps((double *)(a1 + 36), v31); _mm_storel_ps((double *)(a1 + 16), v30); *(_QWORD *)(a1 + 112) = v28; *(__m128 *)(a1 + 128) = v14; *(_DWORD *)(a1 + 88) = v27; return v19 | (unsigned int)-((unsigned int)next_token( a1, v14, a8, a9, a10, a11, a12, a13, a14, (long long)a2, a3, a4, a5, a6) != 0); }
js_parse_skip_parens_token: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x158 MOV dword ptr [RSP + 0x8],EDX MOV qword ptr [RSP + 0x18],RSI MOV RBX,RDI MOV byte ptr [RSP + 0x50],0x0 MOVSD XMM0,qword ptr [RDI + 0x8] MOVAPS xmmword ptr [RSP + 0x40],XMM0 MOVSD XMM0,qword ptr [RDI + 0x24] MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOV RAX,qword ptr [RDI + 0x30] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [RDI + 0x80] MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOV EAX,dword ptr [RDI + 0x58] MOV dword ptr [RSP + 0xc],EAX LEA R15,[RDI + 0x20] XOR R14D,R14D MOV R12D,0x1 XOR EBP,EBP LAB_00163530: MOV R13D,dword ptr [R15] CMP R13D,0x3a JG 0x00163566 CMP R13D,-0x57 JLE 0x0016358f CMP R13D,0x28 JLE 0x00163609 CMP R13D,0x29 JZ 0x001636b4 CMP R13D,0x2f JNZ 0x001636bf MOV RAX,-0x1 JMP 0x001635d8 LAB_00163566: CMP R13D,0x5c JG 0x001635c1 CMP R13D,0x3b JZ 0x00163629 CMP R13D,0x3d JZ 0x00163646 CMP R13D,0x5b JZ 0x0016360f JMP 0x001636bf LAB_0016358f: CMP R13D,-0x7e JZ 0x00163696 MOV RAX,-0x2 CMP R13D,-0x7a JZ 0x001635d8 CMP R13D,-0x5b JNZ 0x001636bf MOV EAX,EBP OR EAX,0x2 CMP R12,0x2 CMOVZ EBP,EAX JMP 0x001636bf LAB_001635c1: CMP R13D,0x5d JZ 0x00163639 CMP R13D,0x7d JZ 0x0016364b CMP R13D,0x7b JZ 0x0016360f JMP 0x001636bf LAB_001635d8: CMP R14D,0x28 JG 0x001636fe SUB R14D,-0x80 CMP R14D,0x32 JA 0x00163710 MOV RCX,0x438000030001b BT RCX,R14 JC 0x001636bf JMP 0x00163710 LAB_00163609: JNZ 0x00163722 LAB_0016360f: CMP R12,0xff JA 0x0016372a MOV byte ptr [RSP + R12*0x1 + 0x50],R13B LAB_00163621: INC R12 JMP 0x001636bf LAB_00163629: XOR EAX,EAX CMP R12,0x2 SETZ AL OR EBP,EAX JMP 0x001636bf LAB_00163639: CMP byte ptr [RSP + R12*0x1 + 0x4f],0x5b JZ 0x001636bc JMP 0x0016372a LAB_00163646: OR EBP,0x4 JMP 0x001636bf LAB_0016364b: MOVZX EAX,byte ptr [RSP + R12*0x1 + 0x4f] DEC R12 CMP EAX,0x7b JZ 0x001636bf MOV R13D,0xffffffaa CMP EAX,0x60 JNZ 0x00163765 MOV RDI,RBX MOV RSI,R15 CALL 0x001344fa 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 0x0015f0a7 TEST EAX,EAX JNZ 0x00163765 LAB_00163696: CMP dword ptr [RBX + 0x48],0x60 JZ 0x001636bf CMP R12,0xff JA 0x0016372a MOV byte ptr [RSP + R12*0x1 + 0x50],0x60 JMP 0x00163621 LAB_001636b4: CMP byte ptr [RSP + R12*0x1 + 0x4f],0x28 JNZ 0x0016372a LAB_001636bc: DEC R12 LAB_001636bf: MOV R14D,dword ptr [R15] CMP R14D,-0x7d JNZ 0x001636e6 CMP dword ptr [RBX + 0x38],0x44 JNZ 0x001636d4 CMP dword ptr [RBX + 0x3c],0x0 JZ 0x001636e0 LAB_001636d4: CMP dword ptr [RBX + 0x38],0x2d JNZ 0x001636e6 CMP dword ptr [RBX + 0x3c],0x0 JNZ 0x001636e6 LAB_001636e0: MOV R14D,0xffffffd9 LAB_001636e6: MOV RDI,RBX CALL 0x0015d1cf TEST EAX,EAX JNZ 0x0016372a CMP R12,0x1 JA 0x00163530 JMP 0x00163732 LAB_001636fe: CMP R14D,0x29 JZ 0x001636bf CMP R14D,0x5d JZ 0x001636bf CMP R14D,0x7d JZ 0x001636bf LAB_00163710: ADD qword ptr [RBX + 0x70],RAX MOV RDI,RBX CALL 0x001652b2 TEST EAX,EAX JZ 0x001636bf JMP 0x0016372a LAB_00163722: CMP R13D,-0x56 JNZ 0x001636bf JMP 0x00163765 LAB_0016372a: MOV R13D,0xffffffaa JMP 0x00163765 LAB_00163732: MOV R13D,dword ptr [R15] CMP R13D,-0x7d JNZ 0x0016374e CMP dword ptr [RBX + 0x38],0x44 JNZ 0x0016374e CMP dword ptr [RBX + 0x3c],0x0 MOV EAX,0xffffffd9 CMOVZ R13D,EAX LAB_0016374e: MOV EAX,dword ptr [RSP + 0x8] TEST EAX,EAX JZ 0x00163765 MOV EAX,dword ptr [RBX + 0x8] CMP EAX,dword ptr [RBX + 0x24] MOV EAX,0xa CMOVNZ R13D,EAX LAB_00163765: MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x00163771 MOV dword ptr [RAX],EBP LAB_00163771: MOVAPS XMM0,xmmword ptr [RSP + 0x40] MOVLPS qword ptr [RBX + 0x24],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x30] MOVLPS qword ptr [RBX + 0x10],XMM0 MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RBX + 0x70],RAX MOVAPS XMM0,xmmword ptr [RSP + 0x20] MOVUPS xmmword ptr [RBX + 0x80],XMM0 MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RBX + 0x58],EAX MOV RDI,RBX CALL 0x0015d1cf XOR ECX,ECX NEG EAX SBB ECX,ECX OR ECX,R13D MOV EAX,ECX ADD RSP,0x158 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint js_parse_skip_parens_token(long param_1,uint *param_2,int param_3) { uint *puVar1; int8 uVar2; int8 uVar3; int4 uVar4; uint uVar5; int8 uVar6; int4 uVar7; int4 uVar8; int4 uVar9; int4 uVar10; int iVar11; long lVar12; uint uVar13; ulong uVar14; uint uVar15; int8 uStack_140; char local_138 [264]; local_138[0] = '\0'; uVar2 = *(int8 *)(param_1 + 8); uStack_140 = 0; uVar3 = *(int8 *)(param_1 + 0x24); uVar6 = *(int8 *)(param_1 + 0x30); uVar7 = *(int4 *)(param_1 + 0x80); uVar8 = *(int4 *)(param_1 + 0x84); uVar9 = *(int4 *)(param_1 + 0x88); uVar10 = *(int4 *)(param_1 + 0x8c); uVar4 = *(int4 *)(param_1 + 0x58); puVar1 = (uint *)(param_1 + 0x20); uVar15 = 0; uVar14 = 1; uVar13 = 0; do { uVar5 = *puVar1; if ((int)uVar5 < 0x3b) { if ((int)uVar5 < -0x56) { if (uVar5 == 0xffffff82) { LAB_00163696: if (*(int *)(param_1 + 0x48) != 0x60) { if (0xff < uVar14) goto LAB_0016372a; local_138[uVar14] = '`'; LAB_00163621: uVar14 = uVar14 + 1; } } else { lVar12 = -2; if (uVar5 == 0xffffff86) { LAB_001635d8: if ((int)uVar15 < 0x29) { if ((0x32 < uVar15 + 0x80) || ((0x438000030001bU >> ((ulong)(uVar15 + 0x80) & 0x3f) & 1) == 0)) { LAB_00163710: *(long *)(param_1 + 0x70) = *(long *)(param_1 + 0x70) + lVar12; iVar11 = js_parse_regexp(param_1); if (iVar11 != 0) goto LAB_0016372a; } } else if (((uVar15 != 0x29) && (uVar15 != 0x5d)) && (uVar15 != 0x7d)) goto LAB_00163710; } else if ((uVar5 == 0xffffffa5) && (uVar14 == 2)) { uVar13 = uVar13 | 2; } } } else if ((int)uVar5 < 0x29) { if (uVar5 == 0x28) goto LAB_0016360f; if (uVar5 == 0xffffffaa) { uVar15 = 0xffffffaa; goto LAB_00163765; } } else { if (uVar5 == 0x29) { if (local_138[uVar14 - 1] == '(') goto LAB_001636bc; goto LAB_0016372a; } if (uVar5 == 0x2f) { lVar12 = -1; goto LAB_001635d8; } } } else { if ((int)uVar5 < 0x5d) { if (uVar5 == 0x3b) { uVar13 = uVar13 | uVar14 == 2; } else if (uVar5 == 0x3d) { uVar13 = uVar13 | 4; } else if (uVar5 == 0x5b) { LAB_0016360f: if (uVar14 < 0x100) { local_138[uVar14] = (char)uVar5; goto LAB_00163621; } goto LAB_0016372a; } goto LAB_001636bf; } if (uVar5 == 0x5d) { if (local_138[uVar14 - 1] == '[') { LAB_001636bc: uVar14 = uVar14 - 1; goto LAB_001636bf; } LAB_0016372a: uVar15 = 0xffffffaa; goto LAB_00163765; } if (uVar5 != 0x7d) { if (uVar5 == 0x7b) goto LAB_0016360f; goto LAB_001636bf; } lVar12 = uVar14 - 1; uVar14 = uVar14 - 1; if (local_138[lVar12] != '{') { uVar15 = 0xffffffaa; if (local_138[lVar12] == '`') { free_token(param_1,puVar1); *(int4 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x24); iVar11 = js_parse_template_part(param_1,*(int8 *)(param_1 + 0x70)); if (iVar11 == 0) goto LAB_00163696; } goto LAB_00163765; } } LAB_001636bf: uVar15 = *puVar1; if ((uVar15 == 0xffffff83) && (((*(int *)(param_1 + 0x38) == 0x44 && (*(int *)(param_1 + 0x3c) == 0)) || ((*(int *)(param_1 + 0x38) == 0x2d && (*(int *)(param_1 + 0x3c) == 0)))))) { uVar15 = 0xffffffd9; } iVar11 = next_token(param_1); if (iVar11 != 0) goto LAB_0016372a; } while (1 < uVar14); uVar15 = *puVar1; if (((uVar15 == 0xffffff83) && (*(int *)(param_1 + 0x38) == 0x44)) && (*(int *)(param_1 + 0x3c) == 0)) { uVar15 = 0xffffffd9; } if ((param_3 != 0) && (*(int *)(param_1 + 8) != *(int *)(param_1 + 0x24))) { uVar15 = 10; } LAB_00163765: if (param_2 != (uint *)0x0) { *param_2 = uVar13; } *(int8 *)(param_1 + 0x24) = uVar2; *(int8 *)(param_1 + 0x10) = uVar3; *(int8 *)(param_1 + 0x70) = uVar6; *(int4 *)(param_1 + 0x80) = uVar7; *(int4 *)(param_1 + 0x84) = uVar8; *(int4 *)(param_1 + 0x88) = uVar9; *(int4 *)(param_1 + 0x8c) = uVar10; *(int4 *)(param_1 + 0x58) = uVar4; iVar11 = next_token(param_1); return -(uint)(iVar11 != 0) | uVar15; }
26,137
js_parse_skip_parens_token
bluesky950520[P]quickjs/quickjs.c
static int js_parse_skip_parens_token(JSParseState *s, int *pbits, BOOL no_line_terminator) { char state[256]; size_t level = 0; JSParsePos pos; int last_tok, tok = TOK_EOF; int c, tok_len, bits = 0; /* protect from underflow */ state[level++] = 0; js_parse_get_pos(s, &pos); last_tok = 0; for (;;) { switch(s->token.val) { case '(': case '[': case '{': if (level >= sizeof(state)) goto done; state[level++] = s->token.val; break; case ')': if (state[--level] != '(') goto done; break; case ']': if (state[--level] != '[') goto done; break; case '}': c = state[--level]; if (c == '`') { /* continue the parsing of the template */ 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)) goto done; goto handle_template; } else if (c != '{') { goto done; } break; case TOK_TEMPLATE: handle_template: if (s->token.u.str.sep != '`') { /* '${' inside the template : closing '}' and continue parsing the template */ if (level >= sizeof(state)) goto done; state[level++] = '`'; } break; case TOK_EOF: goto done; case ';': if (level == 2) { bits |= SKIP_HAS_SEMI; } break; case TOK_ELLIPSIS: if (level == 2) { bits |= SKIP_HAS_ELLIPSIS; } break; case '=': bits |= SKIP_HAS_ASSIGNMENT; break; case TOK_DIV_ASSIGN: tok_len = 2; goto parse_regexp; case '/': tok_len = 1; parse_regexp: if (is_regexp_allowed(last_tok)) { s->buf_ptr -= tok_len; if (js_parse_regexp(s)) { /* XXX: should clear the exception */ goto done; } } break; } /* last_tok is only used to recognize regexps */ if (s->token.val == TOK_IDENT && (token_is_pseudo_keyword(s, JS_ATOM_of) || token_is_pseudo_keyword(s, JS_ATOM_yield))) { last_tok = TOK_OF; } else { last_tok = s->token.val; } if (next_token(s)) { /* XXX: should clear the exception generated by next_token() */ break; } if (level <= 1) { tok = s->token.val; if (token_is_pseudo_keyword(s, JS_ATOM_of)) tok = TOK_OF; if (no_line_terminator && s->last_line_num != s->token.line_num) tok = '\n'; break; } } done: if (pbits) { *pbits = bits; } if (js_parse_seek_token(s, &pos)) return -1; return tok; }
O2
c
js_parse_skip_parens_token: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x148, %rsp # imm = 0x148 movl %edx, 0xc(%rsp) movq %rsi, (%rsp) movq %rdi, %rbx movb $0x0, 0x40(%rsp) movsd 0x24(%rdi), %xmm0 movsd 0x8(%rdi), %xmm1 movlhps %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0] movaps %xmm1, 0x10(%rsp) movq 0x30(%rdi), %rax movq %rax, 0x28(%rsp) movups 0x80(%rdi), %xmm0 movaps %xmm0, 0x30(%rsp) movl 0x58(%rdi), %eax movl %eax, 0x20(%rsp) leaq 0x20(%rdi), %r15 xorl %ebp, %ebp pushq $0x1 popq %r14 pushq $-0x2 popq %r12 xorl %r13d, %r13d movl (%r15), %eax cmpl $-0x7e, %eax je 0x5512c movq %r12, %rcx cmpl $-0x7a, %eax je 0x55093 cmpl $-0x5b, %eax je 0x5507b cmpl $0x28, %eax je 0x55134 cmpl $0x29, %eax je 0x55163 cmpl $0x2f, %eax je 0x55090 cmpl $0x3b, %eax je 0x55153 cmpl $0x3d, %eax je 0x5514b cmpl $0x5b, %eax je 0x55134 cmpl $0x5d, %eax je 0x5516d cmpl $0x7b, %eax je 0x55134 cmpl $0x7d, %eax je 0x550e6 cmpl $-0x56, %eax jne 0x5517b jmp 0x55236 movl %r13d, %eax orl $0x2, %eax cmpq $0x2, %r14 cmovel %eax, %r13d pushq $-0x5b jmp 0x55191 pushq $-0x1 popq %rcx leal 0x80(%rbp), %eax cmpl $0x32, %eax ja 0x550b2 movabsq $0x438000030001b, %rdx # imm = 0x438000030001B btq %rax, %rdx jb 0x55178 cmpl $0x29, %ebp je 0x55178 cmpl $0x5d, %ebp je 0x55178 cmpl $0x7d, %ebp je 0x55178 addq %rcx, 0x70(%rbx) movq %rbx, %rdi callq 0x56540 testl %eax, %eax je 0x55178 jmp 0x551ca movzbl 0x3f(%rsp,%r14), %eax decq %r14 cmpl $0x7b, %eax je 0x551c6 cmpl $0x60, %eax jne 0x551ca movq %rbx, %rdi movq %r15, %rsi callq 0x2da5b andl $0x0, 0x58(%rbx) movq 0x24(%rbx), %rax movq 0x70(%rbx), %rsi movq %rax, 0x8(%rbx) movq %rbx, %rdi callq 0x5138c testl %eax, %eax jne 0x551ca cmpl $0x60, 0x48(%rbx) je 0x55178 movb $0x60, %al cmpq $0xff, %r14 ja 0x551ca movb %al, 0x40(%rsp,%r14) incq %r14 jmp 0x55178 orl $0x4, %r13d pushq $0x3d jmp 0x55191 xorl %eax, %eax cmpq $0x2, %r14 sete %al orl %eax, %r13d pushq $0x3b jmp 0x55191 cmpb $0x28, 0x3f(%rsp,%r14) je 0x55175 jmp 0x551ca cmpb $0x5b, 0x3f(%rsp,%r14) jne 0x551ca decq %r14 movl (%r15), %eax cmpl $-0x7d, %eax jne 0x55192 movq %rbx, %rdi pushq $0x44 popq %rsi callq 0x51b2a testl %eax, %eax je 0x551ac pushq $-0x27 popq %rax movl %eax, %ebp movq %rbx, %rdi callq 0x4fa4e testl %eax, %eax jne 0x551ca cmpq $0x1, %r14 ja 0x5500b jmp 0x551d4 movq %rbx, %rdi pushq $0x2d popq %rsi callq 0x51b2a testl %eax, %eax pushq $-0x27 popq %rax movl %eax, %ebp pushq $-0x7d popq %rax cmovel %eax, %ebp jmp 0x55194 pushq $0x7d jmp 0x55191 movq (%rsp), %rax pushq $-0x56 popq %r14 jmp 0x55204 movl 0x20(%rbx), %ebp pushq $0x44 popq %rsi movq %rbx, %rdi callq 0x51b2a testl %eax, %eax pushq $-0x27 popq %r14 cmovel %ebp, %r14d cmpl $0x0, 0xc(%rsp) je 0x55200 movl 0x8(%rbx), %eax cmpl 0x24(%rbx), %eax pushq $0xa popq %rax cmovnel %eax, %r14d movq (%rsp), %rax testq %rax, %rax je 0x5520c movl %r13d, (%rax) leaq 0x10(%rsp), %rsi movq %rbx, %rdi callq 0x51ad8 xorl %ecx, %ecx negl %eax sbbl %ecx, %ecx orl %r14d, %ecx movl %ecx, %eax addq $0x148, %rsp # imm = 0x148 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %eax, %r14d jmp 0x55200
js_parse_skip_parens_token: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 148h mov [rsp+178h+var_16C], edx mov [rsp+178h+var_178], rsi mov rbx, rdi mov [rsp+178h+var_138], 0 movsd xmm0, qword ptr [rdi+24h] movsd xmm1, qword ptr [rdi+8] movlhps xmm1, xmm0 movaps [rsp+178h+var_168], xmm1 mov rax, [rdi+30h] mov [rsp+178h+var_150], rax movups xmm0, xmmword ptr [rdi+80h] movaps [rsp+178h+var_148], xmm0 mov eax, [rdi+58h] mov [rsp+178h+var_158], eax lea r15, [rdi+20h] xor ebp, ebp push 1 pop r14 push 0FFFFFFFFFFFFFFFEh pop r12 xor r13d, r13d loc_5500B: mov eax, [r15] cmp eax, 0FFFFFF82h jz loc_5512C mov rcx, r12 cmp eax, 0FFFFFF86h jz short loc_55093 cmp eax, 0FFFFFFA5h jz short loc_5507B cmp eax, 28h ; '(' jz loc_55134 cmp eax, 29h ; ')' jz loc_55163 cmp eax, 2Fh ; '/' jz short loc_55090 cmp eax, 3Bh ; ';' jz loc_55153 cmp eax, 3Dh ; '=' jz loc_5514B cmp eax, 5Bh ; '[' jz loc_55134 cmp eax, 5Dh ; ']' jz loc_5516D cmp eax, 7Bh ; '{' jz loc_55134 cmp eax, 7Dh ; '}' jz short loc_550E6 cmp eax, 0FFFFFFAAh jnz loc_5517B jmp loc_55236 loc_5507B: mov eax, r13d or eax, 2 cmp r14, 2 cmovz r13d, eax push 0FFFFFFFFFFFFFFA5h jmp loc_55191 loc_55090: push 0FFFFFFFFFFFFFFFFh pop rcx loc_55093: lea eax, [rbp+80h] cmp eax, 32h ; '2' ja short loc_550B2 mov rdx, 438000030001Bh bt rdx, rax jb loc_55178 loc_550B2: cmp ebp, 29h ; ')' jz loc_55178 cmp ebp, 5Dh ; ']' jz loc_55178 cmp ebp, 7Dh ; '}' jz loc_55178 add [rbx+70h], rcx mov rdi, rbx call js_parse_regexp test eax, eax jz loc_55178 jmp loc_551CA loc_550E6: movzx eax, byte ptr [rsp+r14+178h+var_148+0Fh] dec r14 cmp eax, 7Bh ; '{' jz loc_551C6 cmp eax, 60h ; '`' jnz loc_551CA mov rdi, rbx mov rsi, r15 call free_token and 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_551CA loc_5512C: cmp dword ptr [rbx+48h], 60h ; '`' jz short loc_55178 mov al, 60h ; '`' loc_55134: cmp r14, 0FFh ja loc_551CA mov [rsp+r14+178h+var_138], al inc r14 jmp short loc_55178 loc_5514B: or r13d, 4 push 3Dh ; '=' jmp short loc_55191 loc_55153: xor eax, eax cmp r14, 2 setz al or r13d, eax push 3Bh ; ';' jmp short loc_55191 loc_55163: cmp byte ptr [rsp+r14+178h+var_148+0Fh], 28h ; '(' jz short loc_55175 jmp short loc_551CA loc_5516D: cmp byte ptr [rsp+r14+178h+var_148+0Fh], 5Bh ; '[' jnz short loc_551CA loc_55175: dec r14 loc_55178: mov eax, [r15] loc_5517B: cmp eax, 0FFFFFF83h jnz short loc_55192 mov rdi, rbx push 44h ; 'D' pop rsi call token_is_pseudo_keyword test eax, eax jz short loc_551AC push 0FFFFFFFFFFFFFFD9h loc_55191: pop rax loc_55192: mov ebp, eax loc_55194: mov rdi, rbx call next_token test eax, eax jnz short loc_551CA cmp r14, 1 ja loc_5500B jmp short loc_551D4 loc_551AC: mov rdi, rbx push 2Dh ; '-' pop rsi call token_is_pseudo_keyword test eax, eax push 0FFFFFFFFFFFFFFD9h pop rax mov ebp, eax push 0FFFFFFFFFFFFFF83h pop rax cmovz ebp, eax jmp short loc_55194 loc_551C6: push 7Dh ; '}' jmp short loc_55191 loc_551CA: mov rax, [rsp+178h+var_178] push 0FFFFFFFFFFFFFFAAh pop r14 jmp short loc_55204 loc_551D4: mov ebp, [rbx+20h] push 44h ; 'D' pop rsi mov rdi, rbx call token_is_pseudo_keyword test eax, eax push 0FFFFFFFFFFFFFFD9h pop r14 cmovz r14d, ebp cmp [rsp+178h+var_16C], 0 jz short loc_55200 mov eax, [rbx+8] cmp eax, [rbx+24h] push 0Ah pop rax cmovnz r14d, eax loc_55200: mov rax, [rsp+178h+var_178] loc_55204: test rax, rax jz short loc_5520C mov [rax], r13d loc_5520C: lea rsi, [rsp+178h+var_168] mov rdi, rbx call js_parse_seek_token xor ecx, ecx neg eax sbb ecx, ecx or ecx, r14d mov eax, ecx add rsp, 148h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_55236: mov r14d, eax jmp short loc_55200
long long js_parse_skip_parens_token( long long a1, char *a2, long long a3, long long a4, long long a5, long long a6, double a7, double a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { __m128 v14; // xmm1 __m128 v15; // xmm0 int *v16; // r15 int v17; // ebp unsigned long long v18; // r14 int v19; // r13d int v20; // eax unsigned long long v21; // rax int v22; // eax double v23; // xmm4_8 double v24; // xmm5_8 char *v25; // rax int v26; // ebp BOOL is_pseudo_keyword; // eax int v29; // r14d int v30; // [rsp-8h] [rbp-180h] char *v31; // [rsp+0h] [rbp-178h] int v32; // [rsp+Ch] [rbp-16Ch] __m128 v33; // [rsp+10h] [rbp-168h] BYREF int v34; // [rsp+20h] [rbp-158h] long long v35; // [rsp+28h] [rbp-150h] __m128 v36; // [rsp+30h] [rbp-148h] _BYTE v37[312]; // [rsp+40h] [rbp-138h] v32 = a3; v31 = a2; v37[0] = 0; v14 = _mm_movelh_ps((__m128)*(unsigned long long *)(a1 + 8), (__m128)*(unsigned long long *)(a1 + 36)); v33 = v14; v35 = *(_QWORD *)(a1 + 48); v15 = *(__m128 *)(a1 + 128); v36 = v15; v34 = *(_DWORD *)(a1 + 88); v16 = (int *)(a1 + 32); v17 = 0; v18 = 1LL; v19 = 0; do { v20 = *v16; if ( *v16 == -126 ) goto LABEL_30; a4 = -2LL; switch ( v20 ) { case -122: goto LABEL_20; case -91: if ( v18 == 2 ) v19 |= 2u; v30 = -91; goto LABEL_44; case 40: goto LABEL_32; case 41: if ( v36.m128_i8[v18 + 15] != 40 ) goto LABEL_53; LABEL_39: --v18; goto LABEL_40; case 47: a4 = -1LL; LABEL_20: v21 = (unsigned int)(v17 + 128); if ( (unsigned int)v21 > 0x32 || (a3 = 0x438000030001BLL, !_bittest64(&a3, v21)) ) { if ( v17 != 41 && v17 != 93 && v17 != 125 ) { *(_QWORD *)(a1 + 112) += a4; if ( (unsigned int)js_parse_regexp(a1) ) { LABEL_53: v25 = v31; v29 = -86; goto LABEL_60; } } } goto LABEL_40; case 59: v19 |= v18 == 2; v30 = 59; goto LABEL_44; case 61: v19 |= 4u; v30 = 61; LABEL_44: v20 = v30; LABEL_45: v17 = v20; goto LABEL_46; case 91: goto LABEL_32; case 93: if ( v36.m128_i8[v18 + 15] != 91 ) goto LABEL_53; goto LABEL_39; case 123: goto LABEL_32; case 125: v22 = v36.m128_u8[v18-- + 15]; if ( v22 == 123 ) { v30 = 125; goto LABEL_44; } if ( v22 != 96 ) goto LABEL_53; free_token((long long *)a1, v16); *(_DWORD *)(a1 + 88) = 0; a2 = *(char **)(a1 + 112); *(_QWORD *)(a1 + 8) = *(_QWORD *)(a1 + 36); if ( (unsigned int)js_parse_template_part(a1, a2, v15, v14, a9, a10, v23, v24, a13, a14) ) goto LABEL_53; LABEL_30: if ( *(_DWORD *)(a1 + 72) != 96 ) { LOBYTE(v20) = 96; LABEL_32: if ( v18 > 0xFF ) goto LABEL_53; v37[v18++] = v20; } LABEL_40: v20 = *v16; break; case -86: v29 = -86; goto LABEL_59; } if ( v20 != -125 ) goto LABEL_45; a2 = (char *)&dword_44; if ( token_is_pseudo_keyword((_DWORD *)a1, 68) ) { v30 = -39; goto LABEL_44; } a2 = (_BYTE *)(&qword_28 + 5); v17 = -39; if ( !token_is_pseudo_keyword((_DWORD *)a1, 45) ) v17 = -125; LABEL_46: if ( (unsigned int)next_token(a1, (long long)a2, a3, v15, v14, a9, a10, a11, a12, a13, a14, a4, a5, a6) ) goto LABEL_53; } while ( v18 > 1 ); v26 = *(_DWORD *)(a1 + 32); is_pseudo_keyword = token_is_pseudo_keyword((_DWORD *)a1, 68); v29 = -39; if ( !is_pseudo_keyword ) v29 = v26; if ( v32 && *(_DWORD *)(a1 + 8) != *(_DWORD *)(a1 + 36) ) v29 = 10; LABEL_59: v25 = v31; LABEL_60: if ( v25 ) *(_DWORD *)v25 = v19; return v29 | (unsigned int)-((unsigned int)js_parse_seek_token( a1, (long long)&v33, a3, a4, a5, a6, *(double *)v15.m128_u64, v14, a9, a10, a11, a12, a13, a14) != 0); }
js_parse_skip_parens_token: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x148 MOV dword ptr [RSP + 0xc],EDX MOV qword ptr [RSP],RSI MOV RBX,RDI MOV byte ptr [RSP + 0x40],0x0 MOVSD XMM0,qword ptr [RDI + 0x24] MOVSD XMM1,qword ptr [RDI + 0x8] MOVLHPS XMM1,XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM1 MOV RAX,qword ptr [RDI + 0x30] MOV qword ptr [RSP + 0x28],RAX MOVUPS XMM0,xmmword ptr [RDI + 0x80] MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOV EAX,dword ptr [RDI + 0x58] MOV dword ptr [RSP + 0x20],EAX LEA R15,[RDI + 0x20] XOR EBP,EBP PUSH 0x1 POP R14 PUSH -0x2 POP R12 XOR R13D,R13D LAB_0015500b: MOV EAX,dword ptr [R15] CMP EAX,-0x7e JZ 0x0015512c MOV RCX,R12 CMP EAX,-0x7a JZ 0x00155093 CMP EAX,-0x5b JZ 0x0015507b CMP EAX,0x28 JZ 0x00155134 CMP EAX,0x29 JZ 0x00155163 CMP EAX,0x2f JZ 0x00155090 CMP EAX,0x3b JZ 0x00155153 CMP EAX,0x3d JZ 0x0015514b CMP EAX,0x5b JZ 0x00155134 CMP EAX,0x5d JZ 0x0015516d CMP EAX,0x7b JZ 0x00155134 CMP EAX,0x7d JZ 0x001550e6 CMP EAX,-0x56 JNZ 0x0015517b JMP 0x00155236 LAB_0015507b: MOV EAX,R13D OR EAX,0x2 CMP R14,0x2 CMOVZ R13D,EAX PUSH -0x5b JMP 0x00155191 LAB_00155090: PUSH -0x1 POP RCX LAB_00155093: LEA EAX,[RBP + 0x80] CMP EAX,0x32 JA 0x001550b2 MOV RDX,0x438000030001b BT RDX,RAX JC 0x00155178 LAB_001550b2: CMP EBP,0x29 JZ 0x00155178 CMP EBP,0x5d JZ 0x00155178 CMP EBP,0x7d JZ 0x00155178 ADD qword ptr [RBX + 0x70],RCX MOV RDI,RBX CALL 0x00156540 TEST EAX,EAX JZ 0x00155178 JMP 0x001551ca LAB_001550e6: MOVZX EAX,byte ptr [RSP + R14*0x1 + 0x3f] DEC R14 CMP EAX,0x7b JZ 0x001551c6 CMP EAX,0x60 JNZ 0x001551ca MOV RDI,RBX MOV RSI,R15 CALL 0x0012da5b AND 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 0x0015138c TEST EAX,EAX JNZ 0x001551ca LAB_0015512c: CMP dword ptr [RBX + 0x48],0x60 JZ 0x00155178 MOV AL,0x60 LAB_00155134: CMP R14,0xff JA 0x001551ca MOV byte ptr [RSP + R14*0x1 + 0x40],AL INC R14 JMP 0x00155178 LAB_0015514b: OR R13D,0x4 PUSH 0x3d JMP 0x00155191 LAB_00155153: XOR EAX,EAX CMP R14,0x2 SETZ AL OR R13D,EAX PUSH 0x3b JMP 0x00155191 LAB_00155163: CMP byte ptr [RSP + R14*0x1 + 0x3f],0x28 JZ 0x00155175 JMP 0x001551ca LAB_0015516d: CMP byte ptr [RSP + R14*0x1 + 0x3f],0x5b JNZ 0x001551ca LAB_00155175: DEC R14 LAB_00155178: MOV EAX,dword ptr [R15] LAB_0015517b: CMP EAX,-0x7d JNZ 0x00155192 MOV RDI,RBX PUSH 0x44 POP RSI CALL 0x00151b2a TEST EAX,EAX JZ 0x001551ac PUSH -0x27 LAB_00155191: POP RAX LAB_00155192: MOV EBP,EAX LAB_00155194: MOV RDI,RBX CALL 0x0014fa4e TEST EAX,EAX JNZ 0x001551ca CMP R14,0x1 JA 0x0015500b JMP 0x001551d4 LAB_001551ac: MOV RDI,RBX PUSH 0x2d POP RSI CALL 0x00151b2a TEST EAX,EAX PUSH -0x27 POP RAX MOV EBP,EAX PUSH -0x7d POP RAX CMOVZ EBP,EAX JMP 0x00155194 LAB_001551c6: PUSH 0x7d JMP 0x00155191 LAB_001551ca: MOV RAX,qword ptr [RSP] PUSH -0x56 POP R14 JMP 0x00155204 LAB_001551d4: MOV EBP,dword ptr [RBX + 0x20] PUSH 0x44 POP RSI MOV RDI,RBX CALL 0x00151b2a TEST EAX,EAX PUSH -0x27 POP R14 CMOVZ R14D,EBP CMP dword ptr [RSP + 0xc],0x0 JZ 0x00155200 MOV EAX,dword ptr [RBX + 0x8] CMP EAX,dword ptr [RBX + 0x24] PUSH 0xa POP RAX CMOVNZ R14D,EAX LAB_00155200: MOV RAX,qword ptr [RSP] LAB_00155204: TEST RAX,RAX JZ 0x0015520c MOV dword ptr [RAX],R13D LAB_0015520c: LEA RSI,[RSP + 0x10] MOV RDI,RBX CALL 0x00151ad8 XOR ECX,ECX NEG EAX SBB ECX,ECX OR ECX,R14D MOV EAX,ECX ADD RSP,0x148 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00155236: MOV R14D,EAX JMP 0x00155200
uint js_parse_skip_parens_token(long param_1,uint *param_2,int param_3) { int *piVar1; uint uVar2; int iVar3; int iVar4; long lVar5; uint uVar6; uint uVar7; ulong uVar8; int8 local_168; int8 uStack_160; int4 local_158; int8 local_150; int4 local_148; int4 uStack_144; int4 uStack_140; int4 uStack_13c; char local_138 [264]; local_138[0] = '\0'; uStack_160 = *(int8 *)(param_1 + 0x24); local_168 = *(int8 *)(param_1 + 8); local_150 = *(int8 *)(param_1 + 0x30); local_148 = *(int4 *)(param_1 + 0x80); uStack_144 = *(int4 *)(param_1 + 0x84); uStack_140 = *(int4 *)(param_1 + 0x88); uStack_13c = *(int4 *)(param_1 + 0x8c); local_158 = *(int4 *)(param_1 + 0x58); piVar1 = (int *)(param_1 + 0x20); iVar4 = 0; uVar8 = 1; uVar6 = 0; do { iVar3 = *piVar1; if (iVar3 != -0x7e) { lVar5 = -2; if (iVar3 == -0x7a) { LAB_00155093: if ((((0x32 < iVar4 + 0x80U) || ((0x438000030001bU >> ((ulong)(iVar4 + 0x80U) & 0x3f) & 1) == 0)) && (iVar4 != 0x29)) && ((iVar4 != 0x5d && (iVar4 != 0x7d)))) { *(long *)(param_1 + 0x70) = *(long *)(param_1 + 0x70) + lVar5; iVar4 = js_parse_regexp(param_1); if (iVar4 != 0) goto LAB_001551ca; } goto LAB_00155178; } if (iVar3 == -0x5b) { if (uVar8 == 2) { uVar6 = uVar6 | 2; } iVar4 = -0x5b; goto LAB_00155194; } if (iVar3 == 0x28) goto LAB_00155134; if (iVar3 == 0x29) { if (local_138[uVar8 - 1] == '(') { LAB_00155175: uVar8 = uVar8 - 1; goto LAB_00155178; } goto LAB_001551ca; } if (iVar3 == 0x2f) { lVar5 = -1; goto LAB_00155093; } if (iVar3 == 0x3b) { uVar6 = uVar6 | uVar8 == 2; iVar4 = 0x3b; goto LAB_00155194; } if (iVar3 == 0x3d) { uVar6 = uVar6 | 4; iVar4 = 0x3d; goto LAB_00155194; } if (iVar3 == 0x5b) { LAB_00155134: if (uVar8 < 0x100) { local_138[uVar8] = (char)iVar3; uVar8 = uVar8 + 1; goto LAB_00155178; } LAB_001551ca: uVar7 = 0xffffffaa; } else { if (iVar3 == 0x5d) { if (local_138[uVar8 - 1] == '[') goto LAB_00155175; goto LAB_001551ca; } if (iVar3 == 0x7b) goto LAB_00155134; if (iVar3 == 0x7d) { lVar5 = uVar8 - 1; uVar8 = uVar8 - 1; if (local_138[lVar5] == '{') { iVar4 = 0x7d; goto LAB_00155194; } if (local_138[lVar5] == '`') { free_token(param_1,piVar1); *(int4 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 8) = *(int8 *)(param_1 + 0x24); iVar4 = js_parse_template_part(param_1,*(int8 *)(param_1 + 0x70)); if (iVar4 == 0) goto LAB_0015512c; } goto LAB_001551ca; } if (iVar3 != -0x56) goto LAB_0015517b; uVar7 = 0xffffffaa; } goto LAB_00155204; } LAB_0015512c: if (*(int *)(param_1 + 0x48) != 0x60) { iVar3 = 0x60; goto LAB_00155134; } LAB_00155178: iVar3 = *piVar1; LAB_0015517b: iVar4 = iVar3; if (iVar3 == -0x7d) { iVar4 = token_is_pseudo_keyword(param_1,0x44); if (iVar4 == 0) { iVar3 = token_is_pseudo_keyword(param_1,0x2d); iVar4 = -0x27; if (iVar3 == 0) { iVar4 = -0x7d; } } else { iVar4 = -0x27; } } LAB_00155194: iVar3 = next_token(param_1); if (iVar3 != 0) goto LAB_001551ca; } while (1 < uVar8); uVar2 = *(uint *)(param_1 + 0x20); iVar4 = token_is_pseudo_keyword(param_1,0x44); uVar7 = 0xffffffd9; if (iVar4 == 0) { uVar7 = uVar2; } if ((param_3 != 0) && (*(int *)(param_1 + 8) != *(int *)(param_1 + 0x24))) { uVar7 = 10; } LAB_00155204: if (param_2 != (uint *)0x0) { *param_2 = uVar6; } iVar4 = js_parse_seek_token(param_1,&local_168); return -(uint)(iVar4 != 0) | uVar7; }
26,138
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const
monkey531[P]llama/common/json.hpp
const string_type& key() const { JSON_ASSERT(anchor.m_object != nullptr); switch (anchor.m_object->type()) { // use integer array index as key case value_t::array: { if (array_index != array_index_last) { int_to_string( array_index_str, array_index ); array_index_last = array_index; } return array_index_str; } // use key from the object case value_t::object: return anchor.key(); // use an empty key for all primitive types case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return empty_str; } }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const: pushq %rbx movq (%rdi), %rax testq %rax, %rax je 0xcdd84 movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0xcdd72 cmpl $0x2, %eax jne 0xcdd7b movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0xcdd6c leaq 0x30(%rbx), %rdi callq 0xd0aab movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0xcdd7f movq %rbx, %rdi popq %rbx jmp 0xafef4 addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x44551(%rip), %rdi # 0x1122dc leaq 0x3cc21(%rip), %rdx # 0x10a9b3 leaq 0x48836(%rip), %rcx # 0x1165cf movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x1e500 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_CDD84 mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_CDD72 cmp eax, 2 jnz short loc_CDD7B mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_CDD6C lea rdi, [rbx+30h] call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong) mov rax, [rbx+20h] mov [rbx+28h], rax loc_CDD6C: add rbx, 30h ; '0' jmp short loc_CDD7F loc_CDD72: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>::key(void) loc_CDD7B: add rbx, 50h ; 'P' loc_CDD7F: mov rax, rbx pop rbx retn loc_CDD84: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov esi, 1491h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::key( unsigned __int8 **a1) { int v1; // eax if ( *a1 ) { v1 = **a1; if ( v1 == 1 ) { return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>::key(a1); } else { if ( v1 != 2 ) return (long long)(a1 + 10); if ( a1[4] != a1[5] ) { nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(a1 + 6); a1[5] = a1[4]; } return (long long)(a1 + 6); } } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 5265LL, "GGML_ASSERT(%s) failed", "anchor.m_object != nullptr"); return nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const>>::~iteration_proxy_value("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp"); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x001cdd84 MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x001cdd72 CMP EAX,0x2 JNZ 0x001cdd7b MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x001cdd6c LEA RDI,[RBX + 0x30] CALL 0x001d0aab MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_001cdd6c: ADD RBX,0x30 JMP 0x001cdd7f LAB_001cdd72: MOV RDI,RBX POP RBX JMP 0x001afef4 LAB_001cdd7b: ADD RBX,0x50 LAB_001cdd7f: MOV RAX,RBX POP RBX RET LAB_001cdd84: LEA RDI,[0x2122dc] LEA RDX,[0x20a9b3] LEA RCX,[0x2165cf] MOV ESI,0x1491 XOR EAX,EAX CALL 0x0011e500
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, 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> >::key() const */ iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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>> ::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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>> *this) { char cVar1; iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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>> *piVar2; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491, "GGML_ASSERT(%s) failed","anchor.m_object != nullptr"); } cVar1 = **(char **)this; if (cVar1 != '\x01') { if (cVar1 == '\x02') { if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) { int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20)); *(int8 *)(this + 0x28) = *(int8 *)(this + 0x20); } piVar2 = this + 0x30; } else { piVar2 = this + 0x50; } return piVar2; } piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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>> *)iter_impl<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> ::key((iter_impl<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> *)this); return piVar2; }
26,139
long httplib::detail::handle_EINTR<long httplib::detail::select_impl<false>(int, long, long)::'lambda'()>(long httplib::detail::select_impl<false>(int, long, long)::'lambda'())
hkr04[P]cpp-mcp/common/httplib.h
inline ssize_t handle_EINTR(T fn) { ssize_t res = 0; while (true) { res = fn(); if (res < 0 && errno == EINTR) { std::this_thread::sleep_for(std::chrono::microseconds{1}); continue; } break; } return res; }
O2
c
long httplib::detail::handle_EINTR<long httplib::detail::select_impl<false>(int, long, long)::'lambda'()>(long httplib::detail::select_impl<false>(int, long, long)::'lambda'()): pushq %rbp pushq %r14 pushq %rbx subq $0x10, %rsp leaq 0x30(%rsp), %rbx leaq 0x8(%rsp), %r14 movq %rbx, %rdi callq 0x26d30 movl %eax, %ebp testl %eax, %eax jns 0x26d23 callq 0xa050 cmpl $0x4, (%rax) jne 0x26d23 movq $0x1, 0x8(%rsp) movq %r14, %rdi callq 0x24e82 jmp 0x26cf8 movslq %ebp, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq nop
_ZN7httplib6detail12handle_EINTRIZNS0_11select_implILb0EEElillEUlvE_EElT_: push rbp push r14 push rbx sub rsp, 10h lea rbx, [rsp+28h+arg_0] lea r14, [rsp+28h+var_20] loc_26CF8: mov rdi, rbx call _ZZN7httplib6detail11select_implILb0EEElillENKUlvE_clEv; httplib::detail::select_impl<false>(int,long,long)::{lambda(void)#1}::operator()(void) mov ebp, eax test eax, eax jns short loc_26D23 call ___errno_location cmp dword ptr [rax], 4 jnz short loc_26D23 mov [rsp+28h+var_20], 1 mov rdi, r14 call _ZNSt11this_thread9sleep_forIlSt5ratioILl1ELl1000000EEEEvRKNSt6chrono8durationIT_T0_EE; std::this_thread::sleep_for<long,std::ratio<1l,1000000l>>(std::chrono::duration<long,std::ratio<1l,1000000l>> const&) jmp short loc_26CF8 loc_26D23: movsxd rax, ebp add rsp, 10h pop rbx pop r14 pop rbp retn
long long httplib::detail::handle_EINTR<long httplib::detail::select_impl<false>(int,long,long)::{lambda(void)#1}>( _DWORD a1, long long a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, char a7) { int v7; // ebp unsigned long long v9[4]; // [rsp+8h] [rbp-20h] BYREF while ( 1 ) { v7 = httplib::detail::select_impl<false>(int,long,long)::{lambda(void)#1}::operator()(&a7); if ( v7 >= 0 || *(_DWORD *)__errno_location(&a7, a2) != 4 ) break; v9[0] = 1LL; std::this_thread::sleep_for<long,std::ratio<1l,1000000l>>(v9); } return v7; }
handle_EINTR<httplib::detail::select_impl<false>(int,long,long)::{lambda()#1}>: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x10 LEA RBX,[RSP + 0x30] LEA R14,[RSP + 0x8] LAB_00126cf8: MOV RDI,RBX CALL 0x00126d30 MOV EBP,EAX TEST EAX,EAX JNS 0x00126d23 CALL 0x0010a050 CMP dword ptr [RAX],0x4 JNZ 0x00126d23 MOV qword ptr [RSP + 0x8],0x1 MOV RDI,R14 CALL 0x00124e82 JMP 0x00126cf8 LAB_00126d23: MOVSXD RAX,EBP ADD RSP,0x10 POP RBX POP R14 POP RBP RET
/* long httplib::detail::handle_EINTR<httplib::detail::select_impl<false>(int, long, long)::{lambda()#1}>(httplib::detail::select_impl<false>(int, long, long)::{lambda()#1}) */ long httplib::detail::handle_EINTR<httplib::detail::select_impl<false>(int,long,long)::_lambda()_1_> (void) { int iVar1; int *piVar2; int8 local_20; while( true ) { iVar1 = select_impl<false>(int,long,long)::{lambda()#1}::operator() ((_lambda___1_ *)&stack0x00000008); if (-1 < iVar1) break; piVar2 = __errno_location(); if (*piVar2 != 4) break; local_20 = 1; std::this_thread::sleep_for<long,std::ratio<1l,1000000l>>((duration *)&local_20); } return (long)iVar1; }
26,140
lf_hash_destroy
eloqsql/mysys/lf_hash.cc
void lf_hash_destroy(LF_HASH *hash) { LF_SLIST *el, **head= (LF_SLIST **)lf_dynarray_value(&hash->array, 0); if (head) { el= *head; while (el) { intptr next= el->link; if (el->hashnr & 1) lf_alloc_direct_free(&hash->alloc, el); /* normal node */ else my_free(el); /* dummy node */ el= (LF_SLIST *)next; } } lf_alloc_destroy(&hash->alloc); lf_dynarray_destroy(&hash->array); }
O0
cpp
lf_hash_destroy: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi xorl %esi, %esi callq 0xfd0a0 movq %rax, -0x18(%rbp) cmpq $0x0, -0x18(%rbp) je 0xfd50f movq -0x18(%rbp), %rax movq (%rax), %rax movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0xfd50d movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movl 0x18(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xfd4fa jmp 0xfd4d0 movq -0x8(%rbp), %rax cmpq $0x0, 0x88(%rax) je 0xfd4ef movq -0x8(%rbp), %rax movq 0x88(%rax), %rax movq -0x10(%rbp), %rdi callq *%rax movq -0x10(%rbp), %rdi callq 0xf3bb0 jmp 0xfd503 movq -0x10(%rbp), %rdi callq 0xf3bb0 movq -0x20(%rbp), %rax movq %rax, -0x10(%rbp) jmp 0xfd4ad jmp 0xfd50f movq -0x8(%rbp), %rdi addq $0x28, %rdi callq 0xfc8c0 movq -0x8(%rbp), %rdi callq 0xfcce0 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
lf_hash_destroy: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] xor esi, esi call lf_dynarray_value mov [rbp+var_18], rax cmp [rbp+var_18], 0 jz short loc_FD50F mov rax, [rbp+var_18] mov rax, [rax] mov [rbp+var_10], rax loc_FD4AD: cmp [rbp+var_10], 0 jz short loc_FD50D mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov eax, [rax+18h] and eax, 1 cmp eax, 0 jz short loc_FD4FA jmp short $+2 loc_FD4D0: mov rax, [rbp+var_8] cmp qword ptr [rax+88h], 0 jz short loc_FD4EF mov rax, [rbp+var_8] mov rax, [rax+88h] mov rdi, [rbp+var_10] call rax loc_FD4EF: mov rdi, [rbp+var_10] call my_free jmp short loc_FD503 loc_FD4FA: mov rdi, [rbp+var_10] call my_free loc_FD503: mov rax, [rbp+var_20] mov [rbp+var_10], rax jmp short loc_FD4AD loc_FD50D: jmp short $+2 loc_FD50F: mov rdi, [rbp+var_8] add rdi, 28h ; '(' call lf_alloc_destroy mov rdi, [rbp+var_8] call lf_dynarray_destroy add rsp, 20h pop rbp retn
long long lf_hash_destroy(long long a1) { long long v2; // [rsp+0h] [rbp-20h] long long *v3; // [rsp+8h] [rbp-18h] long long i; // [rsp+10h] [rbp-10h] v3 = (long long *)lf_dynarray_value(a1, 0); if ( v3 ) { for ( i = *v3; i; i = v2 ) { v2 = *(_QWORD *)i; if ( (*(_DWORD *)(i + 24) & 1) != 0 ) { if ( *(_QWORD *)(a1 + 136) ) (*(void ( **)(long long))(a1 + 136))(i); } my_free(i); } } lf_alloc_destroy(a1 + 40); return lf_dynarray_destroy(a1); }
lf_hash_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] XOR ESI,ESI CALL 0x001fd0a0 MOV qword ptr [RBP + -0x18],RAX CMP qword ptr [RBP + -0x18],0x0 JZ 0x001fd50f MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x10],RAX LAB_001fd4ad: CMP qword ptr [RBP + -0x10],0x0 JZ 0x001fd50d MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x18] AND EAX,0x1 CMP EAX,0x0 JZ 0x001fd4fa JMP 0x001fd4d0 LAB_001fd4d0: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x88],0x0 JZ 0x001fd4ef MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x88] MOV RDI,qword ptr [RBP + -0x10] CALL RAX LAB_001fd4ef: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001f3bb0 JMP 0x001fd503 LAB_001fd4fa: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001f3bb0 LAB_001fd503: MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x10],RAX JMP 0x001fd4ad LAB_001fd50d: JMP 0x001fd50f LAB_001fd50f: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x28 CALL 0x001fc8c0 MOV RDI,qword ptr [RBP + -0x8] CALL 0x001fcce0 ADD RSP,0x20 POP RBP RET
void lf_hash_destroy(long param_1) { int8 *puVar1; int8 *local_18; puVar1 = (int8 *)lf_dynarray_value(param_1,0); if (puVar1 != (int8 *)0x0) { local_18 = (int8 *)*puVar1; while (local_18 != (int8 *)0x0) { puVar1 = (int8 *)*local_18; if ((*(uint *)(local_18 + 3) & 1) == 0) { my_free(local_18); local_18 = puVar1; } else { if (*(long *)(param_1 + 0x88) != 0) { (**(code **)(param_1 + 0x88))(local_18); } my_free(local_18); local_18 = puVar1; } } } lf_alloc_destroy(param_1 + 0x28); lf_dynarray_destroy(param_1); return; }
26,141
mysql_stmt_store_result_start_internal
eloqsql/libmariadb/libmariadb/mariadb_async.c
static void mysql_stmt_store_result_start_internal(void *d) { MK_ASYNC_INTERNAL_BODY( mysql_stmt_store_result, (parms->stmt), parms->stmt->mysql, int, r_int) }
O3
c
mysql_stmt_store_result_start_internal: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rdi movq 0x38(%rdi), %rax movq 0x480(%rax), %rax movq 0x28(%rax), %rbx callq 0x21c06 movl %eax, 0x8(%rbx) movl $0x0, (%rbx) addq $0x8, %rsp popq %rbx popq %rbp retq
mysql_stmt_store_result_start_internal: push rbp mov rbp, rsp push rbx push rax mov rdi, [rdi] mov rax, [rdi+38h] mov rax, [rax+480h] mov rbx, [rax+28h] call mysql_stmt_store_result mov [rbx+8], eax mov dword ptr [rbx], 0 add rsp, 8 pop rbx pop rbp retn
long long mysql_stmt_store_result_start_internal(long long *a1) { long long v1; // rdi _DWORD *v2; // rbx long long result; // rax v1 = *a1; v2 = *(_DWORD **)(*(_QWORD *)(*(_QWORD *)(v1 + 56) + 1152LL) + 40LL); result = mysql_stmt_store_result(v1); v2[2] = result; *v2 = 0; return result; }
mysql_stmt_store_result_start_internal: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RDI,qword ptr [RDI] MOV RAX,qword ptr [RDI + 0x38] MOV RAX,qword ptr [RAX + 0x480] MOV RBX,qword ptr [RAX + 0x28] CALL 0x00121c06 MOV dword ptr [RBX + 0x8],EAX MOV dword ptr [RBX],0x0 ADD RSP,0x8 POP RBX POP RBP RET
void mysql_stmt_store_result_start_internal(long *param_1) { int4 *puVar1; int4 uVar2; puVar1 = *(int4 **)(*(long *)(*(long *)(*param_1 + 0x38) + 0x480) + 0x28); uVar2 = mysql_stmt_store_result(); puVar1[2] = uVar2; *puVar1 = 0; return; }
26,142
hex_to_bytes
corpus-core[P]colibri-stateless/src/util/bytes.c
int hex_to_bytes(const char* hexstring, int len, bytes_t buffer) { size_t hex_len = len == -1 ? strlen(hexstring) : (size_t) len; if (!hexstring || !buffer.data) return -1; int dst_offset = hex_len % 2; int src_offset = (hexstring[0] == '0' && hexstring[1] == 'x') ? 2 : 0; if (dst_offset) buffer.data[0] = hexchar_to_int(hexstring[src_offset++]); if ((hex_len - src_offset) % 2 || (buffer.len - dst_offset) < (hex_len - src_offset) / 2) return -1; for (size_t i = src_offset; i < hex_len; i += 2) { int high = hexchar_to_int(hexstring[i]); int low = hexchar_to_int(hexstring[i + 1]); if (high == -1 || low == -1) return -1; buffer.data[dst_offset++] = (high << 4) | low; } return dst_offset; }
O1
c
hex_to_bytes: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %rbx movl %edx, %r12d movq %rdi, %r14 cmpl $-0x1, %esi je 0x12b23 movslq %esi, %rdx jmp 0x12b2e movq %r14, %rdi callq 0x5140 movq %rax, %rdx testq %r14, %r14 setne %al testq %rbx, %rbx setne %cl andb %al, %cl cmpb $0x1, %cl jne 0x12bd9 movq %rbx, 0x10(%rsp) movl %edx, %ebp andl $0x1, %ebp xorl %r13d, %r13d cmpb $0x30, (%r14) jne 0x12b67 xorl %r13d, %r13d cmpb $0x78, 0x1(%r14) sete %r13b addl %r13d, %r13d testl %ebp, %ebp movq %rdx, (%rsp) je 0x12bc1 movl %r13d, %eax movsbq (%r14,%rax), %rbx callq 0x5090 movq (%rax), %rax movzwl (%rax,%rbx,2), %ecx btl $0xb, %ecx jb 0x12bac movl $0xffffffff, %eax # imm = 0xFFFFFFFF btl $0xc, %ecx movq (%rsp), %rdx jae 0x12bb6 callq 0x5150 movq (%rsp), %rdx movq (%rax), %rax movl (%rax,%rbx,4), %eax addl $-0x57, %eax jmp 0x12bb6 movzbl %bl, %eax addl $-0x30, %eax movq (%rsp), %rdx orl $0x1, %r13d movq 0x10(%rsp), %rcx movb %al, (%rcx) movl %r13d, %r13d movq %rdx, %rax subq %r13, %rax testb $0x1, %al jne 0x12bd9 subl %ebp, %r12d shrq %rax cmpq %r12, %rax jbe 0x12bef movl $0xffffffff, %ebp # imm = 0xFFFFFFFF movl %ebp, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpq %r13, %rdx jbe 0x12bde callq 0x5090 movq (%rsp), %rdi movq %rax, %r8 movq %rax, 0x8(%rsp) movsbq (%r14,%r13), %r15 movq (%r8), %rbx movzwl (%rbx,%r15,2), %eax btl $0xb, %eax jb 0x12c3f movl $0xffffffff, %r12d # imm = 0xFFFFFFFF btl $0xc, %eax jae 0x12c46 callq 0x5150 movq 0x8(%rsp), %r8 movq (%rsp), %rdi movq (%rax), %rax movl (%rax,%r15,4), %r12d addl $-0x57, %r12d jmp 0x12c46 addl $-0x30, %r15d movl %r15d, %r12d movsbq 0x1(%r14,%r13), %r15 movzwl (%rbx,%r15,2), %ecx btl $0xb, %ecx jb 0x12c7c movl $0xffffffff, %eax # imm = 0xFFFFFFFF btl $0xc, %ecx jae 0x12c83 callq 0x5150 movq 0x8(%rsp), %r8 movq (%rsp), %rdi movq (%rax), %rax movl (%rax,%r15,4), %eax addl $-0x57, %eax jmp 0x12c83 addl $-0x30, %r15d movl %r15d, %eax cmpl $-0x1, %r12d setne %dl cmpl $-0x1, %eax setne %cl andb %dl, %cl cmpb $0x1, %cl jne 0x12cab shll $0x4, %r12d orl %r12d, %eax movslq %ebp, %rdx incl %ebp movq 0x10(%rsp), %rsi movb %al, (%rsi,%rdx) testb %cl, %cl je 0x12bd9 addq $0x2, %r13 cmpq %rdi, %r13 jb 0x12c05 jmp 0x12bde
hex_to_bytes: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, rcx mov r12d, edx mov r14, rdi cmp esi, 0FFFFFFFFh jz short loc_12B23 movsxd rdx, esi jmp short loc_12B2E loc_12B23: mov rdi, r14 call _strlen mov rdx, rax loc_12B2E: test r14, r14 setnz al test rbx, rbx setnz cl and cl, al cmp cl, 1 jnz loc_12BD9 mov [rsp+48h+var_38], rbx mov ebp, edx and ebp, 1 xor r13d, r13d cmp byte ptr [r14], 30h ; '0' jnz short loc_12B67 xor r13d, r13d cmp byte ptr [r14+1], 78h ; 'x' setz r13b add r13d, r13d loc_12B67: test ebp, ebp mov [rsp+48h+var_48], rdx jz short loc_12BC1 mov eax, r13d movsx rbx, byte ptr [r14+rax] call ___ctype_b_loc mov rax, [rax] movzx ecx, word ptr [rax+rbx*2] bt ecx, 0Bh jb short loc_12BAC mov eax, 0FFFFFFFFh bt ecx, 0Ch mov rdx, [rsp+48h+var_48] jnb short loc_12BB6 call ___ctype_tolower_loc mov rdx, [rsp+48h+var_48] mov rax, [rax] mov eax, [rax+rbx*4] add eax, 0FFFFFFA9h jmp short loc_12BB6 loc_12BAC: movzx eax, bl add eax, 0FFFFFFD0h mov rdx, [rsp+48h+var_48] loc_12BB6: or r13d, 1 mov rcx, [rsp+48h+var_38] mov [rcx], al loc_12BC1: mov r13d, r13d mov rax, rdx sub rax, r13 test al, 1 jnz short loc_12BD9 sub r12d, ebp shr rax, 1 cmp rax, r12 jbe short loc_12BEF loc_12BD9: mov ebp, 0FFFFFFFFh loc_12BDE: mov eax, ebp add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_12BEF: cmp rdx, r13 jbe short loc_12BDE call ___ctype_b_loc mov rdi, [rsp+48h+var_48] mov r8, rax mov [rsp+48h+var_40], rax loc_12C05: movsx r15, byte ptr [r14+r13] mov rbx, [r8] movzx eax, word ptr [rbx+r15*2] bt eax, 0Bh jb short loc_12C3F mov r12d, 0FFFFFFFFh bt eax, 0Ch jnb short loc_12C46 call ___ctype_tolower_loc mov r8, [rsp+48h+var_40] mov rdi, [rsp+48h+var_48] mov rax, [rax] mov r12d, [rax+r15*4] add r12d, 0FFFFFFA9h jmp short loc_12C46 loc_12C3F: add r15d, 0FFFFFFD0h mov r12d, r15d loc_12C46: movsx r15, byte ptr [r14+r13+1] movzx ecx, word ptr [rbx+r15*2] bt ecx, 0Bh jb short loc_12C7C mov eax, 0FFFFFFFFh bt ecx, 0Ch jnb short loc_12C83 call ___ctype_tolower_loc mov r8, [rsp+48h+var_40] mov rdi, [rsp+48h+var_48] mov rax, [rax] mov eax, [rax+r15*4] add eax, 0FFFFFFA9h jmp short loc_12C83 loc_12C7C: add r15d, 0FFFFFFD0h mov eax, r15d loc_12C83: cmp r12d, 0FFFFFFFFh setnz dl cmp eax, 0FFFFFFFFh setnz cl and cl, dl cmp cl, 1 jnz short loc_12CAB shl r12d, 4 or eax, r12d movsxd rdx, ebp inc ebp mov rsi, [rsp+48h+var_38] mov [rsi+rdx], al loc_12CAB: test cl, cl jz loc_12BD9 add r13, 2 cmp r13, rdi jb loc_12C05 jmp loc_12BDE
long long hex_to_bytes(_BYTE *a1, char *a2, int a3, char *a4) { unsigned long long v7; // rdx unsigned int v8; // ebp unsigned long long v9; // r13 long long v10; // rbx __int16 v11; // cx char v12; // al _QWORD *v13; // rax unsigned long long v14; // rax unsigned long long v16; // rdi long long v17; // rdx _QWORD *v18; // r8 long long v19; // r15 long long v20; // rbx int v21; // r12d _QWORD *v22; // rax long long v23; // r15 int v24; // eax _QWORD *v25; // rax char v26; // cl unsigned long long v27; // [rsp+0h] [rbp-48h] _QWORD *v28; // [rsp+8h] [rbp-40h] char *v29; // [rsp+10h] [rbp-38h] if ( (_DWORD)a2 == -1 ) v7 = strlen(a1); else v7 = (int)a2; if ( a1 != 0LL && a4 != 0LL ) { v29 = a4; v8 = v7 & 1; LODWORD(v9) = 0; if ( *a1 == 48 ) LODWORD(v9) = 2 * (a1[1] == 120); v27 = v7; if ( (v7 & 1) != 0 ) { v10 = (char)a1[(unsigned int)v9]; v11 = *(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2 * v10); if ( (v11 & 0x800) != 0 ) { v12 = v10 - 48; v7 = v27; } else { v12 = -1; v7 = v27; if ( (v11 & 0x1000) != 0 ) { v13 = (_QWORD *)__ctype_tolower_loc(a1, a2, v27); v7 = v27; v12 = *(_DWORD *)(*v13 + 4 * v10) - 87; } } LODWORD(v9) = v9 | 1; *v29 = v12; } v9 = (unsigned int)v9; v14 = v7 - (unsigned int)v9; if ( (v14 & 1) == 0 && v14 >> 1 <= a3 - v8 ) { if ( v7 <= (unsigned int)v9 ) return v8; v16 = v27; v18 = (_QWORD *)__ctype_b_loc(); v28 = v18; while ( 1 ) { v19 = (char)a1[v9]; v20 = *v18; if ( (*(_WORD *)(*v18 + 2 * v19) & 0x800) != 0 ) { v21 = v19 - 48; } else { v21 = -1; if ( (*(_WORD *)(*v18 + 2 * v19) & 0x1000) != 0 ) { v22 = (_QWORD *)__ctype_tolower_loc(v16, a2, v17); v18 = v28; v16 = v27; v21 = *(_DWORD *)(*v22 + 4 * v19) - 87; } } v23 = (char)a1[v9 + 1]; if ( (*(_WORD *)(v20 + 2 * v23) & 0x800) != 0 ) { v24 = v23 - 48; } else { v24 = -1; if ( (*(_WORD *)(v20 + 2 * v23) & 0x1000) != 0 ) { v25 = (_QWORD *)__ctype_tolower_loc(v16, a2, v17); v18 = v28; v16 = v27; v24 = *(_DWORD *)(*v25 + 4 * v23) - 87; } } LOBYTE(v17) = v21 != -1; v26 = v17 & (v24 != -1); if ( v26 == 1 ) { v17 = (int)v8++; a2 = v29; v29[v17] = (16 * v21) | v24; } if ( !v26 ) break; v9 += 2LL; if ( v9 >= v16 ) return v8; } } } return (unsigned int)-1; }
hex_to_bytes: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RCX MOV R12D,EDX MOV R14,RDI CMP ESI,-0x1 JZ 0x00112b23 MOVSXD RDX,ESI JMP 0x00112b2e LAB_00112b23: MOV RDI,R14 CALL 0x00105140 MOV RDX,RAX LAB_00112b2e: TEST R14,R14 SETNZ AL TEST RBX,RBX SETNZ CL AND CL,AL CMP CL,0x1 JNZ 0x00112bd9 MOV qword ptr [RSP + 0x10],RBX MOV EBP,EDX AND EBP,0x1 XOR R13D,R13D CMP byte ptr [R14],0x30 JNZ 0x00112b67 XOR R13D,R13D CMP byte ptr [R14 + 0x1],0x78 SETZ R13B ADD R13D,R13D LAB_00112b67: TEST EBP,EBP MOV qword ptr [RSP],RDX JZ 0x00112bc1 MOV EAX,R13D MOVSX RBX,byte ptr [R14 + RAX*0x1] CALL 0x00105090 MOV RAX,qword ptr [RAX] MOVZX ECX,word ptr [RAX + RBX*0x2] BT ECX,0xb JC 0x00112bac MOV EAX,0xffffffff BT ECX,0xc MOV RDX,qword ptr [RSP] JNC 0x00112bb6 CALL 0x00105150 MOV RDX,qword ptr [RSP] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + RBX*0x4] ADD EAX,-0x57 JMP 0x00112bb6 LAB_00112bac: MOVZX EAX,BL ADD EAX,-0x30 MOV RDX,qword ptr [RSP] LAB_00112bb6: OR R13D,0x1 MOV RCX,qword ptr [RSP + 0x10] MOV byte ptr [RCX],AL LAB_00112bc1: MOV R13D,R13D MOV RAX,RDX SUB RAX,R13 TEST AL,0x1 JNZ 0x00112bd9 SUB R12D,EBP SHR RAX,0x1 CMP RAX,R12 JBE 0x00112bef LAB_00112bd9: MOV EBP,0xffffffff LAB_00112bde: MOV EAX,EBP ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00112bef: CMP RDX,R13 JBE 0x00112bde CALL 0x00105090 MOV RDI,qword ptr [RSP] MOV R8,RAX MOV qword ptr [RSP + 0x8],RAX LAB_00112c05: MOVSX R15,byte ptr [R14 + R13*0x1] MOV RBX,qword ptr [R8] MOVZX EAX,word ptr [RBX + R15*0x2] BT EAX,0xb JC 0x00112c3f MOV R12D,0xffffffff BT EAX,0xc JNC 0x00112c46 CALL 0x00105150 MOV R8,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP] MOV RAX,qword ptr [RAX] MOV R12D,dword ptr [RAX + R15*0x4] ADD R12D,-0x57 JMP 0x00112c46 LAB_00112c3f: ADD R15D,-0x30 MOV R12D,R15D LAB_00112c46: MOVSX R15,byte ptr [R14 + R13*0x1 + 0x1] MOVZX ECX,word ptr [RBX + R15*0x2] BT ECX,0xb JC 0x00112c7c MOV EAX,0xffffffff BT ECX,0xc JNC 0x00112c83 CALL 0x00105150 MOV R8,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + R15*0x4] ADD EAX,-0x57 JMP 0x00112c83 LAB_00112c7c: ADD R15D,-0x30 MOV EAX,R15D LAB_00112c83: CMP R12D,-0x1 SETNZ DL CMP EAX,-0x1 SETNZ CL AND CL,DL CMP CL,0x1 JNZ 0x00112cab SHL R12D,0x4 OR EAX,R12D MOVSXD RDX,EBP INC EBP MOV RSI,qword ptr [RSP + 0x10] MOV byte ptr [RSI + RDX*0x1],AL LAB_00112cab: TEST CL,CL JZ 0x00112bd9 ADD R13,0x2 CMP R13,RDI JC 0x00112c05 JMP 0x00112bde
uint hex_to_bytes(char *param_1,int param_2,int param_3,char *param_4) { char cVar1; ushort uVar2; ushort *puVar3; char cVar4; int iVar5; ushort **ppuVar6; __int32_t **pp_Var7; size_t sVar8; long lVar9; uint uVar10; int iVar11; uint uVar12; ulong uVar13; if (param_2 == -1) { sVar8 = strlen(param_1); } else { sVar8 = (size_t)param_2; } if (param_4 != (char *)0x0 && param_1 != (char *)0x0) { uVar10 = (uint)sVar8 & 1; uVar12 = 0; if (*param_1 == '0') { uVar12 = (uint)(param_1[1] == 'x') * 2; } if ((sVar8 & 1) != 0) { cVar1 = param_1[uVar12]; ppuVar6 = __ctype_b_loc(); if (((*ppuVar6)[cVar1] >> 0xb & 1) == 0) { cVar4 = -1; if (((*ppuVar6)[cVar1] >> 0xc & 1) != 0) { pp_Var7 = __ctype_tolower_loc(); cVar4 = (char)(*pp_Var7)[cVar1] + -0x57; } } else { cVar4 = cVar1 + -0x30; } uVar12 = uVar12 | 1; *param_4 = cVar4; } uVar13 = (ulong)uVar12; if (((sVar8 - uVar13 & 1) == 0) && (sVar8 - uVar13 >> 1 <= (ulong)(param_3 - uVar10))) { if (sVar8 <= uVar13) { return uVar10; } ppuVar6 = __ctype_b_loc(); while( true ) { cVar1 = param_1[uVar13]; puVar3 = *ppuVar6; uVar2 = puVar3[cVar1]; if ((uVar2 >> 0xb & 1) == 0) { iVar11 = -1; if ((uVar2 >> 0xc & 1) != 0) { pp_Var7 = __ctype_tolower_loc(); iVar11 = (*pp_Var7)[cVar1] + -0x57; } } else { iVar11 = cVar1 + -0x30; } cVar1 = param_1[uVar13 + 1]; uVar2 = puVar3[cVar1]; if ((uVar2 >> 0xb & 1) == 0) { iVar5 = -1; if ((uVar2 >> 0xc & 1) != 0) { pp_Var7 = __ctype_tolower_loc(); iVar5 = (*pp_Var7)[cVar1] + -0x57; } } else { iVar5 = cVar1 + -0x30; } if (iVar5 == -1 || iVar11 == -1) break; lVar9 = (long)(int)uVar10; uVar10 = uVar10 + 1; param_4[lVar9] = (byte)iVar5 | (byte)(iVar11 << 4); uVar13 = uVar13 + 2; if (sVar8 <= uVar13) { return uVar10; } } } } return 0xffffffff; }
26,143
hex_to_bytes
corpus-core[P]colibri-stateless/src/util/bytes.c
int hex_to_bytes(const char* hexstring, int len, bytes_t buffer) { size_t hex_len = len == -1 ? strlen(hexstring) : (size_t) len; if (!hexstring || !buffer.data) return -1; int dst_offset = hex_len % 2; int src_offset = (hexstring[0] == '0' && hexstring[1] == 'x') ? 2 : 0; if (dst_offset) buffer.data[0] = hexchar_to_int(hexstring[src_offset++]); if ((hex_len - src_offset) % 2 || (buffer.len - dst_offset) < (hex_len - src_offset) / 2) return -1; for (size_t i = src_offset; i < hex_len; i += 2) { int high = hexchar_to_int(hexstring[i]); int low = hexchar_to_int(hexstring[i + 1]); if (high == -1 || low == -1) return -1; buffer.data[dst_offset++] = (high << 4) | low; } return dst_offset; }
O2
c
hex_to_bytes: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %rbx movl %edx, %r12d movq %rdi, %r14 cmpl $-0x1, %esi je 0x11bac movslq %esi, %r15 jmp 0x11bb7 movq %r14, %rdi callq 0x5140 movq %rax, %r15 testq %r14, %r14 setne %al testq %rbx, %rbx setne %cl andb %al, %cl pushq $-0x1 popq %rax cmpb $0x1, %cl jne 0x11c1d movl %r15d, %ebp andl $0x1, %ebp xorl %r13d, %r13d cmpb $0x30, (%r14) jne 0x11beb xorl %r13d, %r13d cmpb $0x78, 0x1(%r14) sete %r13b addl %r13d, %r13d testl %ebp, %ebp je 0x11c02 movl %r13d, %eax orl $0x1, %r13d movsbl (%r14,%rax), %edi callq 0x11c71 movb %al, (%rbx) movl %r13d, %r13d movq %r15, %rax subq %r13, %rax testb $0x1, %al jne 0x11c1a subl %ebp, %r12d shrq %rax cmpq %r12, %rax jbe 0x11c2c pushq $-0x1 popq %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl %r15d, %ebp andl $0x1, %ebp cmpq %r15, %r13 jae 0x11c6d movsbl (%r14,%r13), %edi callq 0x11c71 movl %eax, %r12d movsbl 0x1(%r14,%r13), %edi callq 0x11c71 cmpl $-0x1, %r12d je 0x11c1a cmpl $-0x1, %eax je 0x11c1a shll $0x4, %r12d orl %r12d, %eax movb %al, (%rbx,%rbp) incq %rbp addq $0x2, %r13 jmp 0x11c32 movl %ebp, %eax jmp 0x11c1d
hex_to_bytes: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rcx mov r12d, edx mov r14, rdi cmp esi, 0FFFFFFFFh jz short loc_11BAC movsxd r15, esi jmp short loc_11BB7 loc_11BAC: mov rdi, r14 call _strlen mov r15, rax loc_11BB7: test r14, r14 setnz al test rbx, rbx setnz cl and cl, al push 0FFFFFFFFFFFFFFFFh pop rax cmp cl, 1 jnz short loc_11C1D mov ebp, r15d and ebp, 1 xor r13d, r13d cmp byte ptr [r14], 30h ; '0' jnz short loc_11BEB xor r13d, r13d cmp byte ptr [r14+1], 78h ; 'x' setz r13b add r13d, r13d loc_11BEB: test ebp, ebp jz short loc_11C02 mov eax, r13d or r13d, 1 movsx edi, byte ptr [r14+rax] call hexchar_to_int mov [rbx], al loc_11C02: mov r13d, r13d mov rax, r15 sub rax, r13 test al, 1 jnz short loc_11C1A sub r12d, ebp shr rax, 1 cmp rax, r12 jbe short loc_11C2C loc_11C1A: push 0FFFFFFFFFFFFFFFFh pop rax loc_11C1D: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_11C2C: mov ebp, r15d and ebp, 1 loc_11C32: cmp r13, r15 jnb short loc_11C6D movsx edi, byte ptr [r14+r13] call hexchar_to_int mov r12d, eax movsx edi, byte ptr [r14+r13+1] call hexchar_to_int cmp r12d, 0FFFFFFFFh jz short loc_11C1A cmp eax, 0FFFFFFFFh jz short loc_11C1A shl r12d, 4 or eax, r12d mov [rbx+rbp], al inc rbp add r13, 2 jmp short loc_11C32 loc_11C6D: mov eax, ebp jmp short loc_11C1D
long long hex_to_bytes(_BYTE *a1, int a2, int a3, _BYTE *a4) { unsigned long long v6; // r15 long long result; // rax unsigned long long v8; // r13 long long v9; // rax unsigned long long v10; // rax unsigned long long v11; // rbp int v12; // r12d int v13; // eax if ( a2 == -1 ) v6 = strlen(a1); else v6 = a2; result = -1LL; if ( a1 != 0LL && a4 != 0LL ) { LODWORD(v8) = 0; if ( *a1 == 48 ) LODWORD(v8) = 2 * (a1[1] == 120); if ( (v6 & 1) != 0 ) { v9 = (unsigned int)v8; LODWORD(v8) = v8 | 1; *a4 = hexchar_to_int((unsigned int)(char)a1[v9]); } v8 = (unsigned int)v8; v10 = v6 - (unsigned int)v8; if ( (v10 & 1) != 0 || v10 >> 1 > a3 - (v6 & 1) ) { return -1LL; } else { v11 = v6 & 1; while ( v8 < v6 ) { v12 = hexchar_to_int((unsigned int)(char)a1[v8]); v13 = hexchar_to_int((unsigned int)(char)a1[v8 + 1]); if ( v12 == -1 || v13 == -1 ) return -1LL; a4[v11++] = (16 * v12) | v13; v8 += 2LL; } return (unsigned int)v11; } } return result; }
hex_to_bytes: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RCX MOV R12D,EDX MOV R14,RDI CMP ESI,-0x1 JZ 0x00111bac MOVSXD R15,ESI JMP 0x00111bb7 LAB_00111bac: MOV RDI,R14 CALL 0x00105140 MOV R15,RAX LAB_00111bb7: TEST R14,R14 SETNZ AL TEST RBX,RBX SETNZ CL AND CL,AL PUSH -0x1 POP RAX CMP CL,0x1 JNZ 0x00111c1d MOV EBP,R15D AND EBP,0x1 XOR R13D,R13D CMP byte ptr [R14],0x30 JNZ 0x00111beb XOR R13D,R13D CMP byte ptr [R14 + 0x1],0x78 SETZ R13B ADD R13D,R13D LAB_00111beb: TEST EBP,EBP JZ 0x00111c02 MOV EAX,R13D OR R13D,0x1 MOVSX EDI,byte ptr [R14 + RAX*0x1] CALL 0x00111c71 MOV byte ptr [RBX],AL LAB_00111c02: MOV R13D,R13D MOV RAX,R15 SUB RAX,R13 TEST AL,0x1 JNZ 0x00111c1a SUB R12D,EBP SHR RAX,0x1 CMP RAX,R12 JBE 0x00111c2c LAB_00111c1a: PUSH -0x1 POP RAX LAB_00111c1d: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00111c2c: MOV EBP,R15D AND EBP,0x1 LAB_00111c32: CMP R13,R15 JNC 0x00111c6d MOVSX EDI,byte ptr [R14 + R13*0x1] CALL 0x00111c71 MOV R12D,EAX MOVSX EDI,byte ptr [R14 + R13*0x1 + 0x1] CALL 0x00111c71 CMP R12D,-0x1 JZ 0x00111c1a CMP EAX,-0x1 JZ 0x00111c1a SHL R12D,0x4 OR EAX,R12D MOV byte ptr [RBX + RBP*0x1],AL INC RBP ADD R13,0x2 JMP 0x00111c32 LAB_00111c6d: MOV EAX,EBP JMP 0x00111c1d
ulong hex_to_bytes(char *param_1,int param_2,int param_3,int1 *param_4) { int1 uVar1; int iVar2; int iVar3; ulong uVar4; uint uVar5; ulong uVar6; size_t sVar7; if (param_2 == -1) { sVar7 = strlen(param_1); } else { sVar7 = (size_t)param_2; } uVar4 = 0xffffffffffffffff; if (param_4 != (int1 *)0x0 && param_1 != (char *)0x0) { uVar5 = 0; if (*param_1 == '0') { uVar5 = (uint)(param_1[1] == 'x') * 2; } if ((sVar7 & 1) != 0) { uVar4 = (ulong)uVar5; uVar5 = uVar5 | 1; uVar1 = hexchar_to_int((int)param_1[uVar4]); *param_4 = uVar1; } uVar6 = (ulong)uVar5; if (((sVar7 - uVar6 & 1) == 0) && (sVar7 - uVar6 >> 1 <= (ulong)(param_3 - ((uint)sVar7 & 1)))) { uVar4 = (ulong)((uint)sVar7 & 1); for (; uVar6 < sVar7; uVar6 = uVar6 + 2) { iVar2 = hexchar_to_int((int)param_1[uVar6]); iVar3 = hexchar_to_int((int)param_1[uVar6 + 1]); if ((iVar2 == -1) || (iVar3 == -1)) goto LAB_00111c1a; param_4[uVar4] = (byte)iVar3 | (byte)(iVar2 << 4); uVar4 = uVar4 + 1; } uVar4 = uVar4 & 0xffffffff; } else { LAB_00111c1a: uVar4 = 0xffffffffffffffff; } } return uVar4; }
26,144
hex_to_bytes
corpus-core[P]colibri-stateless/src/util/bytes.c
int hex_to_bytes(const char* hexstring, int len, bytes_t buffer) { size_t hex_len = len == -1 ? strlen(hexstring) : (size_t) len; if (!hexstring || !buffer.data) return -1; int dst_offset = hex_len % 2; int src_offset = (hexstring[0] == '0' && hexstring[1] == 'x') ? 2 : 0; if (dst_offset) buffer.data[0] = hexchar_to_int(hexstring[src_offset++]); if ((hex_len - src_offset) % 2 || (buffer.len - dst_offset) < (hex_len - src_offset) / 2) return -1; for (size_t i = src_offset; i < hex_len; i += 2) { int high = hexchar_to_int(hexstring[i]); int low = hexchar_to_int(hexstring[i + 1]); if (high == -1 || low == -1) return -1; buffer.data[dst_offset++] = (high << 4) | low; } return dst_offset; }
O3
c
hex_to_bytes: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r15 movl %edx, %r13d cmpl $-0x1, %esi je 0x12824 movslq %esi, %rdx jmp 0x12832 movq %rdi, %rbx callq 0x5140 movq %rbx, %rdi movq %rax, %rdx testq %rdi, %rdi setne %al testq %r15, %r15 setne %cl andb %al, %cl cmpb $0x1, %cl jne 0x128db movl %edx, %r12d andl $0x1, %r12d xorl %ebp, %ebp cmpb $0x30, (%rdi) jne 0x12863 xorl %ebp, %ebp cmpb $0x78, 0x1(%rdi) sete %bpl addl %ebp, %ebp testl %r12d, %r12d movq %rdx, (%rsp) je 0x128c4 movl %ebp, %eax movq %rdi, %r14 movsbq (%rdi,%rax), %rbx callq 0x5090 movq (%rax), %rax movzwl (%rax,%rbx,2), %ecx btl $0xb, %ecx jb 0x128b1 movl $0xffffffff, %eax # imm = 0xFFFFFFFF btl $0xc, %ecx movq %r14, %rdi movq (%rsp), %rdx jae 0x128be callq 0x5150 movq (%rsp), %rdx movq %r14, %rdi movq (%rax), %rax movl (%rax,%rbx,4), %eax addl $-0x57, %eax jmp 0x128be movzbl %bl, %eax addl $-0x30, %eax movq %r14, %rdi movq (%rsp), %rdx orl $0x1, %ebp movb %al, (%r15) movl %ebp, %ebp movq %rdx, %rax subq %rbp, %rax testb $0x1, %al jne 0x128db subl %r12d, %r13d shrq %rax cmpq %r13, %rax jbe 0x128f3 movl $0xffffffff, %r12d # imm = 0xFFFFFFFF movl %r12d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq cmpq %rbp, %rdx jbe 0x128e1 movq %rdi, 0x8(%rsp) callq 0x5090 movq (%rsp), %rdx movq 0x8(%rsp), %rcx movq %rax, 0x10(%rsp) movl %edx, %r12d andl $0x1, %r12d movq %r15, %r14 movsbq (%rcx,%rbp), %rbx movq 0x10(%rsp), %rax movq (%rax), %r15 movzwl (%r15,%rbx,2), %eax btl $0xb, %eax jb 0x12959 movl $0xffffffff, %r13d # imm = 0xFFFFFFFF btl $0xc, %eax jae 0x1295f callq 0x5150 movq (%rsp), %rdx movq 0x8(%rsp), %rcx movq (%rax), %rax movl (%rax,%rbx,4), %r13d addl $-0x57, %r13d jmp 0x1295f addl $-0x30, %ebx movl %ebx, %r13d movsbq 0x1(%rcx,%rbp), %rbx movzwl (%r15,%rbx,2), %eax btl $0xb, %eax jb 0x12996 btl $0xc, %eax jae 0x128db movq %r14, %r15 callq 0x5150 movq (%rsp), %rdx movq 0x8(%rsp), %rcx movq (%rax), %rax movl (%rax,%rbx,4), %ebx addl $-0x57, %ebx jmp 0x1299c addl $-0x30, %ebx movq %r14, %r15 cmpl $-0x1, %r13d je 0x128db cmpl $-0x1, %ebx je 0x128db shll $0x4, %r13d orl %r13d, %ebx movb %bl, (%r15,%r12) incq %r12 addq $0x2, %rbp cmpq %rdx, %rbp jb 0x12917 jmp 0x128e1
hex_to_bytes: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r15, rcx mov r13d, edx cmp esi, 0FFFFFFFFh jz short loc_12824 movsxd rdx, esi jmp short loc_12832 loc_12824: mov rbx, rdi call _strlen mov rdi, rbx mov rdx, rax loc_12832: test rdi, rdi setnz al test r15, r15 setnz cl and cl, al cmp cl, 1 jnz loc_128DB mov r12d, edx and r12d, 1 xor ebp, ebp cmp byte ptr [rdi], 30h ; '0' jnz short loc_12863 xor ebp, ebp cmp byte ptr [rdi+1], 78h ; 'x' setz bpl add ebp, ebp loc_12863: test r12d, r12d mov [rsp+48h+var_48], rdx jz short loc_128C4 mov eax, ebp mov r14, rdi movsx rbx, byte ptr [rdi+rax] call ___ctype_b_loc mov rax, [rax] movzx ecx, word ptr [rax+rbx*2] bt ecx, 0Bh jb short loc_128B1 mov eax, 0FFFFFFFFh bt ecx, 0Ch mov rdi, r14 mov rdx, [rsp+48h+var_48] jnb short loc_128BE call ___ctype_tolower_loc mov rdx, [rsp+48h+var_48] mov rdi, r14 mov rax, [rax] mov eax, [rax+rbx*4] add eax, 0FFFFFFA9h jmp short loc_128BE loc_128B1: movzx eax, bl add eax, 0FFFFFFD0h mov rdi, r14 mov rdx, [rsp+48h+var_48] loc_128BE: or ebp, 1 mov [r15], al loc_128C4: mov ebp, ebp mov rax, rdx sub rax, rbp test al, 1 jnz short loc_128DB sub r13d, r12d shr rax, 1 cmp rax, r13 jbe short loc_128F3 loc_128DB: mov r12d, 0FFFFFFFFh loc_128E1: mov eax, r12d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_128F3: cmp rdx, rbp jbe short loc_128E1 mov [rsp+48h+var_40], rdi call ___ctype_b_loc mov rdx, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov [rsp+48h+var_38], rax mov r12d, edx and r12d, 1 loc_12917: mov r14, r15 movsx rbx, byte ptr [rcx+rbp] mov rax, [rsp+48h+var_38] mov r15, [rax] movzx eax, word ptr [r15+rbx*2] bt eax, 0Bh jb short loc_12959 mov r13d, 0FFFFFFFFh bt eax, 0Ch jnb short loc_1295F call ___ctype_tolower_loc mov rdx, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov rax, [rax] mov r13d, [rax+rbx*4] add r13d, 0FFFFFFA9h jmp short loc_1295F loc_12959: add ebx, 0FFFFFFD0h mov r13d, ebx loc_1295F: movsx rbx, byte ptr [rcx+rbp+1] movzx eax, word ptr [r15+rbx*2] bt eax, 0Bh jb short loc_12996 bt eax, 0Ch jnb loc_128DB mov r15, r14 call ___ctype_tolower_loc mov rdx, [rsp+48h+var_48] mov rcx, [rsp+48h+var_40] mov rax, [rax] mov ebx, [rax+rbx*4] add ebx, 0FFFFFFA9h jmp short loc_1299C loc_12996: add ebx, 0FFFFFFD0h mov r15, r14 loc_1299C: cmp r13d, 0FFFFFFFFh jz loc_128DB cmp ebx, 0FFFFFFFFh jz loc_128DB shl r13d, 4 or ebx, r13d mov [r15+r12], bl inc r12 add rbp, 2 cmp rbp, rdx jb loc_12917 jmp loc_128E1
long long hex_to_bytes(_BYTE *a1, long long a2, int a3, char *a4) { unsigned long long v6; // rdx unsigned long long v7; // r12 unsigned long long v8; // rbp long long v9; // rbx __int16 v10; // cx char v11; // al _QWORD *v12; // rax unsigned long long v13; // rax long long v15; // rax unsigned long long v16; // rdx _BYTE *v17; // rcx char *v18; // r14 long long v19; // rbx long long v20; // r15 int v21; // r13d _QWORD *v22; // rax long long v23; // rbx _QWORD *v24; // rax int v25; // ebx unsigned long long v26; // [rsp+0h] [rbp-48h] long long *v27; // [rsp+10h] [rbp-38h] if ( (_DWORD)a2 == -1 ) v6 = strlen(a1); else v6 = (int)a2; if ( a1 != 0LL && a4 != 0LL ) { LODWORD(v7) = v6 & 1; LODWORD(v8) = 0; if ( *a1 == 48 ) LODWORD(v8) = 2 * (a1[1] == 120); v26 = v6; if ( (v6 & 1) != 0 ) { v9 = (char)a1[(unsigned int)v8]; v10 = *(_WORD *)(*(_QWORD *)__ctype_b_loc() + 2 * v9); if ( (v10 & 0x800) != 0 ) { v11 = v9 - 48; v6 = v26; } else { v11 = -1; v6 = v26; if ( (v10 & 0x1000) != 0 ) { v12 = (_QWORD *)__ctype_tolower_loc(a1, a2, v26); v6 = v26; v11 = *(_DWORD *)(*v12 + 4 * v9) - 87; } } LODWORD(v8) = v8 | 1; *a4 = v11; } v8 = (unsigned int)v8; v13 = v6 - (unsigned int)v8; if ( (v13 & 1) == 0 && v13 >> 1 <= (unsigned int)(a3 - v7) ) { if ( v6 <= (unsigned int)v8 ) return (unsigned int)v7; v15 = __ctype_b_loc(); v16 = v26; v17 = a1; v27 = (long long *)v15; v7 = v26 & 1; while ( 1 ) { v18 = a4; v19 = (char)v17[v8]; v20 = *v27; if ( (*(_WORD *)(*v27 + 2 * v19) & 0x800) != 0 ) { v21 = v19 - 48; } else { v21 = -1; if ( (*(_WORD *)(*v27 + 2 * v19) & 0x1000) != 0 ) { v22 = (_QWORD *)__ctype_tolower_loc(a1, a2, v16); v16 = v26; v17 = a1; v21 = *(_DWORD *)(*v22 + 4 * v19) - 87; } } v23 = (char)v17[v8 + 1]; if ( (*(_WORD *)(v20 + 2 * v23) & 0x800) != 0 ) { v25 = v23 - 48; a4 = v18; } else { if ( (*(_WORD *)(v20 + 2 * v23) & 0x1000) == 0 ) break; a4 = v18; v24 = (_QWORD *)__ctype_tolower_loc(a1, a2, v16); v16 = v26; v17 = a1; v25 = *(_DWORD *)(*v24 + 4 * v23) - 87; } if ( v21 == -1 || v25 == -1 ) break; a4[v7++] = (16 * v21) | v25; v8 += 2LL; if ( v8 >= v16 ) return (unsigned int)v7; } } } LODWORD(v7) = -1; return (unsigned int)v7; }
hex_to_bytes: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R15,RCX MOV R13D,EDX CMP ESI,-0x1 JZ 0x00112824 MOVSXD RDX,ESI JMP 0x00112832 LAB_00112824: MOV RBX,RDI CALL 0x00105140 MOV RDI,RBX MOV RDX,RAX LAB_00112832: TEST RDI,RDI SETNZ AL TEST R15,R15 SETNZ CL AND CL,AL CMP CL,0x1 JNZ 0x001128db MOV R12D,EDX AND R12D,0x1 XOR EBP,EBP CMP byte ptr [RDI],0x30 JNZ 0x00112863 XOR EBP,EBP CMP byte ptr [RDI + 0x1],0x78 SETZ BPL ADD EBP,EBP LAB_00112863: TEST R12D,R12D MOV qword ptr [RSP],RDX JZ 0x001128c4 MOV EAX,EBP MOV R14,RDI MOVSX RBX,byte ptr [RDI + RAX*0x1] CALL 0x00105090 MOV RAX,qword ptr [RAX] MOVZX ECX,word ptr [RAX + RBX*0x2] BT ECX,0xb JC 0x001128b1 MOV EAX,0xffffffff BT ECX,0xc MOV RDI,R14 MOV RDX,qword ptr [RSP] JNC 0x001128be CALL 0x00105150 MOV RDX,qword ptr [RSP] MOV RDI,R14 MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + RBX*0x4] ADD EAX,-0x57 JMP 0x001128be LAB_001128b1: MOVZX EAX,BL ADD EAX,-0x30 MOV RDI,R14 MOV RDX,qword ptr [RSP] LAB_001128be: OR EBP,0x1 MOV byte ptr [R15],AL LAB_001128c4: MOV EBP,EBP MOV RAX,RDX SUB RAX,RBP TEST AL,0x1 JNZ 0x001128db SUB R13D,R12D SHR RAX,0x1 CMP RAX,R13 JBE 0x001128f3 LAB_001128db: MOV R12D,0xffffffff LAB_001128e1: MOV EAX,R12D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001128f3: CMP RDX,RBP JBE 0x001128e1 MOV qword ptr [RSP + 0x8],RDI CALL 0x00105090 MOV RDX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x10],RAX MOV R12D,EDX AND R12D,0x1 LAB_00112917: MOV R14,R15 MOVSX RBX,byte ptr [RCX + RBP*0x1] MOV RAX,qword ptr [RSP + 0x10] MOV R15,qword ptr [RAX] MOVZX EAX,word ptr [R15 + RBX*0x2] BT EAX,0xb JC 0x00112959 MOV R13D,0xffffffff BT EAX,0xc JNC 0x0011295f CALL 0x00105150 MOV RDX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV R13D,dword ptr [RAX + RBX*0x4] ADD R13D,-0x57 JMP 0x0011295f LAB_00112959: ADD EBX,-0x30 MOV R13D,EBX LAB_0011295f: MOVSX RBX,byte ptr [RCX + RBP*0x1 + 0x1] MOVZX EAX,word ptr [R15 + RBX*0x2] BT EAX,0xb JC 0x00112996 BT EAX,0xc JNC 0x001128db MOV R15,R14 CALL 0x00105150 MOV RDX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX] MOV EBX,dword ptr [RAX + RBX*0x4] ADD EBX,-0x57 JMP 0x0011299c LAB_00112996: ADD EBX,-0x30 MOV R15,R14 LAB_0011299c: CMP R13D,-0x1 JZ 0x001128db CMP EBX,-0x1 JZ 0x001128db SHL R13D,0x4 OR EBX,R13D MOV byte ptr [R15 + R12*0x1],BL INC R12 ADD RBP,0x2 CMP RBP,RDX JC 0x00112917 JMP 0x001128e1
ulong hex_to_bytes(char *param_1,int param_2,int param_3,char *param_4) { char cVar1; ushort uVar2; ushort *puVar3; char cVar4; ushort **ppuVar5; __int32_t **pp_Var6; size_t sVar7; int iVar8; uint uVar9; ulong uVar10; uint uVar11; ulong uVar12; int iVar13; if (param_2 == -1) { sVar7 = strlen(param_1); } else { sVar7 = (size_t)param_2; } if (param_4 != (char *)0x0 && param_1 != (char *)0x0) { uVar11 = (uint)sVar7 & 1; uVar12 = (ulong)uVar11; uVar9 = 0; if (*param_1 == '0') { uVar9 = (uint)(param_1[1] == 'x') * 2; } if ((sVar7 & 1) != 0) { cVar1 = param_1[uVar9]; ppuVar5 = __ctype_b_loc(); if (((*ppuVar5)[cVar1] >> 0xb & 1) == 0) { cVar4 = -1; if (((*ppuVar5)[cVar1] >> 0xc & 1) != 0) { pp_Var6 = __ctype_tolower_loc(); cVar4 = (char)(*pp_Var6)[cVar1] + -0x57; } } else { cVar4 = cVar1 + -0x30; } uVar9 = uVar9 | 1; *param_4 = cVar4; } uVar10 = (ulong)uVar9; if (((sVar7 - uVar10 & 1) == 0) && (sVar7 - uVar10 >> 1 <= (ulong)(param_3 - uVar11))) { if (uVar10 < sVar7) { ppuVar5 = __ctype_b_loc(); uVar12 = (ulong)((uint)sVar7 & 1); do { cVar1 = param_1[uVar10]; puVar3 = *ppuVar5; uVar2 = puVar3[cVar1]; if ((uVar2 >> 0xb & 1) == 0) { iVar13 = -1; if ((uVar2 >> 0xc & 1) != 0) { pp_Var6 = __ctype_tolower_loc(); iVar13 = (*pp_Var6)[cVar1] + -0x57; } } else { iVar13 = cVar1 + -0x30; } cVar1 = param_1[uVar10 + 1]; uVar2 = puVar3[cVar1]; if ((uVar2 >> 0xb & 1) == 0) { if ((uVar2 >> 0xc & 1) == 0) goto LAB_001128db; pp_Var6 = __ctype_tolower_loc(); iVar8 = (*pp_Var6)[cVar1] + -0x57; } else { iVar8 = cVar1 + -0x30; } if ((iVar13 == -1) || (iVar8 == -1)) goto LAB_001128db; param_4[uVar12] = (byte)iVar8 | (byte)(iVar13 << 4); uVar12 = uVar12 + 1; uVar10 = uVar10 + 2; } while (uVar10 < sVar7); } goto LAB_001128e1; } } LAB_001128db: uVar12 = 0xffffffff; LAB_001128e1: return uVar12 & 0xffffffff; }
26,145
my_parse_charset_xml
eloqsql/strings/ctype.c
my_bool my_parse_charset_xml(MY_CHARSET_LOADER *loader, const char *buf, size_t len) { MY_XML_PARSER p; struct my_cs_file_info info; my_bool rc; my_charset_file_init(&info); my_xml_parser_create(&p); my_xml_set_enter_handler(&p,cs_enter); my_xml_set_value_handler(&p,cs_value); my_xml_set_leave_handler(&p,cs_leave); info.loader= loader; my_xml_set_user_data(&p, (void *) &info); rc= (my_xml_parse(&p,buf,len) == MY_XML_OK) ? FALSE : TRUE; my_xml_parser_free(&p); my_charset_file_free(&info); if (rc != MY_XML_OK) { const char *errstr= my_xml_error_string(&p); if (sizeof(loader->error) > 32 + strlen(errstr)) { /* We cannot use my_snprintf() here. See previous comment. */ sprintf(loader->error, "at line %d pos %d: %s", my_xml_error_lineno(&p)+1, (int) my_xml_error_pos(&p), my_xml_error_string(&p)); } } return rc; }
O0
c
my_parse_charset_xml: pushq %rbp movq %rsp, %rbp subq $0x960, %rsp # imm = 0x960 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x920(%rbp) movq %rsi, -0x928(%rbp) movq %rdx, -0x930(%rbp) leaq -0x918(%rbp), %rdi callq 0x6c280 leaq -0x168(%rbp), %rdi callq 0x788b0 leaq -0x168(%rbp), %rdi leaq 0x1bd(%rip), %rsi # 0x6c2d0 callq 0x78970 leaq -0x168(%rbp), %rdi leaq 0x29a(%rip), %rsi # 0x6c3c0 callq 0x78950 leaq -0x168(%rbp), %rdi leaq 0x9f7(%rip), %rsi # 0x6cb30 callq 0x78990 movq -0x920(%rbp), %rax movq %rax, -0x170(%rbp) leaq -0x168(%rbp), %rdi leaq -0x918(%rbp), %rsi callq 0x789b0 movq -0x928(%rbp), %rsi movq -0x930(%rbp), %rdx leaq -0x168(%rbp), %rdi callq 0x77780 movl %eax, %edx movl $0x1, %eax xorl %ecx, %ecx cmpl $0x0, %edx cmovel %ecx, %eax movb %al, -0x931(%rbp) leaq -0x168(%rbp), %rdi callq 0x78910 leaq -0x918(%rbp), %rdi callq 0x6ce40 movsbl -0x931(%rbp), %eax cmpl $0x0, %eax je 0x6c24d leaq -0x168(%rbp), %rdi callq 0x789d0 movq %rax, -0x940(%rbp) movq -0x940(%rbp), %rdi callq 0x24120 movq %rax, %rcx addq $0x20, %rcx movl $0x80, %eax cmpq %rcx, %rax jbe 0x6c24b movq -0x920(%rbp), %rax movq %rax, -0x950(%rbp) leaq -0x168(%rbp), %rdi callq 0x78a60 addl $0x1, %eax movl %eax, -0x948(%rbp) leaq -0x168(%rbp), %rdi callq 0x789f0 movl %eax, -0x944(%rbp) leaq -0x168(%rbp), %rdi callq 0x789d0 movq -0x950(%rbp), %rdi movl -0x948(%rbp), %edx movl -0x944(%rbp), %ecx movq %rax, %r8 leaq 0xfd1f(%rip), %rsi # 0x7bf63 movb $0x0, %al callq 0x240b0 jmp 0x6c24d movb -0x931(%rbp), %al movb %al, -0x951(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x6c27a movb -0x951(%rbp), %al addq $0x960, %rsp # imm = 0x960 popq %rbp retq callq 0x242e0 nop
my_parse_charset_xml: push rbp mov rbp, rsp sub rsp, 960h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_920], rdi mov [rbp+var_928], rsi mov [rbp+var_930], rdx lea rdi, [rbp+var_918] call my_charset_file_init lea rdi, [rbp+var_168] call my_xml_parser_create lea rdi, [rbp+var_168] lea rsi, cs_enter call my_xml_set_enter_handler lea rdi, [rbp+var_168] lea rsi, cs_value call my_xml_set_value_handler lea rdi, [rbp+var_168] lea rsi, cs_leave call my_xml_set_leave_handler mov rax, [rbp+var_920] mov [rbp+var_170], rax lea rdi, [rbp+var_168] lea rsi, [rbp+var_918] call my_xml_set_user_data mov rsi, [rbp+var_928] mov rdx, [rbp+var_930] lea rdi, [rbp+var_168] call my_xml_parse mov edx, eax mov eax, 1 xor ecx, ecx cmp edx, 0 cmovz eax, ecx mov [rbp+var_931], al lea rdi, [rbp+var_168] call my_xml_parser_free lea rdi, [rbp+var_918] call my_charset_file_free movsx eax, [rbp+var_931] cmp eax, 0 jz loc_6C24D lea rdi, [rbp+var_168] call my_xml_error_string mov [rbp+var_940], rax mov rdi, [rbp+var_940] call _strlen mov rcx, rax add rcx, 20h ; ' ' mov eax, 80h cmp rax, rcx jbe short loc_6C24B mov rax, [rbp+var_920] mov [rbp+var_950], rax lea rdi, [rbp+var_168] call my_xml_error_lineno add eax, 1 mov [rbp+var_948], eax lea rdi, [rbp+var_168] call my_xml_error_pos mov [rbp+var_944], eax lea rdi, [rbp+var_168] call my_xml_error_string mov rdi, [rbp+var_950] mov edx, [rbp+var_948] mov ecx, [rbp+var_944] mov r8, rax lea rsi, aAtLineDPosDS; "at line %d pos %d: %s" mov al, 0 call _sprintf loc_6C24B: jmp short $+2 loc_6C24D: mov al, [rbp+var_931] mov [rbp+var_951], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_6C27A mov al, [rbp+var_951] add rsp, 960h pop rbp retn loc_6C27A: call ___stack_chk_fail
bool my_parse_charset_xml(long long a1, long long a2, long long a3) { const char *v3; // rax int v5; // [rsp+18h] [rbp-948h] int v6; // [rsp+1Ch] [rbp-944h] long long v7; // [rsp+20h] [rbp-940h] bool v8; // [rsp+2Fh] [rbp-931h] _BYTE v10[1960]; // [rsp+48h] [rbp-918h] BYREF long long v11; // [rsp+7F0h] [rbp-170h] _BYTE v12[352]; // [rsp+7F8h] [rbp-168h] BYREF unsigned long long v13; // [rsp+958h] [rbp-8h] v13 = __readfsqword(0x28u); my_charset_file_init(v10); my_xml_parser_create(v12); my_xml_set_enter_handler(v12, cs_enter); my_xml_set_value_handler(v12, cs_value); my_xml_set_leave_handler(v12, cs_leave); v11 = a1; my_xml_set_user_data(v12, v10); v8 = (unsigned int)my_xml_parse(v12, a2, a3) != 0; my_xml_parser_free(v12); my_charset_file_free(v10); if ( v8 ) { v7 = my_xml_error_string(v12); if ( (unsigned long long)(strlen(v7) + 32) < 0x80 ) { v5 = my_xml_error_lineno(v12) + 1; v6 = my_xml_error_pos(v12); v3 = (const char *)my_xml_error_string(v12); sprintf(a1, "at line %d pos %d: %s", v5, v6, v3); } } return v8; }
my_parse_charset_xml: PUSH RBP MOV RBP,RSP SUB RSP,0x960 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x920],RDI MOV qword ptr [RBP + -0x928],RSI MOV qword ptr [RBP + -0x930],RDX LEA RDI,[RBP + -0x918] CALL 0x0016c280 LEA RDI,[RBP + -0x168] CALL 0x001788b0 LEA RDI,[RBP + -0x168] LEA RSI,[0x16c2d0] CALL 0x00178970 LEA RDI,[RBP + -0x168] LEA RSI,[0x16c3c0] CALL 0x00178950 LEA RDI,[RBP + -0x168] LEA RSI,[0x16cb30] CALL 0x00178990 MOV RAX,qword ptr [RBP + -0x920] MOV qword ptr [RBP + -0x170],RAX LEA RDI,[RBP + -0x168] LEA RSI,[RBP + -0x918] CALL 0x001789b0 MOV RSI,qword ptr [RBP + -0x928] MOV RDX,qword ptr [RBP + -0x930] LEA RDI,[RBP + -0x168] CALL 0x00177780 MOV EDX,EAX MOV EAX,0x1 XOR ECX,ECX CMP EDX,0x0 CMOVZ EAX,ECX MOV byte ptr [RBP + -0x931],AL LEA RDI,[RBP + -0x168] CALL 0x00178910 LEA RDI,[RBP + -0x918] CALL 0x0016ce40 MOVSX EAX,byte ptr [RBP + -0x931] CMP EAX,0x0 JZ 0x0016c24d LEA RDI,[RBP + -0x168] CALL 0x001789d0 MOV qword ptr [RBP + -0x940],RAX MOV RDI,qword ptr [RBP + -0x940] CALL 0x00124120 MOV RCX,RAX ADD RCX,0x20 MOV EAX,0x80 CMP RAX,RCX JBE 0x0016c24b MOV RAX,qword ptr [RBP + -0x920] MOV qword ptr [RBP + -0x950],RAX LEA RDI,[RBP + -0x168] CALL 0x00178a60 ADD EAX,0x1 MOV dword ptr [RBP + -0x948],EAX LEA RDI,[RBP + -0x168] CALL 0x001789f0 MOV dword ptr [RBP + -0x944],EAX LEA RDI,[RBP + -0x168] CALL 0x001789d0 MOV RDI,qword ptr [RBP + -0x950] MOV EDX,dword ptr [RBP + -0x948] MOV ECX,dword ptr [RBP + -0x944] MOV R8,RAX LEA RSI,[0x17bf63] MOV AL,0x0 CALL 0x001240b0 LAB_0016c24b: JMP 0x0016c24d LAB_0016c24d: MOV AL,byte ptr [RBP + -0x931] MOV byte ptr [RBP + -0x951],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0016c27a MOV AL,byte ptr [RBP + -0x951] ADD RSP,0x960 POP RBP RET LAB_0016c27a: CALL 0x001242e0
int8 my_parse_charset_xml(char *param_1,int8 param_2,int8 param_3) { int iVar1; int iVar2; uint uVar3; char *__s; size_t sVar4; int8 uVar5; long in_FS_OFFSET; int1 local_920 [1960]; char *local_178; int1 local_170 [352]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); my_charset_file_init(local_920); my_xml_parser_create(local_170); my_xml_set_enter_handler(local_170,cs_enter); my_xml_set_value_handler(local_170,cs_value); my_xml_set_leave_handler(local_170,cs_leave); local_178 = param_1; my_xml_set_user_data(local_170,local_920); iVar1 = my_xml_parse(local_170,param_2,param_3); my_xml_parser_free(local_170); my_charset_file_free(local_920); if (iVar1 != 0) { __s = (char *)my_xml_error_string(local_170); sVar4 = strlen(__s); if (sVar4 + 0x20 < 0x80) { iVar2 = my_xml_error_lineno(local_170); uVar3 = my_xml_error_pos(local_170); uVar5 = my_xml_error_string(local_170); sprintf(param_1,"at line %d pos %d: %s",(ulong)(iVar2 + 1),(ulong)uVar3,uVar5); } } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),iVar1 != 0); } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
26,146
lunasvg::SVGMaskElement::maskRect(lunasvg::SVGElement const*) const
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
Rect SVGMaskElement::maskRect(const SVGElement* element) const { LengthContext lengthContext(this, m_maskUnits.value()); Rect maskRect = { lengthContext.valueForLength(m_x), lengthContext.valueForLength(m_y), lengthContext.valueForLength(m_width), lengthContext.valueForLength(m_height) }; if(m_maskUnits.value() == Units::ObjectBoundingBox) { auto bbox = element->fillBoundingBox(); maskRect.x = maskRect.x * bbox.w + bbox.x; maskRect.y = maskRect.y * bbox.h + bbox.y; maskRect.w = maskRect.w * bbox.w; maskRect.h = maskRect.h * bbox.h; } return maskRect; }
O0
cpp
lunasvg::SVGMaskElement::maskRect(lunasvg::SVGElement const*) const: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x18(%rbp) movq %rsi, -0x20(%rbp) movq -0x18(%rbp), %rdi movq %rdi, -0x48(%rbp) addq $0xd0, %rdi callq 0x215f0 movq -0x48(%rbp), %rsi leaq -0x30(%rbp), %rdi movzbl %al, %edx callq 0x20050 movq -0x48(%rbp), %rsi addq $0x70, %rsi leaq -0x30(%rbp), %rdi callq 0x20080 movq -0x48(%rbp), %rsi movss %xmm0, -0x4c(%rbp) addq $0x88, %rsi leaq -0x30(%rbp), %rdi callq 0x20080 movq -0x48(%rbp), %rsi movss %xmm0, -0x54(%rbp) addq $0xa0, %rsi leaq -0x30(%rbp), %rdi callq 0x20080 movq -0x48(%rbp), %rsi movss %xmm0, -0x50(%rbp) addq $0xb8, %rsi leaq -0x30(%rbp), %rdi callq 0x20080 movss -0x54(%rbp), %xmm1 movss -0x50(%rbp), %xmm2 movaps %xmm0, %xmm3 movss -0x4c(%rbp), %xmm0 leaq -0x10(%rbp), %rdi callq 0x14ee0 movq -0x48(%rbp), %rdi addq $0xd0, %rdi callq 0x215f0 cmpb $0x1, %al jne 0x1d4ec movq -0x20(%rbp), %rdi movq (%rdi), %rax movq 0x58(%rax), %rax callq *%rax movlpd %xmm0, -0x40(%rbp) movlpd %xmm1, -0x38(%rbp) movss -0x10(%rbp), %xmm0 movss -0x38(%rbp), %xmm2 movss -0x40(%rbp), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0x10(%rbp) movss -0xc(%rbp), %xmm0 movss -0x34(%rbp), %xmm2 movss -0x3c(%rbp), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 movss %xmm0, -0xc(%rbp) movss -0x8(%rbp), %xmm0 mulss -0x38(%rbp), %xmm0 movss %xmm0, -0x8(%rbp) movss -0x4(%rbp), %xmm0 mulss -0x34(%rbp), %xmm0 movss %xmm0, -0x4(%rbp) movsd -0x10(%rbp), %xmm0 movsd -0x8(%rbp), %xmm1 addq $0x60, %rsp popq %rbp retq nopl (%rax)
_ZNK7lunasvg14SVGMaskElement8maskRectEPKNS_10SVGElementE: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_18], rdi mov [rbp+var_20], rsi mov rdi, [rbp+var_18] mov [rbp+var_48], rdi add rdi, 0D0h call _ZNK7lunasvg14SVGEnumerationINS_5UnitsEE5valueEv; lunasvg::SVGEnumeration<lunasvg::Units>::value(void) mov rsi, [rbp+var_48] lea rdi, [rbp+var_30] movzx edx, al call _ZN7lunasvg13LengthContextC2EPKNS_10SVGElementENS_5UnitsE; lunasvg::LengthContext::LengthContext(lunasvg::SVGElement const*,lunasvg::Units) mov rsi, [rbp+var_48] add rsi, 70h ; 'p'; lunasvg::SVGLength * lea rdi, [rbp+var_30]; this call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) mov rsi, [rbp+var_48] movss [rbp+var_4C], xmm0 add rsi, 88h; lunasvg::SVGLength * lea rdi, [rbp+var_30]; this call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) mov rsi, [rbp+var_48] movss [rbp+var_54], xmm0 add rsi, 0A0h; lunasvg::SVGLength * lea rdi, [rbp+var_30]; this call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) mov rsi, [rbp+var_48] movss [rbp+var_50], xmm0 add rsi, 0B8h; lunasvg::SVGLength * lea rdi, [rbp+var_30]; this call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_9SVGLengthE; lunasvg::LengthContext::valueForLength(lunasvg::SVGLength const&) movss xmm1, [rbp+var_54]; float movss xmm2, [rbp+var_50]; float movaps xmm3, xmm0; float movss xmm0, [rbp+var_4C]; float lea rdi, [rbp+var_10]; this call _ZN7lunasvg4RectC2Effff; lunasvg::Rect::Rect(float,float,float,float) mov rdi, [rbp+var_48] add rdi, 0D0h call _ZNK7lunasvg14SVGEnumerationINS_5UnitsEE5valueEv; lunasvg::SVGEnumeration<lunasvg::Units>::value(void) cmp al, 1 jnz short loc_1D4EC mov rdi, [rbp+var_20] mov rax, [rdi] mov rax, [rax+58h] call rax movlpd [rbp+var_40], xmm0 movlpd [rbp+var_38], xmm1 movss xmm0, dword ptr [rbp+var_10] movss xmm2, dword ptr [rbp+var_38] movss xmm1, dword ptr [rbp+var_40] mulss xmm0, xmm2 addss xmm0, xmm1 movss dword ptr [rbp+var_10], xmm0 movss xmm0, dword ptr [rbp+var_10+4] movss xmm2, dword ptr [rbp+var_38+4] movss xmm1, dword ptr [rbp+var_40+4] mulss xmm0, xmm2 addss xmm0, xmm1 movss dword ptr [rbp+var_10+4], xmm0 movss xmm0, dword ptr [rbp+var_8] mulss xmm0, dword ptr [rbp+var_38] movss dword ptr [rbp+var_8], xmm0 movss xmm0, dword ptr [rbp+var_8+4] mulss xmm0, dword ptr [rbp+var_38+4] movss dword ptr [rbp+var_8+4], xmm0 loc_1D4EC: movsd xmm0, [rbp+var_10] movsd xmm1, [rbp+var_8] add rsp, 60h pop rbp retn
double lunasvg::SVGMaskElement::maskRect( lunasvg::SVGMaskElement *this, const lunasvg::SVGElement *a2, float a3) { unsigned __int8 v3; // al long long v4; // xmm1_8 double v6; // [rsp+20h] [rbp-40h] _BYTE v7[16]; // [rsp+30h] [rbp-30h] BYREF const lunasvg::SVGElement *v8; // [rsp+40h] [rbp-20h] lunasvg::SVGMaskElement *v9; // [rsp+48h] [rbp-18h] double v10; // [rsp+50h] [rbp-10h] BYREF float v11; // [rsp+58h] [rbp-8h] float v12; // [rsp+5Ch] [rbp-4h] v9 = this; v8 = a2; v3 = lunasvg::SVGEnumeration<lunasvg::Units>::value((char *)this + 208); lunasvg::LengthContext::LengthContext(v7, this, v3); lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v7, (lunasvg::SVGMaskElement *)((char *)this + 112)); lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v7, (lunasvg::SVGMaskElement *)((char *)this + 136)); lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v7, (lunasvg::SVGMaskElement *)((char *)this + 160)); lunasvg::LengthContext::valueForLength((lunasvg::LengthContext *)v7, (lunasvg::SVGMaskElement *)((char *)this + 184)); v4 = LODWORD(a3); lunasvg::Rect::Rect((lunasvg::Rect *)&v10, a3, a3, a3, a3); if ( (unsigned __int8)lunasvg::SVGEnumeration<lunasvg::Units>::value((char *)this + 208) == 1 ) { v6 = (*(double ( **)(const lunasvg::SVGElement *))(*(_QWORD *)v8 + 88LL))(v8); *(float *)&v10 = (float)(*(float *)&v10 * *(float *)&v4) + *(float *)&v6; *((float *)&v10 + 1) = (float)(*((float *)&v10 + 1) * *((float *)&v4 + 1)) + *((float *)&v6 + 1); v11 = v11 * *(float *)&v4; v12 = v12 * *((float *)&v4 + 1); } return v10; }
maskRect: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x18],RDI MOV qword ptr [RBP + -0x20],RSI MOV RDI,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x48],RDI ADD RDI,0xd0 CALL 0x001215f0 MOV RSI,qword ptr [RBP + -0x48] LEA RDI,[RBP + -0x30] MOVZX EDX,AL CALL 0x00120050 MOV RSI,qword ptr [RBP + -0x48] ADD RSI,0x70 LEA RDI,[RBP + -0x30] CALL 0x00120080 MOV RSI,qword ptr [RBP + -0x48] MOVSS dword ptr [RBP + -0x4c],XMM0 ADD RSI,0x88 LEA RDI,[RBP + -0x30] CALL 0x00120080 MOV RSI,qword ptr [RBP + -0x48] MOVSS dword ptr [RBP + -0x54],XMM0 ADD RSI,0xa0 LEA RDI,[RBP + -0x30] CALL 0x00120080 MOV RSI,qword ptr [RBP + -0x48] MOVSS dword ptr [RBP + -0x50],XMM0 ADD RSI,0xb8 LEA RDI,[RBP + -0x30] CALL 0x00120080 MOVSS XMM1,dword ptr [RBP + -0x54] MOVSS XMM2,dword ptr [RBP + -0x50] MOVAPS XMM3,XMM0 MOVSS XMM0,dword ptr [RBP + -0x4c] LEA RDI,[RBP + -0x10] CALL 0x00114ee0 MOV RDI,qword ptr [RBP + -0x48] ADD RDI,0xd0 CALL 0x001215f0 CMP AL,0x1 JNZ 0x0011d4ec MOV RDI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x58] CALL RAX MOVLPD qword ptr [RBP + -0x40],XMM0 MOVLPD qword ptr [RBP + -0x38],XMM1 MOVSS XMM0,dword ptr [RBP + -0x10] MOVSS XMM2,dword ptr [RBP + -0x38] MOVSS XMM1,dword ptr [RBP + -0x40] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x10],XMM0 MOVSS XMM0,dword ptr [RBP + -0xc] MOVSS XMM2,dword ptr [RBP + -0x34] MOVSS XMM1,dword ptr [RBP + -0x3c] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0xc],XMM0 MOVSS XMM0,dword ptr [RBP + -0x8] MULSS XMM0,dword ptr [RBP + -0x38] MOVSS dword ptr [RBP + -0x8],XMM0 MOVSS XMM0,dword ptr [RBP + -0x4] MULSS XMM0,dword ptr [RBP + -0x34] MOVSS dword ptr [RBP + -0x4],XMM0 LAB_0011d4ec: MOVSD XMM0,qword ptr [RBP + -0x10] MOVSD XMM1,qword ptr [RBP + -0x8] ADD RSP,0x60 POP RBP RET
/* lunasvg::SVGMaskElement::maskRect(lunasvg::SVGElement const*) const */ int1 [16] __thiscall lunasvg::SVGMaskElement::maskRect(SVGMaskElement *this,SVGElement *param_1) { int1 auVar1 [16]; int1 uVar2; char cVar3; float fVar4; float fVar5; float fVar6; float fVar7; int8 uVar8; ulong uVar9; float local_48; float fStack_44; float local_40; float fStack_3c; LengthContext local_38 [16]; SVGElement *local_28; SVGMaskElement *local_20; float local_18; float fStack_14; float local_10; float fStack_c; local_28 = param_1; local_20 = this; uVar2 = SVGEnumeration<lunasvg::Units>::value((SVGEnumeration<lunasvg::Units> *)(this + 0xd0)); LengthContext::LengthContext(local_38,this,uVar2); fVar4 = (float)LengthContext::valueForLength(local_38,(SVGLength *)(this + 0x70)); fVar5 = (float)LengthContext::valueForLength(local_38,(SVGLength *)(this + 0x88)); fVar6 = (float)LengthContext::valueForLength(local_38,(SVGLength *)(this + 0xa0)); fVar7 = (float)LengthContext::valueForLength(local_38,(SVGLength *)(this + 0xb8)); uVar9 = (ulong)(uint)fVar5; Rect::Rect((Rect *)&local_18,fVar4,fVar5,fVar6,fVar7); cVar3 = SVGEnumeration<lunasvg::Units>::value((SVGEnumeration<lunasvg::Units> *)(this + 0xd0)); if (cVar3 == '\x01') { uVar8 = (**(code **)(*(long *)local_28 + 0x58))(); local_40 = (float)uVar9; local_48 = (float)uVar8; local_18 = local_18 * local_40 + local_48; fStack_3c = (float)(uVar9 >> 0x20); fStack_44 = (float)((ulong)uVar8 >> 0x20); fStack_14 = fStack_14 * fStack_3c + fStack_44; local_10 = local_10 * local_40; fStack_c = fStack_c * fStack_3c; } auVar1._4_4_ = fStack_14; auVar1._0_4_ = local_18; auVar1._8_4_ = local_10; auVar1._12_4_ = fStack_c; return auVar1; }
26,147
lunasvg::SVGMaskElement::maskRect(lunasvg::SVGElement const*) const
dmazzella[P]pylunasvg/lunasvg/source/svgelement.cpp
Rect SVGMaskElement::maskRect(const SVGElement* element) const { LengthContext lengthContext(this, m_maskUnits.value()); Rect maskRect = { lengthContext.valueForLength(m_x), lengthContext.valueForLength(m_y), lengthContext.valueForLength(m_width), lengthContext.valueForLength(m_height) }; if(m_maskUnits.value() == Units::ObjectBoundingBox) { auto bbox = element->fillBoundingBox(); maskRect.x = maskRect.x * bbox.w + bbox.x; maskRect.y = maskRect.y * bbox.h + bbox.y; maskRect.w = maskRect.w * bbox.w; maskRect.h = maskRect.h * bbox.h; } return maskRect; }
O1
cpp
lunasvg::SVGMaskElement::maskRect(lunasvg::SVGElement const*) const: pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rsi, %rbx movq %rdi, %r14 movb 0xd9(%rdi), %al leaq 0x40(%rsp), %r15 movq %rdi, (%r15) movb %al, 0x8(%r15) leaq 0x7c(%rdi), %rsi movzbl 0x79(%rdi), %edx movq %r15, %rdi callq 0x1f7ea movaps %xmm0, 0x20(%rsp) leaq 0x94(%r14), %rsi movzbl 0x91(%r14), %edx movq %r15, %rdi callq 0x1f7ea movaps %xmm0, (%rsp) leaq 0xac(%r14), %rsi movzbl 0xa9(%r14), %edx movq %r15, %rdi callq 0x1f7ea movaps %xmm0, 0x10(%rsp) leaq 0xc4(%r14), %rsi movzbl 0xc1(%r14), %edx movq %r15, %rdi callq 0x1f7ea cmpb $0x1, 0xd9(%r14) jne 0x12918 movq (%rbx), %rax movq %rbx, %rdi movaps %xmm0, 0x30(%rsp) callq *0x58(%rax) movaps 0x20(%rsp), %xmm2 mulss %xmm1, %xmm2 addss %xmm0, %xmm2 movaps 0x10(%rsp), %xmm3 mulss %xmm1, %xmm3 shufps $0x55, %xmm1, %xmm1 # xmm1 = xmm1[1,1,1,1] shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] movaps (%rsp), %xmm4 mulss %xmm1, %xmm4 addss %xmm0, %xmm4 unpcklps %xmm4, %xmm2 # xmm2 = xmm2[0],xmm4[0],xmm2[1],xmm4[1] movaps 0x30(%rsp), %xmm0 mulss %xmm1, %xmm0 jmp 0x12926 movaps 0x20(%rsp), %xmm2 unpcklps (%rsp), %xmm2 # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1] movaps 0x10(%rsp), %xmm3 unpcklps %xmm0, %xmm3 # xmm3 = xmm3[0],xmm0[0],xmm3[1],xmm0[1] movaps %xmm2, %xmm0 movaps %xmm3, %xmm1 addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq nop
_ZNK7lunasvg14SVGMaskElement8maskRectEPKNS_10SVGElementE: push r15 push r14 push rbx sub rsp, 50h mov rbx, rsi mov r14, rdi mov al, [rdi+0D9h] lea r15, [rsp+68h+var_28] mov [r15], rdi mov [r15+8], al lea rsi, [rdi+7Ch] movzx edx, byte ptr [rdi+79h] mov rdi, r15 call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movaps [rsp+68h+var_48], xmm0 lea rsi, [r14+94h] movzx edx, byte ptr [r14+91h] mov rdi, r15 call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movaps [rsp+68h+var_68], xmm0 lea rsi, [r14+0ACh] movzx edx, byte ptr [r14+0A9h] mov rdi, r15 call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) movaps [rsp+68h+var_58], xmm0 lea rsi, [r14+0C4h] movzx edx, byte ptr [r14+0C1h] mov rdi, r15 call _ZNK7lunasvg13LengthContext14valueForLengthERKNS_6LengthENS_15LengthDirectionE; lunasvg::LengthContext::valueForLength(lunasvg::Length const&,lunasvg::LengthDirection) cmp byte ptr [r14+0D9h], 1 jnz short loc_12918 mov rax, [rbx] mov rdi, rbx movaps [rsp+68h+var_38], xmm0 call qword ptr [rax+58h] movaps xmm2, [rsp+68h+var_48] mulss xmm2, xmm1 addss xmm2, xmm0 movaps xmm3, [rsp+68h+var_58] mulss xmm3, xmm1 shufps xmm1, xmm1, 55h ; 'U' shufps xmm0, xmm0, 55h ; 'U' movaps xmm4, [rsp+68h+var_68] mulss xmm4, xmm1 addss xmm4, xmm0 unpcklps xmm2, xmm4 movaps xmm0, [rsp+68h+var_38] mulss xmm0, xmm1 jmp short loc_12926 loc_12918: movaps xmm2, [rsp+68h+var_48] unpcklps xmm2, [rsp+68h+var_68] movaps xmm3, [rsp+68h+var_58] loc_12926: unpcklps xmm3, xmm0 movaps xmm0, xmm2 movaps xmm1, xmm3 add rsp, 50h pop rbx pop r14 pop r15 retn
__m128 lunasvg::SVGMaskElement::maskRect( lunasvg::SVGMaskElement *this, const lunasvg::SVGElement *a2, __m128 a3, __m128 a4) { char v5; // al __m128 v6; // xmm2 __m128 v7; // xmm4 __m128 v10; // [rsp+0h] [rbp-68h] __m128 v11; // [rsp+20h] [rbp-48h] lunasvg::SVGMaskElement *v12; // [rsp+40h] [rbp-28h] BYREF char v13; // [rsp+48h] [rbp-20h] v5 = *((_BYTE *)this + 217); v12 = this; v13 = v5; *(double *)a3.m128_u64 = lunasvg::LengthContext::valueForLength( &v12, (char *)this + 124, *((unsigned __int8 *)this + 121)); v11 = a3; *(double *)a3.m128_u64 = lunasvg::LengthContext::valueForLength( &v12, (char *)this + 148, *((unsigned __int8 *)this + 145)); v10 = a3; lunasvg::LengthContext::valueForLength(&v12, (char *)this + 172, *((unsigned __int8 *)this + 169)); lunasvg::LengthContext::valueForLength(&v12, (char *)this + 196, *((unsigned __int8 *)this + 193)); if ( *((_BYTE *)this + 217) != 1 ) return _mm_unpacklo_ps(v11, v10); *(double *)a3.m128_u64 = (*(double ( **)(const lunasvg::SVGElement *))(*(_QWORD *)a2 + 88LL))(a2); v6 = v11; v6.m128_f32[0] = (float)(v11.m128_f32[0] * a4.m128_f32[0]) + a3.m128_f32[0]; v7 = v10; v7.m128_f32[0] = (float)(v10.m128_f32[0] * _mm_shuffle_ps(a4, a4, 85).m128_f32[0]) + _mm_shuffle_ps(a3, a3, 85).m128_f32[0]; return _mm_unpacklo_ps(v6, v7); }
maskRect: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV RBX,RSI MOV R14,RDI MOV AL,byte ptr [RDI + 0xd9] LEA R15,[RSP + 0x40] MOV qword ptr [R15],RDI MOV byte ptr [R15 + 0x8],AL LEA RSI,[RDI + 0x7c] MOVZX EDX,byte ptr [RDI + 0x79] MOV RDI,R15 CALL 0x0011f7ea MOVAPS xmmword ptr [RSP + 0x20],XMM0 LEA RSI,[R14 + 0x94] MOVZX EDX,byte ptr [R14 + 0x91] MOV RDI,R15 CALL 0x0011f7ea MOVAPS xmmword ptr [RSP],XMM0 LEA RSI,[R14 + 0xac] MOVZX EDX,byte ptr [R14 + 0xa9] MOV RDI,R15 CALL 0x0011f7ea MOVAPS xmmword ptr [RSP + 0x10],XMM0 LEA RSI,[R14 + 0xc4] MOVZX EDX,byte ptr [R14 + 0xc1] MOV RDI,R15 CALL 0x0011f7ea CMP byte ptr [R14 + 0xd9],0x1 JNZ 0x00112918 MOV RAX,qword ptr [RBX] MOV RDI,RBX MOVAPS xmmword ptr [RSP + 0x30],XMM0 CALL qword ptr [RAX + 0x58] MOVAPS XMM2,xmmword ptr [RSP + 0x20] MULSS XMM2,XMM1 ADDSS XMM2,XMM0 MOVAPS XMM3,xmmword ptr [RSP + 0x10] MULSS XMM3,XMM1 SHUFPS XMM1,XMM1,0x55 SHUFPS XMM0,XMM0,0x55 MOVAPS XMM4,xmmword ptr [RSP] MULSS XMM4,XMM1 ADDSS XMM4,XMM0 UNPCKLPS XMM2,XMM4 MOVAPS XMM0,xmmword ptr [RSP + 0x30] MULSS XMM0,XMM1 JMP 0x00112926 LAB_00112918: MOVAPS XMM2,xmmword ptr [RSP + 0x20] UNPCKLPS XMM2,xmmword ptr [RSP] MOVAPS XMM3,xmmword ptr [RSP + 0x10] LAB_00112926: UNPCKLPS XMM3,XMM0 MOVAPS XMM0,XMM2 MOVAPS XMM1,XMM3 ADD RSP,0x50 POP RBX POP R14 POP R15 RET
/* lunasvg::SVGMaskElement::maskRect(lunasvg::SVGElement const*) const */ int8 lunasvg::SVGMaskElement::maskRect(SVGElement *param_1) { long *in_RSI; float fVar1; float fVar2; int8 uVar3; float in_XMM1_Da; float in_XMM1_Db; SVGElement *local_28; SVGElement local_20; local_20 = param_1[0xd9]; local_28 = param_1; fVar1 = (float)LengthContext::valueForLength ((LengthContext *)&local_28,param_1 + 0x7c,param_1[0x79]); fVar2 = (float)LengthContext::valueForLength ((LengthContext *)&local_28,param_1 + 0x94,param_1[0x91]); LengthContext::valueForLength((LengthContext *)&local_28,param_1 + 0xac,param_1[0xa9]); LengthContext::valueForLength((LengthContext *)&local_28,param_1 + 0xc4,param_1[0xc1]); if (param_1[0xd9] == (SVGElement)0x1) { uVar3 = (**(code **)(*in_RSI + 0x58))(); fVar1 = fVar1 * in_XMM1_Da + (float)uVar3; fVar2 = fVar2 * in_XMM1_Db + (float)((ulong)uVar3 >> 0x20); } return CONCAT44(fVar2,fVar1); }
26,148
google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>* google::protobuf::DescriptorPool::Tables::CreateFlatAlloc<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>(google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions> const&)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
internal::FlatAllocator::Allocation* DescriptorPool::Tables::CreateFlatAlloc( const TypeMap<IntT, T...>& sizes) { auto ends = CalculateEnds(sizes); using FlatAlloc = internal::FlatAllocator::Allocation; int last_end = ends.template Get< typename std::tuple_element<sizeof...(T) - 1, std::tuple<T...>>::type>(); size_t total_size = last_end + RoundUpTo<FlatAlloc::kMaxAlign>(sizeof(FlatAlloc)); char* data = static_cast<char*>(::operator new(total_size)); auto* res = ::new (data) FlatAlloc(ends); flat_allocs_.emplace_back(res); return res; }
O0
cpp
google::protobuf::(anonymous namespace)::FlatAllocation<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>* google::protobuf::DescriptorPool::Tables::CreateFlatAlloc<char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions>(google::protobuf::(anonymous namespace)::TypeMap<google::protobuf::(anonymous namespace)::IntT, char, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, google::protobuf::SourceCodeInfo, google::protobuf::FileDescriptorTables, google::protobuf::MessageOptions, google::protobuf::FieldOptions, google::protobuf::EnumOptions, google::protobuf::EnumValueOptions, google::protobuf::ExtensionRangeOptions, google::protobuf::OneofOptions, google::protobuf::ServiceOptions, google::protobuf::MethodOptions, google::protobuf::FileOptions> const&): subq $0x78, %rsp movq %rdi, 0x70(%rsp) movq %rsi, 0x68(%rsp) movq 0x70(%rsp), %rax movq %rax, 0x10(%rsp) movq 0x68(%rsp), %rsi leaq 0x34(%rsp), %rdi callq 0x4cd240 leaq 0x34(%rsp), %rdi callq 0x4c8310 movl (%rax), %eax movl %eax, 0x30(%rsp) movslq 0x30(%rsp), %rax movq %rax, (%rsp) movl $0x34, %edi callq 0x496db0 movq %rax, %rcx movq (%rsp), %rax addq %rcx, %rax movq %rax, 0x28(%rsp) movq 0x28(%rsp), %rdi callq 0x18da00 movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rdi movq %rdi, 0x8(%rsp) leaq 0x34(%rsp), %rsi callq 0x4cd780 movq 0x8(%rsp), %rax movq 0x10(%rsp), %rdi movq %rax, 0x18(%rsp) addq $0x110, %rdi # imm = 0x110 leaq 0x18(%rsp), %rsi callq 0x4cdf10 movq 0x18(%rsp), %rax addq $0x78, %rsp retq nopw %cs:(%rax,%rax)
_ZN6google8protobuf14DescriptorPool6Tables15CreateFlatAllocIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEEEPNS0_12_GLOBAL__N_114FlatAllocationIJcS9_SA_SB_SC_SD_SE_SF_SG_SH_SI_SJ_SK_EEERKNSL_7TypeMapINSL_4IntTEJDpT_EEE: sub rsp, 78h mov [rsp+78h+var_8], rdi mov [rsp+78h+var_10], rsi mov rax, [rsp+78h+var_8] mov [rsp+78h+var_68], rax mov rsi, [rsp+78h+var_10] lea rdi, [rsp+78h+var_44] call _ZN6google8protobuf12_GLOBAL__N_113CalculateEndsIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEEENS1_7TypeMapINS1_4IntTEJDpT_EEERKSO_; google::protobuf::`anonymous namespace'::CalculateEnds<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>(google::protobuf::`anonymous namespace'::TypeMap<google::protobuf::`anonymous namespace'::IntT,char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> const&) lea rdi, [rsp+78h+var_44] call _ZN6google8protobuf12_GLOBAL__N_17TypeMapINS1_4IntTEJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEE3GetISK_EERiv; google::protobuf::`anonymous namespace'::TypeMap<google::protobuf::`anonymous namespace'::IntT,char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::Get<google::protobuf::FileOptions>(void) mov eax, [rax] mov [rsp+78h+var_48], eax movsxd rax, [rsp+78h+var_48] mov [rsp+78h+var_78], rax mov edi, 34h ; '4' call _ZN6google8protobuf12_GLOBAL__N_19RoundUpToILi8EEEmm; google::protobuf::`anonymous namespace'::RoundUpTo<8>(ulong) mov rcx, rax mov rax, [rsp+78h+var_78] add rax, rcx mov [rsp+78h+var_50], rax mov rdi, [rsp+78h+var_50]; unsigned __int64 call __Znwm; operator new(ulong) mov [rsp+78h+var_58], rax mov rdi, [rsp+78h+var_58] mov [rsp+78h+var_70], rdi lea rsi, [rsp+78h+var_44] call _ZN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_14SourceCodeInfoENS0_20FileDescriptorTablesENS0_14MessageOptionsENS0_12FieldOptionsENS0_11EnumOptionsENS0_16EnumValueOptionsENS0_21ExtensionRangeOptionsENS0_12OneofOptionsENS0_14ServiceOptionsENS0_13MethodOptionsENS0_11FileOptionsEEEC2ERKNS1_7TypeMapINS1_4IntTEJcS8_S9_SA_SB_SC_SD_SE_SF_SG_SH_SI_SJ_EEE; google::protobuf::`anonymous namespace'::FlatAllocation<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::FlatAllocation(google::protobuf::`anonymous namespace'::TypeMap<google::protobuf::`anonymous namespace'::IntT,char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions> const&) mov rax, [rsp+78h+var_70] mov rdi, [rsp+78h+var_68] mov [rsp+78h+var_60], rax add rdi, 110h lea rsi, [rsp+78h+var_60] call _ZNSt6vectorISt10unique_ptrIN6google8protobuf12_GLOBAL__N_114FlatAllocationIJcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS2_14SourceCodeInfoENS2_20FileDescriptorTablesENS2_14MessageOptionsENS2_12FieldOptionsENS2_11EnumOptionsENS2_16EnumValueOptionsENS2_21ExtensionRangeOptionsENS2_12OneofOptionsENS2_14ServiceOptionsENS2_13MethodOptionsENS2_11FileOptionsEEEENS2_14DescriptorPool6Tables16FlatAllocDeleterEESaISQ_EE12emplace_backIJRPSM_EEEvDpOT_; std::vector<std::unique_ptr<google::protobuf::`anonymous namespace'::FlatAllocation<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>,google::protobuf::DescriptorPool::Tables::FlatAllocDeleter>>::emplace_back<google::protobuf::`anonymous namespace'::FlatAllocation<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>*&>(google::protobuf::`anonymous namespace'::FlatAllocation<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>*&) mov rax, [rsp+78h+var_60] add rsp, 78h retn
long long google::protobuf::DescriptorPool::Tables::CreateFlatAlloc<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>( long long a1, long long a2) { long long v3; // [rsp+18h] [rbp-60h] BYREF long long v4; // [rsp+20h] [rbp-58h] unsigned long long v5; // [rsp+28h] [rbp-50h] int v6; // [rsp+30h] [rbp-48h] _BYTE v7[52]; // [rsp+34h] [rbp-44h] BYREF long long v8; // [rsp+68h] [rbp-10h] long long v9; // [rsp+70h] [rbp-8h] v9 = a1; v8 = a2; google::protobuf::`anonymous namespace'::CalculateEnds<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>( v7, a2); v6 = *(_DWORD *)google::protobuf::`anonymous namespace'::TypeMap<google::protobuf::`anonymous namespace'::IntT,char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::Get<google::protobuf::FileOptions>((long long)v7); v5 = google::protobuf::`anonymous namespace'::RoundUpTo<8>(52LL) + v6; v4 = operator new(v5); google::protobuf::`anonymous namespace'::FlatAllocation<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>::FlatAllocation( v4, v7); v3 = v4; std::vector<std::unique_ptr<google::protobuf::`anonymous namespace'::FlatAllocation<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>,google::protobuf::DescriptorPool::Tables::FlatAllocDeleter>>::emplace_back<google::protobuf::`anonymous namespace'::FlatAllocation<char,std::string,google::protobuf::SourceCodeInfo,google::protobuf::FileDescriptorTables,google::protobuf::MessageOptions,google::protobuf::FieldOptions,google::protobuf::EnumOptions,google::protobuf::EnumValueOptions,google::protobuf::ExtensionRangeOptions,google::protobuf::OneofOptions,google::protobuf::ServiceOptions,google::protobuf::MethodOptions,google::protobuf::FileOptions>*&>( a1 + 272, &v3); return v3; }
SkipFallback: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV dword ptr [RSP + 0x4],EDX MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] MOV EDX,dword ptr [RSP + 0x4] LEA RCX,[RSP + 0x3] CALL 0x004ccda0 ADD RSP,0x18 RET
/* google::protobuf::internal::EpsCopyInputStream::SkipFallback(char const*, int) */ void __thiscall google::protobuf::internal::EpsCopyInputStream::SkipFallback (EpsCopyInputStream *this,char *param_1,int param_2) { __0 local_15; int local_14; char *local_10; EpsCopyInputStream *local_8; local_14 = param_2; local_10 = param_1; local_8 = this; AppendSize<google::protobuf::internal::EpsCopyInputStream::SkipFallback(char_const*,int)::__0> (this,param_1,param_2,&local_15); return; }
26,149
mi_check_index_tuple
eloqsql/storage/myisam/mi_key.c
check_result_t mi_check_index_tuple(MI_INFO *info, uint keynr, uchar *record) { int need_unpack= TRUE; check_result_t res= CHECK_POS; if (info->index_cond_func) { if (mi_unpack_index_tuple(info, keynr, record)) res= CHECK_ERROR; else if ((res= info->index_cond_func(info->index_cond_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } /* If we got an error, out-of-range condition, or ICP condition computed to FALSE - we don't need to check the Rowid Filter. */ if (res != CHECK_POS) return res; need_unpack= FALSE; } /* Check the Rowid Filter, if present */ if (mi_check_rowid_filter_is_active(info)) { /* Unpack the index tuple if we haven't done it already */ if (need_unpack && mi_unpack_index_tuple(info, keynr, record)) res= CHECK_ERROR; else { if ((res= info->rowid_filter_func(info->rowid_filter_func_arg)) == CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_END_OF_FILE; } } } return res; }
O3
c
mi_check_index_tuple: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %r14 movl %esi, %r15d movq %rdi, %rbx movq 0x340(%rdi), %r13 testq %r13, %r13 je 0x80dc7 movq %rbx, %rdi movl %r15d, %esi movq %r14, %rdx callq 0x80e4a movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testl %eax, %eax jne 0x80e38 movq 0x348(%rbx), %rdi callq *0x340(%rbx) cmpl $0x2, %eax je 0x80dfd movl %eax, %r12d cmpl $0x1, %eax jne 0x80e38 movq 0x358(%rbx), %rax movl $0x1, %r12d testq %rax, %rax je 0x80e38 movq 0x360(%rbx), %rdi callq *%rax testl %eax, %eax je 0x80e38 testq %r13, %r13 je 0x80e20 movq 0x360(%rbx), %rdi callq *0x350(%rbx) cmpl $0x2, %eax jne 0x80e1b movq $-0x1, 0x170(%rbx) callq 0xa8dda movl $0x89, (%rax) movl $0x2, %r12d jmp 0x80e38 movl %eax, %r12d jmp 0x80e38 movq %rbx, %rdi movl %r15d, %esi movq %r14, %rdx callq 0x80e4a movl $0xffffffff, %r12d # imm = 0xFFFFFFFF testl %eax, %eax je 0x80deb movl %r12d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mi_check_index_tuple: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdx mov r15d, esi mov rbx, rdi mov r13, [rdi+340h] test r13, r13 jz short loc_80DC7 mov rdi, rbx mov esi, r15d mov rdx, r14 call mi_unpack_index_tuple mov r12d, 0FFFFFFFFh test eax, eax jnz loc_80E38 mov rdi, [rbx+348h] call qword ptr [rbx+340h] cmp eax, 2 jz short loc_80DFD mov r12d, eax cmp eax, 1 jnz short loc_80E38 loc_80DC7: mov rax, [rbx+358h] mov r12d, 1 test rax, rax jz short loc_80E38 mov rdi, [rbx+360h] call rax test eax, eax jz short loc_80E38 test r13, r13 jz short loc_80E20 loc_80DEB: mov rdi, [rbx+360h] call qword ptr [rbx+350h] cmp eax, 2 jnz short loc_80E1B loc_80DFD: mov qword ptr [rbx+170h], 0FFFFFFFFFFFFFFFFh call _my_thread_var mov dword ptr [rax], 89h mov r12d, 2 jmp short loc_80E38 loc_80E1B: mov r12d, eax jmp short loc_80E38 loc_80E20: mov rdi, rbx mov esi, r15d mov rdx, r14 call mi_unpack_index_tuple mov r12d, 0FFFFFFFFh test eax, eax jz short loc_80DEB loc_80E38: mov eax, r12d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_check_index_tuple(long long a1, const char *a2, long long a3) { long long v5; // r13 unsigned int v6; // r12d long long v7; // rdi unsigned int v8; // eax unsigned int ( *v9)(_QWORD); // rax unsigned int v10; // eax v5 = *(_QWORD *)(a1 + 832); if ( v5 ) { a2 = (const char *)(unsigned int)a2; v6 = -1; if ( (unsigned int)mi_unpack_index_tuple(a1, (unsigned int)a2, a3) ) return v6; v7 = *(_QWORD *)(a1 + 840); v8 = (*(long long ( **)(long long))(a1 + 832))(v7); if ( v8 == 2 ) { LABEL_9: *(_QWORD *)(a1 + 368) = -1LL; *(_DWORD *)my_thread_var(v7, a2) = 137; return 2; } v6 = v8; if ( v8 != 1 ) return v6; } v9 = *(unsigned int ( **)(_QWORD))(a1 + 856); v6 = 1; if ( v9 ) { if ( v9(*(_QWORD *)(a1 + 864)) ) { if ( v5 || (a2 = (const char *)(unsigned int)a2, v6 = -1, !(unsigned int)mi_unpack_index_tuple(a1, (unsigned int)a2, a3)) ) { v7 = *(_QWORD *)(a1 + 864); v10 = (*(long long ( **)(long long))(a1 + 848))(v7); if ( v10 != 2 ) return v10; goto LABEL_9; } } } return v6; }
mi_check_index_tuple: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDX MOV R15D,ESI MOV RBX,RDI MOV R13,qword ptr [RDI + 0x340] TEST R13,R13 JZ 0x00180dc7 MOV RDI,RBX MOV ESI,R15D MOV RDX,R14 CALL 0x00180e4a MOV R12D,0xffffffff TEST EAX,EAX JNZ 0x00180e38 MOV RDI,qword ptr [RBX + 0x348] CALL qword ptr [RBX + 0x340] CMP EAX,0x2 JZ 0x00180dfd MOV R12D,EAX CMP EAX,0x1 JNZ 0x00180e38 LAB_00180dc7: MOV RAX,qword ptr [RBX + 0x358] MOV R12D,0x1 TEST RAX,RAX JZ 0x00180e38 MOV RDI,qword ptr [RBX + 0x360] CALL RAX TEST EAX,EAX JZ 0x00180e38 TEST R13,R13 JZ 0x00180e20 LAB_00180deb: MOV RDI,qword ptr [RBX + 0x360] CALL qword ptr [RBX + 0x350] CMP EAX,0x2 JNZ 0x00180e1b LAB_00180dfd: MOV qword ptr [RBX + 0x170],-0x1 CALL 0x001a8dda MOV dword ptr [RAX],0x89 MOV R12D,0x2 JMP 0x00180e38 LAB_00180e1b: MOV R12D,EAX JMP 0x00180e38 LAB_00180e20: MOV RDI,RBX MOV ESI,R15D MOV RDX,R14 CALL 0x00180e4a MOV R12D,0xffffffff TEST EAX,EAX JZ 0x00180deb LAB_00180e38: MOV EAX,R12D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int mi_check_index_tuple(long param_1,int4 param_2,int8 param_3) { long lVar1; int iVar2; int4 *puVar3; lVar1 = *(long *)(param_1 + 0x340); if (lVar1 != 0) { iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3); if (iVar2 != 0) { return -1; } iVar2 = (**(code **)(param_1 + 0x340))(*(int8 *)(param_1 + 0x348)); if (iVar2 == 2) goto LAB_00180dfd; if (iVar2 != 1) { return iVar2; } } if (*(code **)(param_1 + 0x358) == (code *)0x0) { return 1; } iVar2 = (**(code **)(param_1 + 0x358))(*(int8 *)(param_1 + 0x360)); if (iVar2 == 0) { return 1; } if ((lVar1 == 0) && (iVar2 = mi_unpack_index_tuple(param_1,param_2,param_3), iVar2 != 0)) { return -1; } iVar2 = (**(code **)(param_1 + 0x350))(*(int8 *)(param_1 + 0x360)); if (iVar2 != 2) { return iVar2; } LAB_00180dfd: *(int8 *)(param_1 + 0x170) = 0xffffffffffffffff; puVar3 = (int4 *)_my_thread_var(); *puVar3 = 0x89; return 2; }
26,150
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 0x747fc movq 0x18(%rbp), %rax cmpq -0x38(%rbp), %rax setne %al movb %al, -0x51(%rbp) movb -0x51(%rbp), %al testb $0x1, %al jne 0x74808 jmp 0x748c6 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x19(%rbp), %ecx cmpl %ecx, %eax jne 0x74833 movq -0x10(%rbp), %rax addq $0x1, %rax cmpq -0x28(%rbp), %rax je 0x74833 movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0x74855 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x1a(%rbp), %ecx cmpl %ecx, %eax je 0x74851 movq -0x10(%rbp), %rax movsbl (%rax), %eax movsbl -0x1b(%rbp), %ecx cmpl %ecx, %eax jne 0x74853 jmp 0x748c6 jmp 0x74855 movq -0x10(%rbp), %rax movzbl (%rax), %eax movl %eax, %eax movl %eax, %ecx leaq 0x14b3a9(%rip), %rax # 0x1bfc10 movb (%rax,%rcx), %cl movq 0x18(%rbp), %rax movb %cl, (%rax) movq 0x18(%rbp), %rax movsbl (%rax), %eax cmpl $0x20, %eax je 0x74883 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 0x31c0af(%rip), %rax # 0x390950 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 0x747df movq -0x8(%rbp), %rax movl 0xc(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x748e9 movq 0x18(%rbp), %rcx movq -0x30(%rbp), %rax subq %rax, %rcx movq 0x28(%rbp), %rax movq %rcx, (%rax) jmp 0x748f4 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 0x7492f 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 0x748ff 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_747DF: mov rcx, [rbp+var_10] xor eax, eax cmp rcx, [rbp+var_28] mov [rbp+var_51], al jz short loc_747FC mov rax, [rbp+arg_8] cmp rax, [rbp+var_38] setnz al mov [rbp+var_51], al loc_747FC: mov al, [rbp+var_51] test al, 1 jnz short loc_74808 jmp loc_748C6 loc_74808: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_19] cmp eax, ecx jnz short loc_74833 mov rax, [rbp+var_10] add rax, 1 cmp rax, [rbp+var_28] jz short loc_74833 mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_74855 loc_74833: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_1A] cmp eax, ecx jz short loc_74851 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] movsx ecx, [rbp+var_1B] cmp eax, ecx jnz short loc_74853 loc_74851: jmp short loc_748C6 loc_74853: jmp short $+2 loc_74855: 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_74883 mov [rbp+var_20], 0 loc_74883: 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_747DF loc_748C6: mov rax, [rbp+var_8] mov eax, [rax+0Ch] and eax, 10h cmp eax, 0 jz short loc_748E9 mov rcx, [rbp+arg_8] mov rax, [rbp+var_30] sub rcx, rax mov rax, [rbp+arg_18] mov [rax], rcx jmp short loc_748F4 loc_748E9: mov rcx, [rbp+arg_0] mov rax, [rbp+arg_18] mov [rax], rcx loc_748F4: mov rcx, [rbp+arg_0] mov rax, [rbp+arg_20] mov [rax], rcx loc_748FF: mov rax, [rbp+arg_8] cmp rax, [rbp+var_38] jz short loc_7492F 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_748FF loc_7492F: 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_001747df: MOV RCX,qword ptr [RBP + -0x10] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x51],AL JZ 0x001747fc MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x38] SETNZ AL MOV byte ptr [RBP + -0x51],AL LAB_001747fc: MOV AL,byte ptr [RBP + -0x51] TEST AL,0x1 JNZ 0x00174808 JMP 0x001748c6 LAB_00174808: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x19] CMP EAX,ECX JNZ 0x00174833 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 CMP RAX,qword ptr [RBP + -0x28] JZ 0x00174833 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x00174855 LAB_00174833: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x1a] CMP EAX,ECX JZ 0x00174851 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] MOVSX ECX,byte ptr [RBP + -0x1b] CMP EAX,ECX JNZ 0x00174853 LAB_00174851: JMP 0x001748c6 LAB_00174853: JMP 0x00174855 LAB_00174855: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] MOV EAX,EAX MOV ECX,EAX LEA RAX,[0x2bfc10] 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 0x00174883 MOV dword ptr [RBP + -0x20],0x0 LAB_00174883: 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,[0x490950] 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 0x001747df LAB_001748c6: MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x10 CMP EAX,0x0 JZ 0x001748e9 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 0x001748f4 LAB_001748e9: MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + 0x28] MOV qword ptr [RAX],RCX LAB_001748f4: MOV RCX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RBP + 0x30] MOV qword ptr [RAX],RCX LAB_001748ff: MOV RAX,qword ptr [RBP + 0x18] CMP RAX,qword ptr [RBP + -0x38] JZ 0x0017492f 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 0x001748ff LAB_0017492f: 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; }
26,151
mbedtls_pkcs12_pbe_sha1_rc4_128
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/pkcs12.c
int mbedtls_pkcs12_pbe_sha1_rc4_128(mbedtls_asn1_buf *pbe_params, int mode, const unsigned char *pwd, size_t pwdlen, const unsigned char *data, size_t len, unsigned char *output) { #if !defined(MBEDTLS_ARC4_C) ((void) pbe_params); ((void) mode); ((void) pwd); ((void) pwdlen); ((void) data); ((void) len); ((void) output); return MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE; #else int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; unsigned char key[16]; mbedtls_arc4_context ctx; ((void) mode); mbedtls_arc4_init(&ctx); if ((ret = pkcs12_pbe_derive_key_iv(pbe_params, MBEDTLS_MD_SHA1, pwd, pwdlen, key, 16, NULL, 0)) != 0) { return ret; } mbedtls_arc4_setup(&ctx, key, 16); if ((ret = mbedtls_arc4_crypt(&ctx, len, data, output)) != 0) { goto exit; } exit: mbedtls_platform_zeroize(key, sizeof(key)); mbedtls_arc4_free(&ctx); return ret; #endif /* MBEDTLS_ARC4_C */ }
O3
c
mbedtls_pkcs12_pbe_sha1_rc4_128: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x128, %rsp # imm = 0x128 movq %r9, %r14 movq %r8, %rbx movq %rcx, %r15 movq %rdx, %r12 movq %rdi, %r13 leaq 0x20(%rsp), %rdi callq 0x99ad0 xorps %xmm0, %xmm0 movups %xmm0, (%rsp) leaq 0x10(%rsp), %r8 movl $0x10, %r9d movq %r13, %rdi movl $0x4, %esi movq %r12, %rdx movq %r15, %rcx callq 0x98b97 movl %eax, %ebp testl %eax, %eax jne 0x98b83 movq 0x160(%rsp), %r15 leaq 0x20(%rsp), %r12 leaq 0x10(%rsp), %r13 movq %r12, %rdi movq %r13, %rsi movl $0x10, %edx callq 0x99aec movq %r12, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r15, %rcx callq 0x99b5c movl %eax, %ebp movl $0x10, %esi movq %r13, %rdi callq 0x8db8c movq %r12, %rdi callq 0x99adc movl %ebp, %eax addq $0x128, %rsp # imm = 0x128 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mbedtls_pkcs12_pbe_sha1_rc4_128: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 128h mov r14, r9 mov rbx, r8 mov r15, rcx mov r12, rdx mov r13, rdi lea rdi, [rsp+158h+var_138] call mbedtls_arc4_init xorps xmm0, xmm0 movups [rsp+158h+var_158], xmm0 lea r8, [rsp+158h+var_148] mov r9d, 10h mov rdi, r13 mov esi, 4 mov rdx, r12 mov rcx, r15 call pkcs12_pbe_derive_key_iv mov ebp, eax test eax, eax jnz short loc_98B83 mov r15, [rsp+158h+arg_0] lea r12, [rsp+158h+var_138] lea r13, [rsp+158h+var_148] mov rdi, r12 mov rsi, r13 mov edx, 10h call mbedtls_arc4_setup mov rdi, r12 mov rsi, r14 mov rdx, rbx mov rcx, r15 call mbedtls_arc4_crypt mov ebp, eax mov esi, 10h mov rdi, r13 call mbedtls_platform_zeroize mov rdi, r12 call mbedtls_arc4_free loc_98B83: mov eax, ebp add rsp, 128h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mbedtls_pkcs12_pbe_sha1_rc4_128( int a1, long long a2, int a3, int a4, long long a5, long long a6, long long a7) { unsigned int v11; // ebp _BYTE v13[16]; // [rsp+10h] [rbp-148h] BYREF _BYTE v14[312]; // [rsp+20h] [rbp-138h] BYREF mbedtls_arc4_init(v14); v11 = pkcs12_pbe_derive_key_iv(a1, 4, a3, a4, (unsigned int)v13, 16, 0LL, 0LL); if ( !v11 ) { mbedtls_arc4_setup(v14, v13, 16LL); v11 = mbedtls_arc4_crypt(v14, a6, a5, a7); mbedtls_platform_zeroize((long long)v13, 16LL); mbedtls_arc4_free(v14); } return v11; }
mbedtls_pkcs12_pbe_sha1_rc4_128: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x128 MOV R14,R9 MOV RBX,R8 MOV R15,RCX MOV R12,RDX MOV R13,RDI LEA RDI,[RSP + 0x20] CALL 0x00199ad0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP],XMM0 LEA R8,[RSP + 0x10] MOV R9D,0x10 MOV RDI,R13 MOV ESI,0x4 MOV RDX,R12 MOV RCX,R15 CALL 0x00198b97 MOV EBP,EAX TEST EAX,EAX JNZ 0x00198b83 MOV R15,qword ptr [RSP + 0x160] LEA R12,[RSP + 0x20] LEA R13,[RSP + 0x10] MOV RDI,R12 MOV RSI,R13 MOV EDX,0x10 CALL 0x00199aec MOV RDI,R12 MOV RSI,R14 MOV RDX,RBX MOV RCX,R15 CALL 0x00199b5c MOV EBP,EAX MOV ESI,0x10 MOV RDI,R13 CALL 0x0018db8c MOV RDI,R12 CALL 0x00199adc LAB_00198b83: MOV EAX,EBP ADD RSP,0x128 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int mbedtls_pkcs12_pbe_sha1_rc4_128 (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7) { int iVar1; int1 local_148 [16]; int1 local_138 [264]; mbedtls_arc4_init(local_138); iVar1 = pkcs12_pbe_derive_key_iv(param_1,4,param_3,param_4,local_148,0x10,0,0); if (iVar1 == 0) { mbedtls_arc4_setup(local_138,local_148,0x10); iVar1 = mbedtls_arc4_crypt(local_138,param_6,param_5,param_7); mbedtls_platform_zeroize(local_148,0x10); mbedtls_arc4_free(local_138); } return iVar1; }
26,152
inline_mysql_cond_signal
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_signal( mysql_cond_t *that) { int result; #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) PSI_COND_CALL(signal_cond)(that->m_psi); #endif result= pthread_cond_signal(&that->m_cond); return result; }
O0
c
inline_mysql_cond_signal: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x30(%rax) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0xfa19b leaq 0x1c6fd1(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x170(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0x2a580 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq
inline_mysql_cond_signal_4: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_FA19B lea rax, PSI_server mov rax, [rax] mov rax, [rax+170h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax loc_FA19B: mov rdi, [rbp+var_8] call _pthread_cond_signal mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long inline_mysql_cond_signal_4(long long a1) { if ( *(_QWORD *)(a1 + 48) ) ((void ( *)(_QWORD))PSI_server[46])(*(_QWORD *)(a1 + 48)); return (unsigned int)pthread_cond_signal(a1); }
inline_mysql_cond_signal: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX + 0x30],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x001fa19b LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x170] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX LAB_001fa19b: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a580 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int inline_mysql_cond_signal(pthread_cond_t *param_1) { int iVar1; if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x170))(param_1[1].__align); } iVar1 = pthread_cond_signal(param_1); return iVar1; }
26,153
my_hash_sort_utf8mb4_nopad
eloqsql/strings/ctype-utf8.c
static void my_hash_sort_utf8mb4_nopad(CHARSET_INFO *cs, const uchar *s, size_t slen, ulong *nr1, ulong *nr2) { my_wc_t wc; int res; const uchar *e= s + slen; MY_UNICASE_INFO *uni_plane= cs->caseinfo; register ulong m1= *nr1, m2= *nr2; while ((res= my_mb_wc_utf8mb4(cs, &wc, (uchar*) s, (uchar*) e)) > 0) { my_tosort_unicode(uni_plane, &wc, cs->state); MY_HASH_ADD_16(m1, m2, (uint) (wc & 0xFFFF)); if (wc > 0xFFFF) { /* Put the highest byte only if it is non-zero, to make hash functions for utf8mb3 and utf8mb4 compatible for BMP characters. This is useful to keep order of records in test results, e.g. for "SHOW GRANTS". */ MY_HASH_ADD(m1, m2, (uint) ((wc >> 16) & 0xFF)); } s+= res; } *nr1= m1; *nr2= m2; }
O0
c
my_hash_sort_utf8mb4_nopad: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x8(%rbp), %rax movq 0x78(%rax), %rax movq %rax, -0x48(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rdx movq -0x40(%rbp), %rcx leaq -0x30(%rbp), %rsi callq 0x27a50 movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0x2caca movq -0x48(%rbp), %rdi movq -0x8(%rbp), %rax movl 0xc(%rax), %edx leaq -0x30(%rbp), %rsi callq 0x28170 jmp 0x2c9e1 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xffff, %rcx # imm = 0xFFFF andl $0xff, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x2ca25 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx andq $0xffff, %rcx # imm = 0xFFFF shrl $0x8, %ecx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x2ca66 cmpq $0xffff, -0x30(%rbp) # imm = 0xFFFF jbe 0x2cab4 jmp 0x2ca72 movq -0x50(%rbp), %rax andq $0x3f, %rax addq -0x58(%rbp), %rax movq -0x30(%rbp), %rcx shrq $0x10, %rcx andq $0xff, %rcx movl %ecx, %ecx imulq %rcx, %rax movq -0x50(%rbp), %rcx shlq $0x8, %rcx addq %rcx, %rax xorq -0x50(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x58(%rbp), %rax addq $0x3, %rax movq %rax, -0x58(%rbp) jmp 0x2cab4 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x2c9aa movq -0x50(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, (%rax) movq -0x58(%rbp), %rcx movq -0x28(%rbp), %rax movq %rcx, (%rax) addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_hash_sort_utf8mb4_nopad: push rbp mov rbp, rsp sub rsp, 60h 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_10] add rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_8] mov rax, [rax+78h] mov [rbp+var_48], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_50], rax mov rax, [rbp+var_28] mov rax, [rax] mov [rbp+var_58], rax loc_2C9AA: mov rdi, [rbp+var_8] mov rdx, [rbp+var_10] mov rcx, [rbp+var_40] lea rsi, [rbp+var_30] call my_mb_wc_utf8mb4 mov [rbp+var_34], eax cmp eax, 0 jle loc_2CACA mov rdi, [rbp+var_48] mov rax, [rbp+var_8] mov edx, [rax+0Ch] lea rsi, [rbp+var_30] call my_tosort_unicode jmp short $+2 loc_2C9E1: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFFFh and ecx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_2CA25: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] and rcx, 0FFFFh shr ecx, 8 mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_2CA66: cmp [rbp+var_30], 0FFFFh jbe short loc_2CAB4 jmp short $+2 loc_2CA72: mov rax, [rbp+var_50] and rax, 3Fh add rax, [rbp+var_58] mov rcx, [rbp+var_30] shr rcx, 10h and rcx, 0FFh mov ecx, ecx imul rax, rcx mov rcx, [rbp+var_50] shl rcx, 8 add rax, rcx xor rax, [rbp+var_50] mov [rbp+var_50], rax mov rax, [rbp+var_58] add rax, 3 mov [rbp+var_58], rax jmp short $+2 loc_2CAB4: mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp loc_2C9AA loc_2CACA: mov rcx, [rbp+var_50] mov rax, [rbp+var_20] mov [rax], rcx mov rcx, [rbp+var_58] mov rax, [rbp+var_28] mov [rax], rcx add rsp, 60h pop rbp retn
_QWORD * my_hash_sort_utf8mb4_nopad(long long a1, long long a2, long long a3, long long *a4, _QWORD *a5, long long a6) { _QWORD *result; // rax long long v7; // [rsp+8h] [rbp-58h] long long v8; // [rsp+8h] [rbp-58h] long long v9; // [rsp+10h] [rbp-50h] long long v10; // [rsp+10h] [rbp-50h] _QWORD *v11; // [rsp+18h] [rbp-48h] long long v12; // [rsp+20h] [rbp-40h] int v13; // [rsp+2Ch] [rbp-34h] unsigned long long v14; // [rsp+30h] [rbp-30h] BYREF _QWORD *v15; // [rsp+38h] [rbp-28h] long long *v16; // [rsp+40h] [rbp-20h] long long v17; // [rsp+48h] [rbp-18h] long long v18; // [rsp+50h] [rbp-10h] long long v19; // [rsp+58h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = a5; v12 = a3 + a2; v11 = *(_QWORD **)(a1 + 120); v9 = *a4; v7 = *a5; while ( 1 ) { v13 = my_mb_wc_utf8mb4(v19, (long long)&v14, v18, v12, (long long)a5, a6); if ( v13 <= 0 ) break; my_tosort_unicode(v11, &v14, *(_DWORD *)(v19 + 12)); v10 = v9 ^ ((v9 << 8) + (unsigned __int8)v14 * (v7 + (v9 & 0x3F))); v8 = v7 + 3; v9 = v10 ^ ((v10 << 8) + BYTE1(v14) * (v8 + (v10 & 0x3F))); v7 = v8 + 3; if ( v14 > 0xFFFF ) { v9 ^= (v9 << 8) + BYTE2(v14) * (v7 + (v9 & 0x3F)); v7 += 3LL; } v18 += v13; } *v16 = v9; result = v15; *v15 = v7; return result; }
my_hash_sort_utf8mb4_nopad: PUSH RBP MOV RBP,RSP SUB RSP,0x60 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 + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x78] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX LAB_0012c9aa: MOV RDI,qword ptr [RBP + -0x8] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x40] LEA RSI,[RBP + -0x30] CALL 0x00127a50 MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x0012caca MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0xc] LEA RSI,[RBP + -0x30] CALL 0x00128170 JMP 0x0012c9e1 LAB_0012c9e1: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xffff AND ECX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x0012ca25 LAB_0012ca25: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] AND RCX,0xffff SHR ECX,0x8 MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x0012ca66 LAB_0012ca66: CMP qword ptr [RBP + -0x30],0xffff JBE 0x0012cab4 JMP 0x0012ca72 LAB_0012ca72: MOV RAX,qword ptr [RBP + -0x50] AND RAX,0x3f ADD RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RBP + -0x30] SHR RCX,0x10 AND RCX,0xff MOV ECX,ECX IMUL RAX,RCX MOV RCX,qword ptr [RBP + -0x50] SHL RCX,0x8 ADD RAX,RCX XOR RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x3 MOV qword ptr [RBP + -0x58],RAX JMP 0x0012cab4 LAB_0012cab4: MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x0012c9aa LAB_0012caca: MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x58] MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RAX],RCX ADD RSP,0x60 POP RBP RET
void my_hash_sort_utf8mb4_nopad(long param_1,long param_2,long param_3,ulong *param_4,long *param_5) { int8 uVar1; long lVar2; int iVar3; long local_60; ulong local_58; ulong local_38; long *local_30; ulong *local_28; long local_20; long local_18; long local_10; uVar1 = *(int8 *)(param_1 + 0x78); local_58 = *param_4; local_60 = *param_5; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; while( true ) { iVar3 = my_mb_wc_utf8mb4(local_10,&local_38,local_18,param_2 + param_3); if (iVar3 < 1) break; my_tosort_unicode(uVar1,&local_38,*(int4 *)(local_10 + 0xc)); local_58 = ((local_58 & 0x3f) + local_60) * (ulong)((uint)local_38 & 0xff) + local_58 * 0x100 ^ local_58; local_58 = ((local_58 & 0x3f) + local_60 + 3) * (ulong)(((uint)local_38 & 0xffff) >> 8) + local_58 * 0x100 ^ local_58; lVar2 = local_60 + 6; if (0xffff < local_38) { local_58 = ((local_58 & 0x3f) + local_60 + 6) * (ulong)((uint)(local_38 >> 0x10) & 0xff) + local_58 * 0x100 ^ local_58; lVar2 = local_60 + 9; } local_60 = lVar2; local_18 = local_18 + iVar3; } *local_28 = local_58; *local_30 = local_60; return; }
26,154
ImPlot::ColormapSlider(char const*, float*, ImVec4*, char const*, int)
zkingston[P]unknot/build_O1/_deps/implot-src/implot.cpp
bool ColormapSlider(const char* label, float* t, ImVec4* out, const char* format, ImPlotColormap cmap) { *t = ImClamp(*t,0.0f,1.0f); ImGuiContext &G = *GImGui; ImGuiWindow * Window = G.CurrentWindow; if (Window->SkipItems) return false; ImPlotContext& gp = *GImPlot; cmap = cmap == IMPLOT_AUTO ? gp.Style.Colormap : cmap; IM_ASSERT_USER_ERROR(cmap >= 0 && cmap < gp.ColormapData.Count, "Invalid colormap index!"); const ImU32* keys = gp.ColormapData.GetKeys(cmap); const int count = gp.ColormapData.GetKeyCount(cmap); const bool qual = gp.ColormapData.IsQual(cmap); const ImVec2 pos = ImGui::GetCurrentWindow()->DC.CursorPos; const float w = ImGui::CalcItemWidth(); const float h = ImGui::GetFrameHeight(); const ImRect rect = ImRect(pos.x,pos.y,pos.x+w,pos.y+h); RenderColorBar(keys,count,*ImGui::GetWindowDrawList(),rect,false,false,!qual); const ImU32 grab = CalcTextColor(gp.ColormapData.LerpTable(cmap,*t)); // const ImU32 text = CalcTextColor(gp.ColormapData.LerpTable(cmap,0.5f)); ImGui::PushStyleColor(ImGuiCol_FrameBg,IM_COL32_BLACK_TRANS); ImGui::PushStyleColor(ImGuiCol_FrameBgActive,IM_COL32_BLACK_TRANS); ImGui::PushStyleColor(ImGuiCol_FrameBgHovered,ImVec4(1,1,1,0.1f)); ImGui::PushStyleColor(ImGuiCol_SliderGrab,grab); ImGui::PushStyleColor(ImGuiCol_SliderGrabActive, grab); ImGui::PushStyleVar(ImGuiStyleVar_GrabMinSize,2); ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding,0); const bool changed = ImGui::SliderFloat(label,t,0,1,format); ImGui::PopStyleColor(5); ImGui::PopStyleVar(2); if (out != nullptr) *out = ImGui::ColorConvertU32ToFloat4(gp.ColormapData.LerpTable(cmap,*t)); return changed; }
O1
cpp
ImPlot::ColormapSlider(char const*, float*, ImVec4*, char const*, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x78, %rsp movss (%rsi), %xmm0 movss 0x1ca945(%rip), %xmm1 # 0x28f008 minss %xmm0, %xmm1 xorps %xmm2, %xmm2 cmpltss %xmm2, %xmm0 andnps %xmm1, %xmm0 movss %xmm0, (%rsi) leaq 0x272953(%rip), %rbx # 0x337030 movq (%rbx), %rax movq 0x1368(%rax), %rax cmpb $0x0, 0xcf(%rax) je 0xc46f7 xorl %ebp, %ebp jmp 0xc49ad movl %r8d, %ebp movq %rsi, %r14 movq %rdi, 0x20(%rsp) movq %rcx, 0x28(%rsp) movq 0x272592(%rip), %r15 # 0x336ca0 cmpl $-0x1, %r8d jne 0xc471b movl 0x300(%r15), %ebp movq %rdx, 0x18(%rsp) testl %ebp, %ebp js 0xc472d cmpl 0x3c8(%r15), %ebp jl 0xc4739 leaq 0x1d0f53(%rip), %rdi # 0x295687 callq 0x2161f4 movq 0x350(%r15), %rax movslq %ebp, %r12 movslq (%rax,%r12,4), %r13 shlq $0x2, %r13 addq 0x330(%r15), %r13 movq 0x340(%r15), %rax movl (%rax,%r12,4), %eax movl %eax, 0x14(%rsp) movq 0x3b0(%r15), %rax movzbl (%rax,%r12), %ebp movq (%rbx), %rax movq 0x1368(%rax), %rax movb $0x1, 0xcc(%rax) movsd 0x118(%rax), %xmm0 movaps %xmm0, 0x40(%rsp) callq 0x22c4cf movaps %xmm0, 0x30(%rsp) callq 0x22c577 movaps 0x30(%rsp), %xmm1 unpcklps %xmm0, %xmm1 # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1] movaps 0x40(%rsp), %xmm0 addps %xmm0, %xmm1 movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0] leaq 0x68(%rsp), %rbx movups %xmm0, (%rbx) callq 0x22983c xorl $0x1, %ebp movl %ebp, (%rsp) xorl %ebp, %ebp movq %r13, %rdi movl 0x14(%rsp), %esi movq %rax, %rdx movq %rbx, %rcx xorl %r8d, %r8d xorl %r9d, %r9d callq 0xc3c17 movss (%r14), %xmm0 movq 0x370(%r15), %rcx movq 0x380(%r15), %rax movslq (%rax,%r12,4), %rax movl (%rcx,%r12,4), %ecx movq 0x3b0(%r15), %rdx cmpb $0x1, (%rdx,%r12) jne 0xc4820 xorps %xmm1, %xmm1 cvtsi2ss %ecx, %xmm1 mulss %xmm1, %xmm0 cvttss2si %xmm0, %edx decl %ecx cmpl %ecx, %edx cmovll %edx, %ecx testl %edx, %edx cmovsl %ebp, %ecx jmp 0xc4839 decl %ecx xorps %xmm1, %xmm1 cvtsi2ss %ecx, %xmm1 mulss %xmm0, %xmm1 addss 0x1ca7eb(%rip), %xmm1 # 0x28f020 cvttss2si %xmm1, %ecx movq 0x18(%rsp), %rbx movslq %ecx, %rcx addq %rax, %rcx movq 0x360(%r15), %rax movl (%rax,%rcx,4), %edi callq 0x213cb2 movaps %xmm0, %xmm2 shufps $0x55, %xmm0, %xmm2 # xmm2 = xmm2[1,1],xmm0[1,1] mulss 0x1d5326(%rip), %xmm2 # 0x299b88 mulss 0x1d5322(%rip), %xmm0 # 0x299b8c addss %xmm2, %xmm0 mulss 0x1d531a(%rip), %xmm1 # 0x299b90 addss %xmm0, %xmm1 xorl %ebp, %ebp ucomiss 0x1ca79d(%rip), %xmm1 # 0x28f020 setbe %bpl negl %ebp orl $0xff000000, %ebp # imm = 0xFF000000 movl $0x7, %edi xorl %esi, %esi callq 0x215f3f movl $0x9, %edi xorl %esi, %esi callq 0x215f3f movaps 0x1d51c2(%rip), %xmm0 # 0x299a70 leaq 0x50(%rsp), %rsi movaps %xmm0, (%rsi) movl $0x8, %edi callq 0x21608f movl $0x13, %edi movl %ebp, %esi callq 0x215f3f movl $0x14, %edi movl %ebp, %esi callq 0x215f3f movss 0x1ca768(%rip), %xmm0 # 0x28f048 movl $0x14, %edi callq 0x2163bf xorps %xmm0, %xmm0 movl $0xc, %edi callq 0x2163bf movss 0x1ca709(%rip), %xmm1 # 0x28f008 xorps %xmm0, %xmm0 movq 0x20(%rsp), %rdi movq %r14, %rsi movq 0x28(%rsp), %rdx xorl %ecx, %ecx callq 0x25e5b7 movl %eax, %ebp movl $0x5, %edi callq 0x216192 movl $0x2, %edi callq 0x216849 testq %rbx, %rbx je 0xc49ad movss (%r14), %xmm0 movq 0x370(%r15), %rcx movq 0x380(%r15), %rax movslq (%rax,%r12,4), %rax movl (%rcx,%r12,4), %ecx movq 0x3b0(%r15), %rdx cmpb $0x1, (%rdx,%r12) jne 0xc4979 xorps %xmm1, %xmm1 cvtsi2ss %ecx, %xmm1 mulss %xmm1, %xmm0 cvttss2si %xmm0, %esi decl %ecx cmpl %ecx, %esi cmovll %esi, %ecx xorl %edx, %edx testl %esi, %esi cmovnsl %ecx, %edx jmp 0xc4992 decl %ecx xorps %xmm1, %xmm1 cvtsi2ss %ecx, %xmm1 mulss %xmm0, %xmm1 addss 0x1ca692(%rip), %xmm1 # 0x28f020 cvttss2si %xmm1, %edx movslq %edx, %rcx addq %rax, %rcx movq 0x360(%r15), %rax movl (%rax,%rcx,4), %edi callq 0x213cb2 movlhps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0] movups %xmm0, (%rbx) movl %ebp, %eax addq $0x78, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN6ImPlot14ColormapSliderEPKcPfP6ImVec4S1_i: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 78h movss xmm0, dword ptr [rsi] movss xmm1, cs:flt_28F008 minss xmm1, xmm0 xorps xmm2, xmm2 cmpltss xmm0, xmm2 andnps xmm0, xmm1 movss dword ptr [rsi], xmm0 lea rbx, GImGui mov rax, [rbx] mov rax, [rax+1368h] cmp byte ptr [rax+0CFh], 0 jz short loc_C46F7 xor ebp, ebp jmp loc_C49AD loc_C46F7: mov ebp, r8d mov r14, rsi mov [rsp+0A8h+var_88], rdi mov [rsp+0A8h+var_80], rcx mov r15, cs:GImPlot cmp r8d, 0FFFFFFFFh jnz short loc_C471B mov ebp, [r15+300h] loc_C471B: mov [rsp+0A8h+var_90], rdx test ebp, ebp js short loc_C472D cmp ebp, [r15+3C8h] jl short loc_C4739 loc_C472D: lea rdi, aInvalidColorma; "Invalid colormap index!" call _ZN5ImGui8ErrorLogEPKc; ImGui::ErrorLog(char const*) loc_C4739: mov rax, [r15+350h] movsxd r12, ebp movsxd r13, dword ptr [rax+r12*4] shl r13, 2 add r13, [r15+330h] mov rax, [r15+340h] mov eax, [rax+r12*4] mov [rsp+0A8h+var_94], eax mov rax, [r15+3B0h] movzx ebp, byte ptr [rax+r12] mov rax, [rbx] mov rax, [rax+1368h] mov byte ptr [rax+0CCh], 1 movsd xmm0, qword ptr [rax+118h] movaps [rsp+0A8h+var_68], xmm0 call _ZN5ImGui13CalcItemWidthEv; ImGui::CalcItemWidth(void) movaps [rsp+0A8h+var_78], xmm0 call _ZN5ImGui14GetFrameHeightEv; ImGui::GetFrameHeight(void) movaps xmm1, [rsp+0A8h+var_78] unpcklps xmm1, xmm0 movaps xmm0, [rsp+0A8h+var_68] addps xmm1, xmm0 movlhps xmm0, xmm1 lea rbx, [rsp+0A8h+var_40] movups xmmword ptr [rbx], xmm0 call _ZN5ImGui17GetWindowDrawListEv; ImGui::GetWindowDrawList(void) xor ebp, 1 mov [rsp+0A8h+var_A8], ebp xor ebp, ebp mov rdi, r13 mov esi, [rsp+0A8h+var_94]; unsigned int mov rdx, rax mov rcx, rbx xor r8d, r8d xor r9d, r9d call _ZN6ImPlot14RenderColorBarEPKjiR10ImDrawListRK6ImRectbbb; ImPlot::RenderColorBar(uint const*,int,ImDrawList &,ImRect const&,bool,bool,bool) movss xmm0, dword ptr [r14] mov rcx, [r15+370h] mov rax, [r15+380h] movsxd rax, dword ptr [rax+r12*4] mov ecx, [rcx+r12*4] mov rdx, [r15+3B0h] cmp byte ptr [rdx+r12], 1 jnz short loc_C4820 xorps xmm1, xmm1 cvtsi2ss xmm1, ecx mulss xmm0, xmm1 cvttss2si edx, xmm0 dec ecx cmp edx, ecx cmovl ecx, edx test edx, edx cmovs ecx, ebp jmp short loc_C4839 loc_C4820: dec ecx xorps xmm1, xmm1 cvtsi2ss xmm1, ecx mulss xmm1, xmm0 addss xmm1, dword ptr cs:xmmword_28F020 cvttss2si ecx, xmm1 loc_C4839: mov rbx, [rsp+0A8h+var_90] movsxd rcx, ecx add rcx, rax mov rax, [r15+360h] mov edi, [rax+rcx*4]; this call _ZN5ImGui23ColorConvertU32ToFloat4Ej; ImGui::ColorConvertU32ToFloat4(uint) movaps xmm2, xmm0 shufps xmm2, xmm0, 55h ; 'U' mulss xmm2, cs:dword_299B88 mulss xmm0, cs:dword_299B8C addss xmm0, xmm2 mulss xmm1, cs:dword_299B90 addss xmm1, xmm0 xor ebp, ebp ucomiss xmm1, dword ptr cs:xmmword_28F020 setbe bpl neg ebp or ebp, 0FF000000h mov edi, offset byte_7; this xor esi, esi; int call _ZN5ImGui14PushStyleColorEij; ImGui::PushStyleColor(int,uint) mov edi, offset byte_9; this xor esi, esi; int call _ZN5ImGui14PushStyleColorEij; ImGui::PushStyleColor(int,uint) movaps xmm0, cs:xmmword_299A70 lea rsi, [rsp+0A8h+var_58] movaps xmmword ptr [rsi], xmm0 mov edi, 8 call _ZN5ImGui14PushStyleColorEiRK6ImVec4; ImGui::PushStyleColor(int,ImVec4 const&) mov edi, (offset word_12+1); this mov esi, ebp; int call _ZN5ImGui14PushStyleColorEij; ImGui::PushStyleColor(int,uint) mov edi, offset dword_14; this mov esi, ebp; int call _ZN5ImGui14PushStyleColorEij; ImGui::PushStyleColor(int,uint) movss xmm0, cs:flt_28F048; float mov edi, offset dword_14; this call _ZN5ImGui12PushStyleVarEif; ImGui::PushStyleVar(int,float) xorps xmm0, xmm0; float mov edi, (offset byte_9+3); this call _ZN5ImGui12PushStyleVarEif; ImGui::PushStyleVar(int,float) movss xmm1, cs:flt_28F008; float xorps xmm0, xmm0; float mov rdi, [rsp+0A8h+var_88]; this mov rsi, r14; unsigned int mov rdx, [rsp+0A8h+var_80]; float * xor ecx, ecx; char * call _ZN5ImGui11SliderFloatEPKcPfffS1_i; ImGui::SliderFloat(char const*,float *,float,float,char const*,int) mov ebp, eax mov edi, offset byte_5; this call _ZN5ImGui13PopStyleColorEi; ImGui::PopStyleColor(int) mov edi, (offset dword_0+2); this call _ZN5ImGui11PopStyleVarEi; ImGui::PopStyleVar(int) test rbx, rbx jz short loc_C49AD movss xmm0, dword ptr [r14] mov rcx, [r15+370h] mov rax, [r15+380h] movsxd rax, dword ptr [rax+r12*4] mov ecx, [rcx+r12*4] mov rdx, [r15+3B0h] cmp byte ptr [rdx+r12], 1 jnz short loc_C4979 xorps xmm1, xmm1 cvtsi2ss xmm1, ecx mulss xmm0, xmm1 cvttss2si esi, xmm0 dec ecx cmp esi, ecx cmovl ecx, esi xor edx, edx test esi, esi cmovns edx, ecx jmp short loc_C4992 loc_C4979: dec ecx xorps xmm1, xmm1 cvtsi2ss xmm1, ecx mulss xmm1, xmm0 addss xmm1, dword ptr cs:xmmword_28F020 cvttss2si edx, xmm1 loc_C4992: movsxd rcx, edx add rcx, rax mov rax, [r15+360h] mov edi, [rax+rcx*4]; this call _ZN5ImGui23ColorConvertU32ToFloat4Ej; ImGui::ColorConvertU32ToFloat4(uint) movlhps xmm0, xmm1 movups xmmword ptr [rbx], xmm0 loc_C49AD: mov eax, ebp add rsp, 78h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ImPlot::ColormapSlider(ImGui *a1, char *a2, __m128 *a3, float *a4, int a5) { __m128 v5; // xmm0 __m128 v6; // xmm1 unsigned int v7; // ebp int v8; // ebp ImGui *v9; // r15 long long v10; // r12 long long v11; // r13 char v12; // bp long long v13; // rax __m128 v14; // xmm0 int WindowDrawList; // eax __m128 v16; // xmm0 int v17; // ecx float v18; // xmm1_4 int v19; // ecx int v20; // ebp unsigned int v21; // edx unsigned int v22; // edx unsigned int v23; // edx unsigned int v24; // edx int v25; // r8d __m128 v26; // xmm0 int v27; // ecx __m128 v28; // xmm1 int v29; // ecx int v30; // edx unsigned int v32; // [rsp+14h] [rbp-94h] ImGui *v34; // [rsp+20h] [rbp-88h] __int128 v36; // [rsp+50h] [rbp-58h] BYREF __m128 v37[4]; // [rsp+68h] [rbp-40h] BYREF v5 = (__m128)*(unsigned int *)a2; v6 = (__m128)0x3F800000u; v6.m128_f32[0] = fminf(1.0, v5.m128_f32[0]); *(_DWORD *)a2 = _mm_andnot_ps(_mm_cmplt_ss(v5, (__m128)0LL), v6).m128_u32[0]; if ( *(_BYTE *)(*((_QWORD *)GImGui + 621) + 207LL) ) { return 0; } else { v8 = a5; v34 = a1; v9 = GImPlot; if ( a5 == -1 ) v8 = *((_DWORD *)GImPlot + 192); if ( v8 < 0 || v8 >= *((_DWORD *)GImPlot + 242) ) { a1 = (ImGui *)"Invalid colormap index!"; ImGui::ErrorLog((ImGui *)"Invalid colormap index!", a2); } v10 = v8; v11 = *((_QWORD *)v9 + 102) + 4LL * *(int *)(*((_QWORD *)v9 + 106) + 4LL * v8); v32 = *(_DWORD *)(*((_QWORD *)v9 + 104) + 4LL * v8); v12 = *(_BYTE *)(*((_QWORD *)v9 + 118) + v8); v13 = *((_QWORD *)GImGui + 621); *(_BYTE *)(v13 + 204) = 1; v14 = (__m128)*(unsigned long long *)(v13 + 280); ImGui::CalcItemWidth(a1); ImGui::GetFrameHeight(a1); v37[0] = _mm_movelh_ps(v14, _mm_add_ps(_mm_unpacklo_ps(v14, v14), v14)); WindowDrawList = ImGui::GetWindowDrawList(a1); ImPlot::RenderColorBar(v11, v32, WindowDrawList, v37[0].m128_f32, 0, 0, v12 ^ 1); v16 = (__m128)*(unsigned int *)a2; v17 = *(_DWORD *)(*((_QWORD *)v9 + 110) + 4 * v10); if ( *(_BYTE *)(*((_QWORD *)v9 + 118) + v10) == 1 ) { v18 = (float)v17; v16.m128_f32[0] = v16.m128_f32[0] * (float)v17; v19 = v17 - 1; if ( (int)v16.m128_f32[0] < v19 ) v19 = (int)v16.m128_f32[0]; if ( (int)v16.m128_f32[0] < 0 ) v19 = 0; } else { v18 = (float)((float)(v17 - 1) * v16.m128_f32[0]) + 0.5; v19 = (int)v18; } ImGui::ColorConvertU32ToFloat4( (ImGui *)*(unsigned int *)(*((_QWORD *)v9 + 108) + 4 * (*(int *)(*((_QWORD *)v9 + 112) + 4 * v10) + (long long)v19)), v32); v20 = (float)((float)(v18 * 0.114) + (float)((float)(v16.m128_f32[0] * 0.29899999) + (float)(_mm_shuffle_ps(v16, v16, 85).m128_f32[0] * 0.58700001))) <= 0.5 ? -1 : 0xFF000000; ImGui::PushStyleColor((ImGui *)&byte_7, 0, v21); ImGui::PushStyleColor((ImGui *)byte_9, 0, v22); v36 = xmmword_299A70; ImGui::PushStyleColor(8LL, &v36); ImGui::PushStyleColor((ImGui *)((char *)&word_12 + 1), v20, v23); ImGui::PushStyleColor((ImGui *)&dword_14, v20, v24); ImGui::PushStyleVar((ImGui *)&dword_14, v20, 2.0); ImGui::PushStyleVar((ImGui *)&byte_9[3], v20, 0.0); v7 = ImGui::SliderFloat(v34, a2, a4, 0.0, 1.0, 0LL, v25); ImGui::PopStyleColor((ImGui *)&byte_5, (int)a2); ImGui::PopStyleVar((ImGui *)((char *)&dword_0 + 2), (int)a2); if ( a3 ) { v26 = (__m128)*(unsigned int *)a2; v27 = *(_DWORD *)(*((_QWORD *)v9 + 110) + 4 * v10); if ( *(_BYTE *)(*((_QWORD *)v9 + 118) + v10) == 1 ) { v28 = 0LL; v28.m128_f32[0] = (float)v27; v26.m128_f32[0] = v26.m128_f32[0] * (float)v27; LODWORD(a2) = (int)v26.m128_f32[0]; v29 = v27 - 1; if ( (int)v26.m128_f32[0] < v29 ) v29 = (int)v26.m128_f32[0]; v30 = 0; if ( (int)a2 >= 0 ) v30 = v29; } else { v28 = 0LL; v28.m128_f32[0] = (float)((float)(v27 - 1) * v26.m128_f32[0]) + 0.5; v30 = (int)v28.m128_f32[0]; } ImGui::ColorConvertU32ToFloat4( (ImGui *)*(unsigned int *)(*((_QWORD *)v9 + 108) + 4 * (*(int *)(*((_QWORD *)v9 + 112) + 4 * v10) + (long long)v30)), (unsigned int)a2); *a3 = _mm_movelh_ps(v26, v28); } } return v7; }
ColormapSlider: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x78 MOVSS XMM0,dword ptr [RSI] MOVSS XMM1,dword ptr [0x0038f008] MINSS XMM1,XMM0 XORPS XMM2,XMM2 CMPLTSS XMM0,XMM2 ANDNPS XMM0,XMM1 MOVSS dword ptr [RSI],XMM0 LEA RBX,[0x437030] MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + 0x1368] CMP byte ptr [RAX + 0xcf],0x0 JZ 0x001c46f7 XOR EBP,EBP JMP 0x001c49ad LAB_001c46f7: MOV EBP,R8D MOV R14,RSI MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x28],RCX MOV R15,qword ptr [0x00436ca0] CMP R8D,-0x1 JNZ 0x001c471b MOV EBP,dword ptr [R15 + 0x300] LAB_001c471b: MOV qword ptr [RSP + 0x18],RDX TEST EBP,EBP JS 0x001c472d CMP EBP,dword ptr [R15 + 0x3c8] JL 0x001c4739 LAB_001c472d: LEA RDI,[0x395687] CALL 0x003161f4 LAB_001c4739: MOV RAX,qword ptr [R15 + 0x350] MOVSXD R12,EBP MOVSXD R13,dword ptr [RAX + R12*0x4] SHL R13,0x2 ADD R13,qword ptr [R15 + 0x330] MOV RAX,qword ptr [R15 + 0x340] MOV EAX,dword ptr [RAX + R12*0x4] MOV dword ptr [RSP + 0x14],EAX MOV RAX,qword ptr [R15 + 0x3b0] MOVZX EBP,byte ptr [RAX + R12*0x1] MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + 0x1368] MOV byte ptr [RAX + 0xcc],0x1 MOVSD XMM0,qword ptr [RAX + 0x118] MOVAPS xmmword ptr [RSP + 0x40],XMM0 CALL 0x0032c4cf MOVAPS xmmword ptr [RSP + 0x30],XMM0 CALL 0x0032c577 MOVAPS XMM1,xmmword ptr [RSP + 0x30] UNPCKLPS XMM1,XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x40] ADDPS XMM1,XMM0 MOVLHPS XMM0,XMM1 LEA RBX,[RSP + 0x68] MOVUPS xmmword ptr [RBX],XMM0 CALL 0x0032983c XOR EBP,0x1 MOV dword ptr [RSP],EBP XOR EBP,EBP MOV RDI,R13 MOV ESI,dword ptr [RSP + 0x14] MOV RDX,RAX MOV RCX,RBX XOR R8D,R8D XOR R9D,R9D CALL 0x001c3c17 MOVSS XMM0,dword ptr [R14] MOV RCX,qword ptr [R15 + 0x370] MOV RAX,qword ptr [R15 + 0x380] MOVSXD RAX,dword ptr [RAX + R12*0x4] MOV ECX,dword ptr [RCX + R12*0x4] MOV RDX,qword ptr [R15 + 0x3b0] CMP byte ptr [RDX + R12*0x1],0x1 JNZ 0x001c4820 XORPS XMM1,XMM1 CVTSI2SS XMM1,ECX MULSS XMM0,XMM1 CVTTSS2SI EDX,XMM0 DEC ECX CMP EDX,ECX CMOVL ECX,EDX TEST EDX,EDX CMOVS ECX,EBP JMP 0x001c4839 LAB_001c4820: DEC ECX XORPS XMM1,XMM1 CVTSI2SS XMM1,ECX MULSS XMM1,XMM0 ADDSS XMM1,dword ptr [0x0038f020] CVTTSS2SI ECX,XMM1 LAB_001c4839: MOV RBX,qword ptr [RSP + 0x18] MOVSXD RCX,ECX ADD RCX,RAX MOV RAX,qword ptr [R15 + 0x360] MOV EDI,dword ptr [RAX + RCX*0x4] CALL 0x00313cb2 MOVAPS XMM2,XMM0 SHUFPS XMM2,XMM0,0x55 MULSS XMM2,dword ptr [0x00399b88] MULSS XMM0,dword ptr [0x00399b8c] ADDSS XMM0,XMM2 MULSS XMM1,dword ptr [0x00399b90] ADDSS XMM1,XMM0 XOR EBP,EBP UCOMISS XMM1,dword ptr [0x0038f020] SETBE BPL NEG EBP OR EBP,0xff000000 MOV EDI,0x7 XOR ESI,ESI CALL 0x00315f3f MOV EDI,0x9 XOR ESI,ESI CALL 0x00315f3f MOVAPS XMM0,xmmword ptr [0x00399a70] LEA RSI,[RSP + 0x50] MOVAPS xmmword ptr [RSI],XMM0 MOV EDI,0x8 CALL 0x0031608f MOV EDI,0x13 MOV ESI,EBP CALL 0x00315f3f MOV EDI,0x14 MOV ESI,EBP CALL 0x00315f3f MOVSS XMM0,dword ptr [0x0038f048] MOV EDI,0x14 CALL 0x003163bf XORPS XMM0,XMM0 MOV EDI,0xc CALL 0x003163bf MOVSS XMM1,dword ptr [0x0038f008] XORPS XMM0,XMM0 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,R14 MOV RDX,qword ptr [RSP + 0x28] XOR ECX,ECX CALL 0x0035e5b7 MOV EBP,EAX MOV EDI,0x5 CALL 0x00316192 MOV EDI,0x2 CALL 0x00316849 TEST RBX,RBX JZ 0x001c49ad MOVSS XMM0,dword ptr [R14] MOV RCX,qword ptr [R15 + 0x370] MOV RAX,qword ptr [R15 + 0x380] MOVSXD RAX,dword ptr [RAX + R12*0x4] MOV ECX,dword ptr [RCX + R12*0x4] MOV RDX,qword ptr [R15 + 0x3b0] CMP byte ptr [RDX + R12*0x1],0x1 JNZ 0x001c4979 XORPS XMM1,XMM1 CVTSI2SS XMM1,ECX MULSS XMM0,XMM1 CVTTSS2SI ESI,XMM0 DEC ECX CMP ESI,ECX CMOVL ECX,ESI XOR EDX,EDX TEST ESI,ESI CMOVNS EDX,ECX JMP 0x001c4992 LAB_001c4979: DEC ECX XORPS XMM1,XMM1 CVTSI2SS XMM1,ECX MULSS XMM1,XMM0 ADDSS XMM1,dword ptr [0x0038f020] CVTTSS2SI EDX,XMM1 LAB_001c4992: MOVSXD RCX,EDX ADD RCX,RAX MOV RAX,qword ptr [R15 + 0x360] MOV EDI,dword ptr [RAX + RCX*0x4] CALL 0x00313cb2 MOVLHPS XMM0,XMM1 MOVUPS xmmword ptr [RBX],XMM0 LAB_001c49ad: MOV EAX,EBP ADD RSP,0x78 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* ImPlot::ColormapSlider(char const*, float*, ImVec4*, char const*, int) */ int4 ImPlot::ColormapSlider(char *param_1,float *param_2,ImVec4 *param_3,char *param_4,int param_5) { byte bVar1; long lVar2; long lVar3; long lVar4; int4 uVar5; ImDrawList *pIVar6; int iVar7; int iVar8; int iVar9; uint uVar10; long lVar11; float fVar12; int8 uVar13; float fVar14; int4 uVar15; float local_68; float fStack_64; int8 local_58; int8 uStack_50; float local_40; float fStack_3c; float fStack_38; float fStack_34; fVar12 = *param_2; fVar14 = DAT_0038f008; if (fVar12 <= DAT_0038f008) { fVar14 = fVar12; } *param_2 = (float)(~-(uint)(fVar12 < 0.0) & (uint)fVar14); lVar4 = GImPlot; if (*(char *)(*(long *)(GImGui + 0x1368) + 0xcf) == '\0') { if (param_5 == -1) { param_5 = *(int *)(GImPlot + 0x300); } if ((param_5 < 0) || (*(int *)(GImPlot + 0x3c8) <= param_5)) { ImGui::ErrorLog("Invalid colormap index!"); } lVar11 = (long)param_5; iVar9 = *(int *)(*(long *)(lVar4 + 0x350) + lVar11 * 4); lVar2 = *(long *)(lVar4 + 0x330); iVar7 = *(int *)(*(long *)(lVar4 + 0x340) + lVar11 * 4); bVar1 = *(byte *)(*(long *)(lVar4 + 0x3b0) + lVar11); lVar3 = *(long *)(GImGui + 0x1368); *(int1 *)(lVar3 + 0xcc) = 1; uVar13 = *(int8 *)(lVar3 + 0x118); fVar12 = (float)ImGui::CalcItemWidth(); fStack_34 = (float)ImGui::GetFrameHeight(); local_68 = (float)uVar13; fStack_64 = (float)((ulong)uVar13 >> 0x20); fStack_38 = fVar12 + local_68; fStack_34 = fStack_34 + fStack_64; local_40 = local_68; fStack_3c = fStack_64; pIVar6 = (ImDrawList *)ImGui::GetWindowDrawList(); RenderColorBar((uint *)((long)iVar9 * 4 + lVar2),iVar7,pIVar6,(ImRect *)&local_40,false,false, (bool)(bVar1 ^ 1)); iVar9 = *(int *)(*(long *)(lVar4 + 0x370) + lVar11 * 4); if (*(char *)(*(long *)(lVar4 + 0x3b0) + lVar11) == '\x01') { fVar12 = (float)iVar9; iVar8 = (int)(*param_2 * fVar12); iVar7 = iVar9 + -1; if (iVar8 < iVar9 + -1) { iVar7 = iVar8; } if (iVar8 < 0) { iVar7 = 0; } } else { fVar12 = (float)(iVar9 + -1) * *param_2 + DAT_0038f020; iVar7 = (int)fVar12; } uVar13 = ImGui::ColorConvertU32ToFloat4 (*(uint *)(*(long *)(lVar4 + 0x360) + ((long)iVar7 + (long)*(int *)(*(long *)(lVar4 + 0x380) + lVar11 * 4)) * 4)); uVar10 = -(uint)(fVar12 * _DAT_00399b90 + (float)uVar13 * _DAT_00399b8c + (float)((ulong)uVar13 >> 0x20) * _DAT_00399b88 <= DAT_0038f020) | 0xff000000; ImGui::PushStyleColor(7,0); ImGui::PushStyleColor(9,0); local_58 = _DAT_00399a70; uStack_50 = _UNK_00399a78; ImGui::PushStyleColor(8,(ImVec4 *)&local_58); ImGui::PushStyleColor(0x13,uVar10); ImGui::PushStyleColor(0x14,uVar10); ImGui::PushStyleVar(0x14,DAT_0038f048); ImGui::PushStyleVar(0xc,0.0); uVar5 = ImGui::SliderFloat(param_1,param_2,0.0,DAT_0038f008,param_4,0); ImGui::PopStyleColor(5); ImGui::PopStyleVar(2); if (param_3 != (ImVec4 *)0x0) { iVar9 = *(int *)(*(long *)(lVar4 + 0x370) + lVar11 * 4); if (*(char *)(*(long *)(lVar4 + 0x3b0) + lVar11) == '\x01') { fVar12 = (float)iVar9; iVar8 = (int)(*param_2 * fVar12); iVar7 = iVar9 + -1; if (iVar8 < iVar9 + -1) { iVar7 = iVar8; } iVar9 = 0; if (-1 < iVar8) { iVar9 = iVar7; } } else { fVar12 = (float)(iVar9 + -1) * *param_2 + DAT_0038f020; iVar9 = (int)fVar12; } uVar15 = 0; uVar13 = ImGui::ColorConvertU32ToFloat4 (*(uint *)(*(long *)(lVar4 + 0x360) + ((long)iVar9 + (long)*(int *)(*(long *)(lVar4 + 0x380) + lVar11 * 4)) * 4)); *(int8 *)param_3 = uVar13; *(float *)(param_3 + 8) = fVar12; *(int4 *)(param_3 + 0xc) = uVar15; } } else { uVar5 = 0; } return uVar5; }
26,155
get_charset_name
eloqsql/mysys/charset.c
const char *get_charset_name(uint charset_number) { my_pthread_once(&charsets_initialized, init_available_charsets); if (charset_number < array_elements(all_charsets)) { CHARSET_INFO *cs= all_charsets[charset_number]; if (cs && (cs->number == charset_number) && cs->coll_name.str) return cs->coll_name.str; } return "?"; /* this mimics find_type() */ }
O3
c
get_charset_name: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movl %edi, %ebx leaq 0x392a8e(%rip), %rdi # 0x3deb30 leaq -0x302(%rip), %rsi # 0x4bda7 callq 0x26300 leaq 0x35105(%rip), %rcx # 0x811ba cmpl $0x7ff, %ebx # imm = 0x7FF ja 0x4c0dc movl %ebx, %eax leaq 0x38a9fa(%rip), %rdx # 0x3d6ac0 movq (%rdx,%rax,8), %rax testq %rax, %rax je 0x4c0dc cmpl %ebx, (%rax) jne 0x4c0dc movq 0x20(%rax), %rax testq %rax, %rax jne 0x4c0df movq %rcx, %rax addq $0x8, %rsp popq %rbx popq %rbp retq
get_charset_name: push rbp mov rbp, rsp push rbx push rax mov ebx, edi lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once lea rcx, asc_811BA; "?" cmp ebx, 7FFh ja short loc_4C0DC mov eax, ebx lea rdx, all_charsets mov rax, [rdx+rax*8] test rax, rax jz short loc_4C0DC cmp [rax], ebx jnz short loc_4C0DC mov rax, [rax+20h] test rax, rax jnz short loc_4C0DF loc_4C0DC: mov rax, rcx loc_4C0DF: add rsp, 8 pop rbx pop rbp retn
const char * get_charset_name(unsigned int a1) { long long v1; // rax const char *result; // rax pthread_once(&charsets_initialized, init_available_charsets); if ( a1 > 0x7FF ) return "?"; v1 = all_charsets[a1]; if ( !v1 ) return "?"; if ( *(_DWORD *)v1 != a1 ) return "?"; result = *(const char **)(v1 + 32); if ( !result ) return "?"; return result; }
get_charset_name: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV EBX,EDI LEA RDI,[0x4deb30] LEA RSI,[0x14bda7] CALL 0x00126300 LEA RCX,[0x1811ba] CMP EBX,0x7ff JA 0x0014c0dc MOV EAX,EBX LEA RDX,[0x4d6ac0] MOV RAX,qword ptr [RDX + RAX*0x8] TEST RAX,RAX JZ 0x0014c0dc CMP dword ptr [RAX],EBX JNZ 0x0014c0dc MOV RAX,qword ptr [RAX + 0x20] TEST RAX,RAX JNZ 0x0014c0df LAB_0014c0dc: MOV RAX,RCX LAB_0014c0df: ADD RSP,0x8 POP RBX POP RBP RET
int * get_charset_name(uint param_1) { uint *puVar1; int *puVar2; pthread_once(&charsets_initialized,init_available_charsets); if ((((0x7ff < param_1) || (puVar1 = (uint *)(&all_charsets)[param_1], puVar1 == (uint *)0x0)) || (*puVar1 != param_1)) || (puVar2 = *(int **)(puVar1 + 8), puVar2 == (int *)0x0)) { puVar2 = &DAT_001811ba; } return puVar2; }
26,156
string_get_digits
bluesky950520[P]quickjs/quickjs.c
static BOOL string_get_digits(const uint8_t *sp, int *pp, int *pval, int min_digits, int max_digits) { int v = 0; int c, p = *pp, p_start; p_start = p; while ((c = sp[p]) >= '0' && c <= '9') { v = v * 10 + c - '0'; p++; if (p - p_start == max_digits) break; } if (p - p_start < min_digits) return FALSE; *pval = v; *pp = p; return TRUE; }
O2
c
string_get_digits: pushq %rbp pushq %rbx movslq (%rsi), %r10 movl %r10d, %eax leal (%r10,%r8), %r9d addq %r10, %rdi movl %r8d, %r11d xorl %r10d, %r10d xorl %r8d, %r8d movzbl (%rdi,%r10), %ebx leal -0x30(%rbx), %ebp cmpb $0x9, %bpl ja 0x4b459 imull $0xa, %r8d, %r8d addl %ebx, %r8d addl $-0x30, %r8d incq %r10 cmpl %r10d, %r11d jne 0x4b436 jmp 0x4b45f addl %eax, %r10d movl %r10d, %r9d movl %r9d, %edi subl %eax, %edi xorl %eax, %eax cmpl %ecx, %edi jl 0x4b475 movl %r8d, (%rdx) movl %r9d, (%rsi) movl $0x1, %eax popq %rbx popq %rbp retq
string_get_digits: push rbp push rbx movsxd r10, dword ptr [rsi] mov eax, r10d lea r9d, [r10+r8] add rdi, r10 mov r11d, r8d xor r10d, r10d xor r8d, r8d loc_4B436: movzx ebx, byte ptr [rdi+r10] lea ebp, [rbx-30h] cmp bpl, 9 ja short loc_4B459 imul r8d, 0Ah add r8d, ebx add r8d, 0FFFFFFD0h inc r10 cmp r11d, r10d jnz short loc_4B436 jmp short loc_4B45F loc_4B459: add r10d, eax mov r9d, r10d loc_4B45F: mov edi, r9d sub edi, eax xor eax, eax cmp edi, ecx jl short loc_4B475 mov [rdx], r8d mov [rsi], r9d mov eax, 1 loc_4B475: pop rbx pop rbp retn
long long string_get_digits(long long a1, int *a2, int *a3, int a4, int a5) { long long v5; // r10 int v6; // eax int v7; // r9d long long v8; // rdi long long v10; // r10 int v11; // r8d int v12; // ebx int v13; // edi long long result; // rax v5 = *a2; v6 = v5; v7 = v5 + a5; v8 = v5 + a1; v10 = 0LL; v11 = 0; while ( 1 ) { v12 = *(unsigned __int8 *)(v8 + v10); if ( (unsigned __int8)(v12 - 48) > 9u ) break; v11 = v12 + 10 * v11 - 48; if ( a5 == (_DWORD)++v10 ) goto LABEL_6; } v7 = v6 + v10; LABEL_6: v13 = v7 - v6; result = 0LL; if ( v13 >= a4 ) { *a3 = v11; *a2 = v7; return 1LL; } return result; }
string_get_digits: PUSH RBP PUSH RBX MOVSXD R10,dword ptr [RSI] MOV EAX,R10D LEA R9D,[R10 + R8*0x1] ADD RDI,R10 MOV R11D,R8D XOR R10D,R10D XOR R8D,R8D LAB_0014b436: MOVZX EBX,byte ptr [RDI + R10*0x1] LEA EBP,[RBX + -0x30] CMP BPL,0x9 JA 0x0014b459 IMUL R8D,R8D,0xa ADD R8D,EBX ADD R8D,-0x30 INC R10 CMP R11D,R10D JNZ 0x0014b436 JMP 0x0014b45f LAB_0014b459: ADD R10D,EAX MOV R9D,R10D LAB_0014b45f: MOV EDI,R9D SUB EDI,EAX XOR EAX,EAX CMP EDI,ECX JL 0x0014b475 MOV dword ptr [RDX],R8D MOV dword ptr [RSI],R9D MOV EAX,0x1 LAB_0014b475: POP RBX POP RBP RET
bool string_get_digits(long param_1,int *param_2,int *param_3,int param_4,int param_5) { byte bVar1; int iVar2; bool bVar3; int iVar4; int iVar5; long lVar6; iVar2 = *param_2; iVar5 = iVar2 + param_5; lVar6 = 0; iVar4 = 0; do { bVar1 = *(byte *)(param_1 + iVar2 + lVar6); if (9 < (byte)(bVar1 - 0x30)) { iVar5 = (int)lVar6 + iVar2; break; } iVar4 = iVar4 * 10 + (uint)bVar1 + -0x30; lVar6 = lVar6 + 1; } while (param_5 != (int)lVar6); bVar3 = param_4 <= iVar5 - iVar2; if (bVar3) { *param_3 = iVar4; *param_2 = iVar5; } return bVar3; }
26,157
Device::overrideStage(VkPipelineShaderStageCreateInfo*, ScratchAllocator&) const
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
void Device::overrideStage(VkPipelineShaderStageCreateInfo *stageInfo, ScratchAllocator &alloc) const { auto *moduleCreateInfo = findChain<VkShaderModuleCreateInfo>(stageInfo->pNext, VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO); if (moduleCreateInfo && moduleCreateInfo->codeSize) { auto replaced = *moduleCreateInfo; if (overrideShader(replaced, stageInfo->pName, stageInfo->stage, alloc)) { const void *pnext = copyPnextChain(stageInfo->pNext, alloc); if (!pnext) { fprintf(stderr, "pyroveil: Failed to copy pNext chain. Cannot override.\n"); return; } stageInfo->pNext = pnext; stageInfo->pName = "main"; moduleCreateInfo = findChain<VkShaderModuleCreateInfo>(pnext, VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO); auto &mut = const_cast<VkShaderModuleCreateInfo &>(*moduleCreateInfo); mut.pCode = replaced.pCode; mut.codeSize = replaced.codeSize; } } else if (stageInfo->module) { std::lock_guard<std::mutex> holder{lock}; if (overriddenModules.count(stageInfo->module)) stageInfo->pName = "main"; } }
O0
cpp
Device::overrideStage(VkPipelineShaderStageCreateInfo*, ScratchAllocator&) const: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi movl $0x10, %esi callq 0x1866e0 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) je 0x186652 movq -0x20(%rbp), %rax cmpq $0x0, 0x18(%rax) je 0x186652 movq -0x20(%rbp), %rsi leaq -0x48(%rbp), %rdi movl $0x28, %edx callq 0x1661c0 movq -0x78(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x20(%rax), %rdx movq -0x10(%rbp), %rax movl 0x14(%rax), %ecx movq -0x18(%rbp), %r8 leaq -0x48(%rbp), %rsi callq 0x185ee0 testb $0x1, %al jne 0x1865ca jmp 0x186650 movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi movq -0x18(%rbp), %rsi callq 0x186730 movq %rax, -0x50(%rbp) cmpq $0x0, -0x50(%rbp) jne 0x186603 movq 0xb59963(%rip), %rax # 0xcdff50 movq (%rax), %rdi leaq 0x764010(%rip), %rsi # 0x8ea607 movb $0x0, %al callq 0x1685c0 jmp 0x1866c6 movq -0x50(%rbp), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x10(%rbp), %rax leaq 0x7b5804(%rip), %rcx # 0x93be1e movq %rcx, 0x20(%rax) movq -0x50(%rbp), %rdi movl $0x10, %esi callq 0x1866e0 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x28(%rbp), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x30(%rbp), %rcx movq -0x58(%rbp), %rax movq %rcx, 0x18(%rax) jmp 0x1866c6 movq -0x10(%rbp), %rax cmpq $0x0, 0x18(%rax) je 0x1866c4 movq -0x78(%rbp), %rsi addq $0x58, %rsi leaq -0x60(%rbp), %rdi callq 0x174240 movq -0x78(%rbp), %rdi subq $-0x80, %rdi movq -0x10(%rbp), %rsi addq $0x18, %rsi callq 0x189f80 movq %rax, -0x80(%rbp) jmp 0x186689 movq -0x80(%rbp), %rax cmpq $0x0, %rax je 0x1866bb movq -0x10(%rbp), %rax leaq 0x7b5780(%rip), %rcx # 0x93be1e movq %rcx, 0x20(%rax) jmp 0x1866bb movq %rax, %rcx movl %edx, %eax movq %rcx, -0x68(%rbp) movl %eax, -0x6c(%rbp) leaq -0x60(%rbp), %rdi callq 0x16ecb0 jmp 0x1866cf leaq -0x60(%rbp), %rdi callq 0x16ecb0 jmp 0x1866c6 addq $0x80, %rsp popq %rbp retq movq -0x68(%rbp), %rdi callq 0x171c30 nopl (%rax,%rax)
_ZNK6Device13overrideStageEP31VkPipelineShaderStageCreateInfoR16ScratchAllocator: push rbp mov rbp, rsp sub rsp, 80h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov [rbp+var_78], rax mov rax, [rbp+var_10] mov rdi, [rax+8] mov esi, 10h call _ZL9findChainI24VkShaderModuleCreateInfoEPKT_PKv15VkStructureType; findChain<VkShaderModuleCreateInfo>(void const*,VkStructureType) mov [rbp+var_20], rax cmp [rbp+var_20], 0 jz loc_186652 mov rax, [rbp+var_20] cmp qword ptr [rax+18h], 0 jz loc_186652 mov rsi, [rbp+var_20] lea rdi, [rbp+var_48] mov edx, 28h ; '(' call _memcpy mov rdi, [rbp+var_78] mov rax, [rbp+var_10] mov rdx, [rax+20h] mov rax, [rbp+var_10] mov ecx, [rax+14h] mov r8, [rbp+var_18] lea rsi, [rbp+var_48] call _ZNK6Device14overrideShaderER24VkShaderModuleCreateInfoPKc21VkShaderStageFlagBitsR16ScratchAllocator; Device::overrideShader(VkShaderModuleCreateInfo &,char const*,VkShaderStageFlagBits,ScratchAllocator &) test al, 1 jnz short loc_1865CA jmp loc_186650 loc_1865CA: mov rax, [rbp+var_10] mov rdi, [rax+8]; void * mov rsi, [rbp+var_18]; ScratchAllocator * call _ZL14copyPnextChainPKvR16ScratchAllocator; copyPnextChain(void const*,ScratchAllocator &) mov [rbp+var_50], rax cmp [rbp+var_50], 0 jnz short loc_186603 mov rax, cs:stderr_ptr mov rdi, [rax] lea rsi, aPyroveilFailed_3; "pyroveil: Failed to copy pNext chain. C"... mov al, 0 call _fprintf jmp loc_1866C6 loc_186603: mov rcx, [rbp+var_50] mov rax, [rbp+var_10] mov [rax+8], rcx mov rax, [rbp+var_10] lea rcx, aInvalidDomain+0Ah; "main" mov [rax+20h], rcx mov rdi, [rbp+var_50] mov esi, 10h call _ZL9findChainI24VkShaderModuleCreateInfoEPKT_PKv15VkStructureType; findChain<VkShaderModuleCreateInfo>(void const*,VkStructureType) mov [rbp+var_20], rax mov rax, [rbp+var_20] mov [rbp+var_58], rax mov rcx, [rbp+var_28] mov rax, [rbp+var_58] mov [rax+20h], rcx mov rcx, [rbp+var_30] mov rax, [rbp+var_58] mov [rax+18h], rcx loc_186650: jmp short loc_1866C6 loc_186652: mov rax, [rbp+var_10] cmp qword ptr [rax+18h], 0 jz short loc_1866C4 mov rsi, [rbp+var_78] add rsi, 58h ; 'X' lea rdi, [rbp+var_60] call __ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&) mov rdi, [rbp+var_78] sub rdi, 0FFFFFFFFFFFFFF80h mov rsi, [rbp+var_10] add rsi, 18h call _ZNKSt13unordered_setIP16VkShaderModule_TSt4hashIS1_ESt8equal_toIS1_ESaIS1_EE5countERKS1_; std::unordered_set<VkShaderModule_T *>::count(VkShaderModule_T * const&) mov [rbp+var_80], rax jmp short $+2 loc_186689: mov rax, [rbp+var_80] cmp rax, 0 jz short loc_1866BB mov rax, [rbp+var_10] lea rcx, aInvalidDomain+0Ah; "main" mov [rax+20h], rcx jmp short loc_1866BB mov rcx, rax mov eax, edx mov [rbp+var_68], rcx mov [rbp+var_6C], eax lea rdi, [rbp+var_60] call __ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() jmp short loc_1866CF loc_1866BB: lea rdi, [rbp+var_60] call __ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() loc_1866C4: jmp short $+2 loc_1866C6: add rsp, 80h pop rbp retn loc_1866CF: mov rdi, [rbp+var_68] call __Unwind_Resume
char Device::overrideStage(long long a1, long long a2, ScratchAllocator *a3) { char result; // al _BYTE v4[8]; // [rsp+20h] [rbp-60h] BYREF long long v5; // [rsp+28h] [rbp-58h] long long v6; // [rsp+30h] [rbp-50h] _BYTE v7[24]; // [rsp+38h] [rbp-48h] BYREF long long v8; // [rsp+50h] [rbp-30h] long long v9; // [rsp+58h] [rbp-28h] long long v10; // [rsp+60h] [rbp-20h] ScratchAllocator *v11; // [rsp+68h] [rbp-18h] long long v12; // [rsp+70h] [rbp-10h] long long v13; // [rsp+78h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; v10 = findChain<VkShaderModuleCreateInfo>(*(_QWORD *)(a2 + 8), 16LL); if ( v10 && *(_QWORD *)(v10 + 24) ) { memcpy(v7, v10, 40LL); result = Device::overrideShader(a1, (long long)v7, *(_QWORD *)(v12 + 32), *(_DWORD *)(v12 + 20), v11); if ( (result & 1) != 0 ) { v6 = copyPnextChain(*(const void **)(v12 + 8), v11); if ( v6 ) { *(_QWORD *)(v12 + 8) = v6; *(_QWORD *)(v12 + 32) = "main"; v10 = findChain<VkShaderModuleCreateInfo>(v6, 16LL); v5 = v10; *(_QWORD *)(v10 + 32) = v9; result = v5; *(_QWORD *)(v5 + 24) = v8; } else { return fprintf(stderr, "pyroveil: Failed to copy pNext chain. Cannot override.\n"); } } } else { result = v12; if ( *(_QWORD *)(v12 + 24) ) { std::lock_guard<std::mutex>::lock_guard(v4, a1 + 88); if ( std::unordered_set<VkShaderModule_T *>::count(a1 + 128, v12 + 24) ) *(_QWORD *)(v12 + 32) = "main"; return std::lock_guard<std::mutex>::~lock_guard(v4); } } return result; }
26,158
Device::overrideStage(VkPipelineShaderStageCreateInfo*, ScratchAllocator&) const
HansKristian-Work[P]pyroveil/layer/pyroveil.cpp
void Device::overrideStage(VkPipelineShaderStageCreateInfo *stageInfo, ScratchAllocator &alloc) const { auto *moduleCreateInfo = findChain<VkShaderModuleCreateInfo>(stageInfo->pNext, VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO); if (moduleCreateInfo && moduleCreateInfo->codeSize) { auto replaced = *moduleCreateInfo; if (overrideShader(replaced, stageInfo->pName, stageInfo->stage, alloc)) { const void *pnext = copyPnextChain(stageInfo->pNext, alloc); if (!pnext) { fprintf(stderr, "pyroveil: Failed to copy pNext chain. Cannot override.\n"); return; } stageInfo->pNext = pnext; stageInfo->pName = "main"; moduleCreateInfo = findChain<VkShaderModuleCreateInfo>(pnext, VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO); auto &mut = const_cast<VkShaderModuleCreateInfo &>(*moduleCreateInfo); mut.pCode = replaced.pCode; mut.codeSize = replaced.codeSize; } } else if (stageInfo->module) { std::lock_guard<std::mutex> holder{lock}; if (overriddenModules.count(stageInfo->module)) stageInfo->pName = "main"; } }
O1
cpp
Device::overrideStage(VkPipelineShaderStageCreateInfo*, ScratchAllocator&) const: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rdx, -0x50(%rbp) movq %rsi, %rbx movq %rdi, %r15 movq 0x8(%rsi), %rcx testq %rcx, %rcx je 0x8a1c9 movl (%rcx), %edx cmpl $0x10, %edx jne 0x8a1be movq %rcx, %rax jmp 0x8a1c2 movq 0x8(%rcx), %rcx cmpl $0x10, %edx jne 0x8a1ad jmp 0x8a1cb xorl %eax, %eax testq %rax, %rax je 0x8a2d4 cmpq $0x0, 0x18(%rax) je 0x8a2d4 movq 0x20(%rax), %rcx leaq -0x80(%rbp), %rsi movq %rcx, 0x20(%rsi) movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 movaps %xmm1, 0x10(%rsi) movaps %xmm0, (%rsi) movq 0x20(%rbx), %rdx movl 0x14(%rbx), %ecx movq %r15, %rdi movq -0x50(%rbp), %r8 callq 0x89c76 testb %al, %al je 0x8a36f movq 0x8(%rbx), %rax movq %rax, -0x30(%rbp) leaq 0x359e7d(%rip), %rcx # 0x3e40a0 movq $0x0, -0x40(%rbp) movq %rbx, -0x48(%rbp) cmpq $0x0, -0x30(%rbp) je 0x8a329 movl $0x8, %r14d movq $0x0, -0x38(%rbp) movl -0x8(%r14,%rcx), %ebx movq -0x30(%rbp), %rax movl (%rax), %r15d cmpl %r15d, %ebx jne 0x8a287 movq %rcx, %r12 movq (%r14,%rcx), %r13 movq -0x50(%rbp), %rdi movq %r13, %rsi callq 0x888ec testq %rax, %rax movq %rax, -0x38(%rbp) je 0x8a284 movq %rax, %rdi movq -0x30(%rbp), %rsi movq %r13, %rdx callq 0x7f1b0 movq %r12, %rcx cmpl %r15d, %ebx je 0x8a299 leaq 0x10(%r14), %rax cmpq $0x58, %r14 movq %rax, %r14 jne 0x8a248 movq -0x38(%rbp), %rax testq %rax, %rax je 0x8a2c2 movq -0x40(%rbp), %rax movq -0x38(%rbp), %rdx movq %rax, 0x8(%rdx) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x48(%rbp), %rbx testq %rax, %rax jne 0x8a22f xorl %r14d, %r14d jmp 0x8a32d cmpq $0x0, 0x18(%rbx) je 0x8a36f leaq 0x58(%r15), %r14 movq %r14, %rdi callq 0x80290 testl %eax, %eax jne 0x8a388 leaq 0x18(%rbx), %rsi subq $-0x80, %r15 movq %r15, %rdi callq 0x920ae testq %rax, %rax je 0x8a313 leaq 0x3a6073(%rip), %rax # 0x430382 movq %rax, 0x20(%rbx) movq %r14, %rdi addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x7efe0 movq -0x40(%rbp), %r14 testq %r14, %r14 je 0x8a37e movq %r14, 0x8(%rbx) leaq 0x3a6045(%rip), %rax # 0x430382 movq %rax, 0x20(%rbx) movq %r14, %rcx movq %r14, %rsi movl (%rcx), %edx cmpl $0x10, %edx jne 0x8a353 movq %rcx, %rax jmp 0x8a357 movq 0x8(%rcx), %rcx cmpl $0x10, %edx jne 0x8a347 movq -0x60(%rbp), %rcx movq %rcx, 0x20(%rax) movq -0x68(%rbp), %rcx movq %rcx, 0x18(%rax) testq %rsi, %rsi addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x8117d movq %r14, %rsi jmp 0x8a36c movl %eax, %edi callq 0x7ee10 movq %rax, %rbx movq %r14, %rdi callq 0x7efe0 movq %rbx, %rdi callq 0x809f0
_ZNK6Device13overrideStageEP31VkPipelineShaderStageCreateInfoR16ScratchAllocator: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rbp+var_50], rdx mov rbx, rsi mov r15, rdi mov rcx, [rsi+8] loc_8A1AD: test rcx, rcx jz short loc_8A1C9 mov edx, [rcx] cmp edx, 10h jnz short loc_8A1BE mov rax, rcx jmp short loc_8A1C2 loc_8A1BE: mov rcx, [rcx+8] loc_8A1C2: cmp edx, 10h jnz short loc_8A1AD jmp short loc_8A1CB loc_8A1C9: xor eax, eax loc_8A1CB: test rax, rax jz loc_8A2D4 cmp qword ptr [rax+18h], 0 jz loc_8A2D4 mov rcx, [rax+20h] lea rsi, [rbp+var_80] mov [rsi+20h], rcx movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] movaps xmmword ptr [rsi+10h], xmm1 movaps xmmword ptr [rsi], xmm0 mov rdx, [rbx+20h] mov ecx, [rbx+14h] mov rdi, r15 mov r8, [rbp+var_50] call _ZNK6Device14overrideShaderER24VkShaderModuleCreateInfoPKc21VkShaderStageFlagBitsR16ScratchAllocator; Device::overrideShader(VkShaderModuleCreateInfo &,char const*,VkShaderStageFlagBits,ScratchAllocator &) test al, al jz loc_8A36F mov rax, [rbx+8] mov [rbp+var_30], rax lea rcx, _ZL11structSizes; structSizes mov [rbp+var_40], 0 mov [rbp+var_48], rbx loc_8A22F: cmp [rbp+var_30], 0 jz loc_8A329 mov r14d, 8 mov [rbp+var_38], 0 loc_8A248: mov ebx, [r14+rcx-8] mov rax, [rbp+var_30] mov r15d, [rax] cmp ebx, r15d jnz short loc_8A287 mov r12, rcx mov r13, [r14+rcx] mov rdi, [rbp+var_50]; this mov rsi, r13; unsigned __int64 call _ZN16ScratchAllocator10allocBytesEm; ScratchAllocator::allocBytes(ulong) test rax, rax mov [rbp+var_38], rax jz short loc_8A284 mov rdi, rax mov rsi, [rbp+var_30] mov rdx, r13 call _memcpy loc_8A284: mov rcx, r12 loc_8A287: cmp ebx, r15d jz short loc_8A299 lea rax, [r14+10h] cmp r14, 58h ; 'X' mov r14, rax jnz short loc_8A248 loc_8A299: mov rax, [rbp+var_38] test rax, rax jz short loc_8A2C2 mov rax, [rbp+var_40] mov rdx, [rbp+var_38] mov [rdx+8], rax mov rax, [rbp+var_30] mov rax, [rax+8] mov [rbp+var_30], rax mov rax, [rbp+var_38] mov [rbp+var_40], rax loc_8A2C2: mov rbx, [rbp+var_48] test rax, rax jnz loc_8A22F xor r14d, r14d jmp short loc_8A32D loc_8A2D4: cmp qword ptr [rbx+18h], 0 jz loc_8A36F lea r14, [r15+58h] mov rdi, r14 call _pthread_mutex_lock test eax, eax jnz loc_8A388 lea rsi, [rbx+18h] sub r15, 0FFFFFFFFFFFFFF80h mov rdi, r15 call _ZNKSt10_HashtableIP16VkShaderModule_TS1_SaIS1_ENSt8__detail9_IdentityESt8equal_toIS1_ESt4hashIS1_ENS3_18_Mod_range_hashingENS3_20_Default_ranged_hashENS3_20_Prime_rehash_policyENS3_17_Hashtable_traitsILb0ELb1ELb1EEEE5countERKS1_; std::_Hashtable<VkShaderModule_T *,VkShaderModule_T *,std::allocator<VkShaderModule_T *>,std::__detail::_Identity,std::equal_to<VkShaderModule_T *>,std::hash<VkShaderModule_T *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::count(VkShaderModule_T * const&) test rax, rax jz short loc_8A313 lea rax, aInvalidDomain+0Ah; "main" mov [rbx+20h], rax loc_8A313: mov rdi, r14 add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _pthread_mutex_unlock loc_8A329: mov r14, [rbp+var_40] loc_8A32D: test r14, r14 jz short loc_8A37E mov [rbx+8], r14 lea rax, aInvalidDomain+0Ah; "main" mov [rbx+20h], rax mov rcx, r14 mov rsi, r14 loc_8A347: mov edx, [rcx] cmp edx, 10h jnz short loc_8A353 mov rax, rcx jmp short loc_8A357 loc_8A353: mov rcx, [rcx+8] loc_8A357: cmp edx, 10h jnz short loc_8A347 mov rcx, [rbp+var_60] mov [rax+20h], rcx mov rcx, [rbp+var_68] mov [rax+18h], rcx loc_8A36C: test rsi, rsi loc_8A36F: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_8A37E: call _ZNK6Device13overrideStageEP31VkPipelineShaderStageCreateInfoR16ScratchAllocator_cold_1; Device::overrideStage(VkPipelineShaderStageCreateInfo *,ScratchAllocator &) [clone] mov rsi, r14 jmp short loc_8A36C loc_8A388: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov rbx, rax mov rdi, r14 call _pthread_mutex_unlock mov rdi, rbx call __Unwind_Resume
char * Device::overrideStage(ScratchAllocator *a1, _QWORD *a2, ScratchAllocator *a3) { char *result; // rax _QWORD *v4; // rbx char *v5; // rcx int v6; // edx __int128 *v7; // rsi __int128 v8; // xmm0 unsigned long long v9; // rdx char *v10; // rcx long long v11; // r14 int v12; // ebx int v13; // r15d char *v14; // r12 unsigned long long v15; // rax bool v16; // zf unsigned long long v17; // rax char *v18; // r14 int v19; // eax char *v20; // rcx int v21; // edx __int128 v22; // [rsp+0h] [rbp-80h] BYREF __int128 v23; // [rsp+10h] [rbp-70h] long long v24; // [rsp+20h] [rbp-60h] ScratchAllocator *v25; // [rsp+30h] [rbp-50h] _QWORD *v26; // [rsp+38h] [rbp-48h] unsigned long long v27; // [rsp+40h] [rbp-40h] unsigned long long v28; // [rsp+48h] [rbp-38h] __int128 *v29; // [rsp+50h] [rbp-30h] v25 = a3; v4 = a2; v5 = (char *)a2[1]; while ( v5 ) { v6 = *(_DWORD *)v5; if ( *(_DWORD *)v5 == 16 ) result = v5; else v5 = (char *)*((_QWORD *)v5 + 1); if ( v6 == 16 ) goto LABEL_9; } result = 0LL; LABEL_9: if ( result && *((_QWORD *)result + 3) ) { v7 = &v22; v24 = *((_QWORD *)result + 4); v8 = *(_OWORD *)result; v23 = *((_OWORD *)result + 1); v22 = v8; result = (char *)Device::overrideShader((long long)a1, (long long)&v22, v4[4], *((_DWORD *)v4 + 5), v25); if ( (_BYTE)result ) { v29 = (__int128 *)v4[1]; v10 = (char *)&structSizes; v27 = 0LL; v26 = v4; while ( v29 ) { v11 = 8LL; v28 = 0LL; do { v12 = *(_DWORD *)&v10[v11 - 8]; v13 = *(_DWORD *)v29; if ( v12 == *(_DWORD *)v29 ) { v14 = v10; a1 = v25; v7 = *(__int128 **)&v10[v11]; v15 = ScratchAllocator::allocBytes(v25, (unsigned long long)v7); v28 = v15; if ( v15 ) { a1 = (ScratchAllocator *)v15; v7 = v29; memcpy(v15); } v10 = v14; } if ( v12 == v13 ) break; v16 = v11 == 88; v11 += 16LL; } while ( !v16 ); v17 = v28; if ( v28 ) { v9 = v28; *(_QWORD *)(v28 + 8) = v27; v29 = (__int128 *)*((_QWORD *)v29 + 1); v17 = v28; v27 = v28; } v4 = v26; if ( !v17 ) { v18 = 0LL; goto LABEL_31; } } v18 = (char *)v27; LABEL_31: if ( v18 ) { v4[1] = v18; result = "main"; v4[4] = "main"; v20 = v18; do { v21 = *(_DWORD *)v20; if ( *(_DWORD *)v20 == 16 ) result = v20; else v20 = (char *)*((_QWORD *)v20 + 1); } while ( v21 != 16 ); *((_QWORD *)result + 4) = v24; *((_QWORD *)result + 3) = *((_QWORD *)&v23 + 1); } else { return (char *)Device::overrideStage(a1, v7, v9, v10); } } } else if ( a2[3] ) { v19 = pthread_mutex_lock((char *)a1 + 88); if ( v19 ) std::__throw_system_error(v19); if ( std::_Hashtable<VkShaderModule_T *,VkShaderModule_T *,std::allocator<VkShaderModule_T *>,std::__detail::_Identity,std::equal_to<VkShaderModule_T *>,std::hash<VkShaderModule_T *>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>>::count( (char *)a1 + 128, a2 + 3) ) { a2[4] = "main"; } return (char *)pthread_mutex_unlock((char *)a1 + 88); } return result; }
overrideStage: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RBP + -0x50],RDX MOV RBX,RSI MOV R15,RDI MOV RCX,qword ptr [RSI + 0x8] LAB_0018a1ad: TEST RCX,RCX JZ 0x0018a1c9 MOV EDX,dword ptr [RCX] CMP EDX,0x10 JNZ 0x0018a1be MOV RAX,RCX JMP 0x0018a1c2 LAB_0018a1be: MOV RCX,qword ptr [RCX + 0x8] LAB_0018a1c2: CMP EDX,0x10 JNZ 0x0018a1ad JMP 0x0018a1cb LAB_0018a1c9: XOR EAX,EAX LAB_0018a1cb: TEST RAX,RAX JZ 0x0018a2d4 CMP qword ptr [RAX + 0x18],0x0 JZ 0x0018a2d4 MOV RCX,qword ptr [RAX + 0x20] LEA RSI,[RBP + -0x80] MOV qword ptr [RSI + 0x20],RCX MOVUPS XMM0,xmmword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX + 0x10] MOVAPS xmmword ptr [RSI + 0x10],XMM1 MOVAPS xmmword ptr [RSI],XMM0 MOV RDX,qword ptr [RBX + 0x20] MOV ECX,dword ptr [RBX + 0x14] MOV RDI,R15 MOV R8,qword ptr [RBP + -0x50] CALL 0x00189c76 TEST AL,AL JZ 0x0018a36f MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RBP + -0x30],RAX LEA RCX,[0x4e40a0] MOV qword ptr [RBP + -0x40],0x0 MOV qword ptr [RBP + -0x48],RBX LAB_0018a22f: CMP qword ptr [RBP + -0x30],0x0 JZ 0x0018a329 MOV R14D,0x8 MOV qword ptr [RBP + -0x38],0x0 LAB_0018a248: MOV EBX,dword ptr [R14 + RCX*0x1 + -0x8] MOV RAX,qword ptr [RBP + -0x30] MOV R15D,dword ptr [RAX] CMP EBX,R15D JNZ 0x0018a287 MOV R12,RCX MOV R13,qword ptr [R14 + RCX*0x1] MOV RDI,qword ptr [RBP + -0x50] MOV RSI,R13 CALL 0x001888ec TEST RAX,RAX MOV qword ptr [RBP + -0x38],RAX JZ 0x0018a284 MOV RDI,RAX MOV RSI,qword ptr [RBP + -0x30] MOV RDX,R13 CALL 0x0017f1b0 LAB_0018a284: MOV RCX,R12 LAB_0018a287: CMP EBX,R15D JZ 0x0018a299 LEA RAX,[R14 + 0x10] CMP R14,0x58 MOV R14,RAX JNZ 0x0018a248 LAB_0018a299: MOV RAX,qword ptr [RBP + -0x38] TEST RAX,RAX JZ 0x0018a2c2 MOV RAX,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x38] MOV qword ptr [RDX + 0x8],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RAX LAB_0018a2c2: MOV RBX,qword ptr [RBP + -0x48] TEST RAX,RAX JNZ 0x0018a22f XOR R14D,R14D JMP 0x0018a32d LAB_0018a2d4: CMP qword ptr [RBX + 0x18],0x0 JZ 0x0018a36f LEA R14,[R15 + 0x58] MOV RDI,R14 CALL 0x00180290 TEST EAX,EAX JNZ 0x0018a388 LEA RSI,[RBX + 0x18] SUB R15,-0x80 LAB_0018a2fb: MOV RDI,R15 CALL 0x001920ae LAB_0018a303: TEST RAX,RAX JZ 0x0018a313 LEA RAX,[0x530382] MOV qword ptr [RBX + 0x20],RAX LAB_0018a313: MOV RDI,R14 ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x0017efe0 LAB_0018a329: MOV R14,qword ptr [RBP + -0x40] LAB_0018a32d: TEST R14,R14 JZ 0x0018a37e MOV qword ptr [RBX + 0x8],R14 LEA RAX,[0x530382] MOV qword ptr [RBX + 0x20],RAX MOV RCX,R14 MOV RSI,R14 LAB_0018a347: MOV EDX,dword ptr [RCX] CMP EDX,0x10 JNZ 0x0018a353 MOV RAX,RCX JMP 0x0018a357 LAB_0018a353: MOV RCX,qword ptr [RCX + 0x8] LAB_0018a357: CMP EDX,0x10 JNZ 0x0018a347 MOV RCX,qword ptr [RBP + -0x60] MOV qword ptr [RAX + 0x20],RCX MOV RCX,qword ptr [RBP + -0x68] MOV qword ptr [RAX + 0x18],RCX LAB_0018a36c: TEST RSI,RSI LAB_0018a36f: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0018a37e: CALL 0x0018117d MOV RSI,R14 JMP 0x0018a36c LAB_0018a388: MOV EDI,EAX CALL 0x0017ee10
/* Device::overrideStage(VkPipelineShaderStageCreateInfo*, ScratchAllocator&) const */ void __thiscall Device::overrideStage (Device *this,VkPipelineShaderStageCreateInfo *param_1,ScratchAllocator *param_2) { int iVar1; ScratchAllocator *__n; char cVar2; int iVar3; int *piVar4; Device *pDVar5; long lVar6; ScratchAllocator *pSVar7; bool bVar8; int local_88; int iStack_84; int iStack_80; int iStack_7c; int local_78; int iStack_74; int iStack_70; int iStack_6c; int8 local_68; ScratchAllocator *local_58; VkPipelineShaderStageCreateInfo *local_50; Device *local_48; Device *local_40; ScratchAllocator *local_38; for (piVar4 = *(int **)(param_1 + 8); piVar4 != (int *)0x0; piVar4 = *(int **)(piVar4 + 2)) { if (*piVar4 == 0x10) goto LAB_0018a1cb; } piVar4 = (int *)0x0; LAB_0018a1cb: local_58 = param_2; if ((piVar4 == (int *)0x0) || (*(long *)(piVar4 + 6) == 0)) { if (*(long *)(param_1 + 0x18) != 0) { iVar3 = pthread_mutex_lock((pthread_mutex_t *)(this + 0x58)); if (iVar3 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar3); } /* try { // try from 0018a2fb to 0018a302 has its CatchHandler @ 0018a38f */ lVar6 = std:: _Hashtable<VkShaderModule_T*,VkShaderModule_T*,std::allocator<VkShaderModule_T*>,std::__detail::_Identity,std::equal_to<VkShaderModule_T*>,std::hash<VkShaderModule_T*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>> ::count((_Hashtable<VkShaderModule_T*,VkShaderModule_T*,std::allocator<VkShaderModule_T*>,std::__detail::_Identity,std::equal_to<VkShaderModule_T*>,std::hash<VkShaderModule_T*>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,true,true>> *)(this + 0x80),(VkShaderModule_T **)(param_1 + 0x18)); if (lVar6 != 0) { *(char **)(param_1 + 0x20) = "main"; } pthread_mutex_unlock((pthread_mutex_t *)(this + 0x58)); return; } } else { local_68 = *(int8 *)(piVar4 + 8); pSVar7 = (ScratchAllocator *)&local_88; local_88 = *piVar4; iStack_84 = piVar4[1]; iStack_80 = piVar4[2]; iStack_7c = piVar4[3]; local_78 = piVar4[4]; iStack_74 = piVar4[5]; iStack_70 = piVar4[6]; iStack_6c = piVar4[7]; cVar2 = overrideShader(this,pSVar7,*(int8 *)(param_1 + 0x20), *(int4 *)(param_1 + 0x14),param_2); if (cVar2 != '\0') { local_38 = *(ScratchAllocator **)(param_1 + 8); local_48 = (Device *)0x0; local_50 = param_1; while (pDVar5 = local_48, local_38 != (ScratchAllocator *)0x0) { local_40 = (Device *)0x0; lVar6 = 8; do { iVar3 = *(int *)(&UNK_004e4098 + lVar6); iVar1 = *(int *)local_38; if (iVar3 == iVar1) { __n = *(ScratchAllocator **)((long)&structSizes + lVar6); pSVar7 = __n; this = (Device *)local_58; pDVar5 = (Device *)ScratchAllocator::allocBytes(local_58,(ulong)__n); local_40 = pDVar5; if (pDVar5 != (Device *)0x0) { pSVar7 = local_38; memcpy(pDVar5,local_38,(size_t)__n); this = pDVar5; } } } while ((iVar3 != iVar1) && (bVar8 = lVar6 != 0x58, lVar6 = lVar6 + 0x10, bVar8)); if (local_40 == (Device *)0x0) { pDVar5 = (Device *)0x0; break; } *(Device **)(local_40 + 8) = local_48; local_38 = *(ScratchAllocator **)(local_38 + 8); local_48 = local_40; } if (pDVar5 == (Device *)0x0) { overrideStage((VkPipelineShaderStageCreateInfo *)this,pSVar7); } else { *(Device **)(local_50 + 8) = pDVar5; *(char **)(local_50 + 0x20) = "main"; for (; *(int *)pDVar5 != 0x10; pDVar5 = *(Device **)(pDVar5 + 8)) { } *(int8 *)(pDVar5 + 0x20) = local_68; *(ulong *)(pDVar5 + 0x18) = CONCAT44(iStack_6c,iStack_70); } } } return; }
26,159
minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { for (const auto& branch : cascade) { auto enter_branch = true; if (branch.first) { enter_branch = branch.first->evaluate(context).to_bool(); } if (enter_branch) { if (!branch.second) throw std::runtime_error("IfNode.cascade.second is null"); branch.second->render(out, context); return; } } }
O3
cpp
minja::IfNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, (%rsp) movq 0x20(%rdi), %r13 movq 0x28(%rdi), %r14 cmpq %r14, %r13 je 0x5ccc6 movq %rdx, %rbx leaq 0x48(%rsp), %r15 leaq 0x8(%rsp), %r12 movq (%r13), %rsi testq %rsi, %rsi je 0x5ccb1 movq %r12, %rdi movq %rbx, %rdx callq 0x3cabe movq %r12, %rdi callq 0x3ccbc movl %eax, %ebp movq %r15, %rdi xorl %esi, %esi callq 0x3ce3c movq %r15, %rdi callq 0x49a2a movq 0x40(%rsp), %rdi testq %rdi, %rdi je 0x5cc49 callq 0x2ef66 movq 0x30(%rsp), %rdi testq %rdi, %rdi je 0x5cc58 callq 0x2ef66 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0x5cc67 callq 0x2ef66 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x5cc9d movq 0x7f320(%rip), %rax # 0xdbf98 cmpb $0x0, (%rax) je 0x5cc88 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x5cc92 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x5cc9d movq (%rdi), %rax callq *0x18(%rax) testb %bpl, %bpl jne 0x5ccb1 addq $0x20, %r13 cmpq %r14, %r13 jne 0x5cc06 jmp 0x5ccc6 movq 0x10(%r13), %rdi testq %rdi, %rdi je 0x5ccd5 movq (%rsp), %rsi movq %rbx, %rdx callq 0x5cdaa addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0x10, %edi callq 0x18350 movq %rax, %rbx leaq 0x4eaf3(%rip), %rsi # 0xab7dc movq %rax, %rdi callq 0x18260 movq 0x7f2f8(%rip), %rsi # 0xdbff0 movq 0x7f271(%rip), %rdx # 0xdbf70 movq %rbx, %rdi callq 0x18b30 movq %rax, %r14 movq %rbx, %rdi callq 0x184f0 jmp 0x5cd21 movq %rax, %r14 leaq 0x8(%rsp), %rdi callq 0x3cdb0 movq %r14, %rdi callq 0x18ba0 nop
_ZNK5minja6IfNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov [rsp+88h+var_88], rsi mov r13, [rdi+20h] mov r14, [rdi+28h] cmp r13, r14 jz loc_5CCC6 mov rbx, rdx lea r15, [rsp+88h+var_40] lea r12, [rsp+88h+var_80] loc_5CC06: mov rsi, [r13+0] test rsi, rsi jz loc_5CCB1 mov rdi, r12 mov rdx, rbx call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) mov rdi, r12; this call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void) mov ebp, eax mov rdi, r15 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rsp+88h+var_48] test rdi, rdi jz short loc_5CC49 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5CC49: mov rdi, [rsp+88h+var_58] test rdi, rdi jz short loc_5CC58 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5CC58: mov rdi, [rsp+88h+var_68] test rdi, rdi jz short loc_5CC67 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5CC67: mov rdi, [rsp+88h+var_78] test rdi, rdi jz short loc_5CC9D mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_5CC88 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_5CC92 loc_5CC88: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_5CC92: cmp eax, 1 jnz short loc_5CC9D mov rax, [rdi] call qword ptr [rax+18h] loc_5CC9D: test bpl, bpl jnz short loc_5CCB1 add r13, 20h ; ' ' cmp r13, r14 jnz loc_5CC06 jmp short loc_5CCC6 loc_5CCB1: mov rdi, [r13+10h] test rdi, rdi jz short loc_5CCD5 mov rsi, [rsp+88h+var_88] mov rdx, rbx call _ZNK5minja12TemplateNode6renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE; minja::TemplateNode::render(std::ostringstream &,std::shared_ptr<minja::Context> const&) loc_5CCC6: add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5CCD5: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aIfnodeCascadeS; "IfNode.cascade.second is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_5CD21 mov r14, rax lea rdi, [rsp+88h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_5CD21: mov rdi, r14 call __Unwind_Resume
do_render: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV qword ptr [RSP],RSI MOV R13,qword ptr [RDI + 0x20] MOV R14,qword ptr [RDI + 0x28] CMP R13,R14 JZ 0x0015ccc6 MOV RBX,RDX LEA R15,[RSP + 0x48] LEA R12,[RSP + 0x8] LAB_0015cc06: MOV RSI,qword ptr [R13] TEST RSI,RSI JZ 0x0015ccb1 MOV RDI,R12 MOV RDX,RBX CALL 0x0013cabe LAB_0015cc1e: MOV RDI,R12 CALL 0x0013ccbc LAB_0015cc26: MOV EBP,EAX MOV RDI,R15 XOR ESI,ESI CALL 0x0013ce3c MOV RDI,R15 CALL 0x00149a2a MOV RDI,qword ptr [RSP + 0x40] TEST RDI,RDI JZ 0x0015cc49 CALL 0x0012ef66 LAB_0015cc49: MOV RDI,qword ptr [RSP + 0x30] TEST RDI,RDI JZ 0x0015cc58 CALL 0x0012ef66 LAB_0015cc58: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0015cc67 CALL 0x0012ef66 LAB_0015cc67: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x0015cc9d MOV RAX,qword ptr [0x001dbf98] CMP byte ptr [RAX],0x0 JZ 0x0015cc88 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0015cc92 LAB_0015cc88: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0015cc92: CMP EAX,0x1 JNZ 0x0015cc9d MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0015cc9d: TEST BPL,BPL JNZ 0x0015ccb1 ADD R13,0x20 CMP R13,R14 JNZ 0x0015cc06 JMP 0x0015ccc6 LAB_0015ccb1: MOV RDI,qword ptr [R13 + 0x10] TEST RDI,RDI JZ 0x0015ccd5 MOV RSI,qword ptr [RSP] MOV RDX,RBX CALL 0x0015cdaa LAB_0015ccc6: ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015ccd5: MOV EDI,0x10 CALL 0x00118350 MOV RBX,RAX LAB_0015cce2: LEA RSI,[0x1ab7dc] MOV RDI,RAX CALL 0x00118260 LAB_0015ccf1: MOV RSI,qword ptr [0x001dbff0] MOV RDX,qword ptr [0x001dbf70] MOV RDI,RBX CALL 0x00118b30
/* minja::IfNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void minja::IfNode::do_render(ostringstream *param_1,shared_ptr *param_2) { int *piVar1; int8 *puVar2; char cVar3; int iVar4; runtime_error *this; int8 *puVar5; Expression local_80 [8]; long *local_78; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; data local_40 [16]; puVar5 = *(int8 **)(param_1 + 0x20); puVar2 = *(int8 **)(param_1 + 0x28); if (puVar5 != puVar2) { do { if ((shared_ptr *)*puVar5 == (shared_ptr *)0x0) { LAB_0015ccb1: if ((ostringstream *)puVar5[2] != (ostringstream *)0x0) { TemplateNode::render((ostringstream *)puVar5[2],param_2); return; } this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0015cce2 to 0015ccf0 has its CatchHandler @ 0015cd07 */ std::runtime_error::runtime_error(this,"IfNode.cascade.second is null"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001dbff0,PTR__runtime_error_001dbf70); } Expression::evaluate(local_80,(shared_ptr *)*puVar5); /* try { // try from 0015cc1e to 0015cc25 has its CatchHandler @ 0015cd14 */ cVar3 = Value::to_bool((Value *)local_80); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_40,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_40); if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_68); } if (local_78 != (long *)0x0) { if (*PTR___libc_single_threaded_001dbf98 == '\0') { LOCK(); piVar1 = (int *)((long)local_78 + 0xc); iVar4 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar4 = *(int *)((long)local_78 + 0xc); *(int *)((long)local_78 + 0xc) = iVar4 + -1; } if (iVar4 == 1) { (**(code **)(*local_78 + 0x18))(); } } if (cVar3 != '\0') goto LAB_0015ccb1; puVar5 = puVar5 + 4; } while (puVar5 != puVar2); } return; }
26,160
is_var_in_arg_scope
bluesky950520[P]quickjs/quickjs.c
static BOOL is_var_in_arg_scope(const JSVarDef *vd) { return (vd->var_name == JS_ATOM_home_object || vd->var_name == JS_ATOM_this_active_func || vd->var_name == JS_ATOM_new_target || vd->var_name == JS_ATOM_this || vd->var_name == JS_ATOM__arg_var_ || vd->var_kind == JS_VAR_FUNCTION_NAME); }
O0
c
is_var_in_arg_scope: movq %rdi, -0x8(%rsp) movq -0x8(%rsp), %rcx movb $0x1, %al cmpl $0x74, (%rcx) movb %al, -0x9(%rsp) je 0x9bc50 movq -0x8(%rsp), %rcx movb $0x1, %al cmpl $0x73, (%rcx) movb %al, -0x9(%rsp) je 0x9bc50 movq -0x8(%rsp), %rcx movb $0x1, %al cmpl $0x72, (%rcx) movb %al, -0x9(%rsp) je 0x9bc50 movq -0x8(%rsp), %rcx movb $0x1, %al cmpl $0x8, (%rcx) movb %al, -0x9(%rsp) je 0x9bc50 movq -0x8(%rsp), %rcx movb $0x1, %al cmpl $0x54, (%rcx) movb %al, -0x9(%rsp) je 0x9bc50 movq -0x8(%rsp), %rax movl 0xc(%rax), %eax shrl $0x4, %eax andl $0xf, %eax movzbl %al, %eax cmpl $0x4, %eax sete %al movb %al, -0x9(%rsp) movb -0x9(%rsp), %al andb $0x1, %al movzbl %al, %eax retq nopw (%rax,%rax)
is_var_in_arg_scope: mov [rsp+var_8], rdi mov rcx, [rsp+var_8] mov al, 1 cmp dword ptr [rcx], 74h ; 't' mov [rsp+var_9], al jz short loc_9BC50 mov rcx, [rsp+var_8] mov al, 1 cmp dword ptr [rcx], 73h ; 's' mov [rsp+var_9], al jz short loc_9BC50 mov rcx, [rsp+var_8] mov al, 1 cmp dword ptr [rcx], 72h ; 'r' mov [rsp+var_9], al jz short loc_9BC50 mov rcx, [rsp+var_8] mov al, 1 cmp dword ptr [rcx], 8 mov [rsp+var_9], al jz short loc_9BC50 mov rcx, [rsp+var_8] mov al, 1 cmp dword ptr [rcx], 54h ; 'T' mov [rsp+var_9], al jz short loc_9BC50 mov rax, [rsp+var_8] mov eax, [rax+0Ch] shr eax, 4 and eax, 0Fh movzx eax, al cmp eax, 4 setz al mov [rsp+var_9], al loc_9BC50: mov al, [rsp+var_9] and al, 1 movzx eax, al retn
_BOOL8 is_var_in_arg_scope(_DWORD *a1) { bool v2; // [rsp+1h] [rbp-9h] v2 = 1; if ( *a1 != 116 ) { v2 = 1; if ( *a1 != 115 ) { v2 = 1; if ( *a1 != 114 ) { v2 = 1; if ( *a1 != 8 ) { v2 = 1; if ( *a1 != 84 ) return ((a1[3] >> 4) & 0xF) == 4; } } } } return v2; }
is_var_in_arg_scope: MOV qword ptr [RSP + -0x8],RDI MOV RCX,qword ptr [RSP + -0x8] MOV AL,0x1 CMP dword ptr [RCX],0x74 MOV byte ptr [RSP + -0x9],AL JZ 0x0019bc50 MOV RCX,qword ptr [RSP + -0x8] MOV AL,0x1 CMP dword ptr [RCX],0x73 MOV byte ptr [RSP + -0x9],AL JZ 0x0019bc50 MOV RCX,qword ptr [RSP + -0x8] MOV AL,0x1 CMP dword ptr [RCX],0x72 MOV byte ptr [RSP + -0x9],AL JZ 0x0019bc50 MOV RCX,qword ptr [RSP + -0x8] MOV AL,0x1 CMP dword ptr [RCX],0x8 MOV byte ptr [RSP + -0x9],AL JZ 0x0019bc50 MOV RCX,qword ptr [RSP + -0x8] MOV AL,0x1 CMP dword ptr [RCX],0x54 MOV byte ptr [RSP + -0x9],AL JZ 0x0019bc50 MOV RAX,qword ptr [RSP + -0x8] MOV EAX,dword ptr [RAX + 0xc] SHR EAX,0x4 AND EAX,0xf MOVZX EAX,AL CMP EAX,0x4 SETZ AL MOV byte ptr [RSP + -0x9],AL LAB_0019bc50: MOV AL,byte ptr [RSP + -0x9] AND AL,0x1 MOVZX EAX,AL RET
bool is_var_in_arg_scope(int *param_1) { bool local_9; local_9 = true; if ((((*param_1 != 0x74) && (local_9 = true, *param_1 != 0x73)) && (local_9 = true, *param_1 != 0x72)) && ((local_9 = true, *param_1 != 8 && (local_9 = true, *param_1 != 0x54)))) { local_9 = ((uint)param_1[3] >> 4 & 0xf) == 4; } return local_9; }
26,161
is_var_in_arg_scope
bluesky950520[P]quickjs/quickjs.c
static BOOL is_var_in_arg_scope(const JSVarDef *vd) { return (vd->var_name == JS_ATOM_home_object || vd->var_name == JS_ATOM_this_active_func || vd->var_name == JS_ATOM_new_target || vd->var_name == JS_ATOM_this || vd->var_name == JS_ATOM__arg_var_ || vd->var_kind == JS_VAR_FUNCTION_NAME); }
O1
c
is_var_in_arg_scope: movl (%rdi), %ecx movl $0x1, %eax leal -0x54(%rcx), %edx cmpl $0x20, %edx ja 0x5c5a4 movabsq $0x1c0000001, %rsi # imm = 0x1C0000001 btq %rdx, %rsi jb 0x5c5a9 cmpl $0x8, %ecx jne 0x5c5aa retq movl $0xf0, %ecx andl 0xc(%rdi), %ecx xorl %eax, %eax cmpl $0x40, %ecx sete %al retq
is_var_in_arg_scope: mov ecx, [rdi] mov eax, 1 lea edx, [rcx-54h] cmp edx, 20h ; ' ' ja short loc_5C5A4 mov rsi, 1C0000001h bt rsi, rdx jb short locret_5C5A9 loc_5C5A4: cmp ecx, 8 jnz short loc_5C5AA locret_5C5A9: retn loc_5C5AA: mov ecx, 0F0h and ecx, [rdi+0Ch] xor eax, eax cmp ecx, 40h ; '@' setz al retn
_BOOL8 is_var_in_arg_scope(_DWORD *a1) { _BOOL8 result; // rax unsigned long long v2; // rdx long long v3; // rsi result = 1LL; v2 = (unsigned int)(*a1 - 84); if ( (unsigned int)v2 > 0x20 || (v3 = 0x1C0000001LL, !_bittest64(&v3, v2)) ) { if ( *a1 != 8 ) return (a1[3] & 0xF0) == 64; } return result; }
is_var_in_arg_scope: MOV ECX,dword ptr [RDI] MOV EAX,0x1 LEA EDX,[RCX + -0x54] CMP EDX,0x20 JA 0x0015c5a4 MOV RSI,0x1c0000001 BT RSI,RDX JC 0x0015c5a9 LAB_0015c5a4: CMP ECX,0x8 JNZ 0x0015c5aa LAB_0015c5a9: RET LAB_0015c5aa: MOV ECX,0xf0 AND ECX,dword ptr [RDI + 0xc] XOR EAX,EAX CMP ECX,0x40 SETZ AL RET
bool is_var_in_arg_scope(int *param_1) { uint uVar1; uVar1 = *param_1 - 0x54; if (((0x20 < uVar1) || ((0x1c0000001U >> ((ulong)uVar1 & 0x3f) & 1) == 0)) && (*param_1 != 8)) { return (param_1[3] & 0xf0U) == 0x40; } return true; }
26,162
is_var_in_arg_scope
bluesky950520[P]quickjs/quickjs.c
static BOOL is_var_in_arg_scope(const JSVarDef *vd) { return (vd->var_name == JS_ATOM_home_object || vd->var_name == JS_ATOM_this_active_func || vd->var_name == JS_ATOM_new_target || vd->var_name == JS_ATOM_this || vd->var_name == JS_ATOM__arg_var_ || vd->var_kind == JS_VAR_FUNCTION_NAME); }
O3
c
is_var_in_arg_scope: movl (%rdi), %ecx movl $0x1, %eax leal -0x54(%rcx), %edx cmpl $0x20, %edx ja 0x5f453 movabsq $0x1c0000001, %rsi # imm = 0x1C0000001 btq %rdx, %rsi jb 0x5f458 cmpl $0x8, %ecx jne 0x5f459 retq movl $0xf0, %ecx andl 0xc(%rdi), %ecx xorl %eax, %eax cmpl $0x40, %ecx sete %al retq
is_var_in_arg_scope: mov ecx, [rdi] mov eax, 1 lea edx, [rcx-54h] cmp edx, 20h ; ' ' ja short loc_5F453 mov rsi, 1C0000001h bt rsi, rdx jb short locret_5F458 loc_5F453: cmp ecx, 8 jnz short loc_5F459 locret_5F458: retn loc_5F459: mov ecx, 0F0h and ecx, [rdi+0Ch] xor eax, eax cmp ecx, 40h ; '@' setz al retn
_BOOL8 is_var_in_arg_scope(_DWORD *a1) { _BOOL8 result; // rax unsigned long long v2; // rdx long long v3; // rsi result = 1LL; v2 = (unsigned int)(*a1 - 84); if ( (unsigned int)v2 > 0x20 || (v3 = 0x1C0000001LL, !_bittest64(&v3, v2)) ) { if ( *a1 != 8 ) return (a1[3] & 0xF0) == 64; } return result; }
is_var_in_arg_scope: MOV ECX,dword ptr [RDI] MOV EAX,0x1 LEA EDX,[RCX + -0x54] CMP EDX,0x20 JA 0x0015f453 MOV RSI,0x1c0000001 BT RSI,RDX JC 0x0015f458 LAB_0015f453: CMP ECX,0x8 JNZ 0x0015f459 LAB_0015f458: RET LAB_0015f459: MOV ECX,0xf0 AND ECX,dword ptr [RDI + 0xc] XOR EAX,EAX CMP ECX,0x40 SETZ AL RET
bool is_var_in_arg_scope(int *param_1) { uint uVar1; uVar1 = *param_1 - 0x54; if (((0x20 < uVar1) || ((0x1c0000001U >> ((ulong)uVar1 & 0x3f) & 1) == 0)) && (*param_1 != 8)) { return (param_1[3] & 0xf0U) == 0x40; } return true; }
26,163
get_charset_number
eloqsql/mysys/charset.c
uint get_charset_number(const char *charset_name, uint cs_flags, myf flags) { uint id; const char *new_charset_name= flags & MY_UTF8_IS_UTF8MB3 ? "utf8mb3" : "utf8mb4"; my_pthread_once(&charsets_initialized, init_available_charsets); if ((id= get_charset_number_internal(charset_name, cs_flags))) return id; if ((charset_name= !my_strcasecmp(&my_charset_latin1, charset_name, "utf8") ? new_charset_name : NULL)) return get_charset_number_internal(charset_name, cs_flags); return 0; }
O0
c
get_charset_number: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rdx andq $0x400, %rdx # imm = 0x400 leaq 0x5e5c5(%rip), %rax # 0x8938a leaq 0x5e5b6(%rip), %rcx # 0x89382 cmpq $0x0, %rdx cmovneq %rcx, %rax movq %rax, -0x30(%rbp) leaq 0x375d65(%rip), %rdi # 0x3a0b44 leaq -0x306(%rip), %rsi # 0x2aae0 callq 0x252d0 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi callq 0x2ae80 movl %eax, -0x24(%rbp) cmpl $0x0, %eax je 0x2ae07 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x2ae6a leaq 0x25ccd2(%rip), %rax # 0x287ae0 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rsi leaq 0x25ccbc(%rip), %rdi # 0x287ae0 leaq 0x5e567(%rip), %rdx # 0x89392 callq *%rax cmpl $0x0, %eax jne 0x2ae3c movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x2ae44 xorl %eax, %eax movq %rax, -0x38(%rbp) jmp 0x2ae44 movq -0x38(%rbp), %rax movq %rax, -0x10(%rbp) cmpq $0x0, %rax je 0x2ae63 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi callq 0x2ae80 movl %eax, -0x4(%rbp) jmp 0x2ae6a movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
get_charset_number: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rdx, [rbp+var_20] and rdx, 400h lea rax, aUtf8mb4; "utf8mb4" lea rcx, aUtf8mb3; "utf8mb3" cmp rdx, 0 cmovnz rax, rcx mov [rbp+var_30], rax lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, [rbp+var_10] mov esi, [rbp+var_14] call get_charset_number_internal mov [rbp+var_24], eax cmp eax, 0 jz short loc_2AE07 mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_2AE6A loc_2AE07: lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_10] lea rdi, my_charset_latin1 lea rdx, aUtf8; "utf8" call rax cmp eax, 0 jnz short loc_2AE3C mov rax, [rbp+var_30] mov [rbp+var_38], rax jmp short loc_2AE44 loc_2AE3C: xor eax, eax mov [rbp+var_38], rax jmp short $+2 loc_2AE44: mov rax, [rbp+var_38] mov [rbp+var_10], rax cmp rax, 0 jz short loc_2AE63 mov rdi, [rbp+var_10] mov esi, [rbp+var_14] call get_charset_number_internal mov [rbp+var_4], eax jmp short loc_2AE6A loc_2AE63: mov [rbp+var_4], 0 loc_2AE6A: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long get_charset_number(long long a1, unsigned int a2, __int16 a3) { const char *v3; // rax const char *v5; // [rsp+8h] [rbp-38h] const char *v6; // [rsp+10h] [rbp-30h] unsigned int charset_number_internal; // [rsp+1Ch] [rbp-24h] v3 = "utf8mb4"; if ( (a3 & 0x400) != 0 ) v3 = "utf8mb3"; v6 = v3; pthread_once(&charsets_initialized, init_available_charsets); charset_number_internal = get_charset_number_internal(a1, a2); if ( charset_number_internal ) { return charset_number_internal; } else { if ( (*(unsigned int ( **)(void *, long long, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a1, "utf8") ) { v5 = 0LL; } else { v5 = v6; } if ( v5 ) return (unsigned int)get_charset_number_internal(v5, a2); else return 0; } }
get_charset_number: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV RDX,qword ptr [RBP + -0x20] AND RDX,0x400 LEA RAX,[0x18938a] LEA RCX,[0x189382] CMP RDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x30],RAX LEA RDI,[0x4a0b44] LEA RSI,[0x12aae0] CALL 0x001252d0 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] CALL 0x0012ae80 MOV dword ptr [RBP + -0x24],EAX CMP EAX,0x0 JZ 0x0012ae07 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x0012ae6a LAB_0012ae07: LEA RAX,[0x387ae0] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[0x387ae0] LEA RDX,[0x189392] CALL RAX CMP EAX,0x0 JNZ 0x0012ae3c MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX JMP 0x0012ae44 LAB_0012ae3c: XOR EAX,EAX MOV qword ptr [RBP + -0x38],RAX JMP 0x0012ae44 LAB_0012ae44: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x10],RAX CMP RAX,0x0 JZ 0x0012ae63 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] CALL 0x0012ae80 MOV dword ptr [RBP + -0x4],EAX JMP 0x0012ae6a LAB_0012ae63: MOV dword ptr [RBP + -0x4],0x0 LAB_0012ae6a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int get_charset_number(int8 param_1,int4 param_2,ulong param_3) { int iVar1; char *local_40; int local_c; local_40 = "utf8mb4"; if ((param_3 & 0x400) != 0) { local_40 = "utf8mb3"; } pthread_once(&charsets_initialized,init_available_charsets); local_c = get_charset_number_internal(param_1,param_2); if (local_c == 0) { iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_00387ba0 + 0x40)) (&my_charset_latin1,param_1,&DAT_00189392); if (iVar1 != 0) { local_40 = (char *)0x0; } if (local_40 == (char *)0x0) { local_c = 0; } else { local_c = get_charset_number_internal(local_40,param_2); } } return local_c; }
26,164
JS_MakeError
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_MakeError(JSContext *ctx, JSErrorEnum error_num, const char *message, BOOL add_backtrace) { JSValue obj, msg; if (error_num == JS_PLAIN_ERROR) { obj = JS_NewError(ctx); } else { obj = JS_NewObjectProtoClass(ctx, ctx->native_error_proto[error_num], JS_CLASS_ERROR); } if (JS_IsException(obj)) return JS_EXCEPTION; msg = JS_NewString(ctx, message); if (JS_IsException(msg)) msg = JS_NewString(ctx, "Invalid error message"); if (!JS_IsException(msg)) { JS_DefinePropertyValue(ctx, obj, JS_ATOM_message, msg, JS_PROP_WRITABLE | JS_PROP_CONFIGURABLE); } if (add_backtrace) build_backtrace(ctx, obj, JS_UNDEFINED, NULL, 0, 0, 0); return obj; }
O2
c
JS_MakeError: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x20, %rsp movl %ecx, %ebp movq %rdx, %r12 movq %rdi, %rbx cmpl $0x8, %esi jne 0x3ae48 movq %rbx, %rdi callq 0x1c4b7 jmp 0x3ae69 movl %esi, %eax shlq $0x4, %rax movq 0x98(%rbx,%rax), %rsi movq 0xa0(%rbx,%rax), %rdx pushq $0x3 popq %rcx movq %rbx, %rdi callq 0x1b069 movq %rax, %r14 movq %rdx, %r15 cmpl $0x6, %r15d jne 0x3ae7e pushq $0x6 popq %r15 xorl %r14d, %r14d jmp 0x3aeee movq %rbx, %rdi movq %r12, %rsi callq 0x2c8c0 movq %rdx, %r9 cmpl $0x6, %r9d jne 0x3aeaa leaq 0x4b7a9(%rip), %rsi # 0x86642 movq %rbx, %rdi callq 0x2c8c0 movq %rdx, %r9 cmpl $0x6, %r9d je 0x3aec5 movl $0x3, (%rsp) pushq $0x33 popq %rcx movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx movq %rax, %r8 callq 0x20872 testl %ebp, %ebp je 0x3aeee andl $0x0, 0x10(%rsp) andl $0x0, 0x8(%rsp) andl $0x0, (%rsp) pushq $0x3 popq %r8 movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx xorl %ecx, %ecx xorl %r9d, %r9d callq 0x285b2 movq %r14, %rax movq %r15, %rdx addq $0x20, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
JS_MakeError: push rbp push r15 push r14 push r12 push rbx sub rsp, 20h mov ebp, ecx mov r12, rdx mov rbx, rdi cmp esi, 8 jnz short loc_3AE48 mov rdi, rbx call JS_NewError jmp short loc_3AE69 loc_3AE48: mov eax, esi shl rax, 4 mov rsi, [rbx+rax+98h] mov rdx, [rbx+rax+0A0h] push 3 pop rcx mov rdi, rbx call JS_NewObjectProtoClass loc_3AE69: mov r14, rax mov r15, rdx cmp r15d, 6 jnz short loc_3AE7E push 6 pop r15 xor r14d, r14d jmp short loc_3AEEE loc_3AE7E: mov rdi, rbx mov rsi, r12 call JS_NewString_0 mov r9, rdx cmp r9d, 6 jnz short loc_3AEAA lea rsi, aInvalidErrorMe; "Invalid error message" mov rdi, rbx call JS_NewString_0 mov r9, rdx cmp r9d, 6 jz short loc_3AEC5 loc_3AEAA: mov [rsp+48h+var_48], 3 push 33h ; '3' pop rcx mov rdi, rbx mov rsi, r14 mov rdx, r15 mov r8, rax call JS_DefinePropertyValue loc_3AEC5: test ebp, ebp jz short loc_3AEEE and [rsp+48h+var_38], 0 and [rsp+48h+var_40], 0 and [rsp+48h+var_48], 0 push 3 pop r8 mov rdi, rbx mov rsi, r14 mov rdx, r15 xor ecx, ecx xor r9d, r9d call build_backtrace loc_3AEEE: mov rax, r14 mov rdx, r15 add rsp, 20h pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long JS_MakeError( long long a1, unsigned int a2, char *a3, int a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { long long v14; // rax long long v15; // rdx long long v16; // r14 long long v17; // r15 _DWORD *v18; // rax __m128 v19; // xmm4 __m128 v20; // xmm5 long long v21; // rdx long long v22; // r9 long long v23; // rdx if ( a2 == 8 ) v14 = JS_NewError(a1); else v14 = JS_NewObjectProtoClass(a1, *(_QWORD *)(a1 + 16LL * a2 + 152), *(_QWORD *)(a1 + 16LL * a2 + 160), 3u); v16 = v14; v17 = v15; if ( (_DWORD)v15 == 6 ) return 0LL; v18 = (_DWORD *)JS_NewString_0(a1, a3); v22 = v21; if ( (_DWORD)v21 != 6 || (v18 = (_DWORD *)JS_NewString_0(a1, "Invalid error message"), v22 = v23, (_DWORD)v23 != 6) ) JS_DefinePropertyValue(a1, v16, v17, 51LL, v18, v22, *(double *)a5.m128_u64, a6, a7, a8, v19, v20, a11, a12, 3); if ( a4 ) build_backtrace( a1, v16, v17, 0LL, 3LL, 0LL, a5, a6, a7, a8, *(double *)v19.m128_u64, *(double *)v20.m128_u64, a11, a12, 0, 0, 0); return v16; }
JS_MakeError: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x20 MOV EBP,ECX MOV R12,RDX MOV RBX,RDI CMP ESI,0x8 JNZ 0x0013ae48 MOV RDI,RBX CALL 0x0011c4b7 JMP 0x0013ae69 LAB_0013ae48: MOV EAX,ESI SHL RAX,0x4 MOV RSI,qword ptr [RBX + RAX*0x1 + 0x98] MOV RDX,qword ptr [RBX + RAX*0x1 + 0xa0] PUSH 0x3 POP RCX MOV RDI,RBX CALL 0x0011b069 LAB_0013ae69: MOV R14,RAX MOV R15,RDX CMP R15D,0x6 JNZ 0x0013ae7e PUSH 0x6 POP R15 XOR R14D,R14D JMP 0x0013aeee LAB_0013ae7e: MOV RDI,RBX MOV RSI,R12 CALL 0x0012c8c0 MOV R9,RDX CMP R9D,0x6 JNZ 0x0013aeaa LEA RSI,[0x186642] MOV RDI,RBX CALL 0x0012c8c0 MOV R9,RDX CMP R9D,0x6 JZ 0x0013aec5 LAB_0013aeaa: MOV dword ptr [RSP],0x3 PUSH 0x33 POP RCX MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 MOV R8,RAX CALL 0x00120872 LAB_0013aec5: TEST EBP,EBP JZ 0x0013aeee AND dword ptr [RSP + 0x10],0x0 AND dword ptr [RSP + 0x8],0x0 AND dword ptr [RSP],0x0 PUSH 0x3 POP R8 MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 XOR ECX,ECX XOR R9D,R9D CALL 0x001285b2 LAB_0013aeee: MOV RAX,R14 MOV RDX,R15 ADD RSP,0x20 POP RBX POP R12 POP R14 POP R15 POP RBP RET
int1 [16] JS_MakeError(long param_1,uint param_2,int8 param_3,int param_4) { int1 auVar1 [16]; int1 auVar2 [16]; if (param_2 == 8) { auVar1 = JS_NewError(param_1); } else { auVar1 = JS_NewObjectProtoClass (param_1,*(int8 *)(param_1 + 0x98 + (ulong)param_2 * 0x10), *(int8 *)(param_1 + 0xa0 + (ulong)param_2 * 0x10),3); } if (auVar1._8_4_ != 6) { auVar2 = JS_NewString(param_1,param_3); if ((auVar2._8_4_ != 6) || (auVar2 = JS_NewString(param_1,"Invalid error message"), auVar2._8_4_ != 6)) { JS_DefinePropertyValue(param_1,auVar1._0_8_,auVar1._8_8_,0x33,auVar2._0_8_,auVar2._8_8_,3); } if (param_4 != 0) { build_backtrace(param_1,auVar1._0_8_,auVar1._8_8_,0,3,0,0,0,0); } return auVar1; } return ZEXT816(6) << 0x40; }
26,165
LefDefParser::lefwLayerAntennaDiffSideAreaRatioPwl(int, double*, double*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/lef/lef/lefwWriter.cpp
int lefwLayerAntennaDiffSideAreaRatioPwl(int numPwls, double *diffusions, double *ratios) { int i; lefw54Num = LEFW_ANTENNADIFFSIDEAREARATIOPWL; if (!lefwFile) return LEFW_UNINITIALIZED; if (lefwState != LEFW_LAYERROUTING_START && lefwState != LEFW_LAYERROUTING) return LEFW_BAD_ORDER; // only routing or cut calls this func if (!lefwIsRouting) return LEFW_BAD_DATA; if (versionNum < 5.4) return LEFW_WRONG_VERSION; if (lefwWriteEncrypt) { encPrint(lefwFile, (char*) " ANTENNADIFFSIDEAREARATIO PWL ( "); for (i = 0; i < numPwls; i++) encPrint(lefwFile, (char*) "( %.11g %.11g ) ", *diffusions++, *ratios++); encPrint(lefwFile, (char*) ") ;\n"); } else { fprintf(lefwFile, " ANTENNADIFFSIDEAREARATIO PWL ( "); for (i = 0; i < numPwls; i++) fprintf(lefwFile, "( %.11g %.11g ) ", *diffusions++, *ratios++); fprintf(lefwFile, ") ;\n"); } lefwLines++; return LEFW_OK; }
O0
cpp
LefDefParser::lefwLayerAntennaDiffSideAreaRatioPwl(int, double*, double*): subq $0x28, %rsp movl %edi, 0x20(%rsp) movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) movl $0x6e, 0xa3b90(%rip) # 0xc4f1c leaq 0xa3ebd(%rip), %rax # 0xc5250 cmpq $0x0, (%rax) jne 0x213a6 movl $0x1, 0x24(%rsp) jmp 0x21554 leaq 0xa40f3(%rip), %rax # 0xc54a0 cmpl $0x7, (%rax) je 0x213cb leaq 0xa40e7(%rip), %rax # 0xc54a0 cmpl $0x1f, (%rax) je 0x213cb movl $0x2, 0x24(%rsp) jmp 0x21554 leaq 0xa4142(%rip), %rax # 0xc5514 cmpl $0x0, (%rax) jne 0x213e4 movl $0x3, 0x24(%rsp) jmp 0x21554 movsd 0x81854(%rip), %xmm0 # 0xa2c40 ucomisd 0xa3b1c(%rip), %xmm0 # 0xc4f10 jbe 0x21403 movl $0x5, 0x24(%rsp) jmp 0x21554 cmpl $0x0, 0xa4132(%rip) # 0xc553c je 0x214a6 leaq 0xa3e39(%rip), %rax # 0xc5250 movq (%rax), %rdi leaq 0x7204a(%rip), %rsi # 0x9346b movb $0x0, %al callq 0x8bf50 movl $0x0, 0xc(%rsp) movl 0xc(%rsp), %eax cmpl 0x20(%rsp), %eax jge 0x21489 leaq 0xa3e0f(%rip), %rax # 0xc5250 movq (%rax), %rdi movq 0x18(%rsp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, 0x18(%rsp) movsd (%rax), %xmm0 movq 0x10(%rsp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, 0x10(%rsp) movsd (%rax), %xmm1 leaq 0x71f01(%rip), %rsi # 0x93376 movb $0x2, %al callq 0x8bf50 movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) jmp 0x21430 leaq 0xa3dc0(%rip), %rax # 0xc5250 movq (%rax), %rdi leaq 0x6f003(%rip), %rsi # 0x9049d movb $0x0, %al callq 0x8bf50 jmp 0x21537 leaq 0xa3da3(%rip), %rax # 0xc5250 movq (%rax), %rdi leaq 0x71fb4(%rip), %rsi # 0x9346b movb $0x0, %al callq 0x2370 movl $0x0, 0xc(%rsp) movl 0xc(%rsp), %eax cmpl 0x20(%rsp), %eax jge 0x2151f leaq 0xa3d79(%rip), %rax # 0xc5250 movq (%rax), %rdi movq 0x18(%rsp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, 0x18(%rsp) movsd (%rax), %xmm0 movq 0x10(%rsp), %rax movq %rax, %rcx addq $0x8, %rcx movq %rcx, 0x10(%rsp) movsd (%rax), %xmm1 leaq 0x71e6b(%rip), %rsi # 0x93376 movb $0x2, %al callq 0x2370 movl 0xc(%rsp), %eax addl $0x1, %eax movl %eax, 0xc(%rsp) jmp 0x214c6 leaq 0xa3d2a(%rip), %rax # 0xc5250 movq (%rax), %rdi leaq 0x6ef6d(%rip), %rsi # 0x9049d movb $0x0, %al callq 0x2370 leaq 0xa3f5e(%rip), %rax # 0xc549c movl (%rax), %ecx addl $0x1, %ecx leaq 0xa3f52(%rip), %rax # 0xc549c movl %ecx, (%rax) movl $0x0, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nopl (%rax)
_ZN12LefDefParser36lefwLayerAntennaDiffSideAreaRatioPwlEiPdS0_: sub rsp, 28h mov [rsp+28h+var_8], edi mov [rsp+28h+var_10], rsi mov [rsp+28h+var_18], rdx mov cs:_ZN12LefDefParserL9lefw54NumE, 6Eh ; 'n'; LefDefParser::lefw54Num lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile cmp qword ptr [rax], 0 jnz short loc_213A6 mov [rsp+28h+var_4], 1 jmp loc_21554 loc_213A6: lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 7 jz short loc_213CB lea rax, _ZN12LefDefParser9lefwStateE; LefDefParser::lefwState cmp dword ptr [rax], 1Fh jz short loc_213CB mov [rsp+28h+var_4], 2 jmp loc_21554 loc_213CB: lea rax, _ZN12LefDefParser13lefwIsRoutingE; LefDefParser::lefwIsRouting cmp dword ptr [rax], 0 jnz short loc_213E4 mov [rsp+28h+var_4], 3 jmp loc_21554 loc_213E4: movsd xmm0, cs:qword_A2C40 ucomisd xmm0, cs:_ZN12LefDefParserL10versionNumE; LefDefParser::versionNum jbe short loc_21403 mov [rsp+28h+var_4], 5 jmp loc_21554 loc_21403: cmp cs:_ZN12LefDefParserL16lefwWriteEncryptE, 0; LefDefParser::lefwWriteEncrypt jz loc_214A6 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aAntennadiffsid_0; " ANTENNADIFFSIDEAREARATIO PWL ( " mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) mov [rsp+28h+var_1C], 0 loc_21430: mov eax, [rsp+28h+var_1C] cmp eax, [rsp+28h+var_8] jge short loc_21489 lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rax, [rsp+28h+var_10] mov rcx, rax add rcx, 8 mov [rsp+28h+var_10], rcx movsd xmm0, qword ptr [rax] mov rax, [rsp+28h+var_18] mov rcx, rax add rcx, 8 mov [rsp+28h+var_18], rcx movsd xmm1, qword ptr [rax] lea rsi, a11g11g_0; "( %.11g %.11g ) " mov al, 2 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) mov eax, [rsp+28h+var_1C] add eax, 1 mov [rsp+28h+var_1C], eax jmp short loc_21430 loc_21489: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aRectFFFF+1Dh; ") ;\n" mov al, 0 call _ZN12LefDefParser8encPrintEP8_IO_FILEPcz; LefDefParser::encPrint(_IO_FILE *,char *,...) jmp loc_21537 loc_214A6: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aAntennadiffsid_0; " ANTENNADIFFSIDEAREARATIO PWL ( " mov al, 0 call _fprintf mov [rsp+28h+var_1C], 0 loc_214C6: mov eax, [rsp+28h+var_1C] cmp eax, [rsp+28h+var_8] jge short loc_2151F lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] mov rax, [rsp+28h+var_10] mov rcx, rax add rcx, 8 mov [rsp+28h+var_10], rcx movsd xmm0, qword ptr [rax] mov rax, [rsp+28h+var_18] mov rcx, rax add rcx, 8 mov [rsp+28h+var_18], rcx movsd xmm1, qword ptr [rax] lea rsi, a11g11g_0; "( %.11g %.11g ) " mov al, 2 call _fprintf mov eax, [rsp+28h+var_1C] add eax, 1 mov [rsp+28h+var_1C], eax jmp short loc_214C6 loc_2151F: lea rax, _ZN12LefDefParser8lefwFileE; LefDefParser::lefwFile mov rdi, [rax] lea rsi, aRectFFFF+1Dh; ") ;\n" mov al, 0 call _fprintf loc_21537: lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9lefwLinesE; LefDefParser::lefwLines mov [rax], ecx mov [rsp+28h+var_4], 0 loc_21554: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long LefDefParser::lefwLayerAntennaDiffSideAreaRatioPwl( LefDefParser *this, double *a2, double *a3, double *a4, int a5, int a6) { int v6; // edx int v7; // ecx int v8; // r8d int v9; // r9d double *v10; // rax double v11; // xmm0_8 double *v12; // rax int i; // [rsp+Ch] [rbp-1Ch] int j; // [rsp+Ch] [rbp-1Ch] double *v16; // [rsp+10h] [rbp-18h] v16 = a3; LefDefParser::lefw54Num = 110; if ( *(_QWORD *)&LefDefParser::lefwFile ) { if ( LefDefParser::lefwState == 7 || LefDefParser::lefwState == 31 ) { if ( LefDefParser::lefwIsRouting ) { if ( *(double *)&LefDefParser::versionNum >= 5.4 ) { if ( LefDefParser::lefwWriteEncrypt ) { LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)" ANTENNADIFFSIDEAREARATIO PWL ( ", (_DWORD)a3, (_DWORD)a4, a5, a6); for ( i = 0; i < (int)this; ++i ) { ++a2; LefDefParser::encPrint( LefDefParser::lefwFile, (unsigned int)"( %.11g %.11g ) ", v6, (_DWORD)++v16, v8, v9); } LefDefParser::encPrint(LefDefParser::lefwFile, (unsigned int)") ;\n", v6, v7, v8, v9); } else { fprintf(*(_QWORD *)&LefDefParser::lefwFile, " ANTENNADIFFSIDEAREARATIO PWL ( "); for ( j = 0; j < (int)this; ++j ) { v10 = a2++; v11 = *v10; v12 = v16++; fprintf(*(_QWORD *)&LefDefParser::lefwFile, "( %.11g %.11g ) ", v11, *v12); } fprintf(*(_QWORD *)&LefDefParser::lefwFile, ") ;\n"); } ++LefDefParser::lefwLines; return 0; } else { return 5; } } else { return 3; } } else { return 2; } } else { return 1; } }
lefwLayerAntennaDiffSideAreaRatioPwl: SUB RSP,0x28 MOV dword ptr [RSP + 0x20],EDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX MOV dword ptr [0x001c4f1c],0x6e LEA RAX,[0x1c5250] CMP qword ptr [RAX],0x0 JNZ 0x001213a6 MOV dword ptr [RSP + 0x24],0x1 JMP 0x00121554 LAB_001213a6: LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x7 JZ 0x001213cb LEA RAX,[0x1c54a0] CMP dword ptr [RAX],0x1f JZ 0x001213cb MOV dword ptr [RSP + 0x24],0x2 JMP 0x00121554 LAB_001213cb: LEA RAX,[0x1c5514] CMP dword ptr [RAX],0x0 JNZ 0x001213e4 MOV dword ptr [RSP + 0x24],0x3 JMP 0x00121554 LAB_001213e4: MOVSD XMM0,qword ptr [0x001a2c40] UCOMISD XMM0,qword ptr [0x001c4f10] JBE 0x00121403 MOV dword ptr [RSP + 0x24],0x5 JMP 0x00121554 LAB_00121403: CMP dword ptr [0x001c553c],0x0 JZ 0x001214a6 LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] LEA RSI,[0x19346b] MOV AL,0x0 CALL 0x0018bf50 MOV dword ptr [RSP + 0xc],0x0 LAB_00121430: MOV EAX,dword ptr [RSP + 0xc] CMP EAX,dword ptr [RSP + 0x20] JGE 0x00121489 LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x18] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RSP + 0x18],RCX MOVSD XMM0,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x10] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RSP + 0x10],RCX MOVSD XMM1,qword ptr [RAX] LEA RSI,[0x193376] MOV AL,0x2 CALL 0x0018bf50 MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX JMP 0x00121430 LAB_00121489: LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] LEA RSI,[0x19049d] MOV AL,0x0 CALL 0x0018bf50 JMP 0x00121537 LAB_001214a6: LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] LEA RSI,[0x19346b] MOV AL,0x0 CALL 0x00102370 MOV dword ptr [RSP + 0xc],0x0 LAB_001214c6: MOV EAX,dword ptr [RSP + 0xc] CMP EAX,dword ptr [RSP + 0x20] JGE 0x0012151f LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x18] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RSP + 0x18],RCX MOVSD XMM0,qword ptr [RAX] MOV RAX,qword ptr [RSP + 0x10] MOV RCX,RAX ADD RCX,0x8 MOV qword ptr [RSP + 0x10],RCX MOVSD XMM1,qword ptr [RAX] LEA RSI,[0x193376] MOV AL,0x2 CALL 0x00102370 MOV EAX,dword ptr [RSP + 0xc] ADD EAX,0x1 MOV dword ptr [RSP + 0xc],EAX JMP 0x001214c6 LAB_0012151f: LEA RAX,[0x1c5250] MOV RDI,qword ptr [RAX] LEA RSI,[0x19049d] MOV AL,0x0 CALL 0x00102370 LAB_00121537: LEA RAX,[0x1c549c] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x1c549c] MOV dword ptr [RAX],ECX MOV dword ptr [RSP + 0x24],0x0 LAB_00121554: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
/* LefDefParser::lefwLayerAntennaDiffSideAreaRatioPwl(int, double*, double*) */ int4 LefDefParser::lefwLayerAntennaDiffSideAreaRatioPwl(int param_1,double *param_2,double *param_3) { int local_1c; double *local_18; double *local_10; int4 local_4; lefw54Num = 0x6e; if (lefwFile == (_IO_FILE *)0x0) { local_4 = 1; } else if ((lefwState == 7) || (lefwState == 0x1f)) { if (lefwIsRouting == 0) { local_4 = 3; } else if (DAT_001a2c40 <= versionNum) { if (lefwWriteEncrypt == 0) { fprintf(lefwFile," ANTENNADIFFSIDEAREARATIO PWL ( "); local_18 = param_3; local_10 = param_2; for (local_1c = 0; local_1c < param_1; local_1c = local_1c + 1) { fprintf(lefwFile,"( %.11g %.11g ) ",*local_10,*local_18); local_18 = local_18 + 1; local_10 = local_10 + 1; } fprintf(lefwFile,") ;\n"); } else { encPrint(lefwFile," ANTENNADIFFSIDEAREARATIO PWL ( "); local_18 = param_3; local_10 = param_2; for (local_1c = 0; local_1c < param_1; local_1c = local_1c + 1) { encPrint(lefwFile,"( %.11g %.11g ) ",*local_10,*local_18); local_18 = local_18 + 1; local_10 = local_10 + 1; } encPrint(lefwFile,") ;\n"); } lefwLines = lefwLines + 1; local_4 = 0; } else { local_4 = 5; } } else { local_4 = 2; } return local_4; }
26,166
create_fromuni
eloqsql/strings/ctype-simple.c
static my_bool create_fromuni(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { uni_idx idx[PLANE_NUM]; int i,n; /* Check that Unicode map is loaded. It can be not loaded when the collation is listed in Index.xml but not specified in the character set specific XML file. */ if (!cs->tab_to_uni) return TRUE; /* Clear plane statistics */ bzero(idx,sizeof(idx)); /* Count number of characters in each plane */ for (i=0; i< 0x100; i++) { uint16 wc=cs->tab_to_uni[i]; int pl= PLANE_NUMBER(wc); if (wc || !i) { if (!idx[pl].nchars) { idx[pl].uidx.from=wc; idx[pl].uidx.to=wc; }else { idx[pl].uidx.from=wc<idx[pl].uidx.from?wc:idx[pl].uidx.from; idx[pl].uidx.to=wc>idx[pl].uidx.to?wc:idx[pl].uidx.to; } idx[pl].nchars++; } } /* Sort planes in descending order */ qsort(&idx,PLANE_NUM,sizeof(uni_idx),&pcmp); for (i=0; i < PLANE_NUM; i++) { int ch,numchars; uchar *tab; /* Skip empty plane */ if (!idx[i].nchars) break; numchars=idx[i].uidx.to-idx[i].uidx.from+1; if (!(idx[i].uidx.tab= tab= (uchar*) (loader->once_alloc) (numchars * sizeof(*idx[i].uidx.tab)))) return TRUE; bzero(tab,numchars*sizeof(*tab)); for (ch=1; ch < PLANE_SIZE; ch++) { uint16 wc=cs->tab_to_uni[ch]; if (wc >= idx[i].uidx.from && wc <= idx[i].uidx.to && wc) { int ofs= wc - idx[i].uidx.from; if (!tab[ofs] || tab[ofs] > 0x7F) /* Prefer ASCII*/ { /* Some character sets can have double encoding. For example, in ARMSCII8, the following characters are encoded twice: Encoding#1 Encoding#2 Unicode Character Name ---------- ---------- ------- -------------- 0x27 0xFF U+0027 APOSTROPHE 0x28 0xA5 U+0028 LEFT PARENTHESIS 0x29 0xA4 U+0029 RIGHT PARENTHESIS 0x2C 0xAB U+002C COMMA 0x2D 0xAC U+002D HYPHEN-MINUS 0x2E 0xA9 U+002E FULL STOP That is, both 0x27 and 0xFF convert to Unicode U+0027. When converting back from Unicode to ARMSCII, we prefer the ASCII range, that is we want U+0027 to convert to 0x27 rather than to 0xFF. */ tab[ofs]= ch; } } } } /* Allocate and fill reverse table for each plane */ n=i; if (!(cs->tab_from_uni= (MY_UNI_IDX *) (loader->once_alloc)(sizeof(MY_UNI_IDX) * (n + 1)))) return TRUE; for (i=0; i< n; i++) ((struct my_uni_idx_st*)cs->tab_from_uni)[i]= idx[i].uidx; /* Set end-of-list marker */ bzero((char*) &cs->tab_from_uni[i],sizeof(MY_UNI_IDX)); return FALSE; }
O0
c
create_fromuni: pushq %rbp movq %rsp, %rbp subq $0x1850, %rsp # imm = 0x1850 movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x68(%rax) jne 0x568c7 movb $0x1, -0x1(%rbp) jmp 0x56d9a leaq -0x1820(%rbp), %rdi xorl %esi, %esi movl $0x1800, %edx # imm = 0x1800 callq 0x251a0 movl $0x0, -0x1824(%rbp) cmpl $0x100, -0x1824(%rbp) # imm = 0x100 jge 0x56ab8 movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movslq -0x1824(%rbp), %rcx movw (%rax,%rcx,2), %ax movw %ax, -0x182a(%rbp) movzwl -0x182a(%rbp), %eax sarl $0x8, %eax movl $0x100, %ecx # imm = 0x100 cltd idivl %ecx movl %edx, -0x1830(%rbp) movzwl -0x182a(%rbp), %eax cmpl $0x0, %eax jne 0x5693f cmpl $0x0, -0x1824(%rbp) jne 0x56aa2 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax cmpl $0x0, (%rax) jne 0x5699e movw -0x182a(%rbp), %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0x8(%rax) movw -0x182a(%rbp), %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0xa(%rax) jmp 0x56a86 movzwl -0x182a(%rbp), %eax movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx cmpl %ecx, %eax jge 0x569d1 movzwl -0x182a(%rbp), %eax movl %eax, -0x184c(%rbp) jmp 0x569f0 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0x8(%rax), %eax movl %eax, -0x184c(%rbp) movl -0x184c(%rbp), %eax movw %ax, %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0x8(%rax) movzwl -0x182a(%rbp), %eax movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0xa(%rcx), %ecx cmpl %ecx, %eax jle 0x56a45 movzwl -0x182a(%rbp), %eax movl %eax, -0x1850(%rbp) jmp 0x56a64 movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0xa(%rax), %eax movl %eax, -0x1850(%rbp) movl -0x1850(%rbp), %eax movw %ax, %cx movslq -0x1830(%rbp), %rdx leaq -0x1820(%rbp), %rax imulq $0x18, %rdx, %rdx addq %rdx, %rax movw %cx, 0xa(%rax) movslq -0x1830(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movl (%rax), %ecx addl $0x1, %ecx movl %ecx, (%rax) jmp 0x56aa4 movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0x568e4 leaq -0x1820(%rbp), %rdi movl $0x100, %esi # imm = 0x100 movl $0x18, %edx leaq 0x2e0(%rip), %rcx # 0x56db0 callq 0x25610 movl $0x0, -0x1824(%rbp) cmpl $0x100, -0x1824(%rbp) # imm = 0x100 jge 0x56cd1 movslq -0x1824(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax cmpl $0x0, (%rax) jne 0x56b0e jmp 0x56cd1 movslq -0x1824(%rbp), %rcx leaq -0x1820(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movzwl 0xa(%rax), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx subl %ecx, %eax addl $0x1, %eax movl %eax, -0x1838(%rbp) movq -0x18(%rbp), %rax movq 0x80(%rax), %rax movslq -0x1838(%rbp), %rdi shlq $0x0, %rdi callq *%rax movq %rax, -0x1840(%rbp) movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax jne 0x56b92 movb $0x1, -0x1(%rbp) jmp 0x56d9a movq -0x1840(%rbp), %rdi movslq -0x1838(%rbp), %rdx shlq $0x0, %rdx xorl %esi, %esi callq 0x251a0 movl $0x1, -0x1834(%rbp) cmpl $0x100, -0x1834(%rbp) # imm = 0x100 jge 0x56cbb movq -0x10(%rbp), %rax movq 0x68(%rax), %rax movslq -0x1834(%rbp), %rcx movw (%rax,%rcx,2), %ax movw %ax, -0x1842(%rbp) movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx cmpl %ecx, %eax jl 0x56ca5 movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0xa(%rcx), %ecx cmpl %ecx, %eax jg 0x56ca5 movzwl -0x1842(%rbp), %eax cmpl $0x0, %eax je 0x56ca5 movzwl -0x1842(%rbp), %eax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movzwl 0x8(%rcx), %ecx subl %ecx, %eax movl %eax, -0x1848(%rbp) movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx cmpb $0x0, (%rax,%rcx) je 0x56c8a movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx movzbl (%rax,%rcx), %eax cmpl $0x7f, %eax jle 0x56ca3 movl -0x1834(%rbp), %eax movb %al, %dl movq -0x1840(%rbp), %rax movslq -0x1848(%rbp), %rcx movb %dl, (%rax,%rcx) jmp 0x56ca5 jmp 0x56ca7 movl -0x1834(%rbp), %eax addl $0x1, %eax movl %eax, -0x1834(%rbp) jmp 0x56bb5 jmp 0x56cbd movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0x56adf movl -0x1824(%rbp), %eax movl %eax, -0x1828(%rbp) movq -0x18(%rbp), %rax movq 0x80(%rax), %rax movl -0x1828(%rbp), %ecx addl $0x1, %ecx movslq %ecx, %rdi shlq $0x4, %rdi callq *%rax movq -0x10(%rbp), %rcx movq %rax, 0x70(%rcx) cmpq $0x0, %rax jne 0x56d11 movb $0x1, -0x1(%rbp) jmp 0x56d9a movl $0x0, -0x1824(%rbp) movl -0x1824(%rbp), %eax cmpl -0x1828(%rbp), %eax jge 0x56d74 movq -0x10(%rbp), %rax movq 0x70(%rax), %rax movslq -0x1824(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movslq -0x1824(%rbp), %rdx leaq -0x1820(%rbp), %rcx imulq $0x18, %rdx, %rdx addq %rdx, %rcx movq 0x8(%rcx), %rdx movq %rdx, (%rax) movq 0x10(%rcx), %rcx movq %rcx, 0x8(%rax) movl -0x1824(%rbp), %eax addl $0x1, %eax movl %eax, -0x1824(%rbp) jmp 0x56d1b movq -0x10(%rbp), %rax movq 0x70(%rax), %rdi movslq -0x1824(%rbp), %rax shlq $0x4, %rax addq %rax, %rdi xorl %esi, %esi movl $0x10, %edx callq 0x251a0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x1850, %rsp # imm = 0x1850 popq %rbp retq nopw %cs:(%rax,%rax)
create_fromuni: push rbp mov rbp, rsp sub rsp, 1850h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] cmp qword ptr [rax+68h], 0 jnz short loc_568C7 mov [rbp+var_1], 1 jmp loc_56D9A loc_568C7: lea rdi, [rbp+var_1820] xor esi, esi mov edx, 1800h call _memset mov [rbp+var_1824], 0 loc_568E4: cmp [rbp+var_1824], 100h jge loc_56AB8 mov rax, [rbp+var_10] mov rax, [rax+68h] movsxd rcx, [rbp+var_1824] mov ax, [rax+rcx*2] mov [rbp+var_182A], ax movzx eax, [rbp+var_182A] sar eax, 8 mov ecx, 100h cdq idiv ecx mov [rbp+var_1830], edx movzx eax, [rbp+var_182A] cmp eax, 0 jnz short loc_5693F cmp [rbp+var_1824], 0 jnz loc_56AA2 loc_5693F: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx cmp dword ptr [rax], 0 jnz short loc_5699E mov cx, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+8], cx mov cx, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+0Ah], cx jmp loc_56A86 loc_5699E: movzx eax, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] cmp eax, ecx jge short loc_569D1 movzx eax, [rbp+var_182A] mov [rbp+var_184C], eax jmp short loc_569F0 loc_569D1: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+8] mov [rbp+var_184C], eax loc_569F0: mov eax, [rbp+var_184C] mov cx, ax movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+8], cx movzx eax, [rbp+var_182A] movsxd rdx, [rbp+var_1830] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+0Ah] cmp eax, ecx jle short loc_56A45 movzx eax, [rbp+var_182A] mov [rbp+var_1850], eax jmp short loc_56A64 loc_56A45: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+0Ah] mov [rbp+var_1850], eax loc_56A64: mov eax, [rbp+var_1850] mov cx, ax movsxd rdx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rdx, 18h add rax, rdx mov [rax+0Ah], cx loc_56A86: movsxd rcx, [rbp+var_1830] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx mov ecx, [rax] add ecx, 1 mov [rax], ecx loc_56AA2: jmp short $+2 loc_56AA4: mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp loc_568E4 loc_56AB8: lea rdi, [rbp+var_1820] mov esi, 100h mov edx, 18h lea rcx, pcmp call _qsort mov [rbp+var_1824], 0 loc_56ADF: cmp [rbp+var_1824], 100h jge loc_56CD1 movsxd rcx, [rbp+var_1824] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx cmp dword ptr [rax], 0 jnz short loc_56B0E jmp loc_56CD1 loc_56B0E: movsxd rcx, [rbp+var_1824] lea rax, [rbp+var_1820] imul rcx, 18h add rax, rcx movzx eax, word ptr [rax+0Ah] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] sub eax, ecx add eax, 1 mov [rbp+var_1838], eax mov rax, [rbp+var_18] mov rax, [rax+80h] movsxd rdi, [rbp+var_1838] shl rdi, 0 call rax mov [rbp+var_1840], rax movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx mov [rcx+10h], rax cmp rax, 0 jnz short loc_56B92 mov [rbp+var_1], 1 jmp loc_56D9A loc_56B92: mov rdi, [rbp+var_1840] movsxd rdx, [rbp+var_1838] shl rdx, 0 xor esi, esi call _memset mov [rbp+var_1834], 1 loc_56BB5: cmp [rbp+var_1834], 100h jge loc_56CBB mov rax, [rbp+var_10] mov rax, [rax+68h] movsxd rcx, [rbp+var_1834] mov ax, [rax+rcx*2] mov [rbp+var_1842], ax movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] cmp eax, ecx jl loc_56CA5 movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+0Ah] cmp eax, ecx jg short loc_56CA5 movzx eax, [rbp+var_1842] cmp eax, 0 jz short loc_56CA5 movzx eax, [rbp+var_1842] movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx movzx ecx, word ptr [rcx+8] sub eax, ecx mov [rbp+var_1848], eax mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] cmp byte ptr [rax+rcx], 0 jz short loc_56C8A mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] movzx eax, byte ptr [rax+rcx] cmp eax, 7Fh jle short loc_56CA3 loc_56C8A: mov eax, [rbp+var_1834] mov dl, al mov rax, [rbp+var_1840] movsxd rcx, [rbp+var_1848] mov [rax+rcx], dl loc_56CA3: jmp short $+2 loc_56CA5: jmp short $+2 loc_56CA7: mov eax, [rbp+var_1834] add eax, 1 mov [rbp+var_1834], eax jmp loc_56BB5 loc_56CBB: jmp short $+2 loc_56CBD: mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp loc_56ADF loc_56CD1: mov eax, [rbp+var_1824] mov [rbp+var_1828], eax mov rax, [rbp+var_18] mov rax, [rax+80h] mov ecx, [rbp+var_1828] add ecx, 1 movsxd rdi, ecx shl rdi, 4 call rax mov rcx, [rbp+var_10] mov [rcx+70h], rax cmp rax, 0 jnz short loc_56D11 mov [rbp+var_1], 1 jmp loc_56D9A loc_56D11: mov [rbp+var_1824], 0 loc_56D1B: mov eax, [rbp+var_1824] cmp eax, [rbp+var_1828] jge short loc_56D74 mov rax, [rbp+var_10] mov rax, [rax+70h] movsxd rcx, [rbp+var_1824] shl rcx, 4 add rax, rcx movsxd rdx, [rbp+var_1824] lea rcx, [rbp+var_1820] imul rdx, 18h add rcx, rdx mov rdx, [rcx+8] mov [rax], rdx mov rcx, [rcx+10h] mov [rax+8], rcx mov eax, [rbp+var_1824] add eax, 1 mov [rbp+var_1824], eax jmp short loc_56D1B loc_56D74: mov rax, [rbp+var_10] mov rdi, [rax+70h] movsxd rax, [rbp+var_1824] shl rax, 4 add rdi, rax xor esi, esi mov edx, 10h call _memset mov [rbp+var_1], 0 loc_56D9A: mov al, [rbp+var_1] add rsp, 1850h pop rbp retn
char create_fromuni(long long a1, long long a2) { long long v2; // rax _QWORD *v3; // rax unsigned __int16 v5; // [rsp+0h] [rbp-1850h] __int16 v6; // [rsp+4h] [rbp-184Ch] int v7; // [rsp+8h] [rbp-1848h] unsigned __int16 v8; // [rsp+Eh] [rbp-1842h] long long v9; // [rsp+10h] [rbp-1840h] int v10; // [rsp+18h] [rbp-1838h] int k; // [rsp+1Ch] [rbp-1834h] int v12; // [rsp+20h] [rbp-1830h] unsigned __int16 v13; // [rsp+26h] [rbp-182Ah] int v14; // [rsp+28h] [rbp-1828h] int i; // [rsp+2Ch] [rbp-1824h] int j; // [rsp+2Ch] [rbp-1824h] int m; // [rsp+2Ch] [rbp-1824h] _DWORD v18[1538]; // [rsp+30h] [rbp-1820h] BYREF long long v19; // [rsp+1838h] [rbp-18h] long long v20; // [rsp+1840h] [rbp-10h] v20 = a1; v19 = a2; if ( !*(_QWORD *)(a1 + 104) ) return 1; memset(v18, 0LL, 6144LL); for ( i = 0; i < 256; ++i ) { v13 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i); v12 = ((int)v13 >> 8) % 256; if ( v13 || !i ) { if ( v18[6 * v12] ) { if ( v13 >= (int)LOWORD(v18[6 * v12 + 2]) ) v6 = v18[6 * v12 + 2]; else v6 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * i); LOWORD(v18[6 * v12 + 2]) = v6; if ( v13 <= (int)HIWORD(v18[6 * v12 + 2]) ) v5 = HIWORD(v18[6 * v12 + 2]); else v5 = v13; HIWORD(v18[6 * v12 + 2]) = v5; } else { LOWORD(v18[6 * v12 + 2]) = v13; HIWORD(v18[6 * v12 + 2]) = v13; } ++v18[6 * v12]; } } qsort(v18, 256LL, 24LL, pcmp); for ( j = 0; j < 256 && v18[6 * j]; ++j ) { v10 = HIWORD(v18[6 * j + 2]) - LOWORD(v18[6 * j + 2]) + 1; v9 = (*(long long ( **)(_QWORD))(v19 + 128))(v10); *(_QWORD *)&v18[6 * j + 4] = v9; if ( !v9 ) return 1; memset(v9, 0LL, v10); for ( k = 1; k < 256; ++k ) { v8 = *(_WORD *)(*(_QWORD *)(v20 + 104) + 2LL * k); if ( v8 >= (int)LOWORD(v18[6 * j + 2]) && v8 <= (int)HIWORD(v18[6 * j + 2]) ) { if ( v8 ) { v7 = v8 - LOWORD(v18[6 * j + 2]); if ( !*(_BYTE *)(v9 + v7) || *(unsigned __int8 *)(v9 + v7) > 0x7Fu ) *(_BYTE *)(v9 + v7) = k; } } } } v14 = j; v2 = (*(long long ( **)(long long))(v19 + 128))(16LL * (j + 1)); *(_QWORD *)(v20 + 112) = v2; if ( !v2 ) return 1; for ( m = 0; m < v14; ++m ) { v3 = (_QWORD *)(16LL * m + *(_QWORD *)(v20 + 112)); *v3 = *(_QWORD *)&v18[6 * m + 2]; v3[1] = *(_QWORD *)&v18[6 * m + 4]; } memset(16LL * m + *(_QWORD *)(v20 + 112), 0LL, 16LL); return 0; }
create_fromuni: PUSH RBP MOV RBP,RSP SUB RSP,0x1850 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x68],0x0 JNZ 0x001568c7 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00156d9a LAB_001568c7: LEA RDI,[RBP + -0x1820] XOR ESI,ESI MOV EDX,0x1800 CALL 0x001251a0 MOV dword ptr [RBP + -0x1824],0x0 LAB_001568e4: CMP dword ptr [RBP + -0x1824],0x100 JGE 0x00156ab8 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOVSXD RCX,dword ptr [RBP + -0x1824] MOV AX,word ptr [RAX + RCX*0x2] MOV word ptr [RBP + -0x182a],AX MOVZX EAX,word ptr [RBP + -0x182a] SAR EAX,0x8 MOV ECX,0x100 CDQ IDIV ECX MOV dword ptr [RBP + -0x1830],EDX MOVZX EAX,word ptr [RBP + -0x182a] CMP EAX,0x0 JNZ 0x0015693f CMP dword ptr [RBP + -0x1824],0x0 JNZ 0x00156aa2 LAB_0015693f: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX CMP dword ptr [RAX],0x0 JNZ 0x0015699e MOV CX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0x8],CX MOV CX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0xa],CX JMP 0x00156a86 LAB_0015699e: MOVZX EAX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] CMP EAX,ECX JGE 0x001569d1 MOVZX EAX,word ptr [RBP + -0x182a] MOV dword ptr [RBP + -0x184c],EAX JMP 0x001569f0 LAB_001569d1: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0x8] MOV dword ptr [RBP + -0x184c],EAX LAB_001569f0: MOV EAX,dword ptr [RBP + -0x184c] MOV CX,AX MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0x8],CX MOVZX EAX,word ptr [RBP + -0x182a] MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0xa] CMP EAX,ECX JLE 0x00156a45 MOVZX EAX,word ptr [RBP + -0x182a] MOV dword ptr [RBP + -0x1850],EAX JMP 0x00156a64 LAB_00156a45: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0xa] MOV dword ptr [RBP + -0x1850],EAX LAB_00156a64: MOV EAX,dword ptr [RBP + -0x1850] MOV CX,AX MOVSXD RDX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RAX,RDX MOV word ptr [RAX + 0xa],CX LAB_00156a86: MOVSXD RCX,dword ptr [RBP + -0x1830] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV ECX,dword ptr [RAX] ADD ECX,0x1 MOV dword ptr [RAX],ECX LAB_00156aa2: JMP 0x00156aa4 LAB_00156aa4: MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x001568e4 LAB_00156ab8: LEA RDI,[RBP + -0x1820] MOV ESI,0x100 MOV EDX,0x18 LEA RCX,[0x156db0] CALL 0x00125610 MOV dword ptr [RBP + -0x1824],0x0 LAB_00156adf: CMP dword ptr [RBP + -0x1824],0x100 JGE 0x00156cd1 MOVSXD RCX,dword ptr [RBP + -0x1824] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX CMP dword ptr [RAX],0x0 JNZ 0x00156b0e JMP 0x00156cd1 LAB_00156b0e: MOVSXD RCX,dword ptr [RBP + -0x1824] LEA RAX,[RBP + -0x1820] IMUL RCX,RCX,0x18 ADD RAX,RCX MOVZX EAX,word ptr [RAX + 0xa] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] SUB EAX,ECX ADD EAX,0x1 MOV dword ptr [RBP + -0x1838],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x80] MOVSXD RDI,dword ptr [RBP + -0x1838] SHL RDI,0x0 CALL RAX MOV qword ptr [RBP + -0x1840],RAX MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JNZ 0x00156b92 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00156d9a LAB_00156b92: MOV RDI,qword ptr [RBP + -0x1840] MOVSXD RDX,dword ptr [RBP + -0x1838] SHL RDX,0x0 XOR ESI,ESI CALL 0x001251a0 MOV dword ptr [RBP + -0x1834],0x1 LAB_00156bb5: CMP dword ptr [RBP + -0x1834],0x100 JGE 0x00156cbb MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x68] MOVSXD RCX,dword ptr [RBP + -0x1834] MOV AX,word ptr [RAX + RCX*0x2] MOV word ptr [RBP + -0x1842],AX MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] CMP EAX,ECX JL 0x00156ca5 MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0xa] CMP EAX,ECX JG 0x00156ca5 MOVZX EAX,word ptr [RBP + -0x1842] CMP EAX,0x0 JZ 0x00156ca5 MOVZX EAX,word ptr [RBP + -0x1842] MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOVZX ECX,word ptr [RCX + 0x8] SUB EAX,ECX MOV dword ptr [RBP + -0x1848],EAX MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] CMP byte ptr [RAX + RCX*0x1],0x0 JZ 0x00156c8a MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] MOVZX EAX,byte ptr [RAX + RCX*0x1] CMP EAX,0x7f JLE 0x00156ca3 LAB_00156c8a: MOV EAX,dword ptr [RBP + -0x1834] MOV DL,AL MOV RAX,qword ptr [RBP + -0x1840] MOVSXD RCX,dword ptr [RBP + -0x1848] MOV byte ptr [RAX + RCX*0x1],DL LAB_00156ca3: JMP 0x00156ca5 LAB_00156ca5: JMP 0x00156ca7 LAB_00156ca7: MOV EAX,dword ptr [RBP + -0x1834] ADD EAX,0x1 MOV dword ptr [RBP + -0x1834],EAX JMP 0x00156bb5 LAB_00156cbb: JMP 0x00156cbd LAB_00156cbd: MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x00156adf LAB_00156cd1: MOV EAX,dword ptr [RBP + -0x1824] MOV dword ptr [RBP + -0x1828],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x80] MOV ECX,dword ptr [RBP + -0x1828] ADD ECX,0x1 MOVSXD RDI,ECX SHL RDI,0x4 CALL RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x70],RAX CMP RAX,0x0 JNZ 0x00156d11 MOV byte ptr [RBP + -0x1],0x1 JMP 0x00156d9a LAB_00156d11: MOV dword ptr [RBP + -0x1824],0x0 LAB_00156d1b: MOV EAX,dword ptr [RBP + -0x1824] CMP EAX,dword ptr [RBP + -0x1828] JGE 0x00156d74 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x70] MOVSXD RCX,dword ptr [RBP + -0x1824] SHL RCX,0x4 ADD RAX,RCX MOVSXD RDX,dword ptr [RBP + -0x1824] LEA RCX,[RBP + -0x1820] IMUL RDX,RDX,0x18 ADD RCX,RDX MOV RDX,qword ptr [RCX + 0x8] MOV qword ptr [RAX],RDX MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RBP + -0x1824] ADD EAX,0x1 MOV dword ptr [RBP + -0x1824],EAX JMP 0x00156d1b LAB_00156d74: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x70] MOVSXD RAX,dword ptr [RBP + -0x1824] SHL RAX,0x4 ADD RDI,RAX XOR ESI,ESI MOV EDX,0x10 CALL 0x001251a0 MOV byte ptr [RBP + -0x1],0x0 LAB_00156d9a: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x1850 POP RBP RET
int1 create_fromuni(long param_1,long param_2) { ushort uVar1; ushort uVar2; int iVar3; void *__s; long lVar4; int8 *puVar5; uint uVar6; int local_183c; int local_182c; int local_1828 [2]; ushort auStack_1820 [4]; int8 auStack_1818 [767]; long local_20; long local_18; int1 local_9; if (*(long *)(param_1 + 0x68) == 0) { local_9 = 1; } else { local_20 = param_2; local_18 = param_1; memset(local_1828,0,0x1800); for (local_182c = 0; local_182c < 0x100; local_182c = local_182c + 1) { uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_182c * 2); uVar6 = (uint)((int)(uint)uVar1 >> 8) % 0x100; if ((uVar1 != 0) || (local_182c == 0)) { if (local_1828[(long)(int)uVar6 * 6] == 0) { auStack_1820[(long)(int)uVar6 * 0xc] = uVar1; auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1; } else { uVar2 = uVar1; if (auStack_1820[(long)(int)uVar6 * 0xc] <= uVar1) { uVar2 = auStack_1820[(long)(int)uVar6 * 0xc]; } auStack_1820[(long)(int)uVar6 * 0xc] = uVar2; if (uVar1 <= auStack_1820[(long)(int)uVar6 * 0xc + 1]) { uVar1 = auStack_1820[(long)(int)uVar6 * 0xc + 1]; } auStack_1820[(long)(int)uVar6 * 0xc + 1] = uVar1; } local_1828[(long)(int)uVar6 * 6] = local_1828[(long)(int)uVar6 * 6] + 1; } } qsort(local_1828,0x100,0x18,pcmp); local_182c = 0; while ((iVar3 = local_182c, local_182c < 0x100 && (local_1828[(long)local_182c * 6] != 0))) { iVar3 = ((uint)auStack_1820[(long)local_182c * 0xc + 1] - (uint)auStack_1820[(long)local_182c * 0xc]) + 1; __s = (void *)(**(code **)(local_20 + 0x80))((long)iVar3); auStack_1818[(long)local_182c * 3] = __s; if (__s == (void *)0x0) { return 1; } memset(__s,0,(long)iVar3); for (local_183c = 1; local_183c < 0x100; local_183c = local_183c + 1) { uVar1 = *(ushort *)(*(long *)(local_18 + 0x68) + (long)local_183c * 2); if ((((auStack_1820[(long)local_182c * 0xc] <= uVar1) && (uVar1 <= auStack_1820[(long)local_182c * 0xc + 1])) && (uVar1 != 0)) && ((iVar3 = (uint)uVar1 - (uint)auStack_1820[(long)local_182c * 0xc], *(char *)((long)__s + (long)iVar3) == '\0' || (0x7f < *(byte *)((long)__s + (long)iVar3))))) { *(char *)((long)__s + (long)iVar3) = (char)local_183c; } } local_182c = local_182c + 1; } lVar4 = (**(code **)(local_20 + 0x80))((long)(local_182c + 1) << 4); *(long *)(local_18 + 0x70) = lVar4; if (lVar4 == 0) { local_9 = 1; } else { for (local_182c = 0; local_182c < iVar3; local_182c = local_182c + 1) { puVar5 = (int8 *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10); *puVar5 = *(int8 *)(auStack_1820 + (long)local_182c * 0xc); puVar5[1] = auStack_1818[(long)local_182c * 3]; } memset((void *)(*(long *)(local_18 + 0x70) + (long)local_182c * 0x10),0,0x10); local_9 = 0; } } return local_9; }
26,167
my_casedn_utf8mb4
eloqsql/strings/ctype-utf8.c
static size_t my_casedn_utf8mb4(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen) { my_wc_t wc; int srcres, dstres; const char *srcend= src + srclen; char *dstend= dst + dstlen, *dst0= dst; MY_UNICASE_INFO *uni_plane= cs->caseinfo; DBUG_ASSERT(src != dst || cs->casedn_multiply == 1); while ((src < srcend) && (srcres= my_mb_wc_utf8mb4(cs, &wc, (uchar*) src, (uchar*) srcend)) > 0) { my_tolower_utf8mb4(uni_plane, &wc); if ((dstres= my_wc_mb_utf8mb4(cs, wc, (uchar*) dst, (uchar*) dstend)) <= 0) break; src+= srcres; dst+= dstres; } return (size_t) (dst - dst0); }
O3
c
my_casedn_utf8mb4: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, -0x38(%rbp) movq %rcx, %r13 movq %rcx, -0x30(%rbp) testq %rdx, %rdx jle 0x5340a movq %rdx, %r15 movq %rsi, %r12 addq %rsi, %r15 movq -0x30(%rbp), %r13 addq %r13, -0x38(%rbp) movq 0x78(%rdi), %r14 leaq -0x40(%rbp), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x563ee testl %eax, %eax jle 0x5340a movl %eax, %ebx movq -0x40(%rbp), %rsi cmpq (%r14), %rsi ja 0x533eb movq 0x8(%r14), %rax movq %rsi, %rcx shrq $0x8, %rcx movq (%rax,%rcx,8), %rax testq %rax, %rax je 0x533eb movzbl %sil, %ecx leaq (%rcx,%rcx,2), %rcx movl 0x4(%rax,%rcx,4), %esi movq %rsi, -0x40(%rbp) movq %r13, %rdx movq -0x38(%rbp), %rcx callq 0x530dd testl %eax, %eax jle 0x5340a movl %ebx, %ecx addq %rcx, %r12 movl %eax, %eax addq %rax, %r13 cmpq %r15, %r12 jb 0x533a9 subq -0x30(%rbp), %r13 movq %r13, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casedn_utf8mb4: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_38], r8 mov r13, rcx mov [rbp+var_30], rcx test rdx, rdx jle short loc_5340A mov r15, rdx mov r12, rsi add r15, rsi mov r13, [rbp+var_30] add [rbp+var_38], r13 mov r14, [rdi+78h] loc_533A9: lea rdi, [rbp+var_40] mov rsi, r12 mov rdx, r15 call my_mb_wc_utf8mb4_quick_0 test eax, eax jle short loc_5340A mov ebx, eax mov rsi, [rbp+var_40] cmp rsi, [r14] ja short loc_533EB mov rax, [r14+8] mov rcx, rsi shr rcx, 8 mov rax, [rax+rcx*8] test rax, rax jz short loc_533EB movzx ecx, sil lea rcx, [rcx+rcx*2] mov esi, [rax+rcx*4+4] mov [rbp+var_40], rsi loc_533EB: mov rdx, r13 mov rcx, [rbp+var_38] call my_wc_mb_utf8mb4 test eax, eax jle short loc_5340A mov ecx, ebx add r12, rcx mov eax, eax add r13, rax cmp r12, r15 jb short loc_533A9 loc_5340A: sub r13, [rbp+var_30] mov rax, r13 add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * my_casedn_utf8mb4(long long a1, unsigned long long a2, long long a3, _BYTE *a4, unsigned long long a5) { _BYTE *v5; // r13 unsigned long long v6; // r12 unsigned long long v7; // r15 unsigned long long *v8; // r14 int v9; // eax unsigned int v10; // ebx unsigned long long v11; // rsi long long v12; // rax int v13; // eax unsigned long long v15; // [rsp+0h] [rbp-40h] BYREF unsigned long long v16; // [rsp+8h] [rbp-38h] _BYTE *v17; // [rsp+10h] [rbp-30h] v16 = a5; v5 = a4; v17 = a4; if ( a3 > 0 ) { v6 = a2; v7 = a2 + a3; v5 = v17; v16 += (unsigned long long)v17; v8 = *(unsigned long long **)(a1 + 120); do { v9 = my_mb_wc_utf8mb4_quick_0(&v15, v6, v7); if ( v9 <= 0 ) break; v10 = v9; v11 = v15; if ( v15 <= *v8 ) { v12 = *(_QWORD *)(v8[1] + 8 * (v15 >> 8)); if ( v12 ) { v11 = *(unsigned int *)(v12 + 12LL * (unsigned __int8)v15 + 4); v15 = v11; } } v13 = my_wc_mb_utf8mb4((long long)&v15, v11, v5, v16); if ( v13 <= 0 ) break; v6 += v10; v5 += (unsigned int)v13; } while ( v6 < v7 ); } return (_BYTE *)(v5 - v17); }
my_casedn_utf8mb4: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x38],R8 MOV R13,RCX MOV qword ptr [RBP + -0x30],RCX TEST RDX,RDX JLE 0x0015340a MOV R15,RDX MOV R12,RSI ADD R15,RSI MOV R13,qword ptr [RBP + -0x30] ADD qword ptr [RBP + -0x38],R13 MOV R14,qword ptr [RDI + 0x78] LAB_001533a9: LEA RDI,[RBP + -0x40] MOV RSI,R12 MOV RDX,R15 CALL 0x001563ee TEST EAX,EAX JLE 0x0015340a MOV EBX,EAX MOV RSI,qword ptr [RBP + -0x40] CMP RSI,qword ptr [R14] JA 0x001533eb MOV RAX,qword ptr [R14 + 0x8] MOV RCX,RSI SHR RCX,0x8 MOV RAX,qword ptr [RAX + RCX*0x8] TEST RAX,RAX JZ 0x001533eb MOVZX ECX,SIL LEA RCX,[RCX + RCX*0x2] MOV ESI,dword ptr [RAX + RCX*0x4 + 0x4] MOV qword ptr [RBP + -0x40],RSI LAB_001533eb: MOV RDX,R13 MOV RCX,qword ptr [RBP + -0x38] CALL 0x001530dd TEST EAX,EAX JLE 0x0015340a MOV ECX,EBX ADD R12,RCX MOV EAX,EAX ADD R13,RAX CMP R12,R15 JC 0x001533a9 LAB_0015340a: SUB R13,qword ptr [RBP + -0x30] MOV RAX,R13 ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casedn_utf8mb4(long param_1,ulong param_2,long param_3,long param_4,long param_5) { ulong *puVar1; long lVar2; uint uVar3; uint uVar4; ulong uVar5; ulong local_48; long local_40; long local_38; local_38 = param_4; if (0 < param_3) { uVar5 = param_3 + param_2; local_40 = param_5 + param_4; puVar1 = *(ulong **)(param_1 + 0x78); do { uVar3 = my_mb_wc_utf8mb4_quick(&local_48,param_2,uVar5); if ((int)uVar3 < 1) break; if ((local_48 <= *puVar1) && (lVar2 = *(long *)(puVar1[1] + (local_48 >> 8) * 8), lVar2 != 0)) { local_48 = (ulong)*(uint *)(lVar2 + 4 + (local_48 & 0xff) * 0xc); } uVar4 = my_wc_mb_utf8mb4(); if ((int)uVar4 < 1) break; param_2 = param_2 + uVar3; param_4 = param_4 + (ulong)uVar4; } while (param_2 < uVar5); } return param_4 - local_38; }
26,168
js_iterator_wrap_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_iterator_wrap_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); JSIteratorWrapData *it = p->u.iterator_wrap_data; if (it) { JS_FreeValueRT(rt, it->wrapped_iter); JS_FreeValueRT(rt, it->wrapped_next); js_free_rt(rt, it); } }
O0
c
js_iterator_wrap_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 0x61f7a movq 0x10(%rsp), %rdi movq (%rsp), %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x2a000 movq 0x10(%rsp), %rdi movq (%rsp), %rax movq 0x10(%rax), %rsi movq 0x18(%rax), %rdx callq 0x2a000 movq 0x10(%rsp), %rdi movq (%rsp), %rsi callq 0x27c50 addq $0x28, %rsp retq nop
js_iterator_wrap_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_61F7A 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_61F7A: add rsp, 28h retn
void js_iterator_wrap_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_iterator_wrap_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 0x00161f7a MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP] MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x0012a000 MOV RDI,qword ptr [RSP + 0x10] MOV RAX,qword ptr [RSP] MOV RSI,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RAX + 0x18] CALL 0x0012a000 MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP] CALL 0x00127c50 LAB_00161f7a: ADD RSP,0x28 RET
void js_iterator_wrap_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; }
26,169
js_iterator_wrap_finalizer
bluesky950520[P]quickjs/quickjs.c
static void js_iterator_wrap_finalizer(JSRuntime *rt, JSValue val) { JSObject *p = JS_VALUE_GET_OBJ(val); JSIteratorWrapData *it = p->u.iterator_wrap_data; if (it) { JS_FreeValueRT(rt, it->wrapped_iter); JS_FreeValueRT(rt, it->wrapped_next); js_free_rt(rt, it); } }
O2
c
js_iterator_wrap_finalizer: pushq %r14 pushq %rbx pushq %rax movq 0x30(%rsi), %rbx testq %rbx, %rbx je 0x37b51 movq %rdi, %r14 movq (%rbx), %rsi movq 0x8(%rbx), %rdx callq 0x1bbe1 movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdx movq %r14, %rdi callq 0x1bbe1 movq %r14, %rdi movq %rbx, %rsi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x1ac7b addq $0x8, %rsp popq %rbx popq %r14 retq
js_iterator_wrap_finalizer: push r14 push rbx push rax mov rbx, [rsi+30h] test rbx, rbx jz short loc_37B51 mov r14, rdi mov rsi, [rbx] mov rdx, [rbx+8] call JS_FreeValueRT mov rsi, [rbx+10h] mov rdx, [rbx+18h] mov rdi, r14 call JS_FreeValueRT mov rdi, r14 mov rsi, rbx add rsp, 8 pop rbx pop r14 jmp js_free_rt loc_37B51: add rsp, 8 pop rbx pop r14 retn
long long js_iterator_wrap_finalizer(long long a1, long long a2) { long long v2; // rbx long long result; // rax v2 = *(_QWORD *)(a2 + 48); if ( v2 ) { JS_FreeValueRT(a1, *(unsigned int **)v2, *(_QWORD *)(v2 + 8)); JS_FreeValueRT(a1, *(unsigned int **)(v2 + 16), *(_QWORD *)(v2 + 24)); return js_free_rt(a1, v2); } return result; }
js_iterator_wrap_finalizer: PUSH R14 PUSH RBX PUSH RAX MOV RBX,qword ptr [RSI + 0x30] TEST RBX,RBX JZ 0x00137b51 MOV R14,RDI MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] CALL 0x0011bbe1 MOV RSI,qword ptr [RBX + 0x10] MOV RDX,qword ptr [RBX + 0x18] MOV RDI,R14 CALL 0x0011bbe1 MOV RDI,R14 MOV RSI,RBX ADD RSP,0x8 POP RBX POP R14 JMP 0x0011ac7b LAB_00137b51: ADD RSP,0x8 POP RBX POP R14 RET
void js_iterator_wrap_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; } return; }
26,170
lf_alloc_new
eloqsql/mysys/lf_alloc-pin.c
void *lf_alloc_new(LF_PINS *pins) { LF_ALLOCATOR *allocator= (LF_ALLOCATOR *)(pins->pinbox->free_func_arg); uchar *node; for (;;) { do { node= allocator->top; lf_pin(pins, 0, node); } while (node != allocator->top && LF_BACKOFF()); if (!node) { node= (void *)my_malloc(key_memory_lf_node, allocator->element_size, MYF(MY_WME)); if (allocator->constructor) allocator->constructor(node); #ifdef MY_LF_EXTRA_DEBUG if (likely(node != 0)) my_atomic_add32(&allocator->mallocs, 1); #endif break; } if (my_atomic_casptr((void **)(char *)&allocator->top, (void *)&node, anext_node(node))) break; } lf_unpin(pins, 0); return node; }
O0
c
lf_alloc_new: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x20(%rax), %rax movq 0x30(%rax), %rax movq %rax, -0x10(%rbp) jmp 0xfe33e movq -0x10(%rbp), %rax movq 0x48(%rax), %rax movq %rax, -0x18(%rbp) jmp 0xfe34c jmp 0xfe34e movq -0x8(%rbp), %rcx movq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax xchgq %rax, (%rcx) jmp 0xfe363 movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq 0x48(%rax), %rdx xorl %eax, %eax cmpq %rdx, %rcx movb %al, -0x39(%rbp) je 0xfe387 callq 0xfe450 cmpl $0x0, %eax setne %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al testb $0x1, %al jne 0xfe33e cmpq $0x0, -0x18(%rbp) jne 0xfe3d0 leaq 0xb86c14(%rip), %rax # 0xc84fb0 movl (%rax), %edi movq -0x10(%rbp), %rax movl 0x50(%rax), %eax movl %eax, %esi movl $0x10, %edx callq 0xf5210 movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax cmpq $0x0, 0x58(%rax) je 0xfe3ce movq -0x10(%rbp), %rax movq 0x58(%rax), %rax movq -0x18(%rbp), %rdi callq *%rax jmp 0xfe41f movq -0x10(%rbp), %rcx movq -0x18(%rbp), %rax movl 0x38(%rcx), %edx movq (%rax,%rdx), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq -0x28(%rbp), %rdx lock cmpxchgq %rdx, 0x48(%rcx) movq %rax, %rcx sete %al movb %al, -0x49(%rbp) movq %rcx, -0x48(%rbp) testb $0x1, %al jne 0xfe40a movq -0x48(%rbp), %rax movq %rax, -0x18(%rbp) movb -0x49(%rbp), %al andb $0x1, %al movb %al, -0x29(%rbp) testb $0x1, -0x29(%rbp) je 0xfe41a jmp 0xfe41f jmp 0xfe33c jmp 0xfe421 jmp 0xfe423 jmp 0xfe425 movq -0x8(%rbp), %rcx movq $0x0, -0x38(%rbp) movq -0x38(%rbp), %rax xchgq %rax, (%rcx) movq -0x18(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
lf_alloc_new: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+20h] mov rax, [rax+30h] mov [rbp+var_10], rax loc_FE33C: jmp short $+2 loc_FE33E: mov rax, [rbp+var_10] mov rax, [rax+48h] mov [rbp+var_18], rax jmp short $+2 loc_FE34C: jmp short $+2 loc_FE34E: mov rcx, [rbp+var_8] mov rax, [rbp+var_18] mov [rbp+var_20], rax mov rax, [rbp+var_20] xchg rax, [rcx] jmp short $+2 loc_FE363: mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov rdx, [rax+48h] xor eax, eax cmp rcx, rdx mov [rbp+var_39], al jz short loc_FE387 call LF_BACKOFF cmp eax, 0 setnz al mov [rbp+var_39], al loc_FE387: mov al, [rbp+var_39] test al, 1 jnz short loc_FE33E cmp [rbp+var_18], 0 jnz short loc_FE3D0 lea rax, key_memory_lf_node mov edi, [rax] mov rax, [rbp+var_10] mov eax, [rax+50h] mov esi, eax mov edx, 10h call my_malloc mov [rbp+var_18], rax mov rax, [rbp+var_10] cmp qword ptr [rax+58h], 0 jz short loc_FE3CE mov rax, [rbp+var_10] mov rax, [rax+58h] mov rdi, [rbp+var_18] call rax loc_FE3CE: jmp short loc_FE41F loc_FE3D0: mov rcx, [rbp+var_10] mov rax, [rbp+var_18] mov edx, [rcx+38h] mov rax, [rax+rdx] mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rdx, [rbp+var_28] lock cmpxchg [rcx+48h], rdx mov rcx, rax setz al mov [rbp+var_49], al mov [rbp+var_48], rcx test al, 1 jnz short loc_FE40A mov rax, [rbp+var_48] mov [rbp+var_18], rax loc_FE40A: mov al, [rbp+var_49] and al, 1 mov [rbp+var_29], al test [rbp+var_29], 1 jz short loc_FE41A jmp short loc_FE41F loc_FE41A: jmp loc_FE33C loc_FE41F: jmp short $+2 loc_FE421: jmp short $+2 loc_FE423: jmp short $+2 loc_FE425: mov rcx, [rbp+var_8] mov [rbp+var_38], 0 mov rax, [rbp+var_38] xchg rax, [rcx] mov rax, [rbp+var_18] add rsp, 50h pop rbp retn
long long lf_alloc_new(long long a1) { signed long long v1; // rcx bool v3; // [rsp+7h] [rbp-49h] bool v4; // [rsp+17h] [rbp-39h] long long v5; // [rsp+38h] [rbp-18h] long long v6; // [rsp+40h] [rbp-10h] v6 = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 48LL); while ( 1 ) { do { v5 = *(_QWORD *)(v6 + 72); _InterlockedExchange64((volatile long long *)a1, v5); v4 = 0; if ( v5 != *(_QWORD *)(v6 + 72) ) v4 = (unsigned int)LF_BACKOFF() != 0; } while ( v4 ); if ( !v5 ) break; v1 = _InterlockedCompareExchange64( (volatile signed long long *)(v6 + 72), *(_QWORD *)(v5 + *(unsigned int *)(v6 + 56)), v5); v3 = v5 == v1; if ( v5 != v1 ) v5 = v1; if ( v3 ) goto LABEL_12; } v5 = my_malloc(key_memory_lf_node, (const char *)*(unsigned int *)(v6 + 80), 16); if ( *(_QWORD *)(v6 + 88) ) (*(void ( **)(long long))(v6 + 88))(v5); LABEL_12: _InterlockedExchange64((volatile long long *)a1, 0LL); return v5; }
lf_alloc_new: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x10],RAX LAB_001fe33c: JMP 0x001fe33e LAB_001fe33e: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RBP + -0x18],RAX JMP 0x001fe34c LAB_001fe34c: JMP 0x001fe34e LAB_001fe34e: MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] XCHG qword ptr [RCX],RAX JMP 0x001fe363 LAB_001fe363: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x48] XOR EAX,EAX CMP RCX,RDX MOV byte ptr [RBP + -0x39],AL JZ 0x001fe387 CALL 0x001fe450 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x39],AL LAB_001fe387: MOV AL,byte ptr [RBP + -0x39] TEST AL,0x1 JNZ 0x001fe33e CMP qword ptr [RBP + -0x18],0x0 JNZ 0x001fe3d0 LEA RAX,[0xd84fb0] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x50] MOV ESI,EAX MOV EDX,0x10 CALL 0x001f5210 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x58],0x0 JZ 0x001fe3ce MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x58] MOV RDI,qword ptr [RBP + -0x18] CALL RAX LAB_001fe3ce: JMP 0x001fe41f LAB_001fe3d0: MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x18] MOV EDX,dword ptr [RCX + 0x38] MOV RAX,qword ptr [RAX + RDX*0x1] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x28] CMPXCHG.LOCK qword ptr [RCX + 0x48],RDX MOV RCX,RAX SETZ AL MOV byte ptr [RBP + -0x49],AL MOV qword ptr [RBP + -0x48],RCX TEST AL,0x1 JNZ 0x001fe40a MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x18],RAX LAB_001fe40a: MOV AL,byte ptr [RBP + -0x49] AND AL,0x1 MOV byte ptr [RBP + -0x29],AL TEST byte ptr [RBP + -0x29],0x1 JZ 0x001fe41a JMP 0x001fe41f LAB_001fe41a: JMP 0x001fe33c LAB_001fe41f: JMP 0x001fe421 LAB_001fe421: JMP 0x001fe423 LAB_001fe423: JMP 0x001fe425 LAB_001fe425: MOV RCX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x38],0x0 MOV RAX,qword ptr [RBP + -0x38] XCHG qword ptr [RCX],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x50 POP RBP RET
long lf_alloc_new(long *param_1) { long lVar1; int iVar2; bool bVar3; long local_20; lVar1 = *(long *)(param_1[4] + 0x30); do { do { local_20 = *(long *)(lVar1 + 0x48); LOCK(); *param_1 = local_20; UNLOCK(); bVar3 = false; if (local_20 != *(long *)(lVar1 + 0x48)) { iVar2 = LF_BACKOFF(); bVar3 = iVar2 != 0; } } while (bVar3); if (local_20 == 0) { local_20 = my_malloc(key_memory_lf_node,*(int4 *)(lVar1 + 0x50),0x10); if (*(long *)(lVar1 + 0x58) != 0) { (**(code **)(lVar1 + 0x58))(local_20); } break; } LOCK(); bVar3 = local_20 == *(long *)(lVar1 + 0x48); if (bVar3) { *(long *)(lVar1 + 0x48) = *(long *)(local_20 + (ulong)*(uint *)(lVar1 + 0x38)); } UNLOCK(); } while (!bVar3); LOCK(); *param_1 = 0; UNLOCK(); return local_20; }
26,171
CLI::App::_parse_config(std::vector<CLI::ConfigItem, std::allocator<CLI::ConfigItem>> const&)
MikePodsytnik[P]TCRtrie/build_O0/_deps/cli11-src/include/CLI/impl/App_inl.hpp
CLI11_INLINE void App::_parse_config(const std::vector<ConfigItem> &args) { for(const ConfigItem &item : args) { if(!_parse_single_config(item) && allow_config_extras_ == config_extras_mode::error) throw ConfigError::Extras(item.fullname()); } }
O0
cpp
CLI::App::_parse_config(std::vector<CLI::ConfigItem, std::allocator<CLI::ConfigItem>> const&): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x68(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rdi callq 0x44290 movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rdi callq 0x442c0 movq %rax, -0x28(%rbp) leaq -0x20(%rbp), %rdi leaq -0x28(%rbp), %rsi callq 0x442f0 testb $0x1, %al jne 0x43890 jmp 0x43957 leaq -0x20(%rbp), %rdi callq 0x44330 movq -0x68(%rbp), %rdi movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rsi xorl %eax, %eax movl %eax, %edx callq 0x44350 testb $0x1, %al jne 0x43947 movq -0x68(%rbp), %rax cmpb $0x0, 0x49(%rax) jne 0x43947 movb $0x1, -0x5d(%rbp) movl $0x38, %edi callq 0x92d0 movq %rax, -0x70(%rbp) movq -0x30(%rbp), %rsi leaq -0x50(%rbp), %rdi callq 0x44db0 jmp 0x438e5 movq -0x70(%rbp), %rdi leaq -0x50(%rbp), %rsi callq 0x44d30 jmp 0x438f4 movq -0x70(%rbp), %rdi movb $0x0, -0x5d(%rbp) leaq 0x5df1d(%rip), %rsi # 0xa1820 leaq 0x15a6(%rip), %rdx # 0x44eb0 callq 0x9a30 jmp 0x43966 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) jmp 0x43934 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x58(%rbp) movl %eax, -0x5c(%rbp) leaq -0x50(%rbp), %rdi callq 0x9b90 testb $0x1, -0x5d(%rbp) jne 0x4393c jmp 0x43945 movq -0x70(%rbp), %rdi callq 0x9470 jmp 0x4395d jmp 0x43949 leaq -0x20(%rbp), %rdi callq 0x44ed0 jmp 0x4387a addq $0x70, %rsp popq %rbp retq movq -0x58(%rbp), %rdi callq 0x9a70 nopw %cs:(%rax,%rax)
_ZN3CLI3App13_parse_configERKSt6vectorINS_10ConfigItemESaIS2_EE: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_68], rax mov rax, [rbp+var_10] mov [rbp+var_18], rax mov rdi, [rbp+var_18] call _ZNKSt6vectorIN3CLI10ConfigItemESaIS1_EE5beginEv; std::vector<CLI::ConfigItem>::begin(void) mov [rbp+var_20], rax mov rdi, [rbp+var_18] call _ZNKSt6vectorIN3CLI10ConfigItemESaIS1_EE3endEv; std::vector<CLI::ConfigItem>::end(void) mov [rbp+var_28], rax loc_4387A: lea rdi, [rbp+var_20] lea rsi, [rbp+var_28] call _ZN9__gnu_cxxneIPKN3CLI10ConfigItemESt6vectorIS2_SaIS2_EEEEbRKNS_17__normal_iteratorIT_T0_EESD_; __gnu_cxx::operator!=<CLI::ConfigItem const*,std::vector<CLI::ConfigItem>>(__gnu_cxx::__normal_iterator<CLI::ConfigItem const*,std::vector<CLI::ConfigItem>> const&,__gnu_cxx::__normal_iterator<CLI::ConfigItem const*,std::vector<CLI::ConfigItem>> const&) test al, 1 jnz short loc_43890 jmp loc_43957 loc_43890: lea rdi, [rbp+var_20] call _ZNK9__gnu_cxx17__normal_iteratorIPKN3CLI10ConfigItemESt6vectorIS2_SaIS2_EEEdeEv; __gnu_cxx::__normal_iterator<CLI::ConfigItem const*,std::vector<CLI::ConfigItem>>::operator*(void) mov rdi, [rbp+var_68]; this mov [rbp+var_30], rax mov rsi, [rbp+var_30]; CLI::ConfigItem * xor eax, eax mov edx, eax; unsigned __int64 call _ZN3CLI3App20_parse_single_configERKNS_10ConfigItemEm; CLI::App::_parse_single_config(CLI::ConfigItem const&,ulong) test al, 1 jnz loc_43947 mov rax, [rbp+var_68] cmp byte ptr [rax+49h], 0 jnz loc_43947 mov [rbp+var_5D], 1 mov edi, 38h ; '8'; thrown_size call ___cxa_allocate_exception mov [rbp+var_70], rax mov rsi, [rbp+var_30] lea rdi, [rbp+var_50] call _ZNK3CLI10ConfigItem8fullnameB5cxx11Ev; CLI::ConfigItem::fullname(void) jmp short $+2 loc_438E5: mov rdi, [rbp+var_70] lea rsi, [rbp+var_50] call _ZN3CLI11ConfigError6ExtrasENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; CLI::ConfigError::Extras(std::string) jmp short $+2 loc_438F4: mov rdi, [rbp+var_70]; void * mov [rbp+var_5D], 0 lea rsi, _ZTIN3CLI11ConfigErrorE; lptinfo lea rdx, _ZN3CLI11ConfigErrorD2Ev; void (*)(void *) call ___cxa_throw jmp short loc_43966 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax jmp short loc_43934 mov rcx, rax mov eax, edx mov [rbp+var_58], rcx mov [rbp+var_5C], eax lea rdi, [rbp+var_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_43934: test [rbp+var_5D], 1 jnz short loc_4393C jmp short loc_43945 loc_4393C: mov rdi, [rbp+var_70]; void * call ___cxa_free_exception loc_43945: jmp short loc_4395D loc_43947: jmp short $+2 loc_43949: lea rdi, [rbp+var_20] call _ZN9__gnu_cxx17__normal_iteratorIPKN3CLI10ConfigItemESt6vectorIS2_SaIS2_EEEppEv; __gnu_cxx::__normal_iterator<CLI::ConfigItem const*,std::vector<CLI::ConfigItem>>::operator++(void) jmp loc_4387A loc_43957: add rsp, 70h pop rbp retn loc_4395D: mov rdi, [rbp+var_58] call __Unwind_Resume loc_43966: nop word ptr [rax+rax+00000000h]
long long CLI::App::_parse_config(CLI::App *a1, long long a2) { long long result; // rax void *exception; // [rsp+0h] [rbp-70h] _BYTE v4[32]; // [rsp+20h] [rbp-50h] BYREF CLI::ConfigItem *v5; // [rsp+40h] [rbp-30h] long long v6; // [rsp+48h] [rbp-28h] BYREF _QWORD v7[4]; // [rsp+50h] [rbp-20h] BYREF v7[3] = a1; v7[2] = a2; v7[1] = a2; v7[0] = std::vector<CLI::ConfigItem>::begin(a2); v6 = std::vector<CLI::ConfigItem>::end(a2); while ( 1 ) { result = __gnu_cxx::operator!=<CLI::ConfigItem const*,std::vector<CLI::ConfigItem>>(v7, &v6); if ( (result & 1) == 0 ) break; v5 = (CLI::ConfigItem *)__gnu_cxx::__normal_iterator<CLI::ConfigItem const*,std::vector<CLI::ConfigItem>>::operator*(v7); if ( (CLI::App::_parse_single_config(a1, v5, 0LL) & 1) == 0 && !*((_BYTE *)a1 + 73) ) { exception = __cxa_allocate_exception(0x38uLL); CLI::ConfigItem::fullname[abi:cxx11](v4, v5); CLI::ConfigError::Extras(exception, v4); __cxa_throw(exception, (struct type_info *)&`typeinfo for'CLI::ConfigError, CLI::ConfigError::~ConfigError); } __gnu_cxx::__normal_iterator<CLI::ConfigItem const*,std::vector<CLI::ConfigItem>>::operator++(v7); } return result; }
_parse_config: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x68],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x00144290 MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x18] CALL 0x001442c0 MOV qword ptr [RBP + -0x28],RAX LAB_0014387a: LEA RDI,[RBP + -0x20] LEA RSI,[RBP + -0x28] CALL 0x001442f0 TEST AL,0x1 JNZ 0x00143890 JMP 0x00143957 LAB_00143890: LEA RDI,[RBP + -0x20] CALL 0x00144330 MOV RDI,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x30],RAX MOV RSI,qword ptr [RBP + -0x30] XOR EAX,EAX MOV EDX,EAX CALL 0x00144350 TEST AL,0x1 JNZ 0x00143947 MOV RAX,qword ptr [RBP + -0x68] CMP byte ptr [RAX + 0x49],0x0 JNZ 0x00143947 MOV byte ptr [RBP + -0x5d],0x1 MOV EDI,0x38 CALL 0x001092d0 MOV qword ptr [RBP + -0x70],RAX MOV RSI,qword ptr [RBP + -0x30] LAB_001438da: LEA RDI,[RBP + -0x50] CALL 0x00144db0 JMP 0x001438e5 LAB_001438e5: MOV RDI,qword ptr [RBP + -0x70] LEA RSI,[RBP + -0x50] CALL 0x00144d30 JMP 0x001438f4 LAB_001438f4: MOV RDI,qword ptr [RBP + -0x70] MOV byte ptr [RBP + -0x5d],0x0 LEA RSI,[0x1a1820] LEA RDX,[0x144eb0] CALL 0x00109a30 LAB_00143947: JMP 0x00143949 LAB_00143949: LEA RDI,[RBP + -0x20] CALL 0x00144ed0 JMP 0x0014387a LAB_00143957: ADD RSP,0x70 POP RBP RET
/* CLI::App::_parse_config(std::vector<CLI::ConfigItem, std::allocator<CLI::ConfigItem> > const&) */ void __thiscall CLI::App::_parse_config(App *this,vector *param_1) { bool bVar1; ulong uVar2; ConfigError *pCVar3; int1 local_58 [32]; ConfigItem *local_38; int8 local_30; int8 local_28; vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>> *local_20; vector *local_18; App *local_10; local_20 = (vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>> *)param_1; local_18 = param_1; local_10 = this; local_28 = std::vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>>::begin ((vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>> *)param_1); local_30 = std::vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>>::end(local_20); while( true ) { bVar1 = __gnu_cxx::operator!=((__normal_iterator *)&local_28,(__normal_iterator *)&local_30); if (!bVar1) { return; } local_38 = (ConfigItem *) __gnu_cxx:: __normal_iterator<CLI::ConfigItem_const*,std::vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>>> ::operator*((__normal_iterator<CLI::ConfigItem_const*,std::vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>>> *)&local_28); uVar2 = _parse_single_config(this,local_38,0); if (((uVar2 & 1) == 0) && (this[0x49] == (App)0x0)) break; __gnu_cxx:: __normal_iterator<CLI::ConfigItem_const*,std::vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>>> ::operator++((__normal_iterator<CLI::ConfigItem_const*,std::vector<CLI::ConfigItem,std::allocator<CLI::ConfigItem>>> *)&local_28); } pCVar3 = (ConfigError *)__cxa_allocate_exception(0x38); /* try { // try from 001438da to 001438e2 has its CatchHandler @ 00143911 */ ConfigItem::fullname_abi_cxx11_(); /* try { // try from 001438e5 to 0014390e has its CatchHandler @ 0014391f */ ConfigError::Extras(pCVar3,local_58); /* WARNING: Subroutine does not return */ __cxa_throw(pCVar3,&ConfigError::typeinfo,ConfigError::~ConfigError); }
26,172
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const
monkey531[P]llama/common/json.hpp
const string_type& key() const { JSON_ASSERT(anchor.m_object != nullptr); switch (anchor.m_object->type()) { // use integer array index as key case value_t::array: { if (array_index != array_index_last) { int_to_string( array_index_str, array_index ); array_index_last = array_index; } return array_index_str; } // use key from the object case value_t::object: return anchor.key(); // use an empty key for all primitive types case value_t::null: case value_t::string: case value_t::boolean: case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: case value_t::binary: case value_t::discarded: default: return empty_str; } }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>>::key() const: pushq %rbx movq (%rdi), %rax testq %rax, %rax je 0x7aa70 movq %rdi, %rbx movzbl (%rax), %eax cmpl $0x1, %eax je 0x7aa5e cmpl $0x2, %eax jne 0x7aa67 movq 0x20(%rbx), %rsi cmpq 0x28(%rbx), %rsi je 0x7aa58 leaq 0x30(%rbx), %rdi callq 0x4967b movq 0x20(%rbx), %rax movq %rax, 0x28(%rbx) addq $0x30, %rbx jmp 0x7aa6b movq %rbx, %rdi popq %rbx jmp 0x7aa92 addq $0x50, %rbx movq %rbx, %rax popq %rbx retq leaq 0x1e9fe(%rip), %rdi # 0x99475 leaq 0x1a34c(%rip), %rdx # 0x94dca leaq 0x1f461(%rip), %rcx # 0x99ee6 movl $0x1491, %esi # imm = 0x1491 xorl %eax, %eax callq 0x21b30 nop
_ZNK8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3keyEv: push rbx mov rax, [rdi] test rax, rax jz short loc_7AA70 mov rbx, rdi movzx eax, byte ptr [rax] cmp eax, 1 jz short loc_7AA5E cmp eax, 2 jnz short loc_7AA67 mov rsi, [rbx+20h] cmp rsi, [rbx+28h] jz short loc_7AA58 lea rdi, [rbx+30h] call _ZN8nlohmann16json_abi_v3_11_36detail13int_to_stringINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvRT_m; nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>(std::string &,ulong) mov rax, [rbx+20h] mov [rbx+28h], rax loc_7AA58: add rbx, 30h ; '0' jmp short loc_7AA6B loc_7AA5E: mov rdi, rbx pop rbx jmp _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv; nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::key(void) loc_7AA67: add rbx, 50h ; 'P' loc_7AA6B: mov rax, rbx pop rbx retn loc_7AA70: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN; "anchor.m_object != nullptr" mov esi, 1491h xor eax, eax call _ggml_abort nop
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::key( unsigned __int8 **a1) { int v1; // eax long long v2; // rsi if ( *a1 ) { v1 = **a1; if ( v1 == 1 ) { return nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key(a1); } else { if ( v1 != 2 ) return (long long)(a1 + 10); v2 = (long long)a1[4]; if ( (unsigned __int8 *)v2 != a1[5] ) { nlohmann::json_abi_v3_11_3::detail::int_to_string<std::string>((long long)(a1 + 6), v2); a1[5] = a1[4]; } return (long long)(a1 + 6); } } else { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 5265LL, "GGML_ASSERT(%s) failed", "anchor.m_object != nullptr"); return ((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::key)(); } }
key: PUSH RBX MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x0017aa70 MOV RBX,RDI MOVZX EAX,byte ptr [RAX] CMP EAX,0x1 JZ 0x0017aa5e CMP EAX,0x2 JNZ 0x0017aa67 MOV RSI,qword ptr [RBX + 0x20] CMP RSI,qword ptr [RBX + 0x28] JZ 0x0017aa58 LEA RDI,[RBX + 0x30] CALL 0x0014967b MOV RAX,qword ptr [RBX + 0x20] MOV qword ptr [RBX + 0x28],RAX LAB_0017aa58: ADD RBX,0x30 JMP 0x0017aa6b LAB_0017aa5e: MOV RDI,RBX POP RBX JMP 0x0017aa92 LAB_0017aa67: ADD RBX,0x50 LAB_0017aa6b: MOV RAX,RBX POP RBX RET LAB_0017aa70: LEA RDI,[0x199475] LEA RDX,[0x194dca] LEA RCX,[0x199ee6] MOV ESI,0x1491 XOR EAX,EAX CALL 0x00121b30
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > >::key() const */ iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> * __thiscall nlohmann::json_abi_v3_11_3::detail:: iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> ::key(iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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) { char cVar1; iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *piVar2; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1491, "GGML_ASSERT(%s) failed","anchor.m_object != nullptr"); } cVar1 = **(char **)this; if (cVar1 != '\x01') { if (cVar1 == '\x02') { if (*(ulong *)(this + 0x20) != *(ulong *)(this + 0x28)) { int_to_string<std::__cxx11::string>((string *)(this + 0x30),*(ulong *)(this + 0x20)); *(int8 *)(this + 0x28) = *(int8 *)(this + 0x20); } piVar2 = this + 0x30; } else { piVar2 = this + 0x50; } return piVar2; } piVar2 = (iteration_proxy_value<nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>> *)iter_impl<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>> ::key((iter_impl<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); return piVar2; }
26,173
GLOBAL__sub_I_crc32c.cc
eloqsql/mysys/crc32/crc32c.cc
static uint32_t cpuid_ecx() { #ifdef __GNUC__ uint32_t reax= 0, rebx= 0, recx= 0, redx= 0; __cpuid(1, reax, rebx, recx, redx); return recx; #elif defined _MSC_VER int regs[4]; __cpuid(regs, 1); return regs[2]; #else # error "unknown compiler" #endif }
O3
cpp
GLOBAL__sub_I_crc32c.cc: movl $0x1, %eax xchgq %rbx, %rsi cpuid xchgq %rbx, %rsi movl $0x100002, %edx # imm = 0x100002 andl %edx, %ecx cmpl $0x100000, %ecx # imm = 0x100000 leaq 0x79c5d(%rip), %rsi # 0xa9cd7 leaq 0x79d37(%rip), %rax # 0xa9db8 cmoveq %rsi, %rax cmpl %edx, %ecx jne 0x30095 pushq %rbp movq %rsp, %rbp leaq 0x79f6c(%rip), %rax # 0xaa000 popq %rbp movq %rax, 0xbd8a34(%rip) # 0xc08ad0 retq nopl (%rax)
_GLOBAL__sub_I_crc32c_cc: mov eax, 1 xchg rsi, rbx cpuid xchg rsi, rbx mov edx, 100002h and ecx, edx cmp ecx, offset xmmword_100000 lea rsi, _ZN15mysys_namespace6crc32cL12crc32c_sse42EjPKcm; mysys_namespace::crc32c::crc32c_sse42(uint,char const*,ulong) lea rax, _ZN15mysys_namespace6crc32cL11crc32c_slowEjPKcm; mysys_namespace::crc32c::crc32c_slow(uint,char const*,ulong) cmovz rax, rsi cmp ecx, edx jnz short loc_30095 push rbp mov rbp, rsp lea rax, crc32c_3way pop rbp loc_30095: mov cs:_ZN15mysys_namespace6crc32cL12ChosenExtendE, rax; mysys_namespace::crc32c::ChosenExtend retn
long long ( *GLOBAL__sub_I_crc32c_cc())() { int v5; // ecx long long ( *result)(); // rax _RAX = 1LL; __asm { cpuid } v5 = _RCX & 0x100002; result = (long long ( *)())mysys_namespace::crc32c::crc32c_slow; if ( v5 == (_DWORD)&xmmword_100000 ) result = (long long ( *)())mysys_namespace::crc32c::crc32c_sse42; if ( v5 == 1048578 ) result = crc32c_3way; mysys_namespace::crc32c::ChosenExtend = (long long)result; return result; }
_GLOBAL__sub_I_crc32c.cc: MOV EAX,0x1 XCHG RBX,RSI CPUID XCHG RBX,RSI MOV EDX,0x100002 AND ECX,EDX CMP ECX,0x100000 LEA RSI,[0x1a9cd7] LEA RAX,[0x1a9db8] CMOVZ RAX,RSI CMP ECX,EDX JNZ 0x00130095 PUSH RBP MOV RBP,RSP LEA RAX,[0x1aa000] POP RBP LAB_00130095: MOV qword ptr [0x00d08ad0],RAX RET
/* WARNING: Removing unreachable block (ram,0x00130061) */ void _GLOBAL__sub_I_crc32c_cc(void) { long lVar1; uint uVar2; lVar1 = cpuid_Version_info(1); uVar2 = *(uint *)(lVar1 + 0xc) & 0x100002; mysys_namespace::crc32c::ChosenExtend = mysys_namespace::crc32c::crc32c_slow; if (uVar2 == 0x100000) { mysys_namespace::crc32c::ChosenExtend = mysys_namespace::crc32c::crc32c_sse42; } if (uVar2 == 0x100002) { mysys_namespace::crc32c::ChosenExtend = crc32c_3way; } return; }
26,174
my_once_alloc
eloqsql/mysys/my_once.c
void* my_once_alloc(size_t Size, myf MyFlags) { size_t get_size, max_left; uchar* point; reg1 USED_MEM *next; reg2 USED_MEM **prev; Size= ALIGN_SIZE(Size); prev= &my_once_root_block; max_left=0; for (next=my_once_root_block ; next && next->left < Size ; next= next->next) { if (next->left > max_left) max_left=next->left; prev= &next->next; } if (! next) { /* Time to alloc new block */ get_size= Size+ALIGN_SIZE(sizeof(USED_MEM)); if (max_left*4 < my_once_extra && get_size < my_once_extra) get_size=my_once_extra; /* Normal alloc */ if ((next = (USED_MEM*) malloc(get_size)) == 0) { my_errno=errno; if (MyFlags & (MY_FAE+MY_WME)) my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATAL), get_size); return((uchar*) 0); } DBUG_PRINT("test",("my_once_malloc %lu byte malloced", (ulong) get_size)); next->next= 0; next->size= get_size; next->left= get_size-ALIGN_SIZE(sizeof(USED_MEM)); *prev=next; } point= (uchar*) ((char*) next+ (next->size-next->left)); next->left-= Size; if (MyFlags & MY_ZEROFILL) bzero(point, Size); return((void*) point); }
O0
c
my_once_alloc: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rax addq $0x8, %rax subq $0x1, %rax andq $-0x8, %rax movq %rax, -0x10(%rbp) leaq 0x3638e5(%rip), %rax # 0x38e400 movq %rax, -0x40(%rbp) movq $0x0, -0x28(%rbp) leaq 0x3638d2(%rip), %rax # 0x38e400 movq (%rax), %rax movq %rax, -0x38(%rbp) xorl %eax, %eax cmpq $0x0, -0x38(%rbp) movb %al, -0x41(%rbp) je 0x2ab53 movq -0x38(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x10(%rbp), %rax setb %al movb %al, -0x41(%rbp) movb -0x41(%rbp), %al testb $0x1, %al jne 0x2ab5c jmp 0x2ab8b movq -0x38(%rbp), %rax movq 0x8(%rax), %rax cmpq -0x28(%rbp), %rax jbe 0x2ab76 movq -0x38(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x28(%rbp) movq -0x38(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x38(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0x2ab35 cmpq $0x0, -0x38(%rbp) jne 0x2ac64 movq -0x10(%rbp), %rax addq $0x18, %rax movq %rax, -0x20(%rbp) movq -0x28(%rbp), %rax shlq $0x2, %rax leaq 0x1aba5f(%rip), %rcx # 0x1d6610 movl (%rcx), %ecx cmpq %rcx, %rax jae 0x2abd7 movq -0x20(%rbp), %rax leaq 0x1aba4d(%rip), %rcx # 0x1d6610 movl (%rcx), %ecx cmpq %rcx, %rax jae 0x2abd7 leaq 0x1aba3f(%rip), %rax # 0x1d6610 movl (%rax), %eax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rdi callq 0x243e0 movq %rax, -0x38(%rbp) cmpq $0x0, %rax jne 0x2ac2e callq 0x24040 movl (%rax), %eax movl %eax, -0x48(%rbp) callq 0x2b0d0 movl -0x48(%rbp), %ecx movl %ecx, (%rax) movq -0x18(%rbp), %rax andq $0x18, %rax cmpq $0x0, %rax je 0x2ac21 movq -0x20(%rbp), %rdx movl $0x5, %edi movl $0x1004, %esi # imm = 0x1004 movb $0x0, %al callq 0x36660 movq $0x0, -0x8(%rbp) jmp 0x2acb7 jmp 0x2ac30 jmp 0x2ac32 movq -0x38(%rbp), %rax movq $0x0, (%rax) movq -0x20(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rcx subq $0x18, %rcx movq -0x38(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x38(%rbp), %rcx movq -0x40(%rbp), %rax movq %rcx, (%rax) movq -0x38(%rbp), %rax movq -0x38(%rbp), %rcx movq 0x10(%rcx), %rcx movq -0x38(%rbp), %rdx subq 0x8(%rdx), %rcx addq %rcx, %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rdx movq -0x38(%rbp), %rax movq 0x8(%rax), %rcx subq %rdx, %rcx movq %rcx, 0x8(%rax) movq -0x18(%rbp), %rax andq $0x20, %rax cmpq $0x0, %rax je 0x2acaf movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rdx xorl %esi, %esi callq 0x24180 movq -0x30(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_once_alloc: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_10] add rax, 8 sub rax, 1 and rax, 0FFFFFFFFFFFFFFF8h mov [rbp+var_10], rax lea rax, my_once_root_block mov [rbp+var_40], rax mov [rbp+var_28], 0 lea rax, my_once_root_block mov rax, [rax] mov [rbp+var_38], rax loc_2AB35: xor eax, eax cmp [rbp+var_38], 0 mov [rbp+var_41], al jz short loc_2AB53 mov rax, [rbp+var_38] mov rax, [rax+8] cmp rax, [rbp+var_10] setb al mov [rbp+var_41], al loc_2AB53: mov al, [rbp+var_41] test al, 1 jnz short loc_2AB5C jmp short loc_2AB8B loc_2AB5C: mov rax, [rbp+var_38] mov rax, [rax+8] cmp rax, [rbp+var_28] jbe short loc_2AB76 mov rax, [rbp+var_38] mov rax, [rax+8] mov [rbp+var_28], rax loc_2AB76: mov rax, [rbp+var_38] mov [rbp+var_40], rax mov rax, [rbp+var_38] mov rax, [rax] mov [rbp+var_38], rax jmp short loc_2AB35 loc_2AB8B: cmp [rbp+var_38], 0 jnz loc_2AC64 mov rax, [rbp+var_10] add rax, 18h mov [rbp+var_20], rax mov rax, [rbp+var_28] shl rax, 2 lea rcx, my_once_extra mov ecx, [rcx] cmp rax, rcx jnb short loc_2ABD7 mov rax, [rbp+var_20] lea rcx, my_once_extra mov ecx, [rcx] cmp rax, rcx jnb short loc_2ABD7 lea rax, my_once_extra mov eax, [rax] mov [rbp+var_20], rax loc_2ABD7: mov rdi, [rbp+var_20] call _malloc mov [rbp+var_38], rax cmp rax, 0 jnz short loc_2AC2E call ___errno_location mov eax, [rax] mov [rbp+var_48], eax call _my_thread_var mov ecx, [rbp+var_48] mov [rax], ecx mov rax, [rbp+var_18] and rax, 18h cmp rax, 0 jz short loc_2AC21 mov rdx, [rbp+var_20] mov edi, 5 mov esi, 1004h mov al, 0 call my_error loc_2AC21: mov [rbp+var_8], 0 jmp loc_2ACB7 loc_2AC2E: jmp short $+2 loc_2AC30: jmp short $+2 loc_2AC32: mov rax, [rbp+var_38] mov qword ptr [rax], 0 mov rcx, [rbp+var_20] mov rax, [rbp+var_38] mov [rax+10h], rcx mov rcx, [rbp+var_20] sub rcx, 18h mov rax, [rbp+var_38] mov [rax+8], rcx mov rcx, [rbp+var_38] mov rax, [rbp+var_40] mov [rax], rcx loc_2AC64: mov rax, [rbp+var_38] mov rcx, [rbp+var_38] mov rcx, [rcx+10h] mov rdx, [rbp+var_38] sub rcx, [rdx+8] add rax, rcx mov [rbp+var_30], rax mov rdx, [rbp+var_10] mov rax, [rbp+var_38] mov rcx, [rax+8] sub rcx, rdx mov [rax+8], rcx mov rax, [rbp+var_18] and rax, 20h cmp rax, 0 jz short loc_2ACAF mov rdi, [rbp+var_30] mov rdx, [rbp+var_10] xor esi, esi call _memset loc_2ACAF: mov rax, [rbp+var_30] mov [rbp+var_8], rax loc_2ACB7: mov rax, [rbp+var_8] add rsp, 50h pop rbp retn
char * my_once_alloc(long long a1, char a2) { int v2; // r8d int v3; // r9d int v5; // [rsp+8h] [rbp-48h] bool v6; // [rsp+Fh] [rbp-41h] _QWORD *v7; // [rsp+10h] [rbp-40h] _QWORD *i; // [rsp+18h] [rbp-38h] char *v9; // [rsp+20h] [rbp-30h] unsigned long long v10; // [rsp+28h] [rbp-28h] unsigned long long v11; // [rsp+30h] [rbp-20h] unsigned long long v12; // [rsp+40h] [rbp-10h] v12 = (a1 + 7) & 0xFFFFFFFFFFFFFFF8LL; v7 = &my_once_root_block; v10 = 0LL; for ( i = (_QWORD *)my_once_root_block; ; i = (_QWORD *)*i ) { v6 = 0; if ( i ) v6 = i[1] < v12; if ( !v6 ) break; if ( i[1] > v10 ) v10 = i[1]; v7 = i; } if ( !i ) { v11 = v12 + 24; if ( 4 * v10 < my_once_extra && v11 < my_once_extra ) v11 = my_once_extra; i = (_QWORD *)malloc(v11); if ( !i ) { v5 = *(_DWORD *)__errno_location(); *(_DWORD *)my_thread_var() = v5; if ( (a2 & 0x18) != 0 ) my_error(5, 4100, v11, v5, v2, v3); return 0LL; } *i = 0LL; i[2] = v11; i[1] = v11 - 24; *v7 = i; } v9 = (char *)i + i[2] - i[1]; i[1] -= v12; if ( (a2 & 0x20) != 0 ) memset(v9, 0LL, v12); return v9; }
my_once_alloc: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x8 SUB RAX,0x1 AND RAX,-0x8 MOV qword ptr [RBP + -0x10],RAX LEA RAX,[0x48e400] MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x28],0x0 LEA RAX,[0x48e400] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX LAB_0012ab35: XOR EAX,EAX CMP qword ptr [RBP + -0x38],0x0 MOV byte ptr [RBP + -0x41],AL JZ 0x0012ab53 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x10] SETC AL MOV byte ptr [RBP + -0x41],AL LAB_0012ab53: MOV AL,byte ptr [RBP + -0x41] TEST AL,0x1 JNZ 0x0012ab5c JMP 0x0012ab8b LAB_0012ab5c: MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] CMP RAX,qword ptr [RBP + -0x28] JBE 0x0012ab76 MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x28],RAX LAB_0012ab76: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX JMP 0x0012ab35 LAB_0012ab8b: CMP qword ptr [RBP + -0x38],0x0 JNZ 0x0012ac64 MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x18 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x28] SHL RAX,0x2 LEA RCX,[0x2d6610] MOV ECX,dword ptr [RCX] CMP RAX,RCX JNC 0x0012abd7 MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x2d6610] MOV ECX,dword ptr [RCX] CMP RAX,RCX JNC 0x0012abd7 LEA RAX,[0x2d6610] MOV EAX,dword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX LAB_0012abd7: MOV RDI,qword ptr [RBP + -0x20] CALL 0x001243e0 MOV qword ptr [RBP + -0x38],RAX CMP RAX,0x0 JNZ 0x0012ac2e CALL 0x00124040 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x48],EAX CALL 0x0012b0d0 MOV ECX,dword ptr [RBP + -0x48] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x18 CMP RAX,0x0 JZ 0x0012ac21 MOV RDX,qword ptr [RBP + -0x20] MOV EDI,0x5 MOV ESI,0x1004 MOV AL,0x0 CALL 0x00136660 LAB_0012ac21: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0012acb7 LAB_0012ac2e: JMP 0x0012ac30 LAB_0012ac30: JMP 0x0012ac32 LAB_0012ac32: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],0x0 MOV RCX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x10],RCX MOV RCX,qword ptr [RBP + -0x20] SUB RCX,0x18 MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x8],RCX MOV RCX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],RCX LAB_0012ac64: MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RCX + 0x10] MOV RDX,qword ptr [RBP + -0x38] SUB RCX,qword ptr [RDX + 0x8] ADD RAX,RCX MOV qword ptr [RBP + -0x30],RAX MOV RDX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x8] SUB RCX,RDX MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x18] AND RAX,0x20 CMP RAX,0x0 JZ 0x0012acaf MOV RDI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x10] XOR ESI,ESI CALL 0x00124180 LAB_0012acaf: MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x8],RAX LAB_0012acb7: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x50 POP RBP RET
void * my_once_alloc(long param_1,ulong param_2) { int iVar1; ulong __n; int *piVar2; void *__s; bool bVar3; int8 *local_48; int8 *local_40; ulong local_30; size_t local_28; __n = param_1 + 7U & 0xfffffffffffffff8; local_48 = &my_once_root_block; local_30 = 0; local_40 = my_once_root_block; while( true ) { bVar3 = false; if (local_40 != (int8 *)0x0) { bVar3 = (ulong)local_40[1] < __n; } if (!bVar3) break; if (local_30 < (ulong)local_40[1]) { local_30 = local_40[1]; } local_48 = local_40; local_40 = (int8 *)*local_40; } if (local_40 == (int8 *)0x0) { local_28 = __n + 0x18; if ((local_30 << 2 < (ulong)my_once_extra) && (local_28 < my_once_extra)) { local_28 = (size_t)my_once_extra; } local_40 = (int8 *)malloc(local_28); if (local_40 == (int8 *)0x0) { piVar2 = __errno_location(); iVar1 = *piVar2; piVar2 = (int *)_my_thread_var(); *piVar2 = iVar1; if ((param_2 & 0x18) != 0) { my_error(5,0x1004,local_28); } return (void *)0x0; } *local_40 = 0; local_40[2] = local_28; local_40[1] = local_28 - 0x18; *local_48 = local_40; } __s = (void *)((long)local_40 + (local_40[2] - local_40[1])); local_40[1] = local_40[1] - __n; if ((param_2 & 0x20) != 0) { memset(__s,0,__n); } return __s; }
26,175
get_defaults_options
eloqsql/mysys/my_default.c
int get_defaults_options(char **argv) { static char file_buffer[FN_REFLEN]; static char extra_file_buffer[FN_REFLEN]; char **orig_argv= argv; argv++; /* Skip program name */ my_defaults_file= my_defaults_group_suffix= my_defaults_extra_file= 0; my_no_defaults= my_print_defaults= FALSE; if (*argv && !strcmp(*argv, "--no-defaults")) { my_no_defaults= 1; argv++; } else for(; *argv; argv++) { if (!my_defaults_file && is_prefix(*argv, "--defaults-file=")) my_defaults_file= *argv + sizeof("--defaults-file=")-1; else if (!my_defaults_extra_file && is_prefix(*argv, "--defaults-extra-file=")) my_defaults_extra_file= *argv + sizeof("--defaults-extra-file=")-1; else if (!my_defaults_group_suffix && is_prefix(*argv, "--defaults-group-suffix=")) my_defaults_group_suffix= *argv + sizeof("--defaults-group-suffix=")-1; else break; } if (*argv && !strcmp(*argv, "--print-defaults")) { my_print_defaults= 1; my_defaults_mark_files= FALSE; argv++; } if (! my_defaults_group_suffix) my_defaults_group_suffix= getenv("MYSQL_GROUP_SUFFIX"); if (my_defaults_extra_file && my_defaults_extra_file != extra_file_buffer) { my_realpath(extra_file_buffer, my_defaults_extra_file, MYF(0)); my_defaults_extra_file= extra_file_buffer; } if (my_defaults_file && my_defaults_file != file_buffer) { my_realpath(file_buffer, my_defaults_file, MYF(0)); my_defaults_file= file_buffer; } return (int)(argv - orig_argv); }
O0
c
get_defaults_options: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax addq $0x8, %rax movq %rax, -0x8(%rbp) leaq 0x362481(%rip), %rax # 0x38d6c8 movq $0x0, (%rax) leaq 0x36246b(%rip), %rax # 0x38d6c0 movq $0x0, (%rax) leaq 0x362455(%rip), %rax # 0x38d6b8 movq $0x0, (%rax) leaq 0x362441(%rip), %rax # 0x38d6b2 movb $0x0, (%rax) leaq 0x362436(%rip), %rax # 0x38d6b1 movb $0x0, (%rax) movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x2b2bb movq -0x8(%rbp), %rax movq (%rax), %rdi leaq 0x547e3(%rip), %rsi # 0x7fa79 callq 0x24410 cmpl $0x0, %eax jne 0x2b2bb leaq 0x36240a(%rip), %rax # 0x38d6b1 movb $0x1, (%rax) movq -0x8(%rbp), %rax addq $0x8, %rax movq %rax, -0x8(%rbp) jmp 0x2b3a9 jmp 0x2b2bd movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x2b3a7 leaq 0x3623e6(%rip), %rax # 0x38d6b8 cmpq $0x0, (%rax) jne 0x2b30e movq -0x8(%rbp), %rax movq (%rax), %rdi leaq 0x547a1(%rip), %rsi # 0x7fa87 callq 0x799d0 cmpl $0x0, %eax je 0x2b30e movq -0x8(%rbp), %rax movq (%rax), %rcx addq $0x11, %rcx addq $-0x1, %rcx leaq 0x3623b2(%rip), %rax # 0x38d6b8 movq %rcx, (%rax) jmp 0x2b394 leaq 0x3623b3(%rip), %rax # 0x38d6c8 cmpq $0x0, (%rax) jne 0x2b34e movq -0x8(%rbp), %rax movq (%rax), %rdi leaq 0x5476f(%rip), %rsi # 0x7fa98 callq 0x799d0 cmpl $0x0, %eax je 0x2b34e movq -0x8(%rbp), %rax movq (%rax), %rcx addq $0x17, %rcx addq $-0x1, %rcx leaq 0x36237f(%rip), %rax # 0x38d6c8 movq %rcx, (%rax) jmp 0x2b392 leaq 0x36236b(%rip), %rax # 0x38d6c0 cmpq $0x0, (%rax) jne 0x2b38e movq -0x8(%rbp), %rax movq (%rax), %rdi leaq 0x54746(%rip), %rsi # 0x7faaf callq 0x799d0 cmpl $0x0, %eax je 0x2b38e movq -0x8(%rbp), %rax movq (%rax), %rcx addq $0x19, %rcx addq $-0x1, %rcx leaq 0x362337(%rip), %rax # 0x38d6c0 movq %rcx, (%rax) jmp 0x2b390 jmp 0x2b3a7 jmp 0x2b392 jmp 0x2b394 jmp 0x2b396 movq -0x8(%rbp), %rax addq $0x8, %rax movq %rax, -0x8(%rbp) jmp 0x2b2bd jmp 0x2b3a9 movq -0x8(%rbp), %rax cmpq $0x0, (%rax) je 0x2b3eb movq -0x8(%rbp), %rax movq (%rax), %rdi leaq 0x54707(%rip), %rsi # 0x7fac8 callq 0x24410 cmpl $0x0, %eax jne 0x2b3eb leaq 0x3622e0(%rip), %rax # 0x38d6b2 movb $0x1, (%rax) leaq 0x3622d4(%rip), %rax # 0x38d6b0 movb $0x0, (%rax) movq -0x8(%rbp), %rax addq $0x8, %rax movq %rax, -0x8(%rbp) leaq 0x3622ce(%rip), %rax # 0x38d6c0 cmpq $0x0, (%rax) jne 0x2b411 leaq 0x546da(%rip), %rdi # 0x7fad9 callq 0x243a0 movq %rax, %rcx leaq 0x3622b2(%rip), %rax # 0x38d6c0 movq %rcx, (%rax) leaq 0x3622b0(%rip), %rax # 0x38d6c8 cmpq $0x0, (%rax) je 0x2b45c leaq 0x3624ab(%rip), %rcx # 0x38d8d0 leaq 0x36229c(%rip), %rax # 0x38d6c8 cmpq %rcx, (%rax) je 0x2b45c leaq 0x362290(%rip), %rax # 0x38d6c8 movq (%rax), %rsi leaq 0x36248e(%rip), %rdi # 0x38d8d0 xorl %eax, %eax movl %eax, %edx callq 0x32130 leaq 0x362276(%rip), %rax # 0x38d6c8 leaq 0x362477(%rip), %rcx # 0x38d8d0 movq %rcx, (%rax) leaq 0x362255(%rip), %rax # 0x38d6b8 cmpq $0x0, (%rax) je 0x2b4a7 leaq 0x362260(%rip), %rcx # 0x38d6d0 leaq 0x362241(%rip), %rax # 0x38d6b8 cmpq %rcx, (%rax) je 0x2b4a7 leaq 0x362235(%rip), %rax # 0x38d6b8 movq (%rax), %rsi leaq 0x362243(%rip), %rdi # 0x38d6d0 xorl %eax, %eax movl %eax, %edx callq 0x32130 leaq 0x36221b(%rip), %rax # 0x38d6b8 leaq 0x36222c(%rip), %rcx # 0x38d6d0 movq %rcx, (%rax) movq -0x8(%rbp), %rax movq -0x10(%rbp), %rcx subq %rcx, %rax sarq $0x3, %rax addq $0x10, %rsp popq %rbp retq nopl (%rax)
get_defaults_options: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_8] add rax, 8 mov [rbp+var_8], rax lea rax, my_defaults_extra_file mov qword ptr [rax], 0 lea rax, my_defaults_group_suffix mov qword ptr [rax], 0 lea rax, my_defaults_file mov qword ptr [rax], 0 lea rax, my_print_defaults mov byte ptr [rax], 0 lea rax, my_no_defaults mov byte ptr [rax], 0 mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_2B2BB mov rax, [rbp+var_8] mov rdi, [rax] lea rsi, aNoDefaults; "--no-defaults" call _strcmp cmp eax, 0 jnz short loc_2B2BB lea rax, my_no_defaults mov byte ptr [rax], 1 mov rax, [rbp+var_8] add rax, 8 mov [rbp+var_8], rax jmp loc_2B3A9 loc_2B2BB: jmp short $+2 loc_2B2BD: mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz loc_2B3A7 lea rax, my_defaults_file cmp qword ptr [rax], 0 jnz short loc_2B30E mov rax, [rbp+var_8] mov rdi, [rax] lea rsi, aDefaultsFile; "--defaults-file=" call is_prefix cmp eax, 0 jz short loc_2B30E mov rax, [rbp+var_8] mov rcx, [rax] add rcx, 11h add rcx, 0FFFFFFFFFFFFFFFFh lea rax, my_defaults_file mov [rax], rcx jmp loc_2B394 loc_2B30E: lea rax, my_defaults_extra_file cmp qword ptr [rax], 0 jnz short loc_2B34E mov rax, [rbp+var_8] mov rdi, [rax] lea rsi, aDefaultsExtraF; "--defaults-extra-file=" call is_prefix cmp eax, 0 jz short loc_2B34E mov rax, [rbp+var_8] mov rcx, [rax] add rcx, 17h add rcx, 0FFFFFFFFFFFFFFFFh lea rax, my_defaults_extra_file mov [rax], rcx jmp short loc_2B392 loc_2B34E: lea rax, my_defaults_group_suffix cmp qword ptr [rax], 0 jnz short loc_2B38E mov rax, [rbp+var_8] mov rdi, [rax] lea rsi, aDefaultsGroupS; "--defaults-group-suffix=" call is_prefix cmp eax, 0 jz short loc_2B38E mov rax, [rbp+var_8] mov rcx, [rax] add rcx, 19h add rcx, 0FFFFFFFFFFFFFFFFh lea rax, my_defaults_group_suffix mov [rax], rcx jmp short loc_2B390 loc_2B38E: jmp short loc_2B3A7 loc_2B390: jmp short $+2 loc_2B392: jmp short $+2 loc_2B394: jmp short $+2 loc_2B396: mov rax, [rbp+var_8] add rax, 8 mov [rbp+var_8], rax jmp loc_2B2BD loc_2B3A7: jmp short $+2 loc_2B3A9: mov rax, [rbp+var_8] cmp qword ptr [rax], 0 jz short loc_2B3EB mov rax, [rbp+var_8] mov rdi, [rax] lea rsi, aPrintDefaults; "--print-defaults" call _strcmp cmp eax, 0 jnz short loc_2B3EB lea rax, my_print_defaults mov byte ptr [rax], 1 lea rax, my_defaults_mark_files mov byte ptr [rax], 0 mov rax, [rbp+var_8] add rax, 8 mov [rbp+var_8], rax loc_2B3EB: lea rax, my_defaults_group_suffix cmp qword ptr [rax], 0 jnz short loc_2B411 lea rdi, aMysqlGroupSuff; "MYSQL_GROUP_SUFFIX" call _getenv mov rcx, rax lea rax, my_defaults_group_suffix mov [rax], rcx loc_2B411: lea rax, my_defaults_extra_file cmp qword ptr [rax], 0 jz short loc_2B45C lea rcx, get_defaults_options_extra_file_buffer lea rax, my_defaults_extra_file cmp [rax], rcx jz short loc_2B45C lea rax, my_defaults_extra_file mov rsi, [rax] lea rdi, get_defaults_options_extra_file_buffer xor eax, eax mov edx, eax call my_realpath lea rax, my_defaults_extra_file lea rcx, get_defaults_options_extra_file_buffer mov [rax], rcx loc_2B45C: lea rax, my_defaults_file cmp qword ptr [rax], 0 jz short loc_2B4A7 lea rcx, get_defaults_options_file_buffer lea rax, my_defaults_file cmp [rax], rcx jz short loc_2B4A7 lea rax, my_defaults_file mov rsi, [rax] lea rdi, get_defaults_options_file_buffer xor eax, eax mov edx, eax call my_realpath lea rax, my_defaults_file lea rcx, get_defaults_options_file_buffer mov [rax], rcx loc_2B4A7: mov rax, [rbp+var_8] mov rcx, [rbp+var_10] sub rax, rcx sar rax, 3 add rsp, 10h pop rbp retn
long long get_defaults_options(long long a1) { _QWORD *v2; // [rsp+8h] [rbp-8h] v2 = (_QWORD *)(a1 + 8); my_defaults_extra_file = 0LL; my_defaults_group_suffix = 0LL; my_defaults_file = 0LL; my_print_defaults = 0; my_no_defaults = 0; if ( *(_QWORD *)(a1 + 8) && !(unsigned int)strcmp(*v2, "--no-defaults") ) { my_no_defaults = 1; v2 = (_QWORD *)(a1 + 16); } else { while ( *v2 ) { if ( my_defaults_file || !(unsigned int)is_prefix(*v2, "--defaults-file=") ) { if ( my_defaults_extra_file || !(unsigned int)is_prefix(*v2, "--defaults-extra-file=") ) { if ( my_defaults_group_suffix || !(unsigned int)is_prefix(*v2, "--defaults-group-suffix=") ) break; my_defaults_group_suffix = *v2 + 24LL; } else { my_defaults_extra_file = *v2 + 22LL; } } else { my_defaults_file = *v2 + 16LL; } ++v2; } } if ( *v2 && !(unsigned int)strcmp(*v2, "--print-defaults") ) { my_print_defaults = 1; my_defaults_mark_files = 0; ++v2; } if ( !my_defaults_group_suffix ) my_defaults_group_suffix = getenv("MYSQL_GROUP_SUFFIX"); if ( my_defaults_extra_file && (_UNKNOWN *)my_defaults_extra_file != &get_defaults_options_extra_file_buffer ) { my_realpath(&get_defaults_options_extra_file_buffer, my_defaults_extra_file, 0LL); my_defaults_extra_file = &get_defaults_options_extra_file_buffer; } if ( my_defaults_file && (_UNKNOWN *)my_defaults_file != &get_defaults_options_file_buffer ) { my_realpath(&get_defaults_options_file_buffer, my_defaults_file, 0LL); my_defaults_file = &get_defaults_options_file_buffer; } return ((long long)v2 - a1) >> 3; }
get_defaults_options: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x8 MOV qword ptr [RBP + -0x8],RAX LEA RAX,[0x48d6c8] MOV qword ptr [RAX],0x0 LEA RAX,[0x48d6c0] MOV qword ptr [RAX],0x0 LEA RAX,[0x48d6b8] MOV qword ptr [RAX],0x0 LEA RAX,[0x48d6b2] MOV byte ptr [RAX],0x0 LEA RAX,[0x48d6b1] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x0012b2bb MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] LEA RSI,[0x17fa79] CALL 0x00124410 CMP EAX,0x0 JNZ 0x0012b2bb LEA RAX,[0x48d6b1] MOV byte ptr [RAX],0x1 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x8 MOV qword ptr [RBP + -0x8],RAX JMP 0x0012b3a9 LAB_0012b2bb: JMP 0x0012b2bd LAB_0012b2bd: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x0012b3a7 LEA RAX,[0x48d6b8] CMP qword ptr [RAX],0x0 JNZ 0x0012b30e MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] LEA RSI,[0x17fa87] CALL 0x001799d0 CMP EAX,0x0 JZ 0x0012b30e MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX] ADD RCX,0x11 ADD RCX,-0x1 LEA RAX,[0x48d6b8] MOV qword ptr [RAX],RCX JMP 0x0012b394 LAB_0012b30e: LEA RAX,[0x48d6c8] CMP qword ptr [RAX],0x0 JNZ 0x0012b34e MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] LEA RSI,[0x17fa98] CALL 0x001799d0 CMP EAX,0x0 JZ 0x0012b34e MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX] ADD RCX,0x17 ADD RCX,-0x1 LEA RAX,[0x48d6c8] MOV qword ptr [RAX],RCX JMP 0x0012b392 LAB_0012b34e: LEA RAX,[0x48d6c0] CMP qword ptr [RAX],0x0 JNZ 0x0012b38e MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] LEA RSI,[0x17faaf] CALL 0x001799d0 CMP EAX,0x0 JZ 0x0012b38e MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX] ADD RCX,0x19 ADD RCX,-0x1 LEA RAX,[0x48d6c0] MOV qword ptr [RAX],RCX JMP 0x0012b390 LAB_0012b38e: JMP 0x0012b3a7 LAB_0012b390: JMP 0x0012b392 LAB_0012b392: JMP 0x0012b394 LAB_0012b394: JMP 0x0012b396 LAB_0012b396: MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x8 MOV qword ptr [RBP + -0x8],RAX JMP 0x0012b2bd LAB_0012b3a7: JMP 0x0012b3a9 LAB_0012b3a9: MOV RAX,qword ptr [RBP + -0x8] CMP qword ptr [RAX],0x0 JZ 0x0012b3eb MOV RAX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RAX] LEA RSI,[0x17fac8] CALL 0x00124410 CMP EAX,0x0 JNZ 0x0012b3eb LEA RAX,[0x48d6b2] MOV byte ptr [RAX],0x1 LEA RAX,[0x48d6b0] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] ADD RAX,0x8 MOV qword ptr [RBP + -0x8],RAX LAB_0012b3eb: LEA RAX,[0x48d6c0] CMP qword ptr [RAX],0x0 JNZ 0x0012b411 LEA RDI,[0x17fad9] CALL 0x001243a0 MOV RCX,RAX LEA RAX,[0x48d6c0] MOV qword ptr [RAX],RCX LAB_0012b411: LEA RAX,[0x48d6c8] CMP qword ptr [RAX],0x0 JZ 0x0012b45c LEA RCX,[0x48d8d0] LEA RAX,[0x48d6c8] CMP qword ptr [RAX],RCX JZ 0x0012b45c LEA RAX,[0x48d6c8] MOV RSI,qword ptr [RAX] LEA RDI,[0x48d8d0] XOR EAX,EAX MOV EDX,EAX CALL 0x00132130 LEA RAX,[0x48d6c8] LEA RCX,[0x48d8d0] MOV qword ptr [RAX],RCX LAB_0012b45c: LEA RAX,[0x48d6b8] CMP qword ptr [RAX],0x0 JZ 0x0012b4a7 LEA RCX,[0x48d6d0] LEA RAX,[0x48d6b8] CMP qword ptr [RAX],RCX JZ 0x0012b4a7 LEA RAX,[0x48d6b8] MOV RSI,qword ptr [RAX] LEA RDI,[0x48d6d0] XOR EAX,EAX MOV EDX,EAX CALL 0x00132130 LEA RAX,[0x48d6b8] LEA RCX,[0x48d6d0] MOV qword ptr [RAX],RCX LAB_0012b4a7: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x10] SUB RAX,RCX SAR RAX,0x3 ADD RSP,0x10 POP RBP RET
long get_defaults_options(long param_1) { int iVar1; long *local_10; local_10 = (long *)(param_1 + 8); my_defaults_extra_file = (int1 *)0x0; my_defaults_group_suffix = (char *)0x0; my_defaults_file = (int1 *)0x0; my_print_defaults = 0; my_no_defaults = 0; if ((*local_10 == 0) || (iVar1 = strcmp((char *)*local_10,"--no-defaults"), iVar1 != 0)) { for (; *local_10 != 0; local_10 = local_10 + 1) { if ((my_defaults_file == (int1 *)0x0) && (iVar1 = is_prefix(*local_10,"--defaults-file="), iVar1 != 0)) { my_defaults_file = (int1 *)(*local_10 + 0x10); } else if ((my_defaults_extra_file == (int1 *)0x0) && (iVar1 = is_prefix(*local_10,"--defaults-extra-file="), iVar1 != 0)) { my_defaults_extra_file = (int1 *)(*local_10 + 0x16); } else { if ((my_defaults_group_suffix != (char *)0x0) || (iVar1 = is_prefix(*local_10,"--defaults-group-suffix="), iVar1 == 0)) break; my_defaults_group_suffix = (char *)(*local_10 + 0x18); } } } else { my_no_defaults = 1; local_10 = (long *)(param_1 + 0x10); } if ((*local_10 != 0) && (iVar1 = strcmp((char *)*local_10,"--print-defaults"), iVar1 == 0)) { my_print_defaults = 1; my_defaults_mark_files = 0; local_10 = local_10 + 1; } if (my_defaults_group_suffix == (char *)0x0) { my_defaults_group_suffix = getenv("MYSQL_GROUP_SUFFIX"); } if ((my_defaults_extra_file != (int1 *)0x0) && (my_defaults_extra_file != get_defaults_options_extra_file_buffer)) { my_realpath(get_defaults_options_extra_file_buffer,my_defaults_extra_file,0); my_defaults_extra_file = get_defaults_options_extra_file_buffer; } if ((my_defaults_file != (int1 *)0x0) && (my_defaults_file != get_defaults_options_file_buffer)) { my_realpath(get_defaults_options_file_buffer,my_defaults_file,0); my_defaults_file = get_defaults_options_file_buffer; } return (long)local_10 - param_1 >> 3; }
26,176
js_parse_logical_and_or
bluesky950520[P]quickjs/quickjs.c
static __exception int js_parse_logical_and_or(JSParseState *s, int op, int parse_flags) { int label1; if (op == TOK_LAND) { if (js_parse_expr_binary(s, 8, parse_flags)) return -1; } else { if (js_parse_logical_and_or(s, TOK_LAND, parse_flags)) return -1; } if (s->token.val == op) { label1 = new_label(s); for(;;) { if (next_token(s)) return -1; emit_op(s, OP_dup); emit_goto(s, op == TOK_LAND ? OP_if_false : OP_if_true, label1); emit_op(s, OP_drop); if (op == TOK_LAND) { if (js_parse_expr_binary(s, 8, parse_flags)) return -1; } else { if (js_parse_logical_and_or(s, TOK_LAND, parse_flags)) return -1; } if (s->token.val != op) { if (s->token.val == TOK_DOUBLE_QUESTION_MARK) return js_parse_error(s, "cannot mix ?? with && or ||"); break; } } emit_label(s, label1); } return 0; }
O1
c
js_parse_logical_and_or: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, %r14d movl %esi, %r15d movq %rdi, %rbx cmpl $-0x5f, %esi jne 0x6bb89 movl $0x8, %esi movl %r14d, %edx callq 0x6bca7 jmp 0x6bb96 movl $0xffffffa1, %esi # imm = 0xFFFFFFA1 movl %r14d, %edx callq 0x6bb61 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF testl %eax, %eax jne 0x6bc87 xorl %ecx, %ecx cmpl %r15d, 0x20(%rbx) jne 0x6bc87 movq 0x90(%rbx), %rdi movl $0xffffffff, %esi # imm = 0xFFFFFFFF callq 0x6c7b9 movl %eax, %r12d xorl %r13d, %r13d cmpl $-0x5f, %r15d setne %r13b addl $0x69, %r13d movl $0x138, %ebp # imm = 0x138 movq %rbx, %rdi callq 0x5d1cf testl %eax, %eax jne 0x6bc82 movq 0x90(%rbx), %rax leaq (%rax,%rbp), %rdi movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0x11, %esi callq 0x1b4d0 movq %rbx, %rdi movl %r13d, %esi movl %r12d, %edx callq 0x64d83 movq 0x90(%rbx), %rax leaq (%rax,%rbp), %rdi movl 0x140(%rax), %ecx movl %ecx, 0x168(%rax) movl $0xe, %esi callq 0x1b4d0 movq %rbx, %rdi cmpl $-0x5f, %r15d jne 0x6bc4f movl $0x8, %esi movl %r14d, %edx callq 0x6bca7 jmp 0x6bc5c movl $0xffffffa1, %esi # imm = 0xFFFFFFA1 movl %r14d, %edx callq 0x6bb61 testl %eax, %eax jne 0x6bc82 movl 0x20(%rbx), %eax cmpl %r15d, %eax je 0x6bbd7 cmpl $-0x5a, %eax jne 0x6bc98 leaq 0x3535d(%rip), %rsi # 0xa0fd5 movq %rbx, %rdi xorl %eax, %eax callq 0x2fce9 movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl %ecx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, %rdi movl %r12d, %esi callq 0x64ef1 xorl %ecx, %ecx jmp 0x6bc87
js_parse_logical_and_or: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r14d, edx mov r15d, esi mov rbx, rdi cmp esi, 0FFFFFFA1h jnz short loc_6BB89 mov esi, 8 mov edx, r14d call js_parse_expr_binary jmp short loc_6BB96 loc_6BB89: mov esi, 0FFFFFFA1h mov edx, r14d call js_parse_logical_and_or loc_6BB96: mov ecx, 0FFFFFFFFh test eax, eax jnz loc_6BC87 xor ecx, ecx cmp [rbx+20h], r15d jnz loc_6BC87 mov rdi, [rbx+90h] mov esi, 0FFFFFFFFh call new_label_fd mov r12d, eax xor r13d, r13d cmp r15d, 0FFFFFFA1h setnz r13b add r13d, 69h ; 'i' mov ebp, 138h loc_6BBD7: mov rdi, rbx call next_token test eax, eax jnz loc_6BC82 mov rax, [rbx+90h] lea rdi, [rax+rbp] mov ecx, [rax+140h] mov [rax+168h], ecx mov esi, 11h call dbuf_putc mov rdi, rbx mov esi, r13d mov edx, r12d call emit_goto mov rax, [rbx+90h] lea rdi, [rax+rbp] mov ecx, [rax+140h] mov [rax+168h], ecx mov esi, 0Eh call dbuf_putc mov rdi, rbx cmp r15d, 0FFFFFFA1h jnz short loc_6BC4F mov esi, 8 mov edx, r14d call js_parse_expr_binary jmp short loc_6BC5C loc_6BC4F: mov esi, 0FFFFFFA1h mov edx, r14d call js_parse_logical_and_or loc_6BC5C: test eax, eax jnz short loc_6BC82 mov eax, [rbx+20h] cmp eax, r15d jz loc_6BBD7 cmp eax, 0FFFFFFA6h jnz short loc_6BC98 lea rsi, aCannotMixWithO; "cannot mix ?? with && or ||" mov rdi, rbx xor eax, eax call js_parse_error loc_6BC82: mov ecx, 0FFFFFFFFh loc_6BC87: mov eax, ecx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6BC98: mov rdi, rbx mov esi, r12d call emit_label xor ecx, ecx jmp short loc_6BC87
long long js_parse_logical_and_or( long long a1, int a2, unsigned int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { char v11; // al int v14; // eax unsigned int v15; // ecx long long v16; // rsi long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 int v21; // r12d __m128 v22; // xmm4 __m128 v23; // xmm5 long long v24; // rax long long v25; // rax int v26; // eax int v27; // eax char v29; // [rsp-8h] [rbp-38h] v29 = v11; if ( a2 == -95 ) v14 = js_parse_expr_binary(a1, 8LL, a3); else v14 = js_parse_logical_and_or(a1, 4294967201LL, a3); v15 = -1; if ( !v14 ) { v15 = 0; if ( *(_DWORD *)(a1 + 32) == a2 ) { v16 = 0xFFFFFFFFLL; v21 = new_label_fd(*(_QWORD *)(a1 + 144), 0xFFFFFFFFLL); do { if ( (unsigned int)next_token(a1, a4, a5, a6, a7, v22, v23, a10, a11, v16, v17, v18, v19, v20) ) return (unsigned int)-1; v24 = *(_QWORD *)(a1 + 144); *(_DWORD *)(v24 + 360) = *(_DWORD *)(v24 + 320); dbuf_putc((_QWORD *)(v24 + 312), 17); emit_goto(a1, (a2 != -95) + 105, v21); v25 = *(_QWORD *)(a1 + 144); *(_DWORD *)(v25 + 360) = *(_DWORD *)(v25 + 320); dbuf_putc((_QWORD *)(v25 + 312), 14); if ( a2 == -95 ) { v16 = 8LL; v26 = js_parse_expr_binary(a1, 8LL, a3); } else { v16 = 4294967201LL; v26 = js_parse_logical_and_or(a1, 4294967201LL, a3); } if ( v26 ) return (unsigned int)-1; v27 = *(_DWORD *)(a1 + 32); } while ( v27 == a2 ); if ( v27 == -90 ) { js_parse_error( (long long *)a1, (long long)"cannot mix ?? with && or ||", v17, v18, v19, v20, a4, a5, a6, a7, v22, v23, a10, a11, v29); return (unsigned int)-1; } emit_label(a1, v21); return 0; } } return v15; }
js_parse_logical_and_or: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14D,EDX MOV R15D,ESI MOV RBX,RDI CMP ESI,-0x5f JNZ 0x0016bb89 MOV ESI,0x8 MOV EDX,R14D CALL 0x0016bca7 JMP 0x0016bb96 LAB_0016bb89: MOV ESI,0xffffffa1 MOV EDX,R14D CALL 0x0016bb61 LAB_0016bb96: MOV ECX,0xffffffff TEST EAX,EAX JNZ 0x0016bc87 XOR ECX,ECX CMP dword ptr [RBX + 0x20],R15D JNZ 0x0016bc87 MOV RDI,qword ptr [RBX + 0x90] MOV ESI,0xffffffff CALL 0x0016c7b9 MOV R12D,EAX XOR R13D,R13D CMP R15D,-0x5f SETNZ R13B ADD R13D,0x69 MOV EBP,0x138 LAB_0016bbd7: MOV RDI,RBX CALL 0x0015d1cf TEST EAX,EAX JNZ 0x0016bc82 MOV RAX,qword ptr [RBX + 0x90] LEA RDI,[RAX + RBP*0x1] MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV ESI,0x11 CALL 0x0011b4d0 MOV RDI,RBX MOV ESI,R13D MOV EDX,R12D CALL 0x00164d83 MOV RAX,qword ptr [RBX + 0x90] LEA RDI,[RAX + RBP*0x1] MOV ECX,dword ptr [RAX + 0x140] MOV dword ptr [RAX + 0x168],ECX MOV ESI,0xe CALL 0x0011b4d0 MOV RDI,RBX CMP R15D,-0x5f JNZ 0x0016bc4f MOV ESI,0x8 MOV EDX,R14D CALL 0x0016bca7 JMP 0x0016bc5c LAB_0016bc4f: MOV ESI,0xffffffa1 MOV EDX,R14D CALL 0x0016bb61 LAB_0016bc5c: TEST EAX,EAX JNZ 0x0016bc82 MOV EAX,dword ptr [RBX + 0x20] CMP EAX,R15D JZ 0x0016bbd7 CMP EAX,-0x5a JNZ 0x0016bc98 LEA RSI,[0x1a0fd5] MOV RDI,RBX XOR EAX,EAX CALL 0x0012fce9 LAB_0016bc82: MOV ECX,0xffffffff LAB_0016bc87: MOV EAX,ECX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016bc98: MOV RDI,RBX MOV ESI,R12D CALL 0x00164ef1 XOR ECX,ECX JMP 0x0016bc87
int8 js_parse_logical_and_or(long param_1,int param_2,int4 param_3) { long lVar1; int iVar2; int4 uVar3; int8 uVar4; if (param_2 == -0x5f) { iVar2 = js_parse_expr_binary(param_1,8,param_3); } else { iVar2 = js_parse_logical_and_or(param_1,0xffffffa1,param_3); } uVar4 = 0xffffffff; if ((iVar2 == 0) && (uVar4 = 0, *(int *)(param_1 + 0x20) == param_2)) { uVar3 = new_label_fd(*(int8 *)(param_1 + 0x90),0xffffffff); do { iVar2 = next_token(param_1); if (iVar2 != 0) goto LAB_0016bc82; lVar1 = *(long *)(param_1 + 0x90); *(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140); dbuf_putc(lVar1 + 0x138,0x11); emit_goto(param_1,(param_2 != -0x5f) + 'i',uVar3); lVar1 = *(long *)(param_1 + 0x90); *(int4 *)(lVar1 + 0x168) = *(int4 *)(lVar1 + 0x140); dbuf_putc(lVar1 + 0x138,0xe); if (param_2 == -0x5f) { iVar2 = js_parse_expr_binary(param_1,8,param_3); } else { iVar2 = js_parse_logical_and_or(param_1,0xffffffa1,param_3); } if (iVar2 != 0) goto LAB_0016bc82; } while (*(int *)(param_1 + 0x20) == param_2); if (*(int *)(param_1 + 0x20) == -0x5a) { js_parse_error(param_1,"cannot mix ?? with && or ||"); LAB_0016bc82: uVar4 = 0xffffffff; } else { emit_label(param_1,uVar3); uVar4 = 0; } } return uVar4; }
26,177
js_parse_logical_and_or
bluesky950520[P]quickjs/quickjs.c
static __exception int js_parse_logical_and_or(JSParseState *s, int op, int parse_flags) { int label1; if (op == TOK_LAND) { if (js_parse_expr_binary(s, 8, parse_flags)) return -1; } else { if (js_parse_logical_and_or(s, TOK_LAND, parse_flags)) return -1; } if (s->token.val == op) { label1 = new_label(s); for(;;) { if (next_token(s)) return -1; emit_op(s, OP_dup); emit_goto(s, op == TOK_LAND ? OP_if_false : OP_if_true, label1); emit_op(s, OP_drop); if (op == TOK_LAND) { if (js_parse_expr_binary(s, 8, parse_flags)) return -1; } else { if (js_parse_logical_and_or(s, TOK_LAND, parse_flags)) return -1; } if (s->token.val != op) { if (s->token.val == TOK_DOUBLE_QUESTION_MARK) return js_parse_error(s, "cannot mix ?? with && or ||"); break; } } emit_label(s, label1); } return 0; }
O2
c
js_parse_logical_and_or: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %edx, %ebp movl %esi, %r15d movq %rdi, %r14 pushq $-0x1 popq %rbx cmpl $-0x5f, %esi jne 0x5afbb pushq $0x8 popq %rsi movq %r14, %rdi movl %ebp, %edx callq 0x5b086 jmp 0x5afc8 pushq $-0x5f popq %rsi movq %r14, %rdi movl %ebp, %edx callq 0x5af91 testl %eax, %eax jne 0x5b075 cmpl %r15d, 0x20(%r14) jne 0x5b073 movq %r14, %rdi callq 0x5604b movl %eax, %r12d xorl %r13d, %r13d cmpl $-0x5f, %r15d setne %r13b addl $0x69, %r13d movq %r14, %rdi callq 0x4fa4e testl %eax, %eax jne 0x5b075 movq %r14, %rdi pushq $0x11 popq %rsi callq 0x4fa1b movq %r14, %rdi movl %r13d, %esi movl %r12d, %edx callq 0x5605a movq %r14, %rdi pushq $0xe popq %rsi callq 0x4fa1b movq %r14, %rdi cmpl $-0x5f, %r15d jne 0x5b039 pushq $0x8 popq %rsi movl %ebp, %edx callq 0x5b086 jmp 0x5b043 pushq $-0x5f popq %rsi movl %ebp, %edx callq 0x5af91 testl %eax, %eax jne 0x5b075 movl 0x20(%r14), %eax cmpl %r15d, %eax je 0x5aff4 cmpl $-0x5a, %eax jne 0x5b068 leaq 0x2ceb3(%rip), %rsi # 0x87f0f movq %r14, %rdi xorl %eax, %eax callq 0x28457 jmp 0x5b075 movq %r14, %rdi movl %r12d, %esi callq 0x5617c xorl %ebx, %ebx movl %ebx, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
js_parse_logical_and_or: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov ebp, edx mov r15d, esi mov r14, rdi push 0FFFFFFFFFFFFFFFFh pop rbx cmp esi, 0FFFFFFA1h jnz short loc_5AFBB push 8 pop rsi mov rdi, r14 mov edx, ebp call js_parse_expr_binary jmp short loc_5AFC8 loc_5AFBB: push 0FFFFFFFFFFFFFFA1h pop rsi mov rdi, r14 mov edx, ebp call js_parse_logical_and_or loc_5AFC8: test eax, eax jnz loc_5B075 cmp [r14+20h], r15d jnz loc_5B073 mov rdi, r14 call new_label mov r12d, eax xor r13d, r13d cmp r15d, 0FFFFFFA1h setnz r13b add r13d, 69h ; 'i' loc_5AFF4: mov rdi, r14 call next_token test eax, eax jnz short loc_5B075 mov rdi, r14 push 11h pop rsi call emit_op mov rdi, r14 mov esi, r13d mov edx, r12d call emit_goto mov rdi, r14 push 0Eh pop rsi call emit_op mov rdi, r14 cmp r15d, 0FFFFFFA1h jnz short loc_5B039 push 8 pop rsi mov edx, ebp call js_parse_expr_binary jmp short loc_5B043 loc_5B039: push 0FFFFFFFFFFFFFFA1h pop rsi mov edx, ebp call js_parse_logical_and_or loc_5B043: test eax, eax jnz short loc_5B075 mov eax, [r14+20h] cmp eax, r15d jz short loc_5AFF4 cmp eax, 0FFFFFFA6h jnz short loc_5B068 lea rsi, aCannotMixWithO; "cannot mix ?? with && or ||" mov rdi, r14 xor eax, eax call js_parse_error jmp short loc_5B075 loc_5B068: mov rdi, r14 mov esi, r12d call emit_label loc_5B073: xor ebx, ebx loc_5B075: mov eax, ebx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long js_parse_logical_and_or( long long a1, int a2, unsigned int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { char v11; // al unsigned int v14; // ebx long long v15; // rsi int v16; // eax long long v17; // rdx long long v18; // rcx long long v19; // r8 long long v20; // r9 int v21; // r12d __m128 v22; // xmm4 __m128 v23; // xmm5 int v24; // eax int v25; // eax char v27; // [rsp-8h] [rbp-38h] v27 = v11; v14 = -1; if ( a2 == -95 ) { v15 = 8LL; v16 = js_parse_expr_binary(a1, 8LL, a3); } else { v15 = -95LL; v16 = js_parse_logical_and_or(a1, -95LL, a3); } if ( !v16 ) { if ( *(_DWORD *)(a1 + 32) == a2 ) { v21 = new_label(a1); while ( !(unsigned int)next_token(a1, v15, v17, a4, a5, a6, a7, v22, v23, a10, a11, v18, v19, v20) ) { emit_op(a1, 17); emit_goto(a1, (a2 != -95) + 105, v21); emit_op(a1, 14); if ( a2 == -95 ) { v15 = 8LL; v24 = js_parse_expr_binary(a1, 8LL, a3); } else { v15 = -95LL; v24 = js_parse_logical_and_or(a1, -95LL, a3); } if ( v24 ) break; v25 = *(_DWORD *)(a1 + 32); if ( v25 != a2 ) { if ( v25 == -90 ) { js_parse_error( (long long *)a1, (long long)"cannot mix ?? with && or ||", v17, v18, v19, v20, a4, a5, a6, a7, v22, v23, a10, a11, v27); return v14; } emit_label(a1, v21); return 0; } } } else { return 0; } } return v14; }
js_parse_logical_and_or: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV EBP,EDX MOV R15D,ESI MOV R14,RDI PUSH -0x1 POP RBX CMP ESI,-0x5f JNZ 0x0015afbb PUSH 0x8 POP RSI MOV RDI,R14 MOV EDX,EBP CALL 0x0015b086 JMP 0x0015afc8 LAB_0015afbb: PUSH -0x5f POP RSI MOV RDI,R14 MOV EDX,EBP CALL 0x0015af91 LAB_0015afc8: TEST EAX,EAX JNZ 0x0015b075 CMP dword ptr [R14 + 0x20],R15D JNZ 0x0015b073 MOV RDI,R14 CALL 0x0015604b MOV R12D,EAX XOR R13D,R13D CMP R15D,-0x5f SETNZ R13B ADD R13D,0x69 LAB_0015aff4: MOV RDI,R14 CALL 0x0014fa4e TEST EAX,EAX JNZ 0x0015b075 MOV RDI,R14 PUSH 0x11 POP RSI CALL 0x0014fa1b MOV RDI,R14 MOV ESI,R13D MOV EDX,R12D CALL 0x0015605a MOV RDI,R14 PUSH 0xe POP RSI CALL 0x0014fa1b MOV RDI,R14 CMP R15D,-0x5f JNZ 0x0015b039 PUSH 0x8 POP RSI MOV EDX,EBP CALL 0x0015b086 JMP 0x0015b043 LAB_0015b039: PUSH -0x5f POP RSI MOV EDX,EBP CALL 0x0015af91 LAB_0015b043: TEST EAX,EAX JNZ 0x0015b075 MOV EAX,dword ptr [R14 + 0x20] CMP EAX,R15D JZ 0x0015aff4 CMP EAX,-0x5a JNZ 0x0015b068 LEA RSI,[0x187f0f] MOV RDI,R14 XOR EAX,EAX CALL 0x00128457 JMP 0x0015b075 LAB_0015b068: MOV RDI,R14 MOV ESI,R12D CALL 0x0015617c LAB_0015b073: XOR EBX,EBX LAB_0015b075: MOV EAX,EBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 js_parse_logical_and_or(long param_1,int param_2,int4 param_3) { int iVar1; int4 uVar2; uVar2 = 0xffffffff; if (param_2 == -0x5f) { iVar1 = js_parse_expr_binary(param_1,8,param_3); } else { iVar1 = js_parse_logical_and_or(param_1,0xffffffffffffffa1,param_3); } if (iVar1 == 0) { if (*(int *)(param_1 + 0x20) == param_2) { uVar2 = new_label(param_1); do { iVar1 = next_token(param_1); if (iVar1 != 0) { return 0xffffffff; } emit_op(param_1,0x11); emit_goto(param_1,(param_2 != -0x5f) + 'i',uVar2); emit_op(param_1,0xe); if (param_2 == -0x5f) { iVar1 = js_parse_expr_binary(param_1,8,param_3); } else { iVar1 = js_parse_logical_and_or(param_1,0xffffffffffffffa1,param_3); } if (iVar1 != 0) { return 0xffffffff; } } while (*(int *)(param_1 + 0x20) == param_2); if (*(int *)(param_1 + 0x20) == -0x5a) { js_parse_error(param_1,"cannot mix ?? with && or ||"); return 0xffffffff; } emit_label(param_1,uVar2); } uVar2 = 0; } return uVar2; }
26,178
ma_tls_verify_server_cert
eloqsql/libmariadb/libmariadb/secure/openssl.c
int ma_tls_verify_server_cert(MARIADB_TLS *ctls) { X509 *cert; MYSQL *mysql; SSL *ssl; MARIADB_PVIO *pvio; #if !defined(HAVE_OPENSSL_CHECK_HOST) X509_NAME *x509sn; int cn_pos; X509_NAME_ENTRY *cn_entry; ASN1_STRING *cn_asn1; const char *cn_str; #endif if (!ctls || !ctls->ssl) return 1; ssl= (SSL *)ctls->ssl; mysql= (MYSQL *)SSL_get_app_data(ssl); pvio= mysql->net.pvio; if (!mysql->host) { pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Invalid (empty) hostname"); return 1; } if (!(cert= SSL_get_peer_certificate(ssl))) { pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Unable to get server certificate"); return 1; } #ifdef HAVE_OPENSSL_CHECK_HOST if (X509_check_host(cert, mysql->host, 0, 0, 0) != 1 && X509_check_ip_asc(cert, mysql->host, 0) != 1) goto error; #else x509sn= X509_get_subject_name(cert); if ((cn_pos= X509_NAME_get_index_by_NID(x509sn, NID_commonName, -1)) < 0) goto error; if (!(cn_entry= X509_NAME_get_entry(x509sn, cn_pos))) goto error; if (!(cn_asn1 = X509_NAME_ENTRY_get_data(cn_entry))) goto error; cn_str = (char *)ASN1_STRING_data(cn_asn1); /* Make sure there is no embedded \0 in the CN */ if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn_str)) goto error; if (strcmp(cn_str, mysql->host)) goto error; #endif X509_free(cert); return 0; error: X509_free(cert); pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Validation of SSL server certificate failed"); return 1; }
O0
c
ma_tls_verify_server_cert: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) je 0x3d1de movq -0x10(%rbp), %rax cmpq $0x0, 0x10(%rax) jne 0x3d1ea movl $0x1, -0x4(%rbp) jmp 0x3d34a movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rdi xorl %esi, %esi callq 0x13150 movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax cmpq $0x0, 0x2b0(%rax) jne 0x3d25f movq -0x30(%rbp), %rax movq 0x50(%rax), %r9 movq -0x20(%rbp), %rdi leaq 0x2a00f(%rip), %rax # 0x67240 movq (%rax), %rdx leaq 0x2a015(%rip), %rax # 0x67250 movq 0xd0(%rax), %rcx movl $0x7ea, %esi # imm = 0x7EA leaq 0x15ea2(%rip), %r8 # 0x530f0 movb $0x0, %al callq *%r9 movl $0x1, -0x4(%rbp) jmp 0x3d34a movq -0x28(%rbp), %rdi callq 0x137c0 movq %rax, -0x18(%rbp) cmpq $0x0, %rax jne 0x3d2b3 movq -0x30(%rbp), %rax movq 0x50(%rax), %r9 movq -0x20(%rbp), %rdi leaq 0x29fbb(%rip), %rax # 0x67240 movq (%rax), %rdx leaq 0x29fc1(%rip), %rax # 0x67250 movq 0xd0(%rax), %rcx movl $0x7ea, %esi # imm = 0x7EA leaq 0x15e67(%rip), %r8 # 0x53109 movb $0x0, %al callq *%r9 movl $0x1, -0x4(%rbp) jmp 0x3d34a movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x2b0(%rax), %rsi xorl %eax, %eax movl %eax, %r8d xorl %ecx, %ecx movq %r8, %rdx callq 0x13840 cmpl $0x1, %eax je 0x3d2f3 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rax movq 0x2b0(%rax), %rsi xorl %edx, %edx callq 0x13320 cmpl $0x1, %eax je 0x3d2f3 jmp 0x3d305 movq -0x18(%rbp), %rdi callq 0x13230 movl $0x0, -0x4(%rbp) jmp 0x3d34a movq -0x18(%rbp), %rdi callq 0x13230 movq -0x30(%rbp), %rax movq 0x50(%rax), %r9 movq -0x20(%rbp), %rdi leaq 0x29f1f(%rip), %rax # 0x67240 movq (%rax), %rdx leaq 0x29f25(%rip), %rax # 0x67250 movq 0xd0(%rax), %rcx movl $0x7ea, %esi # imm = 0x7EA leaq 0x15dec(%rip), %r8 # 0x5312a movb $0x0, %al callq *%r9 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_tls_verify_server_cert: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi cmp [rbp+var_10], 0 jz short loc_3D1DE mov rax, [rbp+var_10] cmp qword ptr [rax+10h], 0 jnz short loc_3D1EA loc_3D1DE: mov [rbp+var_4], 1 jmp loc_3D34A loc_3D1EA: mov rax, [rbp+var_10] mov rax, [rax+10h] mov [rbp+var_28], rax mov rdi, [rbp+var_28] xor esi, esi call _SSL_get_ex_data mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_20] cmp qword ptr [rax+2B0h], 0 jnz short loc_3D25F mov rax, [rbp+var_30] mov r9, [rax+50h] mov rdi, [rbp+var_20] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] mov esi, 7EAh lea r8, aInvalidEmptyHo; "Invalid (empty) hostname" mov al, 0 call r9 mov [rbp+var_4], 1 jmp loc_3D34A loc_3D25F: mov rdi, [rbp+var_28] call _SSL_get1_peer_certificate mov [rbp+var_18], rax cmp rax, 0 jnz short loc_3D2B3 mov rax, [rbp+var_30] mov r9, [rax+50h] mov rdi, [rbp+var_20] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] mov esi, 7EAh lea r8, aUnableToGetSer; "Unable to get server certificate" mov al, 0 call r9 mov [rbp+var_4], 1 jmp loc_3D34A loc_3D2B3: mov rdi, [rbp+var_18] mov rax, [rbp+var_20] mov rsi, [rax+2B0h] xor eax, eax mov r8d, eax xor ecx, ecx mov rdx, r8 call _X509_check_host cmp eax, 1 jz short loc_3D2F3 mov rdi, [rbp+var_18] mov rax, [rbp+var_20] mov rsi, [rax+2B0h] xor edx, edx call _X509_check_ip_asc cmp eax, 1 jz short loc_3D2F3 jmp short loc_3D305 loc_3D2F3: mov rdi, [rbp+var_18] call _X509_free mov [rbp+var_4], 0 jmp short loc_3D34A loc_3D305: mov rdi, [rbp+var_18] call _X509_free mov rax, [rbp+var_30] mov r9, [rax+50h] mov rdi, [rbp+var_20] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] mov esi, 7EAh lea r8, aValidationOfSs; "Validation of SSL server certificate fa"... mov al, 0 call r9 mov [rbp+var_4], 1 loc_3D34A: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long ma_tls_verify_server_cert(long long a1) { long long v2; // [rsp+0h] [rbp-30h] long long v3; // [rsp+8h] [rbp-28h] long long *v4; // [rsp+10h] [rbp-20h] long long v5; // [rsp+18h] [rbp-18h] if ( a1 && *(_QWORD *)(a1 + 16) ) { v3 = *(_QWORD *)(a1 + 16); v4 = (long long *)SSL_get_ex_data(v3, 0LL); v2 = *v4; if ( v4[86] ) { v5 = SSL_get1_peer_certificate(v3); if ( v5 ) { if ( (unsigned int)X509_check_host(v5, v4[86], 0LL, 0LL) == 1 || (unsigned int)X509_check_ip_asc(v5, v4[86], 0LL) == 1 ) { X509_free(v5); return 0; } else { X509_free(v5); (*(void ( **)(long long *, long long, char *, char *, const char *))(v2 + 80))( v4, 2026LL, SQLSTATE_UNKNOWN, client_errors[26], "Validation of SSL server certificate failed"); return 1; } } else { (*(void ( **)(long long *, long long, char *, char *, const char *))(v2 + 80))( v4, 2026LL, SQLSTATE_UNKNOWN, client_errors[26], "Unable to get server certificate"); return 1; } } else { (*(void ( **)(long long *, long long, char *, char *, const char *))(v2 + 80))( v4, 2026LL, SQLSTATE_UNKNOWN, client_errors[26], "Invalid (empty) hostname"); return 1; } } else { return 1; } }
ma_tls_verify_server_cert: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI CMP qword ptr [RBP + -0x10],0x0 JZ 0x0013d1de MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x0013d1ea LAB_0013d1de: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013d34a LAB_0013d1ea: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x28],RAX MOV RDI,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x00113150 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x2b0],0x0 JNZ 0x0013d25f MOV RAX,qword ptr [RBP + -0x30] MOV R9,qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBP + -0x20] LEA RAX,[0x167240] MOV RDX,qword ptr [RAX] LEA RAX,[0x167250] MOV RCX,qword ptr [RAX + 0xd0] MOV ESI,0x7ea LEA R8,[0x1530f0] MOV AL,0x0 CALL R9 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013d34a LAB_0013d25f: MOV RDI,qword ptr [RBP + -0x28] CALL 0x001137c0 MOV qword ptr [RBP + -0x18],RAX CMP RAX,0x0 JNZ 0x0013d2b3 MOV RAX,qword ptr [RBP + -0x30] MOV R9,qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBP + -0x20] LEA RAX,[0x167240] MOV RDX,qword ptr [RAX] LEA RAX,[0x167250] MOV RCX,qword ptr [RAX + 0xd0] MOV ESI,0x7ea LEA R8,[0x153109] MOV AL,0x0 CALL R9 MOV dword ptr [RBP + -0x4],0x1 JMP 0x0013d34a LAB_0013d2b3: MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x2b0] XOR EAX,EAX MOV R8D,EAX XOR ECX,ECX MOV RDX,R8 CALL 0x00113840 CMP EAX,0x1 JZ 0x0013d2f3 MOV RDI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x2b0] XOR EDX,EDX CALL 0x00113320 CMP EAX,0x1 JZ 0x0013d2f3 JMP 0x0013d305 LAB_0013d2f3: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00113230 MOV dword ptr [RBP + -0x4],0x0 JMP 0x0013d34a LAB_0013d305: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00113230 MOV RAX,qword ptr [RBP + -0x30] MOV R9,qword ptr [RAX + 0x50] MOV RDI,qword ptr [RBP + -0x20] LEA RAX,[0x167240] MOV RDX,qword ptr [RAX] LEA RAX,[0x167250] MOV RCX,qword ptr [RAX + 0xd0] MOV ESI,0x7ea LEA R8,[0x15312a] MOV AL,0x0 CALL R9 MOV dword ptr [RBP + -0x4],0x1 LAB_0013d34a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 ma_tls_verify_server_cert(long param_1) { SSL *ssl; long lVar1; int iVar2; long *plVar3; X509 *a; int4 local_c; if ((param_1 == 0) || (*(long *)(param_1 + 0x10) == 0)) { local_c = 1; } else { ssl = *(SSL **)(param_1 + 0x10); plVar3 = (long *)SSL_get_ex_data(ssl,0); lVar1 = *plVar3; if (plVar3[0x56] == 0) { (**(code **)(lVar1 + 0x50)) (plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00167320, "Invalid (empty) hostname"); local_c = 1; } else { a = (X509 *)SSL_get1_peer_certificate(ssl); if (a == (X509 *)0x0) { (**(code **)(lVar1 + 0x50)) (plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00167320, "Unable to get server certificate"); local_c = 1; } else { iVar2 = X509_check_host(a,plVar3[0x56],0,0); if ((iVar2 != 1) && (iVar2 = X509_check_ip_asc(a,plVar3[0x56],0), iVar2 != 1)) { X509_free(a); (**(code **)(lVar1 + 0x50)) (plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_00167320, "Validation of SSL server certificate failed"); return 1; } X509_free(a); local_c = 0; } } } return local_c; }
26,179
ma_tls_verify_server_cert
eloqsql/libmariadb/libmariadb/secure/openssl.c
int ma_tls_verify_server_cert(MARIADB_TLS *ctls) { X509 *cert; MYSQL *mysql; SSL *ssl; MARIADB_PVIO *pvio; #if !defined(HAVE_OPENSSL_CHECK_HOST) X509_NAME *x509sn; int cn_pos; X509_NAME_ENTRY *cn_entry; ASN1_STRING *cn_asn1; const char *cn_str; #endif if (!ctls || !ctls->ssl) return 1; ssl= (SSL *)ctls->ssl; mysql= (MYSQL *)SSL_get_app_data(ssl); pvio= mysql->net.pvio; if (!mysql->host) { pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Invalid (empty) hostname"); return 1; } if (!(cert= SSL_get_peer_certificate(ssl))) { pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Unable to get server certificate"); return 1; } #ifdef HAVE_OPENSSL_CHECK_HOST if (X509_check_host(cert, mysql->host, 0, 0, 0) != 1 && X509_check_ip_asc(cert, mysql->host, 0) != 1) goto error; #else x509sn= X509_get_subject_name(cert); if ((cn_pos= X509_NAME_get_index_by_NID(x509sn, NID_commonName, -1)) < 0) goto error; if (!(cn_entry= X509_NAME_get_entry(x509sn, cn_pos))) goto error; if (!(cn_asn1 = X509_NAME_ENTRY_get_data(cn_entry))) goto error; cn_str = (char *)ASN1_STRING_data(cn_asn1); /* Make sure there is no embedded \0 in the CN */ if ((size_t)ASN1_STRING_length(cn_asn1) != strlen(cn_str)) goto error; if (strcmp(cn_str, mysql->host)) goto error; #endif X509_free(cert); return 0; error: X509_free(cert); pvio->set_error(mysql, CR_SSL_CONNECTION_ERROR, SQLSTATE_UNKNOWN, ER(CR_SSL_CONNECTION_ERROR), "Validation of SSL server certificate failed"); return 1; }
O3
c
ma_tls_verify_server_cert: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl $0x1, %r14d testq %rdi, %rdi je 0x2c248 movq 0x10(%rdi), %r15 testq %r15, %r15 je 0x2c248 movq %r15, %rdi xorl %esi, %esi callq 0x13160 movq %rax, %rbx movq (%rax), %r12 cmpq $0x0, 0x2b0(%rax) je 0x2c1ca movq %r15, %rdi callq 0x137e0 testq %rax, %rax je 0x2c1eb movq %rax, %r15 movq 0x2b0(%rbx), %rsi xorl %r14d, %r14d movq %rax, %rdi xorl %edx, %edx xorl %ecx, %ecx xorl %r8d, %r8d callq 0x13860 cmpl $0x1, %eax je 0x2c1c0 movq 0x2b0(%rbx), %rsi movq %r15, %rdi xorl %edx, %edx callq 0x13340 cmpl $0x1, %eax jne 0x2c20c movq %r15, %rdi callq 0x13240 jmp 0x2c248 leaq 0x22bbf(%rip), %rax # 0x4ed90 movq (%rax), %rdx leaq 0x22bc5(%rip), %rax # 0x4eda0 movq 0xd0(%rax), %rcx leaq 0xddcf(%rip), %r8 # 0x39fb8 jmp 0x2c233 leaq 0x22b9e(%rip), %rax # 0x4ed90 movq (%rax), %rdx leaq 0x22ba4(%rip), %rax # 0x4eda0 movq 0xd0(%rax), %rcx leaq 0xddc7(%rip), %r8 # 0x39fd1 jmp 0x2c233 movq %r15, %rdi callq 0x13240 leaq 0x22b75(%rip), %rax # 0x4ed90 movq (%rax), %rdx leaq 0x22b7b(%rip), %rax # 0x4eda0 movq 0xd0(%rax), %rcx leaq 0xddbf(%rip), %r8 # 0x39ff2 movq %rbx, %rdi movl $0x7ea, %esi # imm = 0x7EA xorl %eax, %eax callq *0x50(%r12) movl $0x1, %r14d movl %r14d, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
ma_tls_verify_server_cert: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14d, 1 test rdi, rdi jz loc_2C248 mov r15, [rdi+10h] test r15, r15 jz loc_2C248 mov rdi, r15 xor esi, esi call _SSL_get_ex_data mov rbx, rax mov r12, [rax] cmp qword ptr [rax+2B0h], 0 jz short loc_2C1CA mov rdi, r15 call _SSL_get1_peer_certificate test rax, rax jz short loc_2C1EB mov r15, rax mov rsi, [rbx+2B0h] xor r14d, r14d mov rdi, rax xor edx, edx xor ecx, ecx xor r8d, r8d call _X509_check_host cmp eax, 1 jz short loc_2C1C0 mov rsi, [rbx+2B0h] mov rdi, r15 xor edx, edx call _X509_check_ip_asc cmp eax, 1 jnz short loc_2C20C loc_2C1C0: mov rdi, r15 call _X509_free jmp short loc_2C248 loc_2C1CA: lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] lea r8, aInvalidEmptyHo; "Invalid (empty) hostname" jmp short loc_2C233 loc_2C1EB: lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] lea r8, aUnableToGetSer; "Unable to get server certificate" jmp short loc_2C233 loc_2C20C: mov rdi, r15 call _X509_free lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] lea rax, client_errors mov rcx, [rax+0D0h] lea r8, aValidationOfSs; "Validation of SSL server certificate fa"... loc_2C233: mov rdi, rbx mov esi, 7EAh xor eax, eax call qword ptr [r12+50h] mov r14d, 1 loc_2C248: mov eax, r14d pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long ma_tls_verify_server_cert(long long a1) { unsigned int v1; // r14d long long v2; // r15 long long *v3; // rbx long long v4; // r12 long long v5; // rax long long v6; // r15 char *v7; // rdx char *v8; // rcx const char *v9; // r8 v1 = 1; if ( a1 ) { v2 = *(_QWORD *)(a1 + 16); if ( v2 ) { v3 = (long long *)SSL_get_ex_data(*(_QWORD *)(a1 + 16), 0LL); v4 = *v3; if ( v3[86] ) { v5 = SSL_get1_peer_certificate(v2); if ( v5 ) { v6 = v5; v1 = 0; if ( (unsigned int)X509_check_host(v5, v3[86], 0LL, 0LL, 0LL) == 1 || (unsigned int)X509_check_ip_asc(v6, v3[86], 0LL) == 1 ) { X509_free(v6); return v1; } X509_free(v6); v7 = SQLSTATE_UNKNOWN; v8 = client_errors[26]; v9 = "Validation of SSL server certificate failed"; } else { v7 = SQLSTATE_UNKNOWN; v8 = client_errors[26]; v9 = "Unable to get server certificate"; } } else { v7 = SQLSTATE_UNKNOWN; v8 = client_errors[26]; v9 = "Invalid (empty) hostname"; } (*(void ( **)(long long *, long long, char *, char *, const char *))(v4 + 80))(v3, 2026LL, v7, v8, v9); return 1; } } return v1; }
ma_tls_verify_server_cert: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14D,0x1 TEST RDI,RDI JZ 0x0012c248 MOV R15,qword ptr [RDI + 0x10] TEST R15,R15 JZ 0x0012c248 MOV RDI,R15 XOR ESI,ESI CALL 0x00113160 MOV RBX,RAX MOV R12,qword ptr [RAX] CMP qword ptr [RAX + 0x2b0],0x0 JZ 0x0012c1ca MOV RDI,R15 CALL 0x001137e0 TEST RAX,RAX JZ 0x0012c1eb MOV R15,RAX MOV RSI,qword ptr [RBX + 0x2b0] XOR R14D,R14D MOV RDI,RAX XOR EDX,EDX XOR ECX,ECX XOR R8D,R8D CALL 0x00113860 CMP EAX,0x1 JZ 0x0012c1c0 MOV RSI,qword ptr [RBX + 0x2b0] MOV RDI,R15 XOR EDX,EDX CALL 0x00113340 CMP EAX,0x1 JNZ 0x0012c20c LAB_0012c1c0: MOV RDI,R15 CALL 0x00113240 JMP 0x0012c248 LAB_0012c1ca: LEA RAX,[0x14ed90] MOV RDX,qword ptr [RAX] LEA RAX,[0x14eda0] MOV RCX,qword ptr [RAX + 0xd0] LEA R8,[0x139fb8] JMP 0x0012c233 LAB_0012c1eb: LEA RAX,[0x14ed90] MOV RDX,qword ptr [RAX] LEA RAX,[0x14eda0] MOV RCX,qword ptr [RAX + 0xd0] LEA R8,[0x139fd1] JMP 0x0012c233 LAB_0012c20c: MOV RDI,R15 CALL 0x00113240 LEA RAX,[0x14ed90] MOV RDX,qword ptr [RAX] LEA RAX,[0x14eda0] MOV RCX,qword ptr [RAX + 0xd0] LEA R8,[0x139ff2] LAB_0012c233: MOV RDI,RBX MOV ESI,0x7ea XOR EAX,EAX CALL qword ptr [R12 + 0x50] MOV R14D,0x1 LAB_0012c248: MOV EAX,R14D POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 ma_tls_verify_server_cert(long param_1) { SSL *ssl; long lVar1; int iVar2; long *plVar3; X509 *a; char *pcVar4; if (param_1 == 0) { return 1; } ssl = *(SSL **)(param_1 + 0x10); if (ssl != (SSL *)0x0) { plVar3 = (long *)SSL_get_ex_data(ssl,0); lVar1 = *plVar3; if (plVar3[0x56] == 0) { pcVar4 = "Invalid (empty) hostname"; } else { a = (X509 *)SSL_get1_peer_certificate(ssl); if (a == (X509 *)0x0) { pcVar4 = "Unable to get server certificate"; } else { iVar2 = X509_check_host(a,plVar3[0x56],0,0,0); if ((iVar2 == 1) || (iVar2 = X509_check_ip_asc(a,plVar3[0x56],0), iVar2 == 1)) { X509_free(a); return 0; } X509_free(a); pcVar4 = "Validation of SSL server certificate failed"; } } (**(code **)(lVar1 + 0x50)) (plVar3,0x7ea,SQLSTATE_UNKNOWN,PTR_s_TLS_SSL_error_____100s_0014ee70,pcVar4); return 1; } return 1; }
26,180
coro::detail::promise<void>::unhandled_exception()
AlayaLite/build_O3/_deps/libcoro-src/include/coro/task.hpp
auto unhandled_exception() noexcept -> void { m_exception_ptr = std::current_exception(); }
O3
cpp
coro::detail::promise<void>::unhandled_exception(): pushq %r14 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x3270 movq (%r14), %rax movq $0x0, (%r14) movq 0x8(%rbx), %rcx movq %rcx, 0x10(%rsp) movq %rax, 0x8(%rbx) testq %rcx, %rcx je 0x413b leaq 0x10(%rsp), %rdi callq 0x31f0 cmpq $0x0, 0x8(%rsp) je 0x413b leaq 0x8(%rsp), %rdi callq 0x31f0 addq $0x18, %rsp popq %rbx popq %r14 retq nop
_ZN4coro6detail7promiseIvE19unhandled_exceptionEv: push r14 push rbx sub rsp, 18h mov rbx, rdi lea r14, [rsp+28h+var_20] mov rdi, r14 call __ZSt17current_exceptionv; std::current_exception(void) mov rax, [r14] mov qword ptr [r14], 0 mov rcx, [rbx+8] mov [rsp+28h+var_18], rcx mov [rbx+8], rax test rcx, rcx jz short loc_413B lea rdi, [rsp+28h+var_18]; this call __ZNSt15__exception_ptr13exception_ptr10_M_releaseEv; std::__exception_ptr::exception_ptr::_M_release(void) cmp [rsp+28h+var_20], 0 jz short loc_413B lea rdi, [rsp+28h+var_20]; this call __ZNSt15__exception_ptr13exception_ptr10_M_releaseEv; std::__exception_ptr::exception_ptr::_M_release(void) loc_413B: add rsp, 18h pop rbx pop r14 retn
long long coro::detail::promise<void>::unhandled_exception(long long a1) { long long result; // rax long long v2; // rcx long long v3; // [rsp+8h] [rbp-20h] BYREF _QWORD v4[3]; // [rsp+10h] [rbp-18h] BYREF std::current_exception(); result = v3; v3 = 0LL; v4[0] = *(_QWORD *)(a1 + 8); v2 = v4[0]; *(_QWORD *)(a1 + 8) = result; if ( v2 ) { result = std::__exception_ptr::exception_ptr::_M_release((std::__exception_ptr::exception_ptr *)v4); if ( v3 ) return std::__exception_ptr::exception_ptr::_M_release((std::__exception_ptr::exception_ptr *)&v3); } return result; }
unhandled_exception: PUSH R14 PUSH RBX SUB RSP,0x18 MOV RBX,RDI LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00103270 MOV RAX,qword ptr [R14] MOV qword ptr [R14],0x0 MOV RCX,qword ptr [RBX + 0x8] MOV qword ptr [RSP + 0x10],RCX MOV qword ptr [RBX + 0x8],RAX TEST RCX,RCX JZ 0x0010413b LEA RDI,[RSP + 0x10] CALL 0x001031f0 CMP qword ptr [RSP + 0x8],0x0 JZ 0x0010413b LEA RDI,[RSP + 0x8] CALL 0x001031f0 LAB_0010413b: ADD RSP,0x18 POP RBX POP R14 RET
/* WARNING: Removing unreachable block (ram,0x00104131) */ /* coro::detail::promise<void>::unhandled_exception() */ void __thiscall coro::detail::promise<void>::unhandled_exception(promise<void> *this) { long lVar1; int8 local_20; std::current_exception(); lVar1 = *(long *)(this + 8); *(int8 *)(this + 8) = local_20; if (lVar1 != 0) { std::__exception_ptr::exception_ptr::_M_release(); } return; }
26,181
string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int>> const&)
monkey531[P]llama/common/common.cpp
std::string string_from(const struct llama_context * ctx, const std::vector<llama_token> & tokens) { std::stringstream buf; buf << "[ "; bool first = true; for (const auto & token : tokens) { if (!first) { buf << ", "; } else { first = false; } auto detokenized = common_token_to_piece(ctx, token); detokenized.erase( std::remove_if( detokenized.begin(), detokenized.end(), [](const unsigned char c) { return !std::isprint(c); }), detokenized.end()); buf << "'" << detokenized << "'" << ":" << std::to_string(token); } buf << " ]"; return buf.str(); }
O3
cpp
string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x1e8, %rsp # imm = 0x1E8 movq %rdx, %rbx movq %rsi, 0x58(%rsp) movq %rdi, 0x48(%rsp) leaq 0x60(%rsp), %rdi callq 0x184c0 leaq 0x70(%rsp), %r14 leaq 0x89102(%rip), %rsi # 0xa8fd5 movl $0x2, %edx movq %r14, %rdi callq 0x18770 movq (%rbx), %r13 movq 0x8(%rbx), %rax movq %rax, 0x50(%rsp) cmpq %rax, %r13 je 0x201ad movb $0x1, %al testb $0x1, %al jne 0x1ff0f movl $0x2, %edx movq %r14, %rdi leaq 0x883d1(%rip), %rsi # 0xa82db callq 0x18770 movl (%r13), %ebx movq 0x58(%rsp), %rdi callq 0x185c0 movq %rax, %rdi callq 0x18d40 leaq 0x8(%rsp), %rdi movq %rax, %rsi movl %ebx, %edx movl $0x1, %ecx callq 0x23049 movq 0x8(%rsp), %r15 movq 0x10(%rsp), %rax leaq (%r15,%rax), %rbx movq %rax, %r14 sarq $0x2, %r14 movq %r15, %rbp testq %r14, %r14 jle 0x1ffb7 andq $-0x4, %rax movq %rax, %rbp addq %r15, %rbp incq %r14 leaq 0x3(%r15), %r12 movzbl -0x3(%r12), %edi callq 0x18bd0 testl %eax, %eax je 0x2000c movzbl -0x2(%r12), %edi callq 0x18bd0 testl %eax, %eax je 0x20012 movzbl -0x1(%r12), %edi callq 0x18bd0 testl %eax, %eax je 0x20018 movzbl (%r12), %edi callq 0x18bd0 testl %eax, %eax je 0x2001b decq %r14 addq $0x4, %r12 cmpq $0x1, %r14 jg 0x1ff67 movq %rbx, %rax subq %rbp, %rax cmpq $0x1, %rax je 0x1fff8 cmpq $0x2, %rax leaq 0x70(%rsp), %r14 je 0x1ffe8 cmpq $0x3, %rax jne 0x201a5 movzbl (%rbp), %edi callq 0x18bd0 testl %eax, %eax je 0x20007 incq %rbp movzbl (%rbp), %edi callq 0x18bd0 testl %eax, %eax je 0x20007 incq %rbp movzbl (%rbp), %edi callq 0x18bd0 testl %eax, %eax cmovneq %rbx, %rbp movq %rbp, %r12 jmp 0x2001b addq $-0x3, %r12 jmp 0x2001b addq $-0x2, %r12 jmp 0x2001b decq %r12 cmpq %rbx, %r12 sete %al leaq 0x1(%r12), %r14 cmpq %rbx, %r14 sete %cl orb %al, %cl jne 0x20054 movb (%r14), %bpl movzbl %bpl, %edi callq 0x18bd0 testl %eax, %eax je 0x20047 movb %bpl, (%r12) incq %r12 incq %r14 cmpq %rbx, %r14 jne 0x20030 movq 0x8(%rsp), %r15 leaq 0x70(%rsp), %r14 movq %r12, %rax subq %r15, %rax movq %rax, 0x10(%rsp) movb $0x0, (%r12) movl $0x1, %edx movq %r14, %rdi leaq 0x8bdff(%rip), %rsi # 0xabe77 callq 0x18770 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx movq %r14, %rdi callq 0x18770 movq %rax, %r12 movl $0x1, %edx movq %rax, %rdi leaq 0x8bdd6(%rip), %rsi # 0xabe77 callq 0x18770 movl $0x1, %edx movq %r12, %rdi leaq 0x89a20(%rip), %rsi # 0xa9ad5 callq 0x18770 movl (%r13), %ebp movl %ebp, %ebx negl %ebx cmovsl %ebp, %ebx movl $0x1, %r15d cmpl $0xa, %ebx jb 0x20116 movl $0x4, %r15d movl %ebx, %eax cmpl $0x63, %eax jbe 0x2010d cmpl $0x3e7, %eax # imm = 0x3E7 jbe 0x20113 cmpl $0x2710, %eax # imm = 0x2710 jb 0x20116 movl %eax, %ecx movl $0xd1b71759, %edx # imm = 0xD1B71759 imulq %rdx, %rcx shrq $0x2d, %rcx addl $0x4, %r15d cmpl $0x1869f, %eax # imm = 0x1869F movl %ecx, %eax ja 0x200d8 addl $-0x3, %r15d jmp 0x20116 addl $-0x2, %r15d jmp 0x20116 decl %r15d shrl $0x1f, %ebp leal (%r15,%rbp), %esi leaq 0x38(%rsp), %rax movq %rax, 0x28(%rsp) leaq 0x28(%rsp), %rdi movl $0x2d, %edx callq 0x187a0 addq 0x28(%rsp), %rbp movq %rbp, %rdi movl %r15d, %esi movl %ebx, %edx callq 0x2c347 movq 0x28(%rsp), %rsi movq 0x30(%rsp), %rdx movq %r12, %rdi callq 0x18770 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x20176 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x20192 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 addq $0x4, %r13 xorl %eax, %eax cmpq 0x50(%rsp), %r13 jne 0x1fef7 jmp 0x201ad movq %rbx, %r12 jmp 0x20059 leaq 0x88e24(%rip), %rsi # 0xa8fd8 movl $0x2, %edx movq %r14, %rdi callq 0x18770 movq 0x48(%rsp), %rbx leaq 0x78(%rsp), %rsi movq %rbx, %rdi callq 0x18a60 movq 0xbdd5e(%rip), %rsi # 0xddf38 leaq 0x60(%rsp), %rdi callq 0x18500 leaq 0xe0(%rsp), %rdi callq 0x18200 movq %rbx, %rax addq $0x1e8, %rsp # imm = 0x1E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x2022f jmp 0x2022f jmp 0x2022f jmp 0x20234 movq %rax, %rbx movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x20237 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 jmp 0x20237 movq %rax, %rbx jmp 0x20253 movq %rax, %rbx movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x20253 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 movq 0xbdcde(%rip), %rsi # 0xddf38 leaq 0x60(%rsp), %rdi callq 0x18500 leaq 0xe0(%rsp), %rdi callq 0x18200 movq %rbx, %rdi callq 0x18bc0
_Z11string_fromB5cxx11PK13llama_contextRKSt6vectorIiSaIiEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 1E8h mov rbx, rdx mov [rsp+218h+var_1C0], rsi mov [rsp+218h+var_1D0], rdi lea rdi, [rsp+218h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(void) lea r14, [rsp+218h+var_1A8] lea rsi, asc_A8FD5; "[ " mov edx, 2 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r13, [rbx] mov rax, [rbx+8] mov [rsp+218h+var_1C8], rax cmp r13, rax jz loc_201AD mov al, 1 loc_1FEF7: test al, 1 jnz short loc_1FF0F mov edx, 2 mov rdi, r14 lea rsi, a6dS+8; ", " call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) loc_1FF0F: mov ebx, [r13+0] mov rdi, [rsp+218h+var_1C0] call _llama_get_model mov rdi, rax call _llama_model_get_vocab lea rdi, [rsp+218h+var_210] mov rsi, rax mov edx, ebx mov ecx, 1 call _Z21common_token_to_pieceB5cxx11PK11llama_vocabib; common_token_to_piece(llama_vocab const*,int,bool) mov r15, [rsp+218h+var_210] mov rax, [rsp+218h+var_208] lea rbx, [r15+rax] mov r14, rax sar r14, 2 mov rbp, r15 test r14, r14 jle short loc_1FFB7 and rax, 0FFFFFFFFFFFFFFFCh mov rbp, rax add rbp, r15 inc r14 lea r12, [r15+3] loc_1FF67: movzx edi, byte ptr [r12-3] call _isprint test eax, eax jz loc_2000C movzx edi, byte ptr [r12-2] call _isprint test eax, eax jz loc_20012 movzx edi, byte ptr [r12-1] call _isprint test eax, eax jz short loc_20018 movzx edi, byte ptr [r12] call _isprint test eax, eax jz short loc_2001B dec r14 add r12, 4 cmp r14, 1 jg short loc_1FF67 loc_1FFB7: mov rax, rbx sub rax, rbp cmp rax, 1 jz short loc_1FFF8 cmp rax, 2 lea r14, [rsp+218h+var_1A8] jz short loc_1FFE8 cmp rax, 3 jnz loc_201A5 movzx edi, byte ptr [rbp+0] call _isprint test eax, eax jz short loc_20007 inc rbp loc_1FFE8: movzx edi, byte ptr [rbp+0] call _isprint test eax, eax jz short loc_20007 inc rbp loc_1FFF8: movzx edi, byte ptr [rbp+0] call _isprint loc_20001: test eax, eax cmovnz rbp, rbx loc_20007: mov r12, rbp jmp short loc_2001B loc_2000C: add r12, 0FFFFFFFFFFFFFFFDh jmp short loc_2001B loc_20012: add r12, 0FFFFFFFFFFFFFFFEh jmp short loc_2001B loc_20018: dec r12 loc_2001B: cmp r12, rbx setz al lea r14, [r12+1] cmp r14, rbx setz cl or cl, al jnz short loc_20054 loc_20030: mov bpl, [r14] movzx edi, bpl call _isprint test eax, eax jz short loc_20047 mov [r12], bpl inc r12 loc_20047: inc r14 cmp r14, rbx jnz short loc_20030 mov r15, [rsp+218h+var_210] loc_20054: lea r14, [rsp+218h+var_1A8] loc_20059: mov rax, r12 sub rax, r15 mov [rsp+218h+var_208], rax mov byte ptr [r12], 0 mov edx, 1 mov rdi, r14 lea rsi, aLastRead+0Dh; "'" call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rsi, [rsp+218h+var_210] mov rdx, [rsp+218h+var_208] mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov r12, rax mov edx, 1 mov rdi, rax lea rsi, aLastRead+0Dh; "'" call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov edx, 1 mov rdi, r12 lea rsi, aArgumentNeedle_0+11h; ":" call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov ebp, [r13+0] mov ebx, ebp neg ebx cmovs ebx, ebp mov r15d, 1 cmp ebx, 0Ah jb short loc_20116 mov r15d, 4 mov eax, ebx loc_200D8: cmp eax, 63h ; 'c' jbe short loc_2010D cmp eax, 3E7h jbe short loc_20113 cmp eax, 2710h jb short loc_20116 mov ecx, eax mov edx, 0D1B71759h imul rcx, rdx shr rcx, 2Dh add r15d, 4 cmp eax, 1869Fh mov eax, ecx ja short loc_200D8 add r15d, 0FFFFFFFDh jmp short loc_20116 loc_2010D: add r15d, 0FFFFFFFEh jmp short loc_20116 loc_20113: dec r15d loc_20116: shr ebp, 1Fh lea esi, [r15+rbp] lea rax, [rsp+218h+var_1E0] mov [rsp+218h+var_1F0], rax lea rdi, [rsp+218h+var_1F0] mov edx, 2Dh ; '-' call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) add rbp, [rsp+218h+var_1F0] mov rdi, rbp mov esi, r15d mov edx, ebx call _ZNSt8__detail18__to_chars_10_implIjEEvPcjT_; std::__detail::__to_chars_10_impl<uint>(char *,uint,uint) mov rsi, [rsp+218h+var_1F0] mov rdx, [rsp+218h+var_1E8] mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, [rsp+218h+var_1F0]; void * lea rax, [rsp+218h+var_1E0] cmp rdi, rax jz short loc_20176 mov rsi, [rsp+218h+var_1E0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_20176: mov rdi, [rsp+218h+var_210]; void * lea rax, [rsp+218h+var_200] cmp rdi, rax jz short loc_20192 mov rsi, [rsp+218h+var_200] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_20192: add r13, 4 xor eax, eax cmp r13, [rsp+218h+var_1C8] jnz loc_1FEF7 jmp short loc_201AD loc_201A5: mov r12, rbx jmp loc_20059 loc_201AD: lea rsi, asc_A8FD8; " ]" mov edx, 2 mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rbx, [rsp+218h+var_1D0] lea rsi, [rsp+218h+var_1A0] mov rdi, rbx call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+218h+var_1B8] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+218h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rax, rbx add rsp, 1E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_2022F jmp short loc_2022F jmp short loc_2022F jmp short loc_20234 mov rbx, rax mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_20237 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_20237 loc_2022F: mov rbx, rax jmp short loc_20253 loc_20234: mov rbx, rax loc_20237: mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_20253 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_20253: mov rsi, cs:_ZTTNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_58] call __ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEED2Ev; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream() lea rdi, [rsp+arg_D8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, rbx call __Unwind_Resume
long long string_from[abi:cxx11](long long a1, long long a2, unsigned int **a3) { unsigned int *v4; // r13 char v5; // al unsigned int v6; // ebx long long model; // rax long long vocab; // rax _BYTE *v9; // r15 char *v10; // rbx char *v11; // rbp long long v12; // r14 char *v13; // r12 signed long long v14; // rax char *v15; // r14 char v16; // bp long long v17; // r12 unsigned int v18; // ebx unsigned int v19; // r15d unsigned int v20; // eax bool v21; // cc unsigned int v22; // ebp long long v23; // rbx void *v25; // [rsp+8h] [rbp-210h] BYREF long long v26; // [rsp+10h] [rbp-208h] long long v27; // [rsp+18h] [rbp-200h] BYREF void *v28[2]; // [rsp+28h] [rbp-1F0h] BYREF _QWORD v29[2]; // [rsp+38h] [rbp-1E0h] BYREF long long v30; // [rsp+48h] [rbp-1D0h] unsigned int *v31; // [rsp+50h] [rbp-1C8h] long long v32; // [rsp+58h] [rbp-1C0h] _BYTE v33[16]; // [rsp+60h] [rbp-1B8h] BYREF char v34[8]; // [rsp+70h] [rbp-1A8h] BYREF char v35[104]; // [rsp+78h] [rbp-1A0h] BYREF char v36[312]; // [rsp+E0h] [rbp-138h] BYREF v32 = a2; v30 = a1; std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream(v33); std::__ostream_insert<char,std::char_traits<char>>(v34, "[ ", 2LL); v4 = *a3; v31 = a3[1]; if ( v4 != v31 ) { v5 = 1; while ( 1 ) { if ( (v5 & 1) == 0 ) std::__ostream_insert<char,std::char_traits<char>>(v34, ", ", 2LL); v6 = *v4; model = llama_get_model(v32); vocab = llama_model_get_vocab(model); common_token_to_piece[abi:cxx11](&v25, vocab, v6, 1LL); v9 = v25; v10 = (char *)v25 + v26; v11 = (char *)v25; if ( v26 >> 2 > 0 ) break; LABEL_12: v14 = v10 - v11; if ( v10 - v11 == 1 ) goto LABEL_19; if ( v14 == 2 ) goto LABEL_17; if ( v14 == 3 ) { if ( (unsigned int)isprint((unsigned __int8)*v11) ) { ++v11; LABEL_17: if ( (unsigned int)isprint((unsigned __int8)*v11) ) { ++v11; LABEL_19: if ( (unsigned int)isprint((unsigned __int8)*v11) ) v11 = v10; } } v13 = v11; LABEL_25: v15 = v13 + 1; if ( v13 != v10 && v13 + 1 != v10 ) { do { v16 = *v15; if ( (unsigned int)isprint((unsigned __int8)*v15) ) *v13++ = v16; ++v15; } while ( v15 != v10 ); v9 = v25; } goto LABEL_30; } v13 = v10; LABEL_30: v26 = v13 - v9; *v13 = 0; std::__ostream_insert<char,std::char_traits<char>>(v34, "'", 1LL); v17 = std::__ostream_insert<char,std::char_traits<char>>(v34, v25, v26); std::__ostream_insert<char,std::char_traits<char>>(v17, "'", 1LL); std::__ostream_insert<char,std::char_traits<char>>(v17, ":", 1LL); v18 = -*v4; if ( (int)*v4 > 0 ) v18 = *v4; v19 = 1; if ( v18 >= 0xA ) { v19 = 4; v20 = v18; while ( 1 ) { if ( v20 <= 0x63 ) { v19 -= 2; goto LABEL_41; } if ( v20 <= 0x3E7 ) break; if ( v20 < 0x2710 ) goto LABEL_41; v19 += 4; v21 = v20 <= 0x1869F; v20 /= 0x2710u; if ( v21 ) { v19 -= 3; goto LABEL_41; } } --v19; } LABEL_41: v22 = *v4 >> 31; v28[0] = v29; std::string::_M_construct(v28, v19 + v22, 45LL); std::__detail::__to_chars_10_impl<unsigned int>((char *)v28[0] + v22, v19, v18); std::__ostream_insert<char,std::char_traits<char>>(v17, v28[0], v28[1]); if ( v28[0] != v29 ) operator delete(v28[0], v29[0] + 1LL); if ( v25 != &v27 ) operator delete(v25, v27 + 1); ++v4; v5 = 0; if ( v4 == v31 ) goto LABEL_48; } v11 = (char *)v25 + (v26 & 0xFFFFFFFFFFFFFFFCLL); v12 = (v26 >> 2) + 1; v13 = (char *)v25 + 3; while ( 1 ) { if ( !(unsigned int)isprint((unsigned __int8)*(v13 - 3)) ) { v13 -= 3; goto LABEL_25; } if ( !(unsigned int)isprint((unsigned __int8)*(v13 - 2)) ) { v13 -= 2; goto LABEL_25; } if ( !(unsigned int)isprint((unsigned __int8)*(v13 - 1)) ) break; if ( !(unsigned int)isprint((unsigned __int8)*v13) ) goto LABEL_25; --v12; v13 += 4; if ( v12 <= 1 ) goto LABEL_12; } --v13; goto LABEL_25; } LABEL_48: std::__ostream_insert<char,std::char_traits<char>>(v34, " ]", 2LL); v23 = v30; std::stringbuf::str(v30, v35); std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream( v33, &`VTT for'std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>); std::ios_base::~ios_base((std::ios_base *)v36); return v23; }
string_from[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x1e8 MOV RBX,RDX MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x48],RDI LEA RDI,[RSP + 0x60] CALL 0x001184c0 LEA R14,[RSP + 0x70] LAB_0011fecc: LEA RSI,[0x1a8fd5] MOV EDX,0x2 MOV RDI,R14 CALL 0x00118770 MOV R13,qword ptr [RBX] MOV RAX,qword ptr [RBX + 0x8] MOV qword ptr [RSP + 0x50],RAX CMP R13,RAX JZ 0x001201ad MOV AL,0x1 LAB_0011fef7: TEST AL,0x1 JNZ 0x0011ff0f LAB_0011fefb: MOV EDX,0x2 MOV RDI,R14 LEA RSI,[0x1a82db] CALL 0x00118770 LAB_0011ff0f: MOV EBX,dword ptr [R13] LAB_0011ff13: MOV RDI,qword ptr [RSP + 0x58] CALL 0x001185c0 MOV RDI,RAX CALL 0x00118d40 LEA RDI,[RSP + 0x8] MOV RSI,RAX MOV EDX,EBX MOV ECX,0x1 CALL 0x00123049 MOV R15,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x10] LEA RBX,[R15 + RAX*0x1] MOV R14,RAX SAR R14,0x2 MOV RBP,R15 TEST R14,R14 JLE 0x0011ffb7 AND RAX,-0x4 MOV RBP,RAX ADD RBP,R15 INC R14 LEA R12,[R15 + 0x3] LAB_0011ff67: MOVZX EDI,byte ptr [R12 + -0x3] CALL 0x00118bd0 TEST EAX,EAX JZ 0x0012000c MOVZX EDI,byte ptr [R12 + -0x2] CALL 0x00118bd0 TEST EAX,EAX JZ 0x00120012 MOVZX EDI,byte ptr [R12 + -0x1] CALL 0x00118bd0 TEST EAX,EAX JZ 0x00120018 MOVZX EDI,byte ptr [R12] CALL 0x00118bd0 TEST EAX,EAX JZ 0x0012001b DEC R14 ADD R12,0x4 CMP R14,0x1 JG 0x0011ff67 LAB_0011ffb7: MOV RAX,RBX SUB RAX,RBP CMP RAX,0x1 JZ 0x0011fff8 CMP RAX,0x2 LEA R14,[RSP + 0x70] JZ 0x0011ffe8 CMP RAX,0x3 JNZ 0x001201a5 MOVZX EDI,byte ptr [RBP] CALL 0x00118bd0 TEST EAX,EAX JZ 0x00120007 INC RBP LAB_0011ffe8: MOVZX EDI,byte ptr [RBP] CALL 0x00118bd0 TEST EAX,EAX JZ 0x00120007 INC RBP LAB_0011fff8: MOVZX EDI,byte ptr [RBP] CALL 0x00118bd0 TEST EAX,EAX CMOVNZ RBP,RBX LAB_00120007: MOV R12,RBP JMP 0x0012001b LAB_0012000c: ADD R12,-0x3 JMP 0x0012001b LAB_00120012: ADD R12,-0x2 JMP 0x0012001b LAB_00120018: DEC R12 LAB_0012001b: CMP R12,RBX SETZ AL LEA R14,[R12 + 0x1] CMP R14,RBX SETZ CL OR CL,AL JNZ 0x00120054 LAB_00120030: MOV BPL,byte ptr [R14] MOVZX EDI,BPL CALL 0x00118bd0 TEST EAX,EAX JZ 0x00120047 MOV byte ptr [R12],BPL INC R12 LAB_00120047: INC R14 CMP R14,RBX JNZ 0x00120030 MOV R15,qword ptr [RSP + 0x8] LAB_00120054: LEA R14,[RSP + 0x70] LAB_00120059: MOV RAX,R12 SUB RAX,R15 MOV qword ptr [RSP + 0x10],RAX MOV byte ptr [R12],0x0 LAB_00120069: MOV EDX,0x1 MOV RDI,R14 LEA RSI,[0x1abe77] CALL 0x00118770 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] MOV RDI,R14 CALL 0x00118770 MOV R12,RAX MOV EDX,0x1 MOV RDI,RAX LEA RSI,[0x1abe77] CALL 0x00118770 MOV EDX,0x1 MOV RDI,R12 LEA RSI,[0x1a9ad5] CALL 0x00118770 MOV EBP,dword ptr [R13] MOV EBX,EBP NEG EBX CMOVS EBX,EBP MOV R15D,0x1 CMP EBX,0xa JC 0x00120116 MOV R15D,0x4 MOV EAX,EBX LAB_001200d8: CMP EAX,0x63 JBE 0x0012010d CMP EAX,0x3e7 JBE 0x00120113 CMP EAX,0x2710 JC 0x00120116 MOV ECX,EAX MOV EDX,0xd1b71759 IMUL RCX,RDX SHR RCX,0x2d ADD R15D,0x4 CMP EAX,0x1869f MOV EAX,ECX JA 0x001200d8 ADD R15D,-0x3 JMP 0x00120116 LAB_0012010d: ADD R15D,-0x2 JMP 0x00120116 LAB_00120113: DEC R15D LAB_00120116: SHR EBP,0x1f LEA ESI,[R15 + RBP*0x1] LEA RAX,[RSP + 0x38] MOV qword ptr [RSP + 0x28],RAX LAB_00120127: LEA RDI,[RSP + 0x28] MOV EDX,0x2d CALL 0x001187a0 ADD RBP,qword ptr [RSP + 0x28] MOV RDI,RBP MOV ESI,R15D MOV EDX,EBX CALL 0x0012c347 MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x30] LAB_00120152: MOV RDI,R12 CALL 0x00118770 MOV RDI,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x38] CMP RDI,RAX JZ 0x00120176 MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_00120176: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x00120192 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_00120192: ADD R13,0x4 XOR EAX,EAX CMP R13,qword ptr [RSP + 0x50] JNZ 0x0011fef7 JMP 0x001201ad LAB_001201a5: MOV R12,RBX JMP 0x00120059 LAB_001201ad: LEA RSI,[0x1a8fd8] MOV EDX,0x2 MOV RDI,R14 CALL 0x00118770 MOV RBX,qword ptr [RSP + 0x48] LEA RSI,[RSP + 0x78] MOV RDI,RBX CALL 0x00118a60 LAB_001201d3: MOV RSI,qword ptr [0x001ddf38] LEA RDI,[RSP + 0x60] CALL 0x00118500 LEA RDI,[RSP + 0xe0] CALL 0x00118200 MOV RAX,RBX ADD RSP,0x1e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* string_from[abi:cxx11](llama_context const*, std::vector<int, std::allocator<int> > const&) */ llama_context * string_from_abi_cxx11_(llama_context *param_1,vector *param_2) { byte *pbVar1; byte bVar2; uint uVar3; uint uVar4; llama_context *plVar5; uint uVar6; bool bVar7; int iVar8; uint uVar9; int8 uVar10; ostream *poVar11; ulong uVar12; int8 *in_RDX; byte *pbVar13; byte *pbVar14; uint *puVar15; long lVar16; uint uVar17; byte *pbVar18; byte *local_210; ulong local_208; long local_200 [2]; long *local_1f0; long local_1e8; long local_1e0 [2]; llama_context *local_1d0; uint *local_1c8; vector *local_1c0; stringstream local_1b8 [16]; ostream local_1a8 [112]; ios_base local_138 [264]; local_1d0 = param_1; local_1c0 = param_2; std::__cxx11::stringstream::stringstream(local_1b8); /* try { // try from 0011fecc to 0011fedf has its CatchHandler @ 00120206 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"[ ",2); puVar15 = (uint *)*in_RDX; local_1c8 = (uint *)in_RDX[1]; if (puVar15 != local_1c8) { bVar7 = true; do { if (!bVar7) { /* try { // try from 0011fefb to 0011ff0e has its CatchHandler @ 0012020a */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,", ",2); } uVar3 = *puVar15; /* try { // try from 0011ff13 to 0011ff38 has its CatchHandler @ 0012022f */ uVar10 = llama_get_model(local_1c0); iVar8 = llama_model_get_vocab(uVar10); common_token_to_piece_abi_cxx11_((llama_vocab *)&local_210,iVar8,SUB41(uVar3,0)); pbVar18 = local_210; pbVar1 = local_210 + local_208; pbVar13 = local_210; if (0 < (long)local_208 >> 2) { pbVar13 = local_210 + (local_208 & 0xfffffffffffffffc); lVar16 = ((long)local_208 >> 2) + 1; pbVar14 = local_210 + 3; do { iVar8 = isprint((uint)pbVar14[-3]); if (iVar8 == 0) { pbVar14 = pbVar14 + -3; goto LAB_0012001b; } iVar8 = isprint((uint)pbVar14[-2]); if (iVar8 == 0) { pbVar14 = pbVar14 + -2; goto LAB_0012001b; } iVar8 = isprint((uint)pbVar14[-1]); if (iVar8 == 0) { pbVar14 = pbVar14 + -1; goto LAB_0012001b; } iVar8 = isprint((uint)*pbVar14); if (iVar8 == 0) goto LAB_0012001b; lVar16 = lVar16 + -1; pbVar14 = pbVar14 + 4; } while (1 < lVar16); } lVar16 = (long)pbVar1 - (long)pbVar13; if (lVar16 == 1) { LAB_0011fff8: iVar8 = isprint((uint)*pbVar13); pbVar14 = pbVar13; if (iVar8 != 0) { pbVar14 = pbVar1; } LAB_0012001b: pbVar13 = pbVar14 + 1; if (pbVar13 != pbVar1 && pbVar14 != pbVar1) { do { bVar2 = *pbVar13; iVar8 = isprint((uint)bVar2); if (iVar8 != 0) { *pbVar14 = bVar2; pbVar14 = pbVar14 + 1; } pbVar13 = pbVar13 + 1; pbVar18 = local_210; } while (pbVar13 != pbVar1); } } else { if (lVar16 == 2) { LAB_0011ffe8: iVar8 = isprint((uint)*pbVar13); pbVar14 = pbVar13; if (iVar8 != 0) { pbVar13 = pbVar13 + 1; goto LAB_0011fff8; } goto LAB_0012001b; } pbVar14 = pbVar1; if (lVar16 == 3) { iVar8 = isprint((uint)*pbVar13); pbVar14 = pbVar13; if (iVar8 != 0) { pbVar13 = pbVar13 + 1; goto LAB_0011ffe8; } goto LAB_0012001b; } } local_208 = (long)pbVar14 - (long)pbVar18; *pbVar14 = 0; /* try { // try from 00120069 to 001200b9 has its CatchHandler @ 00120234 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8,"\'",1); poVar11 = std::__ostream_insert<char,std::char_traits<char>> (local_1a8,(char *)local_210,local_208); std::__ostream_insert<char,std::char_traits<char>>(poVar11,"\'",1); std::__ostream_insert<char,std::char_traits<char>>(poVar11,":",1); uVar3 = *puVar15; uVar4 = -uVar3; if (0 < (int)uVar3) { uVar4 = uVar3; } uVar17 = 1; if (9 < uVar4) { uVar12 = (ulong)uVar4; uVar6 = 4; do { uVar17 = uVar6; uVar9 = (uint)uVar12; if (uVar9 < 100) { uVar17 = uVar17 - 2; goto LAB_00120116; } if (uVar9 < 1000) { uVar17 = uVar17 - 1; goto LAB_00120116; } if (uVar9 < 10000) goto LAB_00120116; uVar12 = uVar12 / 10000; uVar6 = uVar17 + 4; } while (99999 < uVar9); uVar17 = uVar17 + 1; } LAB_00120116: local_1f0 = local_1e0; /* try { // try from 00120127 to 00120135 has its CatchHandler @ 0012020c */ std::__cxx11::string::_M_construct ((ulong)&local_1f0,(char)uVar17 - (char)((int)uVar3 >> 0x1f)); std::__detail::__to_chars_10_impl<unsigned_int> ((char *)((long)local_1f0 + (ulong)(uVar3 >> 0x1f)),uVar17,uVar4); /* try { // try from 00120152 to 00120159 has its CatchHandler @ 0012020e */ std::__ostream_insert<char,std::char_traits<char>>(poVar11,(char *)local_1f0,local_1e8); if (local_1f0 != local_1e0) { operator_delete(local_1f0,local_1e0[0] + 1); } if (local_210 != (byte *)local_200) { operator_delete(local_210,local_200[0] + 1); } puVar15 = puVar15 + 1; bVar7 = false; } while (puVar15 != local_1c8); } /* try { // try from 001201ad to 001201d2 has its CatchHandler @ 00120208 */ std::__ostream_insert<char,std::char_traits<char>>(local_1a8," ]",2); plVar5 = local_1d0; std::__cxx11::stringbuf::str(); std::__cxx11::stringstream::~stringstream(local_1b8); std::ios_base::~ios_base(local_138); return plVar5; }
26,182
nlohmann::json_abi_v3_11_3::detail::other_error nlohmann::json_abi_v3_11_3::detail::other_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t)
monkey531[P]llama/common/json.hpp
static other_error create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("other_error", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::other_error nlohmann::json_abi_v3_11_3::detail::other_error::create<std::nullptr_t, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::nullptr_t): subq $0xd8, %rsp movq %rdi, 0x8(%rsp) movq %rdi, %rax movq %rax, 0x10(%rsp) movq %rdi, 0xd0(%rsp) movl %esi, 0xcc(%rsp) movq %rdx, 0xc0(%rsp) movq %rcx, 0xb8(%rsp) leaq 0x57(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x5b0d0 movq 0x18(%rsp), %rdx leaq 0x16c5f6(%rip), %rsi # 0x20eb34 leaq 0x58(%rsp), %rdi callq 0x62190 jmp 0xa254a movl 0xcc(%rsp), %edx leaq 0x78(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0xa4080 jmp 0xa2562 xorl %eax, %eax movl %eax, %esi leaq 0x20(%rsp), %rdi callq 0xa4120 jmp 0xa2572 movq 0xc0(%rsp), %rcx leaq 0x98(%rsp), %rdi leaq 0x78(%rsp), %rsi leaq 0x20(%rsp), %rdx callq 0xa3fc0 jmp 0xa2593 leaq 0x20(%rsp), %rdi callq 0x5b568 leaq 0x78(%rsp), %rdi callq 0x5b568 leaq 0x58(%rsp), %rdi callq 0x5b568 leaq 0x57(%rsp), %rdi callq 0x5b540 movl 0xcc(%rsp), %eax movl %eax, 0x4(%rsp) leaq 0x98(%rsp), %rdi callq 0x5a1c0 movq 0x8(%rsp), %rdi movl 0x4(%rsp), %esi movq %rax, %rdx callq 0xa41a0 jmp 0xa25e6 leaq 0x98(%rsp), %rdi callq 0x5b568 movq 0x10(%rsp), %rax addq $0xd8, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0xa265c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0xa2652 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) jmp 0xa2648 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) leaq 0x20(%rsp), %rdi callq 0x5b568 leaq 0x78(%rsp), %rdi callq 0x5b568 leaq 0x58(%rsp), %rdi callq 0x5b568 leaq 0x57(%rsp), %rdi callq 0x5b540 jmp 0xa2683 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x48(%rsp) movl %eax, 0x44(%rsp) leaq 0x98(%rsp), %rdi callq 0x5b568 movq 0x48(%rsp), %rdi callq 0x5abc0 nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: sub rsp, 0D8h mov [rsp+0D8h+var_D0], rdi; int mov rax, rdi mov qword ptr [rsp+0D8h+var_C8], rax; int mov [rsp+0D8h+var_8], rdi mov [rsp+0D8h+var_C], esi mov qword ptr [rsp+0D8h+var_18], rdx mov [rsp+0D8h+var_20], rcx lea rdi, [rsp+0D8h+var_81] mov qword ptr [rsp+0D8h+var_C0], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+0D8h+var_C0] lea rsi, aOtherError; "other_error" lea rdi, [rsp+0D8h+var_81+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_A254A: mov edx, [rsp+0D8h+var_C] lea rdi, [rsp+0D8h+var_60]; int lea rsi, [rsp+0D8h+var_81+1] call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) jmp short $+2 loc_A2562: xor eax, eax mov esi, eax lea rdi, [rsp+0D8h+var_B8] call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsB5cxx11EDn; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics(decltype(nullptr)) jmp short $+2 loc_A2572: mov rcx, qword ptr [rsp+0D8h+var_18]; int lea rdi, [rsp+0D8h+var_40]; int lea rsi, [rsp+0D8h+var_60]; int lea rdx, [rsp+0D8h+var_B8]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&) jmp short $+2 loc_A2593: lea rdi, [rsp+0D8h+var_B8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0D8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0D8h+var_81+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0D8h+var_81] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov eax, [rsp+0D8h+var_C] mov [rsp+0D8h+var_D4], eax lea rdi, [rsp+0D8h+var_40] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, [rsp+0D8h+var_D0]; this mov esi, [rsp+0D8h+var_D4]; int mov rdx, rax; char * call _ZN8nlohmann16json_abi_v3_11_36detail11other_errorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::other_error::other_error(int,char const*) jmp short $+2 loc_A25E6: lea rdi, [rsp+0D8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, qword ptr [rsp+0D8h+var_C8] add rsp, 0D8h retn mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_A265C mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_A2652 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax jmp short loc_A2648 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax lea rdi, [rsp+arg_18]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_A2648: lea rdi, [rsp+arg_70]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_A2652: lea rdi, [rsp+arg_50]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_A265C: lea rdi, [rsp+arg_4F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_A2683 mov rcx, rax mov eax, edx mov [rsp+arg_40], rcx mov [rsp+arg_3C], eax lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_A2683: mov rdi, [rsp+arg_40] call __Unwind_Resume
long long ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_( long long a1, int a2, long long a3, long long a4) { int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d int v8; // r8d int v9; // r9d const char *v10; // rax int v12; // [rsp+0h] [rbp-D8h] int v13; // [rsp+0h] [rbp-D8h] void *v14; // [rsp+0h] [rbp-D8h] int v15; // [rsp+4h] [rbp-D4h] int v16; // [rsp+8h] [rbp-D0h] int v17; // [rsp+8h] [rbp-D0h] nlohmann::json_abi_v3_11_3::detail::other_error *v18; // [rsp+8h] [rbp-D0h] int v19; // [rsp+10h] [rbp-C8h] int v20; // [rsp+10h] [rbp-C8h] int v21[2]; // [rsp+10h] [rbp-C8h] int v22; // [rsp+18h] [rbp-C0h] int v23; // [rsp+18h] [rbp-C0h] long long v24; // [rsp+20h] [rbp-B8h] BYREF int v25; // [rsp+28h] [rbp-B0h] int v26[8]; // [rsp+57h] [rbp-81h] BYREF int v27[8]; // [rsp+78h] [rbp-60h] BYREF int v28[8]; // [rsp+98h] [rbp-40h] BYREF long long v29; // [rsp+B8h] [rbp-20h] int v30[3]; // [rsp+C0h] [rbp-18h] int v31; // [rsp+CCh] [rbp-Ch] long long v32; // [rsp+D0h] [rbp-8h] v32 = a1; v31 = a2; *(_QWORD *)v30 = a3; v29 = a4; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((long long)v26 + 1, (long long)"other_error", (long long)v26); nlohmann::json_abi_v3_11_3::detail::exception::name((int)v27, v12, a1, a1, (int)v26, v24, v25); nlohmann::json_abi_v3_11_3::detail::exception::diagnostics[abi:cxx11]( (unsigned int)&v24, 0, v4, v5, v6, v7, v13, v16, v19, v22, v24, v25); nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>( (int)v28, (int)v27, (int)&v24, v30[0], v8, v9, v14, v17, v20, v23, v24); std::string::~string(&v24); std::string::~string(v27); std::string::~string((char *)v26 + 1); std::allocator<char>::~allocator(v26); v15 = v31; v10 = (const char *)std::string::c_str(v28); nlohmann::json_abi_v3_11_3::detail::other_error::other_error(v18, v15, v10); std::string::~string(v28); return *(_QWORD *)v21; }
_ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_: SUB RSP,0xd8 MOV qword ptr [RSP + 0x8],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0xd0],RDI MOV dword ptr [RSP + 0xcc],ESI MOV qword ptr [RSP + 0xc0],RDX MOV qword ptr [RSP + 0xb8],RCX LEA RDI,[RSP + 0x57] MOV qword ptr [RSP + 0x18],RDI CALL 0x0015b0d0 MOV RDX,qword ptr [RSP + 0x18] LAB_001a2537: LEA RSI,[0x30eb34] LEA RDI,[RSP + 0x58] CALL 0x00162190 JMP 0x001a254a LAB_001a254a: MOV EDX,dword ptr [RSP + 0xcc] LAB_001a2551: LEA RDI,[RSP + 0x78] LEA RSI,[RSP + 0x58] CALL 0x001a4080 JMP 0x001a2562 LAB_001a2562: XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0x20] CALL 0x001a4120 JMP 0x001a2572 LAB_001a2572: MOV RCX,qword ptr [RSP + 0xc0] LAB_001a257a: LEA RDI,[RSP + 0x98] LEA RSI,[RSP + 0x78] LEA RDX,[RSP + 0x20] CALL 0x001a3fc0 JMP 0x001a2593 LAB_001a2593: LEA RDI,[RSP + 0x20] CALL 0x0015b568 LEA RDI,[RSP + 0x78] CALL 0x0015b568 LEA RDI,[RSP + 0x58] CALL 0x0015b568 LEA RDI,[RSP + 0x57] CALL 0x0015b540 MOV EAX,dword ptr [RSP + 0xcc] MOV dword ptr [RSP + 0x4],EAX LEA RDI,[RSP + 0x98] CALL 0x0015a1c0 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RSP + 0x4] MOV RDX,RAX LAB_001a25df: CALL 0x001a41a0 LAB_001a25e4: JMP 0x001a25e6 LAB_001a25e6: LEA RDI,[RSP + 0x98] CALL 0x0015b568 MOV RAX,qword ptr [RSP + 0x10] ADD RSP,0xd8 RET
other_error * _ZN8nlohmann16json_abi_v3_11_36detail11other_error6createIDnTnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_ (other_error *param_1,int param_2,string *param_3,int8 param_4) { int iVar1; char *pcVar2; exception local_b8 [55]; allocator local_81; string local_80 [32]; exception local_60 [32]; detail local_40 [32]; int8 local_20; string *local_18; int local_c; other_error *local_8; local_20 = param_4; local_18 = param_3; local_c = param_2; local_8 = param_1; std::allocator<char>::allocator(); /* try { // try from 001a2537 to 001a2547 has its CatchHandler @ 001a2600 */ std::__cxx11::string::string<std::allocator<char>>(local_80,"other_error",&local_81); /* try { // try from 001a2551 to 001a255f has its CatchHandler @ 001a2610 */ nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,local_c); /* try { // try from 001a2562 to 001a256f has its CatchHandler @ 001a2620 */ nlohmann::json_abi_v3_11_3::detail::exception::diagnostics_abi_cxx11_ (local_b8,(_func_decltype_nullptr *)0x0); /* try { // try from 001a257a to 001a2590 has its CatchHandler @ 001a2630 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&> (local_40,(string *)local_60,(string *)local_b8,local_18); std::__cxx11::string::~string((string *)local_b8); std::__cxx11::string::~string((string *)local_60); std::__cxx11::string::~string(local_80); std::allocator<char>::~allocator((allocator<char> *)&local_81); iVar1 = local_c; pcVar2 = (char *)std::__cxx11::string::c_str(); /* try { // try from 001a25df to 001a25e3 has its CatchHandler @ 001a2668 */ nlohmann::json_abi_v3_11_3::detail::other_error::other_error(param_1,iVar1,pcVar2); std::__cxx11::string::~string((string *)local_40); return param_1; }
26,183
flatbuffers::FlatBufferBuilder::FlatBufferBuilder(unsigned long, flatbuffers::Allocator*, bool, unsigned long)
mnn-tts/MNN/3rd_party/flatbuffers/include/flatbuffers/flatbuffers.h
explicit FlatBufferBuilder(size_t initial_size = 1024, Allocator *allocator = nullptr, bool own_allocator = false, size_t buffer_minalign = AlignOf<largest_scalar_t>()) : buf_(initial_size, allocator, own_allocator, buffer_minalign), num_field_loc(0), max_voffset_(0), nested(false), finished(false), minalign_(1), force_defaults_(false), dedup_vtables_(true), string_pool(nullptr) { EndianCheck(); }
O0
c
flatbuffers::FlatBufferBuilder::FlatBufferBuilder(unsigned long, flatbuffers::Allocator*, bool, unsigned long): subq $0x38, %rsp movb %cl, %al movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) andb $0x1, %al movb %al, 0x1f(%rsp) movq %r8, 0x10(%rsp) movq 0x30(%rsp), %rdi movq %rdi, 0x8(%rsp) movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdx movb 0x1f(%rsp), %al movq 0x10(%rsp), %r8 andb $0x1, %al movzbl %al, %ecx callq 0x81b0 movq 0x8(%rsp), %rax movl $0x0, 0x40(%rax) movw $0x0, 0x44(%rax) movb $0x0, 0x46(%rax) movb $0x0, 0x47(%rax) movq $0x1, 0x48(%rax) movb $0x0, 0x50(%rax) movb $0x1, 0x51(%rax) movq $0x0, 0x58(%rax) callq 0x8220 addq $0x38, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN11flatbuffers17FlatBufferBuilderC2EmPNS_9AllocatorEbm: sub rsp, 38h mov al, cl mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx and al, 1 mov [rsp+38h+var_19], al mov [rsp+38h+var_28], r8 mov rdi, [rsp+38h+var_8]; this mov [rsp+38h+var_30], rdi mov rsi, [rsp+38h+var_10] mov rdx, [rsp+38h+var_18] mov al, [rsp+38h+var_19] mov r8, [rsp+38h+var_28] and al, 1 movzx ecx, al call _ZN11flatbuffers15vector_downwardC2EmPNS_9AllocatorEbm; flatbuffers::vector_downward::vector_downward(ulong,flatbuffers::Allocator *,bool,ulong) mov rax, [rsp+38h+var_30] mov dword ptr [rax+40h], 0 mov word ptr [rax+44h], 0 mov byte ptr [rax+46h], 0 mov byte ptr [rax+47h], 0 mov qword ptr [rax+48h], 1 mov byte ptr [rax+50h], 0 mov byte ptr [rax+51h], 1 mov qword ptr [rax+58h], 0 call _ZN11flatbuffers11EndianCheckEv; flatbuffers::EndianCheck(void) add rsp, 38h retn
long long flatbuffers::FlatBufferBuilder::FlatBufferBuilder( flatbuffers::FlatBufferBuilder *this, unsigned long long a2, flatbuffers::Allocator *a3, char a4, unsigned long long a5) { flatbuffers::vector_downward::vector_downward(this, a2, a3, a4 & 1, a5); *((_DWORD *)this + 16) = 0; *((_WORD *)this + 34) = 0; *((_BYTE *)this + 70) = 0; *((_BYTE *)this + 71) = 0; *((_QWORD *)this + 9) = 1LL; *((_BYTE *)this + 80) = 0; *((_BYTE *)this + 81) = 1; *((_QWORD *)this + 11) = 0LL; return flatbuffers::EndianCheck(this); }
FlatBufferBuilder: SUB RSP,0x38 MOV AL,CL MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX AND AL,0x1 MOV byte ptr [RSP + 0x1f],AL MOV qword ptr [RSP + 0x10],R8 MOV RDI,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x8],RDI MOV RSI,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x20] MOV AL,byte ptr [RSP + 0x1f] MOV R8,qword ptr [RSP + 0x10] AND AL,0x1 MOVZX ECX,AL CALL 0x001081b0 MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x40],0x0 MOV word ptr [RAX + 0x44],0x0 MOV byte ptr [RAX + 0x46],0x0 MOV byte ptr [RAX + 0x47],0x0 MOV qword ptr [RAX + 0x48],0x1 MOV byte ptr [RAX + 0x50],0x0 MOV byte ptr [RAX + 0x51],0x1 MOV qword ptr [RAX + 0x58],0x0 CALL 0x00108220 ADD RSP,0x38 RET
/* flatbuffers::FlatBufferBuilder::FlatBufferBuilder(unsigned long, flatbuffers::Allocator*, bool, unsigned long) */ void __thiscall flatbuffers::FlatBufferBuilder::FlatBufferBuilder (FlatBufferBuilder *this,ulong param_1,Allocator *param_2,bool param_3,ulong param_4) { vector_downward::vector_downward((vector_downward *)this,param_1,param_2,param_3,param_4); *(int4 *)(this + 0x40) = 0; *(int2 *)(this + 0x44) = 0; this[0x46] = (FlatBufferBuilder)0x0; this[0x47] = (FlatBufferBuilder)0x0; *(int8 *)(this + 0x48) = 1; this[0x50] = (FlatBufferBuilder)0x0; this[0x51] = (FlatBufferBuilder)0x1; *(int8 *)(this + 0x58) = 0; EndianCheck(); return; }
26,184
JS_GetTypedArrayBuffer
bluesky950520[P]quickjs/quickjs.c
JSValue JS_GetTypedArrayBuffer(JSContext *ctx, JSValue obj, size_t *pbyte_offset, size_t *pbyte_length, size_t *pbytes_per_element) { JSObject *p; JSTypedArray *ta; p = get_typed_array(ctx, obj); if (!p) return JS_EXCEPTION; if (typed_array_is_oob(p)) return JS_ThrowTypeErrorArrayBufferOOB(ctx); ta = p->u.typed_array; if (pbyte_offset) *pbyte_offset = ta->offset; if (pbyte_length) *pbyte_length = ta->length; if (pbytes_per_element) { *pbytes_per_element = 1 << typed_array_size_log2(p->class_id); } return js_dup(JS_MKPTR(JS_TAG_OBJECT, ta->buffer)); }
O1
c
JS_GetTypedArrayBuffer: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %rbx movq %r8, %r14 movq %rcx, %r12 movq %rdi, %r13 movq %rsi, (%rsp) cmpl $-0x1, %edx jne 0x395d4 movq (%rsp), %r15 movzwl 0x6(%r15), %eax addl $-0x15, %eax cmpw $0xc, %ax jb 0x395e8 leaq 0x68e36(%rip), %rsi # 0xa2411 xorl %r15d, %r15d movq %r13, %rdi xorl %eax, %eax callq 0x22567 movl $0x6, %ebp testq %r15, %r15 je 0x39613 movq %r15, %rdi callq 0x396c4 testl %eax, %eax je 0x39619 leaq 0x68e1d(%rip), %rsi # 0xa2422 xorl %ebx, %ebx movq %r13, %rdi xorl %eax, %eax callq 0x22567 jmp 0x39615 xorl %ebx, %ebx xorl %eax, %eax jmp 0x39672 movq 0x30(%r15), %rax testq %r12, %r12 je 0x39629 movl 0x20(%rax), %ecx movq %rcx, (%r12) testq %r14, %r14 je 0x39634 movl 0x24(%rax), %ecx movq %rcx, (%r14) testq %rbx, %rbx je 0x39656 movzwl 0x6(%r15), %ecx leaq 0x6429a(%rip), %rdx # 0x9d8df movb -0x15(%rcx,%rdx), %cl movl $0x1, %edx shll %cl, %edx movslq %edx, %rcx movq %rcx, (%rbx) movq 0x18(%rax), %rcx incl (%rcx) movabsq $-0x100000000, %rax # imm = 0xFFFFFFFF00000000 andq %rcx, %rax movl %ecx, %ebx movq $-0x1, %rbp orq %rax, %rbx movq %rbx, %rax movq %rbp, %rdx addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
JS_GetTypedArrayBuffer: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, r9 mov r14, r8 mov r12, rcx mov r13, rdi mov [rsp+38h+var_38], rsi cmp edx, 0FFFFFFFFh jnz short loc_395D4 mov r15, [rsp+38h+var_38] movzx eax, word ptr [r15+6] add eax, 0FFFFFFEBh cmp ax, 0Ch jb short loc_395E8 loc_395D4: lea rsi, aNotATypedarray; "not a TypedArray" xor r15d, r15d mov rdi, r13 xor eax, eax call JS_ThrowTypeError loc_395E8: mov ebp, 6 test r15, r15 jz short loc_39613 mov rdi, r15 call typed_array_is_oob test eax, eax jz short loc_39619 lea rsi, aArraybufferIsD_0; "ArrayBuffer is detached or resized" xor ebx, ebx mov rdi, r13 xor eax, eax call JS_ThrowTypeError jmp short loc_39615 loc_39613: xor ebx, ebx loc_39615: xor eax, eax jmp short loc_39672 loc_39619: mov rax, [r15+30h] test r12, r12 jz short loc_39629 mov ecx, [rax+20h] mov [r12], rcx loc_39629: test r14, r14 jz short loc_39634 mov ecx, [rax+24h] mov [r14], rcx loc_39634: test rbx, rbx jz short loc_39656 movzx ecx, word ptr [r15+6] lea rdx, typed_array_size_log2 mov cl, [rcx+rdx-15h] mov edx, 1 shl edx, cl movsxd rcx, edx mov [rbx], rcx loc_39656: mov rcx, [rax+18h] inc dword ptr [rcx] mov rax, 0FFFFFFFF00000000h and rax, rcx mov ebx, ecx mov rbp, 0FFFFFFFFFFFFFFFFh loc_39672: or rbx, rax mov rax, rbx mov rdx, rbp add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long JS_GetTypedArrayBuffer( long long a1, long long a2, long long a3, _QWORD *a4, _QWORD *a5, _QWORD *a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { long long v17; // r15 long long v18; // rdx long long v19; // rcx long long v20; // r8 long long v21; // r9 __m128 v22; // xmm4 __m128 v23; // xmm5 long long v24; // rbx unsigned long long v25; // rax long long v26; // rax unsigned long long v27; // rcx char v29; // [rsp+0h] [rbp-38h] v29 = a2; if ( (_DWORD)a3 != -1 || (v17 = a2, (unsigned __int16)(*(_WORD *)(a2 + 6) - 21) >= 0xCu) ) { v17 = 0LL; JS_ThrowTypeError( a1, (long long)"not a TypedArray", a3, (long long)a4, (long long)a5, (long long)a6, a7, a8, a9, a10, a11, a12, a13, a14, a2); } if ( !v17 ) { v24 = 0LL; goto LABEL_8; } if ( (unsigned int)typed_array_is_oob(v17) ) { v24 = 0LL; JS_ThrowTypeError( a1, (long long)"ArrayBuffer is detached or resized", v18, v19, v20, v21, a7, a8, a9, a10, v22, v23, a13, a14, v29); LABEL_8: v25 = 0LL; return v25 | v24; } v26 = *(_QWORD *)(v17 + 48); if ( a4 ) *a4 = *(unsigned int *)(v26 + 32); if ( a5 ) *a5 = *(unsigned int *)(v26 + 36); if ( a6 ) *a6 = 1 << typed_array_size_log2[*(unsigned __int16 *)(v17 + 6) - 21]; v27 = *(_QWORD *)(v26 + 24); ++*(_DWORD *)v27; v25 = v27 & 0xFFFFFFFF00000000LL; v24 = (unsigned int)v27; return v25 | v24; }
JS_GetTypedArrayBuffer: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,R9 MOV R14,R8 MOV R12,RCX MOV R13,RDI MOV qword ptr [RSP],RSI CMP EDX,-0x1 JNZ 0x001395d4 MOV R15,qword ptr [RSP] MOVZX EAX,word ptr [R15 + 0x6] ADD EAX,-0x15 CMP AX,0xc JC 0x001395e8 LAB_001395d4: LEA RSI,[0x1a2411] XOR R15D,R15D MOV RDI,R13 XOR EAX,EAX CALL 0x00122567 LAB_001395e8: MOV EBP,0x6 TEST R15,R15 JZ 0x00139613 MOV RDI,R15 CALL 0x001396c4 TEST EAX,EAX JZ 0x00139619 LEA RSI,[0x1a2422] XOR EBX,EBX MOV RDI,R13 XOR EAX,EAX CALL 0x00122567 JMP 0x00139615 LAB_00139613: XOR EBX,EBX LAB_00139615: XOR EAX,EAX JMP 0x00139672 LAB_00139619: MOV RAX,qword ptr [R15 + 0x30] TEST R12,R12 JZ 0x00139629 MOV ECX,dword ptr [RAX + 0x20] MOV qword ptr [R12],RCX LAB_00139629: TEST R14,R14 JZ 0x00139634 MOV ECX,dword ptr [RAX + 0x24] MOV qword ptr [R14],RCX LAB_00139634: TEST RBX,RBX JZ 0x00139656 MOVZX ECX,word ptr [R15 + 0x6] LEA RDX,[0x19d8df] MOV CL,byte ptr [RCX + RDX*0x1 + -0x15] MOV EDX,0x1 SHL EDX,CL MOVSXD RCX,EDX MOV qword ptr [RBX],RCX LAB_00139656: MOV RCX,qword ptr [RAX + 0x18] INC dword ptr [RCX] MOV RAX,-0x100000000 AND RAX,RCX MOV EBX,ECX MOV RBP,-0x1 LAB_00139672: OR RBX,RAX MOV RAX,RBX MOV RDX,RBP ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int1 [16] JS_GetTypedArrayBuffer (int8 param_1,long param_2,int param_3,ulong *param_4,ulong *param_5,long *param_6) { long lVar1; int *piVar2; int iVar3; ulong uVar4; ulong uVar5; int8 uVar6; int1 auVar7 [16]; if ((param_3 != -1) || (0xb < (ushort)(*(short *)(param_2 + 6) - 0x15U))) { param_2 = 0; JS_ThrowTypeError(param_1,"not a TypedArray"); } uVar6 = 6; if (param_2 != 0) { iVar3 = typed_array_is_oob(param_2); if (iVar3 == 0) { lVar1 = *(long *)(param_2 + 0x30); if (param_4 != (ulong *)0x0) { *param_4 = (ulong)*(uint *)(lVar1 + 0x20); } if (param_5 != (ulong *)0x0) { *param_5 = (ulong)*(uint *)(lVar1 + 0x24); } if (param_6 != (long *)0x0) { *param_6 = (long)(1 << ("toSorted"[(ulong)*(ushort *)(param_2 + 6) + 6] & 0x1fU)); } piVar2 = *(int **)(lVar1 + 0x18); *piVar2 = *piVar2 + 1; uVar4 = (ulong)piVar2 & 0xffffffff00000000; uVar5 = (ulong)piVar2 & 0xffffffff; uVar6 = 0xffffffffffffffff; goto LAB_00139672; } JS_ThrowTypeError(param_1,"ArrayBuffer is detached or resized"); } uVar5 = 0; uVar4 = 0; LAB_00139672: auVar7._8_8_ = uVar6; auVar7._0_8_ = uVar5 | uVar4; return auVar7; }
26,185
qdevtools::StyleSheetEdit::qss() const
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
QString qss() const { if (auto files = watcher_->files(); !files.empty()) { auto file = QFile(files.first()); return file.open(QIODevice::ReadOnly) ? QString::fromUtf8(file.readAll()) : QString(); } else { return static_cast<QPlainTextEdit*>(layout()->itemAt(0)->widget())->toPlainText(); } }
O0
cpp
qdevtools::StyleSheetEdit::qss() const: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %rdi, -0x80(%rbp) movq %rdi, %rax movq %rax, -0x78(%rbp) movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x70(%rbp) movq 0x28(%rax), %rsi leaq -0x28(%rbp), %rdi callq 0xfb70 leaq -0x28(%rbp), %rdi callq 0x36a00 testb $0x1, %al jne 0x368b6 leaq -0x28(%rbp), %rdi callq 0x36a30 movq %rax, -0x88(%rbp) jmp 0x367d6 movq -0x88(%rbp), %rsi leaq -0x38(%rbp), %rdi callq 0xff60 jmp 0x367e8 leaq -0x48(%rbp), %rdi movl $0x1, %esi callq 0x36a60 movl -0x48(%rbp), %esi movb $0x0, -0x61(%rbp) leaq -0x38(%rbp), %rdi callq 0xf5e0 movb %al, -0x89(%rbp) jmp 0x3680e movb -0x89(%rbp), %al testb $0x1, %al jne 0x3681a jmp 0x3683e leaq -0x60(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0xf300 jmp 0x36829 movq -0x80(%rbp), %rdi movb $0x1, -0x61(%rbp) leaq -0x60(%rbp), %rsi callq 0x224a0 jmp 0x3683c jmp 0x36847 movq -0x80(%rbp), %rdi callq 0x36a80 testb $0x1, -0x61(%rbp) jne 0x3684f jmp 0x36858 leaq -0x60(%rbp), %rdi callq 0x11920 movl $0x1, -0x68(%rbp) leaq -0x38(%rbp), %rdi callq 0xffc0 jmp 0x36918 movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x3692e movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) jmp 0x368ab movq %rax, %rcx movl %edx, %eax movq %rcx, -0x40(%rbp) movl %eax, -0x44(%rbp) testb $0x1, -0x61(%rbp) jne 0x368a0 jmp 0x368a9 leaq -0x60(%rbp), %rdi callq 0x11920 jmp 0x368ab leaq -0x38(%rbp), %rdi callq 0xffc0 jmp 0x3692e movq -0x70(%rbp), %rdi callq 0xf820 movq %rax, -0x98(%rbp) jmp 0x368c8 movq -0x98(%rbp), %rdi movq (%rdi), %rax movq 0xa8(%rax), %rax xorl %esi, %esi callq *%rax movq %rax, -0xa0(%rbp) jmp 0x368e6 movq -0xa0(%rbp), %rdi movq (%rdi), %rax movq 0x68(%rax), %rax callq *%rax movq %rax, -0xa8(%rbp) jmp 0x368ff movq -0xa8(%rbp), %rsi movq -0x80(%rbp), %rdi callq 0x369c0 jmp 0x36911 movl $0x1, -0x68(%rbp) leaq -0x28(%rbp), %rdi callq 0x1d730 movq -0x78(%rbp), %rax addq $0xb0, %rsp popq %rbp retq leaq -0x28(%rbp), %rdi callq 0x1d730 movq -0x40(%rbp), %rdi callq 0xf410
_ZNK9qdevtools14StyleSheetEdit3qssEv: push rbp mov rbp, rsp sub rsp, 0B0h mov [rbp+var_80], rdi mov rax, rdi mov [rbp+var_78], rax mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov [rbp+var_70], rax mov rsi, [rax+28h] lea rdi, [rbp+var_28]; this call __ZNK18QFileSystemWatcher5filesEv; QFileSystemWatcher::files(void) lea rdi, [rbp+var_28] call _ZNK5QListI7QStringE5emptyEv; QList<QString>::empty(void) test al, 1 jnz loc_368B6 lea rdi, [rbp+var_28] call _ZN5QListI7QStringE5firstEv; QList<QString>::first(void) mov [rbp+var_88], rax jmp short $+2 loc_367D6: mov rsi, [rbp+var_88]; QString * lea rdi, [rbp+var_38]; this call __ZN5QFileC1ERK7QString; QFile::QFile(QString const&) jmp short $+2 loc_367E8: lea rdi, [rbp+var_48] mov esi, 1 call _ZN6QFlagsIN13QIODeviceBase12OpenModeFlagEEC2ES1_; QFlags<QIODeviceBase::OpenModeFlag>::QFlags(QIODeviceBase::OpenModeFlag) mov esi, [rbp+var_48] mov [rbp+var_61], 0 lea rdi, [rbp+var_38] call __ZN5QFile4openE6QFlagsIN13QIODeviceBase12OpenModeFlagEE; QFile::open(QFlags<QIODeviceBase::OpenModeFlag>) mov [rbp+var_89], al jmp short $+2 loc_3680E: mov al, [rbp+var_89] test al, 1 jnz short loc_3681A jmp short loc_3683E loc_3681A: lea rdi, [rbp+var_60]; this lea rsi, [rbp+var_38] call __ZN9QIODevice7readAllEv; QIODevice::readAll(void) jmp short $+2 loc_36829: mov rdi, [rbp+var_80] mov [rbp+var_61], 1 lea rsi, [rbp+var_60] call _ZN7QString8fromUtf8IvEES_RK10QByteArray; QString::fromUtf8<void>(QByteArray const&) jmp short $+2 loc_3683C: jmp short loc_36847 loc_3683E: mov rdi, [rbp+var_80]; this call _ZN7QStringC2Ev; QString::QString(void) loc_36847: test [rbp+var_61], 1 jnz short loc_3684F jmp short loc_36858 loc_3684F: lea rdi, [rbp+var_60]; this call _ZN10QByteArrayD2Ev; QByteArray::~QByteArray() loc_36858: mov [rbp+var_68], 1 lea rdi, [rbp+var_38]; this call __ZN5QFileD1Ev; QFile::~QFile() jmp loc_36918 mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp loc_3692E mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax jmp short loc_368AB mov rcx, rax mov eax, edx mov [rbp+var_40], rcx mov [rbp+var_44], eax test [rbp+var_61], 1 jnz short loc_368A0 jmp short loc_368A9 loc_368A0: lea rdi, [rbp+var_60]; this call _ZN10QByteArrayD2Ev; QByteArray::~QByteArray() loc_368A9: jmp short $+2 loc_368AB: lea rdi, [rbp+var_38]; this call __ZN5QFileD1Ev; QFile::~QFile() jmp short loc_3692E loc_368B6: mov rdi, [rbp+var_70]; this call __ZNK7QWidget6layoutEv; QWidget::layout(void) mov [rbp+var_98], rax jmp short $+2 loc_368C8: mov rdi, [rbp+var_98] mov rax, [rdi] mov rax, [rax+0A8h] xor esi, esi call rax mov [rbp+var_A0], rax jmp short $+2 loc_368E6: mov rdi, [rbp+var_A0] mov rax, [rdi] mov rax, [rax+68h] call rax mov [rbp+var_A8], rax jmp short $+2 loc_368FF: mov rsi, [rbp+var_A8] mov rdi, [rbp+var_80]; this call _ZNK14QPlainTextEdit11toPlainTextEv; QPlainTextEdit::toPlainText(void) jmp short $+2 loc_36911: mov [rbp+var_68], 1 loc_36918: lea rdi, [rbp+var_28] call _ZN5QListI7QStringED2Ev; QList<QString>::~QList() mov rax, [rbp+var_78] add rsp, 0B0h pop rbp retn loc_3692E: lea rdi, [rbp+var_28] call _ZN5QListI7QStringED2Ev; QList<QString>::~QList() mov rdi, [rbp+var_40] call __Unwind_Resume
qdevtools::StyleSheetEdit * qdevtools::StyleSheetEdit::qss(qdevtools::StyleSheetEdit *this, QWidget *a2) { long long v2; // rsi long long v4; // [rsp+10h] [rbp-A0h] long long v5; // [rsp+18h] [rbp-98h] QString *v6; // [rsp+28h] [rbp-88h] char v8; // [rsp+4Fh] [rbp-61h] _BYTE v9[24]; // [rsp+50h] [rbp-60h] BYREF unsigned int v10; // [rsp+68h] [rbp-48h] BYREF _BYTE v11[16]; // [rsp+78h] [rbp-38h] BYREF _BYTE v12[24]; // [rsp+88h] [rbp-28h] BYREF QWidget *v13; // [rsp+A0h] [rbp-10h] qdevtools::StyleSheetEdit *v14; // [rsp+A8h] [rbp-8h] v14 = this; v13 = a2; v2 = *((_QWORD *)a2 + 5); QFileSystemWatcher::files((QFileSystemWatcher *)v12); if ( (QList<QString>::empty(v12, v2) & 1) != 0 ) { v5 = QWidget::layout(a2); v4 = (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v5 + 168LL))(v5, 0LL); (*(void ( **)(long long))(*(_QWORD *)v4 + 104LL))(v4); QPlainTextEdit::toPlainText(this); } else { v6 = (QString *)QList<QString>::first(v12); QFile::QFile((QFile *)v11, v6); QFlags<QIODeviceBase::OpenModeFlag>::QFlags(&v10, 1LL); v8 = 0; if ( (QFile::open(v11, v10) & 1) != 0 ) { QIODevice::readAll((QIODevice *)v9); v8 = 1; QString::fromUtf8<void>((long long)this, (QByteArray *)v9); } else { QString::QString(this); } if ( (v8 & 1) != 0 ) QByteArray::~QByteArray((QByteArray *)v9); QFile::~QFile((QFile *)v11); } QList<QString>::~QList((long long)v12); return this; }
qss: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV qword ptr [RBP + -0x80],RDI MOV RAX,RDI MOV qword ptr [RBP + -0x78],RAX MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x70],RAX MOV RSI,qword ptr [RAX + 0x28] LEA RDI,[RBP + -0x28] CALL 0x0010fb70 LEA RDI,[RBP + -0x28] CALL 0x00136a00 TEST AL,0x1 JNZ 0x001368b6 LAB_001367c4: LEA RDI,[RBP + -0x28] CALL 0x00136a30 MOV qword ptr [RBP + -0x88],RAX JMP 0x001367d6 LAB_001367d6: MOV RSI,qword ptr [RBP + -0x88] LEA RDI,[RBP + -0x38] CALL 0x0010ff60 JMP 0x001367e8 LAB_001367e8: LEA RDI,[RBP + -0x48] MOV ESI,0x1 CALL 0x00136a60 MOV ESI,dword ptr [RBP + -0x48] MOV byte ptr [RBP + -0x61],0x0 LAB_001367fd: LEA RDI,[RBP + -0x38] CALL 0x0010f5e0 MOV byte ptr [RBP + -0x89],AL JMP 0x0013680e LAB_0013680e: MOV AL,byte ptr [RBP + -0x89] TEST AL,0x1 JNZ 0x0013681a JMP 0x0013683e LAB_0013681a: LEA RDI,[RBP + -0x60] LEA RSI,[RBP + -0x38] CALL 0x0010f300 JMP 0x00136829 LAB_00136829: MOV RDI,qword ptr [RBP + -0x80] MOV byte ptr [RBP + -0x61],0x1 LAB_00136831: LEA RSI,[RBP + -0x60] CALL 0x001224a0 JMP 0x0013683c LAB_0013683c: JMP 0x00136847 LAB_0013683e: MOV RDI,qword ptr [RBP + -0x80] CALL 0x00136a80 LAB_00136847: TEST byte ptr [RBP + -0x61],0x1 JNZ 0x0013684f JMP 0x00136858 LAB_0013684f: LEA RDI,[RBP + -0x60] CALL 0x00111920 LAB_00136858: MOV dword ptr [RBP + -0x68],0x1 LEA RDI,[RBP + -0x38] CALL 0x0010ffc0 JMP 0x00136918 LAB_001368b6: MOV RDI,qword ptr [RBP + -0x70] CALL 0x0010f820 MOV qword ptr [RBP + -0x98],RAX JMP 0x001368c8 LAB_001368c8: MOV RDI,qword ptr [RBP + -0x98] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0xa8] XOR ESI,ESI CALL RAX MOV qword ptr [RBP + -0xa0],RAX JMP 0x001368e6 LAB_001368e6: MOV RDI,qword ptr [RBP + -0xa0] MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x68] CALL RAX MOV qword ptr [RBP + -0xa8],RAX JMP 0x001368ff LAB_001368ff: MOV RSI,qword ptr [RBP + -0xa8] MOV RDI,qword ptr [RBP + -0x80] CALL 0x001369c0 LAB_0013690f: JMP 0x00136911 LAB_00136911: MOV dword ptr [RBP + -0x68],0x1 LAB_00136918: LEA RDI,[RBP + -0x28] CALL 0x0011d730 MOV RAX,qword ptr [RBP + -0x78] ADD RSP,0xb0 POP RBP RET
/* qdevtools::StyleSheetEdit::qss() const */ QString * qdevtools::StyleSheetEdit::qss(void) { byte bVar1; ulong uVar2; QString *pQVar3; long *plVar4; QString *in_RDI; QByteArray local_68 [24]; int4 local_50 [4]; QFile local_40 [16]; QList<QString> local_30 [40]; QFileSystemWatcher::files(); uVar2 = QList<QString>::empty(local_30); if ((uVar2 & 1) == 0) { /* try { // try from 001367c4 to 001367e5 has its CatchHandler @ 0013686d */ pQVar3 = (QString *)QList<QString>::first(local_30); QFile::QFile(local_40,pQVar3); QFlags<QIODeviceBase::OpenModeFlag>::QFlags((QFlags<QIODeviceBase::OpenModeFlag> *)local_50,1); /* try { // try from 001367fd to 00136826 has its CatchHandler @ 0013687e */ bVar1 = QFile::open(local_40,local_50[0]); if ((bVar1 & 1) == 0) { QString::QString(in_RDI); } else { QIODevice::readAll(); /* try { // try from 00136831 to 00136839 has its CatchHandler @ 0013688c */ QString::fromUtf8<void>(in_RDI,local_68); QByteArray::~QByteArray(local_68); } QFile::~QFile(local_40); } else { /* try { // try from 001368b6 to 0013690e has its CatchHandler @ 0013686d */ plVar4 = (long *)QWidget::layout(); plVar4 = (long *)(**(code **)(*plVar4 + 0xa8))(plVar4,0); (**(code **)(*plVar4 + 0x68))(); QPlainTextEdit::toPlainText((QPlainTextEdit *)in_RDI); } QList<QString>::~QList(local_30); return in_RDI; }
26,186
qdevtools::StyleSheetEdit::qss() const
HuaiminNotSleepYet[P]QDevTools/qdevtools.cpp
QString qss() const { if (auto files = watcher_->files(); !files.empty()) { auto file = QFile(files.first()); return file.open(QIODevice::ReadOnly) ? QString::fromUtf8(file.readAll()) : QString(); } else { return static_cast<QPlainTextEdit*>(layout()->itemAt(0)->widget())->toPlainText(); } }
O3
cpp
qdevtools::StyleSheetEdit::qss() const: pushq %r15 pushq %r14 pushq %rbx subq $0x50, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x28(%rsi), %rsi leaq 0x28(%rsp), %r15 movq %r15, %rdi callq 0xfb50 cmpq $0x0, 0x10(%r15) je 0x20bdc leaq 0x28(%rsp), %rdi callq 0x20cc0 movq %rsp, %rdi movq %rax, %rsi callq 0xff80 movq %rsp, %rdi movl $0x1, %esi callq 0xf5f0 testb %al, %al je 0x20c10 leaq 0x10(%rsp), %rdi movq %rsp, %rsi callq 0xf2f0 leaq 0x40(%rsp), %r14 leaq 0x10(%rsp), %rsi movq %r14, %rdi callq 0x112b8 movq (%r14), %rsi movq 0x8(%r14), %rdx movq %rbx, %rdi callq 0xf6f0 movq 0x10(%rsp), %rax testq %rax, %rax je 0x20c1e lock decl (%rax) jne 0x20c1e movq 0x10(%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0xf610 jmp 0x20c1e movq %r14, %rdi callq 0xf820 movq (%rax), %rcx movq %rax, %rdi xorl %esi, %esi callq *0xa8(%rcx) movq (%rax), %rcx movq %rax, %rdi callq *0x68(%rcx) movq %rax, %rdi callq 0xf7b0 movq %rbx, %rdi movq %rax, %rsi callq 0xfb70 jmp 0x20c26 xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq %rsp, %rdi callq 0xffe0 leaq 0x28(%rsp), %rdi callq 0x1c968 movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x20c6a lock decl (%rax) jne 0x20c6a movq 0x10(%rsp), %rdi movl $0x1, %esi movl $0x8, %edx callq 0xf610 jmp 0x20c6a jmp 0x20c67 movq %rax, %rbx movq %rsp, %rdi callq 0xffe0 jmp 0x20c79 jmp 0x20c76 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x1c968 movq %rbx, %rdi callq 0xf410
_ZNK9qdevtools14StyleSheetEdit3qssEv: push r15 push r14 push rbx sub rsp, 50h mov r14, rsi mov rbx, rdi mov rsi, [rsi+28h] lea r15, [rsp+68h+var_40] mov rdi, r15; this call __ZNK18QFileSystemWatcher5filesEv; QFileSystemWatcher::files(void) cmp qword ptr [r15+10h], 0 jz short loc_20BDC lea rdi, [rsp+68h+var_40] call _ZN5QListI7QStringE5beginEv; QList<QString>::begin(void) mov rdi, rsp; this mov rsi, rax; QString * call __ZN5QFileC1ERK7QString; QFile::QFile(QString const&) mov rdi, rsp mov esi, 1 call __ZN5QFile4openE6QFlagsIN13QIODeviceBase12OpenModeFlagEE; QFile::open(QFlags<QIODeviceBase::OpenModeFlag>) test al, al jz loc_20C10 lea rdi, [rsp+68h+var_58]; this mov rsi, rsp call __ZN9QIODevice7readAllEv; QIODevice::readAll(void) lea r14, [rsp+68h+var_28] lea rsi, [rsp+68h+var_58] mov rdi, r14 call _ZN14QByteArrayViewC2I10QByteArrayTnNSt9enable_ifIXsr3stdE9is_same_vIT_S1_EEbE4typeELb1EEERKS3_ mov rsi, [r14] mov rdx, [r14+8] mov rdi, rbx call __ZN7QString8fromUtf8E14QByteArrayView; QString::fromUtf8(QByteArrayView) mov rax, [rsp+68h+var_58] test rax, rax jz short loc_20C1E lock dec dword ptr [rax] jnz short loc_20C1E mov rdi, [rsp+68h+var_58] mov esi, 1 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) jmp short loc_20C1E loc_20BDC: mov rdi, r14; this call __ZNK7QWidget6layoutEv; QWidget::layout(void) mov rcx, [rax] mov rdi, rax xor esi, esi call qword ptr [rcx+0A8h] mov rcx, [rax] mov rdi, rax call qword ptr [rcx+68h] mov rdi, rax; this call __ZNK14QPlainTextEdit8documentEv; QPlainTextEdit::document(void) mov rdi, rbx; this mov rsi, rax call __ZNK13QTextDocument11toPlainTextEv; QTextDocument::toPlainText(void) jmp short loc_20C26 loc_20C10: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 loc_20C1E: mov rdi, rsp; this call __ZN5QFileD1Ev; QFile::~QFile() loc_20C26: lea rdi, [rsp+68h+var_40] call _ZN17QArrayDataPointerI7QStringED2Ev; QArrayDataPointer<QString>::~QArrayDataPointer() mov rax, rbx add rsp, 50h pop rbx pop r14 pop r15 retn mov rbx, rax mov rax, [rsp+arg_8] test rax, rax jz short loc_20C6A lock dec dword ptr [rax] jnz short loc_20C6A mov rdi, [rsp+arg_8] mov esi, 1 mov edx, 8 call __ZN10QArrayData10deallocateEPS_xx; QArrayData::deallocate(QArrayData*,long long,long long) jmp short loc_20C6A jmp short $+2 loc_20C67: mov rbx, rax loc_20C6A: mov rdi, rsp; this call __ZN5QFileD1Ev; QFile::~QFile() jmp short loc_20C79 jmp short $+2 loc_20C76: mov rbx, rax loc_20C79: lea rdi, [rsp+arg_20] call _ZN17QArrayDataPointerI7QStringED2Ev; QArrayDataPointer<QString>::~QArrayDataPointer() mov rdi, rbx call __Unwind_Resume
qdevtools::StyleSheetEdit * qdevtools::StyleSheetEdit::qss(qdevtools::StyleSheetEdit *this, QWidget *a2) { long long v3; // rsi const QString *v4; // rax long long v5; // rax long long v6; // rax QPlainTextEdit *v7; // rax _BYTE v9[16]; // [rsp+0h] [rbp-68h] BYREF volatile signed __int32 *v10[3]; // [rsp+10h] [rbp-58h] BYREF volatile signed __int32 *v11[3]; // [rsp+28h] [rbp-40h] BYREF _QWORD v12[5]; // [rsp+40h] [rbp-28h] BYREF v3 = *((_QWORD *)a2 + 5); QFileSystemWatcher::files((QFileSystemWatcher *)v11); if ( v11[2] ) { v4 = (const QString *)QList<QString>::begin(v11, v3); QFile::QFile((QFile *)v9, v4); if ( (unsigned __int8)QFile::open(v9, 1LL) ) { QIODevice::readAll((QIODevice *)v10); ZN14QByteArrayViewC2I10QByteArrayTnNSt9enable_ifIXsr3stdE9is_same_vIT_S1_EEbE4typeELb1EEERKS3_( v12, (QByteArray *)v10); QString::fromUtf8(this, v12[0], v12[1]); if ( v10[0] && !_InterlockedDecrement(v10[0]) ) QArrayData::deallocate(v10[0], 1LL); } else { *(_OWORD *)this = 0LL; *((_QWORD *)this + 2) = 0LL; } QFile::~QFile((QFile *)v9); } else { v5 = QWidget::layout(a2); v6 = (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v5 + 168LL))(v5, 0LL); v7 = (QPlainTextEdit *)(*(long long ( **)(long long))(*(_QWORD *)v6 + 104LL))(v6); QPlainTextEdit::document(v7); QTextDocument::toPlainText(this); } QArrayDataPointer<QString>::~QArrayDataPointer(v11); return this; }
qss: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x50 MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x28] LEA R15,[RSP + 0x28] MOV RDI,R15 CALL 0x0010fb50 CMP qword ptr [R15 + 0x10],0x0 JZ 0x00120bdc LAB_00120b5f: LEA RDI,[RSP + 0x28] CALL 0x00120cc0 MOV RDI,RSP MOV RSI,RAX CALL 0x0010ff80 LAB_00120b74: MOV RDI,RSP MOV ESI,0x1 CALL 0x0010f5f0 TEST AL,AL JZ 0x00120c10 LAB_00120b89: LEA RDI,[RSP + 0x10] MOV RSI,RSP CALL 0x0010f2f0 LEA R14,[RSP + 0x40] LEA RSI,[RSP + 0x10] MOV RDI,R14 CALL 0x001112b8 MOV RSI,qword ptr [R14] MOV RDX,qword ptr [R14 + 0x8] LAB_00120baf: MOV RDI,RBX CALL 0x0010f6f0 MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x00120c1e DEC.LOCK dword ptr [RAX] JNZ 0x00120c1e MOV RDI,qword ptr [RSP + 0x10] MOV ESI,0x1 MOV EDX,0x8 CALL 0x0010f610 JMP 0x00120c1e LAB_00120bdc: MOV RDI,R14 CALL 0x0010f820 MOV RCX,qword ptr [RAX] MOV RDI,RAX XOR ESI,ESI CALL qword ptr [RCX + 0xa8] MOV RCX,qword ptr [RAX] MOV RDI,RAX CALL qword ptr [RCX + 0x68] MOV RDI,RAX CALL 0x0010f7b0 MOV RDI,RBX MOV RSI,RAX CALL 0x0010fb70 LAB_00120c0e: JMP 0x00120c26 LAB_00120c10: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 LAB_00120c1e: MOV RDI,RSP CALL 0x0010ffe0 LAB_00120c26: LEA RDI,[RSP + 0x28] CALL 0x0011c968 MOV RAX,RBX ADD RSP,0x50 POP RBX POP R14 POP R15 RET
/* qdevtools::StyleSheetEdit::qss() const */ StyleSheetEdit * __thiscall qdevtools::StyleSheetEdit::qss(StyleSheetEdit *this) { char cVar1; QString *pQVar2; long *plVar3; QFile aQStack_68 [16]; QArrayData *local_58 [3]; QList<QString> local_40 [16]; long local_30; int8 local_28; int8 local_20; QFileSystemWatcher::files(); if (local_30 == 0) { /* try { // try from 00120bdc to 00120c0d has its CatchHandler @ 00120c76 */ plVar3 = (long *)QWidget::layout(); plVar3 = (long *)(**(code **)(*plVar3 + 0xa8))(plVar3,0); (**(code **)(*plVar3 + 0x68))(plVar3); QPlainTextEdit::document(); QTextDocument::toPlainText(); } else { /* try { // try from 00120b5f to 00120b73 has its CatchHandler @ 00120c74 */ pQVar2 = (QString *)QList<QString>::begin(local_40); QFile::QFile(aQStack_68,pQVar2); /* try { // try from 00120b74 to 00120b80 has its CatchHandler @ 00120c67 */ cVar1 = QFile::open(aQStack_68,1); if (cVar1 == '\0') { *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; } else { /* try { // try from 00120b89 to 00120b95 has its CatchHandler @ 00120c65 */ QIODevice::readAll(); _ZN14QByteArrayViewC2I10QByteArrayTnNSt9enable_ifIXsr3stdE9is_same_vIT_S1_EEbE4typeELb1EEERKS3_ (&local_28,local_58); /* try { // try from 00120baf to 00120bb6 has its CatchHandler @ 00120c3d */ QString::fromUtf8(this,local_28,local_20); if (local_58[0] != (QArrayData *)0x0) { LOCK(); *(int *)local_58[0] = *(int *)local_58[0] + -1; UNLOCK(); if (*(int *)local_58[0] == 0) { QArrayData::deallocate(local_58[0],1,8); } } } QFile::~QFile(aQStack_68); } QArrayDataPointer<QString>::~QArrayDataPointer((QArrayDataPointer<QString> *)local_40); return this; }
26,187
minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { if (!object) throw std::runtime_error("CallExpr.object is null"); auto obj = object->evaluate(context); if (!obj.is_callable()) { throw std::runtime_error("Object is not callable: " + obj.dump(2)); } auto vargs = args.evaluate(context); return obj.call(context, vargs); }
O2
cpp
minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0xa0, %rsp movq %rsi, %r15 movq 0x20(%rsi), %rsi testq %rsi, %rsi je 0x7a738 movq %rdx, %r14 movq %rdi, %rbx leaq 0x50(%rsp), %r12 movq %r12, %rdi callq 0x6e802 cmpq $0x0, 0x30(%r12) je 0x7a768 addq $0x30, %r15 movq %rsp, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x784a8 leaq 0x50(%rsp), %rsi movq %rsp, %rcx movq %rbx, %rdi movq %r14, %rdx callq 0x79224 movq %rsp, %rdi callq 0x79308 leaq 0x50(%rsp), %rdi callq 0x6ea92 movq %rbx, %rax addq $0xa0, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x24470 movq %rax, %rbx leaq 0x45f0c(%rip), %rsi # 0xc0656 movq %rax, %rdi callq 0x24330 movq 0x91897(%rip), %rsi # 0x10bff0 movq 0x917f8(%rip), %rdx # 0x10bf58 movq %rbx, %rdi callq 0x24f80 pushq $0x10 popq %rdi callq 0x24470 movq %rax, %rbx leaq 0x30(%rsp), %rdi leaq 0x50(%rsp), %rsi pushq $0x2 popq %rdx xorl %ecx, %ecx callq 0x6ec80 leaq 0x46163(%rip), %rsi # 0xc08f1 movq %rsp, %rdi leaq 0x30(%rsp), %rdx callq 0x64496 movb $0x1, %bpl movq %rsp, %rsi movq %rbx, %rdi callq 0x24e90 xorl %ebp, %ebp movq 0x9183e(%rip), %rsi # 0x10bff0 movq 0x9179f(%rip), %rdx # 0x10bf58 movq %rbx, %rdi callq 0x24f80 movq %rax, %r14 movq %rsp, %rdi callq 0x25298 jmp 0x7a7d4 movq %rax, %r14 movb $0x1, %bpl leaq 0x30(%rsp), %rdi callq 0x25298 testb %bpl, %bpl jne 0x7a7e8 jmp 0x7a80f movq %rax, %r14 movq %rbx, %rdi callq 0x246a0 jmp 0x7a80f movq %rax, %r14 movq %rbx, %rdi callq 0x246a0 jmp 0x7a819 movq %rax, %r14 movq %rsp, %rdi callq 0x79308 jmp 0x7a80f movq %rax, %r14 leaq 0x50(%rsp), %rdi callq 0x6ea92 movq %r14, %rdi callq 0x25010 nop
_ZNK5minja8CallExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 0A0h mov r15, rsi mov rsi, [rsi+20h] test rsi, rsi jz short loc_7A738 mov r14, rdx mov rbx, rdi lea r12, [rsp+0C8h+var_78] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) cmp qword ptr [r12+30h], 0 jz short loc_7A768 add r15, 30h ; '0' mov rdi, rsp mov rsi, r15 mov rdx, r14 call _ZNK5minja19ArgumentsExpression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::ArgumentsExpression::evaluate(std::shared_ptr<minja::Context> const&) lea rsi, [rsp+0C8h+var_78] mov rcx, rsp mov rdi, rbx mov rdx, r14 call _ZNK5minja5Value4callERKSt10shared_ptrINS_7ContextEERNS_14ArgumentsValueE; minja::Value::call(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &) mov rdi, rsp; this call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue() lea rdi, [rsp+0C8h+var_78]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() mov rax, rbx add rsp, 0A0h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_7A738: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aMethodcallexpr+6; char * mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_7A768: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+0C8h+var_98] lea rsi, [rsp+0C8h+var_78] push 2 pop rdx xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aObjectIsNotCal; "Object is not callable: " mov rdi, rsp lea rdx, [rsp+0C8h+var_98] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) 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 mov r14, rax mov rdi, rsp; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_7A7D4 mov r14, rax mov bpl, 1 loc_7A7D4: lea rdi, [rsp+0C8h+var_98]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_7A7E8 jmp short loc_7A80F mov r14, rax loc_7A7E8: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_7A80F mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_7A819 mov r14, rax mov rdi, rsp; this call _ZN5minja14ArgumentsValueD2Ev; minja::ArgumentsValue::~ArgumentsValue() jmp short loc_7A80F mov r14, rax loc_7A80F: lea rdi, [rsp+0C8h+var_78]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_7A819: mov rdi, r14 call __Unwind_Resume
long long minja::CallExpr::do_evaluate(long long a1, long long a2) { void (***v3)(void); // rsi std::runtime_error *exception; // rbx void *v6; // rbx _OWORD v7[3]; // [rsp+0h] [rbp-C8h] BYREF _BYTE v8[32]; // [rsp+30h] [rbp-98h] BYREF _BYTE v9[48]; // [rsp+50h] [rbp-78h] BYREF long long v10; // [rsp+80h] [rbp-48h] v3 = *(void (****)(void))(a2 + 32); if ( !v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "CallExpr.object is null"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v9, v3); if ( !v10 ) { v6 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v8, (long long)v9, 2u, 0); std::operator+<char>((long long)v7, (long long)"Object is not callable: ", (long long)v8); std::runtime_error::runtime_error(v6, v7); __cxa_throw( v6, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::ArgumentsExpression::evaluate(v7, (void (*****)(void))(a2 + 48)); minja::Value::call(a1, (long long)v9); minja::ArgumentsValue::~ArgumentsValue((minja::ArgumentsValue *)v7); minja::Value::~Value((minja::Value *)v9); return a1; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0xa0 MOV R15,RSI MOV RSI,qword ptr [RSI + 0x20] TEST RSI,RSI JZ 0x0017a738 MOV R14,RDX MOV RBX,RDI LEA R12,[RSP + 0x50] MOV RDI,R12 CALL 0x0016e802 CMP qword ptr [R12 + 0x30],0x0 JZ 0x0017a768 ADD R15,0x30 LAB_0017a6f2: MOV RDI,RSP MOV RSI,R15 MOV RDX,R14 CALL 0x001784a8 LAB_0017a700: LEA RSI,[RSP + 0x50] MOV RCX,RSP MOV RDI,RBX MOV RDX,R14 CALL 0x00179224 LAB_0017a713: MOV RDI,RSP CALL 0x00179308 LEA RDI,[RSP + 0x50] CALL 0x0016ea92 MOV RAX,RBX ADD RSP,0xa0 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0017a738: PUSH 0x10 POP RDI CALL 0x00124470 MOV RBX,RAX LAB_0017a743: LEA RSI,[0x1c0656] MOV RDI,RAX CALL 0x00124330 LAB_0017a752: MOV RSI,qword ptr [0x0020bff0] MOV RDX,qword ptr [0x0020bf58] MOV RDI,RBX CALL 0x00124f80 LAB_0017a768: PUSH 0x10 POP RDI CALL 0x00124470 MOV RBX,RAX LAB_0017a773: LEA RDI,[RSP + 0x30] LEA RSI,[RSP + 0x50] PUSH 0x2 POP RDX XOR ECX,ECX CALL 0x0016ec80 LAB_0017a787: LEA RSI,[0x1c08f1] MOV RDI,RSP LEA RDX,[RSP + 0x30] CALL 0x00164496 MOV BPL,0x1 LAB_0017a79e: MOV RSI,RSP MOV RDI,RBX CALL 0x00124e90 XOR EBP,EBP MOV RSI,qword ptr [0x0020bff0] MOV RDX,qword ptr [0x0020bf58] MOV RDI,RBX CALL 0x00124f80
/* minja::CallExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ CallExpr * __thiscall minja::CallExpr::do_evaluate(CallExpr *this,shared_ptr *param_1) { runtime_error *prVar1; ArgumentsExpression aAStack_c8 [48]; int1 local_98 [32]; Expression local_78 [48]; long local_48; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { prVar1 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017a743 to 0017a751 has its CatchHandler @ 0017a7f2 */ std::runtime_error::runtime_error(prVar1,"CallExpr.object is null"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar1,PTR_typeinfo_0020bff0,PTR__runtime_error_0020bf58); } Expression::evaluate(local_78,*(shared_ptr **)(param_1 + 0x20)); if (local_48 != 0) { /* try { // try from 0017a6f2 to 0017a6ff has its CatchHandler @ 0017a80c */ ArgumentsExpression::evaluate(aAStack_c8,param_1 + 0x30); /* try { // try from 0017a700 to 0017a712 has its CatchHandler @ 0017a7ff */ Value::call(this,(ArgumentsValue *)local_78); ArgumentsValue::~ArgumentsValue((ArgumentsValue *)aAStack_c8); Value::~Value((Value *)local_78); return this; } prVar1 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0017a773 to 0017a786 has its CatchHandler @ 0017a7e5 */ Value::dump_abi_cxx11_((int)local_98,SUB81(local_78,0)); /* try { // try from 0017a787 to 0017a79a has its CatchHandler @ 0017a7ce */ std::operator+((char *)aAStack_c8,(string *)"Object is not callable: "); /* try { // try from 0017a79e to 0017a7c0 has its CatchHandler @ 0017a7c1 */ std::runtime_error::runtime_error(prVar1,(string *)aAStack_c8); /* WARNING: Subroutine does not return */ __cxa_throw(prVar1,PTR_typeinfo_0020bff0,PTR__runtime_error_0020bf58); }
26,188
my_caseup_str_8bit
eloqsql/strings/ctype-simple.c
size_t my_caseup_str_8bit(CHARSET_INFO * cs,char *str) { register const uchar *map= cs->to_upper; char *str_orig= str; while ((*str= (char) map[(uchar) *str]) != 0) str++; return (size_t) (str - str_orig); }
O0
c
my_caseup_str_8bit: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq 0x50(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movzbl (%rcx), %ecx movb (%rax,%rcx), %al movq -0x10(%rbp), %rcx movb %al, (%rcx) movsbl %al, %eax cmpl $0x0, %eax je 0xa6e0a movq -0x10(%rbp), %rax addq $0x1, %rax movq %rax, -0x10(%rbp) jmp 0xa6de0 movq -0x10(%rbp), %rax movq -0x20(%rbp), %rcx subq %rcx, %rax popq %rbp retq nopw (%rax,%rax)
my_caseup_str_8bit: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov rax, [rax+50h] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov [rbp+var_20], rax loc_A6DE0: mov rax, [rbp+var_18] mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx] mov al, [rax+rcx] mov rcx, [rbp+var_10] mov [rcx], al movsx eax, al cmp eax, 0 jz short loc_A6E0A mov rax, [rbp+var_10] add rax, 1 mov [rbp+var_10], rax jmp short loc_A6DE0 loc_A6E0A: mov rax, [rbp+var_10] mov rcx, [rbp+var_20] sub rax, rcx pop rbp retn
_BYTE * my_caseup_str_8bit(long long a1, _BYTE *a2) { char v2; // al long long v4; // [rsp+8h] [rbp-18h] _BYTE *v5; // [rsp+10h] [rbp-10h] v5 = a2; v4 = *(_QWORD *)(a1 + 80); while ( 1 ) { v2 = *(_BYTE *)(v4 + (unsigned __int8)*v5); *v5 = v2; if ( !v2 ) break; ++v5; } return (_BYTE *)(v5 - a2); }
my_caseup_str_8bit: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x50] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX LAB_001a6de0: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX] MOV AL,byte ptr [RAX + RCX*0x1] MOV RCX,qword ptr [RBP + -0x10] MOV byte ptr [RCX],AL MOVSX EAX,AL CMP EAX,0x0 JZ 0x001a6e0a MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x10],RAX JMP 0x001a6de0 LAB_001a6e0a: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x20] SUB RAX,RCX POP RBP RET
long my_caseup_str_8bit(long param_1,byte *param_2) { byte bVar1; long lVar2; byte *local_18; lVar2 = *(long *)(param_1 + 0x50); local_18 = param_2; while (bVar1 = *(byte *)(lVar2 + (ulong)*local_18), *local_18 = bVar1, bVar1 != 0) { local_18 = local_18 + 1; } return (long)local_18 - (long)param_2; }
26,189
ma_open_datafile
eloqsql/storage/maria/ma_open.c
int _ma_open_datafile(MARIA_HA *info, MARIA_SHARE *share) { myf flags= (share->mode & O_NOFOLLOW) ? MY_NOSYMLINKS | MY_WME : MY_WME; if (share->temporary) flags|= MY_THREAD_SPECIFIC; DEBUG_SYNC_C("mi_open_datafile"); info->dfile.file= share->bitmap.file.file= mysql_file_open(key_file_dfile, share->data_file_name.str, share->mode | O_SHARE | O_CLOEXEC, flags); return info->dfile.file >= 0 ? 0 : 1; }
O0
c
ma_open_datafile: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x10(%rbp), %rax movl 0x7a4(%rax), %edx andl $0x20000, %edx # imm = 0x20000 movl $0x10, %eax movl $0x210, %ecx # imm = 0x210 cmpl $0x0, %edx cmovnel %ecx, %eax movl %eax, %eax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, 0x7d9(%rax) je 0x8fa21 movq -0x18(%rbp), %rax orq $0x10000, %rax # imm = 0x10000 movq %rax, -0x18(%rbp) jmp 0x8fa23 jmp 0x8fa25 leaq 0x3e90e0(%rip), %rax # 0x478b0c movl (%rax), %edi movq -0x10(%rbp), %rax movq 0x5c0(%rax), %rcx movq -0x10(%rbp), %rax movl 0x7a4(%rax), %r8d orl $0x0, %r8d orl $0x80000, %r8d # imm = 0x80000 movq -0x18(%rbp), %r9 leaq 0xc40fc(%rip), %rsi # 0x153b56 movl $0x806, %edx # imm = 0x806 callq 0x8df30 movl %eax, %ecx movq -0x10(%rbp), %rax movl %ecx, 0xa60(%rax) movq -0x8(%rbp), %rax movl %ecx, 0x480(%rax) movq -0x8(%rbp), %rax movl 0x480(%rax), %edx movl $0x1, %eax xorl %ecx, %ecx cmpl $0x0, %edx cmovgel %ecx, %eax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_open_datafile: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_10] mov edx, [rax+7A4h] and edx, 20000h mov eax, 10h mov ecx, 210h cmp edx, 0 cmovnz eax, ecx mov eax, eax mov [rbp+var_18], rax mov rax, [rbp+var_10] cmp byte ptr [rax+7D9h], 0 jz short loc_8FA21 mov rax, [rbp+var_18] or rax, 10000h mov [rbp+var_18], rax loc_8FA21: jmp short $+2 loc_8FA23: jmp short $+2 loc_8FA25: lea rax, key_file_dfile mov edi, [rax] mov rax, [rbp+var_10] mov rcx, [rax+5C0h] mov rax, [rbp+var_10] mov r8d, [rax+7A4h] or r8d, 0 or r8d, 80000h mov r9, [rbp+var_18] lea rsi, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 806h call inline_mysql_file_open_1 mov ecx, eax mov rax, [rbp+var_10] mov [rax+0A60h], ecx mov rax, [rbp+var_8] mov [rax+480h], ecx mov rax, [rbp+var_8] mov edx, [rax+480h] mov eax, 1 xor ecx, ecx cmp edx, 0 cmovge eax, ecx add rsp, 20h pop rbp retn
_BOOL8 ma_open_datafile(long long a1, long long a2) { unsigned int v2; // eax int v3; // eax long long v5; // [rsp+8h] [rbp-18h] v2 = 16; if ( (*(_DWORD *)(a2 + 1956) & 0x20000) != 0 ) v2 = 528; v5 = v2; if ( *(_BYTE *)(a2 + 2009) ) v5 = v2 | 0x10000LL; v3 = inline_mysql_file_open_1( key_file_dfile, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 0x806u, *(_QWORD *)(a2 + 1472), *(_DWORD *)(a2 + 1956) | 0x80000u, v5); *(_DWORD *)(a2 + 2656) = v3; *(_DWORD *)(a1 + 1152) = v3; return *(int *)(a1 + 1152) < 0; }
_ma_open_datafile: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RAX + 0x7a4] AND EDX,0x20000 MOV EAX,0x10 MOV ECX,0x210 CMP EDX,0x0 CMOVNZ EAX,ECX MOV EAX,EAX MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x7d9],0x0 JZ 0x0018fa21 MOV RAX,qword ptr [RBP + -0x18] OR RAX,0x10000 MOV qword ptr [RBP + -0x18],RAX LAB_0018fa21: JMP 0x0018fa23 LAB_0018fa23: JMP 0x0018fa25 LAB_0018fa25: LEA RAX,[0x578b0c] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x5c0] MOV RAX,qword ptr [RBP + -0x10] MOV R8D,dword ptr [RAX + 0x7a4] OR R8D,0x0 OR R8D,0x80000 MOV R9,qword ptr [RBP + -0x18] LEA RSI,[0x253b56] MOV EDX,0x806 CALL 0x0018df30 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0xa60],ECX MOV RAX,qword ptr [RBP + -0x8] MOV dword ptr [RAX + 0x480],ECX MOV RAX,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RAX + 0x480] MOV EAX,0x1 XOR ECX,ECX CMP EDX,0x0 CMOVGE EAX,ECX ADD RSP,0x20 POP RBP RET
bool _ma_open_datafile(long param_1,long param_2) { uint uVar1; int4 uVar2; uVar1 = 0x10; if ((*(uint *)(param_2 + 0x7a4) & 0x20000) != 0) { uVar1 = 0x210; } if (*(char *)(param_2 + 0x7d9) != '\0') { uVar1 = uVar1 | 0x10000; } uVar2 = inline_mysql_file_open (key_file_dfile, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x806, *(int8 *)(param_2 + 0x5c0),*(uint *)(param_2 + 0x7a4) | 0x80000,uVar1); *(int4 *)(param_2 + 0xa60) = uVar2; *(int4 *)(param_1 + 0x480) = uVar2; return *(int *)(param_1 + 0x480) < 0; }
26,190
ma_open_datafile
eloqsql/storage/maria/ma_open.c
int _ma_open_datafile(MARIA_HA *info, MARIA_SHARE *share) { myf flags= (share->mode & O_NOFOLLOW) ? MY_NOSYMLINKS | MY_WME : MY_WME; if (share->temporary) flags|= MY_THREAD_SPECIFIC; DEBUG_SYNC_C("mi_open_datafile"); info->dfile.file= share->bitmap.file.file= mysql_file_open(key_file_dfile, share->data_file_name.str, share->mode | O_SHARE | O_CLOEXEC, flags); return info->dfile.file >= 0 ? 0 : 1; }
O3
c
ma_open_datafile: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rsi, %r14 movq %rdi, -0x30(%rbp) movl 0x7a4(%rsi), %r15d movl %r15d, %eax andl $0x20000, %eax # imm = 0x20000 shrl $0x8, %eax xorl %r12d, %r12d cmpb $0x0, 0x7d9(%rsi) setne %r12b shll $0x10, %r12d orl %eax, %r12d orq $0x10, %r12 leaq 0x3918de(%rip), %rax # 0x3fcd7c movl (%rax), %esi movq 0x5c0(%r14), %r13 orl $0x80000, %r15d # imm = 0x80000 leaq 0x31ab5b(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x80(%rbp), %rdi leaq -0x38(%rbp), %rbx movl $0x2, %edx movq %r13, %rcx movq %rbx, %r8 callq *0x148(%rax) movq %rax, (%rbx) testq %rax, %rax jne 0x6b512 movq %r13, %rdi movl %r15d, %esi movq %r12, %rdx callq 0xa0cd0 movl %eax, %r15d movl %r15d, 0xa60(%r14) movq -0x30(%rbp), %rax movl %r15d, 0x480(%rax) shrl $0x1f, %r15d movl %r15d, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x31aaf7(%rip), %rbx # 0x386010 movq (%rbx), %rcx leaq 0x6f7ce(%rip), %rsi # 0xdacf1 movq %rax, %rdi movl $0x806, %edx # imm = 0x806 callq *0x1f0(%rcx) movq %r13, %rdi movl %r15d, %esi movq %r12, %rdx callq 0xa0cd0 movl %eax, %r15d movq (%rbx), %rax movq -0x38(%rbp), %rdi movl %r15d, %esi callq *0x200(%rax) jmp 0x6b4ea
_ma_open_datafile: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rsi mov [rbp+var_30], rdi mov r15d, [rsi+7A4h] mov eax, r15d and eax, 20000h shr eax, 8 xor r12d, r12d cmp byte ptr [rsi+7D9h], 0 setnz r12b shl r12d, 10h or r12d, eax or r12, 10h lea rax, key_file_dfile mov esi, [rax] mov r13, [r14+5C0h] or r15d, 80000h lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_80] lea rbx, [rbp+var_38] mov edx, 2 mov rcx, r13 mov r8, rbx call qword ptr [rax+148h] mov [rbx], rax test rax, rax jnz short loc_6B512 mov rdi, r13 mov esi, r15d mov rdx, r12 call my_open mov r15d, eax loc_6B4EA: mov [r14+0A60h], r15d mov rax, [rbp+var_30] mov [rax+480h], r15d shr r15d, 1Fh mov eax, r15d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6B512: lea rbx, PSI_server mov rcx, [rbx] lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rax mov edx, 806h call qword ptr [rcx+1F0h] mov rdi, r13 mov esi, r15d mov rdx, r12 call my_open mov r15d, eax mov rax, [rbx] mov rdi, [rbp+var_38] mov esi, r15d call qword ptr [rax+200h] jmp short loc_6B4EA
long long ma_open_datafile(long long a1, long long a2) { long long v2; // r12 long long v3; // r13 unsigned int v4; // r15d long long v5; // rax long long v6; // r15 _BYTE v8[72]; // [rsp+0h] [rbp-80h] BYREF long long v9; // [rsp+48h] [rbp-38h] BYREF long long v10; // [rsp+50h] [rbp-30h] v10 = a1; v2 = ((*(_DWORD *)(a2 + 1956) & 0x20000u) >> 8) | ((*(_BYTE *)(a2 + 2009) != 0) << 16) | 0x10LL; v3 = *(_QWORD *)(a2 + 1472); v4 = *(_DWORD *)(a2 + 1956) | 0x80000; v5 = ((long long ( *)(_BYTE *, _QWORD, long long, long long, long long *))PSI_server[41])( v8, key_file_dfile, 2LL, v3, &v9); v9 = v5; if ( v5 ) { ((void ( *)(long long, const char *, long long))PSI_server[62])( v5, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c", 2054LL); v6 = (unsigned int)my_open(v3, v4, v2); ((void ( *)(long long, long long))PSI_server[64])(v9, v6); } else { LODWORD(v6) = my_open(v3, v4, v2); } *(_DWORD *)(a2 + 2656) = v6; *(_DWORD *)(v10 + 1152) = v6; return (unsigned int)v6 >> 31; }
_ma_open_datafile: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RSI MOV qword ptr [RBP + -0x30],RDI MOV R15D,dword ptr [RSI + 0x7a4] MOV EAX,R15D AND EAX,0x20000 SHR EAX,0x8 XOR R12D,R12D CMP byte ptr [RSI + 0x7d9],0x0 SETNZ R12B SHL R12D,0x10 OR R12D,EAX OR R12,0x10 LEA RAX,[0x4fcd7c] MOV ESI,dword ptr [RAX] MOV R13,qword ptr [R14 + 0x5c0] OR R15D,0x80000 LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x80] LEA RBX,[RBP + -0x38] MOV EDX,0x2 MOV RCX,R13 MOV R8,RBX CALL qword ptr [RAX + 0x148] MOV qword ptr [RBX],RAX TEST RAX,RAX JNZ 0x0016b512 MOV RDI,R13 MOV ESI,R15D MOV RDX,R12 CALL 0x001a0cd0 MOV R15D,EAX LAB_0016b4ea: MOV dword ptr [R14 + 0xa60],R15D MOV RAX,qword ptr [RBP + -0x30] MOV dword ptr [RAX + 0x480],R15D SHR R15D,0x1f MOV EAX,R15D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016b512: LEA RBX,[0x486010] MOV RCX,qword ptr [RBX] LEA RSI,[0x1dacf1] MOV RDI,RAX MOV EDX,0x806 CALL qword ptr [RCX + 0x1f0] MOV RDI,R13 MOV ESI,R15D MOV RDX,R12 CALL 0x001a0cd0 MOV R15D,EAX MOV RAX,qword ptr [RBX] MOV RDI,qword ptr [RBP + -0x38] MOV ESI,R15D CALL qword ptr [RAX + 0x200] JMP 0x0016b4ea
uint _ma_open_datafile(long param_1,long param_2) { int8 uVar1; uint uVar2; uint uVar3; int1 local_88 [72]; long local_40; long local_38; uVar2 = (uint)(*(char *)(param_2 + 0x7d9) != '\0') << 0x10 | (*(uint *)(param_2 + 0x7a4) & 0x20000) >> 8 | 0x10; uVar1 = *(int8 *)(param_2 + 0x5c0); uVar3 = *(uint *)(param_2 + 0x7a4) | 0x80000; local_38 = param_1; local_40 = (**(code **)(PSI_server + 0x148))(local_88,key_file_dfile,2,uVar1,&local_40); if (local_40 == 0) { uVar2 = my_open(uVar1,uVar3,uVar2); } else { (**(code **)(PSI_server + 0x1f0)) (local_40,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_open.c",0x806); uVar2 = my_open(uVar1,uVar3,uVar2); (**(code **)(PSI_server + 0x200))(local_40,uVar2); } *(uint *)(param_2 + 0xa60) = uVar2; *(uint *)(local_38 + 0x480) = uVar2; return uVar2 >> 0x1f; }
26,191
ps_fetch_float
eloqsql/libmariadb/libmariadb/ma_stmt_codec.c
static void ps_fetch_float(MYSQL_BIND *r_param, const MYSQL_FIELD * field, unsigned char **row) { switch(r_param->buffer_type) { case MYSQL_TYPE_FLOAT: { float *value= (float *)r_param->buffer; float4get(*value, *row); r_param->buffer_length= 4; *r_param->error= 0; } break; default: { float value; memcpy(&value, *row, sizeof(float)); float4get(value, (char *)*row); convert_from_float(r_param, field, value, sizeof(float)); } break; } (*row)+= 4; }
O0
c
ps_fetch_float: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x60(%rax), %eax subl $0x4, %eax jne 0x33c76 jmp 0x33c42 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx movq (%rcx), %rcx movl (%rcx), %ecx movl %ecx, (%rax) movq -0x8(%rbp), %rax movq $0x4, 0x40(%rax) movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movb $0x0, (%rax) jmp 0x33ca5 movq -0x18(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rax movq (%rax), %rax movl (%rax), %eax movl %eax, -0x24(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movss -0x24(%rbp), %xmm0 movl $0x4, %edx callq 0x354f0 movq -0x18(%rbp), %rax movq (%rax), %rcx addq $0x4, %rcx movq %rcx, (%rax) addq $0x30, %rsp popq %rbp retq nopl (%rax)
ps_fetch_float: 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_8] mov eax, [rax+60h] sub eax, 4 jnz short loc_33C76 jmp short $+2 loc_33C42: mov rax, [rbp+var_8] mov rax, [rax+10h] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_18] mov rcx, [rcx] mov ecx, [rcx] mov [rax], ecx mov rax, [rbp+var_8] mov qword ptr [rax+40h], 4 mov rax, [rbp+var_8] mov rax, [rax+18h] mov byte ptr [rax], 0 jmp short loc_33CA5 loc_33C76: mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax] mov [rbp+var_24], eax mov rax, [rbp+var_18] mov rax, [rax] mov eax, [rax] mov [rbp+var_24], eax mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] movss xmm0, [rbp+var_24] mov edx, 4 call convert_from_float loc_33CA5: mov rax, [rbp+var_18] mov rcx, [rax] add rcx, 4 mov [rax], rcx add rsp, 30h pop rbp retn
float ** ps_fetch_float(long long a1, long long a2, float **a3) { float **result; // rax if ( *(_DWORD *)(a1 + 96) == 4 ) { **(float **)(a1 + 16) = **a3; *(_QWORD *)(a1 + 64) = 4LL; **(_BYTE **)(a1 + 24) = 0; } else { convert_from_float(a1, a2, 4LL, **a3); } result = a3; ++*a3; return result; }
ps_fetch_float: 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 + -0x8] MOV EAX,dword ptr [RAX + 0x60] SUB EAX,0x4 JNZ 0x00133c76 JMP 0x00133c42 LAB_00133c42: MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RCX] MOV ECX,dword ptr [RCX] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x40],0x4 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV byte ptr [RAX],0x0 JMP 0x00133ca5 LAB_00133c76: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x24],EAX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOVSS XMM0,dword ptr [RBP + -0x24] MOV EDX,0x4 CALL 0x001354f0 LAB_00133ca5: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX] ADD RCX,0x4 MOV qword ptr [RAX],RCX ADD RSP,0x30 POP RBP RET
void ps_fetch_float(long param_1,int8 param_2,long *param_3) { if (*(int *)(param_1 + 0x60) == 4) { **(int4 **)(param_1 + 0x10) = *(int4 *)*param_3; *(int8 *)(param_1 + 0x40) = 4; **(int1 **)(param_1 + 0x18) = 0; } else { convert_from_float(*(int4 *)*param_3,param_1,param_2,4); } *param_3 = *param_3 + 4; return; }
26,192
minja::Parser::unterminated(minja::TemplateToken const&) const
monkey531[P]llama/common/./minja.hpp
std::runtime_error unterminated(const TemplateToken & token) const { return std::runtime_error("Unterminated " + TemplateToken::typeToString(token.type) + error_location_suffix(*template_str, token.location.pos)); }
O2
cpp
minja::Parser::unterminated(minja::TemplateToken const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx movl 0x8(%rdx), %esi leaq 0x68(%rsp), %r12 movq %r12, %rdi callq 0x55a9c leaq 0x498d5(%rip), %rsi # 0x9e9e3 leaq 0x28(%rsp), %rdi movq %r12, %rdx callq 0x30398 movq (%r15), %rsi movq 0x20(%r14), %rdx leaq 0x8(%rsp), %rdi callq 0x257bb leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi leaq 0x8(%rsp), %rdx callq 0x40762 leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x20aa0 leaq 0x48(%rsp), %rdi callq 0x20d78 leaq 0x8(%rsp), %rdi callq 0x20d78 leaq 0x28(%rsp), %rdi callq 0x20d78 leaq 0x68(%rsp), %rdi callq 0x20d78 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x20d78 jmp 0x55199 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x20d78 jmp 0x551a8 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x20d78 jmp 0x551b7 movq %rax, %rbx leaq 0x68(%rsp), %rdi callq 0x20d78 movq %rbx, %rdi callq 0x20b90 nop
_ZNK5minja6Parser12unterminatedERKNS_13TemplateTokenE: push r15 push r14 push r12 push rbx sub rsp, 88h mov r14, rdx mov r15, rsi mov rbx, rdi mov esi, [rdx+8] lea r12, [rsp+0A8h+var_40] mov rdi, r12 call _ZN5minja13TemplateToken12typeToStringB5cxx11ENS0_4TypeE; minja::TemplateToken::typeToString(minja::TemplateToken::Type) lea rsi, aUnterminated; "Unterminated " lea rdi, [rsp+0A8h+var_80] mov rdx, r12 call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov rsi, [r15] mov rdx, [r14+20h] lea rdi, [rsp+0A8h+var_A0] call _ZN5minjaL21error_location_suffixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm; minja::error_location_suffix(std::string const&,ulong) lea rdi, [rsp+0A8h+var_60] lea rsi, [rsp+0A8h+var_80] lea rdx, [rsp+0A8h+var_A0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) lea rsi, [rsp+0A8h+var_60] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) lea rdi, [rsp+0A8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 88h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_55199 mov rbx, rax loc_55199: lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_551A8 mov rbx, rax loc_551A8: lea rdi, [rsp+arg_20]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_551B7 mov rbx, rax loc_551B7: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
minja::Parser * minja::Parser::unterminated(minja::Parser *this, long long **a2, long long a3) { _QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF _QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF _BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF _BYTE v8[64]; // [rsp+68h] [rbp-40h] BYREF minja::TemplateToken::typeToString[abi:cxx11](v8, *(unsigned int *)(a3 + 8)); std::operator+<char>((long long)v6, (long long)"Unterminated ", (long long)v8); minja::error_location_suffix((long long)v5, *a2, *(_QWORD *)(a3 + 32)); std::operator+<char>((long long)v7, v6, v5); std::runtime_error::runtime_error(this, v7); std::string::~string(v7); std::string::~string(v5); std::string::~string(v6); std::string::~string(v8); return this; }
unterminated: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x88 MOV R14,RDX MOV R15,RSI MOV RBX,RDI MOV ESI,dword ptr [RDX + 0x8] LEA R12,[RSP + 0x68] MOV RDI,R12 CALL 0x00155a9c LAB_00155107: LEA RSI,[0x19e9e3] LEA RDI,[RSP + 0x28] MOV RDX,R12 CALL 0x00130398 MOV RSI,qword ptr [R15] MOV RDX,qword ptr [R14 + 0x20] LAB_00155122: LEA RDI,[RSP + 0x8] CALL 0x001257bb LAB_0015512c: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x00140762 LAB_00155140: LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x00120aa0 LAB_0015514d: LEA RDI,[RSP + 0x48] CALL 0x00120d78 LEA RDI,[RSP + 0x8] CALL 0x00120d78 LEA RDI,[RSP + 0x28] CALL 0x00120d78 LEA RDI,[RSP + 0x68] CALL 0x00120d78 MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R14 POP R15 RET
/* minja::Parser::unterminated(minja::TemplateToken const&) const */ TemplateToken * minja::Parser::unterminated(TemplateToken *param_1) { long in_RDX; int8 *in_RSI; minja local_a0 [32]; string local_80 [32]; string local_60 [32]; TemplateToken local_40 [32]; TemplateToken::typeToString_abi_cxx11_(local_40,*(int4 *)(in_RDX + 8)); /* try { // try from 00155107 to 0015511a has its CatchHandler @ 001551b4 */ std::operator+((char *)local_80,(string *)"Unterminated "); /* try { // try from 00155122 to 0015512b has its CatchHandler @ 001551a5 */ error_location_suffix(local_a0,(string *)*in_RSI,*(ulong *)(in_RDX + 0x20)); /* try { // try from 0015512c to 0015513f has its CatchHandler @ 00155196 */ std::operator+(local_60,local_80); /* try { // try from 00155140 to 0015514c has its CatchHandler @ 00155187 */ std::runtime_error::runtime_error((runtime_error *)param_1,local_60); std::__cxx11::string::~string(local_60); std::__cxx11::string::~string((string *)local_a0); std::__cxx11::string::~string(local_80); std::__cxx11::string::~string((string *)local_40); return param_1; }
26,193
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const
monkey531[P]llama/common/minja.hpp
void do_render(std::ostringstream & out, const std::shared_ptr<Context> & context) const override { // https://jinja.palletsprojects.com/en/3.0.x/templates/#for if (!iterable) throw std::runtime_error("ForNode.iterable is null"); if (!body) throw std::runtime_error("ForNode.body is null"); auto iterable_value = iterable->evaluate(context); Value::CallableType loop_function; std::function<void(Value&)> visit = [&](Value& iter) { auto filtered_items = Value::array(); if (!iter.is_null()) { if (!iterable_value.is_iterable()) { throw std::runtime_error("For loop iterable must be iterable: " + iterable_value.dump()); } iterable_value.for_each([&](Value & item) { destructuring_assign(var_names, context, item); if (!condition || condition->evaluate(context).to_bool()) { filtered_items.push_back(item); } }); } if (filtered_items.empty()) { if (else_body) { else_body->render(out, context); } } else { auto loop = recursive ? Value::callable(loop_function) : Value::object(); loop.set("length", (int64_t) filtered_items.size()); size_t cycle_index = 0; loop.set("cycle", Value::callable([&](const std::shared_ptr<Context> &, ArgumentsValue & args) { if (args.args.empty() || !args.kwargs.empty()) { throw std::runtime_error("cycle() expects at least 1 positional argument and no named arg"); } auto item = args.args[cycle_index]; cycle_index = (cycle_index + 1) % args.args.size(); return item; })); auto loop_context = Context::make(Value::object(), context); loop_context->set("loop", loop); for (size_t i = 0, n = filtered_items.size(); i < n; ++i) { auto & item = filtered_items.at(i); destructuring_assign(var_names, loop_context, item); loop.set("index", (int64_t) i + 1); loop.set("index0", (int64_t) i); loop.set("revindex", (int64_t) (n - i)); loop.set("revindex0", (int64_t) (n - i - 1)); loop.set("length", (int64_t) n); loop.set("first", i == 0); loop.set("last", i == (n - 1)); loop.set("previtem", i > 0 ? filtered_items.at(i - 1) : Value()); loop.set("nextitem", i < n - 1 ? filtered_items.at(i + 1) : Value()); try { body->render(out, loop_context); } catch (const LoopControlException & e) { if (e.control_type == LoopControlType::Break) break; if (e.control_type == LoopControlType::Continue) continue; } } } }; if (recursive) { loop_function = [&](const std::shared_ptr<Context> &, ArgumentsValue & args) { if (args.args.size() != 1 || !args.kwargs.empty() || !args.args[0].is_array()) { throw std::runtime_error("loop() expects exactly 1 positional iterable argument"); } auto & items = args.args[0]; visit(items); return Value(); }; } visit(iterable_value); }
O1
cpp
minja::ForNode::do_render(std::__cxx11::basic_ostringstream<char, std::char_traits<char>, std::allocator<char>>&, std::shared_ptr<minja::Context> const&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rsi, %r14 movq 0x38(%rdi), %rsi testq %rsi, %rsi je 0x5e62d movq %rdi, %rbx cmpq $0x0, 0x58(%rdi) je 0x5e64b movq %rdx, %r15 leaq 0x48(%rsp), %r12 movq %r12, %rdi callq 0x3d6d0 xorps %xmm0, %xmm0 movaps %xmm0, 0x30(%rsp) movaps %xmm0, 0x20(%rsp) movaps %xmm0, 0x10(%rsp) movaps %xmm0, (%rsp) movl $0x28, %edi callq 0x18690 movq %r12, (%rax) movq %rbx, 0x8(%rax) movq %r15, 0x10(%rax) movq %r14, 0x18(%rax) leaq 0x20(%rsp), %rcx movq %rcx, 0x20(%rax) movq %rax, (%rsp) leaq 0x32f(%rip), %rax # 0x5e85e movq %rax, 0x18(%rsp) leaq 0x32b(%rip), %rax # 0x5e866 movq %rax, 0x10(%rsp) cmpb $0x1, 0x68(%rbx) jne 0x5e55b movq %rsp, %rax leaq 0x40(%rsp), %rsi movq %rax, (%rsi) leaq 0x20(%rsp), %rdi callq 0x5e7da cmpq $0x0, 0x10(%rsp) je 0x5e67d movq %rsp, %rdi leaq 0x48(%rsp), %rsi callq *0x18(%rdi) movq 0x10(%rsp), %rax testq %rax, %rax je 0x5e589 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x30(%rsp), %rax testq %rax, %rax je 0x5e5a2 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x88(%rsp), %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x3da52 movq %rbx, %rdi callq 0x4a9be movq -0x8(%rbx), %rdi testq %rdi, %rdi je 0x5e5ca callq 0x2fb64 movq 0x70(%rsp), %rdi testq %rdi, %rdi je 0x5e5d9 callq 0x2fb64 movq 0x60(%rsp), %rdi testq %rdi, %rdi je 0x5e5e8 callq 0x2fb64 movq 0x50(%rsp), %rdi testq %rdi, %rdi je 0x5e61e movq 0x7f99f(%rip), %rax # 0xddf98 cmpb $0x0, (%rax) je 0x5e609 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0x5e613 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0x5e61e movq (%rdi), %rax callq *0x18(%rax) addq $0x98, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl $0x10, %edi callq 0x18350 movq %rax, %r14 leaq 0x4f1c9(%rip), %rsi # 0xad80a movq %rax, %rdi callq 0x18260 jmp 0x5e667 movl $0x10, %edi callq 0x18350 movq %rax, %r14 leaq 0x4f1c4(%rip), %rsi # 0xad823 movq %rax, %rdi callq 0x18260 movq 0x7f982(%rip), %rsi # 0xddff0 movq 0x7f8fb(%rip), %rdx # 0xddf70 movq %r14, %rdi callq 0x18b30 callq 0x18250 jmp 0x5e684 movq %rax, %rbx movq %r14, %rdi callq 0x184f0 jmp 0x5e6d7 jmp 0x5e6e1 jmp 0x5e6e1 movq %rax, %rbx jmp 0x5e6b4 movq %rax, %rbx movq 0x10(%rsp), %rax testq %rax, %rax je 0x5e6b4 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x30(%rsp), %rax testq %rax, %rax je 0x5e6cd leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x48(%rsp), %rdi callq 0x3d9c6 movq %rbx, %rdi callq 0x18ba0 jmp 0x5e6e1 movq %rax, %rdi callq 0x2a807 nop
_ZNK5minja7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS_7ContextEE: push r15 push r14 push r12 push rbx sub rsp, 98h mov r14, rsi mov rsi, [rdi+38h] test rsi, rsi jz loc_5E62D mov rbx, rdi cmp qword ptr [rdi+58h], 0 jz loc_5E64B mov r15, rdx lea r12, [rsp+0B8h+var_70] mov rdi, r12 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) xorps xmm0, xmm0 movaps [rsp+0B8h+var_88], xmm0 movaps [rsp+0B8h+var_98], xmm0 movaps [rsp+0B8h+var_A8], xmm0 movaps [rsp+0B8h+var_B8], xmm0 mov edi, 28h ; '('; unsigned __int64 call __Znwm; operator new(ulong) mov [rax], r12 mov [rax+8], rbx mov [rax+10h], r15 mov [rax+18h], r14 lea rcx, [rsp+0B8h+var_98] mov [rax+20h], rcx mov qword ptr [rsp+0B8h+var_B8], rax lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E9_M_invokeERKSt9_Any_dataS2_; std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke(std::_Any_data const&,minja::Value &) mov qword ptr [rsp+0B8h+var_A8+8], rax lea rax, _ZNSt17_Function_handlerIFvRN5minja5ValueEEZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEERKSt10shared_ptrINS0_7ContextEEEUlS2_E_E10_M_managerERSt9_Any_dataRKSJ_St18_Manager_operation; std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov qword ptr [rsp+0B8h+var_A8], rax cmp byte ptr [rbx+68h], 1 jnz short loc_5E55B mov rax, rsp lea rsi, [rsp+0B8h+var_78] mov [rsi], rax lea rdi, [rsp+0B8h+var_98] call _ZNSt8functionIFN5minja5ValueERKSt10shared_ptrINS0_7ContextEERNS0_14ArgumentsValueEEEaSIZNKS0_7ForNode9do_renderERNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEES6_EUlS6_S8_E_EENSt9enable_ifIXsrNSA_9_CallableIT_NSL_IXntsr7is_sameINSt9remove_cvINSt16remove_referenceISN_E4typeEE4typeESA_EE5valueESt5decayISN_EE4type4typeESt15__invoke_resultIRSY_JS6_S8_EEEE5valueERSA_E4typeEOSN_ loc_5E55B: cmp qword ptr [rsp+0B8h+var_A8], 0 jz loc_5E67D mov rdi, rsp lea rsi, [rsp+0B8h+var_70] call qword ptr [rdi+18h] mov rax, qword ptr [rsp+0B8h+var_A8] test rax, rax jz short loc_5E589 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_5E589: mov rax, qword ptr [rsp+0B8h+var_88] test rax, rax jz short loc_5E5A2 lea rdi, [rsp+0B8h+var_98] mov rsi, rdi mov edx, 3 call rax loc_5E5A2: lea rbx, [rsp+0B8h+var_30] mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, [rbx-8] test rdi, rdi jz short loc_5E5CA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5E5CA: mov rdi, [rsp+0B8h+var_48] test rdi, rdi jz short loc_5E5D9 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5E5D9: mov rdi, [rsp+0B8h+var_58] test rdi, rdi jz short loc_5E5E8 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_5E5E8: mov rdi, [rsp+0B8h+var_68] test rdi, rdi jz short loc_5E61E mov rax, cs:__libc_single_threaded_ptr cmp byte ptr [rax], 0 jz short loc_5E609 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_5E613 loc_5E609: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_5E613: cmp eax, 1 jnz short loc_5E61E mov rax, [rdi] call qword ptr [rax+18h] loc_5E61E: add rsp, 98h pop rbx pop r12 pop r14 pop r15 retn loc_5E62D: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFornodeIterabl; "ForNode.iterable is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_5E667 loc_5E64B: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aFornodeBodyIsN; "ForNode.body is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_5E667: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, r14; void * call ___cxa_throw loc_5E67D: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) jmp short $+2 loc_5E684: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_5E6D7 jmp short loc_5E6E1 jmp short loc_5E6E1 mov rbx, rax jmp short loc_5E6B4 mov rbx, rax mov rax, qword ptr [rsp+0B8h+var_A8] test rax, rax jz short loc_5E6B4 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_5E6B4: mov rax, qword ptr [rsp+0B8h+var_88] test rax, rax jz short loc_5E6CD lea rdi, [rsp+0B8h+var_98] mov rsi, rdi mov edx, 3 call rax loc_5E6CD: lea rdi, [rsp+0B8h+var_70]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_5E6D7: mov rdi, rbx call __Unwind_Resume jmp short $+2 loc_5E6E1: mov rdi, rax call __clang_call_terminate
long long minja::ForNode::do_render(long long a1, long long a2, long long a3) { void (***v4)(void); // rsi _QWORD *v6; // rax long long result; // rax long long v8; // rdi std::runtime_error *exception; // r14 __int128 v10; // [rsp+0h] [rbp-B8h] BYREF long long ( *v11)(); // [rsp+10h] [rbp-A8h] long long ( *v12)(); // [rsp+18h] [rbp-A0h] __int128 v13; // [rsp+20h] [rbp-98h] BYREF __int128 v14; // [rsp+30h] [rbp-88h] __int128 *v15; // [rsp+40h] [rbp-78h] _BYTE v16[8]; // [rsp+48h] [rbp-70h] BYREF long long v17; // [rsp+50h] [rbp-68h] volatile signed __int32 *v18; // [rsp+60h] [rbp-58h] volatile signed __int32 *v19; // [rsp+70h] [rbp-48h] volatile signed __int32 *v20; // [rsp+80h] [rbp-38h] void *v21[6]; // [rsp+88h] [rbp-30h] BYREF v4 = *(void (****)(void))(a1 + 56); if ( !v4 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ForNode.iterable is null"); goto LABEL_25; } if ( !*(_QWORD *)(a1 + 88) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "ForNode.body is null"); LABEL_25: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)v16, v4); v14 = 0LL; v13 = 0LL; v10 = 0LL; v6 = (_QWORD *)operator new(0x28uLL); *v6 = v16; v6[1] = a1; v6[2] = a3; v6[3] = a2; v6[4] = &v13; *(_QWORD *)&v10 = v6; v12 = std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_invoke; v11 = std::_Function_handler<void ()(minja::Value &),minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(minja::Value &)#1}>::_M_manager; if ( *(_BYTE *)(a1 + 104) == 1 ) { v15 = &v10; std::function<minja::Value ()(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)>::operator=<minja::ForNode::do_render(std::ostringstream &,std::shared_ptr<minja::Context> const&)::{lambda(std::shared_ptr<minja::Context> const&,minja::ArgumentsValue &)#1}>(&v13); } if ( !v11 ) std::__throw_bad_function_call(); ((void ( *)(__int128 *, _BYTE *))v12)(&v10, v16); if ( v11 ) ((void ( *)(__int128 *, __int128 *, long long))v11)(&v10, &v10, 3LL); result = v14; if ( (_QWORD)v14 ) result = ((long long ( *)(__int128 *, __int128 *, long long))v14)(&v13, &v13, 3LL); 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 *)v21); 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(v21); if ( v20 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v20); if ( v19 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v19); if ( v18 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v18); v8 = v17; if ( v17 ) { if ( _libc_single_threaded ) { result = *(unsigned int *)(v17 + 12); *(_DWORD *)(v17 + 12) = result - 1; } else { result = (unsigned int)_InterlockedExchangeAdd((volatile signed __int32 *)(v17 + 12), 0xFFFFFFFF); } if ( (_DWORD)result == 1 ) return (*(long long ( **)(long long, _QWORD))(*(_QWORD *)v8 + 24LL))(v8, 0LL); } return result; }
do_render: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x98 MOV R14,RSI MOV RSI,qword ptr [RDI + 0x38] TEST RSI,RSI JZ 0x0015e62d MOV RBX,RDI CMP qword ptr [RDI + 0x58],0x0 JZ 0x0015e64b MOV R15,RDX LEA R12,[RSP + 0x48] MOV RDI,R12 CALL 0x0013d6d0 XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP + 0x30],XMM0 MOVAPS xmmword ptr [RSP + 0x20],XMM0 MOVAPS xmmword ptr [RSP + 0x10],XMM0 MOVAPS xmmword ptr [RSP],XMM0 LAB_0015e502: MOV EDI,0x28 CALL 0x00118690 MOV qword ptr [RAX],R12 MOV qword ptr [RAX + 0x8],RBX MOV qword ptr [RAX + 0x10],R15 MOV qword ptr [RAX + 0x18],R14 LEA RCX,[RSP + 0x20] MOV qword ptr [RAX + 0x20],RCX MOV qword ptr [RSP],RAX LEA RAX,[0x15e85e] MOV qword ptr [RSP + 0x18],RAX LEA RAX,[0x15e866] MOV qword ptr [RSP + 0x10],RAX CMP byte ptr [RBX + 0x68],0x1 JNZ 0x0015e55b MOV RAX,RSP LEA RSI,[RSP + 0x40] MOV qword ptr [RSI],RAX LEA RDI,[RSP + 0x20] CALL 0x0015e7da LAB_0015e55b: CMP qword ptr [RSP + 0x10],0x0 JZ 0x0015e67d LAB_0015e567: MOV RDI,RSP LEA RSI,[RSP + 0x48] CALL qword ptr [RDI + 0x18] MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0015e589 LAB_0015e57c: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0015e589: MOV RAX,qword ptr [RSP + 0x30] TEST RAX,RAX JZ 0x0015e5a2 LAB_0015e593: LEA RDI,[RSP + 0x20] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0015e5a2: LEA RBX,[RSP + 0x88] MOV RDI,RBX XOR ESI,ESI CALL 0x0013da52 MOV RDI,RBX CALL 0x0014a9be MOV RDI,qword ptr [RBX + -0x8] TEST RDI,RDI JZ 0x0015e5ca CALL 0x0012fb64 LAB_0015e5ca: MOV RDI,qword ptr [RSP + 0x70] TEST RDI,RDI JZ 0x0015e5d9 CALL 0x0012fb64 LAB_0015e5d9: MOV RDI,qword ptr [RSP + 0x60] TEST RDI,RDI JZ 0x0015e5e8 CALL 0x0012fb64 LAB_0015e5e8: MOV RDI,qword ptr [RSP + 0x50] TEST RDI,RDI JZ 0x0015e61e MOV RAX,qword ptr [0x001ddf98] CMP byte ptr [RAX],0x0 JZ 0x0015e609 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x0015e613 LAB_0015e609: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_0015e613: CMP EAX,0x1 JNZ 0x0015e61e MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_0015e61e: ADD RSP,0x98 POP RBX POP R12 POP R14 POP R15 RET LAB_0015e62d: MOV EDI,0x10 CALL 0x00118350 MOV R14,RAX LAB_0015e63a: LEA RSI,[0x1ad80a] MOV RDI,RAX CALL 0x00118260 LAB_0015e649: JMP 0x0015e667 LAB_0015e64b: MOV EDI,0x10 CALL 0x00118350 MOV R14,RAX LAB_0015e658: LEA RSI,[0x1ad823] MOV RDI,RAX CALL 0x00118260 LAB_0015e667: MOV RSI,qword ptr [0x001ddff0] MOV RDX,qword ptr [0x001ddf70] MOV RDI,R14 CALL 0x00118b30 LAB_0015e67d: CALL 0x00118250
/* minja::ForNode::do_render(std::__cxx11::ostringstream&, std::shared_ptr<minja::Context> const&) const */ void __thiscall minja::ForNode::do_render(ForNode *this,ostringstream *param_1,shared_ptr *param_2) { int *piVar1; int iVar2; runtime_error *this_00; int8 *local_b8; int8 uStack_b0; code *local_a8; code *pcStack_a0; int8 local_98; int8 uStack_90; code *local_88; int8 uStack_80; int1 *local_78; Expression local_70 [8]; long *local_68; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_58; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_38; data local_30 [16]; if (*(shared_ptr **)(this + 0x38) == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0015e63a to 0015e648 has its CatchHandler @ 0015e684 */ std::runtime_error::runtime_error(this_00,"ForNode.iterable is null"); } else { if (*(long *)(this + 0x58) != 0) { Expression::evaluate(local_70,*(shared_ptr **)(this + 0x38)); local_88 = (code *)0x0; uStack_80 = 0; local_98 = 0; uStack_90 = 0; local_a8 = (code *)0x0; pcStack_a0 = (code *)0x0; local_b8 = (int8 *)0x0; uStack_b0 = 0; /* try { // try from 0015e502 to 0015e50b has its CatchHandler @ 0015e695 */ local_b8 = (int8 *)operator_new(0x28); *local_b8 = local_70; local_b8[1] = this; local_b8[2] = param_2; local_b8[3] = param_1; local_b8[4] = &local_98; pcStack_a0 = std:: _Function_handler<void(minja::Value&),minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}> ::_M_invoke; local_a8 = std:: _Function_handler<void(minja::Value&),minja::ForNode::do_render(std::__cxx11::ostringstream&,std::shared_ptr<minja::Context>const&)const::{lambda(minja::Value&)#1}> ::_M_manager; if (this[0x68] == (ForNode)0x1) { local_78 = (int1 *)&local_b8; std::function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)>:: operator=((function<minja::Value(std::shared_ptr<minja::Context>const&,minja::ArgumentsValue&)> *)&local_98, (_lambda_std__shared_ptr<minja::Context>_const__minja__ArgumentsValue___1_ *) &local_78); } if (local_a8 != (code *)0x0) { /* try { // try from 0015e567 to 0015e571 has its CatchHandler @ 0015e69a */ (*pcStack_a0)(&local_b8,local_70); if (local_a8 != (code *)0x0) { /* try { // try from 0015e57c to 0015e588 has its CatchHandler @ 0015e693 */ (*local_a8)(&local_b8,&local_b8,3); } if (local_88 != (code *)0x0) { /* try { // try from 0015e593 to 0015e5a1 has its CatchHandler @ 0015e691 */ (*local_88)(&local_98,&local_98,3); } nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(local_30,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_30); if (local_38 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_38); } if (local_48 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_48); } if (local_58 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_58); } if (local_68 != (long *)0x0) { if (*PTR___libc_single_threaded_001ddf98 == '\0') { LOCK(); piVar1 = (int *)((long)local_68 + 0xc); iVar2 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar2 = *(int *)((long)local_68 + 0xc); *(int *)((long)local_68 + 0xc) = iVar2 + -1; } if (iVar2 == 1) { (**(code **)(*local_68 + 0x18))(); } } return; } /* WARNING: Subroutine does not return */ /* try { // try from 0015e67d to 0015e681 has its CatchHandler @ 0015e69a */ std::__throw_bad_function_call(); } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0015e658 to 0015e666 has its CatchHandler @ 0015e682 */ std::runtime_error::runtime_error(this_00,"ForNode.body is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001ddff0,PTR__runtime_error_001ddf70); }
26,194
stop_waiting
eloqsql/mysys/waiting_threads.c
static int stop_waiting(WT_THD *thd) { int ret; WT_RESOURCE *rc= thd->waiting_for; DBUG_ENTER("stop_waiting"); if (!rc) DBUG_RETURN(WT_OK); /* nobody's trying to free the resource now, as its waiter_count is guaranteed to be non-zero */ rc_wrlock(rc); ret= stop_waiting_locked(thd); DBUG_RETURN(ret); }
O3
c
stop_waiting: pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq %rdi, %rbx movq 0x28(%rdi), %rdi testq %rdi, %rdi je 0xa7ead addq $0x18, %rdi callq 0xa5371 movq 0x28(%rbx), %rsi decl 0x10(%rsi) movq $0x0, 0x28(%rbx) movq %rbx, %rdi callq 0xa81f1 cmpb $0x0, 0x60(%rbx) setne %cl testl %eax, %eax setne %al orb %cl, %al movzbl %al, %eax negl %eax jmp 0xa7eaf xorl %eax, %eax addq $0x8, %rsp popq %rbx popq %rbp retq
stop_waiting: push rbp mov rbp, rsp push rbx push rax mov rbx, rdi mov rdi, [rdi+28h] test rdi, rdi jz short loc_A7EAD add rdi, 18h call my_rw_wrlock mov rsi, [rbx+28h] dec dword ptr [rsi+10h] mov qword ptr [rbx+28h], 0 mov rdi, rbx call unlock_lock_and_free_resource cmp byte ptr [rbx+60h], 0 setnz cl test eax, eax setnz al or al, cl movzx eax, al neg eax jmp short loc_A7EAF loc_A7EAD: xor eax, eax loc_A7EAF: add rsp, 8 pop rbx pop rbp retn
long long stop_waiting(long long a1) { long long v2; // rdi v2 = *(_QWORD *)(a1 + 40); if ( !v2 ) return 0LL; my_rw_wrlock(v2 + 24); --*(_DWORD *)(*(_QWORD *)(a1 + 40) + 16LL); *(_QWORD *)(a1 + 40) = 0LL; return (unsigned int)-((*(_BYTE *)(a1 + 96) != 0) | ((unsigned int)unlock_lock_and_free_resource(a1) != 0)); }
stop_waiting: PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x28] TEST RDI,RDI JZ 0x001a7ead ADD RDI,0x18 CALL 0x001a5371 MOV RSI,qword ptr [RBX + 0x28] DEC dword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x28],0x0 MOV RDI,RBX CALL 0x001a81f1 CMP byte ptr [RBX + 0x60],0x0 SETNZ CL TEST EAX,EAX SETNZ AL OR AL,CL MOVZX EAX,AL NEG EAX JMP 0x001a7eaf LAB_001a7ead: XOR EAX,EAX LAB_001a7eaf: ADD RSP,0x8 POP RBX POP RBP RET
int stop_waiting(long param_1) { int *piVar1; int iVar2; if (*(long *)(param_1 + 0x28) == 0) { iVar2 = 0; } else { my_rw_wrlock(*(long *)(param_1 + 0x28) + 0x18); piVar1 = (int *)(*(long *)(param_1 + 0x28) + 0x10); *piVar1 = *piVar1 + -1; *(int8 *)(param_1 + 0x28) = 0; iVar2 = unlock_lock_and_free_resource(param_1); iVar2 = -(uint)(iVar2 != 0 || *(char *)(param_1 + 0x60) != '\0'); } return iVar2; }
26,195
js_TA_get_float16
bluesky950520[P]quickjs/quickjs.c
static JSValue js_TA_get_float16(JSContext *ctx, const void *a) { return js_float64(fromfp16(*(const uint16_t *)a)); }
O1
c
js_TA_get_float16: pushq %rbx movzwl (%rsi), %ebx movl $0x7c00, %edx # imm = 0x7C00 movl %ebx, %eax andl %edx, %eax movl %ebx, %ecx andl $0x3ff, %ecx # imm = 0x3FF cmpl %edx, %eax jne 0x82148 xorl %eax, %eax testl %ecx, %ecx sete %al leaq 0x1aeff(%rip), %rcx # 0x9d040 movsd (%rcx,%rax,8), %xmm0 jmp 0x82175 cvtsi2sd %ecx, %xmm0 mulsd 0x1b01c(%rip), %xmm0 # 0x9d170 movl %eax, %edi shrl $0xa, %edi addl $-0xf, %edi testl %eax, %eax je 0x82168 addsd 0x1aff0(%rip), %xmm0 # 0x9d158 movl $0xfffffff2, %eax # imm = 0xFFFFFFF2 cmovel %eax, %edi callq 0xe660 testw %bx, %bx jns 0x82182 xorpd 0x1aece(%rip), %xmm0 # 0x9d050 movq %xmm0, %rax movl $0x7, %edx popq %rbx retq
js_TA_get_float16: push rbx movzx ebx, word ptr [rsi] mov edx, 7C00h mov eax, ebx and eax, edx mov ecx, ebx and ecx, 3FFh cmp eax, edx jnz short loc_82148 xor eax, eax test ecx, ecx setz al lea rcx, dbl_9D040 movsd xmm0, qword ptr [rcx+rax*8] jmp short loc_82175 loc_82148: cvtsi2sd xmm0, ecx mulsd xmm0, cs:qword_9D170 mov edi, eax shr edi, 0Ah add edi, 0FFFFFFF1h test eax, eax jz short loc_82168 addsd xmm0, cs:qword_9D158 loc_82168: mov eax, 0FFFFFFF2h cmovz edi, eax call _scalbn loc_82175: test bx, bx jns short loc_82182 xorpd xmm0, cs:xmmword_9D050 loc_82182: movq rax, xmm0 mov edx, 7 pop rbx retn
long long js_TA_get_float16(long long a1, __int16 *a2) { __int16 v2; // bx unsigned int v3; // eax int v4; // ecx double v5; // xmm0_8 long long v6; // rdi v2 = *a2; v3 = *a2 & 0x7C00; v4 = *a2 & 0x3FF; if ( v3 == 31744 ) { v5 = dbl_9D040[v4 == 0]; } else { v5 = (double)v4 * 0.0009765625; v6 = (v3 >> 10) - 15; if ( (*a2 & 0x7C00) != 0 ) v5 = v5 + 1.0; else v6 = 4294967282LL; scalbn(v6, v5); } if ( v2 < 0 ) v5 = -v5; return *(_QWORD *)&v5; }
js_TA_get_float16: PUSH RBX MOVZX EBX,word ptr [RSI] MOV EDX,0x7c00 MOV EAX,EBX AND EAX,EDX MOV ECX,EBX AND ECX,0x3ff CMP EAX,EDX JNZ 0x00182148 XOR EAX,EAX TEST ECX,ECX SETZ AL LEA RCX,[0x19d040] MOVSD XMM0,qword ptr [RCX + RAX*0x8] JMP 0x00182175 LAB_00182148: CVTSI2SD XMM0,ECX MULSD XMM0,qword ptr [0x0019d170] MOV EDI,EAX SHR EDI,0xa ADD EDI,-0xf TEST EAX,EAX JZ 0x00182168 ADDSD XMM0,qword ptr [0x0019d158] LAB_00182168: MOV EAX,0xfffffff2 CMOVZ EDI,EAX CALL 0x0010e660 LAB_00182175: TEST BX,BX JNS 0x00182182 XORPD XMM0,xmmword ptr [0x0019d050] LAB_00182182: MOVQ RAX,XMM0 MOV EDX,0x7 POP RBX RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int1 [16] js_TA_get_float16(int8 param_1,ushort *param_2) { ushort uVar1; int __n; double dVar2; int1 auVar3 [16]; uVar1 = *param_2; if ((uVar1 & 0x7c00) == 0x7c00) { dVar2 = *(double *)(&DAT_0019d040 + (ulong)((uVar1 & 0x3ff) == 0) * 8); } else { dVar2 = (double)(uVar1 & 0x3ff) * _DAT_0019d170; __n = ((uVar1 & 0x7c00) >> 10) - 0xf; if ((uVar1 & 0x7c00) == 0) { __n = -0xe; } else { dVar2 = dVar2 + DAT_0019d158; } dVar2 = scalbn(dVar2,__n); } if ((short)uVar1 < 0) { dVar2 = (double)((ulong)dVar2 ^ _DAT_0019d050); } auVar3._8_8_ = 7; auVar3._0_8_ = dVar2; return auVar3; }
26,196
to_nfd_rec
bluesky950520[P]quickjs/libunicode.c
static void to_nfd_rec(DynBuf *dbuf, const int *src, int src_len, int is_compat) { uint32_t c, v; int i, l; uint32_t res[UNICODE_DECOMP_LEN_MAX]; for(i = 0; i < src_len; i++) { c = src[i]; if (c >= 0xac00 && c < 0xd7a4) { /* Hangul decomposition */ c -= 0xac00; dbuf_put_u32(dbuf, 0x1100 + c / 588); dbuf_put_u32(dbuf, 0x1161 + (c % 588) / 28); v = c % 28; if (v != 0) dbuf_put_u32(dbuf, 0x11a7 + v); } else { l = unicode_decomp_char(res, c, is_compat); if (l) { to_nfd_rec(dbuf, (int *)res, l, is_compat); } else { dbuf_put_u32(dbuf, c); } } } }
O1
c
to_nfd_rec: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movl %ecx, 0x4(%rsp) movq %rdi, 0x8(%rsp) testl %edx, %edx jle 0x982e0 movq %rsi, %r14 movl %edx, %eax movq %rax, 0x18(%rsp) xorl %ebx, %ebx leaq 0xd4bb(%rip), %r12 # 0xa5640 movq %rsi, 0x10(%rsp) movq 0x8(%rsp), %r15 movl (%r14,%rbx,4), %ebp leal -0xac00(%rbp), %r13d cmpl $0x2ba4, %r13d # imm = 0x2BA4 jae 0x98236 movl %r13d, %ebp movl $0xdee95c4d, %eax # imm = 0xDEE95C4D imulq %rax, %rbp shrq $0x29, %rbp movl %ebp, %eax orl $0x1100, %eax # imm = 0x1100 movl %eax, (%rsp) movl $0x4, %edx movq %r15, %rdi movq %rsp, %r14 movq %r14, %rsi callq 0x1a80e imull $0x24c, %ebp, %eax # imm = 0x24C movl %r13d, %ecx subl %eax, %ecx imulq $0x924924a, %rcx, %rax # imm = 0x924924A shrq $0x20, %rax addl $0x1161, %eax # imm = 0x1161 movl %eax, (%rsp) movl $0x4, %edx movq %r15, %rdi movq %r14, %rsi movq 0x10(%rsp), %r14 callq 0x1a80e movl %r13d, %eax shrl $0x2, %eax imulq $0x24924925, %rax, %rax # imm = 0x24924925 shrq $0x20, %rax leal (%rax,%rax,8), %ecx leal (%rcx,%rcx,2), %ecx addl %eax, %ecx subl %ecx, %r13d je 0x982b9 addl $0x11a7, %r13d # imm = 0x11A7 movl %r13d, (%rsp) jmp 0x982a7 xorl %esi, %esi movl $0x2c4, %eax # imm = 0x2C4 leal (%rsi,%rax), %ecx movl %ecx, %edx shrl $0x1f, %edx addl %ecx, %edx sarl %edx movslq %edx, %rcx movl (%r12,%rcx,4), %r9d movl %r9d, %ecx shrl $0xe, %ecx cmpl %ebp, %ecx jbe 0x98260 decl %edx movl %edx, %eax jmp 0x98277 movl %r9d, %r8d shrl $0x7, %r8d andl $0x7f, %r8d leal (%r8,%rcx), %esi cmpl %ebp, %esi ja 0x9827d incl %edx movl %edx, %esi cmpl %eax, %esi jle 0x9823d jmp 0x98289 movl %r9d, %eax andl $0x1, %eax cmpl 0x4(%rsp), %eax jbe 0x982c9 xorl %edx, %edx testl %edx, %edx je 0x982a4 movq 0x8(%rsp), %rdi leaq 0x20(%rsp), %rsi movl 0x4(%rsp), %ecx callq 0x98153 jmp 0x982b9 movl %ebp, (%rsp) movl $0x4, %edx movq 0x8(%rsp), %rdi movq %rsp, %rsi callq 0x1a80e incq %rbx cmpq 0x18(%rsp), %rbx jne 0x9818f jmp 0x982e0 shrl %r9d andl $0x3f, %r9d leaq 0x20(%rsp), %rdi movl %ebp, %esi callq 0x999fa movl %eax, %edx jmp 0x9828b addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
to_nfd_rec: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rsp+98h+var_94], ecx mov [rsp+98h+var_90], rdi test edx, edx jle loc_982E0 mov r14, rsi mov eax, edx mov [rsp+98h+var_80], rax xor ebx, ebx lea r12, unicode_decomp_table1 mov [rsp+98h+var_88], rsi mov r15, [rsp+98h+var_90] loc_9818F: mov ebp, [r14+rbx*4] lea r13d, [rbp-0AC00h] cmp r13d, 2BA4h jnb loc_98236 mov ebp, r13d mov eax, 0DEE95C4Dh imul rbp, rax shr rbp, 29h mov eax, ebp or eax, 1100h mov [rsp+98h+var_98], eax mov edx, 4 mov rdi, r15 mov r14, rsp mov rsi, r14 call dbuf_put imul eax, ebp, 24Ch mov ecx, r13d sub ecx, eax imul rax, rcx, 924924Ah shr rax, 20h add eax, 1161h mov [rsp+98h+var_98], eax mov edx, 4 mov rdi, r15 mov rsi, r14 mov r14, [rsp+98h+var_88] call dbuf_put mov eax, r13d shr eax, 2 imul rax, 24924925h shr rax, 20h lea ecx, [rax+rax*8] lea ecx, [rcx+rcx*2] add ecx, eax sub r13d, ecx jz loc_982B9 add r13d, 11A7h mov [rsp+98h+var_98], r13d jmp short loc_982A7 loc_98236: xor esi, esi mov eax, 2C4h loc_9823D: lea ecx, [rsi+rax] mov edx, ecx shr edx, 1Fh add edx, ecx sar edx, 1 movsxd rcx, edx mov r9d, [r12+rcx*4] mov ecx, r9d shr ecx, 0Eh cmp ecx, ebp jbe short loc_98260 dec edx mov eax, edx jmp short loc_98277 loc_98260: mov r8d, r9d shr r8d, 7 and r8d, 7Fh lea esi, [r8+rcx] cmp esi, ebp ja short loc_9827D inc edx mov esi, edx loc_98277: cmp esi, eax jle short loc_9823D jmp short loc_98289 loc_9827D: mov eax, r9d and eax, 1 cmp eax, [rsp+98h+var_94] jbe short loc_982C9 loc_98289: xor edx, edx loc_9828B: test edx, edx jz short loc_982A4 mov rdi, [rsp+98h+var_90] lea rsi, [rsp+98h+var_78] mov ecx, [rsp+98h+var_94] call to_nfd_rec jmp short loc_982B9 loc_982A4: mov [rsp+98h+var_98], ebp loc_982A7: mov edx, 4 mov rdi, [rsp+98h+var_90] mov rsi, rsp call dbuf_put loc_982B9: inc rbx cmp rbx, [rsp+98h+var_80] jnz loc_9818F jmp short loc_982E0 loc_982C9: shr r9d, 1 and r9d, 3Fh lea rdi, [rsp+98h+var_78] mov esi, ebp call unicode_decomp_entry mov edx, eax jmp short loc_9828B loc_982E0: add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void to_nfd_rec(_QWORD *a1, long long a2, int a3, unsigned int a4) { long long v4; // r14 long long v5; // rbx _QWORD *v6; // r15 unsigned int v7; // ebp unsigned int v8; // r13d unsigned int v9; // r13d int v10; // esi int v11; // eax long long v12; // rdx unsigned int v13; // r9d long long v14; // rcx long long v15; // r8 long long v16; // rdx unsigned int v17; // [rsp+0h] [rbp-98h] BYREF unsigned int v18; // [rsp+4h] [rbp-94h] _QWORD *v19; // [rsp+8h] [rbp-90h] long long v20; // [rsp+10h] [rbp-88h] long long v21; // [rsp+18h] [rbp-80h] _BYTE v22[120]; // [rsp+20h] [rbp-78h] BYREF v18 = a4; v19 = a1; if ( a3 <= 0 ) return; v4 = a2; v21 = (unsigned int)a3; v5 = 0LL; v20 = a2; v6 = v19; do { v7 = *(_DWORD *)(v4 + 4 * v5); v8 = v7 - 44032; if ( v7 - 44032 < 0x2BA4 ) { v17 = (v8 / 0x24C) | 0x1100; dbuf_put(v6, (long long)&v17, 4LL); v17 = ((153391690 * (unsigned long long)(v8 % 0x24C)) >> 32) + 4449; v4 = v20; dbuf_put(v6, (long long)&v17, 4LL); v9 = v8 % 0x1C; if ( !v9 ) goto LABEL_19; v17 = v9 + 4519; goto LABEL_18; } v10 = 0; v11 = 708; while ( 1 ) { v12 = (unsigned int)((v10 + v11) / 2); v13 = unicode_decomp_table1[(int)v12]; v14 = v13 >> 14; if ( (unsigned int)v14 <= v7 ) break; v11 = v12 - 1; LABEL_11: if ( v10 > v11 ) goto LABEL_14; } v15 = (v13 >> 7) & 0x7F; if ( (int)v15 + (int)v14 <= v7 ) { v10 = v12 + 1; goto LABEL_11; } if ( (v13 & 1) > v18 ) { LABEL_14: v16 = 0LL; goto LABEL_15; } v16 = (unsigned int)unicode_decomp_entry(v22, v7, v12, v14, v15, (v13 >> 1) & 0x3F); LABEL_15: if ( (_DWORD)v16 ) { to_nfd_rec(v19, v22, v16, v18); goto LABEL_19; } v17 = v7; LABEL_18: dbuf_put(v19, (long long)&v17, 4LL); LABEL_19: ++v5; } while ( v5 != v21 ); }
to_nfd_rec: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV dword ptr [RSP + 0x4],ECX MOV qword ptr [RSP + 0x8],RDI TEST EDX,EDX JLE 0x001982e0 MOV R14,RSI MOV EAX,EDX MOV qword ptr [RSP + 0x18],RAX XOR EBX,EBX LEA R12,[0x1a5640] MOV qword ptr [RSP + 0x10],RSI MOV R15,qword ptr [RSP + 0x8] LAB_0019818f: MOV EBP,dword ptr [R14 + RBX*0x4] LEA R13D,[RBP + -0xac00] CMP R13D,0x2ba4 JNC 0x00198236 MOV EBP,R13D MOV EAX,0xdee95c4d IMUL RBP,RAX SHR RBP,0x29 MOV EAX,EBP OR EAX,0x1100 MOV dword ptr [RSP],EAX MOV EDX,0x4 MOV RDI,R15 MOV R14,RSP MOV RSI,R14 CALL 0x0011a80e IMUL EAX,EBP,0x24c MOV ECX,R13D SUB ECX,EAX IMUL RAX,RCX,0x924924a SHR RAX,0x20 ADD EAX,0x1161 MOV dword ptr [RSP],EAX MOV EDX,0x4 MOV RDI,R15 MOV RSI,R14 MOV R14,qword ptr [RSP + 0x10] CALL 0x0011a80e MOV EAX,R13D SHR EAX,0x2 IMUL RAX,RAX,0x24924925 SHR RAX,0x20 LEA ECX,[RAX + RAX*0x8] LEA ECX,[RCX + RCX*0x2] ADD ECX,EAX SUB R13D,ECX JZ 0x001982b9 ADD R13D,0x11a7 MOV dword ptr [RSP],R13D JMP 0x001982a7 LAB_00198236: XOR ESI,ESI MOV EAX,0x2c4 LAB_0019823d: LEA ECX,[RSI + RAX*0x1] MOV EDX,ECX SHR EDX,0x1f ADD EDX,ECX SAR EDX,0x1 MOVSXD RCX,EDX MOV R9D,dword ptr [R12 + RCX*0x4] MOV ECX,R9D SHR ECX,0xe CMP ECX,EBP JBE 0x00198260 DEC EDX MOV EAX,EDX JMP 0x00198277 LAB_00198260: MOV R8D,R9D SHR R8D,0x7 AND R8D,0x7f LEA ESI,[R8 + RCX*0x1] CMP ESI,EBP JA 0x0019827d INC EDX MOV ESI,EDX LAB_00198277: CMP ESI,EAX JLE 0x0019823d JMP 0x00198289 LAB_0019827d: MOV EAX,R9D AND EAX,0x1 CMP EAX,dword ptr [RSP + 0x4] JBE 0x001982c9 LAB_00198289: XOR EDX,EDX LAB_0019828b: TEST EDX,EDX JZ 0x001982a4 MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x20] MOV ECX,dword ptr [RSP + 0x4] CALL 0x00198153 JMP 0x001982b9 LAB_001982a4: MOV dword ptr [RSP],EBP LAB_001982a7: MOV EDX,0x4 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RSP CALL 0x0011a80e LAB_001982b9: INC RBX CMP RBX,qword ptr [RSP + 0x18] JNZ 0x0019818f JMP 0x001982e0 LAB_001982c9: SHR R9D,0x1 AND R9D,0x3f LEA RDI,[RSP + 0x20] MOV ESI,EBP CALL 0x001999fa MOV EDX,EAX JMP 0x0019828b LAB_001982e0: ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void to_nfd_rec(int8 param_1,long param_2,uint param_3,uint param_4) { uint uVar1; uint uVar2; int iVar3; int iVar4; int iVar5; ulong uVar6; uint local_98; uint local_94; int8 local_90; long local_88; ulong local_80; int1 local_78 [72]; if (0 < (int)param_3) { local_80 = (ulong)param_3; uVar6 = 0; local_94 = param_4; local_90 = param_1; local_88 = param_2; do { uVar1 = *(uint *)(param_2 + uVar6 * 4); uVar2 = uVar1 - 0xac00; if (uVar2 < 0x2ba4) { local_98 = uVar2 / 0x24c | 0x1100; dbuf_put(param_1,&local_98,4); param_2 = local_88; local_98 = (uVar2 % 0x24c) / 0x1c + 0x1161; dbuf_put(param_1,&local_98,4); if (uVar2 % 0x1c != 0) { uVar1 = uVar2 % 0x1c + 0x11a7; LAB_001982a7: local_98 = uVar1; dbuf_put(local_90,&local_98,4); } } else { iVar5 = 0; iVar4 = 0x2c4; do { iVar3 = (iVar5 + iVar4) / 2; uVar2 = *(uint *)(unicode_decomp_table1 + (long)iVar3 * 4); if (uVar1 < uVar2 >> 0xe) { iVar4 = iVar3 + -1; } else { if (uVar1 < (uVar2 >> 7 & 0x7f) + (uVar2 >> 0xe)) { if ((uVar2 & 1) <= local_94) { iVar4 = unicode_decomp_entry(local_78,uVar1); goto LAB_0019828b; } break; } iVar5 = iVar3 + 1; } } while (iVar5 <= iVar4); iVar4 = 0; LAB_0019828b: if (iVar4 == 0) goto LAB_001982a7; to_nfd_rec(local_90,local_78,iVar4,local_94); } uVar6 = uVar6 + 1; } while (uVar6 != local_80); } return; }
26,197
to_nfd_rec
bluesky950520[P]quickjs/libunicode.c
static void to_nfd_rec(DynBuf *dbuf, const int *src, int src_len, int is_compat) { uint32_t c, v; int i, l; uint32_t res[UNICODE_DECOMP_LEN_MAX]; for(i = 0; i < src_len; i++) { c = src[i]; if (c >= 0xac00 && c < 0xd7a4) { /* Hangul decomposition */ c -= 0xac00; dbuf_put_u32(dbuf, 0x1100 + c / 588); dbuf_put_u32(dbuf, 0x1161 + (c % 588) / 28); v = c % 28; if (v != 0) dbuf_put_u32(dbuf, 0x11a7 + v); } else { l = unicode_decomp_char(res, c, is_compat); if (l) { to_nfd_rec(dbuf, (int *)res, l, is_compat); } else { dbuf_put_u32(dbuf, c); } } } }
O3
c
to_nfd_rec: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movl %ecx, 0x4(%rsp) movq %rdi, 0x8(%rsp) testl %edx, %edx jle 0x9abf3 movq %rsi, %r14 movl %edx, %r15d xorl %ebx, %ebx leaq 0xdb64(%rip), %r12 # 0xa85f0 movq %rsi, 0x18(%rsp) movq %r15, 0x10(%rsp) movl (%r14,%rbx,4), %ebp leal -0xac00(%rbp), %r13d cmpl $0x2ba4, %r13d # imm = 0x2BA4 jae 0x9ab51 movl %r13d, %ebp movl $0xffff, %eax # imm = 0xFFFF andl %eax, %ebp imull $0x6f75, %ebp, %r14d # imm = 0x6F75 shrl $0x18, %r14d leal 0x1100(%r14), %eax movl %eax, (%rsp) movl $0x4, %edx movq 0x8(%rsp), %r15 movq %r15, %rdi movq %rsp, %rsi callq 0x1b116 imull $0x24c, %r14d, %eax # imm = 0x24C movq 0x18(%rsp), %r14 movl %r13d, %ecx subl %eax, %ecx movl $0xffff, %eax # imm = 0xFFFF andl %eax, %ecx imull $0x925, %ecx, %eax # imm = 0x925 shrl $0x10, %eax addl $0x1161, %eax # imm = 0x1161 movl %eax, (%rsp) movl $0x4, %edx movq %r15, %rdi movq 0x10(%rsp), %r15 movq %rsp, %rsi callq 0x1b116 shrl $0x2, %ebp imull $0x4925, %ebp, %eax # imm = 0x4925 shrl $0x11, %eax leal (%rax,%rax,8), %ecx leal (%rcx,%rcx,2), %ecx addl %eax, %ecx subw %cx, %r13w je 0x9abe7 addl $0x11a7, %r13d # imm = 0x11A7 movzwl %r13w, %eax movl %eax, (%rsp) jmp 0x9abd5 xorl %esi, %esi movl $0x2c4, %eax # imm = 0x2C4 leal (%rsi,%rax), %ecx movl %ecx, %edx shrl $0x1f, %edx addl %ecx, %edx sarl %edx movslq %edx, %rcx movl (%r12,%rcx,4), %r9d movl %r9d, %ecx shrl $0xe, %ecx cmpl %ebp, %ecx jbe 0x9ab7b decl %edx movl %edx, %eax jmp 0x9ab92 movl %r9d, %r8d shrl $0x7, %r8d andl $0x7f, %r8d leal (%r8,%rcx), %esi cmpl %ebp, %esi ja 0x9ab98 incl %edx movl %edx, %esi cmpl %eax, %esi jle 0x9ab58 jmp 0x9abd2 movl %r9d, %eax andl $0x1, %eax cmpl 0x4(%rsp), %eax ja 0x9abd2 shrl %r9d andl $0x3f, %r9d leaq 0x20(%rsp), %rdi movl %ebp, %esi callq 0x9c335 testl %eax, %eax je 0x9abd2 movq 0x8(%rsp), %rdi leaq 0x20(%rsp), %rsi movl %eax, %edx movl 0x4(%rsp), %ecx callq 0x9aa5e jmp 0x9abe7 movl %ebp, (%rsp) movl $0x4, %edx movq 0x8(%rsp), %rdi movq %rsp, %rsi callq 0x1b116 incq %rbx cmpq %r15, %rbx jne 0x9aa96 addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
to_nfd_rec: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov [rsp+98h+var_94], ecx mov [rsp+98h+var_90], rdi test edx, edx jle loc_9ABF3 mov r14, rsi mov r15d, edx xor ebx, ebx lea r12, unicode_decomp_table1 mov [rsp+98h+var_80], rsi mov [rsp+98h+var_88], r15 loc_9AA96: mov ebp, [r14+rbx*4] lea r13d, [rbp-0AC00h] cmp r13d, 2BA4h jnb loc_9AB51 mov ebp, r13d mov eax, 0FFFFh and ebp, eax imul r14d, ebp, 6F75h shr r14d, 18h lea eax, [r14+1100h] mov [rsp+98h+var_98], eax mov edx, 4 mov r15, [rsp+98h+var_90] mov rdi, r15 mov rsi, rsp call dbuf_put imul eax, r14d, 24Ch mov r14, [rsp+98h+var_80] mov ecx, r13d sub ecx, eax mov eax, 0FFFFh and ecx, eax imul eax, ecx, 925h shr eax, 10h add eax, 1161h mov [rsp+98h+var_98], eax mov edx, 4 mov rdi, r15 mov r15, [rsp+98h+var_88] mov rsi, rsp call dbuf_put shr ebp, 2 imul eax, ebp, 4925h shr eax, 11h lea ecx, [rax+rax*8] lea ecx, [rcx+rcx*2] add ecx, eax sub r13w, cx jz loc_9ABE7 add r13d, 11A7h movzx eax, r13w mov [rsp+98h+var_98], eax jmp loc_9ABD5 loc_9AB51: xor esi, esi mov eax, 2C4h loc_9AB58: lea ecx, [rsi+rax] mov edx, ecx shr edx, 1Fh add edx, ecx sar edx, 1 movsxd rcx, edx mov r9d, [r12+rcx*4] mov ecx, r9d shr ecx, 0Eh cmp ecx, ebp jbe short loc_9AB7B dec edx mov eax, edx jmp short loc_9AB92 loc_9AB7B: mov r8d, r9d shr r8d, 7 and r8d, 7Fh lea esi, [r8+rcx] cmp esi, ebp ja short loc_9AB98 inc edx mov esi, edx loc_9AB92: cmp esi, eax jle short loc_9AB58 jmp short loc_9ABD2 loc_9AB98: mov eax, r9d and eax, 1 cmp eax, [rsp+98h+var_94] ja short loc_9ABD2 shr r9d, 1 and r9d, 3Fh lea rdi, [rsp+98h+var_78] mov esi, ebp call unicode_decomp_entry test eax, eax jz short loc_9ABD2 mov rdi, [rsp+98h+var_90] lea rsi, [rsp+98h+var_78] mov edx, eax mov ecx, [rsp+98h+var_94] call to_nfd_rec jmp short loc_9ABE7 loc_9ABD2: mov [rsp+98h+var_98], ebp loc_9ABD5: mov edx, 4 mov rdi, [rsp+98h+var_90] mov rsi, rsp call dbuf_put loc_9ABE7: inc rbx cmp rbx, r15 jnz loc_9AA96 loc_9ABF3: add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
void to_nfd_rec(_QWORD *a1, long long a2, int a3, unsigned int a4) { long long v4; // r14 long long v5; // r15 long long v6; // rbx unsigned int v7; // ebp __int16 v8; // r13 int v9; // ebp _QWORD *v10; // r15 _QWORD *v11; // rdi __int16 v12; // r13 int v13; // esi int v14; // eax long long v15; // rdx unsigned int v16; // r9d long long v17; // rcx long long v18; // r8 unsigned int v19; // eax unsigned int v20; // [rsp+0h] [rbp-98h] BYREF unsigned int v21; // [rsp+4h] [rbp-94h] _QWORD *v22; // [rsp+8h] [rbp-90h] long long v23; // [rsp+10h] [rbp-88h] long long v24; // [rsp+18h] [rbp-80h] _BYTE v25[120]; // [rsp+20h] [rbp-78h] BYREF v21 = a4; v22 = a1; if ( a3 <= 0 ) return; v4 = a2; v5 = (unsigned int)a3; v6 = 0LL; v24 = a2; v23 = (unsigned int)a3; do { v7 = *(_DWORD *)(v4 + 4 * v6); v8 = v7 + 21504; if ( v7 - 44032 < 0x2BA4 ) { v9 = (unsigned __int16)(v7 + 21504); v20 = ((unsigned int)(28533 * v9) >> 24) + 4352; v10 = v22; dbuf_put(v22, (long long)&v20, 4LL); v4 = v24; v20 = ((2341 * (unsigned int)(unsigned __int16)(v8 - 588 * ((unsigned __int16)v9 / 0x24Cu))) >> 16) + 4449; v11 = v10; v5 = v23; dbuf_put(v11, (long long)&v20, 4LL); v12 = v8 - 28 * ((unsigned __int16)v9 / 0x1Cu); if ( v12 ) { v20 = (unsigned __int16)(v12 + 4519); goto LABEL_17; } goto LABEL_18; } v13 = 0; v14 = 708; while ( 1 ) { v15 = (unsigned int)((v13 + v14) / 2); v16 = unicode_decomp_table1[(int)v15]; v17 = v16 >> 14; if ( (unsigned int)v17 <= v7 ) break; v14 = v15 - 1; LABEL_11: if ( v13 > v14 ) goto LABEL_16; } v18 = (v16 >> 7) & 0x7F; if ( (int)v18 + (int)v17 <= v7 ) { v13 = v15 + 1; goto LABEL_11; } if ( (v16 & 1) <= v21 ) { v19 = unicode_decomp_entry(v25, v7, v15, v17, v18, (v16 >> 1) & 0x3F); if ( v19 ) { to_nfd_rec(v22, v25, v19, v21); goto LABEL_18; } } LABEL_16: v20 = v7; LABEL_17: dbuf_put(v22, (long long)&v20, 4LL); LABEL_18: ++v6; } while ( v6 != v5 ); }
to_nfd_rec: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV dword ptr [RSP + 0x4],ECX MOV qword ptr [RSP + 0x8],RDI TEST EDX,EDX JLE 0x0019abf3 MOV R14,RSI MOV R15D,EDX XOR EBX,EBX LEA R12,[0x1a85f0] MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],R15 LAB_0019aa96: MOV EBP,dword ptr [R14 + RBX*0x4] LEA R13D,[RBP + -0xac00] CMP R13D,0x2ba4 JNC 0x0019ab51 MOV EBP,R13D MOV EAX,0xffff AND EBP,EAX IMUL R14D,EBP,0x6f75 SHR R14D,0x18 LEA EAX,[R14 + 0x1100] MOV dword ptr [RSP],EAX MOV EDX,0x4 MOV R15,qword ptr [RSP + 0x8] MOV RDI,R15 MOV RSI,RSP CALL 0x0011b116 IMUL EAX,R14D,0x24c MOV R14,qword ptr [RSP + 0x18] MOV ECX,R13D SUB ECX,EAX MOV EAX,0xffff AND ECX,EAX IMUL EAX,ECX,0x925 SHR EAX,0x10 ADD EAX,0x1161 MOV dword ptr [RSP],EAX MOV EDX,0x4 MOV RDI,R15 MOV R15,qword ptr [RSP + 0x10] MOV RSI,RSP CALL 0x0011b116 SHR EBP,0x2 IMUL EAX,EBP,0x4925 SHR EAX,0x11 LEA ECX,[RAX + RAX*0x8] LEA ECX,[RCX + RCX*0x2] ADD ECX,EAX SUB R13W,CX JZ 0x0019abe7 ADD R13D,0x11a7 MOVZX EAX,R13W MOV dword ptr [RSP],EAX JMP 0x0019abd5 LAB_0019ab51: XOR ESI,ESI MOV EAX,0x2c4 LAB_0019ab58: LEA ECX,[RSI + RAX*0x1] MOV EDX,ECX SHR EDX,0x1f ADD EDX,ECX SAR EDX,0x1 MOVSXD RCX,EDX MOV R9D,dword ptr [R12 + RCX*0x4] MOV ECX,R9D SHR ECX,0xe CMP ECX,EBP JBE 0x0019ab7b DEC EDX MOV EAX,EDX JMP 0x0019ab92 LAB_0019ab7b: MOV R8D,R9D SHR R8D,0x7 AND R8D,0x7f LEA ESI,[R8 + RCX*0x1] CMP ESI,EBP JA 0x0019ab98 INC EDX MOV ESI,EDX LAB_0019ab92: CMP ESI,EAX JLE 0x0019ab58 JMP 0x0019abd2 LAB_0019ab98: MOV EAX,R9D AND EAX,0x1 CMP EAX,dword ptr [RSP + 0x4] JA 0x0019abd2 SHR R9D,0x1 AND R9D,0x3f LEA RDI,[RSP + 0x20] MOV ESI,EBP CALL 0x0019c335 TEST EAX,EAX JZ 0x0019abd2 MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x20] MOV EDX,EAX MOV ECX,dword ptr [RSP + 0x4] CALL 0x0019aa5e JMP 0x0019abe7 LAB_0019abd2: MOV dword ptr [RSP],EBP LAB_0019abd5: MOV EDX,0x4 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,RSP CALL 0x0011b116 LAB_0019abe7: INC RBX CMP RBX,R15 JNZ 0x0019aa96 LAB_0019abf3: ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void to_nfd_rec(int8 param_1,long param_2,uint param_3,uint param_4) { uint uVar1; int8 uVar2; int iVar3; int iVar4; int iVar5; ulong uVar6; short sVar7; uint uVar8; ulong uVar9; uint local_98; uint local_94; int8 local_90; ulong local_88; long local_80; int1 local_78 [72]; if (0 < (int)param_3) { uVar9 = (ulong)param_3; uVar6 = 0; local_94 = param_4; local_90 = param_1; local_88 = uVar9; local_80 = param_2; do { uVar2 = local_90; uVar8 = *(uint *)(param_2 + uVar6 * 4); uVar1 = uVar8 - 0xac00; if (uVar1 < 0x2ba4) { uVar8 = (uVar1 & 0xffff) / 0x24c; local_98 = uVar8 + 0x1100; dbuf_put(local_90,&local_98,4); param_2 = local_80; uVar9 = local_88; local_98 = ((uVar1 + uVar8 * -0x24c & 0xffff) * 0x925 >> 0x10) + 0x1161; dbuf_put(uVar2,&local_98,4); uVar8 = (uVar1 & 0xffff) >> 2; sVar7 = (short)uVar1 - ((short)(uVar8 / 7) * 0x1b + (short)(uVar8 / 7)); if (sVar7 != 0) { uVar8 = (uint)(ushort)(sVar7 + 0x11a7); goto LAB_0019abd5; } } else { iVar5 = 0; iVar4 = 0x2c4; do { iVar3 = (iVar5 + iVar4) / 2; uVar1 = *(uint *)(unicode_decomp_table1 + (long)iVar3 * 4); if (uVar8 < uVar1 >> 0xe) { iVar4 = iVar3 + -1; } else { if (uVar8 < (uVar1 >> 7 & 0x7f) + (uVar1 >> 0xe)) { if (((uVar1 & 1) <= local_94) && (iVar4 = unicode_decomp_entry(local_78,uVar8), iVar4 != 0)) { to_nfd_rec(local_90,local_78,iVar4,local_94); goto LAB_0019abe7; } break; } iVar5 = iVar3 + 1; } } while (iVar5 <= iVar4); LAB_0019abd5: local_98 = uVar8; dbuf_put(local_90,&local_98,4); } LAB_0019abe7: uVar6 = uVar6 + 1; } while (uVar6 != uVar9); } return; }
26,198
js_dataview_get_byteOffset
bluesky950520[P]quickjs/quickjs.c
static JSValue js_dataview_get_byteOffset(JSContext *ctx, JSValue this_val) { JSTypedArray *ta; JSObject *p; p = get_dataview(ctx, this_val); if (!p) return JS_EXCEPTION; if (dataview_is_oob(p)) return JS_ThrowTypeErrorArrayBufferOOB(ctx); ta = p->u.typed_array; return js_uint32(ta->offset); }
O2
c
js_dataview_get_byteOffset: pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 callq 0x6ecea pushq $0x6 popq %rbx testq %rax, %rax je 0x6e845 movq %rax, %r15 movq %rax, %rdi callq 0x6ed0f testl %eax, %eax je 0x6e84b movq %r14, %rdi callq 0x3289b xorl %eax, %eax xorl %ecx, %ecx jmp 0x6e87e movq 0x30(%r15), %rax movslq 0x20(%rax), %rax xorl %ecx, %ecx movl %eax, %edx cvtsi2sd %rdx, %xmm0 testq %rax, %rax movq %xmm0, %rdx cmovnsq %rax, %rdx pushq $0x7 popq %rbx cmovnsq %rcx, %rbx movabsq $0x7fffffff00000000, %rcx # imm = 0x7FFFFFFF00000000 andq %rdx, %rcx movl %edx, %eax orq %rcx, %rax movq %rbx, %rdx popq %rbx popq %r14 popq %r15 retq
js_dataview_get_byteOffset: push r15 push r14 push rbx mov r14, rdi call get_dataview push 6 pop rbx test rax, rax jz short loc_6E845 mov r15, rax mov rdi, rax call dataview_is_oob test eax, eax jz short loc_6E84B mov rdi, r14 call JS_ThrowTypeErrorArrayBufferOOB loc_6E845: xor eax, eax xor ecx, ecx jmp short loc_6E87E loc_6E84B: mov rax, [r15+30h] movsxd rax, dword ptr [rax+20h] xor ecx, ecx mov edx, eax cvtsi2sd xmm0, rdx test rax, rax movq rdx, xmm0 cmovns rdx, rax push 7 pop rbx cmovns rbx, rcx mov rcx, 7FFFFFFF00000000h and rcx, rdx mov eax, edx loc_6E87E: or rax, rcx mov rdx, rbx pop rbx pop r14 pop r15 retn
long long js_dataview_get_byteOffset( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long dataview; // rax long long v11; // r15 long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 long long v18; // rax long long v19; // rcx double v20; // rdx char v22; // [rsp+0h] [rbp-18h] dataview = get_dataview(a1); if ( !dataview ) goto LABEL_4; v11 = dataview; if ( (unsigned int)dataview_is_oob(dataview) ) { JS_ThrowTypeErrorArrayBufferOOB(a1, a3, a4, a5, a6, v16, v17, a9, a10, a2, v12, v13, v14, v15, v22); LABEL_4: v18 = 0LL; v19 = 0LL; return v19 | v18; } v20 = (double)*(int *)(*(_QWORD *)(v11 + 48) + 32LL); if ( *(int *)(*(_QWORD *)(v11 + 48) + 32LL) >= 0LL ) *(_QWORD *)&v20 = *(int *)(*(_QWORD *)(v11 + 48) + 32LL); v19 = *(_QWORD *)&v20 & 0x7FFFFFFF00000000LL; v18 = LODWORD(v20); return v19 | v18; }
js_dataview_get_byteOffset: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI CALL 0x0016ecea PUSH 0x6 POP RBX TEST RAX,RAX JZ 0x0016e845 MOV R15,RAX MOV RDI,RAX CALL 0x0016ed0f TEST EAX,EAX JZ 0x0016e84b MOV RDI,R14 CALL 0x0013289b LAB_0016e845: XOR EAX,EAX XOR ECX,ECX JMP 0x0016e87e LAB_0016e84b: MOV RAX,qword ptr [R15 + 0x30] MOVSXD RAX,dword ptr [RAX + 0x20] XOR ECX,ECX MOV EDX,EAX CVTSI2SD XMM0,RDX TEST RAX,RAX MOVQ RDX,XMM0 CMOVNS RDX,RAX PUSH 0x7 POP RBX CMOVNS RBX,RCX MOV RCX,0x7fffffff00000000 AND RCX,RDX MOV EAX,EDX LAB_0016e87e: OR RAX,RCX MOV RDX,RBX POP RBX POP R14 POP R15 RET
int1 [16] js_dataview_get_byteOffset(int8 param_1) { uint uVar1; int iVar2; long lVar3; ulong uVar4; double dVar5; ulong uVar6; double dVar7; int8 uVar8; int1 auVar9 [16]; lVar3 = get_dataview(); uVar8 = 6; if (lVar3 != 0) { iVar2 = dataview_is_oob(lVar3); if (iVar2 == 0) { uVar1 = *(uint *)(*(long *)(lVar3 + 0x30) + 0x20); dVar5 = (double)(long)(int)uVar1; dVar7 = (double)uVar1; if (-1 < (long)dVar5) { dVar7 = dVar5; } uVar8 = 7; if (-1 < (long)dVar5) { uVar8 = 0; } uVar6 = (ulong)dVar7 & 0x7fffffff00000000; uVar4 = (ulong)dVar7 & 0xffffffff; goto LAB_0016e87e; } JS_ThrowTypeErrorArrayBufferOOB(param_1); } uVar4 = 0; uVar6 = 0; LAB_0016e87e: auVar9._0_8_ = uVar4 | uVar6; auVar9._8_8_ = uVar8; return auVar9; }
26,199
my_uni_utf16
eloqsql/strings/ctype-ucs2.c
int my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { if (wc <= 0xFFFF) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (MY_UTF16_SURROGATE(wc)) return MY_CS_ILUNI; *s++= (uchar) (wc >> 8); *s= (uchar) (wc & 0xFF); return 2; } if (wc <= 0x10FFFF) { if (s + 4 > e) return MY_CS_TOOSMALL4; *s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8; *s++= (uchar) (wc >> 10) & 0xFF; *s++= (uchar) ((wc >> 8) & 3) | 0xDC; *s= (uchar) wc & 0xFF; return 4; } return MY_CS_ILUNI; }
O0
c
my_uni_utf16: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0x5082f movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0x507d8 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0x508f2 movq -0x18(%rbp), %rax andq $0xf800, %rax # imm = 0xF800 cmpq $0xd800, %rax # imm = 0xD800 jne 0x507f6 movl $0x0, -0x4(%rbp) jmp 0x508f2 movq -0x18(%rbp), %rax shrq $0x8, %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 andq $0xff, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x2, -0x4(%rbp) jmp 0x508f2 cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF ja 0x508eb movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0x50857 movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0x508f2 movq -0x18(%rbp), %rax subq $0x10000, %rax # imm = 0x10000 movq %rax, -0x18(%rbp) shrq $0x12, %rax movzbl %al, %eax orl $0xd8, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0xa, %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0x8, %rax andq $0x3, %rax movzbl %al, %eax orl $0xdc, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x4, -0x4(%rbp) jmp 0x508f2 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_uni_utf16: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx cmp [rbp+var_18], 0FFFFh ja short loc_5082F mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_507D8 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_508F2 loc_507D8: mov rax, [rbp+var_18] and rax, 0F800h cmp rax, 0D800h jnz short loc_507F6 mov [rbp+var_4], 0 jmp loc_508F2 loc_507F6: mov rax, [rbp+var_18] shr rax, 8 mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] and rax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 2 jmp loc_508F2 loc_5082F: cmp [rbp+var_18], offset unk_10FFFF ja loc_508EB mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_50857 mov [rbp+var_4], 0FFFFFF98h jmp loc_508F2 loc_50857: mov rax, [rbp+var_18] sub rax, 10000h mov [rbp+var_18], rax shr rax, 12h movzx eax, al or eax, 0D8h mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] shr rax, 0Ah movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] shr rax, 8 and rax, 3 movzx eax, al or eax, 0DCh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 4 jmp short loc_508F2 loc_508EB: mov [rbp+var_4], 0 loc_508F2: mov eax, [rbp+var_4] pop rbp retn
long long my_uni_utf16(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { if ( a2 > 0xFFFF ) { if ( a2 > (unsigned long long)&unk_10FFFF ) { return 0; } else if ( (unsigned long long)(a3 + 4) <= a4 ) { *a3 = ((a2 - 0x10000) >> 18) | 0xD8; a3[1] = (a2 - 0x10000) >> 10; a3[2] = BYTE1(a2) & 3 | 0xDC; a3[3] = a2; return 4; } else { return (unsigned int)-104; } } else if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( (a2 & 0xF800) == 0xD800 ) { return 0; } else { *a3 = BYTE1(a2); a3[1] = a2; return 2; } } else { return (unsigned int)-102; } }
my_uni_utf16: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX CMP qword ptr [RBP + -0x18],0xffff JA 0x0015082f MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001507d8 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001508f2 LAB_001507d8: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0xf800 CMP RAX,0xd800 JNZ 0x001507f6 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001508f2 LAB_001507f6: MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x8 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] AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x2 JMP 0x001508f2 LAB_0015082f: CMP qword ptr [RBP + -0x18],0x10ffff JA 0x001508eb MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x00150857 MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x001508f2 LAB_00150857: MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x10000 MOV qword ptr [RBP + -0x18],RAX SHR RAX,0x12 MOVZX EAX,AL OR EAX,0xd8 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] SHR RAX,0xa MOVZX EAX,AL AND EAX,0xff 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] SHR RAX,0x8 AND RAX,0x3 MOVZX EAX,AL OR EAX,0xdc 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] MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x4 JMP 0x001508f2 LAB_001508eb: MOV dword ptr [RBP + -0x4],0x0 LAB_001508f2: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_uni_utf16(int8 param_1,ulong param_2,byte *param_3,byte *param_4) { int4 local_c; if (param_2 < 0x10000) { if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if ((param_2 & 0xf800) == 0xd800) { local_c = 0; } else { *param_3 = (byte)(param_2 >> 8); param_3[1] = (byte)param_2; local_c = 2; } } else if (param_2 < 0x110000) { if (param_4 < param_3 + 4) { local_c = 0xffffff98; } else { param_2 = param_2 - 0x10000; *param_3 = (byte)(param_2 >> 0x12) | 0xd8; param_3[1] = (byte)(param_2 >> 10); param_3[2] = (byte)(param_2 >> 8) & 3 | 0xdc; param_3[3] = (byte)param_2; local_c = 4; } } else { local_c = 0; } return local_c; }