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
13,400
MyCTX_gcm::finish(unsigned char*, unsigned int*)
eloqsql/mysys_ssl/my_crypt.cc
int finish(uchar *dst, uint *dlen) { int fin; if (!EVP_CipherFinal_ex(ctx, dst, &fin)) return MY_AES_BAD_DATA; DBUG_ASSERT(fin == 0); if (EVP_CIPHER_CTX_encrypting(ctx)) { if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_GCM_GET_TAG, MY_AES_BLOCK_SIZE, dst)) return MY_AES_OPENSSL_ERROR; *dlen= MY_AES_BLOCK_SIZE; } else *dlen= 0; return MY_AES_OK; }
O3
cpp
MyCTX_gcm::finish(unsigned char*, unsigned int*): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r12 movq 0xc8(%rdi), %rdi leaq -0x2c(%rbp), %rdx callq 0x29290 testl %eax, %eax je 0xd847a movq 0xc8(%r12), %rdi callq 0x29870 xorl %r15d, %r15d movl $0x0, %r13d testl %eax, %eax je 0xd8475 movq 0xc8(%r12), %rdi movl $0x10, %r13d movl $0x10, %esi movl $0x10, %edx movq %r14, %rcx callq 0x292d0 testl %eax, %eax je 0xd8482 movl %r13d, (%rbx) jmp 0xd8488 movl $0xffffff9c, %r15d # imm = 0xFFFFFF9C jmp 0xd8488 movl $0xffffff9b, %r15d # imm = 0xFFFFFF9B movl %r15d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ZN9MyCTX_gcm6finishEPhPj: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdx mov r14, rsi mov r12, rdi mov rdi, [rdi+0C8h] lea rdx, [rbp+var_2C] call _EVP_CipherFinal_ex test eax, eax jz short loc_D847A mov rdi, [r12+0C8h] call _EVP_CIPHER_CTX_is_encrypting xor r15d, r15d mov r13d, 0 test eax, eax jz short loc_D8475 mov rdi, [r12+0C8h] mov r13d, 10h mov esi, 10h mov edx, 10h mov rcx, r14 call _EVP_CIPHER_CTX_ctrl test eax, eax jz short loc_D8482 loc_D8475: mov [rbx], r13d jmp short loc_D8488 loc_D847A: mov r15d, 0FFFFFF9Ch jmp short loc_D8488 loc_D8482: mov r15d, 0FFFFFF9Bh loc_D8488: mov eax, r15d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long MyCTX_gcm::finish(MyCTX_gcm *this, unsigned __int8 *a2, unsigned int *a3) { long long v3; // rax unsigned int v5; // r15d unsigned int v6; // r13d _DWORD v8[11]; // [rsp+0h] [rbp-2Ch] BYREF v8[0] = HIDWORD(v3); if ( (unsigned int)EVP_CipherFinal_ex(*((_QWORD *)this + 25), a2, v8) ) { v5 = 0; v6 = 0; if ( (unsigned int)EVP_CIPHER_CTX_is_encrypting(*((_QWORD *)this + 25)) && (v6 = 16, !(unsigned int)EVP_CIPHER_CTX_ctrl(*((_QWORD *)this + 25), 16LL, 16LL, a2)) ) { return (unsigned int)-101; } else { *a3 = v6; } } else { return (unsigned int)-100; } return v5; }
finish: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV R12,RDI MOV RDI,qword ptr [RDI + 0xc8] LEA RDX,[RBP + -0x2c] CALL 0x00129290 TEST EAX,EAX JZ 0x001d847a MOV RDI,qword ptr [R12 + 0xc8] CALL 0x00129870 XOR R15D,R15D MOV R13D,0x0 TEST EAX,EAX JZ 0x001d8475 MOV RDI,qword ptr [R12 + 0xc8] MOV R13D,0x10 MOV ESI,0x10 MOV EDX,0x10 MOV RCX,R14 CALL 0x001292d0 TEST EAX,EAX JZ 0x001d8482 LAB_001d8475: MOV dword ptr [RBX],R13D JMP 0x001d8488 LAB_001d847a: MOV R15D,0xffffff9c JMP 0x001d8488 LAB_001d8482: MOV R15D,0xffffff9b LAB_001d8488: MOV EAX,R15D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* MyCTX_gcm::finish(unsigned char*, unsigned int*) */ int8 __thiscall MyCTX_gcm::finish(MyCTX_gcm *this,uchar *param_1,uint *param_2) { int iVar1; uint uVar2; int8 uVar3; int local_34; iVar1 = EVP_CipherFinal_ex(*(EVP_CIPHER_CTX **)(this + 200),param_1,&local_34); if (iVar1 == 0) { uVar3 = 0xffffff9c; } else { iVar1 = EVP_CIPHER_CTX_is_encrypting(*(int8 *)(this + 200)); uVar3 = 0; uVar2 = 0; if (iVar1 != 0) { uVar2 = 0x10; iVar1 = EVP_CIPHER_CTX_ctrl(*(EVP_CIPHER_CTX **)(this + 200),0x10,0x10,param_1); if (iVar1 == 0) { return 0xffffff9b; } } *param_2 = uVar2; } return uVar3; }
13,401
google::protobuf::compiler::objectivec::(anonymous namespace)::MapEntryTypeName(google::protobuf::FieldDescriptor const*, bool)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc
const char* MapEntryTypeName(const FieldDescriptor* descriptor, bool isKey) { ObjectiveCType type = GetObjectiveCType(descriptor); switch (type) { case OBJECTIVECTYPE_INT32: return "Int32"; case OBJECTIVECTYPE_UINT32: return "UInt32"; case OBJECTIVECTYPE_INT64: return "Int64"; case OBJECTIVECTYPE_UINT64: return "UInt64"; case OBJECTIVECTYPE_FLOAT: return "Float"; case OBJECTIVECTYPE_DOUBLE: return "Double"; case OBJECTIVECTYPE_BOOLEAN: return "Bool"; case OBJECTIVECTYPE_STRING: return (isKey ? "String" : "Object"); case OBJECTIVECTYPE_DATA: return "Object"; case OBJECTIVECTYPE_ENUM: return "Enum"; case OBJECTIVECTYPE_MESSAGE: return "Object"; } // Some compilers report reaching end of function even though all cases of // the enum are handed in the switch. GOOGLE_LOG(FATAL) << "Can't get here."; return NULL; }
O3
cpp
google::protobuf::compiler::objectivec::(anonymous namespace)::MapEntryTypeName(google::protobuf::FieldDescriptor const*, bool): pushq %r14 pushq %rbx subq $0x48, %rsp movl %esi, %ebx movq %rdi, %r14 movq 0x18(%rdi), %rdi testq %rdi, %rdi je 0xf0705 leaq 0x49544(%rip), %rax # 0x139c34 leaq 0x10(%rsp), %rsi movq %rax, (%rsi) leaq 0x8(%rsp), %rdx movq %r14, (%rdx) callq 0x2f19d movzbl 0x2(%r14), %edi callq 0x4ce97 cmpl $0xa, %eax ja 0xf079d movl %eax, %eax leaq 0xf63b7(%rip), %rcx # 0x1e6ad8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0xf6474(%rip), %rax # 0x1e6ba5 jmp 0xf07e3 leaq 0xb1581(%rip), %rax # 0x1a1cbe jmp 0xf07e3 leaq 0xacf1d(%rip), %rax # 0x19d666 jmp 0xf07e3 leaq 0x103399(%rip), %rax # 0x1f3aee jmp 0xf07e3 leaq 0xb150c(%rip), %rcx # 0x1a1c6d leaq 0xf643d(%rip), %rax # 0x1e6ba5 testb %bl, %bl cmovneq %rcx, %rax jmp 0xf07e3 leaq 0xacee8(%rip), %rax # 0x19d65f jmp 0xf07e3 leaq 0x10332c(%rip), %rax # 0x1f3aac jmp 0xf07e3 leaq 0xb1545(%rip), %rax # 0x1a1cce jmp 0xf07e3 leaq 0xb2048(%rip), %rax # 0x1a27da jmp 0xf07e3 leaq 0x10340c(%rip), %rax # 0x1f3ba7 jmp 0xf07e3 leaq 0xf6408(%rip), %rdx # 0x1e6bac leaq 0x10(%rsp), %rbx movq %rbx, %rdi movl $0x3, %esi movl $0x4e, %ecx callq 0x1072ba leaq 0xace5c(%rip), %rsi # 0x19d61e movq %rbx, %rdi callq 0x106db8 leaq 0x8(%rsp), %rdi movq %rax, %rsi callq 0x106e92 leaq 0x10(%rsp), %rdi callq 0x1072d8 xorl %eax, %eax addq $0x48, %rsp popq %rbx popq %r14 retq jmp 0xf07ed movq %rax, %rbx leaq 0x10(%rsp), %rdi callq 0x1072d8 movq %rbx, %rdi callq 0x1f860
_ZN6google8protobuf8compiler10objectivec12_GLOBAL__N_116MapEntryTypeNameEPKNS0_15FieldDescriptorEb: push r14 push rbx sub rsp, 48h mov ebx, esi mov r14, rdi mov rdi, [rdi+18h] test rdi, rdi jz short loc_F0705 lea rax, _ZN6google8protobuf15FieldDescriptor12TypeOnceInitEPKS1_; google::protobuf::FieldDescriptor::TypeOnceInit(google::protobuf::FieldDescriptor const*) lea rsi, [rsp+58h+var_48] mov [rsi], rax lea rdx, [rsp+58h+var_50] mov [rdx], r14 call _ZSt9call_onceIPFvPKN6google8protobuf15FieldDescriptorEEJS4_EEvRSt9once_flagOT_DpOT0_; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>(std::once_flag &,void (*)(google::protobuf::FieldDescriptor const*) &&,google::protobuf::FieldDescriptor const* &&) loc_F0705: movzx edi, byte ptr [r14+2] call _ZN6google8protobuf8compiler10objectivec17GetObjectiveCTypeENS0_15FieldDescriptor4TypeE; google::protobuf::compiler::objectivec::GetObjectiveCType(google::protobuf::FieldDescriptor::Type) cmp eax, 0Ah; switch 11 cases ja def_F0728; jumptable 00000000000F0728 default case mov eax, eax lea rcx, jpt_F0728 movsxd rax, ds:(jpt_F0728 - 1E6AD8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_F072A: lea rax, aObject; jumptable 00000000000F0728 cases 8,10 jmp loc_F07E3 loc_F0736: lea rax, aJavaLangFloat+0Ah; jumptable 00000000000F0728 case 4 jmp loc_F07E3 loc_F0742: lea rax, aSint64+1; jumptable 00000000000F0728 case 2 jmp loc_F07E3 loc_F074E: lea rax, aAdduint64+3; jumptable 00000000000F0728 case 3 jmp loc_F07E3 loc_F075A: lea rcx, aJavaLangString_1+0Ah; jumptable 00000000000F0728 case 7 lea rax, aObject; "Object" test bl, bl cmovnz rax, rcx jmp short loc_F07E3 loc_F0770: lea rax, aSint32+1; jumptable 00000000000F0728 case 0 jmp short loc_F07E3 loc_F0779: lea rax, aAdduint32+3; jumptable 00000000000F0728 case 1 jmp short loc_F07E3 loc_F0782: lea rax, aJavaLangDouble_0+0Ah; jumptable 00000000000F0728 case 5 jmp short loc_F07E3 loc_F078B: lea rax, aEnum+1; jumptable 00000000000F0728 case 9 jmp short loc_F07E3 loc_F0794: lea rax, aAddbool+3; jumptable 00000000000F0728 case 6 jmp short loc_F07E3 def_F0728: lea rdx, aWorkspaceLlm4b_42; jumptable 00000000000F0728 default case lea rbx, [rsp+58h+var_48] mov rdi, rbx mov esi, 3 mov ecx, 4Eh ; 'N' call _ZN6google8protobuf8internal10LogMessageC2ENS0_8LogLevelEPKci; google::protobuf::internal::LogMessage::LogMessage(google::protobuf::LogLevel,char const*,int) lea rsi, aCanTGetHere; "Can't get here." mov rdi, rbx call _ZN6google8protobuf8internal10LogMessagelsEPKc; google::protobuf::internal::LogMessage::operator<<(char const*) lea rdi, [rsp+58h+var_50] mov rsi, rax call _ZN6google8protobuf8internal11LogFinisheraSERNS1_10LogMessageE; google::protobuf::internal::LogFinisher::operator=(google::protobuf::internal::LogMessage &) lea rdi, [rsp+58h+var_48]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() xor eax, eax loc_F07E3: add rsp, 48h pop rbx pop r14 retn jmp short $+2 loc_F07ED: mov rbx, rax lea rdi, [rsp+arg_8]; this call _ZN6google8protobuf8internal10LogMessageD2Ev; google::protobuf::internal::LogMessage::~LogMessage() mov rdi, rbx call __Unwind_Resume
char * google::protobuf::compiler::objectivec::`anonymous namespace'::MapEntryTypeName( google::protobuf::compiler::objectivec::_anonymous_namespace_ *this, const google::protobuf::FieldDescriptor *a2) { long long v3; // rdi char *result; // rax long long v5; // rax google::protobuf::compiler::objectivec::_anonymous_namespace_ *v6; // [rsp+8h] [rbp-50h] BYREF _QWORD v7[9]; // [rsp+10h] [rbp-48h] BYREF v3 = *((_QWORD *)this + 3); if ( v3 ) { v7[0] = google::protobuf::FieldDescriptor::TypeOnceInit; v6 = this; std::call_once<void (*)(google::protobuf::FieldDescriptor const*),google::protobuf::FieldDescriptor const*>( v3, (long long)v7, (long long)&v6); } switch ( (unsigned int)google::protobuf::compiler::objectivec::GetObjectiveCType(*((unsigned __int8 *)this + 2)) ) { case 0u: result = "Int32"; break; case 1u: result = "UInt32"; break; case 2u: result = "Int64"; break; case 3u: result = "UInt64"; break; case 4u: result = "Float"; break; case 5u: result = "Double"; break; case 6u: result = "Bool"; break; case 7u: result = "Object"; if ( (_BYTE)a2 ) result = "String"; break; case 8u: case 0xAu: result = "Object"; break; case 9u: result = "Enum"; break; default: google::protobuf::internal::LogMessage::LogMessage( v7, 3LL, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/obj" "ectivec_map_field.cc", 78LL); v5 = google::protobuf::internal::LogMessage::operator<<(v7, "Can't get here."); google::protobuf::internal::LogFinisher::operator=(&v6, v5); google::protobuf::internal::LogMessage::~LogMessage((google::protobuf::internal::LogMessage *)v7); result = 0LL; break; } return result; }
MapEntryTypeName: PUSH R14 PUSH RBX SUB RSP,0x48 MOV EBX,ESI MOV R14,RDI MOV RDI,qword ptr [RDI + 0x18] TEST RDI,RDI JZ 0x001f0705 LEA RAX,[0x239c34] LEA RSI,[RSP + 0x10] MOV qword ptr [RSI],RAX LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],R14 CALL 0x0012f19d LAB_001f0705: MOVZX EDI,byte ptr [R14 + 0x2] CALL 0x0014ce97 CMP EAX,0xa JA 0x001f079d MOV EAX,EAX LEA RCX,[0x2e6ad8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_8: LEA RAX,[0x2e6ba5] JMP 0x001f07e3 caseD_4: LEA RAX,[0x2a1cbe] JMP 0x001f07e3 caseD_2: LEA RAX,[0x29d666] JMP 0x001f07e3 caseD_3: LEA RAX,[0x2f3aee] JMP 0x001f07e3 caseD_7: LEA RCX,[0x2a1c6d] LEA RAX,[0x2e6ba5] TEST BL,BL CMOVNZ RAX,RCX JMP 0x001f07e3 caseD_0: LEA RAX,[0x29d65f] JMP 0x001f07e3 caseD_1: LEA RAX,[0x2f3aac] JMP 0x001f07e3 caseD_5: LEA RAX,[0x2a1cce] JMP 0x001f07e3 caseD_9: LEA RAX,[0x2a27da] JMP 0x001f07e3 caseD_6: LEA RAX,[0x2f3ba7] JMP 0x001f07e3 default: LEA RDX,[0x2e6bac] LEA RBX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x3 MOV ECX,0x4e CALL 0x002072ba LAB_001f07bb: LEA RSI,[0x29d61e] MOV RDI,RBX CALL 0x00206db8 LAB_001f07ca: LEA RDI,[RSP + 0x8] MOV RSI,RAX CALL 0x00206e92 LAB_001f07d7: LEA RDI,[RSP + 0x10] CALL 0x002072d8 XOR EAX,EAX LAB_001f07e3: ADD RSP,0x48 POP RBX POP R14 RET
/* google::protobuf::compiler::objectivec::(anonymous namespace)::MapEntryTypeName(google::protobuf::FieldDescriptor const*, bool) */ char * google::protobuf::compiler::objectivec::(anonymous_namespace)::MapEntryTypeName (FieldDescriptor *param_1,bool param_2) { int4 uVar1; char *pcVar2; LogMessage *pLVar3; FieldDescriptor *local_50; code *local_48 [7]; if (*(once_flag **)(param_1 + 0x18) != (once_flag *)0x0) { local_48[0] = FieldDescriptor::TypeOnceInit; local_50 = param_1; std:: call_once<void(*)(google::protobuf::FieldDescriptor_const*),google::protobuf::FieldDescriptor_const*> (*(once_flag **)(param_1 + 0x18),(_func_void_FieldDescriptor_ptr *)local_48,&local_50) ; } uVar1 = GetObjectiveCType(param_1[2]); switch(uVar1) { case 0: pcVar2 = "Int32"; break; case 1: pcVar2 = "UInt32"; break; case 2: pcVar2 = "Int64"; break; case 3: pcVar2 = "UInt64"; break; case 4: pcVar2 = "Float"; break; case 5: pcVar2 = "Double"; break; case 6: pcVar2 = "Bool"; break; case 7: pcVar2 = "Object"; if (param_2) { pcVar2 = "String"; } break; case 8: case 10: pcVar2 = "Object"; break; case 9: pcVar2 = "Enum"; break; default: internal::LogMessage::LogMessage ((LogMessage *)local_48,3, "/workspace/llm4binary/github2025/aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/compiler/objectivec/objectivec_map_field.cc" ,0x4e); /* try { // try from 001f07bb to 001f07c9 has its CatchHandler @ 001f07ed */ pLVar3 = (LogMessage *) internal::LogMessage::operator<<((LogMessage *)local_48,"Can\'t get here."); /* try { // try from 001f07ca to 001f07d6 has its CatchHandler @ 001f07eb */ internal::LogFinisher::operator=((LogFinisher *)&local_50,pLVar3); internal::LogMessage::~LogMessage((LogMessage *)local_48); pcVar2 = (char *)0x0; } return pcVar2; }
13,402
common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool)
llama.cpp/common/common.cpp
std::string common_token_to_piece(const struct llama_vocab * vocab, llama_token token, bool special) { std::string piece; piece.resize(piece.capacity()); // using string internal cache, 15 bytes + '\n' const int n_chars = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special); if (n_chars < 0) { piece.resize(-n_chars); int check = llama_token_to_piece(vocab, token, &piece[0], piece.size(), 0, special); GGML_ASSERT(check == -n_chars); } else { piece.resize(n_chars); } return piece; }
O3
cpp
common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %ecx, %r15d movl %edx, %ebp movq %rsi, %r14 movq %rdi, %rbx leaq 0x10(%rdi), %r13 movq %r13, (%rdi) movq $0x0, 0x8(%rdi) movb $0x0, 0x10(%rdi) movl $0xf, %esi xorl %edx, %edx callq 0x1d950 movq (%rbx), %rdx movl 0x8(%rbx), %ecx movzbl %r15b, %r15d movq %r14, %rdi movl %ebp, %esi xorl %r8d, %r8d movl %r15d, %r9d callq 0x1d4e0 movl %eax, %r12d testl %eax, %eax js 0xb4f28 movl %r12d, %esi movq %rbx, %rdi xorl %edx, %edx callq 0x1d950 jmp 0xb4f53 negl %r12d movq %rbx, %rdi movq %r12, %rsi xorl %edx, %edx callq 0x1d950 movq (%rbx), %rdx movl 0x8(%rbx), %ecx movq %r14, %rdi movl %ebp, %esi xorl %r8d, %r8d movl %r15d, %r9d callq 0x1d4e0 cmpl %r12d, %eax jne 0xb4f65 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x23e01(%rip), %rdi # 0xd8d6d leaq 0x1cdb1(%rip), %rdx # 0xd1d24 leaq 0x24422(%rip), %rcx # 0xd939c movl $0x4ef, %esi # imm = 0x4EF xorl %eax, %eax callq 0x1dbf0 jmp 0xb4f8a jmp 0xb4f8a movq %rax, %r14 movq (%rbx), %rdi cmpq %r13, %rdi je 0xb4fa1 movq (%r13), %rsi incq %rsi callq 0x1d160 movq %r14, %rdi callq 0x1d8e0
_Z21common_token_to_pieceB5cxx11PK11llama_vocabib: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15d, ecx mov ebp, edx mov r14, rsi mov rbx, rdi lea r13, [rdi+10h] mov [rdi], r13 mov qword ptr [rdi+8], 0 mov byte ptr [rdi+10h], 0 mov esi, 0Fh xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) mov rdx, [rbx] mov ecx, [rbx+8] movzx r15d, r15b mov rdi, r14 mov esi, ebp xor r8d, r8d mov r9d, r15d call _llama_token_to_piece mov r12d, eax test eax, eax js short loc_B4F28 mov esi, r12d mov rdi, rbx xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) jmp short loc_B4F53 loc_B4F28: neg r12d mov rdi, rbx mov rsi, r12 xor edx, edx call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6resizeEmc; std::string::resize(ulong,char) mov rdx, [rbx] mov ecx, [rbx+8] mov rdi, r14 mov esi, ebp xor r8d, r8d mov r9d, r15d call _llama_token_to_piece cmp eax, r12d jnz short loc_B4F65 loc_B4F53: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_B4F65: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github2025/llama."... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCheckNChars; "check == -n_chars" mov esi, 4EFh xor eax, eax call _ggml_abort jmp short loc_B4F8A jmp short $+2 loc_B4F8A: mov r14, rax mov rdi, [rbx]; void * cmp rdi, r13 jz short loc_B4FA1 mov rsi, [r13+0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_B4FA1: mov rdi, r14 call __Unwind_Resume
_QWORD * common_token_to_piece[abi:cxx11](_QWORD *a1, long long a2, unsigned int a3, unsigned __int8 a4) { _QWORD *v6; // r13 int v7; // eax long long v8; // r12 long long v10; // rax long long v11; // r14 v6 = a1 + 2; *a1 = a1 + 2; a1[1] = 0LL; *((_BYTE *)a1 + 16) = 0; std::string::resize(a1, 15LL, 0LL); v7 = llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, a4); if ( v7 < 0 ) { v8 = (unsigned int)-v7; std::string::resize(a1, v8, 0LL); if ( (unsigned int)llama_token_to_piece(a2, a3, *a1, *((unsigned int *)a1 + 2), 0LL, a4) != (_DWORD)v8 ) { ggml_abort( "/workspace/llm4binary/github2025/llama.cpp/common/common.cpp", 1263LL, "GGML_ASSERT(%s) failed", "check == -n_chars"); v11 = v10; if ( (_QWORD *)*a1 != v6 ) operator delete((void *)*a1, *v6 + 1LL); _Unwind_Resume(v11); } } else { std::string::resize(a1, (unsigned int)v7, 0LL); } return a1; }
common_token_to_piece[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15D,ECX MOV EBP,EDX MOV R14,RSI MOV RBX,RDI LEA R13,[RDI + 0x10] MOV qword ptr [RDI],R13 MOV qword ptr [RDI + 0x8],0x0 MOV byte ptr [RDI + 0x10],0x0 LAB_001b4eec: MOV ESI,0xf XOR EDX,EDX CALL 0x0011d950 MOV RDX,qword ptr [RBX] MOV ECX,dword ptr [RBX + 0x8] LAB_001b4efe: MOVZX R15D,R15B MOV RDI,R14 MOV ESI,EBP XOR R8D,R8D MOV R9D,R15D CALL 0x0011d4e0 MOV R12D,EAX TEST EAX,EAX JS 0x001b4f28 MOV ESI,R12D MOV RDI,RBX XOR EDX,EDX CALL 0x0011d950 JMP 0x001b4f53 LAB_001b4f28: NEG R12D MOV RDI,RBX MOV RSI,R12 XOR EDX,EDX CALL 0x0011d950 MOV RDX,qword ptr [RBX] MOV ECX,dword ptr [RBX + 0x8] LAB_001b4f3e: MOV RDI,R14 MOV ESI,EBP XOR R8D,R8D MOV R9D,R15D CALL 0x0011d4e0 CMP EAX,R12D JNZ 0x001b4f65 LAB_001b4f53: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001b4f65: LEA RDI,[0x1d8d6d] LEA RDX,[0x1d1d24] LEA RCX,[0x1d939c] MOV ESI,0x4ef XOR EAX,EAX CALL 0x0011dbf0
/* common_token_to_piece[abi:cxx11](llama_vocab const*, int, bool) */ llama_vocab * common_token_to_piece_abi_cxx11_(llama_vocab *param_1,int param_2,bool param_3) { int iVar1; int iVar2; int1 in_CL; int7 in_register_00000011; int4 in_register_00000034; *(llama_vocab **)param_1 = param_1 + 0x10; *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (llama_vocab)0x0; /* try { // try from 001b4eec to 001b4ef7 has its CatchHandler @ 001b4f88 */ std::__cxx11::string::resize((ulong)param_1,'\x0f'); /* try { // try from 001b4efe to 001b4f37 has its CatchHandler @ 001b4f8a */ iVar1 = llama_token_to_piece (CONCAT44(in_register_00000034,param_2), CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1, *(int4 *)(param_1 + 8),0,in_CL); if (iVar1 < 0) { std::__cxx11::string::resize((ulong)param_1,(char)-iVar1); /* try { // try from 001b4f3e to 001b4f85 has its CatchHandler @ 001b4f86 */ iVar2 = llama_token_to_piece (CONCAT44(in_register_00000034,param_2), CONCAT71(in_register_00000011,param_3) & 0xffffffff,*(int8 *)param_1, *(int4 *)(param_1 + 8),0,in_CL); if (iVar2 != -iVar1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github2025/llama.cpp/common/common.cpp",0x4ef, "GGML_ASSERT(%s) failed","check == -n_chars"); } } else { std::__cxx11::string::resize((ulong)param_1,(char)iVar1); } return param_1; }
13,403
inline_mysql_cond_broadcast
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_broadcast( mysql_cond_t *that) { int result; #ifdef HAVE_PSI_COND_INTERFACE if (psi_likely(that->m_psi != NULL)) PSI_COND_CALL(broadcast_cond)(that->m_psi); #endif result= pthread_cond_broadcast(&that->m_cond); return result; }
O0
c
inline_mysql_cond_broadcast: 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 0x514eb leaq 0x279dc9(%rip), %rax # 0x2cb2a0 movq (%rax), %rax movq 0x178(%rax), %rax movq -0x8(%rbp), %rcx movq 0x30(%rcx), %rdi callq *%rax movq -0x8(%rbp), %rdi callq 0x2a6f0 movl %eax, -0xc(%rbp) movl -0xc(%rbp), %eax addq $0x10, %rsp popq %rbp retq
inline_mysql_cond_broadcast_0: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+30h], 0 setnz al and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_514EB lea rax, PSI_server mov rax, [rax] mov rax, [rax+178h] mov rcx, [rbp+var_8] mov rdi, [rcx+30h] call rax loc_514EB: mov rdi, [rbp+var_8] call _pthread_cond_broadcast mov [rbp+var_C], eax mov eax, [rbp+var_C] add rsp, 10h pop rbp retn
long long inline_mysql_cond_broadcast_0(long long a1) { if ( *(_QWORD *)(a1 + 48) ) ((void ( *)(_QWORD))PSI_server[47])(*(_QWORD *)(a1 + 48)); return (unsigned int)pthread_cond_broadcast(a1); }
inline_mysql_cond_broadcast: 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 0x001514eb LEA RAX,[0x3cb2a0] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x178] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x30] CALL RAX LAB_001514eb: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0012a6f0 MOV dword ptr [RBP + -0xc],EAX MOV EAX,dword ptr [RBP + -0xc] ADD RSP,0x10 POP RBP RET
int inline_mysql_cond_broadcast(pthread_cond_t *param_1) { int iVar1; if (param_1[1].__align != 0) { (**(code **)(PSI_server + 0x178))(param_1[1].__align); } iVar1 = pthread_cond_broadcast(param_1); return iVar1; }
13,404
my_rnd_ssl
eloqsql/mysys/my_rnd.c
double my_rnd_ssl(struct my_rnd_struct *rand_st) { #if defined(HAVE_OPENSSL) rc= RAND_bytes((unsigned char *) &res, sizeof (unsigned int)); if (rc) return (double)res / (double)UINT_MAX; #endif /* defined(HAVE_OPENSSL) */ return my_rnd(rand_st); }
O3
c
my_rnd_ssl: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq 0x8(%rdi), %rsi leaq (%rax,%rax,2), %rax addq %rsi, %rax movq 0x10(%rdi), %r8 xorl %edx, %edx divq %r8 movq %rdx, %rcx leaq (%rsi,%rdx), %rax addq $0x21, %rax xorl %edx, %edx divq %r8 movq %rdx, 0x8(%rdi) movq %rcx, (%rdi) movq %rcx, %xmm1 punpckldq 0x300ed(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1] subpd 0x300f5(%rip), %xmm1 # 0xe00e0 movapd %xmm1, %xmm0 unpckhpd %xmm1, %xmm0 # xmm0 = xmm0[1],xmm1[1] addsd %xmm1, %xmm0 divsd 0x18(%rdi), %xmm0 popq %rbp retq nop
my_rnd_ssl: push rbp mov rbp, rsp mov rax, [rdi] mov rsi, [rdi+8] lea rax, [rax+rax*2] add rax, rsi mov r8, [rdi+10h] xor edx, edx div r8 mov rcx, rdx lea rax, [rsi+rdx] add rax, 21h ; '!' xor edx, edx div r8 mov [rdi+8], rdx mov [rdi], rcx movq xmm1, rcx punpckldq xmm1, cs:xmmword_E00D0 subpd xmm1, cs:xmmword_E00E0 movapd xmm0, xmm1 unpckhpd xmm0, xmm1 addsd xmm0, xmm1 divsd xmm0, qword ptr [rdi+18h] pop rbp retn
double my_rnd_ssl(long long a1) { long long v1; // rsi unsigned long long v2; // r8 unsigned long long v3; // rcx __m128d v4; // xmm1 v1 = *(_QWORD *)(a1 + 8); v2 = *(_QWORD *)(a1 + 16); v3 = (v1 + 3LL * *(_QWORD *)a1) % v2; *(_QWORD *)(a1 + 8) = (v1 + v3 + 33) % v2; *(_QWORD *)a1 = v3; v4 = _mm_sub_pd((__m128d)_mm_unpacklo_epi32((__m128i)v3, (__m128i)xmmword_E00D0), (__m128d)xmmword_E00E0); return (_mm_unpackhi_pd(v4, v4).m128d_f64[0] + v4.m128d_f64[0]) / *(double *)(a1 + 24); }
my_rnd_ssl: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV RSI,qword ptr [RDI + 0x8] LEA RAX,[RAX + RAX*0x2] ADD RAX,RSI MOV R8,qword ptr [RDI + 0x10] XOR EDX,EDX DIV R8 MOV RCX,RDX LEA RAX,[RSI + RDX*0x1] ADD RAX,0x21 XOR EDX,EDX DIV R8 MOV qword ptr [RDI + 0x8],RDX MOV qword ptr [RDI],RCX MOVQ XMM1,RCX PUNPCKLDQ XMM1,xmmword ptr [0x001e00d0] SUBPD XMM1,xmmword ptr [0x001e00e0] MOVAPD XMM0,XMM1 UNPCKHPD XMM0,XMM1 ADDSD XMM0,XMM1 DIVSD XMM0,qword ptr [RDI + 0x18] POP RBP RET
ulong my_rnd_ssl(ulong *param_1) { ulong uVar1; ulong uVar2; ulong uVar3; uVar1 = param_1[2]; uVar3 = (*param_1 * 3 + param_1[1]) % uVar1; uVar2 = param_1[1] + uVar3 + 0x21; param_1[1] = uVar2 % uVar1; *param_1 = uVar3; return uVar2 / uVar1; }
13,405
json_parse_error
bluesky950520[P]quickjs/quickjs.c
static int json_parse_error(JSParseState *s, const uint8_t *curp, const char *msg) { const uint8_t *p, *line_start; int position = curp - s->buf_start; int line = 1; for (line_start = p = s->buf_start; p < curp; p++) { /* column count does not account for TABs nor wide characters */ if (*p == '\r' || *p == '\n') { p += 1 + (p[0] == '\r' && p[1] == '\n'); line++; line_start = p; } } return js_parse_error(s, "%s in JSON at position %d (line %d column %d)", msg, position, line, (int)(p - line_start) + 1); }
O0
c
json_parse_error: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq 0x28(%rsp), %rax movq 0x30(%rsp), %rcx movq 0x68(%rcx), %rcx subq %rcx, %rax movl %eax, 0xc(%rsp) movl $0x1, 0x8(%rsp) movq 0x30(%rsp), %rax movq 0x68(%rax), %rax movq %rax, 0x18(%rsp) movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rax cmpq 0x28(%rsp), %rax jae 0x8cdb9 movq 0x18(%rsp), %rax movzbl (%rax), %eax cmpl $0xd, %eax je 0x8cd4d movq 0x18(%rsp), %rax movzbl (%rax), %eax cmpl $0xa, %eax jne 0x8cda4 movq 0x18(%rsp), %rax movzbl (%rax), %ecx xorl %eax, %eax cmpl $0xd, %ecx movb %al, 0x7(%rsp) jne 0x8cd73 movq 0x18(%rsp), %rax movzbl 0x1(%rax), %eax cmpl $0xa, %eax sete %al movb %al, 0x7(%rsp) movb 0x7(%rsp), %al andb $0x1, %al movzbl %al, %ecx addl $0x1, %ecx movq 0x18(%rsp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, 0x18(%rsp) movl 0x8(%rsp), %eax addl $0x1, %eax movl %eax, 0x8(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x10(%rsp) jmp 0x8cda6 movq 0x18(%rsp), %rax addq $0x1, %rax movq %rax, 0x18(%rsp) jmp 0x8cd23 movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rdx movl 0xc(%rsp), %ecx movl 0x8(%rsp), %r8d movq 0x18(%rsp), %rax movq 0x10(%rsp), %rsi subq %rsi, %rax movl %eax, %r9d addl $0x1, %r9d leaq 0x881c5(%rip), %rsi # 0x114fac movb $0x0, %al callq 0x4e980 addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
json_parse_error: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_8] mov rcx, [rcx+68h] sub rax, rcx mov [rsp+38h+var_2C], eax mov [rsp+38h+var_30], 1 mov rax, [rsp+38h+var_8] mov rax, [rax+68h] mov [rsp+38h+var_20], rax mov [rsp+38h+var_28], rax loc_8CD23: mov rax, [rsp+38h+var_20] cmp rax, [rsp+38h+var_10] jnb loc_8CDB9 mov rax, [rsp+38h+var_20] movzx eax, byte ptr [rax] cmp eax, 0Dh jz short loc_8CD4D mov rax, [rsp+38h+var_20] movzx eax, byte ptr [rax] cmp eax, 0Ah jnz short loc_8CDA4 loc_8CD4D: mov rax, [rsp+38h+var_20] movzx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0Dh mov [rsp+38h+var_31], al jnz short loc_8CD73 mov rax, [rsp+38h+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0Ah setz al mov [rsp+38h+var_31], al loc_8CD73: mov al, [rsp+38h+var_31] and al, 1 movzx ecx, al add ecx, 1 mov rax, [rsp+38h+var_20] movsxd rcx, ecx add rax, rcx mov [rsp+38h+var_20], rax mov eax, [rsp+38h+var_30] add eax, 1 mov [rsp+38h+var_30], eax mov rax, [rsp+38h+var_20] mov [rsp+38h+var_28], rax loc_8CDA4: jmp short $+2 loc_8CDA6: mov rax, [rsp+38h+var_20] add rax, 1 mov [rsp+38h+var_20], rax jmp loc_8CD23 loc_8CDB9: mov rdi, [rsp+38h+var_8] mov rdx, [rsp+38h+var_18] mov ecx, [rsp+38h+var_2C] mov r8d, [rsp+38h+var_30] mov rax, [rsp+38h+var_20] mov rsi, [rsp+38h+var_28] sub rax, rsi mov r9d, eax add r9d, 1 lea rsi, aSInJsonAtPosit; "%s in JSON at position %d (line %d colu"... mov al, 0 call js_parse_error add rsp, 38h retn
long long json_parse_error( _QWORD *a1, unsigned long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11) { char v12; // [rsp+0h] [rbp-38h] bool v13; // [rsp+7h] [rbp-31h] unsigned int v14; // [rsp+8h] [rbp-30h] int v15; // [rsp+10h] [rbp-28h] _BYTE *v16; // [rsp+18h] [rbp-20h] v14 = 1; v16 = (_BYTE *)a1[13]; v15 = (int)v16; while ( (unsigned long long)v16 < a2 ) { if ( *v16 == 13 || *v16 == 10 ) { v13 = 0; if ( *v16 == 13 ) v13 = v16[1] == 10; v16 += v13 + 1; ++v14; v15 = (int)v16; } ++v16; } return js_parse_error( a1, (long long)"%s in JSON at position %d (line %d column %d)", a3, (unsigned int)a2 - (unsigned int)a1[13], v14, (unsigned int)((_DWORD)v16 - v15 + 1), a4, a5, a6, a7, a8, a9, a10, a11, v12); }
json_parse_error: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RCX + 0x68] SUB RAX,RCX MOV dword ptr [RSP + 0xc],EAX MOV dword ptr [RSP + 0x8],0x1 MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10],RAX LAB_0018cd23: MOV RAX,qword ptr [RSP + 0x18] CMP RAX,qword ptr [RSP + 0x28] JNC 0x0018cdb9 MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xd JZ 0x0018cd4d MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xa JNZ 0x0018cda4 LAB_0018cd4d: MOV RAX,qword ptr [RSP + 0x18] MOVZX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0xd MOV byte ptr [RSP + 0x7],AL JNZ 0x0018cd73 MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa SETZ AL MOV byte ptr [RSP + 0x7],AL LAB_0018cd73: MOV AL,byte ptr [RSP + 0x7] AND AL,0x1 MOVZX ECX,AL ADD ECX,0x1 MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RSP + 0x18],RAX MOV EAX,dword ptr [RSP + 0x8] ADD EAX,0x1 MOV dword ptr [RSP + 0x8],EAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x10],RAX LAB_0018cda4: JMP 0x0018cda6 LAB_0018cda6: MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x1 MOV qword ptr [RSP + 0x18],RAX JMP 0x0018cd23 LAB_0018cdb9: MOV RDI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RSP + 0xc] MOV R8D,dword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x10] SUB RAX,RSI MOV R9D,EAX ADD R9D,0x1 LEA RSI,[0x214fac] MOV AL,0x0 CALL 0x0014e980 ADD RSP,0x38 RET
void json_parse_error(long param_1,char *param_2,int8 param_3) { bool local_31; int local_30; char *local_28; char *local_20; local_30 = 1; local_28 = *(char **)(param_1 + 0x68); for (local_20 = local_28; local_20 < param_2; local_20 = local_20 + 1) { if ((*local_20 == '\r') || (*local_20 == '\n')) { local_31 = false; if (*local_20 == '\r') { local_31 = local_20[1] == '\n'; } local_28 = local_20 + (int)(local_31 + 1); local_30 = local_30 + 1; local_20 = local_28; } } js_parse_error(param_1,"%s in JSON at position %d (line %d column %d)",param_3, (int)param_2 - (int)*(int8 *)(param_1 + 0x68),local_30, ((int)local_20 - (int)local_28) + 1); return; }
13,406
json_parse_error
bluesky950520[P]quickjs/quickjs.c
static int json_parse_error(JSParseState *s, const uint8_t *curp, const char *msg) { const uint8_t *p, *line_start; int position = curp - s->buf_start; int line = 1; for (line_start = p = s->buf_start; p < curp; p++) { /* column count does not account for TABs nor wide characters */ if (*p == '\r' || *p == '\n') { p += 1 + (p[0] == '\r' && p[1] == '\n'); line++; line_start = p; } } return js_parse_error(s, "%s in JSON at position %d (line %d column %d)", msg, position, line, (int)(p - line_start) + 1); }
O1
c
json_parse_error: movq %rsi, %rcx movq 0x68(%rdi), %rax movl $0x1, %r8d movq %rax, %rsi movq %rax, %r9 cmpq %rcx, %rax jae 0x50e0d movq %rax, %r9 movq %rax, %rsi movzbl (%r9), %r10d cmpl $0xa, %r10d je 0x50df7 cmpl $0xd, %r10d jne 0x50e05 xorl %esi, %esi cmpb $0xa, 0x1(%r9) sete %sil incq %rsi jmp 0x50dfc movl $0x1, %esi addq %rsi, %r9 incl %r8d movq %r9, %rsi incq %r9 cmpq %rcx, %r9 jb 0x50dd7 subl %eax, %ecx subl %esi, %r9d incl %r9d leaq 0x531a4(%rip), %rsi # 0xa3fc0 xorl %eax, %eax jmp 0x33d45
json_parse_error: mov rcx, rsi mov rax, [rdi+68h] mov r8d, 1 mov rsi, rax mov r9, rax cmp rax, rcx jnb short loc_50E0D mov r9, rax mov rsi, rax loc_50DD7: movzx r10d, byte ptr [r9] cmp r10d, 0Ah jz short loc_50DF7 cmp r10d, 0Dh jnz short loc_50E05 xor esi, esi cmp byte ptr [r9+1], 0Ah setz sil inc rsi jmp short loc_50DFC loc_50DF7: mov esi, 1 loc_50DFC: add r9, rsi inc r8d mov rsi, r9 loc_50E05: inc r9 cmp r9, rcx jb short loc_50DD7 loc_50E0D: sub ecx, eax sub r9d, esi inc r9d lea rsi, aSInJsonAtPosit; "%s in JSON at position %d (line %d colu"... xor eax, eax jmp js_parse_error
long long json_parse_error( long long *a1, unsigned long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14, char a15) { unsigned long long v16; // rax long long v17; // r8 int v18; // esi unsigned __int8 *v19; // r9 int v20; // r10d long long v21; // rsi v16 = a1[13]; v17 = 1LL; v18 = v16; LODWORD(v19) = v16; if ( v16 < a2 ) { v19 = (unsigned __int8 *)a1[13]; v18 = (int)v19; while ( 1 ) { v20 = *v19; if ( v20 == 10 ) break; if ( v20 == 13 ) { v21 = (v19[1] == 10) + 1LL; LABEL_7: v19 += v21; v17 = (unsigned int)(v17 + 1); v18 = (int)v19; } if ( (unsigned long long)++v19 >= a2 ) return js_parse_error( a1, (long long)"%s in JSON at position %d (line %d column %d)", a3, (unsigned int)(a2 - v16), v17, (unsigned int)((_DWORD)v19 - v18 + 1), a4, a5, a6, a7, a8, a9, a10, a11, a15); } v21 = 1LL; goto LABEL_7; } return js_parse_error( a1, (long long)"%s in JSON at position %d (line %d column %d)", a3, (unsigned int)(a2 - v16), v17, (unsigned int)((_DWORD)v19 - v18 + 1), a4, a5, a6, a7, a8, a9, a10, a11, a15); }
json_parse_error: MOV RCX,RSI MOV RAX,qword ptr [RDI + 0x68] MOV R8D,0x1 MOV RSI,RAX MOV R9,RAX CMP RAX,RCX JNC 0x00150e0d MOV R9,RAX MOV RSI,RAX LAB_00150dd7: MOVZX R10D,byte ptr [R9] CMP R10D,0xa JZ 0x00150df7 CMP R10D,0xd JNZ 0x00150e05 XOR ESI,ESI CMP byte ptr [R9 + 0x1],0xa SETZ SIL INC RSI JMP 0x00150dfc LAB_00150df7: MOV ESI,0x1 LAB_00150dfc: ADD R9,RSI INC R8D MOV RSI,R9 LAB_00150e05: INC R9 CMP R9,RCX JC 0x00150dd7 LAB_00150e0d: SUB ECX,EAX SUB R9D,ESI INC R9D LEA RSI,[0x1a3fc0] XOR EAX,EAX JMP 0x00133d45
void json_parse_error(long param_1,char *param_2,int8 param_3) { char *pcVar1; long lVar2; int iVar3; char *pcVar4; char *pcVar5; pcVar1 = *(char **)(param_1 + 0x68); iVar3 = 1; pcVar5 = pcVar1; pcVar4 = pcVar1; do { if (param_2 <= pcVar5) { js_parse_error(param_1,"%s in JSON at position %d (line %d column %d)",param_3, (int)param_2 - (int)pcVar1,iVar3,((int)pcVar5 - (int)pcVar4) + 1); return; } if (*pcVar5 == '\n') { lVar2 = 1; LAB_00150dfc: pcVar4 = pcVar5 + lVar2; iVar3 = iVar3 + 1; pcVar5 = pcVar4; } else if (*pcVar5 == '\r') { lVar2 = (ulong)(pcVar5[1] == '\n') + 1; goto LAB_00150dfc; } pcVar5 = pcVar5 + 1; } while( true ); }
13,407
json_parse_error
bluesky950520[P]quickjs/quickjs.c
static int json_parse_error(JSParseState *s, const uint8_t *curp, const char *msg) { const uint8_t *p, *line_start; int position = curp - s->buf_start; int line = 1; for (line_start = p = s->buf_start; p < curp; p++) { /* column count does not account for TABs nor wide characters */ if (*p == '\r' || *p == '\n') { p += 1 + (p[0] == '\r' && p[1] == '\n'); line++; line_start = p; } } return js_parse_error(s, "%s in JSON at position %d (line %d column %d)", msg, position, line, (int)(p - line_start) + 1); }
O2
c
json_parse_error: pushq %rbx movq %rsi, %rcx movq 0x68(%rdi), %rax movl $0x1, %r8d movabsq $0x1, %rsi movq %rax, %r10 movq %rax, %r9 cmpq %rcx, %r9 jae 0x45a7d movzbl (%r9), %ebx movq %rsi, %r11 cmpl $0xa, %ebx je 0x45a6f cmpl $0xd, %ebx jne 0x45a78 xorl %r11d, %r11d cmpb $0xa, 0x1(%r9) sete %r11b incq %r11 addq %r11, %r9 incl %r8d movq %r9, %r10 incq %r9 jmp 0x45a4a subl %eax, %ecx subl %r10d, %r9d incl %r9d leaq 0x44484(%rip), %rsi # 0x89f10 xorl %eax, %eax popq %rbx jmp 0x2c007
json_parse_error: push rbx mov rcx, rsi mov rax, [rdi+68h] mov r8d, 1 mov rsi, 1 mov r10, rax mov r9, rax loc_45A4A: cmp r9, rcx jnb short loc_45A7D movzx ebx, byte ptr [r9] mov r11, rsi cmp ebx, 0Ah jz short loc_45A6F cmp ebx, 0Dh jnz short loc_45A78 xor r11d, r11d cmp byte ptr [r9+1], 0Ah setz r11b inc r11 loc_45A6F: add r9, r11 inc r8d mov r10, r9 loc_45A78: inc r9 jmp short loc_45A4A loc_45A7D: sub ecx, eax sub r9d, r10d inc r9d lea rsi, aSInJsonAtPosit; "%s in JSON at position %d (line %d colu"... xor eax, eax pop rbx jmp js_parse_error
long long json_parse_error( long long *a1, unsigned long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14, char a15) { unsigned __int8 *v15; // rax long long v16; // r8 int v17; // r10d unsigned __int8 *i; // r9 int v19; // ebx long long v20; // r11 v15 = (unsigned __int8 *)a1[13]; v16 = 1LL; v17 = (int)v15; for ( i = v15; (unsigned long long)i < a2; ++i ) { v19 = *i; v20 = 1LL; if ( v19 != 10 ) { if ( v19 != 13 ) continue; v20 = (i[1] == 10) + 1LL; } i += v20; v16 = (unsigned int)(v16 + 1); v17 = (int)i; } return js_parse_error( a1, (long long)"%s in JSON at position %d (line %d column %d)", a3, (unsigned int)(a2 - (_DWORD)v15), v16, (unsigned int)((_DWORD)i - v17 + 1), a4, a5, a6, a7, a8, a9, a10, a11, a15); }
json_parse_error: PUSH RBX MOV RCX,RSI MOV RAX,qword ptr [RDI + 0x68] MOV R8D,0x1 MOV RSI,0x1 MOV R10,RAX MOV R9,RAX LAB_00145a4a: CMP R9,RCX JNC 0x00145a7d MOVZX EBX,byte ptr [R9] MOV R11,RSI CMP EBX,0xa JZ 0x00145a6f CMP EBX,0xd JNZ 0x00145a78 XOR R11D,R11D CMP byte ptr [R9 + 0x1],0xa SETZ R11B INC R11 LAB_00145a6f: ADD R9,R11 INC R8D MOV R10,R9 LAB_00145a78: INC R9 JMP 0x00145a4a LAB_00145a7d: SUB ECX,EAX SUB R9D,R10D INC R9D LEA RSI,[0x189f10] XOR EAX,EAX POP RBX JMP 0x0012c007
void json_parse_error(long param_1,char *param_2,int8 param_3) { char *pcVar1; int iVar2; char *pcVar3; char *pcVar4; long lVar5; pcVar1 = *(char **)(param_1 + 0x68); iVar2 = 1; pcVar3 = pcVar1; pcVar4 = pcVar1; do { if (param_2 <= pcVar3) { js_parse_error(param_1,"%s in JSON at position %d (line %d column %d)",param_3, (int)param_2 - (int)pcVar1,iVar2,((int)pcVar3 - (int)pcVar4) + 1); return; } lVar5 = 1; if (*pcVar3 == '\n') { LAB_00145a6f: pcVar3 = pcVar3 + lVar5; iVar2 = iVar2 + 1; pcVar4 = pcVar3; } else if (*pcVar3 == '\r') { lVar5 = (ulong)(pcVar3[1] == '\n') + 1; goto LAB_00145a6f; } pcVar3 = pcVar3 + 1; } while( true ); }
13,408
ImPlot::PushStyleVar(int, int)
zkingston[P]unknot/build_O0/_deps/implot-src/implot.cpp
void PushStyleVar(ImPlotStyleVar idx, int val) { ImPlotContext& gp = *GImPlot; const ImPlotStyleVarInfo* var_info = GetPlotStyleVarInfo(idx); if (var_info->Type == ImGuiDataType_S32 && var_info->Count == 1) { int* pvar = (int*)var_info->GetVarPtr(&gp.Style); gp.StyleModifiers.push_back(ImGuiStyleMod((ImGuiStyleVar)idx, *pvar)); *pvar = val; return; } else if (var_info->Type == ImGuiDataType_Float && var_info->Count == 1) { float* pvar = (float*)var_info->GetVarPtr(&gp.Style); gp.StyleModifiers.push_back(ImGuiStyleMod((ImGuiStyleVar)idx, *pvar)); *pvar = (float)val; return; } IM_ASSERT(0 && "Called PushStyleVar() int variant but variable is not a int!"); }
O0
cpp
ImPlot::PushStyleVar(int, int): subq $0x58, %rsp movl %edi, 0x54(%rsp) movl %esi, 0x50(%rsp) movq 0x4b68fd(%rip), %rax # 0x68f640 movq %rax, 0x48(%rsp) movl 0x54(%rsp), %edi callq 0x1d8d10 movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rax cmpl $0x4, (%rax) jne 0x1d8dc7 movq 0x40(%rsp), %rax cmpl $0x1, 0x4(%rax) jne 0x1d8dc7 movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi addq $0x104, %rsi # imm = 0x104 callq 0x1e2c40 movq %rax, 0x38(%rsp) movq 0x48(%rsp), %rax addq $0x318, %rax # imm = 0x318 movq %rax, 0x8(%rsp) movl 0x54(%rsp), %esi movq 0x38(%rsp), %rax movl (%rax), %edx leaq 0x2c(%rsp), %rdi callq 0xd9c20 movq 0x8(%rsp), %rdi leaq 0x2c(%rsp), %rsi callq 0xd9b80 movl 0x50(%rsp), %ecx movq 0x38(%rsp), %rax movl %ecx, (%rax) jmp 0x1d8e3e movq 0x40(%rsp), %rax cmpl $0x8, (%rax) jne 0x1d8e3c movq 0x40(%rsp), %rax cmpl $0x1, 0x4(%rax) jne 0x1d8e3c movq 0x40(%rsp), %rdi movq 0x48(%rsp), %rsi addq $0x104, %rsi # imm = 0x104 callq 0x1e2c40 movq %rax, 0x20(%rsp) movq 0x48(%rsp), %rax addq $0x318, %rax # imm = 0x318 movq %rax, (%rsp) movl 0x54(%rsp), %esi movq 0x20(%rsp), %rax movss (%rax), %xmm0 leaq 0x14(%rsp), %rdi callq 0xd9bf0 movq (%rsp), %rdi leaq 0x14(%rsp), %rsi callq 0xd9b80 cvtsi2ssl 0x50(%rsp), %xmm0 movq 0x20(%rsp), %rax movss %xmm0, (%rax) jmp 0x1d8e3e jmp 0x1d8e3e addq $0x58, %rsp retq nopw %cs:(%rax,%rax)
_ZN6ImPlot12PushStyleVarEii: sub rsp, 58h mov [rsp+58h+var_4], edi mov [rsp+58h+var_8], esi mov rax, cs:GImPlot mov [rsp+58h+var_10], rax mov edi, [rsp+58h+var_4]; this call _ZN6ImPlotL19GetPlotStyleVarInfoEi; ImPlot::GetPlotStyleVarInfo(int) mov [rsp+58h+var_18], rax mov rax, [rsp+58h+var_18] cmp dword ptr [rax], 4 jnz short loc_1D8DC7 mov rax, [rsp+58h+var_18] cmp dword ptr [rax+4], 1 jnz short loc_1D8DC7 mov rdi, [rsp+58h+var_18] mov rsi, [rsp+58h+var_10] add rsi, 104h call _ZNK6ImPlot18ImPlotStyleVarInfo9GetVarPtrEP11ImPlotStyle; ImPlot::ImPlotStyleVarInfo::GetVarPtr(ImPlotStyle *) mov [rsp+58h+var_20], rax mov rax, [rsp+58h+var_10] add rax, 318h mov [rsp+58h+var_50], rax mov esi, [rsp+58h+var_4]; int mov rax, [rsp+58h+var_20] mov edx, [rax]; int lea rdi, [rsp+58h+var_2C]; this call _ZN13ImGuiStyleModC2Eii; ImGuiStyleMod::ImGuiStyleMod(int,int) mov rdi, [rsp+58h+var_50] lea rsi, [rsp+58h+var_2C] call _ZN8ImVectorI13ImGuiStyleModE9push_backERKS0_; ImVector<ImGuiStyleMod>::push_back(ImGuiStyleMod const&) mov ecx, [rsp+58h+var_8] mov rax, [rsp+58h+var_20] mov [rax], ecx jmp short loc_1D8E3E loc_1D8DC7: mov rax, [rsp+58h+var_18] cmp dword ptr [rax], 8 jnz short loc_1D8E3C mov rax, [rsp+58h+var_18] cmp dword ptr [rax+4], 1 jnz short loc_1D8E3C mov rdi, [rsp+58h+var_18] mov rsi, [rsp+58h+var_10] add rsi, 104h call _ZNK6ImPlot18ImPlotStyleVarInfo9GetVarPtrEP11ImPlotStyle; ImPlot::ImPlotStyleVarInfo::GetVarPtr(ImPlotStyle *) mov [rsp+58h+var_38], rax mov rax, [rsp+58h+var_10] add rax, 318h mov [rsp+58h+var_58], rax mov esi, [rsp+58h+var_4]; int mov rax, [rsp+58h+var_38] movss xmm0, dword ptr [rax]; float lea rdi, [rsp+58h+var_44]; this call _ZN13ImGuiStyleModC2Eif; ImGuiStyleMod::ImGuiStyleMod(int,float) mov rdi, [rsp+58h+var_58] lea rsi, [rsp+58h+var_44] call _ZN8ImVectorI13ImGuiStyleModE9push_backERKS0_; ImVector<ImGuiStyleMod>::push_back(ImGuiStyleMod const&) cvtsi2ss xmm0, [rsp+58h+var_8] mov rax, [rsp+58h+var_38] movss dword ptr [rax], xmm0 jmp short loc_1D8E3E loc_1D8E3C: jmp short $+2 loc_1D8E3E: add rsp, 58h retn
ImPlot::ImPlotStyleVarInfo * ImPlot::PushStyleVar(ImPlot *this, int a2) { ImPlot::ImPlotStyleVarInfo *result; // rax int *v3; // [rsp+0h] [rbp-58h] int *v4; // [rsp+8h] [rbp-50h] _BYTE v5[12]; // [rsp+14h] [rbp-44h] BYREF float *v6; // [rsp+20h] [rbp-38h] _BYTE v7[12]; // [rsp+2Ch] [rbp-2Ch] BYREF int *VarPtr; // [rsp+38h] [rbp-20h] ImPlot::ImPlotStyleVarInfo *PlotStyleVarInfo; // [rsp+40h] [rbp-18h] ImPlot *v10; // [rsp+48h] [rbp-10h] int v11; // [rsp+50h] [rbp-8h] int v12; // [rsp+54h] [rbp-4h] v12 = (int)this; v11 = a2; v10 = GImPlot; PlotStyleVarInfo = (ImPlot::ImPlotStyleVarInfo *)ImPlot::GetPlotStyleVarInfo((ImPlot *)(unsigned int)this); if ( *(_QWORD *)PlotStyleVarInfo == 0x100000004LL ) { VarPtr = (int *)ImPlot::ImPlotStyleVarInfo::GetVarPtr(PlotStyleVarInfo, (ImPlot *)((char *)v10 + 260)); v4 = (int *)((char *)v10 + 792); ImGuiStyleMod::ImGuiStyleMod((ImGuiStyleMod *)v7, v12, *VarPtr); ImVector<ImGuiStyleMod>::push_back(v4, (long long)v7); result = (ImPlot::ImPlotStyleVarInfo *)VarPtr; *VarPtr = v11; } else { result = PlotStyleVarInfo; if ( *(_DWORD *)PlotStyleVarInfo == 8 ) { result = PlotStyleVarInfo; if ( *((_DWORD *)PlotStyleVarInfo + 1) == 1 ) { v6 = (float *)ImPlot::ImPlotStyleVarInfo::GetVarPtr(PlotStyleVarInfo, (ImPlot *)((char *)v10 + 260)); v3 = (int *)((char *)v10 + 792); ImGuiStyleMod::ImGuiStyleMod((ImGuiStyleMod *)v5, v12, *v6); ImVector<ImGuiStyleMod>::push_back(v3, (long long)v5); result = (ImPlot::ImPlotStyleVarInfo *)v6; *v6 = (float)v11; } } } return result; }
AddTick: SUB RSP,0xb8 MOV AL,DL MOV DL,SIL MOV qword ptr [RSP + 0xb0],RDI MOVSD qword ptr [RSP + 0xa8],XMM0 AND DL,0x1 MOV byte ptr [RSP + 0xa7],DL AND AL,0x1 MOV byte ptr [RSP + 0xa6],AL MOV qword ptr [RSP + 0x98],RCX MOV qword ptr [RSP + 0x90],R8 MOV RAX,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x28],RAX MOVSD XMM0,qword ptr [RSP + 0xa8] MOV CL,byte ptr [RSP + 0xa7] MOV AL,byte ptr [RSP + 0xa6] LEA RDI,[RSP + 0x78] AND CL,0x1 AND AL,0x1 MOVZX ESI,CL MOVZX EDX,AL CALL 0x001dacb0 TEST byte ptr [RSP + 0xa6],0x1 JZ 0x001d8e5d CMP qword ptr [RSP + 0x98],0x0 JZ 0x001d8e5d MOV RDI,qword ptr [RSP + 0x28] ADD RDI,0x10 MOV qword ptr [RSP + 0x18],RDI CALL 0x001dad20 MOV dword ptr [RSP + 0x88],EAX MOV RAX,qword ptr [RSP + 0x98] MOVSS XMM0,dword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x90] LEA RDI,[RSP + 0x50] MOV qword ptr [RSP + 0x20],RDI MOV ESI,0x20 CALL RAX MOV RDI,qword ptr [RSP + 0x20] CALL 0x00112520 MOV RDI,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x20] LEA RDX,[RSP + RAX*0x1 + 0x51] CALL 0x005f5670 MOV RAX,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RAX + 0x18] MOVSXD RAX,dword ptr [RSP + 0x88] ADD RDI,RAX XOR EDX,EDX MOV ESI,EDX MOVSS XMM0,dword ptr [0x006cc00c] CALL 0x005f86c0 MOVLPD qword ptr [RSP + 0x48],XMM0 MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0x80],RAX LAB_001d8e5d: MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x40],RAX LEA RAX,[RSP + 0x30] 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 0x001dad60 ADD RSP,0xb8 RET
/* ImPlot3DTicker::AddTick(double, bool, bool, int (*)(float, char*, int, void*), void*) */ void __thiscall ImPlot3DTicker::AddTick (ImPlot3DTicker *this,double param_1,bool param_2,bool param_3, _func_int_float_char_ptr_int_void_ptr *param_4,void *param_5) { size_t sVar1; char local_68; char acStack_67 [39]; float local_40 [2]; int8 local_38; int local_30; void *local_28; _func_int_float_char_ptr_int_void_ptr *local_20; byte local_12; int1 local_11; double local_10; ImPlot3DTicker *local_8; local_28 = param_5; local_20 = param_4; local_12 = param_3; local_11 = param_2; local_10 = param_1; local_8 = this; ImPlot3DTick::ImPlot3DTick((ImPlot3DTick *)local_40,param_1,param_2,param_3); if (((local_12 & 1) != 0) && (local_20 != (_func_int_float_char_ptr_int_void_ptr *)0x0)) { local_30 = ImGuiTextBuffer::size((ImGuiTextBuffer *)(this + 0x10)); (*local_20)(local_40[0],&local_68,0x20,local_28); sVar1 = strlen(&local_68); ImGuiTextBuffer::append((ImGuiTextBuffer *)(this + 0x10),&local_68,acStack_67 + sVar1); local_38 = ImGui::CalcTextSize((char *)(*(long *)(this + 0x18) + (long)local_30),(char *)0x0, false,DAT_006cc00c); } AddTick(this); return; }
13,409
OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::AddPatchFace(int, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp
void PatchTableBuilder::LegacyGregoryHelper::AddPatchFace(int level, Index face) { if (_refiner.getLevel(level).getFaceCompositeVTag(face)._boundary) { _boundaryFaceIndices.push_back(face); } else { _interiorFaceIndices.push_back(face); } }
O2
cpp
OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::AddPatchFace(int, int): pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x4(%rsp), %r14 movl %edx, (%r14) movq (%rdi), %rax movslq %esi, %rcx movq 0x30(%rax), %rax movq (%rax,%rcx,8), %rdi pushq $-0x1 popq %rax movl %edx, %esi movl %eax, %edx callq 0x52510 leaq 0x20(%rbx), %rcx addq $0x8, %rbx testb $0x4, %al cmovneq %rcx, %rbx movq %rbx, %rdi movq %r14, %rsi callq 0x4f610 addq $0x8, %rsp popq %rbx popq %r14 retq
_ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder19LegacyGregoryHelper12AddPatchFaceEii: push r14 push rbx push rax mov rbx, rdi lea r14, [rsp+18h+var_14] mov [r14], edx mov rax, [rdi] movsxd rcx, esi mov rax, [rax+30h] mov rdi, [rax+rcx*8]; this push 0FFFFFFFFFFFFFFFFh pop rax mov esi, edx; int mov edx, eax; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level20getFaceCompositeVTagEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag(int,int) lea rcx, [rbx+20h] add rbx, 8 test al, 4 cmovnz rbx, rcx mov rdi, rbx mov rsi, r14 call __ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) add rsp, 8 pop rbx pop r14 retn
long long OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::AddPatchFace( OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper *this, int a2, int a3) { char *v3; // rbx int v5[5]; // [rsp+0h] [rbp-14h] BYREF v5[0] = a3; v3 = (char *)this + 8; if ( (OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag( *(OpenSubdiv::v3_6_0::Vtr::internal::Level **)(*(_QWORD *)(*(_QWORD *)this + 48LL) + 8LL * a2), a3, -1) & 4) != 0 ) v3 = (char *)this + 32; return std::vector<int>::push_back(v3, v5); }
AddPatchFace: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI LEA R14,[RSP + 0x4] MOV dword ptr [R14],EDX MOV RAX,qword ptr [RDI] MOVSXD RCX,ESI MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RAX + RCX*0x8] PUSH -0x1 POP RAX MOV ESI,EDX MOV EDX,EAX CALL 0x00152510 LEA RCX,[RBX + 0x20] ADD RBX,0x8 TEST AL,0x4 CMOVNZ RBX,RCX MOV RDI,RBX MOV RSI,R14 CALL 0x0014f610 ADD RSP,0x8 POP RBX POP R14 RET
/* OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::AddPatchFace(int, int) */ void __thiscall OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::AddPatchFace (LegacyGregoryHelper *this,int param_1,int param_2) { ulong uVar1; vector<int,std::allocator<int>> *this_00; int local_14; uVar1 = Vtr::internal::Level::getFaceCompositeVTag (*(Level **)(*(long *)(*(long *)this + 0x30) + (long)param_1 * 8),param_2,-1); this_00 = (vector<int,std::allocator<int>> *)(this + 8); if ((uVar1 & 4) != 0) { this_00 = (vector<int,std::allocator<int>> *)(this + 0x20); } std::vector<int,std::allocator<int>>::push_back(this_00,&local_14); return; }
13,410
OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::AddPatchFace(int, int)
NVIDIA-RTX[P]OSD-Lite/opensubdiv/far/patchTableFactory.cpp
void PatchTableBuilder::LegacyGregoryHelper::AddPatchFace(int level, Index face) { if (_refiner.getLevel(level).getFaceCompositeVTag(face)._boundary) { _boundaryFaceIndices.push_back(face); } else { _interiorFaceIndices.push_back(face); } }
O3
cpp
OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::AddPatchFace(int, int): pushq %rbp pushq %rbx pushq %rax movl %edx, %ebp movq %rdi, %rbx movl %edx, 0x4(%rsp) movq (%rdi), %rax movslq %esi, %rcx movq 0x30(%rax), %rax movq (%rax,%rcx,8), %rdi movl %edx, %esi movl $0xffffffff, %edx # imm = 0xFFFFFFFF callq 0x3a0d0 testb $0x4, %al jne 0x6f80c movq 0x10(%rbx), %rsi cmpq 0x18(%rbx), %rsi je 0x6f822 movl %ebp, (%rsi) addq $0x4, %rsi movq %rsi, 0x10(%rbx) jmp 0x6f839 movq 0x28(%rbx), %rsi cmpq 0x30(%rbx), %rsi je 0x6f828 movl %ebp, (%rsi) addq $0x4, %rsi movq %rsi, 0x28(%rbx) jmp 0x6f839 addq $0x8, %rbx jmp 0x6f82c addq $0x20, %rbx leaq 0x4(%rsp), %rdx movq %rbx, %rdi callq 0x38ba0 addq $0x8, %rsp popq %rbx popq %rbp retq
_ZN10OpenSubdiv6v3_6_03Far17PatchTableBuilder19LegacyGregoryHelper12AddPatchFaceEii: push rbp push rbx push rax mov ebp, edx mov rbx, rdi mov [rsp+18h+var_14], edx mov rax, [rdi] movsxd rcx, esi mov rax, [rax+30h] mov rdi, [rax+rcx*8]; this mov esi, edx; int mov edx, 0FFFFFFFFh; int call __ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level20getFaceCompositeVTagEii; OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag(int,int) test al, 4 jnz short loc_6F80C mov rsi, [rbx+10h] cmp rsi, [rbx+18h] jz short loc_6F822 mov [rsi], ebp add rsi, 4 mov [rbx+10h], rsi jmp short loc_6F839 loc_6F80C: mov rsi, [rbx+28h] cmp rsi, [rbx+30h] jz short loc_6F828 mov [rsi], ebp add rsi, 4 mov [rbx+28h], rsi jmp short loc_6F839 loc_6F822: add rbx, 8 jmp short loc_6F82C loc_6F828: add rbx, 20h ; ' ' loc_6F82C: lea rdx, [rsp+18h+var_14] mov rdi, rbx call __ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&) loc_6F839: add rsp, 8 pop rbx pop rbp retn
long long OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::AddPatchFace( int **this, int a2, int a3) { long long result; // rax int *v5; // rsi char *v6; // rbx int v7[5]; // [rsp+0h] [rbp-14h] BYREF v7[0] = a3; result = OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag( *(OpenSubdiv::v3_6_0::Vtr::internal::Level **)(*((_QWORD *)*this + 6) + 8LL * a2), a3, -1); if ( (result & 4) != 0 ) { v5 = this[5]; if ( v5 != this[6] ) { *v5 = a3; this[5] = v5 + 1; return result; } v6 = (char *)(this + 4); } else { v5 = this[2]; if ( v5 != this[3] ) { *v5 = a3; this[2] = v5 + 1; return result; } v6 = (char *)(this + 1); } return std::vector<int>::_M_realloc_insert<int const&>(v6, v5, v7); }
AddPatchFace: PUSH RBP PUSH RBX PUSH RAX MOV EBP,EDX MOV RBX,RDI MOV dword ptr [RSP + 0x4],EDX MOV RAX,qword ptr [RDI] MOVSXD RCX,ESI MOV RAX,qword ptr [RAX + 0x30] MOV RDI,qword ptr [RAX + RCX*0x8] MOV ESI,EDX MOV EDX,0xffffffff CALL 0x0013a0d0 TEST AL,0x4 JNZ 0x0016f80c MOV RSI,qword ptr [RBX + 0x10] CMP RSI,qword ptr [RBX + 0x18] JZ 0x0016f822 MOV dword ptr [RSI],EBP ADD RSI,0x4 MOV qword ptr [RBX + 0x10],RSI JMP 0x0016f839 LAB_0016f80c: MOV RSI,qword ptr [RBX + 0x28] CMP RSI,qword ptr [RBX + 0x30] JZ 0x0016f828 MOV dword ptr [RSI],EBP ADD RSI,0x4 MOV qword ptr [RBX + 0x28],RSI JMP 0x0016f839 LAB_0016f822: ADD RBX,0x8 JMP 0x0016f82c LAB_0016f828: ADD RBX,0x20 LAB_0016f82c: LEA RDX,[RSP + 0x4] MOV RDI,RBX CALL 0x00138ba0 LAB_0016f839: ADD RSP,0x8 POP RBX POP RBP RET
/* OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::AddPatchFace(int, int) */ void __thiscall OpenSubdiv::v3_6_0::Far::PatchTableBuilder::LegacyGregoryHelper::AddPatchFace (LegacyGregoryHelper *this,int param_1,int param_2) { ulong uVar1; vector<int,std::allocator<int>> *pvVar2; int *piVar3; int1 local_14 [4]; uVar1 = Vtr::internal::Level::getFaceCompositeVTag (*(Level **)(*(long *)(*(long *)this + 0x30) + (long)param_1 * 8),param_2,-1); if ((uVar1 & 4) == 0) { piVar3 = *(int **)(this + 0x10); if (piVar3 != *(int **)(this + 0x18)) { *piVar3 = param_2; *(int **)(this + 0x10) = piVar3 + 1; return; } pvVar2 = (vector<int,std::allocator<int>> *)(this + 8); } else { piVar3 = *(int **)(this + 0x28); if (piVar3 != *(int **)(this + 0x30)) { *piVar3 = param_2; *(int **)(this + 0x28) = piVar3 + 1; return; } pvVar2 = (vector<int,std::allocator<int>> *)(this + 0x20); } std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&>(pvVar2,piVar3,local_14); return; }
13,411
ma_decrement_open_count
eloqsql/storage/maria/ma_locking.c
int _ma_decrement_open_count(MARIA_HA *info, my_bool lock_tables) { uchar buff[2]; register MARIA_SHARE *share= info->s; int lock_error=0,write_error=0; DBUG_ENTER("_ma_decrement_open_count"); if (share->global_changed) { uint old_lock=info->lock_type; share->global_changed=0; lock_error= (my_disable_locking || ! lock_tables ? 0 : maria_lock_database(info, F_WRLCK)); /* Its not fatal even if we couldn't get the lock ! */ if (share->state.open_count > 0) { CRASH_IF_S3_TABLE(share); share->state.open_count--; share->changed= 1; /* We have to update state */ /* For temporary tables that will just be deleted, we don't have to decrement state. For transactional tables the state will be updated in maria_close(). */ if (!share->temporary && !share->now_transactional) { mi_int2store(buff,share->state.open_count); write_error= (int) my_pwrite(share->kfile.file, buff, sizeof(buff), sizeof(share->state.header) + MARIA_FILE_OPEN_COUNT_OFFSET, MYF(MY_NABP)); } } if (!lock_error && !my_disable_locking && lock_tables) lock_error=maria_lock_database(info,old_lock); } DBUG_RETURN(MY_TEST(lock_error || write_error)); }
O0
c
ma_decrement_open_count: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movb %sil, %al movq %rdi, -0x8(%rbp) movb %al, -0x9(%rbp) movq -0x8(%rbp), %rax movq (%rax), %rax movq %rax, -0x18(%rbp) movl $0x0, -0x1c(%rbp) movl $0x0, -0x20(%rbp) movq -0x18(%rbp), %rax cmpb $0x0, 0x7df(%rax) je 0x49254 movq -0x8(%rbp), %rax movl 0x664(%rax), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rax movb $0x0, 0x7df(%rax) leaq 0xc39dfd(%rip), %rax # 0xc82f68 movsbl (%rax), %eax cmpl $0x0, %eax jne 0x49179 cmpb $0x0, -0x9(%rbp) jne 0x49180 xorl %eax, %eax movl %eax, -0x2c(%rbp) jmp 0x49191 movq -0x8(%rbp), %rdi movl $0x1, %esi callq 0x48580 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x1c(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, 0x16c(%rax) jbe 0x49228 jmp 0x491aa jmp 0x491ac movq -0x18(%rbp), %rax movl 0x16c(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x16c(%rax) movq -0x18(%rbp), %rax movb $0x1, 0x7de(%rax) movq -0x18(%rbp), %rax cmpb $0x0, 0x7d9(%rax) jne 0x49226 movq -0x18(%rbp), %rax cmpb $0x0, 0x7e7(%rax) jne 0x49226 movq -0x18(%rbp), %rax movl 0x16c(%rax), %eax movl %eax, -0x28(%rbp) movl -0x28(%rbp), %eax movb %al, -0xa(%rbp) movl -0x28(%rbp), %eax shrl $0x8, %eax movb %al, -0xb(%rbp) movq -0x18(%rbp), %rax movl 0x760(%rax), %edi leaq -0xb(%rbp), %rsi movl $0x2, %edx movl $0x18, %ecx movl $0x4, %r8d callq 0xf4850 movl %eax, -0x20(%rbp) jmp 0x49228 cmpl $0x0, -0x1c(%rbp) jne 0x49252 leaq 0xc39d33(%rip), %rax # 0xc82f68 cmpb $0x0, (%rax) jne 0x49252 movsbl -0x9(%rbp), %eax cmpl $0x0, %eax je 0x49252 movq -0x8(%rbp), %rdi movl -0x24(%rbp), %esi callq 0x48580 movl %eax, -0x1c(%rbp) jmp 0x49254 jmp 0x49256 movb $0x1, %al cmpl $0x0, -0x1c(%rbp) movb %al, -0x2d(%rbp) jne 0x4926b cmpl $0x0, -0x20(%rbp) setne %al movb %al, -0x2d(%rbp) movb -0x2d(%rbp), %dl xorl %eax, %eax movl $0x1, %ecx testb $0x1, %dl cmovnel %ecx, %eax movl %eax, -0x34(%rbp) movl -0x34(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw (%rax,%rax)
_ma_decrement_open_count: push rbp mov rbp, rsp sub rsp, 40h mov al, sil mov [rbp+var_8], rdi mov [rbp+var_9], al mov rax, [rbp+var_8] mov rax, [rax] mov [rbp+var_18], rax mov [rbp+var_1C], 0 mov [rbp+var_20], 0 mov rax, [rbp+var_18] cmp byte ptr [rax+7DFh], 0 jz loc_49254 mov rax, [rbp+var_8] mov eax, [rax+664h] mov [rbp+var_24], eax mov rax, [rbp+var_18] mov byte ptr [rax+7DFh], 0 lea rax, my_disable_locking movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_49179 cmp [rbp+var_9], 0 jnz short loc_49180 loc_49179: xor eax, eax mov [rbp+var_2C], eax jmp short loc_49191 loc_49180: mov rdi, [rbp+var_8] mov esi, 1 call maria_lock_database mov [rbp+var_2C], eax loc_49191: mov eax, [rbp+var_2C] mov [rbp+var_1C], eax mov rax, [rbp+var_18] cmp dword ptr [rax+16Ch], 0 jbe loc_49228 jmp short $+2 loc_491AA: jmp short $+2 loc_491AC: mov rax, [rbp+var_18] mov ecx, [rax+16Ch] add ecx, 0FFFFFFFFh mov [rax+16Ch], ecx mov rax, [rbp+var_18] mov byte ptr [rax+7DEh], 1 mov rax, [rbp+var_18] cmp byte ptr [rax+7D9h], 0 jnz short loc_49226 mov rax, [rbp+var_18] cmp byte ptr [rax+7E7h], 0 jnz short loc_49226 mov rax, [rbp+var_18] mov eax, [rax+16Ch] mov [rbp+var_28], eax mov eax, [rbp+var_28] mov [rbp+var_A], al mov eax, [rbp+var_28] shr eax, 8 mov [rbp+var_B], al mov rax, [rbp+var_18] mov edi, [rax+760h] lea rsi, [rbp+var_B] mov edx, 2 mov ecx, 18h mov r8d, 4 call my_pwrite mov [rbp+var_20], eax loc_49226: jmp short $+2 loc_49228: cmp [rbp+var_1C], 0 jnz short loc_49252 lea rax, my_disable_locking cmp byte ptr [rax], 0 jnz short loc_49252 movsx eax, [rbp+var_9] cmp eax, 0 jz short loc_49252 mov rdi, [rbp+var_8] mov esi, [rbp+var_24] call maria_lock_database mov [rbp+var_1C], eax loc_49252: jmp short $+2 loc_49254: jmp short $+2 loc_49256: mov al, 1 cmp [rbp+var_1C], 0 mov [rbp+var_2D], al jnz short loc_4926B cmp [rbp+var_20], 0 setnz al mov [rbp+var_2D], al loc_4926B: mov dl, [rbp+var_2D] xor eax, eax mov ecx, 1 test dl, 1 cmovnz eax, ecx mov [rbp+var_34], eax mov eax, [rbp+var_34] add rsp, 40h pop rbp retn
_BOOL8 ma_decrement_open_count(long long a1, char a2) { __int16 v2; // kr00_2 bool v4; // [rsp+13h] [rbp-2Dh] int v5; // [rsp+14h] [rbp-2Ch] int v6; // [rsp+1Ch] [rbp-24h] int v7; // [rsp+20h] [rbp-20h] int v8; // [rsp+24h] [rbp-1Ch] long long v9; // [rsp+28h] [rbp-18h] _BYTE v10[2]; // [rsp+35h] [rbp-Bh] BYREF char v11; // [rsp+37h] [rbp-9h] long long v12; // [rsp+38h] [rbp-8h] v12 = a1; v11 = a2; v9 = *(_QWORD *)a1; v8 = 0; v7 = 0; if ( *(_BYTE *)(*(_QWORD *)a1 + 2015LL) ) { v6 = *(_DWORD *)(v12 + 1636); *(_BYTE *)(v9 + 2015) = 0; if ( !my_disable_locking && v11 ) v5 = maria_lock_database(v12, 1); else v5 = 0; v8 = v5; if ( *(_DWORD *)(v9 + 364) ) { --*(_DWORD *)(v9 + 364); *(_BYTE *)(v9 + 2014) = 1; if ( !*(_BYTE *)(v9 + 2009) && !*(_BYTE *)(v9 + 2023) ) { v2 = *(_DWORD *)(v9 + 364); v10[0] = HIBYTE(v2); v10[1] = v2; v7 = my_pwrite(*(unsigned int *)(v9 + 1888), v10, 2LL, 24LL, 4LL); } } if ( !v5 && !my_disable_locking && v11 ) v8 = maria_lock_database(v12, v6); } v4 = 1; if ( !v8 ) return v7 != 0; return v4; }
_ma_decrement_open_count: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV AL,SIL MOV qword ptr [RBP + -0x8],RDI MOV byte ptr [RBP + -0x9],AL MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x18],RAX MOV dword ptr [RBP + -0x1c],0x0 MOV dword ptr [RBP + -0x20],0x0 MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x7df],0x0 JZ 0x00149254 MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x664] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x7df],0x0 LEA RAX,[0xd82f68] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x00149179 CMP byte ptr [RBP + -0x9],0x0 JNZ 0x00149180 LAB_00149179: XOR EAX,EAX MOV dword ptr [RBP + -0x2c],EAX JMP 0x00149191 LAB_00149180: MOV RDI,qword ptr [RBP + -0x8] MOV ESI,0x1 CALL 0x00148580 MOV dword ptr [RBP + -0x2c],EAX LAB_00149191: MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x1c],EAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX + 0x16c],0x0 JBE 0x00149228 JMP 0x001491aa LAB_001491aa: JMP 0x001491ac LAB_001491ac: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX + 0x16c] ADD ECX,-0x1 MOV dword ptr [RAX + 0x16c],ECX MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x7de],0x1 MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x7d9],0x0 JNZ 0x00149226 MOV RAX,qword ptr [RBP + -0x18] CMP byte ptr [RAX + 0x7e7],0x0 JNZ 0x00149226 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x16c] MOV dword ptr [RBP + -0x28],EAX MOV EAX,dword ptr [RBP + -0x28] MOV byte ptr [RBP + -0xa],AL MOV EAX,dword ptr [RBP + -0x28] SHR EAX,0x8 MOV byte ptr [RBP + -0xb],AL MOV RAX,qword ptr [RBP + -0x18] MOV EDI,dword ptr [RAX + 0x760] LEA RSI,[RBP + -0xb] MOV EDX,0x2 MOV ECX,0x18 MOV R8D,0x4 CALL 0x001f4850 MOV dword ptr [RBP + -0x20],EAX LAB_00149226: JMP 0x00149228 LAB_00149228: CMP dword ptr [RBP + -0x1c],0x0 JNZ 0x00149252 LEA RAX,[0xd82f68] CMP byte ptr [RAX],0x0 JNZ 0x00149252 MOVSX EAX,byte ptr [RBP + -0x9] CMP EAX,0x0 JZ 0x00149252 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0x24] CALL 0x00148580 MOV dword ptr [RBP + -0x1c],EAX LAB_00149252: JMP 0x00149254 LAB_00149254: JMP 0x00149256 LAB_00149256: MOV AL,0x1 CMP dword ptr [RBP + -0x1c],0x0 MOV byte ptr [RBP + -0x2d],AL JNZ 0x0014926b CMP dword ptr [RBP + -0x20],0x0 SETNZ AL MOV byte ptr [RBP + -0x2d],AL LAB_0014926b: MOV DL,byte ptr [RBP + -0x2d] XOR EAX,EAX MOV ECX,0x1 TEST DL,0x1 CMOVNZ EAX,ECX MOV dword ptr [RBP + -0x34],EAX MOV EAX,dword ptr [RBP + -0x34] ADD RSP,0x40 POP RBP RET
bool _ma_decrement_open_count(long *param_1,char param_2) { int4 uVar1; long lVar2; int local_34; int local_28; int local_24; int1 local_13; int1 local_12; char local_11; long *local_10; lVar2 = *param_1; local_24 = 0; local_28 = 0; if (*(char *)(lVar2 + 0x7df) != '\0') { uVar1 = *(int4 *)((long)param_1 + 0x664); *(int1 *)(lVar2 + 0x7df) = 0; local_11 = param_2; local_10 = param_1; if ((my_disable_locking == '\0') && (param_2 != '\0')) { local_34 = maria_lock_database(param_1,1); } else { local_34 = 0; } local_24 = local_34; if (*(int *)(lVar2 + 0x16c) != 0) { *(int *)(lVar2 + 0x16c) = *(int *)(lVar2 + 0x16c) + -1; *(int1 *)(lVar2 + 0x7de) = 1; if ((*(char *)(lVar2 + 0x7d9) == '\0') && (*(char *)(lVar2 + 0x7e7) == '\0')) { local_12 = (int1)*(int4 *)(lVar2 + 0x16c); local_13 = (int1)((uint)*(int4 *)(lVar2 + 0x16c) >> 8); local_28 = my_pwrite(*(int4 *)(lVar2 + 0x760),&local_13,2,0x18,4); } } if (((local_34 == 0) && (my_disable_locking == '\0')) && (local_11 != '\0')) { local_24 = maria_lock_database(local_10,uVar1); } } return local_24 != 0 || local_28 != 0; }
13,412
spdlog::details::registry::initialize_logger(std::shared_ptr<spdlog::logger>)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/details/registry-inl.h
SPDLOG_INLINE void registry::initialize_logger(std::shared_ptr<logger> new_logger) { std::lock_guard<std::mutex> lock(logger_map_mutex_); new_logger->set_formatter(formatter_->clone()); if (err_handler_) { new_logger->set_error_handler(err_handler_); } // set new level according to previously configured level or default level auto it = log_levels_.find(new_logger->name()); auto new_level = it != log_levels_.end() ? it->second : global_log_level_; new_logger->set_level(new_level); new_logger->flush_on(flush_level_); if (backtrace_n_messages_ > 0) { new_logger->enable_backtrace(backtrace_n_messages_); } if (automatic_registration_) { register_logger_(std::move(new_logger)); } }
O0
c
spdlog::details::registry::initialize_logger(std::shared_ptr<spdlog::logger>): subq $0xc8, %rsp movq %rsi, 0x38(%rsp) movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xc0(%rsp), %rsi movq %rsi, 0x40(%rsp) leaq 0xb0(%rsp), %rdi callq 0x389f0 movq 0x38(%rsp), %rdi callq 0x39790 movq 0x40(%rsp), %rdi movq %rax, 0x48(%rsp) addq $0xe8, %rdi callq 0x397a0 movq %rax, %rsi movq (%rsi), %rax movq 0x18(%rax), %rax leaq 0xa8(%rsp), %rdi callq *%rax jmp 0x3368c movq 0x48(%rsp), %rdi leaq 0xa8(%rsp), %rsi callq 0x33910 jmp 0x336a0 leaq 0xa8(%rsp), %rdi callq 0x396e0 movq 0x40(%rsp), %rdi addq $0xf8, %rdi callq 0x397b0 testb $0x1, %al jne 0x336c7 jmp 0x3376d movq 0x38(%rsp), %rdi callq 0x39790 movq 0x40(%rsp), %rsi movq %rax, 0x30(%rsp) addq $0xf8, %rsi leaq 0x78(%rsp), %rdi callq 0x397d0 jmp 0x336ee movq 0x30(%rsp), %rdi leaq 0x78(%rsp), %rsi callq 0x33ac0 jmp 0x336ff leaq 0x78(%rsp), %rdi callq 0x396d0 jmp 0x3376d movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) jmp 0x338e9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) leaq 0xa8(%rsp), %rdi callq 0x396e0 jmp 0x338e9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) leaq 0x78(%rsp), %rdi callq 0x396d0 jmp 0x338e9 movq 0x38(%rsp), %rdi movq 0x40(%rsp), %rax addq $0xb0, %rax movq %rax, 0x20(%rsp) callq 0x39790 movq %rax, %rdi callq 0x33af0 movq %rax, 0x28(%rsp) jmp 0x33796 movq 0x28(%rsp), %rsi movq 0x20(%rsp), %rdi callq 0x39880 movq %rax, 0x18(%rsp) jmp 0x337ac movq 0x40(%rsp), %rdi movq 0x18(%rsp), %rax movq %rax, 0x70(%rsp) addq $0xb0, %rdi callq 0x398d0 movq %rax, 0x60(%rsp) leaq 0x70(%rsp), %rdi leaq 0x60(%rsp), %rsi callq 0x398b0 xorb $-0x1, %al testb $0x1, %al jne 0x337e3 jmp 0x337f6 leaq 0x70(%rsp), %rdi callq 0x39900 movl 0x20(%rax), %eax movl %eax, 0x14(%rsp) jmp 0x33805 movq 0x40(%rsp), %rax movl 0xf0(%rax), %eax movl %eax, 0x14(%rsp) movq 0x38(%rsp), %rdi movl 0x14(%rsp), %eax movl %eax, 0x6c(%rsp) callq 0x39790 movq %rax, %rdi movl 0x6c(%rsp), %esi callq 0x33b00 jmp 0x33825 movq 0x38(%rsp), %rdi callq 0x39790 movq %rax, %rdi movq 0x40(%rsp), %rax movl 0xf4(%rax), %esi callq 0x33ba0 jmp 0x33844 movq 0x40(%rsp), %rax cmpq $0x0, 0x148(%rax) jbe 0x33875 movq 0x38(%rsp), %rdi callq 0x39790 movq %rax, %rdi movq 0x40(%rsp), %rax movq 0x148(%rax), %rsi callq 0x33c40 jmp 0x33873 jmp 0x33875 movq 0x40(%rsp), %rax testb $0x1, 0x140(%rax) je 0x338d4 movq 0x38(%rsp), %rsi leaq 0x50(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x39760 movq 0x40(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0x33560 jmp 0x338a8 leaq 0x50(%rsp), %rdi callq 0x395d0 jmp 0x338d4 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) leaq 0x50(%rsp), %rdi callq 0x395d0 jmp 0x338e9 leaq 0xb0(%rsp), %rdi callq 0x38ab0 addq $0xc8, %rsp retq leaq 0xb0(%rsp), %rdi callq 0x38ab0 movq 0xa0(%rsp), %rdi callq 0x14c80 nopw %cs:(%rax,%rax)
_ZN6spdlog7details8registry17initialize_loggerESt10shared_ptrINS_6loggerEE: sub rsp, 0C8h mov [rsp+0C8h+var_90], rsi mov [rsp+0C8h+var_8], rdi mov [rsp+0C8h+var_10], rsi mov rsi, [rsp+0C8h+var_8] mov [rsp+0C8h+var_88], rsi lea rdi, [rsp+0C8h+var_18] call _ZNSt10lock_guardISt5mutexEC2ERS0_; std::lock_guard<std::mutex>::lock_guard(std::mutex&) mov rdi, [rsp+0C8h+var_90] call _ZNKSt19__shared_ptr_accessIN6spdlog6loggerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, [rsp+0C8h+var_88] mov [rsp+0C8h+var_80], rax add rdi, 0E8h call _ZNKSt10unique_ptrIN6spdlog9formatterESt14default_deleteIS1_EEptEv; std::unique_ptr<spdlog::formatter>::operator->(void) mov rsi, rax mov rax, [rsi] mov rax, [rax+18h] lea rdi, [rsp+0C8h+var_20] call rax jmp short $+2 loc_3368C: mov rdi, [rsp+0C8h+var_80] lea rsi, [rsp+0C8h+var_20] call _ZN6spdlog6logger13set_formatterESt10unique_ptrINS_9formatterESt14default_deleteIS2_EE; spdlog::logger::set_formatter(std::unique_ptr<spdlog::formatter>) jmp short $+2 loc_336A0: lea rdi, [rsp+0C8h+var_20] call _ZNSt10unique_ptrIN6spdlog9formatterESt14default_deleteIS1_EED2Ev; std::unique_ptr<spdlog::formatter>::~unique_ptr() mov rdi, [rsp+0C8h+var_88] add rdi, 0F8h call _ZNKSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEcvbEv; std::function<void ()(std::string const&)>::operator bool(void) test al, 1 jnz short loc_336C7 jmp loc_3376D loc_336C7: mov rdi, [rsp+0C8h+var_90] call _ZNKSt19__shared_ptr_accessIN6spdlog6loggerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rsi, [rsp+0C8h+var_88] mov [rsp+0C8h+var_98], rax add rsi, 0F8h lea rdi, [rsp+0C8h+var_50] call _ZNSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEC2ERKS9_; std::function<void ()(std::string const&)>::function(std::function<void ()(std::string const&)> const&) jmp short $+2 loc_336EE: mov rdi, [rsp+0C8h+var_98] lea rsi, [rsp+0C8h+var_50] call _ZN6spdlog6logger17set_error_handlerESt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEE; spdlog::logger::set_error_handler(std::function<void ()(std::string const&)>) jmp short $+2 loc_336FF: lea rdi, [rsp+0C8h+var_50] call _ZNSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEED2Ev; std::function<void ()(std::string const&)>::~function() jmp short loc_3376D mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax jmp loc_338E9 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax lea rdi, [rsp+arg_A0] call _ZNSt10unique_ptrIN6spdlog9formatterESt14default_deleteIS1_EED2Ev; std::unique_ptr<spdlog::formatter>::~unique_ptr() jmp loc_338E9 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax lea rdi, [rsp+arg_70] call _ZNSt8functionIFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEED2Ev; std::function<void ()(std::string const&)>::~function() jmp loc_338E9 loc_3376D: mov rdi, [rsp+0C8h+var_90] mov rax, [rsp+0C8h+var_88] add rax, 0B0h mov [rsp+0C8h+var_A8], rax call _ZNKSt19__shared_ptr_accessIN6spdlog6loggerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax call _ZNK6spdlog6logger4nameB5cxx11Ev; spdlog::logger::name(void) mov [rsp+0C8h+var_A0], rax jmp short $+2 loc_33796: mov rsi, [rsp+0C8h+var_A0] mov rdi, [rsp+0C8h+var_A8] call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6spdlog5level10level_enumESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEE4findERSE_; std::unordered_map<std::string,spdlog::level::level_enum>::find(std::string const&) mov [rsp+0C8h+var_B0], rax jmp short $+2 loc_337AC: mov rdi, [rsp+0C8h+var_88] mov rax, [rsp+0C8h+var_B0] mov [rsp+0C8h+var_58], rax add rdi, 0B0h call _ZNSt13unordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6spdlog5level10level_enumESt4hashIS5_ESt8equal_toIS5_ESaISt4pairIKS5_S8_EEE3endEv; std::unordered_map<std::string,spdlog::level::level_enum>::end(void) mov [rsp+0C8h+var_68], rax lea rdi, [rsp+0C8h+var_58] lea rsi, [rsp+0C8h+var_68] call _ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6spdlog5level10level_enumEELb1EEESF_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::pair<std::string const,spdlog::level::level_enum>,true> const&,std::__detail::_Node_iterator_base<std::pair<std::string const,spdlog::level::level_enum>,true> const&) xor al, 0FFh test al, 1 jnz short loc_337E3 jmp short loc_337F6 loc_337E3: lea rdi, [rsp+0C8h+var_58] call _ZNKSt8__detail14_Node_iteratorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN6spdlog5level10level_enumEELb0ELb1EEptEv; std::__detail::_Node_iterator<std::pair<std::string const,spdlog::level::level_enum>,false,true>::operator->(void) mov eax, [rax+20h] mov [rsp+0C8h+var_B4], eax jmp short loc_33805 loc_337F6: mov rax, [rsp+0C8h+var_88] mov eax, [rax+0F0h] mov [rsp+0C8h+var_B4], eax loc_33805: mov rdi, [rsp+0C8h+var_90] mov eax, [rsp+0C8h+var_B4] mov [rsp+0C8h+var_5C], eax call _ZNKSt19__shared_ptr_accessIN6spdlog6loggerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov esi, [rsp+0C8h+var_5C] call _ZN6spdlog6logger9set_levelENS_5level10level_enumE; spdlog::logger::set_level(spdlog::level::level_enum) jmp short $+2 loc_33825: mov rdi, [rsp+0C8h+var_90] call _ZNKSt19__shared_ptr_accessIN6spdlog6loggerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax mov rax, [rsp+0C8h+var_88] mov esi, [rax+0F4h] call _ZN6spdlog6logger8flush_onENS_5level10level_enumE; spdlog::logger::flush_on(spdlog::level::level_enum) jmp short $+2 loc_33844: mov rax, [rsp+0C8h+var_88] cmp qword ptr [rax+148h], 0 jbe short loc_33875 mov rdi, [rsp+0C8h+var_90] call _ZNKSt19__shared_ptr_accessIN6spdlog6loggerELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax; this mov rax, [rsp+0C8h+var_88] mov rsi, [rax+148h]; unsigned __int64 call _ZN6spdlog6logger16enable_backtraceEm; spdlog::logger::enable_backtrace(ulong) jmp short $+2 loc_33873: jmp short $+2 loc_33875: mov rax, [rsp+0C8h+var_88] test byte ptr [rax+140h], 1 jz short loc_338D4 mov rsi, [rsp+0C8h+var_90] lea rdi, [rsp+0C8h+var_78] mov [rsp+0C8h+var_C0], rdi call _ZNSt10shared_ptrIN6spdlog6loggerEEC2EOS2_; std::shared_ptr<spdlog::logger>::shared_ptr(std::shared_ptr<spdlog::logger>&&) mov rdi, [rsp+0C8h+var_88] mov rsi, [rsp+0C8h+var_C0] call _ZN6spdlog7details8registry16register_logger_ESt10shared_ptrINS_6loggerEE; spdlog::details::registry::register_logger_(std::shared_ptr<spdlog::logger>) jmp short $+2 loc_338A8: lea rdi, [rsp+0C8h+var_78] call _ZNSt10shared_ptrIN6spdlog6loggerEED2Ev; std::shared_ptr<spdlog::logger>::~shared_ptr() jmp short loc_338D4 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax lea rdi, [rsp+arg_48] call _ZNSt10shared_ptrIN6spdlog6loggerEED2Ev; std::shared_ptr<spdlog::logger>::~shared_ptr() jmp short loc_338E9 loc_338D4: lea rdi, [rsp+0C8h+var_18] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() add rsp, 0C8h retn loc_338E9: lea rdi, [rsp+arg_A8] call _ZNSt10lock_guardISt5mutexED2Ev; std::lock_guard<std::mutex>::~lock_guard() mov rdi, [rsp+arg_98] call __Unwind_Resume
long long spdlog::details::registry::initialize_logger(long long a1, long long a2) { long long v2; // rsi int v3; // edx int v4; // ecx int v5; // r8d int v6; // r9d int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d long long v11; // rax long long v12; // rax long long v13; // rax spdlog::logger *v14; // rax unsigned int v16; // [rsp+14h] [rbp-B4h] long long v17; // [rsp+28h] [rbp-A0h] long long v18; // [rsp+30h] [rbp-98h] int v20; // [rsp+48h] [rbp-80h] _BYTE v21[16]; // [rsp+50h] [rbp-78h] BYREF long long v22; // [rsp+60h] [rbp-68h] BYREF unsigned int v23; // [rsp+6Ch] [rbp-5Ch] long long v24; // [rsp+70h] [rbp-58h] BYREF _BYTE v25[48]; // [rsp+78h] [rbp-50h] BYREF _BYTE v26[8]; // [rsp+A8h] [rbp-20h] BYREF _BYTE v27[8]; // [rsp+B0h] [rbp-18h] BYREF long long v28; // [rsp+B8h] [rbp-10h] long long v29; // [rsp+C0h] [rbp-8h] v29 = a1; v28 = a2; std::lock_guard<std::mutex>::lock_guard(v27, a1); v20 = std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a2); v2 = std::unique_ptr<spdlog::formatter>::operator->(a1 + 232); (*(void ( **)(_BYTE *))(*(_QWORD *)v2 + 24LL))(v26); spdlog::logger::set_formatter(v20, (unsigned int)v26, v3, v4, v5, v6); std::unique_ptr<spdlog::formatter>::~unique_ptr(v26); if ( (std::function<void ()(std::string const&)>::operator bool(a1 + 248) & 1) != 0 ) { v18 = std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a2); std::function<void ()(std::string const&)>::function((unsigned int)v25, a1 + 248, v7, v8, v9, v10); spdlog::logger::set_error_handler(v18, v25); std::function<void ()(std::string const&)>::~function(v25); } v11 = std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a2); v17 = spdlog::logger::name[abi:cxx11](v11); v24 = std::unordered_map<std::string,spdlog::level::level_enum>::find(a1 + 176, v17); v22 = std::unordered_map<std::string,spdlog::level::level_enum>::end(a1 + 176); if ( (std::__detail::operator==(&v24, &v22) & 1) != 0 ) v16 = *(_DWORD *)(a1 + 240); else v16 = *(_DWORD *)(std::__detail::_Node_iterator<std::pair<std::string const,spdlog::level::level_enum>,false,true>::operator->(&v24) + 32); v23 = v16; v12 = std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a2); spdlog::logger::set_level(v12, v23); v13 = std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a2); spdlog::logger::flush_on(v13, *(unsigned int *)(a1 + 244)); if ( *(_QWORD *)(a1 + 328) ) { v14 = (spdlog::logger *)std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(a2); spdlog::logger::enable_backtrace(v14, *(_QWORD *)(a1 + 328)); } if ( (*(_BYTE *)(a1 + 320) & 1) != 0 ) { std::shared_ptr<spdlog::logger>::shared_ptr(v21, a2); spdlog::details::registry::register_logger_(a1, (long long)v21); std::shared_ptr<spdlog::logger>::~shared_ptr(v21); } return std::lock_guard<std::mutex>::~lock_guard(v27); }
initialize_logger: SUB RSP,0xc8 MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0xc0],RDI MOV qword ptr [RSP + 0xb8],RSI MOV RSI,qword ptr [RSP + 0xc0] MOV qword ptr [RSP + 0x40],RSI LEA RDI,[RSP + 0xb0] CALL 0x001389f0 MOV RDI,qword ptr [RSP + 0x38] CALL 0x00139790 MOV RDI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x48],RAX ADD RDI,0xe8 CALL 0x001397a0 MOV RSI,RAX MOV RAX,qword ptr [RSI] MOV RAX,qword ptr [RAX + 0x18] LAB_00133680: LEA RDI,[RSP + 0xa8] CALL RAX JMP 0x0013368c LAB_0013368c: MOV RDI,qword ptr [RSP + 0x48] LEA RSI,[RSP + 0xa8] CALL 0x00133910 JMP 0x001336a0 LAB_001336a0: LEA RDI,[RSP + 0xa8] CALL 0x001396e0 MOV RDI,qword ptr [RSP + 0x40] ADD RDI,0xf8 CALL 0x001397b0 TEST AL,0x1 JNZ 0x001336c7 JMP 0x0013376d LAB_001336c7: MOV RDI,qword ptr [RSP + 0x38] CALL 0x00139790 MOV RSI,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x30],RAX ADD RSI,0xf8 LAB_001336e2: LEA RDI,[RSP + 0x78] CALL 0x001397d0 JMP 0x001336ee LAB_001336ee: MOV RDI,qword ptr [RSP + 0x30] LEA RSI,[RSP + 0x78] CALL 0x00133ac0 JMP 0x001336ff LAB_001336ff: LEA RDI,[RSP + 0x78] CALL 0x001396d0 JMP 0x0013376d LAB_0013376d: MOV RDI,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x40] ADD RAX,0xb0 MOV qword ptr [RSP + 0x20],RAX CALL 0x00139790 MOV RDI,RAX LAB_0013378a: CALL 0x00133af0 MOV qword ptr [RSP + 0x28],RAX JMP 0x00133796 LAB_00133796: MOV RSI,qword ptr [RSP + 0x28] MOV RDI,qword ptr [RSP + 0x20] CALL 0x00139880 MOV qword ptr [RSP + 0x18],RAX JMP 0x001337ac LAB_001337ac: MOV RDI,qword ptr [RSP + 0x40] MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x70],RAX ADD RDI,0xb0 CALL 0x001398d0 MOV qword ptr [RSP + 0x60],RAX LEA RDI,[RSP + 0x70] LEA RSI,[RSP + 0x60] CALL 0x001398b0 XOR AL,0xff TEST AL,0x1 JNZ 0x001337e3 JMP 0x001337f6 LAB_001337e3: LEA RDI,[RSP + 0x70] CALL 0x00139900 MOV EAX,dword ptr [RAX + 0x20] MOV dword ptr [RSP + 0x14],EAX JMP 0x00133805 LAB_001337f6: MOV RAX,qword ptr [RSP + 0x40] MOV EAX,dword ptr [RAX + 0xf0] MOV dword ptr [RSP + 0x14],EAX LAB_00133805: MOV RDI,qword ptr [RSP + 0x38] MOV EAX,dword ptr [RSP + 0x14] MOV dword ptr [RSP + 0x6c],EAX CALL 0x00139790 MOV RDI,RAX MOV ESI,dword ptr [RSP + 0x6c] CALL 0x00133b00 JMP 0x00133825 LAB_00133825: MOV RDI,qword ptr [RSP + 0x38] CALL 0x00139790 MOV RDI,RAX MOV RAX,qword ptr [RSP + 0x40] MOV ESI,dword ptr [RAX + 0xf4] CALL 0x00133ba0 JMP 0x00133844 LAB_00133844: MOV RAX,qword ptr [RSP + 0x40] CMP qword ptr [RAX + 0x148],0x0 JBE 0x00133875 MOV RDI,qword ptr [RSP + 0x38] CALL 0x00139790 MOV RDI,RAX MOV RAX,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RAX + 0x148] CALL 0x00133c40 JMP 0x00133873 LAB_00133873: JMP 0x00133875 LAB_00133875: MOV RAX,qword ptr [RSP + 0x40] TEST byte ptr [RAX + 0x140],0x1 JZ 0x001338d4 MOV RSI,qword ptr [RSP + 0x38] LEA RDI,[RSP + 0x50] MOV qword ptr [RSP + 0x8],RDI CALL 0x00139760 MOV RDI,qword ptr [RSP + 0x40] MOV RSI,qword ptr [RSP + 0x8] LAB_001338a1: CALL 0x00133560 LAB_001338a6: JMP 0x001338a8 LAB_001338a8: LEA RDI,[RSP + 0x50] CALL 0x001395d0 JMP 0x001338d4 LAB_001338d4: LEA RDI,[RSP + 0xb0] CALL 0x00138ab0 ADD RSP,0xc8 RET
/* spdlog::details::registry::initialize_logger(std::shared_ptr<spdlog::logger>) */ void __thiscall spdlog::details::registry::initialize_logger (registry *this, __shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false> *param_2) { bool bVar1; byte bVar2; logger *plVar3; long *plVar4; string *psVar5; long lVar6; int4 local_b4; shared_ptr<spdlog::logger> local_78 [16]; int8 local_68; int4 local_5c; int8 local_58; function<void(std::__cxx11::string_const&)> local_50 [48]; unique_ptr<spdlog::formatter,std::default_delete<spdlog::formatter>> local_20 [8]; lock_guard<std::mutex> local_18 [8]; __shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false> *local_10; registry *local_8; local_10 = param_2; local_8 = this; std::lock_guard<std::mutex>::lock_guard(local_18,(mutex *)this); plVar3 = (logger *) std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->(param_2); plVar4 = (long *)std::unique_ptr<spdlog::formatter,std::default_delete<spdlog::formatter>>:: operator->((unique_ptr<spdlog::formatter,std::default_delete<spdlog::formatter>> *)(this + 0xe8)); /* try { // try from 00133680 to 00133689 has its CatchHandler @ 0013370b */ (**(code **)(*plVar4 + 0x18))(local_20); /* try { // try from 0013368c to 0013369d has its CatchHandler @ 00133724 */ logger::set_formatter(plVar3,local_20); std::unique_ptr<spdlog::formatter,std::default_delete<spdlog::formatter>>::~unique_ptr(local_20); bVar1 = std::function::operator_cast_to_bool((function *)(this + 0xf8)); if (bVar1) { plVar3 = (logger *) std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->(param_2); /* try { // try from 001336e2 to 001336eb has its CatchHandler @ 0013370b */ std::function<void(std::__cxx11::string_const&)>::function(local_50,this + 0xf8); /* try { // try from 001336ee to 001336fc has its CatchHandler @ 0013374a */ logger::set_error_handler(plVar3,local_50); std::function<void(std::__cxx11::string_const&)>::~function(local_50); } plVar3 = (logger *) std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->(param_2); /* try { // try from 0013378a to 00133870 has its CatchHandler @ 0013370b */ psVar5 = (string *)logger::name_abi_cxx11_(plVar3); local_58 = std:: unordered_map<std::__cxx11::string,spdlog::level::level_enum,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,spdlog::level::level_enum>>> ::find((unordered_map<std::__cxx11::string,spdlog::level::level_enum,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,spdlog::level::level_enum>>> *)(this + 0xb0),psVar5); local_68 = std:: unordered_map<std::__cxx11::string,spdlog::level::level_enum,std::hash<std::__cxx11::string>,std::equal_to<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,spdlog::level::level_enum>>> ::end(); bVar2 = std::__detail::operator== ((_Node_iterator_base *)&local_58,(_Node_iterator_base *)&local_68); if (((bVar2 ^ 0xff) & 1) == 0) { local_b4 = *(int4 *)(this + 0xf0); } else { lVar6 = std::__detail:: _Node_iterator<std::pair<std::__cxx11::string_const,spdlog::level::level_enum>,false,true> ::operator->((_Node_iterator<std::pair<std::__cxx11::string_const,spdlog::level::level_enum>,false,true> *)&local_58); local_b4 = *(int4 *)(lVar6 + 0x20); } local_5c = local_b4; plVar3 = (logger *) std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->(param_2); logger::set_level(plVar3,local_5c); plVar3 = (logger *) std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->(param_2); logger::flush_on(plVar3,*(int4 *)(this + 0xf4)); if (*(long *)(this + 0x148) != 0) { plVar3 = (logger *) std::__shared_ptr_access<spdlog::logger,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->(param_2); logger::enable_backtrace(plVar3,*(ulong *)(this + 0x148)); } if (((byte)this[0x140] & 1) != 0) { std::shared_ptr<spdlog::logger>::shared_ptr(local_78,param_2); /* try { // try from 001338a1 to 001338a5 has its CatchHandler @ 001338b4 */ register_logger_(this,local_78); std::shared_ptr<spdlog::logger>::~shared_ptr(local_78); } std::lock_guard<std::mutex>::~lock_guard(local_18); return; }
13,413
SchemaConverter::check_errors()
monkey531[P]llama/common/json-schema-to-grammar.cpp
void check_errors() { if (!_errors.empty()) { throw std::runtime_error("JSON schema conversion failed:\n" + string_join(_errors, "\n")); } if (!_warnings.empty()) { fprintf(stderr, "WARNING: JSON schema conversion was incomplete: %s\n", string_join(_warnings, "; ").c_str()); } }
O3
cpp
SchemaConverter::check_errors(): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x68, %rsp movq %rdi, %r14 movq 0xc8(%rdi), %rax cmpq 0xd0(%rdi), %rax jne 0x9d025 movq 0xe0(%r14), %rax cmpq 0xe8(%r14), %rax jne 0x9cfca addq $0x68, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq 0x43fcf(%rip), %rax # 0xe0fa0 movq (%rax), %r15 leaq 0x18(%rsp), %rbx movq %rbx, -0x10(%rbx) leaq 0x1890e(%rip), %rsi # 0xb58f2 leaq 0x18909(%rip), %rdx # 0xb58f4 leaq 0x8(%rsp), %rdi callq 0x200f4 addq $0xe0, %r14 leaq 0x48(%rsp), %rdi leaq 0x8(%rsp), %rdx movq %r14, %rsi callq 0x2197d leaq 0x48(%rsp), %rdi leaq 0x8(%rsp), %rdx movq %r15, %rsi movq %rbx, %rcx callq 0x19fc6 jmp 0x9cfbf movl $0x10, %edi callq 0x18380 movq %rax, %rbx leaq 0x38(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0xd752(%rip), %rsi # 0xaa794 leaq 0xd74c(%rip), %rdx # 0xaa795 leaq 0x28(%rsp), %rdi callq 0x200f4 addq $0xc8, %r14 leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rdx movq %r14, %rsi callq 0x2197d leaq 0x1882b(%rip), %rsi # 0xb589e leaq 0x48(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x282b5 movb $0x1, %bpl leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x18b00 xorl %ebp, %ebp movq 0x43f55(%rip), %rsi # 0xe0ff0 movq 0x43ece(%rip), %rdx # 0xe0f70 movq %rbx, %rdi callq 0x18bb0 movq %rax, %r14 leaq 0x58(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9d0d0 movq 0x58(%rsp), %rsi incq %rsi callq 0x186e0 jmp 0x9d0d0 movq %rax, %r14 movb $0x1, %bpl leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x9d0eb movq 0x18(%rsp), %rsi incq %rsi callq 0x186e0 movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x9d102 movq 0x38(%rsp), %rsi incq %rsi callq 0x186e0 testb %bpl, %bpl jne 0x9d128 jmp 0x9d151 movq %rax, %r14 movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x9d128 movq 0x38(%rsp), %rsi incq %rsi callq 0x186e0 jmp 0x9d128 movq %rax, %r14 movq %rbx, %rdi callq 0x18520 jmp 0x9d151 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %rbx, %rdi je 0x9d151 movq 0x18(%rsp), %rsi incq %rsi callq 0x186e0 jmp 0x9d151 movq %rax, %r14 movq %r14, %rdi callq 0x18c10 nop
_ZN15SchemaConverter12check_errorsEv: push rbp push r15 push r14 push rbx sub rsp, 68h mov r14, rdi mov rax, [rdi+0C8h] cmp rax, [rdi+0D0h] jnz short loc_9D025 mov rax, [r14+0E0h] cmp rax, [r14+0E8h] jnz short loc_9CFCA loc_9CFBF: add rsp, 68h pop rbx pop r14 pop r15 pop rbp retn loc_9CFCA: mov rax, cs:stderr_ptr mov r15, [rax] lea rbx, [rsp+88h+var_70] mov [rbx-10h], rbx lea rsi, asc_B58F2; "; " lea rdx, asc_B58F2+2; "" lea rdi, [rsp+88h+var_80] 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) add r14, 0E0h lea rdi, [rsp+88h+var_40] lea rdx, [rsp+88h+var_80] mov rsi, r14 call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) lea rdi, [rsp+88h+var_40] lea rdx, [rsp+88h+var_80] mov rsi, r15 mov rcx, rbx call _ZN15SchemaConverter12check_errorsEv_cold_1; SchemaConverter::check_errors(void) [clone] jmp short loc_9CFBF loc_9D025: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+88h+var_50] mov [r15-10h], r15 lea rsi, asc_AA728+6Ch; "\n" lea rdx, asc_AA728+6Dh; "" lea rdi, [rsp+88h+var_60] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) add r14, 0C8h lea rdi, [rsp+88h+var_80] lea rdx, [rsp+88h+var_60] mov rsi, r14 call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) lea rsi, aJsonSchemaConv; "JSON schema conversion failed:\n" lea rdi, [rsp+88h+var_40] lea rdx, [rsp+88h+var_80] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+88h+var_40] mov rdi, rbx call __ZNSt13runtime_errorC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::runtime_error::runtime_error(std::string const&) xor ebp, ebp mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+88h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9D0D0 mov rsi, [rsp+88h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9D0D0 mov r14, rax mov bpl, 1 loc_9D0D0: lea rax, [rsp+88h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_9D0EB mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9D0EB: mov rdi, [rsp+88h+var_60]; void * cmp rdi, r15 jz short loc_9D102 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9D102: test bpl, bpl jnz short loc_9D128 jmp short loc_9D151 mov r14, rax mov rdi, [rsp+88h+var_60]; void * cmp rdi, r15 jz short loc_9D128 mov rsi, [rsp+88h+var_50] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9D128 mov r14, rax loc_9D128: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_9D151 mov r14, rax mov rdi, [rsp+88h+var_80]; void * cmp rdi, rbx jz short loc_9D151 mov rsi, [rsp+88h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_9D151 mov r14, rax loc_9D151: mov rdi, r14 call __Unwind_Resume
void SchemaConverter::check_errors(SchemaConverter *this) { long long v1; // r15 void *exception; // rbx void *v3[2]; // [rsp+8h] [rbp-80h] BYREF void *v4[2]; // [rsp+18h] [rbp-70h] BYREF void *v5[2]; // [rsp+28h] [rbp-60h] BYREF long long v6; // [rsp+38h] [rbp-50h] BYREF const char *v7[2]; // [rsp+48h] [rbp-40h] BYREF if ( *((_QWORD *)this + 25) != *((_QWORD *)this + 26) ) { exception = __cxa_allocate_exception(0x10uLL); v5[0] = &v6; std::string::_M_construct<char const*>((long long)v5, "\n", (long long)""); string_join((long long)v3, (long long *)this + 25, v5); std::operator+<char>((long long)v7, (long long)"JSON schema conversion failed:\n", (long long)v3); std::runtime_error::runtime_error(exception, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( *((_QWORD *)this + 28) != *((_QWORD *)this + 29) ) { v1 = stderr; v3[0] = v4; std::string::_M_construct<char const*>((long long)v3, "; ", (long long)""); string_join((long long)v7, (long long *)this + 28, v3); SchemaConverter::check_errors(v7, v1, v3, v4); } }
check_errors: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x68 MOV R14,RDI MOV RAX,qword ptr [RDI + 0xc8] CMP RAX,qword ptr [RDI + 0xd0] JNZ 0x0019d025 MOV RAX,qword ptr [R14 + 0xe0] CMP RAX,qword ptr [R14 + 0xe8] JNZ 0x0019cfca LAB_0019cfbf: ADD RSP,0x68 POP RBX POP R14 POP R15 POP RBP RET LAB_0019cfca: MOV RAX,qword ptr [0x001e0fa0] MOV R15,qword ptr [RAX] LEA RBX,[RSP + 0x18] MOV qword ptr [RBX + -0x10],RBX LAB_0019cfdd: LEA RSI,[0x1b58f2] LEA RDX,[0x1b58f4] LEA RDI,[RSP + 0x8] CALL 0x001200f4 LAB_0019cff5: ADD R14,0xe0 LEA RDI,[RSP + 0x48] LEA RDX,[RSP + 0x8] MOV RSI,R14 CALL 0x0012197d LAB_0019d00e: LEA RDI,[RSP + 0x48] LEA RDX,[RSP + 0x8] MOV RSI,R15 MOV RCX,RBX CALL 0x00119fc6 JMP 0x0019cfbf LAB_0019d025: MOV EDI,0x10 CALL 0x00118380 MOV RBX,RAX LEA R15,[RSP + 0x38] MOV qword ptr [R15 + -0x10],R15 LAB_0019d03b: LEA RSI,[0x1aa794] LEA RDX,[0x1aa795] LEA RDI,[RSP + 0x28] CALL 0x001200f4 LAB_0019d053: ADD R14,0xc8 LEA RDI,[RSP + 0x8] LEA RDX,[RSP + 0x28] MOV RSI,R14 CALL 0x0012197d LAB_0019d06c: LEA RSI,[0x1b589e] LEA RDI,[RSP + 0x48] LEA RDX,[RSP + 0x8] CALL 0x001282b5 MOV BPL,0x1 LAB_0019d085: LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x00118b00 XOR EBP,EBP MOV RSI,qword ptr [0x001e0ff0] MOV RDX,qword ptr [0x001e0f70] MOV RDI,RBX CALL 0x00118bb0
/* SchemaConverter::check_errors() */ void __thiscall SchemaConverter::check_errors(SchemaConverter *this) { runtime_error *this_00; int1 *local_80 [2]; int1 local_70 [16]; int1 *local_60 [2]; int1 local_50 [16]; vector local_40 [32]; if (*(long *)(this + 200) == *(long *)(this + 0xd0)) { if (*(long *)(this + 0xe0) != *(long *)(this + 0xe8)) { local_80[0] = local_70; /* try { // try from 0019cfdd to 0019cff4 has its CatchHandler @ 0019d14e */ std::__cxx11::string::_M_construct<char_const*>(local_80,&DAT_001b58f2,&DAT_001b58f4); /* try { // try from 0019cff5 to 0019d00d has its CatchHandler @ 0019d132 */ string_join(local_40,(string *)(this + 0xe0)); check_errors(); } return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); local_60[0] = local_50; /* try { // try from 0019d03b to 0019d052 has its CatchHandler @ 0019d125 */ std::__cxx11::string::_M_construct<char_const*>(local_60,"\n",""); /* try { // try from 0019d053 to 0019d06b has its CatchHandler @ 0019d109 */ string_join((vector *)local_80,(string *)(this + 200)); /* try { // try from 0019d06c to 0019d081 has its CatchHandler @ 0019d0ca */ std::operator+((char *)local_40,(string *)"JSON schema conversion failed:\n"); /* try { // try from 0019d085 to 0019d0a9 has its CatchHandler @ 0019d0aa */ std::runtime_error::runtime_error(this_00,(string *)local_40); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_001e0ff0,PTR__runtime_error_001e0f70); }
13,414
sha256_init_h
corpus-core[P]colibri-stateless/build_O2/_deps/blst-src/src/sha256.h
static void sha256_init_h(unsigned int h[8]) { h[0] = 0x6a09e667U; h[1] = 0xbb67ae85U; h[2] = 0x3c6ef372U; h[3] = 0xa54ff53aU; h[4] = 0x510e527fU; h[5] = 0x9b05688cU; h[6] = 0x1f83d9abU; h[7] = 0x5be0cd19U; }
O2
c
sha256_init_h: pushq %rbp movq %rsp, %rbp movaps 0x23ecb(%rip), %xmm0 # 0x7f8e0 movups %xmm0, (%rdi) movaps 0x23ed1(%rip), %xmm0 # 0x7f8f0 movups %xmm0, 0x10(%rdi) popq %rbp retq
sha256_init_h: push rbp mov rbp, rsp movaps xmm0, cs:xmmword_7F8E0 movups xmmword ptr [rdi], xmm0 movaps xmm0, cs:xmmword_7F8F0 movups xmmword ptr [rdi+10h], xmm0 pop rbp retn
void sha256_init_h(_OWORD *a1) { *a1 = xmmword_7F8E0; a1[1] = xmmword_7F8F0; }
sha256_init_h: PUSH RBP MOV RBP,RSP MOVAPS XMM0,xmmword ptr [0x0017f8e0] MOVUPS xmmword ptr [RDI],XMM0 MOVAPS XMM0,xmmword ptr [0x0017f8f0] MOVUPS xmmword ptr [RDI + 0x10],XMM0 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void sha256_init_h(int8 *param_1) { int8 uVar1; uVar1 = _UNK_0017f8e8; *param_1 = _DAT_0017f8e0; param_1[1] = uVar1; uVar1 = _UNK_0017f8f8; param_1[2] = _DAT_0017f8f0; param_1[3] = uVar1; return; }
13,415
JS_ToBoolFree
bluesky950520[P]quickjs/quickjs.c
static int JS_ToBoolFree(JSContext *ctx, JSValue val) { uint32_t tag = JS_VALUE_GET_TAG(val); switch(tag) { case JS_TAG_INT: return JS_VALUE_GET_INT(val) != 0; case JS_TAG_BOOL: case JS_TAG_NULL: case JS_TAG_UNDEFINED: return JS_VALUE_GET_INT(val); case JS_TAG_EXCEPTION: return -1; case JS_TAG_STRING: { BOOL ret = JS_VALUE_GET_STRING(val)->len != 0; JS_FreeValue(ctx, val); return ret; } case JS_TAG_BIG_INT: { JSBigInt *p = JS_VALUE_GET_PTR(val); BOOL ret; ret = p->num.expn != BF_EXP_ZERO && p->num.expn != BF_EXP_NAN; JS_FreeValue(ctx, val); return ret; } case JS_TAG_OBJECT: { JSObject *p = JS_VALUE_GET_OBJ(val); BOOL ret; ret = !p->is_HTMLDDA; JS_FreeValue(ctx, val); return ret; } break; default: if (JS_TAG_IS_FLOAT64(tag)) { double d = JS_VALUE_GET_FLOAT64(val); return !isnan(d) && d != 0; } else { JS_FreeValue(ctx, val); return TRUE; } } }
O1
c
JS_ToBoolFree: pushq %rbx subq $0x10, %rsp movq %rsi, 0x8(%rsp) leal 0x9(%rdx), %eax cmpl $0x10, %eax ja 0x26e04 leaq 0x79a4a(%rip), %rcx # 0xa07d0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl 0x8(%rsp), %ebx jmp 0x26e12 movq 0x8(%rsp), %rsi xorl %ebx, %ebx cmpb $0x0, 0x5(%rsi) setns %bl jmp 0x26dd5 movq 0x8(%rsp), %rsi movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF addq 0x18(%rsi), %rax xorl %ebx, %ebx cmpq $-0x2, %rax setb %bl jmp 0x26dd5 movq 0x8(%rsp), %rsi movq 0x4(%rsi), %rax xorl %ebx, %ebx shlq $0x21, %rax setne %bl movq 0x18(%rdi), %rdi callq 0x21922 jmp 0x26e12 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF jmp 0x26e12 xorl %ebx, %ebx cmpl $0x0, 0x8(%rsp) jmp 0x26dff movq %rsi, %xmm0 xorpd %xmm1, %xmm1 xorl %ebx, %ebx ucomisd %xmm1, %xmm0 setne %bl jmp 0x26e12 movq 0x18(%rdi), %rdi callq 0x21922 movl $0x1, %ebx movl %ebx, %eax addq $0x10, %rsp popq %rbx retq
JS_ToBoolFree: push rbx sub rsp, 10h mov [rsp+18h+var_10], rsi lea eax, [rdx+9]; switch 17 cases cmp eax, 10h ja def_26D8D; jumptable 0000000000026D8D default case, cases -8,-6--2,4,5 lea rcx, jpt_26D8D movsxd rax, ds:(jpt_26D8D - 0A07D0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_26D8F: mov ebx, dword ptr [rsp+18h+var_10]; jumptable 0000000000026D8D cases 1-3 jmp short loc_26E12 loc_26D95: mov rsi, [rsp+18h+var_10]; jumptable 0000000000026D8D case -1 xor ebx, ebx cmp byte ptr [rsi+5], 0 setns bl jmp short loc_26DD5 loc_26DA5: mov rsi, [rsp+18h+var_10]; jumptable 0000000000026D8D case -9 mov rax, 7FFFFFFFFFFFFFFFh add rax, [rsi+18h] xor ebx, ebx cmp rax, 0FFFFFFFFFFFFFFFEh setb bl jmp short loc_26DD5 loc_26DC3: mov rsi, [rsp+18h+var_10]; jumptable 0000000000026D8D case -7 mov rax, [rsi+4] xor ebx, ebx shl rax, 21h setnz bl loc_26DD5: mov rdi, [rdi+18h] call JS_FreeValueRT jmp short loc_26E12 loc_26DE0: mov ebx, 0FFFFFFFFh; jumptable 0000000000026D8D case 6 jmp short loc_26E12 loc_26DE7: xor ebx, ebx; jumptable 0000000000026D8D case 0 cmp dword ptr [rsp+18h+var_10], 0 jmp short loc_26DFF loc_26DF0: movq xmm0, rsi; jumptable 0000000000026D8D case 7 xorpd xmm1, xmm1 xor ebx, ebx ucomisd xmm0, xmm1 loc_26DFF: setnz bl jmp short loc_26E12 def_26D8D: mov rdi, [rdi+18h]; jumptable 0000000000026D8D default case, cases -8,-6--2,4,5 call JS_FreeValueRT mov ebx, 1 loc_26E12: mov eax, ebx add rsp, 10h pop rbx retn
long long JS_ToBoolFree(long long a1, long long a2, long long a3) { BOOL v3; // ebx bool v4; // zf switch ( (int)a3 ) { case -9: v3 = (unsigned long long)(*(_QWORD *)(a2 + 24) + 0x7FFFFFFFFFFFFFFFLL) < 0xFFFFFFFFFFFFFFFELL; goto LABEL_6; case -7: v3 = *(_QWORD *)(a2 + 4) << 33 != 0LL; goto LABEL_6; case -1: v3 = *(_BYTE *)(a2 + 5) >= 0; LABEL_6: JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)a2, a3); return v3; case 0: v3 = 0; v4 = (_DWORD)a2 == 0; goto LABEL_10; case 1: case 2: case 3: return (BOOL)a2; case 6: return -1; case 7: v3 = 0; v4 = *(double *)&a2 == 0.0; LABEL_10: LOBYTE(v3) = !v4; break; default: JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)a2, a3); v3 = 1; break; } return v3; }
JS_ToBoolFree: PUSH RBX SUB RSP,0x10 MOV qword ptr [RSP + 0x8],RSI LEA EAX,[RDX + 0x9] CMP EAX,0x10 JA 0x00126e04 LEA RCX,[0x1a07d0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV EBX,dword ptr [RSP + 0x8] JMP 0x00126e12 caseD_ffffffff: MOV RSI,qword ptr [RSP + 0x8] XOR EBX,EBX CMP byte ptr [RSI + 0x5],0x0 SETNS BL JMP 0x00126dd5 caseD_fffffff7: MOV RSI,qword ptr [RSP + 0x8] MOV RAX,0x7fffffffffffffff ADD RAX,qword ptr [RSI + 0x18] XOR EBX,EBX CMP RAX,-0x2 SETC BL JMP 0x00126dd5 caseD_fffffff9: MOV RSI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSI + 0x4] XOR EBX,EBX SHL RAX,0x21 SETNZ BL LAB_00126dd5: MOV RDI,qword ptr [RDI + 0x18] CALL 0x00121922 JMP 0x00126e12 caseD_6: MOV EBX,0xffffffff JMP 0x00126e12 caseD_0: XOR EBX,EBX CMP dword ptr [RSP + 0x8],0x0 JMP 0x00126dff caseD_7: MOVQ XMM0,RSI XORPD XMM1,XMM1 XOR EBX,EBX UCOMISD XMM0,XMM1 LAB_00126dff: SETNZ BL JMP 0x00126e12 caseD_fffffff8: MOV RDI,qword ptr [RDI + 0x18] CALL 0x00121922 MOV EBX,0x1 LAB_00126e12: MOV EAX,EBX ADD RSP,0x10 POP RBX RET
ulong JS_ToBoolFree(long param_1,double param_2,int4 param_3) { ulong uVar1; bool bVar2; int local_10; local_10 = SUB84(param_2,0); switch(param_3) { case 0: bVar2 = local_10 == 0; goto LAB_00126dff; case 1: case 2: case 3: uVar1 = (ulong)param_2 & 0xffffffff; break; case 6: uVar1 = 0xffffffff; break; case 7: bVar2 = param_2 == 0.0; LAB_00126dff: uVar1 = (ulong)!bVar2; break; case 0xfffffff7: uVar1 = (ulong)(*(long *)((long)param_2 + 0x18) + 0x7fffffffffffffffU < 0xfffffffffffffffe); goto LAB_00126dd5; default: JS_FreeValueRT(*(int8 *)(param_1 + 0x18)); uVar1 = 1; break; case 0xfffffff9: uVar1 = (ulong)((*(ulong *)((long)param_2 + 4) & 0x7fffffff) != 0); goto LAB_00126dd5; case 0xffffffff: uVar1 = (ulong)(-1 < *(char *)((long)param_2 + 5)); LAB_00126dd5: JS_FreeValueRT(*(int8 *)(param_1 + 0x18)); } return uVar1; }
13,416
JS_ToBoolFree
bluesky950520[P]quickjs/quickjs.c
static int JS_ToBoolFree(JSContext *ctx, JSValue val) { uint32_t tag = JS_VALUE_GET_TAG(val); switch(tag) { case JS_TAG_INT: return JS_VALUE_GET_INT(val) != 0; case JS_TAG_BOOL: case JS_TAG_NULL: case JS_TAG_UNDEFINED: return JS_VALUE_GET_INT(val); case JS_TAG_EXCEPTION: return -1; case JS_TAG_STRING: { BOOL ret = JS_VALUE_GET_STRING(val)->len != 0; JS_FreeValue(ctx, val); return ret; } case JS_TAG_BIG_INT: { JSBigInt *p = JS_VALUE_GET_PTR(val); BOOL ret; ret = p->num.expn != BF_EXP_ZERO && p->num.expn != BF_EXP_NAN; JS_FreeValue(ctx, val); return ret; } case JS_TAG_OBJECT: { JSObject *p = JS_VALUE_GET_OBJ(val); BOOL ret; ret = !p->is_HTMLDDA; JS_FreeValue(ctx, val); return ret; } break; default: if (JS_TAG_IS_FLOAT64(tag)) { double d = JS_VALUE_GET_FLOAT64(val); return !isnan(d) && d != 0; } else { JS_FreeValue(ctx, val); return TRUE; } } }
O2
c
JS_ToBoolFree: pushq %rbx leal 0x9(%rdx), %eax cmpl $0x10, %eax ja 0x20a21 leaq 0x65d76(%rip), %rcx # 0x86730 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF addq 0x18(%rsi), %rax xorl %ebx, %ebx cmpq $-0x2, %rax setb %bl jmp 0x20a03 xorl %ebx, %ebx cmpb $0x0, 0x5(%rsi) setns %bl jmp 0x20a03 xorl %eax, %eax testl %esi, %esi setne %al movl %eax, %esi jmp 0x20a29 pushq $-0x1 jmp 0x20a28 movq 0x4(%rsi), %rax xorl %ebx, %ebx shlq $0x21, %rax setne %bl callq 0x1bbce movl %ebx, %esi jmp 0x20a29 movq %rsi, %xmm0 xorpd %xmm1, %xmm1 xorl %esi, %esi ucomisd %xmm1, %xmm0 setne %sil jmp 0x20a29 callq 0x1bbce pushq $0x1 popq %rsi movl %esi, %eax popq %rbx retq
JS_ToBoolFree: push rbx lea eax, [rdx+9]; switch 17 cases cmp eax, 10h ja short def_209C1; jumptable 00000000000209C1 default case, cases -8,-6--2,4,5 lea rcx, jpt_209C1 movsxd rax, ds:(jpt_209C1 - 86730h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_209C3: mov rax, 7FFFFFFFFFFFFFFFh; jumptable 00000000000209C1 case -9 add rax, [rsi+18h] xor ebx, ebx cmp rax, 0FFFFFFFFFFFFFFFEh setb bl jmp short loc_20A03 loc_209DC: xor ebx, ebx; jumptable 00000000000209C1 case -1 cmp byte ptr [rsi+5], 0 setns bl jmp short loc_20A03 loc_209E7: xor eax, eax; jumptable 00000000000209C1 case 0 test esi, esi setnz al mov esi, eax jmp short loc_20A29; jumptable 00000000000209C1 cases 1-3 loc_209F2: push 0FFFFFFFFFFFFFFFFh; jumptable 00000000000209C1 case 6 jmp short loc_20A28 loc_209F6: mov rax, [rsi+4]; jumptable 00000000000209C1 case -7 xor ebx, ebx shl rax, 21h setnz bl loc_20A03: call JS_FreeValue mov esi, ebx jmp short loc_20A29; jumptable 00000000000209C1 cases 1-3 loc_20A0C: movq xmm0, rsi; jumptable 00000000000209C1 case 7 xorpd xmm1, xmm1 xor esi, esi ucomisd xmm0, xmm1 setnz sil jmp short loc_20A29; jumptable 00000000000209C1 cases 1-3 def_209C1: call JS_FreeValue; jumptable 00000000000209C1 default case, cases -8,-6--2,4,5 push 1 loc_20A28: pop rsi loc_20A29: mov eax, esi; jumptable 00000000000209C1 cases 1-3 pop rbx retn
long long JS_ToBoolFree(long long a1, long long a2, long long a3) { BOOL v3; // ebx int v5; // [rsp-8h] [rbp-10h] switch ( (int)a3 ) { case -9: v3 = (unsigned long long)(*(_QWORD *)(a2 + 24) + 0x7FFFFFFFFFFFFFFFLL) < 0xFFFFFFFFFFFFFFFELL; goto LABEL_7; case -7: v3 = *(_QWORD *)(a2 + 4) << 33 != 0LL; goto LABEL_7; case -1: v3 = *(_BYTE *)(a2 + 5) >= 0; LABEL_7: JS_FreeValue(a1, a2, a3); LODWORD(a2) = v3; return (unsigned int)a2; case 0: LODWORD(a2) = a2 != 0; return (unsigned int)a2; case 1: case 2: case 3: return (unsigned int)a2; case 6: v5 = -1; goto LABEL_10; case 7: LODWORD(a2) = *(double *)&a2 != 0.0; return (unsigned int)a2; default: JS_FreeValue(a1, a2, a3); v5 = 1; LABEL_10: LODWORD(a2) = v5; return (unsigned int)a2; } }
JS_ToBoolFree: PUSH RBX LEA EAX,[RDX + 0x9] CMP EAX,0x10 JA 0x00120a21 LEA RCX,[0x186730] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_fffffff7: MOV RAX,0x7fffffffffffffff ADD RAX,qword ptr [RSI + 0x18] XOR EBX,EBX CMP RAX,-0x2 SETC BL JMP 0x00120a03 caseD_ffffffff: XOR EBX,EBX CMP byte ptr [RSI + 0x5],0x0 SETNS BL JMP 0x00120a03 caseD_0: XOR EAX,EAX TEST ESI,ESI SETNZ AL MOV ESI,EAX JMP 0x00120a29 caseD_6: PUSH -0x1 JMP 0x00120a28 caseD_fffffff9: MOV RAX,qword ptr [RSI + 0x4] XOR EBX,EBX SHL RAX,0x21 SETNZ BL LAB_00120a03: CALL 0x0011bbce MOV ESI,EBX JMP 0x00120a29 caseD_7: MOVQ XMM0,RSI XORPD XMM1,XMM1 XOR ESI,ESI UCOMISD XMM0,XMM1 SETNZ SIL JMP 0x00120a29 caseD_fffffff8: CALL 0x0011bbce PUSH 0x1 LAB_00120a28: POP RSI caseD_1: MOV EAX,ESI POP RBX RET
ulong JS_ToBoolFree(int8 param_1,double param_2,int4 param_3) { uint uVar1; double dStack_10; switch(param_3) { case 0: param_2 = (double)(ulong)(SUB84(param_2,0) != 0); break; case 1: case 2: case 3: break; case 6: dStack_10 = -NAN; param_2 = dStack_10; break; case 7: param_2 = (double)(ulong)(param_2 != 0.0); break; case 0xfffffff7: uVar1 = (uint)(*(long *)((long)param_2 + 0x18) + 0x7fffffffffffffffU < 0xfffffffffffffffe); goto LAB_00120a03; default: JS_FreeValue(); dStack_10 = 4.94065645841247e-324; param_2 = dStack_10; break; case 0xfffffff9: uVar1 = (uint)((*(ulong *)((long)param_2 + 4) & 0x7fffffff) != 0); goto LAB_00120a03; case 0xffffffff: uVar1 = (uint)(-1 < *(char *)((long)param_2 + 5)); LAB_00120a03: JS_FreeValue(); param_2 = (double)(ulong)uVar1; } return (ulong)param_2 & 0xffffffff; }
13,417
minja::CommentTemplateToken::CommentTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
llama.cpp/common/minja/minja.hpp
CommentTemplateToken(const Location & loc, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Comment, loc, pre, post), text(t) {}
O3
cpp
minja::CommentTemplateToken::CommentTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx leaq 0x80564(%rip), %r12 # 0x160920 addq $0x10, %r12 movq %r12, (%rdi) movl $0xc, 0x8(%rdi) movq (%rsi), %rax movq %rax, 0x10(%rdi) movq 0x8(%rsi), %rax movq %rax, 0x18(%rdi) testq %rax, %rax je 0xe03f3 movq 0x81bb3(%rip), %rdi # 0x161f98 cmpb $0x0, (%rdi) je 0xe03ef incl 0x8(%rax) jmp 0xe03f3 lock incl 0x8(%rax) leaq 0x18(%rbx), %r14 movq 0x10(%rsi), %rax movq %rax, 0x20(%rbx) movl %edx, 0x28(%rbx) movl %ecx, 0x2c(%rbx) leaq 0x804cc(%rip), %rax # 0x1608d8 addq $0x10, %rax movq %rax, (%rbx) leaq 0x30(%rbx), %rdi leaq 0x40(%rbx), %rax movq %rax, 0x30(%rbx) movq (%r8), %rsi movq 0x8(%r8), %rdx addq %rsi, %rdx callq 0x289c0 addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %r15 movq %r12, (%rbx) movq %r14, %rdi callq 0x71092 movq %r15, %rdi callq 0x20ad0
_ZN5minja20CommentTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_RKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r12 push rbx push rax mov rbx, rdi lea r12, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add r12, 10h mov [rdi], r12 mov dword ptr [rdi+8], 0Ch mov rax, [rsi] mov [rdi+10h], rax mov rax, [rsi+8] mov [rdi+18h], rax test rax, rax jz short loc_E03F3 mov rdi, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rdi], 0 jz short loc_E03EF inc dword ptr [rax+8] jmp short loc_E03F3 loc_E03EF: lock inc dword ptr [rax+8] loc_E03F3: lea r14, [rbx+18h] mov rax, [rsi+10h] mov [rbx+20h], rax mov [rbx+28h], edx mov [rbx+2Ch], ecx lea rax, _ZTVN5minja20CommentTemplateTokenE; `vtable for'minja::CommentTemplateToken add rax, 10h mov [rbx], rax lea rdi, [rbx+30h] lea rax, [rbx+40h] mov [rbx+30h], rax mov rsi, [r8] mov rdx, [r8+8] add rdx, rsi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn mov r15, rax mov [rbx], r12 mov rdi, r14 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, r15 call __Unwind_Resume
long long minja::CommentTemplateToken::CommentTemplateToken( long long a1, _QWORD *a2, int a3, int a4, long long a5) { long long v5; // rax *(_QWORD *)a1 = &`vtable for'minja::TemplateToken + 2; *(_DWORD *)(a1 + 8) = 12; *(_QWORD *)(a1 + 16) = *a2; v5 = a2[1]; *(_QWORD *)(a1 + 24) = v5; if ( v5 ) { if ( _libc_single_threaded ) ++*(_DWORD *)(v5 + 8); else _InterlockedIncrement((volatile signed __int32 *)(v5 + 8)); } *(_QWORD *)(a1 + 32) = a2[2]; *(_DWORD *)(a1 + 40) = a3; *(_DWORD *)(a1 + 44) = a4; *(_QWORD *)a1 = &`vtable for'minja::CommentTemplateToken + 2; *(_QWORD *)(a1 + 48) = a1 + 64; return std::string::_M_construct<char *>(a1 + 48, *(_BYTE **)a5, *(_QWORD *)a5 + *(_QWORD *)(a5 + 8)); }
CommentTemplateToken: PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI LEA R12,[0x260920] ADD R12,0x10 MOV qword ptr [RDI],R12 MOV dword ptr [RDI + 0x8],0xc MOV RAX,qword ptr [RSI] MOV qword ptr [RDI + 0x10],RAX MOV RAX,qword ptr [RSI + 0x8] MOV qword ptr [RDI + 0x18],RAX TEST RAX,RAX JZ 0x001e03f3 MOV RDI,qword ptr [0x00261f98] CMP byte ptr [RDI],0x0 JZ 0x001e03ef INC dword ptr [RAX + 0x8] JMP 0x001e03f3 LAB_001e03ef: INC.LOCK dword ptr [RAX + 0x8] LAB_001e03f3: LEA R14,[RBX + 0x18] MOV RAX,qword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x20],RAX MOV dword ptr [RBX + 0x28],EDX MOV dword ptr [RBX + 0x2c],ECX LEA RAX,[0x2608d8] ADD RAX,0x10 MOV qword ptr [RBX],RAX LEA RDI,[RBX + 0x30] LEA RAX,[RBX + 0x40] MOV qword ptr [RBX + 0x30],RAX MOV RSI,qword ptr [R8] MOV RDX,qword ptr [R8 + 0x8] ADD RDX,RSI LAB_001e0429: CALL 0x001289c0 LAB_001e042e: ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
/* minja::CommentTemplateToken::CommentTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::__cxx11::string const&) */ void __thiscall minja::CommentTemplateToken::CommentTemplateToken (CommentTemplateToken *this,int8 *param_1,int4 param_3,int4 param_4, long *param_5) { long lVar1; *(int ***)this = &PTR__TemplateToken_00260930; *(int4 *)(this + 8) = 0xc; *(int8 *)(this + 0x10) = *param_1; lVar1 = param_1[1]; *(long *)(this + 0x18) = lVar1; if (lVar1 != 0) { if (*PTR___libc_single_threaded_00261f98 == '\0') { LOCK(); *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; UNLOCK(); } else { *(int *)(lVar1 + 8) = *(int *)(lVar1 + 8) + 1; } } *(int8 *)(this + 0x20) = param_1[2]; *(int4 *)(this + 0x28) = param_3; *(int4 *)(this + 0x2c) = param_4; *(int ***)this = &PTR__CommentTemplateToken_002608e8; *(CommentTemplateToken **)(this + 0x30) = this + 0x40; /* try { // try from 001e0429 to 001e042d has its CatchHandler @ 001e043a */ std::__cxx11::string::_M_construct<char*>(this + 0x30,*param_5,param_5[1] + *param_5); return; }
13,418
ggml_compute_forward_conv_2d_dw
ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp
void ggml_compute_forward_conv_2d_dw( const ggml_compute_params * params, ggml_tensor * dst) { const ggml_tensor * kernel = dst->src[0]; const ggml_tensor * src = dst->src[1]; ggml_conv_2d_dw_params p; p.channels = src->ne[2]; p.batch = src->ne[3]; p.src_w = src->ne[0]; p.src_h = src->ne[1]; p.dst_w = dst->ne[0]; p.dst_h = dst->ne[1]; p.knl_w = kernel->ne[0]; p.knl_h = kernel->ne[1]; p.stride_x = dst->op_params[0]; p.stride_y = dst->op_params[1]; p.pad_x = dst->op_params[2]; p.pad_y = dst->op_params[3]; p.dilation_x = dst->op_params[4]; p.dilation_y = dst->op_params[5]; GGML_ASSERT(kernel->ne[3] == p.channels); GGML_ASSERT(dst->ne[3] == p.batch); if (ggml_is_contiguous(src)) { ggml_compute_forward_conv_2d_dw_whcn(params, src, kernel, dst, p); } else if (ggml_is_contiguous_channels(src)) { // kernel should also have channels most contiguous in memory GGML_ASSERT(kernel->nb[0] >= kernel->nb[2] && kernel->nb[1] >= kernel->nb[0]); ggml_compute_forward_conv_2d_dw_cwhn(params, src, kernel, dst, p); } else { GGML_ABORT("non-contiguous memory layout not supported"); } }
O0
cpp
ggml_compute_forward_conv_2d_dw: subq $0x78, %rsp movq %rdi, 0x70(%rsp) movq %rsi, 0x68(%rsp) movq 0x68(%rsp), %rax movq 0x98(%rax), %rax movq %rax, 0x60(%rsp) movq 0x68(%rsp), %rax movq 0xa0(%rax), %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rax movq 0x20(%rax), %rax movq %rax, (%rsp) movq 0x58(%rsp), %rax movq 0x28(%rax), %rax movq %rax, 0x8(%rsp) movq 0x58(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x10(%rsp) movq 0x58(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x18(%rsp) movq 0x68(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x20(%rsp) movq 0x68(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x28(%rsp) movq 0x60(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x30(%rsp) movq 0x60(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x38(%rsp) movq 0x68(%rsp), %rax movl 0x54(%rax), %eax movl %eax, 0x40(%rsp) movq 0x68(%rsp), %rax movl 0x58(%rax), %eax movl %eax, 0x44(%rsp) movq 0x68(%rsp), %rax movl 0x5c(%rax), %eax movl %eax, 0x48(%rsp) movq 0x68(%rsp), %rax movl 0x60(%rax), %eax movl %eax, 0x4c(%rsp) movq 0x68(%rsp), %rax movl 0x64(%rax), %eax movl %eax, 0x50(%rsp) movq 0x68(%rsp), %rax movl 0x68(%rax), %eax movl %eax, 0x54(%rsp) movq 0x60(%rsp), %rax movq 0x28(%rax), %rax cmpq (%rsp), %rax je 0x9be67 leaq 0x1984b(%rip), %rdi # 0xb5698 movl $0x1851, %esi # imm = 0x1851 leaq 0xfb25(%rip), %rdx # 0xab97e leaq 0x19912(%rip), %rcx # 0xb5772 movb $0x0, %al callq 0x10660 movq 0x68(%rsp), %rax movq 0x28(%rax), %rax cmpq 0x8(%rsp), %rax je 0x9be98 leaq 0x1981a(%rip), %rdi # 0xb5698 movl $0x1852, %esi # imm = 0x1852 leaq 0xfaf4(%rip), %rdx # 0xab97e leaq 0x198fd(%rip), %rcx # 0xb578e movb $0x0, %al callq 0x10660 movq 0x58(%rsp), %rdi callq 0xf2c0 testb $0x1, %al jne 0x9bea8 jmp 0x9bec9 movq 0x70(%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x60(%rsp), %rdx movq 0x68(%rsp), %rcx movq %rsp, %r8 callq 0x9bf70 jmp 0x9bf5c movq 0x58(%rsp), %rdi callq 0xf1e0 testb $0x1, %al jne 0x9bed9 jmp 0x9bf40 movq 0x60(%rsp), %rax movq 0x30(%rax), %rax movq 0x60(%rsp), %rcx cmpq 0x40(%rcx), %rax jb 0x9bf01 movq 0x60(%rsp), %rax movq 0x38(%rax), %rax movq 0x60(%rsp), %rcx cmpq 0x30(%rcx), %rax jae 0x9bf22 leaq 0x19790(%rip), %rdi # 0xb5698 movl $0x1858, %esi # imm = 0x1858 leaq 0xfa6a(%rip), %rdx # 0xab97e leaq 0x19889(%rip), %rcx # 0xb57a4 movb $0x0, %al callq 0x10660 movq 0x70(%rsp), %rdi movq 0x58(%rsp), %rsi movq 0x60(%rsp), %rdx movq 0x68(%rsp), %rcx movq %rsp, %r8 callq 0x9c2e0 jmp 0x9bf5a leaq 0x19751(%rip), %rdi # 0xb5698 movl $0x185b, %esi # imm = 0x185B leaq 0x19892(%rip), %rdx # 0xb57e5 movb $0x0, %al callq 0x10660 jmp 0x9bf5c addq $0x78, %rsp retq nopw %cs:(%rax,%rax)
ggml_compute_forward_conv_2d_dw: sub rsp, 78h mov [rsp+78h+var_8], rdi mov [rsp+78h+var_10], rsi mov rax, [rsp+78h+var_10] mov rax, [rax+98h] mov [rsp+78h+var_18], rax mov rax, [rsp+78h+var_10] mov rax, [rax+0A0h] mov [rsp+78h+var_20], rax mov rax, [rsp+78h+var_20] mov rax, [rax+20h] mov [rsp+78h+var_78], rax mov rax, [rsp+78h+var_20] mov rax, [rax+28h] mov [rsp+78h+var_70], rax mov rax, [rsp+78h+var_20] mov rax, [rax+10h] mov [rsp+78h+var_68], rax mov rax, [rsp+78h+var_20] mov rax, [rax+18h] mov [rsp+78h+var_60], rax mov rax, [rsp+78h+var_10] mov rax, [rax+10h] mov [rsp+78h+var_58], rax mov rax, [rsp+78h+var_10] mov rax, [rax+18h] mov [rsp+78h+var_50], rax mov rax, [rsp+78h+var_18] mov rax, [rax+10h] mov [rsp+78h+var_48], rax mov rax, [rsp+78h+var_18] mov rax, [rax+18h] mov [rsp+78h+var_40], rax mov rax, [rsp+78h+var_10] mov eax, [rax+54h] mov [rsp+78h+var_38], eax mov rax, [rsp+78h+var_10] mov eax, [rax+58h] mov [rsp+78h+var_34], eax mov rax, [rsp+78h+var_10] mov eax, [rax+5Ch] mov [rsp+78h+var_30], eax mov rax, [rsp+78h+var_10] mov eax, [rax+60h] mov [rsp+78h+var_2C], eax mov rax, [rsp+78h+var_10] mov eax, [rax+64h] mov [rsp+78h+var_28], eax mov rax, [rsp+78h+var_10] mov eax, [rax+68h] mov [rsp+78h+var_24], eax mov rax, [rsp+78h+var_18] mov rax, [rax+28h] cmp rax, [rsp+78h+var_78] jz short loc_9BE67 lea rdi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"... mov esi, 1851h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKernelNe3PChan; "kernel->ne[3] == p.channels" mov al, 0 call _ggml_abort loc_9BE67: mov rax, [rsp+78h+var_10] mov rax, [rax+28h] cmp rax, [rsp+78h+var_70] jz short loc_9BE98 lea rdi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"... mov esi, 1852h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDstNe3PBatch; "dst->ne[3] == p.batch" mov al, 0 call _ggml_abort loc_9BE98: mov rdi, [rsp+78h+var_20] call _ggml_is_contiguous test al, 1 jnz short loc_9BEA8 jmp short loc_9BEC9 loc_9BEA8: mov rdi, [rsp+78h+var_8] mov rsi, [rsp+78h+var_20] mov rdx, [rsp+78h+var_18] mov rcx, [rsp+78h+var_10] mov r8, rsp call _ZL36ggml_compute_forward_conv_2d_dw_whcnPK19ggml_compute_paramsPK11ggml_tensorS4_PS2_RK22ggml_conv_2d_dw_params; ggml_compute_forward_conv_2d_dw_whcn(ggml_compute_params const*,ggml_tensor const*,ggml_tensor const*,ggml_tensor*,ggml_conv_2d_dw_params const&) jmp loc_9BF5C loc_9BEC9: mov rdi, [rsp+78h+var_20] call _ggml_is_contiguous_channels test al, 1 jnz short loc_9BED9 jmp short loc_9BF40 loc_9BED9: mov rax, [rsp+78h+var_18] mov rax, [rax+30h] mov rcx, [rsp+78h+var_18] cmp rax, [rcx+40h] jb short loc_9BF01 mov rax, [rsp+78h+var_18] mov rax, [rax+38h] mov rcx, [rsp+78h+var_18] cmp rax, [rcx+30h] jnb short loc_9BF22 loc_9BF01: lea rdi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"... mov esi, 1858h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aKernelNb0Kerne; "kernel->nb[0] >= kernel->nb[2] && kerne"... mov al, 0 call _ggml_abort loc_9BF22: mov rdi, [rsp+78h+var_8] mov rsi, [rsp+78h+var_20] mov rdx, [rsp+78h+var_18] mov rcx, [rsp+78h+var_10] mov r8, rsp call _ZL36ggml_compute_forward_conv_2d_dw_cwhnPK19ggml_compute_paramsPK11ggml_tensorS4_PS2_RK22ggml_conv_2d_dw_params; ggml_compute_forward_conv_2d_dw_cwhn(ggml_compute_params const*,ggml_tensor const*,ggml_tensor const*,ggml_tensor*,ggml_conv_2d_dw_params const&) jmp short loc_9BF5A loc_9BF40: lea rdi, aWorkspaceLlm4b_6; "/workspace/llm4binary/github/2025_star3"... mov esi, 185Bh lea rdx, aNonContiguousM; "non-contiguous memory layout not suppor"... mov al, 0 call _ggml_abort loc_9BF5A: jmp short $+2 loc_9BF5C: add rsp, 78h retn
double ggml_compute_forward_conv_2d_dw(long long a1, long long a2) { double result; // xmm0_8 long long v3; // [rsp+0h] [rbp-78h] BYREF long long v4; // [rsp+8h] [rbp-70h] long long v5; // [rsp+10h] [rbp-68h] long long v6; // [rsp+18h] [rbp-60h] long long v7; // [rsp+20h] [rbp-58h] long long v8; // [rsp+28h] [rbp-50h] long long v9; // [rsp+30h] [rbp-48h] long long v10; // [rsp+38h] [rbp-40h] int v11; // [rsp+40h] [rbp-38h] int v12; // [rsp+44h] [rbp-34h] int v13; // [rsp+48h] [rbp-30h] int v14; // [rsp+4Ch] [rbp-2Ch] int v15; // [rsp+50h] [rbp-28h] int v16; // [rsp+54h] [rbp-24h] _QWORD *v17; // [rsp+58h] [rbp-20h] _QWORD *v18; // [rsp+60h] [rbp-18h] long long v19; // [rsp+68h] [rbp-10h] long long v20; // [rsp+70h] [rbp-8h] v20 = a1; v19 = a2; v18 = *(_QWORD **)(a2 + 152); v17 = *(_QWORD **)(a2 + 160); v3 = v17[4]; v4 = v17[5]; v5 = v17[2]; v6 = v17[3]; v7 = *(_QWORD *)(a2 + 16); v8 = *(_QWORD *)(a2 + 24); v9 = v18[2]; v10 = v18[3]; v11 = *(_DWORD *)(a2 + 84); v12 = *(_DWORD *)(a2 + 88); v13 = *(_DWORD *)(a2 + 92); v14 = *(_DWORD *)(a2 + 96); v15 = *(_DWORD *)(a2 + 100); v16 = *(_DWORD *)(a2 + 104); if ( v18[5] != v3 ) result = ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 6225LL, "GGML_ASSERT(%s) failed", "kernel->ne[3] == p.channels"); if ( *(_QWORD *)(v19 + 40) != v4 ) result = ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 6226LL, "GGML_ASSERT(%s) failed", "dst->ne[3] == p.batch"); if ( (ggml_is_contiguous(v17) & 1) != 0 ) { ggml_compute_forward_conv_2d_dw_whcn(v20, v17, v18, v19, &v3); } else if ( (ggml_is_contiguous_channels(v17) & 1) != 0 ) { if ( v18[6] < v18[8] || v18[7] < v18[6] ) result = ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 6232LL, "GGML_ASSERT(%s) failed", "kernel->nb[0] >= kernel->nb[2] && kernel->nb[1] >= kernel->nb[0]"); ggml_compute_forward_conv_2d_dw_cwhn(v20, v17, v18, v19, &v3); } else { return ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp", 6235LL, "non-contiguous memory layout not supported"); } return result; }
ggml_compute_forward_conv_2d_dw: SUB RSP,0x78 MOV qword ptr [RSP + 0x70],RDI MOV qword ptr [RSP + 0x68],RSI MOV RAX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RAX + 0xa0] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP],RAX MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x30],RAX MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0x68] MOV EAX,dword ptr [RAX + 0x54] MOV dword ptr [RSP + 0x40],EAX MOV RAX,qword ptr [RSP + 0x68] MOV EAX,dword ptr [RAX + 0x58] MOV dword ptr [RSP + 0x44],EAX MOV RAX,qword ptr [RSP + 0x68] MOV EAX,dword ptr [RAX + 0x5c] MOV dword ptr [RSP + 0x48],EAX MOV RAX,qword ptr [RSP + 0x68] MOV EAX,dword ptr [RAX + 0x60] MOV dword ptr [RSP + 0x4c],EAX MOV RAX,qword ptr [RSP + 0x68] MOV EAX,dword ptr [RAX + 0x64] MOV dword ptr [RSP + 0x50],EAX MOV RAX,qword ptr [RSP + 0x68] MOV EAX,dword ptr [RAX + 0x68] MOV dword ptr [RSP + 0x54],EAX MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x28] CMP RAX,qword ptr [RSP] JZ 0x0019be67 LEA RDI,[0x1b5698] MOV ESI,0x1851 LEA RDX,[0x1ab97e] LEA RCX,[0x1b5772] MOV AL,0x0 CALL 0x00110660 LAB_0019be67: MOV RAX,qword ptr [RSP + 0x68] MOV RAX,qword ptr [RAX + 0x28] CMP RAX,qword ptr [RSP + 0x8] JZ 0x0019be98 LEA RDI,[0x1b5698] MOV ESI,0x1852 LEA RDX,[0x1ab97e] LEA RCX,[0x1b578e] MOV AL,0x0 CALL 0x00110660 LAB_0019be98: MOV RDI,qword ptr [RSP + 0x58] CALL 0x0010f2c0 TEST AL,0x1 JNZ 0x0019bea8 JMP 0x0019bec9 LAB_0019bea8: MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RSP + 0x68] MOV R8,RSP CALL 0x0019bf70 JMP 0x0019bf5c LAB_0019bec9: MOV RDI,qword ptr [RSP + 0x58] CALL 0x0010f1e0 TEST AL,0x1 JNZ 0x0019bed9 JMP 0x0019bf40 LAB_0019bed9: MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x30] MOV RCX,qword ptr [RSP + 0x60] CMP RAX,qword ptr [RCX + 0x40] JC 0x0019bf01 MOV RAX,qword ptr [RSP + 0x60] MOV RAX,qword ptr [RAX + 0x38] MOV RCX,qword ptr [RSP + 0x60] CMP RAX,qword ptr [RCX + 0x30] JNC 0x0019bf22 LAB_0019bf01: LEA RDI,[0x1b5698] MOV ESI,0x1858 LEA RDX,[0x1ab97e] LEA RCX,[0x1b57a4] MOV AL,0x0 CALL 0x00110660 LAB_0019bf22: MOV RDI,qword ptr [RSP + 0x70] MOV RSI,qword ptr [RSP + 0x58] MOV RDX,qword ptr [RSP + 0x60] MOV RCX,qword ptr [RSP + 0x68] MOV R8,RSP CALL 0x0019c2e0 JMP 0x0019bf5a LAB_0019bf40: LEA RDI,[0x1b5698] MOV ESI,0x185b LEA RDX,[0x1b57e5] MOV AL,0x0 CALL 0x00110660 LAB_0019bf5a: JMP 0x0019bf5c LAB_0019bf5c: ADD RSP,0x78 RET
void ggml_compute_forward_conv_2d_dw(ggml_compute_params *param_1,ggml_tensor *param_2) { ulong uVar1; long local_78; long local_70; int8 local_68; int8 local_60; int8 local_58; int8 local_50; int8 local_48; int8 local_40; int4 local_38; int4 local_34; int4 local_30; int4 local_2c; int4 local_28; int4 local_24; ggml_tensor *local_20; ggml_tensor *local_18; ggml_tensor *local_10; ggml_compute_params *local_8; local_18 = *(ggml_tensor **)(param_2 + 0x98); local_20 = *(ggml_tensor **)(param_2 + 0xa0); local_78 = *(long *)(local_20 + 0x20); local_70 = *(long *)(local_20 + 0x28); local_68 = *(int8 *)(local_20 + 0x10); local_60 = *(int8 *)(local_20 + 0x18); local_58 = *(int8 *)(param_2 + 0x10); local_50 = *(int8 *)(param_2 + 0x18); local_48 = *(int8 *)(local_18 + 0x10); local_40 = *(int8 *)(local_18 + 0x18); local_38 = *(int4 *)(param_2 + 0x54); local_34 = *(int4 *)(param_2 + 0x58); local_30 = *(int4 *)(param_2 + 0x5c); local_2c = *(int4 *)(param_2 + 0x60); local_28 = *(int4 *)(param_2 + 100); local_24 = *(int4 *)(param_2 + 0x68); local_10 = param_2; local_8 = param_1; if (*(long *)(local_18 + 0x28) != local_78) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp" ,0x1851,"GGML_ASSERT(%s) failed","kernel->ne[3] == p.channels"); } if (*(long *)(local_10 + 0x28) != local_70) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp" ,0x1852,"GGML_ASSERT(%s) failed","dst->ne[3] == p.batch"); } uVar1 = ggml_is_contiguous(local_20); if ((uVar1 & 1) == 0) { uVar1 = ggml_is_contiguous_channels(local_20); if ((uVar1 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp" ,0x185b,"non-contiguous memory layout not supported"); } else { if ((*(ulong *)(local_18 + 0x30) < *(ulong *)(local_18 + 0x40)) || (*(ulong *)(local_18 + 0x38) < *(ulong *)(local_18 + 0x30))) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml-cpu/ops.cpp" ,0x1858,"GGML_ASSERT(%s) failed", "kernel->nb[0] >= kernel->nb[2] && kernel->nb[1] >= kernel->nb[0]"); } ggml_compute_forward_conv_2d_dw_cwhn (local_8,local_20,local_18,local_10,(ggml_conv_2d_dw_params *)&local_78); } } else { ggml_compute_forward_conv_2d_dw_whcn (local_8,local_20,local_18,local_10,(ggml_conv_2d_dw_params *)&local_78); } return; }
13,419
my_strnncollsp_nchars_binary
eloqsql/strings/ctype-bin.c
static int my_strnncollsp_nchars_binary(CHARSET_INFO * cs __attribute__((unused)), const uchar *s, size_t slen, const uchar *t, size_t tlen, size_t nchars) { set_if_smaller(slen, nchars); set_if_smaller(tlen, nchars); return my_strnncoll_binary(cs, s, slen, t, tlen, 0); }
O3
c
my_strnncollsp_nchars_binary: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %r9, %rbx movq %rdx, %r14 cmpq %r9, %rdx cmovaeq %r9, %r14 movq %rsi, %rdi cmpq %r9, %r8 cmovbq %r8, %rbx cmpq %rbx, %r14 movq %rbx, %rdx cmovbq %r14, %rdx movq %rcx, %rsi callq 0x29860 subl %ebx, %r14d testl %eax, %eax cmovel %r14d, %eax popq %rbx popq %r14 popq %rbp retq nop
my_strnncollsp_nchars_binary: push rbp mov rbp, rsp push r14 push rbx mov rbx, r9 mov r14, rdx cmp rdx, r9 cmovnb r14, r9 mov rdi, rsi cmp r8, r9 cmovb rbx, r8 cmp r14, rbx mov rdx, rbx cmovb rdx, r14 mov rsi, rcx call _memcmp sub r14d, ebx test eax, eax cmovz eax, r14d pop rbx pop r14 pop rbp retn
long long my_strnncollsp_nchars_binary( long long a1, long long a2, unsigned long long a3, long long a4, unsigned long long a5, unsigned long long a6) { unsigned long long v6; // rbx unsigned long long v7; // r14 unsigned long long v8; // rdx long long result; // rax unsigned int v10; // r14d v6 = a6; v7 = a3; if ( a3 >= a6 ) v7 = a6; if ( a5 < a6 ) v6 = a5; v8 = v6; if ( v7 < v6 ) v8 = v7; result = memcmp(a2, a4, v8); v10 = v7 - v6; if ( !(_DWORD)result ) return v10; return result; }
my_strnncollsp_nchars_binary: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,R9 MOV R14,RDX CMP RDX,R9 CMOVNC R14,R9 MOV RDI,RSI CMP R8,R9 CMOVC RBX,R8 CMP R14,RBX MOV RDX,RBX CMOVC RDX,R14 MOV RSI,RCX CALL 0x00129860 SUB R14D,EBX TEST EAX,EAX CMOVZ EAX,R14D POP RBX POP R14 POP RBP RET
int my_strnncollsp_nchars_binary (int8 param_1,void *param_2,ulong param_3,void *param_4,ulong param_5, ulong param_6) { int iVar1; ulong __n; if (param_6 <= param_3) { param_3 = param_6; } if (param_5 < param_6) { param_6 = param_5; } __n = param_6; if (param_3 < param_6) { __n = param_3; } iVar1 = memcmp(param_2,param_4,__n); if (iVar1 == 0) { iVar1 = (int)param_3 - (int)param_6; } return iVar1; }
13,420
aimrt::configurator::ConfiguratorRef::GetConfigFilePath() const
aimrt_mujoco_sim/_deps/aimrt-src/src/interface/aimrt_module_cpp_interface/../aimrt_module_cpp_interface/configurator/configurator.h
std::string_view GetConfigFilePath() const { AIMRT_ASSERT(base_ptr_, "Reference is null."); return aimrt::util::ToStdStringView(base_ptr_->config_file_path(base_ptr_->impl)); }
O0
c
aimrt::configurator::ConfiguratorRef::GetConfigFilePath() const: subq $0x128, %rsp # imm = 0x128 movq %rdi, 0x78(%rsp) movq 0x78(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rax cmpq $0x0, (%rax) jne 0xd730c movb $0x1, 0x3b(%rsp) movl $0x28, %edi callq 0x8e630 movq %rax, 0x8(%rsp) leaq 0x30658a(%rip), %rax # 0x3dd6da movq %rax, 0x48(%rsp) movq $0x12, 0x50(%rsp) movq 0x48(%rsp), %rcx movq 0x50(%rsp), %rax leaq 0x58(%rsp), %rdx movq %rdx, 0xd0(%rsp) movq %rcx, 0xc0(%rsp) movq %rax, 0xc8(%rsp) leaq 0xc0(%rsp), %rax movq %rax, 0xd8(%rsp) movq 0xd8(%rsp), %rax movups (%rax), %xmm0 movaps %xmm0, 0xe0(%rsp) movq 0xe0(%rsp), %rcx movq 0xe8(%rsp), %rax movq %rcx, 0xb0(%rsp) movq %rax, 0xb8(%rsp) callq 0x9e310 movq %rdx, 0x10(%rsp) movq %rax, 0x18(%rsp) jmp 0xd71d9 movq 0x10(%rsp), %rax movq 0x18(%rsp), %rcx movq %rcx, 0x90(%rsp) movq %rax, 0x98(%rsp) leaq 0xa0(%rsp), %rax movq %rax, 0x100(%rsp) leaq 0x90(%rsp), %rax movq %rax, 0xf8(%rsp) movq 0x100(%rsp), %rcx movq 0xf8(%rsp), %rax movq %rax, 0x108(%rsp) movq 0x108(%rsp), %rax movq %rcx, 0x120(%rsp) movq $0x0, 0x118(%rsp) movq %rax, 0x110(%rsp) movq 0x120(%rsp), %rax movq 0x118(%rsp), %rcx movq %rcx, (%rax) movq 0x110(%rsp), %rcx movq %rcx, 0x8(%rax) movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx movq 0xa0(%rsp), %rcx movq 0xa8(%rsp), %r8 leaq 0x58(%rsp), %rdi callq 0x9e1d0 jmp 0xd729a jmp 0xd729c movq 0x8(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0x9e120 jmp 0xd72ad movq 0x8(%rsp), %rdi movb $0x0, 0x3b(%rsp) leaq 0x422562(%rip), %rsi # 0x4f9820 leaq -0x39155(%rip), %rdx # 0x9e170 callq 0x90860 jmp 0xd736a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x40(%rsp) movl %eax, 0x3c(%rsp) jmp 0xd72f7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x40(%rsp) movl %eax, 0x3c(%rsp) leaq 0x58(%rsp), %rdi callq 0x96fb8 testb $0x1, 0x3b(%rsp) jne 0xd7300 jmp 0xd730a movq 0x8(%rsp), %rdi callq 0x93710 jmp 0xd7360 jmp 0xd730e movq 0x20(%rsp), %rax movq (%rax), %rcx movq (%rcx), %rax movq 0x8(%rcx), %rdi callq *%rax movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rdi movq 0x30(%rsp), %rsi callq 0x9cdb0 movq %rax, 0x80(%rsp) movq %rdx, 0x88(%rsp) movq 0x80(%rsp), %rax movq 0x88(%rsp), %rdx addq $0x128, %rsp # imm = 0x128 retq movq 0x40(%rsp), %rdi callq 0x90db0 nopw (%rax,%rax)
_ZNK5aimrt12configurator15ConfiguratorRef17GetConfigFilePathEv: sub rsp, 128h mov [rsp+128h+var_B0], rdi mov rax, [rsp+128h+var_B0] mov [rsp+128h+var_108], rax mov rax, [rsp+128h+var_108] cmp qword ptr [rax], 0 jnz loc_D730C mov [rsp+128h+var_ED], 1 mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov [rsp+128h+var_120], rax lea rax, aReferenceIsNul; "Reference is null." mov [rsp+128h+var_E0], rax mov [rsp+128h+var_D8], 12h mov rcx, [rsp+128h+var_E0] mov rax, [rsp+128h+var_D8] lea rdx, [rsp+128h+var_D0] mov [rsp+128h+var_58], rdx mov [rsp+128h+var_68], rcx mov [rsp+128h+var_60], rax lea rax, [rsp+128h+var_68] mov [rsp+128h+var_50], rax mov rax, [rsp+128h+var_50] movups xmm0, xmmword ptr [rax] movaps [rsp+128h+var_48], xmm0 mov rcx, qword ptr [rsp+128h+var_48] mov rax, qword ptr [rsp+128h+var_48+8] mov [rsp+128h+var_78], rcx mov [rsp+128h+var_70], rax call _ZN3fmt3v1016make_format_argsINS0_20basic_format_contextINS0_8appenderEcEEJEEENS0_16format_arg_storeIT_JDpNSt9remove_cvINSt16remove_referenceIT0_E4typeEE4typeEEEEDpRS9_ mov [rsp+128h+var_118], rdx mov [rsp+128h+var_110], rax jmp short $+2 loc_D71D9: mov rax, [rsp+128h+var_118] mov rcx, [rsp+128h+var_110] mov [rsp+128h+var_98], rcx mov [rsp+128h+var_90], rax lea rax, [rsp+128h+var_88] mov [rsp+128h+var_28], rax lea rax, [rsp+128h+var_98] mov [rsp+128h+var_30], rax mov rcx, [rsp+128h+var_28] mov rax, [rsp+128h+var_30] mov [rsp+128h+var_20], rax mov rax, [rsp+128h+var_20] mov [rsp+128h+var_8], rcx mov [rsp+128h+var_10], 0 mov [rsp+128h+var_18], rax mov rax, [rsp+128h+var_8] mov rcx, [rsp+128h+var_10] mov [rax], rcx mov rcx, [rsp+128h+var_18] mov [rax+8], rcx mov rsi, [rsp+128h+var_78] mov rdx, [rsp+128h+var_70] mov rcx, [rsp+128h+var_88] mov r8, [rsp+128h+var_80] lea rdi, [rsp+128h+var_D0] call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>) jmp short $+2 loc_D729A: jmp short $+2 loc_D729C: mov rdi, [rsp+128h+var_120] lea rsi, [rsp+128h+var_D0] call _ZN5aimrt6common4util14AimRTExceptionC2IJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEQsr3stdE18constructible_fromIS9_DpT_EEEDpOSA_ jmp short $+2 loc_D72AD: mov rdi, [rsp+128h+var_120]; void * mov [rsp+128h+var_ED], 0 lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *) call ___cxa_throw jmp loc_D736A mov rcx, rax mov eax, edx mov [rsp+arg_38], rcx mov [rsp+arg_34], eax jmp short loc_D72F7 mov rcx, rax mov eax, edx mov [rsp+arg_38], rcx mov [rsp+arg_34], eax lea rdi, [rsp+arg_50]; void * call j__ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_D72F7: test [rsp+arg_33], 1 jnz short loc_D7300 jmp short loc_D730A loc_D7300: mov rdi, [rsp+arg_0]; void * call ___cxa_free_exception loc_D730A: jmp short loc_D7360 loc_D730C: jmp short $+2 loc_D730E: mov rax, [rsp+128h+var_108] mov rcx, [rax] mov rax, [rcx] mov rdi, [rcx+8] call rax mov [rsp+128h+var_100], rax mov [rsp+128h+var_F8], rdx mov rdi, [rsp+128h+var_100] mov rsi, [rsp+128h+var_F8] call _ZN5aimrt4util15ToStdStringViewE19aimrt_string_view_t; aimrt::util::ToStdStringView(aimrt_string_view_t) mov [rsp+128h+var_A8], rax mov [rsp+128h+var_A0], rdx mov rax, [rsp+128h+var_A8] mov rdx, [rsp+128h+var_A0] add rsp, 128h retn loc_D7360: mov rdi, [rsp+arg_38] call __Unwind_Resume loc_D736A: nop word ptr [rax+rax+00h]
long long aimrt::configurator::ConfiguratorRef::GetConfigFilePath(aimrt::configurator::ConfiguratorRef *this) { long long v1; // rdx long long v2; // rdx std::exception *exception; // [rsp+8h] [rbp-120h] long long v5; // [rsp+28h] [rbp-100h] _BYTE v6[32]; // [rsp+58h] [rbp-D0h] BYREF aimrt::configurator::ConfiguratorRef *v7; // [rsp+78h] [rbp-B0h] _QWORD v8[2]; // [rsp+90h] [rbp-98h] BYREF _QWORD v9[2]; // [rsp+A0h] [rbp-88h] BYREF __int128 v10; // [rsp+B0h] [rbp-78h] __int128 v11; // [rsp+C0h] [rbp-68h] BYREF _BYTE *v12; // [rsp+D0h] [rbp-58h] __int128 *v13; // [rsp+D8h] [rbp-50h] __int128 v14; // [rsp+E0h] [rbp-48h] _QWORD *v15; // [rsp+F8h] [rbp-30h] _QWORD *v16; // [rsp+100h] [rbp-28h] _QWORD *v17; // [rsp+108h] [rbp-20h] _QWORD *v18; // [rsp+110h] [rbp-18h] long long v19; // [rsp+118h] [rbp-10h] _QWORD *v20; // [rsp+120h] [rbp-8h] v7 = this; if ( !*(_QWORD *)this ) { exception = (std::exception *)__cxa_allocate_exception(0x28uLL); v12 = v6; *(_QWORD *)&v11 = "Reference is null."; *((_QWORD *)&v11 + 1) = 18LL; v13 = &v11; v14 = v11; v10 = v11; v8[0] = fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>(); v8[1] = v1; v16 = v9; v15 = v8; v17 = v8; v20 = v9; v19 = 0LL; v18 = v8; v9[0] = 0LL; v9[1] = v8; fmt::v10::vformat[abi:cxx11]((long long)v6, v10, *((long long *)&v10 + 1), 0LL, (long long)v8); ZN5aimrt6common4util14AimRTExceptionC2IJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEQsr3stdE18constructible_fromIS9_DpT_EEEDpOSA_( exception, (long long)v6); __cxa_throw( exception, (struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException, (void (*)(void *))aimrt::common::util::AimRTException::~AimRTException); } v5 = (**(long long ( ***)(_QWORD))this)(*(_QWORD *)(*(_QWORD *)this + 8LL)); return aimrt::util::ToStdStringView(v5, v2); }
GetConfigFilePath: SUB RSP,0x128 MOV qword ptr [RSP + 0x78],RDI MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x20] CMP qword ptr [RAX],0x0 JNZ 0x001d730c MOV byte ptr [RSP + 0x3b],0x1 MOV EDI,0x28 CALL 0x0018e630 MOV qword ptr [RSP + 0x8],RAX LEA RAX,[0x4dd6da] MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],0x12 MOV RCX,qword ptr [RSP + 0x48] MOV RAX,qword ptr [RSP + 0x50] LEA RDX,[RSP + 0x58] MOV qword ptr [RSP + 0xd0],RDX MOV qword ptr [RSP + 0xc0],RCX MOV qword ptr [RSP + 0xc8],RAX LEA RAX,[RSP + 0xc0] MOV qword ptr [RSP + 0xd8],RAX MOV RAX,qword ptr [RSP + 0xd8] MOVUPS XMM0,xmmword ptr [RAX] MOVAPS xmmword ptr [RSP + 0xe0],XMM0 MOV RCX,qword ptr [RSP + 0xe0] MOV RAX,qword ptr [RSP + 0xe8] MOV qword ptr [RSP + 0xb0],RCX MOV qword ptr [RSP + 0xb8],RAX LAB_001d71c8: CALL 0x0019e310 MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RSP + 0x18],RAX JMP 0x001d71d9 LAB_001d71d9: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x90],RCX MOV qword ptr [RSP + 0x98],RAX LEA RAX,[RSP + 0xa0] MOV qword ptr [RSP + 0x100],RAX LEA RAX,[RSP + 0x90] MOV qword ptr [RSP + 0xf8],RAX MOV RCX,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RSP + 0xf8] MOV qword ptr [RSP + 0x108],RAX MOV RAX,qword ptr [RSP + 0x108] MOV qword ptr [RSP + 0x120],RCX MOV qword ptr [RSP + 0x118],0x0 MOV qword ptr [RSP + 0x110],RAX MOV RAX,qword ptr [RSP + 0x120] MOV RCX,qword ptr [RSP + 0x118] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x110] MOV qword ptr [RAX + 0x8],RCX MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] MOV RCX,qword ptr [RSP + 0xa0] MOV R8,qword ptr [RSP + 0xa8] LEA RDI,[RSP + 0x58] CALL 0x0019e1d0 JMP 0x001d729a LAB_001d729a: JMP 0x001d729c LAB_001d729c: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0x58] CALL 0x0019e120 JMP 0x001d72ad LAB_001d72ad: MOV RDI,qword ptr [RSP + 0x8] MOV byte ptr [RSP + 0x3b],0x0 LEA RSI,[0x5f9820] LEA RDX,[0x19e170] CALL 0x00190860 LAB_001d730c: JMP 0x001d730e LAB_001d730e: MOV RAX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RCX] MOV RDI,qword ptr [RCX + 0x8] CALL RAX MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RDI,qword ptr [RSP + 0x28] MOV RSI,qword ptr [RSP + 0x30] CALL 0x0019cdb0 MOV qword ptr [RSP + 0x80],RAX MOV qword ptr [RSP + 0x88],RDX MOV RAX,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] ADD RSP,0x128 RET
/* WARNING: Restarted to delay deadcode elimination for space: stack */ /* aimrt::configurator::ConfiguratorRef::GetConfigFilePath() const */ int1 [16] __thiscall aimrt::configurator::ConfiguratorRef::GetConfigFilePath(ConfiguratorRef *this) { int8 uVar1; int1 auVar2 [16]; int1 local_d0 [32]; ConfiguratorRef *local_b0; int1 local_98 [16]; int1 local_88 [16]; char *local_78; int8 local_70; char *local_68; int8 uStack_60; int1 *local_58; char **local_50; char *local_48; int8 uStack_40; int1 *local_30; int1 *local_28; int1 *local_20; int1 *local_18; int8 local_10; int1 *local_8; local_b0 = this; if (*(long *)this == 0) { uVar1 = __cxa_allocate_exception(0x28); local_58 = local_d0; local_68 = "Reference is null."; uStack_60 = 0x12; local_50 = &local_68; local_78 = "Reference is null."; local_70 = 0x12; local_48 = local_78; uStack_40 = local_70; /* try { // try from 001d71c8 to 001d7297 has its CatchHandler @ 001d72cf */ local_98 = fmt::v10::make_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>() ; local_28 = local_88; local_30 = local_98; local_10 = 0; local_20 = local_30; local_18 = local_30; local_8 = local_28; fmt::v10::vformat_abi_cxx11_(local_d0,local_78,local_70,0,local_30); /* try { // try from 001d729c to 001d72c9 has its CatchHandler @ 001d72df */ _ZN5aimrt6common4util14AimRTExceptionC2IJNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEQsr3stdE18constructible_fromIS9_DpT_EEEDpOSA_ (uVar1,local_d0); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&common::util::AimRTException::typeinfo, common::util::AimRTException::~AimRTException); } auVar2 = (*(code *)**(int8 **)this)((*(int8 **)this)[1]); auVar2 = util::ToStdStringView(auVar2._0_8_,auVar2._8_8_); return auVar2; }
13,421
aimrt::configurator::ConfiguratorRef::GetConfigFilePath() const
aimrt_mujoco_sim/_deps/aimrt-src/src/interface/aimrt_module_cpp_interface/../aimrt_module_cpp_interface/configurator/configurator.h
std::string_view GetConfigFilePath() const { AIMRT_ASSERT(base_ptr_, "Reference is null."); return aimrt::util::ToStdStringView(base_ptr_->config_file_path(base_ptr_->impl)); }
O3
c
aimrt::configurator::ConfiguratorRef::GetConfigFilePath() const: pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq (%rdi), %rax testq %rax, %rax je 0x45ab0 movq 0x8(%rax), %rdi callq *(%rax) movq %rax, %rcx movq %rdx, %rax movq %rcx, %rdx addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movl $0x28, %edi callq 0x2c800 movq %rax, %rbx leaq 0x11bb55(%rip), %rsi # 0x161619 movq %rsp, %rdi leaq 0x20(%rsp), %r8 movl $0x12, %edx xorl %ecx, %ecx callq 0x34203 leaq 0x1c2e09(%rip), %rax # 0x2088e8 movq %rax, (%rbx) movq %rbx, %rax addq $0x18, %rax movq %rax, 0x8(%rbx) leaq 0x10(%rsp), %r15 movq -0x10(%r15), %rcx cmpq %r15, %rcx jne 0x45b04 movups (%r15), %xmm0 movups %xmm0, (%rax) jmp 0x45b11 movq %rcx, 0x8(%rbx) movq 0x10(%rsp), %rax movq %rax, 0x18(%rbx) movq 0x8(%rsp), %rax movq %rax, 0x10(%rbx) movq %r15, (%rsp) movq $0x0, 0x8(%rsp) movb $0x0, 0x10(%rsp) leaq 0x1c2c4d(%rip), %rsi # 0x208780 leaq -0x11966(%rip), %rdx # 0x341d4 movq %rbx, %rdi callq 0x2e0f0 movq %rax, %r14 movq (%rsp), %rdi cmpq %r15, %rdi je 0x45b68 movq 0x10(%rsp), %rsi incq %rsi callq 0x2d2d0 jmp 0x45b68 movq %rax, %r14 movq %rbx, %rdi callq 0x2cc80 movq %r14, %rdi callq 0x2e220
_ZNK5aimrt12configurator15ConfiguratorRef17GetConfigFilePathEv: push r15 push r14 push rbx sub rsp, 30h mov rax, [rdi] test rax, rax jz short loc_45AB0 mov rdi, [rax+8] call qword ptr [rax] mov rcx, rax mov rax, rdx mov rdx, rcx add rsp, 30h pop rbx pop r14 pop r15 retn loc_45AB0: mov edi, 28h ; '('; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aReferenceIsNul; "Reference is null." mov rdi, rsp; int lea r8, [rsp+48h+var_28]; int mov edx, 12h; int xor ecx, ecx; int call _ZN3fmt3v107vformatB5cxx11ENS0_17basic_string_viewIcEENS0_17basic_format_argsINS0_20basic_format_contextINS0_8appenderEcEEEE; fmt::v10::vformat(fmt::v10::basic_string_view<char>,fmt::v10::basic_format_args<fmt::v10::basic_format_context<fmt::v10::appender,char>>) lea rax, off_2088E8 mov [rbx], rax mov rax, rbx add rax, 18h mov [rbx+8], rax lea r15, [rsp+48h+var_38] mov rcx, [r15-10h] cmp rcx, r15 jnz short loc_45B04 movups xmm0, xmmword ptr [r15] movups xmmword ptr [rax], xmm0 jmp short loc_45B11 loc_45B04: mov [rbx+8], rcx mov rax, [rsp+48h+var_38] mov [rbx+18h], rax loc_45B11: mov rax, [rsp+48h+var_40] mov [rbx+10h], rax mov [rsp+48h+var_48], r15 mov [rsp+48h+var_40], 0 mov byte ptr [rsp+48h+var_38], 0 lea rsi, _ZTIN5aimrt6common4util14AimRTExceptionE; lptinfo lea rdx, _ZN5aimrt6common4util14AimRTExceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, [rsp+48h+var_48]; void * cmp rdi, r15 jz short loc_45B68 mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_45B68 mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception loc_45B68: mov rdi, r14 call __Unwind_Resume
long long aimrt::configurator::ConfiguratorRef::GetConfigFilePath(aimrt::configurator::ConfiguratorRef *this) { long long v1; // rdx char *exception; // rbx void *v4; // [rsp+0h] [rbp-48h] BYREF long long v5; // [rsp+8h] [rbp-40h] __int128 v6; // [rsp+10h] [rbp-38h] BYREF if ( !*(_QWORD *)this ) { exception = (char *)__cxa_allocate_exception(0x28uLL); fmt::v10::vformat[abi:cxx11](&v4); *(_QWORD *)exception = off_2088E8; *((_QWORD *)exception + 1) = exception + 24; if ( v4 == &v6 ) { *(_OWORD *)(exception + 24) = v6; } else { *((_QWORD *)exception + 1) = v4; *((_QWORD *)exception + 3) = v6; } *((_QWORD *)exception + 2) = v5; v4 = &v6; v5 = 0LL; LOBYTE(v6) = 0; __cxa_throw( exception, (struct type_info *)&`typeinfo for'aimrt::common::util::AimRTException, (void (*)(void *))aimrt::common::util::AimRTException::~AimRTException); } (**(void ( ***)(_QWORD))this)(*(_QWORD *)(*(_QWORD *)this + 8LL)); return v1; }
GetConfigFilePath: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x00145ab0 MOV RDI,qword ptr [RAX + 0x8] CALL qword ptr [RAX] MOV RCX,RAX MOV RAX,RDX MOV RDX,RCX ADD RSP,0x30 POP RBX POP R14 POP R15 RET LAB_00145ab0: MOV EDI,0x28 CALL 0x0012c800 MOV RBX,RAX LAB_00145abd: LEA RSI,[0x261619] MOV RDI,RSP LEA R8,[RSP + 0x20] MOV EDX,0x12 XOR ECX,ECX CALL 0x00134203 LEA RAX,[0x3088e8] MOV qword ptr [RBX],RAX MOV RAX,RBX ADD RAX,0x18 MOV qword ptr [RBX + 0x8],RAX LEA R15,[RSP + 0x10] MOV RCX,qword ptr [R15 + -0x10] CMP RCX,R15 JNZ 0x00145b04 MOVUPS XMM0,xmmword ptr [R15] MOVUPS xmmword ptr [RAX],XMM0 JMP 0x00145b11 LAB_00145b04: MOV qword ptr [RBX + 0x8],RCX MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RBX + 0x18],RAX LAB_00145b11: MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RBX + 0x10],RAX MOV qword ptr [RSP],R15 MOV qword ptr [RSP + 0x8],0x0 MOV byte ptr [RSP + 0x10],0x0 LAB_00145b2c: LEA RSI,[0x308780] LEA RDX,[0x1341d4] MOV RDI,RBX CALL 0x0012e0f0
/* aimrt::configurator::ConfiguratorRef::GetConfigFilePath() const */ int1 [16] __thiscall aimrt::configurator::ConfiguratorRef::GetConfigFilePath(ConfiguratorRef *this) { int8 *puVar1; int1 auVar2 [16]; uint *local_48; int8 local_40; uint local_38; int4 uStack_34; int4 uStack_30; int4 uStack_2c; int1 local_28 [16]; puVar1 = *(int8 **)this; if (puVar1 != (int8 *)0x0) { auVar2 = (*(code *)*puVar1)(puVar1[1]); return auVar2; } puVar1 = (int8 *)__cxa_allocate_exception(0x28); /* try { // try from 00145abd to 00145ad7 has its CatchHandler @ 00145b5d */ fmt::v10::vformat_abi_cxx11_(&local_48,"Reference is null.",0x12,0,local_28); *puVar1 = &PTR__AimRTException_003088e8; puVar1[1] = puVar1 + 3; if (local_48 == &local_38) { *(uint *)(puVar1 + 3) = local_38; *(int4 *)((long)puVar1 + 0x1c) = uStack_34; *(int4 *)(puVar1 + 4) = uStack_30; *(int4 *)((long)puVar1 + 0x24) = uStack_2c; } else { puVar1[1] = local_48; puVar1[3] = CONCAT44(uStack_34,local_38); } puVar1[2] = local_40; local_40 = 0; local_38 = local_38 & 0xffffff00; local_48 = &local_38; /* try { // try from 00145b2c to 00145b41 has its CatchHandler @ 00145b42 */ /* WARNING: Subroutine does not return */ __cxa_throw(puVar1,&common::util::AimRTException::typeinfo, common::util::AimRTException::~AimRTException); }
13,422
bchange
eloqsql/strings/bchange.c
void bchange(register uchar *dst, size_t old_length, register const uchar *src, size_t new_length, size_t tot_length) { size_t rest=tot_length-old_length; if (old_length < new_length) bmove_upp(dst+rest+new_length,dst+tot_length,rest); else bmove(dst+new_length,dst+old_length,rest); memcpy(dst,src,new_length); }
O0
c
bchange: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq -0x28(%rbp), %rax subq -0x10(%rbp), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax cmpq -0x20(%rbp), %rax jae 0x36471 movq -0x8(%rbp), %rdi addq -0x30(%rbp), %rdi addq -0x20(%rbp), %rdi movq -0x8(%rbp), %rsi addq -0x28(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x364b0 jmp 0x3648a movq -0x8(%rbp), %rdi addq -0x20(%rbp), %rdi movq -0x8(%rbp), %rsi addq -0x10(%rbp), %rsi movq -0x30(%rbp), %rdx callq 0x24510 movq -0x8(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rdx callq 0x24230 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
bchange: push rbp mov rbp, rsp sub rsp, 30h 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_28] sub rax, [rbp+var_10] mov [rbp+var_30], rax mov rax, [rbp+var_10] cmp rax, [rbp+var_20] jnb short loc_36471 mov rdi, [rbp+var_8] add rdi, [rbp+var_30] add rdi, [rbp+var_20] mov rsi, [rbp+var_8] add rsi, [rbp+var_28] mov rdx, [rbp+var_30] call bmove_upp jmp short loc_3648A loc_36471: mov rdi, [rbp+var_8] add rdi, [rbp+var_20] mov rsi, [rbp+var_8] add rsi, [rbp+var_10] mov rdx, [rbp+var_30] call _memmove loc_3648A: mov rdi, [rbp+var_8] mov rsi, [rbp+var_18] mov rdx, [rbp+var_20] call _memcpy add rsp, 30h pop rbp retn
long long bchange(long long a1, unsigned long long a2, long long a3, unsigned long long a4, long long a5) { long long v6; // [rsp+0h] [rbp-30h] v6 = a5 - a2; if ( a2 >= a4 ) memmove(a4 + a1, a2 + a1, v6); else bmove_upp(a4 + v6 + a1, a5 + a1, v6); return memcpy(a1, a3, a4); }
bchange: 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 qword ptr [RBP + -0x20],RCX MOV qword ptr [RBP + -0x28],R8 MOV RAX,qword ptr [RBP + -0x28] SUB RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x20] JNC 0x00136471 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,qword ptr [RBP + -0x30] ADD RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,qword ptr [RBP + -0x28] MOV RDX,qword ptr [RBP + -0x30] CALL 0x001364b0 JMP 0x0013648a LAB_00136471: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x30] CALL 0x00124510 LAB_0013648a: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] CALL 0x00124230 ADD RSP,0x30 POP RBP RET
void bchange(void *param_1,ulong param_2,void *param_3,ulong param_4,long param_5) { size_t __n; __n = param_5 - param_2; if (param_2 < param_4) { bmove_upp((long)param_1 + param_4 + __n,(long)param_1 + param_5,__n); } else { memmove((void *)((long)param_1 + param_4),(void *)((long)param_1 + param_2),__n); } memcpy(param_1,param_3,param_4); return; }
13,423
protocol::encode(protocol::GenericSound const&, unsigned int)
untodesu[P]voxelius/game/shared/protocol.cc
ENetPacket *protocol::encode(const protocol::GenericSound &packet, enet_uint32 flags) { write_buffer.reset(); write_buffer.write_UI16(protocol::GenericSound::ID); write_buffer.write_string(packet.sound.substr(0, protocol::MAX_SOUNDNAME)); write_buffer.write_UI8(packet.looping); write_buffer.write_FP32(packet.pitch); return write_buffer.to_packet(flags); }
O3
cpp
protocol::encode(protocol::GenericSound const&, unsigned int): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x28, %rsp movl %esi, %ebx movq %rdi, %r14 leaq 0x1e0240(%rip), %r15 # 0x25c970 movq %r15, %rdi callq 0x12bef0 movq %r15, %rdi movl $0x10, %esi callq 0x12bf18 leaq 0x10(%r14), %rsi leaq 0x8(%rsp), %r12 movl $0x400, %ecx # imm = 0x400 movq %r12, %rdi xorl %edx, %edx callq 0x26900 movq %r15, %rdi movq %r12, %rsi callq 0x12c066 leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7c783 movq 0x18(%rsp), %rsi incq %rsi callq 0x268e0 movzbl 0x30(%r14), %esi leaq 0x1e01e1(%rip), %r15 # 0x25c970 movq %r15, %rdi callq 0x12bf00 movl 0x34(%r14), %esi movq %r15, %rdi callq 0x12bf4e movq %r15, %rdi movl %ebx, %esi callq 0x12c128 addq $0x28, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x7c7d7 movq 0x18(%rsp), %rsi incq %rsi callq 0x268e0 movq %rbx, %rdi callq 0x26ff0
_ZN8protocol6encodeERKNS_12GenericSoundEj: push r15 push r14 push r12 push rbx sub rsp, 28h mov ebx, esi mov r14, rdi lea r15, _ZL12write_buffer; write_buffer mov rdi, r15; this call _ZN11WriteBuffer5resetEv; WriteBuffer::reset(void) mov rdi, r15; this mov esi, 10h; unsigned __int16 call _ZN11WriteBuffer10write_UI16Et; WriteBuffer::write_UI16(ushort) lea rsi, [r14+10h] lea r12, [rsp+48h+var_40] mov ecx, 400h mov rdi, r12 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) mov rdi, r15 mov rsi, r12 call _ZN11WriteBuffer12write_stringERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; WriteBuffer::write_string(std::string const&) lea rax, [rsp+48h+var_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_7C783 mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7C783: movzx esi, byte ptr [r14+30h]; unsigned __int8 lea r15, _ZL12write_buffer; write_buffer mov rdi, r15; this call _ZN11WriteBuffer9write_UI8Eh; WriteBuffer::write_UI8(uchar) mov esi, [r14+34h]; unsigned int mov rdi, r15; this call _ZN11WriteBuffer10write_UI32Ej; WriteBuffer::write_UI32(uint) mov rdi, r15; this mov esi, ebx; unsigned int call _ZNK11WriteBuffer9to_packetEj; WriteBuffer::to_packet(uint) add rsp, 28h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_7C7D7 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_7C7D7: mov rdi, rbx call __Unwind_Resume
long long protocol::encode(protocol *this, const protocol::GenericSound *a2) { void *v3[2]; // [rsp+8h] [rbp-40h] BYREF long long v4; // [rsp+18h] [rbp-30h] BYREF WriteBuffer::reset((WriteBuffer *)&write_buffer); WriteBuffer::write_UI16((WriteBuffer *)&write_buffer, 0x10u); std::string::substr(v3, (char *)this + 16, 0LL, 1024LL); WriteBuffer::write_string(&write_buffer, v3); if ( v3[0] != &v4 ) operator delete(v3[0], v4 + 1); WriteBuffer::write_UI8((WriteBuffer *)&write_buffer, *((_BYTE *)this + 48)); WriteBuffer::write_UI32((WriteBuffer *)&write_buffer, *((_DWORD *)this + 13)); return WriteBuffer::to_packet((WriteBuffer *)&write_buffer, (unsigned int)a2); }
encode: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x28 MOV EBX,ESI MOV R14,RDI LEA R15,[0x35c970] MOV RDI,R15 CALL 0x0022bef0 MOV RDI,R15 MOV ESI,0x10 CALL 0x0022bf18 LEA RSI,[R14 + 0x10] LEA R12,[RSP + 0x8] MOV ECX,0x400 MOV RDI,R12 XOR EDX,EDX CALL 0x00126900 LAB_0017c75d: MOV RDI,R15 MOV RSI,R12 CALL 0x0022c066 LAB_0017c768: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0017c783 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001268e0 LAB_0017c783: MOVZX ESI,byte ptr [R14 + 0x30] LEA R15,[0x35c970] MOV RDI,R15 CALL 0x0022bf00 MOV ESI,dword ptr [R14 + 0x34] MOV RDI,R15 CALL 0x0022bf4e MOV RDI,R15 MOV ESI,EBX CALL 0x0022c128 ADD RSP,0x28 POP RBX POP R12 POP R14 POP R15 RET
/* protocol::encode(protocol::GenericSound const&, unsigned int) */ void protocol::encode(GenericSound *param_1,uint param_2) { long *local_40 [2]; long local_30 [2]; WriteBuffer::reset((WriteBuffer *)write_buffer); WriteBuffer::write_UI16(0xc970); std::__cxx11::string::substr((ulong)local_40,(ulong)(param_1 + 0x10)); /* try { // try from 0017c75d to 0017c767 has its CatchHandler @ 0017c7b9 */ WriteBuffer::write_string((WriteBuffer *)write_buffer,(string *)local_40); if (local_40[0] != local_30) { operator_delete(local_40[0],local_30[0] + 1); } WriteBuffer::write_UI8((WriteBuffer *)write_buffer,(uchar)param_1[0x30]); WriteBuffer::write_UI32(0x35c970); WriteBuffer::to_packet((WriteBuffer *)write_buffer,param_2); return; }
13,424
coro::net::tls::server::server(std::shared_ptr<coro::io_scheduler>, std::shared_ptr<coro::net::tls::context>, coro::net::tls::server::options)
AlayaLite/build_O3/_deps/libcoro-src/src/net/tls/server.cpp
server::server(std::shared_ptr<io_scheduler> scheduler, std::shared_ptr<context> tls_ctx, options opts) : m_io_scheduler(std::move(scheduler)), m_tls_ctx(std::move(tls_ctx)), m_options(std::move(opts)), m_accept_socket(net::make_accept_socket( net::socket::options{net::domain_t::ipv4, net::socket::type_t::tcp, net::socket::blocking_t::no}, m_options.address, m_options.port, m_options.backlog)) { if (m_io_scheduler == nullptr) { throw std::runtime_error{"tls::server cannot have a nullptr io_scheduler"}; } if (m_tls_ctx == nullptr) { throw std::runtime_error{"tls::server cannot have a nullptr tls_ctx"}; } }
O3
cpp
coro::net::tls::server::server(std::shared_ptr<coro::io_scheduler>, std::shared_ptr<coro::net::tls::context>, coro::net::tls::server::options): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx xorl %eax, %eax movq %rax, 0x8(%rdi) movups (%rsi), %xmm0 movq %rax, 0x8(%rsi) movups %xmm0, (%rdi) movq %rax, (%rsi) movq %rax, 0x18(%rdi) movups (%rdx), %xmm0 movq %rax, 0x8(%rdx) movups %xmm0, 0x10(%rdi) movq %rax, (%rdx) leaq 0x20(%rdi), %rdx movups 0x4c(%rsp), %xmm0 movups %xmm0, 0x2c(%rdi) movaps 0x40(%rsp), %xmm0 movups %xmm0, 0x20(%rdi) leaq 0x3c(%rdi), %r14 movabsq $0x100000002, %rax # imm = 0x100000002 leaq 0xc(%rsp), %rsi movq %rax, (%rsi) movl $0x1, 0x8(%rsi) movzwl 0x34(%rdi), %ecx movl 0x38(%rdi), %r8d movq %r14, %rdi callq 0xcb9d5 cmpq $0x0, (%rbx) je 0xcd847 cmpq $0x0, 0x10(%rbx) je 0xcd865 addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movl $0x10, %edi callq 0x17490 movq %rax, %r12 leaq 0x161af(%rip), %rsi # 0xe3a0a movq %rax, %rdi callq 0x17320 jmp 0xcd881 movl $0x10, %edi callq 0x17490 movq %rax, %r12 leaq 0x161c0(%rip), %rsi # 0xe3a39 movq %rax, %rdi callq 0x17320 movq 0x64728(%rip), %rsi # 0x131fb0 movq 0x646e1(%rip), %rdx # 0x131f70 movq %r12, %rdi callq 0x17700 jmp 0xcd899 movq %rax, %r15 movq %r12, %rdi callq 0x17aa0 jmp 0xcd8a9 movq %rax, %r15 movq %r14, %rdi callq 0xcb862 jmp 0xcd8be movq %rax, %rdi callq 0x1f2c3 movq %rax, %r15 movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0xcd8cc callq 0x33e7c movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0xcd8da callq 0x33e7c movq %r15, %rdi callq 0x17740
_ZN4coro3net3tls6serverC2ESt10shared_ptrINS_12io_schedulerEES3_INS1_7contextEENS2_7optionsE: push r15; Alternative name is 'coro::net::tls::server::server(std::shared_ptr<coro::io_scheduler>, std::shared_ptr<coro::net::tls::context>, coro::net::tls::server::options)' push r14 push r12 push rbx sub rsp, 18h mov rbx, rdi xor eax, eax mov [rdi+8], rax movups xmm0, xmmword ptr [rsi] mov [rsi+8], rax movups xmmword ptr [rdi], xmm0 mov [rsi], rax mov [rdi+18h], rax movups xmm0, xmmword ptr [rdx] mov [rdx+8], rax movups xmmword ptr [rdi+10h], xmm0 mov [rdx], rax lea rdx, [rdi+20h] movups xmm0, [rsp+38h+arg_C] movups xmmword ptr [rdi+2Ch], xmm0 movaps xmm0, xmmword ptr [rsp+40h] movups xmmword ptr [rdi+20h], xmm0 lea r14, [rdi+3Ch] mov rax, 100000002h lea rsi, [rsp+38h+var_2C] mov [rsi], rax mov dword ptr [rsi+8], 1 movzx ecx, word ptr [rdi+34h] mov r8d, [rdi+38h] mov rdi, r14 call _ZN4coro3net18make_accept_socketERKNS0_6socket7optionsERKNS0_10ip_addressEti; coro::net::make_accept_socket(coro::net::socket::options const&,coro::net::ip_address const&,ushort,int) cmp qword ptr [rbx], 0 jz short loc_CD847 cmp qword ptr [rbx+10h], 0 jz short loc_CD865 add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn loc_CD847: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r12, rax lea rsi, aTlsServerCanno; "tls::server cannot have a nullptr io_sc"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_CD881 loc_CD865: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r12, rax lea rsi, aTlsServerCanno_0; "tls::server cannot have a nullptr tls_c"... mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_CD881: mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r12; void * call ___cxa_throw jmp short $+2 loc_CD899: mov r15, rax mov rdi, r12; void * call ___cxa_free_exception jmp short loc_CD8A9 mov r15, rax loc_CD8A9: mov rdi, r14; this call _ZN4coro3net6socket5closeEv; coro::net::socket::close(void) jmp short loc_CD8BE mov rdi, rax call __clang_call_terminate mov r15, rax loc_CD8BE: mov rdi, [rbx+18h] test rdi, rdi jz short loc_CD8CC call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_CD8CC: mov rdi, [rbx+8] test rdi, rdi jz short loc_CD8DA call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_CD8DA: mov rdi, r15 call __Unwind_Resume
unsigned int * coro::net::tls::server::server( long long a1, __int128 *a2, __int128 *a3, long long a4, long long a5, long long a6, __m256i a7) { __int128 v7; // xmm0 __int128 v8; // xmm0 unsigned int *result; // rax std::runtime_error *exception; // r12 long long v11; // [rsp+Ch] [rbp-2Ch] BYREF int v12; // [rsp+14h] [rbp-24h] *(_QWORD *)(a1 + 8) = 0LL; v7 = *a2; *((_QWORD *)a2 + 1) = 0LL; *(_OWORD *)a1 = v7; *(_QWORD *)a2 = 0LL; *(_QWORD *)(a1 + 24) = 0LL; v8 = *a3; *((_QWORD *)a3 + 1) = 0LL; *(_OWORD *)(a1 + 16) = v8; *(_QWORD *)a3 = 0LL; *(_OWORD *)(a1 + 44) = *(_OWORD *)((char *)&a7.m256i_u64[1] + 4); *(_OWORD *)(a1 + 32) = *(_OWORD *)a7.m256i_i8; v11 = 0x100000002LL; v12 = 1; result = coro::net::make_accept_socket( (unsigned int *)(a1 + 60), (unsigned int *)&v11, a1 + 32, *(_WORD *)(a1 + 52), *(_DWORD *)(a1 + 56)); if ( !*(_QWORD *)a1 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "tls::server cannot have a nullptr io_scheduler"); goto LABEL_6; } if ( !*(_QWORD *)(a1 + 16) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "tls::server cannot have a nullptr tls_ctx"); LABEL_6: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } return result; }
server: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI XOR EAX,EAX MOV qword ptr [RDI + 0x8],RAX MOVUPS XMM0,xmmword ptr [RSI] MOV qword ptr [RSI + 0x8],RAX MOVUPS xmmword ptr [RDI],XMM0 MOV qword ptr [RSI],RAX MOV qword ptr [RDI + 0x18],RAX MOVUPS XMM0,xmmword ptr [RDX] MOV qword ptr [RDX + 0x8],RAX MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOV qword ptr [RDX],RAX LEA RDX,[RDI + 0x20] MOVUPS XMM0,xmmword ptr [RSP + 0x4c] MOVUPS xmmword ptr [RDI + 0x2c],XMM0 MOVAPS XMM0,xmmword ptr [RSP + 0x40] MOVUPS xmmword ptr [RDI + 0x20],XMM0 LEA R14,[RDI + 0x3c] MOV RAX,0x100000002 LEA RSI,[RSP + 0xc] MOV qword ptr [RSI],RAX MOV dword ptr [RSI + 0x8],0x1 MOVZX ECX,word ptr [RDI + 0x34] MOV R8D,dword ptr [RDI + 0x38] LAB_001cd826: MOV RDI,R14 CALL 0x001cb9d5 LAB_001cd82e: CMP qword ptr [RBX],0x0 JZ 0x001cd847 CMP qword ptr [RBX + 0x10],0x0 JZ 0x001cd865 ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET LAB_001cd847: MOV EDI,0x10 CALL 0x00117490 MOV R12,RAX LAB_001cd854: LEA RSI,[0x1e3a0a] MOV RDI,RAX CALL 0x00117320 LAB_001cd863: JMP 0x001cd881 LAB_001cd865: MOV EDI,0x10 CALL 0x00117490 MOV R12,RAX LAB_001cd872: LEA RSI,[0x1e3a39] MOV RDI,RAX CALL 0x00117320 LAB_001cd881: MOV RSI,qword ptr [0x00231fb0] MOV RDX,qword ptr [0x00231f70] MOV RDI,R12 CALL 0x00117700
/* coro::net::tls::server::server(std::shared_ptr<coro::io_scheduler>, std::shared_ptr<coro::net::tls::context>, coro::net::tls::server::options) */ void __thiscall coro::net::tls::server::server(server *this,int8 *param_2,int8 *param_3) { int8 uVar1; runtime_error *this_00; int8 in_stack_00000008; int8 in_stack_00000010; int4 uStack0000000000000018; int8 uStack000000000000001c; int8 local_2c; int4 local_24; *(int8 *)(this + 8) = 0; uVar1 = param_2[1]; param_2[1] = 0; *(int8 *)this = *param_2; *(int8 *)(this + 8) = uVar1; *param_2 = 0; *(int8 *)(this + 0x18) = 0; uVar1 = param_3[1]; param_3[1] = 0; *(int8 *)(this + 0x10) = *param_3; *(int8 *)(this + 0x18) = uVar1; *param_3 = 0; *(ulong *)(this + 0x2c) = CONCAT44(uStack0000000000000018,in_stack_00000010._4_4_); *(int8 *)(this + 0x34) = uStack000000000000001c; *(int8 *)(this + 0x20) = in_stack_00000008; *(int8 *)(this + 0x28) = in_stack_00000010; local_2c = 0x100000002; local_24 = 1; /* try { // try from 001cd826 to 001cd82d has its CatchHandler @ 001cd8bb */ make_accept_socket((net *)(this + 0x3c),(options *)&local_2c,(ip_address *)(this + 0x20), *(ushort *)(this + 0x34),*(int *)(this + 0x38)); if (*(long *)this == 0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001cd854 to 001cd862 has its CatchHandler @ 001cd899 */ std::runtime_error::runtime_error(this_00,"tls::server cannot have a nullptr io_scheduler"); } else { if (*(long *)(this + 0x10) != 0) { return; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001cd872 to 001cd880 has its CatchHandler @ 001cd897 */ std::runtime_error::runtime_error(this_00,"tls::server cannot have a nullptr tls_ctx"); } /* try { // try from 001cd881 to 001cd896 has its CatchHandler @ 001cd8a6 */ /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00231fb0,PTR__runtime_error_00231f70); }
13,425
blst_derive_child_eip2333
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/keygen.c
void blst_derive_child_eip2333(pow256 SK, const pow256 parent_SK, unsigned int child_index) { parent_SK_to_lamport_PK(SK, parent_SK, child_index); keygen(SK, SK, sizeof(pow256), NULL, 0, NULL, 0, 4); }
O1
c
blst_derive_child_eip2333: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x21a8, %rsp # imm = 0x21A8 movq %rdi, -0x38(%rbp) bswapl %edx movl %edx, -0x2c(%rbp) leaq -0x2038(%rbp), %rcx addq $0x1f, %rsi movq $-0x20, %rax movb (%rsi), %dl movb %dl, -0x2018(%rbp,%rax) decq %rsi incq %rax jne 0x18c4d leaq -0x2058(%rbp), %r13 leaq -0x21b8(%rbp), %rbx movq %rbx, (%rsp) leaq -0x2c(%rbp), %rsi movl $0x4, %edx movl $0x20, %r8d movq %r13, %rdi xorl %r9d, %r9d callq 0x26203 leaq -0x2018(%rbp), %rdi movq %rbx, (%rsp) movl $0x1fe0, %esi # imm = 0x1FE0 movq %r13, %rdx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x26275 movl $0x5, %eax leaq -0x2190(%rbp), %r15 movq $0x0, -0x21b8(%rbp,%rax,8) incq %rax cmpq $0xd, %rax jne 0x18cb6 leaq -0x21b8(%rbp), %r14 movb $-0x80, 0x48(%r14) movw $0x1, 0x66(%r14) movl $0x1a0, %ebx # imm = 0x1A0 movaps 0x26a66(%rip), %xmm0 # 0x3f750 movaps 0x26a6f(%rip), %xmm1 # 0x3f760 movups %xmm0, -0x21b8(%rbp) movups %xmm1, -0x21a8(%rbp) leaq (%rbx,%rbp), %r12 addq $-0x21b8, %r12 # imm = 0xDE48 movl $0x20, %edx movq %r15, %rdi movq %r12, %rsi callq 0x2cf30 movl $0x1, %edx movq %r14, %rdi movq %r15, %rsi callq 0x2ab80 movq %r12, %rdi movq %r14, %rsi callq 0x2cee0 movaps 0x26a24(%rip), %xmm1 # 0x3f760 movaps 0x26a0d(%rip), %xmm0 # 0x3f750 addq $0x20, %rbx cmpq $0x2180, %rbx # imm = 0x2180 jne 0x18cf1 leaq -0x20c8(%rbp), %r12 movups %xmm0, (%r12) movups %xmm1, 0x10(%r12) movq $0x0, 0x20(%r12) movl $0x23, %ecx leaq -0x20a0(%rbp), %rax movq $0x0, -0x21b8(%rbp,%rcx,8) incq %rcx cmpq $0x2b, %rcx jne 0x18d77 movq $0x0, -0x2060(%rbp) movl $0x1fe0, %edx # imm = 0x1FE0 movq %r12, %rdi leaq -0x2018(%rbp), %rsi callq 0x25cca movl $0x180, %eax # imm = 0x180 notb -0x21b8(%rbp,%rax) incq %rax cmpq $0x1a0, %rax # imm = 0x1A0 jne 0x18db0 movq %r14, (%rsp) leaq -0x2c(%rbp), %rsi movl $0x4, %edx movl $0x20, %r8d movq %r13, %rdi leaq -0x2038(%rbp), %rcx xorl %r9d, %r9d callq 0x26203 movq %r14, (%rsp) movl $0x1fe0, %esi # imm = 0x1FE0 leaq -0x2018(%rbp), %rdi movq %r13, %rdx xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x26275 movl $0x5, %eax movq $0x0, -0x21b8(%rbp,%rax,8) incq %rax cmpq $0xd, %rax jne 0x18e0c leaq -0x21b8(%rbp), %r14 movb $-0x80, 0x48(%r14) movb $0x1, 0x66(%r14) movl $0x1a0, %ebx # imm = 0x1A0 movaps 0x26912(%rip), %xmm0 # 0x3f750 movups %xmm0, -0x21b8(%rbp) movaps 0x26914(%rip), %xmm0 # 0x3f760 movups %xmm0, -0x21a8(%rbp) leaq (%rbx,%rbp), %r13 addq $-0x21b8, %r13 # imm = 0xDE48 movl $0x20, %edx movq %r15, %rdi movq %r13, %rsi callq 0x2cf30 movl $0x1, %edx movq %r14, %rdi movq %r15, %rsi callq 0x2ab80 movq %r13, %rdi movq %r14, %rsi callq 0x2cee0 addq $0x20, %rbx cmpq $0x2180, %rbx # imm = 0x2180 jne 0x18e37 movl $0x1fe0, %edx # imm = 0x1FE0 movq %r12, %rdi leaq -0x2018(%rbp), %rsi callq 0x25cca movq -0x38(%rbp), %rbx movq %rbx, %rdi movq %r12, %rsi callq 0x25dd2 xorl %eax, %eax movq $0x0, -0x21b8(%rbp,%rax,8) incq %rax cmpq $0x430, %rax # imm = 0x430 jne 0x18ebb leaq -0x21b8(%rbp), %rax movl $0x4, 0x8(%rsp) movq $0x0, (%rsp) movl $0x20, %edx movq %rbx, %rdi movq %rbx, %rsi xorl %ecx, %ecx xorl %r8d, %r8d xorl %r9d, %r9d callq 0x188cd addq $0x21a8, %rsp # imm = 0x21A8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
blst_derive_child_eip2333: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 21A8h mov [rbp+var_38], rdi bswap edx mov [rbp+var_2C], edx lea rcx, [rbp+var_2038] add rsi, 1Fh mov rax, 0FFFFFFFFFFFFFFE0h loc_18C4D: mov dl, [rsi] mov [rbp+rax+var_2018], dl dec rsi inc rax jnz short loc_18C4D lea r13, [rbp+var_2058] lea rbx, [rbp+var_21B8] mov [rsp+21D0h+var_21D0], rbx lea rsi, [rbp+var_2C] mov edx, 4 mov r8d, 20h ; ' ' mov rdi, r13 xor r9d, r9d call HKDF_Extract lea rdi, [rbp+var_2018] mov [rsp+21D0h+var_21D0], rbx mov esi, 1FE0h mov rdx, r13 xor ecx, ecx xor r8d, r8d xor r9d, r9d call HKDF_Expand mov eax, 5 lea r15, [rbp+var_2190] loc_18CB6: mov qword ptr [rbp+rax*8+var_21B8], 0 inc rax cmp rax, 0Dh jnz short loc_18CB6 lea r14, [rbp+var_21B8] mov byte ptr [r14+48h], 80h mov word ptr [r14+66h], 1 mov ebx, 1A0h movaps xmm0, cs:xmmword_3F750 movaps xmm1, cs:xmmword_3F760 loc_18CF1: movups [rbp+var_21B8], xmm0 movups [rbp+var_21A8], xmm1 lea r12, [rbx+rbp] add r12, 0FFFFFFFFFFFFDE48h mov edx, 20h ; ' ' mov rdi, r15 mov rsi, r12 call blst_sha256_bcopy mov edx, 1 mov rdi, r14 mov rsi, r15 call blst_sha256_block_data_order mov rdi, r12 mov rsi, r14 call blst_sha256_emit movaps xmm1, cs:xmmword_3F760 movaps xmm0, cs:xmmword_3F750 add rbx, 20h ; ' ' cmp rbx, 2180h jnz short loc_18CF1 lea r12, [rbp+var_20C8] movups xmmword ptr [r12], xmm0 movups xmmword ptr [r12+10h], xmm1 mov qword ptr [r12+20h], 0 mov ecx, 23h ; '#' lea rax, [rbp+var_20A0] loc_18D77: mov qword ptr [rbp+rcx*8+var_21B8], 0 inc rcx cmp rcx, 2Bh ; '+' jnz short loc_18D77 mov [rbp+var_2060], 0 mov edx, 1FE0h mov rdi, r12 lea rsi, [rbp+var_2018] call sha256_update mov eax, 180h loc_18DB0: not byte ptr [rbp+rax+var_21B8] inc rax cmp rax, 1A0h jnz short loc_18DB0 mov [rsp+21D0h+var_21D0], r14 lea rsi, [rbp+var_2C] mov edx, 4 mov r8d, 20h ; ' ' mov rdi, r13 lea rcx, [rbp+var_2038] xor r9d, r9d call HKDF_Extract mov [rsp+21D0h+var_21D0], r14 mov esi, 1FE0h lea rdi, [rbp+var_2018] mov rdx, r13 xor ecx, ecx xor r8d, r8d xor r9d, r9d call HKDF_Expand mov eax, 5 loc_18E0C: mov qword ptr [rbp+rax*8+var_21B8], 0 inc rax cmp rax, 0Dh jnz short loc_18E0C lea r14, [rbp+var_21B8] mov byte ptr [r14+48h], 80h mov byte ptr [r14+66h], 1 mov ebx, 1A0h loc_18E37: movaps xmm0, cs:xmmword_3F750 movups [rbp+var_21B8], xmm0 movaps xmm0, cs:xmmword_3F760 movups [rbp+var_21A8], xmm0 lea r13, [rbx+rbp] add r13, 0FFFFFFFFFFFFDE48h mov edx, 20h ; ' ' mov rdi, r15 mov rsi, r13 call blst_sha256_bcopy mov edx, 1 mov rdi, r14 mov rsi, r15 call blst_sha256_block_data_order mov rdi, r13 mov rsi, r14 call blst_sha256_emit add rbx, 20h ; ' ' cmp rbx, 2180h jnz short loc_18E37 mov edx, 1FE0h mov rdi, r12 lea rsi, [rbp+var_2018] call sha256_update mov rbx, [rbp+var_38] mov rdi, rbx mov rsi, r12 call sha256_final xor eax, eax loc_18EBB: mov qword ptr [rbp+rax*8+var_21B8], 0 inc rax cmp rax, 430h jnz short loc_18EBB lea rax, [rbp+var_21B8] mov [rsp+21D0h+var_21C8], 4 mov [rsp+21D0h+var_21D0], 0 mov edx, 20h ; ' ' mov rdi, rbx mov rsi, rbx xor ecx, ecx xor r8d, r8d xor r9d, r9d call keygen add rsp, 21A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
__int128 * blst_derive_child_eip2333(_QWORD *a1, long long a2, unsigned int a3) { _BYTE *v3; // rsi long long v4; // rax long long i; // rax long long v6; // rbx __int128 v7; // xmm0 __int128 v8; // xmm1 int v9; // ecx int v10; // r8d int v11; // r9d long long j; // rcx long long k; // rax long long m; // rax long long n; // rbx int v16; // ecx int v17; // r8d int v18; // r9d _QWORD *v19; // rbx long long ii; // rax long long v22; // [rsp+0h] [rbp-21D0h] long long v23; // [rsp+0h] [rbp-21D0h] long long v24; // [rsp+8h] [rbp-21C8h] long long v25; // [rsp+10h] [rbp-21C0h] __int128 v26; // [rsp+18h] [rbp-21B8h] BYREF __int128 v27; // [rsp+28h] [rbp-21A8h] long long v28; // [rsp+38h] [rbp-2198h] long long v29; // [rsp+40h] [rbp-2190h] BYREF long long v30; // [rsp+48h] [rbp-2188h] long long v31; // [rsp+50h] [rbp-2180h] long long v32; // [rsp+58h] [rbp-2178h] long long v33; // [rsp+60h] [rbp-2170h] long long v34; // [rsp+68h] [rbp-2168h] __int16 v35; // [rsp+7Eh] [rbp-2152h] _OWORD v36[2]; // [rsp+108h] [rbp-20C8h] BYREF long long v37; // [rsp+128h] [rbp-20A8h] long long v38; // [rsp+170h] [rbp-2060h] _BYTE v39[32]; // [rsp+178h] [rbp-2058h] BYREF _BYTE v40[32]; // [rsp+198h] [rbp-2038h] BYREF _BYTE v41[8160]; // [rsp+1B8h] [rbp-2018h] BYREF _QWORD *v42; // [rsp+2198h] [rbp-38h] _DWORD v43[11]; // [rsp+21A4h] [rbp-2Ch] BYREF v42 = a1; v43[0] = _byteswap_ulong(a3); v3 = (_BYTE *)(a2 + 31); v4 = -32LL; do v41[v4++] = *v3--; while ( v4 ); HKDF_Extract((unsigned int)v39, (unsigned int)v43, 4, (unsigned int)v40, 32, 0, (long long)&v26); HKDF_Expand((unsigned int)v41, 8160, (unsigned int)v39, 0, 0, 0, (long long)&v26); for ( i = 5LL; i != 13; ++i ) *((_QWORD *)&v26 + i) = 0LL; LOBYTE(v33) = 0x80; v35 = 1; v6 = 416LL; v7 = xmmword_3F750; v8 = xmmword_3F760; do { v26 = v7; v27 = v8; blst_sha256_bcopy(&v29, (char *)&v26 + v6, 32LL); blst_sha256_block_data_order( (unsigned int)&v26, (unsigned int)&v29, 1, v9, v10, v11, v22, v24, v25, v26, *((long long *)&v26 + 1), v27, *((long long *)&v27 + 1), v28, v29, v30, v31, v32, v33, v34); blst_sha256_emit((char *)&v26 + v6, &v26); v8 = xmmword_3F760; v7 = xmmword_3F750; v6 += 32LL; } while ( v6 != 8576 ); v36[0] = xmmword_3F750; v36[1] = xmmword_3F760; v37 = 0LL; for ( j = 35LL; j != 43; ++j ) *((_QWORD *)&v26 + j) = 0LL; v38 = 0LL; sha256_update(v36, v41, 8160LL); for ( k = 384LL; k != 416; ++k ) *((_BYTE *)&v26 + k) = ~*((_BYTE *)&v26 + k); HKDF_Extract((unsigned int)v39, (unsigned int)v43, 4, (unsigned int)v40, 32, 0, (long long)&v26); HKDF_Expand((unsigned int)v41, 8160, (unsigned int)v39, 0, 0, 0, (long long)&v26); for ( m = 5LL; m != 13; ++m ) *((_QWORD *)&v26 + m) = 0LL; LOBYTE(v33) = 0x80; LOBYTE(v35) = 1; for ( n = 416LL; n != 8576; n += 32LL ) { v26 = xmmword_3F750; v27 = xmmword_3F760; blst_sha256_bcopy(&v29, (char *)&v26 + n, 32LL); blst_sha256_block_data_order( (unsigned int)&v26, (unsigned int)&v29, 1, v16, v17, v18, v23, v24, v25, v26, *((long long *)&v26 + 1), v27, *((long long *)&v27 + 1), v28, v29, v30, v31, v32, v33, v34); blst_sha256_emit((char *)&v26 + n, &v26); } sha256_update(v36, v41, 8160LL); v19 = v42; sha256_final(v42, v36); for ( ii = 0LL; ii != 1072; ++ii ) *((_QWORD *)&v26 + ii) = 0LL; return keygen(v19, (long long)v19, 0x20uLL, 0LL, 0LL, 0LL, 0LL, 4); }
blst_derive_child_eip2333: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x21a8 MOV qword ptr [RBP + -0x38],RDI BSWAP EDX MOV dword ptr [RBP + -0x2c],EDX LEA RCX,[RBP + -0x2038] ADD RSI,0x1f MOV RAX,-0x20 LAB_00118c4d: MOV DL,byte ptr [RSI] MOV byte ptr [RBP + RAX*0x1 + -0x2018],DL DEC RSI INC RAX JNZ 0x00118c4d LEA R13,[RBP + -0x2058] LEA RBX,[RBP + -0x21b8] MOV qword ptr [RSP],RBX LEA RSI,[RBP + -0x2c] MOV EDX,0x4 MOV R8D,0x20 MOV RDI,R13 XOR R9D,R9D CALL 0x00126203 LEA RDI,[RBP + -0x2018] MOV qword ptr [RSP],RBX MOV ESI,0x1fe0 MOV RDX,R13 XOR ECX,ECX XOR R8D,R8D XOR R9D,R9D CALL 0x00126275 MOV EAX,0x5 LEA R15,[RBP + -0x2190] LAB_00118cb6: MOV qword ptr [RBP + RAX*0x8 + -0x21b8],0x0 INC RAX CMP RAX,0xd JNZ 0x00118cb6 LEA R14,[RBP + -0x21b8] MOV byte ptr [R14 + 0x48],0x80 MOV word ptr [R14 + 0x66],0x1 MOV EBX,0x1a0 MOVAPS XMM0,xmmword ptr [0x0013f750] MOVAPS XMM1,xmmword ptr [0x0013f760] LAB_00118cf1: MOVUPS xmmword ptr [RBP + -0x21b8],XMM0 MOVUPS xmmword ptr [RBP + -0x21a8],XMM1 LEA R12,[RBX + RBP*0x1] ADD R12,-0x21b8 MOV EDX,0x20 MOV RDI,R15 MOV RSI,R12 CALL 0x0012cf30 MOV EDX,0x1 MOV RDI,R14 MOV RSI,R15 CALL 0x0012ab80 MOV RDI,R12 MOV RSI,R14 CALL 0x0012cee0 MOVAPS XMM1,xmmword ptr [0x0013f760] MOVAPS XMM0,xmmword ptr [0x0013f750] ADD RBX,0x20 CMP RBX,0x2180 JNZ 0x00118cf1 LEA R12,[RBP + -0x20c8] MOVUPS xmmword ptr [R12],XMM0 MOVUPS xmmword ptr [R12 + 0x10],XMM1 MOV qword ptr [R12 + 0x20],0x0 MOV ECX,0x23 LEA RAX,[RBP + -0x20a0] LAB_00118d77: MOV qword ptr [RBP + RCX*0x8 + -0x21b8],0x0 INC RCX CMP RCX,0x2b JNZ 0x00118d77 MOV qword ptr [RBP + -0x2060],0x0 MOV EDX,0x1fe0 MOV RDI,R12 LEA RSI,[RBP + -0x2018] CALL 0x00125cca MOV EAX,0x180 LAB_00118db0: NOT byte ptr [RBP + RAX*0x1 + -0x21b8] INC RAX CMP RAX,0x1a0 JNZ 0x00118db0 MOV qword ptr [RSP],R14 LEA RSI,[RBP + -0x2c] MOV EDX,0x4 MOV R8D,0x20 MOV RDI,R13 LEA RCX,[RBP + -0x2038] XOR R9D,R9D CALL 0x00126203 MOV qword ptr [RSP],R14 MOV ESI,0x1fe0 LEA RDI,[RBP + -0x2018] MOV RDX,R13 XOR ECX,ECX XOR R8D,R8D XOR R9D,R9D CALL 0x00126275 MOV EAX,0x5 LAB_00118e0c: MOV qword ptr [RBP + RAX*0x8 + -0x21b8],0x0 INC RAX CMP RAX,0xd JNZ 0x00118e0c LEA R14,[RBP + -0x21b8] MOV byte ptr [R14 + 0x48],0x80 MOV byte ptr [R14 + 0x66],0x1 MOV EBX,0x1a0 LAB_00118e37: MOVAPS XMM0,xmmword ptr [0x0013f750] MOVUPS xmmword ptr [RBP + -0x21b8],XMM0 MOVAPS XMM0,xmmword ptr [0x0013f760] MOVUPS xmmword ptr [RBP + -0x21a8],XMM0 LEA R13,[RBX + RBP*0x1] ADD R13,-0x21b8 MOV EDX,0x20 MOV RDI,R15 MOV RSI,R13 CALL 0x0012cf30 MOV EDX,0x1 MOV RDI,R14 MOV RSI,R15 CALL 0x0012ab80 MOV RDI,R13 MOV RSI,R14 CALL 0x0012cee0 ADD RBX,0x20 CMP RBX,0x2180 JNZ 0x00118e37 MOV EDX,0x1fe0 MOV RDI,R12 LEA RSI,[RBP + -0x2018] CALL 0x00125cca MOV RBX,qword ptr [RBP + -0x38] MOV RDI,RBX MOV RSI,R12 CALL 0x00125dd2 XOR EAX,EAX LAB_00118ebb: MOV qword ptr [RBP + RAX*0x8 + -0x21b8],0x0 INC RAX CMP RAX,0x430 JNZ 0x00118ebb LEA RAX,[RBP + -0x21b8] MOV dword ptr [RSP + 0x8],0x4 MOV qword ptr [RSP],0x0 MOV EDX,0x20 MOV RDI,RBX MOV RSI,RBX XOR ECX,ECX XOR R8D,R8D XOR R9D,R9D CALL 0x001188cd ADD RSP,0x21a8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void blst_derive_child_eip2333(EVP_PKEY_CTX *param_1,long param_2,uint param_3) { EVP_PKEY_CTX *pkey; long lVar1; int1 *puVar2; int8 local_21c0; int8 uStack_21b8; int4 local_21b0; int4 uStack_21ac; int4 uStack_21a8; int4 uStack_21a4; int8 local_2198 [4]; int1 local_2178; int2 local_215a; int4 local_20d0; int4 uStack_20cc; int4 uStack_20c8; int4 uStack_20c4; int4 local_20c0; int4 uStack_20bc; int4 uStack_20b8; int4 uStack_20b4; int8 local_20b0; int8 local_20a8 [8]; int8 local_2068; int1 local_2060 [32]; byte local_2040 [32]; int1 local_2020 [8160]; EVP_PKEY_CTX *local_40; uint local_34; local_34 = param_3 >> 0x18 | (param_3 & 0xff0000) >> 8 | (param_3 & 0xff00) << 8 | param_3 << 0x18 ; puVar2 = (int1 *)(param_2 + 0x1f); lVar1 = -0x20; do { local_2020[lVar1] = *puVar2; puVar2 = puVar2 + -1; lVar1 = lVar1 + 1; } while (lVar1 != 0); local_40 = param_1; HKDF_Extract(local_2060,&local_34,4,local_2040,0x20,0,&local_21c0); HKDF_Expand(local_2020,0x1fe0,local_2060,0,0,0,&local_21c0); lVar1 = 5; do { (&local_21c0)[lVar1] = 0; lVar1 = lVar1 + 1; } while (lVar1 != 0xd); local_2178 = 0x80; local_215a = 1; lVar1 = 0x1a0; do { local_21c0 = CONCAT44(_UNK_0013f754,_DAT_0013f750); uStack_21b8 = CONCAT44(_UNK_0013f75c,_UNK_0013f758); local_21b0 = _DAT_0013f760; uStack_21ac = _UNK_0013f764; uStack_21a8 = _UNK_0013f768; uStack_21a4 = _UNK_0013f76c; blst_sha256_bcopy(local_2198,(long)&local_21c0 + lVar1,0x20); blst_sha256_block_data_order(&local_21c0,local_2198,1); blst_sha256_emit((long)&local_21c0 + lVar1,&local_21c0); lVar1 = lVar1 + 0x20; } while (lVar1 != 0x2180); local_20d0 = _DAT_0013f750; uStack_20cc = _UNK_0013f754; uStack_20c8 = _UNK_0013f758; uStack_20c4 = _UNK_0013f75c; local_20c0 = _DAT_0013f760; uStack_20bc = _UNK_0013f764; uStack_20b8 = _UNK_0013f768; uStack_20b4 = _UNK_0013f76c; local_20b0 = 0; lVar1 = 0x23; do { (&local_21c0)[lVar1] = 0; lVar1 = lVar1 + 1; } while (lVar1 != 0x2b); local_2068 = 0; sha256_update(&local_20d0,local_2020,0x1fe0); lVar1 = 0x180; do { *(byte *)((long)&local_21c0 + lVar1) = ~*(byte *)((long)&local_21c0 + lVar1); lVar1 = lVar1 + 1; } while (lVar1 != 0x1a0); HKDF_Extract(local_2060,&local_34,4,local_2040,0x20,0,&local_21c0); HKDF_Expand(local_2020,0x1fe0,local_2060,0,0,0,&local_21c0); lVar1 = 5; do { (&local_21c0)[lVar1] = 0; lVar1 = lVar1 + 1; } while (lVar1 != 0xd); local_2178 = 0x80; local_215a = CONCAT11(local_215a._1_1_,1); lVar1 = 0x1a0; do { local_21c0 = CONCAT44(_UNK_0013f754,_DAT_0013f750); uStack_21b8 = CONCAT44(_UNK_0013f75c,_UNK_0013f758); local_21b0 = _DAT_0013f760; uStack_21ac = _UNK_0013f764; uStack_21a8 = _UNK_0013f768; uStack_21a4 = _UNK_0013f76c; blst_sha256_bcopy(local_2198,(long)&local_21c0 + lVar1,0x20); blst_sha256_block_data_order(&local_21c0,local_2198,1); blst_sha256_emit((long)&local_21c0 + lVar1,&local_21c0); lVar1 = lVar1 + 0x20; } while (lVar1 != 0x2180); sha256_update(&local_20d0,local_2020,0x1fe0); pkey = local_40; sha256_final(local_40,&local_20d0); lVar1 = 0; do { (&local_21c0)[lVar1] = 0; lVar1 = lVar1 + 1; } while (lVar1 != 0x430); keygen(pkey,(EVP_PKEY *)pkey); return; }
13,426
nlohmann::json_abi_v3_11_3::detail::iteration_proxy<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>>::end() const
monkey531[P]llama/common/./json.hpp
iteration_proxy_value<IteratorType> end() const noexcept { return iteration_proxy_value<IteratorType>(container->end()); }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy<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>>::end() const: pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000 movq (%rsi), %rax movq %rax, (%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rsp) movq %rdx, 0x18(%rsp) movzbl (%rax), %ecx cmpl $0x2, %ecx je 0xf8e28 cmpl $0x1, %ecx jne 0xf8e33 movq $0x0, 0x8(%rsp) jmp 0xf8e38 movq $0x0, 0x10(%rsp) jmp 0xf8e38 movq %rdx, 0x18(%rsp) cmpl $0x2, %ecx je 0xf8e51 cmpl $0x1, %ecx jne 0xf8e60 movq 0x8(%rax), %rax movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) jmp 0xf8e69 movq 0x8(%rax), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) jmp 0xf8e69 movq $0x1, 0x18(%rsp) movq %rsp, %rsi movq %rbx, %rdi xorl %edx, %edx callq 0x8bac2 movq %rbx, %rax addq $0x20, %rsp popq %rbx retq nop
_ZNK8nlohmann16json_abi_v3_11_36detail15iteration_proxyINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3endEv: push rbx sub rsp, 20h mov rbx, rdi mov rdx, 8000000000000000h mov rax, [rsi] mov [rsp+28h+var_28], rax xorps xmm0, xmm0 movups [rsp+28h+var_20], xmm0 mov [rsp+28h+var_10], rdx movzx ecx, byte ptr [rax] cmp ecx, 2 jz short loc_F8E28 cmp ecx, 1 jnz short loc_F8E33 mov qword ptr [rsp+28h+var_20], 0 jmp short loc_F8E38 loc_F8E28: mov qword ptr [rsp+28h+var_20+8], 0 jmp short loc_F8E38 loc_F8E33: mov [rsp+28h+var_10], rdx loc_F8E38: cmp ecx, 2 jz short loc_F8E51 cmp ecx, 1 jnz short loc_F8E60 mov rax, [rax+8] mov rax, [rax+8] mov qword ptr [rsp+28h+var_20], rax jmp short loc_F8E69 loc_F8E51: mov rax, [rax+8] mov rax, [rax+8] mov qword ptr [rsp+28h+var_20+8], rax jmp short loc_F8E69 loc_F8E60: mov [rsp+28h+var_10], 1 loc_F8E69: mov rsi, rsp mov rdi, rbx xor edx, edx call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> 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::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,ulong) mov rax, rbx add rsp, 20h pop rbx retn
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy<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>>::end( long long a1, unsigned __int8 **a2) { unsigned __int8 *v2; // rax int v3; // ecx unsigned __int8 *v5; // [rsp+0h] [rbp-28h] BYREF __int128 v6; // [rsp+8h] [rbp-20h] long long v7; // [rsp+18h] [rbp-10h] v2 = *a2; v5 = v2; v6 = 0LL; v7 = 0x8000000000000000LL; v3 = *v2; if ( v3 == 2 ) { *((_QWORD *)&v6 + 1) = 0LL; } else if ( v3 == 1 ) { *(_QWORD *)&v6 = 0LL; } else { v7 = 0x8000000000000000LL; } if ( v3 == 2 ) { *((_QWORD *)&v6 + 1) = *(_QWORD *)(*((_QWORD *)v2 + 1) + 8LL); } else if ( v3 == 1 ) { *(_QWORD *)&v6 = *(_QWORD *)(*((_QWORD *)v2 + 1) + 8LL); } else { v7 = 1LL; } 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( a1, (__int128 *)&v5, 0LL); return a1; }
end: PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RDX,-0x8000000000000000 MOV RAX,qword ptr [RSI] MOV qword ptr [RSP],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV qword ptr [RSP + 0x18],RDX MOVZX ECX,byte ptr [RAX] CMP ECX,0x2 JZ 0x001f8e28 CMP ECX,0x1 JNZ 0x001f8e33 MOV qword ptr [RSP + 0x8],0x0 JMP 0x001f8e38 LAB_001f8e28: MOV qword ptr [RSP + 0x10],0x0 JMP 0x001f8e38 LAB_001f8e33: MOV qword ptr [RSP + 0x18],RDX LAB_001f8e38: CMP ECX,0x2 JZ 0x001f8e51 CMP ECX,0x1 JNZ 0x001f8e60 MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX JMP 0x001f8e69 LAB_001f8e51: MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x001f8e69 LAB_001f8e60: MOV qword ptr [RSP + 0x18],0x1 LAB_001f8e69: MOV RSI,RSP MOV RDI,RBX XOR EDX,EDX CALL 0x0018bac2 MOV RAX,RBX ADD RSP,0x20 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy<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> >::end() const */ void nlohmann::json_abi_v3_11_3::detail:: iteration_proxy<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>> ::end(void) { 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>> ::iteration_proxy_value(); return; }
13,427
nlohmann::json_abi_v3_11_3::detail::iteration_proxy<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>>::end() const
monkey531[P]llama/common/./json.hpp
iteration_proxy_value<IteratorType> end() const noexcept { return iteration_proxy_value<IteratorType>(container->end()); }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::iteration_proxy<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>>::end() const: pushq %rbx subq $0x20, %rsp movq %rdi, %rbx movq (%rsi), %rax movq %rax, (%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x8(%rsp) movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 movq %rcx, 0x18(%rsp) movzbl (%rax), %ecx cmpl $0x2, %ecx je 0xf4704 cmpl $0x1, %ecx jne 0xf4713 movq 0x8(%rax), %rax movq 0x8(%rax), %rax movq %rax, 0x8(%rsp) jmp 0xf471c movq 0x8(%rax), %rax movq 0x8(%rax), %rax movq %rax, 0x10(%rsp) jmp 0xf471c movq $0x1, 0x18(%rsp) movq %rsp, %rsi movq %rbx, %rdi xorl %edx, %edx callq 0x89956 movq %rbx, %rax addq $0x20, %rsp popq %rbx retq
_ZNK8nlohmann16json_abi_v3_11_36detail15iteration_proxyINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEE3endEv: push rbx sub rsp, 20h mov rbx, rdi mov rax, [rsi] mov [rsp+28h+var_28], rax xorps xmm0, xmm0 movups [rsp+28h+var_20], xmm0 mov rcx, 8000000000000000h mov [rsp+28h+var_10], rcx movzx ecx, byte ptr [rax] cmp ecx, 2 jz short loc_F4704 cmp ecx, 1 jnz short loc_F4713 mov rax, [rax+8] mov rax, [rax+8] mov qword ptr [rsp+28h+var_20], rax jmp short loc_F471C loc_F4704: mov rax, [rax+8] mov rax, [rax+8] mov qword ptr [rsp+28h+var_20+8], rax jmp short loc_F471C loc_F4713: mov [rsp+28h+var_10], 1 loc_F471C: mov rsi, rsp mov rdi, rbx xor edx, edx call _ZN8nlohmann16json_abi_v3_11_36detail21iteration_proxy_valueINS1_9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEEEC2ESI_m; 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,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> 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::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const>,ulong) mov rax, rbx add rsp, 20h pop rbx retn
long long nlohmann::json_abi_v3_11_3::detail::iteration_proxy<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>>::end( long long a1, unsigned __int8 **a2) { unsigned __int8 *v2; // rax int v3; // ecx unsigned __int8 *v5; // [rsp+0h] [rbp-28h] BYREF __int128 v6; // [rsp+8h] [rbp-20h] long long v7; // [rsp+18h] [rbp-10h] v2 = *a2; v5 = v2; v6 = 0LL; v7 = 0x8000000000000000LL; v3 = *v2; if ( v3 == 2 ) { *((_QWORD *)&v6 + 1) = *(_QWORD *)(*((_QWORD *)v2 + 1) + 8LL); } else if ( v3 == 1 ) { *(_QWORD *)&v6 = *(_QWORD *)(*((_QWORD *)v2 + 1) + 8LL); } else { v7 = 1LL; } 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( a1, (__int128 *)&v5, 0LL); return a1; }
end: PUSH RBX SUB RSP,0x20 MOV RBX,RDI MOV RAX,qword ptr [RSI] MOV qword ptr [RSP],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x8],XMM0 MOV RCX,-0x8000000000000000 MOV qword ptr [RSP + 0x18],RCX MOVZX ECX,byte ptr [RAX] CMP ECX,0x2 JZ 0x001f4704 CMP ECX,0x1 JNZ 0x001f4713 MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x8],RAX JMP 0x001f471c LAB_001f4704: MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RAX JMP 0x001f471c LAB_001f4713: MOV qword ptr [RSP + 0x18],0x1 LAB_001f471c: MOV RSI,RSP MOV RDI,RBX XOR EDX,EDX CALL 0x00189956 MOV RAX,RBX ADD RSP,0x20 POP RBX RET
/* nlohmann::json_abi_v3_11_3::detail::iteration_proxy<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> >::end() const */ void nlohmann::json_abi_v3_11_3::detail:: iteration_proxy<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>> ::end(void) { 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>> ::iteration_proxy_value(); return; }
13,428
my_string_repertoire
eloqsql/strings/ctype.c
my_repertoire_t my_string_repertoire(CHARSET_INFO *cs, const char *str, size_t length) { if (cs->mbminlen == 1 && !(cs->state & MY_CS_NONASCII)) { return my_string_repertoire_8bit(cs, str, length); } else { const char *strend= str + length; my_wc_t wc; int chlen; for (; (chlen= my_ci_mb_wc(cs, &wc, (uchar*) str, (uchar*) strend)) > 0; str+= chlen) { if (wc > 0x7F) return MY_REPERTOIRE_UNICODE30; } } return MY_REPERTOIRE_ASCII; }
O3
c
my_string_repertoire: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 cmpl $0x1, 0x98(%rdi) jne 0x8b5ab testb $0x20, 0xd(%r15) jne 0x8b5ab movl $0x1, %eax testq %rbx, %rbx jle 0x8b611 addq %r14, %rbx cmpb $0x0, (%r14) js 0x8b61e incq %r14 cmpq %rbx, %r14 jb 0x8b59b jmp 0x8b611 addq %r14, %rbx movq 0xb8(%r15), %rax leaq -0x28(%rbp), %rsi movq %r15, %rdi movq %r14, %rdx movq %rbx, %rcx callq *0x28(%rax) testl %eax, %eax setg %cl jle 0x8b607 cmpq $0x7f, -0x28(%rbp) ja 0x8b607 leaq -0x28(%rbp), %r12 movq %r14, %rcx movl %eax, %r14d addq %rcx, %r14 movq 0xb8(%r15), %rax movq %r15, %rdi movq %r12, %rsi movq %r14, %rdx movq %rbx, %rcx callq *0x28(%rax) testl %eax, %eax setg %cl jle 0x8b607 cmpq $0x80, -0x28(%rbp) jb 0x8b5d7 movzbl %cl, %eax leal 0x1(,%rax,2), %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl $0x3, %eax jmp 0x8b611
my_string_repertoire: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx sub rsp, 10h mov rbx, rdx mov r14, rsi mov r15, rdi cmp dword ptr [rdi+98h], 1 jnz short loc_8B5AB test byte ptr [r15+0Dh], 20h jnz short loc_8B5AB mov eax, 1 test rbx, rbx jle short loc_8B611 add rbx, r14 loc_8B59B: cmp byte ptr [r14], 0 js short loc_8B61E inc r14 cmp r14, rbx jb short loc_8B59B jmp short loc_8B611 loc_8B5AB: add rbx, r14 mov rax, [r15+0B8h] lea rsi, [rbp+var_28] mov rdi, r15 mov rdx, r14 mov rcx, rbx call qword ptr [rax+28h] test eax, eax setnle cl jle short loc_8B607 cmp [rbp+var_28], 7Fh ja short loc_8B607 lea r12, [rbp+var_28] loc_8B5D7: mov rcx, r14 mov r14d, eax add r14, rcx mov rax, [r15+0B8h] mov rdi, r15 mov rsi, r12 mov rdx, r14 mov rcx, rbx call qword ptr [rax+28h] test eax, eax setnle cl jle short loc_8B607 cmp [rbp+var_28], 80h jb short loc_8B5D7 loc_8B607: movzx eax, cl lea eax, ds:1[rax*2] loc_8B611: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_8B61E: mov eax, 3 jmp short loc_8B611
long long my_string_repertoire(long long a1, char *a2, long long a3) { char *v3; // r14 long long result; // rax char *v5; // rbx int v6; // eax bool v7; // cl _QWORD v8[5]; // [rsp+8h] [rbp-28h] BYREF v3 = a2; if ( *(_DWORD *)(a1 + 152) != 1 || (*(_BYTE *)(a1 + 13) & 0x20) != 0 ) { v5 = &a2[a3]; v6 = (*(long long ( **)(long long, _QWORD *, char *, char *))(*(_QWORD *)(a1 + 184) + 40LL))( a1, v8, a2, &a2[a3]); v7 = v6 > 0; if ( v6 > 0 && v8[0] <= 0x7FuLL ) { do { v3 += (unsigned int)v6; v6 = (*(long long ( **)(long long, _QWORD *, char *, char *))(*(_QWORD *)(a1 + 184) + 40LL))( a1, v8, v3, v5); v7 = v6 > 0; } while ( v6 > 0 && v8[0] < 0x80uLL ); } return 2 * (unsigned int)v7 + 1; } else { result = 1LL; if ( a3 > 0 ) { while ( *v3 >= 0 ) { if ( ++v3 >= &a2[a3] ) return result; } return 3LL; } } return result; }
my_string_repertoire: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV RBX,RDX MOV R14,RSI MOV R15,RDI CMP dword ptr [RDI + 0x98],0x1 JNZ 0x0018b5ab TEST byte ptr [R15 + 0xd],0x20 JNZ 0x0018b5ab MOV EAX,0x1 TEST RBX,RBX JLE 0x0018b611 ADD RBX,R14 LAB_0018b59b: CMP byte ptr [R14],0x0 JS 0x0018b61e INC R14 CMP R14,RBX JC 0x0018b59b JMP 0x0018b611 LAB_0018b5ab: ADD RBX,R14 MOV RAX,qword ptr [R15 + 0xb8] LEA RSI,[RBP + -0x28] MOV RDI,R15 MOV RDX,R14 MOV RCX,RBX CALL qword ptr [RAX + 0x28] TEST EAX,EAX SETG CL JLE 0x0018b607 CMP qword ptr [RBP + -0x28],0x7f JA 0x0018b607 LEA R12,[RBP + -0x28] LAB_0018b5d7: MOV RCX,R14 MOV R14D,EAX ADD R14,RCX MOV RAX,qword ptr [R15 + 0xb8] MOV RDI,R15 MOV RSI,R12 MOV RDX,R14 MOV RCX,RBX CALL qword ptr [RAX + 0x28] TEST EAX,EAX SETG CL JLE 0x0018b607 CMP qword ptr [RBP + -0x28],0x80 JC 0x0018b5d7 LAB_0018b607: MOVZX EAX,CL LEA EAX,[0x1 + RAX*0x2] LAB_0018b611: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0018b61e: MOV EAX,0x3 JMP 0x0018b611
char my_string_repertoire(long param_1,char *param_2,long param_3) { char cVar1; uint uVar2; bool bVar3; char *pcVar4; ulong local_30; if ((*(int *)(param_1 + 0x98) == 1) && ((*(byte *)(param_1 + 0xd) & 0x20) == 0)) { cVar1 = '\x01'; if (0 < param_3) { pcVar4 = param_2 + param_3; do { if (*param_2 < '\0') { return '\x03'; } param_2 = param_2 + 1; } while (param_2 < pcVar4); } } else { pcVar4 = param_2 + param_3; uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_30,param_2,pcVar4); bVar3 = 0 < (int)uVar2; if ((0 < (int)uVar2) && (local_30 < 0x80)) { do { param_2 = param_2 + uVar2; uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_30,param_2,pcVar4); bVar3 = 0 < (int)uVar2; if ((int)uVar2 < 1) break; } while (local_30 < 0x80); } cVar1 = bVar3 * '\x02' + '\x01'; } return cVar1; }
13,429
inline_mysql_cond_init
eloqsql/include/mysql/psi/mysql_thread.h
static inline int inline_mysql_cond_init( #ifdef HAVE_PSI_COND_INTERFACE PSI_cond_key key, #endif mysql_cond_t *that, const pthread_condattr_t *attr) { #ifdef HAVE_PSI_COND_INTERFACE that->m_psi= PSI_COND_CALL(init_cond)(key, &that->m_cond); #else that->m_psi= NULL; #endif return pthread_cond_init(&that->m_cond, attr); }
O0
c
inline_mysql_cond_init: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) leaq 0x25b35e(%rip), %rax # 0x2c1158 movq (%rax), %rax movq 0x60(%rax), %rax movl -0x4(%rbp), %edi movq -0x10(%rbp), %rsi callq *%rax movq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x30(%rax) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x2a370 addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
inline_mysql_cond_init_2: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx lea rax, PSI_server mov rax, [rax] mov rax, [rax+60h] mov edi, [rbp+var_4] mov rsi, [rbp+var_10] call rax mov rcx, rax mov rax, [rbp+var_10] mov [rax+30h], rcx mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call _pthread_cond_init add rsp, 20h pop rbp retn
long long inline_mysql_cond_init_2(unsigned int a1, long long a2, long long a3) { *(_QWORD *)(a2 + 48) = ((long long ( *)(_QWORD, long long))PSI_server[12])(a1, a2); return pthread_cond_init(a2, a3); }
inline_mysql_cond_init: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX LEA RAX,[0x3c1158] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x60] MOV EDI,dword ptr [RBP + -0x4] MOV RSI,qword ptr [RBP + -0x10] CALL RAX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x30],RCX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x0012a370 ADD RSP,0x20 POP RBP RET
void inline_mysql_cond_init(int4 param_1,pthread_cond_t *param_2,pthread_condattr_t *param_3) { longlong lVar1; lVar1 = (**(code **)(PSI_server + 0x60))(param_1,param_2); param_2[1].__align = lVar1; pthread_cond_init(param_2,param_3); return; }
13,430
ch2x
eloqsql/strings/ctype-uca.c
static int ch2x(int ch) { if (ch >= '0' && ch <= '9') return ch - '0'; if (ch >= 'a' && ch <= 'f') return 10 + ch - 'a'; if (ch >= 'A' && ch <= 'F') return 10 + ch - 'A'; return -1; }
O0
c
ch2x: pushq %rbp movq %rsp, %rbp movl %edi, -0x8(%rbp) cmpl $0x30, -0x8(%rbp) jl 0x5820e cmpl $0x39, -0x8(%rbp) jg 0x5820e movl -0x8(%rbp), %eax subl $0x30, %eax movl %eax, -0x4(%rbp) jmp 0x58249 cmpl $0x61, -0x8(%rbp) jl 0x58228 cmpl $0x66, -0x8(%rbp) jg 0x58228 movl -0x8(%rbp), %eax addl $0xa, %eax subl $0x61, %eax movl %eax, -0x4(%rbp) jmp 0x58249 cmpl $0x41, -0x8(%rbp) jl 0x58242 cmpl $0x46, -0x8(%rbp) jg 0x58242 movl -0x8(%rbp), %eax addl $0xa, %eax subl $0x41, %eax movl %eax, -0x4(%rbp) jmp 0x58249 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax popq %rbp retq nop
ch2x: push rbp mov rbp, rsp mov [rbp+var_8], edi cmp [rbp+var_8], 30h ; '0' jl short loc_5820E cmp [rbp+var_8], 39h ; '9' jg short loc_5820E mov eax, [rbp+var_8] sub eax, 30h ; '0' mov [rbp+var_4], eax jmp short loc_58249 loc_5820E: cmp [rbp+var_8], 61h ; 'a' jl short loc_58228 cmp [rbp+var_8], 66h ; 'f' jg short loc_58228 mov eax, [rbp+var_8] add eax, 0Ah sub eax, 61h ; 'a' mov [rbp+var_4], eax jmp short loc_58249 loc_58228: cmp [rbp+var_8], 41h ; 'A' jl short loc_58242 cmp [rbp+var_8], 46h ; 'F' jg short loc_58242 mov eax, [rbp+var_8] add eax, 0Ah sub eax, 41h ; 'A' mov [rbp+var_4], eax jmp short loc_58249 loc_58242: mov [rbp+var_4], 0FFFFFFFFh loc_58249: mov eax, [rbp+var_4] pop rbp retn
long long ch2x(int a1) { if ( a1 < 48 || a1 > 57 ) { if ( a1 < 97 || a1 > 102 ) { if ( a1 < 65 || a1 > 70 ) return (unsigned int)-1; else return (unsigned int)(a1 - 55); } else { return (unsigned int)(a1 - 87); } } else { return (unsigned int)(a1 - 48); } }
ch2x: PUSH RBP MOV RBP,RSP MOV dword ptr [RBP + -0x8],EDI CMP dword ptr [RBP + -0x8],0x30 JL 0x0015820e CMP dword ptr [RBP + -0x8],0x39 JG 0x0015820e MOV EAX,dword ptr [RBP + -0x8] SUB EAX,0x30 MOV dword ptr [RBP + -0x4],EAX JMP 0x00158249 LAB_0015820e: CMP dword ptr [RBP + -0x8],0x61 JL 0x00158228 CMP dword ptr [RBP + -0x8],0x66 JG 0x00158228 MOV EAX,dword ptr [RBP + -0x8] ADD EAX,0xa SUB EAX,0x61 MOV dword ptr [RBP + -0x4],EAX JMP 0x00158249 LAB_00158228: CMP dword ptr [RBP + -0x8],0x41 JL 0x00158242 CMP dword ptr [RBP + -0x8],0x46 JG 0x00158242 MOV EAX,dword ptr [RBP + -0x8] ADD EAX,0xa SUB EAX,0x41 MOV dword ptr [RBP + -0x4],EAX JMP 0x00158249 LAB_00158242: MOV dword ptr [RBP + -0x4],0xffffffff LAB_00158249: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int ch2x(int param_1) { int4 local_c; if ((param_1 < 0x30) || (0x39 < param_1)) { if ((param_1 < 0x61) || (0x66 < param_1)) { if ((param_1 < 0x41) || (0x46 < param_1)) { local_c = -1; } else { local_c = param_1 + -0x37; } } else { local_c = param_1 + -0x57; } } else { local_c = param_1 + -0x30; } return local_c; }
13,431
MyCTX_nopad::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int)
eloqsql/mysys_ssl/my_crypt.cc
int init(const EVP_CIPHER *cipher, int encrypt, const uchar *key, uint klen, const uchar *iv, uint ivlen) { compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX_nopad)); this->key= key; this->klen= klen; this->source_tail_len= 0; if (ivlen) memcpy(oiv, iv, ivlen); DBUG_ASSERT(ivlen == 0 || ivlen == sizeof(oiv)); int res= MyCTX::init(cipher, encrypt, key, klen, iv, ivlen); EVP_CIPHER_CTX_set_padding(ctx, 0); return res; }
O3
cpp
MyCTX_nopad::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int): pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %r9, %r14 movq %rcx, %r12 movl %edx, %r15d movq %rsi, %r13 movq %rdi, %rbx movl 0x10(%rbp), %eax movq %rcx, 0xd0(%rdi) movl %r8d, 0xd8(%rdi) andl $0x0, 0xdc(%rdi) testl %eax, %eax je 0x2fbde leaq 0xe0(%rbx), %rdi movl %eax, %edx movq %r14, %rsi callq 0x2a0a0 testq %r13, %r13 je 0x2fc2d movq 0xc8(%rbx), %rdi movq %r13, %rsi xorl %edx, %edx movq %r12, %rcx movq %r14, %r8 movl %r15d, %r9d callq 0x2a770 cmpl $0x1, %eax pushq $-0x65 popq %r14 movl $0x0, %eax cmovel %eax, %r14d movq 0xc8(%rbx), %rdi xorl %esi, %esi callq 0x2a3a0 movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $-0x66 popq %r14 jmp 0x2fc0d
_ZN11MyCTX_nopad4initEPK13evp_cipher_stiPKhjS4_j: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, r9 mov r12, rcx mov r15d, edx mov r13, rsi mov rbx, rdi mov eax, [rbp+arg_0] mov [rdi+0D0h], rcx mov [rdi+0D8h], r8d and dword ptr [rdi+0DCh], 0 test eax, eax jz short loc_2FBDE lea rdi, [rbx+0E0h] mov edx, eax mov rsi, r14 call _memcpy loc_2FBDE: test r13, r13 jz short loc_2FC2D mov rdi, [rbx+0C8h] mov rsi, r13 xor edx, edx mov rcx, r12 mov r8, r14 mov r9d, r15d call _EVP_CipherInit_ex cmp eax, 1 push 0FFFFFFFFFFFFFF9Bh pop r14 mov eax, 0 cmovz r14d, eax loc_2FC0D: mov rdi, [rbx+0C8h] xor esi, esi call _EVP_CIPHER_CTX_set_padding mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_2FC2D: push 0FFFFFFFFFFFFFF9Ah pop r14 jmp short loc_2FC0D
long long MyCTX_nopad::init( long long a1, long long a2, unsigned int a3, long long a4, int a5, long long a6, unsigned int a7) { long long v7; // rax bool v11; // zf unsigned int v12; // r14d long long v14; // [rsp-8h] [rbp-30h] v14 = v7; *(_QWORD *)(a1 + 208) = a4; *(_DWORD *)(a1 + 216) = a5; *(_DWORD *)(a1 + 220) = 0; if ( a7 ) memcpy(a1 + 224, a6, a7); if ( a2 ) { v11 = (unsigned int)EVP_CipherInit_ex(*(_QWORD *)(a1 + 200), a2, 0LL, a4, a6, a3, v14) == 1; v12 = -101; if ( v11 ) v12 = 0; } else { v12 = -102; } EVP_CIPHER_CTX_set_padding(*(_QWORD *)(a1 + 200), 0LL); return v12; }
init: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,R9 MOV R12,RCX MOV R15D,EDX MOV R13,RSI MOV RBX,RDI MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RDI + 0xd0],RCX MOV dword ptr [RDI + 0xd8],R8D AND dword ptr [RDI + 0xdc],0x0 TEST EAX,EAX JZ 0x0012fbde LEA RDI,[RBX + 0xe0] MOV EDX,EAX MOV RSI,R14 CALL 0x0012a0a0 LAB_0012fbde: TEST R13,R13 JZ 0x0012fc2d MOV RDI,qword ptr [RBX + 0xc8] MOV RSI,R13 XOR EDX,EDX MOV RCX,R12 MOV R8,R14 MOV R9D,R15D CALL 0x0012a770 CMP EAX,0x1 PUSH -0x65 POP R14 MOV EAX,0x0 CMOVZ R14D,EAX LAB_0012fc0d: MOV RDI,qword ptr [RBX + 0xc8] XOR ESI,ESI CALL 0x0012a3a0 MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0012fc2d: PUSH -0x66 POP R14 JMP 0x0012fc0d
/* MyCTX_nopad::init(evp_cipher_st const*, int, unsigned char const*, unsigned int, unsigned char const*, unsigned int) */ int4 __thiscall MyCTX_nopad::init(MyCTX_nopad *this,evp_cipher_st *param_1,int param_2,uchar *param_3,uint param_4, uchar *param_5,uint param_6) { int iVar1; int4 uVar2; *(uchar **)(this + 0xd0) = param_3; *(uint *)(this + 0xd8) = param_4; *(int4 *)(this + 0xdc) = 0; if (param_6 != 0) { memcpy(this + 0xe0,param_5,(ulong)param_6); } if (param_1 == (evp_cipher_st *)0x0) { uVar2 = 0xffffff9a; } else { iVar1 = EVP_CipherInit_ex(*(EVP_CIPHER_CTX **)(this + 200),param_1,(ENGINE *)0x0,param_3,param_5 ,param_2); uVar2 = 0xffffff9b; if (iVar1 == 1) { uVar2 = 0; } } EVP_CIPHER_CTX_set_padding(*(EVP_CIPHER_CTX **)(this + 200),0); return uVar2; }
13,432
vector_f_create
tsotchke[P]eshkol/src/core/utils/vector.c
VectorF* vector_f_create(Arena* arena, size_t dim) { assert(arena != NULL); assert(dim > 0 && dim <= VECTOR_MAX_DIM); VectorF* vec = arena_alloc_aligned(arena, sizeof(VectorF), VECTOR_ALIGNMENT); if (!vec) { return NULL; } vec->dim = dim; memset(vec->data, 0, sizeof(vec->data)); return vec; }
O0
c
vector_f_create: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) cmpq $0x0, -0x10(%rbp) je 0x49b9 jmp 0x49d8 leaq 0x5815(%rip), %rdi # 0xa1d5 leaq 0x6d91(%rip), %rsi # 0xb758 movl $0x15, %edx leaq 0x6dd7(%rip), %rcx # 0xb7aa callq 0x1090 cmpq $0x0, -0x18(%rbp) jbe 0x49e8 cmpq $0x4, -0x18(%rbp) ja 0x49e8 jmp 0x4a07 leaq 0x6de5(%rip), %rdi # 0xb7d4 leaq 0x6d62(%rip), %rsi # 0xb758 movl $0x16, %edx leaq 0x6da8(%rip), %rcx # 0xb7aa callq 0x1090 movq -0x10(%rbp), %rdi movl $0x20, %edx movq %rdx, %rsi callq 0x43d0 movq %rax, -0x20(%rbp) cmpq $0x0, -0x20(%rbp) jne 0x4a2d movq $0x0, -0x8(%rbp) jmp 0x4a51 movq -0x18(%rbp), %rcx movq -0x20(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x20(%rbp), %rdi xorl %esi, %esi movl $0x10, %edx callq 0x10a0 movq -0x20(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
vector_f_create: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi cmp [rbp+var_10], 0 jz short loc_49B9 jmp short loc_49D8 loc_49B9: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov edx, 15h lea rcx, aVectorfVectorF; "VectorF *vector_f_create(Arena *, size_"... call ___assert_fail loc_49D8: cmp [rbp+var_18], 0 jbe short loc_49E8 cmp [rbp+var_18], 4 ja short loc_49E8 jmp short loc_4A07 loc_49E8: lea rdi, aDim0DimVectorM; "dim > 0 && dim <= VECTOR_MAX_DIM" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov edx, 16h lea rcx, aVectorfVectorF; "VectorF *vector_f_create(Arena *, size_"... call ___assert_fail loc_4A07: mov rdi, [rbp+var_10] mov edx, 20h ; ' ' mov rsi, rdx call arena_alloc_aligned mov [rbp+var_20], rax cmp [rbp+var_20], 0 jnz short loc_4A2D mov [rbp+var_8], 0 jmp short loc_4A51 loc_4A2D: mov rcx, [rbp+var_18] mov rax, [rbp+var_20] mov [rax+10h], rcx mov rdi, [rbp+var_20] xor esi, esi mov edx, 10h call _memset mov rax, [rbp+var_20] mov [rbp+var_8], rax loc_4A51: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long vector_f_create(_QWORD *a1, unsigned long long a2) { long long v3; // [rsp+0h] [rbp-20h] if ( !a1 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 21LL, "VectorF *vector_f_create(Arena *, size_t)"); if ( !a2 || a2 > 4 ) __assert_fail( "dim > 0 && dim <= VECTOR_MAX_DIM", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 22LL, "VectorF *vector_f_create(Arena *, size_t)"); v3 = arena_alloc_aligned(a1, 32LL, 32LL); if ( !v3 ) return 0LL; *(_QWORD *)(v3 + 16) = a2; memset(v3, 0LL, 16LL); return v3; }
vector_f_create: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI CMP qword ptr [RBP + -0x10],0x0 JZ 0x001049b9 JMP 0x001049d8 LAB_001049b9: LEA RDI,[0x10a1c3] LEA RSI,[0x10b724] MOV EDX,0x15 LEA RCX,[0x10b764] CALL 0x00101090 LAB_001049d8: CMP qword ptr [RBP + -0x18],0x0 JBE 0x001049e8 CMP qword ptr [RBP + -0x18],0x4 JA 0x001049e8 JMP 0x00104a07 LAB_001049e8: LEA RDI,[0x10b78e] LEA RSI,[0x10b724] MOV EDX,0x16 LEA RCX,[0x10b764] CALL 0x00101090 LAB_00104a07: MOV RDI,qword ptr [RBP + -0x10] MOV EDX,0x20 MOV RSI,RDX CALL 0x001043d0 MOV qword ptr [RBP + -0x20],RAX CMP qword ptr [RBP + -0x20],0x0 JNZ 0x00104a2d MOV qword ptr [RBP + -0x8],0x0 JMP 0x00104a51 LAB_00104a2d: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX + 0x10],RCX MOV RDI,qword ptr [RBP + -0x20] XOR ESI,ESI MOV EDX,0x10 CALL 0x001010a0 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x8],RAX LAB_00104a51: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
void * vector_f_create(long param_1,ulong param_2) { void *local_10; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL","/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c", 0x15,"VectorF *vector_f_create(Arena *, size_t)"); } if ((param_2 != 0) && (param_2 < 5)) { local_10 = (void *)arena_alloc_aligned(param_1); if (local_10 == (void *)0x0) { local_10 = (void *)0x0; } else { *(ulong *)((long)local_10 + 0x10) = param_2; memset(local_10,0,0x10); } return local_10; } /* WARNING: Subroutine does not return */ __assert_fail("dim > 0 && dim <= VECTOR_MAX_DIM", "/workspace/llm4binary/github2025/eshkol/src/core/utils/vector.c",0x16, "VectorF *vector_f_create(Arena *, size_t)"); }
13,433
vector_f_create
tsotchke[P]eshkol/src/core/utils/vector.c
VectorF* vector_f_create(Arena* arena, size_t dim) { assert(arena != NULL); assert(dim > 0 && dim <= VECTOR_MAX_DIM); VectorF* vec = arena_alloc_aligned(arena, sizeof(VectorF), VECTOR_ALIGNMENT); if (!vec) { return NULL; } vec->dim = dim; memset(vec->data, 0, sizeof(vec->data)); return vec; }
O3
c
vector_f_create: pushq %rbx testq %rdi, %rdi je 0x410b movq %rsi, %rbx leaq -0x1(%rsi), %rax cmpq $0x4, %rax jae 0x412a movl $0x20, %esi movl $0x20, %edx callq 0x3e09 testq %rax, %rax je 0x4109 movq %rbx, 0x10(%rax) xorps %xmm0, %xmm0 movaps %xmm0, (%rax) popq %rbx retq leaq 0x302d(%rip), %rdi # 0x713f leaq 0x45d7(%rip), %rsi # 0x86f0 leaq 0x4622(%rip), %rcx # 0x8742 movl $0x15, %edx callq 0x1090 leaq 0x463b(%rip), %rdi # 0x876c leaq 0x45b8(%rip), %rsi # 0x86f0 leaq 0x4603(%rip), %rcx # 0x8742 movl $0x16, %edx callq 0x1090
vector_f_create: push rbx test rdi, rdi jz short loc_410B mov rbx, rsi lea rax, [rsi-1] cmp rax, 4 jnb short loc_412A mov esi, 20h ; ' ' mov edx, 20h ; ' ' call arena_alloc_aligned test rax, rax jz short loc_4109 mov [rax+10h], rbx xorps xmm0, xmm0 movaps xmmword ptr [rax], xmm0 loc_4109: pop rbx retn loc_410B: lea rdi, aArenaNull; "arena != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVectorfVectorF; "VectorF *vector_f_create(Arena *, size_"... mov edx, 15h call ___assert_fail loc_412A: lea rdi, aDim0DimVectorM; "dim > 0 && dim <= VECTOR_MAX_DIM" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVectorfVectorF; "VectorF *vector_f_create(Arena *, size_"... mov edx, 16h call ___assert_fail
long long vector_f_create(_QWORD *a1, long long a2) { long long result; // rax if ( !a1 ) __assert_fail( "arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 21LL, "VectorF *vector_f_create(Arena *, size_t)"); if ( (unsigned long long)(a2 - 1) >= 4 ) __assert_fail( "dim > 0 && dim <= VECTOR_MAX_DIM", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 22LL, "VectorF *vector_f_create(Arena *, size_t)"); result = arena_alloc_aligned(a1, 32LL, 0x20uLL); if ( result ) { *(_QWORD *)(result + 16) = a2; *(_OWORD *)result = 0LL; } return result; }
vector_f_create: PUSH RBX TEST RDI,RDI JZ 0x0010410b MOV RBX,RSI LEA RAX,[RSI + -0x1] CMP RAX,0x4 JNC 0x0010412a MOV ESI,0x20 MOV EDX,0x20 CALL 0x00103e09 TEST RAX,RAX JZ 0x00104109 MOV qword ptr [RAX + 0x10],RBX XORPS XMM0,XMM0 MOVAPS xmmword ptr [RAX],XMM0 LAB_00104109: POP RBX RET LAB_0010410b: LEA RDI,[0x10713f] LEA RSI,[0x1086f0] LEA RCX,[0x108742] MOV EDX,0x15 CALL 0x00101090 LAB_0010412a: LEA RDI,[0x10876c] LEA RSI,[0x1086f0] LEA RCX,[0x108742] MOV EDX,0x16 CALL 0x00101090
void vector_f_create(long param_1,long param_2) { int8 *puVar1; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("arena != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c" ,0x15,"VectorF *vector_f_create(Arena *, size_t)"); } if (param_2 - 1U < 4) { puVar1 = (int8 *)arena_alloc_aligned(param_1,0x20,0x20); if (puVar1 != (int8 *)0x0) { puVar1[2] = param_2; *puVar1 = 0; puVar1[1] = 0; } return; } /* WARNING: Subroutine does not return */ __assert_fail("dim > 0 && dim <= VECTOR_MAX_DIM", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/utils/vector.c", 0x16,"VectorF *vector_f_create(Arena *, size_t)"); }
13,434
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::unget()
monkey531[P]llama/common/./json.hpp
void unget() { next_unget = true; --position.chars_read_total; // in case we "unget" a newline, we have to also decrement the lines_read if (position.chars_read_current_line == 0) { if (position.lines_read > 0) { --position.lines_read; } } else { --position.chars_read_current_line; } if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof())) { JSON_ASSERT(!token_string.empty()); token_string.pop_back(); } }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::unget(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) movb $0x1, 0x18(%rax) movq 0x20(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x20(%rax) cmpq $0x0, 0x28(%rax) jne 0x19f919 movq 0x8(%rsp), %rax cmpq $0x0, 0x30(%rax) jbe 0x19f917 movq 0x8(%rsp), %rax movq 0x30(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x30(%rax) jmp 0x19f92a movq 0x8(%rsp), %rax movq 0x28(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x28(%rax) movq 0x8(%rsp), %rax movl 0x14(%rax), %eax movl %eax, 0x4(%rsp) callq 0xaf170 movl %eax, %ecx movl 0x4(%rsp), %eax cmpl %ecx, %eax setne %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x19f950 jmp 0x19f95e movq 0x8(%rsp), %rdi addq $0x38, %rdi callq 0xb0d00 addq $0x18, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE5ungetEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_10], rax mov byte ptr [rax+18h], 1 mov rcx, [rax+20h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+20h], rcx cmp qword ptr [rax+28h], 0 jnz short loc_19F919 mov rax, [rsp+18h+var_10] cmp qword ptr [rax+30h], 0 jbe short loc_19F917 mov rax, [rsp+18h+var_10] mov rcx, [rax+30h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+30h], rcx loc_19F917: jmp short loc_19F92A loc_19F919: mov rax, [rsp+18h+var_10] mov rcx, [rax+28h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+28h], rcx loc_19F92A: mov rax, [rsp+18h+var_10] mov eax, [rax+14h] mov [rsp+18h+var_14], eax call _ZNSt11char_traitsIcE3eofEv; std::char_traits<char>::eof(void) mov ecx, eax mov eax, [rsp+18h+var_14] cmp eax, ecx setnz al xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_19F950 jmp short loc_19F95E loc_19F950: mov rdi, [rsp+18h+var_10] add rdi, 38h ; '8' call _ZNSt6vectorIcSaIcEE8pop_backEv; std::vector<char>::pop_back(void) loc_19F95E: add rsp, 18h retn
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::unget( long long a1) { int v1; // ecx char result; // al int v3; // [rsp+4h] [rbp-14h] *(_BYTE *)(a1 + 24) = 1; --*(_QWORD *)(a1 + 32); if ( *(_QWORD *)(a1 + 40) ) { --*(_QWORD *)(a1 + 40); } else if ( *(_QWORD *)(a1 + 48) ) { --*(_QWORD *)(a1 + 48); } v3 = *(_DWORD *)(a1 + 20); v1 = std::char_traits<char>::eof(); result = v3 != v1; if ( v3 != v1 ) return std::vector<char>::pop_back(a1 + 56); return result; }
basic_json: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV qword ptr [RSP + 0x18],RSI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOV RCX,qword ptr [RSP + 0x18] MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RAX],XMM0 MOV RDI,qword ptr [RSP + 0x18] XOR ESI,ESI CALL 0x0019f9a0 MOV RDI,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x18] MOV byte ptr [RAX],0x0 MOV qword ptr [RSP + 0x10],0x0 MOV RAX,qword ptr [RSP + 0x18] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX LAB_0019f923: CALL 0x0019faf0 JMP 0x0019f92a LAB_0019f92a: MOV RDI,qword ptr [RSP + 0x8] MOV ESI,0x1 CALL 0x0019f9a0 ADD RSP,0x28 RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,basic_json *param_1) { int8 uVar1; uVar1 = *(int8 *)(param_1 + 8); *(int8 *)this = *(int8 *)param_1; *(int8 *)(this + 8) = uVar1; assert_invariant(SUB81(param_1,0)); *param_1 = (basic_json)0x0; *(int8 *)(param_1 + 8) = 0; /* try { // try from 0019f923 to 0019f927 has its CatchHandler @ 0019f93e */ set_parents(); assert_invariant(SUB81(this,0)); return; }
13,435
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::unget()
monkey531[P]llama/common/./json.hpp
void unget() { next_unget = true; --position.chars_read_total; // in case we "unget" a newline, we have to also decrement the lines_read if (position.chars_read_current_line == 0) { if (position.lines_read > 0) { --position.lines_read; } } else { --position.chars_read_current_line; } if (JSON_HEDLEY_LIKELY(current != char_traits<char_type>::eof())) { JSON_ASSERT(!token_string.empty()); token_string.pop_back(); } }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::unget(): movb $0x1, 0x18(%rdi) decq 0x20(%rdi) movq 0x28(%rdi), %rax testq %rax, %rax je 0x41851 leaq 0x28(%rdi), %rcx jmp 0x4185e movq 0x30(%rdi), %rax testq %rax, %rax je 0x41864 leaq 0x30(%rdi), %rcx decq %rax movq %rax, (%rcx) cmpl $-0x1, 0x14(%rdi) je 0x4187b movq 0x40(%rdi), %rax cmpq %rax, 0x38(%rdi) je 0x4187c decq %rax movq %rax, 0x40(%rdi) retq pushq %rax leaq 0x58f8c(%rip), %rdi # 0x9a810 leaq 0x585a3(%rip), %rsi # 0x99e2e leaq 0x58f94(%rip), %rcx # 0x9a826 movl $0x2240, %edx # imm = 0x2240 callq 0x204a0
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5ungetEv: mov byte ptr [rdi+18h], 1 dec qword ptr [rdi+20h] mov rax, [rdi+28h] test rax, rax jz short loc_41851 lea rcx, [rdi+28h] jmp short loc_4185E loc_41851: mov rax, [rdi+30h] test rax, rax jz short loc_41864 lea rcx, [rdi+30h] loc_4185E: dec rax mov [rcx], rax loc_41864: cmp dword ptr [rdi+14h], 0FFFFFFFFh jz short locret_4187B mov rax, [rdi+40h] cmp [rdi+38h], rax jz short loc_4187C dec rax mov [rdi+40h], rax locret_4187B: retn loc_4187C: push rax lea rdi, aTokenStringEmp; "!token_string.empty()" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... lea rcx, aVoidNlohmannDe; "void nlohmann::detail::lexer<nlohmann::"... mov edx, 2240h call ___assert_fail
long long nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::unget( long long a1) { long long result; // rax _QWORD *v2; // rcx long long v3; // rax *(_BYTE *)(a1 + 24) = 1; --*(_QWORD *)(a1 + 32); result = *(_QWORD *)(a1 + 40); if ( result ) { v2 = (_QWORD *)(a1 + 40); } else { result = *(_QWORD *)(a1 + 48); if ( !result ) goto LABEL_6; v2 = (_QWORD *)(a1 + 48); } *v2 = --result; LABEL_6: if ( *(_DWORD *)(a1 + 20) != -1 ) { v3 = *(_QWORD *)(a1 + 64); if ( *(_QWORD *)(a1 + 56) == v3 ) __assert_fail( "!token_string.empty()", "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/./json.hpp", 8768LL, "void nlohmann::detail::lexer<nlohmann::basic_json<nlohmann::ordered_map>, nlohmann::detail::iterator_input_adapt" "er<__gnu_cxx::__normal_iterator<const char *, std::basic_string<char>>>>::unget() [BasicJsonType = nlohmann::bas" "ic_json<nlohmann::ordered_map>, InputAdapterType = nlohmann::detail::iterator_input_adapter<__gnu_cxx::__normal_" "iterator<const char *, std::basic_string<char>>>]"); result = v3 - 1; *(_QWORD *)(a1 + 64) = result; } return result; }
13,436
mi_make_key
eloqsql/storage/myisam/mi_key.c
uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, const uchar *record, my_off_t filepos) { uchar *pos; uchar *start; reg1 HA_KEYSEG *keyseg; my_bool is_ft= info->s->keyinfo[keynr].flag & HA_FULLTEXT; DBUG_ENTER("_mi_make_key"); if (info->s->keyinfo[keynr].flag & HA_SPATIAL) { /* TODO: nulls processing */ #ifdef HAVE_SPATIAL DBUG_RETURN(sp_make_key(info,keynr,key,record,filepos)); #else DBUG_ASSERT(0); /* mi_open should check that this never happens*/ #endif } start=key; for (keyseg=info->s->keyinfo[keynr].seg ; keyseg->type ;keyseg++) { enum ha_base_keytype type=(enum ha_base_keytype) keyseg->type; size_t length=keyseg->length; size_t char_length; CHARSET_INFO *cs=keyseg->charset; if (keyseg->null_bit) { if (record[keyseg->null_pos] & keyseg->null_bit) { *key++= 0; /* NULL in key */ continue; } *key++=1; /* Not NULL */ } char_length= ((!is_ft && cs && cs->mbmaxlen > 1) ? length/cs->mbmaxlen : length); pos= (uchar*) record+keyseg->start; if (type == HA_KEYTYPE_BIT) { if (keyseg->bit_length) { uchar bits= get_rec_bits((uchar*) record + keyseg->bit_pos, keyseg->bit_start, keyseg->bit_length); *key++= bits; length--; } memcpy((uchar*) key, pos, length); key+= length; continue; } if (keyseg->flag & HA_SPACE_PACK) { if (type != HA_KEYTYPE_NUM) { length= my_ci_lengthsp(cs, (char*) pos, length); } else { uchar *end= pos + length; while (pos < end && pos[0] == ' ') pos++; length=(size_t) (end-pos); } FIX_LENGTH(cs, pos, length, char_length); store_key_length_inc(key,char_length); memcpy(key, pos,char_length); key+=char_length; continue; } if (keyseg->flag & HA_VAR_LENGTH_PART) { uint pack_length= (keyseg->bit_start == 1 ? 1 : 2); uint tmp_length= (pack_length == 1 ? (uint) *(uchar*) pos : uint2korr(pos)); pos+= pack_length; /* Skip VARCHAR length */ set_if_smaller(length,tmp_length); FIX_LENGTH(cs, pos, length, char_length); store_key_length_inc(key,char_length); memcpy(key, pos, char_length); key+= char_length; continue; } else if (keyseg->flag & HA_BLOB_PART) { uint tmp_length=_mi_calc_blob_length(keyseg->bit_start,pos); memcpy(&pos,pos+keyseg->bit_start,sizeof(char*)); set_if_smaller(length,tmp_length); FIX_LENGTH(cs, pos, length, char_length); store_key_length_inc(key,char_length); if (char_length) { memcpy(key, pos, char_length); key+= char_length; } continue; } else if (keyseg->flag & HA_SWAP_KEY) { /* Numerical column */ if (type == HA_KEYTYPE_FLOAT) { float nr; float4get(nr,pos); if (isnan(nr)) { /* Replace NAN with zero */ bzero(key,length); key+=length; continue; } } else if (type == HA_KEYTYPE_DOUBLE) { double nr; float8get(nr,pos); if (isnan(nr)) { bzero(key,length); key+=length; continue; } } pos+=length; while (length--) { *key++ = *--pos; } continue; } FIX_LENGTH(cs, pos, length, char_length); memcpy((uchar*) key, pos, char_length); if (length > char_length) my_ci_fill(cs, (char*) key+char_length, length-char_length, ' '); key+= length; } _mi_dpointer(info,key,filepos); DBUG_PRINT("exit",("keynr: %d",keynr)); DBUG_DUMP("key",(uchar*) start,(uint) (key-start)+keyseg->length); DBUG_EXECUTE("key", _mi_print_key(DBUG_FILE,info->s->keyinfo[keynr].seg,start, (uint) (key-start));); DBUG_RETURN((uint) (key-start)); /* Return keylength */ }
O3
c
mi_make_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rcx, %r9 movq (%rdi), %rax movq 0x218(%rax), %rax movl %esi, %ecx imulq $0x70, %rcx, %rcx movzwl 0xa(%rax,%rcx), %r10d movl %r10d, -0x44(%rbp) btl $0xa, %r10d jb 0x33198 movq %rdi, -0x60(%rbp) movq %r8, -0x68(%rbp) addq %rcx, %rax movq 0x28(%rax), %r15 movb 0x18(%r15), %cl movq %rdx, -0x50(%rbp) movq %rdx, %rdi testb %cl, %cl je 0x331ae leaq -0x1(%r9), %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax movq %r9, -0x30(%rbp) movzwl 0x14(%r15), %ebx movq (%r15), %r13 movb 0x19(%r15), %dl testb %dl, %dl je 0x32dfd movl 0xc(%r15), %esi leaq 0x1(%rax), %rdi testb %dl, (%r9,%rsi) je 0x32e02 movb $0x0, (%rax) jmp 0x330fd movq %rax, %rdi jmp 0x32e05 movb $0x1, (%rax) cmpb $0x0, -0x44(%rbp) setns %al testq %r13, %r13 setne %dl andb %al, %dl movq %rbx, %r12 cmpb $0x1, %dl jne 0x32e34 movl 0x9c(%r13), %esi movq %rbx, %r12 cmpl $0x2, %esi jb 0x32e34 movl %ebx, %eax xorl %edx, %edx divl %esi movl %eax, %r12d movl 0x8(%r15), %eax leaq (%r9,%rax), %r14 cmpb $0x13, %cl jne 0x32ea6 movzbl 0x1b(%r15), %eax testl %eax, %eax je 0x32e8a movq %rdi, %r8 movzwl 0x10(%r15), %esi movzbl 0x1a(%r15), %ecx movzbl (%r9,%rsi), %edx leal (%rcx,%rax), %edi cmpl $0x9, %edi jb 0x32e6f movzbl 0x1(%r9,%rsi), %esi shll $0x8, %esi orl %esi, %edx movq %r8, %rdi shrl %cl, %edx movl $0xffffffff, %esi # imm = 0xFFFFFFFF movl %eax, %ecx shll %cl, %esi notl %esi andl %edx, %esi movb %sil, (%r8) incq %rdi decq %rbx movq %rbx, %r12 movq %rdi, %rbx movq %r14, %rsi movq %r12, %rdx callq 0x282a0 movq %rbx, %rdi addq %r12, %rdi jmp 0x330f9 movzwl 0x12(%r15), %edx testb $0x1, %dl jne 0x32f4c testb $0x8, %dl jne 0x32f73 testb $0x20, %dl jne 0x33004 testb $0x40, %dl jne 0x33115 cmpl %ebx, %r12d jae 0x32efc leaq (%r14,%rbx), %rdx movq 0xb8(%r13), %rax movq %rbx, -0x40(%rbp) movq %rdi, %rbx movq %r13, %rdi movq %r14, %rsi movq %r12, %rcx callq *0x10(%rax) movq %rbx, %rdi movq -0x40(%rbp), %rbx movq %rax, %r12 cmpq %rbx, %r12 movq %rbx, %rax cmovbq %r12, %rbx movq %rdi, -0x38(%rbp) movq %r14, %rsi movq %rax, %r14 movq %rbx, %rdx callq 0x282a0 cmpq %r14, %r12 movq -0x38(%rbp), %r12 jae 0x32f3d leaq (%r12,%rbx), %rsi movq %r14, %rdx subq %rbx, %rdx movq 0xb8(%r13), %rax movq %r13, %rdi movl $0x20, %ecx callq *0x78(%rax) addq %r14, %r12 movq -0x30(%rbp), %r9 movq %r12, %rdi jmp 0x330fd cmpb $0x7, %cl movq %rdi, -0x38(%rbp) jne 0x32f8c movq %rbx, %rax addq %r14, %rbx testq %rax, %rax je 0x32f6e cmpb $0x20, (%r14) jne 0x32f6e incq %r14 cmpq %rbx, %r14 jb 0x32f60 subq %r14, %rbx jmp 0x32fa2 cmpb $0x1, 0x1a(%r15) jne 0x33078 movzbl (%r14), %eax movl $0x1, %ecx jmp 0x33081 movq 0xb8(%r13), %rax movq %r13, %rdi movq %r14, %rsi movq %rbx, %rdx callq *0x18(%rax) movq %rax, %rbx cmpq %r12, %rbx jbe 0x32fc1 leaq (%r14,%rbx), %rdx movq 0xb8(%r13), %rax movq %r13, %rdi movq %r14, %rsi movq %r12, %rcx callq *0x10(%rax) movq %rax, %r12 movq -0x38(%rbp), %rcx cmpq %rbx, %r12 cmovbq %r12, %rbx cmpq $0xff, %rbx jae 0x32fdd leaq 0x1(%rcx), %r12 movl %ebx, %eax jmp 0x32fe9 movb %bl, 0x2(%rcx) movb %bh, 0x1(%rcx) leaq 0x3(%rcx), %r12 movb $-0x1, %al movb %al, (%rcx) movq %r12, %rdi movq %r14, %rsi movq %rbx, %rdx callq 0x282a0 addq %rbx, %r12 movq %r12, %rdi jmp 0x330f9 movq %rdi, -0x38(%rbp) movzbl 0x1a(%r15), %edi movq %r14, %rsi callq 0x31759 movzbl 0x1a(%r15), %ecx movq (%r14,%rcx), %rsi movl %eax, %eax cmpq %rbx, %rax cmovbq %rax, %rbx cmpq %r12, %rbx jbe 0x33049 leaq (%rsi,%rbx), %rdx movq 0xb8(%r13), %rax movq %r13, %rdi movq %rsi, %r14 movq %r12, %rcx callq *0x10(%rax) movq %r14, %rsi movq %rax, %r12 movq -0x30(%rbp), %r9 movq -0x38(%rbp), %rdi cmpq %rbx, %r12 cmovbq %r12, %rbx cmpq $0xff, %rbx jae 0x3314a movb %bl, (%rdi) incq %rdi testq %rbx, %rbx jne 0x33157 jmp 0x330fd movzwl (%r14), %eax movl $0x2, %ecx addq %rcx, %r14 cmpq %rbx, %rax cmovbq %rax, %rbx cmpq %r12, %rbx jbe 0x330b8 leaq (%r14,%rbx), %rdx movq 0xb8(%r13), %rax movq %rbx, -0x40(%rbp) movq %rdi, %rbx movq %r13, %rdi movq %r14, %rsi movq %r12, %rcx callq *0x10(%rax) movq %rbx, %rdi movq -0x40(%rbp), %rbx movq %rax, %r12 cmpq %rbx, %r12 cmovbq %r12, %rbx cmpq $0xff, %rbx jae 0x330d4 movq %rbx, %r12 leaq 0x1(%rdi), %rbx movl %r12d, %eax jmp 0x330e3 movb %bl, 0x2(%rdi) movb %bh, 0x1(%rdi) movq %rbx, %r12 leaq 0x3(%rdi), %rbx movb $-0x1, %al movb %al, (%rdi) movq %rbx, %rdi movq %r14, %rsi movq %r12, %rdx callq 0x282a0 addq %r12, %rbx movq %rbx, %rdi movq -0x30(%rbp), %r9 movb 0x38(%r15), %cl addq $0x20, %r15 movq %rdi, %rax testb %cl, %cl jne 0x32dd7 jmp 0x331ae cmpb $0x6, %cl je 0x3316e movzbl %cl, %ecx cmpl $0x5, %ecx jne 0x3312c movss (%r14), %xmm0 ucomiss %xmm0, %xmm0 jp 0x33179 testl %ebx, %ebx je 0x330fd addq -0x58(%rbp), %rax movq %rdi, %rcx leaq 0x1(%rcx), %rdi movb (%rax,%rbx), %dl movb %dl, (%rcx) movq %rdi, %rcx decq %rbx jne 0x33137 jmp 0x330fd movb $-0x1, (%rdi) movb %bl, 0x2(%rdi) movb %bh, 0x1(%rdi) addq $0x3, %rdi movq %rdi, %r14 movq %rbx, %rdx callq 0x282a0 movq %r14, %rdi movq -0x30(%rbp), %r9 addq %rbx, %rdi jmp 0x330fd movsd (%r14), %xmm0 ucomisd %xmm0, %xmm0 jnp 0x3312c movq %rbx, %r14 movq %rdi, %rbx xorl %esi, %esi movq %r14, %rdx callq 0x281b0 movq %rbx, %rdi movq -0x30(%rbp), %r9 addq %r14, %rdi jmp 0x330fd movq %r9, %rcx addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x47f40 movq %rdi, %rbx movq -0x60(%rbp), %rdi movq %rbx, %rsi movq -0x68(%rbp), %rdx callq 0x3df8b subl -0x50(%rbp), %ebx movl %ebx, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_make_key: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r9, rcx mov rax, [rdi] mov rax, [rax+218h] mov ecx, esi imul rcx, 70h ; 'p' movzx r10d, word ptr [rax+rcx+0Ah] mov [rbp+var_44], r10d bt r10d, 0Ah jb loc_33198 mov [rbp+var_60], rdi mov [rbp+var_68], r8 add rax, rcx mov r15, [rax+28h] mov cl, [r15+18h] mov [rbp+var_50], rdx mov rdi, rdx test cl, cl jz loc_331AE lea rax, [r9-1] mov [rbp+var_58], rax mov rax, [rbp+var_50] mov [rbp+var_30], r9 loc_32DD7: movzx ebx, word ptr [r15+14h] mov r13, [r15] mov dl, [r15+19h] test dl, dl jz short loc_32DFD mov esi, [r15+0Ch] lea rdi, [rax+1] test [r9+rsi], dl jz short loc_32E02 mov byte ptr [rax], 0 jmp loc_330FD loc_32DFD: mov rdi, rax jmp short loc_32E05 loc_32E02: mov byte ptr [rax], 1 loc_32E05: cmp byte ptr [rbp+var_44], 0 setns al test r13, r13 setnz dl and dl, al mov r12, rbx cmp dl, 1 jnz short loc_32E34 mov esi, [r13+9Ch] mov r12, rbx cmp esi, 2 jb short loc_32E34 mov eax, ebx xor edx, edx div esi mov r12d, eax loc_32E34: mov eax, [r15+8] lea r14, [r9+rax] cmp cl, 13h jnz short loc_32EA6 movzx eax, byte ptr [r15+1Bh] test eax, eax jz short loc_32E8A mov r8, rdi movzx esi, word ptr [r15+10h] movzx ecx, byte ptr [r15+1Ah] movzx edx, byte ptr [r9+rsi] lea edi, [rcx+rax] cmp edi, 9 jb short loc_32E6F movzx esi, byte ptr [r9+rsi+1] shl esi, 8 or edx, esi loc_32E6F: mov rdi, r8 shr edx, cl mov esi, 0FFFFFFFFh mov ecx, eax shl esi, cl not esi and esi, edx mov [r8], sil inc rdi dec rbx loc_32E8A: mov r12, rbx mov rbx, rdi mov rsi, r14 mov rdx, r12 call _memcpy mov rdi, rbx add rdi, r12 jmp loc_330F9 loc_32EA6: movzx edx, word ptr [r15+12h] test dl, 1 jnz loc_32F4C test dl, 8 jnz loc_32F73 test dl, 20h jnz loc_33004 test dl, 40h jnz loc_33115 cmp r12d, ebx jnb short loc_32EFC lea rdx, [r14+rbx] mov rax, [r13+0B8h] mov [rbp+var_40], rbx mov rbx, rdi mov rdi, r13 mov rsi, r14 mov rcx, r12 call qword ptr [rax+10h] mov rdi, rbx mov rbx, [rbp+var_40] mov r12, rax loc_32EFC: cmp r12, rbx mov rax, rbx cmovb rbx, r12 mov [rbp+var_38], rdi mov rsi, r14 mov r14, rax mov rdx, rbx call _memcpy cmp r12, r14 mov r12, [rbp+var_38] jnb short loc_32F3D lea rsi, [r12+rbx] mov rdx, r14 sub rdx, rbx mov rax, [r13+0B8h] mov rdi, r13 mov ecx, 20h ; ' ' call qword ptr [rax+78h] loc_32F3D: add r12, r14 mov r9, [rbp+var_30] mov rdi, r12 jmp loc_330FD loc_32F4C: cmp cl, 7 mov [rbp+var_38], rdi jnz short loc_32F8C mov rax, rbx add rbx, r14 test rax, rax jz short loc_32F6E loc_32F60: cmp byte ptr [r14], 20h ; ' ' jnz short loc_32F6E inc r14 cmp r14, rbx jb short loc_32F60 loc_32F6E: sub rbx, r14 jmp short loc_32FA2 loc_32F73: cmp byte ptr [r15+1Ah], 1 jnz loc_33078 movzx eax, byte ptr [r14] mov ecx, 1 jmp loc_33081 loc_32F8C: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, r14 mov rdx, rbx call qword ptr [rax+18h] mov rbx, rax loc_32FA2: cmp rbx, r12 jbe short loc_32FC1 lea rdx, [r14+rbx] mov rax, [r13+0B8h] mov rdi, r13 mov rsi, r14 mov rcx, r12 call qword ptr [rax+10h] mov r12, rax loc_32FC1: mov rcx, [rbp+var_38] cmp r12, rbx cmovb rbx, r12 cmp rbx, 0FFh jnb short loc_32FDD lea r12, [rcx+1] mov eax, ebx jmp short loc_32FE9 loc_32FDD: mov [rcx+2], bl mov [rcx+1], bh lea r12, [rcx+3] mov al, 0FFh loc_32FE9: mov [rcx], al mov rdi, r12 mov rsi, r14 mov rdx, rbx call _memcpy add r12, rbx mov rdi, r12 jmp loc_330F9 loc_33004: mov [rbp+var_38], rdi movzx edi, byte ptr [r15+1Ah] mov rsi, r14 call _mi_calc_blob_length movzx ecx, byte ptr [r15+1Ah] mov rsi, [r14+rcx] mov eax, eax cmp rax, rbx cmovb rbx, rax cmp rbx, r12 jbe short loc_33049 lea rdx, [rsi+rbx] mov rax, [r13+0B8h] mov rdi, r13 mov r14, rsi mov rcx, r12 call qword ptr [rax+10h] mov rsi, r14 mov r12, rax loc_33049: mov r9, [rbp+var_30] mov rdi, [rbp+var_38] cmp r12, rbx cmovb rbx, r12 cmp rbx, 0FFh jnb loc_3314A mov [rdi], bl inc rdi test rbx, rbx jnz loc_33157 jmp loc_330FD loc_33078: movzx eax, word ptr [r14] mov ecx, 2 loc_33081: add r14, rcx cmp rax, rbx cmovb rbx, rax cmp rbx, r12 jbe short loc_330B8 lea rdx, [r14+rbx] mov rax, [r13+0B8h] mov [rbp+var_40], rbx mov rbx, rdi mov rdi, r13 mov rsi, r14 mov rcx, r12 call qword ptr [rax+10h] mov rdi, rbx mov rbx, [rbp+var_40] mov r12, rax loc_330B8: cmp r12, rbx cmovb rbx, r12 cmp rbx, 0FFh jnb short loc_330D4 mov r12, rbx lea rbx, [rdi+1] mov eax, r12d jmp short loc_330E3 loc_330D4: mov [rdi+2], bl mov [rdi+1], bh mov r12, rbx lea rbx, [rdi+3] mov al, 0FFh loc_330E3: mov [rdi], al mov rdi, rbx mov rsi, r14 mov rdx, r12 call _memcpy add rbx, r12 mov rdi, rbx loc_330F9: mov r9, [rbp+var_30] loc_330FD: mov cl, [r15+38h] add r15, 20h ; ' ' mov rax, rdi test cl, cl jnz loc_32DD7 jmp loc_331AE loc_33115: cmp cl, 6 jz short loc_3316E movzx ecx, cl cmp ecx, 5 jnz short loc_3312C movss xmm0, dword ptr [r14] ucomiss xmm0, xmm0 jp short loc_33179 loc_3312C: test ebx, ebx jz short loc_330FD add rax, [rbp+var_58] mov rcx, rdi loc_33137: lea rdi, [rcx+1] mov dl, [rax+rbx] mov [rcx], dl mov rcx, rdi dec rbx jnz short loc_33137 jmp short loc_330FD loc_3314A: mov byte ptr [rdi], 0FFh mov [rdi+2], bl mov [rdi+1], bh add rdi, 3 loc_33157: mov r14, rdi mov rdx, rbx call _memcpy mov rdi, r14 mov r9, [rbp+var_30] add rdi, rbx jmp short loc_330FD loc_3316E: movsd xmm0, qword ptr [r14] ucomisd xmm0, xmm0 jnp short loc_3312C loc_33179: mov r14, rbx mov rbx, rdi xor esi, esi mov rdx, r14 call _memset mov rdi, rbx mov r9, [rbp+var_30] add rdi, r14 jmp loc_330FD loc_33198: mov rcx, r9 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp sp_make_key loc_331AE: mov rbx, rdi mov rdi, [rbp+var_60] mov rsi, rbx mov rdx, [rbp+var_68] call _mi_dpointer sub ebx, dword ptr [rbp+var_50] mov eax, ebx add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mi_make_key(long long a1, long long a2, char *a3, long long a4, long long a5) { long long v6; // rax long long v7; // rcx long long *v8; // r15 char v9; // cl char *v10; // rdi char *v11; // rax unsigned long long v12; // rbx long long v13; // r13 unsigned __int8 v14; // dl unsigned long long v15; // r12 unsigned int v16; // esi long long v17; // rax _BYTE *v18; // r14 int v19; // eax long long v20; // rsi int v21; // ecx unsigned int v22; // edx __int16 v23; // dx unsigned long long v24; // rax _BYTE *v25; // rsi unsigned long long v26; // r14 unsigned long long v27; // rax _BYTE *v28; // rbx unsigned long long v29; // rbx unsigned long long v30; // rax long long v31; // rcx _BYTE *v32; // r12 char v33; // al unsigned int v34; // eax long long v35; // rsi _BYTE *v36; // r14 unsigned long long v37; // r12 _BYTE *v38; // rbx char v39; // al long long v40; // rax char *v41; // rcx long long v45; // [rsp+18h] [rbp-58h] int v46; // [rsp+20h] [rbp-50h] __int16 v47; // [rsp+2Ch] [rbp-44h] long long v48; // [rsp+40h] [rbp-30h] v6 = *(_QWORD *)(*(_QWORD *)a1 + 536LL); v7 = 112LL * (unsigned int)a2; v47 = *(_WORD *)(v6 + v7 + 10); if ( (v47 & 0x400) != 0 ) return sp_make_key(a1, a2, a3, a4); v8 = *(long long **)(v7 + v6 + 40); v9 = *((_BYTE *)v8 + 24); v46 = (int)a3; v10 = a3; if ( v9 ) { v45 = a4 - 1; v11 = a3; v48 = a4; do { v12 = *((unsigned __int16 *)v8 + 10); v13 = *v8; v14 = *((_BYTE *)v8 + 25); if ( v14 ) { v10 = v11 + 1; if ( (v14 & *(_BYTE *)(a4 + *((unsigned int *)v8 + 3))) != 0 ) { *v11 = 0; goto LABEL_66; } *v11 = 1; } else { v10 = v11; } v15 = v12; if ( (v47 & 0x80u) == 0 && v13 != 0 ) { v16 = *(_DWORD *)(v13 + 156); v15 = v12; if ( v16 >= 2 ) v15 = (unsigned int)v12 / v16; } v17 = *((unsigned int *)v8 + 2); v18 = (_BYTE *)(a4 + v17); if ( v9 == 19 ) { v19 = *((unsigned __int8 *)v8 + 27); if ( *((_BYTE *)v8 + 27) ) { v20 = *((unsigned __int16 *)v8 + 8); v21 = *((unsigned __int8 *)v8 + 26); v22 = *(unsigned __int8 *)(a4 + v20); if ( (unsigned int)(v21 + v19) >= 9 ) v22 = *(unsigned __int16 *)(a4 + v20); *v10++ = (v22 >> v21) & ~(-1 << v19); --v12; } memcpy(v10, v18, v12); v10 += v12; LABEL_65: a4 = v48; goto LABEL_66; } v23 = *((_WORD *)v8 + 9); if ( (v23 & 1) != 0 ) { if ( v9 == 7 ) { v27 = v12; v28 = &v18[v12]; if ( v27 ) { do { if ( *v18 != 32 ) break; ++v18; } while ( v18 < v28 ); } v29 = v28 - v18; } else { v29 = (*(long long ( **)(long long, _BYTE *, unsigned long long))(*(_QWORD *)(v13 + 184) + 24LL))( v13, v18, v12); } if ( v29 > v15 ) v15 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(v13 + 184) + 16LL))( v13, v18, &v18[v29], v15); if ( v15 < v29 ) v29 = v15; if ( v29 >= 0xFF ) { v10[2] = v29; v10[1] = BYTE1(v29); v32 = v10 + 3; v33 = -1; } else { v32 = v10 + 1; v33 = v29; } *v10 = v33; memcpy(v32, v18, v29); v10 = &v32[v29]; goto LABEL_65; } if ( (v23 & 8) != 0 ) { if ( *((_BYTE *)v8 + 26) == 1 ) { v30 = (unsigned __int8)*v18; v31 = 1LL; } else { v30 = *(unsigned __int16 *)v18; v31 = 2LL; } v36 = &v18[v31]; if ( v30 < v12 ) v12 = v30; if ( v12 > v15 ) v15 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(v13 + 184) + 16LL))( v13, v36, &v36[v12], v15); if ( v15 < v12 ) v12 = v15; if ( v12 >= 0xFF ) { v10[2] = v12; v10[1] = BYTE1(v12); v37 = v12; v38 = v10 + 3; v39 = -1; } else { v37 = v12; v38 = v10 + 1; v39 = v37; } *v10 = v39; memcpy(v38, v36, v37); v10 = &v38[v37]; goto LABEL_65; } if ( (v23 & 0x20) == 0 ) { if ( (v23 & 0x40) != 0 ) { if ( (_DWORD)v12 ) { v40 = v45 + v17; v41 = v10; do { v10 = v41 + 1; *v41++ = *(_BYTE *)(v40 + v12--); } while ( v12 ); } } else { if ( (unsigned int)v15 < (unsigned int)v12 ) v15 = (*(long long ( **)(long long, _BYTE *, _BYTE *, unsigned long long))(*(_QWORD *)(v13 + 184) + 16LL))( v13, v18, &v18[v12], v15); v24 = v12; if ( v15 < v12 ) v12 = v15; v25 = v18; v26 = v24; memcpy(v10, v25, v12); if ( v15 < v26 ) (*(void ( **)(long long, char *, unsigned long long, long long))(*(_QWORD *)(v13 + 184) + 120LL))( v13, &v10[v12], v26 - v12, 32LL); a4 = v48; v10 += v26; } goto LABEL_66; } v34 = mi_calc_blob_length(*((unsigned __int8 *)v8 + 26), (unsigned __int8 *)(a4 + v17)); v35 = *(_QWORD *)&v18[*((unsigned __int8 *)v8 + 26)]; if ( v34 < v12 ) v12 = v34; if ( v12 > v15 ) v15 = (*(long long ( **)(long long, long long, unsigned long long, unsigned long long))(*(_QWORD *)(v13 + 184) + 16LL))( v13, v35, v35 + v12, v15); a4 = v48; if ( v15 < v12 ) v12 = v15; if ( v12 >= 0xFF ) { *v10 = -1; v10[2] = v12; v10[1] = BYTE1(v12); v10 += 3; } else { *v10++ = v12; if ( !v12 ) goto LABEL_66; } memcpy(v10, v35, v12); a4 = v48; v10 += v12; LABEL_66: v9 = *((_BYTE *)v8 + 56); v8 += 4; v11 = v10; } while ( v9 ); } mi_dpointer(a1, v10, a5); return (unsigned int)((_DWORD)v10 - v46); }
_mi_make_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R9,RCX MOV RAX,qword ptr [RDI] MOV RAX,qword ptr [RAX + 0x218] MOV ECX,ESI IMUL RCX,RCX,0x70 MOVZX R10D,word ptr [RAX + RCX*0x1 + 0xa] MOV dword ptr [RBP + -0x44],R10D BT R10D,0xa JC 0x00133198 MOV qword ptr [RBP + -0x60],RDI MOV qword ptr [RBP + -0x68],R8 ADD RAX,RCX MOV R15,qword ptr [RAX + 0x28] MOV CL,byte ptr [R15 + 0x18] MOV qword ptr [RBP + -0x50],RDX MOV RDI,RDX TEST CL,CL JZ 0x001331ae LEA RAX,[R9 + -0x1] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x30],R9 LAB_00132dd7: MOVZX EBX,word ptr [R15 + 0x14] MOV R13,qword ptr [R15] MOV DL,byte ptr [R15 + 0x19] TEST DL,DL JZ 0x00132dfd MOV ESI,dword ptr [R15 + 0xc] LEA RDI,[RAX + 0x1] TEST byte ptr [R9 + RSI*0x1],DL JZ 0x00132e02 MOV byte ptr [RAX],0x0 JMP 0x001330fd LAB_00132dfd: MOV RDI,RAX JMP 0x00132e05 LAB_00132e02: MOV byte ptr [RAX],0x1 LAB_00132e05: CMP byte ptr [RBP + -0x44],0x0 SETNS AL TEST R13,R13 SETNZ DL AND DL,AL MOV R12,RBX CMP DL,0x1 JNZ 0x00132e34 MOV ESI,dword ptr [R13 + 0x9c] MOV R12,RBX CMP ESI,0x2 JC 0x00132e34 MOV EAX,EBX XOR EDX,EDX DIV ESI MOV R12D,EAX LAB_00132e34: MOV EAX,dword ptr [R15 + 0x8] LEA R14,[R9 + RAX*0x1] CMP CL,0x13 JNZ 0x00132ea6 MOVZX EAX,byte ptr [R15 + 0x1b] TEST EAX,EAX JZ 0x00132e8a MOV R8,RDI MOVZX ESI,word ptr [R15 + 0x10] MOVZX ECX,byte ptr [R15 + 0x1a] MOVZX EDX,byte ptr [R9 + RSI*0x1] LEA EDI,[RCX + RAX*0x1] CMP EDI,0x9 JC 0x00132e6f MOVZX ESI,byte ptr [R9 + RSI*0x1 + 0x1] SHL ESI,0x8 OR EDX,ESI LAB_00132e6f: MOV RDI,R8 SHR EDX,CL MOV ESI,0xffffffff MOV ECX,EAX SHL ESI,CL NOT ESI AND ESI,EDX MOV byte ptr [R8],SIL INC RDI DEC RBX LAB_00132e8a: MOV R12,RBX MOV RBX,RDI MOV RSI,R14 MOV RDX,R12 CALL 0x001282a0 MOV RDI,RBX ADD RDI,R12 JMP 0x001330f9 LAB_00132ea6: MOVZX EDX,word ptr [R15 + 0x12] TEST DL,0x1 JNZ 0x00132f4c TEST DL,0x8 JNZ 0x00132f73 TEST DL,0x20 JNZ 0x00133004 TEST DL,0x40 JNZ 0x00133115 CMP R12D,EBX JNC 0x00132efc LEA RDX,[R14 + RBX*0x1] MOV RAX,qword ptr [R13 + 0xb8] MOV qword ptr [RBP + -0x40],RBX MOV RBX,RDI MOV RDI,R13 MOV RSI,R14 MOV RCX,R12 CALL qword ptr [RAX + 0x10] MOV RDI,RBX MOV RBX,qword ptr [RBP + -0x40] MOV R12,RAX LAB_00132efc: CMP R12,RBX MOV RAX,RBX CMOVC RBX,R12 MOV qword ptr [RBP + -0x38],RDI MOV RSI,R14 MOV R14,RAX MOV RDX,RBX CALL 0x001282a0 CMP R12,R14 MOV R12,qword ptr [RBP + -0x38] JNC 0x00132f3d LEA RSI,[R12 + RBX*0x1] MOV RDX,R14 SUB RDX,RBX MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV ECX,0x20 CALL qword ptr [RAX + 0x78] LAB_00132f3d: ADD R12,R14 MOV R9,qword ptr [RBP + -0x30] MOV RDI,R12 JMP 0x001330fd LAB_00132f4c: CMP CL,0x7 MOV qword ptr [RBP + -0x38],RDI JNZ 0x00132f8c MOV RAX,RBX ADD RBX,R14 TEST RAX,RAX JZ 0x00132f6e LAB_00132f60: CMP byte ptr [R14],0x20 JNZ 0x00132f6e INC R14 CMP R14,RBX JC 0x00132f60 LAB_00132f6e: SUB RBX,R14 JMP 0x00132fa2 LAB_00132f73: CMP byte ptr [R15 + 0x1a],0x1 JNZ 0x00133078 MOVZX EAX,byte ptr [R14] MOV ECX,0x1 JMP 0x00133081 LAB_00132f8c: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x18] MOV RBX,RAX LAB_00132fa2: CMP RBX,R12 JBE 0x00132fc1 LEA RDX,[R14 + RBX*0x1] MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,R14 MOV RCX,R12 CALL qword ptr [RAX + 0x10] MOV R12,RAX LAB_00132fc1: MOV RCX,qword ptr [RBP + -0x38] CMP R12,RBX CMOVC RBX,R12 CMP RBX,0xff JNC 0x00132fdd LEA R12,[RCX + 0x1] MOV EAX,EBX JMP 0x00132fe9 LAB_00132fdd: MOV byte ptr [RCX + 0x2],BL MOV byte ptr [RCX + 0x1],BH LEA R12,[RCX + 0x3] MOV AL,0xff LAB_00132fe9: MOV byte ptr [RCX],AL MOV RDI,R12 MOV RSI,R14 MOV RDX,RBX CALL 0x001282a0 ADD R12,RBX MOV RDI,R12 JMP 0x001330f9 LAB_00133004: MOV qword ptr [RBP + -0x38],RDI MOVZX EDI,byte ptr [R15 + 0x1a] MOV RSI,R14 CALL 0x00131759 MOVZX ECX,byte ptr [R15 + 0x1a] MOV RSI,qword ptr [R14 + RCX*0x1] MOV EAX,EAX CMP RAX,RBX CMOVC RBX,RAX CMP RBX,R12 JBE 0x00133049 LEA RDX,[RSI + RBX*0x1] MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV R14,RSI MOV RCX,R12 CALL qword ptr [RAX + 0x10] MOV RSI,R14 MOV R12,RAX LAB_00133049: MOV R9,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RBP + -0x38] CMP R12,RBX CMOVC RBX,R12 CMP RBX,0xff JNC 0x0013314a MOV byte ptr [RDI],BL INC RDI TEST RBX,RBX JNZ 0x00133157 JMP 0x001330fd LAB_00133078: MOVZX EAX,word ptr [R14] MOV ECX,0x2 LAB_00133081: ADD R14,RCX CMP RAX,RBX CMOVC RBX,RAX CMP RBX,R12 JBE 0x001330b8 LEA RDX,[R14 + RBX*0x1] MOV RAX,qword ptr [R13 + 0xb8] MOV qword ptr [RBP + -0x40],RBX MOV RBX,RDI MOV RDI,R13 MOV RSI,R14 MOV RCX,R12 CALL qword ptr [RAX + 0x10] MOV RDI,RBX MOV RBX,qword ptr [RBP + -0x40] MOV R12,RAX LAB_001330b8: CMP R12,RBX CMOVC RBX,R12 CMP RBX,0xff JNC 0x001330d4 MOV R12,RBX LEA RBX,[RDI + 0x1] MOV EAX,R12D JMP 0x001330e3 LAB_001330d4: MOV byte ptr [RDI + 0x2],BL MOV byte ptr [RDI + 0x1],BH MOV R12,RBX LEA RBX,[RDI + 0x3] MOV AL,0xff LAB_001330e3: MOV byte ptr [RDI],AL MOV RDI,RBX MOV RSI,R14 MOV RDX,R12 CALL 0x001282a0 ADD RBX,R12 MOV RDI,RBX LAB_001330f9: MOV R9,qword ptr [RBP + -0x30] LAB_001330fd: MOV CL,byte ptr [R15 + 0x38] ADD R15,0x20 MOV RAX,RDI TEST CL,CL JNZ 0x00132dd7 JMP 0x001331ae LAB_00133115: CMP CL,0x6 JZ 0x0013316e MOVZX ECX,CL CMP ECX,0x5 JNZ 0x0013312c MOVSS XMM0,dword ptr [R14] UCOMISS XMM0,XMM0 JP 0x00133179 LAB_0013312c: TEST EBX,EBX JZ 0x001330fd ADD RAX,qword ptr [RBP + -0x58] MOV RCX,RDI LAB_00133137: LEA RDI,[RCX + 0x1] MOV DL,byte ptr [RAX + RBX*0x1] MOV byte ptr [RCX],DL MOV RCX,RDI DEC RBX JNZ 0x00133137 JMP 0x001330fd LAB_0013314a: MOV byte ptr [RDI],0xff MOV byte ptr [RDI + 0x2],BL MOV byte ptr [RDI + 0x1],BH ADD RDI,0x3 LAB_00133157: MOV R14,RDI MOV RDX,RBX CALL 0x001282a0 MOV RDI,R14 MOV R9,qword ptr [RBP + -0x30] ADD RDI,RBX JMP 0x001330fd LAB_0013316e: MOVSD XMM0,qword ptr [R14] UCOMISD XMM0,XMM0 JNP 0x0013312c LAB_00133179: MOV R14,RBX MOV RBX,RDI XOR ESI,ESI MOV RDX,R14 CALL 0x001281b0 MOV RDI,RBX MOV R9,qword ptr [RBP + -0x30] ADD RDI,R14 JMP 0x001330fd LAB_00133198: MOV RCX,R9 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00147f40 LAB_001331ae: MOV RBX,RDI MOV RDI,qword ptr [RBP + -0x60] MOV RSI,RBX MOV RDX,qword ptr [RBP + -0x68] CALL 0x0013df8b SUB EBX,dword ptr [RBP + -0x50] MOV EAX,EBX ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong _mi_make_key(long *param_1,ulong param_2,byte *param_3,long param_4,int8 param_5) { byte bVar1; ushort uVar2; ushort uVar3; ushort uVar4; byte bVar5; ulong uVar6; ulong uVar7; char cVar8; long lVar9; long lVar10; byte *pbVar11; uint uVar12; ulong uVar13; double *pdVar14; byte *__dest; double *__src; void *pvVar15; long *plVar16; int local_58; char local_4c; lVar9 = (param_2 & 0xffffffff) * 0x70; uVar2 = *(ushort *)(*(long *)(*param_1 + 0x218) + 10 + lVar9); if ((uVar2 >> 10 & 1) != 0) { uVar13 = sp_make_key(); return uVar13; } plVar16 = *(long **)(*(long *)(*param_1 + 0x218) + lVar9 + 0x28); cVar8 = (char)plVar16[3]; __dest = param_3; if (cVar8 != '\0') { do { uVar3 = *(ushort *)((long)plVar16 + 0x14); uVar13 = (ulong)uVar3; lVar9 = *plVar16; if (*(byte *)((long)plVar16 + 0x19) == 0) { LAB_00132e05: local_4c = (char)uVar2; uVar6 = uVar13; if ((lVar9 != 0 && -1 < local_4c) && (1 < *(uint *)(lVar9 + 0x9c))) { uVar6 = uVar13 / *(uint *)(lVar9 + 0x9c); } uVar12 = *(uint *)(plVar16 + 1); __src = (double *)(param_4 + (ulong)uVar12); if (cVar8 == '\x13') { bVar5 = *(byte *)((long)plVar16 + 0x1b); if (bVar5 != 0) { bVar1 = *(byte *)(param_4 + (ulong)*(ushort *)(plVar16 + 2)); uVar12 = (uint)bVar1; if (8 < (uint)*(byte *)((long)plVar16 + 0x1a) + (uint)bVar5) { uVar12 = (uint)CONCAT11(*(int1 *)(param_4 + 1 + (ulong)*(ushort *)(plVar16 + 2)) ,bVar1); } *__dest = ~(byte)(-1 << (bVar5 & 0x1f)) & (byte)(uVar12 >> (*(byte *)((long)plVar16 + 0x1a) & 0x1f)); __dest = __dest + 1; uVar13 = uVar13 - 1; } memcpy(__dest,__src,uVar13); __dest = __dest + uVar13; } else { uVar4 = *(ushort *)((long)plVar16 + 0x12); if ((uVar4 & 1) == 0) { if ((uVar4 & 8) == 0) { if ((uVar4 & 0x20) == 0) { if ((uVar4 & 0x40) == 0) { if ((uint)uVar6 < (uint)uVar3) { uVar6 = (**(code **)(*(long *)(lVar9 + 0xb8) + 0x10)) (lVar9,__src,(long)__src + uVar13,uVar6); } uVar7 = uVar13; if (uVar6 < uVar13) { uVar7 = uVar6; } memcpy(__dest,__src,uVar7); if (uVar6 < uVar13) { (**(code **)(*(long *)(lVar9 + 0xb8) + 0x78)) (lVar9,__dest + uVar7,uVar13 - uVar7,0x20); } __dest = __dest + uVar13; } else { if (cVar8 == '\x06') { if (NAN(*__src)) goto LAB_00133179; } else if ((cVar8 == '\x05') && (NAN(*(float *)__src))) { LAB_00133179: memset(__dest,0,uVar13); __dest = __dest + uVar13; goto LAB_001330fd; } if (uVar3 != 0) { pbVar11 = __dest; do { __dest = pbVar11 + 1; *pbVar11 = *(byte *)((ulong)uVar12 + param_4 + -1 + uVar13); uVar13 = uVar13 - 1; pbVar11 = __dest; } while (uVar13 != 0); } } } else { uVar12 = _mi_calc_blob_length(*(int1 *)((long)plVar16 + 0x1a),__src); pvVar15 = *(void **)((long)__src + (ulong)*(byte *)((long)plVar16 + 0x1a)); if (uVar12 < uVar13) { uVar13 = (ulong)uVar12; } if (uVar6 < uVar13) { uVar6 = (**(code **)(*(long *)(lVar9 + 0xb8) + 0x10)) (lVar9,pvVar15,(long)pvVar15 + uVar13,uVar6); } if (uVar6 < uVar13) { uVar13 = uVar6; } if (uVar13 < 0xff) { *__dest = (byte)uVar13; __dest = __dest + 1; if (uVar13 == 0) goto LAB_001330fd; } else { *__dest = 0xff; __dest[2] = (byte)uVar13; __dest[1] = (byte)(uVar13 >> 8); __dest = __dest + 3; } memcpy(__dest,pvVar15,uVar13); __dest = __dest + uVar13; } } else { if (*(char *)((long)plVar16 + 0x1a) == '\x01') { uVar7 = (ulong)*(byte *)__src; lVar10 = 1; } else { uVar7 = (ulong)*(ushort *)__src; lVar10 = 2; } pvVar15 = (void *)((long)__src + lVar10); if (uVar7 < uVar13) { uVar13 = uVar7; } if (uVar6 < uVar13) { uVar6 = (**(code **)(*(long *)(lVar9 + 0xb8) + 0x10)) (lVar9,pvVar15,(long)pvVar15 + uVar13,uVar6); } if (uVar6 < uVar13) { uVar13 = uVar6; } bVar5 = (byte)uVar13; if (uVar13 < 0xff) { pbVar11 = __dest + 1; } else { __dest[2] = bVar5; __dest[1] = (byte)(uVar13 >> 8); pbVar11 = __dest + 3; bVar5 = 0xff; } *__dest = bVar5; memcpy(pbVar11,pvVar15,uVar13); __dest = pbVar11 + uVar13; } } else { if (cVar8 == '\a') { pdVar14 = (double *)(uVar13 + (long)__src); if (uVar13 != 0) { do { if (*(char *)__src != ' ') break; __src = (double *)((long)__src + 1); } while (__src < pdVar14); } uVar13 = (long)pdVar14 - (long)__src; } else { uVar13 = (**(code **)(*(long *)(lVar9 + 0xb8) + 0x18))(lVar9,__src,uVar13); } if (uVar6 < uVar13) { uVar6 = (**(code **)(*(long *)(lVar9 + 0xb8) + 0x10)) (lVar9,__src,(long)__src + uVar13,uVar6); } if (uVar6 < uVar13) { uVar13 = uVar6; } bVar5 = (byte)uVar13; if (uVar13 < 0xff) { pbVar11 = __dest + 1; } else { __dest[2] = bVar5; __dest[1] = (byte)(uVar13 >> 8); pbVar11 = __dest + 3; bVar5 = 0xff; } *__dest = bVar5; memcpy(pbVar11,__src,uVar13); __dest = pbVar11 + uVar13; } } } else { if ((*(byte *)(param_4 + (ulong)*(uint *)((long)plVar16 + 0xc)) & *(byte *)((long)plVar16 + 0x19)) == 0) { *__dest = 1; __dest = __dest + 1; goto LAB_00132e05; } *__dest = 0; __dest = __dest + 1; } LAB_001330fd: cVar8 = (char)plVar16[7]; plVar16 = plVar16 + 4; } while (cVar8 != '\0'); } _mi_dpointer(param_1,__dest,param_5); local_58 = (int)param_3; return (ulong)(uint)((int)__dest - local_58); }
13,437
get_internal_charset
eloqsql/mysys/charset.c
static CHARSET_INFO * get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags) { char buf[FN_REFLEN]; struct charset_info_st *cs; DBUG_ASSERT(cs_number < array_elements(all_charsets)); if ((cs= (struct charset_info_st*) all_charsets[cs_number])) { if (cs->state & MY_CS_READY) /* if CS is already initialized */ { my_collation_statistics_inc_use_count(cs_number); return cs; } /* To make things thread safe we are not allowing other threads to interfere while we may changing the cs_info_table */ mysql_mutex_lock(&THR_LOCK_charset); if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */ { MY_CHARSET_LOADER loader; strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS); my_charset_loader_init_mysys(&loader); my_read_charset_file(&loader, buf, flags); } if (cs->state & MY_CS_AVAILABLE) { if (!(cs->state & MY_CS_READY)) { if (!simple_8bit_charset_data_is_full(cs)) { CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs); if (refcs) inherit_charset_data(cs, refcs); } if (!simple_8bit_collation_data_is_full(cs)) { CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags); if (refcl) inherit_collation_data(cs, refcl); } if (my_ci_init_charset(cs, loader) || my_ci_init_collation(cs, loader)) { cs= NULL; } else cs->state|= MY_CS_READY; } my_collation_statistics_inc_use_count(cs_number); } else cs= NULL; mysql_mutex_unlock(&THR_LOCK_charset); } return cs; }
O0
c
get_internal_charset: pushq %rbp movq %rsp, %rbp subq $0x300, %rsp # imm = 0x300 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x2d0(%rbp) movl %esi, -0x2d4(%rbp) movq %rdx, -0x2e0(%rbp) jmp 0x6253e movl -0x2d4(%rbp), %eax movl %eax, %ecx leaq 0x3afa33(%rip), %rax # 0x411f80 movq (%rax,%rcx,8), %rax movq %rax, -0x2e8(%rbp) cmpq $0x0, %rax je 0x62747 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax je 0x62594 movl -0x2d4(%rbp), %edi callq 0x63ea0 movq -0x2e8(%rbp), %rax movq %rax, -0x2c8(%rbp) jmp 0x62755 leaq 0x3af895(%rip), %rdi # 0x411e30 leaq 0x4fbcd(%rip), %rsi # 0xb216f movl $0x36b, %edx # imm = 0x36B callq 0x63ed0 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x9, %eax cmpl $0x0, %eax jne 0x62610 leaq -0x210(%rbp), %rdi callq 0x61b80 movq %rax, %rdi movq -0x2e8(%rbp), %rax movq 0x10(%rax), %rsi leaq 0x4fb73(%rip), %rdx # 0xb2152 xorl %eax, %eax movl %eax, %ecx movb $0x0, %al callq 0xae140 leaq -0x2c0(%rbp), %rdi callq 0x614e0 leaq -0x210(%rbp), %rsi movq -0x2e0(%rbp), %rdx leaq -0x2c0(%rbp), %rdi callq 0x63a20 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x200, %eax # imm = 0x200 cmpl $0x0, %eax je 0x62730 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %eax andl $0x100, %eax # imm = 0x100 cmpl $0x0, %eax jne 0x62723 movq -0x2e8(%rbp), %rdi callq 0x63940 cmpb $0x0, %al jne 0x62682 movq -0x2e8(%rbp), %rdi callq 0x63f40 movq %rax, -0x2f0(%rbp) cmpq $0x0, -0x2f0(%rbp) je 0x62680 movq -0x2e8(%rbp), %rdi movq -0x2f0(%rbp), %rsi callq 0x63f80 jmp 0x62682 movq -0x2e8(%rbp), %rdi callq 0x639a0 cmpb $0x0, %al jne 0x626cb movq -0x2e8(%rbp), %rdi movq -0x2e0(%rbp), %rsi callq 0x64000 movq %rax, -0x2f8(%rbp) cmpq $0x0, -0x2f8(%rbp) je 0x626c9 movq -0x2e8(%rbp), %rdi movq -0x2f8(%rbp), %rsi callq 0x64110 jmp 0x626cb movq -0x2e8(%rbp), %rdi movq -0x2d0(%rbp), %rsi callq 0x64150 movsbl %al, %eax cmpl $0x0, %eax jne 0x62701 movq -0x2e8(%rbp), %rdi movq -0x2d0(%rbp), %rsi callq 0x641a0 movsbl %al, %eax cmpl $0x0, %eax je 0x6270e movq $0x0, -0x2e8(%rbp) jmp 0x62721 movq -0x2e8(%rbp), %rax movl 0xc(%rax), %ecx orl $0x100, %ecx # imm = 0x100 movl %ecx, 0xc(%rax) jmp 0x62723 movl -0x2d4(%rbp), %edi callq 0x63ea0 jmp 0x6273b movq $0x0, -0x2e8(%rbp) leaq 0x3af6ee(%rip), %rdi # 0x411e30 callq 0x641f0 movq -0x2e8(%rbp), %rax movq %rax, -0x2c8(%rbp) movq -0x2c8(%rbp), %rax movq %rax, -0x300(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x62785 movq -0x300(%rbp), %rax addq $0x300, %rsp # imm = 0x300 popq %rbp retq callq 0x26370 nopw (%rax,%rax)
get_internal_charset: push rbp mov rbp, rsp sub rsp, 300h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2D0], rdi mov [rbp+var_2D4], esi mov [rbp+var_2E0], rdx jmp short $+2 loc_6253E: mov eax, [rbp+var_2D4] mov ecx, eax lea rax, all_charsets mov rax, [rax+rcx*8] mov [rbp+var_2E8], rax cmp rax, 0 jz loc_62747 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 100h cmp eax, 0 jz short loc_62594 mov edi, [rbp+var_2D4] call my_collation_statistics_inc_use_count mov rax, [rbp+var_2E8] mov [rbp+var_2C8], rax jmp loc_62755 loc_62594: lea rdi, THR_LOCK_charset lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 36Bh call inline_mysql_mutex_lock_0 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 9 cmp eax, 0 jnz short loc_62610 lea rdi, [rbp+var_210] call get_charsets_dir mov rdi, rax mov rax, [rbp+var_2E8] mov rsi, [rax+10h] lea rdx, aIndexXml+5; ".xml" xor eax, eax mov ecx, eax mov al, 0 call strxmov lea rdi, [rbp+var_2C0] call my_charset_loader_init_mysys lea rsi, [rbp+var_210] mov rdx, [rbp+var_2E0] lea rdi, [rbp+var_2C0] call my_read_charset_file loc_62610: mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 200h cmp eax, 0 jz loc_62730 mov rax, [rbp+var_2E8] mov eax, [rax+0Ch] and eax, 100h cmp eax, 0 jnz loc_62723 mov rdi, [rbp+var_2E8] call simple_8bit_charset_data_is_full cmp al, 0 jnz short loc_62682 mov rdi, [rbp+var_2E8] call find_charset_data_inheritance_source mov [rbp+var_2F0], rax cmp [rbp+var_2F0], 0 jz short loc_62680 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2F0] call inherit_charset_data loc_62680: jmp short $+2 loc_62682: mov rdi, [rbp+var_2E8] call simple_8bit_collation_data_is_full cmp al, 0 jnz short loc_626CB mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2E0] call find_collation_data_inheritance_source mov [rbp+var_2F8], rax cmp [rbp+var_2F8], 0 jz short loc_626C9 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2F8] call inherit_collation_data loc_626C9: jmp short $+2 loc_626CB: mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2D0] call my_ci_init_charset movsx eax, al cmp eax, 0 jnz short loc_62701 mov rdi, [rbp+var_2E8] mov rsi, [rbp+var_2D0] call my_ci_init_collation movsx eax, al cmp eax, 0 jz short loc_6270E loc_62701: mov [rbp+var_2E8], 0 jmp short loc_62721 loc_6270E: mov rax, [rbp+var_2E8] mov ecx, [rax+0Ch] or ecx, 100h mov [rax+0Ch], ecx loc_62721: jmp short $+2 loc_62723: mov edi, [rbp+var_2D4] call my_collation_statistics_inc_use_count jmp short loc_6273B loc_62730: mov [rbp+var_2E8], 0 loc_6273B: lea rdi, THR_LOCK_charset call inline_mysql_mutex_unlock_0 loc_62747: mov rax, [rbp+var_2E8] mov [rbp+var_2C8], rax loc_62755: mov rax, [rbp+var_2C8] mov [rbp+var_300], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_62785 mov rax, [rbp+var_300] add rsp, 300h pop rbp retn loc_62785: call ___stack_chk_fail
long long get_internal_charset(long long a1, unsigned int a2, long long a3) { unsigned int charsets_dir; // eax int v4; // r8d int v5; // r9d long long collation_data_inheritance_source; // [rsp+8h] [rbp-2F8h] long long charset_data_inheritance_source; // [rsp+10h] [rbp-2F0h] long long v9; // [rsp+18h] [rbp-2E8h] _BYTE v12[176]; // [rsp+40h] [rbp-2C0h] BYREF _BYTE v13[520]; // [rsp+F0h] [rbp-210h] BYREF unsigned long long v14; // [rsp+2F8h] [rbp-8h] v14 = __readfsqword(0x28u); v9 = all_charsets[a2]; if ( !v9 ) return v9; if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 ) { inline_mysql_mutex_lock_0(&THR_LOCK_charset, "/workspace/llm4binary/github2025/eloqsql/mysys/charset.c", 875LL); if ( (*(_DWORD *)(v9 + 12) & 9) == 0 ) { charsets_dir = (unsigned int)get_charsets_dir(v13); strxmov(charsets_dir, *(_QWORD *)(v9 + 16), (unsigned int)".xml", 0, v4, v5); my_charset_loader_init_mysys((long long)v12); my_read_charset_file(v12, v13, a3); } if ( (*(_DWORD *)(v9 + 12) & 0x200) != 0 ) { if ( (*(_DWORD *)(v9 + 12) & 0x100) == 0 ) { if ( !(unsigned __int8)simple_8bit_charset_data_is_full(v9) ) { charset_data_inheritance_source = find_charset_data_inheritance_source(v9); if ( charset_data_inheritance_source ) inherit_charset_data(v9, charset_data_inheritance_source); } if ( !(unsigned __int8)simple_8bit_collation_data_is_full(v9) ) { collation_data_inheritance_source = find_collation_data_inheritance_source(v9, a3); if ( collation_data_inheritance_source ) inherit_collation_data(v9, collation_data_inheritance_source); } if ( (unsigned __int8)my_ci_init_charset(v9, a1) || (unsigned __int8)my_ci_init_collation(v9, a1) ) v9 = 0LL; else *(_DWORD *)(v9 + 12) |= 0x100u; } my_collation_statistics_inc_use_count(a2); } else { v9 = 0LL; } inline_mysql_mutex_unlock_0(&THR_LOCK_charset); return v9; } my_collation_statistics_inc_use_count(a2); return v9; }
get_internal_charset: PUSH RBP MOV RBP,RSP SUB RSP,0x300 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x2d0],RDI MOV dword ptr [RBP + -0x2d4],ESI MOV qword ptr [RBP + -0x2e0],RDX JMP 0x0016253e LAB_0016253e: MOV EAX,dword ptr [RBP + -0x2d4] MOV ECX,EAX LEA RAX,[0x511f80] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RBP + -0x2e8],RAX CMP RAX,0x0 JZ 0x00162747 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x100 CMP EAX,0x0 JZ 0x00162594 MOV EDI,dword ptr [RBP + -0x2d4] CALL 0x00163ea0 MOV RAX,qword ptr [RBP + -0x2e8] MOV qword ptr [RBP + -0x2c8],RAX JMP 0x00162755 LAB_00162594: LEA RDI,[0x511e30] LEA RSI,[0x1b216f] MOV EDX,0x36b CALL 0x00163ed0 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x9 CMP EAX,0x0 JNZ 0x00162610 LEA RDI,[RBP + -0x210] CALL 0x00161b80 MOV RDI,RAX MOV RAX,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RAX + 0x10] LEA RDX,[0x1b2152] XOR EAX,EAX MOV ECX,EAX MOV AL,0x0 CALL 0x001ae140 LEA RDI,[RBP + -0x2c0] CALL 0x001614e0 LEA RSI,[RBP + -0x210] MOV RDX,qword ptr [RBP + -0x2e0] LEA RDI,[RBP + -0x2c0] CALL 0x00163a20 LAB_00162610: MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x200 CMP EAX,0x0 JZ 0x00162730 MOV RAX,qword ptr [RBP + -0x2e8] MOV EAX,dword ptr [RAX + 0xc] AND EAX,0x100 CMP EAX,0x0 JNZ 0x00162723 MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x00163940 CMP AL,0x0 JNZ 0x00162682 MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x00163f40 MOV qword ptr [RBP + -0x2f0],RAX CMP qword ptr [RBP + -0x2f0],0x0 JZ 0x00162680 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2f0] CALL 0x00163f80 LAB_00162680: JMP 0x00162682 LAB_00162682: MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x001639a0 CMP AL,0x0 JNZ 0x001626cb MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2e0] CALL 0x00164000 MOV qword ptr [RBP + -0x2f8],RAX CMP qword ptr [RBP + -0x2f8],0x0 JZ 0x001626c9 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2f8] CALL 0x00164110 LAB_001626c9: JMP 0x001626cb LAB_001626cb: MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2d0] CALL 0x00164150 MOVSX EAX,AL CMP EAX,0x0 JNZ 0x00162701 MOV RDI,qword ptr [RBP + -0x2e8] MOV RSI,qword ptr [RBP + -0x2d0] CALL 0x001641a0 MOVSX EAX,AL CMP EAX,0x0 JZ 0x0016270e LAB_00162701: MOV qword ptr [RBP + -0x2e8],0x0 JMP 0x00162721 LAB_0016270e: MOV RAX,qword ptr [RBP + -0x2e8] MOV ECX,dword ptr [RAX + 0xc] OR ECX,0x100 MOV dword ptr [RAX + 0xc],ECX LAB_00162721: JMP 0x00162723 LAB_00162723: MOV EDI,dword ptr [RBP + -0x2d4] CALL 0x00163ea0 JMP 0x0016273b LAB_00162730: MOV qword ptr [RBP + -0x2e8],0x0 LAB_0016273b: LEA RDI,[0x511e30] CALL 0x001641f0 LAB_00162747: MOV RAX,qword ptr [RBP + -0x2e8] MOV qword ptr [RBP + -0x2c8],RAX LAB_00162755: MOV RAX,qword ptr [RBP + -0x2c8] MOV qword ptr [RBP + -0x300],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00162785 MOV RAX,qword ptr [RBP + -0x300] ADD RSP,0x300 POP RBP RET LAB_00162785: CALL 0x00126370
long get_internal_charset(int8 param_1,uint param_2,int8 param_3) { char cVar1; int8 uVar2; long lVar3; long in_FS_OFFSET; long local_2f0; int1 local_2c8 [176]; int1 local_218 [520]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_2f0 = (&all_charsets)[param_2]; if (local_2f0 != 0) { if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) { inline_mysql_mutex_lock (THR_LOCK_charset,"/workspace/llm4binary/github2025/eloqsql/mysys/charset.c",0x36b); if ((*(uint *)(local_2f0 + 0xc) & 9) == 0) { uVar2 = get_charsets_dir(local_218); strxmov(uVar2,*(int8 *)(local_2f0 + 0x10),".xml",0); my_charset_loader_init_mysys(local_2c8); my_read_charset_file(local_2c8,local_218,param_3); } if ((*(uint *)(local_2f0 + 0xc) & 0x200) == 0) { local_2f0 = 0; } else { if ((*(uint *)(local_2f0 + 0xc) & 0x100) == 0) { cVar1 = simple_8bit_charset_data_is_full(local_2f0); if ((cVar1 == '\0') && (lVar3 = find_charset_data_inheritance_source(local_2f0), lVar3 != 0)) { inherit_charset_data(local_2f0,lVar3); } cVar1 = simple_8bit_collation_data_is_full(local_2f0); if ((cVar1 == '\0') && (lVar3 = find_collation_data_inheritance_source(local_2f0,param_3), lVar3 != 0)) { inherit_collation_data(local_2f0,lVar3); } cVar1 = my_ci_init_charset(local_2f0,param_1); if ((cVar1 == '\0') && (cVar1 = my_ci_init_collation(local_2f0,param_1), cVar1 == '\0')) { *(uint *)(local_2f0 + 0xc) = *(uint *)(local_2f0 + 0xc) | 0x100; } else { local_2f0 = 0; } } my_collation_statistics_inc_use_count(param_2); } inline_mysql_mutex_unlock(THR_LOCK_charset); } else { my_collation_statistics_inc_use_count(param_2); } } if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return local_2f0; }
13,438
get_internal_charset
eloqsql/mysys/charset.c
static CHARSET_INFO * get_internal_charset(MY_CHARSET_LOADER *loader, uint cs_number, myf flags) { char buf[FN_REFLEN]; struct charset_info_st *cs; DBUG_ASSERT(cs_number < array_elements(all_charsets)); if ((cs= (struct charset_info_st*) all_charsets[cs_number])) { if (cs->state & MY_CS_READY) /* if CS is already initialized */ { my_collation_statistics_inc_use_count(cs_number); return cs; } /* To make things thread safe we are not allowing other threads to interfere while we may changing the cs_info_table */ mysql_mutex_lock(&THR_LOCK_charset); if (!(cs->state & (MY_CS_COMPILED|MY_CS_LOADED))) /* if CS is not in memory */ { MY_CHARSET_LOADER loader; strxmov(get_charsets_dir(buf), cs->cs_name.str, ".xml", NullS); my_charset_loader_init_mysys(&loader); my_read_charset_file(&loader, buf, flags); } if (cs->state & MY_CS_AVAILABLE) { if (!(cs->state & MY_CS_READY)) { if (!simple_8bit_charset_data_is_full(cs)) { CHARSET_INFO *refcs= find_charset_data_inheritance_source(cs); if (refcs) inherit_charset_data(cs, refcs); } if (!simple_8bit_collation_data_is_full(cs)) { CHARSET_INFO *refcl= find_collation_data_inheritance_source(cs, flags); if (refcl) inherit_collation_data(cs, refcl); } if (my_ci_init_charset(cs, loader) || my_ci_init_collation(cs, loader)) { cs= NULL; } else cs->state|= MY_CS_READY; } my_collation_statistics_inc_use_count(cs_number); } else cs= NULL; mysql_mutex_unlock(&THR_LOCK_charset); } return cs; }
O3
c
get_internal_charset: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x2c8, %rsp # imm = 0x2C8 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) movl %esi, %r13d leaq 0x389ed7(%rip), %r12 # 0x3d4b60 movq (%r12,%r13,8), %rbx testq %rbx, %rbx je 0x4ad72 testb $0x1, 0xd(%rbx) jne 0x4ad79 movq %rdx, %r15 movq %rdi, %r14 leaq 0x389d63(%rip), %rax # 0x3d4a10 cmpq $0x0, 0x40(%rax) jne 0x4af5b leaq 0x389d51(%rip), %rdi # 0x3d4a10 callq 0x264e0 movl 0xc(%rbx), %eax testb $0x9, %al jne 0x4ad65 leaq -0x230(%rbp), %rdi callq 0x4a58f movq 0x10(%rbx), %rsi leaq 0x34460(%rip), %rdx # 0x7f146 movq %rax, %rdi xorl %ecx, %ecx xorl %eax, %eax callq 0x7bdb0 leaq -0x2e0(%rbp), %rdi movb $0x0, (%rdi) leaq -0xd01(%rip), %rax # 0x4a002 movq %rax, 0x80(%rdi) leaq -0xd00(%rip), %rax # 0x4a011 movq %rax, 0x88(%rdi) leaq -0xcf3(%rip), %rax # 0x4a02c movq %rax, 0x90(%rdi) leaq -0x3a43(%rip), %rax # 0x472ea movq %rax, 0x98(%rdi) leaq 0x2d01cd(%rip), %rax # 0x31af08 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0xd02(%rip), %rax # 0x4a04a movq %rax, 0xa8(%rdi) leaq -0x230(%rbp), %rsi movq %r15, %rdx callq 0x4b938 movl 0xc(%rbx), %eax btl $0x9, %eax jb 0x4ad89 xorl %ebx, %ebx jmp 0x4af1b xorl %ebx, %ebx jmp 0x4af37 leaq 0x38de50(%rip), %rax # 0x3d8bd0 incq (%rax,%r13,8) jmp 0x4af37 btl $0x8, %eax jb 0x4af10 cmpq $0x0, 0x40(%rbx) je 0x4adaf cmpq $0x0, 0x50(%rbx) je 0x4adaf cmpq $0x0, 0x48(%rbx) je 0x4adaf cmpq $0x0, 0x68(%rbx) jne 0x4adde movq 0x10(%rbx), %rdi movl $0x20, %esi callq 0x4aa40 testl %eax, %eax je 0x4adde cmpl %eax, (%rbx) je 0x4adde movl %eax, %eax movq (%r12,%rax,8), %rsi testq %rsi, %rsi je 0x4adde testb $0x2, 0xd(%rsi) je 0x4adde movq %rbx, %rdi callq 0x4bb81 cmpq $0x0, 0x58(%rbx) jne 0x4aed2 testb $0x10, 0xc(%rbx) jne 0x4aed2 movq 0x38(%rbx), %rax testq %rax, %rax je 0x4aed2 leaq 0x343c5(%rip), %rsi # 0x7f1cc movl $0x8, %edx movq %rax, -0x2e8(%rbp) movq -0x2e8(%rbp), %rdi callq 0x26170 movq -0x2e8(%rbp), %rcx testl %eax, %eax jne 0x4aed2 leaq 0x8(%rcx), %rdi movq %rdi, -0x2f0(%rbp) movl $0x5d, %esi callq 0x26120 testq %rax, %rax setne %dl movq -0x2e8(%rbp), %rcx addq $0x28, %rcx cmpq %rax, %rcx seta %cl andb %dl, %cl cmpb $0x1, %cl jne 0x4aed2 movq -0x2f0(%rbp), %rsi subq %rsi, %rax leaq -0x2e0(%rbp), %rdi movl $0x21, %ecx movq %rax, %rdx movq %rax, -0x2e8(%rbp) callq 0x26600 movq -0x2e8(%rbp), %rax movb $0x0, -0x2e0(%rbp,%rax) leaq -0x2e0(%rbp), %rdi movq %r15, %rsi callq 0x4a723 testl %eax, %eax je 0x4aed2 cmpl %eax, (%rbx) je 0x4aed2 movl %eax, %eax movq (%r12,%rax,8), %rax testq %rax, %rax je 0x4aed2 testb $0x2, 0xd(%rax) je 0x4aed2 cmpq $0x0, 0x58(%rbx) jne 0x4aed2 testb $0x10, 0xc(%rbx) jne 0x4aed2 movq 0x58(%rax), %rax movq %rax, 0x58(%rbx) movq 0xb8(%rbx), %rax movq (%rax), %rax testq %rax, %rax je 0x4aeed movq %rbx, %rdi movq %r14, %rsi callq *%rax testb %al, %al jne 0x4af08 movq 0xc0(%rbx), %rax movq (%rax), %rax testq %rax, %rax je 0x4af0c movq %rbx, %rdi movq %r14, %rsi callq *%rax testb %al, %al je 0x4af0c xorl %ebx, %ebx jmp 0x4af10 orb $0x1, 0xd(%rbx) leaq 0x38dcb9(%rip), %rax # 0x3d8bd0 incq (%rax,%r13,8) leaq 0x389aee(%rip), %rax # 0x3d4a10 movq 0x40(%rax), %rdi testq %rdi, %rdi jne 0x4af65 leaq 0x389ade(%rip), %rdi # 0x3d4a10 callq 0x26250 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x4af77 movq %rbx, %rax addq $0x2c8, %rsp # imm = 0x2C8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x2c534 jmp 0x4acc4 leaq 0x2cff8c(%rip), %rax # 0x31aef8 movq (%rax), %rax callq *0x160(%rax) jmp 0x4af2b callq 0x263b0
get_internal_charset: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 2C8h mov rax, fs:28h mov [rbp+var_30], rax mov r13d, esi lea r12, all_charsets mov rbx, [r12+r13*8] test rbx, rbx jz loc_4AD72 test byte ptr [rbx+0Dh], 1 jnz loc_4AD79 mov r15, rdx mov r14, rdi lea rax, THR_LOCK_charset cmp qword ptr [rax+40h], 0 jnz loc_4AF5B lea rdi, THR_LOCK_charset call _pthread_mutex_lock loc_4ACC4: mov eax, [rbx+0Ch] test al, 9 jnz loc_4AD65 lea rdi, [rbp+var_230] call get_charsets_dir mov rsi, [rbx+10h] lea rdx, aIndexXml+5; ".xml" mov rdi, rax xor ecx, ecx xor eax, eax call strxmov lea rdi, [rbp+var_2E0] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax lea rsi, [rbp+var_230] mov rdx, r15 call my_read_charset_file mov eax, [rbx+0Ch] loc_4AD65: bt eax, 9 jb short loc_4AD89 xor ebx, ebx jmp loc_4AF1B loc_4AD72: xor ebx, ebx jmp loc_4AF37 loc_4AD79: lea rax, my_collation_statistics inc qword ptr [rax+r13*8] jmp loc_4AF37 loc_4AD89: bt eax, 8 jb loc_4AF10 cmp qword ptr [rbx+40h], 0 jz short loc_4ADAF cmp qword ptr [rbx+50h], 0 jz short loc_4ADAF cmp qword ptr [rbx+48h], 0 jz short loc_4ADAF cmp qword ptr [rbx+68h], 0 jnz short loc_4ADDE loc_4ADAF: mov rdi, [rbx+10h] mov esi, 20h ; ' ' call get_charset_number_internal test eax, eax jz short loc_4ADDE cmp [rbx], eax jz short loc_4ADDE mov eax, eax mov rsi, [r12+rax*8] test rsi, rsi jz short loc_4ADDE test byte ptr [rsi+0Dh], 2 jz short loc_4ADDE mov rdi, rbx call inherit_charset_data loc_4ADDE: cmp qword ptr [rbx+58h], 0 jnz loc_4AED2 test byte ptr [rbx+0Ch], 10h jnz loc_4AED2 mov rax, [rbx+38h] test rax, rax jz loc_4AED2 lea rsi, aImport; "[import " mov edx, 8 mov [rbp+var_2E8], rax mov rdi, [rbp+var_2E8] call _strncmp mov rcx, [rbp+var_2E8] test eax, eax jnz loc_4AED2 lea rdi, [rcx+8] mov [rbp+var_2F0], rdi mov esi, 5Dh ; ']' call _strchr test rax, rax setnz dl mov rcx, [rbp+var_2E8] add rcx, 28h ; '(' cmp rcx, rax setnbe cl and cl, dl cmp cl, 1 jnz short loc_4AED2 mov rsi, [rbp+var_2F0] sub rax, rsi lea rdi, [rbp+var_2E0] mov ecx, 21h ; '!' mov rdx, rax mov [rbp+var_2E8], rax call ___memcpy_chk mov rax, [rbp+var_2E8] mov [rbp+rax+var_2E0], 0 lea rdi, [rbp+var_2E0] mov rsi, r15 call get_collation_number test eax, eax jz short loc_4AED2 cmp [rbx], eax jz short loc_4AED2 mov eax, eax mov rax, [r12+rax*8] test rax, rax jz short loc_4AED2 test byte ptr [rax+0Dh], 2 jz short loc_4AED2 cmp qword ptr [rbx+58h], 0 jnz short loc_4AED2 test byte ptr [rbx+0Ch], 10h jnz short loc_4AED2 mov rax, [rax+58h] mov [rbx+58h], rax loc_4AED2: mov rax, [rbx+0B8h] mov rax, [rax] test rax, rax jz short loc_4AEED mov rdi, rbx mov rsi, r14 call rax test al, al jnz short loc_4AF08 loc_4AEED: mov rax, [rbx+0C0h] mov rax, [rax] test rax, rax jz short loc_4AF0C mov rdi, rbx mov rsi, r14 call rax test al, al jz short loc_4AF0C loc_4AF08: xor ebx, ebx jmp short loc_4AF10 loc_4AF0C: or byte ptr [rbx+0Dh], 1 loc_4AF10: lea rax, my_collation_statistics inc qword ptr [rax+r13*8] loc_4AF1B: lea rax, THR_LOCK_charset mov rdi, [rax+40h] test rdi, rdi jnz short loc_4AF65 loc_4AF2B: lea rdi, THR_LOCK_charset call _pthread_mutex_unlock loc_4AF37: mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_4AF77 mov rax, rbx add rsp, 2C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4AF5B: call get_internal_charset_cold_1 jmp loc_4ACC4 loc_4AF65: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_4AF2B loc_4AF77: call ___stack_chk_fail
long long get_internal_charset(long long a1, unsigned int a2, long long a3) { long long v3; // r13 long long v4; // rbx long long v6; // rdx long long v7; // rcx int v8; // eax unsigned int charsets_dir; // eax int v10; // r8d int v11; // r9d int charset_number_internal; // eax long long v13; // rsi long long v14; // rax int v15; // eax unsigned long long v16; // rax int collation_number; // eax long long v18; // rax unsigned __int8 ( *v19)(long long, long long, long long, long long); // rax unsigned __int8 ( *v20)(long long, long long, long long, long long); // rax long long v22; // [rsp+0h] [rbp-2F0h] long long v23; // [rsp+8h] [rbp-2E8h] _BYTE v24[128]; // [rsp+10h] [rbp-2E0h] BYREF long long ( *v25)(long long); // [rsp+90h] [rbp-260h] long long ( *v26)(unsigned long long); // [rsp+98h] [rbp-258h] long long ( *v27)(long long, unsigned long long); // [rsp+A0h] [rbp-250h] long long ( *v28)(long long); // [rsp+A8h] [rbp-248h] long long ( *v29)(); // [rsp+B0h] [rbp-240h] long long ( *v30)(unsigned int *); // [rsp+B8h] [rbp-238h] _WORD v31[256]; // [rsp+C0h] [rbp-230h] BYREF unsigned long long v32; // [rsp+2C0h] [rbp-30h] v32 = __readfsqword(0x28u); v3 = a2; v4 = all_charsets[a2]; if ( !v4 ) return 0LL; if ( (*(_BYTE *)(v4 + 13) & 1) != 0 ) { ++my_collation_statistics[a2]; } else { if ( THR_LOCK_charset[8] ) get_internal_charset_cold_1(); else pthread_mutex_lock(THR_LOCK_charset); v8 = *(_DWORD *)(v4 + 12); if ( (v8 & 9) == 0 ) { charsets_dir = (unsigned int)get_charsets_dir(v31); strxmov(charsets_dir, *(_QWORD *)(v4 + 16), (unsigned int)".xml", 0, v10, v11); v24[0] = 0; v25 = my_once_alloc_c; v26 = my_malloc_c; v27 = my_realloc_c; v28 = my_free; v29 = my_charset_error_reporter; v30 = add_collation; my_read_charset_file(v24, v31, a3); v8 = *(_DWORD *)(v4 + 12); } if ( (v8 & 0x200) != 0 ) { if ( (v8 & 0x100) == 0 ) { if ( !*(_QWORD *)(v4 + 64) || !*(_QWORD *)(v4 + 80) || !*(_QWORD *)(v4 + 72) || !*(_QWORD *)(v4 + 104) ) { charset_number_internal = get_charset_number_internal(*(_QWORD *)(v4 + 16), 32); if ( charset_number_internal ) { if ( *(_DWORD *)v4 != charset_number_internal ) { v13 = all_charsets[charset_number_internal]; if ( v13 ) { if ( (*(_BYTE *)(v13 + 13) & 2) != 0 ) inherit_charset_data(v4); } } } } if ( !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 ) { v14 = *(_QWORD *)(v4 + 56); if ( v14 ) { v23 = *(_QWORD *)(v4 + 56); v15 = strncmp(v14, "[import ", 8LL); v7 = v23; if ( !v15 ) { v22 = v23 + 8; v16 = strchr(v23 + 8, 93LL); LOBYTE(v6) = v16 != 0; v7 = v23 + 40; LOBYTE(v7) = v16 != 0 && v23 + 40 > v16; if ( (_BYTE)v7 == 1 ) { v23 = v16 - v22; __memcpy_chk(v24, v22, v16 - v22, 33LL); v24[v23] = 0; collation_number = get_collation_number((long long)v24, a3); if ( collation_number ) { if ( *(_DWORD *)v4 != collation_number ) { v18 = all_charsets[collation_number]; if ( v18 ) { if ( (*(_BYTE *)(v18 + 13) & 2) != 0 && !*(_QWORD *)(v4 + 88) && (*(_BYTE *)(v4 + 12) & 0x10) == 0 ) *(_QWORD *)(v4 + 88) = *(_QWORD *)(v18 + 88); } } } } } } } v19 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 184); if ( v19 && v19(v4, a1, v6, v7) || (v20 = **(unsigned __int8 ( ***)(long long, long long, long long, long long))(v4 + 192)) != 0LL && v20(v4, a1, v6, v7) ) { v4 = 0LL; } else { *(_BYTE *)(v4 + 13) |= 1u; } } ++my_collation_statistics[v3]; } else { v4 = 0LL; } if ( THR_LOCK_charset[8] ) PSI_server[44](); pthread_mutex_unlock(THR_LOCK_charset); } return v4; }
get_internal_charset: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x2c8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX MOV R13D,ESI LEA R12,[0x4d4b60] MOV RBX,qword ptr [R12 + R13*0x8] TEST RBX,RBX JZ 0x0014ad72 TEST byte ptr [RBX + 0xd],0x1 JNZ 0x0014ad79 MOV R15,RDX MOV R14,RDI LEA RAX,[0x4d4a10] CMP qword ptr [RAX + 0x40],0x0 JNZ 0x0014af5b LEA RDI,[0x4d4a10] CALL 0x001264e0 LAB_0014acc4: MOV EAX,dword ptr [RBX + 0xc] TEST AL,0x9 JNZ 0x0014ad65 LEA RDI,[RBP + -0x230] CALL 0x0014a58f MOV RSI,qword ptr [RBX + 0x10] LEA RDX,[0x17f146] MOV RDI,RAX XOR ECX,ECX XOR EAX,EAX CALL 0x0017bdb0 LEA RDI,[RBP + -0x2e0] MOV byte ptr [RDI],0x0 LEA RAX,[0x14a002] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x14a011] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x14a02c] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x1472ea] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x41af08] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x14a04a] MOV qword ptr [RDI + 0xa8],RAX LEA RSI,[RBP + -0x230] MOV RDX,R15 CALL 0x0014b938 MOV EAX,dword ptr [RBX + 0xc] LAB_0014ad65: BT EAX,0x9 JC 0x0014ad89 XOR EBX,EBX JMP 0x0014af1b LAB_0014ad72: XOR EBX,EBX JMP 0x0014af37 LAB_0014ad79: LEA RAX,[0x4d8bd0] INC qword ptr [RAX + R13*0x8] JMP 0x0014af37 LAB_0014ad89: BT EAX,0x8 JC 0x0014af10 CMP qword ptr [RBX + 0x40],0x0 JZ 0x0014adaf CMP qword ptr [RBX + 0x50],0x0 JZ 0x0014adaf CMP qword ptr [RBX + 0x48],0x0 JZ 0x0014adaf CMP qword ptr [RBX + 0x68],0x0 JNZ 0x0014adde LAB_0014adaf: MOV RDI,qword ptr [RBX + 0x10] MOV ESI,0x20 CALL 0x0014aa40 TEST EAX,EAX JZ 0x0014adde CMP dword ptr [RBX],EAX JZ 0x0014adde MOV EAX,EAX MOV RSI,qword ptr [R12 + RAX*0x8] TEST RSI,RSI JZ 0x0014adde TEST byte ptr [RSI + 0xd],0x2 JZ 0x0014adde MOV RDI,RBX CALL 0x0014bb81 LAB_0014adde: CMP qword ptr [RBX + 0x58],0x0 JNZ 0x0014aed2 TEST byte ptr [RBX + 0xc],0x10 JNZ 0x0014aed2 MOV RAX,qword ptr [RBX + 0x38] TEST RAX,RAX JZ 0x0014aed2 LEA RSI,[0x17f1cc] MOV EDX,0x8 MOV qword ptr [RBP + -0x2e8],RAX MOV RDI,qword ptr [RBP + -0x2e8] CALL 0x00126170 MOV RCX,qword ptr [RBP + -0x2e8] TEST EAX,EAX JNZ 0x0014aed2 LEA RDI,[RCX + 0x8] MOV qword ptr [RBP + -0x2f0],RDI MOV ESI,0x5d CALL 0x00126120 TEST RAX,RAX SETNZ DL MOV RCX,qword ptr [RBP + -0x2e8] ADD RCX,0x28 CMP RCX,RAX SETA CL AND CL,DL CMP CL,0x1 JNZ 0x0014aed2 MOV RSI,qword ptr [RBP + -0x2f0] SUB RAX,RSI LEA RDI,[RBP + -0x2e0] MOV ECX,0x21 MOV RDX,RAX MOV qword ptr [RBP + -0x2e8],RAX CALL 0x00126600 MOV RAX,qword ptr [RBP + -0x2e8] MOV byte ptr [RBP + RAX*0x1 + -0x2e0],0x0 LEA RDI,[RBP + -0x2e0] MOV RSI,R15 CALL 0x0014a723 TEST EAX,EAX JZ 0x0014aed2 CMP dword ptr [RBX],EAX JZ 0x0014aed2 MOV EAX,EAX MOV RAX,qword ptr [R12 + RAX*0x8] TEST RAX,RAX JZ 0x0014aed2 TEST byte ptr [RAX + 0xd],0x2 JZ 0x0014aed2 CMP qword ptr [RBX + 0x58],0x0 JNZ 0x0014aed2 TEST byte ptr [RBX + 0xc],0x10 JNZ 0x0014aed2 MOV RAX,qword ptr [RAX + 0x58] MOV qword ptr [RBX + 0x58],RAX LAB_0014aed2: MOV RAX,qword ptr [RBX + 0xb8] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0014aeed MOV RDI,RBX MOV RSI,R14 CALL RAX TEST AL,AL JNZ 0x0014af08 LAB_0014aeed: MOV RAX,qword ptr [RBX + 0xc0] MOV RAX,qword ptr [RAX] TEST RAX,RAX JZ 0x0014af0c MOV RDI,RBX MOV RSI,R14 CALL RAX TEST AL,AL JZ 0x0014af0c LAB_0014af08: XOR EBX,EBX JMP 0x0014af10 LAB_0014af0c: OR byte ptr [RBX + 0xd],0x1 LAB_0014af10: LEA RAX,[0x4d8bd0] INC qword ptr [RAX + R13*0x8] LAB_0014af1b: LEA RAX,[0x4d4a10] MOV RDI,qword ptr [RAX + 0x40] TEST RDI,RDI JNZ 0x0014af65 LAB_0014af2b: LEA RDI,[0x4d4a10] CALL 0x00126250 LAB_0014af37: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0014af77 MOV RAX,RBX ADD RSP,0x2c8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014af5b: CALL 0x0012c534 JMP 0x0014acc4 LAB_0014af65: LEA RAX,[0x41aef8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014af2b LAB_0014af77: CALL 0x001263b0
uint * get_internal_charset(int8 param_1,ulong param_2,int8 param_3) { char *__s; char *__s1; long lVar1; char cVar2; uint uVar3; int iVar4; int8 uVar5; char *pcVar6; uint *puVar7; long in_FS_OFFSET; int1 local_2e8 [128]; code *local_268; code *local_260; code *local_258; code *local_250; int *local_248; code *local_240; int1 local_238 [512]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); param_2 = param_2 & 0xffffffff; puVar7 = (uint *)(&all_charsets)[param_2]; if (puVar7 == (uint *)0x0) { puVar7 = (uint *)0x0; goto LAB_0014af37; } if ((*(byte *)((long)puVar7 + 0xd) & 1) != 0) { *(long *)(my_collation_statistics + param_2 * 8) = *(long *)(my_collation_statistics + param_2 * 8) + 1; goto LAB_0014af37; } if (THR_LOCK_charset._64_8_ == 0) { pthread_mutex_lock((pthread_mutex_t *)THR_LOCK_charset); } else { get_internal_charset_cold_1(); } uVar3 = puVar7[3]; if ((uVar3 & 9) == 0) { uVar5 = get_charsets_dir(local_238); strxmov(uVar5,*(int8 *)(puVar7 + 4),".xml",0); local_2e8[0] = 0; local_268 = my_once_alloc_c; local_260 = my_malloc_c; local_258 = my_realloc_c; local_250 = my_free; local_248 = my_charset_error_reporter; local_240 = add_collation; my_read_charset_file(local_2e8,local_238,param_3); uVar3 = puVar7[3]; } if ((uVar3 >> 9 & 1) == 0) { puVar7 = (uint *)0x0; } else { if ((uVar3 >> 8 & 1) == 0) { if ((((*(long *)(puVar7 + 0x10) == 0) || (*(long *)(puVar7 + 0x14) == 0)) || (*(long *)(puVar7 + 0x12) == 0)) || (*(long *)(puVar7 + 0x1a) == 0)) { uVar3 = get_charset_number_internal(*(int8 *)(puVar7 + 4),0x20); if (((uVar3 != 0) && (*puVar7 != uVar3)) && (((&all_charsets)[uVar3] != 0 && ((*(byte *)((&all_charsets)[uVar3] + 0xd) & 2) != 0)))) { inherit_charset_data(puVar7); } } if (((*(long *)(puVar7 + 0x16) == 0) && ((puVar7[3] & 0x10) == 0)) && (__s1 = *(char **)(puVar7 + 0xe), __s1 != (char *)0x0)) { iVar4 = strncmp(__s1,"[import ",8); if (iVar4 == 0) { __s = __s1 + 8; pcVar6 = strchr(__s,0x5d); if (pcVar6 < __s1 + 0x28 && pcVar6 != (char *)0x0) { __memcpy_chk(local_2e8,__s,(long)pcVar6 - (long)__s,0x21); local_2e8[(long)pcVar6 - (long)__s] = 0; uVar3 = get_collation_number(local_2e8,param_3); if (((((uVar3 != 0) && (*puVar7 != uVar3)) && (lVar1 = (&all_charsets)[uVar3], lVar1 != 0)) && (((*(byte *)(lVar1 + 0xd) & 2) != 0 && (*(long *)(puVar7 + 0x16) == 0)))) && ((puVar7[3] & 0x10) == 0)) { *(int8 *)(puVar7 + 0x16) = *(int8 *)(lVar1 + 0x58); } } } } if ((code *)**(int8 **)(puVar7 + 0x2e) == (code *)0x0) { LAB_0014aeed: if ((code *)**(int8 **)(puVar7 + 0x30) != (code *)0x0) { cVar2 = (*(code *)**(int8 **)(puVar7 + 0x30))(puVar7,param_1); if (cVar2 != '\0') goto LAB_0014af08; } *(byte *)((long)puVar7 + 0xd) = *(byte *)((long)puVar7 + 0xd) | 1; } else { cVar2 = (*(code *)**(int8 **)(puVar7 + 0x2e))(puVar7,param_1); if (cVar2 == '\0') goto LAB_0014aeed; LAB_0014af08: puVar7 = (uint *)0x0; } } *(long *)(my_collation_statistics + param_2 * 8) = *(long *)(my_collation_statistics + param_2 * 8) + 1; } if (THR_LOCK_charset._64_8_ != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock((pthread_mutex_t *)THR_LOCK_charset); LAB_0014af37: if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return puVar7; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,439
flux::parser::ArrayExpr::clone() const
kvthweatt[P]FluxLang/src/parser/ast.cpp
std::unique_ptr<Expr> ArrayExpr::clone() const { std::vector<std::unique_ptr<Expr>> clonedElements; for (const auto& element : elements) { clonedElements.push_back(element->clone()); } return std::make_unique<ArrayExpr>(std::move(clonedElements), range); }
O1
cpp
flux::parser::ArrayExpr::clone() const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rsi, %r14 movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) movq 0x28(%rsi), %r13 movq 0x30(%rsi), %rbp cmpq %rbp, %r13 je 0xd8c2 leaq 0x20(%rsp), %r15 movq %rsp, %r12 movq (%r13), %rsi movq (%rsi), %rax movq %r15, %rdi callq *0x18(%rax) movq %r12, %rdi movq %r15, %rsi callq 0x12796 movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0xd8b9 movq (%rdi), %rax callq *0x8(%rax) addq $0x8, %r13 cmpq %rbp, %r13 jne 0xd891 movl $0x40, %edi callq 0x6270 movq %rax, %r15 movq %rsp, %r12 movq (%r12), %rax movq 0x8(%r12), %rcx leaq 0x20(%rsp), %rdi movq %rax, (%rdi) movq %rcx, 0x8(%rdi) movq 0x10(%r12), %rdx movq %rdx, 0x10(%rdi) xorps %xmm0, %xmm0 movaps %xmm0, (%r12) xorl %esi, %esi movq %rsi, 0x10(%r12) leaq 0x2d35a(%rip), %r8 # 0x3ac60 movq %r8, (%r15) movups 0x8(%r14), %xmm1 movups 0x18(%r14), %xmm2 movups %xmm1, 0x8(%r15) movups %xmm2, 0x18(%r15) leaq 0x2c854(%rip), %r8 # 0x3a178 movq %r8, (%r15) movq %rax, 0x28(%r15) movq %rcx, 0x30(%r15) movq %rdx, 0x38(%r15) movq %rsi, 0x10(%rdi) movaps %xmm0, (%rdi) callq 0x10494 movq %r15, (%rbx) movq %r12, %rdi callq 0x10494 movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xd95e movq %rax, %rbx jmp 0xd97f movq %rax, %rbx movq 0x20(%rsp), %rdi testq %rdi, %rdi je 0xd976 movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x20(%rsp) movq %rsp, %rdi callq 0x10494 movq %rbx, %rdi callq 0x6440 nop
_ZNK4flux6parser9ArrayExpr5cloneEv: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, rsi mov rbx, rdi xorps xmm0, xmm0 movaps [rsp+68h+var_68], xmm0 mov [rsp+68h+var_58], 0 mov r13, [rsi+28h] mov rbp, [rsi+30h] cmp r13, rbp jz short loc_D8C2 lea r15, [rsp+68h+var_48] mov r12, rsp loc_D891: mov rsi, [r13+0] mov rax, [rsi] mov rdi, r15 call qword ptr [rax+18h] mov rdi, r12 mov rsi, r15 call _ZNSt6vectorISt10unique_ptrIN4flux6parser4ExprESt14default_deleteIS3_EESaIS6_EE12emplace_backIJS6_EEERS6_DpOT_; std::vector<std::unique_ptr<flux::parser::Expr>>::emplace_back<std::unique_ptr<flux::parser::Expr>>(std::unique_ptr<flux::parser::Expr> &&) mov rdi, [rsp+68h+var_48] test rdi, rdi jz short loc_D8B9 mov rax, [rdi] call qword ptr [rax+8] loc_D8B9: add r13, 8 cmp r13, rbp jnz short loc_D891 loc_D8C2: mov edi, 40h ; '@'; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov r12, rsp mov rax, [r12] mov rcx, [r12+8] lea rdi, [rsp+68h+var_48] mov [rdi], rax mov [rdi+8], rcx mov rdx, [r12+10h] mov [rdi+10h], rdx xorps xmm0, xmm0 movaps xmmword ptr [r12], xmm0 xor esi, esi mov [r12+10h], rsi lea r8, off_3AC60 mov [r15], r8 movups xmm1, xmmword ptr [r14+8] movups xmm2, xmmword ptr [r14+18h] movups xmmword ptr [r15+8], xmm1 movups xmmword ptr [r15+18h], xmm2 lea r8, off_3A178 mov [r15], r8 mov [r15+28h], rax mov [r15+30h], rcx mov [r15+38h], rdx mov [rdi+10h], rsi movaps xmmword ptr [rdi], xmm0 call _ZNSt6vectorISt10unique_ptrIN4flux6parser4ExprESt14default_deleteIS3_EESaIS6_EED2Ev; std::vector<std::unique_ptr<flux::parser::Expr>>::~vector() mov [rbx], r15 mov rdi, r12 call _ZNSt6vectorISt10unique_ptrIN4flux6parser4ExprESt14default_deleteIS3_EESaIS6_EED2Ev; std::vector<std::unique_ptr<flux::parser::Expr>>::~vector() mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_D95E: mov rbx, rax jmp short loc_D97F mov rbx, rax mov rdi, [rsp+arg_18] test rdi, rdi jz short loc_D976 mov rax, [rdi] call qword ptr [rax+8] loc_D976: mov [rsp+arg_18], 0 loc_D97F: mov rdi, rsp call _ZNSt6vectorISt10unique_ptrIN4flux6parser4ExprESt14default_deleteIS3_EESaIS6_EED2Ev; std::vector<std::unique_ptr<flux::parser::Expr>>::~vector() mov rdi, rbx call __Unwind_Resume
flux::parser::ArrayExpr * flux::parser::ArrayExpr::clone(flux::parser::ArrayExpr *this, long long a2) { long long v2; // r13 long long i; // rbp long long v4; // r15 __int128 v5; // kr00_16 long long v6; // rdx __int128 v7; // xmm2 __int128 v9; // [rsp+0h] [rbp-68h] BYREF long long v10; // [rsp+10h] [rbp-58h] __int128 v11; // [rsp+20h] [rbp-48h] BYREF long long v12; // [rsp+30h] [rbp-38h] v9 = 0LL; v10 = 0LL; v2 = *(_QWORD *)(a2 + 40); for ( i = *(_QWORD *)(a2 + 48); v2 != i; v2 += 8LL ) { (*(void ( **)(__int128 *))(**(_QWORD **)v2 + 24LL))(&v11); std::vector<std::unique_ptr<flux::parser::Expr>>::emplace_back<std::unique_ptr<flux::parser::Expr>>(&v9, &v11); if ( (_QWORD)v11 ) (*(void ( **)(_QWORD))(*(_QWORD *)v11 + 8LL))(v11); } v4 = operator new(0x40uLL); v5 = v9; v11 = v9; v6 = v10; v12 = v10; v9 = 0LL; v10 = 0LL; *(_QWORD *)v4 = &off_3AC60; v7 = *(_OWORD *)(a2 + 24); *(_OWORD *)(v4 + 8) = *(_OWORD *)(a2 + 8); *(_OWORD *)(v4 + 24) = v7; *(_QWORD *)v4 = off_3A178; *(_OWORD *)(v4 + 40) = v5; *(_QWORD *)(v4 + 56) = v6; v12 = 0LL; v11 = 0LL; std::vector<std::unique_ptr<flux::parser::Expr>>::~vector(&v11); *(_QWORD *)this = v4; std::vector<std::unique_ptr<flux::parser::Expr>>::~vector(&v9); return this; }
clone: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,RSI MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 MOV R13,qword ptr [RSI + 0x28] MOV RBP,qword ptr [RSI + 0x30] CMP R13,RBP JZ 0x0010d8c2 LEA R15,[RSP + 0x20] MOV R12,RSP LAB_0010d891: MOV RSI,qword ptr [R13] MOV RAX,qword ptr [RSI] LAB_0010d898: MOV RDI,R15 CALL qword ptr [RAX + 0x18] LAB_0010d89e: MOV RDI,R12 MOV RSI,R15 CALL 0x00112796 LAB_0010d8a9: MOV RDI,qword ptr [RSP + 0x20] TEST RDI,RDI JZ 0x0010d8b9 MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x8] LAB_0010d8b9: ADD R13,0x8 CMP R13,RBP JNZ 0x0010d891 LAB_0010d8c2: MOV EDI,0x40 CALL 0x00106270 LAB_0010d8cc: MOV R15,RAX MOV R12,RSP MOV RAX,qword ptr [R12] MOV RCX,qword ptr [R12 + 0x8] LEA RDI,[RSP + 0x20] MOV qword ptr [RDI],RAX MOV qword ptr [RDI + 0x8],RCX MOV RDX,qword ptr [R12 + 0x10] MOV qword ptr [RDI + 0x10],RDX XORPS XMM0,XMM0 MOVAPS xmmword ptr [R12],XMM0 XOR ESI,ESI MOV qword ptr [R12 + 0x10],RSI LEA R8,[0x13ac60] MOV qword ptr [R15],R8 MOVUPS XMM1,xmmword ptr [R14 + 0x8] MOVUPS XMM2,xmmword ptr [R14 + 0x18] MOVUPS xmmword ptr [R15 + 0x8],XMM1 MOVUPS xmmword ptr [R15 + 0x18],XMM2 LEA R8,[0x13a178] MOV qword ptr [R15],R8 MOV qword ptr [R15 + 0x28],RAX MOV qword ptr [R15 + 0x30],RCX MOV qword ptr [R15 + 0x38],RDX MOV qword ptr [RDI + 0x10],RSI MOVAPS xmmword ptr [RDI],XMM0 CALL 0x00110494 MOV qword ptr [RBX],R15 MOV RDI,R12 CALL 0x00110494 MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* flux::parser::ArrayExpr::clone() const */ void flux::parser::ArrayExpr::clone(void) { int8 *puVar1; int8 uVar2; int8 uVar3; int8 uVar4; int8 uVar5; int8 uVar6; int8 uVar7; int8 *puVar8; long in_RSI; int8 *in_RDI; int8 local_68; int8 uStack_60; int8 local_58; long *local_48; int8 uStack_40; int8 local_38; local_68 = 0; uStack_60 = 0; local_58 = 0; puVar8 = *(int8 **)(in_RSI + 0x28); puVar1 = *(int8 **)(in_RSI + 0x30); if (puVar8 != puVar1) { do { /* try { // try from 0010d898 to 0010d89d has its CatchHandler @ 0010d95e */ (**(code **)(*(long *)*puVar8 + 0x18))((unique_ptr *)&local_48); /* try { // try from 0010d89e to 0010d8a8 has its CatchHandler @ 0010d963 */ std:: vector<std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>,std::allocator<std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>>> ::emplace_back<std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>> ((vector<std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>,std::allocator<std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>>> *)&local_68,(unique_ptr *)&local_48); if (local_48 != (long *)0x0) { (**(code **)(*local_48 + 8))(); } puVar8 = puVar8 + 1; } while (puVar8 != puVar1); } /* try { // try from 0010d8c2 to 0010d8cb has its CatchHandler @ 0010d95c */ puVar8 = (int8 *)operator_new(0x40); uVar7 = local_58; uVar6 = uStack_60; uVar5 = local_68; local_68 = 0; uStack_60 = 0; local_58 = 0; *puVar8 = &PTR__Expr_0013ac60; uVar2 = *(int8 *)(in_RSI + 0x10); uVar3 = *(int8 *)(in_RSI + 0x18); uVar4 = *(int8 *)(in_RSI + 0x20); puVar8[1] = *(int8 *)(in_RSI + 8); puVar8[2] = uVar2; puVar8[3] = uVar3; puVar8[4] = uVar4; *puVar8 = &PTR__ArrayExpr_0013a178; puVar8[5] = uVar5; puVar8[6] = uVar6; puVar8[7] = uVar7; local_38 = 0; local_48 = (long *)0x0; uStack_40 = 0; std:: vector<std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>,std::allocator<std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>>> ::~vector((vector<std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>,std::allocator<std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>>> *)&local_48); *in_RDI = puVar8; std:: vector<std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>,std::allocator<std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>>> ::~vector((vector<std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>,std::allocator<std::unique_ptr<flux::parser::Expr,std::default_delete<flux::parser::Expr>>>> *)&local_68); return; }
13,440
mysql_local_infile_read
eloqsql/libmariadb/libmariadb/ma_loaddata.c
static int mysql_local_infile_read(void *ptr, char * buf, unsigned int buf_len) { MYSQL_INFILE_INFO *info = (MYSQL_INFILE_INFO *)ptr; size_t count; count= ma_read((void *)buf, 1, (size_t)buf_len, info->fp); if (count == (size_t)-1) { info->error_no = errno; snprintf((char *)info->error_msg, sizeof(info->error_msg), CER(CR_FILE_READ), info->filename, info->error_no); } return((int)count); }
O0
c
mysql_local_infile_read: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi movl -0x14(%rbp), %eax movl %eax, %edx movq -0x20(%rbp), %rax movq (%rax), %rcx movl $0x1, %esi callq 0xbed30 movq %rax, -0x28(%rbp) cmpq $-0x1, -0x28(%rbp) jne 0xb5c60 callq 0x3a9f0 movl (%rax), %ecx movq -0x20(%rbp), %rax movl %ecx, 0x8(%rax) movq -0x20(%rbp), %rdi addq $0xc, %rdi leaq 0x1fcfc3(%rip), %rax # 0x2b2c00 movq 0x28(%rax), %rdx movq -0x20(%rbp), %rax movq 0x210(%rax), %rcx movq -0x20(%rbp), %rax movl 0x8(%rax), %r8d movl $0x201, %esi # imm = 0x201 movb $0x0, %al callq 0x3a4c0 movq -0x28(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw (%rax,%rax)
mysql_local_infile_read: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov rax, [rbp+var_8] mov [rbp+var_20], rax mov rdi, [rbp+var_10] mov eax, [rbp+var_14] mov edx, eax mov rax, [rbp+var_20] mov rcx, [rax] mov esi, 1 call ma_read mov [rbp+var_28], rax cmp [rbp+var_28], 0FFFFFFFFFFFFFFFFh jnz short loc_B5C60 call ___errno_location mov ecx, [rax] mov rax, [rbp+var_20] mov [rax+8], ecx mov rdi, [rbp+var_20] add rdi, 0Ch lea rax, mariadb_client_errors mov rdx, [rax+28h] mov rax, [rbp+var_20] mov rcx, [rax+210h] mov rax, [rbp+var_20] mov r8d, [rax+8] mov esi, 201h mov al, 0 call _snprintf loc_B5C60: mov rax, [rbp+var_28] add rsp, 30h pop rbp retn
long long mysql_local_infile_read(long long a1, long long a2, unsigned int a3) { long long v4; // [rsp+8h] [rbp-28h] v4 = ma_read(a2, 1LL, a3, *(_QWORD *)a1); if ( v4 == -1 ) { *(_DWORD *)(a1 + 8) = *(_DWORD *)__errno_location(); snprintf(a1 + 12, 513LL, mariadb_client_errors[5], *(_QWORD *)(a1 + 528), *(unsigned int *)(a1 + 8)); } return v4; }
mysql_local_infile_read: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x14] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX] MOV ESI,0x1 CALL 0x001bed30 MOV qword ptr [RBP + -0x28],RAX CMP qword ptr [RBP + -0x28],-0x1 JNZ 0x001b5c60 CALL 0x0013a9f0 MOV ECX,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RAX + 0x8],ECX MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0xc LEA RAX,[0x3b2c00] MOV RDX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RAX + 0x210] MOV RAX,qword ptr [RBP + -0x20] MOV R8D,dword ptr [RAX + 0x8] MOV ESI,0x201 MOV AL,0x0 CALL 0x0013a4c0 LAB_001b5c60: MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x30 POP RBP RET
long mysql_local_infile_read(int8 *param_1,int8 param_2,int4 param_3) { long lVar1; int *piVar2; lVar1 = ma_read(param_2,1,param_3,*param_1); if (lVar1 == -1) { piVar2 = __errno_location(); *(int *)(param_1 + 1) = *piVar2; snprintf((char *)((long)param_1 + 0xc),0x201,(char *)mariadb_client_errors._40_8_,param_1[0x42], (ulong)*(uint *)(param_1 + 1)); } return lVar1; }
13,441
glfwWindowHint
untodesu[P]riteg/build_O3/_deps/glfw-src/src/window.c
GLFWAPI void glfwWindowHint(int hint, int value) { _GLFW_REQUIRE_INIT(); switch (hint) { case GLFW_RED_BITS: _glfw.hints.framebuffer.redBits = value; return; case GLFW_GREEN_BITS: _glfw.hints.framebuffer.greenBits = value; return; case GLFW_BLUE_BITS: _glfw.hints.framebuffer.blueBits = value; return; case GLFW_ALPHA_BITS: _glfw.hints.framebuffer.alphaBits = value; return; case GLFW_DEPTH_BITS: _glfw.hints.framebuffer.depthBits = value; return; case GLFW_STENCIL_BITS: _glfw.hints.framebuffer.stencilBits = value; return; case GLFW_ACCUM_RED_BITS: _glfw.hints.framebuffer.accumRedBits = value; return; case GLFW_ACCUM_GREEN_BITS: _glfw.hints.framebuffer.accumGreenBits = value; return; case GLFW_ACCUM_BLUE_BITS: _glfw.hints.framebuffer.accumBlueBits = value; return; case GLFW_ACCUM_ALPHA_BITS: _glfw.hints.framebuffer.accumAlphaBits = value; return; case GLFW_AUX_BUFFERS: _glfw.hints.framebuffer.auxBuffers = value; return; case GLFW_STEREO: _glfw.hints.framebuffer.stereo = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_DOUBLEBUFFER: _glfw.hints.framebuffer.doublebuffer = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_TRANSPARENT_FRAMEBUFFER: _glfw.hints.framebuffer.transparent = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_SAMPLES: _glfw.hints.framebuffer.samples = value; return; case GLFW_SRGB_CAPABLE: _glfw.hints.framebuffer.sRGB = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_RESIZABLE: _glfw.hints.window.resizable = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_DECORATED: _glfw.hints.window.decorated = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_FOCUSED: _glfw.hints.window.focused = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_AUTO_ICONIFY: _glfw.hints.window.autoIconify = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_FLOATING: _glfw.hints.window.floating = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_MAXIMIZED: _glfw.hints.window.maximized = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_VISIBLE: _glfw.hints.window.visible = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_COCOA_RETINA_FRAMEBUFFER: _glfw.hints.window.ns.retina = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_COCOA_GRAPHICS_SWITCHING: _glfw.hints.context.nsgl.offline = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_SCALE_TO_MONITOR: _glfw.hints.window.scaleToMonitor = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_CENTER_CURSOR: _glfw.hints.window.centerCursor = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_FOCUS_ON_SHOW: _glfw.hints.window.focusOnShow = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_CLIENT_API: _glfw.hints.context.client = value; return; case GLFW_CONTEXT_CREATION_API: _glfw.hints.context.source = value; return; case GLFW_CONTEXT_VERSION_MAJOR: _glfw.hints.context.major = value; return; case GLFW_CONTEXT_VERSION_MINOR: _glfw.hints.context.minor = value; return; case GLFW_CONTEXT_ROBUSTNESS: _glfw.hints.context.robustness = value; return; case GLFW_OPENGL_FORWARD_COMPAT: _glfw.hints.context.forward = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_OPENGL_DEBUG_CONTEXT: _glfw.hints.context.debug = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_CONTEXT_NO_ERROR: _glfw.hints.context.noerror = value ? GLFW_TRUE : GLFW_FALSE; return; case GLFW_OPENGL_PROFILE: _glfw.hints.context.profile = value; return; case GLFW_CONTEXT_RELEASE_BEHAVIOR: _glfw.hints.context.release = value; return; case GLFW_REFRESH_RATE: _glfw.hints.refreshRate = value; return; } _glfwInputError(GLFW_INVALID_ENUM, "Invalid window hint 0x%08X", hint); }
O3
c
glfwWindowHint: leaq 0x8b520(%rip), %rax # 0xa8638 cmpl $0x0, (%rax) je 0x1d146 movl %edi, %edx cmpl $0x22000, %edi # imm = 0x22000 jg 0x1d154 leal -0x21001(%rdx), %ecx cmpl $0xf, %ecx ja 0x1d176 leaq 0x67097(%rip), %rdx # 0x841d0 movslq (%rdx,%rcx,4), %rcx addq %rdx, %rcx jmpq *%rcx movl %esi, 0x18(%rax) retq movl $0x10001, %edi # imm = 0x10001 xorl %esi, %esi xorl %eax, %eax jmp 0x18e91 leal -0x22001(%rdx), %ecx cmpl $0xb, %ecx ja 0x1d1a0 leaq 0x670aa(%rip), %rdi # 0x84210 movslq (%rdi,%rcx,4), %rcx addq %rdi, %rcx jmpq *%rcx movl %esi, 0x3a0(%rax) retq leal -0x20001(%rdx), %ecx cmpl $0xb, %ecx ja 0x1d2fc leaq 0x67014(%rip), %rdi # 0x841a0 movslq (%rdi,%rcx,4), %rcx addq %rdi, %rcx jmpq *%rcx xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x7c(%rax) retq cmpl $0x23001, %edx # imm = 0x23001 je 0x1d2ee cmpl $0x23003, %edx # imm = 0x23003 jne 0x1d2fc xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x3d0(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x8c(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x90(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x74(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x84(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x78(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x88(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x70(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x80(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x54(%rax) retq movl %esi, 0x3c4(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x3b8(%rax) retq movl %esi, 0x3a4(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x3b0(%rax) retq movl %esi, 0x3bc(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x3b4(%rax) retq movl %esi, 0x3c0(%rax) retq movl %esi, 0x3ac(%rax) retq movl %esi, 0x3a8(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x94(%rax) retq movl %esi, 0x3d8(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x44(%rax) retq movl %esi, 0x28(%rax) retq movl %esi, 0x48(%rax) retq movl %esi, 0x3c(%rax) retq movl %esi, 0x20(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x50(%rax) retq movl %esi, 0x24(%rax) retq movl %esi, 0x34(%rax) retq movl %esi, 0x1c(%rax) retq movl %esi, 0x2c(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x4c(%rax) retq movl %esi, 0x30(%rax) retq movl %esi, 0x40(%rax) retq movl %esi, 0x38(%rax) retq xorl %ecx, %ecx testl %esi, %esi setne %cl movl %ecx, 0x98(%rax) retq leaq 0x670b0(%rip), %rsi # 0x843b3 movl $0x10003, %edi # imm = 0x10003 xorl %eax, %eax jmp 0x18e91
glfwWindowHint: lea rax, _glfw cmp dword ptr [rax], 0 jz short loc_1D146 mov edx, edi cmp edi, 22000h jg short loc_1D154 lea ecx, [rdx-21001h]; switch 16 cases cmp ecx, 0Fh ja short def_1D140; jumptable 000000000001D140 default case lea rdx, jpt_1D140 movsxd rcx, ds:(jpt_1D140 - 841D0h)[rdx+rcx*4] add rcx, rdx jmp rcx; switch jump loc_1D142: mov [rax+18h], esi; jumptable 000000000001D140 case 135169 retn loc_1D146: mov edi, offset loc_10001 xor esi, esi xor eax, eax jmp _glfwInputError loc_1D154: lea ecx, [rdx-22001h]; switch 12 cases cmp ecx, 0Bh ja short def_1D16D; jumptable 000000000001D16D default case lea rdi, jpt_1D16D movsxd rcx, ds:(jpt_1D16D - 84210h)[rdi+rcx*4] add rcx, rdi jmp rcx; switch jump loc_1D16F: mov [rax+3A0h], esi; jumptable 000000000001D16D case 139265 retn def_1D140: lea ecx, [rdx-20001h]; jumptable 000000000001D140 default case cmp ecx, 0Bh ja def_1D193; jumptable 000000000001D16D case 139268 lea rdi, jpt_1D193 movsxd rcx, ds:(jpt_1D193 - 841A0h)[rdi+rcx*4] add rcx, rdi jmp rcx; switch jump loc_1D195: xor ecx, ecx; jumptable 000000000001D193 case 131073 test esi, esi setnz cl mov [rax+7Ch], ecx retn def_1D16D: cmp edx, 23001h; jumptable 000000000001D16D default case jz loc_1D2EE cmp edx, 23003h jnz def_1D193; jumptable 000000000001D16D case 139268 xor ecx, ecx test esi, esi setnz cl mov [rax+3D0h], ecx retn loc_1D1C6: xor ecx, ecx; jumptable 000000000001D193 case 131081 test esi, esi setnz cl mov [rax+8Ch], ecx retn loc_1D1D4: xor ecx, ecx; jumptable 000000000001D193 case 131084 test esi, esi setnz cl mov [rax+90h], ecx retn loc_1D1E2: xor ecx, ecx; jumptable 000000000001D193 case 131076 test esi, esi setnz cl mov [rax+74h], ecx retn loc_1D1ED: xor ecx, ecx; jumptable 000000000001D193 case 131079 test esi, esi setnz cl mov [rax+84h], ecx retn loc_1D1FB: xor ecx, ecx; jumptable 000000000001D193 case 131077 test esi, esi setnz cl mov [rax+78h], ecx retn loc_1D206: xor ecx, ecx; jumptable 000000000001D193 case 131080 test esi, esi setnz cl mov [rax+88h], ecx retn loc_1D214: xor ecx, ecx; jumptable 000000000001D193 case 131075 test esi, esi setnz cl mov [rax+70h], ecx retn loc_1D21F: xor ecx, ecx; jumptable 000000000001D193 case 131078 test esi, esi setnz cl mov [rax+80h], ecx retn loc_1D22D: xor ecx, ecx; jumptable 000000000001D193 case 131082 test esi, esi setnz cl mov [rax+54h], ecx retn loc_1D238: mov [rax+3C4h], esi; jumptable 000000000001D16D case 139273 retn loc_1D23F: xor ecx, ecx; jumptable 000000000001D16D case 139274 test esi, esi setnz cl mov [rax+3B8h], ecx retn loc_1D24D: mov [rax+3A4h], esi; jumptable 000000000001D16D case 139275 retn loc_1D254: xor ecx, ecx; jumptable 000000000001D16D case 139270 test esi, esi setnz cl mov [rax+3B0h], ecx retn loc_1D262: mov [rax+3BCh], esi; jumptable 000000000001D16D case 139272 retn loc_1D269: xor ecx, ecx; jumptable 000000000001D16D case 139271 test esi, esi setnz cl mov [rax+3B4h], ecx retn loc_1D277: mov [rax+3C0h], esi; jumptable 000000000001D16D case 139269 retn loc_1D27E: mov [rax+3ACh], esi; jumptable 000000000001D16D case 139267 retn loc_1D285: mov [rax+3A8h], esi; jumptable 000000000001D16D case 139266 retn loc_1D28C: xor ecx, ecx; jumptable 000000000001D16D case 139276 test esi, esi setnz cl mov [rax+94h], ecx retn loc_1D29A: mov [rax+3D8h], esi; jumptable 000000000001D140 case 135183 retn loc_1D2A1: xor ecx, ecx; jumptable 000000000001D140 case 135180 test esi, esi setnz cl mov [rax+44h], ecx retn loc_1D2AC: mov [rax+28h], esi; jumptable 000000000001D140 case 135173 retn loc_1D2B0: mov [rax+48h], esi; jumptable 000000000001D140 case 135181 retn loc_1D2B4: mov [rax+3Ch], esi; jumptable 000000000001D140 case 135178 retn loc_1D2B8: mov [rax+20h], esi; jumptable 000000000001D140 case 135171 retn loc_1D2BC: xor ecx, ecx; jumptable 000000000001D140 case 135184 test esi, esi setnz cl mov [rax+50h], ecx retn loc_1D2C7: mov [rax+24h], esi; jumptable 000000000001D140 case 135172 retn loc_1D2CB: mov [rax+34h], esi; jumptable 000000000001D140 case 135176 retn loc_1D2CF: mov [rax+1Ch], esi; jumptable 000000000001D140 case 135170 retn loc_1D2D3: mov [rax+2Ch], esi; jumptable 000000000001D140 case 135174 retn loc_1D2D7: xor ecx, ecx; jumptable 000000000001D140 case 135182 test esi, esi setnz cl mov [rax+4Ch], ecx retn loc_1D2E2: mov [rax+30h], esi; jumptable 000000000001D140 case 135175 retn loc_1D2E6: mov [rax+40h], esi; jumptable 000000000001D140 case 135179 retn loc_1D2EA: mov [rax+38h], esi; jumptable 000000000001D140 case 135177 retn loc_1D2EE: xor ecx, ecx test esi, esi setnz cl mov [rax+98h], ecx retn def_1D193: lea rsi, aInvalidWindowH; jumptable 000000000001D16D case 139268 mov edi, 10003h xor eax, eax jmp _glfwInputError
_DWORD * glfwWindowHint(int a1, int a2) { _DWORD *result; // rax result = glfw; if ( !glfw[0] ) return glfwInputError((unsigned int)&loc_10001, 0LL); if ( a1 > 139264 ) { switch ( a1 ) { case 139265: glfw[232] = a2; break; case 139266: glfw[234] = a2; break; case 139267: glfw[235] = a2; break; case 139268: goto LABEL_48; case 139269: glfw[240] = a2; break; case 139270: glfw[236] = a2 != 0; break; case 139271: glfw[237] = a2 != 0; break; case 139272: glfw[239] = a2; break; case 139273: glfw[241] = a2; break; case 139274: glfw[238] = a2 != 0; break; case 139275: glfw[233] = a2; break; case 139276: glfw[37] = a2 != 0; break; default: if ( a1 == 143361 ) { glfw[38] = a2 != 0; } else if ( a1 == 143363 ) { glfw[244] = a2 != 0; } else { LABEL_48: result = glfwInputError(0x10003u, (long long)"Invalid window hint 0x%08X", a1); } break; } } else { switch ( a1 ) { case 135169: glfw[6] = a2; break; case 135170: glfw[7] = a2; break; case 135171: glfw[8] = a2; break; case 135172: glfw[9] = a2; break; case 135173: glfw[10] = a2; break; case 135174: glfw[11] = a2; break; case 135175: glfw[12] = a2; break; case 135176: glfw[13] = a2; break; case 135177: glfw[14] = a2; break; case 135178: glfw[15] = a2; break; case 135179: glfw[16] = a2; break; case 135180: glfw[17] = a2 != 0; break; case 135181: glfw[18] = a2; break; case 135182: glfw[19] = a2 != 0; break; case 135183: glfw[246] = a2; break; case 135184: glfw[20] = a2 != 0; break; default: switch ( a1 ) { case 131073: glfw[31] = a2 != 0; break; case 131075: glfw[28] = a2 != 0; break; case 131076: glfw[29] = a2 != 0; break; case 131077: glfw[30] = a2 != 0; break; case 131078: glfw[32] = a2 != 0; break; case 131079: glfw[33] = a2 != 0; break; case 131080: glfw[34] = a2 != 0; break; case 131081: glfw[35] = a2 != 0; break; case 131082: glfw[21] = a2 != 0; break; case 131084: glfw[36] = a2 != 0; break; default: goto LABEL_48; } break; } } return result; }
glfwWindowHint: LEA RAX,[0x1a8638] CMP dword ptr [RAX],0x0 JZ 0x0011d146 MOV EDX,EDI CMP EDI,0x22000 JG 0x0011d154 LEA ECX,[RDX + -0x21001] CMP ECX,0xf JA 0x0011d176 LEA RDX,[0x1841d0] MOVSXD RCX,dword ptr [RDX + RCX*0x4] ADD RCX,RDX switchD: JMP RCX caseD_21001: MOV dword ptr [RAX + 0x18],ESI RET LAB_0011d146: MOV EDI,0x10001 XOR ESI,ESI XOR EAX,EAX JMP 0x00118e91 LAB_0011d154: LEA ECX,[RDX + -0x22001] CMP ECX,0xb JA 0x0011d1a0 LEA RDI,[0x184210] MOVSXD RCX,dword ptr [RDI + RCX*0x4] ADD RCX,RDI switchD: JMP RCX caseD_22001: MOV dword ptr [RAX + 0x3a0],ESI RET default: LEA ECX,[RDX + -0x20001] CMP ECX,0xb JA 0x0011d2fc LEA RDI,[0x1841a0] MOVSXD RCX,dword ptr [RDI + RCX*0x4] ADD RCX,RDI switchD: JMP RCX caseD_20001: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x7c],ECX RET default: CMP EDX,0x23001 JZ 0x0011d2ee CMP EDX,0x23003 JNZ 0x0011d2fc XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x3d0],ECX RET caseD_20009: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x8c],ECX RET caseD_2000c: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x90],ECX RET caseD_20004: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x74],ECX RET caseD_20007: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x84],ECX RET caseD_20005: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x78],ECX RET caseD_20008: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x88],ECX RET caseD_20003: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x70],ECX RET caseD_20006: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x80],ECX RET caseD_2000a: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x54],ECX RET caseD_22009: MOV dword ptr [RAX + 0x3c4],ESI RET caseD_2200a: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x3b8],ECX RET caseD_2200b: MOV dword ptr [RAX + 0x3a4],ESI RET caseD_22006: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x3b0],ECX RET caseD_22008: MOV dword ptr [RAX + 0x3bc],ESI RET caseD_22007: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x3b4],ECX RET caseD_22005: MOV dword ptr [RAX + 0x3c0],ESI RET caseD_22003: MOV dword ptr [RAX + 0x3ac],ESI RET caseD_22002: MOV dword ptr [RAX + 0x3a8],ESI RET caseD_2200c: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x94],ECX RET caseD_2100f: MOV dword ptr [RAX + 0x3d8],ESI RET caseD_2100c: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x44],ECX RET caseD_21005: MOV dword ptr [RAX + 0x28],ESI RET caseD_2100d: MOV dword ptr [RAX + 0x48],ESI RET caseD_2100a: MOV dword ptr [RAX + 0x3c],ESI RET caseD_21003: MOV dword ptr [RAX + 0x20],ESI RET caseD_21010: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x50],ECX RET caseD_21004: MOV dword ptr [RAX + 0x24],ESI RET caseD_21008: MOV dword ptr [RAX + 0x34],ESI RET caseD_21002: MOV dword ptr [RAX + 0x1c],ESI RET caseD_21006: MOV dword ptr [RAX + 0x2c],ESI RET caseD_2100e: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x4c],ECX RET caseD_21007: MOV dword ptr [RAX + 0x30],ESI RET caseD_2100b: MOV dword ptr [RAX + 0x40],ESI RET caseD_21009: MOV dword ptr [RAX + 0x38],ESI RET LAB_0011d2ee: XOR ECX,ECX TEST ESI,ESI SETNZ CL MOV dword ptr [RAX + 0x98],ECX RET caseD_20002: LEA RSI,[0x1843b3] MOV EDI,0x10003 XOR EAX,EAX JMP 0x00118e91
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ void glfwWindowHint(int param_1,int param_2) { if (_glfw == 0) { _glfwInputError(0x10001,0); return; } if (param_1 < 0x22001) { switch(param_1) { case 0x21001: DAT_001a8650 = param_2; return; case 0x21002: DAT_001a8654 = param_2; return; case 0x21003: DAT_001a8658 = param_2; return; case 0x21004: DAT_001a865c = param_2; return; case 0x21005: DAT_001a8660 = param_2; return; case 0x21006: _DAT_001a8664 = param_2; return; case 0x21007: DAT_001a8668 = param_2; return; case 0x21008: DAT_001a866c = param_2; return; case 0x21009: DAT_001a8670 = param_2; return; case 0x2100a: DAT_001a8674 = param_2; return; case 0x2100b: DAT_001a8678 = param_2; return; case 0x2100c: DAT_001a867c = (uint)(param_2 != 0); return; case 0x2100d: DAT_001a8680 = param_2; return; case 0x2100e: DAT_001a8684 = (uint)(param_2 != 0); return; case 0x2100f: DAT_001a8a10 = param_2; return; case 0x21010: DAT_001a8688 = (uint)(param_2 != 0); return; } switch(param_1) { case 0x20001: DAT_001a86b4 = (uint)(param_2 != 0); return; case 0x20003: DAT_001a86a8 = (uint)(param_2 != 0); return; case 0x20004: DAT_001a86ac = (uint)(param_2 != 0); return; case 0x20005: DAT_001a86b0 = (uint)(param_2 != 0); return; case 0x20006: DAT_001a86b8 = (uint)(param_2 != 0); return; case 0x20007: DAT_001a86bc = (uint)(param_2 != 0); return; case 0x20008: DAT_001a86c0 = (uint)(param_2 != 0); return; case 0x20009: DAT_001a86c4 = (uint)(param_2 != 0); return; case 0x2000a: DAT_001a868c = (uint)(param_2 != 0); return; case 0x2000c: _DAT_001a86c8 = (uint)(param_2 != 0); return; } } else { switch(param_1) { case 0x22001: DAT_001a89d8 = param_2; return; case 0x22002: DAT_001a89e0 = param_2; return; case 0x22003: DAT_001a89e4 = param_2; return; case 0x22004: break; case 0x22005: DAT_001a89f8 = param_2; return; case 0x22006: DAT_001a89e8 = (uint)(param_2 != 0); return; case 0x22007: DAT_001a89ec = (uint)(param_2 != 0); return; case 0x22008: DAT_001a89f4 = param_2; return; case 0x22009: DAT_001a89fc = param_2; return; case 0x2200a: DAT_001a89f0 = (uint)(param_2 != 0); return; case 0x2200b: DAT_001a89dc = param_2; return; case 0x2200c: DAT_001a86cc = (uint)(param_2 != 0); return; default: if (param_1 == 0x23001) { DAT_001a86d0 = (uint)(param_2 != 0); return; } if (param_1 == 0x23003) { DAT_001a8a08 = (uint)(param_2 != 0); return; } } } _glfwInputError(0x10003,"Invalid window hint 0x%08X"); return; }
13,442
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const
monkey531[P]llama/common/json.hpp
const_reference operator[](size_type idx) const { // const operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O0
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const: subq $0x58, %rsp movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x50(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0xafab0 xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0x15d0d7 jmp 0x15d0ef movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi movq 0x48(%rsp), %rsi callq 0x15cbb0 addq $0x58, %rsp retq movb $0x1, 0x13(%rsp) movl $0x20, %edi callq 0x5a6b0 movq 0x8(%rsp), %rdi movq %rax, (%rsp) callq 0xb6460 movq %rax, 0x20(%rsp) leaq 0xb56ef(%rip), %rsi # 0x212807 leaq 0x28(%rsp), %rdi leaq 0x20(%rsp), %rdx callq 0x15d1b0 jmp 0x15d129 movq 0x8(%rsp), %rcx movq (%rsp), %rdi movl $0x131, %esi # imm = 0x131 leaq 0x28(%rsp), %rdx callq 0x113cb0 jmp 0x15d143 movq (%rsp), %rdi movb $0x0, 0x13(%rsp) leaq 0x143c35(%rip), %rsi # 0x2a0d88 leaq -0xa6c4a(%rip), %rdx # 0xb6510 callq 0x5ab30 jmp 0x15d1a7 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) jmp 0x15d189 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x18(%rsp) movl %eax, 0x14(%rsp) leaq 0x28(%rsp), %rdi callq 0x5b588 testb $0x1, 0x13(%rsp) jne 0x15d192 jmp 0x15d19b movq (%rsp), %rdi callq 0x5af90 jmp 0x15d19d movq 0x18(%rsp), %rdi callq 0x5abf0 nopw (%rax,%rax)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: sub rsp, 58h mov [rsp+58h+var_8], rdi; char mov qword ptr [rsp+58h+var_10], rsi; int mov rdi, [rsp+58h+var_8] mov [rsp+58h+var_50], rdi; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8is_arrayEv; 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>::is_array(void) xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_15D0D7 jmp short loc_15D0EF loc_15D0D7: mov rax, [rsp+58h+var_50] mov rdi, [rax+8] mov rsi, qword ptr [rsp+58h+var_10] call _ZNSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EEixEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator[](ulong) add rsp, 58h retn loc_15D0EF: mov [rsp+58h+var_45], 1 mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rdi, [rsp+58h+var_50] mov [rsp+58h+var_58], rax; int call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) mov qword ptr [rsp+58h+var_38], rax; int lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+58h+var_30]; int lea rdx, [rsp+58h+var_38]; int call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) jmp short $+2 loc_15D129: mov rcx, [rsp+58h+var_50] mov rdi, [rsp+58h+var_58]; int mov esi, 131h lea rdx, [rsp+58h+var_30] call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ jmp short $+2 loc_15D143: mov rdi, [rsp+58h+var_58]; void * mov [rsp+58h+var_45], 0 lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail10type_errorD2Ev; void (*)(void *) call ___cxa_throw
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( _QWORD **a1, long long a2) { int v3; // ecx int v4; // r8d int v5; // r9d int exception; // [rsp+0h] [rbp-58h] nlohmann::json_abi_v3_11_3::detail::type_error *v7; // [rsp+0h] [rbp-58h] void *v8; // [rsp+8h] [rbp-50h] int v9; // [rsp+10h] [rbp-48h] long long v10; // [rsp+18h] [rbp-40h] int v11[2]; // [rsp+20h] [rbp-38h] BYREF int v12[8]; // [rsp+28h] [rbp-30h] BYREF int v13[2]; // [rsp+48h] [rbp-10h] void *v14; // [rsp+50h] [rbp-8h] v14 = a1; *(_QWORD *)v13 = a2; if ( !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>::is_array(a1) ) { HIBYTE(v9) = 1; exception = (unsigned int)__cxa_allocate_exception(0x20uLL); *(_QWORD *)v11 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name(a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( (int)v12, (int)"cannot use operator[] with a numeric argument with ", (int)v11, v3, v4, v5, exception, a1, v9, v10); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( v7, 305, (long long)v12, (long long)v8); __cxa_throw( v7, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::type_error::~type_error); } return std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator[]( a1[1], *(long long *)v13); }
13,443
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const
monkey531[P]llama/common/json.hpp
const_reference operator[](size_type idx) const { // const operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0x78481 movq 0x8(%r14), %rax shlq $0x4, %rsi addq (%rax), %rsi movq %rsi, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq pushq $0x20 popq %rdi callq 0x23470 movq %rax, %rbx movq %r14, %rdi callq 0x4334a leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x3c98d(%rip), %rsi # 0xb4e30 leaq 0x10(%rsp), %rdi callq 0x78504 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x632a8 xorl %ebp, %ebp leaq 0x83a7a(%rip), %rsi # 0xfbf48 leaq -0x38581(%rip), %rdx # 0x3ff54 movq %rbx, %rdi callq 0x23f40 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x241f8 testb %bpl, %bpl jne 0x784f4 jmp 0x784fc movq %rax, %r14 movq %rbx, %rdi callq 0x236a0 movq %r14, %rdi callq 0x23fc0
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; char push r14; int push rbx; int sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_78481 mov rax, [r14+8] shl rsi, 4 add rsi, [rax] mov rax, rsi add rsp, 30h pop rbx pop r14 pop rbp retn loc_78481: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_784F4 jmp short loc_784FC mov r14, rax loc_784F4: mov rdi, rbx; void * call ___cxa_free_exception loc_784FC: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx _BYTE v4[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( v4, "cannot use operator[] with a numeric argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 305, (long long)v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return **(_QWORD **)(a1 + 8) + 16 * a2; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x00178481 MOV RAX,qword ptr [R14 + 0x8] SHL RSI,0x4 ADD RSI,qword ptr [RAX] MOV RAX,RSI ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_00178481: PUSH 0x20 POP RDI CALL 0x00123470 MOV RBX,RAX MOV RDI,R14 CALL 0x0014334a LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_0017849c: LEA RSI,[0x1b4e30] LEA RDI,[RSP + 0x10] CALL 0x00178504 MOV BPL,0x1 LAB_001784b0: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x001632a8 XOR EBP,EBP LEA RSI,[0x1fbf48] LEA RDX,[0x13ff54] MOV RDI,RBX CALL 0x00123f40
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long) const */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,ulong param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { return param_1 * 0x10 + **(long **)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 0017849c to 001784ac has its CatchHandler @ 001784f1 */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 001784b0 to 001784dc has its CatchHandler @ 001784dd */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
13,444
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const
monkey531[P]llama/common/json.hpp
const_reference operator[](size_type idx) const { // const operator[] only works for arrays if (JSON_HEDLEY_LIKELY(is_array())) { return m_data.m_value.array->operator[](idx); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a numeric argument with ", type_name()), this)); }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](unsigned long) const: pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %r14 cmpb $0x2, (%rdi) jne 0xa1371 movq 0x8(%r14), %rax shlq $0x4, %rsi addq (%rax), %rsi movq %rsi, %rax addq $0x30, %rsp popq %rbx popq %r14 popq %rbp retq movl $0x20, %edi callq 0x1a450 movq %rax, %rbx movq %r14, %rdi callq 0x5ebd0 leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x4faab(%rip), %rsi # 0xf0e40 leaq 0x10(%rsp), %rdi callq 0xa1407 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x864de xorl %ebp, %ebp leaq 0x88b98(%rip), %rsi # 0x129f58 leaq -0x46589(%rip), %rdx # 0x5ae3e movq %rbx, %rdi callq 0x1af40 movq %rax, %r14 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xa13ed movq 0x20(%rsp), %rsi incq %rsi callq 0x1a8d0 testb %bpl, %bpl jne 0xa13f7 jmp 0xa13ff movq %rax, %r14 movq %rbx, %rdi callq 0x1a680 movq %r14, %rdi callq 0x1afc0
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixEm: push rbp; char push r14; int push rbx; __int64 sub rsp, 30h mov r14, rdi cmp byte ptr [rdi], 2 jnz short loc_A1371 mov rax, [r14+8] shl rsi, 4 add rsi, [rax] mov rax, rsi add rsp, 30h pop rbx pop r14 pop rbp retn loc_A1371: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUseOpera; "cannot use operator[] with a numeric ar"... lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA52_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>(char const(&)[52],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rax, [rsp+48h+var_28] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_A13ED mov rsi, [rsp+48h+var_28] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_A13ED: test bpl, bpl jnz short loc_A13F7 jmp short loc_A13FF mov r14, rax loc_A13F7: mov rdi, rbx; void * call ___cxa_free_exception loc_A13FF: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx _QWORD v4[2]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 != 2 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[52],char const*>( v4, "cannot use operator[] with a numeric argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( exception, 305, v4); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } return **(_QWORD **)(a1 + 8) + 16 * a2; }
operator[]: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV R14,RDI CMP byte ptr [RDI],0x2 JNZ 0x001a1371 MOV RAX,qword ptr [R14 + 0x8] SHL RSI,0x4 ADD RSI,qword ptr [RAX] MOV RAX,RSI ADD RSP,0x30 POP RBX POP R14 POP RBP RET LAB_001a1371: MOV EDI,0x20 CALL 0x0011a450 MOV RBX,RAX MOV RDI,R14 CALL 0x0015ebd0 LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_001a138e: LEA RSI,[0x1f0e40] LEA RDI,[RSP + 0x10] CALL 0x001a1407 MOV BPL,0x1 LAB_001a13a2: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x001864de XOR EBP,EBP LEA RSI,[0x229f58] LEA RDX,[0x15ae3e] MOV RDI,RBX CALL 0x0011af40
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](unsigned long) const */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,ulong param_1) { int8 uVar1; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x2) { return param_1 * 0x10 + **(long **)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 001a138e to 001a139e has its CatchHandler @ 001a13f4 */ detail::concat<std::__cxx11::string,char_const(&)[52],char_const*> (local_38,"cannot use operator[] with a numeric argument with ",&local_40); /* try { // try from 001a13a2 to 001a13ce has its CatchHandler @ 001a13cf */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0x131,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&detail::type_error::typeinfo,detail::exception::~exception); }
13,445
my_strnxfrm_uca_pad
eloqsql/strings/ctype-uca.c
static uchar * my_strnxfrm_uca_pad(uchar *dst, uchar *de, int weight) { for ( ; dst < de; ) { *dst++= weight >> 8; if (dst < de) *dst++= weight & 0xFF; } return dst; }
O0
c
my_strnxfrm_uca_pad: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0xa5679 movl -0x14(%rbp), %eax sarl $0x8, %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) movq -0x8(%rbp), %rax cmpq -0x10(%rbp), %rax jae 0xa5677 movl -0x14(%rbp), %eax andl $0xff, %eax movb %al, %cl movq -0x8(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x8(%rbp) movb %cl, (%rax) jmp 0xa562f movq -0x8(%rbp), %rax popq %rbp retq nop
my_strnxfrm_uca_pad: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_14], edx loc_A562F: mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_A5679 mov eax, [rbp+var_14] sar eax, 8 mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl mov rax, [rbp+var_8] cmp rax, [rbp+var_10] jnb short loc_A5677 mov eax, [rbp+var_14] and eax, 0FFh mov cl, al mov rax, [rbp+var_8] mov rdx, rax add rdx, 1 mov [rbp+var_8], rdx mov [rax], cl loc_A5677: jmp short loc_A562F loc_A5679: mov rax, [rbp+var_8] pop rbp retn
_BYTE * my_strnxfrm_uca_pad(_BYTE *a1, unsigned long long a2, __int16 a3) { _BYTE *v3; // rax _BYTE *v4; // rax while ( (unsigned long long)a1 < a2 ) { v3 = a1++; *v3 = HIBYTE(a3); if ( (unsigned long long)a1 < a2 ) { v4 = a1++; *v4 = a3; } } return a1; }
my_strnxfrm_uca_pad: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX LAB_001a562f: MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x001a5679 MOV EAX,dword ptr [RBP + -0x14] SAR EAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RBP + -0x10] JNC 0x001a5677 MOV EAX,dword ptr [RBP + -0x14] AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x8] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x8],RDX MOV byte ptr [RAX],CL LAB_001a5677: JMP 0x001a562f LAB_001a5679: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
int1 * my_strnxfrm_uca_pad(int1 *param_1,int1 *param_2,int4 param_3) { int1 *puVar1; int1 *local_10; puVar1 = param_1; while (local_10 = puVar1, local_10 < param_2) { puVar1 = local_10 + 1; *local_10 = (char)((uint)param_3 >> 8); if (puVar1 < param_2) { *puVar1 = (char)param_3; puVar1 = local_10 + 2; } } return local_10; }
13,446
minja::Value::for_each(std::function<void (minja::Value&)> const&) const
monkey531[P]llama/common/minja.hpp
void for_each(const std::function<void(Value &)> & callback) const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (array_) { for (auto& item : *array_) { callback(item); } } else if (object_) { for (auto & item : *object_) { Value key(item.first); callback(key); } } else if (is_string()) { for (char c : primitive_.get<std::string>()) { auto val = Value(std::string(1, c)); callback(val); } } else { throw std::runtime_error("Value is not iterable: " + dump()); } }
O2
cpp
minja::Value::for_each(std::function<void (minja::Value&)> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x98, %rsp movq %rsi, %rbx movq %rdi, %r14 callq 0x634ea testb %al, %al jne 0x6d71e movq 0x10(%r14), %rax testq %rax, %rax je 0x6d642 movq (%rax), %r14 movq 0x8(%rax), %r15 cmpq %r15, %r14 je 0x6d70c movq %rbx, %rdi movq %r14, %rsi callq 0x6d85c addq $0x50, %r14 jmp 0x6d628 movq 0x20(%r14), %rax testq %rax, %rax je 0x6d684 movq (%rax), %r14 movq 0x8(%rax), %r12 leaq 0x48(%rsp), %r15 cmpq %r12, %r14 je 0x6d70c movq %r15, %rdi movq %r14, %rsi callq 0x67518 movq %rbx, %rdi movq %r15, %rsi callq 0x6d85c movq %r15, %rdi callq 0x62d12 addq $0x60, %r14 jmp 0x6d657 cmpb $0x3, 0x40(%r14) jne 0x6d74e addq $0x40, %r14 leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x63bca movq (%r15), %r13 movq 0x8(%r15), %rbp xorl %r15d, %r15d leaq 0x28(%rsp), %r14 leaq 0x48(%rsp), %r12 cmpq %r15, %rbp je 0x6d702 movsbl (%r13,%r15), %edx leaq 0x38(%rsp), %rax movq %rax, 0x28(%rsp) movq %r14, %rdi pushq $0x1 popq %rsi callq 0x23a50 movq %r12, %rdi movq %r14, %rsi callq 0x65cf0 movq %r14, %rdi callq 0x24208 movq %rbx, %rdi movq %r12, %rsi callq 0x6d85c movq %r12, %rdi callq 0x62d12 incq %r15 jmp 0x6d6b7 leaq 0x8(%rsp), %rdi callq 0x24208 addq $0x98, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x23480 movq %rax, %rbx leaq 0x465aa(%rip), %rsi # 0xb3cda movq %rax, %rdi callq 0x23340 movq 0x908b1(%rip), %rsi # 0xfdff0 movq 0x90812(%rip), %rdx # 0xfdf58 movq %rbx, %rdi callq 0x23f30 pushq $0x10 popq %rdi callq 0x23480 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0x62f00 leaq 0x46f58(%rip), %rsi # 0xb46ca leaq 0x48(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x58626 movb $0x1, %bpl leaq 0x48(%rsp), %rsi movq %rbx, %rdi callq 0x23e60 xorl %ebp, %ebp movq 0x90856(%rip), %rsi # 0xfdff0 movq 0x907b7(%rip), %rdx # 0xfdf58 movq %rbx, %rdi callq 0x23f30 movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x24208 jmp 0x6d7be movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x24208 testb %bpl, %bpl jne 0x6d7d4 jmp 0x6d818 jmp 0x6d7d1 movq %rax, %r14 movq %rbx, %rdi callq 0x236b0 jmp 0x6d818 movq %rax, %r14 jmp 0x6d7ff movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x24208 jmp 0x6d7ff movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x62d12 leaq 0x8(%rsp), %rdi callq 0x24208 jmp 0x6d818 movq %rax, %r14 leaq 0x48(%rsp), %rdi callq 0x62d12 movq %r14, %rdi callq 0x23fd0
_ZNK5minja5Value8for_eachERKSt8functionIFvRS0_EE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 98h mov rbx, rsi mov r14, rdi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jnz loc_6D71E mov rax, [r14+10h] test rax, rax jz short loc_6D642 mov r14, [rax] mov r15, [rax+8] loc_6D628: cmp r14, r15 jz loc_6D70C mov rdi, rbx mov rsi, r14 call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) add r14, 50h ; 'P' jmp short loc_6D628 loc_6D642: mov rax, [r14+20h] test rax, rax jz short loc_6D684 mov r14, [rax] mov r12, [rax+8] lea r15, [rsp+0C8h+var_80] loc_6D657: cmp r14, r12 jz loc_6D70C mov rdi, r15 mov rsi, r14 call _ZN5minja5ValueC2ERKN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEE; minja::Value::Value(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) mov rdi, rbx mov rsi, r15 call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) mov rdi, r15; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() add r14, 60h ; '`' jmp short loc_6D657 loc_6D684: cmp byte ptr [r14+40h], 3 jnz loc_6D74E add r14, 40h ; '@' lea r15, [rsp+0C8h+var_C0] mov rdi, r15 mov rsi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE mov r13, [r15] mov rbp, [r15+8] xor r15d, r15d lea r14, [rsp+0C8h+var_A0] lea r12, [rsp+0C8h+var_80] loc_6D6B7: cmp rbp, r15 jz short loc_6D702 movsx edx, byte ptr [r13+r15+0] lea rax, [rsp+0C8h+var_90] mov [rsp+0C8h+var_A0], rax mov rdi, r14 push 1 pop rsi call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructEmc; std::string::_M_construct(ulong,char) mov rdi, r12 mov rsi, r14 call _ZN5minja5ValueC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; minja::Value::Value(std::string const&) mov rdi, r14; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx mov rsi, r12 call _ZNKSt8functionIFvRN5minja5ValueEEEclES2_; std::function<void ()(minja::Value &)>::operator()(minja::Value &) mov rdi, r12; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() inc r15 jmp short loc_6D6B7 loc_6D702: lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_6D70C: add rsp, 98h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_6D71E: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUndefinedValue; "Undefined value or reference" 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_6D74E: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+0C8h+var_C0] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aValueIsNotIter; "Value is not iterable: " lea rdi, [rsp+0C8h+var_80] lea rdx, [rsp+0C8h+var_C0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+0C8h+var_80] 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 lea rdi, [rsp+0C8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6D7BE mov r14, rax mov bpl, 1 loc_6D7BE: lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_6D7D4 jmp short loc_6D818 jmp short $+2 loc_6D7D1: mov r14, rax loc_6D7D4: mov rdi, rbx; void * call ___cxa_free_exception jmp short loc_6D818 mov r14, rax jmp short loc_6D7FF mov r14, rax lea rdi, [rsp+0C8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6D7FF mov r14, rax lea rdi, [rsp+0C8h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6D7FF: lea rdi, [rsp+0C8h+var_C0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6D818 mov r14, rax lea rdi, [rsp+0C8h+var_80]; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_6D818: mov rdi, r14 call __Unwind_Resume
void minja::Value::for_each(long long a1, long long a2) { long long *v2; // rax long long v3; // r14 long long v4; // r15 unsigned __int8 **v5; // rax unsigned __int8 *v6; // r14 unsigned __int8 *v7; // r12 long long v8; // r13 long long v9; // rbp long long i; // r15 long long v11; // rdx std::runtime_error *exception; // rbx void *v13; // rbx _QWORD v14[4]; // [rsp+8h] [rbp-C0h] BYREF _QWORD v15[2]; // [rsp+28h] [rbp-A0h] BYREF char v16; // [rsp+38h] [rbp-90h] BYREF _OWORD v17[8]; // [rsp+48h] [rbp-80h] BYREF if ( minja::Value::is_null((minja::Value *)a1) ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Undefined value or reference"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } v2 = *(long long **)(a1 + 16); if ( v2 ) { v3 = *v2; v4 = v2[1]; while ( v3 != v4 ) { std::function<void ()(minja::Value &)>::operator()(a2, v3); v3 += 80LL; } } else { v5 = *(unsigned __int8 ***)(a1 + 32); if ( v5 ) { v6 = *v5; v7 = v5[1]; while ( v6 != v7 ) { minja::Value::Value(v17, v6); std::function<void ()(minja::Value &)>::operator()(a2, v17); minja::Value::~Value((minja::Value *)v17); v6 += 96; } } else { if ( *(_BYTE *)(a1 + 64) != 3 ) { v13 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v14, a1, 0xFFFFFFFF, 0); std::operator+<char>((long long)v17, (long long)"Value is not iterable: ", (long long)v14); std::runtime_error::runtime_error(v13, v17); __cxa_throw( v13, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE( (long long)v14, a1 + 64); v8 = v14[0]; v9 = v14[1]; for ( i = 0LL; v9 != i; ++i ) { v11 = (unsigned int)*(char *)(v8 + i); v15[0] = &v16; std::string::_M_construct(v15, 1LL, v11); minja::Value::Value((long long)v17, (long long)v15); std::string::~string(v15); std::function<void ()(minja::Value &)>::operator()(a2, v17); minja::Value::~Value((minja::Value *)v17); } std::string::~string(v14); } } }
for_each: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x98 MOV RBX,RSI MOV R14,RDI CALL 0x001634ea TEST AL,AL JNZ 0x0016d71e MOV RAX,qword ptr [R14 + 0x10] TEST RAX,RAX JZ 0x0016d642 MOV R14,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x8] LAB_0016d628: CMP R14,R15 JZ 0x0016d70c MOV RDI,RBX MOV RSI,R14 CALL 0x0016d85c ADD R14,0x50 JMP 0x0016d628 LAB_0016d642: MOV RAX,qword ptr [R14 + 0x20] TEST RAX,RAX JZ 0x0016d684 MOV R14,qword ptr [RAX] MOV R12,qword ptr [RAX + 0x8] LEA R15,[RSP + 0x48] LAB_0016d657: CMP R14,R12 JZ 0x0016d70c MOV RDI,R15 MOV RSI,R14 CALL 0x00167518 LAB_0016d66b: MOV RDI,RBX MOV RSI,R15 CALL 0x0016d85c LAB_0016d676: MOV RDI,R15 CALL 0x00162d12 ADD R14,0x60 JMP 0x0016d657 LAB_0016d684: CMP byte ptr [R14 + 0x40],0x3 JNZ 0x0016d74e ADD R14,0x40 LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,R14 CALL 0x00163bca MOV R13,qword ptr [R15] MOV RBP,qword ptr [R15 + 0x8] XOR R15D,R15D LEA R14,[RSP + 0x28] LEA R12,[RSP + 0x48] LAB_0016d6b7: CMP RBP,R15 JZ 0x0016d702 MOVSX EDX,byte ptr [R13 + R15*0x1] LEA RAX,[RSP + 0x38] MOV qword ptr [RSP + 0x28],RAX LAB_0016d6cc: MOV RDI,R14 PUSH 0x1 POP RSI CALL 0x00123a50 LAB_0016d6d7: MOV RDI,R12 MOV RSI,R14 CALL 0x00165cf0 MOV RDI,R14 CALL 0x00124208 LAB_0016d6ea: MOV RDI,RBX MOV RSI,R12 CALL 0x0016d85c LAB_0016d6f5: MOV RDI,R12 CALL 0x00162d12 INC R15 JMP 0x0016d6b7 LAB_0016d702: LEA RDI,[RSP + 0x8] CALL 0x00124208 LAB_0016d70c: ADD RSP,0x98 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0016d71e: PUSH 0x10 POP RDI CALL 0x00123480 MOV RBX,RAX LAB_0016d729: LEA RSI,[0x1b3cda] MOV RDI,RAX CALL 0x00123340 LAB_0016d738: MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,RBX CALL 0x00123f30 LAB_0016d74e: PUSH 0x10 POP RDI CALL 0x00123480 MOV RBX,RAX LAB_0016d759: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x00162f00 LAB_0016d76b: LEA RSI,[0x1b46ca] LEA RDI,[RSP + 0x48] LEA RDX,[RSP + 0x8] CALL 0x00158626 MOV BPL,0x1 LAB_0016d784: LEA RSI,[RSP + 0x48] MOV RDI,RBX CALL 0x00123e60 XOR EBP,EBP MOV RSI,qword ptr [0x001fdff0] MOV RDX,qword ptr [0x001fdf58] MOV RDI,RBX CALL 0x00123f30
/* minja::Value::for_each(std::function<void (minja::Value&)> const&) const */ void __thiscall minja::Value::for_each(Value *this,function *param_1) { int8 *puVar1; Value *pVVar2; basic_json *pbVar3; char cVar4; runtime_error *prVar5; Value *pVVar6; basic_json *pbVar7; long lVar8; string local_c0 [8]; long local_b8; int1 *local_a0 [2]; int1 local_90 [16]; Value local_80 [80]; cVar4 = is_null(this); if (cVar4 != '\0') { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016d729 to 0016d737 has its CatchHandler @ 0016d7d1 */ std::runtime_error::runtime_error(prVar5,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } puVar1 = *(int8 **)(this + 0x10); if (puVar1 == (int8 *)0x0) { puVar1 = *(int8 **)(this + 0x20); if (puVar1 == (int8 *)0x0) { if (this[0x40] != (Value)0x3) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0016d759 to 0016d76a has its CatchHandler @ 0016d7cf */ dump_abi_cxx11_((int)local_c0,SUB81(this,0)); /* try { // try from 0016d76b to 0016d780 has its CatchHandler @ 0016d7b8 */ std::operator+((char *)local_80,(string *)"Value is not iterable: "); /* try { // try from 0016d784 to 0016d7a8 has its CatchHandler @ 0016d7a9 */ std::runtime_error::runtime_error(prVar5,(string *)local_80); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_001fdff0,PTR__runtime_error_001fdf58); } _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8get_implIS9_TnNSt9enable_ifIXaasr6detail24is_default_constructibleIT_EE5valuesr6detail13has_from_jsonISD_SG_EE5valueEiE4typeELi0EEESG_NS0_6detail12priority_tagILj0EEE (local_c0,this + 0x40); for (lVar8 = 0; local_b8 != lVar8; lVar8 = lVar8 + 1) { local_a0[0] = local_90; /* try { // try from 0016d6cc to 0016d6d6 has its CatchHandler @ 0016d7de */ std::__cxx11::string::_M_construct((ulong)local_a0,'\x01'); /* try { // try from 0016d6d7 to 0016d6e1 has its CatchHandler @ 0016d7e3 */ Value(local_80,(string *)local_a0); std::__cxx11::string::~string((string *)local_a0); /* try { // try from 0016d6ea to 0016d6f4 has its CatchHandler @ 0016d7f2 */ std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)param_1,local_80); ~Value(local_80); } std::__cxx11::string::~string(local_c0); } else { pbVar3 = (basic_json *)puVar1[1]; for (pbVar7 = (basic_json *)*puVar1; pbVar7 != pbVar3; pbVar7 = pbVar7 + 0x60) { Value(local_80,pbVar7); /* try { // try from 0016d66b to 0016d675 has its CatchHandler @ 0016d80b */ std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)param_1,local_80); ~Value(local_80); } } } else { pVVar2 = (Value *)puVar1[1]; for (pVVar6 = (Value *)*puVar1; pVVar6 != pVVar2; pVVar6 = pVVar6 + 0x50) { std::function<void(minja::Value&)>::operator() ((function<void(minja::Value&)> *)param_1,pVVar6); } } return; }
13,447
query_int_variable
eloqsql/libmariadb/unittest/libmariadb/my_test.h
my_bool query_int_variable(MYSQL *con, const char *var_name, int *var_value) { MYSQL_RES *rs; MYSQL_ROW row; char query_buffer[MAX_TEST_QUERY_LENGTH]; my_bool is_null; sprintf(query_buffer, "SELECT %s", (const char *) var_name); FAIL_IF(mysql_query(con, query_buffer), "Query failed"); FAIL_UNLESS(rs= mysql_store_result(con), "Invaliid result set"); FAIL_UNLESS(row= mysql_fetch_row(rs), "Nothing to fetch"); is_null= row[0] == NULL; if (!is_null) *var_value= atoi(row[0]); mysql_free_result(rs); return is_null; }
O3
c
query_int_variable: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x138, %rsp # imm = 0x138 movq %rdx, %rbx movq %rsi, %r8 movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x20(%rbp) leaq 0x22465(%rip), %rcx # 0x361af leaq -0x150(%rbp), %r15 movl $0x12c, %edx # imm = 0x12C movq %r15, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x132a0 movq %r14, %rdi movq %r15, %rsi callq 0x1ae55 testl %eax, %eax je 0x13dbc leaq 0x2228d(%rip), %rdi # 0x36008 leaq 0x22437(%rip), %rsi # 0x361b9 leaq 0x222a7(%rip), %rdx # 0x36030 movl $0x1a2, %ecx # imm = 0x1A2 xorl %eax, %eax callq 0x1574b movb $0x1, %r14b movq %fs:0x28, %rax cmpq -0x20(%rbp), %rax jne 0x13e34 movl %r14d, %eax addq $0x138, %rsp # imm = 0x138 popq %rbx popq %r14 popq %r15 popq %rbp retq movq %r14, %rdi callq 0x1bd4d testq %rax, %rax je 0x13df6 movq %rax, %r15 movq %rax, %rdi callq 0x1bf50 testq %rax, %rax je 0x13e15 movq (%rax), %rdi testq %rdi, %rdi sete %r14b je 0x13dec callq 0x136f0 movl %eax, (%rbx) movq %r15, %rdi callq 0x16b02 jmp 0x13d98 leaq 0x2220b(%rip), %rdi # 0x36008 leaq 0x223c2(%rip), %rsi # 0x361c6 leaq 0x22225(%rip), %rdx # 0x36030 movl $0x1a3, %ecx # imm = 0x1A3 jmp 0x13d8e leaq 0x221ec(%rip), %rdi # 0x36008 leaq 0x223b7(%rip), %rsi # 0x361da leaq 0x22206(%rip), %rdx # 0x36030 movl $0x1a4, %ecx # imm = 0x1A4 jmp 0x13d8e callq 0x13500
query_int_variable: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 138h mov rbx, rdx mov r8, rsi mov r14, rdi mov rax, fs:28h mov [rbp+var_20], rax lea rcx, aSelectS; "SELECT %s" lea r15, [rbp+var_150] mov edx, 12Ch mov rdi, r15 mov esi, 1 xor eax, eax call ___sprintf_chk mov rdi, r14 mov rsi, r15 call mysql_query test eax, eax jz short loc_13DBC lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aQueryFailed; "Query failed" lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 1A2h loc_13D8E: xor eax, eax call diag mov r14b, 1 loc_13D98: mov rax, fs:28h cmp rax, [rbp+var_20] jnz loc_13E34 mov eax, r14d add rsp, 138h pop rbx pop r14 pop r15 pop rbp retn loc_13DBC: mov rdi, r14 call mysql_store_result test rax, rax jz short loc_13DF6 mov r15, rax mov rdi, rax call mysql_fetch_row test rax, rax jz short loc_13E15 mov rdi, [rax] test rdi, rdi setz r14b jz short loc_13DEC call _atoi mov [rbx], eax loc_13DEC: mov rdi, r15 call mysql_free_result jmp short loc_13D98 loc_13DF6: lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aInvaliidResult; "Invaliid result set" lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 1A3h jmp loc_13D8E loc_13E15: lea rdi, aErrorSSD; "Error: %s (%s: %d)" lea rsi, aNothingToFetch; "Nothing to fetch" lea rdx, aWorkspaceLlm4b; "/workspace/llm4binary/github2025/eloqsq"... mov ecx, 1A4h jmp loc_13D8E loc_13E34: call ___stack_chk_fail
long long query_int_variable(long long a1, const char *a2, _DWORD *a3) { unsigned int v4; // r14d int v5; // r8d int v6; // r9d const char *v7; // rsi int v8; // ecx long long v10; // rax long long v11; // r15 _QWORD *row; // rax _BYTE v13[304]; // [rsp+0h] [rbp-150h] BYREF unsigned long long v14; // [rsp+130h] [rbp-20h] v4 = a1; v14 = __readfsqword(0x28u); __sprintf_chk(v13, 1LL, 300LL, "SELECT %s", a2); if ( (unsigned int)mysql_query(a1, v13) ) { v7 = "Query failed"; v8 = 418; LABEL_3: diag( (unsigned int)"Error: %s (%s: %d)", (_DWORD)v7, (unsigned int)"/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h", v8, v5, v6); LOBYTE(v4) = 1; return v4; } v10 = mysql_store_result(a1); if ( !v10 ) { v7 = "Invaliid result set"; v8 = 419; goto LABEL_3; } v11 = v10; row = (_QWORD *)mysql_fetch_row(v10); if ( !row ) { v7 = "Nothing to fetch"; v8 = 420; goto LABEL_3; } LOBYTE(v4) = *row == 0LL; if ( *row ) *a3 = atoi(); mysql_free_result(v11); return v4; }
query_int_variable: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x138 MOV RBX,RDX MOV R8,RSI MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX LEA RCX,[0x1361af] LEA R15,[RBP + -0x150] MOV EDX,0x12c MOV RDI,R15 MOV ESI,0x1 XOR EAX,EAX CALL 0x001132a0 MOV RDI,R14 MOV RSI,R15 CALL 0x0011ae55 TEST EAX,EAX JZ 0x00113dbc LEA RDI,[0x136008] LEA RSI,[0x1361b9] LEA RDX,[0x136030] MOV ECX,0x1a2 LAB_00113d8e: XOR EAX,EAX CALL 0x0011574b MOV R14B,0x1 LAB_00113d98: MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x20] JNZ 0x00113e34 MOV EAX,R14D ADD RSP,0x138 POP RBX POP R14 POP R15 POP RBP RET LAB_00113dbc: MOV RDI,R14 CALL 0x0011bd4d TEST RAX,RAX JZ 0x00113df6 MOV R15,RAX MOV RDI,RAX CALL 0x0011bf50 TEST RAX,RAX JZ 0x00113e15 MOV RDI,qword ptr [RAX] TEST RDI,RDI SETZ R14B JZ 0x00113dec CALL 0x001136f0 MOV dword ptr [RBX],EAX LAB_00113dec: MOV RDI,R15 CALL 0x00116b02 JMP 0x00113d98 LAB_00113df6: LEA RDI,[0x136008] LEA RSI,[0x1361c6] LEA RDX,[0x136030] MOV ECX,0x1a3 JMP 0x00113d8e LAB_00113e15: LEA RDI,[0x136008] LEA RSI,[0x1361da] LEA RDX,[0x136030] MOV ECX,0x1a4 JMP 0x00113d8e LAB_00113e34: CALL 0x00113500
ulong query_int_variable(int8 param_1,int8 param_2,int *param_3) { int iVar1; long lVar2; int8 *puVar3; int8 uVar4; char *pcVar5; int7 uVar7; ulong uVar6; long in_FS_OFFSET; int1 local_158 [304]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); __sprintf_chk(local_158,1,300,"SELECT %s",param_2); iVar1 = mysql_query(param_1,local_158); uVar7 = (int7)((ulong)param_1 >> 8); if (iVar1 == 0) { lVar2 = mysql_store_result(param_1); if (lVar2 == 0) { pcVar5 = "Invaliid result set"; uVar4 = 0x1a3; } else { puVar3 = (int8 *)mysql_fetch_row(lVar2); if (puVar3 != (int8 *)0x0) { pcVar5 = (char *)*puVar3; uVar6 = CONCAT71(uVar7,pcVar5 == (char *)0x0); if (pcVar5 != (char *)0x0) { iVar1 = atoi(pcVar5); *param_3 = iVar1; } mysql_free_result(lVar2); goto LAB_00113d98; } pcVar5 = "Nothing to fetch"; uVar4 = 0x1a4; } } else { pcVar5 = "Query failed"; uVar4 = 0x1a2; } diag("Error: %s (%s: %d)",pcVar5, "/workspace/llm4binary/github2025/eloqsql/libmariadb/unittest/libmariadb/my_test.h",uVar4); uVar6 = CONCAT71(uVar7,1); LAB_00113d98: if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return uVar6 & 0xffffffff; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,448
minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const
llama.cpp/common/minja/minja.hpp
Value do_evaluate(const std::shared_ptr<Context> & context) const override { if (!condition) throw std::runtime_error("IfExpr.condition is null"); if (!then_expr) throw std::runtime_error("IfExpr.then_expr is null"); if (condition->evaluate(context).to_bool()) { return then_expr->evaluate(context); } if (else_expr) { return else_expr->evaluate(context); } return nullptr; }
O3
cpp
minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x50, %rsp movq %rsi, %r15 movq 0x20(%rsi), %rsi testq %rsi, %rsi je 0xee20b cmpq $0x0, 0x30(%r15) je 0xee229 movq %rdx, %r14 movq %rdi, %rbx movq %rsp, %r12 movq %r12, %rdi callq 0xe15ec movq %r12, %rdi callq 0xbf058 movl %eax, %ebp leaq 0x40(%rsp), %r12 movq %r12, %rdi xorl %esi, %esi callq 0x8538a movq %r12, %rdi callq 0x89aa4 leaq 0x38(%rsp), %rdi callq 0x70a60 leaq 0x28(%rsp), %rdi callq 0x70a60 leaq 0x18(%rsp), %r12 movq %r12, %rdi callq 0x70a60 movq -0x10(%r12), %rdi testq %rdi, %rdi je 0xee19e movq 0x74e1f(%rip), %rax # 0x162f98 cmpb $0x0, (%rax) je 0xee189 movl 0xc(%rdi), %eax leal -0x1(%rax), %ecx movl %ecx, 0xc(%rdi) jmp 0xee193 movl $0xffffffff, %eax # imm = 0xFFFFFFFF lock xaddl %eax, 0xc(%rdi) cmpl $0x1, %eax jne 0xee19e movq (%rdi), %rax callq *0x18(%rax) testb %bpl, %bpl je 0xee1a9 movq 0x30(%r15), %rsi jmp 0xee1b2 movq 0x40(%r15), %rsi testq %rsi, %rsi je 0xee1cd movq %rbx, %rdi movq %r14, %rdx callq 0xe15ec movq %rbx, %rax addq $0x50, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq leaq 0x40(%rbx), %r14 movq $0x0, 0x48(%rbx) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movups %xmm0, 0x10(%rbx) movups %xmm0, 0x20(%rbx) movups %xmm0, 0x30(%rbx) movb $0x0, 0x40(%rbx) movq %r14, %rdi movl $0x1, %esi callq 0x8538a movq %r14, %rdi movl $0x1, %esi callq 0x8538a jmp 0xee1bd movl $0x10, %edi callq 0x20650 movq %rax, %r14 leaq 0x340ec(%rip), %rsi # 0x12230b movq %rax, %rdi callq 0x20430 jmp 0xee245 movl $0x10, %edi callq 0x20650 movq %rax, %r14 leaq 0x340e7(%rip), %rsi # 0x122324 movq %rax, %rdi callq 0x20430 movq 0x74d74(%rip), %rsi # 0x162fc0 movq 0x74d2d(%rip), %rdx # 0x162f80 movq %r14, %rdi callq 0x20a50 jmp 0xee25d movq %rax, %rbx movq %r14, %rdi callq 0x20f00 jmp 0xee275 movq %rax, %rbx movq %rsp, %rdi callq 0xb63cc movq %rbx, %rdi callq 0x20af0 nop
_ZNK5minja6IfExpr11do_evaluateERKSt10shared_ptrINS_7ContextEE: push rbp push r15 push r14 push r12 push rbx sub rsp, 50h mov r15, rsi mov rsi, [rsi+20h] test rsi, rsi jz loc_EE20B cmp qword ptr [r15+30h], 0 jz loc_EE229 mov r14, rdx mov rbx, rdi mov r12, rsp mov rdi, r12 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 lea r12, [rsp+78h+var_38] mov rdi, r12 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, r12 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() lea rdi, [rsp+78h+var_40] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea rdi, [rsp+78h+var_50] call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() lea r12, [rsp+78h+var_60] mov rdi, r12 call _ZNSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EED2Ev; std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() mov rdi, [r12-10h] test rdi, rdi jz short loc_EE19E mov rax, cs:_ZTISt19_Sp_make_shared_tag; `typeinfo for'std::_Sp_make_shared_tag cmp byte ptr [rax], 0 jz short loc_EE189 mov eax, [rdi+0Ch] lea ecx, [rax-1] mov [rdi+0Ch], ecx jmp short loc_EE193 loc_EE189: mov eax, 0FFFFFFFFh lock xadd [rdi+0Ch], eax loc_EE193: cmp eax, 1 jnz short loc_EE19E mov rax, [rdi] call qword ptr [rax+18h] loc_EE19E: test bpl, bpl jz short loc_EE1A9 mov rsi, [r15+30h] jmp short loc_EE1B2 loc_EE1A9: mov rsi, [r15+40h] test rsi, rsi jz short loc_EE1CD loc_EE1B2: mov rdi, rbx mov rdx, r14 call _ZNK5minja10Expression8evaluateERKSt10shared_ptrINS_7ContextEE; minja::Expression::evaluate(std::shared_ptr<minja::Context> const&) loc_EE1BD: mov rax, rbx add rsp, 50h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_EE1CD: lea r14, [rbx+40h] mov qword ptr [rbx+48h], 0 xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 movups xmmword ptr [rbx+10h], xmm0 movups xmmword ptr [rbx+20h], xmm0 movups xmmword ptr [rbx+30h], xmm0 mov byte ptr [rbx+40h], 0 mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) jmp short loc_EE1BD loc_EE20B: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aIfexprConditio; "IfExpr.condition is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) jmp short loc_EE245 loc_EE229: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov r14, rax lea rsi, aIfexprThenExpr; "IfExpr.then_expr is null" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) loc_EE245: mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, r14; void * call ___cxa_throw jmp short $+2 loc_EE25D: mov rbx, rax mov rdi, r14; void * call ___cxa_free_exception jmp short loc_EE275 mov rbx, rax mov rdi, rsp; this call _ZN5minja5ValueD2Ev; minja::Value::~Value() loc_EE275: mov rdi, rbx call __Unwind_Resume
long long minja::IfExpr::do_evaluate(long long a1, _QWORD *a2) { void (***v3)(void); // rsi char v5; // bp long long v6; // rdi signed __int32 v7; // eax void (***v8)(void); // rsi std::runtime_error *exception; // r14 long long v11; // [rsp+0h] [rbp-78h] BYREF long long v12; // [rsp+8h] [rbp-70h] volatile signed __int32 *v13; // [rsp+18h] [rbp-60h] BYREF volatile signed __int32 *v14; // [rsp+28h] [rbp-50h] BYREF volatile signed __int32 *v15; // [rsp+38h] [rbp-40h] BYREF char v16[56]; // [rsp+40h] [rbp-38h] BYREF v3 = (void (***)(void))a2[4]; if ( !v3 ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "IfExpr.condition is null"); goto LABEL_17; } if ( !a2[6] ) { exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "IfExpr.then_expr is null"); LABEL_17: __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } minja::Expression::evaluate((long long)&v11, v3); v5 = minja::Value::to_bool((minja::Value *)&v11); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v16); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v16); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v15); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v14); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v13); v6 = v12; if ( v12 ) { if ( _libc_single_threaded ) { v7 = *(_DWORD *)(v12 + 12); *(_DWORD *)(v12 + 12) = v7 - 1; } else { v7 = _InterlockedExchangeAdd((volatile signed __int32 *)(v12 + 12), 0xFFFFFFFF); } if ( v7 == 1 ) (*(void ( **)(long long, _QWORD))(*(_QWORD *)v6 + 24LL))(v6, 0LL); } if ( v5 ) { v8 = (void (***)(void))a2[6]; } else { v8 = (void (***)(void))a2[8]; if ( !v8 ) { *(_QWORD *)(a1 + 72) = 0LL; *(_OWORD *)a1 = 0LL; *(_OWORD *)(a1 + 16) = 0LL; *(_OWORD *)(a1 + 32) = 0LL; *(_OWORD *)(a1 + 48) = 0LL; *(_BYTE *)(a1 + 64) = 0; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64)); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)(a1 + 64)); return a1; } } minja::Expression::evaluate(a1, v8); return a1; }
do_evaluate: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x50 MOV R15,RSI MOV RSI,qword ptr [RSI + 0x20] TEST RSI,RSI JZ 0x001ee20b CMP qword ptr [R15 + 0x30],0x0 JZ 0x001ee229 MOV R14,RDX MOV RBX,RDI MOV R12,RSP MOV RDI,R12 CALL 0x001e15ec LAB_001ee126: MOV RDI,R12 CALL 0x001bf058 LAB_001ee12e: MOV EBP,EAX LEA R12,[RSP + 0x40] MOV RDI,R12 XOR ESI,ESI CALL 0x0018538a MOV RDI,R12 CALL 0x00189aa4 LEA RDI,[RSP + 0x38] CALL 0x00170a60 LEA RDI,[RSP + 0x28] CALL 0x00170a60 LEA R12,[RSP + 0x18] MOV RDI,R12 CALL 0x00170a60 MOV RDI,qword ptr [R12 + -0x10] TEST RDI,RDI JZ 0x001ee19e MOV RAX,qword ptr [0x00262f98] CMP byte ptr [RAX],0x0 JZ 0x001ee189 MOV EAX,dword ptr [RDI + 0xc] LEA ECX,[RAX + -0x1] MOV dword ptr [RDI + 0xc],ECX JMP 0x001ee193 LAB_001ee189: MOV EAX,0xffffffff XADD.LOCK dword ptr [RDI + 0xc],EAX LAB_001ee193: CMP EAX,0x1 JNZ 0x001ee19e MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x18] LAB_001ee19e: TEST BPL,BPL JZ 0x001ee1a9 MOV RSI,qword ptr [R15 + 0x30] JMP 0x001ee1b2 LAB_001ee1a9: MOV RSI,qword ptr [R15 + 0x40] TEST RSI,RSI JZ 0x001ee1cd LAB_001ee1b2: MOV RDI,RBX MOV RDX,R14 CALL 0x001e15ec LAB_001ee1bd: MOV RAX,RBX ADD RSP,0x50 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_001ee1cd: LEA R14,[RBX + 0x40] MOV qword ptr [RBX + 0x48],0x0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOVUPS xmmword ptr [RBX + 0x10],XMM0 MOVUPS xmmword ptr [RBX + 0x20],XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 MOV byte ptr [RBX + 0x40],0x0 MOV RDI,R14 MOV ESI,0x1 CALL 0x0018538a MOV RDI,R14 MOV ESI,0x1 CALL 0x0018538a JMP 0x001ee1bd LAB_001ee20b: MOV EDI,0x10 CALL 0x00120650 MOV R14,RAX LAB_001ee218: LEA RSI,[0x22230b] MOV RDI,RAX CALL 0x00120430 LAB_001ee227: JMP 0x001ee245 LAB_001ee229: MOV EDI,0x10 CALL 0x00120650 MOV R14,RAX LAB_001ee236: LEA RSI,[0x222324] MOV RDI,RAX CALL 0x00120430 LAB_001ee245: MOV RSI,qword ptr [0x00262fc0] MOV RDX,qword ptr [0x00262f80] MOV RDI,R14 CALL 0x00120a50
/* minja::IfExpr::do_evaluate(std::shared_ptr<minja::Context> const&) const */ IfExpr * __thiscall minja::IfExpr::do_evaluate(IfExpr *this,shared_ptr *param_1) { int *piVar1; char cVar2; int iVar3; runtime_error *this_00; shared_ptr *psVar4; bool bVar5; Expression aEStack_78 [8]; long *local_70; __shared_count<(__gnu_cxx::_Lock_policy)2> local_60 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_50 [16]; __shared_count<(__gnu_cxx::_Lock_policy)2> local_40 [8]; data local_38 [16]; if (*(shared_ptr **)(param_1 + 0x20) == (shared_ptr *)0x0) { this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001ee218 to 001ee226 has its CatchHandler @ 001ee25d */ std::runtime_error::runtime_error(this_00,"IfExpr.condition is null"); } else { if (*(long *)(param_1 + 0x30) != 0) { Expression::evaluate(aEStack_78,*(shared_ptr **)(param_1 + 0x20)); /* try { // try from 001ee126 to 001ee12d has its CatchHandler @ 001ee26a */ cVar2 = Value::to_bool((Value *)aEStack_78); 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_38,0)); nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data(local_38); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_40); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_50); std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(local_60); if (local_70 != (long *)0x0) { if (*PTR___libc_single_threaded_00262f98 == '\0') { LOCK(); piVar1 = (int *)((long)local_70 + 0xc); iVar3 = *piVar1; *piVar1 = *piVar1 + -1; UNLOCK(); } else { iVar3 = *(int *)((long)local_70 + 0xc); *(int *)((long)local_70 + 0xc) = iVar3 + -1; } if (iVar3 == 1) { (**(code **)(*local_70 + 0x18))(); } } if (cVar2 == '\0') { psVar4 = *(shared_ptr **)(param_1 + 0x40); if (psVar4 == (shared_ptr *)0x0) { bVar5 = (bool)((char)this + '@'); *(int8 *)(this + 0x48) = 0; *(int8 *)this = 0; *(int8 *)(this + 8) = 0; *(int8 *)(this + 0x10) = 0; *(int8 *)(this + 0x18) = 0; *(int8 *)(this + 0x20) = 0; *(int8 *)(this + 0x28) = 0; *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; this[0x40] = (IfExpr)0x0; nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar5); 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(bVar5); return this; } } else { psVar4 = *(shared_ptr **)(param_1 + 0x30); } Expression::evaluate((Expression *)this,psVar4); return this; } this_00 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001ee236 to 001ee244 has its CatchHandler @ 001ee25b */ std::runtime_error::runtime_error(this_00,"IfExpr.then_expr is null"); } /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00262fc0,PTR__runtime_error_00262f80); }
13,449
js_std_getenviron
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_std_getenviron(JSContext *ctx, JSValue this_val, int argc, JSValue *argv) { char **envp; const char *name, *p, *value; JSValue obj; uint32_t idx; size_t name_len; JSAtom atom; int ret; obj = JS_NewObject(ctx); if (JS_IsException(obj)) return JS_EXCEPTION; envp = environ; for(idx = 0; envp[idx] != NULL; idx++) { name = envp[idx]; p = strchr(name, '='); name_len = p - name; if (!p) continue; value = p + 1; atom = JS_NewAtomLen(ctx, name, name_len); if (atom == JS_ATOM_NULL) goto fail; ret = JS_DefinePropertyValue(ctx, obj, atom, JS_NewString(ctx, value), JS_PROP_C_W_E); JS_FreeAtom(ctx, atom); if (ret < 0) goto fail; } return obj; fail: JS_FreeValue(ctx, obj); return JS_EXCEPTION; }
O0
c
js_std_getenviron: subq $0xb8, %rsp movq %rsi, 0x98(%rsp) movq %rdx, 0xa0(%rsp) movq %rdi, 0x90(%rsp) movl %ecx, 0x8c(%rsp) movq %r8, 0x80(%rsp) movq 0x90(%rsp), %rdi callq 0x2a570 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x50(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x58(%rsp) movq 0x50(%rsp), %rdi movq 0x58(%rsp), %rsi callq 0x10390 cmpl $0x0, %eax je 0x15299 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) jmp 0x15412 movq 0x120d38(%rip), %rax # 0x135fd8 movq (%rax), %rax movq %rax, 0x78(%rsp) movl $0x0, 0x4c(%rsp) movq 0x78(%rsp), %rax movl 0x4c(%rsp), %ecx cmpq $0x0, (%rax,%rcx,8) je 0x153c8 movq 0x78(%rsp), %rax movl 0x4c(%rsp), %ecx movq (%rax,%rcx,8), %rax movq %rax, 0x70(%rsp) movq 0x70(%rsp), %rdi movl $0x3d, %esi callq 0xe270 movq %rax, 0x68(%rsp) movq 0x68(%rsp), %rax movq 0x70(%rsp), %rcx subq %rcx, %rax movq %rax, 0x40(%rsp) cmpq $0x0, 0x68(%rsp) jne 0x15309 jmp 0x153b8 movq 0x68(%rsp), %rax addq $0x1, %rax movq %rax, 0x60(%rsp) movq 0x90(%rsp), %rdi movq 0x70(%rsp), %rsi movq 0x40(%rsp), %rdx callq 0x28020 movl %eax, 0x3c(%rsp) cmpl $0x0, 0x3c(%rsp) jne 0x1533e jmp 0x153e4 movq 0x90(%rsp), %rax movq %rax, 0x8(%rsp) movl 0x3c(%rsp), %eax movl %eax, 0x14(%rsp) movq 0x90(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0x103b0 movq 0x8(%rsp), %rdi movl 0x14(%rsp), %ecx movq %rax, 0x18(%rsp) movq %rdx, 0x20(%rsp) movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx movq 0x18(%rsp), %r8 movq 0x20(%rsp), %r9 movl $0x7, (%rsp) callq 0x371b0 movl %eax, 0x38(%rsp) movq 0x90(%rsp), %rdi movl 0x3c(%rsp), %esi callq 0x29040 cmpl $0x0, 0x38(%rsp) jge 0x153b6 jmp 0x153e4 jmp 0x153b8 movl 0x4c(%rsp), %eax addl $0x1, %eax movl %eax, 0x4c(%rsp) jmp 0x152b0 movq 0x50(%rsp), %rax movq %rax, 0xa8(%rsp) movq 0x58(%rsp), %rax movq %rax, 0xb0(%rsp) jmp 0x15412 movq 0x90(%rsp), %rdi movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx callq 0x23c90 movl $0x0, 0xa8(%rsp) movq $0x6, 0xb0(%rsp) movq 0xa8(%rsp), %rax movq 0xb0(%rsp), %rdx addq $0xb8, %rsp retq nopw (%rax,%rax)
js_std_getenviron: sub rsp, 0B8h mov [rsp+0B8h+var_20], rsi mov [rsp+0B8h+var_18], rdx mov [rsp+0B8h+var_28], rdi mov [rsp+0B8h+var_2C], ecx mov [rsp+0B8h+var_38], r8 mov rdi, [rsp+0B8h+var_28] call JS_NewObject mov [rsp+0B8h+var_90], rax mov [rsp+0B8h+var_88], rdx mov rax, [rsp+0B8h+var_90] mov [rsp+0B8h+var_68], rax mov rax, [rsp+0B8h+var_88] mov [rsp+0B8h+var_60], rax mov rdi, [rsp+0B8h+var_68] mov rsi, [rsp+0B8h+var_60] call JS_IsException_0 cmp eax, 0 jz short loc_15299 mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 jmp loc_15412 loc_15299: mov rax, cs:environ_ptr mov rax, [rax] mov [rsp+0B8h+var_40], rax mov [rsp+0B8h+var_6C], 0 loc_152B0: mov rax, [rsp+0B8h+var_40] mov ecx, [rsp+0B8h+var_6C] cmp qword ptr [rax+rcx*8], 0 jz loc_153C8 mov rax, [rsp+0B8h+var_40] mov ecx, [rsp+0B8h+var_6C] mov rax, [rax+rcx*8] mov [rsp+0B8h+var_48], rax mov rdi, [rsp+0B8h+var_48] mov esi, 3Dh ; '=' call _strchr mov [rsp+0B8h+var_50], rax mov rax, [rsp+0B8h+var_50] mov rcx, [rsp+0B8h+var_48] sub rax, rcx mov [rsp+0B8h+var_78], rax cmp [rsp+0B8h+var_50], 0 jnz short loc_15309 jmp loc_153B8 loc_15309: mov rax, [rsp+0B8h+var_50] add rax, 1 mov [rsp+0B8h+var_58], rax mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_48] mov rdx, [rsp+0B8h+var_78] call JS_NewAtomLen mov [rsp+0B8h+var_7C], eax cmp [rsp+0B8h+var_7C], 0 jnz short loc_1533E jmp loc_153E4 loc_1533E: mov rax, [rsp+0B8h+var_28] mov [rsp+0B8h+var_B0], rax mov eax, [rsp+0B8h+var_7C] mov [rsp+0B8h+var_A4], eax mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_58] call JS_NewString mov rdi, [rsp+0B8h+var_B0] mov ecx, [rsp+0B8h+var_A4] mov [rsp+0B8h+var_A0], rax mov [rsp+0B8h+var_98], rdx mov rsi, [rsp+0B8h+var_68] mov rdx, [rsp+0B8h+var_60] mov r8, [rsp+0B8h+var_A0] mov r9, [rsp+0B8h+var_98] mov [rsp+0B8h+var_B8], 7 call JS_DefinePropertyValue mov [rsp+0B8h+var_80], eax mov rdi, [rsp+0B8h+var_28] mov esi, [rsp+0B8h+var_7C] call JS_FreeAtom cmp [rsp+0B8h+var_80], 0 jge short loc_153B6 jmp short loc_153E4 loc_153B6: jmp short $+2 loc_153B8: mov eax, [rsp+0B8h+var_6C] add eax, 1 mov [rsp+0B8h+var_6C], eax jmp loc_152B0 loc_153C8: mov rax, [rsp+0B8h+var_68] mov [rsp+0B8h+var_10], rax mov rax, [rsp+0B8h+var_60] mov [rsp+0B8h+var_8], rax jmp short loc_15412 loc_153E4: mov rdi, [rsp+0B8h+var_28] mov rsi, [rsp+0B8h+var_68] mov rdx, [rsp+0B8h+var_60] call JS_FreeValue mov dword ptr [rsp+0B8h+var_10], 0 mov [rsp+0B8h+var_8], 6 loc_15412: mov rax, [rsp+0B8h+var_10] mov rdx, [rsp+0B8h+var_8] add rsp, 0B8h retn
long long js_std_getenviron(long long a1) { long long v1; // rdx int v2; // edx int v4; // [rsp+18h] [rbp-A0h] long long v5; // [rsp+28h] [rbp-90h] int v6; // [rsp+38h] [rbp-80h] unsigned int v7; // [rsp+3Ch] [rbp-7Ch] unsigned int i; // [rsp+4Ch] [rbp-6Ch] long long v9; // [rsp+58h] [rbp-60h] long long v10; // [rsp+68h] [rbp-50h] long long v11; // [rsp+70h] [rbp-48h] long long v12; // [rsp+78h] [rbp-40h] long long v13; // [rsp+A8h] [rbp-10h] v5 = JS_NewObject(a1); v9 = v1; if ( JS_IsException_0(v5, v1) ) { LODWORD(v13) = 0; } else { v12 = environ; for ( i = 0; ; ++i ) { if ( !*(_QWORD *)(v12 + 8LL * i) ) return v5; v11 = *(_QWORD *)(v12 + 8LL * i); v10 = strchr(v11, 61LL); if ( v10 ) { v7 = JS_NewAtomLen(a1, v11, v10 - v11); if ( !v7 ) break; v4 = JS_NewString(a1, v10 + 1); v6 = JS_DefinePropertyValue(a1, v5, v9, v7, v4, v2, 7); JS_FreeAtom(a1, v7); if ( v6 < 0 ) break; } } JS_FreeValue(a1, v5, v9); LODWORD(v13) = 0; } return v13; }
js_std_getenviron: SUB RSP,0xb8 MOV qword ptr [RSP + 0x98],RSI MOV qword ptr [RSP + 0xa0],RDX MOV qword ptr [RSP + 0x90],RDI MOV dword ptr [RSP + 0x8c],ECX MOV qword ptr [RSP + 0x80],R8 MOV RDI,qword ptr [RSP + 0x90] CALL 0x0012a570 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x58],RAX MOV RDI,qword ptr [RSP + 0x50] MOV RSI,qword ptr [RSP + 0x58] CALL 0x00110390 CMP EAX,0x0 JZ 0x00115299 MOV dword ptr [RSP + 0xa8],0x0 MOV qword ptr [RSP + 0xb0],0x6 JMP 0x00115412 LAB_00115299: MOV RAX,qword ptr [0x00235fd8] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x78],RAX MOV dword ptr [RSP + 0x4c],0x0 LAB_001152b0: MOV RAX,qword ptr [RSP + 0x78] MOV ECX,dword ptr [RSP + 0x4c] CMP qword ptr [RAX + RCX*0x8],0x0 JZ 0x001153c8 MOV RAX,qword ptr [RSP + 0x78] MOV ECX,dword ptr [RSP + 0x4c] MOV RAX,qword ptr [RAX + RCX*0x8] MOV qword ptr [RSP + 0x70],RAX MOV RDI,qword ptr [RSP + 0x70] MOV ESI,0x3d CALL 0x0010e270 MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0x68] MOV RCX,qword ptr [RSP + 0x70] SUB RAX,RCX MOV qword ptr [RSP + 0x40],RAX CMP qword ptr [RSP + 0x68],0x0 JNZ 0x00115309 JMP 0x001153b8 LAB_00115309: MOV RAX,qword ptr [RSP + 0x68] ADD RAX,0x1 MOV qword ptr [RSP + 0x60],RAX MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x40] CALL 0x00128020 MOV dword ptr [RSP + 0x3c],EAX CMP dword ptr [RSP + 0x3c],0x0 JNZ 0x0011533e JMP 0x001153e4 LAB_0011533e: MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x8],RAX MOV EAX,dword ptr [RSP + 0x3c] MOV dword ptr [RSP + 0x14],EAX MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x60] CALL 0x001103b0 MOV RDI,qword ptr [RSP + 0x8] MOV ECX,dword ptr [RSP + 0x14] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],RDX MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] MOV R8,qword ptr [RSP + 0x18] MOV R9,qword ptr [RSP + 0x20] MOV dword ptr [RSP],0x7 CALL 0x001371b0 MOV dword ptr [RSP + 0x38],EAX MOV RDI,qword ptr [RSP + 0x90] MOV ESI,dword ptr [RSP + 0x3c] CALL 0x00129040 CMP dword ptr [RSP + 0x38],0x0 JGE 0x001153b6 JMP 0x001153e4 LAB_001153b6: JMP 0x001153b8 LAB_001153b8: MOV EAX,dword ptr [RSP + 0x4c] ADD EAX,0x1 MOV dword ptr [RSP + 0x4c],EAX JMP 0x001152b0 LAB_001153c8: MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0xb0],RAX JMP 0x00115412 LAB_001153e4: MOV RDI,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] CALL 0x00123c90 MOV dword ptr [RSP + 0xa8],0x0 MOV qword ptr [RSP + 0xb0],0x6 LAB_00115412: MOV RAX,qword ptr [RSP + 0xa8] MOV RDX,qword ptr [RSP + 0xb0] ADD RSP,0xb8 RET
int1 [16] js_std_getenviron(int8 param_1) { long lVar1; char *__s; int iVar2; int iVar3; char *pcVar5; int1 auVar6 [16]; int1 auVar7 [16]; uint local_6c; int4 local_10; int4 uStack_c; int8 local_8; int8 uVar4; auVar6 = JS_NewObject(param_1); local_8 = auVar6._8_8_; uVar4 = auVar6._0_8_; iVar2 = JS_IsException(uVar4,local_8); if (iVar2 == 0) { lVar1 = *(long *)PTR_environ_00235fd8; local_6c = 0; while (*(long *)(lVar1 + (ulong)local_6c * 8) != 0) { __s = *(char **)(lVar1 + (ulong)local_6c * 8); pcVar5 = strchr(__s,0x3d); if (pcVar5 != (char *)0x0) { iVar2 = JS_NewAtomLen(param_1,__s,(long)pcVar5 - (long)__s); if (iVar2 != 0) { auVar7 = JS_NewString(param_1,pcVar5 + 1); iVar3 = JS_DefinePropertyValue(param_1,uVar4,local_8,iVar2,auVar7._0_8_,auVar7._8_8_,7); JS_FreeAtom(param_1,iVar2); if (-1 < iVar3) goto LAB_001153b8; } JS_FreeValue(param_1,uVar4,local_8); local_10 = 0; local_8 = 6; goto LAB_00115412; } LAB_001153b8: local_6c = local_6c + 1; } local_10 = auVar6._0_4_; uStack_c = auVar6._4_4_; } else { local_10 = 0; local_8 = 6; } LAB_00115412: auVar6._4_4_ = uStack_c; auVar6._0_4_ = local_10; auVar6._8_8_ = local_8; return auVar6; }
13,450
svc_shell_cmd_run
navaro[P]qoraal-tictactoe/build_O3/_deps/qoraal-src/src/svc/svc_shell.c
int32_t svc_shell_cmd_run (SVC_SHELL_IF_T * pif, char** argv, int argc) { int32_t res = SVC_SHELL_CMD_E_NOT_FOUND ; SVC_SHELL_CMD_LIST_T * list = 0 ; SVC_SHELL_CMD_LIST_IT_T it ; const SVC_SHELL_CMD_T * cmd ; int started ; if (*argv[0] == '#') { return SVC_SHELL_CMD_E_OK ; } svc_wdt_register (&pif->wdt, TIMEOUT_60_SEC) ; svc_wdt_activate (&pif->wdt) ; cmd = _cmd_first(&it); while (cmd) { if (list != it.lst) { list = it.lst ; started = -1 ; } if (strcmp (cmd->cmd, argv[0]) == 0) { int32_t usage = 0 ; if ((argc <= 1) || (*argv[1] != '?')) { if ((started < 0) && list->service) { started = svc_service_status(svc_service_get(list->service)) >= SVC_SERVICE_STATUS_STARTED ; } if (started != 0) { res = cmd->fp (pif, argv, argc) ; } else { res = SVC_SHELL_CMD_E_NOT_READY ; } } else { usage = 1 ; } if (cmd->usage && (usage || (res == SVC_SHELL_CMD_E_PARMS))) { svc_shell_print (pif, SVC_SHELL_OUT_STD, "usage: %s %s" SVC_SHELL_NEWLINE, cmd->cmd, cmd->usage) ; res = SVC_SHELL_CMD_E_OK ; } #if CFG_PLATFORM_SVC_SERVICES else if (!started) { svc_shell_print (pif, SVC_SHELL_OUT_STD, "'%s' require service '%s'" SVC_SHELL_NEWLINE, cmd->cmd, svc_service_name(svc_service_get(list->service))) ; } #endif break ; } cmd = _cmd_next(&it) ; } if (res == SVC_SHELL_CMD_E_NOT_FOUND) { svc_shell_print (pif, SVC_SHELL_OUT_ERR, "ERROR: '%s' not found!" SVC_SHELL_NEWLINE, argv[0]) ; } svc_wdt_unregister (&pif->wdt, TIMEOUT_60_SEC) ; return res ; }
O3
c
svc_shell_cmd_run: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq (%rsi), %rax xorl %r12d, %r12d cmpb $0x23, (%rax) je 0x181d3 movq %rsi, %r15 movq %rdi, %r14 movl %edx, -0x2c(%rbp) leaq 0x20(%rdi), %rbx movq %rbx, %rdi movl $0x2, %esi callq 0x19a3e movq %rbx, %rdi callq 0x19af7 movl $0x0, -0x48(%rbp) movq 0x28d6c(%rip), %r13 # 0x40e00 testq %r13, %r13 je 0x180b0 cmpq $0x0, (%r13) je 0x180b0 leaq 0x28d49(%rip), %rax # 0x40df0 movq %rax, -0x50(%rbp) movq (%r15), %r12 jmp 0x180d4 movq 0x28d39(%rip), %rax # 0x40df0 movq %rax, -0x50(%rbp) testq %rax, %rax je 0x181a4 movq 0x10(%rax), %r13 movq (%r15), %r12 testq %r13, %r13 je 0x181a7 movq %r14, -0x38(%rbp) movq %rbx, -0x40(%rbp) leaq -0x50(%rbp), %rbx movq -0x50(%rbp), %r14 movq (%r13), %rdi movq %r12, %rsi callq 0x6320 testl %eax, %eax je 0x18111 movq %rbx, %rdi callq 0x17b56 movq %rax, %r13 testq %rax, %rax jne 0x180e0 movq -0x40(%rbp), %rbx movq -0x38(%rbp), %r14 jmp 0x181a7 cmpl $0x2, -0x2c(%rbp) jl 0x18132 movq 0x8(%r15), %rax cmpb $0x3f, (%rax) jne 0x18132 movb $0x1, %al movl $0xfffffffe, %r12d # imm = 0xFFFFFFFE movq -0x40(%rbp), %rbx movq -0x38(%rbp), %r14 jmp 0x1816b movl 0x8(%r14), %edi testl %edi, %edi movq -0x40(%rbp), %rbx movq -0x38(%rbp), %r14 je 0x18159 callq 0x16900 movl %eax, %edi callq 0x17518 movl $0xfffffff9, %r12d # imm = 0xFFFFFFF9 cmpl $0x3, %eax jl 0x181c6 movq %r14, %rdi movq %r15, %rsi movl -0x2c(%rbp), %edx callq *0x8(%r13) movl %eax, %r12d xorl %eax, %eax movq 0x10(%r13), %r8 cmpl $-0x3, %r12d sete %cl testq %r8, %r8 je 0x1819e orb %cl, %al je 0x1819e movq (%r13), %rcx leaq 0x19c88(%rip), %rdx # 0x31e12 xorl %r12d, %r12d movq %r14, %rdi movl $0x1, %esi xorl %eax, %eax callq 0x17c60 jmp 0x181c6 cmpl $-0x2, %r12d jne 0x181c6 movq (%r15), %r12 leaq 0x19c73(%rip), %rdx # 0x31e21 movq %r14, %rdi movl $0x2, %esi movq %r12, %rcx xorl %eax, %eax callq 0x17c60 movl $0xfffffffe, %r12d # imm = 0xFFFFFFFE movq %rbx, %rdi movl $0x2, %esi callq 0x19aa8 movl %r12d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
svc_shell_cmd_run: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov rax, [rsi] xor r12d, r12d cmp byte ptr [rax], 23h ; '#' jz loc_181D3 mov r15, rsi mov r14, rdi mov [rbp+var_2C], edx lea rbx, [rdi+20h] mov rdi, rbx mov esi, 2 call svc_wdt_register mov rdi, rbx call svc_wdt_activate mov [rbp+var_48], 0 mov r13, cs:qword_40E00 test r13, r13 jz short loc_180B0 cmp qword ptr [r13+0], 0 jz short loc_180B0 lea rax, _qshell_static_list mov [rbp+var_50], rax mov r12, [r15] jmp short loc_180D4 loc_180B0: mov rax, cs:_qshell_static_list mov [rbp+var_50], rax test rax, rax jz loc_181A4 mov r13, [rax+10h] mov r12, [r15] test r13, r13 jz loc_181A7 loc_180D4: mov [rbp+var_38], r14 mov [rbp+var_40], rbx lea rbx, [rbp+var_50] loc_180E0: mov r14, [rbp+var_50] mov rdi, [r13+0] mov rsi, r12 call _strcmp test eax, eax jz short loc_18111 mov rdi, rbx call _cmd_next mov r13, rax test rax, rax jnz short loc_180E0 mov rbx, [rbp+var_40] mov r14, [rbp+var_38] jmp loc_181A7 loc_18111: cmp [rbp+var_2C], 2 jl short loc_18132 mov rax, [r15+8] cmp byte ptr [rax], 3Fh ; '?' jnz short loc_18132 mov al, 1 mov r12d, 0FFFFFFFEh mov rbx, [rbp+var_40] mov r14, [rbp+var_38] jmp short loc_1816B loc_18132: mov edi, [r14+8] test edi, edi mov rbx, [rbp+var_40] mov r14, [rbp+var_38] jz short loc_18159 call svc_service_get mov edi, eax call svc_service_status mov r12d, 0FFFFFFF9h cmp eax, 3 jl short loc_181C6 loc_18159: mov rdi, r14 mov rsi, r15 mov edx, [rbp+var_2C] call qword ptr [r13+8] mov r12d, eax xor eax, eax loc_1816B: mov r8, [r13+10h] cmp r12d, 0FFFFFFFDh setz cl test r8, r8 jz short loc_1819E or al, cl jz short loc_1819E mov rcx, [r13+0] lea rdx, aUsageSS; "usage: %s %s\r\n" xor r12d, r12d mov rdi, r14 mov esi, 1 xor eax, eax call svc_shell_print jmp short loc_181C6 loc_1819E: cmp r12d, 0FFFFFFFEh jnz short loc_181C6 loc_181A4: mov r12, [r15] loc_181A7: lea rdx, aErrorSNotFound; "ERROR: '%s' not found!\r\n" mov rdi, r14 mov esi, 2 mov rcx, r12 xor eax, eax call svc_shell_print mov r12d, 0FFFFFFFEh loc_181C6: mov rdi, rbx mov esi, 2 call svc_wdt_unregister loc_181D3: mov eax, r12d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long svc_shell_cmd_run( long long a1, _BYTE **a2, int a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { unsigned int v11; // r12d long long v12; // r14 long long v13; // rbx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 long long *v18; // r13 _BYTE *v19; // r12 long long *v20; // r14 char v21; // al int v22; // edi unsigned int v23; // eax long long *v25; // [rsp+0h] [rbp-50h] BYREF int v26; // [rsp+8h] [rbp-48h] long long v27; // [rsp+10h] [rbp-40h] long long v28; // [rsp+18h] [rbp-38h] int v29; // [rsp+24h] [rbp-2Ch] v11 = 0; if ( **a2 != 35 ) { v12 = a1; v29 = a3; v13 = a1 + 32; svc_wdt_register(a1 + 32, 2LL); svc_wdt_activate(a1 + 32); v26 = 0; v18 = (long long *)qword_40E00; if ( qword_40E00 && *(_QWORD *)qword_40E00 ) { v25 = &qshell_static_list; v19 = *a2; } else { v25 = (long long *)qshell_static_list; if ( !qshell_static_list ) { LABEL_21: v19 = *a2; goto LABEL_22; } v18 = *(long long **)(qshell_static_list + 16); v19 = *a2; if ( !v18 ) { LABEL_22: svc_shell_print( v12, 2u, (long long)aErrorSNotFound, (long long)v19, v14, v15, a4, a5, a6, a7, v16, v17, a10, a11, (char)v25); v11 = -2; goto LABEL_23; } } v28 = a1; v27 = a1 + 32; while ( 1 ) { v20 = v25; if ( !(unsigned int)strcmp(*v18, v19) ) break; v18 = (long long *)cmd_next(&v25); if ( !v18 ) { v13 = v27; v12 = v28; goto LABEL_22; } } if ( v29 >= 2 && *a2[1] == 63 ) { v21 = 1; v11 = -2; v13 = v27; v12 = v28; } else { v22 = *((_DWORD *)v20 + 2); v13 = v27; v12 = v28; if ( v22 ) { v23 = svc_service_get(v22); v11 = -7; if ( (int)svc_service_status(v23) < 3 ) goto LABEL_23; } v11 = ((long long ( *)(long long, _BYTE **, _QWORD))v18[1])(v12, a2, (unsigned int)v29); v21 = 0; } v14 = v18[2]; if ( v14 && (v11 == -3) | (unsigned __int8)v21 ) { v11 = 0; svc_shell_print(v12, 1u, (long long)aUsageSS, *v18, v14, v15, a4, a5, a6, a7, v16, v17, a10, a11, (char)v25); LABEL_23: svc_wdt_unregister(v13, 2LL); return v11; } if ( v11 != -2 ) goto LABEL_23; goto LABEL_21; } return v11; }
svc_shell_cmd_run: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr [RSI] XOR R12D,R12D CMP byte ptr [RAX],0x23 JZ 0x001181d3 MOV R15,RSI MOV R14,RDI MOV dword ptr [RBP + -0x2c],EDX LEA RBX,[RDI + 0x20] MOV RDI,RBX MOV ESI,0x2 CALL 0x00119a3e MOV RDI,RBX CALL 0x00119af7 MOV dword ptr [RBP + -0x48],0x0 MOV R13,qword ptr [0x00140e00] TEST R13,R13 JZ 0x001180b0 CMP qword ptr [R13],0x0 JZ 0x001180b0 LEA RAX,[0x140df0] MOV qword ptr [RBP + -0x50],RAX MOV R12,qword ptr [R15] JMP 0x001180d4 LAB_001180b0: MOV RAX,qword ptr [0x00140df0] MOV qword ptr [RBP + -0x50],RAX TEST RAX,RAX JZ 0x001181a4 MOV R13,qword ptr [RAX + 0x10] MOV R12,qword ptr [R15] TEST R13,R13 JZ 0x001181a7 LAB_001180d4: MOV qword ptr [RBP + -0x38],R14 MOV qword ptr [RBP + -0x40],RBX LEA RBX,[RBP + -0x50] LAB_001180e0: MOV R14,qword ptr [RBP + -0x50] MOV RDI,qword ptr [R13] MOV RSI,R12 CALL 0x00106320 TEST EAX,EAX JZ 0x00118111 MOV RDI,RBX CALL 0x00117b56 MOV R13,RAX TEST RAX,RAX JNZ 0x001180e0 MOV RBX,qword ptr [RBP + -0x40] MOV R14,qword ptr [RBP + -0x38] JMP 0x001181a7 LAB_00118111: CMP dword ptr [RBP + -0x2c],0x2 JL 0x00118132 MOV RAX,qword ptr [R15 + 0x8] CMP byte ptr [RAX],0x3f JNZ 0x00118132 MOV AL,0x1 MOV R12D,0xfffffffe MOV RBX,qword ptr [RBP + -0x40] MOV R14,qword ptr [RBP + -0x38] JMP 0x0011816b LAB_00118132: MOV EDI,dword ptr [R14 + 0x8] TEST EDI,EDI MOV RBX,qword ptr [RBP + -0x40] MOV R14,qword ptr [RBP + -0x38] JZ 0x00118159 CALL 0x00116900 MOV EDI,EAX CALL 0x00117518 MOV R12D,0xfffffff9 CMP EAX,0x3 JL 0x001181c6 LAB_00118159: MOV RDI,R14 MOV RSI,R15 MOV EDX,dword ptr [RBP + -0x2c] CALL qword ptr [R13 + 0x8] MOV R12D,EAX XOR EAX,EAX LAB_0011816b: MOV R8,qword ptr [R13 + 0x10] CMP R12D,-0x3 SETZ CL TEST R8,R8 JZ 0x0011819e OR AL,CL JZ 0x0011819e MOV RCX,qword ptr [R13] LEA RDX,[0x131e12] XOR R12D,R12D MOV RDI,R14 MOV ESI,0x1 XOR EAX,EAX CALL 0x00117c60 JMP 0x001181c6 LAB_0011819e: CMP R12D,-0x2 JNZ 0x001181c6 LAB_001181a4: MOV R12,qword ptr [R15] LAB_001181a7: LEA RDX,[0x131e21] MOV RDI,R14 MOV ESI,0x2 MOV RCX,R12 XOR EAX,EAX CALL 0x00117c60 MOV R12D,0xfffffffe LAB_001181c6: MOV RDI,RBX MOV ESI,0x2 CALL 0x00119aa8 LAB_001181d3: MOV EAX,R12D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int svc_shell_cmd_run(long param_1,int8 *param_2,int param_3) { bool bVar1; int8 *puVar2; int iVar3; int4 uVar4; int iVar5; long *plVar6; long lVar7; char *__s2; int8 *local_58; int4 local_50; long local_48; long local_40; int local_34; if (*(char *)*param_2 == '#') { return 0; } lVar7 = param_1 + 0x20; local_34 = param_3; svc_wdt_register(lVar7,2); svc_wdt_activate(lVar7); local_50 = 0; if ((DAT_00140e00 == (long *)0x0) || (*DAT_00140e00 == 0)) { local_58 = _qshell_static_list; if (_qshell_static_list == (int8 *)0x0) { LAB_001181a4: __s2 = (char *)*param_2; goto LAB_001181a7; } plVar6 = (long *)_qshell_static_list[2]; __s2 = (char *)*param_2; if (plVar6 == (long *)0x0) goto LAB_001181a7; } else { local_58 = &_qshell_static_list; __s2 = (char *)*param_2; plVar6 = DAT_00140e00; } local_48 = lVar7; local_40 = param_1; do { puVar2 = local_58; iVar3 = strcmp((char *)*plVar6,__s2); param_1 = local_40; lVar7 = local_48; if (iVar3 == 0) { if ((local_34 < 2) || (*(char *)param_2[1] != '?')) { if (*(int *)(puVar2 + 1) != 0) { uVar4 = svc_service_get(); iVar3 = svc_service_status(uVar4); iVar5 = -7; if (iVar3 < 3) goto LAB_001181c6; } iVar5 = (*(code *)plVar6[1])(param_1,param_2,local_34); bVar1 = false; } else { bVar1 = true; iVar5 = -2; } if ((plVar6[2] != 0) && (bVar1 || iVar5 == -3)) { iVar5 = 0; svc_shell_print(param_1,1,s_usage___s__s_00131e12,*plVar6); goto LAB_001181c6; } if (iVar5 == -2) goto LAB_001181a4; goto LAB_001181c6; } plVar6 = (long *)_cmd_next(&local_58); lVar7 = local_48; param_1 = local_40; } while (plVar6 != (long *)0x0); LAB_001181a7: svc_shell_print(param_1,2,s_ERROR____s__not_found__00131e21,__s2); iVar5 = -2; LAB_001181c6: svc_wdt_unregister(lVar7,2); return iVar5; }
13,451
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&))
monkey531[P]llama/common/arg.h
common_arg( const std::initializer_list<const char *> & args, const std::string & help, void (*handler)(common_params & params) ) : args(args), help(help), handler_void(handler) {}
O2
c
common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, void (*)(common_params&)): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r13 movq %rdi, %rbx leaq 0xc(%rsp), %rsi andl $0x0, (%rsi) pushq $0x1 popq %rdx leaq 0xb(%rsp), %rcx leaq 0xa(%rsp), %r8 callq 0x3c720 leaq 0x38(%rbx), %rax xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rbx) andq $0x0, 0x40(%rbx) movq %rax, 0x48(%rbx) movq %rax, 0x50(%rbx) andq $0x0, 0x58(%rbx) leaq 0x60(%rbx), %r12 movq (%r13), %rsi movq 0x8(%r13), %rdx leaq 0x9(%rsp), %rcx movq %r12, %rdi callq 0x3c766 leaq 0x90(%rbx), %rdi xorps %xmm0, %xmm0 movups %xmm0, 0x78(%rbx) andq $0x0, 0x88(%rbx) movq %r15, %rsi callq 0x23c20 movb $0x0, 0xb0(%rbx) movq %r14, 0xb8(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0xc0(%rbx) andq $0x0, 0xd0(%rbx) addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movq %rax, %r14 movq %r12, %rdi callq 0x3caa2 jmp 0x391f3 movq %rax, %r14 leaq 0x30(%rbx), %rdi callq 0x3c7ea movq %rbx, %rdi callq 0x3c7ea movq %r14, %rdi callq 0x23fd0
_ZN10common_argC2ERKSt16initializer_listIPKcERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPFvR13common_paramsE: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov r14, rcx mov r15, rdx mov r13, rsi mov rbx, rdi lea rsi, [rsp+38h+var_2C] and dword ptr [rsi], 0 push 1 pop rdx lea rcx, [rsp+38h+var_2D] lea r8, [rsp+38h+var_2E] call _ZNSt3setI13llama_exampleSt4lessIS0_ESaIS0_EEC2ESt16initializer_listIS0_ERKS2_RKS3_; std::set<llama_example>::set(std::initializer_list<llama_example>,std::less<llama_example> const&,std::allocator<llama_example> const&) lea rax, [rbx+38h] xorps xmm0, xmm0 movups xmmword ptr [rbx+30h], xmm0 and qword ptr [rbx+40h], 0 mov [rbx+48h], rax mov [rbx+50h], rax and qword ptr [rbx+58h], 0 lea r12, [rbx+60h] mov rsi, [r13+0] mov rdx, [r13+8] lea rcx, [rsp+38h+var_2F] mov rdi, r12 call _ZNSt6vectorIPKcSaIS1_EEC2ESt16initializer_listIS1_ERKS2_; std::vector<char const*>::vector(std::initializer_list<char const*>,std::allocator<char const*> const&) lea rdi, [rbx+90h] xorps xmm0, xmm0 movups xmmword ptr [rbx+78h], xmm0 and qword ptr [rbx+88h], 0 mov rsi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov byte ptr [rbx+0B0h], 0 mov [rbx+0B8h], r14 xorps xmm0, xmm0 movups xmmword ptr [rbx+0C0h], xmm0 and qword ptr [rbx+0D0h], 0 add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn mov r14, rax mov rdi, r12 call _ZNSt12_Vector_baseIPKcSaIS1_EED2Ev; std::_Vector_base<char const*>::~_Vector_base() jmp short loc_391F3 mov r14, rax loc_391F3: lea rdi, [rbx+30h] call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, rbx call _ZNSt8_Rb_treeI13llama_exampleS0_St9_IdentityIS0_ESt4lessIS0_ESaIS0_EED2Ev; std::_Rb_tree<llama_example,llama_example,std::_Identity<llama_example>,std::less<llama_example>,std::allocator<llama_example>>::~_Rb_tree() mov rdi, r14 call __Unwind_Resume
long long common_arg::common_arg(long long a1, _QWORD *a2, long long a3, long long a4) { long long result; // rax char v7; // [rsp+9h] [rbp-2Fh] BYREF char v8; // [rsp+Ah] [rbp-2Eh] BYREF char v9; // [rsp+Bh] [rbp-2Dh] BYREF _DWORD v10[11]; // [rsp+Ch] [rbp-2Ch] BYREF v10[0] = 0; std::set<llama_example>::set(a1, v10, 1LL, &v9, &v8); *(_OWORD *)(a1 + 48) = 0LL; *(_QWORD *)(a1 + 64) = 0LL; *(_QWORD *)(a1 + 72) = a1 + 56; *(_QWORD *)(a1 + 80) = a1 + 56; *(_QWORD *)(a1 + 88) = 0LL; std::vector<char const*>::vector(a1 + 96, *a2, a2[1], &v7); *(_OWORD *)(a1 + 120) = 0LL; *(_QWORD *)(a1 + 136) = 0LL; result = std::string::basic_string(a1 + 144, a3); *(_BYTE *)(a1 + 176) = 0; *(_QWORD *)(a1 + 184) = a4; *(_OWORD *)(a1 + 192) = 0LL; *(_QWORD *)(a1 + 208) = 0LL; return result; }
common_arg: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV R14,RCX MOV R15,RDX MOV R13,RSI MOV RBX,RDI LEA RSI,[RSP + 0xc] AND dword ptr [RSI],0x0 PUSH 0x1 POP RDX LEA RCX,[RSP + 0xb] LEA R8,[RSP + 0xa] CALL 0x0013c720 LEA RAX,[RBX + 0x38] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x30],XMM0 AND qword ptr [RBX + 0x40],0x0 MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RAX AND qword ptr [RBX + 0x58],0x0 LEA R12,[RBX + 0x60] MOV RSI,qword ptr [R13] MOV RDX,qword ptr [R13 + 0x8] LAB_0013918a: LEA RCX,[RSP + 0x9] MOV RDI,R12 CALL 0x0013c766 LEA RDI,[RBX + 0x90] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x78],XMM0 AND qword ptr [RBX + 0x88],0x0 LAB_001391ad: MOV RSI,R15 CALL 0x00123c20 LAB_001391b5: MOV byte ptr [RBX + 0xb0],0x0 MOV qword ptr [RBX + 0xb8],R14 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0xc0],XMM0 AND qword ptr [RBX + 0xd0],0x0 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* common_arg::common_arg(std::initializer_list<char const*> const&, std::__cxx11::string const&, void (*)(common_params&)) */ void __thiscall common_arg::common_arg (common_arg *this,initializer_list *param_1,string *param_2, _func_void_common_params_ptr *param_3) { int1 local_2f; int1 local_2e; int1 local_2d; int4 local_2c; local_2c = 0; std::set<llama_example,std::less<llama_example>,std::allocator<llama_example>>::set (this,&local_2c,1,&local_2d,&local_2e); *(int8 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(int8 *)(this + 0x40) = 0; *(common_arg **)(this + 0x48) = this + 0x38; *(common_arg **)(this + 0x50) = this + 0x38; *(int8 *)(this + 0x58) = 0; /* try { // try from 0013918a to 00139196 has its CatchHandler @ 001391f0 */ std::vector<char_const*,std::allocator<char_const*>>::vector ((vector<char_const*,std::allocator<char_const*>> *)(this + 0x60),*(int8 *)param_1 ,*(int8 *)(param_1 + 8),&local_2f); *(int8 *)(this + 0x78) = 0; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; /* try { // try from 001391ad to 001391b4 has its CatchHandler @ 001391e3 */ std::__cxx11::string::string((string *)(this + 0x90),param_2); this[0xb0] = (common_arg)0x0; *(_func_void_common_params_ptr **)(this + 0xb8) = param_3; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; return; }
13,452
POINTonE1_affine_Serialize_BE
corpus-core[P]colibri-stateless/build_O1/_deps/blst-src/src/e1.c
static limb_t POINTonE1_affine_Serialize_BE(unsigned char out[96], const POINTonE1_affine *in) { vec384 temp; from_fp(temp, in->X); be_bytes_from_limbs(out, temp, sizeof(temp)); from_fp(temp, in->Y); be_bytes_from_limbs(out + 48, temp, sizeof(temp)); return sgn0_pty_mod_384(temp, BLS12_381_P); }
O1
c
POINTonE1_affine_Serialize_BE: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x38, %rsp movq %rsi, %r15 movq %rdi, %rbx movabsq $-0x760c000300030003, %r14 # imm = 0x89F3FFFCFFFCFFFD leaq 0x26499(%rip), %rdx # 0x3fb20 leaq -0x50(%rbp), %rdi movq %r14, %rcx callq 0x34540 movl $0x2f, %eax movl $0x178, %edx # imm = 0x178 movq %rbx, %rsi movq %rax, %rcx andq $-0x8, %rcx movq -0x50(%rbp,%rcx), %rdi movl %edx, %ecx andb $0x38, %cl shrq %cl, %rdi movb %dil, (%rsi) incq %rsi addq $-0x8, %rdx addq $-0x1, %rax jb 0x196a0 addq $0x30, %r15 leaq 0x26451(%rip), %rdx # 0x3fb20 leaq -0x50(%rbp), %rdi movq %r15, %rsi movq %r14, %rcx callq 0x34540 addq $0x30, %rbx movl $0x2f, %eax movl $0x178, %edx # imm = 0x178 movq %rax, %rcx andq $-0x8, %rcx movq -0x50(%rbp,%rcx), %rsi movl %edx, %ecx andb $0x38, %cl shrq %cl, %rsi movb %sil, (%rbx) incq %rbx addq $-0x8, %rdx addq $-0x1, %rax jb 0x196ec leaq 0x26409(%rip), %rsi # 0x3fb20 leaq -0x50(%rbp), %rdi callq 0x2fde0 addq $0x38, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
POINTonE1_affine_Serialize_BE: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 38h mov r15, rsi mov rbx, rdi mov r14, 89F3FFFCFFFCFFFDh lea rdx, BLS12_381_P lea rdi, [rbp+var_50] mov rcx, r14 call from_mont_384 mov eax, 2Fh ; '/' mov edx, 178h mov rsi, rbx loc_196A0: mov rcx, rax and rcx, 0FFFFFFFFFFFFFFF8h mov rdi, [rbp+rcx+var_50] mov ecx, edx and cl, 38h shr rdi, cl mov [rsi], dil inc rsi add rdx, 0FFFFFFFFFFFFFFF8h add rax, 0FFFFFFFFFFFFFFFFh jb short loc_196A0 add r15, 30h ; '0' lea rdx, BLS12_381_P lea rdi, [rbp+var_50] mov rsi, r15 mov rcx, r14 call from_mont_384 add rbx, 30h ; '0' mov eax, 2Fh ; '/' mov edx, 178h loc_196EC: mov rcx, rax and rcx, 0FFFFFFFFFFFFFFF8h mov rsi, [rbp+rcx+var_50] mov ecx, edx and cl, 38h shr rsi, cl mov [rbx], sil inc rbx add rdx, 0FFFFFFFFFFFFFFF8h add rax, 0FFFFFFFFFFFFFFFFh jb short loc_196EC lea rsi, BLS12_381_P lea rdi, [rbp+var_50] call sgn0_pty_mod_384 add rsp, 38h pop rbx pop r14 pop r15 pop rbp retn
long long POINTonE1_affine_Serialize_BE(_BYTE *a1, long long a2) { long long v3; // rax long long v4; // rdx _BYTE *v5; // rsi bool v6; // cf _BYTE *v7; // rbx long long v8; // rax long long v9; // rdx _QWORD v11[10]; // [rsp+0h] [rbp-50h] BYREF from_mont_384(v11, a2, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v3 = 47LL; v4 = 376LL; v5 = a1; do { *v5++ = *(_QWORD *)((char *)v11 + (v3 & 0xFFFFFFFFFFFFFFF8LL)) >> (v4 & 0x38); v4 -= 8LL; v6 = v3-- != 0; } while ( v6 ); from_mont_384(v11, a2 + 48, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); v7 = a1 + 48; v8 = 47LL; v9 = 376LL; do { *v7++ = *(_QWORD *)((char *)v11 + (v8 & 0xFFFFFFFFFFFFFFF8LL)) >> (v9 & 0x38); v9 -= 8LL; v6 = v8-- != 0; } while ( v6 ); return sgn0_pty_mod_384(v11, &BLS12_381_P, v9); }
POINTonE1_affine_Serialize_BE: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x38 MOV R15,RSI MOV RBX,RDI MOV R14,-0x760c000300030003 LEA RDX,[0x13fb20] LEA RDI,[RBP + -0x50] MOV RCX,R14 CALL 0x00134540 MOV EAX,0x2f MOV EDX,0x178 MOV RSI,RBX LAB_001196a0: MOV RCX,RAX AND RCX,-0x8 MOV RDI,qword ptr [RBP + RCX*0x1 + -0x50] MOV ECX,EDX AND CL,0x38 SHR RDI,CL MOV byte ptr [RSI],DIL INC RSI ADD RDX,-0x8 ADD RAX,-0x1 JC 0x001196a0 ADD R15,0x30 LEA RDX,[0x13fb20] LEA RDI,[RBP + -0x50] MOV RSI,R15 MOV RCX,R14 CALL 0x00134540 ADD RBX,0x30 MOV EAX,0x2f MOV EDX,0x178 LAB_001196ec: MOV RCX,RAX AND RCX,-0x8 MOV RSI,qword ptr [RBP + RCX*0x1 + -0x50] MOV ECX,EDX AND CL,0x38 SHR RSI,CL MOV byte ptr [RBX],SIL INC RBX ADD RDX,-0x8 ADD RAX,-0x1 JC 0x001196ec LEA RSI,[0x13fb20] LEA RDI,[RBP + -0x50] CALL 0x0012fde0 ADD RSP,0x38 POP RBX POP R14 POP R15 POP RBP RET
void POINTonE1_affine_Serialize_BE(int1 *param_1,long param_2) { ulong uVar1; byte bVar2; int1 *puVar3; bool bVar4; ulong local_58 [7]; from_mont_384(local_58,param_2,BLS12_381_P,0x89f3fffcfffcfffd); uVar1 = 0x2f; bVar2 = 0x78; puVar3 = param_1; do { *puVar3 = (char)(*(ulong *)((long)local_58 + (uVar1 & 0xfffffffffffffff8)) >> (bVar2 & 0x38)); puVar3 = puVar3 + 1; bVar2 = bVar2 - 8; bVar4 = uVar1 != 0; uVar1 = uVar1 - 1; } while (bVar4); from_mont_384(local_58,param_2 + 0x30,BLS12_381_P,0x89f3fffcfffcfffd); param_1 = param_1 + 0x30; uVar1 = 0x2f; bVar2 = 0x78; do { *param_1 = (char)(*(ulong *)((long)local_58 + (uVar1 & 0xfffffffffffffff8)) >> (bVar2 & 0x38)); param_1 = param_1 + 1; bVar2 = bVar2 - 8; bVar4 = uVar1 != 0; uVar1 = uVar1 - 1; } while (bVar4); sgn0_pty_mod_384(local_58,BLS12_381_P); return; }
13,453
ParseInit
qoraal-tictactoe/build_O0/_deps/qoraal_engine-src/src/tool/parse.c
int ParseInit (void) { uint32_t i; struct clist * np ; _parser_strings = collection_init (heapParser, 43); _parser_declared = collection_init (heapParser, 83); _parser_declared_local = collection_init (heapParser, 31) ; _parser_undeclared = collection_init (heapParser, 5); _parser_reserved = collection_init (heapParser, 43); for (i = 0; i < sizeof(ReservedWords) / sizeof(struct ReservedWord); i++) { np = collection_install_size( _parser_reserved, ReservedWords[i].Word, 0, sizeof(unsigned int)); if (!np) return ENGINE_NOMEM ; *(unsigned int*)collection_get_value (_parser_reserved, np) = ReservedWords[i].Token ; } struct Value Value ; parse_install_identifier(_parser_declared, "a", 0, parseVariable, ENGINE_VARIABLE_ACCUMULATOR, &Value) ; parse_install_identifier(_parser_declared, "r", 0, parseVariable, ENGINE_VARIABLE_REGISTER, &Value) ; parse_install_identifier(_parser_declared, "p", 0, parseVariable, ENGINE_VARIABLE_PARAMETER, &Value) ; parse_install_identifier(_parser_declared, "e", 0, parseVariable, ENGINE_VARIABLE_EVENT, &Value) ; _parser_events = STATES_EVENT_DECL_START ; _parser_variables = 0 ; _parser_statemachines = 0 ; return 0 ; }
O0
c
ParseInit: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl $0x1, %edi movl $0x2b, %esi callq 0xcf70 movq %rax, 0x3c38a(%rip) # 0x4d0d8 movl $0x1, %edi movl $0x53, %esi callq 0xcf70 movq %rax, 0x3c38c(%rip) # 0x4d0f0 movl $0x1, %edi movl $0x1f, %esi callq 0xcf70 movq %rax, 0x3c366(%rip) # 0x4d0e0 movl $0x1, %edi movl $0x5, %esi callq 0xcf70 movq %rax, 0x3c358(%rip) # 0x4d0e8 movl $0x1, %edi movl $0x2b, %esi callq 0xcf70 movq %rax, 0x3c352(%rip) # 0x4d0f8 movl $0x0, -0x8(%rbp) movl -0x8(%rbp), %eax cmpq $0x19, %rax jae 0x10e32 movq 0x3c33b(%rip), %rdi # 0x4d0f8 movl -0x8(%rbp), %eax movl %eax, %ecx leaq 0x3a897(%rip), %rax # 0x4b660 shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rsi xorl %edx, %edx movl $0x4, %ecx callq 0xcff0 movq %rax, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x10df6 movl $0xfffffff8, -0x4(%rbp) # imm = 0xFFFFFFF8 jmp 0x10ee0 movl -0x8(%rbp), %eax movl %eax, %ecx leaq 0x3a85e(%rip), %rax # 0x4b660 shlq $0x4, %rcx addq %rcx, %rax movl 0x8(%rax), %eax movl %eax, -0x2c(%rbp) movq 0x3c2e2(%rip), %rdi # 0x4d0f8 movq -0x10(%rbp), %rsi callq 0xd6e0 movl -0x2c(%rbp), %ecx movl %ecx, (%rax) movl -0x8(%rbp), %eax addl $0x1, %eax movl %eax, -0x8(%rbp) jmp 0x10dad movq 0x3c2b7(%rip), %rdi # 0x4d0f0 leaq 0x230f7(%rip), %rsi # 0x33f37 xorl %r8d, %r8d movl $0x2, %ecx leaq -0x28(%rbp), %r9 movl %r8d, %edx callq 0x10ef0 movq 0x3c295(%rip), %rdi # 0x4d0f0 leaq 0x232e8(%rip), %rsi # 0x3414a xorl %edx, %edx movl $0x2, %ecx movl $0x1, %r8d leaq -0x28(%rbp), %r9 callq 0x10ef0 movq 0x3c271(%rip), %rdi # 0x4d0f0 leaq 0x21bc0(%rip), %rsi # 0x32a46 xorl %edx, %edx movl $0x2, %r8d leaq -0x28(%rbp), %r9 movl %r8d, %ecx callq 0x10ef0 movq 0x3c24f(%rip), %rdi # 0x4d0f0 leaq 0x24211(%rip), %rsi # 0x350b9 xorl %edx, %edx movl $0x2, %ecx movl $0x3, %r8d leaq -0x28(%rbp), %r9 callq 0x10ef0 movw $0x700, 0x3b4a9(%rip) # imm = 0x700 movw $0x0, 0x3c230(%rip) # 0x4d100 movw $0x0, 0x3c229(%rip) # 0x4d102 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopl (%rax)
ParseInit: push rbp mov rbp, rsp sub rsp, 30h mov edi, 1 mov esi, 2Bh ; '+' call collection_init mov cs:_parser_strings, rax mov edi, 1 mov esi, 53h ; 'S' call collection_init mov cs:_parser_declared, rax mov edi, 1 mov esi, 1Fh call collection_init mov cs:_parser_declared_local, rax mov edi, 1 mov esi, 5 call collection_init mov cs:_parser_undeclared, rax mov edi, 1 mov esi, 2Bh ; '+' call collection_init mov cs:_parser_reserved, rax mov [rbp+var_8], 0 loc_10DAD: mov eax, [rbp+var_8] cmp rax, 19h jnb short loc_10E32 mov rdi, cs:_parser_reserved mov eax, [rbp+var_8] mov ecx, eax lea rax, ReservedWords shl rcx, 4 add rax, rcx mov rsi, [rax] xor edx, edx mov ecx, 4 call collection_install_size mov [rbp+var_10], rax cmp [rbp+var_10], 0 jnz short loc_10DF6 mov [rbp+var_4], 0FFFFFFF8h jmp loc_10EE0 loc_10DF6: mov eax, [rbp+var_8] mov ecx, eax lea rax, ReservedWords shl rcx, 4 add rax, rcx mov eax, [rax+8] mov [rbp+var_2C], eax mov rdi, cs:_parser_reserved mov rsi, [rbp+var_10] call collection_get_value mov ecx, [rbp+var_2C] mov [rax], ecx mov eax, [rbp+var_8] add eax, 1 mov [rbp+var_8], eax jmp loc_10DAD loc_10E32: mov rdi, cs:_parser_declared lea rsi, aA; "a" xor r8d, r8d mov ecx, 2 lea r9, [rbp+var_28] mov edx, r8d call parse_install_identifier mov rdi, cs:_parser_declared lea rsi, aEventIfR+9; "r" xor edx, edx mov ecx, 2 mov r8d, 1 lea r9, [rbp+var_28] call parse_install_identifier mov rdi, cs:_parser_declared lea rsi, aASwap+5; "p" xor edx, edx mov r8d, 2 lea r9, [rbp+var_28] mov ecx, r8d call parse_install_identifier mov rdi, cs:_parser_declared lea rsi, aTictactoeE+0Ah; "e" xor edx, edx mov ecx, 2 mov r8d, 3 lea r9, [rbp+var_28] call parse_install_identifier mov cs:_parser_events, 700h mov cs:_parser_variables, 0 mov cs:_parser_statemachines, 0 mov [rbp+var_4], 0 loc_10EE0: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long ParseInit() { int v1; // [rsp+4h] [rbp-2Ch] _BYTE v2[24]; // [rsp+8h] [rbp-28h] BYREF _QWORD *v3; // [rsp+20h] [rbp-10h] unsigned int i; // [rsp+28h] [rbp-8h] parser_strings = collection_init(1u, 0x2Bu); parser_declared = collection_init(1u, 0x53u); parser_declared_local = collection_init(1u, 0x1Fu); parser_undeclared = collection_init(1u, 5u); parser_reserved = collection_init(1u, 0x2Bu); for ( i = 0; i < 0x19uLL; ++i ) { v3 = collection_install_size((_DWORD *)parser_reserved, (long long)(&ReservedWords)[2 * i], 0, 4u); if ( !v3 ) return (unsigned int)-8; v1 = (int)(&ReservedWords)[2 * i + 1]; *(_DWORD *)collection_get_value(parser_reserved, (long long)v3) = v1; } parse_install_identifier(parser_declared, aA, 0LL, 2LL, 0LL, v2); parse_install_identifier(parser_declared, &aEventIfR[9], 0LL, 2LL, 1LL, v2); parse_install_identifier(parser_declared, &aASwap[5], 0LL, 2LL, 2LL, v2); parse_install_identifier(parser_declared, &aTictactoeE[10], 0LL, 2LL, 3LL, v2); parser_events = 1792; parser_variables = 0; parser_statemachines = 0; return 0; }
ParseInit: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV EDI,0x1 MOV ESI,0x2b CALL 0x0010cf70 MOV qword ptr [0x0014d0d8],RAX MOV EDI,0x1 MOV ESI,0x53 CALL 0x0010cf70 MOV qword ptr [0x0014d0f0],RAX MOV EDI,0x1 MOV ESI,0x1f CALL 0x0010cf70 MOV qword ptr [0x0014d0e0],RAX MOV EDI,0x1 MOV ESI,0x5 CALL 0x0010cf70 MOV qword ptr [0x0014d0e8],RAX MOV EDI,0x1 MOV ESI,0x2b CALL 0x0010cf70 MOV qword ptr [0x0014d0f8],RAX MOV dword ptr [RBP + -0x8],0x0 LAB_00110dad: MOV EAX,dword ptr [RBP + -0x8] CMP RAX,0x19 JNC 0x00110e32 MOV RDI,qword ptr [0x0014d0f8] MOV EAX,dword ptr [RBP + -0x8] MOV ECX,EAX LEA RAX,[0x14b660] SHL RCX,0x4 ADD RAX,RCX MOV RSI,qword ptr [RAX] XOR EDX,EDX MOV ECX,0x4 CALL 0x0010cff0 MOV qword ptr [RBP + -0x10],RAX CMP qword ptr [RBP + -0x10],0x0 JNZ 0x00110df6 MOV dword ptr [RBP + -0x4],0xfffffff8 JMP 0x00110ee0 LAB_00110df6: MOV EAX,dword ptr [RBP + -0x8] MOV ECX,EAX LEA RAX,[0x14b660] SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x8] MOV dword ptr [RBP + -0x2c],EAX MOV RDI,qword ptr [0x0014d0f8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x0010d6e0 MOV ECX,dword ptr [RBP + -0x2c] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RBP + -0x8] ADD EAX,0x1 MOV dword ptr [RBP + -0x8],EAX JMP 0x00110dad LAB_00110e32: MOV RDI,qword ptr [0x0014d0f0] LEA RSI,[0x133f37] XOR R8D,R8D MOV ECX,0x2 LEA R9,[RBP + -0x28] MOV EDX,R8D CALL 0x00110ef0 MOV RDI,qword ptr [0x0014d0f0] LEA RSI,[0x13414a] XOR EDX,EDX MOV ECX,0x2 MOV R8D,0x1 LEA R9,[RBP + -0x28] CALL 0x00110ef0 MOV RDI,qword ptr [0x0014d0f0] LEA RSI,[0x132a46] XOR EDX,EDX MOV R8D,0x2 LEA R9,[RBP + -0x28] MOV ECX,R8D CALL 0x00110ef0 MOV RDI,qword ptr [0x0014d0f0] LEA RSI,[0x1350b9] XOR EDX,EDX MOV ECX,0x2 MOV R8D,0x3 LEA R9,[RBP + -0x28] CALL 0x00110ef0 MOV word ptr [0x0014c370],0x700 MOV word ptr [0x0014d100],0x0 MOV word ptr [0x0014d102],0x0 MOV dword ptr [RBP + -0x4],0x0 LAB_00110ee0: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 ParseInit(void) { int4 uVar1; int4 *puVar2; int1 local_30 [24]; long local_18; uint local_10; _parser_strings = collection_init(1,0x2b); _parser_declared = collection_init(1,0x53); _parser_declared_local = collection_init(1,0x1f); _parser_undeclared = collection_init(1,5); _parser_reserved = collection_init(1,0x2b); local_10 = 0; while( true ) { if (0x18 < local_10) { parse_install_identifier(_parser_declared,&DAT_00133f37,0,2,0,local_30); parse_install_identifier(_parser_declared,s_event_if_r_00134141 + 9,0,2,1,local_30); parse_install_identifier(_parser_declared,&DAT_00132a46,0,2,2,local_30); parse_install_identifier(_parser_declared,s_tictactoe_e_001350af + 10,0,2,3,local_30); _parser_statemachines = 0; _parser_variables = 0; _parser_events = 0x700; return 0; } local_18 = collection_install_size (_parser_reserved,*(int8 *)(ReservedWords + (ulong)local_10 * 0x10),0 ,4); if (local_18 == 0) break; uVar1 = *(int4 *)(ReservedWords + (ulong)local_10 * 0x10 + 8); puVar2 = (int4 *)collection_get_value(_parser_reserved,local_18); *puVar2 = uVar1; local_10 = local_10 + 1; } return 0xfffffff8; }
13,454
ac_psr_primary
alca/libalca/parser.c
ac_expr *ac_psr_primary(ac_parser *parser) { if (MATCH(parser, TOKEN_FALSE, TOKEN_TRUE, TOKEN_NUMBER, TOKEN_STRING, TOKEN_IDENTIFIER, TOKEN_REGEX)) return ac_expr_new_literal(ac_psr_previous_token(parser)); if (MATCH(parser, TOKEN_LPAREN)) { ac_expr *expr = ac_psr_expression(parser); if (!ac_psr_consume(parser, TOKEN_RPAREN, ERROR_UNTERMINATED_EXPRESSION, "missing terminating ')'")) return NULL; return ac_expr_new_grouping(expr); } if (MATCH(parser, TOKEN_FOR)) { return ac_psr_range(parser); } ac_psr_set_error(parser, ac_psr_current_token(parser), ERROR_INVALID_SYNTAX, "invalid syntax"); return NULL; }
O0
c
ac_psr_primary: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rdi movl $0x2b, %esi movl $0x2a, %edx movl $0x26, %ecx movl $0x27, %r8d movl $0x29, %r9d movl $0x28, (%rsp) movl $0xffffffff, 0x8(%rsp) # imm = 0xFFFFFFFF movb $0x0, %al callq 0x7700 cmpl $0x0, %eax je 0xa010 movq -0x10(%rbp), %rdi callq 0x7370 movq %rax, %rdi callq 0x7170 movq %rax, -0x8(%rbp) jmp 0xa0c7 movq -0x10(%rbp), %rdi xorl %esi, %esi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movb $0x0, %al callq 0x7700 cmpl $0x0, %eax je 0xa06d movq -0x10(%rbp), %rdi callq 0x7590 movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rdi movl $0x1, %esi movl $0x4, %edx leaq 0x54563(%rip), %rcx # 0x5e5ac callq 0x7440 cmpq $0x0, %rax jne 0xa05e movq $0x0, -0x8(%rbp) jmp 0xa0c7 movq -0x18(%rbp), %rdi callq 0x7840 movq %rax, -0x8(%rbp) jmp 0xa0c7 movq -0x10(%rbp), %rdi movl $0x33, %esi movl $0xffffffff, %edx # imm = 0xFFFFFFFF movb $0x0, %al callq 0x7700 cmpl $0x0, %eax je 0xa096 movq -0x10(%rbp), %rdi callq 0x7780 movq %rax, -0x8(%rbp) jmp 0xa0c7 movq -0x10(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rdi callq 0x7cc0 movq -0x20(%rbp), %rdi movq %rax, %rsi movl $0x2, %edx leaq 0x54449(%rip), %rcx # 0x5e503 callq 0x72e0 movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ac_psr_primary: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rdi, [rbp+var_10] mov esi, 2Bh ; '+' mov edx, 2Ah ; '*' mov ecx, 26h ; '&' mov r8d, 27h ; ''' mov r9d, 29h ; ')' mov [rsp+30h+var_30], 28h ; '(' mov [rsp+30h+var_28], 0FFFFFFFFh mov al, 0 call _ac_psr_match cmp eax, 0 jz short loc_A010 mov rdi, [rbp+var_10] call _ac_psr_previous_token mov rdi, rax call _ac_expr_new_literal mov [rbp+var_8], rax jmp loc_A0C7 loc_A010: mov rdi, [rbp+var_10] xor esi, esi mov edx, 0FFFFFFFFh mov al, 0 call _ac_psr_match cmp eax, 0 jz short loc_A06D mov rdi, [rbp+var_10] call _ac_psr_expression mov [rbp+var_18], rax mov rdi, [rbp+var_10] mov esi, 1 mov edx, 4 lea rcx, aMissingTermina; "missing terminating ')'" call _ac_psr_consume cmp rax, 0 jnz short loc_A05E mov [rbp+var_8], 0 jmp short loc_A0C7 loc_A05E: mov rdi, [rbp+var_18] call _ac_expr_new_grouping mov [rbp+var_8], rax jmp short loc_A0C7 loc_A06D: mov rdi, [rbp+var_10] mov esi, 33h ; '3' mov edx, 0FFFFFFFFh mov al, 0 call _ac_psr_match cmp eax, 0 jz short loc_A096 mov rdi, [rbp+var_10] call _ac_psr_range mov [rbp+var_8], rax jmp short loc_A0C7 loc_A096: mov rax, [rbp+var_10] mov [rbp+var_20], rax mov rdi, [rbp+var_10] call _ac_psr_current_token mov rdi, [rbp+var_20] mov rsi, rax mov edx, 2 lea rcx, aInvalidSyntax; "invalid syntax" call _ac_psr_set_error mov [rbp+var_8], 0 loc_A0C7: mov rax, [rbp+var_8] add rsp, 30h pop rbp retn
long long ac_psr_primary( const char **a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9) { long long v9; // rcx long long v10; // r8 long long v11; // r9 __m128 v12; // xmm4 __m128 v13; // xmm5 long long v14; // rax long long v15; // rcx long long v16; // r8 long long v17; // r9 __m128 v18; // xmm4 __m128 v19; // xmm5 long long v20; // rdx long long v21; // rcx long long v22; // r8 long long v23; // r9 __m128 v24; // xmm4 __m128 v25; // xmm5 long long v26; // rax char v28; // [rsp+0h] [rbp-30h] char v29; // [rsp+0h] [rbp-30h] long long v30; // [rsp+18h] [rbp-18h] if ( (unsigned int)ac_psr_match((long long)a1, 43LL, 42LL, 38LL, 39LL, 41LL, a2, a3, a4, a5, a6, a7, a8, a9, 40) ) { v14 = ac_psr_previous_token((long long)a1); return ac_expr_new_literal(v14); } else if ( (unsigned int)ac_psr_match( (long long)a1, 0LL, 0xFFFFFFFFLL, v9, v10, v11, a2, a3, a4, a5, v12, v13, a8, a9, v28) ) { v30 = ac_psr_expression(a1); if ( ac_psr_consume(a1, 1, 4, "missing terminating ')'") ) return ac_expr_new_grouping(v30); else return 0LL; } else if ( (unsigned int)ac_psr_match( (long long)a1, 51LL, 0xFFFFFFFFLL, v15, v16, v17, a2, a3, a4, a5, v18, v19, a8, a9, v29) ) { return ac_psr_range(a1, a2, a3, a4, a5, v24, v25, a8, a9, 51LL, v20, v21, v22, v23); } else { v26 = ac_psr_current_token((long long)a1); ac_psr_set_error(a1, v26, 2, "invalid syntax"); return 0LL; } }
ac_psr_primary: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x2b MOV EDX,0x2a MOV ECX,0x26 MOV R8D,0x27 MOV R9D,0x29 MOV dword ptr [RSP],0x28 MOV dword ptr [RSP + 0x8],0xffffffff MOV AL,0x0 CALL 0x00107700 CMP EAX,0x0 JZ 0x0010a010 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00107370 MOV RDI,RAX CALL 0x00107170 MOV qword ptr [RBP + -0x8],RAX JMP 0x0010a0c7 LAB_0010a010: MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI MOV EDX,0xffffffff MOV AL,0x0 CALL 0x00107700 CMP EAX,0x0 JZ 0x0010a06d MOV RDI,qword ptr [RBP + -0x10] CALL 0x00107590 MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x1 MOV EDX,0x4 LEA RCX,[0x15e5ac] CALL 0x00107440 CMP RAX,0x0 JNZ 0x0010a05e MOV qword ptr [RBP + -0x8],0x0 JMP 0x0010a0c7 LAB_0010a05e: MOV RDI,qword ptr [RBP + -0x18] CALL 0x00107840 MOV qword ptr [RBP + -0x8],RAX JMP 0x0010a0c7 LAB_0010a06d: MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x33 MOV EDX,0xffffffff MOV AL,0x0 CALL 0x00107700 CMP EAX,0x0 JZ 0x0010a096 MOV RDI,qword ptr [RBP + -0x10] CALL 0x00107780 MOV qword ptr [RBP + -0x8],RAX JMP 0x0010a0c7 LAB_0010a096: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x20],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x00107cc0 MOV RDI,qword ptr [RBP + -0x20] MOV RSI,RAX MOV EDX,0x2 LEA RCX,[0x15e503] CALL 0x001072e0 MOV qword ptr [RBP + -0x8],0x0 LAB_0010a0c7: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x30 POP RBP RET
int8 ac_psr_primary(int8 param_1) { int iVar1; int8 uVar2; long lVar3; int8 local_10; iVar1 = ac_psr_match(param_1,0x2b,0x2a,0x26,0x27,0x29,0x28,0xffffffff); if (iVar1 == 0) { iVar1 = ac_psr_match(param_1,0,0xffffffff); if (iVar1 == 0) { iVar1 = ac_psr_match(param_1,0x33,0xffffffff); if (iVar1 == 0) { uVar2 = ac_psr_current_token(param_1); ac_psr_set_error(param_1,uVar2,2,"invalid syntax"); local_10 = 0; } else { local_10 = ac_psr_range(param_1); } } else { uVar2 = ac_psr_expression(param_1); lVar3 = ac_psr_consume(param_1,1,4,"missing terminating \')\'"); if (lVar3 == 0) { local_10 = 0; } else { local_10 = ac_expr_new_grouping(uVar2); } } } else { uVar2 = ac_psr_previous_token(param_1); local_10 = ac_expr_new_literal(uVar2); } return local_10; }
13,455
wt_resource_init
eloqsql/mysys/waiting_threads.c
static void wt_resource_init(LF_HASH *hash __attribute__((unused)), WT_RESOURCE *rc, WT_RESOURCE_ID *id) { DBUG_ENTER("wt_resource_init"); rc->id= *id; rc->waiter_count= 0; rc->state= ACTIVE; #ifndef DBUG_OFF rc->cond_mutex= 0; #endif DBUG_VOID_RETURN; }
O3
c
wt_resource_init: pushq %rbp movq %rsp, %rbp movups (%rdx), %xmm0 movups %xmm0, (%rsi) movq $0x0, 0x10(%rsi) popq %rbp retq
wt_resource_init: push rbp mov rbp, rsp movups xmm0, xmmword ptr [rdx] movups xmmword ptr [rsi], xmm0 mov qword ptr [rsi+10h], 0 pop rbp retn
void wt_resource_init(long long a1, long long a2, _OWORD *a3) { *(_OWORD *)a2 = *a3; *(_QWORD *)(a2 + 16) = 0LL; }
wt_resource_init: PUSH RBP MOV RBP,RSP MOVUPS XMM0,xmmword ptr [RDX] MOVUPS xmmword ptr [RSI],XMM0 MOV qword ptr [RSI + 0x10],0x0 POP RBP RET
void wt_resource_init(int8 param_1,int8 *param_2,int8 *param_3) { int8 uVar1; uVar1 = param_3[1]; *param_2 = *param_3; param_2[1] = uVar1; param_2[2] = 0; return; }
13,456
decltype(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>::Get(fp).MatchAndExplain(fp0, fp1->stream())) testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>>(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::MatchResultListener*)
giladroyz[P]FindPeaks/build_O3/_deps/googletest-src/googletest/include/gtest/gtest-matchers.h
static const M& Get(const MatcherBase& m) { return static_cast<Shared*>(m.buffer_.shared)->value; }
O3
c
decltype(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>::Get(fp).MatchAndExplain(fp0, fp1->stream())) testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, false>>(testing::internal::MatcherBase<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, testing::MatchResultListener*): movq 0x10(%rdi), %rax movq 0x8(%rsi), %rdx cmpq 0x10(%rax), %rdx jne 0x39791 testq %rdx, %rdx je 0x39794 pushq %rax movq 0x8(%rax), %rax movq (%rsi), %rdi movq %rax, %rsi callq 0x8500 testl %eax, %eax sete %al addq $0x8, %rsp retq xorl %eax, %eax retq movb $0x1, %al retq nop
_ZN7testing8internal11MatcherBaseIRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE19MatchAndExplainImplINSA_11ValuePolicyINS0_9EqMatcherIS7_EELb0EEEEEDTcldtclsrT_3Getfp_E15MatchAndExplainfp0_clptfp1_6streamEEERKSA_S9_PNS_19MatchResultListenerE: mov rax, [rdi+10h] mov rdx, [rsi+8] cmp rdx, [rax+10h] jnz short loc_39791 test rdx, rdx jz short loc_39794 push rax mov rax, [rax+8] mov rdi, [rsi] mov rsi, rax call _bcmp test eax, eax setz al add rsp, 8 retn loc_39791: xor eax, eax retn loc_39794: mov al, 1 retn
bool testing::internal::MatcherBase<std::string const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::string const&>::ValuePolicy<testing::internal::EqMatcher<std::string>,false>>( long long a1, _QWORD *a2) { long long v2; // rax long long v3; // rdx v2 = *(_QWORD *)(a1 + 16); v3 = a2[1]; if ( v3 != *(_QWORD *)(v2 + 16) ) return 0; if ( v3 ) return (unsigned int)bcmp(*a2, *(_QWORD *)(v2 + 8)) == 0; return 1; }
MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::string_const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string>,false>>: MOV RAX,qword ptr [RDI + 0x10] MOV RDX,qword ptr [RSI + 0x8] CMP RDX,qword ptr [RAX + 0x10] JNZ 0x00139791 TEST RDX,RDX JZ 0x00139794 PUSH RAX MOV RAX,qword ptr [RAX + 0x8] MOV RDI,qword ptr [RSI] MOV RSI,RAX CALL 0x00108500 TEST EAX,EAX SETZ AL ADD RSP,0x8 RET LAB_00139791: XOR EAX,EAX RET LAB_00139794: MOV AL,0x1 RET
/* decltype (((testing::internal::MatcherBase<std::__cxx11::string const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string >, false>::Get({parm#1})).MatchAndExplain)({parm#2}, ({parm#3}->stream)())) testing::internal::MatcherBase<std::__cxx11::string const&>::MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::string const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string >, false> >(testing::internal::MatcherBase<std::__cxx11::string const&> const&, std::__cxx11::string const&, testing::MatchResultListener*) */ int8 testing::internal::MatcherBase<std::__cxx11::string_const&>:: MatchAndExplainImpl<testing::internal::MatcherBase<std::__cxx11::string_const&>::ValuePolicy<testing::internal::EqMatcher<std::__cxx11::string>,false>> (MatcherBase *param_1,string *param_2,MatchResultListener *param_3) { long lVar1; size_t __n; int iVar2; int4 extraout_var; lVar1 = *(long *)(param_1 + 0x10); __n = *(size_t *)(param_2 + 8); if (__n != *(size_t *)(lVar1 + 0x10)) { return 0; } if (__n != 0) { iVar2 = bcmp(*(void **)param_2,*(void **)(lVar1 + 8),__n); return CONCAT71((int7)(CONCAT44(extraout_var,iVar2) >> 8),iVar2 == 0); } return CONCAT71((int7)((ulong)lVar1 >> 8),1); }
13,457
releaseMonitor
untodesu[P]riteg/build_O1/_deps/glfw-src/src/x11_window.c
static void releaseMonitor(_GLFWwindow* window) { if (window->monitor->window != window) return; _glfwInputMonitorWindow(window->monitor, NULL); _glfwRestoreVideoModeX11(window->monitor); _glfw.x11.saver.count--; if (_glfw.x11.saver.count == 0) { // Restore old screen saver settings XSetScreenSaver(_glfw.x11.display, _glfw.x11.saver.timeout, _glfw.x11.saver.interval, _glfw.x11.saver.blanking, _glfw.x11.saver.exposure); } }
O1
c
releaseMonitor: pushq %rbx movq %rdi, %rbx movq 0x40(%rdi), %rdi cmpq %rbx, 0x18(%rdi) jne 0x229ca xorl %esi, %esi callq 0x1bafa movq 0x40(%rbx), %rdi callq 0x20ecc leaq 0x81c76(%rip), %rax # 0xa4638 decl 0x2063c(%rax) je 0x229cc popq %rbx retq movq 0x1fec0(%rax), %rdi movl 0x20640(%rax), %esi movl 0x20644(%rax), %edx movl 0x20648(%rax), %ecx movl 0x2064c(%rax), %r8d popq %rbx jmp 0xc0a0
releaseMonitor: push rbx mov rbx, rdi mov rdi, [rdi+40h] cmp [rdi+18h], rbx jnz short loc_229CA xor esi, esi call _glfwInputMonitorWindow mov rdi, [rbx+40h] call _glfwRestoreVideoModeX11 lea rax, _glfw dec dword ptr [rax+2063Ch] jz short loc_229CC loc_229CA: pop rbx retn loc_229CC: mov rdi, [rax+1FEC0h] mov esi, dword ptr ds:loc_20640[rax] mov edx, [rax+20644h] mov ecx, [rax+20648h] mov r8d, [rax+2064Ch] pop rbx jmp _XSetScreenSaver
_DWORD * releaseMonitor(long long a1) { long long v2; // rdi _DWORD *result; // rax v2 = *(_QWORD *)(a1 + 64); if ( *(_QWORD *)(v2 + 24) == a1 ) { glfwInputMonitorWindow(v2, 0LL); glfwRestoreVideoModeX11(*(_QWORD *)(a1 + 64)); result = glfw; if ( glfw[33167]-- == 1 ) return (_DWORD *)XSetScreenSaver( *(_QWORD *)&glfw[32688], *(unsigned int *)((char *)&loc_20640 + (_QWORD)glfw), (unsigned int)glfw[33169], (unsigned int)glfw[33170], (unsigned int)glfw[33171]); } return result; }
releaseMonitor: PUSH RBX MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x40] CMP qword ptr [RDI + 0x18],RBX JNZ 0x001229ca XOR ESI,ESI CALL 0x0011bafa MOV RDI,qword ptr [RBX + 0x40] CALL 0x00120ecc LEA RAX,[0x1a4638] DEC dword ptr [RAX + 0x2063c] JZ 0x001229cc LAB_001229ca: POP RBX RET LAB_001229cc: MOV RDI,qword ptr [RAX + 0x1fec0] MOV ESI,dword ptr [RAX + 0x20640] MOV EDX,dword ptr [RAX + 0x20644] MOV ECX,dword ptr [RAX + 0x20648] MOV R8D,dword ptr [RAX + 0x2064c] POP RBX JMP 0x0010c0a0
void releaseMonitor(long param_1) { if (*(long *)(*(long *)(param_1 + 0x40) + 0x18) == param_1) { _glfwInputMonitorWindow(*(long *)(param_1 + 0x40),0); _glfwRestoreVideoModeX11(*(int8 *)(param_1 + 0x40)); DAT_001c4c74 = DAT_001c4c74 + -1; if (DAT_001c4c74 == 0) { XSetScreenSaver(DAT_001c44f8,DAT_001c4c78,DAT_001c4c7c,DAT_001c4c80,DAT_001c4c84); return; } } return; }
13,458
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>::push_back(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&)
monkey531[P]llama/common/json.hpp
void push_back(const typename object_t::value_type& val) { // push_back only works for null objects or objects if (JSON_HEDLEY_UNLIKELY(!(is_null() || is_object()))) { JSON_THROW(type_error::create(308, detail::concat("cannot use push_back() with ", type_name()), this)); } // transform null object into an object if (is_null()) { m_data.m_type = value_t::object; m_data.m_value = value_t::object; assert_invariant(); } // add element to object auto res = m_data.m_value.object->insert(val); set_parent(res.first->second); }
O2
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::push_back(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&): pushq %rbp pushq %r14 pushq %rbx subq $0x30, %rsp movq %rsi, %rbx movq %rdi, %r14 movzbl (%rdi), %eax testl %eax, %eax jne 0x88b77 movb $0x1, (%r14) callq 0x3d9da movq %rax, 0x8(%r14) pushq $0x1 popq %rsi movq %r14, %rdi callq 0x3d8e2 jmp 0x88b7c cmpl $0x1, %eax jne 0x88b90 movq 0x8(%r14), %rdi movq %rbx, %rsi addq $0x30, %rsp popq %rbx popq %r14 popq %rbp jmp 0x88d06 pushq $0x20 popq %rdi callq 0x23470 movq %rax, %rbx movq %r14, %rdi callq 0x4334a leaq 0x8(%rsp), %rdx movq %rax, (%rdx) leaq 0x2c3f8(%rip), %rsi # 0xb4faa leaq 0x10(%rsp), %rdi callq 0x63395 movb $0x1, %bpl leaq 0x10(%rsp), %rdx movq %rbx, %rdi movl $0x134, %esi # imm = 0x134 movq %r14, %rcx callq 0x431fe xorl %ebp, %ebp leaq 0x7336b(%rip), %rsi # 0xfbf48 leaq -0x48c90(%rip), %rdx # 0x3ff54 movq %rbx, %rdi callq 0x23f40 movq %rax, %r14 leaq 0x10(%rsp), %rdi callq 0x241f8 testb %bpl, %bpl jne 0x88c03 jmp 0x88c0b movq %rax, %r14 movq %rbx, %rdi callq 0x236a0 movq %r14, %rdi callq 0x23fc0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9push_backERKSt4pairIKS9_SD_E: push rbp; char push r14; int push rbx; int sub rsp, 30h mov rbx, rsi mov r14, rdi movzx eax, byte ptr [rdi] test eax, eax jnz short loc_88B77 mov byte ptr [r14], 1 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6createINS2_IS9_SD_St4lessIvESaISt4pairIKS9_SD_EEEEJEEEPT_DpOT0_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>>() mov [r14+8], rax push 1 pop rsi mov rdi, r14 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) jmp short loc_88B7C loc_88B77: cmp eax, 1 jnz short loc_88B90 loc_88B7C: mov rdi, [r14+8] mov rsi, rbx add rsp, 30h pop rbx pop r14 pop rbp jmp _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::insert(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&) loc_88B90: push 20h ; ' ' pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_40] mov [rdx], rax lea rsi, aCannotUsePushB; "cannot use push_back() with " lea rdi, [rsp+48h+var_38] call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA29_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>(char const(&)[29],char const* &&) mov bpl, 1 lea rdx, [rsp+48h+var_38] mov rdi, rbx; this mov esi, 134h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax lea rdi, [rsp+48h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_88C03 jmp short loc_88C0B mov r14, rax loc_88C03: mov rdi, rbx; void * call ___cxa_free_exception loc_88C0B: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::push_back( long long a1, long long a2) { nlohmann::json_abi_v3_11_3::detail::type_error *exception; // rbx const char *v4; // [rsp+8h] [rbp-40h] BYREF _BYTE v5[56]; // [rsp+10h] [rbp-38h] BYREF if ( *(_BYTE *)a1 ) { if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::type_error *)__cxa_allocate_exception(0x20uLL); v4 = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[29],char const*>( (long long)v5, (long long)"cannot use push_back() with ", &v4); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 308, (long long)v5); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } } else { *(_BYTE *)a1 = 1; *(_QWORD *)(a1 + 8) = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::create<nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>>(); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); } return nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::insert( *(_QWORD *)(a1 + 8), a2); }
push_back: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RSI MOV R14,RDI MOVZX EAX,byte ptr [RDI] TEST EAX,EAX JNZ 0x00188b77 MOV byte ptr [R14],0x1 CALL 0x0013d9da MOV qword ptr [R14 + 0x8],RAX PUSH 0x1 POP RSI MOV RDI,R14 CALL 0x0013d8e2 JMP 0x00188b7c LAB_00188b77: CMP EAX,0x1 JNZ 0x00188b90 LAB_00188b7c: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX ADD RSP,0x30 POP RBX POP R14 POP RBP JMP 0x00188d06 LAB_00188b90: PUSH 0x20 POP RDI CALL 0x00123470 MOV RBX,RAX MOV RDI,R14 CALL 0x0014334a LEA RDX,[RSP + 0x8] MOV qword ptr [RDX],RAX LAB_00188bab: LEA RSI,[0x1b4faa] LEA RDI,[RSP + 0x10] CALL 0x00163395 MOV BPL,0x1 LAB_00188bbf: LEA RDX,[RSP + 0x10] MOV RDI,RBX MOV ESI,0x134 MOV RCX,R14 CALL 0x001431fe XOR EBP,EBP LEA RSI,[0x1fbf48] LEA RDX,[0x13ff54] MOV RDI,RBX CALL 0x00123f40
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::push_back(std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > const&) */ void __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::push_back(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,pair *param_1) { ordered_map *poVar1; int8 uVar2; char *local_40; detail local_38 [32]; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1; poVar1 = create<nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>>> (); *(ordered_map **)(this + 8) = poVar1; assert_invariant(SUB81(this,0)); } else if (*this != (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { uVar2 = __cxa_allocate_exception(0x20); local_40 = (char *)type_name(this); /* try { // try from 00188bab to 00188bbb has its CatchHandler @ 00188c00 */ detail::concat<std::__cxx11::string,char_const(&)[29],char_const*> (local_38,"cannot use push_back() with ",&local_40); /* try { // try from 00188bbf to 00188beb has its CatchHandler @ 00188bec */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar2,0x134,local_38,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar2,&detail::type_error::typeinfo,detail::exception::~exception); } ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::insert(*(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8),param_1); return; }
13,459
nglog::LogDestination::AddLogSink(nglog::LogSink*)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::AddLogSink(LogSink* destination) { // Prevent any subtle race conditions by wrapping a mutex lock around // all this stuff. SinkLock l{sink_mutex_}; if (sinks_ == nullptr) sinks_ = std::make_unique<std::vector<LogSink*>>(); sinks_->push_back(destination); }
O2
cpp
nglog::LogDestination::AddLogSink(nglog::LogSink*): pushq %rbx subq $0x10, %rsp movq %rdi, 0x8(%rsp) leaq 0x23801(%rip), %rdi # 0x32c98 callq 0x1bade movq 0x237ed(%rip), %rdi # 0x32c90 testq %rdi, %rdi jne 0xf4d5 movq %rsp, %rdi callq 0x1015f movq %rsp, %rbx movq (%rbx), %rsi andq $0x0, (%rbx) leaq 0x237cf(%rip), %rdi # 0x32c90 callq 0x1019c movq %rbx, %rdi callq 0xecde movq 0x237bb(%rip), %rdi # 0x32c90 leaq 0x8(%rsp), %rsi callq 0x1017e leaq 0x237b2(%rip), %rdi # 0x32c98 callq 0x7750 addq $0x10, %rsp popq %rbx retq jmp 0xf4f3 movq %rax, %rbx leaq 0x2379b(%rip), %rdi # 0x32c98 callq 0x7750 movq %rbx, %rdi callq 0x79c0
_ZN5nglog14LogDestination10AddLogSinkEPNS_7LogSinkE: push rbx sub rsp, 10h mov [rsp+18h+var_10], rdi lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; this call _ZNSt22__shared_mutex_pthread4lockEv; std::__shared_mutex_pthread::lock(void) mov rdi, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ test rdi, rdi jnz short loc_F4D5 mov rdi, rsp call _ZSt11make_uniqueISt6vectorIPN5nglog7LogSinkESaIS3_EEJEENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<std::vector<nglog::LogSink *>>() mov rbx, rsp mov rsi, [rbx] and qword ptr [rbx], 0 lea rdi, _ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ call _ZNSt15__uniq_ptr_implISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EE5resetEPS5_; std::__uniq_ptr_impl<std::vector<nglog::LogSink *>,std::default_delete<std::vector<nglog::LogSink *>>>::reset(std::vector<nglog::LogSink *>*) mov rdi, rbx; void * call _ZNSt10unique_ptrISt6vectorIPN5nglog7LogSinkESaIS3_EESt14default_deleteIS5_EED2Ev; std::unique_ptr<std::vector<nglog::LogSink *>>::~unique_ptr() mov rdi, cs:_ZN5nglog14LogDestination6sinks_E; nglog::LogDestination::sinks_ loc_F4D5: lea rsi, [rsp+18h+var_10] call _ZNSt6vectorIPN5nglog7LogSinkESaIS2_EE9push_backERKS2_; std::vector<nglog::LogSink *>::push_back(nglog::LogSink * const&) lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock add rsp, 10h pop rbx retn jmp short $+2 loc_F4F3: mov rbx, rax lea rdi, _ZN5nglog14LogDestination11sink_mutex_E; nglog::LogDestination::sink_mutex_ call _pthread_rwlock_unlock mov rdi, rbx call __Unwind_Resume
long long nglog::LogDestination::AddLogSink(nglog::LogDestination *this, nglog::LogSink *a2) { long long v2; // rdi long long v3; // rsi long long v5; // [rsp+0h] [rbp-18h] BYREF nglog::LogDestination *v6; // [rsp+8h] [rbp-10h] BYREF v6 = this; std::__shared_mutex_pthread::lock((std::__shared_mutex_pthread *)&nglog::LogDestination::sink_mutex_); v2 = nglog::LogDestination::sinks_; if ( !nglog::LogDestination::sinks_ ) { std::make_unique<std::vector<nglog::LogSink *>>(&v5, a2); v3 = v5; v5 = 0LL; std::__uniq_ptr_impl<std::vector<nglog::LogSink *>,std::default_delete<std::vector<nglog::LogSink *>>>::reset( &nglog::LogDestination::sinks_, v3); std::unique_ptr<std::vector<nglog::LogSink *>>::~unique_ptr(&v5); v2 = nglog::LogDestination::sinks_; } std::vector<nglog::LogSink *>::push_back(v2, &v6); return pthread_rwlock_unlock(&nglog::LogDestination::sink_mutex_); }
AddLogSink: PUSH RBX SUB RSP,0x10 MOV qword ptr [RSP + 0x8],RDI LEA RDI,[0x132c98] CALL 0x0011bade MOV RDI,qword ptr [0x00132c90] TEST RDI,RDI JNZ 0x0010f4d5 LAB_0010f4a8: MOV RDI,RSP CALL 0x0011015f MOV RBX,RSP MOV RSI,qword ptr [RBX] AND qword ptr [RBX],0x0 LEA RDI,[0x132c90] CALL 0x0011019c MOV RDI,RBX CALL 0x0010ecde MOV RDI,qword ptr [0x00132c90] LAB_0010f4d5: LEA RSI,[RSP + 0x8] CALL 0x0011017e LAB_0010f4df: LEA RDI,[0x132c98] CALL 0x00107750 ADD RSP,0x10 POP RBX RET
/* nglog::LogDestination::AddLogSink(nglog::LogSink*) */ void nglog::LogDestination::AddLogSink(LogSink *param_1) { vector *pvVar1; vector *local_18; LogSink *local_10; local_10 = param_1; std::__shared_mutex_pthread::lock((__shared_mutex_pthread *)sink_mutex_); if (sinks_ == (vector<nglog::LogSink*,std::allocator<nglog::LogSink*>> *)0x0) { /* try { // try from 0010f4a8 to 0010f4af has its CatchHandler @ 0010f4f1 */ std::make_unique<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>(); pvVar1 = local_18; local_18 = (vector *)0x0; std:: __uniq_ptr_impl<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>> ::reset((__uniq_ptr_impl<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>> *)&sinks_,pvVar1); std:: unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>> ::~unique_ptr((unique_ptr<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>,std::default_delete<std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>>> *)&local_18); } /* try { // try from 0010f4d5 to 0010f4de has its CatchHandler @ 0010f4f3 */ std::vector<nglog::LogSink*,std::allocator<nglog::LogSink*>>::push_back(sinks_,&local_10); pthread_rwlock_unlock((pthread_rwlock_t *)sink_mutex_); return; }
13,460
Item_func_like::propagate_equal_fields(THD*, Value_source::Context const&, COND_EQUAL*)
eloqsql/sql/item_cmpfunc.h
Item* propagate_equal_fields(THD *thd, const Context &ctx, COND_EQUAL *cond) override { /* LIKE differs from the regular comparison operator ('=') in the following: - LIKE never ignores trailing spaces (even for PAD SPACE collations) Propagation of equal fields with a PAD SPACE collation into LIKE is not safe. Example: WHERE a='a ' AND a LIKE 'a' - returns true for 'a' cannot be rewritten to: WHERE a='a ' AND 'a ' LIKE 'a' - returns false for 'a' Note, binary collations in MySQL/MariaDB, e.g. latin1_bin, still have the PAD SPACE attribute and ignore trailing spaces! - LIKE does not take into account contractions, expansions, and ignorable characters. Propagation of equal fields with contractions/expansions/ignorables is also not safe. It's safe to propagate my_charset_bin (BINARY/VARBINARY/BLOB) values, because they do not ignore trailing spaces and have one-to-one mapping between a string and its weights. The below condition should be true only for my_charset_bin (as of version 10.1.7). */ uint flags= Item_func_like::compare_collation()->state; if ((flags & MY_CS_NOPAD) && !(flags & MY_CS_NON1TO1)) Item_args::propagate_equal_fields(thd, Context(ANY_SUBST, &type_handler_long_blob, compare_collation()), cond); return this; }
O0
c
Item_func_like::propagate_equal_fields(THD*, Value_source::Context const&, COND_EQUAL*): 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 -0x8(%rbp), %rdi movq %rdi, -0x48(%rbp) callq 0x8cd280 movl 0xc(%rax), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax andl $0x20000, %eax # imm = 0x20000 cmpl $0x0, %eax je 0x8cd18f movl -0x24(%rbp), %eax andl $0x40000, %eax # imm = 0x40000 cmpl $0x0, %eax jne 0x8cd18f movq -0x48(%rbp), %rdi movq %rdi, %rax addq $0x70, %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x50(%rbp) movq (%rdi), %rax callq *0x650(%rax) movq %rax, %rcx leaq -0x40(%rbp), %rdi xorl %esi, %esi leaq 0x14ae41b(%rip), %rdx # 0x1d7b590 callq 0x886270 movq -0x58(%rbp), %rdi movq -0x50(%rbp), %rsi movq -0x20(%rbp), %rcx leaq -0x40(%rbp), %rdx callq 0xd81c10 movq -0x48(%rbp), %rax addq $0x60, %rsp popq %rbp retq nopl (%rax)
_ZN14Item_func_like22propagate_equal_fieldsEP3THDRKN12Value_source7ContextEP10COND_EQUAL: 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 rdi, [rbp+var_8]; this mov [rbp+var_48], rdi call _ZNK14Item_func_like17compare_collationEv; Item_func_like::compare_collation(void) mov eax, [rax+0Ch] mov [rbp+var_24], eax mov eax, [rbp+var_24] and eax, 20000h cmp eax, 0 jz short loc_8CD18F mov eax, [rbp+var_24] and eax, 40000h cmp eax, 0 jnz short loc_8CD18F mov rdi, [rbp+var_48] mov rax, rdi add rax, 70h ; 'p' mov [rbp+var_58], rax mov rax, [rbp+var_10] mov [rbp+var_50], rax mov rax, [rdi] call qword ptr [rax+650h] mov rcx, rax lea rdi, [rbp+var_40] xor esi, esi lea rdx, type_handler_long_blob call _ZN12Value_source7ContextC2ENS_16Subst_constraintEPK12Type_handlerPK15charset_info_st; Value_source::Context::Context(Value_source::Subst_constraint,Type_handler const*,charset_info_st const*) mov rdi, [rbp+var_58]; this mov rsi, [rbp+var_50]; THD * mov rcx, [rbp+var_20]; COND_EQUAL * lea rdx, [rbp+var_40]; Value_source::Context * call _ZN9Item_args22propagate_equal_fieldsEP3THDRKN12Value_source7ContextEP10COND_EQUAL; Item_args::propagate_equal_fields(THD *,Value_source::Context const&,COND_EQUAL *) loc_8CD18F: mov rax, [rbp+var_48] add rsp, 60h pop rbp retn
Item_func_like * Item_func_like::propagate_equal_fields( Item_func_like *this, THD *a2, const Value_source::Context *a3, COND_EQUAL *a4) { long long v4; // rax THD *v6; // [rsp+10h] [rbp-50h] _BYTE v7[28]; // [rsp+20h] [rbp-40h] BYREF int v8; // [rsp+3Ch] [rbp-24h] COND_EQUAL *v9; // [rsp+40h] [rbp-20h] const Value_source::Context *v10; // [rsp+48h] [rbp-18h] THD *v11; // [rsp+50h] [rbp-10h] Item_func_like *v12; // [rsp+58h] [rbp-8h] v12 = this; v11 = a2; v10 = a3; v9 = a4; v8 = *(_DWORD *)(Item_func_like::compare_collation(this) + 12); if ( (v8 & 0x20000) != 0 && (v8 & 0x40000) == 0 ) { v6 = v11; v4 = (*(long long ( **)(Item_func_like *))(*(_QWORD *)this + 1616LL))(this); Value_source::Context::Context((long long)v7, 0, (long long)&type_handler_long_blob, v4); Item_args::propagate_equal_fields((Item_func_like *)((char *)this + 112), v6, (const Value_source::Context *)v7, v9); } return this; }
__cxx_global_var_init.5: PUSH RBP MOV RBP,RSP LEA RDI,[0x26cb494] MOV ESI,0x800000 CALL 0x008fd530 POP RBP RET
void __cxx_global_var_init_5(void) { date_conv_mode_t::date_conv_mode_t((date_conv_mode_t *)&TIME_NO_ZERO_IN_DATE,0x800000); return; }
13,461
my_strntoul_8bit
eloqsql/strings/ctype-simple.c
ulong my_strntoul_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register uint32 cutoff; register uint cutlim; register uint32 i; register const char *s; const char *save, *e; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for( ; s<e && my_isspace(cs, *s); s++); if (s==e) { goto noconv; } if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = ((uint32)~0L) / (uint32) base; cutlim = (uint) (((uint32)~0L) % (uint32) base); overflow = 0; i = 0; for ( ; s != e; ++s) { register uchar c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (uint32) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (overflow) { err[0]= ERANGE; return (~(uint32) 0); } return (negative ? -((long) i) : (long) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O0
c
my_strntoul_8bit: pushq %rbp movq %rsp, %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 -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x50(%rbp), %rcx xorl %eax, %eax cmpq -0x60(%rbp), %rcx movb %al, -0x66(%rbp) jae 0x7a978 movq -0x10(%rbp), %rax movq 0x40(%rax), %rax movq -0x50(%rbp), %rcx movzbl (%rcx), %ecx movzbl 0x1(%rax,%rcx), %eax andl $0x8, %eax cmpl $0x0, %eax setne %al movb %al, -0x66(%rbp) movb -0x66(%rbp), %al testb $0x1, %al jne 0x7a981 jmp 0x7a991 jmp 0x7a983 movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x7a949 movq -0x50(%rbp), %rax cmpq -0x60(%rbp), %rax jne 0x7a9a0 jmp 0x7ab4c movq -0x50(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax jne 0x7a9c1 movl $0x1, -0x3c(%rbp) movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x7a9eb movq -0x50(%rbp), %rax movsbl (%rax), %eax cmpl $0x2b, %eax jne 0x7a9e2 movl $0x0, -0x3c(%rbp) movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x7a9e9 movl $0x0, -0x3c(%rbp) jmp 0x7a9eb movq -0x50(%rbp), %rax movq %rax, -0x58(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl -0x24(%rbp) movl %eax, -0x40(%rbp) movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl -0x24(%rbp) movl %edx, -0x44(%rbp) movl $0x0, -0x64(%rbp) movl $0x0, -0x48(%rbp) movq -0x50(%rbp), %rax cmpq -0x60(%rbp), %rax je 0x7aaec movq -0x50(%rbp), %rax movb (%rax), %al movb %al, -0x65(%rbp) movzbl -0x65(%rbp), %eax cmpl $0x30, %eax jl 0x7aa50 movzbl -0x65(%rbp), %eax cmpl $0x39, %eax jg 0x7aa50 movzbl -0x65(%rbp), %eax subl $0x30, %eax movb %al, -0x65(%rbp) jmp 0x7aa98 movzbl -0x65(%rbp), %eax cmpl $0x41, %eax jl 0x7aa71 movzbl -0x65(%rbp), %eax cmpl $0x5a, %eax jg 0x7aa71 movzbl -0x65(%rbp), %eax subl $0x41, %eax addl $0xa, %eax movb %al, -0x65(%rbp) jmp 0x7aa96 movzbl -0x65(%rbp), %eax cmpl $0x61, %eax jl 0x7aa92 movzbl -0x65(%rbp), %eax cmpl $0x7a, %eax jg 0x7aa92 movzbl -0x65(%rbp), %eax subl $0x61, %eax addl $0xa, %eax movb %al, -0x65(%rbp) jmp 0x7aa94 jmp 0x7aaec jmp 0x7aa96 jmp 0x7aa98 movzbl -0x65(%rbp), %eax cmpl -0x24(%rbp), %eax jl 0x7aaa3 jmp 0x7aaec movl -0x48(%rbp), %eax cmpl -0x40(%rbp), %eax ja 0x7aabc movl -0x48(%rbp), %eax cmpl -0x40(%rbp), %eax jne 0x7aac5 movzbl -0x65(%rbp), %eax cmpl -0x44(%rbp), %eax jbe 0x7aac5 movl $0x1, -0x64(%rbp) jmp 0x7aad9 movl -0x24(%rbp), %eax imull -0x48(%rbp), %eax movl %eax, -0x48(%rbp) movzbl -0x65(%rbp), %eax addl -0x48(%rbp), %eax movl %eax, -0x48(%rbp) jmp 0x7aadb movq -0x50(%rbp), %rax addq $0x1, %rax movq %rax, -0x50(%rbp) jmp 0x7aa1b movq -0x50(%rbp), %rax cmpq -0x58(%rbp), %rax jne 0x7aaf8 jmp 0x7ab4c cmpq $0x0, -0x30(%rbp) je 0x7ab0a movq -0x50(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) cmpl $0x0, -0x64(%rbp) je 0x7ab25 movq -0x38(%rbp), %rax movl $0x22, (%rax) movl $0xffffffff, %eax # imm = 0xFFFFFFFF movq %rax, -0x8(%rbp) jmp 0x7ab70 cmpl $0x0, -0x3c(%rbp) je 0x7ab3b movl -0x48(%rbp), %eax movl %eax, %ecx xorl %eax, %eax subq %rcx, %rax movq %rax, -0x70(%rbp) jmp 0x7ab42 movl -0x48(%rbp), %eax movq %rax, -0x70(%rbp) movq -0x70(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x7ab70 movq -0x38(%rbp), %rax movl $0x21, (%rax) cmpq $0x0, -0x30(%rbp) je 0x7ab68 movq -0x18(%rbp), %rcx movq -0x30(%rbp), %rax movq %rcx, (%rax) movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax popq %rbp retq nopw %cs:(%rax,%rax)
my_strntoul_8bit: push rbp mov rbp, rsp 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_38] mov dword ptr [rax], 0 mov rax, [rbp+var_18] mov [rbp+var_50], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] mov [rbp+var_60], rax loc_7A949: mov rcx, [rbp+var_50] xor eax, eax cmp rcx, [rbp+var_60] mov [rbp+var_66], al jnb short loc_7A978 mov rax, [rbp+var_10] mov rax, [rax+40h] mov rcx, [rbp+var_50] movzx ecx, byte ptr [rcx] movzx eax, byte ptr [rax+rcx+1] and eax, 8 cmp eax, 0 setnz al mov [rbp+var_66], al loc_7A978: mov al, [rbp+var_66] test al, 1 jnz short loc_7A981 jmp short loc_7A991 loc_7A981: jmp short $+2 loc_7A983: mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp short loc_7A949 loc_7A991: mov rax, [rbp+var_50] cmp rax, [rbp+var_60] jnz short loc_7A9A0 jmp loc_7AB4C loc_7A9A0: mov rax, [rbp+var_50] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' jnz short loc_7A9C1 mov [rbp+var_3C], 1 mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp short loc_7A9EB loc_7A9C1: mov rax, [rbp+var_50] movsx eax, byte ptr [rax] cmp eax, 2Bh ; '+' jnz short loc_7A9E2 mov [rbp+var_3C], 0 mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp short loc_7A9E9 loc_7A9E2: mov [rbp+var_3C], 0 loc_7A9E9: jmp short $+2 loc_7A9EB: mov rax, [rbp+var_50] mov [rbp+var_58], rax mov eax, 0FFFFFFFFh xor edx, edx div [rbp+var_24] mov [rbp+var_40], eax mov eax, 0FFFFFFFFh xor edx, edx div [rbp+var_24] mov [rbp+var_44], edx mov [rbp+var_64], 0 mov [rbp+var_48], 0 loc_7AA1B: mov rax, [rbp+var_50] cmp rax, [rbp+var_60] jz loc_7AAEC mov rax, [rbp+var_50] mov al, [rax] mov [rbp+var_65], al movzx eax, [rbp+var_65] cmp eax, 30h ; '0' jl short loc_7AA50 movzx eax, [rbp+var_65] cmp eax, 39h ; '9' jg short loc_7AA50 movzx eax, [rbp+var_65] sub eax, 30h ; '0' mov [rbp+var_65], al jmp short loc_7AA98 loc_7AA50: movzx eax, [rbp+var_65] cmp eax, 41h ; 'A' jl short loc_7AA71 movzx eax, [rbp+var_65] cmp eax, 5Ah ; 'Z' jg short loc_7AA71 movzx eax, [rbp+var_65] sub eax, 41h ; 'A' add eax, 0Ah mov [rbp+var_65], al jmp short loc_7AA96 loc_7AA71: movzx eax, [rbp+var_65] cmp eax, 61h ; 'a' jl short loc_7AA92 movzx eax, [rbp+var_65] cmp eax, 7Ah ; 'z' jg short loc_7AA92 movzx eax, [rbp+var_65] sub eax, 61h ; 'a' add eax, 0Ah mov [rbp+var_65], al jmp short loc_7AA94 loc_7AA92: jmp short loc_7AAEC loc_7AA94: jmp short $+2 loc_7AA96: jmp short $+2 loc_7AA98: movzx eax, [rbp+var_65] cmp eax, [rbp+var_24] jl short loc_7AAA3 jmp short loc_7AAEC loc_7AAA3: mov eax, [rbp+var_48] cmp eax, [rbp+var_40] ja short loc_7AABC mov eax, [rbp+var_48] cmp eax, [rbp+var_40] jnz short loc_7AAC5 movzx eax, [rbp+var_65] cmp eax, [rbp+var_44] jbe short loc_7AAC5 loc_7AABC: mov [rbp+var_64], 1 jmp short loc_7AAD9 loc_7AAC5: mov eax, [rbp+var_24] imul eax, [rbp+var_48] mov [rbp+var_48], eax movzx eax, [rbp+var_65] add eax, [rbp+var_48] mov [rbp+var_48], eax loc_7AAD9: jmp short $+2 loc_7AADB: mov rax, [rbp+var_50] add rax, 1 mov [rbp+var_50], rax jmp loc_7AA1B loc_7AAEC: mov rax, [rbp+var_50] cmp rax, [rbp+var_58] jnz short loc_7AAF8 jmp short loc_7AB4C loc_7AAF8: cmp [rbp+var_30], 0 jz short loc_7AB0A mov rcx, [rbp+var_50] mov rax, [rbp+var_30] mov [rax], rcx loc_7AB0A: cmp [rbp+var_64], 0 jz short loc_7AB25 mov rax, [rbp+var_38] mov dword ptr [rax], 22h ; '"' mov eax, 0FFFFFFFFh mov [rbp+var_8], rax jmp short loc_7AB70 loc_7AB25: cmp [rbp+var_3C], 0 jz short loc_7AB3B mov eax, [rbp+var_48] mov ecx, eax xor eax, eax sub rax, rcx mov [rbp+var_70], rax jmp short loc_7AB42 loc_7AB3B: mov eax, [rbp+var_48] mov [rbp+var_70], rax loc_7AB42: mov rax, [rbp+var_70] mov [rbp+var_8], rax jmp short loc_7AB70 loc_7AB4C: mov rax, [rbp+var_38] mov dword ptr [rax], 21h ; '!' cmp [rbp+var_30], 0 jz short loc_7AB68 mov rcx, [rbp+var_18] mov rax, [rbp+var_30] mov [rax], rcx loc_7AB68: mov [rbp+var_8], 0 loc_7AB70: mov rax, [rbp+var_8] pop rbp retn
long long my_strntoul_8bit(long long a1, _BYTE *a2, long long a3, int a4, _QWORD *a5, _DWORD *a6) { bool v8; // [rsp+Ah] [rbp-66h] unsigned __int8 v9; // [rsp+Bh] [rbp-65h] unsigned __int8 v10; // [rsp+Bh] [rbp-65h] int v11; // [rsp+Ch] [rbp-64h] _BYTE *v12; // [rsp+10h] [rbp-60h] _BYTE *v13; // [rsp+18h] [rbp-58h] _BYTE *v14; // [rsp+20h] [rbp-50h] unsigned int v15; // [rsp+28h] [rbp-48h] unsigned long long v16; // [rsp+2Ch] [rbp-44h] int v17; // [rsp+34h] [rbp-3Ch] *a6 = 0; v14 = a2; v12 = &a2[a3]; while ( 1 ) { v8 = 0; if ( v14 < v12 ) v8 = (*(_BYTE *)(*(_QWORD *)(a1 + 64) + (unsigned __int8)*v14 + 1LL) & 8) != 0; if ( !v8 ) break; ++v14; } if ( v14 == v12 ) goto LABEL_37; if ( *v14 == 45 ) { v17 = 1; ++v14; } else { v17 = 0; if ( *v14 == 43 ) ++v14; } v13 = v14; v11 = 0; v15 = 0; while ( v14 != v12 ) { v9 = *v14; if ( (unsigned __int8)*v14 < 0x30u || v9 > 0x39u ) { if ( v9 < 0x41u || v9 > 0x5Au ) { if ( v9 < 0x61u || v9 > 0x7Au ) break; v10 = v9 - 97 + 10; } else { v10 = v9 - 65 + 10; } } else { v10 = v9 - 48; } if ( v10 >= a4 ) break; LODWORD(v16) = 0xFFFFFFFF % a4; HIDWORD(v16) = 0xFFFFFFFF / a4; if ( __PAIR64__(v15, v10) <= v16 ) v15 = v15 * a4 + v10; else v11 = 1; ++v14; } if ( v14 == v13 ) { LABEL_37: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v14; if ( v11 ) { *a6 = 34; return 0xFFFFFFFFLL; } else if ( v17 ) { return -(long long)v15; } else { return v15; } } }
my_strntoul_8bit: PUSH RBP MOV RBP,RSP 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 + -0x38] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x60],RAX LAB_0017a949: MOV RCX,qword ptr [RBP + -0x50] XOR EAX,EAX CMP RCX,qword ptr [RBP + -0x60] MOV byte ptr [RBP + -0x66],AL JNC 0x0017a978 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x40] MOV RCX,qword ptr [RBP + -0x50] MOVZX ECX,byte ptr [RCX] MOVZX EAX,byte ptr [RAX + RCX*0x1 + 0x1] AND EAX,0x8 CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x66],AL LAB_0017a978: MOV AL,byte ptr [RBP + -0x66] TEST AL,0x1 JNZ 0x0017a981 JMP 0x0017a991 LAB_0017a981: JMP 0x0017a983 LAB_0017a983: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x0017a949 LAB_0017a991: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x60] JNZ 0x0017a9a0 JMP 0x0017ab4c LAB_0017a9a0: MOV RAX,qword ptr [RBP + -0x50] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d JNZ 0x0017a9c1 MOV dword ptr [RBP + -0x3c],0x1 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x0017a9eb LAB_0017a9c1: MOV RAX,qword ptr [RBP + -0x50] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2b JNZ 0x0017a9e2 MOV dword ptr [RBP + -0x3c],0x0 MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x0017a9e9 LAB_0017a9e2: MOV dword ptr [RBP + -0x3c],0x0 LAB_0017a9e9: JMP 0x0017a9eb LAB_0017a9eb: MOV RAX,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x58],RAX MOV EAX,0xffffffff XOR EDX,EDX DIV dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x40],EAX MOV EAX,0xffffffff XOR EDX,EDX DIV dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x44],EDX MOV dword ptr [RBP + -0x64],0x0 MOV dword ptr [RBP + -0x48],0x0 LAB_0017aa1b: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x60] JZ 0x0017aaec MOV RAX,qword ptr [RBP + -0x50] MOV AL,byte ptr [RAX] MOV byte ptr [RBP + -0x65],AL MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,0x30 JL 0x0017aa50 MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,0x39 JG 0x0017aa50 MOVZX EAX,byte ptr [RBP + -0x65] SUB EAX,0x30 MOV byte ptr [RBP + -0x65],AL JMP 0x0017aa98 LAB_0017aa50: MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,0x41 JL 0x0017aa71 MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,0x5a JG 0x0017aa71 MOVZX EAX,byte ptr [RBP + -0x65] SUB EAX,0x41 ADD EAX,0xa MOV byte ptr [RBP + -0x65],AL JMP 0x0017aa96 LAB_0017aa71: MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,0x61 JL 0x0017aa92 MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,0x7a JG 0x0017aa92 MOVZX EAX,byte ptr [RBP + -0x65] SUB EAX,0x61 ADD EAX,0xa MOV byte ptr [RBP + -0x65],AL JMP 0x0017aa94 LAB_0017aa92: JMP 0x0017aaec LAB_0017aa94: JMP 0x0017aa96 LAB_0017aa96: JMP 0x0017aa98 LAB_0017aa98: MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,dword ptr [RBP + -0x24] JL 0x0017aaa3 JMP 0x0017aaec LAB_0017aaa3: MOV EAX,dword ptr [RBP + -0x48] CMP EAX,dword ptr [RBP + -0x40] JA 0x0017aabc MOV EAX,dword ptr [RBP + -0x48] CMP EAX,dword ptr [RBP + -0x40] JNZ 0x0017aac5 MOVZX EAX,byte ptr [RBP + -0x65] CMP EAX,dword ptr [RBP + -0x44] JBE 0x0017aac5 LAB_0017aabc: MOV dword ptr [RBP + -0x64],0x1 JMP 0x0017aad9 LAB_0017aac5: MOV EAX,dword ptr [RBP + -0x24] IMUL EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x48],EAX MOVZX EAX,byte ptr [RBP + -0x65] ADD EAX,dword ptr [RBP + -0x48] MOV dword ptr [RBP + -0x48],EAX LAB_0017aad9: JMP 0x0017aadb LAB_0017aadb: MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX JMP 0x0017aa1b LAB_0017aaec: MOV RAX,qword ptr [RBP + -0x50] CMP RAX,qword ptr [RBP + -0x58] JNZ 0x0017aaf8 JMP 0x0017ab4c LAB_0017aaf8: CMP qword ptr [RBP + -0x30],0x0 JZ 0x0017ab0a MOV RCX,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_0017ab0a: CMP dword ptr [RBP + -0x64],0x0 JZ 0x0017ab25 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x22 MOV EAX,0xffffffff MOV qword ptr [RBP + -0x8],RAX JMP 0x0017ab70 LAB_0017ab25: CMP dword ptr [RBP + -0x3c],0x0 JZ 0x0017ab3b MOV EAX,dword ptr [RBP + -0x48] MOV ECX,EAX XOR EAX,EAX SUB RAX,RCX MOV qword ptr [RBP + -0x70],RAX JMP 0x0017ab42 LAB_0017ab3b: MOV EAX,dword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x70],RAX LAB_0017ab42: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x8],RAX JMP 0x0017ab70 LAB_0017ab4c: MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x21 CMP qword ptr [RBP + -0x30],0x0 JZ 0x0017ab68 MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX],RCX LAB_0017ab68: MOV qword ptr [RBP + -0x8],0x0 LAB_0017ab70: MOV RAX,qword ptr [RBP + -0x8] POP RBP RET
ulong my_strntoul_8bit(long param_1,byte *param_2,long param_3,uint param_4,int8 *param_5, int4 *param_6) { bool bVar1; byte *pbVar2; uint uVar3; byte *pbVar4; bool bVar5; ulong local_78; byte local_6d; byte *local_58; uint local_50; *param_6 = 0; pbVar4 = param_2 + param_3; local_58 = param_2; while( true ) { bVar5 = false; if (local_58 < pbVar4) { bVar5 = (*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*local_58) & 8) != 0; } if (!bVar5) break; local_58 = local_58 + 1; } if (local_58 != pbVar4) { if (*local_58 == 0x2d) { bVar5 = true; local_58 = local_58 + 1; } else { if (*local_58 == 0x2b) { local_58 = local_58 + 1; } bVar5 = false; } pbVar2 = local_58; uVar3 = (uint)(0xffffffff / (ulong)param_4); bVar1 = false; local_50 = 0; for (; local_58 != pbVar4; local_58 = local_58 + 1) { local_6d = *local_58; if ((local_6d < 0x30) || (0x39 < local_6d)) { if ((local_6d < 0x41) || (0x5a < local_6d)) { if ((local_6d < 0x61) || (0x7a < local_6d)) break; local_6d = local_6d + 0xa9; } else { local_6d = local_6d - 0x37; } } else { local_6d = local_6d - 0x30; } if ((int)param_4 <= (int)(uint)local_6d) break; if ((uVar3 < local_50) || ((local_50 == uVar3 && ((uint)(0xffffffff % (ulong)param_4) < (uint)local_6d)))) { bVar1 = true; } else { local_50 = (uint)local_6d + param_4 * local_50; } } if (local_58 != pbVar2) { if (param_5 != (int8 *)0x0) { *param_5 = local_58; } if (bVar1) { *param_6 = 0x22; return 0xffffffff; } if (bVar5) { local_78 = -(ulong)local_50; } else { local_78 = (ulong)local_50; } return local_78; } } *param_6 = 0x21; if (param_5 != (int8 *)0x0) { *param_5 = param_2; } return 0; }
13,462
my_strntoul_8bit
eloqsql/strings/ctype-simple.c
ulong my_strntoul_8bit(CHARSET_INFO *cs, const char *nptr, size_t l, int base, char **endptr, int *err) { int negative; register uint32 cutoff; register uint cutlim; register uint32 i; register const char *s; const char *save, *e; int overflow; *err= 0; /* Initialize error indicator */ s = nptr; e = nptr+l; for( ; s<e && my_isspace(cs, *s); s++); if (s==e) { goto noconv; } if (*s == '-') { negative = 1; ++s; } else if (*s == '+') { negative = 0; ++s; } else negative = 0; save = s; cutoff = ((uint32)~0L) / (uint32) base; cutlim = (uint) (((uint32)~0L) % (uint32) base); overflow = 0; i = 0; for ( ; s != e; ++s) { register uchar c= *s; if (c>='0' && c<='9') c -= '0'; else if (c>='A' && c<='Z') c = c - 'A' + 10; else if (c>='a' && c<='z') c = c - 'a' + 10; else break; if (c >= base) break; if (i > cutoff || (i == cutoff && c > cutlim)) overflow = 1; else { i *= (uint32) base; i += c; } } if (s == save) goto noconv; if (endptr != NULL) *endptr = (char *) s; if (overflow) { err[0]= ERANGE; return (~(uint32) 0); } return (negative ? -((long) i) : (long) i); noconv: err[0]= EDOM; if (endptr != NULL) *endptr = (char *) nptr; return 0L; }
O3
c
my_strntoul_8bit: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl $0x0, (%r9) leaq (%rsi,%rdx), %r11 movq %rsi, %r10 testq %rdx, %rdx jle 0x5a01c movq 0x40(%rdi), %rax movq %rsi, %r10 movzbl (%r10), %edx testb $0x8, 0x1(%rax,%rdx) je 0x5a01c incq %r10 cmpq %r11, %r10 jb 0x5a009 cmpq %r11, %r10 je 0x5a0fa movb (%r10), %dil leal -0x2b(%rdi), %eax andb $-0x3, %al cmpb $0x1, %al adcq $0x0, %r10 movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %edx, %edx divl %ecx xorl %r15d, %r15d cmpq %r11, %r10 je 0x5a0d7 movq %rdi, -0x30(%rbp) movq %r10, %rbx xorl %r13d, %r13d movl %r13d, %r14d movl %r15d, %r12d movb (%rbx), %r15b leal -0x30(%r15), %edi cmpb $0xa, %dil jb 0x5a086 leal -0x41(%r15), %edi cmpb $0x19, %dil ja 0x5a075 addb $-0x37, %r15b jmp 0x5a083 leal -0x61(%r15), %edi cmpb $0x19, %dil ja 0x5a0c5 addb $-0x57, %r15b movl %r15d, %edi movzbl %dil, %edi cmpl %ecx, %edi jge 0x5a0c5 movl $0x1, %r15d cmpl %eax, %r14d jbe 0x5a09e movl %r14d, %r13d jmp 0x5a0b4 jne 0x5a0a7 movl %eax, %r13d cmpl %edi, %edx jb 0x5a0b4 imull %ecx, %r14d addl %edi, %r14d movl %r14d, %r13d movl %r12d, %r15d incq %rbx cmpq %r11, %rbx jne 0x5a052 movl %r13d, %r14d movq %r11, %rbx movl %r15d, %r12d testl %r12d, %r12d sete %al movl %r14d, %r15d movq %rbx, %r11 movq -0x30(%rbp), %rdi jmp 0x5a0d9 movb $0x1, %al cmpq %r10, %r11 je 0x5a0fa testq %r8, %r8 je 0x5a0e6 movq %r11, (%r8) testb %al, %al je 0x5a10d movq %r15, %rax negq %rax cmpb $0x2d, %dil cmovneq %r15, %rax jmp 0x5a119 movl $0x21, (%r9) testq %r8, %r8 je 0x5a109 movq %rsi, (%r8) xorl %eax, %eax jmp 0x5a119 movl $0x22, (%r9) movl $0xffffffff, %eax # imm = 0xFFFFFFFF popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strntoul_8bit: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx mov dword ptr [r9], 0 lea r11, [rsi+rdx] mov r10, rsi test rdx, rdx jle short loc_5A01C mov rax, [rdi+40h] mov r10, rsi loc_5A009: movzx edx, byte ptr [r10] test byte ptr [rax+rdx+1], 8 jz short loc_5A01C inc r10 cmp r10, r11 jb short loc_5A009 loc_5A01C: cmp r10, r11 jz loc_5A0FA mov dil, [r10] lea eax, [rdi-2Bh] and al, 0FDh cmp al, 1 adc r10, 0 mov eax, 0FFFFFFFFh xor edx, edx div ecx xor r15d, r15d cmp r10, r11 jz loc_5A0D7 mov [rbp+var_30], rdi mov rbx, r10 xor r13d, r13d loc_5A052: mov r14d, r13d mov r12d, r15d mov r15b, [rbx] lea edi, [r15-30h] cmp dil, 0Ah jb short loc_5A086 lea edi, [r15-41h] cmp dil, 19h ja short loc_5A075 add r15b, 0C9h jmp short loc_5A083 loc_5A075: lea edi, [r15-61h] cmp dil, 19h ja short loc_5A0C5 add r15b, 0A9h loc_5A083: mov edi, r15d loc_5A086: movzx edi, dil cmp edi, ecx jge short loc_5A0C5 mov r15d, 1 cmp r14d, eax jbe short loc_5A09E mov r13d, r14d jmp short loc_5A0B4 loc_5A09E: jnz short loc_5A0A7 mov r13d, eax cmp edx, edi jb short loc_5A0B4 loc_5A0A7: imul r14d, ecx add r14d, edi mov r13d, r14d mov r15d, r12d loc_5A0B4: inc rbx cmp rbx, r11 jnz short loc_5A052 mov r14d, r13d mov rbx, r11 mov r12d, r15d loc_5A0C5: test r12d, r12d setz al mov r15d, r14d mov r11, rbx mov rdi, [rbp+var_30] jmp short loc_5A0D9 loc_5A0D7: mov al, 1 loc_5A0D9: cmp r11, r10 jz short loc_5A0FA test r8, r8 jz short loc_5A0E6 mov [r8], r11 loc_5A0E6: test al, al jz short loc_5A10D mov rax, r15 neg rax cmp dil, 2Dh ; '-' cmovnz rax, r15 jmp short loc_5A119 loc_5A0FA: mov dword ptr [r9], 21h ; '!' test r8, r8 jz short loc_5A109 mov [r8], rsi loc_5A109: xor eax, eax jmp short loc_5A119 loc_5A10D: mov dword ptr [r9], 22h ; '"' mov eax, 0FFFFFFFFh loc_5A119: pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strntoul_8bit( long long a1, unsigned __int8 *a2, long long a3, unsigned int a4, unsigned __int8 **a5, _DWORD *a6) { unsigned __int8 *v6; // r11 unsigned __int8 *v7; // r10 unsigned __int8 v8; // di unsigned __int8 *v9; // r10 unsigned int v10; // eax long long v11; // r15 unsigned __int8 *v12; // rbx unsigned int v13; // r13d unsigned int v14; // r14d int v15; // r12d unsigned __int8 v16; // r15 unsigned __int8 v17; // di unsigned __int8 v18; // r15 bool v19; // al long long result; // rax unsigned __int8 v21; // [rsp+0h] [rbp-30h] *a6 = 0; v6 = &a2[a3]; v7 = a2; if ( a3 > 0 ) { v7 = a2; do { if ( (*(_BYTE *)(*(_QWORD *)(a1 + 64) + *v7 + 1LL) & 8) == 0 ) break; ++v7; } while ( v7 < v6 ); } if ( v7 == v6 ) goto LABEL_30; v8 = *v7; v9 = &v7[((*v7 - 43) & 0xFD) == 0]; v10 = 0xFFFFFFFF / a4; v11 = 0LL; if ( v9 == v6 ) { v19 = 1; } else { v21 = v8; v12 = v9; v13 = 0; while ( 1 ) { v14 = v13; v15 = v11; v16 = *v12; v17 = *v12 - 48; if ( v17 >= 0xAu ) { if ( (unsigned __int8)(v16 - 65) > 0x19u ) { if ( (unsigned __int8)(v16 - 97) > 0x19u ) break; v18 = v16 - 87; } else { v18 = v16 - 55; } v17 = v18; } if ( v17 >= (int)a4 ) break; LODWORD(v11) = 1; if ( v13 <= v10 ) { if ( v13 != v10 || (v13 = 0xFFFFFFFF / a4, 0xFFFFFFFF % a4 >= v17) ) { v13 = v17 + a4 * v14; LODWORD(v11) = v15; } } if ( ++v12 == v6 ) { v14 = v13; v12 = &a2[a3]; v15 = v11; break; } } v19 = v15 == 0; v11 = v14; v6 = v12; v8 = v21; } if ( v6 == v9 ) { LABEL_30: *a6 = 33; if ( a5 ) *a5 = a2; return 0LL; } else { if ( a5 ) *a5 = v6; if ( v19 ) { result = -v11; if ( v8 != 45 ) return v11; } else { *a6 = 34; return 0xFFFFFFFFLL; } } return result; }
my_strntoul_8bit: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV dword ptr [R9],0x0 LEA R11,[RSI + RDX*0x1] MOV R10,RSI TEST RDX,RDX JLE 0x0015a01c MOV RAX,qword ptr [RDI + 0x40] MOV R10,RSI LAB_0015a009: MOVZX EDX,byte ptr [R10] TEST byte ptr [RAX + RDX*0x1 + 0x1],0x8 JZ 0x0015a01c INC R10 CMP R10,R11 JC 0x0015a009 LAB_0015a01c: CMP R10,R11 JZ 0x0015a0fa MOV DIL,byte ptr [R10] LEA EAX,[RDI + -0x2b] AND AL,0xfd CMP AL,0x1 ADC R10,0x0 MOV EAX,0xffffffff XOR EDX,EDX DIV ECX XOR R15D,R15D CMP R10,R11 JZ 0x0015a0d7 MOV qword ptr [RBP + -0x30],RDI MOV RBX,R10 XOR R13D,R13D LAB_0015a052: MOV R14D,R13D MOV R12D,R15D MOV R15B,byte ptr [RBX] LEA EDI,[R15 + -0x30] CMP DIL,0xa JC 0x0015a086 LEA EDI,[R15 + -0x41] CMP DIL,0x19 JA 0x0015a075 ADD R15B,0xc9 JMP 0x0015a083 LAB_0015a075: LEA EDI,[R15 + -0x61] CMP DIL,0x19 JA 0x0015a0c5 ADD R15B,0xa9 LAB_0015a083: MOV EDI,R15D LAB_0015a086: MOVZX EDI,DIL CMP EDI,ECX JGE 0x0015a0c5 MOV R15D,0x1 CMP R14D,EAX JBE 0x0015a09e MOV R13D,R14D JMP 0x0015a0b4 LAB_0015a09e: JNZ 0x0015a0a7 MOV R13D,EAX CMP EDX,EDI JC 0x0015a0b4 LAB_0015a0a7: IMUL R14D,ECX ADD R14D,EDI MOV R13D,R14D MOV R15D,R12D LAB_0015a0b4: INC RBX CMP RBX,R11 JNZ 0x0015a052 MOV R14D,R13D MOV RBX,R11 MOV R12D,R15D LAB_0015a0c5: TEST R12D,R12D SETZ AL MOV R15D,R14D MOV R11,RBX MOV RDI,qword ptr [RBP + -0x30] JMP 0x0015a0d9 LAB_0015a0d7: MOV AL,0x1 LAB_0015a0d9: CMP R11,R10 JZ 0x0015a0fa TEST R8,R8 JZ 0x0015a0e6 MOV qword ptr [R8],R11 LAB_0015a0e6: TEST AL,AL JZ 0x0015a10d MOV RAX,R15 NEG RAX CMP DIL,0x2d CMOVNZ RAX,R15 JMP 0x0015a119 LAB_0015a0fa: MOV dword ptr [R9],0x21 TEST R8,R8 JZ 0x0015a109 MOV qword ptr [R8],RSI LAB_0015a109: XOR EAX,EAX JMP 0x0015a119 LAB_0015a10d: MOV dword ptr [R9],0x22 MOV EAX,0xffffffff LAB_0015a119: POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong my_strntoul_8bit(long param_1,byte *param_2,long param_3,uint param_4,ulong *param_5, int4 *param_6) { byte bVar1; byte bVar2; uint uVar3; uint uVar4; byte *pbVar5; byte *pbVar6; byte *pbVar7; int iVar8; uint uVar9; byte bVar10; ulong uVar11; ulong uVar12; bool bVar13; *param_6 = 0; pbVar7 = param_2 + param_3; pbVar6 = param_2; if (0 < param_3) { do { if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + (ulong)*pbVar6) & 8) == 0) break; pbVar6 = pbVar6 + 1; } while (pbVar6 < pbVar7); } if (pbVar6 != pbVar7) { bVar1 = *pbVar6; pbVar6 = pbVar6 + ((bVar1 - 0x2b & 0xfd) == 0); uVar11 = 0; if (pbVar6 == pbVar7) { bVar13 = true; } else { uVar9 = 0; pbVar5 = pbVar6; do { iVar8 = (int)uVar11; bVar2 = *pbVar5; bVar10 = bVar2 - 0x30; if (9 < bVar10) { if ((byte)(bVar2 + 0xbf) < 0x1a) { bVar10 = bVar2 - 0x37; } else { if (0x19 < (byte)(bVar2 + 0x9f)) goto LAB_0015a0c5; bVar10 = bVar2 + 0xa9; } } if ((int)param_4 <= (int)(uint)bVar10) goto LAB_0015a0c5; uVar12 = 1; uVar4 = (uint)(0xffffffff / (ulong)param_4); uVar3 = uVar9; if ((uVar9 <= uVar4) && ((uVar9 != uVar4 || (uVar3 = uVar4, (uint)bVar10 <= (uint)(0xffffffff % (ulong)param_4))) )) { uVar12 = uVar11; uVar3 = uVar9 * param_4 + (uint)bVar10; } uVar9 = uVar3; pbVar5 = pbVar5 + 1; uVar11 = uVar12; } while (pbVar5 != pbVar7); iVar8 = (int)uVar12; pbVar5 = pbVar7; LAB_0015a0c5: bVar13 = iVar8 == 0; uVar11 = (ulong)uVar9; pbVar7 = pbVar5; } if (pbVar7 != pbVar6) { if (param_5 != (ulong *)0x0) { *param_5 = (ulong)pbVar7; } if (bVar13) { if (bVar1 == 0x2d) { return -uVar11; } return uVar11; } *param_6 = 0x22; return 0xffffffff; } } *param_6 = 0x21; if (param_5 != (ulong *)0x0) { *param_5 = (ulong)param_2; } return 0; }
13,463
get_charset_by_csname
eloqsql/mysys/charset.c
CHARSET_INFO * get_charset_by_csname(const char *cs_name, uint cs_flags, myf flags) { MY_CHARSET_LOADER loader; my_charset_loader_init_mysys(&loader); return my_charset_get_by_name(&loader, cs_name, cs_flags, flags); }
O3
c
get_charset_by_csname: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdx, %rcx movl %esi, %edx movq %rdi, %rsi movq %fs:0x28, %rax movq %rax, -0x8(%rbp) leaq -0xb8(%rbp), %rdi movb $0x0, (%rdi) leaq -0x1249(%rip), %rax # 0x2de66 movq %rax, 0x80(%rdi) leaq -0x1248(%rip), %rax # 0x2de75 movq %rax, 0x88(%rdi) leaq -0x123b(%rip), %rax # 0x2de90 movq %rax, 0x90(%rdi) leaq -0x532f(%rip), %rax # 0x29daa movq %rax, 0x98(%rdi) leaq 0x2c77c9(%rip), %rax # 0x2f68b0 movq (%rax), %rax movq %rax, 0xa0(%rdi) leaq -0x124a(%rip), %rax # 0x2deae movq %rax, 0xa8(%rdi) callq 0x2efa8 movq %fs:0x28, %rcx cmpq -0x8(%rbp), %rcx jne 0x2f11c addq $0xc0, %rsp popq %rbp retq callq 0x24300
get_charset_by_csname: push rbp mov rbp, rsp sub rsp, 0C0h mov rcx, rdx mov edx, esi mov rsi, rdi mov rax, fs:28h mov [rbp+var_8], rax lea rdi, [rbp+var_B8] mov byte ptr [rdi], 0 lea rax, my_once_alloc_c mov [rdi+80h], rax lea rax, my_malloc_c mov [rdi+88h], rax lea rax, my_realloc_c mov [rdi+90h], rax lea rax, my_free mov [rdi+98h], rax lea rax, my_charset_error_reporter mov rax, [rax] mov [rdi+0A0h], rax lea rax, add_collation mov [rdi+0A8h], rax call my_charset_get_by_name mov rcx, fs:28h cmp rcx, [rbp+var_8] jnz short loc_2F11C add rsp, 0C0h pop rbp retn loc_2F11C: call ___stack_chk_fail
long long get_charset_by_csname(long long a1, unsigned int a2, long long a3) { _BYTE v4[128]; // [rsp+8h] [rbp-B8h] BYREF long long ( *v5)(long long); // [rsp+88h] [rbp-38h] long long ( *v6)(unsigned long long); // [rsp+90h] [rbp-30h] long long ( *v7)(long long, unsigned long long); // [rsp+98h] [rbp-28h] long long ( *v8)(long long); // [rsp+A0h] [rbp-20h] long long ( *v9)(); // [rsp+A8h] [rbp-18h] long long ( *v10)(unsigned int *); // [rsp+B0h] [rbp-10h] unsigned long long v11; // [rsp+B8h] [rbp-8h] v11 = __readfsqword(0x28u); v4[0] = 0; v5 = my_once_alloc_c; v6 = my_malloc_c; v7 = my_realloc_c; v8 = my_free; v9 = my_charset_error_reporter; v10 = add_collation; return my_charset_get_by_name((long long)v4, a1, a2, a3); }
get_charset_by_csname: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV RCX,RDX MOV EDX,ESI MOV RSI,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX LEA RDI,[RBP + -0xb8] MOV byte ptr [RDI],0x0 LEA RAX,[0x12de66] MOV qword ptr [RDI + 0x80],RAX LEA RAX,[0x12de75] MOV qword ptr [RDI + 0x88],RAX LEA RAX,[0x12de90] MOV qword ptr [RDI + 0x90],RAX LEA RAX,[0x129daa] MOV qword ptr [RDI + 0x98],RAX LEA RAX,[0x3f68b0] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa0],RAX LEA RAX,[0x12deae] MOV qword ptr [RDI + 0xa8],RAX CALL 0x0012efa8 MOV RCX,qword ptr FS:[0x28] CMP RCX,qword ptr [RBP + -0x8] JNZ 0x0012f11c ADD RSP,0xc0 POP RBP RET LAB_0012f11c: CALL 0x00124300
void get_charset_by_csname(int8 param_1,int4 param_2,int8 param_3) { long in_FS_OFFSET; int1 local_c0 [128]; code *local_40; code *local_38; code *local_30; code *local_28; int *local_20; code *local_18; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_c0[0] = 0; local_40 = my_once_alloc_c; local_38 = my_malloc_c; local_30 = my_realloc_c; local_28 = my_free; local_20 = my_charset_error_reporter; local_18 = add_collation; my_charset_get_by_name(local_c0,param_1,param_2,param_3); if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,464
ma_apply_redo_insert_row_blobs
eloqsql/storage/maria/ma_blockrec.c
uint _ma_apply_redo_insert_row_blobs(MARIA_HA *info, LSN lsn, const uchar *header, LSN redo_lsn, uint * const number_of_blobs, uint * const number_of_ranges, pgcache_page_no_t * const first_page, pgcache_page_no_t * const last_page) { MARIA_SHARE *share= info->s; const uchar *data; uint data_size= FULL_PAGE_SIZE(share); uint blob_count, ranges; uint16 sid; pgcache_page_no_t first_page2= ULONGLONG_MAX, last_page2= 0; DBUG_ENTER("_ma_apply_redo_insert_row_blobs"); share->state.changed|= (STATE_CHANGED | STATE_NOT_ZEROFILLED | STATE_NOT_MOVABLE); sid= fileid_korr(header); header+= FILEID_STORE_SIZE; *number_of_ranges= ranges= pagerange_korr(header); header+= PAGERANGE_STORE_SIZE; *number_of_blobs= blob_count= pagerange_korr(header); header+= PAGERANGE_STORE_SIZE; DBUG_ASSERT(ranges >= blob_count); data= (header + ranges * ROW_EXTENT_SIZE + blob_count * (SUB_RANGE_SIZE + BLOCK_FILLER_SIZE)); while (blob_count--) { uint sub_ranges, empty_space; sub_ranges= uint2korr(header); header+= SUB_RANGE_SIZE; empty_space= uint2korr(header); header+= BLOCK_FILLER_SIZE; DBUG_ASSERT(sub_ranges <= ranges && empty_space < data_size); ranges-= sub_ranges; while (sub_ranges--) { uint i; uint res; uint page_range; pgcache_page_no_t page; uchar *buff; uint data_on_page= data_size; page= page_korr(header); header+= PAGE_STORE_SIZE; page_range= pagerange_korr(header); header+= PAGERANGE_STORE_SIZE; for (i= page_range; i-- > 0 ; page++, data+= data_on_page) { MARIA_PINNED_PAGE page_link; enum pagecache_page_lock unlock_method; enum pagecache_page_pin unpin_method; set_if_smaller(first_page2, page); set_if_bigger(last_page2, page); if (i == 0 && sub_ranges == 0) data_on_page= data_size - empty_space; /* data on last page */ if (_ma_redo_not_needed_for_page(sid, redo_lsn, page, FALSE)) continue; if (((page + 1) * share->block_size) > share->state.state.data_file_length) { /* New page or half written page at end of file */ DBUG_PRINT("info", ("Enlarging data file from %lu to %lu", (ulong) share->state.state.data_file_length, (ulong) ((page + 1 ) * share->block_size))); share->state.state.data_file_length= (page + 1) * share->block_size; buff= info->keyread_buff; info->keyread_buff_used= 1; make_empty_page(info, buff, BLOB_PAGE, 0); unlock_method= PAGECACHE_LOCK_LEFT_UNLOCKED; unpin_method= PAGECACHE_PIN_LEFT_UNPINNED; } else { share->pagecache->readwrite_flags&= ~MY_WME; share->silence_encryption_errors= 1; buff= pagecache_read(share->pagecache, &info->dfile, page, 0, 0, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE, &page_link.link); share->pagecache->readwrite_flags= share->pagecache-> org_readwrite_flags; share->silence_encryption_errors= 0; if (!buff) { if (my_errno != HA_ERR_FILE_TOO_SHORT && my_errno != HA_ERR_WRONG_CRC && my_errno != HA_ERR_DECRYPTION_FAILED) { /* If not read outside of file */ pagecache_unlock_by_link(share->pagecache, page_link.link, PAGECACHE_LOCK_WRITE_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); goto err; } /* Physical file was too short, create new page. It can be that recovery started with a file with N pages, wrote page N+2 into pagecache (increased data_file_length but not physical file length), now reads page N+1: the read fails. */ buff= pagecache_block_link_to_buffer(page_link.link); make_empty_page(info, buff, BLOB_PAGE, 0); } else { #ifdef DBUG_ASSERT_EXISTS uchar found_page_type= (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK); #endif if (lsn_korr(buff) >= lsn) { /* Already applied */ check_skipped_lsn(info, lsn_korr(buff), 1, page); pagecache_unlock_by_link(share->pagecache, page_link.link, PAGECACHE_LOCK_WRITE_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); goto fix_bitmap; } DBUG_ASSERT((found_page_type == (uchar) BLOB_PAGE) || (found_page_type == (uchar) UNALLOCATED_PAGE)); } unlock_method= PAGECACHE_LOCK_WRITE_UNLOCK; unpin_method= PAGECACHE_UNPIN; } /* Blob pages are never updated twice in same redo-undo chain, so it's safe to update lsn for them here */ lsn_store(buff, lsn); buff[PAGE_TYPE_OFFSET]= BLOB_PAGE; bzero(buff + LSN_SIZE + PAGE_TYPE_SIZE, FULL_PAGE_HEADER_SIZE(share) - (LSN_SIZE + PAGE_TYPE_SIZE)); if (data_on_page != data_size) { /* Last page may be only partly filled. We zero the rest, like write_full_pages() does. */ bzero(buff + share->block_size - PAGE_SUFFIX_SIZE - empty_space, empty_space); } memcpy(buff + FULL_PAGE_HEADER_SIZE(share), data, data_on_page); if (pagecache_write(share->pagecache, &info->dfile, page, 0, buff, PAGECACHE_PLAIN_PAGE, unlock_method, unpin_method, PAGECACHE_WRITE_DELAY, 0, LSN_IMPOSSIBLE)) goto err; fix_bitmap: /** @todo leave bitmap lock to the bitmap code... */ mysql_mutex_lock(&share->bitmap.bitmap_lock); res= _ma_bitmap_set_full_page_bits(info, &share->bitmap, page, 1); mysql_mutex_unlock(&share->bitmap.bitmap_lock); if (res) goto err; } } } *first_page= first_page2; *last_page= last_page2; DBUG_RETURN(0); err: _ma_mark_file_crashed(share); DBUG_ASSERT(!maria_assert_if_crashed_table); DBUG_RETURN(1); }
O3
c
ma_apply_redo_insert_row_blobs: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xc8, %rsp movq %rcx, %rbx movq (%rdi), %r12 movl 0x7bc(%r12), %r10d subl 0xc18(%r12), %r10d orl $0x181, 0x170(%r12) # imm = 0x181 movzwl (%rdx), %eax movzwl 0x2(%rdx), %ecx movl %ecx, (%r9) movzwl 0x4(%rdx), %r9d movl %r9d, (%r8) testl %r9d, %r9d je 0x4ae55 addl $-0xc, %r10d leaq (,%rcx,8), %r8 subq %rcx, %r8 leaq (%rdx,%r8), %rcx addq $0x6, %rcx addq $0x6, %rdx leaq (%rcx,%r9,4), %rcx movq %rcx, -0x78(%rbp) leaq 0x470(%rdi), %rcx movq %rcx, -0x70(%rbp) movq %rsi, %rcx shrq $0x20, %rcx movq %rcx, -0xb0(%rbp) movq %rsi, %rcx shrq $0x28, %rcx movq %rcx, -0xa8(%rbp) movq %rsi, %rcx shrq $0x30, %rcx movq %rcx, -0xa0(%rbp) leaq 0xa10(%r12), %rcx movq %rcx, -0xb8(%rbp) leaq 0xa98(%r12), %rcx movq %rcx, -0x50(%rbp) movq $-0x1, %r8 movzwl %ax, %eax movl %eax, -0x54(%rbp) xorl %r11d, %r11d movq %r12, -0x48(%rbp) movq %rbx, -0xc8(%rbp) movl %r10d, -0x38(%rbp) movq %rdi, -0x40(%rbp) movq %rsi, -0x68(%rbp) movq %r9, -0x80(%rbp) movzwl (%rdx), %esi leaq 0x4(%rdx), %rcx testl %esi, %esi je 0x4ae43 movzwl 0x2(%rdx), %eax movl %r10d, %edx subl %eax, %edx movl %edx, -0x58(%rbp) movq %rax, -0x98(%rbp) negq %rax movq %rax, -0x90(%rbp) decl %esi movzwl 0x5(%rcx), %ebx testl %ebx, %ebx movq %rcx, -0x88(%rbp) je 0x4ae2c movzbl 0x4(%rcx), %eax shlq $0x20, %rax movl (%rcx), %r15d orq %rax, %r15 decl %ebx movl %r10d, -0x34(%rbp) movl %esi, -0x5c(%rbp) cmpq %r15, %r8 cmovaeq %r15, %r8 movq %r8, -0xd8(%rbp) cmpq %r15, %r11 cmovbeq %r15, %r11 movq %r11, -0xd0(%rbp) movl %ebx, %eax orl %esi, %eax movl -0x34(%rbp), %r14d cmovel -0x58(%rbp), %r14d movl -0x54(%rbp), %edi movq -0xc8(%rbp), %rsi movq %r15, %rdx xorl %ecx, %ecx callq 0x72f63 leaq 0x1(%r15), %rcx movl %r14d, -0x34(%rbp) movl %r14d, %r13d testb %al, %al jne 0x4ad94 movl 0x7bc(%r12), %eax movq %rcx, -0xc0(%rbp) imulq %rcx, %rax cmpq 0x40(%r12), %rax jbe 0x4ab30 movq %rax, 0x40(%r12) movq -0x40(%rbp), %rax movq 0x380(%rax), %r12 movb $0x1, 0x685(%rax) movl $0x1, -0x30(%rbp) movl $0x0, -0x2c(%rbp) jmp 0x4ac28 movq 0x600(%r12), %rax movl $0xffffffef, %ecx # imm = 0xFFFFFFEF andq %rcx, 0x198(%rax) movb $0x1, 0x7ec(%r12) movq 0x600(%r12), %rdi movq -0x70(%rbp), %rsi movq %r15, %rdx xorl %ecx, %ecx xorl %r8d, %r8d movl $0x1, %r9d leaq -0xf0(%rbp), %rax pushq %rax pushq $0x4 callq 0x6ebd6 addq $0x10, %rsp movq %r12, %rdx movq %rax, %r12 movq 0x600(%rdx), %rax movq 0x1a0(%rax), %rcx movq %rcx, 0x198(%rax) movb $0x0, 0x7ec(%rdx) testq %r12, %r12 je 0x4abdc movzwl (%r12), %eax shlq $0x20, %rax movzbl 0x2(%r12), %ecx shlq $0x30, %rcx orq %rax, %rcx movl 0x3(%r12), %esi orq %rcx, %rsi movq -0x68(%rbp), %rax cmpq %rax, %rsi jge 0x4adb7 movl $0x3, -0x30(%rbp) movl $0x6, -0x2c(%rbp) jmp 0x4ac50 callq 0xa4ab2 cmpl $0xaf, (%rax) je 0x4ac07 callq 0xa4ab2 cmpl $0xb0, (%rax) je 0x4ac07 callq 0xa4ab2 cmpl $0xc0, (%rax) jne 0x4ae71 movq -0xf0(%rbp), %rdi callq 0x710b9 movq %rax, %r12 movl $0x3, -0x30(%rbp) movl $0x6, -0x2c(%rbp) movq -0x40(%rbp), %rax movq (%rax), %rax movl 0xc18(%rax), %edx addl $0xc, %edx movq %r12, %rdi xorl %esi, %esi callq 0x29270 movw $0x3, 0x7(%r12) movb $-0x1, 0x9(%r12) movq -0x68(%rbp), %rax movq -0xb0(%rbp), %rcx movb %cl, (%r12) movq -0xa8(%rbp), %rcx movb %cl, 0x1(%r12) movq -0xa0(%rbp), %rcx movb %cl, 0x2(%r12) movl %eax, 0x3(%r12) movb $0x3, 0x7(%r12) leaq 0x8(%r12), %rdi movq -0x48(%rbp), %r14 movl 0xc18(%r14), %edx xorl %esi, %esi callq 0x29270 movl -0x34(%rbp), %eax cmpl -0x38(%rbp), %eax je 0x4acc4 movl 0x7bc(%r14), %eax addq %r12, %rax movq -0x90(%rbp), %rcx leaq (%rcx,%rax), %rdi addq $-0x4, %rdi xorl %esi, %esi movq -0x98(%rbp), %rdx callq 0x29270 movl 0xc18(%r14), %edi addl $0x8, %edi addq %r12, %rdi movq -0x78(%rbp), %rsi movq %r13, %rdx callq 0x29080 movq 0x600(%r14), %rdi movl 0x80(%rdi), %eax subq $0x40, %rsp movl %eax, 0x30(%rsp) xorl %eax, %eax movl %eax, 0x28(%rsp) xorps %xmm0, %xmm0 movups %xmm0, 0x18(%rsp) movl %eax, 0x10(%rsp) movl -0x30(%rbp), %eax movl %eax, 0x8(%rsp) movl -0x2c(%rbp), %eax movl %eax, (%rsp) movq -0x70(%rbp), %rsi movq %r15, %rdx xorl %ecx, %ecx movq %r12, %r8 movl $0x1, %r9d callq 0x7003a addq $0x40, %rsp testb %al, %al movq %r14, %r12 jne 0x4aea1 cmpq $0x0, 0xad8(%r12) jne 0x4adfd movq -0x50(%rbp), %rdi callq 0x291d0 movq -0x40(%rbp), %rdi movq -0xb8(%rbp), %rsi movq %r15, %rdx movl $0x1, %ecx callq 0x50688 movl %eax, %r15d movq 0xad8(%r12), %rdi testq %rdi, %rdi jne 0x4ae17 movq -0x50(%rbp), %rdi callq 0x291a0 testb %r15b, %r15b movq -0xc0(%rbp), %rcx jne 0x4aea1 addq %r13, -0x78(%rbp) movq %rcx, %r15 addl $-0x1, %ebx movq -0xd8(%rbp), %r8 movq -0xd0(%rbp), %r11 movl -0x5c(%rbp), %esi jb 0x4aa9c jmp 0x4ae2c movq -0x40(%rbp), %rdi movl $0x1, %edx movq %r15, %rcx callq 0x697e5 movq -0x48(%rbp), %r12 movq 0x600(%r12), %rdi movq -0xf0(%rbp), %rsi movl $0x6, %edx movl $0x3, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %rax pushq %rax callq 0x6e8f1 addq $0x10, %rsp jmp 0x4ad37 movq -0x50(%rbp), %rdi leaq 0x909ec(%rip), %rsi # 0xdb7f4 movl $0x1b5a, %edx # imm = 0x1B5A callq 0x2ee0b jmp 0x4ad4f leaq 0x33e232(%rip), %rax # 0x389050 movq (%rax), %rax callq *0x160(%rax) jmp 0x4ad7b movq -0x88(%rbp), %rcx addq $0x7, %rcx testl %esi, %esi movl -0x38(%rbp), %r10d jne 0x4aa70 movq %rcx, %rdx movq -0x80(%rbp), %r9 decl %r9d jne 0x4aa40 jmp 0x4ae5f movq $-0x1, %r8 xorl %r11d, %r11d movq 0x18(%rbp), %rax movq 0x10(%rbp), %rcx movq %r8, (%rcx) movq %r11, (%rax) xorl %eax, %eax jmp 0x4aeae movq -0x48(%rbp), %r12 movq 0x600(%r12), %rdi movq -0xf0(%rbp), %rsi xorl %eax, %eax movl $0x6, %edx movl $0x3, %ecx xorl %r8d, %r8d xorl %r9d, %r9d pushq %rax pushq %rax callq 0x6e8f1 addq $0x10, %rsp movq %r12, %rdi callq 0x3e87e movl $0x1, %eax addq $0xc8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_apply_redo_insert_row_blobs: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 0C8h mov rbx, rcx mov r12, [rdi] mov r10d, [r12+7BCh] sub r10d, [r12+0C18h] or dword ptr [r12+170h], 181h movzx eax, word ptr [rdx] movzx ecx, word ptr [rdx+2] mov [r9], ecx movzx r9d, word ptr [rdx+4] mov [r8], r9d test r9d, r9d jz loc_4AE55 add r10d, 0FFFFFFF4h lea r8, ds:0[rcx*8] sub r8, rcx lea rcx, [rdx+r8] add rcx, 6 add rdx, 6 lea rcx, [rcx+r9*4] mov [rbp+var_78], rcx lea rcx, [rdi+470h] mov [rbp+var_70], rcx mov rcx, rsi shr rcx, 20h mov [rbp+var_B0], rcx mov rcx, rsi shr rcx, 28h mov [rbp+var_A8], rcx mov rcx, rsi shr rcx, 30h mov [rbp+var_A0], rcx lea rcx, [r12+0A10h] mov [rbp+var_B8], rcx lea rcx, [r12+0A98h] mov [rbp+var_50], rcx mov r8, 0FFFFFFFFFFFFFFFFh movzx eax, ax mov [rbp+var_54], eax xor r11d, r11d mov [rbp+var_48], r12 mov [rbp+var_C8], rbx mov [rbp+var_38], r10d mov [rbp+var_40], rdi mov [rbp+var_68], rsi loc_4AA40: mov [rbp+var_80], r9 movzx esi, word ptr [rdx] lea rcx, [rdx+4] test esi, esi jz loc_4AE43 movzx eax, word ptr [rdx+2] mov edx, r10d sub edx, eax mov [rbp+var_58], edx mov [rbp+var_98], rax neg rax mov [rbp+var_90], rax loc_4AA70: dec esi movzx ebx, word ptr [rcx+5] test ebx, ebx mov [rbp+var_88], rcx jz loc_4AE2C movzx eax, byte ptr [rcx+4] shl rax, 20h mov r15d, [rcx] or r15, rax dec ebx mov [rbp+var_34], r10d mov [rbp+var_5C], esi loc_4AA9C: cmp r8, r15 cmovnb r8, r15 mov [rbp+var_D8], r8 cmp r11, r15 cmovbe r11, r15 mov [rbp+var_D0], r11 mov eax, ebx or eax, esi mov r14d, [rbp+var_34] cmovz r14d, [rbp+var_58] mov edi, [rbp+var_54] mov rsi, [rbp+var_C8] mov rdx, r15 xor ecx, ecx call _ma_redo_not_needed_for_page lea rcx, [r15+1] mov [rbp+var_34], r14d mov r13d, r14d test al, al jnz loc_4AD94 mov eax, [r12+7BCh] mov [rbp+var_C0], rcx imul rax, rcx cmp rax, [r12+40h] jbe short loc_4AB30 mov [r12+40h], rax mov rax, [rbp+var_40] mov r12, [rax+380h] mov byte ptr [rax+685h], 1 mov [rbp+var_30], 1 mov [rbp+var_2C], 0 jmp loc_4AC28 loc_4AB30: mov rax, [r12+600h] mov ecx, 0FFFFFFEFh and [rax+198h], rcx mov byte ptr [r12+7ECh], 1 mov rdi, [r12+600h] mov rsi, [rbp+var_70] mov rdx, r15 xor ecx, ecx xor r8d, r8d mov r9d, 1 lea rax, [rbp+var_F0] push rax push 4 call pagecache_read add rsp, 10h mov rdx, r12 mov r12, rax mov rax, [rdx+600h] mov rcx, [rax+1A0h] mov [rax+198h], rcx mov byte ptr [rdx+7ECh], 0 test r12, r12 jz short loc_4ABDC movzx eax, word ptr [r12] shl rax, 20h movzx ecx, byte ptr [r12+2] shl rcx, 30h or rcx, rax mov esi, [r12+3] or rsi, rcx mov rax, [rbp+var_68] cmp rsi, rax jge loc_4ADB7 mov [rbp+var_30], 3 mov [rbp+var_2C], 6 jmp short loc_4AC50 loc_4ABDC: call _my_thread_var cmp dword ptr [rax], 0AFh jz short loc_4AC07 call _my_thread_var cmp dword ptr [rax], 0B0h jz short loc_4AC07 call _my_thread_var cmp dword ptr [rax], 0C0h jnz loc_4AE71 loc_4AC07: mov rdi, [rbp+var_F0] call pagecache_block_link_to_buffer mov r12, rax mov [rbp+var_30], 3 mov [rbp+var_2C], 6 mov rax, [rbp+var_40] loc_4AC28: mov rax, [rax] mov edx, [rax+0C18h] add edx, 0Ch mov rdi, r12 xor esi, esi call _memset mov word ptr [r12+7], 3 mov byte ptr [r12+9], 0FFh mov rax, [rbp+var_68] loc_4AC50: mov rcx, [rbp+var_B0] mov [r12], cl mov rcx, [rbp+var_A8] mov [r12+1], cl mov rcx, [rbp+var_A0] mov [r12+2], cl mov [r12+3], eax mov byte ptr [r12+7], 3 lea rdi, [r12+8] mov r14, [rbp+var_48] mov edx, [r14+0C18h] xor esi, esi call _memset mov eax, [rbp+var_34] cmp eax, [rbp+var_38] jz short loc_4ACC4 mov eax, [r14+7BCh] add rax, r12 mov rcx, [rbp+var_90] lea rdi, [rcx+rax] add rdi, 0FFFFFFFFFFFFFFFCh xor esi, esi mov rdx, [rbp+var_98] call _memset loc_4ACC4: mov edi, [r14+0C18h] add edi, 8 add rdi, r12 mov rsi, [rbp+var_78] mov rdx, r13 call _memcpy mov rdi, [r14+600h] mov eax, [rdi+80h] sub rsp, 40h mov [rsp+130h+var_100], eax xor eax, eax mov [rsp+130h+var_108], eax xorps xmm0, xmm0 movups [rsp+130h+var_118], xmm0 mov [rsp+130h+var_120], eax mov eax, [rbp+var_30] mov [rsp+130h+var_128], eax mov eax, [rbp+var_2C] mov [rsp+130h+var_130], eax mov rsi, [rbp+var_70] mov rdx, r15 xor ecx, ecx mov r8, r12 mov r9d, 1 call pagecache_write_part add rsp, 40h test al, al mov r12, r14 jnz loc_4AEA1 loc_4AD37: cmp qword ptr [r12+0AD8h], 0 jnz loc_4ADFD mov rdi, [rbp+var_50] call _pthread_mutex_lock loc_4AD4F: mov rdi, [rbp+var_40] mov rsi, [rbp+var_B8] mov rdx, r15 mov ecx, 1 call _ma_bitmap_set_full_page_bits mov r15d, eax mov rdi, [r12+0AD8h] test rdi, rdi jnz loc_4AE17 loc_4AD7B: mov rdi, [rbp+var_50] call _pthread_mutex_unlock test r15b, r15b mov rcx, [rbp+var_C0] jnz loc_4AEA1 loc_4AD94: add [rbp+var_78], r13 mov r15, rcx add ebx, 0FFFFFFFFh mov r8, [rbp+var_D8] mov r11, [rbp+var_D0] mov esi, [rbp+var_5C] jb loc_4AA9C jmp short loc_4AE2C loc_4ADB7: mov rdi, [rbp+var_40] mov edx, 1 mov rcx, r15 call check_skipped_lsn mov r12, [rbp+var_48] mov rdi, [r12+600h] mov rsi, [rbp+var_F0] mov edx, 6 mov ecx, 3 xor r8d, r8d xor r9d, r9d xor eax, eax push rax push rax call pagecache_unlock_by_link add rsp, 10h jmp loc_4AD37 loc_4ADFD: mov rdi, [rbp+var_50] lea rsi, aWorkspaceLlm4b_3; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1B5Ah call psi_mutex_lock jmp loc_4AD4F loc_4AE17: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_4AD7B loc_4AE2C: mov rcx, [rbp+var_88] add rcx, 7 test esi, esi mov r10d, [rbp+var_38] jnz loc_4AA70 loc_4AE43: mov rdx, rcx mov r9, [rbp+var_80] dec r9d jnz loc_4AA40 jmp short loc_4AE5F loc_4AE55: mov r8, 0FFFFFFFFFFFFFFFFh xor r11d, r11d loc_4AE5F: mov rax, [rbp+arg_8] mov rcx, [rbp+arg_0] mov [rcx], r8 mov [rax], r11 xor eax, eax jmp short loc_4AEAE loc_4AE71: mov r12, [rbp+var_48] mov rdi, [r12+600h] mov rsi, [rbp+var_F0] xor eax, eax mov edx, 6 mov ecx, 3 xor r8d, r8d xor r9d, r9d push rax push rax call pagecache_unlock_by_link add rsp, 10h loc_4AEA1: mov rdi, r12 call _ma_mark_file_crashed mov eax, 1 loc_4AEAE: add rsp, 0C8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_apply_redo_insert_row_blobs( long long *a1, unsigned long long a2, unsigned __int16 *a3, long long a4, _DWORD *a5, _DWORD *a6, unsigned long long *a7, unsigned long long *a8) { long long v9; // r12 int v10; // r10d unsigned __int16 v11; // ax long long v12; // rcx long long v13; // r9 int v14; // r10d long long v15; // rcx unsigned __int16 *v16; // rdx unsigned long long v17; // r8 unsigned long long v18; // r11 int v19; // esi unsigned __int16 *v20; // rcx long long v21; // rax int v22; // ebx unsigned long long v23; // r15 int v24; // ebx unsigned int v25; // r14d char v26; // al unsigned long long v27; // rcx long long v28; // r13 long long v29; // rax unsigned long long v30; // rax long long *v31; // rax long long v32; // r12 long long v33; // rdi unsigned __int16 *v34; // rax long long v35; // rdx signed long long v36; // rsi int v37; // eax long long v38; // r14 char v39; // al char v40; // r15 bool v41; // cf long long v43[3]; // [rsp+40h] [rbp-F0h] BYREF unsigned long long v44; // [rsp+58h] [rbp-D8h] unsigned long long v45; // [rsp+60h] [rbp-D0h] long long v46; // [rsp+68h] [rbp-C8h] unsigned long long v47; // [rsp+70h] [rbp-C0h] long long v48; // [rsp+78h] [rbp-B8h] unsigned long long v49; // [rsp+80h] [rbp-B0h] unsigned long long v50; // [rsp+88h] [rbp-A8h] unsigned long long v51; // [rsp+90h] [rbp-A0h] long long v52; // [rsp+98h] [rbp-98h] long long v53; // [rsp+A0h] [rbp-90h] unsigned __int16 *v54; // [rsp+A8h] [rbp-88h] long long v55; // [rsp+B0h] [rbp-80h] long long v56; // [rsp+B8h] [rbp-78h] long long *v57; // [rsp+C0h] [rbp-70h] signed long long v58; // [rsp+C8h] [rbp-68h] int v59; // [rsp+D4h] [rbp-5Ch] unsigned int v60; // [rsp+D8h] [rbp-58h] unsigned int v61; // [rsp+DCh] [rbp-54h] long long v62; // [rsp+E0h] [rbp-50h] long long v63; // [rsp+E8h] [rbp-48h] long long *v64; // [rsp+F0h] [rbp-40h] int v65; // [rsp+F8h] [rbp-38h] int v66; // [rsp+FCh] [rbp-34h] int v67; // [rsp+100h] [rbp-30h] int v68; // [rsp+104h] [rbp-2Ch] v9 = *a1; v10 = *(_DWORD *)(*a1 + 1980) - *(_DWORD *)(*a1 + 3096); *(_DWORD *)(*a1 + 368) |= 0x181u; v11 = *a3; v12 = a3[1]; *a6 = v12; v13 = a3[2]; *a5 = v13; if ( !(_DWORD)v13 ) { v17 = -1LL; v18 = 0LL; LABEL_40: *a7 = v17; *a8 = v18; return 0LL; } v14 = v10 - 12; v15 = (long long)a3 + 7 * v12 + 6; v16 = a3 + 3; v56 = v15 + 4 * v13; v57 = a1 + 142; v49 = HIDWORD(a2); v50 = a2 >> 40; v51 = HIWORD(a2); v48 = v9 + 2576; v62 = v9 + 2712; v17 = -1LL; v61 = v11; v18 = 0LL; v63 = v9; v46 = a4; v65 = v14; v64 = a1; v58 = a2; while ( 1 ) { v55 = v13; v19 = *v16; v20 = v16 + 2; if ( *v16 ) break; LABEL_37: v16 = v20; v13 = (unsigned int)(v55 - 1); if ( (_DWORD)v55 == 1 ) goto LABEL_40; } v21 = v16[1]; v60 = v14 - v21; v52 = v21; v53 = -v21; while ( 1 ) { --v19; v22 = *(unsigned __int16 *)((char *)v20 + 5); v54 = v20; if ( v22 ) break; LABEL_36: v20 = (unsigned __int16 *)((char *)v54 + 7); v14 = v65; if ( !v19 ) goto LABEL_37; } v23 = ((unsigned long long)*((unsigned __int8 *)v20 + 4) << 32) | *(unsigned int *)v20; v24 = v22 - 1; v66 = v14; v59 = v19; while ( 1 ) { if ( v17 >= v23 ) v17 = v23; v44 = v17; if ( v18 <= v23 ) v18 = v23; v45 = v18; v25 = v66; if ( !(v19 | v24) ) v25 = v60; v26 = ma_redo_not_needed_for_page(v61, v46, v23, 0LL); v27 = v23 + 1; v66 = v25; v28 = v25; if ( v26 ) goto LABEL_32; v29 = *(unsigned int *)(v9 + 1980); v47 = v23 + 1; v30 = v27 * v29; if ( v30 > *(_QWORD *)(v9 + 64) ) { *(_QWORD *)(v9 + 64) = v30; v31 = v64; v32 = v64[112]; *((_BYTE *)v64 + 1669) = 1; v67 = 1; v68 = 0; LABEL_23: memset(v32, 0LL, (unsigned int)(*(_DWORD *)(*v31 + 3096) + 12)); *(_WORD *)(v32 + 7) = 3; *(_BYTE *)(v32 + 9) = -1; v37 = v58; LABEL_24: *(_BYTE *)v32 = v49; *(_BYTE *)(v32 + 1) = v50; *(_BYTE *)(v32 + 2) = v51; *(_DWORD *)(v32 + 3) = v37; *(_BYTE *)(v32 + 7) = 3; v38 = v63; memset(v32 + 8, 0LL, *(unsigned int *)(v63 + 3096)); if ( v66 != v65 ) memset(v53 + v32 + *(unsigned int *)(v38 + 1980) - 4, 0LL, v52); memcpy(v32 + (unsigned int)(*(_DWORD *)(v38 + 3096) + 8), v56, v28); v39 = pagecache_write_part( *(_QWORD *)(v38 + 1536), (_DWORD)v57, v23, 0, v32, 1, v68, v67, 0, 0LL, 0LL, 0, *(_DWORD *)(*(_QWORD *)(v38 + 1536) + 128LL)); v9 = v38; if ( v39 ) goto LABEL_42; goto LABEL_27; } *(_QWORD *)(*(_QWORD *)(v9 + 1536) + 408LL) &= 0xFFFFFFEFuLL; *(_BYTE *)(v9 + 2028) = 1; v33 = *(_QWORD *)(v9 + 1536); v34 = (unsigned __int16 *)pagecache_read(v33, (_DWORD)v57, v23, 0, 0, 1, 4, (long long)v43); v35 = v9; v32 = (long long)v34; *(_QWORD *)(*(_QWORD *)(v35 + 1536) + 408LL) = *(_QWORD *)(*(_QWORD *)(v35 + 1536) + 416LL); *(_BYTE *)(v35 + 2028) = 0; if ( !v34 ) break; v36 = ((unsigned long long)*v34 << 32) | ((unsigned long long)*((unsigned __int8 *)v34 + 2) << 48) | *(unsigned int *)((char *)v34 + 3); v37 = v58; if ( v36 < v58 ) { v67 = 3; v68 = 6; goto LABEL_24; } check_skipped_lsn(v64, v36, 1LL, v23); v9 = v63; pagecache_unlock_by_link(*(_QWORD *)(v63 + 1536), v43[0], 6, 3, 0, 0, 0LL, 0LL); LABEL_27: if ( *(_QWORD *)(v9 + 2776) ) psi_mutex_lock(v62, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c", 0x1B5Au); else pthread_mutex_lock(v62); v40 = ma_bitmap_set_full_page_bits(v64, v48, v23, 1LL); if ( *(_QWORD *)(v9 + 2776) ) PSI_server[44](); pthread_mutex_unlock(v62); v27 = v47; if ( v40 ) goto LABEL_42; LABEL_32: v56 += v28; v23 = v27; v41 = v24-- != 0; v17 = v44; v18 = v45; v19 = v59; if ( !v41 ) goto LABEL_36; } if ( *(_DWORD *)my_thread_var(v33) == 175 || *(_DWORD *)my_thread_var(v33) == 176 || *(_DWORD *)my_thread_var(v33) == 192 ) { v32 = pagecache_block_link_to_buffer(v43[0]); v67 = 3; v68 = 6; v31 = v64; goto LABEL_23; } v9 = v63; pagecache_unlock_by_link(*(_QWORD *)(v63 + 1536), v43[0], 6, 3, 0, 0, 0LL, 0LL); LABEL_42: ma_mark_file_crashed(v9); return 1LL; }
_ma_apply_redo_insert_row_blobs: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xc8 MOV RBX,RCX MOV R12,qword ptr [RDI] MOV R10D,dword ptr [R12 + 0x7bc] SUB R10D,dword ptr [R12 + 0xc18] OR dword ptr [R12 + 0x170],0x181 MOVZX EAX,word ptr [RDX] MOVZX ECX,word ptr [RDX + 0x2] MOV dword ptr [R9],ECX MOVZX R9D,word ptr [RDX + 0x4] MOV dword ptr [R8],R9D TEST R9D,R9D JZ 0x0014ae55 ADD R10D,-0xc LEA R8,[RCX*0x8] SUB R8,RCX LEA RCX,[RDX + R8*0x1] ADD RCX,0x6 ADD RDX,0x6 LEA RCX,[RCX + R9*0x4] MOV qword ptr [RBP + -0x78],RCX LEA RCX,[RDI + 0x470] MOV qword ptr [RBP + -0x70],RCX MOV RCX,RSI SHR RCX,0x20 MOV qword ptr [RBP + -0xb0],RCX MOV RCX,RSI SHR RCX,0x28 MOV qword ptr [RBP + -0xa8],RCX MOV RCX,RSI SHR RCX,0x30 MOV qword ptr [RBP + -0xa0],RCX LEA RCX,[R12 + 0xa10] MOV qword ptr [RBP + -0xb8],RCX LEA RCX,[R12 + 0xa98] MOV qword ptr [RBP + -0x50],RCX MOV R8,-0x1 MOVZX EAX,AX MOV dword ptr [RBP + -0x54],EAX XOR R11D,R11D MOV qword ptr [RBP + -0x48],R12 MOV qword ptr [RBP + -0xc8],RBX MOV dword ptr [RBP + -0x38],R10D MOV qword ptr [RBP + -0x40],RDI MOV qword ptr [RBP + -0x68],RSI LAB_0014aa40: MOV qword ptr [RBP + -0x80],R9 MOVZX ESI,word ptr [RDX] LEA RCX,[RDX + 0x4] TEST ESI,ESI JZ 0x0014ae43 MOVZX EAX,word ptr [RDX + 0x2] MOV EDX,R10D SUB EDX,EAX MOV dword ptr [RBP + -0x58],EDX MOV qword ptr [RBP + -0x98],RAX NEG RAX MOV qword ptr [RBP + -0x90],RAX LAB_0014aa70: DEC ESI MOVZX EBX,word ptr [RCX + 0x5] TEST EBX,EBX MOV qword ptr [RBP + -0x88],RCX JZ 0x0014ae2c MOVZX EAX,byte ptr [RCX + 0x4] SHL RAX,0x20 MOV R15D,dword ptr [RCX] OR R15,RAX DEC EBX MOV dword ptr [RBP + -0x34],R10D MOV dword ptr [RBP + -0x5c],ESI LAB_0014aa9c: CMP R8,R15 CMOVNC R8,R15 MOV qword ptr [RBP + -0xd8],R8 CMP R11,R15 CMOVBE R11,R15 MOV qword ptr [RBP + -0xd0],R11 MOV EAX,EBX OR EAX,ESI MOV R14D,dword ptr [RBP + -0x34] CMOVZ R14D,dword ptr [RBP + -0x58] MOV EDI,dword ptr [RBP + -0x54] MOV RSI,qword ptr [RBP + -0xc8] MOV RDX,R15 XOR ECX,ECX CALL 0x00172f63 LEA RCX,[R15 + 0x1] MOV dword ptr [RBP + -0x34],R14D MOV R13D,R14D TEST AL,AL JNZ 0x0014ad94 MOV EAX,dword ptr [R12 + 0x7bc] MOV qword ptr [RBP + -0xc0],RCX IMUL RAX,RCX CMP RAX,qword ptr [R12 + 0x40] JBE 0x0014ab30 MOV qword ptr [R12 + 0x40],RAX MOV RAX,qword ptr [RBP + -0x40] MOV R12,qword ptr [RAX + 0x380] MOV byte ptr [RAX + 0x685],0x1 MOV dword ptr [RBP + -0x30],0x1 MOV dword ptr [RBP + -0x2c],0x0 JMP 0x0014ac28 LAB_0014ab30: MOV RAX,qword ptr [R12 + 0x600] MOV ECX,0xffffffef AND qword ptr [RAX + 0x198],RCX MOV byte ptr [R12 + 0x7ec],0x1 MOV RDI,qword ptr [R12 + 0x600] MOV RSI,qword ptr [RBP + -0x70] MOV RDX,R15 XOR ECX,ECX XOR R8D,R8D MOV R9D,0x1 LEA RAX,[RBP + -0xf0] PUSH RAX PUSH 0x4 CALL 0x0016ebd6 ADD RSP,0x10 MOV RDX,R12 MOV R12,RAX MOV RAX,qword ptr [RDX + 0x600] MOV RCX,qword ptr [RAX + 0x1a0] MOV qword ptr [RAX + 0x198],RCX MOV byte ptr [RDX + 0x7ec],0x0 TEST R12,R12 JZ 0x0014abdc MOVZX EAX,word ptr [R12] SHL RAX,0x20 MOVZX ECX,byte ptr [R12 + 0x2] SHL RCX,0x30 OR RCX,RAX MOV ESI,dword ptr [R12 + 0x3] OR RSI,RCX MOV RAX,qword ptr [RBP + -0x68] CMP RSI,RAX JGE 0x0014adb7 MOV dword ptr [RBP + -0x30],0x3 MOV dword ptr [RBP + -0x2c],0x6 JMP 0x0014ac50 LAB_0014abdc: CALL 0x001a4ab2 CMP dword ptr [RAX],0xaf JZ 0x0014ac07 CALL 0x001a4ab2 CMP dword ptr [RAX],0xb0 JZ 0x0014ac07 CALL 0x001a4ab2 CMP dword ptr [RAX],0xc0 JNZ 0x0014ae71 LAB_0014ac07: MOV RDI,qword ptr [RBP + -0xf0] CALL 0x001710b9 MOV R12,RAX MOV dword ptr [RBP + -0x30],0x3 MOV dword ptr [RBP + -0x2c],0x6 MOV RAX,qword ptr [RBP + -0x40] LAB_0014ac28: MOV RAX,qword ptr [RAX] MOV EDX,dword ptr [RAX + 0xc18] ADD EDX,0xc MOV RDI,R12 XOR ESI,ESI CALL 0x00129270 MOV word ptr [R12 + 0x7],0x3 MOV byte ptr [R12 + 0x9],0xff MOV RAX,qword ptr [RBP + -0x68] LAB_0014ac50: MOV RCX,qword ptr [RBP + -0xb0] MOV byte ptr [R12],CL MOV RCX,qword ptr [RBP + -0xa8] MOV byte ptr [R12 + 0x1],CL MOV RCX,qword ptr [RBP + -0xa0] MOV byte ptr [R12 + 0x2],CL MOV dword ptr [R12 + 0x3],EAX MOV byte ptr [R12 + 0x7],0x3 LEA RDI,[R12 + 0x8] MOV R14,qword ptr [RBP + -0x48] MOV EDX,dword ptr [R14 + 0xc18] XOR ESI,ESI CALL 0x00129270 MOV EAX,dword ptr [RBP + -0x34] CMP EAX,dword ptr [RBP + -0x38] JZ 0x0014acc4 MOV EAX,dword ptr [R14 + 0x7bc] ADD RAX,R12 MOV RCX,qword ptr [RBP + -0x90] LEA RDI,[RCX + RAX*0x1] ADD RDI,-0x4 XOR ESI,ESI MOV RDX,qword ptr [RBP + -0x98] CALL 0x00129270 LAB_0014acc4: MOV EDI,dword ptr [R14 + 0xc18] ADD EDI,0x8 ADD RDI,R12 MOV RSI,qword ptr [RBP + -0x78] MOV RDX,R13 CALL 0x00129080 MOV RDI,qword ptr [R14 + 0x600] MOV EAX,dword ptr [RDI + 0x80] SUB RSP,0x40 MOV dword ptr [RSP + 0x30],EAX XOR EAX,EAX MOV dword ptr [RSP + 0x28],EAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV dword ptr [RSP + 0x10],EAX MOV EAX,dword ptr [RBP + -0x30] MOV dword ptr [RSP + 0x8],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RSP],EAX MOV RSI,qword ptr [RBP + -0x70] MOV RDX,R15 XOR ECX,ECX MOV R8,R12 MOV R9D,0x1 CALL 0x0017003a ADD RSP,0x40 TEST AL,AL MOV R12,R14 JNZ 0x0014aea1 LAB_0014ad37: CMP qword ptr [R12 + 0xad8],0x0 JNZ 0x0014adfd MOV RDI,qword ptr [RBP + -0x50] CALL 0x001291d0 LAB_0014ad4f: MOV RDI,qword ptr [RBP + -0x40] MOV RSI,qword ptr [RBP + -0xb8] MOV RDX,R15 MOV ECX,0x1 CALL 0x00150688 MOV R15D,EAX MOV RDI,qword ptr [R12 + 0xad8] TEST RDI,RDI JNZ 0x0014ae17 LAB_0014ad7b: MOV RDI,qword ptr [RBP + -0x50] CALL 0x001291a0 TEST R15B,R15B MOV RCX,qword ptr [RBP + -0xc0] JNZ 0x0014aea1 LAB_0014ad94: ADD qword ptr [RBP + -0x78],R13 MOV R15,RCX ADD EBX,-0x1 MOV R8,qword ptr [RBP + -0xd8] MOV R11,qword ptr [RBP + -0xd0] MOV ESI,dword ptr [RBP + -0x5c] JC 0x0014aa9c JMP 0x0014ae2c LAB_0014adb7: MOV RDI,qword ptr [RBP + -0x40] MOV EDX,0x1 MOV RCX,R15 CALL 0x001697e5 MOV R12,qword ptr [RBP + -0x48] MOV RDI,qword ptr [R12 + 0x600] MOV RSI,qword ptr [RBP + -0xf0] MOV EDX,0x6 MOV ECX,0x3 XOR R8D,R8D XOR R9D,R9D XOR EAX,EAX PUSH RAX PUSH RAX CALL 0x0016e8f1 ADD RSP,0x10 JMP 0x0014ad37 LAB_0014adfd: MOV RDI,qword ptr [RBP + -0x50] LEA RSI,[0x1db7f4] MOV EDX,0x1b5a CALL 0x0012ee0b JMP 0x0014ad4f LAB_0014ae17: LEA RAX,[0x489050] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0014ad7b LAB_0014ae2c: MOV RCX,qword ptr [RBP + -0x88] ADD RCX,0x7 TEST ESI,ESI MOV R10D,dword ptr [RBP + -0x38] JNZ 0x0014aa70 LAB_0014ae43: MOV RDX,RCX MOV R9,qword ptr [RBP + -0x80] DEC R9D JNZ 0x0014aa40 JMP 0x0014ae5f LAB_0014ae55: MOV R8,-0x1 XOR R11D,R11D LAB_0014ae5f: MOV RAX,qword ptr [RBP + 0x18] MOV RCX,qword ptr [RBP + 0x10] MOV qword ptr [RCX],R8 MOV qword ptr [RAX],R11 XOR EAX,EAX JMP 0x0014aeae LAB_0014ae71: MOV R12,qword ptr [RBP + -0x48] MOV RDI,qword ptr [R12 + 0x600] MOV RSI,qword ptr [RBP + -0xf0] XOR EAX,EAX MOV EDX,0x6 MOV ECX,0x3 XOR R8D,R8D XOR R9D,R9D PUSH RAX PUSH RAX CALL 0x0016e8f1 ADD RSP,0x10 LAB_0014aea1: MOV RDI,R12 CALL 0x0013e87e MOV EAX,0x1 LAB_0014aeae: ADD RSP,0xc8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 _ma_apply_redo_insert_row_blobs (long *param_1,ulong param_2,ushort *param_3,int8 param_4,uint *param_5, uint *param_6,ulong *param_7,ulong *param_8) { ulong *puVar1; ushort uVar2; ushort uVar3; ushort uVar4; int iVar5; int iVar6; uint uVar7; char cVar8; ulong uVar9; ushort *__s; int *piVar10; uint5 *puVar11; uint uVar12; ulong uVar13; long lVar14; ulong uVar15; ulong in_stack_fffffffffffffef0; int8 local_f8 [3]; ulong local_e0; ulong local_d8; int8 local_d0; ulong local_c8; long local_c0; ulong local_b8; ulong local_b0; ulong local_a8; ulong local_a0; long local_98; uint5 *local_90; ulong local_88; void *local_80; long *local_78; ulong local_70; uint local_64; uint local_60; uint local_5c; pthread_mutex_t *local_58; long local_50; long *local_48; uint local_40; uint local_3c; int4 local_38; int4 local_34; lVar14 = *param_1; iVar5 = *(int *)(lVar14 + 0x7bc); iVar6 = *(int *)(lVar14 + 0xc18); *(uint *)(lVar14 + 0x170) = *(uint *)(lVar14 + 0x170) | 0x181; uVar2 = *param_3; uVar3 = param_3[1]; *param_6 = (uint)uVar3; uVar4 = param_3[2]; local_88 = (ulong)uVar4; *param_5 = (uint)uVar4; if (uVar4 == 0) { local_e0 = 0xffffffffffffffff; local_d8 = 0; } else { local_3c = (iVar5 - iVar6) - 0xc; local_80 = (void *)((long)param_3 + local_88 * 4 + (ulong)uVar3 * 7 + 6); local_78 = param_1 + 0x8e; local_b8 = param_2 >> 0x20; local_b0 = param_2 >> 0x28; local_a8 = param_2 >> 0x30; local_c0 = lVar14 + 0xa10; local_58 = (pthread_mutex_t *)(lVar14 + 0xa98); local_e0 = 0xffffffffffffffff; local_5c = (uint)uVar2; local_d8 = 0; puVar11 = (uint5 *)(param_3 + 3); local_d0 = param_4; local_70 = param_2; local_50 = lVar14; local_48 = param_1; local_40 = local_3c; do { local_64 = (uint)(ushort)*puVar11; local_90 = (uint5 *)((long)puVar11 + 4); if ((ushort)*puVar11 != 0) { local_a0 = (ulong)*(ushort *)((long)puVar11 + 2); local_60 = local_3c - *(ushort *)((long)puVar11 + 2); local_98 = -local_a0; do { local_64 = local_64 - 1; if (*(ushort *)((long)local_90 + 5) != 0) { uVar12 = (uint)*(ushort *)((long)local_90 + 5); uVar15 = (ulong)*local_90; do { uVar12 = uVar12 - 1; if (uVar15 <= local_e0) { local_e0 = uVar15; } if (local_d8 <= uVar15) { local_d8 = uVar15; } uVar7 = local_3c; if (uVar12 == 0 && local_64 == 0) { uVar7 = local_60; } cVar8 = _ma_redo_not_needed_for_page(local_5c,local_d0,uVar15,0); uVar13 = uVar15 + 1; local_3c = uVar7; if (cVar8 == '\0') { uVar9 = *(uint *)(lVar14 + 0x7bc) * uVar13; local_c8 = uVar13; if (uVar9 < *(ulong *)(lVar14 + 0x40) || uVar9 - *(ulong *)(lVar14 + 0x40) == 0) { puVar1 = (ulong *)(*(long *)(lVar14 + 0x600) + 0x198); *puVar1 = *puVar1 & 0xffffffef; *(int1 *)(lVar14 + 0x7ec) = 1; in_stack_fffffffffffffef0 = 0; __s = (ushort *) pagecache_read(*(int8 *)(lVar14 + 0x600),local_78,uVar15,0,0,1,4, local_f8); *(int8 *)(*(long *)(lVar14 + 0x600) + 0x198) = *(int8 *)(*(long *)(lVar14 + 0x600) + 0x1a0); *(int1 *)(lVar14 + 0x7ec) = 0; if (__s == (ushort *)0x0) { piVar10 = (int *)_my_thread_var(); if (((*piVar10 != 0xaf) && (piVar10 = (int *)_my_thread_var(), *piVar10 != 0xb0) ) && (piVar10 = (int *)_my_thread_var(), lVar14 = local_50, *piVar10 != 0xc0 )) { pagecache_unlock_by_link (*(int8 *)(local_50 + 0x600),local_f8[0],6,3,0,0,0,0); goto LAB_0014aea1; } __s = (ushort *)pagecache_block_link_to_buffer(local_f8[0]); local_38 = 3; local_34 = 6; goto LAB_0014ac28; } uVar13 = (ulong)*(uint *)((long)__s + 3) | (ulong)(byte)__s[1] << 0x30 | (ulong)*__s << 0x20; if ((long)uVar13 < (long)local_70) { local_38 = 3; local_34 = 6; goto LAB_0014ac50; } check_skipped_lsn(local_48,uVar13,1,uVar15); lVar14 = local_50; in_stack_fffffffffffffef0 = 0; pagecache_unlock_by_link (*(int8 *)(local_50 + 0x600),local_f8[0],6,3,0,0,0,0); } else { *(ulong *)(lVar14 + 0x40) = uVar9; __s = (ushort *)local_48[0x70]; *(int1 *)((long)local_48 + 0x685) = 1; local_38 = 1; local_34 = 0; LAB_0014ac28: memset(__s,0,(ulong)(*(int *)(*local_48 + 0xc18) + 0xc)); *(int2 *)((long)__s + 7) = 3; *(int1 *)((long)__s + 9) = 0xff; LAB_0014ac50: lVar14 = local_50; *(char *)__s = (char)local_b8; *(char *)((long)__s + 1) = (char)local_b0; *(char *)(__s + 1) = (char)local_a8; *(int *)((long)__s + 3) = (int)local_70; *(int1 *)((long)__s + 7) = 3; memset(__s + 4,0,(ulong)*(uint *)(local_50 + 0xc18)); if (local_3c != local_40) { memset((void *)((long)__s + local_98 + (ulong)*(uint *)(lVar14 + 0x7bc) + -4),0, local_a0); } memcpy((void *)((ulong)(*(int *)(lVar14 + 0xc18) + 8) + (long)__s),local_80, (ulong)uVar7); in_stack_fffffffffffffef0 = in_stack_fffffffffffffef0 & 0xffffffff00000000; cVar8 = pagecache_write_part (*(long *)(lVar14 + 0x600),local_78,uVar15,0,__s,1,local_34, local_38,0,0,0,in_stack_fffffffffffffef0, *(int4 *)(*(long *)(lVar14 + 0x600) + 0x80)); if (cVar8 != '\0') goto LAB_0014aea1; } if (*(long *)(lVar14 + 0xad8) == 0) { pthread_mutex_lock(local_58); } else { psi_mutex_lock(local_58, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_blockrec.c" ,0x1b5a); } cVar8 = _ma_bitmap_set_full_page_bits(local_48,local_c0,uVar15,1); if (*(long *)(lVar14 + 0xad8) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(local_58); uVar13 = local_c8; if (cVar8 != '\0') { LAB_0014aea1: _ma_mark_file_crashed(lVar14); return 1; } } local_80 = (void *)((long)local_80 + (ulong)uVar7); uVar15 = uVar13; } while (uVar12 != 0); } local_90 = (uint5 *)((long)local_90 + 7); local_3c = local_40; } while (local_64 != 0); } uVar12 = (int)local_88 - 1; local_88 = (ulong)uVar12; puVar11 = local_90; } while (uVar12 != 0); } *param_7 = local_e0; *param_8 = local_d8; return 0; }
13,465
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
iterator find(const key_type& key) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it; } } return Container::end(); }
O2
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::find(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx movq %rdi, %r15 movq (%rdi), %r14 movq 0x8(%r15), %rax cmpq %rax, %r14 je 0x6c667 movq %r14, %rdi movq %rbx, %rsi callq 0x69524 testb %al, %al jne 0x6c664 addq $0x60, %r14 jmp 0x6c646 movq %r14, %rax popq %rbx popq %r14 popq %r15 retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE4findERSJ_: push r15 push r14 push rbx mov rbx, rsi mov r15, rdi mov r14, [rdi] loc_6C646: mov rax, [r15+8] cmp r14, rax jz short loc_6C667 mov rdi, r14 mov rsi, rbx call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) test al, al jnz short loc_6C664 add r14, 60h ; '`' jmp short loc_6C646 loc_6C664: mov rax, r14 loc_6C667: pop rbx pop r14 pop r15 retn
unsigned __int8 * nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::find( unsigned __int8 **a1, unsigned __int8 *a2, __m128d a3) { unsigned __int8 *i; // r14 unsigned __int8 *result; // rax for ( i = *a1; ; i += 96 ) { result = a1[1]; if ( i == result ) break; if ( nlohmann::json_abi_v3_11_3::operator==(i, a2, a3) ) return i; } return result; }
find: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI MOV R15,RDI MOV R14,qword ptr [RDI] LAB_0016c646: MOV RAX,qword ptr [R15 + 0x8] CMP R14,RAX JZ 0x0016c667 MOV RDI,R14 MOV RSI,RBX CALL 0x00169524 TEST AL,AL JNZ 0x0016c664 ADD R14,0x60 JMP 0x0016c646 LAB_0016c664: MOV RAX,R14 LAB_0016c667: POP RBX POP R14 POP R15 RET
/* nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const, minja::Value> > >::find(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&) */ basic_json * __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::find(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,basic_json *param_1) { char cVar1; basic_json *pbVar2; basic_json *pbVar3; pbVar3 = *(basic_json **)this; while ((pbVar2 = *(basic_json **)(this + 8), pbVar3 != *(basic_json **)(this + 8) && (cVar1 = json_abi_v3_11_3::operator==(pbVar3,param_1), pbVar2 = pbVar3, cVar1 == '\0'))) { pbVar3 = pbVar3 + 0x60; } return pbVar2; }
13,466
nglog::base_logging::LogStreamBuf::~LogStreamBuf()
ng-log[P]ng-log/src/ng-log/logging.h
class NGLOG_EXPORT LogStreamBuf : public std::streambuf { public: // REQUIREMENTS: "len" must be >= 2 to account for the '\n' and '\0'. LogStreamBuf(char* buf, int len) { setp(buf, buf + len - 2); } // This effectively ignores overflow. int_type overflow(int_type ch) { return ch; } // Legacy public ostrstream method. size_t pcount() const { return static_cast<size_t>(pptr() - pbase()); } char* pbase() const { return std::streambuf::pbase(); } }
O1
c
nglog::base_logging::LogStreamBuf::~LogStreamBuf(): pushq %rbx movq %rdi, %rbx movq 0x27f27(%rip), %rax # 0x31f28 addq $0x10, %rax movq %rax, (%rdi) addq $0x38, %rdi callq 0x7760 movq %rbx, %rdi popq %rbx jmp 0x7620
_ZN5nglog12base_logging12LogStreamBufD0Ev: push rbx mov rbx, rdi mov rax, cs:_ZTVSt15basic_streambufIcSt11char_traitsIcEE_ptr add rax, 10h mov [rdi], rax add rdi, 38h ; '8'; this call __ZNSt6localeD1Ev; std::locale::~locale() mov rdi, rbx pop rbx jmp _free
void nglog::base_logging::LogStreamBuf::~LogStreamBuf(nglog::base_logging::LogStreamBuf *this) { *(_QWORD *)this = (char *)&`vtable for'std::streambuf + 16; std::locale::~locale((nglog::base_logging::LogStreamBuf *)((char *)this + 56)); free(this); }
~LogStreamBuf: PUSH RBX MOV RBX,RDI MOV RAX,qword ptr [0x00131f28] ADD RAX,0x10 MOV qword ptr [RDI],RAX ADD RDI,0x38 CALL 0x00107760 MOV RDI,RBX POP RBX JMP 0x00107620
/* nglog::base_logging::LogStreamBuf::~LogStreamBuf() */ void __thiscall nglog::base_logging::LogStreamBuf::~LogStreamBuf(LogStreamBuf *this) { *(int **)this = PTR_vtable_00131f28 + 0x10; std::locale::~locale((locale *)(this + 0x38)); free(this); return; }
13,467
mi_mark_file_changed
eloqsql/storage/myisam/mi_locking.c
int _mi_mark_file_changed(MI_INFO *info) { uchar buff[3]; register MYISAM_SHARE *share=info->s; DBUG_ENTER("_mi_mark_file_changed"); if (!(share->state.changed & STATE_CHANGED) || ! share->global_changed) { share->state.changed|=(STATE_CHANGED | STATE_NOT_ANALYZED | STATE_NOT_OPTIMIZED_KEYS); if (!share->global_changed) { share->global_changed=1; share->state.open_count++; } if (!share->temporary) { mi_int2store(buff,share->state.open_count); buff[2]=1; /* Mark that it's changed */ DBUG_RETURN((int)mysql_file_pwrite(share->kfile, buff, sizeof(buff), sizeof(share->state.header), MYF(MY_NABP))); } } DBUG_RETURN(0); }
O0
c
mi_mark_file_changed: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movzbl 0xf0(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax je 0xb13bb movq -0x20(%rbp), %rax cmpb $0x0, 0x380(%rax) jne 0xb1461 movq -0x20(%rbp), %rax movzbl 0xf0(%rax), %ecx orl $0x19, %ecx movb %cl, 0xf0(%rax) movq -0x20(%rbp), %rax cmpb $0x0, 0x380(%rax) jne 0xb13fa movq -0x20(%rbp), %rax movb $0x1, 0x380(%rax) movq -0x20(%rbp), %rax movl 0xec(%rax), %ecx addl $0x1, %ecx movl %ecx, 0xec(%rax) movq -0x20(%rbp), %rax cmpb $0x0, 0x382(%rax) jne 0xb145f movq -0x20(%rbp), %rax movl 0xec(%rax), %eax movl %eax, -0x24(%rbp) movl -0x24(%rbp), %eax movb %al, -0x12(%rbp) movl -0x24(%rbp), %eax shrl $0x8, %eax movb %al, -0x13(%rbp) movb $0x1, -0x11(%rbp) movq -0x20(%rbp), %rax movl 0x350(%rax), %edx leaq -0x13(%rbp), %rcx leaq 0xa26af(%rip), %rdi # 0x153aeb movl $0x26f, %esi # imm = 0x26F movl $0x3, %r8d movl $0x18, %r9d movq $0x4, (%rsp) callq 0xb1480 movl %eax, -0x4(%rbp) jmp 0xb146a jmp 0xb1461 jmp 0xb1463 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_mi_mark_file_changed: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_20], rax mov rax, [rbp+var_20] movzx eax, byte ptr [rax+0F0h] and eax, 1 cmp eax, 0 jz short loc_B13BB mov rax, [rbp+var_20] cmp byte ptr [rax+380h], 0 jnz loc_B1461 loc_B13BB: mov rax, [rbp+var_20] movzx ecx, byte ptr [rax+0F0h] or ecx, 19h mov [rax+0F0h], cl mov rax, [rbp+var_20] cmp byte ptr [rax+380h], 0 jnz short loc_B13FA mov rax, [rbp+var_20] mov byte ptr [rax+380h], 1 mov rax, [rbp+var_20] mov ecx, [rax+0ECh] add ecx, 1 mov [rax+0ECh], ecx loc_B13FA: mov rax, [rbp+var_20] cmp byte ptr [rax+382h], 0 jnz short loc_B145F mov rax, [rbp+var_20] mov eax, [rax+0ECh] mov [rbp+var_24], eax mov eax, [rbp+var_24] mov [rbp+var_12], al mov eax, [rbp+var_24] shr eax, 8 mov [rbp+var_13], al mov [rbp+var_11], 1 mov rax, [rbp+var_20] mov edx, [rax+350h] lea rcx, [rbp+var_13] lea rdi, aWorkspaceLlm4b_27; "/workspace/llm4binary/github2025/eloqsq"... mov esi, 26Fh mov r8d, 3 mov r9d, 18h mov [rsp+30h+var_30], 4 call inline_mysql_file_pwrite_1 mov [rbp+var_4], eax jmp short loc_B146A loc_B145F: jmp short $+2 loc_B1461: jmp short $+2 loc_B1463: mov [rbp+var_4], 0 loc_B146A: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long mi_mark_file_changed(long long *a1) { __int16 v1; // kr00_2 long long v3; // [rsp+10h] [rbp-20h] _BYTE v4[3]; // [rsp+1Dh] [rbp-13h] BYREF long long *v5; // [rsp+20h] [rbp-10h] v5 = a1; v3 = *a1; if ( (*(_BYTE *)(*a1 + 240) & 1) != 0 && *(_BYTE *)(v3 + 896) ) return 0; *(_BYTE *)(v3 + 240) |= 0x19u; if ( !*(_BYTE *)(v3 + 896) ) { *(_BYTE *)(v3 + 896) = 1; ++*(_DWORD *)(v3 + 236); } if ( *(_BYTE *)(v3 + 898) ) { return 0; } else { v1 = *(_DWORD *)(v3 + 236); v4[0] = HIBYTE(v1); v4[1] = v1; v4[2] = 1; return (unsigned int)inline_mysql_file_pwrite_1( (unsigned int)"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c", 623, *(_DWORD *)(v3 + 848), (unsigned int)v4, 3, 24, 4LL); } }
_mi_mark_file_changed: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,byte ptr [RAX + 0xf0] AND EAX,0x1 CMP EAX,0x0 JZ 0x001b13bb MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x380],0x0 JNZ 0x001b1461 LAB_001b13bb: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,byte ptr [RAX + 0xf0] OR ECX,0x19 MOV byte ptr [RAX + 0xf0],CL MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x380],0x0 JNZ 0x001b13fa MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX + 0x380],0x1 MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0xec] ADD ECX,0x1 MOV dword ptr [RAX + 0xec],ECX LAB_001b13fa: MOV RAX,qword ptr [RBP + -0x20] CMP byte ptr [RAX + 0x382],0x0 JNZ 0x001b145f MOV RAX,qword ptr [RBP + -0x20] MOV EAX,dword ptr [RAX + 0xec] MOV dword ptr [RBP + -0x24],EAX MOV EAX,dword ptr [RBP + -0x24] MOV byte ptr [RBP + -0x12],AL MOV EAX,dword ptr [RBP + -0x24] SHR EAX,0x8 MOV byte ptr [RBP + -0x13],AL MOV byte ptr [RBP + -0x11],0x1 MOV RAX,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RAX + 0x350] LEA RCX,[RBP + -0x13] LEA RDI,[0x253aeb] MOV ESI,0x26f MOV R8D,0x3 MOV R9D,0x18 MOV qword ptr [RSP],0x4 CALL 0x001b1480 MOV dword ptr [RBP + -0x4],EAX JMP 0x001b146a LAB_001b145f: JMP 0x001b1461 LAB_001b1461: JMP 0x001b1463 LAB_001b1463: MOV dword ptr [RBP + -0x4],0x0 LAB_001b146a: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int4 _mi_mark_file_changed(long *param_1) { long lVar1; int4 uVar2; int1 local_1b; int1 local_1a; int1 local_19; long *local_18; lVar1 = *param_1; if (((*(byte *)(lVar1 + 0xf0) & 1) == 0) || (*(char *)(lVar1 + 0x380) == '\0')) { *(byte *)(lVar1 + 0xf0) = *(byte *)(lVar1 + 0xf0) | 0x19; if (*(char *)(lVar1 + 0x380) == '\0') { *(int1 *)(lVar1 + 0x380) = 1; *(int *)(lVar1 + 0xec) = *(int *)(lVar1 + 0xec) + 1; } if (*(char *)(lVar1 + 0x382) == '\0') { local_1a = (int1)*(int4 *)(lVar1 + 0xec); local_1b = (int1)((uint)*(int4 *)(lVar1 + 0xec) >> 8); local_19 = 1; local_18 = param_1; uVar2 = inline_mysql_file_pwrite ("/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_locking.c", 0x26f,*(int4 *)(lVar1 + 0x350),&local_1b,3,0x18,4); return uVar2; } } return 0; }
13,468
Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtLet const*) const
BhuvanGudi[P]LexiParse/src/generation.hpp
void operator()(const NodeStmtLet* stmt_let) const { gen.m_output << " ;; let\n"; if (std::ranges::find_if( std::as_const(gen.m_vars), [&](const Var& var) { return var.name == stmt_let->ident.value.value(); }) != gen.m_vars.cend()) { std::cerr << "Identifier already used: " << stmt_let->ident.value.value() << std::endl; exit(EXIT_FAILURE); } gen.m_vars.push_back({ .name = stmt_let->ident.value.value(), .stack_loc = gen.m_stack_size }); gen.gen_expr(stmt_let->expr); gen.m_output << " ;; /let\n"; }
O1
cpp
Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtLet const*) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x38, %rsp movq %rdi, %rbx leaq 0x8(%rsp), %r15 movq %rsi, (%r15) movq (%rdi), %rdi addq $0x28, %rdi leaq 0x1520(%rip), %rsi # 0x94c6 movl $0xb, %edx callq 0x2230 movq (%rbx), %rax movq 0x1a8(%rax), %r14 movq 0x1b0(%rax), %r12 movq %r15, 0x10(%rsp) cmpq %r12, %r14 je 0x7fe8 leaq 0x10(%rsp), %r15 movq %r15, %rdi movq %r14, %rsi callq 0x810e testb %al, %al jne 0x7fe8 addq $0x28, %r14 cmpq %r12, %r14 jne 0x7fd0 movq (%rbx), %r15 cmpq 0x1b0(%r15), %r14 jne 0x80a6 movq 0x8(%rsp), %rax cmpb $0x0, 0x28(%rax) je 0x80e7 addq $0x1a8, %r15 # imm = 0x1A8 leaq 0x20(%rsp), %r12 movq %r12, -0x10(%r12) movq 0x8(%rax), %rsi movq 0x10(%rax), %rdx addq %rsi, %rdx leaq 0x10(%rsp), %r14 movq %r14, %rdi callq 0x3d16 movq (%rbx), %rax movq 0x1a0(%rax), %rax movq %rax, 0x20(%r14) movq %r15, %rdi movq %r14, %rsi callq 0x814e movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0x8060 movq 0x20(%rsp), %rsi incq %rsi callq 0x2200 movq (%rbx), %rax movq 0x8(%rsp), %rcx movq 0x30(%rcx), %rsi leaq 0x10(%rsp), %rdi movq %rax, (%rdi) movzbl 0x8(%rsi), %eax leaq 0x4cb9(%rip), %rcx # 0xcd38 callq *(%rcx,%rax,8) movq (%rbx), %rdi addq $0x28, %rdi leaq 0x145c(%rip), %rsi # 0x94ec movl $0xc, %edx callq 0x2230 addq $0x38, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq 0x4f43(%rip), %rdi # 0xcff0 leaq 0x141e(%rip), %rsi # 0x94d2 callq 0x21e0 movq %rax, %rbx movq 0x8(%rsp), %rdi addq $0x8, %rdi callq 0x7776 movq %rbx, %rdi movq %rax, %rsi callq 0x21c0 movq %rax, %rdi callq 0x20e0 movl $0x1, %edi callq 0x2240 callq 0x38a0 movq %rax, %rbx movq 0x10(%rsp), %rdi cmpq %r12, %rdi je 0x8106 movq 0x20(%rsp), %rsi incq %rsi callq 0x2200 movq %rbx, %rdi callq 0x22d0
_ZZN9Generator8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK11NodeStmtLet: push r15 push r14 push r12 push rbx sub rsp, 38h mov rbx, rdi lea r15, [rsp+58h+var_50] mov [r15], rsi mov rdi, [rdi] add rdi, 28h ; '(' lea rsi, aLet_1; " ;; let\n" mov edx, 0Bh call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rax, [rbx] mov r14, [rax+1A8h] mov r12, [rax+1B0h] mov [rsp+58h+var_48], r15 cmp r14, r12 jz short loc_7FE8 lea r15, [rsp+58h+var_48] loc_7FD0: mov rdi, r15 mov rsi, r14 call _ZSt13__invoke_implIbRZZN9Generator8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK11NodeStmtLetEUlRKNS0_3VarEE_JSA_EET_St14__invoke_otherOT0_DpOT1_; std::__invoke_impl<bool,Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator() const(NodeStmtLet const*)::{lambda(Generator::Var const&)#1} &,Generator::Var const&>(std::__invoke_other,Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator() const(NodeStmtLet const*)::{lambda(Generator::Var const&)#1} &,Generator::Var const&) test al, al jnz short loc_7FE8 add r14, 28h ; '(' cmp r14, r12 jnz short loc_7FD0 loc_7FE8: mov r15, [rbx] cmp r14, [r15+1B0h] jnz loc_80A6 mov rax, [rsp+58h+var_50] cmp byte ptr [rax+28h], 0 jz loc_80E7 add r15, 1A8h lea r12, [rsp+58h+var_38] mov [r12-10h], r12 mov rsi, [rax+8] mov rdx, [rax+10h] add rdx, rsi lea r14, [rsp+58h+var_48] 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) mov rax, [rbx] mov rax, [rax+1A0h] mov [r14+20h], rax mov rdi, r15 mov rsi, r14 call _ZNSt6vectorIN9Generator3VarESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<Generator::Var>::emplace_back<Generator::Var>(Generator::Var &&) mov rdi, [rsp+58h+var_48]; void * cmp rdi, r12 jz short loc_8060 mov rsi, [rsp+58h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8060: mov rax, [rbx] mov rcx, [rsp+58h+var_50] mov rsi, [rcx+30h] lea rdi, [rsp+58h+var_48] mov [rdi], rax movzx eax, byte ptr [rsi+8] lea rcx, _ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE - 0CD38h)[rcx+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&) mov rdi, [rbx] add rdi, 28h ; '(' lea rsi, aLet_2; " ;; /let\n" mov edx, 0Ch call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) add rsp, 38h pop rbx pop r12 pop r14 pop r15 retn loc_80A6: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aIdentifierAlre; "Identifier already used: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov rdi, [rsp+58h+var_50] add rdi, 8 call _ZNKRSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5valueEv; std::optional<std::string>::value(void) mov rdi, rbx mov rsi, rax call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) mov edi, 1 call _exit loc_80E7: call _ZSt27__throw_bad_optional_accessv; std::__throw_bad_optional_access(void) mov rbx, rax mov rdi, [rsp+58h+var_48]; void * cmp rdi, r12 jz short loc_8106 mov rsi, [rsp+58h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8106: mov rdi, rbx call __Unwind_Resume
long long Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(long long *a1, long long a2) { long long v2; // r14 long long v3; // r12 long long v4; // r15 long long v5; // rsi long long v7; // rbx long long v8; // rax long long v9; // rax long long v10; // [rsp+8h] [rbp-50h] BYREF void *v11[2]; // [rsp+10h] [rbp-48h] BYREF _QWORD v12[7]; // [rsp+20h] [rbp-38h] BYREF v10 = a2; std::__ostream_insert<char,std::char_traits<char>>(*a1 + 40, " ;; let\n", 11LL); v2 = *(_QWORD *)(*a1 + 424); v3 = *(_QWORD *)(*a1 + 432); for ( v11[0] = &v10; v2 != v3; v2 += 40LL ) { if ( (unsigned __int8)std::__invoke_impl<bool,Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator() const(NodeStmtLet const*)::{lambda(Generator::Var const&)#1} &,Generator::Var const&>( v11, v2) ) break; } v4 = *a1; if ( v2 != *(_QWORD *)(*a1 + 432) ) { v7 = std::operator<<<std::char_traits<char>>(&std::cerr, "Identifier already used: "); v8 = std::optional<std::string>::value(v10 + 8); v9 = std::operator<<<char>(v7, v8); std::endl<char,std::char_traits<char>>(v9); exit(1LL); } if ( !*(_BYTE *)(v10 + 40) ) std::__throw_bad_optional_access(); v11[0] = v12; std::string::_M_construct<char *>((long long *)v11, *(_BYTE **)(v10 + 8), *(_QWORD *)(v10 + 8) + *(_QWORD *)(v10 + 16)); v12[2] = *(_QWORD *)(*a1 + 416); std::vector<Generator::Var>::emplace_back<Generator::Var>(v4 + 424, v11); if ( v11[0] != v12 ) operator delete(v11[0], v12[0] + 1LL); v5 = *(_QWORD *)(v10 + 48); v11[0] = (void *)*a1; ((void ( *)(long long *, long long))*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable + *(unsigned __int8 *)(v5 + 8)))( (long long *)v11, v5); return std::__ostream_insert<char,std::char_traits<char>>(*a1 + 40, " ;; /let\n", 12LL); }
operator(): PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x38 MOV RBX,RDI LEA R15,[RSP + 0x8] MOV qword ptr [R15],RSI MOV RDI,qword ptr [RDI] ADD RDI,0x28 LEA RSI,[0x1094c6] MOV EDX,0xb CALL 0x00102230 MOV RAX,qword ptr [RBX] MOV R14,qword ptr [RAX + 0x1a8] MOV R12,qword ptr [RAX + 0x1b0] MOV qword ptr [RSP + 0x10],R15 CMP R14,R12 JZ 0x00107fe8 LEA R15,[RSP + 0x10] LAB_00107fd0: MOV RDI,R15 MOV RSI,R14 CALL 0x0010810e TEST AL,AL JNZ 0x00107fe8 ADD R14,0x28 CMP R14,R12 JNZ 0x00107fd0 LAB_00107fe8: MOV R15,qword ptr [RBX] CMP R14,qword ptr [R15 + 0x1b0] JNZ 0x001080a6 MOV RAX,qword ptr [RSP + 0x8] CMP byte ptr [RAX + 0x28],0x0 JZ 0x001080e7 ADD R15,0x1a8 LEA R12,[RSP + 0x20] MOV qword ptr [R12 + -0x10],R12 MOV RSI,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RAX + 0x10] ADD RDX,RSI LEA R14,[RSP + 0x10] MOV RDI,R14 CALL 0x00103d16 MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + 0x1a0] MOV qword ptr [R14 + 0x20],RAX LAB_0010803e: MOV RDI,R15 MOV RSI,R14 CALL 0x0010814e LAB_00108049: MOV RDI,qword ptr [RSP + 0x10] CMP RDI,R12 JZ 0x00108060 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x00102200 LAB_00108060: MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RCX + 0x30] LEA RDI,[RSP + 0x10] MOV qword ptr [RDI],RAX MOVZX EAX,byte ptr [RSI + 0x8] LEA RCX,[0x10cd38] CALL qword ptr [RCX + RAX*0x8] MOV RDI,qword ptr [RBX] ADD RDI,0x28 LEA RSI,[0x1094ec] MOV EDX,0xc CALL 0x00102230 ADD RSP,0x38 POP RBX POP R12 POP R14 POP R15 RET LAB_001080a6: MOV RDI,qword ptr [0x0010cff0] LEA RSI,[0x1094d2] CALL 0x001021e0 MOV RBX,RAX MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x8 CALL 0x00107776 MOV RDI,RBX MOV RSI,RAX CALL 0x001021c0 MOV RDI,RAX CALL 0x001020e0 MOV EDI,0x1 CALL 0x00102240 LAB_001080e7: CALL 0x001038a0
/* Generator::gen_stmt(NodeStmt const*)::StmtVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeStmtLet const*) const */ void __thiscall Generator::gen_stmt(NodeStmt_const*)::StmtVisitor::operator() (StmtVisitor *this,NodeStmtLet *param_1) { long lVar1; bool bVar2; ostream *poVar3; string *psVar4; long lVar5; NodeStmtLet *local_50; NodeStmtLet **local_48 [2]; NodeStmtLet *local_38 [2]; int8 local_28; local_50 = param_1; std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(*(long *)this + 0x28)," ;; let\n",0xb); lVar5 = *(long *)(*(long *)this + 0x1a8); lVar1 = *(long *)(*(long *)this + 0x1b0); local_48[0] = &local_50; if (lVar5 != lVar1) { do { bVar2 = std::operator()(local_48,lVar5); if (bVar2) break; lVar5 = lVar5 + 0x28; } while (lVar5 != lVar1); } lVar1 = *(long *)this; if (lVar5 != *(long *)(lVar1 + 0x1b0)) { poVar3 = std::operator<<((ostream *)PTR_cerr_0010cff0,"Identifier already used: "); psVar4 = (string *) std::optional<std::__cxx11::string>::value ((optional<std::__cxx11::string> *)(local_50 + 8)); poVar3 = std::operator<<(poVar3,psVar4); std::endl<char,std::char_traits<char>>(poVar3); /* WARNING: Subroutine does not return */ exit(1); } if (local_50[0x28] != (NodeStmtLet)0x0) { local_48[0] = local_38; std::__cxx11::string::_M_construct<char*> ((Var *)local_48,*(long *)(local_50 + 8), *(long *)(local_50 + 0x10) + *(long *)(local_50 + 8)); local_28 = *(int8 *)(*(long *)this + 0x1a0); /* try { // try from 0010803e to 00108048 has its CatchHandler @ 001080ec */ std::vector<Generator::Var,std::allocator<Generator::Var>>::emplace_back<Generator::Var> ((vector<Generator::Var,std::allocator<Generator::Var>> *)(lVar1 + 0x1a8), (Var *)local_48); if (local_48[0] != local_38) { operator_delete(local_48[0],(ulong)(local_38[0] + 1)); } local_48[0] = *(NodeStmtLet ***)this; (**(code **)(std::__detail::__variant:: __gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr_const*)::ExprVisitor&,std::variant<NodeTerm*,NodeBinExpr*>const&> ::_S_vtable + (ulong)*(byte *)(*(long *)(local_50 + 0x30) + 8) * 8))(); std::__ostream_insert<char,std::char_traits<char>> ((ostream *)(*(long *)this + 0x28)," ;; /let\n",0xc); return; } /* WARNING: Subroutine does not return */ std::__throw_bad_optional_access(); }
13,469
Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtLet const*) const
BhuvanGudi[P]LexiParse/src/generation.hpp
void operator()(const NodeStmtLet* stmt_let) const { gen.m_output << " ;; let\n"; if (std::ranges::find_if( std::as_const(gen.m_vars), [&](const Var& var) { return var.name == stmt_let->ident.value.value(); }) != gen.m_vars.cend()) { std::cerr << "Identifier already used: " << stmt_let->ident.value.value() << std::endl; exit(EXIT_FAILURE); } gen.m_vars.push_back({ .name = stmt_let->ident.value.value(), .stack_loc = gen.m_stack_size }); gen.gen_expr(stmt_let->expr); gen.m_output << " ;; /let\n"; }
O2
cpp
Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(NodeStmtLet const*) const: pushq %r15 pushq %r14 pushq %rbx subq $0x30, %rsp movq %rdi, %rbx movq %rsp, %r14 movq %rsi, (%r14) movq (%rdi), %rdi addq $0x28, %rdi leaq 0x1dda(%rip), %rsi # 0x849a callq 0x21a0 movl $0x1a8, %esi # imm = 0x1A8 addq (%rbx), %rsi leaq 0x1ec6(%rip), %rdi # 0x859a movq %r14, %rdx callq 0x67c8 movq (%rbx), %r14 cmpq 0x1b0(%r14), %rax jne 0x6774 addq $0x1a8, %r14 # imm = 0x1A8 movq (%rsp), %rdi addq $0x8, %rdi callq 0x5f96 leaq 0x8(%rsp), %r15 movq %r15, %rdi movq %rax, %rsi callq 0x397a movq (%rbx), %rax movq 0x1a0(%rax), %rax movq %rax, 0x20(%r15) movq %r14, %rdi movq %r15, %rsi callq 0x6838 leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x27ea movq (%rbx), %rax movq (%rsp), %rcx movq 0x30(%rcx), %rsi movq %rax, (%r14) movzbl 0x8(%rsi), %eax leaq 0x65f1(%rip), %rcx # 0xcd40 leaq 0x8(%rsp), %rdi callq *(%rcx,%rax,8) movq (%rbx), %rdi addq $0x28, %rdi leaq 0x1d5b(%rip), %rsi # 0x84c0 callq 0x21a0 addq $0x30, %rsp popq %rbx popq %r14 popq %r15 retq movq 0x6875(%rip), %rdi # 0xcff0 leaq 0x1d24(%rip), %rsi # 0x84a6 callq 0x21a0 movq %rax, %rbx movq (%rsp), %rdi addq $0x8, %rdi callq 0x5f96 movq %rbx, %rdi movq %rax, %rsi callq 0x2190 movq %rax, %rdi callq 0x20c0 pushq $0x1 popq %rdi callq 0x21e0 movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x27ea movq %rbx, %rdi callq 0x2270 nop
_ZZN9Generator8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK11NodeStmtLet: push r15 push r14 push rbx sub rsp, 30h mov rbx, rdi mov r14, rsp mov [r14], rsi mov rdi, [rdi] add rdi, 28h ; '(' lea rsi, aLet_1; " ;; let\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov esi, 1A8h add rsi, [rbx] lea rdi, _ZNSt6ranges7find_ifE; std::ranges::find_if mov rdx, r14 call _ZNKSt6ranges12__find_if_fnclITkNS_11input_rangeERKSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK11NodeStmtLetEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISC_EESE_NS_8danglingEE4typeEOSC_T1_SF_ mov r14, [rbx] cmp rax, [r14+1B0h] jnz loc_6774 add r14, 1A8h mov rdi, [rsp+48h+var_48] add rdi, 8 call _ZNKRSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5valueEv; std::optional<std::string>::value(void) lea r15, [rsp+48h+var_40] mov rdi, r15 mov rsi, rax call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2ERKS4_; std::string::basic_string(std::string const&) mov rax, [rbx] mov rax, [rax+1A0h] mov [r15+20h], rax mov rdi, r14 mov rsi, r15 call _ZNSt6vectorIN9Generator3VarESaIS1_EE12emplace_backIJS1_EEERS1_DpOT_; std::vector<Generator::Var>::emplace_back<Generator::Var>(Generator::Var &&) lea r14, [rsp+48h+var_40] mov rdi, r14 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, [rbx] mov rcx, [rsp+48h+var_48] mov rsi, [rcx+30h] mov [r14], rax movzx eax, byte ptr [rsi+8] lea rcx, _ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE; std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable lea rdi, [rsp+48h+var_40] call ds:(_ZNSt8__detail9__variant12__gen_vtableINS0_21__deduce_visit_resultIvEERZN9Generator8gen_exprEPK8NodeExprE11ExprVisitorJRKSt7variantIJP8NodeTermP11NodeBinExprEEEE9_S_vtableE - 0CD40h)[rcx+rax*8]; std::__detail::__variant::__gen_vtable_impl<std::__detail::__variant::_Multi_array<std::__detail::__variant::__deduce_visit_result<void> (*)(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&)>,std::integer_sequence<ulong,0ul>>::__visit_invoke(Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&) mov rdi, [rbx] add rdi, 28h ; '(' lea rsi, aLet_2; " ;; /let\n" call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) add rsp, 30h pop rbx pop r14 pop r15 retn loc_6774: mov rdi, cs:_ZSt4cerr_ptr lea rsi, aIdentifierAlre; "Identifier already used: " call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) mov rbx, rax mov rdi, [rsp+48h+var_48] add rdi, 8 call _ZNKRSt8optionalINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE5valueEv; std::optional<std::string>::value(void) mov rdi, rbx mov rsi, rax call __ZStlsIcSt11char_traitsIcESaIcEERSt13basic_ostreamIT_T0_ES7_RKNSt7__cxx1112basic_stringIS4_S5_T1_EE; std::operator<<<char>(std::ostream &,std::string const&) mov rdi, rax call __ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_; std::endl<char,std::char_traits<char>>(std::ostream &) push 1 pop rdi call _exit mov rbx, rax lea rdi, [rsp+48h+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long Generator::gen_stmt(NodeStmt const*)::StmtVisitor::operator()(long long *a1, long long a2, long long a3) { long long if_fnclITkNS_11input_rangeERKSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK11NodeStmtLetEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISC_EESE_NS_8danglingEE4typeEOSC_T1_SF; // rax long long v4; // rdx long long v5; // r14 _QWORD *v6; // rax long long v7; // rsi long long v8; // rdx long long v10; // rbx long long v11; // rax long long v12; // rax long long v13; // [rsp+0h] [rbp-48h] BYREF _QWORD v14[8]; // [rsp+8h] [rbp-40h] BYREF v13 = a2; std::operator<<<std::char_traits<char>>(*a1 + 40, " ;; let\n", a3); if_fnclITkNS_11input_rangeERKSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK11NodeStmtLetEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISC_EESE_NS_8danglingEE4typeEOSC_T1_SF = ZNKSt6ranges12__find_if_fnclITkNS_11input_rangeERKSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK11NodeStmtLetEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISC_EESE_NS_8danglingEE4typeEOSC_T1_SF_(&std::ranges::find_if, *a1 + 424, &v13); v5 = *a1; if ( if_fnclITkNS_11input_rangeERKSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK11NodeStmtLetEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISC_EESE_NS_8danglingEE4typeEOSC_T1_SF != *(_QWORD *)(*a1 + 432) ) { v10 = std::operator<<<std::char_traits<char>>(&std::cerr, "Identifier already used: ", v4); v11 = std::optional<std::string>::value(v13 + 8); v12 = std::operator<<<char>(v10, v11); std::endl<char,std::char_traits<char>>(v12); exit(1LL); } v6 = (_QWORD *)std::optional<std::string>::value(v13 + 8); std::string::basic_string(v14, v6); v14[4] = *(_QWORD *)(*a1 + 416); std::vector<Generator::Var>::emplace_back<Generator::Var>(v5 + 424, v14); std::string::~string(); v7 = *(_QWORD *)(v13 + 48); v14[0] = *a1; ((void ( *)(_QWORD *))*(&std::__detail::__variant::__gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr const*)::ExprVisitor &,std::variant<NodeTerm *,NodeBinExpr *> const&>::_S_vtable + *(unsigned __int8 *)(v7 + 8)))(v14); return std::operator<<<std::char_traits<char>>(*a1 + 40, " ;; /let\n", v8); }
operator(): PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x30 MOV RBX,RDI MOV R14,RSP MOV qword ptr [R14],RSI MOV RDI,qword ptr [RDI] ADD RDI,0x28 LEA RSI,[0x10849a] CALL 0x001021a0 MOV ESI,0x1a8 ADD RSI,qword ptr [RBX] LEA RDI,[0x10859a] MOV RDX,R14 CALL 0x001067c8 MOV R14,qword ptr [RBX] CMP RAX,qword ptr [R14 + 0x1b0] JNZ 0x00106774 ADD R14,0x1a8 MOV RDI,qword ptr [RSP] ADD RDI,0x8 CALL 0x00105f96 LEA R15,[RSP + 0x8] MOV RDI,R15 MOV RSI,RAX CALL 0x0010397a MOV RAX,qword ptr [RBX] MOV RAX,qword ptr [RAX + 0x1a0] MOV qword ptr [R15 + 0x20],RAX LAB_0010671e: MOV RDI,R14 MOV RSI,R15 CALL 0x00106838 LAB_00106729: LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x001027ea MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RSP] MOV RSI,qword ptr [RCX + 0x30] MOV qword ptr [R14],RAX MOVZX EAX,byte ptr [RSI + 0x8] LEA RCX,[0x10cd40] LEA RDI,[RSP + 0x8] CALL qword ptr [RCX + RAX*0x8] MOV RDI,qword ptr [RBX] ADD RDI,0x28 LEA RSI,[0x1084c0] CALL 0x001021a0 ADD RSP,0x30 POP RBX POP R14 POP R15 RET LAB_00106774: MOV RDI,qword ptr [0x0010cff0] LEA RSI,[0x1084a6] CALL 0x001021a0 MOV RBX,RAX MOV RDI,qword ptr [RSP] ADD RDI,0x8 CALL 0x00105f96 MOV RDI,RBX MOV RSI,RAX CALL 0x00102190 MOV RDI,RAX CALL 0x001020c0 PUSH 0x1 POP RDI CALL 0x001021e0
/* Generator::gen_stmt(NodeStmt const*)::StmtVisitor::TEMPNAMEPLACEHOLDERVALUE(NodeStmtLet const*) const */ void __thiscall Generator::gen_stmt(NodeStmt_const*)::StmtVisitor::operator() (StmtVisitor *this,NodeStmtLet *param_1) { long lVar1; long lVar2; string *psVar3; ostream *poVar4; NodeStmtLet *local_48; int8 local_40 [4]; int8 local_20; local_48 = param_1; std::operator<<((ostream *)(*(long *)this + 0x28)," ;; let\n"); lVar2 = _ZNKSt6ranges12__find_if_fnclITkNS_11input_rangeERKSt6vectorIN9Generator3VarESaIS4_EESt8identityTkSt24indirect_unary_predicateISt9projectedIDTclsr6ranges13__cust_accessE7__beginclsr3stdE7declvalIRT_EEEET0_EEZZNS3_8gen_stmtEPK8NodeStmtENK11StmtVisitorclEPK11NodeStmtLetEUlRKS4_E_EENSt11conditionalIX14borrowed_rangeISC_EESE_NS_8danglingEE4typeEOSC_T1_SF_ (&std::ranges::find_if,*(long *)this + 0x1a8,&local_48); lVar1 = *(long *)this; if (lVar2 == *(long *)(lVar1 + 0x1b0)) { psVar3 = (string *)std::optional<std::__cxx11::string>::value(); std::__cxx11::string::string((string *)local_40,psVar3); local_20 = *(int8 *)(*(long *)this + 0x1a0); /* try { // try from 0010671e to 00106728 has its CatchHandler @ 001067b2 */ std::vector<Generator::Var,std::allocator<Generator::Var>>::emplace_back<Generator::Var> ((vector<Generator::Var,std::allocator<Generator::Var>> *)(lVar1 + 0x1a8), (Var *)local_40); std::__cxx11::string::~string((string *)local_40); local_40[0] = *(int8 *)this; (**(code **)(std::__detail::__variant:: __gen_vtable<std::__detail::__variant::__deduce_visit_result<void>,Generator::gen_expr(NodeExpr_const*)::ExprVisitor&,std::variant<NodeTerm*,NodeBinExpr*>const&> ::_S_vtable + (ulong)*(byte *)(*(long *)(local_48 + 0x30) + 8) * 8))(local_40); std::operator<<((ostream *)(*(long *)this + 0x28)," ;; /let\n"); return; } poVar4 = std::operator<<((ostream *)PTR_cerr_0010cff0,"Identifier already used: "); psVar3 = (string *)std::optional<std::__cxx11::string>::value(); poVar4 = std::operator<<(poVar4,psVar3); std::endl<char,std::char_traits<char>>(poVar4); /* WARNING: Subroutine does not return */ exit(1); }
13,470
ast_create_set
tsotchke[P]eshkol/src/frontend/ast/create/ast_create.c
AstNode* ast_create_set(Arena* arena, AstNode* name, AstNode* value, size_t line, size_t column) { AstNode* node = ast_create_node(arena, AST_SET, line, column); if (!node) { return NULL; } node->as.set.name = name; node->as.set.value = value; return node; }
O3
c
ast_create_set: pushq %r14 pushq %rbx pushq %rax movq %rdx, %rbx movq %rsi, %r14 movl $0xc, %esi movq %rcx, %rdx movq %r8, %rcx callq 0xa65c testq %rax, %rax je 0xa8c1 movq %r14, 0x48(%rax) movq %rbx, 0x50(%rax) addq $0x8, %rsp popq %rbx popq %r14 retq
ast_create_set: push r14 push rbx push rax mov rbx, rdx mov r14, rsi mov esi, 0Ch mov rdx, rcx mov rcx, r8 call ast_create_node test rax, rax jz short loc_A8C1 mov [rax+48h], r14 mov [rax+50h], rbx loc_A8C1: add rsp, 8 pop rbx pop r14 retn
long long ast_create_set(long long a1, long long a2, long long a3, long long a4, long long a5) { long long result; // rax result = ast_create_node(a1, 12, a4, a5); if ( result ) { *(_QWORD *)(result + 72) = a2; *(_QWORD *)(result + 80) = a3; } return result; }
ast_create_set: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDX MOV R14,RSI MOV ESI,0xc MOV RDX,RCX MOV RCX,R8 CALL 0x0010a65c TEST RAX,RAX JZ 0x0010a8c1 MOV qword ptr [RAX + 0x48],R14 MOV qword ptr [RAX + 0x50],RBX LAB_0010a8c1: ADD RSP,0x8 POP RBX POP R14 RET
void ast_create_set(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5) { long lVar1; lVar1 = ast_create_node(param_1,0xc,param_4,param_5); if (lVar1 != 0) { *(int8 *)(lVar1 + 0x48) = param_2; *(int8 *)(lVar1 + 0x50) = param_3; } return; }
13,471
wait_for_free_space
eloqsql/mysys/errors.c
void wait_for_free_space(const char *filename, int errors) { if (errors == 0) my_error(EE_DISK_FULL,MYF(ME_BELL | ME_ERROR_LOG | ME_WARNING), filename,my_errno,MY_WAIT_FOR_USER_TO_FIX_PANIC); if (!(errors % MY_WAIT_GIVE_USER_A_MESSAGE)) my_printf_error(EE_DISK_FULL, "Retry in %d secs. Message reprinted in %d secs", MYF(ME_BELL | ME_ERROR_LOG | ME_WARNING), MY_WAIT_FOR_USER_TO_FIX_PANIC, MY_WAIT_GIVE_USER_A_MESSAGE * MY_WAIT_FOR_USER_TO_FIX_PANIC ); (void) sleep(MY_WAIT_FOR_USER_TO_FIX_PANIC); }
O0
c
wait_for_free_space: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) cmpl $0x0, -0xc(%rbp) jne 0x30f1f movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) callq 0x2bad0 movq -0x18(%rbp), %rdx movl (%rax), %ecx movl $0x14, %edi movl $0x844, %esi # imm = 0x844 movl $0x3c, %r8d movb $0x0, %al callq 0x27d80 movl -0xc(%rbp), %eax movl $0xa, %ecx cltd idivl %ecx cmpl $0x0, %edx jne 0x30f52 movl $0x14, %edi leaq 0x4c459(%rip), %rsi # 0x7d394 movl $0x844, %edx # imm = 0x844 movl $0x3c, %ecx movl $0x258, %r8d # imm = 0x258 movb $0x0, %al callq 0x27ed0 movl $0x3c, %edi callq 0x24230 addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
wait_for_free_space: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_C], esi cmp [rbp+var_C], 0 jnz short loc_30F1F mov rax, [rbp+var_8] mov [rbp+var_18], rax call _my_thread_var mov rdx, [rbp+var_18] mov ecx, [rax] mov edi, 14h mov esi, 844h mov r8d, 3Ch ; '<' mov al, 0 call my_error loc_30F1F: mov eax, [rbp+var_C] mov ecx, 0Ah cdq idiv ecx cmp edx, 0 jnz short loc_30F52 mov edi, 14h lea rsi, aRetryInDSecsMe; "Retry in %d secs. Message reprinted in "... mov edx, 844h mov ecx, 3Ch ; '<' mov r8d, 258h mov al, 0 call my_printf_error loc_30F52: mov edi, 3Ch ; '<' call _sleep add rsp, 20h pop rbp retn
long long wait_for_free_space(long long a1, int a2) { unsigned int *v2; // rax if ( !a2 ) { v2 = (unsigned int *)my_thread_var(); my_error(0x14u, 2116LL, a1, *v2, 60LL); } if ( !(a2 % 10) ) my_printf_error(20, (long long)"Retry in %d secs. Message reprinted in %d secs", 2116LL, 60LL, 600LL); return sleep(60LL); }
wait_for_free_space: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI CMP dword ptr [RBP + -0xc],0x0 JNZ 0x00130f1f MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX CALL 0x0012bad0 MOV RDX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RAX] MOV EDI,0x14 MOV ESI,0x844 MOV R8D,0x3c MOV AL,0x0 CALL 0x00127d80 LAB_00130f1f: MOV EAX,dword ptr [RBP + -0xc] MOV ECX,0xa CDQ IDIV ECX CMP EDX,0x0 JNZ 0x00130f52 MOV EDI,0x14 LEA RSI,[0x17d394] MOV EDX,0x844 MOV ECX,0x3c MOV R8D,0x258 MOV AL,0x0 CALL 0x00127ed0 LAB_00130f52: MOV EDI,0x3c CALL 0x00124230 ADD RSP,0x20 POP RBP RET
void wait_for_free_space(int8 param_1,int param_2) { int4 *puVar1; if (param_2 == 0) { puVar1 = (int4 *)_my_thread_var(); my_error(0x14,0x844,param_1,*puVar1,0x3c); } if (param_2 % 10 == 0) { my_printf_error(0x14,"Retry in %d secs. Message reprinted in %d secs",0x844,0x3c,600); } sleep(0x3c); return; }
13,472
js_realloc_array
bluesky950520[P]quickjs/quickjs.c
static no_inline int js_realloc_array(JSContext *ctx, void **parray, int elem_size, int *psize, int req_size) { int new_size; size_t slack; void *new_array; /* XXX: potential arithmetic overflow */ new_size = max_int(req_size, *psize * 3 / 2); new_array = js_realloc2(ctx, *parray, new_size * elem_size, &slack); if (!new_array) return -1; new_size += slack / elem_size; *psize = new_size; *parray = new_array; return 0; }
O0
c
js_realloc_array: subq $0x48, %rsp movq %rdi, 0x38(%rsp) movq %rsi, 0x30(%rsp) movl %edx, 0x2c(%rsp) movq %rcx, 0x20(%rsp) movl %r8d, 0x1c(%rsp) movl 0x1c(%rsp), %edi movq 0x20(%rsp), %rax imull $0x3, (%rax), %eax movl $0x2, %ecx cltd idivl %ecx movl %eax, %esi callq 0x5d310 movl %eax, 0x18(%rsp) movq 0x38(%rsp), %rdi movq 0x30(%rsp), %rax movq (%rax), %rsi movl 0x18(%rsp), %eax imull 0x2c(%rsp), %eax movslq %eax, %rdx leaq 0x10(%rsp), %rcx callq 0x21e80 movq %rax, 0x8(%rsp) cmpq $0x0, 0x8(%rsp) jne 0x73225 movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF jmp 0x73263 movq 0x10(%rsp), %rax movslq 0x2c(%rsp), %rcx xorl %edx, %edx divq %rcx movq %rax, %rcx movslq 0x18(%rsp), %rax addq %rcx, %rax movl %eax, 0x18(%rsp) movl 0x18(%rsp), %ecx movq 0x20(%rsp), %rax movl %ecx, (%rax) movq 0x8(%rsp), %rcx movq 0x30(%rsp), %rax movq %rcx, (%rax) movl $0x0, 0x44(%rsp) movl 0x44(%rsp), %eax addq $0x48, %rsp retq nopl (%rax)
js_realloc_array: sub rsp, 48h mov [rsp+48h+var_10], rdi mov [rsp+48h+var_18], rsi mov [rsp+48h+var_1C], edx mov [rsp+48h+var_28], rcx mov [rsp+48h+var_2C], r8d mov edi, [rsp+48h+var_2C] mov rax, [rsp+48h+var_28] imul eax, [rax], 3 mov ecx, 2 cdq idiv ecx mov esi, eax call max_int_0 mov [rsp+48h+var_30], eax mov rdi, [rsp+48h+var_10] mov rax, [rsp+48h+var_18] mov rsi, [rax] mov eax, [rsp+48h+var_30] imul eax, [rsp+48h+var_1C] movsxd rdx, eax lea rcx, [rsp+48h+var_38] call js_realloc2 mov [rsp+48h+var_40], rax cmp [rsp+48h+var_40], 0 jnz short loc_73225 mov [rsp+48h+var_4], 0FFFFFFFFh jmp short loc_73263 loc_73225: mov rax, [rsp+48h+var_38] movsxd rcx, [rsp+48h+var_1C] xor edx, edx div rcx mov rcx, rax movsxd rax, [rsp+48h+var_30] add rax, rcx mov [rsp+48h+var_30], eax mov ecx, [rsp+48h+var_30] mov rax, [rsp+48h+var_28] mov [rax], ecx mov rcx, [rsp+48h+var_40] mov rax, [rsp+48h+var_18] mov [rax], rcx mov [rsp+48h+var_4], 0 loc_73263: mov eax, [rsp+48h+var_4] add rsp, 48h retn
long long js_realloc_array(long long a1, long long *a2, int a3, _DWORD *a4, unsigned int a5) { long long v6; // [rsp+8h] [rbp-40h] unsigned long long v7; // [rsp+10h] [rbp-38h] BYREF int v8; // [rsp+18h] [rbp-30h] unsigned int v9; // [rsp+1Ch] [rbp-2Ch] _DWORD *v10; // [rsp+20h] [rbp-28h] int v11; // [rsp+2Ch] [rbp-1Ch] long long *v12; // [rsp+30h] [rbp-18h] long long v13; // [rsp+38h] [rbp-10h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v9 = a5; v8 = max_int_0(a5, 3 * *a4 / 2); v6 = js_realloc2(a1, *a2, v11 * v8, &v7); if ( v6 ) { v8 += v7 / v11; *v10 = v8; *v12 = v6; return 0; } else { return (unsigned int)-1; } }
js_realloc_array: SUB RSP,0x48 MOV qword ptr [RSP + 0x38],RDI MOV qword ptr [RSP + 0x30],RSI MOV dword ptr [RSP + 0x2c],EDX MOV qword ptr [RSP + 0x20],RCX MOV dword ptr [RSP + 0x1c],R8D MOV EDI,dword ptr [RSP + 0x1c] MOV RAX,qword ptr [RSP + 0x20] IMUL EAX,dword ptr [RAX],0x3 MOV ECX,0x2 CDQ IDIV ECX MOV ESI,EAX CALL 0x0015d310 MOV dword ptr [RSP + 0x18],EAX MOV RDI,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x30] MOV RSI,qword ptr [RAX] MOV EAX,dword ptr [RSP + 0x18] IMUL EAX,dword ptr [RSP + 0x2c] MOVSXD RDX,EAX LEA RCX,[RSP + 0x10] CALL 0x00121e80 MOV qword ptr [RSP + 0x8],RAX CMP qword ptr [RSP + 0x8],0x0 JNZ 0x00173225 MOV dword ptr [RSP + 0x44],0xffffffff JMP 0x00173263 LAB_00173225: MOV RAX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RSP + 0x2c] XOR EDX,EDX DIV RCX MOV RCX,RAX MOVSXD RAX,dword ptr [RSP + 0x18] ADD RAX,RCX MOV dword ptr [RSP + 0x18],EAX MOV ECX,dword ptr [RSP + 0x18] MOV RAX,qword ptr [RSP + 0x20] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RAX],RCX MOV dword ptr [RSP + 0x44],0x0 LAB_00173263: MOV EAX,dword ptr [RSP + 0x44] ADD RSP,0x48 RET
int4 js_realloc_array(int8 param_1,long *param_2,int param_3,int *param_4,int4 param_5) { long lVar1; ulong local_38; int local_30; int4 local_2c; int *local_28; int local_1c; long *local_18; int8 local_10; int4 local_4; local_2c = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_30 = max_int(param_5,(long)(*param_4 * 3) / 2 & 0xffffffff, (long)(*param_4 * 3) % 2 & 0xffffffff); lVar1 = js_realloc2(local_10,*local_18,(long)(local_30 * local_1c),&local_38); if (lVar1 == 0) { local_4 = 0xffffffff; } else { *local_28 = local_30 + (int)(local_38 / (ulong)(long)local_1c); *local_18 = lVar1; local_4 = 0; } return local_4; }
13,473
js_realloc_array
bluesky950520[P]quickjs/quickjs.c
static no_inline int js_realloc_array(JSContext *ctx, void **parray, int elem_size, int *psize, int req_size) { int new_size; size_t slack; void *new_array; /* XXX: potential arithmetic overflow */ new_size = max_int(req_size, *psize * 3 / 2); new_array = js_realloc2(ctx, *parray, new_size * elem_size, &slack); if (!new_array) return -1; new_size += slack / elem_size; *psize = new_size; *parray = new_array; return 0; }
O1
c
js_realloc_array: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movl %edx, %ebp movq %rsi, %r14 movl (%rcx), %eax leal (%rax,%rax,2), %eax movl %eax, %r15d shrl $0x1f, %r15d addl %eax, %r15d sarl %r15d cmpl %r15d, %r8d cmovgl %r8d, %r15d movq (%rsi), %rsi movl %r15d, %eax imull %edx, %eax movslq %eax, %rdx movq %rsp, %rcx callq 0x1cc0f testq %rax, %rax je 0x4354b movq %rax, %rcx movq (%rsp), %rax movl %ebp, %edi xorl %esi, %esi xorl %edx, %edx divq %rdi addl %eax, %r15d movl %r15d, (%rbx) movq %rcx, (%r14) jmp 0x43550 movl $0xffffffff, %esi # imm = 0xFFFFFFFF movl %esi, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
js_realloc_array: push rbp push r15 push r14 push rbx push rax mov rbx, rcx mov ebp, edx mov r14, rsi mov eax, [rcx] lea eax, [rax+rax*2] mov r15d, eax shr r15d, 1Fh add r15d, eax sar r15d, 1 cmp r8d, r15d cmovg r15d, r8d mov rsi, [rsi] mov eax, r15d imul eax, edx movsxd rdx, eax mov rcx, rsp call js_realloc2 test rax, rax jz short loc_4354B mov rcx, rax mov rax, [rsp+28h+var_28] mov edi, ebp xor esi, esi xor edx, edx div rdi add r15d, eax mov [rbx], r15d mov [r14], rcx jmp short loc_43550 loc_4354B: mov esi, 0FFFFFFFFh loc_43550: mov eax, esi add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long js_realloc_array(long long a1, long long *a2, unsigned int a3, _DWORD *a4, int a5) { unsigned long long v5; // rax int v9; // r15d long long v10; // rax unsigned int v11; // esi unsigned long long v13[5]; // [rsp+0h] [rbp-28h] BYREF v13[0] = v5; v9 = 3 * *a4 / 2; if ( a5 > v9 ) v9 = a5; v10 = js_realloc2(a1, *a2, (int)(a3 * v9), v13); if ( v10 ) { v11 = 0; *a4 = v13[0] / a3 + v9; *a2 = v10; } else { return (unsigned int)-1; } return v11; }
js_realloc_array: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV EBP,EDX MOV R14,RSI MOV EAX,dword ptr [RCX] LEA EAX,[RAX + RAX*0x2] MOV R15D,EAX SHR R15D,0x1f ADD R15D,EAX SAR R15D,0x1 CMP R8D,R15D CMOVG R15D,R8D MOV RSI,qword ptr [RSI] MOV EAX,R15D IMUL EAX,EDX MOVSXD RDX,EAX MOV RCX,RSP CALL 0x0011cc0f TEST RAX,RAX JZ 0x0014354b MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV EDI,EBP XOR ESI,ESI XOR EDX,EDX DIV RDI ADD R15D,EAX MOV dword ptr [RBX],R15D MOV qword ptr [R14],RCX JMP 0x00143550 LAB_0014354b: MOV ESI,0xffffffff LAB_00143550: MOV EAX,ESI ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int8 js_realloc_array(int8 param_1,long *param_2,uint param_3,int *param_4,int param_5) { ulong in_RAX; long lVar1; int8 uVar2; int iVar3; ulong local_28; iVar3 = (*param_4 * 3) / 2; if (iVar3 < param_5) { iVar3 = param_5; } local_28 = in_RAX; lVar1 = js_realloc2(param_1,*param_2,(long)(int)(iVar3 * param_3),&local_28); if (lVar1 == 0) { uVar2 = 0xffffffff; } else { uVar2 = 0; *param_4 = iVar3 + (int)(local_28 / param_3); *param_2 = lVar1; } return uVar2; }
13,474
js_realloc_array
bluesky950520[P]quickjs/quickjs.c
static no_inline int js_realloc_array(JSContext *ctx, void **parray, int elem_size, int *psize, int req_size) { int new_size; size_t slack; void *new_array; /* XXX: potential arithmetic overflow */ new_size = max_int(req_size, *psize * 3 / 2); new_array = js_realloc2(ctx, *parray, new_size * elem_size, &slack); if (!new_array) return -1; new_size += slack / elem_size; *psize = new_size; *parray = new_array; return 0; }
O2
c
js_realloc_array: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rcx, %rbx movl %edx, %r15d movq %rsi, %r14 imull $0x3, (%rcx), %eax pushq $0x2 popq %rcx cltd idivl %ecx movl %eax, %ebp cmpl %eax, %r8d cmovgl %r8d, %ebp movq (%rsi), %rsi movl %ebp, %eax imull %r15d, %eax movslq %eax, %rdx movq %rsp, %rcx callq 0x172b1 testq %rax, %rax je 0x3b14c movq %rax, %rcx movq (%rsp), %rax movl %r15d, %edi xorl %esi, %esi xorl %edx, %edx divq %rdi addl %eax, %ebp movl %ebp, (%rbx) movq %rcx, (%r14) jmp 0x3b14f pushq $-0x1 popq %rsi movl %esi, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
js_realloc_array: push rbp push r15 push r14 push rbx push rax mov rbx, rcx mov r15d, edx mov r14, rsi imul eax, [rcx], 3 push 2 pop rcx cdq idiv ecx mov ebp, eax cmp r8d, eax cmovg ebp, r8d mov rsi, [rsi] mov eax, ebp imul eax, r15d movsxd rdx, eax mov rcx, rsp call js_realloc2 test rax, rax jz short loc_3B14C mov rcx, rax mov rax, [rsp+28h+var_28] mov edi, r15d xor esi, esi xor edx, edx div rdi add ebp, eax mov [rbx], ebp mov [r14], rcx jmp short loc_3B14F loc_3B14C: push 0FFFFFFFFFFFFFFFFh pop rsi loc_3B14F: mov eax, esi add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long js_realloc_array(long long a1, long long *a2, unsigned int a3, _DWORD *a4, int a5) { unsigned long long v5; // rax int v9; // ebp long long v10; // rax unsigned int v11; // esi unsigned long long v13[5]; // [rsp+0h] [rbp-28h] BYREF v13[0] = v5; v9 = 3 * *a4 / 2; if ( a5 > v9 ) v9 = a5; v10 = js_realloc2(a1, *a2, (int)(a3 * v9), v13); if ( v10 ) { v11 = 0; *a4 = v13[0] / a3 + v9; *a2 = v10; } else { return (unsigned int)-1; } return v11; }
js_realloc_array: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RCX MOV R15D,EDX MOV R14,RSI IMUL EAX,dword ptr [RCX],0x3 PUSH 0x2 POP RCX CDQ IDIV ECX MOV EBP,EAX CMP R8D,EAX CMOVG EBP,R8D MOV RSI,qword ptr [RSI] MOV EAX,EBP IMUL EAX,R15D MOVSXD RDX,EAX MOV RCX,RSP CALL 0x001172b1 TEST RAX,RAX JZ 0x0013b14c MOV RCX,RAX MOV RAX,qword ptr [RSP] MOV EDI,R15D XOR ESI,ESI XOR EDX,EDX DIV RDI ADD EBP,EAX MOV dword ptr [RBX],EBP MOV qword ptr [R14],RCX JMP 0x0013b14f LAB_0013b14c: PUSH -0x1 POP RSI LAB_0013b14f: MOV EAX,ESI ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 js_realloc_array(int8 param_1,long *param_2,uint param_3,int *param_4,int param_5) { int iVar1; ulong in_RAX; long lVar2; int4 uVar3; ulong local_28; iVar1 = (*param_4 * 3) / 2; if (iVar1 < param_5) { iVar1 = param_5; } local_28 = in_RAX; lVar2 = js_realloc2(param_1,*param_2,(long)(int)(iVar1 * param_3),&local_28); if (lVar2 == 0) { uVar3 = 0xffffffff; } else { uVar3 = 0; *param_4 = iVar1 + (int)(local_28 / param_3); *param_2 = lVar2; } return uVar3; }
13,475
ft_boolean_read_next
eloqsql/storage/myisam/ft_boolean_search.c
int ft_boolean_read_next(FT_INFO *ftb, char *record) { FTB_EXPR *ftbe; FTB_WORD *ftbw; MI_INFO *info=ftb->info; my_off_t curdoc; if (ftb->state != INDEX_SEARCH && ftb->state != INDEX_DONE) return -1; /* black magic ON */ if ((int) _mi_check_index(info, ftb->keynr) < 0) return my_errno; if (_mi_readinfo(info, F_RDLCK, 1)) return my_errno; /* black magic OFF */ if (!ftb->queue.elements) return my_errno=HA_ERR_END_OF_FILE; /* Attention!!! Address of a local variable is used here! See err: label */ ftb->queue.first_cmp_arg=(void *)&curdoc; while (ftb->state == INDEX_SEARCH && (curdoc=((FTB_WORD *)queue_top(& ftb->queue))->docid[0]) != HA_OFFSET_ERROR) { while (curdoc == (ftbw=(FTB_WORD *)queue_top(& ftb->queue))->docid[0]) { if (unlikely(_ftb_climb_the_tree(ftb, ftbw, 0))) { my_errno= HA_ERR_OUT_OF_MEM; goto err; } /* update queue */ _ft2_search(ftb, ftbw, 0); queue_replace_top(&ftb->queue); } ftbe=ftb->root; if (ftbe->docid[0]==curdoc && ftbe->cur_weight>0 && ftbe->yesses>=(ftbe->ythresh-ftbe->yweaks) && !ftbe->nos) { /* curdoc matched ! */ if (is_tree_inited(&ftb->no_dupes) && tree_insert(&ftb->no_dupes, &curdoc, 0, ftb->no_dupes.custom_arg)->count >1) /* but it managed already to get past this line once */ continue; info->lastpos=curdoc; /* Clear all states, except that the table was updated */ info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); if (!(*info->read_record)(info,curdoc, (uchar*) record)) { info->update|= HA_STATE_AKTIV; /* Record is read */ if (ftb->with_scan && ft_boolean_find_relevance(ftb,(uchar*) record,0)==0) continue; /* no match */ my_errno=0; goto err; } goto err; } } ftb->state=INDEX_DONE; my_errno=HA_ERR_END_OF_FILE; err: ftb->queue.first_cmp_arg=(void *)0; return my_errno; }
O3
c
ft_boolean_read_next: movl 0x348(%rdi), %ecx andl $-0x2, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF cmpl $0x2, %ecx jne 0x71e44 pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x8(%rdi), %r15 movl 0x340(%rdi), %esi movq %r15, %rdi callq 0x84000 testl %eax, %eax js 0x71e2f movq %r15, %rdi xorl %esi, %esi movl $0x1, %edx callq 0x7c7fb testl %eax, %eax jne 0x71e2f cmpl $0x0, 0x80(%rbx) je 0x71e45 leaq -0x30(%rbp), %rax movq %rax, 0x78(%rbx) cmpl $0x2, 0x348(%rbx) jne 0x71e0f leaq 0x70(%rbx), %r12 leaq 0xa0(%rbx), %rax movq %rax, -0x38(%rbp) movq (%r12), %rax movq 0x8(%rax), %r13 movq 0x10(%r13), %rax movq %rax, -0x30(%rbp) cmpq $-0x1, %rax je 0x71e0f movq %rbx, %rdi movq %r13, %rsi xorl %edx, %edx callq 0x71e64 testl %eax, %eax jne 0x71e57 movq %rbx, %rdi movq %r13, %rsi xorl %edx, %edx callq 0x72120 movq %r12, %rdi movl $0x1, %esi callq 0xa23d9 movq -0x30(%rbp), %rsi movq 0x70(%rbx), %rax movq 0x8(%rax), %r13 cmpq 0x10(%r13), %rsi je 0x71d11 movq 0x18(%rbx), %rax cmpq %rsi, 0x10(%rax) jne 0x71d7b movss 0x2c(%rax), %xmm0 ucomiss 0x672a0(%rip), %xmm0 # 0xd9008 jbe 0x71d7b movl 0x48(%rax), %ecx subl 0x4c(%rax), %ecx cmpl %ecx, 0x40(%rax) jb 0x71d7b cmpl $0x0, 0x44(%rax) je 0x71d8d cmpl $0x2, 0x348(%rbx) je 0x71cf7 jmp 0x71e0f movq -0x38(%rbp), %rax cmpq $0x0, (%rax) je 0x71dba movq 0x2d0(%rbx), %rcx movq -0x38(%rbp), %rdi leaq -0x30(%rbp), %rsi xorl %edx, %edx callq 0xa482a testl $0x7ffffffe, 0x10(%rax) # imm = 0x7FFFFFFE jne 0x71d7b movq -0x30(%rbp), %rsi movq %rsi, 0x170(%r15) andl $0x401, 0x1d0(%r15) # imm = 0x401 movq %r15, %rdi movq %r14, %rdx callq *0x140(%r15) testl %eax, %eax jne 0x71e27 orb $0x2, 0x1d0(%r15) cmpb $0x0, 0x344(%rbx) je 0x71e5f xorl %r13d, %r13d movq %rbx, %rdi movq %r14, %rsi xorl %edx, %edx callq 0x2d4e8 ucomiss 0x67203(%rip), %xmm0 # 0xd9008 jne 0x71e1f jnp 0x71d7b jmp 0x71e1f movl $0x3, 0x348(%rbx) movl $0x89, %r13d callq 0xa1afa movl %r13d, (%rax) movq $0x0, 0x78(%rbx) callq 0xa1afa movl (%rax), %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0xa1afa movl $0x89, (%rax) movl $0x89, %eax jmp 0x71e36 movl $0x80, %r13d jmp 0x71e1f xorl %r13d, %r13d jmp 0x71e1f
ft_boolean_read_next: mov ecx, [rdi+348h] and ecx, 0FFFFFFFEh mov eax, 0FFFFFFFFh cmp ecx, 2 jnz locret_71E44 push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r14, rsi mov rbx, rdi mov r15, [rdi+8] mov esi, [rdi+340h] mov rdi, r15 call _mi_check_index test eax, eax js loc_71E2F mov rdi, r15 xor esi, esi mov edx, 1 call _mi_readinfo test eax, eax jnz loc_71E2F cmp dword ptr [rbx+80h], 0 jz loc_71E45 lea rax, [rbp-30h] mov [rbx+78h], rax cmp dword ptr [rbx+348h], 2 jnz loc_71E0F lea r12, [rbx+70h] lea rax, [rbx+0A0h] mov [rbp-38h], rax loc_71CF7: mov rax, [r12] mov r13, [rax+8] mov rax, [r13+10h] mov [rbp-30h], rax cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_71E0F loc_71D11: mov rdi, rbx mov rsi, r13 xor edx, edx call _ftb_climb_the_tree test eax, eax jnz loc_71E57 mov rdi, rbx mov rsi, r13 xor edx, edx call _ft2_search mov rdi, r12 mov esi, 1 call _downheap mov rsi, [rbp-30h] mov rax, [rbx+70h] mov r13, [rax+8] cmp rsi, [r13+10h] jz short loc_71D11 mov rax, [rbx+18h] cmp [rax+10h], rsi jnz short loc_71D7B movss xmm0, dword ptr [rax+2Ch] ucomiss xmm0, cs:dword_D9008 jbe short loc_71D7B mov ecx, [rax+48h] sub ecx, [rax+4Ch] cmp [rax+40h], ecx jb short loc_71D7B cmp dword ptr [rax+44h], 0 jz short loc_71D8D loc_71D7B: cmp dword ptr [rbx+348h], 2 jz loc_71CF7 jmp loc_71E0F loc_71D8D: mov rax, [rbp-38h] cmp qword ptr [rax], 0 jz short loc_71DBA mov rcx, [rbx+2D0h] mov rdi, [rbp-38h] lea rsi, [rbp-30h] xor edx, edx call tree_insert test dword ptr [rax+10h], 7FFFFFFEh jnz short loc_71D7B mov rsi, [rbp-30h] loc_71DBA: mov [r15+170h], rsi and dword ptr [r15+1D0h], 401h mov rdi, r15 mov rdx, r14 call qword ptr [r15+140h] test eax, eax jnz short loc_71E27 or byte ptr [r15+1D0h], 2 cmp byte ptr [rbx+344h], 0 jz short loc_71E5F xor r13d, r13d mov rdi, rbx mov rsi, r14 xor edx, edx call ft_boolean_find_relevance ucomiss xmm0, cs:dword_D9008 jnz short loc_71E1F jnp loc_71D7B jmp short loc_71E1F loc_71E0F: mov dword ptr [rbx+348h], 3 mov r13d, 89h loc_71E1F: call _my_thread_var mov [rax], r13d loc_71E27: mov qword ptr [rbx+78h], 0 loc_71E2F: call _my_thread_var mov eax, [rax] loc_71E36: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp locret_71E44: retn loc_71E45: call _my_thread_var mov dword ptr [rax], 89h mov eax, 89h jmp short loc_71E36 loc_71E57: mov r13d, 80h jmp short loc_71E1F loc_71E5F: xor r13d, r13d jmp short loc_71E1F
long long ft_boolean_read_next(long long a1, long long a2) { long long result; // rax long long v5; // r15 const char *v6; // rsi long long v7; // rdi long long v8; // r13 long long v9; // rax int v10; // r13d double relevance; // xmm0_8 _QWORD *v12; // [rsp-40h] [rbp-40h] _QWORD v13[7]; // [rsp-38h] [rbp-38h] BYREF result = 0xFFFFFFFFLL; if ( (*(_DWORD *)(a1 + 840) & 0xFFFFFFFE) == 2 ) { v5 = *(_QWORD *)(a1 + 8); v6 = (const char *)*(unsigned int *)(a1 + 832); v7 = v5; if ( (int)mi_check_index(v5, v6) < 0 ) return *(unsigned int *)my_thread_var(v7, v6); v7 = v5; v6 = 0LL; if ( (unsigned int)mi_readinfo(v5, 0LL, 1LL) ) return *(unsigned int *)my_thread_var(v7, v6); if ( !*(_DWORD *)(a1 + 128) ) { *(_DWORD *)my_thread_var(v5, 0LL) = 137; return 137LL; } *(_QWORD *)(a1 + 120) = v13; if ( *(_DWORD *)(a1 + 840) != 2 ) goto LABEL_23; v12 = (_QWORD *)(a1 + 160); while ( 2 ) { v8 = *(_QWORD *)(*(_QWORD *)(a1 + 112) + 8LL); v13[0] = *(_QWORD *)(v8 + 16); if ( v13[0] == -1LL ) goto LABEL_23; do { v7 = a1; v6 = (const char *)v8; if ( (unsigned int)ftb_climb_the_tree(a1, v8, 0LL) ) { v10 = 128; goto LABEL_24; } ft2_search(a1, v8, 0LL); v7 = a1 + 112; downheap(a1 + 112, 1LL); v6 = (const char *)v13[0]; v8 = *(_QWORD *)(*(_QWORD *)(a1 + 112) + 8LL); } while ( v13[0] == *(_QWORD *)(v8 + 16) ); v9 = *(_QWORD *)(a1 + 24); if ( *(_QWORD *)(v9 + 16) != v13[0] || *(float *)(v9 + 44) <= 0.0 || *(_DWORD *)(v9 + 64) < (unsigned int)(*(_DWORD *)(v9 + 72) - *(_DWORD *)(v9 + 76)) || *(_DWORD *)(v9 + 68) ) { LABEL_14: if ( *(_DWORD *)(a1 + 840) == 2 ) continue; LABEL_23: *(_DWORD *)(a1 + 840) = 3; v10 = 137; goto LABEL_24; } break; } if ( *v12 ) { v7 = a1 + 160; v6 = (const char *)v13; if ( (*(_DWORD *)(tree_insert(v12, v13, 0LL, *(_QWORD *)(a1 + 720)) + 16) & 0x7FFFFFFE) != 0 ) goto LABEL_14; v6 = (const char *)v13[0]; } *(_QWORD *)(v5 + 368) = v6; *(_DWORD *)(v5 + 464) &= 0x401u; v7 = v5; if ( (*(unsigned int ( **)(long long, const char *, long long))(v5 + 320))(v5, v6, a2) ) goto LABEL_25; *(_BYTE *)(v5 + 464) |= 2u; if ( !*(_BYTE *)(a1 + 836) ) { v10 = 0; LABEL_24: *(_DWORD *)my_thread_var(v7, v6) = v10; LABEL_25: *(_QWORD *)(a1 + 120) = 0LL; return *(unsigned int *)my_thread_var(v7, v6); } v10 = 0; v7 = a1; v6 = (const char *)a2; relevance = ft_boolean_find_relevance(a1, a2, 0); if ( *(float *)&relevance != 0.0 ) goto LABEL_24; goto LABEL_14; } return result; }
ft_boolean_read_next: MOV ECX,dword ptr [RDI + 0x348] AND ECX,0xfffffffe MOV EAX,0xffffffff CMP ECX,0x2 JNZ 0x00171e44 PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R14,RSI MOV RBX,RDI MOV R15,qword ptr [RDI + 0x8] MOV ESI,dword ptr [RDI + 0x340] MOV RDI,R15 CALL 0x00184000 TEST EAX,EAX JS 0x00171e2f MOV RDI,R15 XOR ESI,ESI MOV EDX,0x1 CALL 0x0017c7fb TEST EAX,EAX JNZ 0x00171e2f CMP dword ptr [RBX + 0x80],0x0 JZ 0x00171e45 LEA RAX,[RBP + -0x30] MOV qword ptr [RBX + 0x78],RAX CMP dword ptr [RBX + 0x348],0x2 JNZ 0x00171e0f LEA R12,[RBX + 0x70] LEA RAX,[RBX + 0xa0] MOV qword ptr [RBP + -0x38],RAX LAB_00171cf7: MOV RAX,qword ptr [R12] MOV R13,qword ptr [RAX + 0x8] MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RBP + -0x30],RAX CMP RAX,-0x1 JZ 0x00171e0f LAB_00171d11: MOV RDI,RBX MOV RSI,R13 XOR EDX,EDX CALL 0x00171e64 TEST EAX,EAX JNZ 0x00171e57 MOV RDI,RBX MOV RSI,R13 XOR EDX,EDX CALL 0x00172120 MOV RDI,R12 MOV ESI,0x1 CALL 0x001a23d9 MOV RSI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RBX + 0x70] MOV R13,qword ptr [RAX + 0x8] CMP RSI,qword ptr [R13 + 0x10] JZ 0x00171d11 MOV RAX,qword ptr [RBX + 0x18] CMP qword ptr [RAX + 0x10],RSI JNZ 0x00171d7b MOVSS XMM0,dword ptr [RAX + 0x2c] UCOMISS XMM0,dword ptr [0x001d9008] JBE 0x00171d7b MOV ECX,dword ptr [RAX + 0x48] SUB ECX,dword ptr [RAX + 0x4c] CMP dword ptr [RAX + 0x40],ECX JC 0x00171d7b CMP dword ptr [RAX + 0x44],0x0 JZ 0x00171d8d LAB_00171d7b: CMP dword ptr [RBX + 0x348],0x2 JZ 0x00171cf7 JMP 0x00171e0f LAB_00171d8d: MOV RAX,qword ptr [RBP + -0x38] CMP qword ptr [RAX],0x0 JZ 0x00171dba MOV RCX,qword ptr [RBX + 0x2d0] MOV RDI,qword ptr [RBP + -0x38] LEA RSI,[RBP + -0x30] XOR EDX,EDX CALL 0x001a482a TEST dword ptr [RAX + 0x10],0x7ffffffe JNZ 0x00171d7b MOV RSI,qword ptr [RBP + -0x30] LAB_00171dba: MOV qword ptr [R15 + 0x170],RSI AND dword ptr [R15 + 0x1d0],0x401 MOV RDI,R15 MOV RDX,R14 CALL qword ptr [R15 + 0x140] TEST EAX,EAX JNZ 0x00171e27 OR byte ptr [R15 + 0x1d0],0x2 CMP byte ptr [RBX + 0x344],0x0 JZ 0x00171e5f XOR R13D,R13D MOV RDI,RBX MOV RSI,R14 XOR EDX,EDX CALL 0x0012d4e8 UCOMISS XMM0,dword ptr [0x001d9008] JNZ 0x00171e1f JNP 0x00171d7b JMP 0x00171e1f LAB_00171e0f: MOV dword ptr [RBX + 0x348],0x3 MOV R13D,0x89 LAB_00171e1f: CALL 0x001a1afa MOV dword ptr [RAX],R13D LAB_00171e27: MOV qword ptr [RBX + 0x78],0x0 LAB_00171e2f: CALL 0x001a1afa MOV EAX,dword ptr [RAX] LAB_00171e36: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP LAB_00171e44: RET LAB_00171e45: CALL 0x001a1afa MOV dword ptr [RAX],0x89 MOV EAX,0x89 JMP 0x00171e36 LAB_00171e57: MOV R13D,0x80 JMP 0x00171e1f LAB_00171e5f: XOR R13D,R13D JMP 0x00171e1f
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int4 ft_boolean_read_next(long param_1,int8 param_2) { long lVar1; int iVar2; long lVar3; int4 *puVar4; int4 uVar5; float fVar6; long local_38; uVar5 = 0xffffffff; if ((*(uint *)(param_1 + 0x348) & 0xfffffffe) == 2) { lVar1 = *(long *)(param_1 + 8); iVar2 = _mi_check_index(lVar1,*(int4 *)(param_1 + 0x340)); if ((-1 < iVar2) && (iVar2 = _mi_readinfo(lVar1,0,1), iVar2 == 0)) { if (*(int *)(param_1 + 0x80) == 0) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x89; return 0x89; } *(long **)(param_1 + 0x78) = &local_38; if (*(int *)(param_1 + 0x348) == 2) { do { lVar3 = *(long *)(*(long *)(param_1 + 0x70) + 8); local_38 = *(long *)(lVar3 + 0x10); if (local_38 == -1) break; do { iVar2 = _ftb_climb_the_tree(param_1,lVar3,0); if (iVar2 != 0) { uVar5 = 0x80; goto LAB_00171e1f; } _ft2_search(param_1,lVar3,0); _downheap((long *)(param_1 + 0x70),1); lVar3 = *(long *)(*(long *)(param_1 + 0x70) + 8); } while (local_38 == *(long *)(lVar3 + 0x10)); lVar3 = *(long *)(param_1 + 0x18); if (((((*(long *)(lVar3 + 0x10) == local_38) && (_DAT_001d9008 < *(float *)(lVar3 + 0x2c)) ) && ((uint)(*(int *)(lVar3 + 0x48) - *(int *)(lVar3 + 0x4c)) <= *(uint *)(lVar3 + 0x40))) && (*(int *)(lVar3 + 0x44) == 0)) && ((*(long *)(param_1 + 0xa0) == 0 || (lVar3 = tree_insert((long *)(param_1 + 0xa0),&local_38,0, *(int8 *)(param_1 + 0x2d0)), (*(uint *)(lVar3 + 0x10) & 0x7ffffffe) == 0)))) { *(long *)(lVar1 + 0x170) = local_38; *(uint *)(lVar1 + 0x1d0) = *(uint *)(lVar1 + 0x1d0) & 0x401; iVar2 = (**(code **)(lVar1 + 0x140))(lVar1,local_38,param_2); if (iVar2 != 0) goto LAB_00171e27; *(byte *)(lVar1 + 0x1d0) = *(byte *)(lVar1 + 0x1d0) | 2; if (*(char *)(param_1 + 0x344) == '\0') { uVar5 = 0; goto LAB_00171e1f; } fVar6 = (float)ft_boolean_find_relevance(param_1,param_2,0); uVar5 = 0; if ((fVar6 != _DAT_001d9008) || (uVar5 = 0, NAN(fVar6) || NAN(_DAT_001d9008))) goto LAB_00171e1f; } } while (*(int *)(param_1 + 0x348) == 2); } *(int4 *)(param_1 + 0x348) = 3; uVar5 = 0x89; LAB_00171e1f: puVar4 = (int4 *)_my_thread_var(); *puVar4 = uVar5; LAB_00171e27: *(int8 *)(param_1 + 0x78) = 0; } puVar4 = (int4 *)_my_thread_var(); uVar5 = *puVar4; } return uVar5; }
13,476
rlSetTexture
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
void rlSetTexture(unsigned int id) { if (id == 0) { #if defined(GRAPHICS_API_OPENGL_11) rlDisableTexture(); #else // NOTE: If quads batch limit is reached, we force a draw call and next batch starts if (RLGL.State.vertexCounter >= RLGL.currentBatch->vertexBuffer[RLGL.currentBatch->currentBuffer].elementCount*4) { rlDrawRenderBatch(RLGL.currentBatch); } #endif } else { #if defined(GRAPHICS_API_OPENGL_11) rlEnableTexture(id); #else if (RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].textureId != id) { if (RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount > 0) { // Make sure current RLGL.currentBatch->draws[i].vertexCount is aligned a multiple of 4, // that way, following QUADS drawing will keep aligned with index processing // It implies adding some extra alignment vertex at the end of the draw, // those vertex are not processed but they are considered as an additional offset // for the next set of vertex to be drawn if (RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].mode == RL_LINES) RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexAlignment = ((RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount < 4)? RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount : RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount%4); else if (RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].mode == RL_TRIANGLES) RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexAlignment = ((RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount < 4)? 1 : (4 - (RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount%4))); else RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexAlignment = 0; if (!rlCheckRenderBatchLimit(RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexAlignment)) { RLGL.State.vertexCounter += RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexAlignment; RLGL.currentBatch->drawCounter++; } } if (RLGL.currentBatch->drawCounter >= RL_DEFAULT_BATCH_DRAWCALLS) rlDrawRenderBatch(RLGL.currentBatch); RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].textureId = id; RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount = 0; } #endif } }
O0
c
rlSetTexture: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movl %edi, -0x4(%rbp) cmpl $0x0, -0x4(%rbp) jne 0xb22ee movl 0x167f49(%rip), %eax # 0x21a200 movq 0x167f1a(%rip), %rcx # 0x21a1d8 movq 0x8(%rcx), %rcx movq 0x167f0f(%rip), %rdx # 0x21a1d8 movslq 0x4(%rdx), %rdx imulq $0x48, %rdx, %rdx addq %rdx, %rcx movl (%rcx), %ecx shll $0x2, %ecx cmpl %ecx, %eax jl 0xb22e9 movq 0x167ef4(%rip), %rdi # 0x21a1d8 callq 0xb0c00 jmp 0xb25eb movq 0x167ee3(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167ed8(%rip), %rcx # 0x21a1d8 movl 0x18(%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax movl 0xc(%rax), %eax cmpl -0x4(%rbp), %eax je 0xb25e9 movq 0x167eb5(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167eaa(%rip), %rcx # 0x21a1d8 movl 0x18(%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x0, 0x4(%rax) jle 0xb257c movq 0x167e89(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167e7e(%rip), %rcx # 0x21a1d8 movl 0x18(%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x1, (%rax) jne 0xb2422 movq 0x167e5e(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167e53(%rip), %rcx # 0x21a1d8 movl 0x18(%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x4, 0x4(%rax) jge 0xb23c5 movq 0x167e36(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167e2b(%rip), %rcx # 0x21a1d8 movl 0x18(%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax movl 0x4(%rax), %edx movl %edx, -0x8(%rbp) jmp 0xb23f5 movq 0x167e0c(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167e01(%rip), %rcx # 0x21a1d8 movl 0x18(%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax movl 0x4(%rax), %eax movl $0x4, %ecx cltd idivl %ecx movl %edx, -0x8(%rbp) movl -0x8(%rbp), %ecx movq 0x167dd9(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167dce(%rip), %rdx # 0x21a1d8 movl 0x18(%rdx), %edx subl $0x1, %edx movslq %edx, %rdx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x8(%rax) jmp 0xb250b movq 0x167daf(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167da4(%rip), %rcx # 0x21a1d8 movl 0x18(%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x4, (%rax) jne 0xb24e0 movq 0x167d84(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167d79(%rip), %rcx # 0x21a1d8 movl 0x18(%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax cmpl $0x4, 0x4(%rax) jge 0xb247f movl $0x1, %eax movl %eax, -0xc(%rbp) jmp 0xb24b6 movq 0x167d52(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167d47(%rip), %rcx # 0x21a1d8 movl 0x18(%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax movl 0x4(%rax), %eax movl $0x4, %ecx cltd idivl %ecx movl $0x4, %eax subl %edx, %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %ecx movq 0x167d18(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167d0d(%rip), %rdx # 0x21a1d8 movl 0x18(%rdx), %edx subl $0x1, %edx movslq %edx, %rdx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0x8(%rax) jmp 0xb2509 movq 0x167cf1(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167ce6(%rip), %rcx # 0x21a1d8 movl 0x18(%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax movl $0x0, 0x8(%rax) jmp 0xb250b movq 0x167cc6(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167cbb(%rip), %rcx # 0x21a1d8 movl 0x18(%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax movl 0x8(%rax), %edi callq 0xb0b00 testb $0x1, %al jne 0xb257a movq 0x167c98(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167c8d(%rip), %rcx # 0x21a1d8 movl 0x18(%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax movl 0x8(%rax), %eax addl 0x167c9c(%rip), %eax # 0x21a200 movl %eax, 0x167c96(%rip) # 0x21a200 movq 0x167c67(%rip), %rax # 0x21a1d8 movl 0x18(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x18(%rax) jmp 0xb257c movq 0x167c55(%rip), %rax # 0x21a1d8 cmpl $0x100, 0x18(%rax) # imm = 0x100 jl 0xb2598 movq 0x167c45(%rip), %rdi # 0x21a1d8 callq 0xb0c00 movl -0x4(%rbp), %ecx movq 0x167c36(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167c2b(%rip), %rdx # 0x21a1d8 movl 0x18(%rdx), %edx subl $0x1, %edx movslq %edx, %rdx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, 0xc(%rax) movq 0x167c11(%rip), %rax # 0x21a1d8 movq 0x10(%rax), %rax movq 0x167c06(%rip), %rcx # 0x21a1d8 movl 0x18(%rcx), %ecx subl $0x1, %ecx movslq %ecx, %rcx shlq $0x4, %rcx addq %rcx, %rax movl $0x0, 0x4(%rax) jmp 0xb25eb addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
rlSetTexture: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_4], edi cmp [rbp+var_4], 0 jnz short loc_B22EE mov eax, cs:dword_21A200 mov rcx, cs:RLGL mov rcx, [rcx+8] mov rdx, cs:RLGL movsxd rdx, dword ptr [rdx+4] imul rdx, 48h ; 'H' add rcx, rdx mov ecx, [rcx] shl ecx, 2 cmp eax, ecx jl short loc_B22E9 mov rdi, cs:RLGL call rlDrawRenderBatch loc_B22E9: jmp loc_B25EB loc_B22EE: mov rax, cs:RLGL mov rax, [rax+10h] mov rcx, cs:RLGL mov ecx, [rcx+18h] sub ecx, 1 movsxd rcx, ecx shl rcx, 4 add rax, rcx mov eax, [rax+0Ch] cmp eax, [rbp+var_4] jz loc_B25E9 mov rax, cs:RLGL mov rax, [rax+10h] mov rcx, cs:RLGL mov ecx, [rcx+18h] sub ecx, 1 movsxd rcx, ecx shl rcx, 4 add rax, rcx cmp dword ptr [rax+4], 0 jle loc_B257C mov rax, cs:RLGL mov rax, [rax+10h] mov rcx, cs:RLGL mov ecx, [rcx+18h] sub ecx, 1 movsxd rcx, ecx shl rcx, 4 add rax, rcx cmp dword ptr [rax], 1 jnz loc_B2422 mov rax, cs:RLGL mov rax, [rax+10h] mov rcx, cs:RLGL mov ecx, [rcx+18h] sub ecx, 1 movsxd rcx, ecx shl rcx, 4 add rax, rcx cmp dword ptr [rax+4], 4 jge short loc_B23C5 mov rax, cs:RLGL mov rax, [rax+10h] mov rcx, cs:RLGL mov ecx, [rcx+18h] sub ecx, 1 movsxd rcx, ecx shl rcx, 4 add rax, rcx mov edx, [rax+4] mov [rbp+var_8], edx jmp short loc_B23F5 loc_B23C5: mov rax, cs:RLGL mov rax, [rax+10h] mov rcx, cs:RLGL mov ecx, [rcx+18h] sub ecx, 1 movsxd rcx, ecx shl rcx, 4 add rax, rcx mov eax, [rax+4] mov ecx, 4 cdq idiv ecx mov [rbp+var_8], edx loc_B23F5: mov ecx, [rbp+var_8] mov rax, cs:RLGL mov rax, [rax+10h] mov rdx, cs:RLGL mov edx, [rdx+18h] sub edx, 1 movsxd rdx, edx shl rdx, 4 add rax, rdx mov [rax+8], ecx jmp loc_B250B loc_B2422: mov rax, cs:RLGL mov rax, [rax+10h] mov rcx, cs:RLGL mov ecx, [rcx+18h] sub ecx, 1 movsxd rcx, ecx shl rcx, 4 add rax, rcx cmp dword ptr [rax], 4 jnz loc_B24E0 mov rax, cs:RLGL mov rax, [rax+10h] mov rcx, cs:RLGL mov ecx, [rcx+18h] sub ecx, 1 movsxd rcx, ecx shl rcx, 4 add rax, rcx cmp dword ptr [rax+4], 4 jge short loc_B247F mov eax, 1 mov [rbp+var_C], eax jmp short loc_B24B6 loc_B247F: mov rax, cs:RLGL mov rax, [rax+10h] mov rcx, cs:RLGL mov ecx, [rcx+18h] sub ecx, 1 movsxd rcx, ecx shl rcx, 4 add rax, rcx mov eax, [rax+4] mov ecx, 4 cdq idiv ecx mov eax, 4 sub eax, edx mov [rbp+var_C], eax loc_B24B6: mov ecx, [rbp+var_C] mov rax, cs:RLGL mov rax, [rax+10h] mov rdx, cs:RLGL mov edx, [rdx+18h] sub edx, 1 movsxd rdx, edx shl rdx, 4 add rax, rdx mov [rax+8], ecx jmp short loc_B2509 loc_B24E0: mov rax, cs:RLGL mov rax, [rax+10h] mov rcx, cs:RLGL mov ecx, [rcx+18h] sub ecx, 1 movsxd rcx, ecx shl rcx, 4 add rax, rcx mov dword ptr [rax+8], 0 loc_B2509: jmp short $+2 loc_B250B: mov rax, cs:RLGL mov rax, [rax+10h] mov rcx, cs:RLGL mov ecx, [rcx+18h] sub ecx, 1 movsxd rcx, ecx shl rcx, 4 add rax, rcx mov edi, [rax+8] call rlCheckRenderBatchLimit test al, 1 jnz short loc_B257A mov rax, cs:RLGL mov rax, [rax+10h] mov rcx, cs:RLGL mov ecx, [rcx+18h] sub ecx, 1 movsxd rcx, ecx shl rcx, 4 add rax, rcx mov eax, [rax+8] add eax, cs:dword_21A200 mov cs:dword_21A200, eax mov rax, cs:RLGL mov ecx, [rax+18h] add ecx, 1 mov [rax+18h], ecx loc_B257A: jmp short $+2 loc_B257C: mov rax, cs:RLGL cmp dword ptr [rax+18h], 100h jl short loc_B2598 mov rdi, cs:RLGL call rlDrawRenderBatch loc_B2598: mov ecx, [rbp+var_4] mov rax, cs:RLGL mov rax, [rax+10h] mov rdx, cs:RLGL mov edx, [rdx+18h] sub edx, 1 movsxd rdx, edx shl rdx, 4 add rax, rdx mov [rax+0Ch], ecx mov rax, cs:RLGL mov rax, [rax+10h] mov rcx, cs:RLGL mov ecx, [rcx+18h] sub ecx, 1 movsxd rcx, ecx shl rcx, 4 add rax, rcx mov dword ptr [rax+4], 0 loc_B25E9: jmp short $+2 loc_B25EB: add rsp, 10h pop rbp retn
long long rlSetTexture( int a1, double a2, double a3, double a4, double a5, double a6, double a7, double a8, double a9) { long long result; // rax int v10; // [rsp+4h] [rbp-Ch] int v11; // [rsp+8h] [rbp-8h] if ( a1 ) { result = *(unsigned int *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16) + 12); if ( (_DWORD)result != a1 ) { if ( *(int *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16) + 4) > 0 ) { if ( *(_DWORD *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16)) == 1 ) { v11 = *(int *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16) + 4) >= 4 ? *(_DWORD *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16) + 4) % 4 : *(_DWORD *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16) + 4); *(_DWORD *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16) + 8) = v11; } else if ( *(_DWORD *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16)) == 4 ) { v10 = *(int *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16) + 4) >= 4 ? 4 - *(_DWORD *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16) + 4) % 4 : 1; *(_DWORD *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16) + 8) = v10; } else { *(_DWORD *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16) + 8) = 0; } if ( (rlCheckRenderBatchLimit(*(_DWORD *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16) + 8)) & 1) == 0 ) dword_21A200 += *(_DWORD *)(16LL * ((*(_DWORD *)(RLGL[0] + 24))++ - 1) + *(_QWORD *)(RLGL[0] + 16) + 8); } if ( *(int *)(RLGL[0] + 24) >= 256 ) rlDrawRenderBatch(RLGL[0], a2, a3, a4, a5, a6, a7, a8, a9); *(_DWORD *)(16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16) + 12) = a1; result = 16LL * (*(_DWORD *)(RLGL[0] + 24) - 1) + *(_QWORD *)(RLGL[0] + 16); *(_DWORD *)(result + 4) = 0; } } else { result = (unsigned int)dword_21A200; if ( dword_21A200 >= 4 * *(_DWORD *)(72LL * *(int *)(RLGL[0] + 4) + *(_QWORD *)(RLGL[0] + 8)) ) return rlDrawRenderBatch(RLGL[0], a2, a3, a4, a5, a6, a7, a8, a9); } return result; }
rlSetTexture: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV dword ptr [RBP + -0x4],EDI CMP dword ptr [RBP + -0x4],0x0 JNZ 0x001b22ee MOV EAX,dword ptr [0x0031a200] MOV RCX,qword ptr [0x0031a1d8] MOV RCX,qword ptr [RCX + 0x8] MOV RDX,qword ptr [0x0031a1d8] MOVSXD RDX,dword ptr [RDX + 0x4] IMUL RDX,RDX,0x48 ADD RCX,RDX MOV ECX,dword ptr [RCX] SHL ECX,0x2 CMP EAX,ECX JL 0x001b22e9 MOV RDI,qword ptr [0x0031a1d8] CALL 0x001b0c00 LAB_001b22e9: JMP 0x001b25eb LAB_001b22ee: MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0xc] CMP EAX,dword ptr [RBP + -0x4] JZ 0x001b25e9 MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x4],0x0 JLE 0x001b257c MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX],0x1 JNZ 0x001b2422 MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x4],0x4 JGE 0x001b23c5 MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX MOV EDX,dword ptr [RAX + 0x4] MOV dword ptr [RBP + -0x8],EDX JMP 0x001b23f5 LAB_001b23c5: MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x4] MOV ECX,0x4 CDQ IDIV ECX MOV dword ptr [RBP + -0x8],EDX LAB_001b23f5: MOV ECX,dword ptr [RBP + -0x8] MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [0x0031a1d8] MOV EDX,dword ptr [RDX + 0x18] SUB EDX,0x1 MOVSXD RDX,EDX SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x8],ECX JMP 0x001b250b LAB_001b2422: MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX],0x4 JNZ 0x001b24e0 MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX CMP dword ptr [RAX + 0x4],0x4 JGE 0x001b247f MOV EAX,0x1 MOV dword ptr [RBP + -0xc],EAX JMP 0x001b24b6 LAB_001b247f: MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x4] MOV ECX,0x4 CDQ IDIV ECX MOV EAX,0x4 SUB EAX,EDX MOV dword ptr [RBP + -0xc],EAX LAB_001b24b6: MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [0x0031a1d8] MOV EDX,dword ptr [RDX + 0x18] SUB EDX,0x1 MOVSXD RDX,EDX SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0x8],ECX JMP 0x001b2509 LAB_001b24e0: MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX MOV dword ptr [RAX + 0x8],0x0 LAB_001b2509: JMP 0x001b250b LAB_001b250b: MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX MOV EDI,dword ptr [RAX + 0x8] CALL 0x001b0b00 TEST AL,0x1 JNZ 0x001b257a MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX MOV EAX,dword ptr [RAX + 0x8] ADD EAX,dword ptr [0x0031a200] MOV dword ptr [0x0031a200],EAX MOV RAX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RAX + 0x18] ADD ECX,0x1 MOV dword ptr [RAX + 0x18],ECX LAB_001b257a: JMP 0x001b257c LAB_001b257c: MOV RAX,qword ptr [0x0031a1d8] CMP dword ptr [RAX + 0x18],0x100 JL 0x001b2598 MOV RDI,qword ptr [0x0031a1d8] CALL 0x001b0c00 LAB_001b2598: MOV ECX,dword ptr [RBP + -0x4] MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [0x0031a1d8] MOV EDX,dword ptr [RDX + 0x18] SUB EDX,0x1 MOVSXD RDX,EDX SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [0x0031a1d8] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [0x0031a1d8] MOV ECX,dword ptr [RCX + 0x18] SUB ECX,0x1 MOVSXD RCX,ECX SHL RCX,0x4 ADD RAX,RCX MOV dword ptr [RAX + 0x4],0x0 LAB_001b25e9: JMP 0x001b25eb LAB_001b25eb: ADD RSP,0x10 POP RBP RET
void rlSetTexture(int param_1) { ulong uVar1; int4 local_14; int4 local_10; if (param_1 == 0) { if (*(int *)(*(long *)(RLGL + 8) + (long)*(int *)(RLGL + 4) * 0x48) * 4 <= DAT_0031a200) { rlDrawRenderBatch(RLGL); } } else if (*(int *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 0xc) != param_1) { if (0 < *(int *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 4)) { if (*(int *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10) == 1) { if (*(int *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 4) < 4) { local_10 = *(int *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 4 ); } else { local_10 = *(int *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 4 ) % 4; } *(int *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 8) = local_10; } else if (*(int *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10) == 4) { if (*(int *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 4) < 4) { local_14 = 1; } else { local_14 = 4 - *(int *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 4) % 4; } *(int *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 8) = local_14; } else { *(int4 *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 8) = 0; } uVar1 = rlCheckRenderBatchLimit (*(int4 *) (*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 8)); if ((uVar1 & 1) == 0) { DAT_0031a200 = *(int *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 8) + DAT_0031a200; *(int *)(RLGL + 0x18) = *(int *)(RLGL + 0x18) + 1; } } if (0xff < *(int *)(RLGL + 0x18)) { rlDrawRenderBatch(RLGL); } *(int *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 0xc) = param_1; *(int4 *)(*(long *)(RLGL + 0x10) + (long)(*(int *)(RLGL + 0x18) + -1) * 0x10 + 4) = 0; } return; }
13,477
rlSetTexture
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rlgl.h
void rlSetTexture(unsigned int id) { if (id == 0) { #if defined(GRAPHICS_API_OPENGL_11) rlDisableTexture(); #else // NOTE: If quads batch limit is reached, we force a draw call and next batch starts if (RLGL.State.vertexCounter >= RLGL.currentBatch->vertexBuffer[RLGL.currentBatch->currentBuffer].elementCount*4) { rlDrawRenderBatch(RLGL.currentBatch); } #endif } else { #if defined(GRAPHICS_API_OPENGL_11) rlEnableTexture(id); #else if (RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].textureId != id) { if (RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount > 0) { // Make sure current RLGL.currentBatch->draws[i].vertexCount is aligned a multiple of 4, // that way, following QUADS drawing will keep aligned with index processing // It implies adding some extra alignment vertex at the end of the draw, // those vertex are not processed but they are considered as an additional offset // for the next set of vertex to be drawn if (RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].mode == RL_LINES) RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexAlignment = ((RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount < 4)? RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount : RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount%4); else if (RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].mode == RL_TRIANGLES) RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexAlignment = ((RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount < 4)? 1 : (4 - (RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount%4))); else RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexAlignment = 0; if (!rlCheckRenderBatchLimit(RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexAlignment)) { RLGL.State.vertexCounter += RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexAlignment; RLGL.currentBatch->drawCounter++; } } if (RLGL.currentBatch->drawCounter >= RL_DEFAULT_BATCH_DRAWCALLS) rlDrawRenderBatch(RLGL.currentBatch); RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].textureId = id; RLGL.currentBatch->draws[RLGL.currentBatch->drawCounter - 1].vertexCount = 0; } #endif } }
O2
c
rlSetTexture: pushq %rbx testl %edi, %edi je 0x52c14 movl %edi, %ebx movq 0xd4561(%rip), %rdi # 0x127138 movq 0x10(%rdi), %rcx movslq 0x18(%rdi), %rax movq %rax, %rdx shlq $0x4, %rdx cmpl %ebx, -0x4(%rcx,%rdx) je 0x52cdb addq %rdx, %rcx movl -0xc(%rcx), %edx testl %edx, %edx jle 0x52c9f movl -0x10(%rcx), %esi cmpl $0x4, %esi je 0x52c3f xorl %eax, %eax cmpl $0x1, %esi jne 0x52c52 andl $0x3, %edx movl %edx, %eax jmp 0x52c52 movq 0xd451d(%rip), %rdi # 0x127138 movq 0x8(%rdi), %rax movslq 0x4(%rdi), %rcx imulq $0x48, %rcx, %rcx movl (%rax,%rcx), %eax shll $0x2, %eax cmpl %eax, 0xd452d(%rip) # 0x127160 jl 0x52cdb popq %rbx jmp 0x51407 movl %edx, %eax andl $0x3, %eax pushq $0x4 popq %rsi subl %eax, %esi cmpl $0x4, %edx pushq $0x1 popq %rax cmovael %esi, %eax movl %eax, -0x8(%rcx) movq 0xd44dc(%rip), %rax # 0x127138 movq 0x10(%rax), %rcx movslq 0x18(%rax), %rax shlq $0x4, %rax movl -0x8(%rcx,%rax), %edi callq 0x51380 movq 0xd44c0(%rip), %rdi # 0x127138 testb %al, %al je 0x52c81 movl 0x18(%rdi), %eax jmp 0x52c9f movq 0x10(%rdi), %rax movslq 0x18(%rdi), %rcx shlq $0x4, %rcx movl -0x8(%rax,%rcx), %eax addl %eax, 0xd44c9(%rip) # 0x127160 movl 0x18(%rdi), %eax incl %eax movl %eax, 0x18(%rdi) cmpl $0x100, %eax # imm = 0x100 jl 0x52cb5 callq 0x51407 movq 0xd4486(%rip), %rdi # 0x127138 movl 0x18(%rdi), %eax movq 0x10(%rdi), %rcx cltq shlq $0x4, %rax movl %ebx, -0x4(%rcx,%rax) movq 0xd446e(%rip), %rax # 0x127138 movq 0x10(%rax), %rcx movslq 0x18(%rax), %rax shlq $0x4, %rax andl $0x0, -0xc(%rcx,%rax) popq %rbx retq
rlSetTexture: push rbx test edi, edi jz short loc_52C14 mov ebx, edi mov rdi, cs:RLGL mov rcx, [rdi+10h] movsxd rax, dword ptr [rdi+18h] mov rdx, rax shl rdx, 4 cmp [rcx+rdx-4], ebx jz loc_52CDB add rcx, rdx mov edx, [rcx-0Ch] test edx, edx jle loc_52C9F mov esi, [rcx-10h] cmp esi, 4 jz short loc_52C3F xor eax, eax cmp esi, 1 jnz short loc_52C52 and edx, 3 mov eax, edx jmp short loc_52C52 loc_52C14: mov rdi, cs:RLGL mov rax, [rdi+8] movsxd rcx, dword ptr [rdi+4] imul rcx, 48h ; 'H' mov eax, [rax+rcx] shl eax, 2 cmp cs:dword_127160, eax jl loc_52CDB pop rbx jmp rlDrawRenderBatch loc_52C3F: mov eax, edx and eax, 3 push 4 pop rsi sub esi, eax cmp edx, 4 push 1 pop rax cmovnb eax, esi loc_52C52: mov [rcx-8], eax mov rax, cs:RLGL mov rcx, [rax+10h] movsxd rax, dword ptr [rax+18h] shl rax, 4 mov edi, [rcx+rax-8] call rlCheckRenderBatchLimit mov rdi, cs:RLGL test al, al jz short loc_52C81 mov eax, [rdi+18h] jmp short loc_52C9F loc_52C81: mov rax, [rdi+10h] movsxd rcx, dword ptr [rdi+18h] shl rcx, 4 mov eax, [rax+rcx-8] add cs:dword_127160, eax mov eax, [rdi+18h] inc eax mov [rdi+18h], eax loc_52C9F: cmp eax, 100h jl short loc_52CB5 call rlDrawRenderBatch mov rdi, cs:RLGL mov eax, [rdi+18h] loc_52CB5: mov rcx, [rdi+10h] cdqe shl rax, 4 mov [rcx+rax-4], ebx mov rax, cs:RLGL mov rcx, [rax+10h] movsxd rax, dword ptr [rax+18h] shl rax, 4 and dword ptr [rcx+rax-0Ch], 0 loc_52CDB: pop rbx retn
long long rlSetTexture( int a1, long long a2, double a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long v11; // rdi long long v12; // rcx long long result; // rax long long v14; // rcx int v15; // edx int v16; // eax bool v17; // al if ( a1 ) { v11 = RLGL[0]; v12 = *(_QWORD *)(RLGL[0] + 16); result = *(int *)(RLGL[0] + 24); if ( *(_DWORD *)(v12 + 16 * result - 4) != a1 ) { v14 = 16 * result + v12; v15 = *(_DWORD *)(v14 - 12); if ( v15 > 0 ) { a2 = *(unsigned int *)(v14 - 16); if ( (_DWORD)a2 == 4 ) { a2 = 4 - (*(_DWORD *)(v14 - 12) & 3u); v16 = 1; if ( (unsigned int)v15 >= 4 ) v16 = 4 - (*(_DWORD *)(v14 - 12) & 3); } else { v16 = 0; if ( (_DWORD)a2 == 1 ) v16 = *(_DWORD *)(v14 - 12) & 3; } *(_DWORD *)(v14 - 8) = v16; v17 = rlCheckRenderBatchLimit(*(_DWORD *)(*(_QWORD *)(RLGL[0] + 16) + 16LL * *(int *)(RLGL[0] + 24) - 8)); v11 = RLGL[0]; if ( v17 ) { LODWORD(result) = *(_DWORD *)(RLGL[0] + 24); } else { dword_127160 += *(_DWORD *)(*(_QWORD *)(RLGL[0] + 16) + 16LL * *(int *)(RLGL[0] + 24) - 8); LODWORD(result) = *(_DWORD *)(RLGL[0] + 24) + 1; *(_DWORD *)(RLGL[0] + 24) = result; } } if ( (int)result >= 256 ) { rlDrawRenderBatch(v11, a2, a3, a4, a5, a6, a7, a8, a9, a10); v11 = RLGL[0]; LODWORD(result) = *(_DWORD *)(RLGL[0] + 24); } *(_DWORD *)(*(_QWORD *)(v11 + 16) + 16LL * (int)result - 4) = a1; result = 16LL * *(int *)(RLGL[0] + 24); *(_DWORD *)(*(_QWORD *)(RLGL[0] + 16) + result - 12) = 0; } } else { result = (unsigned int)(4 * *(_DWORD *)(*(_QWORD *)(RLGL[0] + 8) + 72LL * *(int *)(RLGL[0] + 4))); if ( dword_127160 >= (int)result ) return rlDrawRenderBatch(RLGL[0], a2, a3, a4, a5, a6, a7, a8, a9, a10); } return result; }
rlSetTexture: PUSH RBX TEST EDI,EDI JZ 0x00152c14 MOV EBX,EDI MOV RDI,qword ptr [0x00227138] MOV RCX,qword ptr [RDI + 0x10] MOVSXD RAX,dword ptr [RDI + 0x18] MOV RDX,RAX SHL RDX,0x4 CMP dword ptr [RCX + RDX*0x1 + -0x4],EBX JZ 0x00152cdb ADD RCX,RDX MOV EDX,dword ptr [RCX + -0xc] TEST EDX,EDX JLE 0x00152c9f MOV ESI,dword ptr [RCX + -0x10] CMP ESI,0x4 JZ 0x00152c3f XOR EAX,EAX CMP ESI,0x1 JNZ 0x00152c52 AND EDX,0x3 MOV EAX,EDX JMP 0x00152c52 LAB_00152c14: MOV RDI,qword ptr [0x00227138] MOV RAX,qword ptr [RDI + 0x8] MOVSXD RCX,dword ptr [RDI + 0x4] IMUL RCX,RCX,0x48 MOV EAX,dword ptr [RAX + RCX*0x1] SHL EAX,0x2 CMP dword ptr [0x00227160],EAX JL 0x00152cdb POP RBX JMP 0x00151407 LAB_00152c3f: MOV EAX,EDX AND EAX,0x3 PUSH 0x4 POP RSI SUB ESI,EAX CMP EDX,0x4 PUSH 0x1 POP RAX CMOVNC EAX,ESI LAB_00152c52: MOV dword ptr [RCX + -0x8],EAX MOV RAX,qword ptr [0x00227138] MOV RCX,qword ptr [RAX + 0x10] MOVSXD RAX,dword ptr [RAX + 0x18] SHL RAX,0x4 MOV EDI,dword ptr [RCX + RAX*0x1 + -0x8] CALL 0x00151380 MOV RDI,qword ptr [0x00227138] TEST AL,AL JZ 0x00152c81 MOV EAX,dword ptr [RDI + 0x18] JMP 0x00152c9f LAB_00152c81: MOV RAX,qword ptr [RDI + 0x10] MOVSXD RCX,dword ptr [RDI + 0x18] SHL RCX,0x4 MOV EAX,dword ptr [RAX + RCX*0x1 + -0x8] ADD dword ptr [0x00227160],EAX MOV EAX,dword ptr [RDI + 0x18] INC EAX MOV dword ptr [RDI + 0x18],EAX LAB_00152c9f: CMP EAX,0x100 JL 0x00152cb5 CALL 0x00151407 MOV RDI,qword ptr [0x00227138] MOV EAX,dword ptr [RDI + 0x18] LAB_00152cb5: MOV RCX,qword ptr [RDI + 0x10] CDQE SHL RAX,0x4 MOV dword ptr [RCX + RAX*0x1 + -0x4],EBX MOV RAX,qword ptr [0x00227138] MOV RCX,qword ptr [RAX + 0x10] MOVSXD RAX,dword ptr [RAX + 0x18] SHL RAX,0x4 AND dword ptr [RCX + RAX*0x1 + -0xc],0x0 LAB_00152cdb: POP RBX RET
void rlSetTexture(int param_1) { uint uVar1; char cVar2; uint uVar3; int iVar4; long lVar5; long lVar6; if (param_1 == 0) { if (*(int *)(*(long *)(RLGL + 8) + (long)*(int *)(RLGL + 4) * 0x48) * 4 <= DAT_00227160) { rlDrawRenderBatch(); return; } } else { iVar4 = *(int *)(RLGL + 0x18); if (*(int *)(*(long *)(RLGL + 0x10) + -4 + (long)iVar4 * 0x10) != param_1) { lVar5 = *(long *)(RLGL + 0x10) + (long)iVar4 * 0x10; uVar1 = *(uint *)(lVar5 + -0xc); lVar6 = RLGL; if (0 < (int)uVar1) { if (*(int *)(lVar5 + -0x10) == 4) { uVar3 = 1; if (3 < uVar1) { uVar3 = 4 - (uVar1 & 3); } } else { uVar3 = 0; if (*(int *)(lVar5 + -0x10) == 1) { uVar3 = uVar1 & 3; } } *(uint *)(lVar5 + -8) = uVar3; cVar2 = rlCheckRenderBatchLimit (*(int4 *) (*(long *)(RLGL + 0x10) + -8 + (long)*(int *)(RLGL + 0x18) * 0x10)); lVar6 = RLGL; if (cVar2 == '\0') { DAT_00227160 = DAT_00227160 + *(int *)(*(long *)(RLGL + 0x10) + -8 + (long)*(int *)(RLGL + 0x18) * 0x10); iVar4 = *(int *)(RLGL + 0x18) + 1; *(int *)(RLGL + 0x18) = iVar4; } else { iVar4 = *(int *)(RLGL + 0x18); } } if (0xff < iVar4) { rlDrawRenderBatch(); iVar4 = *(int *)(RLGL + 0x18); lVar6 = RLGL; } *(int *)(*(long *)(lVar6 + 0x10) + -4 + (long)iVar4 * 0x10) = param_1; *(int4 *)(*(long *)(RLGL + 0x10) + -0xc + (long)*(int *)(RLGL + 0x18) * 0x10) = 0; } } return; }
13,478
my_instr_mb
eloqsql/strings/ctype-mb.c
uint my_instr_mb(CHARSET_INFO *cs, const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch) { register const char *end, *b0; int res= 0; if (s_length <= b_length) { if (!s_length) { if (nmatch) { match->beg= 0; match->end= 0; match->mb_len= 0; } return 1; /* Empty string is always found */ } b0= b; end= b+b_length-s_length+1; while (b < end) { int mb_len; if (!my_ci_strnncoll(cs, (const uchar *) b, s_length, (const uchar *) s, s_length, 0)) { if (nmatch) { match[0].beg= 0; match[0].end= (uint) (b-b0); match[0].mb_len= res; if (nmatch > 1) { match[1].beg= match[0].end; match[1].end= (uint)(match[0].end+s_length); match[1].mb_len= 0; /* Not computed */ } } return 2; } mb_len= (mb_len= my_ismbchar(cs, b, end)) ? mb_len : 1; b+= mb_len; b_length-= mb_len; res++; } } return 0; }
O3
c
my_instr_mb: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, -0x40(%rbp) xorl %eax, %eax cmpq %rdx, %r8 ja 0x6ec2f movq %r8, %r14 testq %r8, %r8 je 0x6ebc2 movq %rdx, %r13 addq %rsi, %r13 subq %r14, %r13 incq %r13 cmpq %rsi, %r13 jbe 0x6ec2f movq %rdi, %rbx movq %r9, -0x38(%rbp) xorl %r12d, %r12d movq %rsi, -0x30(%rbp) movq %rsi, %r15 movq 0xc0(%rbx), %rax movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx movq -0x40(%rbp), %rcx movq %r14, %r8 xorl %r9d, %r9d callq *0x8(%rax) testl %eax, %eax je 0x6ebef movq 0xb8(%rbx), %rax movq %rbx, %rdi movq %r15, %rsi movq %r13, %rdx callq *0xc0(%rax) cmpl $0x2, %eax movl $0x1, %ecx cmovbl %ecx, %eax cmovll %ecx, %eax cltq addq %rax, %r15 incl %r12d cmpq %r13, %r15 jb 0x6eb6c xorl %eax, %eax jmp 0x6ec2f cmpl $0x0, 0x10(%rbp) je 0x6ec2a movl $0x0, (%r9) movl $0x1, %eax movl $0x8, %ecx xorl %r14d, %r14d movl $0x4, %edx movl %r14d, (%r9,%rdx) movl $0x0, (%r9,%rcx) jmp 0x6ec2f movl $0x2, %eax movl 0x10(%rbp), %ecx testl %ecx, %ecx je 0x6ec2f movq -0x38(%rbp), %r9 movl $0x0, (%r9) subl -0x30(%rbp), %r15d movl %r15d, 0x4(%r9) movl %r12d, 0x8(%r9) cmpl $0x1, %ecx je 0x6ec2f movl %r15d, 0xc(%r9) addl %r15d, %r14d movl $0x14, %ecx movl $0x10, %edx jmp 0x6ebe1 movl $0x1, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_instr_mb: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], rcx xor eax, eax cmp r8, rdx ja loc_6EC2F mov r14, r8 test r8, r8 jz short loc_6EBC2 mov r13, rdx add r13, rsi sub r13, r14 inc r13 cmp r13, rsi jbe loc_6EC2F mov rbx, rdi mov [rbp+var_38], r9 xor r12d, r12d mov [rbp+var_30], rsi mov r15, rsi loc_6EB6C: mov rax, [rbx+0C0h] mov rdi, rbx mov rsi, r15 mov rdx, r14 mov rcx, [rbp+var_40] mov r8, r14 xor r9d, r9d call qword ptr [rax+8] test eax, eax jz short loc_6EBEF mov rax, [rbx+0B8h] mov rdi, rbx mov rsi, r15 mov rdx, r13 call qword ptr [rax+0C0h] cmp eax, 2 mov ecx, 1 cmovb eax, ecx cmovl eax, ecx cdqe add r15, rax inc r12d cmp r15, r13 jb short loc_6EB6C xor eax, eax jmp short loc_6EC2F loc_6EBC2: cmp [rbp+arg_0], 0 jz short loc_6EC2A mov dword ptr [r9], 0 mov eax, 1 mov ecx, 8 xor r14d, r14d mov edx, 4 loc_6EBE1: mov [r9+rdx], r14d mov dword ptr [r9+rcx], 0 jmp short loc_6EC2F loc_6EBEF: mov eax, 2 mov ecx, [rbp+arg_0] test ecx, ecx jz short loc_6EC2F mov r9, [rbp+var_38] mov dword ptr [r9], 0 sub r15d, dword ptr [rbp+var_30] mov [r9+4], r15d mov [r9+8], r12d cmp ecx, 1 jz short loc_6EC2F mov [r9+0Ch], r15d add r14d, r15d mov ecx, 14h mov edx, 10h jmp short loc_6EBE1 loc_6EC2A: mov eax, 1 loc_6EC2F: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_instr_mb( long long a1, unsigned long long a2, unsigned long long a3, long long a4, unsigned long long a5, _DWORD *a6, int a7) { long long result; // rax unsigned long long v9; // r13 int v10; // r12d unsigned long long v11; // r15 int v12; // eax bool v13; // cc long long v14; // rcx int v15; // r14d long long v16; // rdx int v17; // r15d _DWORD *v19; // [rsp+8h] [rbp-38h] result = 0LL; if ( a5 <= a3 ) { if ( a5 ) { v9 = a2 + a3 - a5 + 1; if ( v9 > a2 ) { v19 = a6; v10 = 0; v11 = a2; while ( (*(unsigned int ( **)(long long, unsigned long long, unsigned long long, long long, unsigned long long, _QWORD))(*(_QWORD *)(a1 + 192) + 8LL))( a1, v11, a5, a4, a5, 0LL) ) { v12 = (*(long long ( **)(long long, unsigned long long, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v11, v9); v13 = v12 < 2; if ( (unsigned int)v12 < 2 ) v12 = 1; if ( v13 ) v12 = 1; v11 += v12; ++v10; if ( v11 >= v9 ) return 0LL; } result = 2LL; if ( a7 ) { a6 = v19; *v19 = 0; v17 = v11 - a2; v19[1] = v17; v19[2] = v10; if ( a7 != 1 ) { v19[3] = v17; v15 = v17 + a5; v14 = 5LL; v16 = 4LL; goto LABEL_14; } } } } else { if ( a7 ) { *a6 = 0; result = 1LL; v14 = 2LL; v15 = 0; v16 = 1LL; LABEL_14: a6[v16] = v15; a6[v14] = 0; return result; } return 1LL; } } return result; }
my_instr_mb: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],RCX XOR EAX,EAX CMP R8,RDX JA 0x0016ec2f MOV R14,R8 TEST R8,R8 JZ 0x0016ebc2 MOV R13,RDX ADD R13,RSI SUB R13,R14 INC R13 CMP R13,RSI JBE 0x0016ec2f MOV RBX,RDI MOV qword ptr [RBP + -0x38],R9 XOR R12D,R12D MOV qword ptr [RBP + -0x30],RSI MOV R15,RSI LAB_0016eb6c: MOV RAX,qword ptr [RBX + 0xc0] MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 MOV RCX,qword ptr [RBP + -0x40] MOV R8,R14 XOR R9D,R9D CALL qword ptr [RAX + 0x8] TEST EAX,EAX JZ 0x0016ebef MOV RAX,qword ptr [RBX + 0xb8] MOV RDI,RBX MOV RSI,R15 MOV RDX,R13 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 MOV ECX,0x1 CMOVC EAX,ECX CMOVL EAX,ECX CDQE ADD R15,RAX INC R12D CMP R15,R13 JC 0x0016eb6c XOR EAX,EAX JMP 0x0016ec2f LAB_0016ebc2: CMP dword ptr [RBP + 0x10],0x0 JZ 0x0016ec2a MOV dword ptr [R9],0x0 MOV EAX,0x1 MOV ECX,0x8 XOR R14D,R14D MOV EDX,0x4 LAB_0016ebe1: MOV dword ptr [R9 + RDX*0x1],R14D MOV dword ptr [R9 + RCX*0x1],0x0 JMP 0x0016ec2f LAB_0016ebef: MOV EAX,0x2 MOV ECX,dword ptr [RBP + 0x10] TEST ECX,ECX JZ 0x0016ec2f MOV R9,qword ptr [RBP + -0x38] MOV dword ptr [R9],0x0 SUB R15D,dword ptr [RBP + -0x30] MOV dword ptr [R9 + 0x4],R15D MOV dword ptr [R9 + 0x8],R12D CMP ECX,0x1 JZ 0x0016ec2f MOV dword ptr [R9 + 0xc],R15D ADD R14D,R15D MOV ECX,0x14 MOV EDX,0x10 JMP 0x0016ebe1 LAB_0016ec2a: MOV EAX,0x1 LAB_0016ec2f: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 my_instr_mb(long param_1,ulong param_2,ulong param_3,int8 param_4,ulong param_5, int4 *param_6,int param_7) { int iVar1; uint uVar2; uint uVar3; int8 uVar4; long lVar5; long lVar6; int iVar7; ulong uVar8; ulong uVar9; int local_38; uVar4 = 0; if (param_5 <= param_3) { if (param_5 == 0) { if (param_7 == 0) { uVar4 = 1; } else { *param_6 = 0; uVar4 = 1; lVar5 = 8; local_38 = 0; lVar6 = 4; LAB_0016ebe1: *(int *)((long)param_6 + lVar6) = local_38; *(int4 *)((long)param_6 + lVar5) = 0; } } else { uVar8 = ((param_3 + param_2) - param_5) + 1; if (param_2 < uVar8) { iVar7 = 0; uVar9 = param_2; do { iVar1 = (**(code **)(*(long *)(param_1 + 0xc0) + 8)) (param_1,uVar9,param_5,param_4,param_5,0); if (iVar1 == 0) { uVar4 = 2; if (param_7 == 0) { return 2; } *param_6 = 0; local_38 = (int)param_2; local_38 = (int)uVar9 - local_38; param_6[1] = local_38; param_6[2] = iVar7; if (param_7 == 1) { return 2; } param_6[3] = local_38; local_38 = (int)param_5 + local_38; lVar5 = 0x14; lVar6 = 0x10; goto LAB_0016ebe1; } uVar2 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,uVar9,uVar8); uVar3 = uVar2; if (uVar2 < 2) { uVar3 = 1; } if ((int)uVar2 < 2) { uVar3 = 1; } uVar9 = uVar9 + (long)(int)uVar3; iVar7 = iVar7 + 1; } while (uVar9 < uVar8); uVar4 = 0; } } } return uVar4; }
13,479
ApiResult<kubecpp::model::core::v1::Pod::ListType, kubecpp::model::internal::common::Status> kubecpp::api::core::v1::CoreApi::List<kubecpp::model::core::v1::Pod>(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&) const
kubecpp/src/api/core/core_api_pod.cpp
ApiResult<Pod::ListType, Status> CoreApi::List<Pod>(const QueryParams& queryParams) const { // Build Path std::string path = BuildPath({ kK8sApiKeyword, kApiVersion, kResourceNamePlural }); if(!queryParams.empty()) { BuildQueryParams(path, queryParams); } // Execute ApiClient auto result = client_.Execute(client::HttpMethod::kGet, path); // Convert body to resource type if(result.ErrorInfo.ErrorCode == 0L) { if(result.StatusCode == 200) { const Pod::ListType data = Pod::ListType::ParseFromJson(result.Body); return ApiResult<Pod::ListType, Status>{ result.StatusCode, data }; } else { const Status data = Status::ParseFromJson(result.Body); return ApiResult<Pod::ListType, Status>{ result.StatusCode, data }; } } return ApiResult<Pod::ListType, Status>{ result.StatusCode }; }
O0
cpp
ApiResult<kubecpp::model::core::v1::Pod::ListType, kubecpp::model::internal::common::Status> kubecpp::api::core::v1::CoreApi::List<kubecpp::model::core::v1::Pod>(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>> const&) const: subq $0x15c8, %rsp # imm = 0x15C8 movq %rdi, 0x80(%rsp) movq %rdi, %rax movq %rax, 0x88(%rsp) movq %rdi, 0x15c0(%rsp) movq %rsi, 0x15b8(%rsp) movq %rdx, 0x15b0(%rsp) movq 0x15b8(%rsp), %rax movq %rax, 0x90(%rsp) movb $0x1, 0x1501(%rsp) leaq 0x1520(%rsp), %rax movq %rax, 0x98(%rsp) movq %rax, 0x1518(%rsp) leaq 0x1517(%rsp), %rdi movq %rdi, 0xa0(%rsp) callq 0x8d2d0 movq 0x98(%rsp), %rdi movq 0xa0(%rsp), %rdx leaq 0x761e1a(%rip), %rsi # 0x84a748 callq 0x8f540 jmp 0xe8935 leaq 0x1540(%rsp), %rax movq %rax, 0x70(%rsp) movq %rax, 0x1518(%rsp) leaq 0x1503(%rsp), %rdi movq %rdi, 0x78(%rsp) callq 0x8d2d0 movq 0x70(%rsp), %rdi movq 0x78(%rsp), %rdx leaq 0x79bf7e(%rip), %rsi # 0x8848eb callq 0x8f540 jmp 0xe8974 leaq 0x1560(%rsp), %rax movq %rax, 0x60(%rsp) movq %rax, 0x1518(%rsp) leaq 0x1502(%rsp), %rdi movq %rdi, 0x68(%rsp) callq 0x8d2d0 movq 0x60(%rsp), %rdi movq 0x68(%rsp), %rdx leaq 0x761dab(%rip), %rsi # 0x84a757 callq 0x8f540 jmp 0xe89b3 movb $0x0, 0x1501(%rsp) leaq 0x1520(%rsp), %rax movq %rax, 0x1580(%rsp) movq $0x3, 0x1588(%rsp) leaq 0x1590(%rsp), %rdi leaq 0x1580(%rsp), %rsi callq 0x1105f0 jmp 0xe89ee leaq 0x1520(%rsp), %rax movq %rax, 0x50(%rsp) addq $0x60, %rax movq %rax, 0x58(%rsp) movq 0x58(%rsp), %rdi addq $-0x20, %rdi movq %rdi, 0x48(%rsp) callq 0x8d778 movq 0x50(%rsp), %rcx movq 0x48(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x58(%rsp) jne 0xe8a04 leaq 0x1502(%rsp), %rdi callq 0x8d740 leaq 0x1503(%rsp), %rdi callq 0x8d740 leaq 0x1517(%rsp), %rdi callq 0x8d740 movq 0x15b0(%rsp), %rdi callq 0xeb2b0 testb $0x1, %al jne 0xe8bb2 movq 0x15b0(%rsp), %rsi leaq 0x1590(%rsp), %rdi callq 0x110800 jmp 0xe8a7e jmp 0xe8bb2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1508(%rsp) movl %eax, 0x1504(%rsp) jmp 0xe8b35 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1508(%rsp) movl %eax, 0x1504(%rsp) jmp 0xe8b28 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1508(%rsp) movl %eax, 0x1504(%rsp) jmp 0xe8b1b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1508(%rsp) movl %eax, 0x1504(%rsp) leaq 0x1520(%rsp), %rax movq %rax, 0x38(%rsp) addq $0x60, %rax movq %rax, 0x40(%rsp) movq 0x40(%rsp), %rdi addq $-0x20, %rdi movq %rdi, 0x30(%rsp) callq 0x8d778 movq 0x38(%rsp), %rcx movq 0x30(%rsp), %rax cmpq %rcx, %rax movq %rax, 0x40(%rsp) jne 0xe8af2 jmp 0xe8b1b leaq 0x1502(%rsp), %rdi callq 0x8d740 leaq 0x1503(%rsp), %rdi callq 0x8d740 leaq 0x1517(%rsp), %rdi callq 0x8d740 testb $0x1, 0x1501(%rsp) jne 0xe8b4e jmp 0xe8b94 movq 0x1518(%rsp), %rax leaq 0x1520(%rsp), %rcx cmpq %rax, %rcx movq %rax, 0x28(%rsp) je 0xe8b92 movq 0x28(%rsp), %rdi addq $-0x20, %rdi movq %rdi, 0x20(%rsp) callq 0x8d778 movq 0x20(%rsp), %rax leaq 0x1520(%rsp), %rcx cmpq %rcx, %rax movq %rax, 0x28(%rsp) jne 0xe8b68 jmp 0xe8b94 jmp 0xe8eaf movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1508(%rsp) movl %eax, 0x1504(%rsp) jmp 0xe8ea2 movq 0x90(%rsp), %rax movq %rax, 0x10(%rsp) movb $0x1, 0x148f(%rsp) leaq 0x1467(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x8d2d0 movq 0x18(%rsp), %rdx leaq 0x7759c9(%rip), %rsi # 0x85e5ae leaq 0x1468(%rsp), %rdi callq 0x8f540 jmp 0xe8bf4 movq 0x10(%rsp), %rsi leaq 0x1490(%rsp), %rdi leaq 0x148f(%rsp), %rdx leaq 0x1590(%rsp), %rcx leaq 0x1468(%rsp), %r8 callq 0xfa4a0 jmp 0xe8c20 leaq 0x1468(%rsp), %rdi callq 0x8d778 leaq 0x1467(%rsp), %rdi callq 0x8d740 cmpq $0x0, 0x14d8(%rsp) jne 0xe8e49 cmpq $0xc8, 0x1490(%rsp) jne 0xe8d87 leaq 0x1498(%rsp), %rsi leaq 0x10a0(%rsp), %rdi callq 0x1b4760 jmp 0xe8c72 movq 0x1490(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0xce0(%rsp), %rdi leaq 0x10a0(%rsp), %rsi callq 0xeb3c0 jmp 0xe8c96 movq 0x8(%rsp), %rsi movq 0x80(%rsp), %rdi leaq 0xce0(%rsp), %rdx callq 0xeb4b0 jmp 0xe8cb2 leaq 0xce0(%rsp), %rdi callq 0xeb4f0 movl $0x1, 0xcdc(%rsp) leaq 0x10a0(%rsp), %rdi callq 0xeb4f0 jmp 0xe8e6b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1508(%rsp) movl %eax, 0x1504(%rsp) jmp 0xe8d13 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1508(%rsp) movl %eax, 0x1504(%rsp) leaq 0x1468(%rsp), %rdi callq 0x8d778 leaq 0x1467(%rsp), %rdi callq 0x8d740 jmp 0xe8ea2 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1508(%rsp) movl %eax, 0x1504(%rsp) jmp 0xe8e95 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1508(%rsp) movl %eax, 0x1504(%rsp) jmp 0xe8d75 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1508(%rsp) movl %eax, 0x1504(%rsp) leaq 0xce0(%rsp), %rdi callq 0xeb4f0 leaq 0x10a0(%rsp), %rdi callq 0xeb4f0 jmp 0xe8e95 leaq 0x1498(%rsp), %rsi leaq 0x6c0(%rsp), %rdi callq 0x129580 jmp 0xe8d9e movq 0x1490(%rsp), %rax movq %rax, (%rsp) leaq 0xa8(%rsp), %rdi leaq 0x6c0(%rsp), %rsi callq 0xe6020 jmp 0xe8dc1 movq (%rsp), %rsi movq 0x80(%rsp), %rdi leaq 0xa8(%rsp), %rdx callq 0xeb540 jmp 0xe8ddc leaq 0xa8(%rsp), %rdi callq 0x90030 movl $0x1, 0xcdc(%rsp) leaq 0x6c0(%rsp), %rdi callq 0x90030 jmp 0xe8e6b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1508(%rsp) movl %eax, 0x1504(%rsp) jmp 0xe8e3a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x1508(%rsp) movl %eax, 0x1504(%rsp) leaq 0xa8(%rsp), %rdi callq 0x90030 leaq 0x6c0(%rsp), %rdi callq 0x90030 jmp 0xe8e95 movq 0x80(%rsp), %rdi movq 0x1490(%rsp), %rsi callq 0xeb580 jmp 0xe8e60 movl $0x1, 0xcdc(%rsp) leaq 0x1490(%rsp), %rdi callq 0xeb380 leaq 0x1590(%rsp), %rdi callq 0x8d778 movq 0x88(%rsp), %rax addq $0x15c8, %rsp # imm = 0x15C8 retq leaq 0x1490(%rsp), %rdi callq 0xeb380 leaq 0x1590(%rsp), %rdi callq 0x8d778 movq 0x1508(%rsp), %rdi callq 0x8ccd0 nopl (%rax)
_ZNK7kubecpp3api4core2v17CoreApi4ListINS_5model4core2v13PodEEE9ApiResultINT_8ListTypeENS5_8internal6common6StatusEERKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESM_St4lessISM_ESaISt4pairIKSM_SM_EEE: sub rsp, 15C8h mov qword ptr [rsp+15C8h+var_1548], rdi; int mov rax, rdi mov qword ptr [rsp+15C8h+var_1540], rax; int mov [rsp+15C8h+var_8], rdi mov qword ptr [rsp+15C8h+var_10], rsi mov [rsp+15C8h+var_18], rdx mov rax, qword ptr [rsp+15C8h+var_10] mov [rsp+15C8h+var_1538], rax; int mov [rsp+15C8h+var_C7], 1 lea rax, [rsp+15C8h+var_A8] mov qword ptr [rsp+15C8h+var_1530], rax; int mov qword ptr [rsp+15C8h+var_B1+1], rax lea rdi, [rsp+15C8h+var_B1] mov qword ptr [rsp+15C8h+var_1528], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, qword ptr [rsp+15C8h+var_1530] mov rdx, qword ptr [rsp+15C8h+var_1528] lea rsi, unk_84A748 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_E8935: lea rax, [rsp+15C8h+var_88] mov qword ptr [rsp+15C8h+var_1558], rax; int mov qword ptr [rsp+15C8h+var_B1+1], rax lea rdi, [rsp+15C8h+var_C6+1] mov qword ptr [rsp+15C8h+var_1550], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, qword ptr [rsp+15C8h+var_1558] mov rdx, qword ptr [rsp+15C8h+var_1550] lea rsi, aIdQcsPkixqcsyn+14h; "v1" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_E8974: lea rax, [rsp+15C8h+var_68] mov qword ptr [rsp+15C8h+var_1568], rax; char mov qword ptr [rsp+15C8h+var_B1+1], rax lea rdi, [rsp+15C8h+var_C6] mov qword ptr [rsp+15C8h+var_1560], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, qword ptr [rsp+15C8h+var_1568] mov rdx, qword ptr [rsp+15C8h+var_1560] lea rsi, aPods; "pods" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_E89B3: mov [rsp+15C8h+var_C7], 0 lea rax, [rsp+15C8h+var_A8] mov qword ptr [rsp+15C8h+var_48], rax mov [rsp+15C8h+var_40], 3 lea rdi, [rsp+15C8h+var_38]; int lea rsi, [rsp+15C8h+var_48]; int call _ZN7kubecpp6common9BuildPathERKSt16initializer_listINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEE; kubecpp::common::BuildPath(std::initializer_list<std::string> const&) jmp short $+2 loc_E89EE: lea rax, [rsp+15C8h+var_A8] mov [rsp+15C8h+var_1578], rax add rax, 60h ; '`' mov [rsp+15C8h+var_1570], rax loc_E8A04: mov rdi, [rsp+15C8h+var_1570] add rdi, 0FFFFFFFFFFFFFFE0h; void * mov [rsp+15C8h+var_1580], rdi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rcx, [rsp+15C8h+var_1578] mov rax, [rsp+15C8h+var_1580] cmp rax, rcx mov [rsp+15C8h+var_1570], rax jnz short loc_E8A04 lea rdi, [rsp+15C8h+var_C6] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+15C8h+var_C6+1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+15C8h+var_B1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+15C8h+var_18] call _ZNKSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEE5emptyEv; std::map<std::string,std::string>::empty(void) test al, 1 jnz loc_E8BB2 mov rsi, [rsp+15C8h+var_18] lea rdi, [rsp+15C8h+var_38] call _ZN7kubecpp6common16BuildQueryParamsERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS6_S6_St4lessIS6_ESaISt4pairIKS6_S6_EEE; kubecpp::common::BuildQueryParams(std::string &,std::map<std::string,std::string> const&) jmp short $+2 loc_E8A7E: jmp loc_E8BB2 mov rcx, rax mov eax, edx mov [rsp+arg_1500], rcx mov [rsp+arg_14FC], eax jmp loc_E8B35 mov rcx, rax mov eax, edx mov [rsp+arg_1500], rcx mov [rsp+arg_14FC], eax jmp short loc_E8B28 mov rcx, rax mov eax, edx mov [rsp+arg_1500], rcx mov [rsp+arg_14FC], eax jmp short loc_E8B1B mov rcx, rax mov eax, edx mov [rsp+arg_1500], rcx mov [rsp+arg_14FC], eax lea rax, [rsp+arg_1518] mov [rsp+arg_30], rax add rax, 60h ; '`' mov [rsp+arg_38], rax loc_E8AF2: mov rdi, [rsp+arg_38] add rdi, 0FFFFFFFFFFFFFFE0h; void * mov [rsp+arg_28], rdi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rcx, [rsp+arg_30] mov rax, [rsp+arg_28] cmp rax, rcx mov [rsp+arg_38], rax jnz short loc_E8AF2 jmp short $+2 loc_E8B1B: lea rdi, [rsp+arg_14FA] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_E8B28: lea rdi, [rsp+arg_14FB] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_E8B35: lea rdi, [rsp+arg_150F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() test [rsp+arg_14F9], 1 jnz short loc_E8B4E jmp short loc_E8B94 loc_E8B4E: mov rax, [rsp+arg_1510] lea rcx, [rsp+arg_1518] cmp rcx, rax mov [rsp+arg_20], rax jz short loc_E8B92 loc_E8B68: mov rdi, [rsp+arg_20] add rdi, 0FFFFFFFFFFFFFFE0h; void * mov [rsp+arg_18], rdi call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+arg_18] lea rcx, [rsp+arg_1518] cmp rax, rcx mov [rsp+arg_20], rax jnz short loc_E8B68 loc_E8B92: jmp short $+2 loc_E8B94: jmp loc_E8EAF mov rcx, rax mov eax, edx mov [rsp+arg_1500], rcx mov [rsp+arg_14FC], eax jmp loc_E8EA2 loc_E8BB2: mov rax, [rsp+15C8h+var_1538] mov [rsp+15C8h+var_15B8], rax; kubecpp::model::internal::common::Status * mov [rsp+15C8h+var_139], 1 lea rdi, [rsp+15C8h+var_161] mov qword ptr [rsp+15C8h+var_15B0], rdi; int call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, qword ptr [rsp+15C8h+var_15B0] lea rsi, dword_85E5AE lea rdi, [rsp+15C8h+var_161+1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_E8BF4: mov rsi, [rsp+15C8h+var_15B8] lea rdi, [rsp+15C8h+var_138] lea rdx, [rsp+15C8h+var_139] lea rcx, [rsp+15C8h+var_38] lea r8, [rsp+15C8h+var_161+1] call _ZNK7kubecpp6client9ApiClient7ExecuteERKNS0_10HttpMethodERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESC_; kubecpp::client::ApiClient::Execute(kubecpp::client::HttpMethod const&,std::string const&,std::string const&) jmp short $+2 loc_E8C20: lea rdi, [rsp+15C8h+var_161+1]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+15C8h+var_161] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() cmp [rsp+15C8h+var_F0], 0 jnz loc_E8E49 cmp [rsp+15C8h+var_138], 0C8h jnz loc_E8D87 lea rsi, [rsp+15C8h+var_130]; int lea rdi, [rsp+15C8h+var_528]; int call _ZN7kubecpp5model4core2v17PodList13ParseFromJsonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; kubecpp::model::core::v1::PodList::ParseFromJson(std::string const&) jmp short $+2 loc_E8C72: mov rax, [rsp+15C8h+var_138] mov [rsp+15C8h+var_15C0], rax lea rdi, [rsp+15C8h+var_8E8]; this lea rsi, [rsp+15C8h+var_528]; kubecpp::model::core::v1::PodList * call _ZN7kubecpp5model4core2v17PodListC2ERKS3_; kubecpp::model::core::v1::PodList::PodList(kubecpp::model::core::v1::PodList const&) jmp short $+2 loc_E8C96: mov rsi, [rsp+15C8h+var_15C0] mov rdi, qword ptr [rsp+15C8h+var_1548] lea rdx, [rsp+15C8h+var_8E8] call _ZN9ApiResultIN7kubecpp5model4core2v17PodListENS1_8internal6common6StatusEEC2ElS4_; ApiResult<kubecpp::model::core::v1::PodList,kubecpp::model::internal::common::Status>::ApiResult(long,kubecpp::model::core::v1::PodList) jmp short $+2 loc_E8CB2: lea rdi, [rsp+15C8h+var_8E8]; this call _ZN7kubecpp5model4core2v17PodListD2Ev; kubecpp::model::core::v1::PodList::~PodList() mov [rsp+15C8h+var_8EC], 1 lea rdi, [rsp+15C8h+var_528]; this call _ZN7kubecpp5model4core2v17PodListD2Ev; kubecpp::model::core::v1::PodList::~PodList() jmp loc_E8E6B mov rcx, rax mov eax, edx mov [rsp+arg_1500], rcx mov [rsp+arg_14FC], eax jmp short loc_E8D13 mov rcx, rax mov eax, edx mov [rsp+arg_1500], rcx mov [rsp+arg_14FC], eax lea rdi, [rsp+arg_1460]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_E8D13: lea rdi, [rsp+arg_145F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_E8EA2 mov rcx, rax mov eax, edx mov [rsp+arg_1500], rcx mov [rsp+arg_14FC], eax jmp loc_E8E95 mov rcx, rax mov eax, edx mov [rsp+arg_1500], rcx mov [rsp+arg_14FC], eax jmp short loc_E8D75 mov rcx, rax mov eax, edx mov [rsp+arg_1500], rcx mov [rsp+arg_14FC], eax lea rdi, [rsp+arg_CD8]; this call _ZN7kubecpp5model4core2v17PodListD2Ev; kubecpp::model::core::v1::PodList::~PodList() loc_E8D75: lea rdi, [rsp+arg_1098]; this call _ZN7kubecpp5model4core2v17PodListD2Ev; kubecpp::model::core::v1::PodList::~PodList() jmp loc_E8E95 loc_E8D87: lea rsi, [rsp+15C8h+var_130]; int lea rdi, [rsp+15C8h+var_F08]; int call _ZN7kubecpp5model8internal6common6Status13ParseFromJsonERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; kubecpp::model::internal::common::Status::ParseFromJson(std::string const&) jmp short $+2 loc_E8D9E: mov rax, [rsp+15C8h+var_138] mov [rsp+15C8h+var_15C8], rax lea rdi, [rsp+15C8h+var_1520]; this lea rsi, [rsp+15C8h+var_F08]; kubecpp::model::internal::common::Status * call _ZN7kubecpp5model8internal6common6StatusC2ERKS3_; kubecpp::model::internal::common::Status::Status(kubecpp::model::internal::common::Status const&) jmp short $+2 loc_E8DC1: mov rsi, [rsp+15C8h+var_15C8] mov rdi, qword ptr [rsp+15C8h+var_1548] lea rdx, [rsp+15C8h+var_1520] call _ZN9ApiResultIN7kubecpp5model4core2v17PodListENS1_8internal6common6StatusEEC2ElS7_; ApiResult<kubecpp::model::core::v1::PodList,kubecpp::model::internal::common::Status>::ApiResult(long,kubecpp::model::internal::common::Status) jmp short $+2 loc_E8DDC: lea rdi, [rsp+15C8h+var_1520]; this call _ZN7kubecpp5model8internal6common6StatusD2Ev; kubecpp::model::internal::common::Status::~Status() mov [rsp+15C8h+var_8EC], 1 lea rdi, [rsp+15C8h+var_F08]; this call _ZN7kubecpp5model8internal6common6StatusD2Ev; kubecpp::model::internal::common::Status::~Status() jmp short loc_E8E6B mov rcx, rax mov eax, edx mov [rsp+arg_1500], rcx mov [rsp+arg_14FC], eax jmp short loc_E8E3A mov rcx, rax mov eax, edx mov [rsp+arg_1500], rcx mov [rsp+arg_14FC], eax lea rdi, [rsp+arg_A0]; this call _ZN7kubecpp5model8internal6common6StatusD2Ev; kubecpp::model::internal::common::Status::~Status() loc_E8E3A: lea rdi, [rsp+arg_6B8]; this call _ZN7kubecpp5model8internal6common6StatusD2Ev; kubecpp::model::internal::common::Status::~Status() jmp short loc_E8E95 loc_E8E49: mov rdi, qword ptr [rsp+15C8h+var_1548] mov rsi, [rsp+15C8h+var_138] call _ZN9ApiResultIN7kubecpp5model4core2v17PodListENS1_8internal6common6StatusEEC2El; ApiResult<kubecpp::model::core::v1::PodList,kubecpp::model::internal::common::Status>::ApiResult(long) jmp short $+2 loc_E8E60: mov [rsp+15C8h+var_8EC], 1 loc_E8E6B: lea rdi, [rsp+15C8h+var_138]; this call _ZN7kubecpp6client9ApiClient11ApiResponseD2Ev; kubecpp::client::ApiClient::ApiResponse::~ApiResponse() lea rdi, [rsp+15C8h+var_38]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, qword ptr [rsp+15C8h+var_1540] add rsp, 15C8h retn loc_E8E95: lea rdi, [rsp+arg_1488]; this call _ZN7kubecpp6client9ApiClient11ApiResponseD2Ev; kubecpp::client::ApiClient::ApiResponse::~ApiResponse() loc_E8EA2: lea rdi, [rsp+arg_1588]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_E8EAF: mov rdi, [rsp+arg_1500] call __Unwind_Resume
long long kubecpp::api::core::v1::CoreApi::List<kubecpp::model::core::v1::Pod>( long long a1, kubecpp::model::internal::common::Status *a2, int *a3) { long long v3; // rdx long long v4; // rdx int *v5; // rsi long long v6; // rdx int v7; // edx int v8; // ecx int v9; // r8d int v10; // r9d int v11; // edx int v12; // ecx int v13; // r8d int v14; // r9d kubecpp::model::core::v1::PodList *v16; // [rsp+0h] [rbp-15C8h] long long v17; // [rsp+0h] [rbp-15C8h] int v18; // [rsp+8h] [rbp-15C0h] long long v19; // [rsp+8h] [rbp-15C0h] long long v20; // [rsp+20h] [rbp-15A8h] int *v21; // [rsp+58h] [rbp-1570h] _BYTE v23[1560]; // [rsp+A8h] [rbp-1520h] BYREF int v24[391]; // [rsp+6C0h] [rbp-F08h] BYREF int v25; // [rsp+CDCh] [rbp-8ECh] _BYTE v26[960]; // [rsp+CE0h] [rbp-8E8h] BYREF int v27[241]; // [rsp+10A0h] [rbp-528h] BYREF int v28[10]; // [rsp+1467h] [rbp-161h] BYREF char v29; // [rsp+148Fh] [rbp-139h] BYREF long long v30; // [rsp+1490h] [rbp-138h] BYREF int v31[16]; // [rsp+1498h] [rbp-130h] BYREF long long v32; // [rsp+14D8h] [rbp-F0h] char v33; // [rsp+1501h] [rbp-C7h] int v34[5]; // [rsp+1502h] [rbp-C6h] BYREF _BYTE v35[9]; // [rsp+1517h] [rbp-B1h] BYREF int v36[8]; // [rsp+1520h] [rbp-A8h] BYREF int v37[8]; // [rsp+1540h] [rbp-88h] BYREF char v38[32]; // [rsp+1560h] [rbp-68h] BYREF int v39[2]; // [rsp+1580h] [rbp-48h] BYREF long long v40; // [rsp+1588h] [rbp-40h] int v41[8]; // [rsp+1590h] [rbp-38h] BYREF int *v42; // [rsp+15B0h] [rbp-18h] int v43[2]; // [rsp+15B8h] [rbp-10h] long long v44; // [rsp+15C0h] [rbp-8h] v44 = a1; *(_QWORD *)v43 = a2; v42 = a3; *(_QWORD *)&v35[1] = v36; std::allocator<char>::allocator(v35, a2, a3); std::string::basic_string<std::allocator<char>>((long long)v36, (long long)&unk_84A748, (long long)v35); *(_QWORD *)&v35[1] = v37; std::allocator<char>::allocator((char *)v34 + 1, &unk_84A748, v3); std::string::basic_string<std::allocator<char>>((long long)v37, (long long)"v1", (long long)v34 + 1); *(_QWORD *)&v35[1] = v38; std::allocator<char>::allocator(v34, "v1", v4); std::string::basic_string<std::allocator<char>>((long long)v38, (long long)"pods", (long long)v34); v33 = 0; *(_QWORD *)v39 = v36; v40 = 3LL; v5 = v39; kubecpp::common::BuildPath(v41, v39); v21 = v39; do { std::string::~string(v21 - 8); v21 -= 8; } while ( v21 != v36 ); std::allocator<char>::~allocator(v34); std::allocator<char>::~allocator((char *)v34 + 1); std::allocator<char>::~allocator(v35); if ( (std::map<std::string,std::string>::empty(v42) & 1) == 0 ) { v5 = v42; kubecpp::common::BuildQueryParams(v41, v42); } v29 = 1; std::allocator<char>::allocator(v28, v5, v6); std::string::basic_string<std::allocator<char>>((long long)v28 + 1, (long long)&dword_85E5AE, (long long)v28); kubecpp::client::ApiClient::Execute(&v30, a2, &v29, v41, (char *)v28 + 1); std::string::~string((char *)v28 + 1); std::allocator<char>::~allocator(v28); if ( v32 ) { ApiResult<kubecpp::model::core::v1::PodList,kubecpp::model::internal::common::Status>::ApiResult(a1, v30); v25 = 1; } else if ( v30 == 200 ) { kubecpp::model::core::v1::PodList::ParseFromJson((int)v27, (int)v31, v7, v8, v9, v10, v16, v18, (long long)a2); v19 = v30; kubecpp::model::core::v1::PodList::PodList( (kubecpp::model::core::v1::PodList *)v26, (const kubecpp::model::core::v1::PodList *)v27); ApiResult<kubecpp::model::core::v1::PodList,kubecpp::model::internal::common::Status>::ApiResult(a1, v19, v26); kubecpp::model::core::v1::PodList::~PodList((kubecpp::model::core::v1::PodList *)v26); v25 = 1; kubecpp::model::core::v1::PodList::~PodList((kubecpp::model::core::v1::PodList *)v27); } else { kubecpp::model::internal::common::Status::ParseFromJson( (int)v24, (int)v31, v7, v8, v9, v10, (int)v16, v18, a2, (int)v28, v20); v17 = v30; kubecpp::model::internal::common::Status::Status( (kubecpp::model::internal::common::Status *)v23, (const kubecpp::model::internal::common::Status *)v24, v11, v12, v13, v14); ApiResult<kubecpp::model::core::v1::PodList,kubecpp::model::internal::common::Status>::ApiResult(a1, v17, v23); kubecpp::model::internal::common::Status::~Status((kubecpp::model::internal::common::Status *)v23); v25 = 1; kubecpp::model::internal::common::Status::~Status((kubecpp::model::internal::common::Status *)v24); } kubecpp::client::ApiClient::ApiResponse::~ApiResponse((kubecpp::client::ApiClient::ApiResponse *)&v30); std::string::~string(v41); return a1; }
List<kubecpp::model::core::v1::Pod>: SUB RSP,0x15c8 MOV qword ptr [RSP + 0x80],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x88],RAX MOV qword ptr [RSP + 0x15c0],RDI MOV qword ptr [RSP + 0x15b8],RSI MOV qword ptr [RSP + 0x15b0],RDX MOV RAX,qword ptr [RSP + 0x15b8] MOV qword ptr [RSP + 0x90],RAX MOV byte ptr [RSP + 0x1501],0x1 LEA RAX,[RSP + 0x1520] MOV qword ptr [RSP + 0x98],RAX MOV qword ptr [RSP + 0x1518],RAX LEA RDI,[RSP + 0x1517] MOV qword ptr [RSP + 0xa0],RDI CALL 0x0018d2d0 MOV RDI,qword ptr [RSP + 0x98] MOV RDX,qword ptr [RSP + 0xa0] LAB_001e8927: LEA RSI,[0x94a748] CALL 0x0018f540 JMP 0x001e8935 LAB_001e8935: LEA RAX,[RSP + 0x1540] MOV qword ptr [RSP + 0x70],RAX MOV qword ptr [RSP + 0x1518],RAX LEA RDI,[RSP + 0x1503] MOV qword ptr [RSP + 0x78],RDI CALL 0x0018d2d0 MOV RDI,qword ptr [RSP + 0x70] MOV RDX,qword ptr [RSP + 0x78] LAB_001e8966: LEA RSI,[0x9848eb] CALL 0x0018f540 JMP 0x001e8974 LAB_001e8974: LEA RAX,[RSP + 0x1560] MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x1518],RAX LEA RDI,[RSP + 0x1502] MOV qword ptr [RSP + 0x68],RDI CALL 0x0018d2d0 MOV RDI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] LAB_001e89a5: LEA RSI,[0x94a757] CALL 0x0018f540 JMP 0x001e89b3 LAB_001e89b3: MOV byte ptr [RSP + 0x1501],0x0 LEA RAX,[RSP + 0x1520] MOV qword ptr [RSP + 0x1580],RAX MOV qword ptr [RSP + 0x1588],0x3 LAB_001e89d7: LEA RDI,[RSP + 0x1590] LEA RSI,[RSP + 0x1580] CALL 0x002105f0 JMP 0x001e89ee LAB_001e89ee: LEA RAX,[RSP + 0x1520] MOV qword ptr [RSP + 0x50],RAX ADD RAX,0x60 MOV qword ptr [RSP + 0x58],RAX LAB_001e8a04: MOV RDI,qword ptr [RSP + 0x58] ADD RDI,-0x20 MOV qword ptr [RSP + 0x48],RDI CALL 0x0018d778 MOV RCX,qword ptr [RSP + 0x50] MOV RAX,qword ptr [RSP + 0x48] CMP RAX,RCX MOV qword ptr [RSP + 0x58],RAX JNZ 0x001e8a04 LEA RDI,[RSP + 0x1502] CALL 0x0018d740 LEA RDI,[RSP + 0x1503] CALL 0x0018d740 LEA RDI,[RSP + 0x1517] CALL 0x0018d740 MOV RDI,qword ptr [RSP + 0x15b0] CALL 0x001eb2b0 TEST AL,0x1 JNZ 0x001e8bb2 MOV RSI,qword ptr [RSP + 0x15b0] LAB_001e8a6f: LEA RDI,[RSP + 0x1590] CALL 0x00210800 JMP 0x001e8a7e LAB_001e8a7e: JMP 0x001e8bb2 LAB_001e8bb2: MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x10],RAX MOV byte ptr [RSP + 0x148f],0x1 LEA RDI,[RSP + 0x1467] MOV qword ptr [RSP + 0x18],RDI CALL 0x0018d2d0 MOV RDX,qword ptr [RSP + 0x18] LAB_001e8bde: LEA RSI,[0x95e5ae] LEA RDI,[RSP + 0x1468] CALL 0x0018f540 JMP 0x001e8bf4 LAB_001e8bf4: MOV RSI,qword ptr [RSP + 0x10] LEA RDI,[RSP + 0x1490] LEA RDX,[RSP + 0x148f] LEA RCX,[RSP + 0x1590] LEA R8,[RSP + 0x1468] CALL 0x001fa4a0 JMP 0x001e8c20 LAB_001e8c20: LEA RDI,[RSP + 0x1468] CALL 0x0018d778 LEA RDI,[RSP + 0x1467] CALL 0x0018d740 CMP qword ptr [RSP + 0x14d8],0x0 JNZ 0x001e8e49 CMP qword ptr [RSP + 0x1490],0xc8 JNZ 0x001e8d87 LEA RSI,[RSP + 0x1498] LAB_001e8c63: LEA RDI,[RSP + 0x10a0] CALL 0x002b4760 JMP 0x001e8c72 LAB_001e8c72: MOV RAX,qword ptr [RSP + 0x1490] MOV qword ptr [RSP + 0x8],RAX LAB_001e8c7f: LEA RDI,[RSP + 0xce0] LEA RSI,[RSP + 0x10a0] CALL 0x001eb3c0 JMP 0x001e8c96 LAB_001e8c96: MOV RSI,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RSP + 0x80] LEA RDX,[RSP + 0xce0] CALL 0x001eb4b0 JMP 0x001e8cb2 LAB_001e8cb2: LEA RDI,[RSP + 0xce0] CALL 0x001eb4f0 MOV dword ptr [RSP + 0xcdc],0x1 LEA RDI,[RSP + 0x10a0] CALL 0x001eb4f0 JMP 0x001e8e6b LAB_001e8d87: LEA RSI,[RSP + 0x1498] LAB_001e8d8f: LEA RDI,[RSP + 0x6c0] CALL 0x00229580 JMP 0x001e8d9e LAB_001e8d9e: MOV RAX,qword ptr [RSP + 0x1490] MOV qword ptr [RSP],RAX LAB_001e8daa: LEA RDI,[RSP + 0xa8] LEA RSI,[RSP + 0x6c0] CALL 0x001e6020 JMP 0x001e8dc1 LAB_001e8dc1: MOV RSI,qword ptr [RSP] MOV RDI,qword ptr [RSP + 0x80] LEA RDX,[RSP + 0xa8] CALL 0x001eb540 JMP 0x001e8ddc LAB_001e8ddc: LEA RDI,[RSP + 0xa8] CALL 0x00190030 MOV dword ptr [RSP + 0xcdc],0x1 LEA RDI,[RSP + 0x6c0] CALL 0x00190030 JMP 0x001e8e6b LAB_001e8e49: MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x1490] LAB_001e8e59: CALL 0x001eb580 LAB_001e8e5e: JMP 0x001e8e60 LAB_001e8e60: MOV dword ptr [RSP + 0xcdc],0x1 LAB_001e8e6b: LEA RDI,[RSP + 0x1490] CALL 0x001eb380 LEA RDI,[RSP + 0x1590] CALL 0x0018d778 MOV RAX,qword ptr [RSP + 0x88] ADD RSP,0x15c8 RET
/* ApiResult<kubecpp::model::core::v1::Pod::ListType, kubecpp::model::internal::common::Status> kubecpp::api::core::v1::CoreApi::List<kubecpp::model::core::v1::Pod>(std::map<std::__cxx11::string, std::__cxx11::string, std::less<std::__cxx11::string >, std::allocator<std::pair<std::__cxx11::string const, std::__cxx11::string > > > const&) const */ map * kubecpp::api::core::v1::CoreApi::List<kubecpp::model::core::v1::Pod>(map *param_1) { ulong uVar1; map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *in_RDX; string *in_RSI; string *local_1570; Status local_1520 [1560]; Status local_f08 [1564]; int4 local_8ec; PodList local_8e8 [960]; PodList local_528 [967]; allocator local_161; string local_160 [39]; string local_139; long local_138; string local_130 [64]; long local_f0; int1 local_c7; allocator local_c6; allocator local_c5 [20]; allocator local_b1; string *local_b0; string local_a8 [32]; string local_88 [32]; string local_68 [32]; string *local_48; int8 local_40; common local_38 [32]; map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *local_18; map *local_8; local_c7 = 1; local_b0 = local_a8; local_18 = in_RDX; local_8 = param_1; std::allocator<char>::allocator(); /* try { // try from 001e8927 to 001e8932 has its CatchHandler @ 001e8a83 */ std::__cxx11::string::string<std::allocator<char>>(local_a8,"api",&local_b1); local_b0 = local_88; std::allocator<char>::allocator(); /* try { // try from 001e8966 to 001e8971 has its CatchHandler @ 001e8a9c */ std::__cxx11::string::string<std::allocator<char>>(local_88,"v1",local_c5); local_b0 = local_68; std::allocator<char>::allocator(); /* try { // try from 001e89a5 to 001e89b0 has its CatchHandler @ 001e8ab2 */ std::__cxx11::string::string<std::allocator<char>>(local_68,"pods",&local_c6); local_c7 = 0; local_48 = local_a8; local_40 = 3; /* try { // try from 001e89d7 to 001e89eb has its CatchHandler @ 001e8ac8 */ common::BuildPath(local_38,(initializer_list *)&local_48); local_1570 = (string *)&local_48; do { local_1570 = local_1570 + -0x20; std::__cxx11::string::~string(local_1570); } while (local_1570 != local_a8); std::allocator<char>::~allocator((allocator<char> *)&local_c6); std::allocator<char>::~allocator((allocator<char> *)local_c5); std::allocator<char>::~allocator((allocator<char> *)&local_b1); uVar1 = std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::empty(local_18); if ((uVar1 & 1) == 0) { /* try { // try from 001e8a6f to 001e8a7b has its CatchHandler @ 001e8b99 */ common::BuildQueryParams((string *)local_38,(map *)local_18); } local_139 = (string)0x1; std::allocator<char>::allocator(); /* try { // try from 001e8bde to 001e8bf1 has its CatchHandler @ 001e8cdc */ std::__cxx11::string::string<std::allocator<char>>(local_160,"",&local_161); /* try { // try from 001e8bf4 to 001e8c1d has its CatchHandler @ 001e8cf2 */ client::ApiClient::Execute((HttpMethod *)&local_138,in_RSI,&local_139); std::__cxx11::string::~string(local_160); std::allocator<char>::~allocator((allocator<char> *)&local_161); if (local_f0 == 0) { if (local_138 == 200) { /* try { // try from 001e8c63 to 001e8c6f has its CatchHandler @ 001e8d25 */ model::core::v1::PodList::ParseFromJson(local_528,local_130); /* try { // try from 001e8c7f to 001e8c93 has its CatchHandler @ 001e8d3e */ model::core::v1::PodList::PodList(local_8e8,local_528); /* try { // try from 001e8c96 to 001e8caf has its CatchHandler @ 001e8d54 */ ApiResult<kubecpp::model::core::v1::PodList,kubecpp::model::internal::common::Status>:: ApiResult((ApiResult<kubecpp::model::core::v1::PodList,kubecpp::model::internal::common::Status> *)param_1,local_138,local_8e8); model::core::v1::PodList::~PodList(local_8e8); local_8ec = 1; model::core::v1::PodList::~PodList(local_528); } else { /* try { // try from 001e8d8f to 001e8d9b has its CatchHandler @ 001e8d25 */ model::internal::common::Status::ParseFromJson(local_f08,local_130); /* try { // try from 001e8daa to 001e8dbe has its CatchHandler @ 001e8e03 */ model::internal::common::Status::Status(local_1520,local_f08); /* try { // try from 001e8dc1 to 001e8dd9 has its CatchHandler @ 001e8e19 */ ApiResult<kubecpp::model::core::v1::PodList,kubecpp::model::internal::common::Status>:: ApiResult((ApiResult<kubecpp::model::core::v1::PodList,kubecpp::model::internal::common::Status> *)param_1,local_138,local_1520); model::internal::common::Status::~Status(local_1520); local_8ec = 1; model::internal::common::Status::~Status(local_f08); } } else { /* try { // try from 001e8e59 to 001e8e5d has its CatchHandler @ 001e8d25 */ ApiResult<kubecpp::model::core::v1::PodList,kubecpp::model::internal::common::Status>::ApiResult ((ApiResult<kubecpp::model::core::v1::PodList,kubecpp::model::internal::common::Status> *)param_1,local_138); local_8ec = 1; } client::ApiClient::ApiResponse::~ApiResponse((ApiResponse *)&local_138); std::__cxx11::string::~string((string *)local_38); return param_1; }
13,480
mysql_find_charset_nr
eloqsql/libmariadb/libmariadb/ma_charset.c
const MARIADB_CHARSET_INFO * mysql_find_charset_nr(unsigned int charsetnr) { const MARIADB_CHARSET_INFO * c = mariadb_compiled_charsets; if (my_collation_id_is_uca1400(charsetnr)) charsetnr= my_uca1400_collation_id_uca400_compat(charsetnr); do { if (c->nr == charsetnr) { return(c); } ++c; } while (c[0].nr != 0); return(NULL); }
O0
c
mysql_find_charset_nr: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0xc(%rbp) leaq 0x189ae(%rip), %rax # 0x76fa0 movq %rax, -0x18(%rbp) movl -0xc(%rbp), %edi callq 0x5e650 cmpb $0x0, %al je 0x5e60d movl -0xc(%rbp), %edi callq 0x5e680 movl %eax, -0xc(%rbp) jmp 0x5e60f movq -0x18(%rbp), %rax movl (%rax), %eax cmpl -0xc(%rbp), %eax jne 0x5e624 movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) jmp 0x5e641 movq -0x18(%rbp), %rax addq $0x48, %rax movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, (%rax) jne 0x5e60f movq $0x0, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
mysql_find_charset_nr: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_C], edi lea rax, mariadb_compiled_charsets mov [rbp+var_18], rax mov edi, [rbp+var_C] call my_collation_id_is_uca1400 cmp al, 0 jz short loc_5E60D mov edi, [rbp+var_C] call my_uca1400_collation_id_uca400_compat mov [rbp+var_C], eax loc_5E60D: jmp short $+2 loc_5E60F: mov rax, [rbp+var_18] mov eax, [rax] cmp eax, [rbp+var_C] jnz short loc_5E624 mov rax, [rbp+var_18] mov [rbp+var_8], rax jmp short loc_5E641 loc_5E624: mov rax, [rbp+var_18] add rax, 48h ; 'H' mov [rbp+var_18], rax mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jnz short loc_5E60F mov [rbp+var_8], 0 loc_5E641: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
_DWORD * mysql_find_charset_nr(unsigned int a1) { _DWORD *v2; // [rsp+8h] [rbp-18h] unsigned int v3; // [rsp+14h] [rbp-Ch] v3 = a1; v2 = &mariadb_compiled_charsets; if ( (unsigned __int8)my_collation_id_is_uca1400(a1) ) v3 = my_uca1400_collation_id_uca400_compat(a1); do { if ( *v2 == v3 ) return v2; v2 += 18; } while ( *v2 ); return 0LL; }
mysql_find_charset_nr: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0xc],EDI LEA RAX,[0x176fa0] MOV qword ptr [RBP + -0x18],RAX MOV EDI,dword ptr [RBP + -0xc] CALL 0x0015e650 CMP AL,0x0 JZ 0x0015e60d MOV EDI,dword ptr [RBP + -0xc] CALL 0x0015e680 MOV dword ptr [RBP + -0xc],EAX LAB_0015e60d: JMP 0x0015e60f LAB_0015e60f: MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] CMP EAX,dword ptr [RBP + -0xc] JNZ 0x0015e624 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX JMP 0x0015e641 LAB_0015e624: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x48 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JNZ 0x0015e60f MOV qword ptr [RBP + -0x8],0x0 LAB_0015e641: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
int * mysql_find_charset_nr(int param_1) { char cVar1; int *local_20; int local_14; local_20 = &mariadb_compiled_charsets; cVar1 = my_collation_id_is_uca1400(param_1); local_14 = param_1; if (cVar1 != '\0') { local_14 = my_uca1400_collation_id_uca400_compat(param_1); } do { if (*local_20 == local_14) { return local_20; } local_20 = local_20 + 0x12; } while (*local_20 != 0); return (int *)0x0; }
13,481
directory_file_name
eloqsql/mysys/my_lib.c
static char *directory_file_name (char * dst, const char *src) { /* Process as Unix format: just remove test the final slash. */ char *end; DBUG_ASSERT(strlen(src) < (FN_REFLEN + 1)); if (src[0] == 0) src= (char*) "."; /* Use empty as current */ end= strnmov(dst, src, FN_REFLEN + 1); if (end[-1] != FN_LIBCHAR) { *end++= FN_LIBCHAR; /* Add last '/' */ *end='\0'; } return end; }
O0
c
directory_file_name: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0x7f8d2 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0x7f8e9 leaq 0x5242b(%rip), %rax # 0xd1d10 movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl $0x201, %edx # imm = 0x201 callq 0xca930 movq %rax, -0x18(%rbp) movq -0x18(%rbp), %rax movsbl -0x1(%rax), %eax cmpl $0x2f, %eax je 0x7f925 movq -0x18(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x18(%rbp) movb $0x2f, (%rax) movq -0x18(%rbp), %rax movb $0x0, (%rax) movq -0x18(%rbp), %rax addq $0x20, %rsp popq %rbp retq nop
directory_file_name: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_7F8D2: mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_7F8E9 lea rax, aInvalidOrMissi+21h; "." mov [rbp+var_10], rax loc_7F8E9: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov edx, 201h call strnmov mov [rbp+var_18], rax mov rax, [rbp+var_18] movsx eax, byte ptr [rax-1] cmp eax, 2Fh ; '/' jz short loc_7F925 mov rax, [rbp+var_18] mov rcx, rax add rcx, 1 mov [rbp+var_18], rcx mov byte ptr [rax], 2Fh ; '/' mov rax, [rbp+var_18] mov byte ptr [rax], 0 loc_7F925: mov rax, [rbp+var_18] add rsp, 20h pop rbp retn
_BYTE * directory_file_name(long long a1, char *a2) { _BYTE *v2; // rax _BYTE *v4; // [rsp+8h] [rbp-18h] char *v5; // [rsp+10h] [rbp-10h] v5 = a2; if ( !*a2 ) v5 = "."; v4 = (_BYTE *)strnmov(a1, v5, 513LL); if ( *(v4 - 1) != 47 ) { v2 = v4++; *v2 = 47; *v4 = 0; } return v4; }
directory_file_name: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x0017f8d2 LAB_0017f8d2: MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x0017f8e9 LEA RAX,[0x1d1d10] MOV qword ptr [RBP + -0x10],RAX LAB_0017f8e9: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,0x201 CALL 0x001ca930 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x18] MOVSX EAX,byte ptr [RAX + -0x1] CMP EAX,0x2f JZ 0x0017f925 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x18],RCX MOV byte ptr [RAX],0x2f MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 LAB_0017f925: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x20 POP RBP RET
int1 * directory_file_name(int8 param_1,char *param_2) { int1 *puVar1; int1 *local_20; char *local_18; local_18 = param_2; if (*param_2 == '\0') { local_18 = "."; } puVar1 = (int1 *)strnmov(param_1,local_18,0x201); local_20 = puVar1; if (puVar1[-1] != '/') { local_20 = puVar1 + 1; *puVar1 = 0x2f; *local_20 = 0; } return local_20; }
13,482
mi_keylength_part
eloqsql/storage/myisam/mi_search.c
uint _mi_keylength_part(MI_KEYDEF *keyinfo, register uchar *key, HA_KEYSEG *end) { reg1 HA_KEYSEG *keyseg; uchar *start= key; for (keyseg=keyinfo->seg ; keyseg != end ; keyseg++) { if (keyseg->flag & HA_NULL_PART) if (!*key++) continue; if (keyseg->flag & (HA_SPACE_PACK | HA_BLOB_PART | HA_VAR_LENGTH_PART)) { uint length; get_key_length(length,key); key+=length; } else key+= keyseg->length; } return (uint) (key-start); }
O0
c
mi_keylength_part: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x8(%rbp), %rax movq 0x28(%rax), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax cmpq -0x18(%rbp), %rax je 0xc545a movq -0x20(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0xc53bd movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) cmpb $0x0, (%rax) jne 0xc53bb jmp 0xc5449 jmp 0xc53bd movq -0x20(%rbp), %rax movzwl 0x12(%rax), %eax andl $0x29, %eax cmpl $0x0, %eax je 0xc5431 movq -0x10(%rbp), %rax movzbl (%rax), %eax cmpl $0xff, %eax je 0xc53f2 movq -0x10(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x10(%rbp) movzbl (%rax), %eax movl %eax, -0x2c(%rbp) jmp 0xc541f movq -0x10(%rbp), %rax movzbl 0x2(%rax), %eax movzwl %ax, %eax movq -0x10(%rbp), %rcx movzbl 0x1(%rcx), %ecx movzwl %cx, %ecx shll $0x8, %ecx orl %ecx, %eax movzwl %ax, %eax movl %eax, -0x2c(%rbp) movq -0x10(%rbp), %rax addq $0x3, %rax movq %rax, -0x10(%rbp) movl -0x2c(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0xc5447 movq -0x20(%rbp), %rax movzwl 0x14(%rax), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0xc5449 movq -0x20(%rbp), %rax addq $0x20, %rax movq %rax, -0x20(%rbp) jmp 0xc5384 movq -0x10(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax popq %rbp retq nopw (%rax,%rax)
_mi_keylength_part: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_10] mov [rbp+var_28], rax mov rax, [rbp+var_8] mov rax, [rax+28h] mov [rbp+var_20], rax loc_C5384: mov rax, [rbp+var_20] cmp rax, [rbp+var_18] jz loc_C545A mov rax, [rbp+var_20] movzx eax, word ptr [rax+12h] and eax, 10h cmp eax, 0 jz short loc_C53BD mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx cmp byte ptr [rax], 0 jnz short loc_C53BB jmp loc_C5449 loc_C53BB: jmp short $+2 loc_C53BD: mov rax, [rbp+var_20] movzx eax, word ptr [rax+12h] and eax, 29h cmp eax, 0 jz short loc_C5431 mov rax, [rbp+var_10] movzx eax, byte ptr [rax] cmp eax, 0FFh jz short loc_C53F2 mov rax, [rbp+var_10] mov rcx, rax add rcx, 1 mov [rbp+var_10], rcx movzx eax, byte ptr [rax] mov [rbp+var_2C], eax jmp short loc_C541F loc_C53F2: mov rax, [rbp+var_10] movzx eax, byte ptr [rax+2] movzx eax, ax mov rcx, [rbp+var_10] movzx ecx, byte ptr [rcx+1] movzx ecx, cx shl ecx, 8 or eax, ecx movzx eax, ax mov [rbp+var_2C], eax mov rax, [rbp+var_10] add rax, 3 mov [rbp+var_10], rax loc_C541F: mov ecx, [rbp+var_2C] mov rax, [rbp+var_10] mov ecx, ecx add rax, rcx mov [rbp+var_10], rax jmp short loc_C5447 loc_C5431: mov rax, [rbp+var_20] movzx ecx, word ptr [rax+14h] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax loc_C5447: jmp short $+2 loc_C5449: mov rax, [rbp+var_20] add rax, 20h ; ' ' mov [rbp+var_20], rax jmp loc_C5384 loc_C545A: mov rax, [rbp+var_10] mov rcx, [rbp+var_28] sub rax, rcx pop rbp retn
unsigned __int8 * mi_keylength_part(long long a1, unsigned __int8 *a2, long long a3) { unsigned __int8 *v3; // rax unsigned __int8 *v4; // rax int v6; // [rsp+0h] [rbp-2Ch] long long i; // [rsp+Ch] [rbp-20h] unsigned __int8 *v8; // [rsp+1Ch] [rbp-10h] unsigned __int8 *v9; // [rsp+1Ch] [rbp-10h] v8 = a2; for ( i = *(_QWORD *)(a1 + 40); i != a3; i += 32LL ) { if ( (*(_WORD *)(i + 18) & 0x10) != 0 ) { v3 = v8++; if ( !*v3 ) continue; } if ( (*(_WORD *)(i + 18) & 0x29) != 0 ) { if ( *v8 == 255 ) { v6 = _byteswap_ushort(*(_WORD *)(v8 + 1)); v9 = v8 + 3; } else { v4 = v8; v9 = v8 + 1; v6 = *v4; } v8 = &v9[v6]; } else { v8 += *(unsigned __int16 *)(i + 20); } } return (unsigned __int8 *)(v8 - a2); }
_mi_keylength_part: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x20],RAX LAB_001c5384: MOV RAX,qword ptr [RBP + -0x20] CMP RAX,qword ptr [RBP + -0x18] JZ 0x001c545a MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x10 CMP EAX,0x0 JZ 0x001c53bd MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX CMP byte ptr [RAX],0x0 JNZ 0x001c53bb JMP 0x001c5449 LAB_001c53bb: JMP 0x001c53bd LAB_001c53bd: MOV RAX,qword ptr [RBP + -0x20] MOVZX EAX,word ptr [RAX + 0x12] AND EAX,0x29 CMP EAX,0x0 JZ 0x001c5431 MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX] CMP EAX,0xff JZ 0x001c53f2 MOV RAX,qword ptr [RBP + -0x10] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x10],RCX MOVZX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x2c],EAX JMP 0x001c541f LAB_001c53f2: MOV RAX,qword ptr [RBP + -0x10] MOVZX EAX,byte ptr [RAX + 0x2] MOVZX EAX,AX MOV RCX,qword ptr [RBP + -0x10] MOVZX ECX,byte ptr [RCX + 0x1] MOVZX ECX,CX SHL ECX,0x8 OR EAX,ECX MOVZX EAX,AX MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,0x3 MOV qword ptr [RBP + -0x10],RAX LAB_001c541f: MOV ECX,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x10] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x001c5447 LAB_001c5431: MOV RAX,qword ptr [RBP + -0x20] MOVZX ECX,word ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX LAB_001c5447: JMP 0x001c5449 LAB_001c5449: MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x20 MOV qword ptr [RBP + -0x20],RAX JMP 0x001c5384 LAB_001c545a: MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX POP RBP RET
long _mi_keylength_part(long param_1,byte *param_2,long param_3) { byte bVar1; byte *pbVar2; uint local_34; long local_28; byte *local_18; local_18 = param_2; for (local_28 = *(long *)(param_1 + 0x28); local_28 != param_3; local_28 = local_28 + 0x20) { if (((*(ushort *)(local_28 + 0x12) & 0x10) == 0) || (pbVar2 = local_18 + 1, bVar1 = *local_18, local_18 = pbVar2, bVar1 != 0)) { if ((*(ushort *)(local_28 + 0x12) & 0x29) == 0) { local_18 = local_18 + (int)(uint)*(ushort *)(local_28 + 0x14); } else { if (*local_18 == 0xff) { local_34 = (uint)CONCAT11(local_18[1],local_18[2]); local_18 = local_18 + 3; } else { local_34 = (uint)*local_18; local_18 = local_18 + 1; } local_18 = local_18 + local_34; } } } return (long)local_18 - (long)param_2; }
13,483
js_parse_expect_semi
bluesky950520[P]quickjs/quickjs.c
static int js_parse_expect_semi(JSParseState *s) { if (s->token.val != ';') { /* automatic insertion of ';' */ if (s->token.val == TOK_EOF || s->token.val == '}' || s->got_lf) { return 0; } return js_parse_error(s, "expecting '%c'", ';'); } return next_token(s); }
O1
c
js_parse_expect_semi: movl 0x20(%rdi), %ecx xorl %eax, %eax cmpl $-0x56, %ecx je 0x6e7c3 cmpl $0x3b, %ecx je 0x6122b cmpl $0x7d, %ecx je 0x6e7c3 cmpl $0x0, 0x58(%rdi) je 0x6e7c4 retq pushq %rax leaq 0x369f9(%rip), %rsi # 0xa51c5 movl $0x3b, %edx xorl %eax, %eax callq 0x33d45 movl $0xffffffff, %eax # imm = 0xFFFFFFFF addq $0x8, %rsp retq
js_parse_expect_semi: mov ecx, [rdi+20h] xor eax, eax cmp ecx, 0FFFFFFAAh jz short locret_6E7C3 cmp ecx, 3Bh ; ';' jz next_token cmp ecx, 7Dh ; '}' jz short locret_6E7C3 cmp dword ptr [rdi+58h], 0 jz short loc_6E7C4 locret_6E7C3: retn loc_6E7C4: push rax lea rsi, aExpectingC; "expecting '%c'" mov edx, 3Bh ; ';' xor eax, eax call js_parse_error mov eax, 0FFFFFFFFh add rsp, 8 retn
long long js_parse_expect_semi( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14) { long long v14; // rcx long long result; // rax v14 = *(unsigned int *)(a1 + 32); result = 0LL; if ( (_DWORD)v14 != -86 ) { if ( (_DWORD)v14 == 59 ) { return next_token(a1, a4, a5, a6, a7, a8, a9, a10, a11, a2, a3, v14, a13, a14); } else if ( (_DWORD)v14 != 125 && !*(_DWORD *)(a1 + 88) ) { js_parse_error((long long *)a1, (long long)"expecting '%c'", 59LL, v14, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, 0); return 0xFFFFFFFFLL; } } return result; }
js_parse_expect_semi: MOV ECX,dword ptr [RDI + 0x20] XOR EAX,EAX CMP ECX,-0x56 JZ 0x0016e7c3 CMP ECX,0x3b JZ 0x0016122b CMP ECX,0x7d JZ 0x0016e7c3 CMP dword ptr [RDI + 0x58],0x0 JZ 0x0016e7c4 LAB_0016e7c3: RET LAB_0016e7c4: PUSH RAX LEA RSI,[0x1a51c5] MOV EDX,0x3b XOR EAX,EAX CALL 0x00133d45 MOV EAX,0xffffffff ADD RSP,0x8 RET
byte * js_parse_expect_semi(long *param_1) { uint *puVar1; byte bVar2; uint uVar3; int iVar4; int4 uVar5; uint uVar6; int iVar7; byte *pbVar8; char *pcVar9; int8 uVar10; int8 uVar11; ulong uVar12; ulong uVar13; int1 auVar14 [16]; int1 auStack_3f0 [912]; int8 uStack_60; byte *pbStack_58; byte *pbStack_50; byte *pbStack_48; int4 uStack_3c; byte *pbStack_38; iVar4 = (int)param_1[4]; if (iVar4 != -0x56) { if (iVar4 == 0x3b) { if (auStack_3f0 < *(int1 **)(*(long *)(*param_1 + 0x18) + 0xe8)) { uStack_60 = 0x161266; JS_ThrowRangeError(*param_1,"Maximum call stack size exceeded"); return (byte *)0xffffffff; } puVar1 = (uint *)(param_1 + 4); uStack_60 = 0x16127a; free_token(param_1,puVar1); pbStack_38 = (byte *)param_1[0xe]; param_1[0xc] = (long)pbStack_38; *(int4 *)(param_1 + 0xb) = 0; param_1[1] = *(long *)((long)param_1 + 0x24); LAB_001612a0: *(long *)((long)param_1 + 0x24) = param_1[2]; param_1[6] = (long)pbStack_38; bVar2 = *pbStack_38; uVar12 = (ulong)bVar2; uVar3 = (uint)bVar2; switch(uVar12) { case 0: uVar3 = 0; if (pbStack_38 < (byte *)param_1[0xf]) { LAB_00161cde: *puVar1 = uVar3; pbStack_38 = pbStack_38 + 1; } else { *puVar1 = 0xffffffaa; } LAB_00161ce5: iVar7 = (int)param_1[0x11] - (int)param_1[0x10]; iVar4 = 1; if (1 < iVar7) { iVar4 = iVar7; } *(int *)(param_1 + 5) = iVar4; param_1[0xe] = (long)pbStack_38; return (byte *)0x0; default: if (-1 < (char)bVar2) goto LAB_00161cde; uStack_60 = 0x161400; uVar3 = utf8_decode(pbStack_38,&pbStack_48); uVar12 = (ulong)uVar3; if (pbStack_48 == pbStack_38 + 1) { LAB_00161a0c: pcVar9 = "invalid UTF-8 sequence"; } else { pbStack_38 = pbStack_48; if ((uVar3 & 0xfffffffe) == 0x2028) goto LAB_0016130c; uStack_60 = 0x161434; iVar4 = lre_is_space(uVar3); if (iVar4 != 0) goto LAB_0016143c; if (uVar3 < 0x80) { uVar3 = (uint)((*(uint *)(lre_id_start_table_ascii + (ulong)(uVar3 >> 5) * 4) >> (uVar3 & 0x1f) & 1) != 0); } else { uStack_60 = 0x161c31; uVar3 = lre_is_id_start(uVar3); } if (uVar3 != 0) goto LAB_00161504; pcVar9 = "unexpected character"; } goto LAB_001615eb; case 9: case 0xb: case 0xc: case 0x20: pbStack_38 = pbStack_38 + 1; param_1[0x11] = (long)pbStack_38; goto LAB_001612a0; case 10: goto switchD_001612c6_caseD_a; case 0xd: if (pbStack_38[1] == 10) { pbStack_38 = pbStack_38 + 1; } switchD_001612c6_caseD_a: pbStack_38 = pbStack_38 + 1; LAB_0016130c: param_1[0x10] = (long)(pbStack_38 + -1); param_1[0x11] = (long)pbStack_38; *(int4 *)(param_1 + 0xb) = 1; *(int *)(param_1 + 2) = (int)param_1[2] + 1; goto LAB_001612a0; case 0x21: uVar3 = 0x21; if (pbStack_38[1] != 0x3d) goto LAB_00161cde; if (pbStack_38[2] == 0x3d) { pbStack_38 = pbStack_38 + 3; *puVar1 = 0xffffffa0; } else { pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff9f; } goto LAB_00161ce5; case 0x22: case 0x27: uStack_60 = 0x161634; iVar4 = js_parse_string(param_1,uVar12,1,pbStack_38 + 1,puVar1,&pbStack_38); if (iVar4 != 0) goto LAB_001615f5; goto LAB_00161ce5; case 0x23: pbVar8 = pbStack_38 + 1; bVar2 = pbStack_38[1]; uVar3 = (uint)bVar2; pbStack_48 = pbStack_38 + 2; pbStack_38 = pbVar8; if ((bVar2 == 0x5c) && (*pbStack_48 == 0x75)) { uStack_60 = 0x161776; uVar3 = lre_parse_escape(&pbStack_48,1); } else if ((char)bVar2 < '\0') { uStack_60 = 0x1619d4; uVar3 = utf8_decode(pbVar8,&pbStack_48); if (pbStack_48 == pbStack_38 + 1) goto LAB_00161a0c; } if (uVar3 < 0x80) { uVar6 = (uint)((*(uint *)(lre_id_start_table_ascii + (ulong)(uVar3 >> 5) * 4) >> (uVar3 & 0x1f) & 1) != 0); } else { uStack_60 = 0x161ae6; uVar6 = lre_is_id_start(uVar3); } if (uVar6 == 0) { pcVar9 = "invalid first character of private name"; goto LAB_001615eb; } pbStack_38 = pbStack_48; uStack_3c = 0; uStack_60 = 0x161b10; iVar4 = parse_ident(param_1,&pbStack_38,&uStack_3c,uVar3,1); if (iVar4 == 0) goto LAB_001615f5; *(int *)(param_1 + 7) = iVar4; *(int4 *)(param_1 + 4) = 0xffffffa9; goto LAB_00161ce5; case 0x24: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: case 0x58: case 0x59: case 0x5a: case 0x5f: case 0x61: case 0x62: case 99: case 100: case 0x65: case 0x66: case 0x67: case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: case 0x78: case 0x79: case 0x7a: param_1[0x11] = (long)pbStack_38; pbStack_38 = pbStack_38 + 1; LAB_00161504: uStack_3c = 0; goto LAB_0016150b; case 0x25: uVar3 = 0x25; if (pbStack_38[1] != 0x3d) goto LAB_00161cde; pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff87; goto LAB_00161ce5; case 0x26: if (pbStack_38[1] == 0x26) { if (pbStack_38[2] == 0x3d) { pbStack_38 = pbStack_38 + 3; *puVar1 = 0xffffff91; } else { pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffffa1; } } else { uVar3 = 0x26; if (pbStack_38[1] != 0x3d) goto LAB_00161cde; pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff8d; } goto LAB_00161ce5; case 0x2a: if (pbStack_38[1] == 0x2a) { if (pbStack_38[2] == 0x3d) { pbStack_38 = pbStack_38 + 3; *puVar1 = 0xffffff90; } else { pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffffa3; } } else { uVar3 = 0x2a; if (pbStack_38[1] != 0x3d) goto LAB_00161cde; pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff85; } goto LAB_00161ce5; case 0x2b: if (pbStack_38[1] == 0x2b) { pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff95; } else { uVar3 = 0x2b; if (pbStack_38[1] != 0x3d) goto LAB_00161cde; pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff88; } goto LAB_00161ce5; case 0x2d: if (pbStack_38[1] == 0x2d) { if (((*(int *)((long)param_1 + 0x9c) != 0) && (pbStack_38[2] == 0x3e)) && (((int)param_1[0xb] != 0 || (param_1[0xc] == param_1[0xd])))) goto LAB_001613af; pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff94; goto LAB_00161ce5; } uVar3 = 0x2d; if (pbStack_38[1] != 0x3d) goto LAB_00161cde; pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff89; goto LAB_00161ce5; case 0x2e: if ((pbStack_38[1] == 0x2e) && (pbStack_38[2] == 0x2e)) { pbStack_38 = pbStack_38 + 3; *puVar1 = 0xffffffa5; goto LAB_00161ce5; } uVar3 = 0x2e; if (9 < (byte)(pbStack_38[1] - 0x30)) goto LAB_00161cde; uVar11 = 0x44; break; case 0x2f: bVar2 = pbStack_38[1]; if (bVar2 == 0x2a) goto LAB_0016144c; if (bVar2 == 0x2f) { pbStack_38 = pbStack_38 + 2; goto LAB_001613af; } if (bVar2 == 0x3d) { pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff86; } else { pbStack_38 = pbStack_38 + 1; *puVar1 = 0x2f; } goto LAB_00161ce5; case 0x30: if (0xfffffff5 < pbStack_38[1] - 0x3a) { if (*(short *)(param_1[0x12] + 0x84) < 0) { pcVar9 = "Octal literals are not allowed in strict mode"; goto LAB_001615eb; } uVar10 = 8; bVar2 = *pbStack_38; pbVar8 = pbStack_38; while (0xfffffff5 < bVar2 - 0x3a) { pbVar8 = pbVar8 + 1; if ((bVar2 & 0xfe) == 0x38) { uVar10 = 10; } bVar2 = *pbVar8; } uVar11 = 0; LAB_00161559: pbStack_58 = pbStack_38; uStack_60 = 0x161577; auVar14 = js_atof(*param_1,pbStack_38,param_1[0xf] - (long)pbStack_38,&pbStack_58,uVar10, uVar11); pbStack_38 = pbStack_58; if (auVar14._8_4_ != 6) { if ((auVar14._0_8_ & 0x7fffffffffffffff) < 0x7ff0000000000001 || auVar14._8_8_ != 7) { uStack_60 = 0x1615ba; uVar5 = utf8_decode(pbStack_58,&pbStack_48); uStack_60 = 0x1615c1; iVar4 = lre_js_is_ident_next(uVar5); if (iVar4 == 0) { *(int4 *)(param_1 + 4) = 0xffffff80; *(int1 (*) [16])(param_1 + 7) = auVar14; goto LAB_00161ce5; } } uStack_60 = 0x1615db; JS_FreeValueRT(*(int8 *)(*param_1 + 0x18),auVar14._0_8_,auVar14._8_8_); pcVar9 = "invalid number literal"; LAB_001615eb: uStack_60 = 0x1615f5; js_parse_error(param_1,pcVar9); } LAB_001615f5: *puVar1 = 0xffffffa8; return (byte *)0xffffffff; } if (pbStack_38[1] == 0x5f) { pcVar9 = "Numeric separator can not be used after leading 0"; goto LAB_001615eb; } uVar11 = 0xf4; break; case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: uVar11 = 0xc4; break; case 0x3c: bVar2 = pbStack_38[1]; if (bVar2 == 0x3c) { if (pbStack_38[2] == 0x3d) { pbStack_38 = pbStack_38 + 3; *puVar1 = 0xffffff8a; } else { pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff96; } goto LAB_00161ce5; } if (bVar2 == 0x3d) { pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff9a; goto LAB_00161ce5; } uVar3 = 0x3c; if ((((bVar2 != 0x21) || (*(int *)((long)param_1 + 0x9c) == 0)) || (pbStack_38[2] != 0x2d)) || (pbStack_38[3] != 0x2d)) goto LAB_00161cde; LAB_001613af: do { while( true ) { bVar2 = *pbStack_38; if ((((bVar2 == 0) && ((byte *)param_1[0xf] <= pbStack_38)) || (bVar2 == 10)) || (bVar2 == 0xd)) goto LAB_0016143c; if ((char)bVar2 < '\0') break; pbStack_38 = pbStack_38 + 1; } uStack_60 = 0x1613e0; uVar3 = utf8_decode(pbStack_38,&pbStack_38); } while ((uVar3 & 0xfffffffe) != 0x2028); LAB_0016143c: param_1[0x11] = (long)pbStack_38; goto LAB_001612a0; case 0x3d: if (pbStack_38[1] == 0x3e) { pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffffa4; } else { uVar3 = 0x3d; if (pbStack_38[1] != 0x3d) goto LAB_00161cde; if (pbStack_38[2] == 0x3d) { pbStack_38 = pbStack_38 + 3; *puVar1 = 0xffffff9e; } else { pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff9d; } } goto LAB_00161ce5; case 0x3e: if (pbStack_38[1] == 0x3e) { if (pbStack_38[2] == 0x3d) { pbStack_38 = pbStack_38 + 3; *puVar1 = 0xffffff8b; } else if (pbStack_38[2] == 0x3e) { if (pbStack_38[3] == 0x3d) { pbStack_38 = pbStack_38 + 4; *puVar1 = 0xffffff8c; } else { pbStack_38 = pbStack_38 + 3; *puVar1 = 0xffffff98; } } else { pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff97; } } else { uVar3 = 0x3e; if (pbStack_38[1] != 0x3d) goto LAB_00161cde; pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff9c; } goto LAB_00161ce5; case 0x3f: uVar3 = 0x3f; if (pbStack_38[1] == 0x2e) { if ((byte)(pbStack_38[2] - 0x30) < 10) goto LAB_00161cde; pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffffa7; } else { if (pbStack_38[1] != 0x3f) goto LAB_00161cde; if (pbStack_38[2] == 0x3d) { pbStack_38 = pbStack_38 + 3; *puVar1 = 0xffffff93; } else { pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffffa6; } } goto LAB_00161ce5; case 0x5c: uVar3 = 0x5c; if (pbStack_38[1] != 0x75) goto LAB_00161cde; pbStack_50 = pbStack_38 + 1; uStack_60 = 0x161684; pbVar8 = (byte *)lre_parse_escape(&pbStack_50,1); iVar4 = 0; uVar3 = (uint)pbVar8; uVar12 = 0x5c; if (-1 < (int)uVar3) { uVar13 = (ulong)pbVar8 & 0xffffffff; if (uVar3 < 0x80) { pbVar8 = (byte *)(ulong)((*(uint *)(lre_id_start_table_ascii + (uVar13 >> 5) * 4) >> (uVar3 & 0x1f) & 1) != 0); } else { uStack_60 = 0x161cb1; pbVar8 = (byte *)lre_is_id_start(uVar13); } if ((int)pbVar8 != 0) { pbStack_38 = pbStack_50; uStack_3c = 1; iVar4 = 0xc; pbVar8 = pbStack_50; uVar12 = uVar13; } } uVar3 = (uint)uVar12; if (iVar4 == 0) goto LAB_00161cde; if (iVar4 != 0xc) { return pbVar8; } LAB_0016150b: uStack_60 = 0x161521; iVar4 = parse_ident(param_1,&pbStack_38,&uStack_3c,uVar12,0); if (iVar4 == 0) goto LAB_001615f5; *(int *)(param_1 + 7) = iVar4; *(int4 *)((long)param_1 + 0x3c) = uStack_3c; *(int4 *)(param_1 + 8) = 0; *(int4 *)(param_1 + 4) = 0xffffff83; uStack_60 = 0x161548; update_token_ident(param_1); goto LAB_00161ce5; case 0x5e: uVar3 = 0x5e; if (pbStack_38[1] != 0x3d) goto LAB_00161cde; pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff8e; goto LAB_00161ce5; case 0x60: uStack_60 = 0x16172b; iVar4 = js_parse_template_part(param_1,pbStack_38 + 1); if (iVar4 != 0) goto LAB_001615f5; pbStack_38 = (byte *)param_1[0xe]; goto LAB_00161ce5; case 0x7c: if (pbStack_38[1] == 0x7c) { if (pbStack_38[2] == 0x3d) { pbStack_38 = pbStack_38 + 3; *puVar1 = 0xffffff92; } else { pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffffa2; } } else { uVar3 = 0x7c; if (pbStack_38[1] != 0x3d) goto LAB_00161cde; pbStack_38 = pbStack_38 + 2; *puVar1 = 0xffffff8f; } goto LAB_00161ce5; } uVar10 = 10; goto LAB_00161559; } if ((iVar4 != 0x7d) && ((int)param_1[0xb] == 0)) { js_parse_error(param_1,"expecting \'%c\'",0x3b); return (byte *)0xffffffff; } } return (byte *)0x0; LAB_0016144c: pbStack_38 = pbStack_38 + 2; LAB_00161454: while (bVar2 = *pbStack_38, bVar2 < 0xd) { if (bVar2 == 0) { if (pbStack_38 < (byte *)param_1[0xf]) break; pcVar9 = "unexpected end of comment"; goto LAB_001615eb; } LAB_00161488: if (bVar2 == 10) { *(int *)(param_1 + 2) = (int)param_1[2] + 1; *(int4 *)(param_1 + 0xb) = 1; param_1[0x10] = (long)pbStack_38; param_1[0x11] = (long)(pbStack_38 + 1); pbStack_38 = pbStack_38 + 1; } else { LAB_001614af: if (-1 < (char)bVar2) goto LAB_001614d6; uStack_60 = 0x1614bc; uVar3 = utf8_decode(pbStack_38,&pbStack_38); if ((uVar3 & 0xfffffffe) == 0x2028) { *(int4 *)(param_1 + 0xb) = 1; } } } if (bVar2 == 0xd) { *(int4 *)(param_1 + 0xb) = 1; LAB_001614d6: pbStack_38 = pbStack_38 + 1; goto LAB_00161454; } if (bVar2 != 0x2a) goto LAB_001614af; if (pbStack_38[1] != 0x2f) goto LAB_00161488; pbStack_38 = pbStack_38 + 2; param_1[0x11] = (long)pbStack_38; goto LAB_001612a0; }
13,484
js_parse_expect_semi
bluesky950520[P]quickjs/quickjs.c
static int js_parse_expect_semi(JSParseState *s) { if (s->token.val != ';') { /* automatic insertion of ';' */ if (s->token.val == TOK_EOF || s->token.val == '}' || s->got_lf) { return 0; } return js_parse_error(s, "expecting '%c'", ';'); } return next_token(s); }
O2
c
js_parse_expect_semi: movl 0x20(%rdi), %ecx xorl %eax, %eax cmpl $-0x56, %ecx je 0x5de1e cmpl $0x3b, %ecx je 0x535fe cmpl $0x7d, %ecx je 0x5de1e cmpl $0x0, 0x58(%rdi) je 0x5de1f retq pushq %rax leaq 0x2d2d8(%rip), %rsi # 0x8b0ff pushq $0x3b popq %rdx xorl %eax, %eax callq 0x2c007 pushq $-0x1 popq %rax addq $0x8, %rsp retq
js_parse_expect_semi: mov ecx, [rdi+20h] xor eax, eax cmp ecx, 0FFFFFFAAh jz short locret_5DE1E cmp ecx, 3Bh ; ';' jz next_token cmp ecx, 7Dh ; '}' jz short locret_5DE1E cmp dword ptr [rdi+58h], 0 jz short loc_5DE1F locret_5DE1E: retn loc_5DE1F: push rax lea rsi, aExpectingC; "expecting '%c'" push 3Bh ; ';' pop rdx xor eax, eax call js_parse_error push 0FFFFFFFFFFFFFFFFh pop rax add rsp, 8 retn
long long js_parse_expect_semi( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14) { long long v14; // rcx long long result; // rax v14 = *(unsigned int *)(a1 + 32); result = 0LL; if ( (_DWORD)v14 != -86 ) { if ( (_DWORD)v14 == 59 ) { return next_token(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, v14, a13, a14); } else if ( (_DWORD)v14 != 125 && !*(_DWORD *)(a1 + 88) ) { js_parse_error((long long *)a1, (long long)"expecting '%c'", 59LL, v14, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, 0); return -1LL; } } return result; }
js_parse_expect_semi: MOV ECX,dword ptr [RDI + 0x20] XOR EAX,EAX CMP ECX,-0x56 JZ 0x0015de1e CMP ECX,0x3b JZ 0x001535fe CMP ECX,0x7d JZ 0x0015de1e CMP dword ptr [RDI + 0x58],0x0 JZ 0x0015de1f LAB_0015de1e: RET LAB_0015de1f: PUSH RAX LEA RSI,[0x18b0ff] PUSH 0x3b POP RDX XOR EAX,EAX CALL 0x0012c007 PUSH -0x1 POP RAX ADD RSP,0x8 RET
int8 js_parse_expect_semi(long *param_1) { uint *puVar1; byte bVar2; uint uVar3; int iVar4; int4 uVar5; byte *pbVar6; byte *pbVar7; byte bVar8; int8 uVar9; int8 uVar10; uint uVar11; char *pcVar12; int1 auVar13 [16]; int1 auStack_3f0 [912]; int8 uStack_60; byte *pbStack_58; byte *pbStack_50; byte *pbStack_48; int4 uStack_3c; byte *pbStack_38; iVar4 = (int)param_1[4]; if (iVar4 != -0x56) { if (iVar4 == 0x3b) { if (auStack_3f0 < *(int1 **)(*(long *)(*param_1 + 0x18) + 0xe8)) { uStack_60 = 0x153630; JS_ThrowStackOverflow(); return 0xffffffffffffffff; } puVar1 = (uint *)(param_1 + 4); uStack_60 = 0x153644; free_token(param_1,puVar1); pbVar7 = (byte *)param_1[0xe]; param_1[0xc] = (long)pbVar7; *(int4 *)(param_1 + 0xb) = 0; param_1[1] = *(long *)((long)param_1 + 0x24); pcVar12 = "invalid UTF-8 sequence"; pbStack_38 = pbVar7; LAB_0015366a: *(long *)((long)param_1 + 0x24) = param_1[2]; param_1[6] = (long)pbVar7; bVar8 = *pbVar7; uVar3 = (uint)bVar8; switch(uVar3) { case 0: goto switchD_0015368b_caseD_0; default: if ((char)bVar8 < '\0') { uStack_60 = 0x153795; uVar3 = utf8_decode(pbVar7,&pbStack_48); if (pbStack_48 != pbStack_38 + 1) { pbStack_38 = pbStack_48; if ((uVar3 & 0xfffffffe) == 0x2028) { iVar4 = (int)param_1[2]; pbVar7 = pbStack_48; goto LAB_001536d8; } uStack_60 = 0x15385d; iVar4 = lre_is_space(uVar3); pbVar7 = pbStack_38; if (iVar4 != 0) goto LAB_00153694; uStack_60 = 0x153e0a; iVar4 = lre_js_is_ident_first(uVar3); if (iVar4 != 0) goto LAB_001538d7; pcVar12 = "unexpected character"; } goto LAB_001539b1; } LAB_00153a1b: uVar11 = (uint)bVar8; goto LAB_00153ee6; case 9: case 0xb: case 0xc: case 0x20: pbStack_38 = pbVar7 + 1; pbVar7 = pbStack_38; goto LAB_00153694; case 10: goto switchD_0015368b_caseD_a; case 0xd: if (pbVar7[1] == 10) { pbVar7 = pbVar7 + 1; } switchD_0015368b_caseD_a: pbVar7 = pbVar7 + 1; iVar4 = (int)param_1[2]; LAB_001536d8: param_1[0x10] = (long)(pbVar7 + -1); param_1[0x11] = (long)pbVar7; *(int4 *)(param_1 + 0xb) = 1; *(int *)(param_1 + 2) = iVar4 + 1; pbStack_38 = pbVar7; goto LAB_0015366a; case 0x21: if (pbVar7[1] != 0x3d) { uVar11 = 0x21; goto LAB_00153ee6; } if (pbVar7[2] == 0x3d) { pbStack_38 = pbVar7 + 3; *puVar1 = 0xffffffa0; } else { pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff9f; } goto LAB_00153ef0; case 0x22: case 0x27: uStack_60 = 0x1539f9; iVar4 = js_parse_string(param_1,uVar3,1,pbVar7 + 1,puVar1,&pbStack_38); if (iVar4 != 0) goto LAB_001539be; goto LAB_00153ef0; case 0x23: pbStack_38 = pbVar7 + 1; bVar8 = pbVar7[1]; uVar3 = (uint)bVar8; pbStack_48 = pbVar7 + 2; if (bVar8 == 0x5c) { if (*pbStack_48 == 0x75) { uStack_60 = 0x153ac8; uVar3 = lre_parse_escape(&pbStack_48,1); } else { uVar3 = 0x5c; } } else if ((char)bVar8 < '\0') { uStack_60 = 0x153d53; uVar3 = utf8_decode(pbStack_38,&pbStack_48); if (pbStack_48 == pbStack_38 + 1) goto LAB_001539b1; } uStack_60 = 0x153f59; iVar4 = lre_js_is_ident_first(uVar3); if (iVar4 == 0) { pcVar12 = "invalid first character of private name"; goto LAB_001539b1; } pbStack_38 = pbStack_48; uStack_60 = 0x153f7b; iVar4 = parse_ident(param_1,&pbStack_38,&uStack_3c,uVar3,1); if (iVar4 == 0) goto LAB_001539be; *(int *)(param_1 + 7) = iVar4; *(int4 *)(param_1 + 4) = 0xffffffa9; goto LAB_00153ef0; case 0x24: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: case 0x48: case 0x49: case 0x4a: case 0x4b: case 0x4c: case 0x4d: case 0x4e: case 0x4f: case 0x50: case 0x51: case 0x52: case 0x53: case 0x54: case 0x55: case 0x56: case 0x57: case 0x58: case 0x59: case 0x5a: case 0x5f: case 0x61: case 0x62: case 99: case 100: case 0x65: case 0x66: case 0x67: case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: case 0x70: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: case 0x76: case 0x77: case 0x78: case 0x79: case 0x7a: param_1[0x11] = (long)pbVar7; pbStack_38 = pbVar7 + 1; LAB_001538d7: uStack_3c = 0; goto LAB_001538db; case 0x25: if (pbVar7[1] != 0x3d) { uVar11 = 0x25; goto LAB_00153ee6; } pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff87; goto LAB_00153ef0; case 0x26: if (pbVar7[1] == 0x26) { if (pbVar7[2] == 0x3d) { pbStack_38 = pbVar7 + 3; *puVar1 = 0xffffff91; } else { pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffffa1; } goto LAB_00153ef0; } if (pbVar7[1] != 0x3d) { uVar11 = 0x26; goto LAB_00153ee6; } pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff8d; goto LAB_00153ef0; case 0x2a: if (pbVar7[1] == 0x2a) { if (pbVar7[2] == 0x3d) { pbStack_38 = pbVar7 + 3; *puVar1 = 0xffffff90; } else { pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffffa3; } goto LAB_00153ef0; } if (pbVar7[1] != 0x3d) { uVar11 = 0x2a; goto LAB_00153ee6; } pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff85; goto LAB_00153ef0; case 0x2b: if (pbVar7[1] == 0x2b) { pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff95; goto LAB_00153ef0; } if (pbVar7[1] != 0x3d) { uVar11 = 0x2b; goto LAB_00153ee6; } pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff88; goto LAB_00153ef0; case 0x2d: if (pbVar7[1] != 0x2d) { if (pbVar7[1] != 0x3d) goto LAB_00153a1b; pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff89; goto LAB_00153ef0; } if (((*(int *)((long)param_1 + 0x9c) == 0) || (pbVar7[2] != 0x3e)) || (((int)param_1[0xb] == 0 && (param_1[0xc] != param_1[0xd])))) { pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff94; goto LAB_00153ef0; } break; case 0x2e: if (pbVar7[1] == 0x2e) { if (pbVar7[2] == 0x2e) { pbStack_38 = pbVar7 + 3; *puVar1 = 0xffffffa5; goto LAB_00153ef0; } } else if ((byte)(pbVar7[1] - 0x30) < 10) { uStack_60 = 0x44; uVar10 = uStack_60; goto LAB_00153920; } uVar11 = 0x2e; goto LAB_00153ee6; case 0x2f: bVar8 = pbVar7[1]; if (bVar8 == 0x2a) { pbStack_38 = pbVar7 + 2; LAB_001537d1: bVar8 = *pbStack_38; if (bVar8 == 0x2a) { if (pbStack_38[1] == 0x2f) goto LAB_0015386e; } else { if (bVar8 == 10) { *(int *)(param_1 + 2) = (int)param_1[2] + 1; *(int4 *)(param_1 + 0xb) = 1; param_1[0x10] = (long)pbStack_38; param_1[0x11] = (long)(pbStack_38 + 1); pbStack_38 = pbStack_38 + 1; goto LAB_001537d1; } if (bVar8 == 0xd) { *(int4 *)(param_1 + 0xb) = 1; } else { if (bVar8 == 0) { if (pbStack_38 < (byte *)param_1[0xf]) goto LAB_00153829; pcVar12 = "unexpected end of comment"; goto LAB_001539b1; } if ((char)bVar8 < '\0') { uStack_60 = 0x153842; uVar3 = utf8_decode(pbStack_38,&pbStack_38); if ((uVar3 & 0xfffffffe) == 0x2028) { *(int4 *)(param_1 + 0xb) = 1; } goto LAB_001537d1; } } } LAB_00153829: pbStack_38 = pbStack_38 + 1; goto LAB_001537d1; } if (bVar8 != 0x2f) { if (bVar8 == 0x3d) { pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff86; } else { pbStack_38 = pbVar7 + 1; *puVar1 = 0x2f; } goto LAB_00153ef0; } pbVar7 = pbVar7 + 2; pbStack_38 = pbVar7; break; case 0x30: if (pbVar7[1] - 0x3a < 0xfffffff6) { if (pbVar7[1] != 0x5f) { uVar10 = 0xf4; goto LAB_00153920; } pcVar12 = "Numeric separator can not be used after leading 0"; goto LAB_001539b1; } if (*(short *)(param_1[0x12] + 0x84) < 0) { pcVar12 = "Octal literals are not allowed in strict mode"; goto LAB_001539b1; } uVar9 = 8; bVar8 = 0x30; pbVar6 = pbVar7; while (pbVar6 = pbVar6 + 1, 0xfffffff5 < bVar8 - 0x3a) { if ((bVar8 & 0xfe) == 0x38) { uVar9 = 10; } bVar8 = *pbVar6; } uVar10 = 0; pbStack_38 = pbVar7; LAB_00153924: uStack_60 = 0x153941; pbStack_58 = pbVar7; auVar13 = js_atof(*param_1,pbVar7,param_1[0xf] - (long)pbVar7,&pbStack_58,uVar9,uVar10); pbStack_38 = pbStack_58; if (auVar13._8_4_ != 6) { if ((auVar13._0_8_ & 0x7fffffffffffffff) < 0x7ff0000000000001 || auVar13._8_8_ != 7) { uStack_60 = 0x153984; uVar5 = utf8_decode(pbStack_58,&pbStack_48); uStack_60 = 0x15398b; iVar4 = lre_js_is_ident_next(uVar5); if (iVar4 == 0) { *(int4 *)(param_1 + 4) = 0xffffff80; *(int1 (*) [16])(param_1 + 7) = auVar13; goto LAB_00153ef0; } } uStack_60 = 0x1539a1; JS_FreeValue(*param_1,auVar13._0_8_,auVar13._8_8_); pcVar12 = "invalid number literal"; LAB_001539b1: uStack_60 = 0x1539be; js_parse_error(param_1,pcVar12); } LAB_001539be: *puVar1 = 0xffffffa8; return 0xffffffffffffffff; case 0x31: case 0x32: case 0x33: case 0x34: case 0x35: case 0x36: case 0x37: case 0x38: case 0x39: uVar10 = 0xc4; LAB_00153920: uVar9 = 10; goto LAB_00153924; case 0x3c: bVar2 = pbVar7[1]; if (bVar2 == 0x3c) { if (pbVar7[2] == 0x3d) { pbStack_38 = pbVar7 + 3; *puVar1 = 0xffffff8a; } else { pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff96; } goto LAB_00153ef0; } if (bVar2 == 0x3d) { pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff9a; goto LAB_00153ef0; } if ((((bVar2 != 0x21) || (*(int *)((long)param_1 + 0x9c) == 0)) || (pbVar7[2] != 0x2d)) || (pbVar7[3] != 0x2d)) goto LAB_00153a1b; break; case 0x3d: if (pbVar7[1] == 0x3e) { pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffffa4; goto LAB_00153ef0; } if (pbVar7[1] != 0x3d) { uVar11 = 0x3d; goto LAB_00153ee6; } if (pbVar7[2] == 0x3d) { pbStack_38 = pbVar7 + 3; *puVar1 = 0xffffff9e; } else { pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff9d; } goto LAB_00153ef0; case 0x3e: if (pbVar7[1] == 0x3e) { if (pbVar7[2] == 0x3d) { pbStack_38 = pbVar7 + 3; *puVar1 = 0xffffff8b; } else if (pbVar7[2] == 0x3e) { if (pbVar7[3] == 0x3d) { pbStack_38 = pbVar7 + 4; *puVar1 = 0xffffff8c; } else { pbStack_38 = pbVar7 + 3; *puVar1 = 0xffffff98; } } else { pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff97; } goto LAB_00153ef0; } if (pbVar7[1] != 0x3d) { uVar11 = 0x3e; goto LAB_00153ee6; } pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff9c; goto LAB_00153ef0; case 0x3f: uVar11 = 0x3f; if (pbVar7[1] == 0x2e) { if ((byte)(pbVar7[2] - 0x30) < 10) goto LAB_00153ee6; pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffffa7; } else { if (pbVar7[1] != 0x3f) goto LAB_00153ee6; if (pbVar7[2] == 0x3d) { pbStack_38 = pbVar7 + 3; *puVar1 = 0xffffff93; } else { pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffffa6; } } goto LAB_00153ef0; case 0x5c: uVar11 = 0x5c; if (pbVar7[1] != 0x75) goto LAB_00153ee6; pbStack_50 = pbVar7 + 1; uStack_60 = 0x153ba3; uVar3 = lre_parse_escape(&pbStack_50,1); pbVar7 = pbStack_38; if ((int)uVar3 < 0) goto LAB_00153ee6; uStack_60 = 0x153bb5; iVar4 = lre_js_is_ident_first(uVar3); pbVar7 = pbStack_38; if (iVar4 == 0) goto LAB_00153ee6; pbStack_38 = pbStack_50; uStack_3c = 1; LAB_001538db: uStack_60 = 0x1538f1; iVar4 = parse_ident(param_1,&pbStack_38,&uStack_3c,uVar3,0); if (iVar4 == 0) goto LAB_001539be; *(int *)(param_1 + 7) = iVar4; *(int4 *)((long)param_1 + 0x3c) = uStack_3c; *(int4 *)(param_1 + 8) = 0; *(int4 *)(param_1 + 4) = 0xffffff83; uStack_60 = 0x153915; update_token_ident(param_1); goto LAB_00153ef0; case 0x5e: if (pbVar7[1] != 0x3d) { uVar11 = 0x5e; goto LAB_00153ee6; } pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff8e; goto LAB_00153ef0; case 0x60: uStack_60 = 0x153a31; iVar4 = js_parse_template_part(param_1,pbVar7 + 1); if (iVar4 != 0) goto LAB_001539be; pbStack_38 = (byte *)param_1[0xe]; goto LAB_00153ef0; case 0x7c: if (pbVar7[1] == 0x7c) { if (pbVar7[2] == 0x3d) { pbStack_38 = pbVar7 + 3; *puVar1 = 0xffffff92; } else { pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffffa2; } goto LAB_00153ef0; } if (pbVar7[1] != 0x3d) { uVar11 = 0x7c; goto LAB_00153ee6; } pbStack_38 = pbVar7 + 2; *puVar1 = 0xffffff8f; goto LAB_00153ef0; } do { while (bVar8 = *pbVar7, bVar8 == 0) { if ((byte *)param_1[0xf] <= pbVar7) goto LAB_00153694; LAB_001538c0: pbVar7 = pbVar7 + 1; pbStack_38 = pbVar7; } if ((bVar8 == 10) || (bVar8 == 0xd)) break; if (-1 < (char)bVar8) goto LAB_001538c0; uStack_60 = 0x1538a3; uVar3 = utf8_decode(pbVar7,&pbStack_38); pbVar7 = pbStack_38; } while ((uVar3 & 0xfffffffe) != 0x2028); goto LAB_00153694; } if ((iVar4 != 0x7d) && ((int)param_1[0xb] == 0)) { js_parse_error(param_1,"expecting \'%c\'",0x3b); return 0xffffffffffffffff; } } return 0; LAB_0015386e: pbStack_38 = pbStack_38 + 2; pbVar7 = pbStack_38; LAB_00153694: param_1[0x11] = (long)pbVar7; goto LAB_0015366a; switchD_0015368b_caseD_0: uVar11 = 0; if (pbVar7 < (byte *)param_1[0xf]) { LAB_00153ee6: *puVar1 = uVar11; pbStack_38 = pbVar7 + 1; } else { *puVar1 = 0xffffffaa; } LAB_00153ef0: iVar4 = (int)param_1[0x11] - (int)param_1[0x10]; if (iVar4 < 2) { iVar4 = 1; } *(int *)(param_1 + 5) = iVar4; param_1[0xe] = (long)pbStack_38; return 0; }
13,485
wake_up_waiters
eloqsql/mysys/thr_lock.c
static void wake_up_waiters(THR_LOCK *lock) { THR_LOCK_DATA *data; enum thr_lock_type lock_type; DBUG_ENTER("wake_up_waiters"); check_locks(lock, "before waking up waiters", TL_UNLOCK, 1); if (!lock->write.data) /* If no active write locks */ { data=lock->write_wait.data; if (!lock->read.data) /* If no more locks in use */ { /* Release write-locks with TL_WRITE or TL_WRITE_ONLY priority first */ if (data && (data->type != TL_WRITE_LOW_PRIORITY || !lock->read_wait.data || lock->read_wait.data->type < TL_READ_HIGH_PRIORITY)) { if (lock->write_lock_count++ > max_write_lock_count) { /* Too many write locks in a row; Release all waiting read locks */ lock->write_lock_count=0; if (lock->read_wait.data) { DBUG_PRINT("info",("Freeing all read_locks because of max_write_lock_count")); free_all_read_locks(lock,0); goto end; } } for (;;) { if (((*data->prev)=data->next)) /* remove from wait-list */ data->next->prev= data->prev; else lock->write_wait.last=data->prev; (*lock->write.last)=data; /* Put in execute list */ data->prev=lock->write.last; data->next=0; lock->write.last= &data->next; if (data->type == TL_WRITE_CONCURRENT_INSERT && (*lock->check_status)(data->status_param)) data->type=TL_WRITE; /* Upgrade lock */ /* purecov: begin inspected */ DBUG_PRINT("lock",("giving write lock of type %d to thread: %lu", data->type, (ulong) data->owner->thread_id)); /* purecov: end */ { mysql_cond_t *cond= data->cond; data->cond=0; /* Mark thread free */ mysql_cond_signal(cond); /* Start waiting thread */ } if (data->type != TL_WRITE_ALLOW_WRITE || !lock->write_wait.data || lock->write_wait.data->type != TL_WRITE_ALLOW_WRITE) break; data=lock->write_wait.data; /* Free this too */ } if (data->type >= TL_WRITE_LOW_PRIORITY) goto end; /* Release possible read locks together with the write lock */ } if (lock->read_wait.data) free_all_read_locks(lock, data && (data->type == TL_WRITE_CONCURRENT_INSERT || data->type == TL_WRITE_ALLOW_WRITE)); else { DBUG_PRINT("lock",("No waiting read locks to free")); } } else if (data && (lock_type=data->type) <= TL_WRITE_DELAYED && ((lock_type != TL_WRITE_CONCURRENT_INSERT && lock_type != TL_WRITE_ALLOW_WRITE) || !lock->read_no_write_count)) { /* For DELAYED, ALLOW_READ, WRITE_ALLOW_WRITE or CONCURRENT_INSERT locks start WRITE locks together with the READ locks */ if (lock_type == TL_WRITE_CONCURRENT_INSERT && (*lock->check_status)(data->status_param)) { data->type=TL_WRITE; /* Upgrade lock */ if (lock->read_wait.data) free_all_read_locks(lock,0); goto end; } do { mysql_cond_t *cond= data->cond; if (((*data->prev)=data->next)) /* remove from wait-list */ data->next->prev= data->prev; else lock->write_wait.last=data->prev; (*lock->write.last)=data; /* Put in execute list */ data->prev=lock->write.last; lock->write.last= &data->next; data->next=0; /* Only one write lock */ data->cond=0; /* Mark thread free */ mysql_cond_signal(cond); /* Start waiting thread */ } while (lock_type == TL_WRITE_ALLOW_WRITE && (data=lock->write_wait.data) && data->type == TL_WRITE_ALLOW_WRITE); if (lock->read_wait.data) free_all_read_locks(lock, (lock_type == TL_WRITE_CONCURRENT_INSERT || lock_type == TL_WRITE_ALLOW_WRITE)); } else if (!data && lock->read_wait.data) free_all_read_locks(lock,0); } end: check_locks(lock, "after waking up waiters", TL_UNLOCK, 0); DBUG_VOID_RETURN; }
O0
c
wake_up_waiters: pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x90(%rax) jne 0x100a51 movq -0x8(%rbp), %rax movq 0x80(%rax), %rax movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax cmpq $0x0, 0x70(%rax) jne 0x100885 cmpq $0x0, -0x10(%rbp) je 0x100822 movq -0x10(%rbp), %rax cmpl $0xb, 0x40(%rax) jne 0x10069e movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x10069e movq -0x8(%rbp), %rax movq 0x60(%rax), %rax cmpl $0x4, 0x40(%rax) jge 0x100822 movq -0x8(%rbp), %rcx movq 0xa0(%rcx), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, 0xa0(%rcx) leaq 0x1cd37a(%rip), %rcx # 0x2cda38 cmpq (%rcx), %rax jbe 0x1006f3 movq -0x8(%rbp), %rax movq $0x0, 0xa0(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x1006f1 jmp 0x1006df jmp 0x1006e1 movq -0x8(%rbp), %rdi xorl %esi, %esi callq 0x1020c0 jmp 0x100a53 jmp 0x1006f3 jmp 0x1006f5 movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0x100724 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, 0x10(%rax) jmp 0x100737 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq 0x98(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x98(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x10(%rbp), %rcx addq $0x8, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x10(%rbp), %rax cmpl $0x8, 0x40(%rax) jne 0x1007ad movq -0x8(%rbp), %rax movq 0xd8(%rax), %rax movq -0x10(%rbp), %rcx movq 0x28(%rcx), %rdi callq *%rax movsbl %al, %eax cmpl $0x0, %eax je 0x1007ad movq -0x10(%rbp), %rax movl $0xd, 0x40(%rax) jmp 0x1007af jmp 0x1007b1 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x20(%rbp), %rdi callq 0x101740 movq -0x10(%rbp), %rax cmpl $0x7, 0x40(%rax) jne 0x1007fb movq -0x8(%rbp), %rax cmpq $0x0, 0x80(%rax) je 0x1007fb movq -0x8(%rbp), %rax movq 0x80(%rax), %rax cmpl $0x7, 0x40(%rax) je 0x1007fd jmp 0x100811 movq -0x8(%rbp), %rax movq 0x80(%rax), %rax movq %rax, -0x10(%rbp) jmp 0x1006f5 movq -0x10(%rbp), %rax cmpl $0xb, 0x40(%rax) jl 0x100820 jmp 0x100a53 jmp 0x100822 movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x10087a movq -0x8(%rbp), %rax movq %rax, -0x38(%rbp) xorl %eax, %eax cmpq $0x0, -0x10(%rbp) movb %al, -0x29(%rbp) je 0x100864 movq -0x10(%rbp), %rcx movb $0x1, %al cmpl $0x8, 0x40(%rcx) movb %al, -0x39(%rbp) je 0x10085e movq -0x10(%rbp), %rax cmpl $0x7, 0x40(%rax) sete %al movb %al, -0x39(%rbp) movb -0x39(%rbp), %al movb %al, -0x29(%rbp) movq -0x38(%rbp), %rdi movb -0x29(%rbp), %al andb $0x1, %al movzbl %al, %eax movsbl %al, %esi callq 0x1020c0 jmp 0x100880 jmp 0x10087c jmp 0x10087e jmp 0x100880 jmp 0x100a4f cmpq $0x0, -0x10(%rbp) je 0x100a2e movq -0x10(%rbp), %rax movl 0x40(%rax), %eax movl %eax, -0x14(%rbp) cmpl $0x9, %eax jg 0x100a2e cmpl $0x8, -0x14(%rbp) je 0x1008af cmpl $0x7, -0x14(%rbp) jne 0x1008c0 movq -0x8(%rbp), %rax cmpl $0x0, 0xa8(%rax) jne 0x100a2e cmpl $0x8, -0x14(%rbp) jne 0x100909 movq -0x8(%rbp), %rax movq 0xd8(%rax), %rax movq -0x10(%rbp), %rcx movq 0x28(%rcx), %rdi callq *%rax movsbl %al, %eax cmpl $0x0, %eax je 0x100909 movq -0x10(%rbp), %rax movl $0xd, 0x40(%rax) movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x100904 movq -0x8(%rbp), %rdi xorl %esi, %esi callq 0x1020c0 jmp 0x100a53 jmp 0x10090b movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq %rax, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx movq %rax, (%rcx) cmpq $0x0, %rax je 0x100946 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rcx, 0x10(%rax) jmp 0x100959 movq -0x10(%rbp), %rax movq 0x10(%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x88(%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq 0x98(%rax), %rax movq %rcx, (%rax) movq -0x8(%rbp), %rax movq 0x98(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x10(%rbp), %rcx addq $0x8, %rcx movq -0x8(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x28(%rbp), %rdi callq 0x101740 xorl %eax, %eax cmpl $0x7, -0x14(%rbp) movb %al, -0x3a(%rbp) jne 0x1009e5 movq -0x8(%rbp), %rax movq 0x80(%rax), %rcx movq %rcx, -0x10(%rbp) xorl %eax, %eax cmpq $0x0, %rcx movb %al, -0x3a(%rbp) je 0x1009e5 movq -0x10(%rbp), %rax cmpl $0x7, 0x40(%rax) sete %al movb %al, -0x3a(%rbp) movb -0x3a(%rbp), %al testb $0x1, %al jne 0x10090b movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x100a2c movq -0x8(%rbp), %rax movq %rax, -0x48(%rbp) movb $0x1, %al cmpl $0x8, -0x14(%rbp) movb %al, -0x3b(%rbp) je 0x100a18 cmpl $0x7, -0x14(%rbp) sete %al movb %al, -0x3b(%rbp) movq -0x48(%rbp), %rdi movb -0x3b(%rbp), %al andb $0x1, %al movzbl %al, %eax movsbl %al, %esi callq 0x1020c0 jmp 0x100a4d cmpq $0x0, -0x10(%rbp) jne 0x100a4b movq -0x8(%rbp), %rax cmpq $0x0, 0x60(%rax) je 0x100a4b movq -0x8(%rbp), %rdi xorl %esi, %esi callq 0x1020c0 jmp 0x100a4d jmp 0x100a4f jmp 0x100a51 jmp 0x100a53 jmp 0x100a55 jmp 0x100a57 addq $0x50, %rsp popq %rbp retq nopl (%rax)
wake_up_waiters: push rbp mov rbp, rsp sub rsp, 50h mov [rbp+var_8], rdi mov rax, [rbp+var_8] cmp qword ptr [rax+90h], 0 jnz loc_100A51 mov rax, [rbp+var_8] mov rax, [rax+80h] mov [rbp+var_10], rax mov rax, [rbp+var_8] cmp qword ptr [rax+70h], 0 jnz loc_100885 cmp [rbp+var_10], 0 jz loc_100822 mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 0Bh jnz short loc_10069E mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_10069E mov rax, [rbp+var_8] mov rax, [rax+60h] cmp dword ptr [rax+40h], 4 jge loc_100822 loc_10069E: mov rcx, [rbp+var_8] mov rax, [rcx+0A0h] mov rdx, rax add rdx, 1 mov [rcx+0A0h], rdx lea rcx, max_write_lock_count cmp rax, [rcx] jbe short loc_1006F3 mov rax, [rbp+var_8] mov qword ptr [rax+0A0h], 0 mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_1006F1 jmp short $+2 loc_1006DF: jmp short $+2 loc_1006E1: mov rdi, [rbp+var_8] xor esi, esi call free_all_read_locks jmp loc_100A53 loc_1006F1: jmp short $+2 loc_1006F3: jmp short $+2 loc_1006F5: mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] mov rcx, [rcx+10h] mov [rcx], rax cmp rax, 0 jz short loc_100724 mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax+10h], rcx jmp short loc_100737 loc_100724: mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_8] mov [rax+88h], rcx loc_100737: mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov rax, [rax+98h] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rax+98h] mov rax, [rbp+var_10] mov [rax+10h], rcx mov rax, [rbp+var_10] mov qword ptr [rax+8], 0 mov rcx, [rbp+var_10] add rcx, 8 mov rax, [rbp+var_8] mov [rax+98h], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 8 jnz short loc_1007AD mov rax, [rbp+var_8] mov rax, [rax+0D8h] mov rcx, [rbp+var_10] mov rdi, [rcx+28h] call rax movsx eax, al cmp eax, 0 jz short loc_1007AD mov rax, [rbp+var_10] mov dword ptr [rax+40h], 0Dh loc_1007AD: jmp short $+2 loc_1007AF: jmp short $+2 loc_1007B1: mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_20], rax mov rax, [rbp+var_10] mov qword ptr [rax+20h], 0 mov rdi, [rbp+var_20] call inline_mysql_cond_signal_4 mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 7 jnz short loc_1007FB mov rax, [rbp+var_8] cmp qword ptr [rax+80h], 0 jz short loc_1007FB mov rax, [rbp+var_8] mov rax, [rax+80h] cmp dword ptr [rax+40h], 7 jz short loc_1007FD loc_1007FB: jmp short loc_100811 loc_1007FD: mov rax, [rbp+var_8] mov rax, [rax+80h] mov [rbp+var_10], rax jmp loc_1006F5 loc_100811: mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 0Bh jl short loc_100820 jmp loc_100A53 loc_100820: jmp short $+2 loc_100822: mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_10087A mov rax, [rbp+var_8] mov [rbp+var_38], rax xor eax, eax cmp [rbp+var_10], 0 mov [rbp+var_29], al jz short loc_100864 mov rcx, [rbp+var_10] mov al, 1 cmp dword ptr [rcx+40h], 8 mov [rbp+var_39], al jz short loc_10085E mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 7 setz al mov [rbp+var_39], al loc_10085E: mov al, [rbp+var_39] mov [rbp+var_29], al loc_100864: mov rdi, [rbp+var_38] mov al, [rbp+var_29] and al, 1 movzx eax, al movsx esi, al call free_all_read_locks jmp short loc_100880 loc_10087A: jmp short $+2 loc_10087C: jmp short $+2 loc_10087E: jmp short $+2 loc_100880: jmp loc_100A4F loc_100885: cmp [rbp+var_10], 0 jz loc_100A2E mov rax, [rbp+var_10] mov eax, [rax+40h] mov [rbp+var_14], eax cmp eax, 9 jg loc_100A2E cmp [rbp+var_14], 8 jz short loc_1008AF cmp [rbp+var_14], 7 jnz short loc_1008C0 loc_1008AF: mov rax, [rbp+var_8] cmp dword ptr [rax+0A8h], 0 jnz loc_100A2E loc_1008C0: cmp [rbp+var_14], 8 jnz short loc_100909 mov rax, [rbp+var_8] mov rax, [rax+0D8h] mov rcx, [rbp+var_10] mov rdi, [rcx+28h] call rax movsx eax, al cmp eax, 0 jz short loc_100909 mov rax, [rbp+var_10] mov dword ptr [rax+40h], 0Dh mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_100904 mov rdi, [rbp+var_8] xor esi, esi call free_all_read_locks loc_100904: jmp loc_100A53 loc_100909: jmp short $+2 loc_10090B: mov rax, [rbp+var_10] mov rax, [rax+20h] mov [rbp+var_28], rax mov rax, [rbp+var_10] mov rax, [rax+8] mov rcx, [rbp+var_10] mov rcx, [rcx+10h] mov [rcx], rax cmp rax, 0 jz short loc_100946 mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_10] mov rax, [rax+8] mov [rax+10h], rcx jmp short loc_100959 loc_100946: mov rax, [rbp+var_10] mov rcx, [rax+10h] mov rax, [rbp+var_8] mov [rax+88h], rcx loc_100959: mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov rax, [rax+98h] mov [rax], rcx mov rax, [rbp+var_8] mov rcx, [rax+98h] mov rax, [rbp+var_10] mov [rax+10h], rcx mov rcx, [rbp+var_10] add rcx, 8 mov rax, [rbp+var_8] mov [rax+98h], rcx mov rax, [rbp+var_10] mov qword ptr [rax+8], 0 mov rax, [rbp+var_10] mov qword ptr [rax+20h], 0 mov rdi, [rbp+var_28] call inline_mysql_cond_signal_4 xor eax, eax cmp [rbp+var_14], 7 mov [rbp+var_3A], al jnz short loc_1009E5 mov rax, [rbp+var_8] mov rcx, [rax+80h] mov [rbp+var_10], rcx xor eax, eax cmp rcx, 0 mov [rbp+var_3A], al jz short loc_1009E5 mov rax, [rbp+var_10] cmp dword ptr [rax+40h], 7 setz al mov [rbp+var_3A], al loc_1009E5: mov al, [rbp+var_3A] test al, 1 jnz loc_10090B mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_100A2C mov rax, [rbp+var_8] mov [rbp+var_48], rax mov al, 1 cmp [rbp+var_14], 8 mov [rbp+var_3B], al jz short loc_100A18 cmp [rbp+var_14], 7 setz al mov [rbp+var_3B], al loc_100A18: mov rdi, [rbp+var_48] mov al, [rbp+var_3B] and al, 1 movzx eax, al movsx esi, al call free_all_read_locks loc_100A2C: jmp short loc_100A4D loc_100A2E: cmp [rbp+var_10], 0 jnz short loc_100A4B mov rax, [rbp+var_8] cmp qword ptr [rax+60h], 0 jz short loc_100A4B mov rdi, [rbp+var_8] xor esi, esi call free_all_read_locks loc_100A4B: jmp short $+2 loc_100A4D: jmp short $+2 loc_100A4F: jmp short $+2 loc_100A51: jmp short $+2 loc_100A53: jmp short $+2 loc_100A55: jmp short $+2 loc_100A57: add rsp, 50h pop rbp retn
long long wake_up_waiters(long long a1) { long long result; // rax unsigned long long v2; // rax long long v3; // rax long long v4; // rax bool v5; // [rsp+15h] [rbp-3Bh] bool v6; // [rsp+16h] [rbp-3Ah] bool v7; // [rsp+17h] [rbp-39h] bool v8; // [rsp+27h] [rbp-29h] long long v9; // [rsp+28h] [rbp-28h] long long v10; // [rsp+30h] [rbp-20h] int v11; // [rsp+3Ch] [rbp-14h] long long v12; // [rsp+40h] [rbp-10h] result = a1; if ( *(_QWORD *)(a1 + 144) ) return result; v12 = *(_QWORD *)(a1 + 128); result = a1; if ( *(_QWORD *)(a1 + 112) ) { if ( v12 ) { result = *(unsigned int *)(v12 + 64); v11 = result; if ( (int)result <= 9 ) { if ( (_DWORD)result != 8 && (_DWORD)result != 7 || (result = a1, !*(_DWORD *)(a1 + 168)) ) { if ( v11 == 8 && (*(unsigned __int8 ( **)(_QWORD))(a1 + 216))(*(_QWORD *)(v12 + 40)) ) { *(_DWORD *)(v12 + 64) = 13; result = a1; if ( *(_QWORD *)(a1 + 96) ) return free_all_read_locks(a1, 0LL); } else { do { v9 = *(_QWORD *)(v12 + 32); v4 = *(_QWORD *)(v12 + 8); **(_QWORD **)(v12 + 16) = v4; if ( v4 ) *(_QWORD *)(*(_QWORD *)(v12 + 8) + 16LL) = *(_QWORD *)(v12 + 16); else *(_QWORD *)(a1 + 136) = *(_QWORD *)(v12 + 16); **(_QWORD **)(a1 + 152) = v12; *(_QWORD *)(v12 + 16) = *(_QWORD *)(a1 + 152); *(_QWORD *)(a1 + 152) = v12 + 8; *(_QWORD *)(v12 + 8) = 0LL; *(_QWORD *)(v12 + 32) = 0LL; inline_mysql_cond_signal_4(v9); v6 = 0; if ( v11 == 7 ) { v12 = *(_QWORD *)(a1 + 128); v6 = 0; if ( v12 ) v6 = *(_DWORD *)(v12 + 64) == 7; } } while ( v6 ); result = a1; if ( *(_QWORD *)(a1 + 96) ) { v5 = 1; if ( v11 != 8 ) v5 = v11 == 7; return free_all_read_locks(a1, v5); } } return result; } } } if ( v12 ) return result; result = a1; if ( !*(_QWORD *)(a1 + 96) ) return result; return free_all_read_locks(a1, 0LL); } if ( !v12 || *(_DWORD *)(v12 + 64) == 11 && *(_QWORD *)(a1 + 96) && *(int *)(*(_QWORD *)(a1 + 96) + 64LL) >= 4 ) { LABEL_21: result = a1; if ( *(_QWORD *)(a1 + 96) ) { v8 = 0; if ( v12 ) { v7 = 1; if ( *(_DWORD *)(v12 + 64) != 8 ) v7 = *(_DWORD *)(v12 + 64) == 7; v8 = v7; } return free_all_read_locks(a1, v8); } return result; } v2 = *(_QWORD *)(a1 + 160); *(_QWORD *)(a1 + 160) = v2 + 1; if ( v2 > max_write_lock_count ) { *(_QWORD *)(a1 + 160) = 0LL; if ( *(_QWORD *)(a1 + 96) ) return free_all_read_locks(a1, 0LL); } while ( 1 ) { v3 = *(_QWORD *)(v12 + 8); **(_QWORD **)(v12 + 16) = v3; if ( v3 ) *(_QWORD *)(*(_QWORD *)(v12 + 8) + 16LL) = *(_QWORD *)(v12 + 16); else *(_QWORD *)(a1 + 136) = *(_QWORD *)(v12 + 16); **(_QWORD **)(a1 + 152) = v12; *(_QWORD *)(v12 + 16) = *(_QWORD *)(a1 + 152); *(_QWORD *)(v12 + 8) = 0LL; *(_QWORD *)(a1 + 152) = v12 + 8; if ( *(_DWORD *)(v12 + 64) == 8 && (*(unsigned __int8 ( **)(_QWORD))(a1 + 216))(*(_QWORD *)(v12 + 40)) ) *(_DWORD *)(v12 + 64) = 13; v10 = *(_QWORD *)(v12 + 32); *(_QWORD *)(v12 + 32) = 0LL; inline_mysql_cond_signal_4(v10); if ( *(_DWORD *)(v12 + 64) != 7 || !*(_QWORD *)(a1 + 128) || *(_DWORD *)(*(_QWORD *)(a1 + 128) + 64LL) != 7 ) break; v12 = *(_QWORD *)(a1 + 128); } result = v12; if ( *(int *)(v12 + 64) < 11 ) goto LABEL_21; return result; }
13,486
wake_up_waiters
eloqsql/mysys/thr_lock.c
static void wake_up_waiters(THR_LOCK *lock) { THR_LOCK_DATA *data; enum thr_lock_type lock_type; DBUG_ENTER("wake_up_waiters"); check_locks(lock, "before waking up waiters", TL_UNLOCK, 1); if (!lock->write.data) /* If no active write locks */ { data=lock->write_wait.data; if (!lock->read.data) /* If no more locks in use */ { /* Release write-locks with TL_WRITE or TL_WRITE_ONLY priority first */ if (data && (data->type != TL_WRITE_LOW_PRIORITY || !lock->read_wait.data || lock->read_wait.data->type < TL_READ_HIGH_PRIORITY)) { if (lock->write_lock_count++ > max_write_lock_count) { /* Too many write locks in a row; Release all waiting read locks */ lock->write_lock_count=0; if (lock->read_wait.data) { DBUG_PRINT("info",("Freeing all read_locks because of max_write_lock_count")); free_all_read_locks(lock,0); goto end; } } for (;;) { if (((*data->prev)=data->next)) /* remove from wait-list */ data->next->prev= data->prev; else lock->write_wait.last=data->prev; (*lock->write.last)=data; /* Put in execute list */ data->prev=lock->write.last; data->next=0; lock->write.last= &data->next; if (data->type == TL_WRITE_CONCURRENT_INSERT && (*lock->check_status)(data->status_param)) data->type=TL_WRITE; /* Upgrade lock */ /* purecov: begin inspected */ DBUG_PRINT("lock",("giving write lock of type %d to thread: %lu", data->type, (ulong) data->owner->thread_id)); /* purecov: end */ { mysql_cond_t *cond= data->cond; data->cond=0; /* Mark thread free */ mysql_cond_signal(cond); /* Start waiting thread */ } if (data->type != TL_WRITE_ALLOW_WRITE || !lock->write_wait.data || lock->write_wait.data->type != TL_WRITE_ALLOW_WRITE) break; data=lock->write_wait.data; /* Free this too */ } if (data->type >= TL_WRITE_LOW_PRIORITY) goto end; /* Release possible read locks together with the write lock */ } if (lock->read_wait.data) free_all_read_locks(lock, data && (data->type == TL_WRITE_CONCURRENT_INSERT || data->type == TL_WRITE_ALLOW_WRITE)); else { DBUG_PRINT("lock",("No waiting read locks to free")); } } else if (data && (lock_type=data->type) <= TL_WRITE_DELAYED && ((lock_type != TL_WRITE_CONCURRENT_INSERT && lock_type != TL_WRITE_ALLOW_WRITE) || !lock->read_no_write_count)) { /* For DELAYED, ALLOW_READ, WRITE_ALLOW_WRITE or CONCURRENT_INSERT locks start WRITE locks together with the READ locks */ if (lock_type == TL_WRITE_CONCURRENT_INSERT && (*lock->check_status)(data->status_param)) { data->type=TL_WRITE; /* Upgrade lock */ if (lock->read_wait.data) free_all_read_locks(lock,0); goto end; } do { mysql_cond_t *cond= data->cond; if (((*data->prev)=data->next)) /* remove from wait-list */ data->next->prev= data->prev; else lock->write_wait.last=data->prev; (*lock->write.last)=data; /* Put in execute list */ data->prev=lock->write.last; lock->write.last= &data->next; data->next=0; /* Only one write lock */ data->cond=0; /* Mark thread free */ mysql_cond_signal(cond); /* Start waiting thread */ } while (lock_type == TL_WRITE_ALLOW_WRITE && (data=lock->write_wait.data) && data->type == TL_WRITE_ALLOW_WRITE); if (lock->read_wait.data) free_all_read_locks(lock, (lock_type == TL_WRITE_CONCURRENT_INSERT || lock_type == TL_WRITE_ALLOW_WRITE)); } else if (!data && lock->read_wait.data) free_all_read_locks(lock,0); } end: check_locks(lock, "after waking up waiters", TL_UNLOCK, 0); DBUG_VOID_RETURN; }
O3
c
wake_up_waiters: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpq $0x0, 0x90(%rdi) je 0xa9b30 addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rdi, %rbx movq 0x80(%rdi), %r15 cmpq $0x0, 0x70(%rdi) je 0xa9baa testq %r15, %r15 je 0xa9c7a movl 0x40(%r15), %r13d cmpl $0x9, %r13d jg 0xa9b21 leal -0x9(%r13), %r14d cmpl $-0x2, %r14d jb 0xa9b67 cmpl $0x0, 0xa8(%rbx) jne 0xa9b21 cmpl $0x8, %r13d jne 0xa9dd5 movq 0x28(%r15), %rdi callq *0xd8(%rbx) testb %al, %al je 0xa9dd5 movl $0xd, 0x40(%r15) cmpq $0x0, 0x60(%rbx) je 0xa9b21 movq %rbx, %rdi xorl %esi, %esi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0xab14c testq %r15, %r15 je 0xa9cf1 cmpl $0xb, 0x40(%r15) jne 0xa9bd2 movq 0x60(%rbx), %rcx testq %rcx, %rcx je 0xa9bd2 movl $0xb, %eax cmpl $0x3, 0x40(%rcx) jg 0xa9f2c movq 0xa0(%rbx), %rax leaq 0x1(%rax), %rcx movq %rcx, 0xa0(%rbx) leaq 0x2e6e4d(%rip), %rcx # 0x390a38 cmpq (%rcx), %rax jbe 0xa9d0a movq $0x0, 0xa0(%rbx) movq 0x60(%rbx), %r12 testq %r12, %r12 je 0xa9d0a leaq 0x60(%rbx), %rax movq 0x78(%rbx), %rcx movq %r12, (%rcx) movq 0x78(%rbx), %rcx movq %rcx, 0x10(%r12) movq 0x68(%rbx), %rcx movq %rcx, 0x78(%rbx) movq %rax, 0x68(%rbx) leaq 0x2e72a5(%rip), %r15 # 0x390ed8 movq 0x20(%r12), %r14 cmpl $0x5, 0x40(%r12) jne 0xa9c46 incl 0xa8(%rbx) movq $0x0, 0x20(%r12) movq 0x30(%r14), %rdi testq %rdi, %rdi jne 0xa9c6f movq %r14, %rdi callq 0x2a5b0 movq 0x8(%r12), %r12 testq %r12, %r12 jne 0xa9c33 jmp 0xa9fe8 movq (%r15), %rax callq *0x170(%rax) jmp 0xa9c58 movq 0x60(%rbx), %r15 testq %r15, %r15 je 0xa9b21 leaq 0x60(%rbx), %rax movq 0x78(%rbx), %rcx movq %r15, (%rcx) movq 0x78(%rbx), %rcx movq %rcx, 0x10(%r15) movq 0x68(%rbx), %rcx movq %rcx, 0x78(%rbx) movq %rax, 0x68(%rbx) leaq 0x2e722b(%rip), %r12 # 0x390ed8 movq 0x20(%r15), %r14 cmpl $0x5, 0x40(%r15) jne 0xa9cbe incl 0xa8(%rbx) movq $0x0, 0x20(%r15) movq 0x30(%r14), %rdi testq %rdi, %rdi jne 0xa9ce5 movq %r14, %rdi callq 0x2a5b0 movq 0x8(%r15), %r15 testq %r15, %r15 jne 0xa9cad jmp 0xa9fe8 movq (%r12), %rax callq *0x170(%rax) jmp 0xa9ccf movq 0x60(%rbx), %r15 testq %r15, %r15 je 0xa9b21 leaq 0x60(%rbx), %rcx movb $0x1, %r12b jmp 0xa9f47 leaq 0x88(%rbx), %r12 leaq 0x2e71c0(%rip), %r13 # 0x390ed8 leaq 0x8(%r15), %rax movq 0x8(%r15), %rcx movq 0x10(%r15), %rdx movq %rcx, (%rdx) leaq 0x10(%rcx), %rdx testq %rcx, %rcx movq 0x10(%r15), %rcx cmoveq %r12, %rdx movq %rcx, (%rdx) movq 0x98(%rbx), %rcx movq %r15, (%rcx) movq 0x98(%rbx), %rcx movq %rcx, 0x10(%r15) movq $0x0, 0x8(%r15) movq %rax, 0x98(%rbx) cmpl $0x8, 0x40(%r15) jne 0xa9d7a movq 0x28(%r15), %rdi callq *0xd8(%rbx) testb %al, %al je 0xa9d7a movl $0xd, 0x40(%r15) movq 0x20(%r15), %r14 movq $0x0, 0x20(%r15) movq 0x30(%r14), %rdi testq %rdi, %rdi jne 0xa9dc9 movq %r14, %rdi callq 0x2a5b0 movl 0x40(%r15), %eax cmpl $0x7, %eax jne 0xa9f23 movq 0x80(%rbx), %r15 movl $0x7, %eax testq %r15, %r15 je 0xa9f2c cmpl $0x7, 0x40(%r15) je 0xa9d18 jmp 0xa9f2c movq (%r13), %rax callq *0x170(%rax) jmp 0xa9d8f movl %r14d, -0x2c(%rbp) leaq 0x88(%rbx), %r12 movq 0x20(%r15), %r14 leaq 0x8(%r15), %rax movq 0x8(%r15), %rcx movq 0x10(%r15), %rdx movq %rcx, (%rdx) leaq 0x10(%rcx), %rdx testq %rcx, %rcx movq 0x10(%r15), %rcx cmoveq %r12, %rdx movq %rcx, (%rdx) movq 0x98(%rbx), %rcx movq %r15, (%rcx) movq 0x98(%rbx), %rcx movq %rcx, 0x10(%r15) movq %rax, 0x98(%rbx) xorl %eax, %eax movq %rax, 0x8(%r15) movq %rax, 0x20(%r15) movq 0x30(%r14), %rdi testq %rdi, %rdi jne 0xa9e57 movq %r14, %rdi callq 0x2a5b0 cmpl $0x7, %r13d jne 0xa9e69 movq 0x80(%rbx), %r15 testq %r15, %r15 je 0xa9e69 cmpl $0x7, 0x40(%r15) je 0xa9de0 jmp 0xa9e69 leaq 0x2e707a(%rip), %rax # 0x390ed8 movq (%rax), %rax callq *0x170(%rax) jmp 0xa9e34 movq 0x60(%rbx), %r15 testq %r15, %r15 movl -0x2c(%rbp), %r12d je 0xa9b21 leaq 0x60(%rbx), %rax leaq 0x78(%rbx), %r13 movq 0x78(%rbx), %rcx movq %r15, (%rcx) movq 0x78(%rbx), %rcx movq %rcx, 0x10(%r15) movq 0x68(%rbx), %rcx movq %rcx, 0x78(%rbx) movq %rax, 0x68(%rbx) movq 0x20(%r15), %r14 cmpl $0x5, 0x40(%r15) jne 0xa9eb4 cmpl $-0x2, %r12d jae 0xa9ecf incl 0xa8(%rbx) movq $0x0, 0x20(%r15) movq 0x30(%r14), %rdi testq %rdi, %rdi jne 0xa9f11 movq %r14, %rdi callq 0x2a5b0 jmp 0xa9f03 leaq 0x8(%r15), %rax movq 0x8(%r15), %rcx movq 0x10(%r15), %rdx movq %rcx, (%rdx) leaq 0x10(%rcx), %rdx testq %rcx, %rcx movq 0x10(%r15), %rcx cmoveq %r13, %rdx movq %rcx, (%rdx) movq 0x68(%rbx), %rcx movq %r15, (%rcx) movq 0x68(%rbx), %rcx movq %rcx, 0x10(%r15) movq %rax, 0x68(%rbx) movq 0x8(%r15), %r15 testq %r15, %r15 jne 0xa9e9d jmp 0xa9fe8 leaq 0x2e6fc0(%rip), %rax # 0x390ed8 movq (%rax), %rax callq *0x170(%rax) jmp 0xa9ec5 cmpl $0xa, %eax jg 0xa9b21 movq 0x60(%rbx), %r15 testq %r15, %r15 je 0xa9b21 leaq 0x60(%rbx), %rcx addl $-0x9, %eax cmpl $-0x2, %eax setb %r12b leaq 0x78(%rbx), %r13 movq 0x78(%rbx), %rax movq %r15, (%rax) movq 0x78(%rbx), %rax movq %rax, 0x10(%r15) movq 0x68(%rbx), %rax movq %rax, 0x78(%rbx) movq %rcx, 0x68(%rbx) movq 0x20(%r15), %r14 cmpl $0x5, 0x40(%r15) jne 0xa9f7c testb %r12b, %r12b je 0xa9f97 incl 0xa8(%rbx) movq $0x0, 0x20(%r15) movq 0x30(%r14), %rdi testq %rdi, %rdi jne 0xa9fd6 movq %r14, %rdi callq 0x2a5b0 jmp 0xa9fcb leaq 0x8(%r15), %rax movq 0x8(%r15), %rcx movq 0x10(%r15), %rdx movq %rcx, (%rdx) leaq 0x10(%rcx), %rdx testq %rcx, %rcx movq 0x10(%r15), %rcx cmoveq %r13, %rdx movq %rcx, (%rdx) movq 0x68(%rbx), %rcx movq %r15, (%rcx) movq 0x68(%rbx), %rcx movq %rcx, 0x10(%r15) movq %rax, 0x68(%rbx) movq 0x8(%r15), %r15 testq %r15, %r15 jne 0xa9f66 jmp 0xa9fe8 leaq 0x2e6efb(%rip), %rax # 0x390ed8 movq (%rax), %rax callq *0x170(%rax) jmp 0xa9f8d movq 0x68(%rbx), %rax movq $0x0, (%rax) cmpq $0x0, 0x60(%rbx) jne 0xa9b21 movq $0x0, 0xa0(%rbx) jmp 0xa9b21
wake_up_waiters: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax cmp qword ptr [rdi+90h], 0 jz short loc_A9B30 loc_A9B21: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A9B30: mov rbx, rdi mov r15, [rdi+80h] cmp qword ptr [rdi+70h], 0 jz short loc_A9BAA test r15, r15 jz loc_A9C7A mov r13d, [r15+40h] cmp r13d, 9 jg short loc_A9B21 lea r14d, [r13-9] cmp r14d, 0FFFFFFFEh jb short loc_A9B67 cmp dword ptr [rbx+0A8h], 0 jnz short loc_A9B21 loc_A9B67: cmp r13d, 8 jnz loc_A9DD5 mov rdi, [r15+28h] call qword ptr [rbx+0D8h] test al, al jz loc_A9DD5 mov dword ptr [r15+40h], 0Dh cmp qword ptr [rbx+60h], 0 jz short loc_A9B21 mov rdi, rbx xor esi, esi add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp free_all_read_locks loc_A9BAA: test r15, r15 jz loc_A9CF1 cmp dword ptr [r15+40h], 0Bh jnz short loc_A9BD2 mov rcx, [rbx+60h] test rcx, rcx jz short loc_A9BD2 mov eax, 0Bh cmp dword ptr [rcx+40h], 3 jg loc_A9F2C loc_A9BD2: mov rax, [rbx+0A0h] lea rcx, [rax+1] mov [rbx+0A0h], rcx lea rcx, max_write_lock_count cmp rax, [rcx] jbe loc_A9D0A mov qword ptr [rbx+0A0h], 0 mov r12, [rbx+60h] test r12, r12 jz loc_A9D0A lea rax, [rbx+60h] mov rcx, [rbx+78h] mov [rcx], r12 mov rcx, [rbx+78h] mov [r12+10h], rcx mov rcx, [rbx+68h] mov [rbx+78h], rcx mov [rbx+68h], rax lea r15, PSI_server loc_A9C33: mov r14, [r12+20h] cmp dword ptr [r12+40h], 5 jnz short loc_A9C46 inc dword ptr [rbx+0A8h] loc_A9C46: mov qword ptr [r12+20h], 0 mov rdi, [r14+30h] test rdi, rdi jnz short loc_A9C6F loc_A9C58: mov rdi, r14 call _pthread_cond_signal mov r12, [r12+8] test r12, r12 jnz short loc_A9C33 jmp loc_A9FE8 loc_A9C6F: mov rax, [r15] call qword ptr [rax+170h] jmp short loc_A9C58 loc_A9C7A: mov r15, [rbx+60h] test r15, r15 jz loc_A9B21 lea rax, [rbx+60h] mov rcx, [rbx+78h] mov [rcx], r15 mov rcx, [rbx+78h] mov [r15+10h], rcx mov rcx, [rbx+68h] mov [rbx+78h], rcx mov [rbx+68h], rax lea r12, PSI_server loc_A9CAD: mov r14, [r15+20h] cmp dword ptr [r15+40h], 5 jnz short loc_A9CBE inc dword ptr [rbx+0A8h] loc_A9CBE: mov qword ptr [r15+20h], 0 mov rdi, [r14+30h] test rdi, rdi jnz short loc_A9CE5 loc_A9CCF: mov rdi, r14 call _pthread_cond_signal mov r15, [r15+8] test r15, r15 jnz short loc_A9CAD jmp loc_A9FE8 loc_A9CE5: mov rax, [r12] call qword ptr [rax+170h] jmp short loc_A9CCF loc_A9CF1: mov r15, [rbx+60h] test r15, r15 jz loc_A9B21 lea rcx, [rbx+60h] mov r12b, 1 jmp loc_A9F47 loc_A9D0A: lea r12, [rbx+88h] lea r13, PSI_server loc_A9D18: lea rax, [r15+8] mov rcx, [r15+8] mov rdx, [r15+10h] mov [rdx], rcx lea rdx, [rcx+10h] test rcx, rcx mov rcx, [r15+10h] cmovz rdx, r12 mov [rdx], rcx mov rcx, [rbx+98h] mov [rcx], r15 mov rcx, [rbx+98h] mov [r15+10h], rcx mov qword ptr [r15+8], 0 mov [rbx+98h], rax cmp dword ptr [r15+40h], 8 jnz short loc_A9D7A mov rdi, [r15+28h] call qword ptr [rbx+0D8h] test al, al jz short loc_A9D7A mov dword ptr [r15+40h], 0Dh loc_A9D7A: mov r14, [r15+20h] mov qword ptr [r15+20h], 0 mov rdi, [r14+30h] test rdi, rdi jnz short loc_A9DC9 loc_A9D8F: mov rdi, r14 call _pthread_cond_signal mov eax, [r15+40h] cmp eax, 7 jnz loc_A9F23 mov r15, [rbx+80h] mov eax, 7 test r15, r15 jz loc_A9F2C cmp dword ptr [r15+40h], 7 jz loc_A9D18 jmp loc_A9F2C loc_A9DC9: mov rax, [r13+0] call qword ptr [rax+170h] jmp short loc_A9D8F loc_A9DD5: mov [rbp+var_2C], r14d lea r12, [rbx+88h] loc_A9DE0: mov r14, [r15+20h] lea rax, [r15+8] mov rcx, [r15+8] mov rdx, [r15+10h] mov [rdx], rcx lea rdx, [rcx+10h] test rcx, rcx mov rcx, [r15+10h] cmovz rdx, r12 mov [rdx], rcx mov rcx, [rbx+98h] mov [rcx], r15 mov rcx, [rbx+98h] mov [r15+10h], rcx mov [rbx+98h], rax xor eax, eax mov [r15+8], rax mov [r15+20h], rax mov rdi, [r14+30h] test rdi, rdi jnz short loc_A9E57 loc_A9E34: mov rdi, r14 call _pthread_cond_signal cmp r13d, 7 jnz short loc_A9E69 mov r15, [rbx+80h] test r15, r15 jz short loc_A9E69 cmp dword ptr [r15+40h], 7 jz short loc_A9DE0 jmp short loc_A9E69 loc_A9E57: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp short loc_A9E34 loc_A9E69: mov r15, [rbx+60h] test r15, r15 mov r12d, [rbp+var_2C] jz loc_A9B21 lea rax, [rbx+60h] lea r13, [rbx+78h] mov rcx, [rbx+78h] mov [rcx], r15 mov rcx, [rbx+78h] mov [r15+10h], rcx mov rcx, [rbx+68h] mov [rbx+78h], rcx mov [rbx+68h], rax loc_A9E9D: mov r14, [r15+20h] cmp dword ptr [r15+40h], 5 jnz short loc_A9EB4 cmp r12d, 0FFFFFFFEh jnb short loc_A9ECF inc dword ptr [rbx+0A8h] loc_A9EB4: mov qword ptr [r15+20h], 0 mov rdi, [r14+30h] test rdi, rdi jnz short loc_A9F11 loc_A9EC5: mov rdi, r14 call _pthread_cond_signal jmp short loc_A9F03 loc_A9ECF: lea rax, [r15+8] mov rcx, [r15+8] mov rdx, [r15+10h] mov [rdx], rcx lea rdx, [rcx+10h] test rcx, rcx mov rcx, [r15+10h] cmovz rdx, r13 mov [rdx], rcx mov rcx, [rbx+68h] mov [rcx], r15 mov rcx, [rbx+68h] mov [r15+10h], rcx mov [rbx+68h], rax loc_A9F03: mov r15, [r15+8] test r15, r15 jnz short loc_A9E9D jmp loc_A9FE8 loc_A9F11: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp short loc_A9EC5 loc_A9F23: cmp eax, 0Ah jg loc_A9B21 loc_A9F2C: mov r15, [rbx+60h] test r15, r15 jz loc_A9B21 lea rcx, [rbx+60h] add eax, 0FFFFFFF7h cmp eax, 0FFFFFFFEh setb r12b loc_A9F47: lea r13, [rbx+78h] mov rax, [rbx+78h] mov [rax], r15 mov rax, [rbx+78h] mov [r15+10h], rax mov rax, [rbx+68h] mov [rbx+78h], rax mov [rbx+68h], rcx loc_A9F66: mov r14, [r15+20h] cmp dword ptr [r15+40h], 5 jnz short loc_A9F7C test r12b, r12b jz short loc_A9F97 inc dword ptr [rbx+0A8h] loc_A9F7C: mov qword ptr [r15+20h], 0 mov rdi, [r14+30h] test rdi, rdi jnz short loc_A9FD6 loc_A9F8D: mov rdi, r14 call _pthread_cond_signal jmp short loc_A9FCB loc_A9F97: lea rax, [r15+8] mov rcx, [r15+8] mov rdx, [r15+10h] mov [rdx], rcx lea rdx, [rcx+10h] test rcx, rcx mov rcx, [r15+10h] cmovz rdx, r13 mov [rdx], rcx mov rcx, [rbx+68h] mov [rcx], r15 mov rcx, [rbx+68h] mov [r15+10h], rcx mov [rbx+68h], rax loc_A9FCB: mov r15, [r15+8] test r15, r15 jnz short loc_A9F66 jmp short loc_A9FE8 loc_A9FD6: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+170h] jmp short loc_A9F8D loc_A9FE8: mov rax, [rbx+68h] mov qword ptr [rax], 0 cmp qword ptr [rbx+60h], 0 jnz loc_A9B21 mov qword ptr [rbx+0A0h], 0 jmp loc_A9B21
long long wake_up_waiters(long long a1) { long long result; // rax long long v3; // r15 int v4; // r13d long long v5; // rcx unsigned long long v6; // rax long long v7; // r12 long long v8; // r14 long long v9; // rdi long long v10; // r15 long long v11; // r14 long long v12; // rdi long long v13; // r15 long long v14; // rcx bool v15; // r12 long long v16; // rcx _QWORD *v17; // rdx long long v18; // r14 long long v19; // rdi long long v20; // r14 long long v21; // rcx _QWORD *v22; // rdx long long v23; // rdi long long v24; // r15 long long v25; // r14 long long v26; // rdi long long v27; // rcx _QWORD *v28; // rdx long long v29; // r14 long long v30; // rdi long long v31; // rcx _QWORD *v32; // rdx if ( *(_QWORD *)(a1 + 144) ) return result; v3 = *(_QWORD *)(a1 + 128); if ( !*(_QWORD *)(a1 + 112) ) { if ( v3 ) { if ( *(_DWORD *)(v3 + 64) != 11 || (v5 = *(_QWORD *)(a1 + 96)) == 0 || (result = 11LL, *(int *)(v5 + 64) <= 3) ) { v6 = *(_QWORD *)(a1 + 160); *(_QWORD *)(a1 + 160) = v6 + 1; if ( v6 > max_write_lock_count ) { *(_QWORD *)(a1 + 160) = 0LL; v7 = *(_QWORD *)(a1 + 96); if ( v7 ) { **(_QWORD **)(a1 + 120) = v7; *(_QWORD *)(v7 + 16) = *(_QWORD *)(a1 + 120); *(_QWORD *)(a1 + 120) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = a1 + 96; do { v8 = *(_QWORD *)(v7 + 32); if ( *(_DWORD *)(v7 + 64) == 5 ) ++*(_DWORD *)(a1 + 168); *(_QWORD *)(v7 + 32) = 0LL; v9 = *(_QWORD *)(v8 + 48); if ( v9 ) ((void ( *)(long long))PSI_server[46])(v9); pthread_cond_signal(v8); v7 = *(_QWORD *)(v7 + 8); } while ( v7 ); LABEL_80: result = *(_QWORD *)(a1 + 104); *(_QWORD *)result = 0LL; if ( !*(_QWORD *)(a1 + 96) ) *(_QWORD *)(a1 + 160) = 0LL; return result; } } while ( 1 ) { v16 = *(_QWORD *)(v3 + 8); **(_QWORD **)(v3 + 16) = v16; v17 = (_QWORD *)(v16 + 16); if ( !v16 ) v17 = (_QWORD *)(a1 + 136); *v17 = *(_QWORD *)(v3 + 16); **(_QWORD **)(a1 + 152) = v3; *(_QWORD *)(v3 + 16) = *(_QWORD *)(a1 + 152); *(_QWORD *)(v3 + 8) = 0LL; *(_QWORD *)(a1 + 152) = v3 + 8; if ( *(_DWORD *)(v3 + 64) == 8 && (*(unsigned __int8 ( **)(_QWORD))(a1 + 216))(*(_QWORD *)(v3 + 40)) ) *(_DWORD *)(v3 + 64) = 13; v18 = *(_QWORD *)(v3 + 32); *(_QWORD *)(v3 + 32) = 0LL; v19 = *(_QWORD *)(v18 + 48); if ( v19 ) ((void ( *)(long long))PSI_server[46])(v19); pthread_cond_signal(v18); result = *(unsigned int *)(v3 + 64); if ( (_DWORD)result != 7 ) break; v3 = *(_QWORD *)(a1 + 128); result = 7LL; if ( !v3 || *(_DWORD *)(v3 + 64) != 7 ) goto LABEL_67; } if ( (int)result > 10 ) return result; } LABEL_67: v13 = *(_QWORD *)(a1 + 96); if ( !v13 ) return result; v14 = a1 + 96; v15 = (unsigned int)(result - 9) < 0xFFFFFFFE; } else { v13 = *(_QWORD *)(a1 + 96); if ( !v13 ) return result; v14 = a1 + 96; v15 = 1; } **(_QWORD **)(a1 + 120) = v13; *(_QWORD *)(v13 + 16) = *(_QWORD *)(a1 + 120); *(_QWORD *)(a1 + 120) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = v14; while ( 1 ) { v29 = *(_QWORD *)(v13 + 32); if ( *(_DWORD *)(v13 + 64) == 5 ) { if ( !v15 ) { v31 = *(_QWORD *)(v13 + 8); **(_QWORD **)(v13 + 16) = v31; v32 = (_QWORD *)(v31 + 16); if ( !v31 ) v32 = (_QWORD *)(a1 + 120); *v32 = *(_QWORD *)(v13 + 16); **(_QWORD **)(a1 + 104) = v13; *(_QWORD *)(v13 + 16) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = v13 + 8; goto LABEL_79; } ++*(_DWORD *)(a1 + 168); } *(_QWORD *)(v13 + 32) = 0LL; v30 = *(_QWORD *)(v29 + 48); if ( v30 ) ((void ( *)(long long))PSI_server[46])(v30); pthread_cond_signal(v29); LABEL_79: v13 = *(_QWORD *)(v13 + 8); if ( !v13 ) goto LABEL_80; } } if ( !v3 ) { v10 = *(_QWORD *)(a1 + 96); if ( !v10 ) return result; **(_QWORD **)(a1 + 120) = v10; *(_QWORD *)(v10 + 16) = *(_QWORD *)(a1 + 120); *(_QWORD *)(a1 + 120) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = a1 + 96; do { v11 = *(_QWORD *)(v10 + 32); if ( *(_DWORD *)(v10 + 64) == 5 ) ++*(_DWORD *)(a1 + 168); *(_QWORD *)(v10 + 32) = 0LL; v12 = *(_QWORD *)(v11 + 48); if ( v12 ) ((void ( *)(long long))PSI_server[46])(v12); pthread_cond_signal(v11); v10 = *(_QWORD *)(v10 + 8); } while ( v10 ); goto LABEL_80; } v4 = *(_DWORD *)(v3 + 64); if ( v4 <= 9 && ((unsigned int)(v4 - 9) < 0xFFFFFFFE || !*(_DWORD *)(a1 + 168)) ) { if ( v4 == 8 ) { result = (*(long long ( **)(_QWORD))(a1 + 216))(*(_QWORD *)(v3 + 40)); if ( (_BYTE)result ) { *(_DWORD *)(v3 + 64) = 13; if ( *(_QWORD *)(a1 + 96) ) return free_all_read_locks(a1, 0LL); return result; } } do { v20 = *(_QWORD *)(v3 + 32); v21 = *(_QWORD *)(v3 + 8); **(_QWORD **)(v3 + 16) = v21; v22 = (_QWORD *)(v21 + 16); if ( !v21 ) v22 = (_QWORD *)(a1 + 136); *v22 = *(_QWORD *)(v3 + 16); **(_QWORD **)(a1 + 152) = v3; *(_QWORD *)(v3 + 16) = *(_QWORD *)(a1 + 152); *(_QWORD *)(a1 + 152) = v3 + 8; *(_QWORD *)(v3 + 8) = 0LL; *(_QWORD *)(v3 + 32) = 0LL; v23 = *(_QWORD *)(v20 + 48); if ( v23 ) ((void ( *)(long long))PSI_server[46])(v23); result = pthread_cond_signal(v20); if ( v4 != 7 ) break; v3 = *(_QWORD *)(a1 + 128); if ( !v3 ) break; } while ( *(_DWORD *)(v3 + 64) == 7 ); v24 = *(_QWORD *)(a1 + 96); if ( v24 ) { **(_QWORD **)(a1 + 120) = v24; *(_QWORD *)(v24 + 16) = *(_QWORD *)(a1 + 120); *(_QWORD *)(a1 + 120) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = a1 + 96; while ( 1 ) { v25 = *(_QWORD *)(v24 + 32); if ( *(_DWORD *)(v24 + 64) == 5 ) { if ( (unsigned int)(v4 - 9) >= 0xFFFFFFFE ) { v27 = *(_QWORD *)(v24 + 8); **(_QWORD **)(v24 + 16) = v27; v28 = (_QWORD *)(v27 + 16); if ( !v27 ) v28 = (_QWORD *)(a1 + 120); *v28 = *(_QWORD *)(v24 + 16); **(_QWORD **)(a1 + 104) = v24; *(_QWORD *)(v24 + 16) = *(_QWORD *)(a1 + 104); *(_QWORD *)(a1 + 104) = v24 + 8; goto LABEL_64; } ++*(_DWORD *)(a1 + 168); } *(_QWORD *)(v24 + 32) = 0LL; v26 = *(_QWORD *)(v25 + 48); if ( v26 ) ((void ( *)(long long))PSI_server[46])(v26); pthread_cond_signal(v25); LABEL_64: v24 = *(_QWORD *)(v24 + 8); if ( !v24 ) goto LABEL_80; } } } return result; }
wake_up_waiters: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP qword ptr [RDI + 0x90],0x0 JZ 0x001a9b30 LAB_001a9b21: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a9b30: MOV RBX,RDI MOV R15,qword ptr [RDI + 0x80] CMP qword ptr [RDI + 0x70],0x0 JZ 0x001a9baa TEST R15,R15 JZ 0x001a9c7a MOV R13D,dword ptr [R15 + 0x40] CMP R13D,0x9 JG 0x001a9b21 LEA R14D,[R13 + -0x9] CMP R14D,-0x2 JC 0x001a9b67 CMP dword ptr [RBX + 0xa8],0x0 JNZ 0x001a9b21 LAB_001a9b67: CMP R13D,0x8 JNZ 0x001a9dd5 MOV RDI,qword ptr [R15 + 0x28] CALL qword ptr [RBX + 0xd8] TEST AL,AL JZ 0x001a9dd5 MOV dword ptr [R15 + 0x40],0xd CMP qword ptr [RBX + 0x60],0x0 JZ 0x001a9b21 MOV RDI,RBX XOR ESI,ESI ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x001ab14c LAB_001a9baa: TEST R15,R15 JZ 0x001a9cf1 CMP dword ptr [R15 + 0x40],0xb JNZ 0x001a9bd2 MOV RCX,qword ptr [RBX + 0x60] TEST RCX,RCX JZ 0x001a9bd2 MOV EAX,0xb CMP dword ptr [RCX + 0x40],0x3 JG 0x001a9f2c LAB_001a9bd2: MOV RAX,qword ptr [RBX + 0xa0] LEA RCX,[RAX + 0x1] MOV qword ptr [RBX + 0xa0],RCX LEA RCX,[0x490a38] CMP RAX,qword ptr [RCX] JBE 0x001a9d0a MOV qword ptr [RBX + 0xa0],0x0 MOV R12,qword ptr [RBX + 0x60] TEST R12,R12 JZ 0x001a9d0a LEA RAX,[RBX + 0x60] MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [RCX],R12 MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [R12 + 0x10],RCX MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [RBX + 0x78],RCX MOV qword ptr [RBX + 0x68],RAX LEA R15,[0x490ed8] LAB_001a9c33: MOV R14,qword ptr [R12 + 0x20] CMP dword ptr [R12 + 0x40],0x5 JNZ 0x001a9c46 INC dword ptr [RBX + 0xa8] LAB_001a9c46: MOV qword ptr [R12 + 0x20],0x0 MOV RDI,qword ptr [R14 + 0x30] TEST RDI,RDI JNZ 0x001a9c6f LAB_001a9c58: MOV RDI,R14 CALL 0x0012a5b0 MOV R12,qword ptr [R12 + 0x8] TEST R12,R12 JNZ 0x001a9c33 JMP 0x001a9fe8 LAB_001a9c6f: MOV RAX,qword ptr [R15] CALL qword ptr [RAX + 0x170] JMP 0x001a9c58 LAB_001a9c7a: MOV R15,qword ptr [RBX + 0x60] TEST R15,R15 JZ 0x001a9b21 LEA RAX,[RBX + 0x60] MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [RCX],R15 MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [R15 + 0x10],RCX MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [RBX + 0x78],RCX MOV qword ptr [RBX + 0x68],RAX LEA R12,[0x490ed8] LAB_001a9cad: MOV R14,qword ptr [R15 + 0x20] CMP dword ptr [R15 + 0x40],0x5 JNZ 0x001a9cbe INC dword ptr [RBX + 0xa8] LAB_001a9cbe: MOV qword ptr [R15 + 0x20],0x0 MOV RDI,qword ptr [R14 + 0x30] TEST RDI,RDI JNZ 0x001a9ce5 LAB_001a9ccf: MOV RDI,R14 CALL 0x0012a5b0 MOV R15,qword ptr [R15 + 0x8] TEST R15,R15 JNZ 0x001a9cad JMP 0x001a9fe8 LAB_001a9ce5: MOV RAX,qword ptr [R12] CALL qword ptr [RAX + 0x170] JMP 0x001a9ccf LAB_001a9cf1: MOV R15,qword ptr [RBX + 0x60] TEST R15,R15 JZ 0x001a9b21 LEA RCX,[RBX + 0x60] MOV R12B,0x1 JMP 0x001a9f47 LAB_001a9d0a: LEA R12,[RBX + 0x88] LEA R13,[0x490ed8] LAB_001a9d18: LEA RAX,[R15 + 0x8] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,qword ptr [R15 + 0x10] MOV qword ptr [RDX],RCX LEA RDX,[RCX + 0x10] TEST RCX,RCX MOV RCX,qword ptr [R15 + 0x10] CMOVZ RDX,R12 MOV qword ptr [RDX],RCX MOV RCX,qword ptr [RBX + 0x98] MOV qword ptr [RCX],R15 MOV RCX,qword ptr [RBX + 0x98] MOV qword ptr [R15 + 0x10],RCX MOV qword ptr [R15 + 0x8],0x0 MOV qword ptr [RBX + 0x98],RAX CMP dword ptr [R15 + 0x40],0x8 JNZ 0x001a9d7a MOV RDI,qword ptr [R15 + 0x28] CALL qword ptr [RBX + 0xd8] TEST AL,AL JZ 0x001a9d7a MOV dword ptr [R15 + 0x40],0xd LAB_001a9d7a: MOV R14,qword ptr [R15 + 0x20] MOV qword ptr [R15 + 0x20],0x0 MOV RDI,qword ptr [R14 + 0x30] TEST RDI,RDI JNZ 0x001a9dc9 LAB_001a9d8f: MOV RDI,R14 CALL 0x0012a5b0 MOV EAX,dword ptr [R15 + 0x40] CMP EAX,0x7 JNZ 0x001a9f23 MOV R15,qword ptr [RBX + 0x80] MOV EAX,0x7 TEST R15,R15 JZ 0x001a9f2c CMP dword ptr [R15 + 0x40],0x7 JZ 0x001a9d18 JMP 0x001a9f2c LAB_001a9dc9: MOV RAX,qword ptr [R13] CALL qword ptr [RAX + 0x170] JMP 0x001a9d8f LAB_001a9dd5: MOV dword ptr [RBP + -0x2c],R14D LEA R12,[RBX + 0x88] LAB_001a9de0: MOV R14,qword ptr [R15 + 0x20] LEA RAX,[R15 + 0x8] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,qword ptr [R15 + 0x10] MOV qword ptr [RDX],RCX LEA RDX,[RCX + 0x10] TEST RCX,RCX MOV RCX,qword ptr [R15 + 0x10] CMOVZ RDX,R12 MOV qword ptr [RDX],RCX MOV RCX,qword ptr [RBX + 0x98] MOV qword ptr [RCX],R15 MOV RCX,qword ptr [RBX + 0x98] MOV qword ptr [R15 + 0x10],RCX MOV qword ptr [RBX + 0x98],RAX XOR EAX,EAX MOV qword ptr [R15 + 0x8],RAX MOV qword ptr [R15 + 0x20],RAX MOV RDI,qword ptr [R14 + 0x30] TEST RDI,RDI JNZ 0x001a9e57 LAB_001a9e34: MOV RDI,R14 CALL 0x0012a5b0 CMP R13D,0x7 JNZ 0x001a9e69 MOV R15,qword ptr [RBX + 0x80] TEST R15,R15 JZ 0x001a9e69 CMP dword ptr [R15 + 0x40],0x7 JZ 0x001a9de0 JMP 0x001a9e69 LAB_001a9e57: LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x001a9e34 LAB_001a9e69: MOV R15,qword ptr [RBX + 0x60] TEST R15,R15 MOV R12D,dword ptr [RBP + -0x2c] JZ 0x001a9b21 LEA RAX,[RBX + 0x60] LEA R13,[RBX + 0x78] MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [RCX],R15 MOV RCX,qword ptr [RBX + 0x78] MOV qword ptr [R15 + 0x10],RCX MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [RBX + 0x78],RCX MOV qword ptr [RBX + 0x68],RAX LAB_001a9e9d: MOV R14,qword ptr [R15 + 0x20] CMP dword ptr [R15 + 0x40],0x5 JNZ 0x001a9eb4 CMP R12D,-0x2 JNC 0x001a9ecf INC dword ptr [RBX + 0xa8] LAB_001a9eb4: MOV qword ptr [R15 + 0x20],0x0 MOV RDI,qword ptr [R14 + 0x30] TEST RDI,RDI JNZ 0x001a9f11 LAB_001a9ec5: MOV RDI,R14 CALL 0x0012a5b0 JMP 0x001a9f03 LAB_001a9ecf: LEA RAX,[R15 + 0x8] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,qword ptr [R15 + 0x10] MOV qword ptr [RDX],RCX LEA RDX,[RCX + 0x10] TEST RCX,RCX MOV RCX,qword ptr [R15 + 0x10] CMOVZ RDX,R13 MOV qword ptr [RDX],RCX MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [RCX],R15 MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [R15 + 0x10],RCX MOV qword ptr [RBX + 0x68],RAX LAB_001a9f03: MOV R15,qword ptr [R15 + 0x8] TEST R15,R15 JNZ 0x001a9e9d JMP 0x001a9fe8 LAB_001a9f11: LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x001a9ec5 LAB_001a9f23: CMP EAX,0xa JG 0x001a9b21 LAB_001a9f2c: MOV R15,qword ptr [RBX + 0x60] TEST R15,R15 JZ 0x001a9b21 LEA RCX,[RBX + 0x60] ADD EAX,-0x9 CMP EAX,-0x2 SETC R12B LAB_001a9f47: LEA R13,[RBX + 0x78] MOV RAX,qword ptr [RBX + 0x78] MOV qword ptr [RAX],R15 MOV RAX,qword ptr [RBX + 0x78] MOV qword ptr [R15 + 0x10],RAX MOV RAX,qword ptr [RBX + 0x68] MOV qword ptr [RBX + 0x78],RAX MOV qword ptr [RBX + 0x68],RCX LAB_001a9f66: MOV R14,qword ptr [R15 + 0x20] CMP dword ptr [R15 + 0x40],0x5 JNZ 0x001a9f7c TEST R12B,R12B JZ 0x001a9f97 INC dword ptr [RBX + 0xa8] LAB_001a9f7c: MOV qword ptr [R15 + 0x20],0x0 MOV RDI,qword ptr [R14 + 0x30] TEST RDI,RDI JNZ 0x001a9fd6 LAB_001a9f8d: MOV RDI,R14 CALL 0x0012a5b0 JMP 0x001a9fcb LAB_001a9f97: LEA RAX,[R15 + 0x8] MOV RCX,qword ptr [R15 + 0x8] MOV RDX,qword ptr [R15 + 0x10] MOV qword ptr [RDX],RCX LEA RDX,[RCX + 0x10] TEST RCX,RCX MOV RCX,qword ptr [R15 + 0x10] CMOVZ RDX,R13 MOV qword ptr [RDX],RCX MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [RCX],R15 MOV RCX,qword ptr [RBX + 0x68] MOV qword ptr [R15 + 0x10],RCX MOV qword ptr [RBX + 0x68],RAX LAB_001a9fcb: MOV R15,qword ptr [R15 + 0x8] TEST R15,R15 JNZ 0x001a9f66 JMP 0x001a9fe8 LAB_001a9fd6: LEA RAX,[0x490ed8] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x170] JMP 0x001a9f8d LAB_001a9fe8: MOV RAX,qword ptr [RBX + 0x68] MOV qword ptr [RAX],0x0 CMP qword ptr [RBX + 0x60],0x0 JNZ 0x001a9b21 MOV qword ptr [RBX + 0xa0],0x0 JMP 0x001a9b21
void wake_up_waiters(long param_1) { ulong uVar1; pthread_cond_t *ppVar2; char cVar3; int iVar4; int8 *puVar5; long lVar6; long lVar7; bool bVar8; if (*(long *)(param_1 + 0x90) != 0) { return; } lVar7 = *(long *)(param_1 + 0x80); if (*(long *)(param_1 + 0x70) == 0) { if (lVar7 == 0) { lVar7 = *(long *)(param_1 + 0x60); if (lVar7 == 0) { return; } bVar8 = true; } else { if (((*(int *)(lVar7 + 0x40) != 0xb) || (*(long *)(param_1 + 0x60) == 0)) || (iVar4 = 0xb, *(int *)(*(long *)(param_1 + 0x60) + 0x40) < 4)) { uVar1 = *(ulong *)(param_1 + 0xa0); *(ulong *)(param_1 + 0xa0) = uVar1 + 1; if (max_write_lock_count < uVar1) { *(int8 *)(param_1 + 0xa0) = 0; lVar6 = *(long *)(param_1 + 0x60); if (lVar6 != 0) { **(long **)(param_1 + 0x78) = lVar6; *(int8 *)(lVar6 + 0x10) = *(int8 *)(param_1 + 0x78); *(int8 *)(param_1 + 0x78) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = param_1 + 0x60; do { ppVar2 = *(pthread_cond_t **)(lVar6 + 0x20); if (*(int *)(lVar6 + 0x40) == 5) { *(int *)(param_1 + 0xa8) = *(int *)(param_1 + 0xa8) + 1; } *(int8 *)(lVar6 + 0x20) = 0; if (ppVar2[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar2); lVar6 = *(long *)(lVar6 + 8); } while (lVar6 != 0); goto LAB_001a9fe8; } } while( true ) { lVar6 = *(long *)(lVar7 + 8); **(long **)(lVar7 + 0x10) = lVar6; puVar5 = (int8 *)(lVar6 + 0x10); if (lVar6 == 0) { puVar5 = (int8 *)(param_1 + 0x88); } *puVar5 = *(int8 *)(lVar7 + 0x10); **(long **)(param_1 + 0x98) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x98); *(int8 *)(lVar7 + 8) = 0; *(long *)(param_1 + 0x98) = lVar7 + 8; if ((*(int *)(lVar7 + 0x40) == 8) && (cVar3 = (**(code **)(param_1 + 0xd8))(*(int8 *)(lVar7 + 0x28)), cVar3 != '\0')) { *(int4 *)(lVar7 + 0x40) = 0xd; } ppVar2 = *(pthread_cond_t **)(lVar7 + 0x20); *(int8 *)(lVar7 + 0x20) = 0; if (ppVar2[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar2); iVar4 = *(int *)(lVar7 + 0x40); if (iVar4 != 7) break; lVar7 = *(long *)(param_1 + 0x80); iVar4 = 7; if ((lVar7 == 0) || (*(int *)(lVar7 + 0x40) != 7)) goto LAB_001a9f2c; } if (10 < iVar4) { return; } } LAB_001a9f2c: lVar7 = *(long *)(param_1 + 0x60); if (lVar7 == 0) { return; } bVar8 = iVar4 - 9U < 0xfffffffe; } **(long **)(param_1 + 0x78) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x78); *(int8 *)(param_1 + 0x78) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = param_1 + 0x60; do { ppVar2 = *(pthread_cond_t **)(lVar7 + 0x20); if (*(int *)(lVar7 + 0x40) == 5) { if (bVar8) { *(int *)(param_1 + 0xa8) = *(int *)(param_1 + 0xa8) + 1; goto LAB_001a9f7c; } lVar6 = *(long *)(lVar7 + 8); **(long **)(lVar7 + 0x10) = lVar6; puVar5 = (int8 *)(lVar6 + 0x10); if (lVar6 == 0) { puVar5 = (int8 *)(param_1 + 0x78); } *puVar5 = *(int8 *)(lVar7 + 0x10); **(long **)(param_1 + 0x68) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = lVar7 + 8; } else { LAB_001a9f7c: *(int8 *)(lVar7 + 0x20) = 0; if (ppVar2[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar2); } lVar7 = *(long *)(lVar7 + 8); } while (lVar7 != 0); } else if (lVar7 == 0) { lVar7 = *(long *)(param_1 + 0x60); if (lVar7 == 0) { return; } **(long **)(param_1 + 0x78) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x78); *(int8 *)(param_1 + 0x78) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = param_1 + 0x60; do { ppVar2 = *(pthread_cond_t **)(lVar7 + 0x20); if (*(int *)(lVar7 + 0x40) == 5) { *(int *)(param_1 + 0xa8) = *(int *)(param_1 + 0xa8) + 1; } *(int8 *)(lVar7 + 0x20) = 0; if (ppVar2[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar2); lVar7 = *(long *)(lVar7 + 8); } while (lVar7 != 0); } else { iVar4 = *(int *)(lVar7 + 0x40); if (9 < iVar4) { return; } if ((0xfffffffd < iVar4 - 9U) && (*(int *)(param_1 + 0xa8) != 0)) { return; } if ((iVar4 == 8) && (cVar3 = (**(code **)(param_1 + 0xd8))(*(int8 *)(lVar7 + 0x28)), cVar3 != '\0')) { *(int4 *)(lVar7 + 0x40) = 0xd; if (*(long *)(param_1 + 0x60) == 0) { return; } free_all_read_locks(param_1,0); return; } do { ppVar2 = *(pthread_cond_t **)(lVar7 + 0x20); lVar6 = *(long *)(lVar7 + 8); **(long **)(lVar7 + 0x10) = lVar6; puVar5 = (int8 *)(lVar6 + 0x10); if (lVar6 == 0) { puVar5 = (int8 *)(param_1 + 0x88); } *puVar5 = *(int8 *)(lVar7 + 0x10); **(long **)(param_1 + 0x98) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x98); *(long *)(param_1 + 0x98) = lVar7 + 8; *(int8 *)(lVar7 + 8) = 0; *(int8 *)(lVar7 + 0x20) = 0; if (ppVar2[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar2); } while (((iVar4 == 7) && (lVar7 = *(long *)(param_1 + 0x80), lVar7 != 0)) && (*(int *)(lVar7 + 0x40) == 7)); lVar7 = *(long *)(param_1 + 0x60); if (lVar7 == 0) { return; } **(long **)(param_1 + 0x78) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x78); *(int8 *)(param_1 + 0x78) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = param_1 + 0x60; do { ppVar2 = *(pthread_cond_t **)(lVar7 + 0x20); if (*(int *)(lVar7 + 0x40) == 5) { if (iVar4 - 9U < 0xfffffffe) { *(int *)(param_1 + 0xa8) = *(int *)(param_1 + 0xa8) + 1; goto LAB_001a9eb4; } lVar6 = *(long *)(lVar7 + 8); **(long **)(lVar7 + 0x10) = lVar6; puVar5 = (int8 *)(lVar6 + 0x10); if (lVar6 == 0) { puVar5 = (int8 *)(param_1 + 0x78); } *puVar5 = *(int8 *)(lVar7 + 0x10); **(long **)(param_1 + 0x68) = lVar7; *(int8 *)(lVar7 + 0x10) = *(int8 *)(param_1 + 0x68); *(long *)(param_1 + 0x68) = lVar7 + 8; } else { LAB_001a9eb4: *(int8 *)(lVar7 + 0x20) = 0; if (ppVar2[1].__align != 0) { (**(code **)(PSI_server + 0x170))(); } pthread_cond_signal(ppVar2); } lVar7 = *(long *)(lVar7 + 8); } while (lVar7 != 0); } LAB_001a9fe8: **(int8 **)(param_1 + 0x68) = 0; if (*(long *)(param_1 + 0x60) == 0) { *(int8 *)(param_1 + 0xa0) = 0; } return; }
13,487
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool)
monkey531[P]llama/common/sampling.cpp
std::vector<llama_token> common_sampler_sample_and_accept_n(struct common_sampler * gsmpl, struct llama_context * ctx, const std::vector<int> & idxs, const llama_tokens & draft, bool grammar_first) { GGML_ASSERT(idxs.size() == draft.size() + 1 && "idxs.size() must be draft.size() + 1"); std::vector<llama_token> result; result.reserve(idxs.size()); size_t i = 0; for (; i < draft.size(); i++) { const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first); common_sampler_accept(gsmpl, id, true); result.push_back(id); if (draft[i] != id) { break; } } if (i == draft.size()) { const llama_token id = common_sampler_sample(gsmpl, ctx, idxs[i], grammar_first); common_sampler_accept(gsmpl, id, true); result.push_back(id); } return result; }
O0
cpp
common_sampler_sample_and_accept_n(common_sampler*, llama_context*, std::vector<int, std::allocator<int>> const&, std::vector<int, std::allocator<int>> const&, bool): subq $0xa8, %rsp movq %rdi, 0x40(%rsp) movb %r9b, %al movq %rdi, %r9 movq %r9, 0x48(%rsp) movq %rdi, 0xa0(%rsp) movq %rsi, 0x98(%rsp) movq %rdx, 0x90(%rsp) movq %rcx, 0x88(%rsp) movq %r8, 0x80(%rsp) andb $0x1, %al movb %al, 0x7f(%rsp) movq 0x88(%rsp), %rdi callq 0x97ce0 movq %rax, 0x50(%rsp) movq 0x80(%rsp), %rdi callq 0x97ce0 movq %rax, %rcx movq 0x50(%rsp), %rax addq $0x1, %rcx cmpq %rcx, %rax je 0x1ca436 leaq 0x52a49(%rip), %rdi # 0x21ce65 movl $0x155, %esi # imm = 0x155 leaq 0x49276(%rip), %rdx # 0x21369e leaq 0x52bc3(%rip), %rcx # 0x21cff2 movb $0x0, %al callq 0x5c070 movq 0x40(%rsp), %rdi movb $0x0, 0x7e(%rsp) callq 0x63a90 movq 0x88(%rsp), %rdi callq 0x97ce0 movq 0x40(%rsp), %rdi movq %rax, %rsi callq 0x1cc4f0 jmp 0x1ca461 movq $0x0, 0x60(%rsp) movq 0x60(%rsp), %rax movq %rax, 0x38(%rsp) movq 0x80(%rsp), %rdi callq 0x97ce0 movq %rax, %rcx movq 0x38(%rsp), %rax cmpq %rcx, %rax jae 0x1ca55c movq 0x98(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x90(%rsp), %rax movq %rax, 0x28(%rsp) movq 0x88(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0xecf20 movq 0x20(%rsp), %rdi movq 0x28(%rsp), %rsi movl (%rax), %edx movzbl 0x7f(%rsp), %ecx andl $0x1, %ecx callq 0x1ca1a0 movl %eax, 0x34(%rsp) jmp 0x1ca4dd movl 0x34(%rsp), %eax movl %eax, 0x5c(%rsp) movq 0x98(%rsp), %rdi movl 0x5c(%rsp), %esi movl $0x1, %edx callq 0x1c9f30 jmp 0x1ca4fd movq 0x40(%rsp), %rdi leaq 0x5c(%rsp), %rsi callq 0xef4e0 jmp 0x1ca50e movq 0x80(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0xecf20 movl (%rax), %eax cmpl 0x5c(%rsp), %eax je 0x1ca547 jmp 0x1ca55c movq 0x40(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x70(%rsp) movl %eax, 0x6c(%rsp) callq 0x63b00 jmp 0x1ca61f jmp 0x1ca549 movq 0x60(%rsp), %rax addq $0x1, %rax movq %rax, 0x60(%rsp) jmp 0x1ca46a movq 0x60(%rsp), %rax movq %rax, 0x18(%rsp) movq 0x80(%rsp), %rdi callq 0x97ce0 movq %rax, %rcx movq 0x18(%rsp), %rax cmpq %rcx, %rax jne 0x1ca5fc movq 0x98(%rsp), %rax movq %rax, (%rsp) movq 0x90(%rsp), %rax movq %rax, 0x8(%rsp) movq 0x88(%rsp), %rdi movq 0x60(%rsp), %rsi callq 0xecf20 movq (%rsp), %rdi movq 0x8(%rsp), %rsi movl (%rax), %edx movzbl 0x7f(%rsp), %ecx andl $0x1, %ecx callq 0x1ca1a0 movl %eax, 0x14(%rsp) jmp 0x1ca5c9 movl 0x14(%rsp), %eax movl %eax, 0x58(%rsp) movq 0x98(%rsp), %rdi movl 0x58(%rsp), %esi movl $0x1, %edx callq 0x1c9f30 jmp 0x1ca5e9 movq 0x40(%rsp), %rdi leaq 0x58(%rsp), %rsi callq 0xef4e0 jmp 0x1ca5fa jmp 0x1ca5fc movb $0x1, 0x7e(%rsp) testb $0x1, 0x7e(%rsp) jne 0x1ca612 movq 0x40(%rsp), %rdi callq 0x63b00 movq 0x48(%rsp), %rax addq $0xa8, %rsp retq movq 0x70(%rsp), %rdi callq 0x5bd10 nopl (%rax)
_Z34common_sampler_sample_and_accept_nP14common_samplerP13llama_contextRKSt6vectorIiSaIiEES7_b: sub rsp, 0A8h mov [rsp+0A8h+var_68], rdi mov al, r9b mov r9, rdi mov [rsp+0A8h+var_60], r9 mov [rsp+0A8h+var_8], rdi mov [rsp+0A8h+var_10], rsi mov [rsp+0A8h+var_18], rdx mov [rsp+0A8h+var_20], rcx mov [rsp+0A8h+var_28], r8 and al, 1 mov [rsp+0A8h+var_29], al mov rdi, [rsp+0A8h+var_20] call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov [rsp+0A8h+var_58], rax mov rdi, [rsp+0A8h+var_28] call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov rcx, rax mov rax, [rsp+0A8h+var_58] add rcx, 1 cmp rax, rcx jz short loc_1CA436 lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... mov esi, 155h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aIdxsSizeDraftS; "idxs.size() == draft.size() + 1 && \"id"... mov al, 0 call _ggml_abort loc_1CA436: mov rdi, [rsp+0A8h+var_68] mov [rsp+0A8h+var_2A], 0 call _ZNSt6vectorIiSaIiEEC2Ev; std::vector<int>::vector(void) mov rdi, [rsp+0A8h+var_20] call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov rdi, [rsp+0A8h+var_68] mov rsi, rax call _ZNSt6vectorIiSaIiEE7reserveEm; std::vector<int>::reserve(ulong) jmp short $+2 loc_1CA461: mov [rsp+0A8h+var_48], 0 loc_1CA46A: mov rax, [rsp+0A8h+var_48] mov [rsp+0A8h+var_70], rax mov rdi, [rsp+0A8h+var_28] call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov rcx, rax mov rax, [rsp+0A8h+var_70] cmp rax, rcx jnb loc_1CA55C mov rax, [rsp+0A8h+var_10] mov [rsp+0A8h+var_88], rax mov rax, [rsp+0A8h+var_18] mov [rsp+0A8h+var_80], rax mov rdi, [rsp+0A8h+var_20] mov rsi, [rsp+0A8h+var_48] call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong) mov rdi, [rsp+0A8h+var_88] mov rsi, [rsp+0A8h+var_80] mov edx, [rax] movzx ecx, [rsp+0A8h+var_29] and ecx, 1 call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool) mov [rsp+0A8h+var_74], eax jmp short $+2 loc_1CA4DD: mov eax, [rsp+0A8h+var_74] mov [rsp+0A8h+var_4C], eax mov rdi, [rsp+0A8h+var_10] mov esi, [rsp+0A8h+var_4C] mov edx, 1 call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool) jmp short $+2 loc_1CA4FD: mov rdi, [rsp+0A8h+var_68] lea rsi, [rsp+0A8h+var_4C] call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) jmp short $+2 loc_1CA50E: mov rdi, [rsp+0A8h+var_28] mov rsi, [rsp+0A8h+var_48] call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong) mov eax, [rax] cmp eax, [rsp+0A8h+var_4C] jz short loc_1CA547 jmp short loc_1CA55C mov rdi, [rsp+arg_38] mov rcx, rax mov eax, edx mov [rsp+arg_68], rcx mov [rsp+arg_64], eax call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() jmp loc_1CA61F loc_1CA547: jmp short $+2 loc_1CA549: mov rax, [rsp+0A8h+var_48] add rax, 1 mov [rsp+0A8h+var_48], rax jmp loc_1CA46A loc_1CA55C: mov rax, [rsp+0A8h+var_48] mov [rsp+0A8h+var_90], rax mov rdi, [rsp+0A8h+var_28] call _ZNKSt6vectorIiSaIiEE4sizeEv; std::vector<int>::size(void) mov rcx, rax mov rax, [rsp+0A8h+var_90] cmp rax, rcx jnz short loc_1CA5FC mov rax, [rsp+0A8h+var_10] mov [rsp+0A8h+var_A8], rax mov rax, [rsp+0A8h+var_18] mov [rsp+0A8h+var_A0], rax mov rdi, [rsp+0A8h+var_20] mov rsi, [rsp+0A8h+var_48] call _ZNKSt6vectorIiSaIiEEixEm; std::vector<int>::operator[](ulong) mov rdi, [rsp+0A8h+var_A8] mov rsi, [rsp+0A8h+var_A0] mov edx, [rax] movzx ecx, [rsp+0A8h+var_29] and ecx, 1 call _Z21common_sampler_sampleP14common_samplerP13llama_contextib; common_sampler_sample(common_sampler *,llama_context *,int,bool) mov [rsp+0A8h+var_94], eax jmp short $+2 loc_1CA5C9: mov eax, [rsp+0A8h+var_94] mov [rsp+0A8h+var_50], eax mov rdi, [rsp+0A8h+var_10] mov esi, [rsp+0A8h+var_50] mov edx, 1 call _Z21common_sampler_acceptP14common_samplerib; common_sampler_accept(common_sampler *,int,bool) jmp short $+2 loc_1CA5E9: mov rdi, [rsp+0A8h+var_68] lea rsi, [rsp+0A8h+var_50] call _ZNSt6vectorIiSaIiEE9push_backERKi; std::vector<int>::push_back(int const&) jmp short $+2 loc_1CA5FA: jmp short $+2 loc_1CA5FC: mov [rsp+0A8h+var_2A], 1 test [rsp+0A8h+var_2A], 1 jnz short loc_1CA612 mov rdi, [rsp+0A8h+var_68] call _ZNSt6vectorIiSaIiEED2Ev; std::vector<int>::~vector() loc_1CA612: mov rax, [rsp+0A8h+var_60] add rsp, 0A8h retn loc_1CA61F: mov rdi, [rsp+arg_68] call __Unwind_Resume
long long common_sampler_sample_and_accept_n( long long a1, common_sampler *a2, long long a3, _QWORD *a4, _QWORD *a5, char a6) { long long v6; // rax unsigned int *v7; // rax _DWORD *v8; // rax unsigned int *v9; // rax common_sampler *v11; // [rsp+0h] [rbp-A8h] long long v12; // [rsp+8h] [rbp-A0h] long long v13; // [rsp+18h] [rbp-90h] common_sampler *v14; // [rsp+20h] [rbp-88h] long long v15; // [rsp+28h] [rbp-80h] unsigned long long v16; // [rsp+38h] [rbp-70h] long long v17; // [rsp+50h] [rbp-58h] unsigned int v18; // [rsp+58h] [rbp-50h] BYREF unsigned int v19; // [rsp+5Ch] [rbp-4Ch] BYREF unsigned long long i; // [rsp+60h] [rbp-48h] char v21; // [rsp+7Eh] [rbp-2Ah] char v22; // [rsp+7Fh] [rbp-29h] _QWORD *v23; // [rsp+80h] [rbp-28h] _QWORD *v24; // [rsp+88h] [rbp-20h] long long v25; // [rsp+90h] [rbp-18h] common_sampler *v26; // [rsp+98h] [rbp-10h] long long v27; // [rsp+A0h] [rbp-8h] v27 = a1; v26 = a2; v25 = a3; v24 = a4; v23 = a5; v22 = a6 & 1; v17 = std::vector<int>::size(a4); if ( v17 != std::vector<int>::size(v23) + 1 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp", 341LL, "GGML_ASSERT(%s) failed", "idxs.size() == draft.size() + 1 && \"idxs.size() must be draft.size() + 1\""); v21 = 0; std::vector<int>::vector(a1); v6 = std::vector<int>::size(v24); std::vector<int>::reserve(a1, v6); for ( i = 0LL; ; ++i ) { v16 = i; if ( v16 >= std::vector<int>::size(v23) ) break; v14 = v26; v15 = v25; v7 = (unsigned int *)std::vector<int>::operator[](v24, i); v19 = common_sampler_sample(v14, v15, *v7, v22 & 1); common_sampler_accept(v26, v19, 1); std::vector<int>::push_back(a1, (long long)&v19); v8 = (_DWORD *)std::vector<int>::operator[](v23, i); if ( *v8 != v19 ) break; } v13 = i; if ( v13 == std::vector<int>::size(v23) ) { v11 = v26; v12 = v25; v9 = (unsigned int *)std::vector<int>::operator[](v24, i); v18 = common_sampler_sample(v11, v12, *v9, v22 & 1); common_sampler_accept(v26, v18, 1); std::vector<int>::push_back(a1, (long long)&v18); } return a1; }
function: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RDI XOR ESI,ESI MOV EDX,0x18 CALL 0x0015b590 MOV RDI,qword ptr [RSP + 0x8] CALL 0x001aa080 MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x18],0x0 ADD RSP,0x18 RET
/* std::function<bool (char)>::function() */ void __thiscall std::function<bool(char)>::function(function<bool(char)> *this) { memset(this,0,0x18); _Function_base::_Function_base((_Function_base *)this); *(int8 *)(this + 0x18) = 0; return; }
13,488
convert_index_to_disk_format
eloqsql/storage/maria/s3_func.c
static void convert_index_to_disk_format(uchar *header) { MARIA_STATE_INFO state; uchar *base_pos; uint base_offset; memcpy(state.header.file_version, header, sizeof(state.header)); base_offset= mi_uint2korr(state.header.base_pos); base_pos= header + base_offset; base_pos[107]= 0; mi_int3store(base_pos+119, 0); }
O0
c
convert_index_to_disk_format: pushq %rbp movq %rsp, %rbp subq $0x1e0, %rsp # imm = 0x1E0 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x1c8(%rbp) movq -0x1c8(%rbp), %rax movq 0x10(%rax), %rcx movq %rcx, -0x1b0(%rbp) movups (%rax), %xmm0 movaps %xmm0, -0x1c0(%rbp) movw -0x1b4(%rbp), %ax rolw $0x8, %ax movzwl %ax, %eax movl %eax, -0x1d4(%rbp) movq -0x1c8(%rbp), %rax movl -0x1d4(%rbp), %ecx addq %rcx, %rax movq %rax, -0x1d0(%rbp) movq -0x1d0(%rbp), %rax movb $0x0, 0x6b(%rax) movq $0x0, -0x1e0(%rbp) movb -0x1e0(%rbp), %cl movq -0x1d0(%rbp), %rax movb %cl, 0x79(%rax) movb -0x1df(%rbp), %cl movq -0x1d0(%rbp), %rax movb %cl, 0x78(%rax) movb -0x1de(%rbp), %cl movq -0x1d0(%rbp), %rax movb %cl, 0x77(%rax) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2aa67 addq $0x1e0, %rsp # imm = 0x1E0 popq %rbp retq callq 0x272b0 nopl (%rax)
convert_index_to_disk_format: push rbp mov rbp, rsp sub rsp, 1E0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_1C8], rdi mov rax, [rbp+var_1C8] mov rcx, [rax+10h] mov [rbp+var_1B0], rcx movups xmm0, xmmword ptr [rax] movaps [rbp+var_1C0], xmm0 mov ax, word ptr [rbp+var_1C0+0Ch] rol ax, 8 movzx eax, ax mov [rbp+var_1D4], eax mov rax, [rbp+var_1C8] mov ecx, [rbp+var_1D4] add rax, rcx mov [rbp+var_1D0], rax mov rax, [rbp+var_1D0] mov byte ptr [rax+6Bh], 0 mov [rbp+var_1E0], 0 mov cl, byte ptr [rbp+var_1E0] mov rax, [rbp+var_1D0] mov [rax+79h], cl mov cl, byte ptr [rbp+var_1E0+1] mov rax, [rbp+var_1D0] mov [rax+78h], cl mov cl, byte ptr [rbp+var_1E0+2] mov rax, [rbp+var_1D0] mov [rax+77h], cl mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2AA67 add rsp, 1E0h pop rbp retn loc_2AA67: call ___stack_chk_fail
unsigned long long convert_index_to_disk_format(_OWORD *a1) { _BYTE *v2; // [rsp+10h] [rbp-1D0h] v2 = (char *)a1 + (unsigned __int16)__ROL2__(WORD6(*a1), 8); v2[107] = 0; v2[121] = 0; v2[120] = 0; v2[119] = 0; return __readfsqword(0x28u); }
convert_index_to_disk_format: PUSH RBP MOV RBP,RSP SUB RSP,0x1e0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x1c8],RDI MOV RAX,qword ptr [RBP + -0x1c8] MOV RCX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x1b0],RCX MOVUPS XMM0,xmmword ptr [RAX] MOVAPS xmmword ptr [RBP + -0x1c0],XMM0 MOV AX,word ptr [RBP + -0x1b4] ROL AX,0x8 MOVZX EAX,AX MOV dword ptr [RBP + -0x1d4],EAX MOV RAX,qword ptr [RBP + -0x1c8] MOV ECX,dword ptr [RBP + -0x1d4] ADD RAX,RCX MOV qword ptr [RBP + -0x1d0],RAX MOV RAX,qword ptr [RBP + -0x1d0] MOV byte ptr [RAX + 0x6b],0x0 MOV qword ptr [RBP + -0x1e0],0x0 MOV CL,byte ptr [RBP + -0x1e0] MOV RAX,qword ptr [RBP + -0x1d0] MOV byte ptr [RAX + 0x79],CL MOV CL,byte ptr [RBP + -0x1df] MOV RAX,qword ptr [RBP + -0x1d0] MOV byte ptr [RAX + 0x78],CL MOV CL,byte ptr [RBP + -0x1de] MOV RAX,qword ptr [RBP + -0x1d0] MOV byte ptr [RAX + 0x77],CL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012aa67 ADD RSP,0x1e0 POP RBP RET LAB_0012aa67: CALL 0x001272b0
void convert_index_to_disk_format(long param_1) { long lVar1; long in_FS_OFFSET; int2 uStack_1bc; lVar1 = *(long *)(in_FS_OFFSET + 0x28); uStack_1bc = (ushort)*(int4 *)(param_1 + 0xc); param_1 = param_1 + (ulong)(ushort)(uStack_1bc << 8 | uStack_1bc >> 8); *(int1 *)(param_1 + 0x6b) = 0; *(int1 *)(param_1 + 0x79) = 0; *(int1 *)(param_1 + 0x78) = 0; *(int1 *)(param_1 + 0x77) = 0; if (*(long *)(in_FS_OFFSET + 0x28) == lVar1) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
13,489
delete_head_or_tail
eloqsql/storage/maria/ma_blockrec.c
static my_bool delete_head_or_tail(MARIA_HA *info, pgcache_page_no_t page, uint record_number, my_bool head, my_bool from_update) { MARIA_SHARE *share= info->s; uint empty_space; int res; my_bool page_is_empty; uchar *buff; LSN lsn; MARIA_PINNED_PAGE page_link; enum pagecache_page_lock lock_at_write, lock_at_unpin; DBUG_ENTER("delete_head_or_tail"); DBUG_PRINT("enter", ("id: %lu (%lu:%u)", (ulong) ma_recordpos(page, record_number), (ulong) page, record_number)); buff= pagecache_read(share->pagecache, &info->dfile, page, 0, 0, share->page_type, PAGECACHE_LOCK_WRITE, &page_link.link); page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; page_link.changed= buff != 0; push_dynamic(&info->pinned_pages, (void*) &page_link); if (!buff) { _ma_set_fatal_error(info, my_errno); DBUG_RETURN(1); } DBUG_ASSERT((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == (head ? HEAD_PAGE : TAIL_PAGE)); if (from_update) { lock_at_write= PAGECACHE_LOCK_LEFT_WRITELOCKED; lock_at_unpin= PAGECACHE_LOCK_WRITE_UNLOCK; } else { lock_at_write= PAGECACHE_LOCK_WRITE_TO_READ; lock_at_unpin= PAGECACHE_LOCK_READ_UNLOCK; } res= delete_dir_entry(share, buff, record_number, &empty_space); if (res < 0) DBUG_RETURN(1); if (res == 0) /* after our deletion, page is still not empty */ { uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE + DIRPOS_STORE_SIZE]; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; page_is_empty= 0; if (share->now_transactional) { /* Log REDO data */ page_store(log_data + FILEID_STORE_SIZE, page); dirpos_store(log_data + FILEID_STORE_SIZE + PAGE_STORE_SIZE, record_number); log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); if (translog_write_record(&lsn, (head ? LOGREC_REDO_PURGE_ROW_HEAD : LOGREC_REDO_PURGE_ROW_TAIL), info->trn, info, (translog_size_t) sizeof(log_data), TRANSLOG_INTERNAL_PARTS + 1, log_array, log_data, NULL)) DBUG_RETURN(1); } } else /* page is now empty */ { page_is_empty= 1; if (share->now_transactional) { uchar log_data[FILEID_STORE_SIZE + PAGE_STORE_SIZE]; LEX_CUSTRING log_array[TRANSLOG_INTERNAL_PARTS + 1]; page_store(log_data + FILEID_STORE_SIZE, page); log_array[TRANSLOG_INTERNAL_PARTS + 0].str= log_data; log_array[TRANSLOG_INTERNAL_PARTS + 0].length= sizeof(log_data); if (translog_write_record(&lsn, LOGREC_REDO_FREE_HEAD_OR_TAIL, info->trn, info, (translog_size_t) sizeof(log_data), TRANSLOG_INTERNAL_PARTS + 1, log_array, log_data, NULL)) DBUG_RETURN(1); } /* Mark that this page must be written to disk by page cache, even if we could call pagecache_delete() on it. This is needed to ensure that repair finds the empty page on disk and not old data. */ pagecache_set_write_on_delete_by_link(page_link.link); DBUG_ASSERT(empty_space >= share->bitmap.sizes[0]); } pagecache_unlock_by_link(share->pagecache, page_link.link, lock_at_write, PAGECACHE_PIN_LEFT_PINNED, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 1, FALSE); page_link.unlock= lock_at_unpin; set_dynamic(&info->pinned_pages, (void*) &page_link, info->pinned_pages.elements-1); DBUG_PRINT("info", ("empty_space: %u", empty_space)); /* If there is not enough space for all possible tails, mark the page full */ if (!head && !page_is_empty && !enough_free_entries(buff, share->block_size, 1 + share->base.blobs)) empty_space= 0; DBUG_RETURN(_ma_bitmap_set(info, page, head, empty_space)); }
O0
c
delete_head_or_tail: pushq %rbp movq %rsp, %rbp subq $0x120, %rsp # imm = 0x120 movb %r8b, %al movq %fs:0x28, %r8 movq %r8, -0x8(%rbp) movq %rdi, -0x20(%rbp) movq %rsi, -0x28(%rbp) movl %edx, -0x2c(%rbp) movb %cl, -0x2d(%rbp) movb %al, -0x2e(%rbp) movq -0x20(%rbp), %rax movq (%rax), %rax movq %rax, -0x38(%rbp) jmp 0x52269 movq -0x38(%rbp), %rax movq 0x600(%rax), %rdi movq -0x20(%rbp), %rsi addq $0x470, %rsi # imm = 0x470 movq -0x28(%rbp), %rdx movq -0x38(%rbp), %rax movl 0x7d4(%rax), %r9d leaq -0x70(%rbp), %rax xorl %ecx, %ecx xorl %r8d, %r8d movl $0x4, (%rsp) movq %rax, 0x8(%rsp) callq 0x96df0 movq %rax, -0x50(%rbp) movl $0x6, -0x68(%rbp) cmpq $0x0, -0x50(%rbp) setne %al andb $0x1, %al movzbl %al, %eax movb %al, -0x60(%rbp) movq -0x20(%rbp), %rdi addq $0x2e8, %rdi # imm = 0x2E8 leaq -0x70(%rbp), %rsi callq 0xdd8b0 cmpq $0x0, -0x50(%rbp) jne 0x52305 movq -0x20(%rbp), %rax movq %rax, -0x100(%rbp) callq 0xfc990 movq -0x100(%rbp), %rdi movl (%rax), %esi callq 0x37c10 movb $0x1, -0x18(%rbp) jmp 0x5259d jmp 0x52307 jmp 0x52309 cmpb $0x0, -0x2e(%rbp) je 0x5231f movl $0x2, -0x74(%rbp) movl $0x6, -0x78(%rbp) jmp 0x5232d movl $0x7, -0x74(%rbp) movl $0x5, -0x78(%rbp) movq -0x38(%rbp), %rdi movq -0x50(%rbp), %rsi movl -0x2c(%rbp), %edx leaq -0x3c(%rbp), %rcx callq 0x57080 movl %eax, -0x40(%rbp) cmpl $0x0, -0x40(%rbp) jge 0x52355 jmp 0x5234c movb $0x1, -0x18(%rbp) jmp 0x5259d cmpl $0x0, -0x40(%rbp) jne 0x5242f movb $0x0, -0x41(%rbp) movq -0x38(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x5242a jmp 0x52376 leaq -0x10(%rbp), %rax addq $0x2, %rax movq %rax, -0xb8(%rbp) movq -0x28(%rbp), %rax movl %eax, %ecx movq -0xb8(%rbp), %rax movl %ecx, (%rax) movq -0x28(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xb8(%rbp), %rax movb %cl, 0x4(%rax) movl -0x2c(%rbp), %eax movb %al, -0x9(%rbp) leaq -0x10(%rbp), %rax movq %rax, -0x90(%rbp) movq $0x8, -0x88(%rbp) movsbl -0x2d(%rbp), %ecx movl $0x7, %esi movl $0x6, %eax cmpl $0x0, %ecx cmovnel %eax, %esi movq -0x20(%rbp), %rax movq 0x8(%rax), %rdx movq -0x20(%rbp), %rcx leaq -0xb0(%rbp), %r10 leaq -0x10(%rbp), %rax leaq -0x58(%rbp), %rdi movl $0x8, %r8d movl $0x3, %r9d xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x8bc40 cmpb $0x0, %al je 0x52428 jmp 0x5241f movb $0x1, -0x18(%rbp) jmp 0x5259d jmp 0x5242a jmp 0x524f2 movb $0x1, -0x41(%rbp) movq -0x38(%rbp), %rax cmpb $0x0, 0x7e7(%rax) je 0x524e5 jmp 0x52446 leaq -0x17(%rbp), %rax addq $0x2, %rax movq %rax, -0xf8(%rbp) movq -0x28(%rbp), %rax movl %eax, %ecx movq -0xf8(%rbp), %rax movl %ecx, (%rax) movq -0x28(%rbp), %rax shrq $0x20, %rax movb %al, %cl movq -0xf8(%rbp), %rax movb %cl, 0x4(%rax) leaq -0x17(%rbp), %rax movq %rax, -0xd0(%rbp) movq $0x7, -0xc8(%rbp) movq -0x20(%rbp), %rax movq 0x8(%rax), %rdx movq -0x20(%rbp), %rcx leaq -0xf0(%rbp), %r10 leaq -0x17(%rbp), %rax leaq -0x58(%rbp), %rdi movl $0x9, %esi movl $0x7, %r8d movl $0x3, %r9d xorl %r11d, %r11d movq %r10, (%rsp) movq %rax, 0x8(%rsp) movq $0x0, 0x10(%rsp) callq 0x8bc40 cmpb $0x0, %al je 0x524e3 jmp 0x524da movb $0x1, -0x18(%rbp) jmp 0x5259d jmp 0x524e5 movq -0x70(%rbp), %rdi callq 0x97da0 jmp 0x524f0 jmp 0x524f2 movq -0x38(%rbp), %rax movq 0x600(%rax), %rdi movq -0x70(%rbp), %rsi movl -0x74(%rbp), %edx xorl %ecx, %ecx xorl %eax, %eax movl %eax, %r9d movq %r9, %r8 movl $0x1, (%rsp) movl $0x0, 0x8(%rsp) callq 0x96b90 movl -0x78(%rbp), %eax movl %eax, -0x68(%rbp) movq -0x20(%rbp), %rdi addq $0x2e8, %rdi # imm = 0x2E8 movq -0x20(%rbp), %rax movl 0x2f0(%rax), %edx subl $0x1, %edx leaq -0x70(%rbp), %rsi callq 0xddb00 jmp 0x5254b cmpb $0x0, -0x2d(%rbp) jne 0x52582 cmpb $0x0, -0x41(%rbp) jne 0x52582 movq -0x50(%rbp), %rdi movq -0x38(%rbp), %rax movl 0x7bc(%rax), %esi movq -0x38(%rbp), %rax movl 0x3f0(%rax), %edx addl $0x1, %edx callq 0x50e50 cmpb $0x0, %al jne 0x52582 movl $0x0, -0x3c(%rbp) jmp 0x52584 movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rsi movb -0x2d(%rbp), %al movl -0x3c(%rbp), %ecx movsbl %al, %edx callq 0x60a00 movb %al, -0x18(%rbp) movb -0x18(%rbp), %al movb %al, -0x101(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x525c7 movb -0x101(%rbp), %al addq $0x120, %rsp # imm = 0x120 popq %rbp retq callq 0x2a260 nopl (%rax)
delete_head_or_tail: push rbp mov rbp, rsp sub rsp, 120h mov al, r8b mov r8, fs:28h mov [rbp+var_8], r8 mov [rbp+var_20], rdi mov [rbp+var_28], rsi mov [rbp+var_2C], edx mov [rbp+var_2D], cl mov [rbp+var_2E], al mov rax, [rbp+var_20] mov rax, [rax] mov [rbp+var_38], rax jmp short $+2 loc_52269: mov rax, [rbp+var_38] mov rdi, [rax+600h] mov rsi, [rbp+var_20] add rsi, 470h mov rdx, [rbp+var_28] mov rax, [rbp+var_38] mov r9d, [rax+7D4h] lea rax, [rbp+var_70] xor ecx, ecx xor r8d, r8d mov dword ptr [rsp+120h+var_120], 4 mov [rsp+120h+var_118], rax call pagecache_read mov [rbp+var_50], rax mov [rbp+var_68], 6 cmp [rbp+var_50], 0 setnz al and al, 1 movzx eax, al mov [rbp+var_60], al mov rdi, [rbp+var_20] add rdi, 2E8h lea rsi, [rbp+var_70] call insert_dynamic cmp [rbp+var_50], 0 jnz short loc_52305 mov rax, [rbp+var_20] mov [rbp+var_100], rax call _my_thread_var mov rdi, [rbp+var_100] mov esi, [rax] call _ma_set_fatal_error mov [rbp+var_18], 1 jmp loc_5259D loc_52305: jmp short $+2 loc_52307: jmp short $+2 loc_52309: cmp [rbp+var_2E], 0 jz short loc_5231F mov [rbp+var_74], 2 mov [rbp+var_78], 6 jmp short loc_5232D loc_5231F: mov [rbp+var_74], 7 mov [rbp+var_78], 5 loc_5232D: mov rdi, [rbp+var_38] mov rsi, [rbp+var_50] mov edx, [rbp+var_2C] lea rcx, [rbp+var_3C] call delete_dir_entry mov [rbp+var_40], eax cmp [rbp+var_40], 0 jge short loc_52355 jmp short $+2 loc_5234C: mov [rbp+var_18], 1 jmp loc_5259D loc_52355: cmp [rbp+var_40], 0 jnz loc_5242F mov [rbp+var_41], 0 mov rax, [rbp+var_38] cmp byte ptr [rax+7E7h], 0 jz loc_5242A jmp short $+2 loc_52376: lea rax, [rbp+var_10] add rax, 2 mov [rbp+var_B8], rax mov rax, [rbp+var_28] mov ecx, eax mov rax, [rbp+var_B8] mov [rax], ecx mov rax, [rbp+var_28] shr rax, 20h mov cl, al mov rax, [rbp+var_B8] mov [rax+4], cl mov eax, [rbp+var_2C] mov [rbp+var_9], al lea rax, [rbp+var_10] mov [rbp+var_90], rax mov [rbp+var_88], 8 movsx ecx, [rbp+var_2D] mov esi, 7 mov eax, 6 cmp ecx, 0 cmovnz esi, eax mov rax, [rbp+var_20] mov rdx, [rax+8] mov rcx, [rbp+var_20] lea r10, [rbp+var_B0] lea rax, [rbp+var_10] lea rdi, [rbp+var_58] mov r8d, 8 mov r9d, 3 xor r11d, r11d mov [rsp+120h+var_120], r10 mov [rsp+120h+var_118], rax mov [rsp+120h+var_110], 0 call translog_write_record cmp al, 0 jz short loc_52428 jmp short $+2 loc_5241F: mov [rbp+var_18], 1 jmp loc_5259D loc_52428: jmp short $+2 loc_5242A: jmp loc_524F2 loc_5242F: mov [rbp+var_41], 1 mov rax, [rbp+var_38] cmp byte ptr [rax+7E7h], 0 jz loc_524E5 jmp short $+2 loc_52446: lea rax, [rbp+var_17] add rax, 2 mov [rbp+var_F8], rax mov rax, [rbp+var_28] mov ecx, eax mov rax, [rbp+var_F8] mov [rax], ecx mov rax, [rbp+var_28] shr rax, 20h mov cl, al mov rax, [rbp+var_F8] mov [rax+4], cl lea rax, [rbp+var_17] mov [rbp+var_D0], rax mov [rbp+var_C8], 7 mov rax, [rbp+var_20] mov rdx, [rax+8] mov rcx, [rbp+var_20] lea r10, [rbp+var_F0] lea rax, [rbp+var_17] lea rdi, [rbp+var_58] mov esi, 9 mov r8d, 7 mov r9d, 3 xor r11d, r11d mov [rsp+120h+var_120], r10 mov [rsp+120h+var_118], rax mov [rsp+120h+var_110], 0 call translog_write_record cmp al, 0 jz short loc_524E3 jmp short $+2 loc_524DA: mov [rbp+var_18], 1 jmp loc_5259D loc_524E3: jmp short $+2 loc_524E5: mov rdi, [rbp+var_70] call pagecache_set_write_on_delete_by_link jmp short $+2 loc_524F0: jmp short $+2 loc_524F2: mov rax, [rbp+var_38] mov rdi, [rax+600h] mov rsi, [rbp+var_70] mov edx, [rbp+var_74] xor ecx, ecx xor eax, eax mov r9d, eax mov r8, r9 mov dword ptr [rsp+120h+var_120], 1 mov dword ptr [rsp+120h+var_118], 0 call pagecache_unlock_by_link mov eax, [rbp+var_78] mov [rbp+var_68], eax mov rdi, [rbp+var_20] add rdi, 2E8h mov rax, [rbp+var_20] mov edx, [rax+2F0h] sub edx, 1 lea rsi, [rbp+var_70] call set_dynamic jmp short $+2 loc_5254B: cmp [rbp+var_2D], 0 jnz short loc_52582 cmp [rbp+var_41], 0 jnz short loc_52582 mov rdi, [rbp+var_50] mov rax, [rbp+var_38] mov esi, [rax+7BCh] mov rax, [rbp+var_38] mov edx, [rax+3F0h] add edx, 1 call enough_free_entries cmp al, 0 jnz short loc_52582 mov [rbp+var_3C], 0 loc_52582: jmp short $+2 loc_52584: mov rdi, [rbp+var_20] mov rsi, [rbp+var_28] mov al, [rbp+var_2D] mov ecx, [rbp+var_3C] movsx edx, al call _ma_bitmap_set mov [rbp+var_18], al loc_5259D: mov al, [rbp+var_18] mov [rbp+var_101], al mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_525C7 mov al, [rbp+var_101] add rsp, 120h pop rbp retn loc_525C7: call ___stack_chk_fail
char delete_head_or_tail(_QWORD *a1, long long a2, unsigned int a3, char a4, char a5) { _QWORD *v5; // rdi unsigned int *v6; // rax long long v7; // rdx long long v8; // rcx long long v9; // r8 int v10; // r9d int v11; // esi _DWORD *v13; // [rsp+20h] [rbp-100h] char v14[32]; // [rsp+30h] [rbp-F0h] BYREF _BYTE *v15; // [rsp+50h] [rbp-D0h] long long v16; // [rsp+58h] [rbp-C8h] int *v17; // [rsp+68h] [rbp-B8h] char v18[32]; // [rsp+70h] [rbp-B0h] BYREF _BYTE *v19; // [rsp+90h] [rbp-90h] long long v20; // [rsp+98h] [rbp-88h] int v21; // [rsp+A8h] [rbp-78h] int v22; // [rsp+ACh] [rbp-74h] long long v23; // [rsp+B0h] [rbp-70h] BYREF int v24; // [rsp+B8h] [rbp-68h] bool v25; // [rsp+C0h] [rbp-60h] char v26; // [rsp+C8h] [rbp-58h] BYREF long long v27; // [rsp+D0h] [rbp-50h] char v28; // [rsp+DFh] [rbp-41h] int v29; // [rsp+E0h] [rbp-40h] unsigned int v30; // [rsp+E4h] [rbp-3Ch] BYREF long long v31; // [rsp+E8h] [rbp-38h] char v32; // [rsp+F2h] [rbp-2Eh] char v33; // [rsp+F3h] [rbp-2Dh] unsigned int v34; // [rsp+F4h] [rbp-2Ch] long long v35; // [rsp+F8h] [rbp-28h] _QWORD *v36; // [rsp+100h] [rbp-20h] _BYTE v38[2]; // [rsp+109h] [rbp-17h] BYREF int v39; // [rsp+10Bh] [rbp-15h] char v40; // [rsp+10Fh] [rbp-11h] _BYTE v41[2]; // [rsp+110h] [rbp-10h] BYREF int v42; // [rsp+112h] [rbp-Eh] BYREF char v43; // [rsp+116h] [rbp-Ah] char v44; // [rsp+117h] [rbp-9h] unsigned long long v45; // [rsp+118h] [rbp-8h] v45 = __readfsqword(0x28u); v36 = a1; v35 = a2; v34 = a3; v33 = a4; v32 = a5; v31 = *a1; v27 = pagecache_read(*(_QWORD *)(v31 + 1536), (int)a1 + 1136, a2, 0, 0, *(_DWORD *)(v31 + 2004), 4, (long long)&v23); v24 = 6; v25 = v27 != 0; v5 = v36 + 93; insert_dynamic(v36 + 93, &v23); if ( v27 ) { if ( v32 ) { v22 = 2; v21 = 6; } else { v22 = 7; v21 = 5; } v29 = delete_dir_entry(v31, v27, v34, &v30); if ( v29 >= 0 ) { if ( v29 ) { v28 = 1; if ( *(_BYTE *)(v31 + 2023) ) { v39 = v35; v40 = BYTE4(v35); v15 = v38; v16 = 7LL; if ( (unsigned __int8)translog_write_record( (unsigned int)&v26, 9, v36[1], (_DWORD)v36, 7, 3, (long long)v14, (long long)v38, 0LL) ) return 1; } pagecache_set_write_on_delete_by_link(v23); } else { v28 = 0; if ( *(_BYTE *)(v31 + 2023) ) { v17 = &v42; v42 = v35; v43 = BYTE4(v35); v44 = v34; v19 = v41; v20 = 8LL; v11 = 7; if ( v33 ) v11 = 6; if ( (unsigned __int8)translog_write_record( (unsigned int)&v26, v11, v36[1], (_DWORD)v36, 8, 3, (long long)v18, (long long)v41, 0LL) ) return 1; } } pagecache_unlock_by_link(*(_QWORD *)(v31 + 1536), v23, v22, 0, 0, 0, 1, 0); v24 = v21; set_dynamic(v36 + 93, &v23, (unsigned int)(*((_DWORD *)v36 + 188) - 1)); if ( !v33 && !v28 && !enough_free_entries(v27, *(_DWORD *)(v31 + 1980), *(_DWORD *)(v31 + 1008) + 1) ) v30 = 0; return ma_bitmap_set(v36, v35, (unsigned int)v33, v30); } else { return 1; } } else { v13 = v36; v6 = (unsigned int *)my_thread_var(v5, (const char *)&v23); ma_set_fatal_error(v13, *v6, v7, v8, v9, v10); return 1; } }
delete_head_or_tail: PUSH RBP MOV RBP,RSP SUB RSP,0x120 MOV AL,R8B MOV R8,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],R8 MOV qword ptr [RBP + -0x20],RDI MOV qword ptr [RBP + -0x28],RSI MOV dword ptr [RBP + -0x2c],EDX MOV byte ptr [RBP + -0x2d],CL MOV byte ptr [RBP + -0x2e],AL MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x38],RAX JMP 0x00152269 LAB_00152269: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x20] ADD RSI,0x470 MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x38] MOV R9D,dword ptr [RAX + 0x7d4] LEA RAX,[RBP + -0x70] XOR ECX,ECX XOR R8D,R8D MOV dword ptr [RSP],0x4 MOV qword ptr [RSP + 0x8],RAX CALL 0x00196df0 MOV qword ptr [RBP + -0x50],RAX MOV dword ptr [RBP + -0x68],0x6 CMP qword ptr [RBP + -0x50],0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL MOV byte ptr [RBP + -0x60],AL MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x2e8 LEA RSI,[RBP + -0x70] CALL 0x001dd8b0 CMP qword ptr [RBP + -0x50],0x0 JNZ 0x00152305 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x100],RAX CALL 0x001fc990 MOV RDI,qword ptr [RBP + -0x100] MOV ESI,dword ptr [RAX] CALL 0x00137c10 MOV byte ptr [RBP + -0x18],0x1 JMP 0x0015259d LAB_00152305: JMP 0x00152307 LAB_00152307: JMP 0x00152309 LAB_00152309: CMP byte ptr [RBP + -0x2e],0x0 JZ 0x0015231f MOV dword ptr [RBP + -0x74],0x2 MOV dword ptr [RBP + -0x78],0x6 JMP 0x0015232d LAB_0015231f: MOV dword ptr [RBP + -0x74],0x7 MOV dword ptr [RBP + -0x78],0x5 LAB_0015232d: MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x50] MOV EDX,dword ptr [RBP + -0x2c] LEA RCX,[RBP + -0x3c] CALL 0x00157080 MOV dword ptr [RBP + -0x40],EAX CMP dword ptr [RBP + -0x40],0x0 JGE 0x00152355 JMP 0x0015234c LAB_0015234c: MOV byte ptr [RBP + -0x18],0x1 JMP 0x0015259d LAB_00152355: CMP dword ptr [RBP + -0x40],0x0 JNZ 0x0015242f MOV byte ptr [RBP + -0x41],0x0 MOV RAX,qword ptr [RBP + -0x38] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x0015242a JMP 0x00152376 LAB_00152376: LEA RAX,[RBP + -0x10] ADD RAX,0x2 MOV qword ptr [RBP + -0xb8],RAX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xb8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xb8] MOV byte ptr [RAX + 0x4],CL MOV EAX,dword ptr [RBP + -0x2c] MOV byte ptr [RBP + -0x9],AL LEA RAX,[RBP + -0x10] MOV qword ptr [RBP + -0x90],RAX MOV qword ptr [RBP + -0x88],0x8 MOVSX ECX,byte ptr [RBP + -0x2d] MOV ESI,0x7 MOV EAX,0x6 CMP ECX,0x0 CMOVNZ ESI,EAX MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x20] LEA R10,[RBP + -0xb0] LEA RAX,[RBP + -0x10] LEA RDI,[RBP + -0x58] MOV R8D,0x8 MOV R9D,0x3 XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x0018bc40 CMP AL,0x0 JZ 0x00152428 JMP 0x0015241f LAB_0015241f: MOV byte ptr [RBP + -0x18],0x1 JMP 0x0015259d LAB_00152428: JMP 0x0015242a LAB_0015242a: JMP 0x001524f2 LAB_0015242f: MOV byte ptr [RBP + -0x41],0x1 MOV RAX,qword ptr [RBP + -0x38] CMP byte ptr [RAX + 0x7e7],0x0 JZ 0x001524e5 JMP 0x00152446 LAB_00152446: LEA RAX,[RBP + -0x17] ADD RAX,0x2 MOV qword ptr [RBP + -0xf8],RAX MOV RAX,qword ptr [RBP + -0x28] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0xf8] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x28] SHR RAX,0x20 MOV CL,AL MOV RAX,qword ptr [RBP + -0xf8] MOV byte ptr [RAX + 0x4],CL LEA RAX,[RBP + -0x17] MOV qword ptr [RBP + -0xd0],RAX MOV qword ptr [RBP + -0xc8],0x7 MOV RAX,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x20] LEA R10,[RBP + -0xf0] LEA RAX,[RBP + -0x17] LEA RDI,[RBP + -0x58] MOV ESI,0x9 MOV R8D,0x7 MOV R9D,0x3 XOR R11D,R11D MOV qword ptr [RSP],R10 MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x10],0x0 CALL 0x0018bc40 CMP AL,0x0 JZ 0x001524e3 JMP 0x001524da LAB_001524da: MOV byte ptr [RBP + -0x18],0x1 JMP 0x0015259d LAB_001524e3: JMP 0x001524e5 LAB_001524e5: MOV RDI,qword ptr [RBP + -0x70] CALL 0x00197da0 JMP 0x001524f0 LAB_001524f0: JMP 0x001524f2 LAB_001524f2: MOV RAX,qword ptr [RBP + -0x38] MOV RDI,qword ptr [RAX + 0x600] MOV RSI,qword ptr [RBP + -0x70] MOV EDX,dword ptr [RBP + -0x74] XOR ECX,ECX XOR EAX,EAX MOV R9D,EAX MOV R8,R9 MOV dword ptr [RSP],0x1 MOV dword ptr [RSP + 0x8],0x0 CALL 0x00196b90 MOV EAX,dword ptr [RBP + -0x78] MOV dword ptr [RBP + -0x68],EAX MOV RDI,qword ptr [RBP + -0x20] ADD RDI,0x2e8 MOV RAX,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RAX + 0x2f0] SUB EDX,0x1 LEA RSI,[RBP + -0x70] CALL 0x001ddb00 JMP 0x0015254b LAB_0015254b: CMP byte ptr [RBP + -0x2d],0x0 JNZ 0x00152582 CMP byte ptr [RBP + -0x41],0x0 JNZ 0x00152582 MOV RDI,qword ptr [RBP + -0x50] MOV RAX,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RAX + 0x7bc] MOV RAX,qword ptr [RBP + -0x38] MOV EDX,dword ptr [RAX + 0x3f0] ADD EDX,0x1 CALL 0x00150e50 CMP AL,0x0 JNZ 0x00152582 MOV dword ptr [RBP + -0x3c],0x0 LAB_00152582: JMP 0x00152584 LAB_00152584: MOV RDI,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RBP + -0x28] MOV AL,byte ptr [RBP + -0x2d] MOV ECX,dword ptr [RBP + -0x3c] MOVSX EDX,AL CALL 0x00160a00 MOV byte ptr [RBP + -0x18],AL LAB_0015259d: MOV AL,byte ptr [RBP + -0x18] MOV byte ptr [RBP + -0x101],AL MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001525c7 MOV AL,byte ptr [RBP + -0x101] ADD RSP,0x120 POP RBP RET LAB_001525c7: CALL 0x0012a260
int8 delete_head_or_tail(long *param_1,int8 param_2,int4 param_3,char param_4,char param_5) { int1 uVar1; long *plVar2; char cVar3; int4 *puVar4; int8 uVar5; long in_FS_OFFSET; int8 in_stack_fffffffffffffed8; int1 *puVar6; int4 uVar7; int8 *puVar8; int1 local_f8 [32]; int1 *local_d8; int8 local_d0; int4 *local_c0; int1 local_b8 [32]; int1 *local_98; int8 local_90; int4 local_80; int4 local_7c; int8 local_78; int4 local_70; int1 local_68; int1 local_60 [8]; long local_58; char local_49; int local_48; int4 local_44; long local_40; char local_36; char local_35; int4 local_34; int8 local_30; long *local_28; int1 local_20; int1 local_1f [9]; int4 local_16; int1 local_12; int1 local_11; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); local_40 = *param_1; puVar8 = &local_78; uVar5 = CONCAT44((int)((ulong)in_stack_fffffffffffffed8 >> 0x20),4); local_36 = param_5; local_35 = param_4; local_34 = param_3; local_30 = param_2; local_28 = param_1; local_58 = pagecache_read(*(int8 *)(local_40 + 0x600),param_1 + 0x8e,param_2,0,0, *(int4 *)(local_40 + 0x7d4),uVar5,puVar8); uVar7 = (int4)((ulong)uVar5 >> 0x20); local_70 = 6; local_68 = local_58 != 0; insert_dynamic(local_28 + 0x5d,&local_78); plVar2 = local_28; if (local_58 == 0) { puVar4 = (int4 *)_my_thread_var(); _ma_set_fatal_error(plVar2,*puVar4); local_20 = 1; } else { if (local_36 == '\0') { local_7c = 7; local_80 = 5; } else { local_7c = 2; local_80 = 6; } local_48 = delete_dir_entry(local_40,local_58,local_34,&local_44); if (local_48 < 0) { local_20 = 1; } else { uVar1 = (int1)((ulong)local_30 >> 0x20); if (local_48 == 0) { local_49 = '\0'; if (*(char *)(local_40 + 0x7e7) != '\0') { local_c0 = &local_16; local_11 = (int1)local_34; local_98 = local_1f + 7; local_90 = 8; uVar5 = 7; if (local_35 != '\0') { uVar5 = 6; } puVar6 = local_b8; puVar8 = (int8 *)(local_1f + 7); local_16 = (int)local_30; local_12 = uVar1; cVar3 = translog_write_record(local_60,uVar5,local_28[1],local_28,8,3,puVar6,puVar8,0); uVar7 = (int4)((ulong)puVar6 >> 0x20); if (cVar3 != '\0') { local_20 = 1; goto LAB_0015259d; } } } else { local_49 = '\x01'; if (*(char *)(local_40 + 0x7e7) != '\0') { local_d8 = local_1f; local_d0 = 7; puVar6 = local_f8; puVar8 = (int8 *)local_1f; local_1f._2_4_ = (int)local_30; local_1f[6] = uVar1; cVar3 = translog_write_record(local_60,9,local_28[1],local_28,7,3,puVar6,puVar8,0); uVar7 = (int4)((ulong)puVar6 >> 0x20); if (cVar3 != '\0') { local_20 = 1; goto LAB_0015259d; } } pagecache_set_write_on_delete_by_link(local_78); } pagecache_unlock_by_link (*(int8 *)(local_40 + 0x600),local_78,local_7c,0,0,0,CONCAT44(uVar7,1), (ulong)puVar8 & 0xffffffff00000000); local_70 = local_80; set_dynamic(local_28 + 0x5d,&local_78,(int)local_28[0x5e] + -1); if (((local_35 == '\0') && (local_49 == '\0')) && (cVar3 = enough_free_entries(local_58,*(int4 *)(local_40 + 0x7bc), *(int *)(local_40 + 0x3f0) + 1), cVar3 == '\0')) { local_44 = 0; } local_20 = _ma_bitmap_set(local_28,local_30,(int)local_35,local_44); } } LAB_0015259d: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return CONCAT71((int7)((ulong)*(long *)(in_FS_OFFSET + 0x28) >> 8),local_20); }
13,490
gguf_set_val_u64
ngxson[P]ggml-easy/ggml/src/gguf.cpp
void gguf_set_val_u64(struct gguf_context * ctx, const char * key, uint64_t val) { gguf_check_reserved_keys(key, val); gguf_remove_key(ctx, key); ctx->kv.emplace_back(key, val); }
O2
cpp
gguf_set_val_u64: pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movq %rsi, %r14 movq %rdi, %rbx movq %rsi, 0x18(%rsp) movq %rdx, 0x10(%rsp) leaq 0x20(%rsp), %r15 leaq 0xf(%rsp), %rdx movq %r15, %rdi callq 0x1e820 leaq 0x1a712(%rip), %rsi # 0x5a982 movq %r15, %rdi callq 0x1efa0 testb %al, %al jne 0x402b1 leaq 0x20(%rsp), %rdi callq 0x1c9a0 movq %rbx, %rdi movq %r14, %rsi callq 0x1def0 addq $0x8, %rbx leaq 0x18(%rsp), %rsi leaq 0x10(%rsp), %rdx movq %rbx, %rdi callq 0x1dc30 addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq leaq 0x1a65d(%rip), %rdi # 0x5a915 leaq 0x1aeb7(%rip), %rdx # 0x5b176 movl $0x3a8, %esi # imm = 0x3A8 xorl %eax, %eax callq 0x1e770 movq %rax, %rbx leaq 0x20(%rsp), %rdi callq 0x1c9a0 movq %rbx, %rdi callq 0x1e9b0
gguf_set_val_u64: push r15 push r14 push rbx sub rsp, 40h mov r14, rsi mov rbx, rdi mov [rsp+58h+var_40], rsi mov [rsp+58h+var_48], rdx lea r15, [rsp+58h+var_38] lea rdx, [rsp+58h+var_49] mov rdi, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rsi, aGeneralAlignme; "general.alignment" mov rdi, r15 call __ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) test al, al jnz short loc_402B1 lea rdi, [rsp+58h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx mov rsi, r14 call _gguf_remove_key add rbx, 8 lea rsi, [rsp+58h+var_40] lea rdx, [rsp+58h+var_48] mov rdi, rbx call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRmEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,ulong &>(char const*&,ulong &) add rsp, 40h pop rbx pop r14 pop r15 retn loc_402B1: lea rdi, aWorkspaceLlm4b_5; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGeneralAlignme_0; "general.alignment must be type u32" mov esi, 3A8h xor eax, eax call _ggml_abort mov rbx, rax lea rdi, [rsp+58h+var_38] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long gguf_set_val_u64( long long a1, long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, double a8, double a9, __m128 a10, __m128 a11) { long long v11; // rcx long long v12; // r8 long long v13; // r9 __m128 v14; // xmm4 __m128 v15; // xmm5 long long v16; // rdx char v18; // [rsp+0h] [rbp-58h] char v19; // [rsp+Fh] [rbp-49h] BYREF long long v20; // [rsp+10h] [rbp-48h] BYREF long long v21; // [rsp+18h] [rbp-40h] BYREF _BYTE v22[56]; // [rsp+20h] [rbp-38h] BYREF v21 = a2; v20 = a3; std::string::basic_string<std::allocator<char>>(v22, a2, &v19); if ( (unsigned __int8)std::operator==<char>(v22, "general.alignment") ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp", 936, (long long)"general.alignment must be type u32", v11, v12, v13, a4, a5, a6, a7, v14, v15, a10, a11, v18); std::string::~string(v22); gguf_remove_key(a1, a2, v16); return std::vector<gguf_kv>::emplace_back<char const*&,unsigned long &>(a1 + 8, &v21, &v20); }
gguf_set_val_u64: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV R14,RSI MOV RBX,RDI MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x10],RDX LEA R15,[RSP + 0x20] LEA RDX,[RSP + 0xf] MOV RDI,R15 CALL 0x0011e820 LEA RSI,[0x15a982] MOV RDI,R15 CALL 0x0011efa0 TEST AL,AL JNZ 0x001402b1 LEA RDI,[RSP + 0x20] CALL 0x0011c9a0 MOV RDI,RBX MOV RSI,R14 CALL 0x0011def0 ADD RBX,0x8 LEA RSI,[RSP + 0x18] LEA RDX,[RSP + 0x10] MOV RDI,RBX CALL 0x0011dc30 ADD RSP,0x40 POP RBX POP R14 POP R15 RET LAB_001402b1: LEA RDI,[0x15a915] LEA RDX,[0x15b176] MOV ESI,0x3a8 XOR EAX,EAX CALL 0x0011e770
void gguf_set_val_u64(long param_1,char *param_2,ulong param_3) { bool bVar1; allocator local_49; ulong local_48; char *local_40; string local_38 [32]; local_48 = param_3; local_40 = param_2; std::__cxx11::string::string<std::allocator<char>>(local_38,param_2,&local_49); bVar1 = std::operator==(local_38,"general.alignment"); if (!bVar1) { std::__cxx11::string::~string(local_38); gguf_remove_key(param_1,param_2); std::vector<gguf_kv,std::allocator<gguf_kv>>::emplace_back<char_const*&,unsigned_long&> ((vector<gguf_kv,std::allocator<gguf_kv>> *)(param_1 + 8),&local_40,&local_48); return; } /* try { // try from 001402b1 to 001402ca has its CatchHandler @ 001402cb */ /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/gguf.cpp",0x3a8, "general.alignment must be type u32"); }
13,491
uf_varchar1
eloqsql/storage/myisam/mi_packrec.c
static void uf_varchar1(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end __attribute__((unused))) { if (get_bit(bit_buff)) to[0]= 0; /* Zero lengths */ else { ulong length=get_bits(bit_buff,rec->space_length_bits); *to= (uchar) length; decode_bytes(rec,bit_buff,to+1,to+1+length); } }
O0
c
uf_varchar1: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x10(%rbp), %rax cmpl $0x0, 0x4(%rax) je 0xbdc87 movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx addl $-0x1, %ecx movl %ecx, 0x4(%rdx) movl $0x1, %edx shll %cl, %edx movl %edx, %ecx andl %ecx, %eax cmpl $0x0, %eax jne 0xbdcab jmp 0xbdcb7 movq -0x10(%rbp), %rdi callq 0xbc370 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbdcb7 movq -0x18(%rbp), %rax movb $0x0, (%rax) jmp 0xbdd43 movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0xbdcfa movq -0x10(%rbp), %rax movl (%rax), %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %esi movq -0x10(%rbp), %rdx movl 0x4(%rdx), %ecx subl %esi, %ecx movl %ecx, 0x4(%rdx) shrl %cl, %eax movq -0x8(%rbp), %rcx movl 0x1c(%rcx), %ecx movl %ecx, %edx leaq 0x20194e(%rip), %rcx # 0x2bf640 andl (%rcx,%rdx,4), %eax movl %eax, -0x2c(%rbp) jmp 0xbdd0d movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0xbab20 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, %eax movq %rax, -0x28(%rbp) movq -0x28(%rbp), %rax movb %al, %cl movq -0x18(%rbp), %rax movb %cl, (%rax) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx addq $0x1, %rdx movq -0x18(%rbp), %rcx addq $0x1, %rcx addq -0x28(%rbp), %rcx callq 0xbca80 addq $0x30, %rsp popq %rbp retq nopl (%rax)
uf_varchar1_0: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_10] cmp dword ptr [rax+4], 0 jz short loc_BDC87 mov rax, [rbp+var_10] mov eax, [rax] mov rdx, [rbp+var_10] mov ecx, [rdx+4] add ecx, 0FFFFFFFFh mov [rdx+4], ecx mov edx, 1 shl edx, cl mov ecx, edx and eax, ecx cmp eax, 0 jnz short loc_BDCAB jmp short loc_BDCB7 loc_BDC87: mov rdi, [rbp+var_10] call fill_buffer_0 mov rax, [rbp+var_10] mov dword ptr [rax+4], 1Fh mov rax, [rbp+var_10] mov eax, [rax] and eax, 80000000h cmp eax, 0 jz short loc_BDCB7 loc_BDCAB: mov rax, [rbp+var_18] mov byte ptr [rax], 0 jmp loc_BDD43 loc_BDCB7: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_BDCFA mov rax, [rbp+var_10] mov eax, [rax] mov rcx, [rbp+var_8] mov esi, [rcx+1Ch] mov rdx, [rbp+var_10] mov ecx, [rdx+4] sub ecx, esi mov [rdx+4], ecx shr eax, cl mov rcx, [rbp+var_8] mov ecx, [rcx+1Ch] mov edx, ecx lea rcx, mask_0 and eax, [rcx+rdx*4] mov [rbp+var_2C], eax jmp short loc_BDD0D loc_BDCFA: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits_0 mov [rbp+var_2C], eax loc_BDD0D: mov eax, [rbp+var_2C] mov eax, eax mov [rbp+var_28], rax mov rax, [rbp+var_28] mov cl, al mov rax, [rbp+var_18] mov [rax], cl mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] add rdx, 1 mov rcx, [rbp+var_18] add rcx, 1 add rcx, [rbp+var_28] call decode_bytes_0 loc_BDD43: add rsp, 30h pop rbp retn
long long uf_varchar1_0(long long a1, int *a2, _BYTE *a3) { int v3; // eax int v4; // ecx long long result; // rax unsigned int v6; // eax int v7; // ecx int bits_0; // [rsp+4h] [rbp-2Ch] if ( a2[1] ) { v3 = *a2; v4 = a2[1] - 1; a2[1] = v4; if ( ((1 << v4) & v3) == 0 ) goto LABEL_6; LABEL_5: result = (long long)a3; *a3 = 0; return result; } fill_buffer_0((long long)a2); a2[1] = 31; if ( *a2 < 0 ) goto LABEL_5; LABEL_6: if ( (unsigned int)a2[1] < *(_DWORD *)(a1 + 28) ) { bits_0 = fill_and_get_bits_0(a2, *(_DWORD *)(a1 + 28)); } else { v6 = *a2; v7 = a2[1] - *(_DWORD *)(a1 + 28); a2[1] = v7; bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v6 >> v7); } *a3 = bits_0; return decode_bytes_0(a1, (long long)a2, a3 + 1, &a3[bits_0 + 1]); }
uf_varchar1: 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 qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x4],0x0 JZ 0x001bdc87 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] ADD ECX,-0x1 MOV dword ptr [RDX + 0x4],ECX MOV EDX,0x1 SHL EDX,CL MOV ECX,EDX AND EAX,ECX CMP EAX,0x0 JNZ 0x001bdcab JMP 0x001bdcb7 LAB_001bdc87: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bc370 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4],0x1f MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] AND EAX,0x80000000 CMP EAX,0x0 JZ 0x001bdcb7 LAB_001bdcab: MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 JMP 0x001bdd43 LAB_001bdcb7: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x4] MOV RCX,qword ptr [RBP + -0x8] CMP EAX,dword ptr [RCX + 0x1c] JC 0x001bdcfa MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV RCX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RCX + 0x1c] MOV RDX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RDX + 0x4] SUB ECX,ESI MOV dword ptr [RDX + 0x4],ECX SHR EAX,CL MOV RCX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RCX + 0x1c] MOV EDX,ECX LEA RCX,[0x3bf640] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x2c],EAX JMP 0x001bdd0d LAB_001bdcfa: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x001bab20 MOV dword ptr [RBP + -0x2c],EAX LAB_001bdd0d: MOV EAX,dword ptr [RBP + -0x2c] MOV EAX,EAX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x28] MOV CL,AL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] ADD RDX,0x1 MOV RCX,qword ptr [RBP + -0x18] ADD RCX,0x1 ADD RCX,qword ptr [RBP + -0x28] CALL 0x001bca80 LAB_001bdd43: ADD RSP,0x30 POP RBP RET
void uf_varchar1(long param_1,uint *param_2,int1 *param_3) { uint uVar1; uint local_34; if (param_2[1] == 0) { fill_buffer(param_2); param_2[1] = 0x1f; uVar1 = *param_2 & 0x80000000; } else { uVar1 = param_2[1]; param_2[1] = uVar1 - 1; uVar1 = *param_2 & 1 << ((byte)(uVar1 - 1) & 0x1f); } if (uVar1 == 0) { if (param_2[1] < *(uint *)(param_1 + 0x1c)) { local_34 = fill_and_get_bits(param_2,*(int4 *)(param_1 + 0x1c)); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_34 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4); } *param_3 = (char)local_34; decode_bytes(param_1,param_2,param_3 + 1,param_3 + (ulong)local_34 + 1); } else { *param_3 = 0; } return; }
13,492
copy_uca_collation
eloqsql/mysys/charset.c
static void copy_uca_collation(struct charset_info_st *to, CHARSET_INFO *from, CHARSET_INFO *loaded) { to->cset= from->cset; to->coll= from->coll; /* Single-level UCA collation have strnxfrm_multiple=8. In case of a multi-level UCA collation we use strnxfrm_multiply=4. That means MY_COLLATION_HANDLER::strnfrmlen() will request the caller to allocate a buffer smaller size for each level, for performance purpose, and to fit longer VARCHARs to @@max_sort_length. This makes filesort produce non-precise order for some rare Unicode characters that produce more than 4 weights (long expansions). UCA requires 2 bytes per weight multiplied by the number of levels. In case of a 2-level collation, each character requires 4*2=8 bytes. Therefore, the longest VARCHAR that fits into the default @@max_sort_length is 1024/8=VARCHAR(128). With strnxfrm_multiply==8, only VARCHAR(64) would fit. Note, the built-in collation utf8_thai_520_w2 also uses strnxfrm_multiply=4, for the same purpose. TODO: we could add a new LDML syntax to choose strxfrm_multiply value. */ to->strxfrm_multiply= loaded->levels_for_order > 1 ? 4 : from->strxfrm_multiply; to->min_sort_char= from->min_sort_char; to->max_sort_char= from->max_sort_char; to->mbminlen= from->mbminlen; to->mbmaxlen= from->mbmaxlen; to->caseup_multiply= from->caseup_multiply; to->casedn_multiply= from->casedn_multiply; to->state|= MY_CS_AVAILABLE | MY_CS_LOADED | MY_CS_STRNXFRM | MY_CS_UNICODE; }
O3
c
copy_uca_collation: pushq %rbp movq %rsp, %rbp movq 0xb8(%rsi), %rax movq %rax, 0xb8(%rdi) movq 0xc0(%rsi), %rax movq %rax, 0xc0(%rdi) movl $0x4, %eax cmpb $0x1, 0xb2(%rdx) ja 0x4f2eb movl 0x90(%rsi), %eax movl %eax, 0x90(%rdi) movq 0xa0(%rsi), %rax movq %rax, 0xa0(%rdi) movq 0xa8(%rsi), %rax movq %rax, 0xa8(%rdi) movl 0x98(%rsi), %eax movl %eax, 0x98(%rdi) movl 0x9c(%rsi), %eax movl %eax, 0x9c(%rdi) movb 0x94(%rsi), %al movb %al, 0x94(%rdi) movb 0x95(%rsi), %al movb %al, 0x95(%rdi) orl $0x2c8, 0xc(%rdi) # imm = 0x2C8 popq %rbp retq
copy_uca_collation: push rbp mov rbp, rsp mov rax, [rsi+0B8h] mov [rdi+0B8h], rax mov rax, [rsi+0C0h] mov [rdi+0C0h], rax mov eax, 4 cmp byte ptr [rdx+0B2h], 1 ja short loc_4F2EB mov eax, [rsi+90h] loc_4F2EB: mov [rdi+90h], eax mov rax, [rsi+0A0h] mov [rdi+0A0h], rax mov rax, [rsi+0A8h] mov [rdi+0A8h], rax mov eax, [rsi+98h] mov [rdi+98h], eax mov eax, [rsi+9Ch] mov [rdi+9Ch], eax mov al, [rsi+94h] mov [rdi+94h], al mov al, [rsi+95h] mov [rdi+95h], al or dword ptr [rdi+0Ch], 2C8h pop rbp retn
char copy_uca_collation(long long a1, long long a2, long long a3) { int v3; // eax char result; // al *(_QWORD *)(a1 + 184) = *(_QWORD *)(a2 + 184); *(_QWORD *)(a1 + 192) = *(_QWORD *)(a2 + 192); v3 = 4; if ( *(_BYTE *)(a3 + 178) <= 1u ) v3 = *(_DWORD *)(a2 + 144); *(_DWORD *)(a1 + 144) = v3; *(_QWORD *)(a1 + 160) = *(_QWORD *)(a2 + 160); *(_QWORD *)(a1 + 168) = *(_QWORD *)(a2 + 168); *(_DWORD *)(a1 + 152) = *(_DWORD *)(a2 + 152); *(_DWORD *)(a1 + 156) = *(_DWORD *)(a2 + 156); *(_BYTE *)(a1 + 148) = *(_BYTE *)(a2 + 148); result = *(_BYTE *)(a2 + 149); *(_BYTE *)(a1 + 149) = result; *(_DWORD *)(a1 + 12) |= 0x2C8u; return result; }
copy_uca_collation: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RSI + 0xb8] MOV qword ptr [RDI + 0xb8],RAX MOV RAX,qword ptr [RSI + 0xc0] MOV qword ptr [RDI + 0xc0],RAX MOV EAX,0x4 CMP byte ptr [RDX + 0xb2],0x1 JA 0x0014f2eb MOV EAX,dword ptr [RSI + 0x90] LAB_0014f2eb: MOV dword ptr [RDI + 0x90],EAX MOV RAX,qword ptr [RSI + 0xa0] MOV qword ptr [RDI + 0xa0],RAX MOV RAX,qword ptr [RSI + 0xa8] MOV qword ptr [RDI + 0xa8],RAX MOV EAX,dword ptr [RSI + 0x98] MOV dword ptr [RDI + 0x98],EAX MOV EAX,dword ptr [RSI + 0x9c] MOV dword ptr [RDI + 0x9c],EAX MOV AL,byte ptr [RSI + 0x94] MOV byte ptr [RDI + 0x94],AL MOV AL,byte ptr [RSI + 0x95] MOV byte ptr [RDI + 0x95],AL OR dword ptr [RDI + 0xc],0x2c8 POP RBP RET
void copy_uca_collation(long param_1,long param_2,long param_3) { int4 uVar1; *(int8 *)(param_1 + 0xb8) = *(int8 *)(param_2 + 0xb8); *(int8 *)(param_1 + 0xc0) = *(int8 *)(param_2 + 0xc0); uVar1 = 4; if (*(byte *)(param_3 + 0xb2) < 2) { uVar1 = *(int4 *)(param_2 + 0x90); } *(int4 *)(param_1 + 0x90) = uVar1; *(int8 *)(param_1 + 0xa0) = *(int8 *)(param_2 + 0xa0); *(int8 *)(param_1 + 0xa8) = *(int8 *)(param_2 + 0xa8); *(int4 *)(param_1 + 0x98) = *(int4 *)(param_2 + 0x98); *(int4 *)(param_1 + 0x9c) = *(int4 *)(param_2 + 0x9c); *(int1 *)(param_1 + 0x94) = *(int1 *)(param_2 + 0x94); *(int1 *)(param_1 + 0x95) = *(int1 *)(param_2 + 0x95); *(uint *)(param_1 + 0xc) = *(uint *)(param_1 + 0xc) | 0x2c8; return; }
13,493
ma_bitmap_end
eloqsql/storage/maria/ma_bitmap.c
my_bool _ma_bitmap_end(MARIA_SHARE *share) { my_bool res; #ifndef DBUG_OFF if (! share->internal_table) mysql_mutex_assert_owner(&share->close_lock); #endif DBUG_ASSERT(share->bitmap.non_flushable == 0); DBUG_ASSERT(share->bitmap.flush_all_requested == 0); DBUG_ASSERT(share->bitmap.waiting_for_non_flushable == 0 && share->bitmap.waiting_for_flush_all_requested == 0); DBUG_ASSERT(share->bitmap.pinned_pages.elements == 0); res= _ma_bitmap_flush(share); mysql_mutex_destroy(&share->bitmap.bitmap_lock); mysql_cond_destroy(&share->bitmap.bitmap_cond); delete_dynamic(&share->bitmap.pinned_pages); my_free(share->bitmap.map); share->bitmap.map= 0; /* This is to not get an assert in checkpoint. The bitmap will be flushed at once by _ma_once_end_block_record() as part of the normal flush of the kfile. */ share->bitmap.changed_not_flushed= 0; return res; }
O3
c
ma_bitmap_end: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx callq 0x525fd movl %eax, %r14d leaq 0xa98(%rbx), %r15 movq 0xad8(%rbx), %rdi testq %rdi, %rdi je 0x5258b leaq 0x333a96(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x48(%rax) movq $0x0, 0xad8(%rbx) movq %r15, %rdi callq 0x290c0 movq 0xb10(%rbx), %rdi testq %rdi, %rdi jne 0x525e3 leaq 0xae0(%rbx), %rdi callq 0x29260 leaq 0xb50(%rbx), %rdi callq 0x91c1c movq 0xa18(%rbx), %rdi callq 0x9ff7e movq $0x0, 0xa18(%rbx) movb $0x0, 0xa31(%rbx) movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq leaq 0x333a26(%rip), %rax # 0x386010 movq (%rax), %rax callq *0x68(%rax) movq $0x0, 0xb10(%rbx) jmp 0x5259f
_ma_bitmap_end: push rbp mov rbp, rsp push r15 push r14 push rbx push rax mov rbx, rdi call _ma_bitmap_flush mov r14d, eax lea r15, [rbx+0A98h] mov rdi, [rbx+0AD8h] test rdi, rdi jz short loc_5258B lea rax, PSI_server mov rax, [rax] call qword ptr [rax+48h] mov qword ptr [rbx+0AD8h], 0 loc_5258B: mov rdi, r15 call _pthread_mutex_destroy mov rdi, [rbx+0B10h] test rdi, rdi jnz short loc_525E3 loc_5259F: lea rdi, [rbx+0AE0h] call _pthread_cond_destroy lea rdi, [rbx+0B50h] call delete_dynamic mov rdi, [rbx+0A18h] call my_free mov qword ptr [rbx+0A18h], 0 mov byte ptr [rbx+0A31h], 0 mov eax, r14d add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn loc_525E3: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+68h] mov qword ptr [rbx+0B10h], 0 jmp short loc_5259F
long long ma_bitmap_end(long long a1) { unsigned int v2; // r14d long long v3; // rdi long long v4; // rdi v2 = ma_bitmap_flush(a1); v3 = *(_QWORD *)(a1 + 2776); if ( v3 ) { ((void ( *)(long long))PSI_server[9])(v3); *(_QWORD *)(a1 + 2776) = 0LL; } pthread_mutex_destroy(a1 + 2712); v4 = *(_QWORD *)(a1 + 2832); if ( v4 ) { ((void ( *)(long long))PSI_server[13])(v4); *(_QWORD *)(a1 + 2832) = 0LL; } pthread_cond_destroy(a1 + 2784); delete_dynamic(a1 + 2896); my_free(*(_QWORD *)(a1 + 2584)); *(_QWORD *)(a1 + 2584) = 0LL; *(_BYTE *)(a1 + 2609) = 0; return v2; }
_ma_bitmap_end: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI CALL 0x001525fd MOV R14D,EAX LEA R15,[RBX + 0xa98] MOV RDI,qword ptr [RBX + 0xad8] TEST RDI,RDI JZ 0x0015258b LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x48] MOV qword ptr [RBX + 0xad8],0x0 LAB_0015258b: MOV RDI,R15 CALL 0x001290c0 MOV RDI,qword ptr [RBX + 0xb10] TEST RDI,RDI JNZ 0x001525e3 LAB_0015259f: LEA RDI,[RBX + 0xae0] CALL 0x00129260 LEA RDI,[RBX + 0xb50] CALL 0x00191c1c MOV RDI,qword ptr [RBX + 0xa18] CALL 0x0019ff7e MOV qword ptr [RBX + 0xa18],0x0 MOV byte ptr [RBX + 0xa31],0x0 MOV EAX,R14D ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET LAB_001525e3: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x68] MOV qword ptr [RBX + 0xb10],0x0 JMP 0x0015259f
int4 _ma_bitmap_end(long param_1) { int4 uVar1; uVar1 = _ma_bitmap_flush(); if (*(long *)(param_1 + 0xad8) != 0) { (**(code **)(PSI_server + 0x48))(); *(int8 *)(param_1 + 0xad8) = 0; } pthread_mutex_destroy((pthread_mutex_t *)(param_1 + 0xa98)); if (*(long *)(param_1 + 0xb10) != 0) { (**(code **)(PSI_server + 0x68))(); *(int8 *)(param_1 + 0xb10) = 0; } pthread_cond_destroy((pthread_cond_t *)(param_1 + 0xae0)); delete_dynamic(param_1 + 0xb50); my_free(*(int8 *)(param_1 + 0xa18)); *(int8 *)(param_1 + 0xa18) = 0; *(int1 *)(param_1 + 0xa31) = 0; return uVar1; }
13,494
emittra::Emittra::emit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::any, std::allocator<std::any>> const&, bool)
angrymouse[P]emittra/src/emittra.cpp
void Emittra::emit(const std::string& event_name, const std::vector<std::any>& args, bool notify) { auto event_data = get_or_create_event_data(event_name); event_data->event_queue.enqueue({args, nullptr}); if (notify) { event_data->cv.notify_one(); notify_associated_cvs(event_data); } }
O0
cpp
emittra::Emittra::emit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::any, std::allocator<std::any>> const&, bool): subq $0x88, %rsp movb %cl, %al movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movq %rdx, 0x70(%rsp) andb $0x1, %al movb %al, 0x6f(%rsp) movq 0x80(%rsp), %rsi movq %rsi, 0x8(%rsp) movq 0x78(%rsp), %rdx leaq 0x58(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0xa3d0 movq 0x10(%rsp), %rdi callq 0xe160 addq $0x18, %rax movq %rax, 0x18(%rsp) movq 0x70(%rsp), %rsi leaq 0x30(%rsp), %rdi callq 0xe250 jmp 0xa6f6 leaq 0x48(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0xe350 movq 0x18(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0xe220 jmp 0xa715 leaq 0x30(%rsp), %rdi callq 0xe370 testb $0x1, 0x6f(%rsp) je 0xa77f leaq 0x58(%rsp), %rdi movq %rdi, (%rsp) callq 0xe160 movq %rax, %rdi addq $0x2b8, %rdi # imm = 0x2B8 callq 0xe3a0 movq 0x8(%rsp), %rdi movq (%rsp), %rsi callq 0xa7b0 jmp 0xa753 jmp 0xa77f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) jmp 0xa791 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x28(%rsp) movl %eax, 0x24(%rsp) leaq 0x30(%rsp), %rdi callq 0xe370 jmp 0xa791 leaq 0x58(%rsp), %rdi callq 0x6970 addq $0x88, %rsp retq leaq 0x58(%rsp), %rdi callq 0x6970 movq 0x28(%rsp), %rdi callq 0x4490 nopw %cs:(%rax,%rax)
_ZN7emittra7Emittra4emitERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISt3anySaISA_EEb: sub rsp, 88h mov al, cl mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi mov [rsp+88h+var_18], rdx and al, 1 mov [rsp+88h+var_19], al mov rsi, [rsp+88h+var_8] mov [rsp+88h+var_80], rsi mov rdx, [rsp+88h+var_10] lea rdi, [rsp+88h+var_30] mov [rsp+88h+var_78], rdi call _ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; emittra::Emittra::get_or_create_event_data(std::string const&) mov rdi, [rsp+88h+var_78] call _ZNKSt19__shared_ptr_accessIN7emittra7Emittra9EventDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) add rax, 18h mov [rsp+88h+var_70], rax mov rsi, [rsp+88h+var_18] lea rdi, [rsp+88h+var_58] call _ZNSt6vectorISt3anySaIS0_EEC2ERKS2_; std::vector<std::any>::vector(std::vector<std::any> const&) jmp short $+2 loc_A6F6: lea rdi, [rsp+88h+var_40] xor eax, eax mov esi, eax call _ZNSt10shared_ptrISt7promiseISt3anyEEC2EDn; std::shared_ptr<std::promise<std::any>>::shared_ptr(decltype(nullptr)) mov rdi, [rsp+88h+var_70] lea rsi, [rsp+88h+var_58] call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE7enqueueEOS3_; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::enqueue(emittra::Emittra::QueuedEvent&&) jmp short $+2 loc_A715: lea rdi, [rsp+88h+var_58]; this call _ZN7emittra7Emittra11QueuedEventD2Ev; emittra::Emittra::QueuedEvent::~QueuedEvent() test [rsp+88h+var_19], 1 jz short loc_A77F lea rdi, [rsp+88h+var_30] mov [rsp+88h+var_88], rdi call _ZNKSt19__shared_ptr_accessIN7emittra7Emittra9EventDataELN9__gnu_cxx12_Lock_policyE2ELb0ELb0EEptEv; std::__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(void) mov rdi, rax add rdi, 2B8h; this call _ZNSt3_V222condition_variable_any10notify_oneEv; std::_V2::condition_variable_any::notify_one(void) mov rdi, [rsp+88h+var_80] mov rsi, [rsp+88h+var_88] call _ZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS0_9EventDataEE; emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&) jmp short $+2 loc_A753: jmp short loc_A77F mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax jmp short loc_A791 mov rcx, rax mov eax, edx mov [rsp+arg_20], rcx mov [rsp+arg_1C], eax lea rdi, [rsp+arg_28]; this call _ZN7emittra7Emittra11QueuedEventD2Ev; emittra::Emittra::QueuedEvent::~QueuedEvent() jmp short loc_A791 loc_A77F: lea rdi, [rsp+88h+var_30] call _ZNSt10shared_ptrIN7emittra7Emittra9EventDataEED2Ev; std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr() add rsp, 88h retn loc_A791: lea rdi, [rsp+arg_50] call _ZNSt10shared_ptrIN7emittra7Emittra9EventDataEED2Ev; std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr() mov rdi, [rsp+arg_20] call __Unwind_Resume
long long emittra::Emittra::emit(long long a1, long long a2, long long a3, char a4) { int v4; // edx int v5; // ecx int v6; // r8d int v7; // r9d long long v8; // rax int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d long long v14; // [rsp+18h] [rbp-70h] _BYTE v15[24]; // [rsp+30h] [rbp-58h] BYREF _BYTE v16[16]; // [rsp+48h] [rbp-40h] BYREF _BYTE v17[23]; // [rsp+58h] [rbp-30h] BYREF char v18; // [rsp+6Fh] [rbp-19h] long long v19; // [rsp+70h] [rbp-18h] long long v20; // [rsp+78h] [rbp-10h] long long v21; // [rsp+80h] [rbp-8h] v21 = a1; v20 = a2; v19 = a3; v18 = a4 & 1; emittra::Emittra::get_or_create_event_data((long long)v17, a1, a2); v14 = std::__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v17) + 24; std::vector<std::any>::vector((unsigned int)v15, v19, v4, v5, v6, v7); std::shared_ptr<std::promise<std::any>>::shared_ptr(v16, 0LL); moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::enqueue(v14, v15); emittra::Emittra::QueuedEvent::~QueuedEvent((emittra::Emittra::QueuedEvent *)v15); if ( (v18 & 1) != 0 ) { v8 = std::__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>::operator->(v17); std::_V2::condition_variable_any::notify_one((std::_V2::condition_variable_any *)(v8 + 696)); emittra::Emittra::notify_associated_cvs( a1, (unsigned int)v17, v9, v10, v11, v12, (unsigned int)v17, a1, (unsigned int)v17, v14); } return std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr((long long)v17); }
emit: SUB RSP,0x88 MOV AL,CL MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV qword ptr [RSP + 0x70],RDX AND AL,0x1 MOV byte ptr [RSP + 0x6f],AL MOV RSI,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x8],RSI MOV RDX,qword ptr [RSP + 0x78] LEA RDI,[RSP + 0x58] MOV qword ptr [RSP + 0x10],RDI CALL 0x0010a3d0 MOV RDI,qword ptr [RSP + 0x10] CALL 0x0010e160 ADD RAX,0x18 MOV qword ptr [RSP + 0x18],RAX MOV RSI,qword ptr [RSP + 0x70] LAB_0010a6ea: LEA RDI,[RSP + 0x30] CALL 0x0010e250 JMP 0x0010a6f6 LAB_0010a6f6: LEA RDI,[RSP + 0x48] XOR EAX,EAX MOV ESI,EAX CALL 0x0010e350 MOV RDI,qword ptr [RSP + 0x18] LAB_0010a709: LEA RSI,[RSP + 0x30] CALL 0x0010e220 JMP 0x0010a715 LAB_0010a715: LEA RDI,[RSP + 0x30] CALL 0x0010e370 TEST byte ptr [RSP + 0x6f],0x1 JZ 0x0010a77f LEA RDI,[RSP + 0x58] MOV qword ptr [RSP],RDI CALL 0x0010e160 MOV RDI,RAX ADD RDI,0x2b8 CALL 0x0010e3a0 MOV RDI,qword ptr [RSP + 0x8] MOV RSI,qword ptr [RSP] LAB_0010a74c: CALL 0x0010a7b0 LAB_0010a751: JMP 0x0010a753 LAB_0010a753: JMP 0x0010a77f LAB_0010a77f: LEA RDI,[RSP + 0x58] CALL 0x00106970 ADD RSP,0x88 RET
/* emittra::Emittra::emit(std::__cxx11::string const&, std::vector<std::any, std::allocator<std::any> > const&, bool) */ void __thiscall emittra::Emittra::emit(Emittra *this,string *param_1,vector *param_2,bool param_3) { long lVar1; vector<std::any,std::allocator<std::any>> local_58 [24]; int1 local_40 [16]; string local_30 [23]; byte local_19; vector *local_18; string *local_10; Emittra *local_8; local_19 = param_3; local_18 = param_2; local_10 = param_1; local_8 = this; get_or_create_event_data(local_30); lVar1 = std:: __shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false>:: operator->((__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false> *)local_30); /* try { // try from 0010a6ea to 0010a6f3 has its CatchHandler @ 0010a755 */ std::vector<std::any,std::allocator<std::any>>::vector(local_58,local_18); std::shared_ptr<std::promise<std::any>>::shared_ptr((_func_decltype_nullptr *)local_40); /* try { // try from 0010a709 to 0010a712 has its CatchHandler @ 0010a765 */ moodycamel:: ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::enqueue ((ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> *)(lVar1 + 0x18),(QueuedEvent *)local_58); QueuedEvent::~QueuedEvent((QueuedEvent *)local_58); if ((local_19 & 1) != 0) { lVar1 = std:: __shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false> ::operator->((__shared_ptr_access<emittra::Emittra::EventData,(__gnu_cxx::_Lock_policy)2,false,false> *)local_30); std::_V2::condition_variable_any::notify_one((condition_variable_any *)(lVar1 + 0x2b8)); /* try { // try from 0010a74c to 0010a750 has its CatchHandler @ 0010a755 */ notify_associated_cvs(this,(shared_ptr *)local_30); } std::shared_ptr<emittra::Emittra::EventData>::~shared_ptr ((shared_ptr<emittra::Emittra::EventData> *)local_30); return; }
13,495
emittra::Emittra::emit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::any, std::allocator<std::any>> const&, bool)
angrymouse[P]emittra/src/emittra.cpp
void Emittra::emit(const std::string& event_name, const std::vector<std::any>& args, bool notify) { auto event_data = get_or_create_event_data(event_name); event_data->event_queue.enqueue({args, nullptr}); if (notify) { event_data->cv.notify_one(); notify_associated_cvs(event_data); } }
O1
cpp
emittra::Emittra::emit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::any, std::allocator<std::any>> const&, bool): pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movl %ecx, %ebx movq %rdx, %r15 movq %rsi, %rdx movq %rdi, %rsi leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x4c50 movq (%r14), %r14 leaq 0x18(%rsp), %rdi movq %r15, %rsi callq 0x6582 leaq 0x18(%r14), %rdi xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rsp) callq 0x7b7a testq %rax, %rax je 0x4eb2 leaq 0x18(%rsp), %rsi movq %rax, %rdi callq 0x7e18 movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x4ec1 callq 0x4352 leaq 0x18(%rsp), %rdi callq 0x46fa testb %bl, %bl je 0x4ee8 addq $0x2b8, %r14 # imm = 0x2B8 movq %r14, %rdi callq 0x6628 leaq 0x8(%rsp), %rsi callq 0x4f2c movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x4ef7 callq 0x4352 addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0x4f03 movq %rax, %rbx jmp 0x4f15 movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x660c movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x4f24 callq 0x4352 movq %rbx, %rdi callq 0x3450
_ZN7emittra7Emittra4emitERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISt3anySaISA_EEb: push r15 push r14 push rbx sub rsp, 40h mov ebx, ecx mov r15, rdx mov rdx, rsi mov rsi, rdi lea r14, [rsp+58h+var_50] mov rdi, r14 call _ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; emittra::Emittra::get_or_create_event_data(std::string const&) mov r14, [r14] lea rdi, [rsp+58h+var_40] mov rsi, r15 call _ZNSt6vectorISt3anySaIS0_EEC2ERKS2_; std::vector<std::any>::vector(std::vector<std::any> const&) lea rdi, [r14+18h] xorps xmm0, xmm0 movups [rsp+58h+var_28], xmm0 call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE28get_or_add_implicit_producerEv; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::get_or_add_implicit_producer(void) test rax, rax jz short loc_4EB2 lea rsi, [rsp+58h+var_40] mov rdi, rax call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ImplicitProducer7enqueueILNS5_14AllocationModeE0ES3_EEbOT0_; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::enqueue<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0,emittra::Emittra::QueuedEvent>(emittra::Emittra::QueuedEvent &&) loc_4EB2: mov rdi, qword ptr [rsp+58h+var_28+8] test rdi, rdi jz short loc_4EC1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4EC1: lea rdi, [rsp+58h+var_40] call _ZNSt6vectorISt3anySaIS0_EED2Ev; std::vector<std::any>::~vector() test bl, bl jz short loc_4EE8 add r14, 2B8h mov rdi, r14; this call _ZNSt3_V222condition_variable_any10notify_oneEv; std::_V2::condition_variable_any::notify_one(void) lea rsi, [rsp+58h+var_50] call _ZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS0_9EventDataEE; emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&) loc_4EE8: mov rdi, [rsp+58h+var_48] test rdi, rdi jz short loc_4EF7 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4EF7: add rsp, 40h pop rbx pop r14 pop r15 retn jmp short $+2 loc_4F03: mov rbx, rax jmp short loc_4F15 mov rbx, rax lea rdi, [rsp+arg_10]; this call _ZN7emittra7Emittra11QueuedEventD2Ev; emittra::Emittra::QueuedEvent::~QueuedEvent() loc_4F15: mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_4F24 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4F24: mov rdi, rbx call __Unwind_Resume
void emittra::Emittra::emit(std::__shared_mutex_pthread *a1, long long a2, long long a3, char a4) { long long v6; // r14 long long v7; // rax long long v8; // [rsp+8h] [rbp-50h] BYREF volatile signed __int32 *v9; // [rsp+10h] [rbp-48h] _QWORD v10[3]; // [rsp+18h] [rbp-40h] BYREF __int128 v11; // [rsp+30h] [rbp-28h] emittra::Emittra::get_or_create_event_data(&v8, a1, a2); v6 = v8; std::vector<std::any>::vector(v10, a3); v11 = 0LL; v7 = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::get_or_add_implicit_producer(v6 + 24); if ( v7 ) moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::enqueue<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0,emittra::Emittra::QueuedEvent>( v7, v10); if ( *((_QWORD *)&v11 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v11 + 1)); std::vector<std::any>::~vector(v10); if ( a4 ) { std::_V2::condition_variable_any::notify_one((std::_V2::condition_variable_any *)(v6 + 696)); emittra::Emittra::notify_associated_cvs(v6 + 696, &v8); } if ( v9 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v9); }
emit: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV EBX,ECX MOV R15,RDX MOV RDX,RSI MOV RSI,RDI LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00104c50 MOV R14,qword ptr [R14] LAB_00104e82: LEA RDI,[RSP + 0x18] MOV RSI,R15 CALL 0x00106582 LEA RDI,[R14 + 0x18] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x30],XMM0 LAB_00104e9b: CALL 0x00107b7a TEST RAX,RAX JZ 0x00104eb2 LEA RSI,[RSP + 0x18] MOV RDI,RAX CALL 0x00107e18 LAB_00104eb2: MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x00104ec1 CALL 0x00104352 LAB_00104ec1: LEA RDI,[RSP + 0x18] CALL 0x001046fa TEST BL,BL JZ 0x00104ee8 ADD R14,0x2b8 MOV RDI,R14 CALL 0x00106628 LAB_00104ede: LEA RSI,[RSP + 0x8] CALL 0x00104f2c LAB_00104ee8: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x00104ef7 CALL 0x00104352 LAB_00104ef7: ADD RSP,0x40 POP RBX POP R14 POP R15 RET
/* emittra::Emittra::emit(std::__cxx11::string const&, std::vector<std::any, std::allocator<std::any> > const&, bool) */ void __thiscall emittra::Emittra::emit(Emittra *this,string *param_1,vector *param_2,bool param_3) { ImplicitProducer *this_00; Emittra *this_01; long local_50; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; vector<std::any,std::allocator<std::any>> local_40 [24]; int8 local_28; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_20; get_or_create_event_data((string *)&local_50); /* try { // try from 00104e82 to 00104e8e has its CatchHandler @ 00104f03 */ std::vector<std::any,std::allocator<std::any>>::vector(local_40,param_2); local_28 = 0; p_Stack_20 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; /* try { // try from 00104e9b to 00104eb1 has its CatchHandler @ 00104f08 */ this_00 = (ImplicitProducer *) moodycamel:: ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> ::get_or_add_implicit_producer ((ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> *)(local_50 + 0x18)); if (this_00 != (ImplicitProducer *)0x0) { moodycamel:: ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>:: ImplicitProducer:: enqueue<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0,emittra::Emittra::QueuedEvent> (this_00,(QueuedEvent *)local_40); } if (p_Stack_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_20); } std::vector<std::any,std::allocator<std::any>>::~vector(local_40); if (param_3) { this_01 = (Emittra *)(local_50 + 0x2b8); std::_V2::condition_variable_any::notify_one((condition_variable_any *)this_01); /* try { // try from 00104ede to 00104ee7 has its CatchHandler @ 00104f01 */ notify_associated_cvs(this_01,(shared_ptr *)&local_50); } 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); } return; }
13,496
emittra::Emittra::emit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::any, std::allocator<std::any>> const&, bool)
angrymouse[P]emittra/src/emittra.cpp
void Emittra::emit(const std::string& event_name, const std::vector<std::any>& args, bool notify) { auto event_data = get_or_create_event_data(event_name); event_data->event_queue.enqueue({args, nullptr}); if (notify) { event_data->cv.notify_one(); notify_associated_cvs(event_data); } }
O3
cpp
emittra::Emittra::emit(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<std::any, std::allocator<std::any>> const&, bool): pushq %r15 pushq %r14 pushq %rbx subq $0x40, %rsp movl %ecx, %ebx movq %rdx, %r15 movq %rsi, %rdx movq %rdi, %rsi leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x4c28 movq (%r14), %r14 leaq 0x18(%rsp), %rdi movq %r15, %rsi callq 0x6560 leaq 0x18(%r14), %rdi xorps %xmm0, %xmm0 movups %xmm0, 0x30(%rsp) callq 0x7b08 testq %rax, %rax je 0x4e8c leaq 0x18(%rsp), %rsi movq %rax, %rdi callq 0x7d3c movq 0x38(%rsp), %rdi testq %rdi, %rdi je 0x4e9b callq 0x4334 leaq 0x18(%rsp), %rdi callq 0x46e8 testb %bl, %bl je 0x4ec2 addq $0x2b8, %r14 # imm = 0x2B8 movq %r14, %rdi callq 0x6606 leaq 0x8(%rsp), %rsi callq 0x4f06 movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x4ed1 callq 0x4334 addq $0x40, %rsp popq %rbx popq %r14 popq %r15 retq jmp 0x4edd movq %rax, %rbx jmp 0x4eef movq %rax, %rbx leaq 0x18(%rsp), %rdi callq 0x65ea movq 0x10(%rsp), %rdi testq %rdi, %rdi je 0x4efe callq 0x4334 movq %rbx, %rdi callq 0x3450
_ZN7emittra7Emittra4emitERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorISt3anySaISA_EEb: push r15 push r14 push rbx sub rsp, 40h mov ebx, ecx mov r15, rdx mov rdx, rsi mov rsi, rdi lea r14, [rsp+58h+var_50] mov rdi, r14 call _ZN7emittra7Emittra24get_or_create_event_dataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; emittra::Emittra::get_or_create_event_data(std::string const&) mov r14, [r14] lea rdi, [rsp+58h+var_40] mov rsi, r15 call _ZNSt6vectorISt3anySaIS0_EEC2ERKS2_; std::vector<std::any>::vector(std::vector<std::any> const&) lea rdi, [r14+18h] xorps xmm0, xmm0 movups [rsp+58h+var_28], xmm0 call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE28get_or_add_implicit_producerEv; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::get_or_add_implicit_producer(void) test rax, rax jz short loc_4E8C lea rsi, [rsp+58h+var_40] mov rdi, rax call _ZN10moodycamel15ConcurrentQueueIN7emittra7Emittra11QueuedEventENS_28ConcurrentQueueDefaultTraitsEE16ImplicitProducer7enqueueILNS5_14AllocationModeE0ES3_EEbOT0_; moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::enqueue<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0,emittra::Emittra::QueuedEvent>(emittra::Emittra::QueuedEvent &&) loc_4E8C: mov rdi, qword ptr [rsp+58h+var_28+8] test rdi, rdi jz short loc_4E9B call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4E9B: lea rdi, [rsp+58h+var_40] call _ZNSt6vectorISt3anySaIS0_EED2Ev; std::vector<std::any>::~vector() test bl, bl jz short loc_4EC2 add r14, 2B8h mov rdi, r14; this call _ZNSt3_V222condition_variable_any10notify_oneEv; std::_V2::condition_variable_any::notify_one(void) lea rsi, [rsp+58h+var_50] call _ZN7emittra7Emittra21notify_associated_cvsERKSt10shared_ptrINS0_9EventDataEE; emittra::Emittra::notify_associated_cvs(std::shared_ptr<emittra::Emittra::EventData> const&) loc_4EC2: mov rdi, [rsp+58h+var_48] test rdi, rdi jz short loc_4ED1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4ED1: add rsp, 40h pop rbx pop r14 pop r15 retn jmp short $+2 loc_4EDD: mov rbx, rax jmp short loc_4EEF mov rbx, rax lea rdi, [rsp+arg_10]; this call _ZN7emittra7Emittra11QueuedEventD2Ev; emittra::Emittra::QueuedEvent::~QueuedEvent() loc_4EEF: mov rdi, [rsp+arg_8] test rdi, rdi jz short loc_4EFE call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_4EFE: mov rdi, rbx call __Unwind_Resume
void emittra::Emittra::emit(std::__shared_mutex_pthread *a1, long long a2, long long a3, char a4) { long long v6; // r14 long long v7; // rax int v8; // edx int v9; // ecx int v10; // r8d int v11; // r9d long long v12; // [rsp+8h] [rbp-50h] BYREF volatile signed __int32 *v13; // [rsp+10h] [rbp-48h] _QWORD v14[3]; // [rsp+18h] [rbp-40h] BYREF __int128 v15; // [rsp+30h] [rbp-28h] emittra::Emittra::get_or_create_event_data(&v12, a1, a2); v6 = v12; std::vector<std::any>::vector(v14, a3); v15 = 0LL; v7 = moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::get_or_add_implicit_producer(v6 + 24); if ( v7 ) moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::ImplicitProducer::enqueue<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0,emittra::Emittra::QueuedEvent>( v7, v14); if ( *((_QWORD *)&v15 + 1) ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(*((volatile signed __int32 **)&v15 + 1)); std::vector<std::any>::~vector(v14); if ( a4 ) { std::_V2::condition_variable_any::notify_one((std::_V2::condition_variable_any *)(v6 + 696)); emittra::Emittra::notify_associated_cvs(v6 + 696, (unsigned int)&v12, v8, v9, v10, v11); } if ( v13 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v13); }
emit: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x40 MOV EBX,ECX MOV R15,RDX MOV RDX,RSI MOV RSI,RDI LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x00104c28 MOV R14,qword ptr [R14] LAB_00104e5c: LEA RDI,[RSP + 0x18] MOV RSI,R15 CALL 0x00106560 LEA RDI,[R14 + 0x18] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RSP + 0x30],XMM0 LAB_00104e75: CALL 0x00107b08 TEST RAX,RAX JZ 0x00104e8c LEA RSI,[RSP + 0x18] MOV RDI,RAX CALL 0x00107d3c LAB_00104e8c: MOV RDI,qword ptr [RSP + 0x38] TEST RDI,RDI JZ 0x00104e9b CALL 0x00104334 LAB_00104e9b: LEA RDI,[RSP + 0x18] CALL 0x001046e8 TEST BL,BL JZ 0x00104ec2 ADD R14,0x2b8 MOV RDI,R14 CALL 0x00106606 LAB_00104eb8: LEA RSI,[RSP + 0x8] CALL 0x00104f06 LAB_00104ec2: MOV RDI,qword ptr [RSP + 0x10] TEST RDI,RDI JZ 0x00104ed1 CALL 0x00104334 LAB_00104ed1: ADD RSP,0x40 POP RBX POP R14 POP R15 RET
/* emittra::Emittra::emit(std::__cxx11::string const&, std::vector<std::any, std::allocator<std::any> > const&, bool) */ void __thiscall emittra::Emittra::emit(Emittra *this,string *param_1,vector *param_2,bool param_3) { ImplicitProducer *this_00; Emittra *this_01; long local_50; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_48; vector<std::any,std::allocator<std::any>> local_40 [24]; int8 local_28; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *p_Stack_20; get_or_create_event_data((string *)&local_50); /* try { // try from 00104e5c to 00104e68 has its CatchHandler @ 00104edd */ std::vector<std::any,std::allocator<std::any>>::vector(local_40,param_2); local_28 = 0; p_Stack_20 = (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0; /* try { // try from 00104e75 to 00104e8b has its CatchHandler @ 00104ee2 */ this_00 = (ImplicitProducer *) moodycamel:: ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> ::get_or_add_implicit_producer ((ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits> *)(local_50 + 0x18)); if (this_00 != (ImplicitProducer *)0x0) { moodycamel:: ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>:: ImplicitProducer:: enqueue<(moodycamel::ConcurrentQueue<emittra::Emittra::QueuedEvent,moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0,emittra::Emittra::QueuedEvent> (this_00,(QueuedEvent *)local_40); } if (p_Stack_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(p_Stack_20); } std::vector<std::any,std::allocator<std::any>>::~vector(local_40); if (param_3) { this_01 = (Emittra *)(local_50 + 0x2b8); std::_V2::condition_variable_any::notify_one((condition_variable_any *)this_01); /* try { // try from 00104eb8 to 00104ec1 has its CatchHandler @ 00104edb */ notify_associated_cvs(this_01,(shared_ptr *)&local_50); } 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); } return; }
13,497
coro::semaphore::notify_waiters()
AlayaLite/build_O3/_deps/libcoro-src/src/semaphore.cpp
auto semaphore::notify_waiters() noexcept -> void { m_notify_all_set.exchange(true, std::memory_order::release); while (true) { std::unique_lock lk{m_waiter_mutex}; if (m_acquire_waiters != nullptr) { acquire_operation* to_resume = m_acquire_waiters; m_acquire_waiters = m_acquire_waiters->m_next; lk.unlock(); to_resume->m_awaiting_coroutine.resume(); } else { break; } } }
O3
cpp
coro::semaphore::notify_waiters(): pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdi, %rbx movb $0x1, %al xchgb %al, 0x40(%rdi) leaq 0x10(%rdi), %r15 leaq 0x8(%rsp), %r14 movq %r15, 0x8(%rsp) movb $0x0, 0x10(%rsp) movq %r14, %rdi callq 0x2e99c movb $0x1, 0x10(%rsp) movq 0x38(%rbx), %r12 testq %r12, %r12 je 0xc8886 movq 0x10(%r12), %rax movq %rax, 0x38(%rbx) movq %r14, %rdi callq 0x2e9d8 movq 0x8(%r12), %rdi callq *(%rdi) movq %r14, %rdi callq 0x2e986 jmp 0xc8844 leaq 0x8(%rsp), %rdi callq 0x2e986 addq $0x18, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rdi callq 0x1f2c3
_ZN4coro9semaphore14notify_waitersEv: push r15 push r14 push r12 push rbx sub rsp, 18h mov rbx, rdi mov al, 1 xchg al, [rdi+40h] lea r15, [rdi+10h] lea r14, [rsp+38h+var_30] loc_C8844: mov [rsp+38h+var_30], r15 mov [rsp+38h+var_28], 0 mov rdi, r14 call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void) mov [rsp+38h+var_28], 1 mov r12, [rbx+38h] test r12, r12 jz short loc_C8886 mov rax, [r12+10h] mov [rbx+38h], rax mov rdi, r14 call _ZNSt11unique_lockISt5mutexE6unlockEv; std::unique_lock<std::mutex>::unlock(void) mov rdi, [r12+8] call qword ptr [rdi] mov rdi, r14 call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() jmp short loc_C8844 loc_C8886: lea rdi, [rsp+38h+var_30] call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() add rsp, 18h pop rbx pop r12 pop r14 pop r15 retn mov rdi, rax call __clang_call_terminate
long long coro::semaphore::notify_waiters(coro::semaphore *this) { long long result; // rax long long v2; // r12 long long v3; // [rsp+8h] [rbp-30h] BYREF char v4; // [rsp+10h] [rbp-28h] *((_BYTE *)this + 64) = 1; while ( 1 ) { v3 = (long long)this + 16; v4 = 0; result = std::unique_lock<std::mutex>::lock(&v3); v4 = 1; v2 = *((_QWORD *)this + 7); if ( !v2 ) break; *((_QWORD *)this + 7) = *(_QWORD *)(v2 + 16); std::unique_lock<std::mutex>::unlock(&v3); (**(void (***)(void))(v2 + 8))(); std::unique_lock<std::mutex>::~unique_lock((long long)&v3); } std::unique_lock<std::mutex>::~unique_lock((long long)&v3); return result; }
notify_waiters: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,RDI MOV AL,0x1 XCHG byte ptr [RDI + 0x40],AL LEA R15,[RDI + 0x10] LEA R14,[RSP + 0x8] LAB_001c8844: MOV qword ptr [RSP + 0x8],R15 MOV byte ptr [RSP + 0x10],0x0 LAB_001c884e: MOV RDI,R14 CALL 0x0012e99c MOV byte ptr [RSP + 0x10],0x1 MOV R12,qword ptr [RBX + 0x38] TEST R12,R12 JZ 0x001c8886 MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RBX + 0x38],RAX MOV RDI,R14 CALL 0x0012e9d8 MOV RDI,qword ptr [R12 + 0x8] CALL qword ptr [RDI] MOV RDI,R14 CALL 0x0012e986 JMP 0x001c8844 LAB_001c8886: LEA RDI,[RSP + 0x8] CALL 0x0012e986 ADD RSP,0x18 POP RBX POP R12 POP R14 POP R15 RET
/* coro::semaphore::notify_waiters() */ void __thiscall coro::semaphore::notify_waiters(semaphore *this) { long lVar1; semaphore *local_30; int1 local_28; LOCK(); this[0x40] = (semaphore)0x1; UNLOCK(); while( true ) { local_28 = 0; local_30 = this + 0x10; /* try { // try from 001c884e to 001c887b has its CatchHandler @ 001c889c */ std::unique_lock<std::mutex>::lock((unique_lock<std::mutex> *)&local_30); local_28 = 1; lVar1 = *(long *)(this + 0x38); if (lVar1 == 0) break; *(int8 *)(this + 0x38) = *(int8 *)(lVar1 + 0x10); std::unique_lock<std::mutex>::unlock((unique_lock<std::mutex> *)&local_30); (*(code *)**(int8 **)(lVar1 + 8))(); std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_30); } std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_30); return; }
13,498
destroy_cond(PFS_cond*)
eloqsql/storage/perfschema/pfs_instr.cc
void destroy_cond(PFS_cond *pfs) { assert(pfs != NULL); PFS_cond_class *klass= pfs->m_class; /* Aggregate to EVENTS_WAITS_SUMMARY_GLOBAL_BY_EVENT_NAME */ klass->m_cond_stat.aggregate(& pfs->m_cond_stat); pfs->m_cond_stat.reset(); if (klass->is_singleton()) klass->m_singleton= NULL; global_cond_container.deallocate(pfs); }
O0
cpp
destroy_cond(PFS_cond*): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rdi addq $0xa0, %rdi movq -0x8(%rbp), %rsi addq $0x20, %rsi callq 0x3c9a0 movq -0x8(%rbp), %rdi addq $0x20, %rdi callq 0x3c980 movq -0x10(%rbp), %rdi callq 0x3c110 testb $0x1, %al jne 0x37a4c jmp 0x37a5b movq -0x10(%rbp), %rax movq $0x0, 0xc0(%rax) movq -0x8(%rbp), %rsi leaq 0x397172(%rip), %rdi # 0x3cebd8 callq 0x3c9d0 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_Z12destroy_condP8PFS_cond: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov rax, [rax+18h] mov [rbp+var_10], rax mov rdi, [rbp+var_10] add rdi, 0A0h; this mov rsi, [rbp+var_8] add rsi, 20h ; ' '; PFS_cond_stat * call _ZN13PFS_cond_stat9aggregateEPKS_; PFS_cond_stat::aggregate(PFS_cond_stat const*) mov rdi, [rbp+var_8] add rdi, 20h ; ' '; this call _ZN13PFS_cond_stat5resetEv; PFS_cond_stat::reset(void) mov rdi, [rbp+var_10]; this call _ZNK15PFS_instr_class12is_singletonEv; PFS_instr_class::is_singleton(void) test al, 1 jnz short loc_37A4C jmp short loc_37A5B loc_37A4C: mov rax, [rbp+var_10] mov qword ptr [rax+0C0h], 0 loc_37A5B: mov rsi, [rbp+var_8] lea rdi, global_cond_container call _ZN29PFS_buffer_scalable_containerI8PFS_condLi256ELi256E24PFS_buffer_default_arrayIS0_E28PFS_buffer_default_allocatorIS0_EE10deallocateEPS0_; PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>::deallocate(PFS_cond*) add rsp, 10h pop rbp retn
long long destroy_cond(long long a1) { PFS_instr_class *v2; // [rsp+0h] [rbp-10h] v2 = *(PFS_instr_class **)(a1 + 24); PFS_cond_stat::aggregate((PFS_instr_class *)((char *)v2 + 160), (const PFS_cond_stat *)(a1 + 32)); PFS_cond_stat::reset((PFS_cond_stat *)(a1 + 32)); if ( (PFS_instr_class::is_singleton(v2) & 1) != 0 ) *((_QWORD *)v2 + 24) = 0LL; return PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>>::deallocate( &global_cond_container, a1); }
destroy_cond: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x10],RAX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0xa0 MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x20 CALL 0x0013c9a0 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x20 CALL 0x0013c980 MOV RDI,qword ptr [RBP + -0x10] CALL 0x0013c110 TEST AL,0x1 JNZ 0x00137a4c JMP 0x00137a5b LAB_00137a4c: MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0xc0],0x0 LAB_00137a5b: MOV RSI,qword ptr [RBP + -0x8] LEA RDI,[0x4cebd8] CALL 0x0013c9d0 ADD RSP,0x10 POP RBP RET
/* destroy_cond(PFS_cond*) */ void destroy_cond(PFS_cond *param_1) { PFS_instr_class *this; ulong uVar1; this = *(PFS_instr_class **)(param_1 + 0x18); PFS_cond_stat::aggregate((PFS_cond_stat *)(this + 0xa0),(PFS_cond_stat *)(param_1 + 0x20)); PFS_cond_stat::reset((PFS_cond_stat *)(param_1 + 0x20)); uVar1 = PFS_instr_class::is_singleton(this); if ((uVar1 & 1) != 0) { *(int8 *)(this + 0xc0) = 0; } PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>> ::deallocate((PFS_buffer_scalable_container<PFS_cond,256,256,PFS_buffer_default_array<PFS_cond>,PFS_buffer_default_allocator<PFS_cond>> *)global_cond_container,param_1); return; }
13,499
my_uca_coll_init_utf8mb3
eloqsql/strings/ctype-uca.c
static my_bool my_uca_coll_init_utf8mb3(struct charset_info_st *cs, MY_CHARSET_LOADER *loader) { if (my_coll_init_uca(cs, loader)) return TRUE; if (my_uca_collation_can_optimize_no_contractions(cs)) my_uca_handler_map(cs, &my_uca_package_utf8mb3, &my_uca_package_no_contractions_utf8mb3); return FALSE; }
O0
c
my_uca_coll_init_utf8mb3: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi callq 0x49550 cmpb $0x0, %al je 0x4a9e7 movb $0x1, -0x1(%rbp) jmp 0x4aa0f movq -0x10(%rbp), %rdi callq 0x55540 cmpb $0x0, %al je 0x4aa0b movq -0x10(%rbp), %rdi leaq 0x275d41(%rip), %rsi # 0x2c0740 leaq 0x275d5a(%rip), %rdx # 0x2c0760 callq 0x555a0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
my_uca_coll_init_utf8mb3: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] call my_coll_init_uca cmp al, 0 jz short loc_4A9E7 mov [rbp+var_1], 1 jmp short loc_4AA0F loc_4A9E7: mov rdi, [rbp+var_10] call my_uca_collation_can_optimize_no_contractions cmp al, 0 jz short loc_4AA0B mov rdi, [rbp+var_10] lea rsi, my_uca_package_utf8mb3 lea rdx, my_uca_package_no_contractions_utf8mb3 call my_uca_handler_map loc_4AA0B: mov [rbp+var_1], 0 loc_4AA0F: mov al, [rbp+var_1] add rsp, 20h pop rbp retn
char my_uca_coll_init_utf8mb3(long long a1, long long a2) { if ( (unsigned __int8)my_coll_init_uca(a1, a2) ) return 1; if ( (unsigned __int8)my_uca_collation_can_optimize_no_contractions(a1) ) my_uca_handler_map(a1, my_uca_package_utf8mb3, my_uca_package_no_contractions_utf8mb3); return 0; }
my_uca_coll_init_utf8mb3: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] CALL 0x00149550 CMP AL,0x0 JZ 0x0014a9e7 MOV byte ptr [RBP + -0x1],0x1 JMP 0x0014aa0f LAB_0014a9e7: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00155540 CMP AL,0x0 JZ 0x0014aa0b MOV RDI,qword ptr [RBP + -0x10] LEA RSI,[0x3c0740] LEA RDX,[0x3c0760] CALL 0x001555a0 LAB_0014aa0b: MOV byte ptr [RBP + -0x1],0x0 LAB_0014aa0f: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x20 POP RBP RET
int1 my_uca_coll_init_utf8mb3(int8 param_1,int8 param_2) { char cVar1; int1 local_9; cVar1 = my_coll_init_uca(param_1,param_2); if (cVar1 == '\0') { cVar1 = my_uca_collation_can_optimize_no_contractions(param_1); if (cVar1 != '\0') { my_uca_handler_map(param_1,my_uca_package_utf8mb3,my_uca_package_no_contractions_utf8mb3); } local_9 = 0; } else { local_9 = 1; } return local_9; }