index
int64
0
66.5k
func_name
stringlengths
2
5.36k
func_dep
stringlengths
16
2.19k
func
stringlengths
8
55.3k
test
stringlengths
0
7.07k
opt
stringclasses
4 values
language
stringclasses
2 values
asm
stringlengths
0
45.4k
ida_asm
stringlengths
0
44.7k
ida_pseudo
stringlengths
0
44.3k
ghidra_asm
stringlengths
0
49.1k
ghidra_pseudo
stringlengths
0
64.7k
46,700
std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
monkey531[P]llama/common/common.h
static std::vector<T> string_split(const std::string & str, char delim) { static_assert(!std::is_same<T, std::string>::value, "Please use the specialized version for std::string"); std::vector<T> values; std::istringstream str_stream(str); std::string token; while (std::getline(str_stream, token, delim)) { T value; std::istringstream token_stream(token); token_stream >> value; values.push_back(value); } return values; }
O3
c
std::vector<int, std::allocator<int>> string_split<int>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x328, %rsp # imm = 0x328 movq %rdi, %rbx xorps %xmm0, %xmm0 movups %xmm0, (%rdi) xorl %r14d, %r14d movq %r14, 0x10(%rdi) leaq 0x28(%rsp), %r15 movq %r15, %rdi movl $0x8, %edx callq 0x1aec0 leaq 0x18(%rsp), %rax movq %rax, -0x10(%rax) movq %r14, -0x8(%rax) movb $0x0, (%rax) leaq 0x8(%rsp), %r12 leaq 0x1a8(%rsp), %r13 leaq 0x4(%rsp), %rbp movq 0xd9941(%rip), %r14 # 0x12bf58 movq %r15, %rdi movq %r12, %rsi movl $0x2c, %edx callq 0x1b080 movq (%rax), %rcx movq -0x18(%rcx), %rcx testb $0x5, 0x20(%rax,%rcx) jne 0x5268f movq %r13, %rdi movq %r12, %rsi movl $0x8, %edx callq 0x1aec0 movq %r13, %rdi movq %rbp, %rsi callq 0x1a560 movq 0x8(%rbx), %rsi cmpq 0x10(%rbx), %rsi je 0x5266a movl 0x4(%rsp), %eax movl %eax, (%rsi) addq $0x4, %rsi movq %rsi, 0x8(%rbx) jmp 0x52675 movq %rbx, %rdi movq %rbp, %rdx callq 0x22b42 movq %r13, %rdi movq %r14, %rsi callq 0x1ac90 leaq 0x220(%rsp), %rdi callq 0x1a2a0 jmp 0x52617 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x526ab movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 movq 0xd98a6(%rip), %rsi # 0x12bf58 leaq 0x28(%rsp), %rdi callq 0x1ac90 leaq 0xa0(%rsp), %rdi callq 0x1a2a0 addq $0x328, %rsp # imm = 0x328 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x526dd movq %rax, %r14 jmp 0x52706 movq %rax, %r14 movq 0xd986c(%rip), %rsi # 0x12bf58 leaq 0x1a8(%rsp), %rdi callq 0x1ac90 leaq 0x220(%rsp), %rdi callq 0x1a2a0 movq 0x8(%rsp), %rdi leaq 0x18(%rsp), %rax cmpq %rax, %rdi je 0x52722 movq 0x18(%rsp), %rsi incq %rsi callq 0x1a8e0 movq 0xd982f(%rip), %rsi # 0x12bf58 leaq 0x28(%rsp), %rdi callq 0x1ac90 leaq 0xa0(%rsp), %rdi callq 0x1a2a0 movq (%rbx), %rdi testq %rdi, %rdi je 0x52754 movq 0x10(%rbx), %rsi subq %rdi, %rsi callq 0x1a8e0 movq %r14, %rdi callq 0x1afb0
_ZL12string_splitIiESt6vectorIT_SaIS1_EERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEc: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 328h mov rbx, rdi xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 xor r14d, r14d mov [rdi+10h], r14 lea r15, [rsp+358h+var_330] mov rdi, r15 mov edx, 8 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) lea rax, [rsp+358h+var_340] mov [rax-10h], rax mov [rax-8], r14 mov byte ptr [rax], 0 lea r12, [rsp+358h+var_350] lea r13, [rsp+358h+var_1B0] lea rbp, [rsp+358h+var_354] mov r14, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr loc_52617: mov rdi, r15 mov rsi, r12 mov edx, 2Ch ; ',' call __ZSt7getlineIcSt11char_traitsIcESaIcEERSt13basic_istreamIT_T0_ES7_RNSt7__cxx1112basic_stringIS4_S5_T1_EES4_; std::getline<char,std::char_traits<char>,std::allocator<char>>(std::istream &,std::string &,char) mov rcx, [rax] mov rcx, [rcx-18h] test byte ptr [rax+rcx+20h], 5 jnz short loc_5268F mov rdi, r13 mov rsi, r12 mov edx, 8 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEC1ERKNS_12basic_stringIcS2_S3_EESt13_Ios_Openmode; std::istringstream::basic_istringstream(std::string const&,std::_Ios_Openmode) mov rdi, r13 mov rsi, rbp call __ZNSirsERi; std::istream::operator>>(int &) mov rsi, [rbx+8] cmp rsi, [rbx+10h] jz short loc_5266A mov eax, [rsp+358h+var_354] mov [rsi], eax add rsi, 4 mov [rbx+8], rsi jmp short loc_52675 loc_5266A: mov rdi, rbx mov rdx, rbp call _ZNSt6vectorIiSaIiEE17_M_realloc_insertIJRKiEEEvN9__gnu_cxx17__normal_iteratorIPiS1_EEDpOT_; std::vector<int>::_M_realloc_insert<int const&>(__gnu_cxx::__normal_iterator<int *,std::vector<int>>,int const&) loc_52675: mov rdi, r13 mov rsi, r14 call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+358h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() jmp short loc_52617 loc_5268F: mov rdi, [rsp+358h+var_350]; void * lea rax, [rsp+358h+var_340] cmp rdi, rax jz short loc_526AB mov rsi, [rsp+358h+var_340] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_526AB: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+358h+var_330] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+358h+var_2B8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() add rsp, 328h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short $+2 loc_526DD: mov r14, rax jmp short loc_52706 mov r14, rax mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_1A0] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+arg_218]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_52706: mov rdi, [rsp+arg_0]; void * lea rax, [rsp+arg_10] cmp rdi, rax jz short loc_52722 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_52722: mov rsi, cs:_ZTTNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_20] call __ZNSt7__cxx1119basic_istringstreamIcSt11char_traitsIcESaIcEED2Ev; std::istringstream::~istringstream() lea rdi, [rsp+arg_98]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, [rbx]; void * test rdi, rdi jz short loc_52754 mov rsi, [rbx+10h] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_52754: mov rdi, r14 call __Unwind_Resume
void string_split<int>(long long *a1, long long a2) { _QWORD *v2; // rax _DWORD *v3; // rsi int v4; // [rsp+4h] [rbp-354h] BYREF void *v5[2]; // [rsp+8h] [rbp-350h] BYREF _QWORD v6[2]; // [rsp+18h] [rbp-340h] BYREF _BYTE v7[120]; // [rsp+28h] [rbp-330h] BYREF _BYTE v8[264]; // [rsp+A0h] [rbp-2B8h] BYREF _BYTE v9[120]; // [rsp+1A8h] [rbp-1B0h] BYREF _BYTE v10[312]; // [rsp+220h] [rbp-138h] BYREF *(_OWORD *)a1 = 0LL; a1[2] = 0LL; std::istringstream::basic_istringstream(v7, a2, 8LL); v5[0] = v6; v5[1] = 0LL; LOBYTE(v6[0]) = 0; while ( 1 ) { v2 = (_QWORD *)std::getline<char,std::char_traits<char>,std::allocator<char>>(v7, v5, 44LL); if ( (*((_BYTE *)v2 + *(_QWORD *)(*v2 - 24LL) + 32) & 5) != 0 ) break; std::istringstream::basic_istringstream(v9, v5, 8LL); std::istream::operator>>(v9, &v4); v3 = (_DWORD *)a1[1]; if ( v3 == (_DWORD *)a1[2] ) { std::vector<int>::_M_realloc_insert<int const&>(a1, (long long)v3, &v4); } else { *v3 = v4; a1[1] = (long long)(v3 + 1); } std::istringstream::~istringstream(v9, &`VTT for'std::istringstream); std::ios_base::~ios_base((std::ios_base *)v10); } if ( v5[0] != v6 ) operator delete(v5[0], v6[0] + 1LL); std::istringstream::~istringstream(v7, &`VTT for'std::istringstream); std::ios_base::~ios_base((std::ios_base *)v8); }
string_split<int>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x328 MOV RBX,RDI XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 XOR R14D,R14D MOV qword ptr [RDI + 0x10],R14 LEA R15,[RSP + 0x28] MOV RDI,R15 MOV EDX,0x8 CALL 0x0011aec0 LEA RAX,[RSP + 0x18] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],R14 MOV byte ptr [RAX],0x0 LEA R12,[RSP + 0x8] LEA R13,[RSP + 0x1a8] LEA RBP,[RSP + 0x4] MOV R14,qword ptr [0x0022bf58] LAB_00152617: MOV RDI,R15 MOV RSI,R12 MOV EDX,0x2c CALL 0x0011b080 MOV RCX,qword ptr [RAX] MOV RCX,qword ptr [RCX + -0x18] TEST byte ptr [RAX + RCX*0x1 + 0x20],0x5 JNZ 0x0015268f LAB_00152635: MOV RDI,R13 MOV RSI,R12 MOV EDX,0x8 CALL 0x0011aec0 LAB_00152645: MOV RDI,R13 MOV RSI,RBP CALL 0x0011a560 MOV RSI,qword ptr [RBX + 0x8] CMP RSI,qword ptr [RBX + 0x10] JZ 0x0015266a MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [RSI],EAX ADD RSI,0x4 MOV qword ptr [RBX + 0x8],RSI JMP 0x00152675 LAB_0015266a: MOV RDI,RBX MOV RDX,RBP CALL 0x00122b42 LAB_00152675: MOV RDI,R13 MOV RSI,R14 CALL 0x0011ac90 LEA RDI,[RSP + 0x220] CALL 0x0011a2a0 JMP 0x00152617 LAB_0015268f: MOV RDI,qword ptr [RSP + 0x8] LEA RAX,[RSP + 0x18] CMP RDI,RAX JZ 0x001526ab MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x0011a8e0 LAB_001526ab: MOV RSI,qword ptr [0x0022bf58] LEA RDI,[RSP + 0x28] CALL 0x0011ac90 LEA RDI,[RSP + 0xa0] CALL 0x0011a2a0 ADD RSP,0x328 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* std::vector<int, std::allocator<int> > string_split<int>(std::__cxx11::string const&, char) */ void string_split<int>(string *param_1,char param_2) { int *piVar1; istream *piVar2; int7 in_register_00000031; int local_354; int1 *local_350; int8 local_348; int1 local_340; int7 uStack_33f; istream local_330 [120]; ios_base local_2b8 [264]; istream local_1b0 [120]; ios_base local_138 [264]; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; std::__cxx11::istringstream::istringstream ((istringstream *)local_330,CONCAT71(in_register_00000031,param_2),8); local_350 = &local_340; local_348 = 0; local_340 = 0; while( true ) { /* try { // try from 00152617 to 00152626 has its CatchHandler @ 001526dd */ piVar2 = std::getline<char,std::char_traits<char>,std::allocator<char>> (local_330,(string *)&local_350,','); if (((byte)piVar2[*(long *)(*(long *)piVar2 + -0x18) + 0x20] & 5) != 0) break; /* try { // try from 00152635 to 00152644 has its CatchHandler @ 001526db */ std::__cxx11::istringstream::istringstream((istringstream *)local_1b0,(string *)&local_350,8); /* try { // try from 00152645 to 00152674 has its CatchHandler @ 001526e2 */ std::istream::operator>>(local_1b0,&local_354); piVar1 = *(int **)(param_1 + 8); if (piVar1 == *(int **)(param_1 + 0x10)) { std::vector<int,std::allocator<int>>::_M_realloc_insert<int_const&> ((vector<int,std::allocator<int>> *)param_1,piVar1,&local_354); } else { *piVar1 = local_354; *(int **)(param_1 + 8) = piVar1 + 1; } std::__cxx11::istringstream::~istringstream((istringstream *)local_1b0); std::ios_base::~ios_base(local_138); } if (local_350 != &local_340) { operator_delete(local_350,CONCAT71(uStack_33f,local_340) + 1); } std::__cxx11::istringstream::~istringstream((istringstream *)local_330); std::ios_base::~ios_base(local_2b8); return; }
46,701
ma_get_block_info
eloqsql/storage/maria/ma_dynrec.c
uint _ma_get_block_info(MARIA_HA *handler, MARIA_BLOCK_INFO *info, File file, my_off_t filepos) { uint return_val=0; uchar *header=info->header; if (file >= 0) { /* We do not use my_pread() here because we want to have the file pointer set to the end of the header after this function. my_pread() may leave the file pointer untouched. */ mysql_file_seek(file,filepos,MY_SEEK_SET,MYF(0)); if (mysql_file_read(file, header, sizeof(info->header),MYF(0)) != sizeof(info->header)) { /* This is either an error or just reading at end of file. Don't give a fatal error for this case. */ my_errno= HA_ERR_WRONG_IN_RECORD; return BLOCK_ERROR; } } DBUG_DUMP("header",header,MARIA_BLOCK_INFO_HEADER_LENGTH); if (info->second_read) { if (info->header[0] <= 6 || info->header[0] == 13) return_val=BLOCK_SYNC_ERROR; } else { if (info->header[0] > 6 && info->header[0] != 13) return_val=BLOCK_SYNC_ERROR; } info->next_filepos= HA_OFFSET_ERROR; /* Dummy if no next block */ switch (info->header[0]) { case 0: if ((info->block_len=(uint) mi_uint3korr(header+1)) < MARIA_MIN_BLOCK_LENGTH || (info->block_len & (MARIA_DYN_ALIGN_SIZE -1))) goto err; info->filepos=filepos; info->next_filepos=mi_sizekorr(header+4); info->prev_filepos=mi_sizekorr(header+12); #if SIZEOF_OFF_T == 4 if ((mi_uint4korr(header+4) != 0 && (mi_uint4korr(header+4) != (ulong) ~0 || info->next_filepos != (ulong) ~0)) || (mi_uint4korr(header+12) != 0 && (mi_uint4korr(header+12) != (ulong) ~0 || info->prev_filepos != (ulong) ~0))) goto err; #endif return return_val | BLOCK_DELETED; /* Deleted block */ case 1: info->rec_len=info->data_len=info->block_len=mi_uint2korr(header+1); info->filepos=filepos+3; return return_val | BLOCK_FIRST | BLOCK_LAST; case 2: info->rec_len=info->data_len=info->block_len=mi_uint3korr(header+1); info->filepos=filepos+4; return return_val | BLOCK_FIRST | BLOCK_LAST; case 13: info->rec_len=mi_uint4korr(header+1); info->block_len=info->data_len=mi_uint3korr(header+5); info->next_filepos=mi_sizekorr(header+8); info->second_read=1; info->filepos=filepos+16; return return_val | BLOCK_FIRST; case 3: info->rec_len=info->data_len=mi_uint2korr(header+1); info->block_len=info->rec_len+ (uint) header[3]; info->filepos=filepos+4; return return_val | BLOCK_FIRST | BLOCK_LAST; case 4: info->rec_len=info->data_len=mi_uint3korr(header+1); info->block_len=info->rec_len+ (uint) header[4]; info->filepos=filepos+5; return return_val | BLOCK_FIRST | BLOCK_LAST; case 5: info->rec_len=mi_uint2korr(header+1); info->block_len=info->data_len=mi_uint2korr(header+3); info->next_filepos=mi_sizekorr(header+5); info->second_read=1; info->filepos=filepos+13; return return_val | BLOCK_FIRST; case 6: info->rec_len=mi_uint3korr(header+1); info->block_len=info->data_len=mi_uint3korr(header+4); info->next_filepos=mi_sizekorr(header+7); info->second_read=1; info->filepos=filepos+15; return return_val | BLOCK_FIRST; /* The following blocks are identical to 1-6 without rec_len */ case 7: info->data_len=info->block_len=mi_uint2korr(header+1); info->filepos=filepos+3; return return_val | BLOCK_LAST; case 8: info->data_len=info->block_len=mi_uint3korr(header+1); info->filepos=filepos+4; return return_val | BLOCK_LAST; case 9: info->data_len=mi_uint2korr(header+1); info->block_len=info->data_len+ (uint) header[3]; info->filepos=filepos+4; return return_val | BLOCK_LAST; case 10: info->data_len=mi_uint3korr(header+1); info->block_len=info->data_len+ (uint) header[4]; info->filepos=filepos+5; return return_val | BLOCK_LAST; case 11: info->data_len=info->block_len=mi_uint2korr(header+1); info->next_filepos=mi_sizekorr(header+3); info->second_read=1; info->filepos=filepos+11; return return_val; case 12: info->data_len=info->block_len=mi_uint3korr(header+1); info->next_filepos=mi_sizekorr(header+4); info->second_read=1; info->filepos=filepos+12; return return_val; } err: if (!handler->in_check_table) { /* We may be scanning the table for new rows; Don't give an error */ _ma_set_fatal_error(handler, HA_ERR_WRONG_IN_RECORD); } return BLOCK_ERROR; }
O3
c
ma_get_block_info: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x58, %rsp movq %rcx, %r14 movq %rsi, %rbx movq %rdi, %r12 testl %edx, %edx js 0x39b48 movl %edx, %r15d leaq 0x34b530(%rip), %r13 # 0x385010 movq (%r13), %rax leaq -0x78(%rbp), %rdi movl %edx, %esi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x39e96 movl %r15d, %edi movq %r14, %rsi xorl %edx, %edx xorl %ecx, %ecx callq 0xa0464 movq (%r13), %rax leaq -0x78(%rbp), %rdi movl %r15d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax jne 0x39ea9 movl $0x14, %edx movl %r15d, %edi movq %rbx, %rsi xorl %ecx, %ecx callq 0xa0264 cmpq $0x14, %rax jne 0x39be1 movl 0x50(%rbx), %ecx xorl %r15d, %r15d testl %ecx, %ecx sete %dl movzbl (%rbx), %eax cmpq $0xd, %rax ja 0x39b76 testl %ecx, %ecx leaq 0xa625f(%rip), %rcx # 0xdfdc4 leaq 0xa6220(%rip), %rdx # 0xdfd8c cmoveq %rcx, %rdx movl (%rdx,%rax,4), %r15d jmp 0x39b7d movb %dl, %r15b shll $0x4, %r15d movq $-0x1, 0x40(%rbx) cmpb $0xd, %al ja 0x39bf7 leaq 0xa6184(%rip), %rcx # 0xdfd14 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movzbl 0x3(%rbx), %ecx movzbl 0x2(%rbx), %edx shll $0x8, %edx movzbl 0x1(%rbx), %eax shll $0x10, %eax orl %edx, %eax orq %rcx, %rax movq %rax, 0x28(%rbx) testb $0x3, %cl jne 0x39bf7 cmpl $0x14, %eax jb 0x39bf7 movq %r14, 0x38(%rbx) movq 0x4(%rbx), %rax movq 0xc(%rbx), %rcx bswapq %rax movq %rax, 0x40(%rbx) bswapq %rcx movq %rcx, 0x48(%rbx) orl $0x4, %r15d jmp 0x39e84 callq 0xa13e6 movl $0x7f, (%rax) movl $0x8, %r15d jmp 0x39e84 movl $0x8, %r15d cmpb $0x0, 0x683(%r12) jne 0x39e84 movq %r12, %rdi movl $0x7f, %esi callq 0x32af4 jmp 0x39e84 movzwl 0x1(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movq %rax, 0x28(%rbx) movq %rax, 0x20(%rbx) movq 0x3(%rbx), %rax bswapq %rax movq %rax, 0x40(%rbx) movl $0x1, 0x50(%rbx) addq $0xb, %r14 jmp 0x39cad movzwl 0x2(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movzbl 0x1(%rbx), %ecx shll $0x10, %ecx orq %rax, %rcx movq %rcx, 0x20(%rbx) movq %rcx, 0x18(%rbx) movzbl 0x4(%rbx), %eax addq %rcx, %rax movq %rax, 0x28(%rbx) addq $0x5, %r14 jmp 0x39d53 movzwl 0x2(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movzbl 0x1(%rbx), %ecx shll $0x10, %ecx orq %rax, %rcx movq %rcx, 0x28(%rbx) movq %rcx, 0x20(%rbx) movq 0x4(%rbx), %rax bswapq %rax movq %rax, 0x40(%rbx) movl $0x1, 0x50(%rbx) addq $0xc, %r14 movq %r14, 0x38(%rbx) jmp 0x39e84 movzwl 0x1(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movq %rax, 0x20(%rbx) movzbl 0x3(%rbx), %ecx addq %rax, %rcx movq %rcx, 0x28(%rbx) jmp 0x39e78 movzwl 0x2(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movzbl 0x1(%rbx), %ecx shll $0x10, %ecx orq %rax, %rcx movq %rcx, 0x28(%rbx) movq %rcx, 0x20(%rbx) movq %rcx, 0x18(%rbx) jmp 0x39d16 movzwl 0x1(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movq %rax, 0x20(%rbx) movq %rax, 0x18(%rbx) movzbl 0x3(%rbx), %ecx addq %rax, %rcx movq %rcx, 0x28(%rbx) addq $0x4, %r14 jmp 0x39d53 movzwl 0x1(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movq %rax, 0x28(%rbx) movq %rax, 0x20(%rbx) addq $0x3, %r14 jmp 0x39e7c movzwl 0x1(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movq %rax, 0x28(%rbx) movq %rax, 0x20(%rbx) movq %rax, 0x18(%rbx) addq $0x3, %r14 movq %r14, 0x38(%rbx) orl $0x3, %r15d jmp 0x39e84 movzwl 0x1(%rbx), %eax rolw $0x8, %ax movzwl 0x3(%rbx), %ecx movzwl %ax, %eax rolw $0x8, %cx movq %rax, 0x18(%rbx) movzwl %cx, %eax movq %rax, 0x20(%rbx) movq %rax, 0x28(%rbx) movq 0x5(%rbx), %rax bswapq %rax movq %rax, 0x40(%rbx) movl $0x1, 0x50(%rbx) addq $0xd, %r14 jmp 0x39e27 movl 0x1(%rbx), %eax bswapl %eax movq %rax, 0x18(%rbx) movzwl 0x6(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movzbl 0x5(%rbx), %ecx shll $0x10, %ecx orq %rax, %rcx movq %rcx, 0x20(%rbx) movq %rcx, 0x28(%rbx) movq 0x8(%rbx), %rax bswapq %rax movq %rax, 0x40(%rbx) movl $0x1, 0x50(%rbx) addq $0x10, %r14 jmp 0x39e27 movzwl 0x2(%rbx), %eax movzwl 0x5(%rbx), %ecx rolw $0x8, %ax movzwl %ax, %eax movzbl 0x1(%rbx), %edx shll $0x10, %edx orq %rax, %rdx movq %rdx, 0x18(%rbx) rolw $0x8, %cx movzwl %cx, %eax movzbl 0x4(%rbx), %ecx shll $0x10, %ecx orq %rax, %rcx movq %rcx, 0x20(%rbx) movq %rcx, 0x28(%rbx) movq 0x7(%rbx), %rax bswapq %rax movq %rax, 0x40(%rbx) movl $0x1, 0x50(%rbx) addq $0xf, %r14 movq %r14, 0x38(%rbx) orl $0x1, %r15d jmp 0x39e84 movzwl 0x2(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movzbl 0x1(%rbx), %ecx shll $0x10, %ecx orq %rax, %rcx movq %rcx, 0x20(%rbx) movzbl 0x4(%rbx), %eax addq %rcx, %rax movq %rax, 0x28(%rbx) addq $0x5, %r14 jmp 0x39e7c movzwl 0x2(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movzbl 0x1(%rbx), %ecx shll $0x10, %ecx orq %rax, %rcx movq %rcx, 0x28(%rbx) movq %rcx, 0x20(%rbx) addq $0x4, %r14 movq %r14, 0x38(%rbx) orl $0x2, %r15d movl %r15d, %eax addq $0x58, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rdi movl %r15d, %esi movq %r14, %rdx callq 0x29e9d jmp 0x39b0d leaq -0x30(%rbp), %r13 movq %rax, %rdi movl %r15d, %esi movq %rbx, %rdx movq %r13, %rcx callq 0x29ef7 movq (%r13), %rax jmp 0x39b3e
_ma_get_block_info: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 58h mov r14, rcx mov rbx, rsi mov r12, rdi test edx, edx js short loc_39B48 mov r15d, edx lea r13, PSI_server mov rax, [r13+0] lea rdi, [rbp+var_78] mov esi, edx mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz loc_39E96 mov edi, r15d mov rsi, r14 xor edx, edx xor ecx, ecx call my_seek loc_39B0D: mov rax, [r13+0] lea rdi, [rbp+var_78] mov esi, r15d mov edx, 6 call qword ptr [rax+158h] test rax, rax jnz loc_39EA9 mov edx, 14h mov edi, r15d mov rsi, rbx xor ecx, ecx call my_read loc_39B3E: cmp rax, 14h jnz loc_39BE1 loc_39B48: mov ecx, [rbx+50h] xor r15d, r15d test ecx, ecx setz dl movzx eax, byte ptr [rbx] cmp rax, 0Dh ja short loc_39B76 test ecx, ecx lea rcx, unk_DFDC4 lea rdx, unk_DFD8C cmovz rdx, rcx mov r15d, [rdx+rax*4] jmp short loc_39B7D loc_39B76: mov r15b, dl shl r15d, 4 loc_39B7D: mov qword ptr [rbx+40h], 0FFFFFFFFFFFFFFFFh cmp al, 0Dh; switch 14 cases ja short def_39B97; jumptable 0000000000039B97 default case lea rcx, jpt_39B97 movsxd rax, ds:(jpt_39B97 - 0DFD14h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_39B99: movzx ecx, byte ptr [rbx+3]; jumptable 0000000000039B97 case 0 movzx edx, byte ptr [rbx+2] shl edx, 8 movzx eax, byte ptr [rbx+1] shl eax, 10h or eax, edx or rax, rcx mov [rbx+28h], rax test cl, 3 jnz short def_39B97; jumptable 0000000000039B97 default case cmp eax, 14h jb short def_39B97; jumptable 0000000000039B97 default case mov [rbx+38h], r14 mov rax, [rbx+4] mov rcx, [rbx+0Ch] bswap rax mov [rbx+40h], rax bswap rcx mov [rbx+48h], rcx or r15d, 4 jmp loc_39E84 loc_39BE1: call _my_thread_var mov dword ptr [rax], 7Fh mov r15d, 8 jmp loc_39E84 def_39B97: mov r15d, 8; jumptable 0000000000039B97 default case cmp byte ptr [r12+683h], 0 jnz loc_39E84 mov rdi, r12 mov esi, 7Fh call _ma_set_fatal_error jmp loc_39E84 loc_39C1E: movzx eax, word ptr [rbx+1]; jumptable 0000000000039B97 case 11 rol ax, 8 movzx eax, ax mov [rbx+28h], rax mov [rbx+20h], rax mov rax, [rbx+3] bswap rax mov [rbx+40h], rax mov dword ptr [rbx+50h], 1 add r14, 0Bh jmp short loc_39CAD loc_39C49: movzx eax, word ptr [rbx+2]; jumptable 0000000000039B97 case 4 rol ax, 8 movzx eax, ax movzx ecx, byte ptr [rbx+1] shl ecx, 10h or rcx, rax mov [rbx+20h], rcx mov [rbx+18h], rcx movzx eax, byte ptr [rbx+4] add rax, rcx mov [rbx+28h], rax add r14, 5 jmp loc_39D53 loc_39C7A: movzx eax, word ptr [rbx+2]; jumptable 0000000000039B97 case 12 rol ax, 8 movzx eax, ax movzx ecx, byte ptr [rbx+1] shl ecx, 10h or rcx, rax mov [rbx+28h], rcx mov [rbx+20h], rcx mov rax, [rbx+4] bswap rax mov [rbx+40h], rax mov dword ptr [rbx+50h], 1 add r14, 0Ch loc_39CAD: mov [rbx+38h], r14 jmp loc_39E84 loc_39CB6: movzx eax, word ptr [rbx+1]; jumptable 0000000000039B97 case 9 rol ax, 8 movzx eax, ax mov [rbx+20h], rax movzx ecx, byte ptr [rbx+3] add rcx, rax mov [rbx+28h], rcx jmp loc_39E78 loc_39CD5: movzx eax, word ptr [rbx+2]; jumptable 0000000000039B97 case 2 rol ax, 8 movzx eax, ax movzx ecx, byte ptr [rbx+1] shl ecx, 10h or rcx, rax mov [rbx+28h], rcx mov [rbx+20h], rcx mov [rbx+18h], rcx jmp short loc_39D16 loc_39CF8: movzx eax, word ptr [rbx+1]; jumptable 0000000000039B97 case 3 rol ax, 8 movzx eax, ax mov [rbx+20h], rax mov [rbx+18h], rax movzx ecx, byte ptr [rbx+3] add rcx, rax mov [rbx+28h], rcx loc_39D16: add r14, 4 jmp short loc_39D53 loc_39D1C: movzx eax, word ptr [rbx+1]; jumptable 0000000000039B97 case 7 rol ax, 8 movzx eax, ax mov [rbx+28h], rax mov [rbx+20h], rax add r14, 3 jmp loc_39E7C loc_39D38: movzx eax, word ptr [rbx+1]; jumptable 0000000000039B97 case 1 rol ax, 8 movzx eax, ax mov [rbx+28h], rax mov [rbx+20h], rax mov [rbx+18h], rax add r14, 3 loc_39D53: mov [rbx+38h], r14 or r15d, 3 jmp loc_39E84 loc_39D60: movzx eax, word ptr [rbx+1]; jumptable 0000000000039B97 case 5 rol ax, 8 movzx ecx, word ptr [rbx+3] movzx eax, ax rol cx, 8 mov [rbx+18h], rax movzx eax, cx mov [rbx+20h], rax mov [rbx+28h], rax mov rax, [rbx+5] bswap rax mov [rbx+40h], rax mov dword ptr [rbx+50h], 1 add r14, 0Dh jmp loc_39E27 loc_39D9D: mov eax, [rbx+1]; jumptable 0000000000039B97 case 13 bswap eax mov [rbx+18h], rax movzx eax, word ptr [rbx+6] rol ax, 8 movzx eax, ax movzx ecx, byte ptr [rbx+5] shl ecx, 10h or rcx, rax mov [rbx+20h], rcx mov [rbx+28h], rcx mov rax, [rbx+8] bswap rax mov [rbx+40h], rax mov dword ptr [rbx+50h], 1 add r14, 10h jmp short loc_39E27 loc_39DDB: movzx eax, word ptr [rbx+2]; jumptable 0000000000039B97 case 6 movzx ecx, word ptr [rbx+5] rol ax, 8 movzx eax, ax movzx edx, byte ptr [rbx+1] shl edx, 10h or rdx, rax mov [rbx+18h], rdx rol cx, 8 movzx eax, cx movzx ecx, byte ptr [rbx+4] shl ecx, 10h or rcx, rax mov [rbx+20h], rcx mov [rbx+28h], rcx mov rax, [rbx+7] bswap rax mov [rbx+40h], rax mov dword ptr [rbx+50h], 1 add r14, 0Fh loc_39E27: mov [rbx+38h], r14 or r15d, 1 jmp short loc_39E84 loc_39E31: movzx eax, word ptr [rbx+2]; jumptable 0000000000039B97 case 10 rol ax, 8 movzx eax, ax movzx ecx, byte ptr [rbx+1] shl ecx, 10h or rcx, rax mov [rbx+20h], rcx movzx eax, byte ptr [rbx+4] add rax, rcx mov [rbx+28h], rax add r14, 5 jmp short loc_39E7C loc_39E5B: movzx eax, word ptr [rbx+2]; jumptable 0000000000039B97 case 8 rol ax, 8 movzx eax, ax movzx ecx, byte ptr [rbx+1] shl ecx, 10h or rcx, rax mov [rbx+28h], rcx mov [rbx+20h], rcx loc_39E78: add r14, 4 loc_39E7C: mov [rbx+38h], r14 or r15d, 2 loc_39E84: mov eax, r15d add rsp, 58h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_39E96: mov rdi, rax mov esi, r15d mov rdx, r14 call _ma_get_block_info_cold_1 jmp loc_39B0D loc_39EA9: lea r13, [rbp+var_30] mov rdi, rax mov esi, r15d mov rdx, rbx mov rcx, r13 call _ma_get_block_info_cold_2 mov rax, [r13+0] jmp loc_39B3E
long long ma_get_block_info(long long a1, unsigned __int8 *a2, long long a3, long long a4, long long a5, int a6) { unsigned int v8; // r15d long long v9; // rax long long v10; // rax long long v11; // rdi long long v12; // rax long long v13; // rcx int v14; // r15d unsigned long long v15; // rax bool v16; // zf unsigned int v17; // r15d long long v18; // rax unsigned long long v19; // rcx unsigned __int16 v20; // ax long long v21; // r14 unsigned long long v22; // rcx long long v23; // r14 unsigned long long v24; // rcx unsigned __int16 v25; // ax unsigned long long v26; // rcx unsigned __int16 v27; // ax unsigned __int16 v28; // ax long long v29; // r14 unsigned __int16 v30; // ax unsigned __int16 v31; // cx long long v32; // r14 unsigned long long v33; // rcx __int16 v34; // cx unsigned long long v35; // rcx unsigned long long v36; // rcx unsigned long long v37; // rcx _BYTE v39[72]; // [rsp+8h] [rbp-78h] BYREF long long v40[6]; // [rsp+50h] [rbp-30h] BYREF if ( (int)a3 < 0 ) goto LABEL_7; v8 = a3; v9 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v39, (unsigned int)a3, 8LL); if ( v9 ) ma_get_block_info_cold_1(v9, v8, a4); else my_seek(v8, a4, 0LL, 0LL); v10 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v39, v8, 6LL); if ( v10 ) { v11 = v10; ma_get_block_info_cold_2(v10, v8, (long long)a2, v40); v12 = v40[0]; } else { v11 = v8; v12 = my_read(v8, a2, 20LL, 0LL); } if ( v12 == 20 ) { LABEL_7: v13 = *((unsigned int *)a2 + 20); v14 = 0; LOBYTE(a3) = (_DWORD)v13 == 0; v15 = *a2; if ( v15 > 0xD ) { LOBYTE(v14) = (_DWORD)v13 == 0; v17 = 16 * v14; } else { v16 = (_DWORD)v13 == 0; v13 = (long long)&unk_DFDC4; a3 = (long long)&unk_DFD8C; if ( v16 ) a3 = (long long)&unk_DFDC4; v17 = *(_DWORD *)(a3 + 4 * v15); } *((_QWORD *)a2 + 8) = -1LL; switch ( (char)v15 ) { case 0: v13 = a2[3]; a3 = a2[2] << 8; v18 = v13 | (unsigned int)a3 | (a2[1] << 16); *((_QWORD *)a2 + 5) = v18; if ( (v13 & 3) != 0 || (unsigned int)v18 < 0x14 ) goto LABEL_17; *((_QWORD *)a2 + 7) = a4; v19 = *(_QWORD *)(a2 + 12); *((_QWORD *)a2 + 8) = _byteswap_uint64(*(_QWORD *)(a2 + 4)); *((_QWORD *)a2 + 9) = _byteswap_uint64(v19); v17 |= 4u; return v17; case 1: v30 = __ROL2__(*(_WORD *)(a2 + 1), 8); *((_QWORD *)a2 + 5) = v30; *((_QWORD *)a2 + 4) = v30; *((_QWORD *)a2 + 3) = v30; v23 = a4 + 3; goto LABEL_29; case 2: v26 = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 1), 8) | (unsigned long long)(a2[1] << 16); *((_QWORD *)a2 + 5) = v26; *((_QWORD *)a2 + 4) = v26; *((_QWORD *)a2 + 3) = v26; goto LABEL_26; case 3: v27 = __ROL2__(*(_WORD *)(a2 + 1), 8); *((_QWORD *)a2 + 4) = v27; *((_QWORD *)a2 + 3) = v27; *((_QWORD *)a2 + 5) = v27 + (unsigned long long)a2[3]; LABEL_26: v23 = a4 + 4; goto LABEL_29; case 4: v22 = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 1), 8) | (unsigned long long)(a2[1] << 16); *((_QWORD *)a2 + 4) = v22; *((_QWORD *)a2 + 3) = v22; *((_QWORD *)a2 + 5) = v22 + a2[4]; v23 = a4 + 5; LABEL_29: *((_QWORD *)a2 + 7) = v23; v17 |= 3u; return v17; case 5: v31 = __ROL2__(*(_WORD *)(a2 + 3), 8); *((_QWORD *)a2 + 3) = (unsigned __int16)__ROL2__(*(_WORD *)(a2 + 1), 8); *((_QWORD *)a2 + 4) = v31; *((_QWORD *)a2 + 5) = v31; *((_QWORD *)a2 + 8) = _byteswap_uint64(*(_QWORD *)(a2 + 5)); *((_DWORD *)a2 + 20) = 1; v32 = a4 + 13; goto LABEL_33; case 6: v34 = *(_WORD *)(a2 + 5); *((_QWORD *)a2 + 3) = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 1), 8) | (unsigned long long)(a2[1] << 16); v35 = (unsigned __int16)__ROL2__(v34, 8) | (unsigned long long)(a2[4] << 16); *((_QWORD *)a2 + 4) = v35; *((_QWORD *)a2 + 5) = v35; *((_QWORD *)a2 + 8) = _byteswap_uint64(*(_QWORD *)(a2 + 7)); *((_DWORD *)a2 + 20) = 1; v32 = a4 + 15; goto LABEL_33; case 7: v28 = __ROL2__(*(_WORD *)(a2 + 1), 8); *((_QWORD *)a2 + 5) = v28; *((_QWORD *)a2 + 4) = v28; v29 = a4 + 3; goto LABEL_37; case 8: v37 = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 1), 8) | (unsigned long long)(a2[1] << 16); *((_QWORD *)a2 + 5) = v37; *((_QWORD *)a2 + 4) = v37; goto LABEL_36; case 9: v25 = __ROL2__(*(_WORD *)(a2 + 1), 8); *((_QWORD *)a2 + 4) = v25; *((_QWORD *)a2 + 5) = v25 + (unsigned long long)a2[3]; LABEL_36: v29 = a4 + 4; goto LABEL_37; case 10: v36 = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 1), 8) | (unsigned long long)(a2[1] << 16); *((_QWORD *)a2 + 4) = v36; *((_QWORD *)a2 + 5) = v36 + a2[4]; v29 = a4 + 5; LABEL_37: *((_QWORD *)a2 + 7) = v29; v17 |= 2u; return v17; case 11: v20 = __ROL2__(*(_WORD *)(a2 + 1), 8); *((_QWORD *)a2 + 5) = v20; *((_QWORD *)a2 + 4) = v20; *((_QWORD *)a2 + 8) = _byteswap_uint64(*(_QWORD *)(a2 + 3)); *((_DWORD *)a2 + 20) = 1; v21 = a4 + 11; goto LABEL_22; case 12: v24 = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 1), 8) | (unsigned long long)(a2[1] << 16); *((_QWORD *)a2 + 5) = v24; *((_QWORD *)a2 + 4) = v24; *((_QWORD *)a2 + 8) = _byteswap_uint64(*(_QWORD *)(a2 + 4)); *((_DWORD *)a2 + 20) = 1; v21 = a4 + 12; LABEL_22: *((_QWORD *)a2 + 7) = v21; break; case 13: *((_QWORD *)a2 + 3) = _byteswap_ulong(*(_DWORD *)(a2 + 1)); v33 = (unsigned __int16)__ROL2__(*((_WORD *)a2 + 3), 8) | (unsigned long long)(a2[5] << 16); *((_QWORD *)a2 + 4) = v33; *((_QWORD *)a2 + 5) = v33; *((_QWORD *)a2 + 8) = _byteswap_uint64(*((_QWORD *)a2 + 1)); *((_DWORD *)a2 + 20) = 1; v32 = a4 + 16; LABEL_33: *((_QWORD *)a2 + 7) = v32; v17 |= 1u; break; default: LABEL_17: v17 = 8; if ( !*(_BYTE *)(a1 + 1667) ) ma_set_fatal_error((_DWORD *)a1, 127, a3, v13, a5, a6); break; } } else { *(_DWORD *)my_thread_var(v11) = 127; return 8; } return v17; }
_ma_get_block_info: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x58 MOV R14,RCX MOV RBX,RSI MOV R12,RDI TEST EDX,EDX JS 0x00139b48 MOV R15D,EDX LEA R13,[0x485010] MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x78] MOV ESI,EDX MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00139e96 MOV EDI,R15D MOV RSI,R14 XOR EDX,EDX XOR ECX,ECX CALL 0x001a0464 LAB_00139b0d: MOV RAX,qword ptr [R13] LEA RDI,[RBP + -0x78] MOV ESI,R15D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00139ea9 MOV EDX,0x14 MOV EDI,R15D MOV RSI,RBX XOR ECX,ECX CALL 0x001a0264 LAB_00139b3e: CMP RAX,0x14 JNZ 0x00139be1 LAB_00139b48: MOV ECX,dword ptr [RBX + 0x50] XOR R15D,R15D TEST ECX,ECX SETZ DL MOVZX EAX,byte ptr [RBX] CMP RAX,0xd JA 0x00139b76 TEST ECX,ECX LEA RCX,[0x1dfdc4] LEA RDX,[0x1dfd8c] CMOVZ RDX,RCX MOV R15D,dword ptr [RDX + RAX*0x4] JMP 0x00139b7d LAB_00139b76: MOV R15B,DL SHL R15D,0x4 LAB_00139b7d: MOV qword ptr [RBX + 0x40],-0x1 CMP AL,0xd JA 0x00139bf7 LEA RCX,[0x1dfd14] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: MOVZX ECX,byte ptr [RBX + 0x3] MOVZX EDX,byte ptr [RBX + 0x2] SHL EDX,0x8 MOVZX EAX,byte ptr [RBX + 0x1] SHL EAX,0x10 OR EAX,EDX OR RAX,RCX MOV qword ptr [RBX + 0x28],RAX TEST CL,0x3 JNZ 0x00139bf7 CMP EAX,0x14 JC 0x00139bf7 MOV qword ptr [RBX + 0x38],R14 MOV RAX,qword ptr [RBX + 0x4] MOV RCX,qword ptr [RBX + 0xc] BSWAP RAX MOV qword ptr [RBX + 0x40],RAX BSWAP RCX MOV qword ptr [RBX + 0x48],RCX OR R15D,0x4 JMP 0x00139e84 LAB_00139be1: CALL 0x001a13e6 MOV dword ptr [RAX],0x7f MOV R15D,0x8 JMP 0x00139e84 default: MOV R15D,0x8 CMP byte ptr [R12 + 0x683],0x0 JNZ 0x00139e84 MOV RDI,R12 MOV ESI,0x7f CALL 0x00132af4 JMP 0x00139e84 caseD_b: MOVZX EAX,word ptr [RBX + 0x1] ROL AX,0x8 MOVZX EAX,AX MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x20],RAX MOV RAX,qword ptr [RBX + 0x3] BSWAP RAX MOV qword ptr [RBX + 0x40],RAX MOV dword ptr [RBX + 0x50],0x1 ADD R14,0xb JMP 0x00139cad caseD_4: MOVZX EAX,word ptr [RBX + 0x2] ROL AX,0x8 MOVZX EAX,AX MOVZX ECX,byte ptr [RBX + 0x1] SHL ECX,0x10 OR RCX,RAX MOV qword ptr [RBX + 0x20],RCX MOV qword ptr [RBX + 0x18],RCX MOVZX EAX,byte ptr [RBX + 0x4] ADD RAX,RCX MOV qword ptr [RBX + 0x28],RAX ADD R14,0x5 JMP 0x00139d53 caseD_c: MOVZX EAX,word ptr [RBX + 0x2] ROL AX,0x8 MOVZX EAX,AX MOVZX ECX,byte ptr [RBX + 0x1] SHL ECX,0x10 OR RCX,RAX MOV qword ptr [RBX + 0x28],RCX MOV qword ptr [RBX + 0x20],RCX MOV RAX,qword ptr [RBX + 0x4] BSWAP RAX MOV qword ptr [RBX + 0x40],RAX MOV dword ptr [RBX + 0x50],0x1 ADD R14,0xc LAB_00139cad: MOV qword ptr [RBX + 0x38],R14 JMP 0x00139e84 caseD_9: MOVZX EAX,word ptr [RBX + 0x1] ROL AX,0x8 MOVZX EAX,AX MOV qword ptr [RBX + 0x20],RAX MOVZX ECX,byte ptr [RBX + 0x3] ADD RCX,RAX MOV qword ptr [RBX + 0x28],RCX JMP 0x00139e78 caseD_2: MOVZX EAX,word ptr [RBX + 0x2] ROL AX,0x8 MOVZX EAX,AX MOVZX ECX,byte ptr [RBX + 0x1] SHL ECX,0x10 OR RCX,RAX MOV qword ptr [RBX + 0x28],RCX MOV qword ptr [RBX + 0x20],RCX MOV qword ptr [RBX + 0x18],RCX JMP 0x00139d16 caseD_3: MOVZX EAX,word ptr [RBX + 0x1] ROL AX,0x8 MOVZX EAX,AX MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],RAX MOVZX ECX,byte ptr [RBX + 0x3] ADD RCX,RAX MOV qword ptr [RBX + 0x28],RCX LAB_00139d16: ADD R14,0x4 JMP 0x00139d53 caseD_7: MOVZX EAX,word ptr [RBX + 0x1] ROL AX,0x8 MOVZX EAX,AX MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x20],RAX ADD R14,0x3 JMP 0x00139e7c caseD_1: MOVZX EAX,word ptr [RBX + 0x1] ROL AX,0x8 MOVZX EAX,AX MOV qword ptr [RBX + 0x28],RAX MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x18],RAX ADD R14,0x3 LAB_00139d53: MOV qword ptr [RBX + 0x38],R14 OR R15D,0x3 JMP 0x00139e84 caseD_5: MOVZX EAX,word ptr [RBX + 0x1] ROL AX,0x8 MOVZX ECX,word ptr [RBX + 0x3] MOVZX EAX,AX ROL CX,0x8 MOV qword ptr [RBX + 0x18],RAX MOVZX EAX,CX MOV qword ptr [RBX + 0x20],RAX MOV qword ptr [RBX + 0x28],RAX MOV RAX,qword ptr [RBX + 0x5] BSWAP RAX MOV qword ptr [RBX + 0x40],RAX MOV dword ptr [RBX + 0x50],0x1 ADD R14,0xd JMP 0x00139e27 caseD_d: MOV EAX,dword ptr [RBX + 0x1] BSWAP EAX MOV qword ptr [RBX + 0x18],RAX MOVZX EAX,word ptr [RBX + 0x6] ROL AX,0x8 MOVZX EAX,AX MOVZX ECX,byte ptr [RBX + 0x5] SHL ECX,0x10 OR RCX,RAX MOV qword ptr [RBX + 0x20],RCX MOV qword ptr [RBX + 0x28],RCX MOV RAX,qword ptr [RBX + 0x8] BSWAP RAX MOV qword ptr [RBX + 0x40],RAX MOV dword ptr [RBX + 0x50],0x1 ADD R14,0x10 JMP 0x00139e27 caseD_6: MOVZX EAX,word ptr [RBX + 0x2] MOVZX ECX,word ptr [RBX + 0x5] ROL AX,0x8 MOVZX EAX,AX MOVZX EDX,byte ptr [RBX + 0x1] SHL EDX,0x10 OR RDX,RAX MOV qword ptr [RBX + 0x18],RDX ROL CX,0x8 MOVZX EAX,CX MOVZX ECX,byte ptr [RBX + 0x4] SHL ECX,0x10 OR RCX,RAX MOV qword ptr [RBX + 0x20],RCX MOV qword ptr [RBX + 0x28],RCX MOV RAX,qword ptr [RBX + 0x7] BSWAP RAX MOV qword ptr [RBX + 0x40],RAX MOV dword ptr [RBX + 0x50],0x1 ADD R14,0xf LAB_00139e27: MOV qword ptr [RBX + 0x38],R14 OR R15D,0x1 JMP 0x00139e84 caseD_a: MOVZX EAX,word ptr [RBX + 0x2] ROL AX,0x8 MOVZX EAX,AX MOVZX ECX,byte ptr [RBX + 0x1] SHL ECX,0x10 OR RCX,RAX MOV qword ptr [RBX + 0x20],RCX MOVZX EAX,byte ptr [RBX + 0x4] ADD RAX,RCX MOV qword ptr [RBX + 0x28],RAX ADD R14,0x5 JMP 0x00139e7c caseD_8: MOVZX EAX,word ptr [RBX + 0x2] ROL AX,0x8 MOVZX EAX,AX MOVZX ECX,byte ptr [RBX + 0x1] SHL ECX,0x10 OR RCX,RAX MOV qword ptr [RBX + 0x28],RCX MOV qword ptr [RBX + 0x20],RCX LAB_00139e78: ADD R14,0x4 LAB_00139e7c: MOV qword ptr [RBX + 0x38],R14 OR R15D,0x2 LAB_00139e84: MOV EAX,R15D ADD RSP,0x58 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00139e96: MOV RDI,RAX MOV ESI,R15D MOV RDX,R14 CALL 0x00129e9d JMP 0x00139b0d LAB_00139ea9: LEA R13,[RBP + -0x30] MOV RDI,RAX MOV ESI,R15D MOV RDX,RBX MOV RCX,R13 CALL 0x00129ef7 MOV RAX,qword ptr [R13] JMP 0x00139b3e
uint _ma_get_block_info(long param_1,byte *param_2,int param_3,long param_4) { uint uVar1; ulong uVar2; long lVar3; int4 *puVar4; ulong uVar5; int *puVar6; uint uVar7; int1 local_80 [72]; long local_38; if (-1 < param_3) { lVar3 = (**(code **)(PSI_server + 0x158))(local_80,param_3,8); if (lVar3 == 0) { my_seek(param_3,param_4,0,0); } else { _ma_get_block_info_cold_1(lVar3,param_3,param_4); } lVar3 = (**(code **)(PSI_server + 0x158))(local_80,param_3,6); if (lVar3 == 0) { local_38 = my_read(param_3,param_2,0x14,0); } else { _ma_get_block_info_cold_2(lVar3,param_3,param_2,&local_38); } if (local_38 != 0x14) { puVar4 = (int4 *)_my_thread_var(); *puVar4 = 0x7f; return 8; } } uVar5 = (ulong)*param_2; if (uVar5 < 0xe) { puVar6 = &DAT_001dfd8c; if (*(int *)(param_2 + 0x50) == 0) { puVar6 = &DAT_001dfdc4; } uVar7 = *(uint *)(puVar6 + uVar5 * 4); } else { uVar7 = (uint)(*(int *)(param_2 + 0x50) == 0) << 4; } param_2[0x40] = 0xff; param_2[0x41] = 0xff; param_2[0x42] = 0xff; param_2[0x43] = 0xff; param_2[0x44] = 0xff; param_2[0x45] = 0xff; param_2[0x46] = 0xff; param_2[0x47] = 0xff; switch(uVar5) { case 0: uVar5 = (ulong)((uint)param_2[1] << 0x10 | (uint)param_2[2] << 8) | (ulong)param_2[3]; *(ulong *)(param_2 + 0x28) = uVar5; if (((param_2[3] & 3) == 0) && (0x13 < (uint)uVar5)) { *(long *)(param_2 + 0x38) = param_4; uVar5 = *(ulong *)(param_2 + 4); uVar2 = *(ulong *)(param_2 + 0xc); *(ulong *)(param_2 + 0x40) = uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 | (uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 | (uVar5 & 0xff00) << 0x28 | uVar5 << 0x38; *(ulong *)(param_2 + 0x48) = uVar2 >> 0x38 | (uVar2 & 0xff000000000000) >> 0x28 | (uVar2 & 0xff0000000000) >> 0x18 | (uVar2 & 0xff00000000) >> 8 | (uVar2 & 0xff000000) << 8 | (uVar2 & 0xff0000) << 0x18 | (uVar2 & 0xff00) << 0x28 | uVar2 << 0x38; return uVar7 | 4; } default: if (*(char *)(param_1 + 0x683) != '\0') { return 8; } _ma_set_fatal_error(param_1,0x7f); return 8; case 1: uVar5 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8); *(ulong *)(param_2 + 0x28) = uVar5; *(ulong *)(param_2 + 0x20) = uVar5; *(ulong *)(param_2 + 0x18) = uVar5; param_4 = param_4 + 3; goto LAB_00139d53; case 2: uVar5 = (ulong)CONCAT12(param_2[1],*(ushort *)(param_2 + 2) << 8 | *(ushort *)(param_2 + 2) >> 8 ); *(ulong *)(param_2 + 0x28) = uVar5; *(ulong *)(param_2 + 0x20) = uVar5; *(ulong *)(param_2 + 0x18) = uVar5; goto LAB_00139d16; case 3: uVar5 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8); *(ulong *)(param_2 + 0x20) = uVar5; *(ulong *)(param_2 + 0x18) = uVar5; *(ulong *)(param_2 + 0x28) = param_2[3] + uVar5; LAB_00139d16: param_4 = param_4 + 4; LAB_00139d53: *(long *)(param_2 + 0x38) = param_4; return uVar7 | 3; case 4: uVar5 = (ulong)CONCAT12(param_2[1],*(ushort *)(param_2 + 2) << 8 | *(ushort *)(param_2 + 2) >> 8 ); *(ulong *)(param_2 + 0x20) = uVar5; *(ulong *)(param_2 + 0x18) = uVar5; *(ulong *)(param_2 + 0x28) = param_2[4] + uVar5; param_4 = param_4 + 5; goto LAB_00139d53; case 5: *(ulong *)(param_2 + 0x18) = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8); uVar5 = (ulong)(ushort)(*(ushort *)(param_2 + 3) << 8 | *(ushort *)(param_2 + 3) >> 8); *(ulong *)(param_2 + 0x20) = uVar5; *(ulong *)(param_2 + 0x28) = uVar5; uVar5 = *(ulong *)(param_2 + 5); *(ulong *)(param_2 + 0x40) = uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 | (uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 | (uVar5 & 0xff00) << 0x28 | uVar5 << 0x38; param_2[0x50] = 1; param_2[0x51] = 0; param_2[0x52] = 0; param_2[0x53] = 0; param_4 = param_4 + 0xd; break; case 6: *(ulong *)(param_2 + 0x18) = (ulong)CONCAT12(param_2[1],*(ushort *)(param_2 + 2) << 8 | *(ushort *)(param_2 + 2) >> 8); uVar5 = (ulong)CONCAT12(param_2[4],*(ushort *)(param_2 + 5) << 8 | *(ushort *)(param_2 + 5) >> 8 ); *(ulong *)(param_2 + 0x20) = uVar5; *(ulong *)(param_2 + 0x28) = uVar5; uVar5 = *(ulong *)(param_2 + 7); *(ulong *)(param_2 + 0x40) = uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 | (uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 | (uVar5 & 0xff00) << 0x28 | uVar5 << 0x38; param_2[0x50] = 1; param_2[0x51] = 0; param_2[0x52] = 0; param_2[0x53] = 0; param_4 = param_4 + 0xf; break; case 7: uVar5 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8); *(ulong *)(param_2 + 0x28) = uVar5; *(ulong *)(param_2 + 0x20) = uVar5; param_4 = param_4 + 3; goto LAB_00139e7c; case 8: uVar5 = (ulong)CONCAT12(param_2[1],*(ushort *)(param_2 + 2) << 8 | *(ushort *)(param_2 + 2) >> 8 ); *(ulong *)(param_2 + 0x28) = uVar5; *(ulong *)(param_2 + 0x20) = uVar5; goto LAB_00139e78; case 9: uVar5 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8); *(ulong *)(param_2 + 0x20) = uVar5; *(ulong *)(param_2 + 0x28) = param_2[3] + uVar5; LAB_00139e78: param_4 = param_4 + 4; LAB_00139e7c: *(long *)(param_2 + 0x38) = param_4; return uVar7 | 2; case 10: uVar5 = (ulong)CONCAT12(param_2[1],*(ushort *)(param_2 + 2) << 8 | *(ushort *)(param_2 + 2) >> 8 ); *(ulong *)(param_2 + 0x20) = uVar5; *(ulong *)(param_2 + 0x28) = param_2[4] + uVar5; param_4 = param_4 + 5; goto LAB_00139e7c; case 0xb: uVar5 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8); *(ulong *)(param_2 + 0x28) = uVar5; *(ulong *)(param_2 + 0x20) = uVar5; uVar5 = *(ulong *)(param_2 + 3); *(ulong *)(param_2 + 0x40) = uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 | (uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 | (uVar5 & 0xff00) << 0x28 | uVar5 << 0x38; param_2[0x50] = 1; param_2[0x51] = 0; param_2[0x52] = 0; param_2[0x53] = 0; param_4 = param_4 + 0xb; goto LAB_00139cad; case 0xc: uVar5 = (ulong)CONCAT12(param_2[1],*(ushort *)(param_2 + 2) << 8 | *(ushort *)(param_2 + 2) >> 8 ); *(ulong *)(param_2 + 0x28) = uVar5; *(ulong *)(param_2 + 0x20) = uVar5; uVar5 = *(ulong *)(param_2 + 4); *(ulong *)(param_2 + 0x40) = uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 | (uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 | (uVar5 & 0xff00) << 0x28 | uVar5 << 0x38; param_2[0x50] = 1; param_2[0x51] = 0; param_2[0x52] = 0; param_2[0x53] = 0; param_4 = param_4 + 0xc; LAB_00139cad: *(long *)(param_2 + 0x38) = param_4; return uVar7; case 0xd: uVar1 = *(uint *)(param_2 + 1); *(ulong *)(param_2 + 0x18) = (ulong)(uVar1 >> 0x18 | (uVar1 & 0xff0000) >> 8 | (uVar1 & 0xff00) << 8 | uVar1 << 0x18); uVar5 = (ulong)CONCAT12(param_2[5],*(ushort *)(param_2 + 6) << 8 | *(ushort *)(param_2 + 6) >> 8 ); *(ulong *)(param_2 + 0x20) = uVar5; *(ulong *)(param_2 + 0x28) = uVar5; uVar5 = *(ulong *)(param_2 + 8); *(ulong *)(param_2 + 0x40) = uVar5 >> 0x38 | (uVar5 & 0xff000000000000) >> 0x28 | (uVar5 & 0xff0000000000) >> 0x18 | (uVar5 & 0xff00000000) >> 8 | (uVar5 & 0xff000000) << 8 | (uVar5 & 0xff0000) << 0x18 | (uVar5 & 0xff00) << 0x28 | uVar5 << 0x38; param_2[0x50] = 1; param_2[0x51] = 0; param_2[0x52] = 0; param_2[0x53] = 0; param_4 = param_4 + 0x10; } *(long *)(param_2 + 0x38) = param_4; return uVar7 | 1; }
46,702
google::protobuf::DescriptorBuilder::OptionInterpreter::AggregateOptionFinder::FindAnyType(google::protobuf::Message const&, 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
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/descriptor.cc
const Descriptor* FindAnyType(const Message& /*message*/, const std::string& prefix, const std::string& name) const override { if (prefix != internal::kTypeGoogleApisComPrefix && prefix != internal::kTypeGoogleProdComPrefix) { return nullptr; } assert_mutex_held(builder_->pool_); return builder_->FindSymbol(name).descriptor(); }
O3
cpp
google::protobuf::DescriptorBuilder::OptionInterpreter::AggregateOptionFinder::FindAnyType(google::protobuf::Message const&, 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: pushq %r15 pushq %r14 pushq %rbx movq %rcx, %rbx movq %rdx, %r15 movq %rdi, %r14 leaq 0x8f4f3(%rip), %rsi # 0x1724e0 movq %rdx, %rdi callq 0x2d380 testl %eax, %eax je 0xe3010 leaq 0x8f500(%rip), %rsi # 0x172500 movq %r15, %rdi callq 0x2d380 testl %eax, %eax je 0xe3010 xorl %eax, %eax jmp 0xe302d movq 0x8(%r14), %rdi movq %rbx, %rsi movl $0x1, %edx callq 0xcab8e movq %rax, %rcx xorl %eax, %eax cmpb $0x1, (%rcx) cmoveq %rcx, %rax popq %rbx popq %r14 popq %r15 retq nop
_ZNK6google8protobuf17DescriptorBuilder17OptionInterpreter21AggregateOptionFinder11FindAnyTypeERKNS0_7MessageERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESE_: push r15 push r14 push rbx mov rbx, rcx mov r15, rdx mov r14, rdi lea rsi, _ZN6google8protobuf8internal24kTypeGoogleApisComPrefixE; "type.googleapis.com/" mov rdi, rdx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_E3010 lea rsi, _ZN6google8protobuf8internal24kTypeGoogleProdComPrefixE; "type.googleprod.com/" mov rdi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_E3010 xor eax, eax jmp short loc_E302D loc_E3010: mov rdi, [r14+8] mov rsi, rbx mov edx, 1 call _ZN6google8protobuf17DescriptorBuilder10FindSymbolERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb; google::protobuf::DescriptorBuilder::FindSymbol(std::string const&,bool) mov rcx, rax xor eax, eax cmp byte ptr [rcx], 1 cmovz rax, rcx loc_E302D: pop rbx pop r14 pop r15 retn
_BYTE * google::protobuf::DescriptorBuilder::OptionInterpreter::AggregateOptionFinder::FindAnyType( long long a1, long long a2, long long a3, long long *a4) { _BYTE *result; // rax _BYTE *Symbol; // rcx if ( (unsigned int)std::string::compare(a3, "type.googleapis.com/") && (unsigned int)std::string::compare(a3, "type.googleprod.com/") ) { return 0LL; } Symbol = google::protobuf::DescriptorBuilder::FindSymbol(*(_QWORD **)(a1 + 8), a4, 1u); result = 0LL; if ( *Symbol == 1 ) return Symbol; return result; }
FindAnyType: PUSH R15 PUSH R14 PUSH RBX MOV RBX,RCX MOV R15,RDX MOV R14,RDI LEA RSI,[0x2724e0] MOV RDI,RDX CALL 0x0012d380 TEST EAX,EAX JZ 0x001e3010 LEA RSI,[0x272500] MOV RDI,R15 CALL 0x0012d380 TEST EAX,EAX JZ 0x001e3010 XOR EAX,EAX JMP 0x001e302d LAB_001e3010: MOV RDI,qword ptr [R14 + 0x8] MOV RSI,RBX MOV EDX,0x1 CALL 0x001cab8e MOV RCX,RAX XOR EAX,EAX CMP byte ptr [RCX],0x1 CMOVZ RAX,RCX LAB_001e302d: POP RBX POP R14 POP R15 RET
/* google::protobuf::DescriptorBuilder::OptionInterpreter::AggregateOptionFinder::FindAnyType(google::protobuf::Message const&, std::__cxx11::string const&, std::__cxx11::string const&) const */ char * __thiscall google::protobuf::DescriptorBuilder::OptionInterpreter::AggregateOptionFinder::FindAnyType (AggregateOptionFinder *this,Message *param_1,string *param_2,string *param_3) { int iVar1; char *pcVar2; char *pcVar3; iVar1 = std::__cxx11::string::compare(param_2,"type.googleapis.com/"); if ((iVar1 != 0) && (iVar1 = std::__cxx11::string::compare(param_2,"type.googleprod.com/"), iVar1 != 0)) { return (char *)0x0; } pcVar2 = (char *)FindSymbol(*(DescriptorBuilder **)(this + 8),param_3,true); pcVar3 = (char *)0x0; if (*pcVar2 == '\x01') { pcVar3 = pcVar2; } return pcVar3; }
46,703
mysql_fetch_row
eloqsql/libmariadb/libmariadb/mariadb_lib.c
MYSQL_ROW STDCALL mysql_fetch_row(MYSQL_RES *res) { if (!res) return 0; if (res->handle) { if (res->handle->status != MYSQL_STATUS_USE_RESULT && res->handle->status != MYSQL_STATUS_GET_RESULT) return 0; } if (!res->data) { /* Unbufferred fetch */ if (!res->eof && res->handle) { if (!(res->handle->methods->db_read_one_row(res->handle,res->field_count,res->row, res->lengths))) { res->row_count++; return(res->current_row=res->row); } res->eof=1; res->handle->status=MYSQL_STATUS_READY; /* Don't clear handle in mysql_free_results */ res->handle=0; } return((MYSQL_ROW) NULL); } { MYSQL_ROW tmp; if (!res->data_cursor) { return(res->current_row=(MYSQL_ROW) NULL); } tmp = res->data_cursor->data; res->data_cursor = res->data_cursor->next; return(res->current_row=tmp); } }
O0
c
mysql_fetch_row: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x3a420 movq $0x0, -0x8(%rbp) jmp 0x3a572 movq -0x10(%rbp), %rax cmpq $0x0, 0x78(%rax) je 0x3a45c movq -0x10(%rbp), %rax movq 0x78(%rax), %rax cmpl $0x2, 0x488(%rax) je 0x3a45a movq -0x10(%rbp), %rax movq 0x78(%rax), %rax cmpl $0x1, 0x488(%rax) je 0x3a45a movq $0x0, -0x8(%rbp) jmp 0x3a572 jmp 0x3a45c movq -0x10(%rbp), %rax cmpq $0x0, 0x18(%rax) jne 0x3a51e movq -0x10(%rbp), %rax cmpb $0x0, 0x80(%rax) jne 0x3a514 movq -0x10(%rbp), %rax cmpq $0x0, 0x78(%rax) je 0x3a514 movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movq 0x4d0(%rax), %rax movq 0x30(%rax), %rax movq -0x10(%rbp), %rcx movq 0x78(%rcx), %rdi movq -0x10(%rbp), %rcx movl 0x8(%rcx), %esi movq -0x10(%rbp), %rcx movq 0x60(%rcx), %rdx movq -0x10(%rbp), %rcx movq 0x70(%rcx), %rcx callq *%rax cmpl $0x0, %eax jne 0x3a4eb movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rax movq 0x60(%rax), %rax movq -0x10(%rbp), %rcx movq %rax, 0x68(%rcx) movq %rax, -0x8(%rbp) jmp 0x3a572 movq -0x10(%rbp), %rax movb $0x1, 0x80(%rax) movq -0x10(%rbp), %rax movq 0x78(%rax), %rax movl $0x0, 0x488(%rax) movq -0x10(%rbp), %rax movq $0x0, 0x78(%rax) movq $0x0, -0x8(%rbp) jmp 0x3a572 movq -0x10(%rbp), %rax cmpq $0x0, 0x20(%rax) jne 0x3a53f movq -0x10(%rbp), %rax movq $0x0, 0x68(%rax) movq $0x0, -0x8(%rbp) jmp 0x3a572 movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq 0x8(%rax), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rax movq 0x20(%rax), %rax movq (%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x20(%rax) movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq %rax, 0x68(%rcx) movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopl (%rax)
mysql_fetch_row: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi cmp [rbp+var_10], 0 jnz short loc_3A420 mov [rbp+var_8], 0 jmp loc_3A572 loc_3A420: mov rax, [rbp+var_10] cmp qword ptr [rax+78h], 0 jz short loc_3A45C mov rax, [rbp+var_10] mov rax, [rax+78h] cmp dword ptr [rax+488h], 2 jz short loc_3A45A mov rax, [rbp+var_10] mov rax, [rax+78h] cmp dword ptr [rax+488h], 1 jz short loc_3A45A mov [rbp+var_8], 0 jmp loc_3A572 loc_3A45A: jmp short $+2 loc_3A45C: mov rax, [rbp+var_10] cmp qword ptr [rax+18h], 0 jnz loc_3A51E mov rax, [rbp+var_10] cmp byte ptr [rax+80h], 0 jnz loc_3A514 mov rax, [rbp+var_10] cmp qword ptr [rax+78h], 0 jz loc_3A514 mov rax, [rbp+var_10] mov rax, [rax+78h] mov rax, [rax+4D0h] mov rax, [rax+30h] mov rcx, [rbp+var_10] mov rdi, [rcx+78h] mov rcx, [rbp+var_10] mov esi, [rcx+8] mov rcx, [rbp+var_10] mov rdx, [rcx+60h] mov rcx, [rbp+var_10] mov rcx, [rcx+70h] call rax cmp eax, 0 jnz short loc_3A4EB mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov rax, [rbp+var_10] mov rax, [rax+60h] mov rcx, [rbp+var_10] mov [rcx+68h], rax mov [rbp+var_8], rax jmp loc_3A572 loc_3A4EB: mov rax, [rbp+var_10] mov byte ptr [rax+80h], 1 mov rax, [rbp+var_10] mov rax, [rax+78h] mov dword ptr [rax+488h], 0 mov rax, [rbp+var_10] mov qword ptr [rax+78h], 0 loc_3A514: mov [rbp+var_8], 0 jmp short loc_3A572 loc_3A51E: mov rax, [rbp+var_10] cmp qword ptr [rax+20h], 0 jnz short loc_3A53F mov rax, [rbp+var_10] mov qword ptr [rax+68h], 0 mov [rbp+var_8], 0 jmp short loc_3A572 loc_3A53F: mov rax, [rbp+var_10] mov rax, [rax+20h] mov rax, [rax+8] mov [rbp+var_18], rax mov rax, [rbp+var_10] mov rax, [rax+20h] mov rcx, [rax] mov rax, [rbp+var_10] mov [rax+20h], rcx mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov [rcx+68h], rax mov [rbp+var_8], rax loc_3A572: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long mysql_fetch_row(long long a1) { long long v1; // rax long long v3; // [rsp+8h] [rbp-18h] if ( !a1 ) return 0LL; if ( *(_QWORD *)(a1 + 120) && *(_DWORD *)(*(_QWORD *)(a1 + 120) + 1160LL) != 2 && *(_DWORD *)(*(_QWORD *)(a1 + 120) + 1160LL) != 1 ) { return 0LL; } if ( !*(_QWORD *)(a1 + 24) ) { if ( !*(_BYTE *)(a1 + 128) && *(_QWORD *)(a1 + 120) ) { if ( !(*(unsigned int ( **)(_QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 1232LL) + 48LL))( *(_QWORD *)(a1 + 120), *(unsigned int *)(a1 + 8), *(_QWORD *)(a1 + 96), *(_QWORD *)(a1 + 112)) ) { ++*(_QWORD *)a1; v1 = *(_QWORD *)(a1 + 96); *(_QWORD *)(a1 + 104) = v1; return v1; } *(_BYTE *)(a1 + 128) = 1; *(_DWORD *)(*(_QWORD *)(a1 + 120) + 1160LL) = 0; *(_QWORD *)(a1 + 120) = 0LL; } return 0LL; } if ( *(_QWORD *)(a1 + 32) ) { v3 = *(_QWORD *)(*(_QWORD *)(a1 + 32) + 8LL); *(_QWORD *)(a1 + 32) = **(_QWORD **)(a1 + 32); *(_QWORD *)(a1 + 104) = v3; return v3; } else { *(_QWORD *)(a1 + 104) = 0LL; return 0LL; } }
mysql_fetch_row: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI CMP qword ptr [RBP + -0x10],0x0 JNZ 0x0013a420 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013a572 LAB_0013a420: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x78],0x0 JZ 0x0013a45c MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] CMP dword ptr [RAX + 0x488],0x2 JZ 0x0013a45a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] CMP dword ptr [RAX + 0x488],0x1 JZ 0x0013a45a MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013a572 LAB_0013a45a: JMP 0x0013a45c LAB_0013a45c: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x18],0x0 JNZ 0x0013a51e MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x80],0x0 JNZ 0x0013a514 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x78],0x0 JZ 0x0013a514 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] MOV RAX,qword ptr [RAX + 0x4d0] MOV RAX,qword ptr [RAX + 0x30] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x78] MOV RCX,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RCX + 0x8] MOV RCX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RCX + 0x60] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x70] CALL RAX CMP EAX,0x0 JNZ 0x0013a4eb MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x60] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x68],RAX MOV qword ptr [RBP + -0x8],RAX JMP 0x0013a572 LAB_0013a4eb: MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x80],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x78] MOV dword ptr [RAX + 0x488],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x78],0x0 LAB_0013a514: MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013a572 LAB_0013a51e: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x20],0x0 JNZ 0x0013a53f MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x68],0x0 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0013a572 LAB_0013a53f: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],RCX MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x68],RAX MOV qword ptr [RBP + -0x8],RAX LAB_0013a572: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
long mysql_fetch_row(long *param_1) { int iVar1; long local_10; if (param_1 == (long *)0x0) { local_10 = 0; } else if (((param_1[0xf] == 0) || (*(int *)(param_1[0xf] + 0x488) == 2)) || (*(int *)(param_1[0xf] + 0x488) == 1)) { if (param_1[3] == 0) { if (((char)param_1[0x10] == '\0') && (param_1[0xf] != 0)) { iVar1 = (**(code **)(*(long *)(param_1[0xf] + 0x4d0) + 0x30)) (param_1[0xf],(int)param_1[1],param_1[0xc],param_1[0xe]); if (iVar1 == 0) { *param_1 = *param_1 + 1; param_1[0xd] = param_1[0xc]; return param_1[0xc]; } *(int1 *)(param_1 + 0x10) = 1; *(int4 *)(param_1[0xf] + 0x488) = 0; param_1[0xf] = 0; } local_10 = 0; } else if (param_1[4] == 0) { param_1[0xd] = 0; local_10 = 0; } else { local_10 = *(long *)(param_1[4] + 8); param_1[4] = *(long *)param_1[4]; param_1[0xd] = local_10; } } else { local_10 = 0; } return local_10; }
46,704
ma_crypt_get_index_page_header_space
eloqsql/storage/maria/ma_crypt.c
uint ma_crypt_get_index_page_header_space(MARIA_SHARE *share) { if (share->base.born_transactional) { return CRYPT_SCHEME_1_KEY_VERSION_SIZE; } else { /* if the index is not transactional, we add 7 bytes LSN anyway to be used for counter block */ return LSN_STORE_SIZE + CRYPT_SCHEME_1_KEY_VERSION_SIZE; } }
O0
c
ma_crypt_get_index_page_header_space: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq -0x10(%rbp), %rax cmpb $0x0, 0x44c(%rax) je 0x8879e movl $0x4, -0x4(%rbp) jmp 0x887a5 movl $0xb, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
ma_crypt_get_index_page_header_space: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov rax, [rbp+var_10] cmp byte ptr [rax+44Ch], 0 jz short loc_8879E mov [rbp+var_4], 4 jmp short loc_887A5 loc_8879E: mov [rbp+var_4], 0Bh loc_887A5: mov eax, [rbp+var_4] pop rbp retn
long long ma_crypt_get_index_page_header_space(long long a1) { if ( *(_BYTE *)(a1 + 1100) ) return 4; else return 11; }
ma_crypt_get_index_page_header_space: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV RAX,qword ptr [RBP + -0x10] CMP byte ptr [RAX + 0x44c],0x0 JZ 0x0018879e MOV dword ptr [RBP + -0x4],0x4 JMP 0x001887a5 LAB_0018879e: MOV dword ptr [RBP + -0x4],0xb LAB_001887a5: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 ma_crypt_get_index_page_header_space(long param_1) { int4 local_c; if (*(char *)(param_1 + 0x44c) == '\0') { local_c = 0xb; } else { local_c = 4; } return local_c; }
46,705
c4_eth_get_method_type
corpus-core[P]colibri-stateless/src/chains/eth/verifier/eth_verify.c
method_type_t c4_eth_get_method_type(chain_id_t chain_id, char* method) { if (chain_id != C4_CHAIN_MAINNET) return METHOD_UNDEFINED; for (int i = 0; i < sizeof(proofable_methods) / sizeof(proofable_methods[0]); i++) { if (strcmp(method, proofable_methods[i]) == 0) return METHOD_PROOFABLE; } for (int i = 0; i < sizeof(local_methods) / sizeof(local_methods[0]); i++) { if (strcmp(method, local_methods[i]) == 0) return METHOD_LOCAL; } for (int i = 0; i < sizeof(not_verifieable_yet_methods) / sizeof(not_verifieable_yet_methods[0]); i++) { if (strcmp(method, not_verifieable_yet_methods[i]) == 0) return METHOD_UNPROOFABLE; } return METHOD_UNDEFINED; }
O3
c
c4_eth_get_method_type: cmpl $0x1, %edi jne 0x237fa pushq %r15 pushq %r14 pushq %rbx movq %rsi, %rbx xorl %r14d, %r14d leaq 0x5ba85(%rip), %r15 # 0x7f210 movslq (%r14,%r15), %rsi addq %r15, %rsi movq %rbx, %rdi callq 0x212e0 testl %eax, %eax je 0x237fd addq $0x4, %r14 cmpq $0x34, %r14 jne 0x2378b xorl %r14d, %r14d leaq 0x5ba92(%rip), %r15 # 0x7f244 movslq (%r14,%r15), %rsi addq %r15, %rsi movq %rbx, %rdi callq 0x212e0 testl %eax, %eax je 0x23804 addq $0x4, %r14 cmpq $0x14, %r14 jne 0x237b2 xorl %r14d, %r14d leaq 0x5ba7f(%rip), %r15 # 0x7f258 movslq (%r14,%r15), %rsi addq %r15, %rsi movq %rbx, %rdi callq 0x212e0 testl %eax, %eax je 0x2380b addq $0x4, %r14 cmpq $0x64, %r14 jne 0x237d9 xorl %eax, %eax jmp 0x23810 xorl %eax, %eax retq movl $0x1, %eax jmp 0x23810 movl $0x4, %eax jmp 0x23810 movl $0x2, %eax popq %rbx popq %r14 popq %r15 retq
c4_eth_get_method_type: cmp edi, 1 jnz loc_237FA push r15 push r14 push rbx mov rbx, rsi xor r14d, r14d lea r15, proofable_methods_rel loc_2378B: movsxd rsi, dword ptr [r14+r15] add rsi, r15 mov rdi, rbx call _strcmp test eax, eax jz short loc_237FD add r14, 4 cmp r14, 34h ; '4' jnz short loc_2378B xor r14d, r14d lea r15, local_methods_rel loc_237B2: movsxd rsi, dword ptr [r14+r15] add rsi, r15 mov rdi, rbx call _strcmp test eax, eax jz short loc_23804 add r14, 4 cmp r14, 14h jnz short loc_237B2 xor r14d, r14d lea r15, not_verifieable_yet_methods_rel loc_237D9: movsxd rsi, dword ptr [r14+r15] add rsi, r15 mov rdi, rbx call _strcmp test eax, eax jz short loc_2380B add r14, 4 cmp r14, 64h ; 'd' jnz short loc_237D9 xor eax, eax jmp short loc_23810 loc_237FA: xor eax, eax retn loc_237FD: mov eax, 1 jmp short loc_23810 loc_23804: mov eax, 4 jmp short loc_23810 loc_2380B: mov eax, 2 loc_23810: pop rbx pop r14 pop r15 retn
long long c4_eth_get_method_type(int a1, long long a2) { long long i; // r14 long long j; // r14 long long v4; // r14 if ( a1 != 1 ) return 0LL; for ( i = 0LL; i != 52; i += 4LL ) { if ( !(unsigned int)strcmp(a2, (char *)&proofable_methods_rel + *(int *)((char *)&proofable_methods_rel + i)) ) return 1LL; } for ( j = 0LL; j != 20; j += 4LL ) { if ( !(unsigned int)strcmp(a2, (char *)&local_methods_rel + *(int *)((char *)&local_methods_rel + j)) ) return 4LL; } v4 = 0LL; while ( (unsigned int)strcmp( a2, (char *)&not_verifieable_yet_methods_rel + *(int *)((char *)&not_verifieable_yet_methods_rel + v4)) ) { v4 += 4LL; if ( v4 == 100 ) return 0LL; } return 2LL; }
c4_eth_get_method_type: CMP EDI,0x1 JNZ 0x001237fa PUSH R15 PUSH R14 PUSH RBX MOV RBX,RSI XOR R14D,R14D LEA R15,[0x17f210] LAB_0012378b: MOVSXD RSI,dword ptr [R14 + R15*0x1] ADD RSI,R15 MOV RDI,RBX CALL 0x001212e0 TEST EAX,EAX JZ 0x001237fd ADD R14,0x4 CMP R14,0x34 JNZ 0x0012378b XOR R14D,R14D LEA R15,[0x17f244] LAB_001237b2: MOVSXD RSI,dword ptr [R14 + R15*0x1] ADD RSI,R15 MOV RDI,RBX CALL 0x001212e0 TEST EAX,EAX JZ 0x00123804 ADD R14,0x4 CMP R14,0x14 JNZ 0x001237b2 XOR R14D,R14D LEA R15,[0x17f258] LAB_001237d9: MOVSXD RSI,dword ptr [R14 + R15*0x1] ADD RSI,R15 MOV RDI,RBX CALL 0x001212e0 TEST EAX,EAX JZ 0x0012380b ADD R14,0x4 CMP R14,0x64 JNZ 0x001237d9 XOR EAX,EAX JMP 0x00123810 LAB_001237fa: XOR EAX,EAX RET LAB_001237fd: MOV EAX,0x1 JMP 0x00123810 LAB_00123804: MOV EAX,0x4 JMP 0x00123810 LAB_0012380b: MOV EAX,0x2 LAB_00123810: POP RBX POP R14 POP R15 RET
int8 c4_eth_get_method_type(int param_1,char *param_2) { int iVar1; long lVar2; if (param_1 != 1) { return 0; } lVar2 = 0; do { iVar1 = strcmp(param_2,(char *)((long)&proofable_methods_rel + (long)*(int *)((long)&proofable_methods_rel + lVar2))); if (iVar1 == 0) { return 1; } lVar2 = lVar2 + 4; } while (lVar2 != 0x34); lVar2 = 0; do { iVar1 = strcmp(param_2,(char *)((long)&local_methods_rel + (long)*(int *)((long)&local_methods_rel + lVar2))); if (iVar1 == 0) { return 4; } lVar2 = lVar2 + 4; } while (lVar2 != 0x14); lVar2 = 0; do { iVar1 = strcmp(param_2,(char *)((long)&not_verifieable_yet_methods_rel + (long)*(int *)((long)&not_verifieable_yet_methods_rel + lVar2))); if (iVar1 == 0) { return 2; } lVar2 = lVar2 + 4; } while (lVar2 != 100); return 0; }
46,706
last_word_mask
eloqsql/mysys/my_bitmap.c
static inline my_bitmap_map last_word_mask(uint bit) { my_bitmap_map last_word_mask; uint n_bits= bit + 1; unsigned char const mask= invers_last_byte_mask(n_bits); /* The first bytes are to be set to zero since they represent real bits in the bitvector. The last bytes are set to 0xFF since they represent bytes not used by the bitvector. Finally the last byte contains bits as set by the mask above. */ unsigned char *ptr= (unsigned char*)&last_word_mask; switch ((n_bits + 7)/8 & 3) { case 1: last_word_mask= ~0U; ptr[0]= mask; break; case 2: last_word_mask= ~0U; ptr[0]= 0; ptr[1]= mask; break; case 3: last_word_mask= 0U; ptr[2]= mask; ptr[3]= 0xFFU; break; case 0: last_word_mask= 0U; ptr[3]= mask; break; } return last_word_mask; }
O0
c
last_word_mask: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x4(%rbp) movl -0x4(%rbp), %eax incl %eax movl %eax, -0xc(%rbp) movl -0xc(%rbp), %edi callq 0xede10 movb %al, -0xd(%rbp) leaq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movl -0xc(%rbp), %eax addl $0x7, %eax shrl $0x3, %eax andl $0x3, %eax movl %eax, %ecx movq %rcx, -0x20(%rbp) subl $0x3, %eax ja 0xeeb59 movq -0x20(%rbp), %rax leaq 0x6aac8(%rip), %rcx # 0x1595c0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movl $0xffffffff, -0x8(%rbp) # imm = 0xFFFFFFFF movb -0xd(%rbp), %cl movq -0x18(%rbp), %rax movb %cl, (%rax) jmp 0xeeb59 movl $0xffffffff, -0x8(%rbp) # imm = 0xFFFFFFFF movq -0x18(%rbp), %rax movb $0x0, (%rax) movb -0xd(%rbp), %cl movq -0x18(%rbp), %rax movb %cl, 0x1(%rax) jmp 0xeeb59 movl $0x0, -0x8(%rbp) movb -0xd(%rbp), %cl movq -0x18(%rbp), %rax movb %cl, 0x2(%rax) movq -0x18(%rbp), %rax movb $-0x1, 0x3(%rax) jmp 0xeeb59 movl $0x0, -0x8(%rbp) movb -0xd(%rbp), %cl movq -0x18(%rbp), %rax movb %cl, 0x3(%rax) movl -0x8(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
last_word_mask: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_4], edi mov eax, [rbp+var_4] inc eax mov [rbp+var_C], eax mov edi, [rbp+var_C] call invers_last_byte_mask mov [rbp+var_D], al lea rax, [rbp+var_8] mov [rbp+var_18], rax mov eax, [rbp+var_C] add eax, 7 shr eax, 3 and eax, 3 mov ecx, eax mov [rbp+var_20], rcx sub eax, 3; switch 4 cases ja short def_EEAFF; jumptable 00000000000EEAFF default case mov rax, [rbp+var_20] lea rcx, jpt_EEAFF movsxd rax, ds:(jpt_EEAFF - 1595C0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_EEB01: mov [rbp+var_8], 0FFFFFFFFh; jumptable 00000000000EEAFF case 1 mov cl, [rbp+var_D] mov rax, [rbp+var_18] mov [rax], cl jmp short def_EEAFF; jumptable 00000000000EEAFF default case loc_EEB13: mov [rbp+var_8], 0FFFFFFFFh; jumptable 00000000000EEAFF case 2 mov rax, [rbp+var_18] mov byte ptr [rax], 0 mov cl, [rbp+var_D] mov rax, [rbp+var_18] mov [rax+1], cl jmp short def_EEAFF; jumptable 00000000000EEAFF default case loc_EEB2D: mov [rbp+var_8], 0; jumptable 00000000000EEAFF case 3 mov cl, [rbp+var_D] mov rax, [rbp+var_18] mov [rax+2], cl mov rax, [rbp+var_18] mov byte ptr [rax+3], 0FFh jmp short def_EEAFF; jumptable 00000000000EEAFF default case loc_EEB48: mov [rbp+var_8], 0; jumptable 00000000000EEAFF case 0 mov cl, [rbp+var_D] mov rax, [rbp+var_18] mov [rax+3], cl def_EEAFF: mov eax, [rbp+var_8]; jumptable 00000000000EEAFF default case add rsp, 20h pop rbp retn
long long last_word_mask(int a1) { char byte_mask; // [rsp+13h] [rbp-Dh] unsigned int v3; // [rsp+18h] [rbp-8h] byte_mask = invers_last_byte_mask(a1 + 1); switch ( ((unsigned int)(a1 + 8) >> 3) & 3 ) { case 0u: v3 = 0; HIBYTE(v3) = byte_mask; break; case 1u: v3 = -1; LOBYTE(v3) = byte_mask; break; case 2u: v3 = -256; BYTE1(v3) = byte_mask; break; case 3u: v3 = -16777216; BYTE2(v3) = byte_mask; break; default: return v3; } return v3; }
last_word_mask: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x4],EDI MOV EAX,dword ptr [RBP + -0x4] INC EAX MOV dword ptr [RBP + -0xc],EAX MOV EDI,dword ptr [RBP + -0xc] CALL 0x001ede10 MOV byte ptr [RBP + -0xd],AL LEA RAX,[RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV EAX,dword ptr [RBP + -0xc] ADD EAX,0x7 SHR EAX,0x3 AND EAX,0x3 MOV ECX,EAX MOV qword ptr [RBP + -0x20],RCX SUB EAX,0x3 JA 0x001eeb59 MOV RAX,qword ptr [RBP + -0x20] LEA RCX,[0x2595c0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV dword ptr [RBP + -0x8],0xffffffff MOV CL,byte ptr [RBP + -0xd] MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],CL JMP 0x001eeb59 caseD_2: MOV dword ptr [RBP + -0x8],0xffffffff MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX],0x0 MOV CL,byte ptr [RBP + -0xd] MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x1],CL JMP 0x001eeb59 caseD_3: MOV dword ptr [RBP + -0x8],0x0 MOV CL,byte ptr [RBP + -0xd] MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x2],CL MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x3],0xff JMP 0x001eeb59 caseD_0: MOV dword ptr [RBP + -0x8],0x0 MOV CL,byte ptr [RBP + -0xd] MOV RAX,qword ptr [RBP + -0x18] MOV byte ptr [RAX + 0x3],CL default: MOV EAX,dword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
int4 last_word_mask(int param_1) { int1 uVar1; int4 local_10; uVar1 = invers_last_byte_mask(param_1 + 1); switch(param_1 + 8U >> 3 & 3) { case 0: local_10 = 0; /* WARNING: Ignoring partial resolution of indirect */ local_10._3_1_ = uVar1; break; case 1: local_10 = 0xffffffff; /* WARNING: Ignoring partial resolution of indirect */ local_10._0_1_ = uVar1; break; case 2: local_10 = 0xffffffff; /* WARNING: Ignoring partial resolution of indirect */ local_10._0_1_ = 0; /* WARNING: Ignoring partial resolution of indirect */ local_10._1_1_ = uVar1; break; case 3: local_10 = 0; /* WARNING: Ignoring partial resolution of indirect */ local_10._2_1_ = uVar1; /* WARNING: Ignoring partial resolution of indirect */ local_10._3_1_ = 0xff; } return local_10; }
46,707
SchemaConverter::SchemaConverter(std::function<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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&, bool, bool)
monkey531[P]llama/common/json-schema-to-grammar.cpp
SchemaConverter( const std::function<json(const std::string &)> & fetch_json, bool dotall, bool compact_spaces) : _fetch_json(fetch_json), _dotall(dotall) { _rules["space"] = compact_spaces ? "\" \"?" : SPACE_RULE; }
O1
cpp
SchemaConverter::SchemaConverter(std::function<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::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)> const&, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movl %ecx, %ebp movl %edx, %r14d movq %rdi, %rbx callq 0x9d90e movb %r14b, 0x20(%rbx) leaq 0x28(%rbx), %r14 leaq 0x30(%rbx), %rax movl $0x0, 0x30(%rbx) xorl %ecx, %ecx movq %rcx, 0x38(%rbx) movq %rax, 0x40(%rbx) movq %rax, 0x48(%rbx) movq %rcx, 0x50(%rbx) leaq 0x88(%rbx), %rax movq %rax, 0x58(%rbx) movl $0x1, %eax movq %rax, 0x60(%rbx) xorps %xmm0, %xmm0 movups %xmm0, 0x68(%rbx) movl $0x3f800000, %ecx # imm = 0x3F800000 movl %ecx, 0x78(%rbx) movups %xmm0, 0x80(%rbx) leaq 0xc0(%rbx), %rdx movq %rdx, 0x90(%rbx) movq %rax, 0x98(%rbx) movups %xmm0, 0xa0(%rbx) movl %ecx, 0xb0(%rbx) movups %xmm0, 0xb8(%rbx) movups %xmm0, 0xc8(%rbx) movups %xmm0, 0xd8(%rbx) movups %xmm0, 0xe8(%rbx) leaq 0x18(%rsp), %r12 movq %r12, -0x10(%r12) testl %ebp, %ebp je 0x9d27e leaq 0x1898e(%rip), %rsi # 0xb5bf9 leaq 0x1898b(%rip), %rdx # 0xb5bfd leaq 0x8(%rsp), %rdi callq 0x1de7e jmp 0x9d299 movq 0x45083(%rip), %rsi # 0xe2308 movq 0x45084(%rip), %rdx # 0xe2310 addq %rsi, %rdx leaq 0x8(%rsp), %rdi callq 0x1db86 leaq 0x38(%rsp), %r13 movq %r13, -0x10(%r13) leaq 0x18b52(%rip), %rsi # 0xb5dfb leaq 0x18b50(%rip), %rdx # 0xb5e00 leaq 0x28(%rsp), %rdi callq 0x1de7e leaq 0x28(%rsp), %rsi movq %r14, %rdi callq 0x9d96c leaq 0x8(%rsp), %rsi movq %rax, %rdi callq 0x183b0 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x9d2eb movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x9d302 movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %r15 jmp 0x9d335 movq %rax, %r15 jmp 0x9d34c movq %rax, %r15 movq 0x28(%rsp), %rdi cmpq %r13, %rdi je 0x9d335 movq 0x38(%rsp), %rsi incq %rsi callq 0x186a0 movq 0x8(%rsp), %rdi cmpq %r12, %rdi je 0x9d34c movq 0x18(%rsp), %rsi incq %rsi callq 0x186a0 leaq 0x58(%rbx), %r12 leaq 0x90(%rbx), %r13 leaq 0xc8(%rbx), %rbp leaq 0xe0(%rbx), %rdi callq 0x1d946 movq %rbp, %rdi callq 0x1d946 movq %r13, %rdi callq 0x2cb60 movq %r12, %rdi callq 0x9dd7a movq %r14, %rdi callq 0x9de5c movq 0x10(%rbx), %rax testq %rax, %rax je 0x9d3a0 movq %rbx, %rdi movq %rbx, %rsi movl $0x3, %edx callq *%rax movq %r15, %rdi callq 0x18bc0 movq %rax, %rdi callq 0x1d7ab
_ZN15SchemaConverterC2ERKSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS2_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS2_14adl_serializerES5_IhSaIhEEvEERKSB_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov ebp, ecx mov r14d, edx mov rbx, rdi call _ZNSt8functionIFN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_EEC2ERKSI_; std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&)>::function(std::function<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> ()(std::string const&)> const&) mov [rbx+20h], r14b lea r14, [rbx+28h] lea rax, [rbx+30h] mov dword ptr [rbx+30h], 0 xor ecx, ecx mov [rbx+38h], rcx mov [rbx+40h], rax mov [rbx+48h], rax mov [rbx+50h], rcx lea rax, [rbx+88h] mov [rbx+58h], rax mov eax, 1 mov [rbx+60h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx+68h], xmm0 mov ecx, 3F800000h mov [rbx+78h], ecx movups xmmword ptr [rbx+80h], xmm0 lea rdx, [rbx+0C0h] mov [rbx+90h], rdx mov [rbx+98h], rax movups xmmword ptr [rbx+0A0h], xmm0 mov [rbx+0B0h], ecx movups xmmword ptr [rbx+0B8h], xmm0 movups xmmword ptr [rbx+0C8h], xmm0 movups xmmword ptr [rbx+0D8h], xmm0 movups xmmword ptr [rbx+0E8h], xmm0 lea r12, [rsp+78h+var_60] mov [r12-10h], r12 test ebp, ebp jz short loc_9D27E lea rsi, asc_B5BF9; "\" \"?" lea rdx, asc_B5BF9+4; "" lea rdi, [rsp+78h+var_70] 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) jmp short loc_9D299 loc_9D27E: mov rsi, cs:_ZL10SPACE_RULEB5cxx11; SPACE_RULE mov rdx, cs:qword_E2310 add rdx, rsi lea rdi, [rsp+78h+var_70] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPcEEvT_S7_St20forward_iterator_tag; std::string::_M_construct<char *>(char *,char *,std::forward_iterator_tag) loc_9D299: lea r13, [rsp+78h+var_40] mov [r13-10h], r13 lea rsi, aSpace+7; "space" lea rdx, aSpace+0Ch; "" lea rdi, [rsp+78h+var_50] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) lea rsi, [rsp+78h+var_50] mov rdi, r14 call _ZNSt3mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_St4lessIS5_ESaISt4pairIKS5_S5_EEEixEOS5_; std::map<std::string,std::string>::operator[](std::string&&) lea rsi, [rsp+78h+var_70] mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) mov rdi, [rsp+78h+var_50]; void * cmp rdi, r13 jz short loc_9D2EB mov rsi, [rsp+78h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9D2EB: mov rdi, [rsp+78h+var_70]; void * cmp rdi, r12 jz short loc_9D302 mov rsi, [rsp+78h+var_60] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9D302: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov r15, rax jmp short loc_9D335 mov r15, rax jmp short loc_9D34C mov r15, rax mov rdi, [rsp+arg_20]; void * cmp rdi, r13 jz short loc_9D335 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9D335: mov rdi, [rsp+arg_0]; void * cmp rdi, r12 jz short loc_9D34C mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_9D34C: lea r12, [rbx+58h] lea r13, [rbx+90h] lea rbp, [rbx+0C8h] lea rdi, [rbx+0E0h] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, rbp call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, r13 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_SaIS5_ENSt8__detail9_IdentityESt8equal_toIS5_ESt4hashIS5_ENS7_18_Mod_range_hashingENS7_20_Default_ranged_hashENS7_20_Prime_rehash_policyENS7_17_Hashtable_traitsILb1ELb1ELb1EEEED2Ev; std::_Hashtable<std::string,std::string,std::allocator<std::string>,std::__detail::_Identity,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,true,true>>::~_Hashtable() mov rdi, r12 call _ZNSt10_HashtableINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_N8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapESt6vectorS5_blmdSaNS9_14adl_serializerESC_IhSaIhEEvEEESaISH_ENSt8__detail10_Select1stESt8equal_toIS5_ESt4hashIS5_ENSJ_18_Mod_range_hashingENSJ_20_Default_ranged_hashENSJ_20_Prime_rehash_policyENSJ_17_Hashtable_traitsILb1ELb0ELb1EEEED2Ev; std::_Hashtable<std::string,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>>,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>>>,std::__detail::_Select1st,std::equal_to<std::string>,std::hash<std::string>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<true,false,true>>::~_Hashtable() mov rdi, r14 call _ZNSt8_Rb_treeINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt4pairIKS5_S5_ESt10_Select1stIS8_ESt4lessIS5_ESaIS8_EED2Ev; std::_Rb_tree<std::string,std::pair<std::string const,std::string>,std::_Select1st<std::pair<std::string const,std::string>>,std::less<std::string>,std::allocator<std::pair<std::string const,std::string>>>::~_Rb_tree() mov rax, [rbx+10h] test rax, rax jz short loc_9D3A0 mov rdi, rbx mov rsi, rbx mov edx, 3 call rax loc_9D3A0: mov rdi, r15 call __Unwind_Resume mov rdi, rax call __clang_call_terminate
void SchemaConverter::SchemaConverter(long long a1, int a2, char a3, int a4) { long long v6; // rax void *v7[2]; // [rsp+8h] [rbp-70h] BYREF _QWORD v8[2]; // [rsp+18h] [rbp-60h] BYREF void *v9[2]; // [rsp+28h] [rbp-50h] BYREF _QWORD v10[8]; // [rsp+38h] [rbp-40h] BYREF std::function<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::string const&)>::function(); *(_BYTE *)(a1 + 32) = a3; *(_DWORD *)(a1 + 48) = 0; *(_QWORD *)(a1 + 56) = 0LL; *(_QWORD *)(a1 + 64) = a1 + 48; *(_QWORD *)(a1 + 72) = a1 + 48; *(_QWORD *)(a1 + 80) = 0LL; *(_QWORD *)(a1 + 88) = a1 + 136; *(_QWORD *)(a1 + 96) = 1LL; *(_OWORD *)(a1 + 104) = 0LL; *(_DWORD *)(a1 + 120) = 1065353216; *(_OWORD *)(a1 + 128) = 0LL; *(_QWORD *)(a1 + 144) = a1 + 192; *(_QWORD *)(a1 + 152) = 1LL; *(_OWORD *)(a1 + 160) = 0LL; *(_DWORD *)(a1 + 176) = 1065353216; *(_OWORD *)(a1 + 184) = 0LL; *(_OWORD *)(a1 + 200) = 0LL; *(_OWORD *)(a1 + 216) = 0LL; *(_OWORD *)(a1 + 232) = 0LL; v7[0] = v8; if ( a4 ) std::string::_M_construct<char const*>(v7, "\" \"?", (long long)""); else std::string::_M_construct<char *>(v7, (_BYTE *)SPACE_RULE[abi:cxx11], SPACE_RULE[abi:cxx11] + qword_E2310); v9[0] = v10; std::string::_M_construct<char const*>(v9, "space", (long long)""); v6 = std::map<std::string,std::string>::operator[](a1 + 40, v9); std::string::_M_assign(v6, v7); if ( v9[0] != v10 ) operator delete(v9[0], v10[0] + 1LL); if ( v7[0] != v8 ) operator delete(v7[0], v8[0] + 1LL); }
SchemaConverter: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV EBP,ECX MOV R14D,EDX MOV RBX,RDI CALL 0x0019d90e MOV byte ptr [RBX + 0x20],R14B LEA R14,[RBX + 0x28] LEA RAX,[RBX + 0x30] MOV dword ptr [RBX + 0x30],0x0 XOR ECX,ECX MOV qword ptr [RBX + 0x38],RCX MOV qword ptr [RBX + 0x40],RAX MOV qword ptr [RBX + 0x48],RAX MOV qword ptr [RBX + 0x50],RCX LEA RAX,[RBX + 0x88] MOV qword ptr [RBX + 0x58],RAX MOV EAX,0x1 MOV qword ptr [RBX + 0x60],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX + 0x68],XMM0 MOV ECX,0x3f800000 MOV dword ptr [RBX + 0x78],ECX MOVUPS xmmword ptr [RBX + 0x80],XMM0 LEA RDX,[RBX + 0xc0] MOV qword ptr [RBX + 0x90],RDX MOV qword ptr [RBX + 0x98],RAX MOVUPS xmmword ptr [RBX + 0xa0],XMM0 MOV dword ptr [RBX + 0xb0],ECX MOVUPS xmmword ptr [RBX + 0xb8],XMM0 MOVUPS xmmword ptr [RBX + 0xc8],XMM0 MOVUPS xmmword ptr [RBX + 0xd8],XMM0 MOVUPS xmmword ptr [RBX + 0xe8],XMM0 LEA R12,[RSP + 0x18] MOV qword ptr [R12 + -0x10],R12 TEST EBP,EBP JZ 0x0019d27e LAB_0019d264: LEA RSI,[0x1b5bf9] LEA RDX,[0x1b5bfd] LEA RDI,[RSP + 0x8] CALL 0x0011de7e JMP 0x0019d299 LAB_0019d27e: MOV RSI,qword ptr [0x001e2308] MOV RDX,qword ptr [0x001e2310] ADD RDX,RSI LEA RDI,[RSP + 0x8] CALL 0x0011db86 LAB_0019d299: LEA R13,[RSP + 0x38] MOV qword ptr [R13 + -0x10],R13 LAB_0019d2a2: LEA RSI,[0x1b5dfb] LEA RDX,[0x1b5e00] LEA RDI,[RSP + 0x28] CALL 0x0011de7e LAB_0019d2ba: LEA RSI,[RSP + 0x28] MOV RDI,R14 CALL 0x0019d96c LEA RSI,[RSP + 0x8] MOV RDI,RAX CALL 0x001183b0 MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R13 JZ 0x0019d2eb MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x001186a0 LAB_0019d2eb: MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R12 JZ 0x0019d302 MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x001186a0 LAB_0019d302: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* SchemaConverter::SchemaConverter(std::function<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::__cxx11::string const&)> const&, bool, bool) */ void __thiscall SchemaConverter::SchemaConverter(SchemaConverter *this,function *param_1,bool param_2,bool param_3) { string *psVar1; int7 in_register_00000009; long *local_70 [2]; long local_60 [2]; long *local_50 [2]; long local_40 [2]; std:: function<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::__cxx11::string_const&)> ::function((function<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::__cxx11::string_const&)> *)this,param_1); this[0x20] = (SchemaConverter)param_2; *(int4 *)(this + 0x30) = 0; *(int8 *)(this + 0x38) = 0; *(SchemaConverter **)(this + 0x40) = this + 0x30; *(SchemaConverter **)(this + 0x48) = this + 0x30; *(int8 *)(this + 0x50) = 0; *(SchemaConverter **)(this + 0x58) = this + 0x88; *(int8 *)(this + 0x60) = 1; *(int8 *)(this + 0x68) = 0; *(int8 *)(this + 0x70) = 0; *(int4 *)(this + 0x78) = 0x3f800000; *(int8 *)(this + 0x80) = 0; *(int8 *)(this + 0x88) = 0; *(SchemaConverter **)(this + 0x90) = this + 0xc0; *(int8 *)(this + 0x98) = 1; *(int8 *)(this + 0xa0) = 0; *(int8 *)(this + 0xa8) = 0; *(int4 *)(this + 0xb0) = 0x3f800000; *(int8 *)(this + 0xb8) = 0; *(int8 *)(this + 0xc0) = 0; *(int8 *)(this + 200) = 0; *(int8 *)(this + 0xd0) = 0; *(int8 *)(this + 0xd8) = 0; *(int8 *)(this + 0xe0) = 0; *(int8 *)(this + 0xe8) = 0; *(int8 *)(this + 0xf0) = 0; local_70[0] = local_60; if ((int)CONCAT71(in_register_00000009,param_3) == 0) { std::__cxx11::string::_M_construct<char*> (local_70,SPACE_RULE_abi_cxx11_,DAT_001e2310 + SPACE_RULE_abi_cxx11_); } else { /* try { // try from 0019d264 to 0019d298 has its CatchHandler @ 0019d316 */ std::__cxx11::string::_M_construct<char_const*>(local_70,&DAT_001b5bf9,&DAT_001b5bfd); } /* try { // try from 0019d2a2 to 0019d2b9 has its CatchHandler @ 0019d311 */ local_50[0] = local_40; std::__cxx11::string::_M_construct<char_const*>(local_50,"space",""); /* try { // try from 0019d2ba to 0019d2d3 has its CatchHandler @ 0019d31b */ psVar1 = (string *) std:: map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> ::operator[]((map<std::__cxx11::string,std::__cxx11::string,std::less<std::__cxx11::string>,std::allocator<std::pair<std::__cxx11::string_const,std::__cxx11::string>>> *)(this + 0x28),(string *)local_50); std::__cxx11::string::_M_assign(psVar1); if (local_50[0] != local_40) { operator_delete(local_50[0],local_40[0] + 1); } if (local_70[0] != local_60) { operator_delete(local_70[0],local_60[0] + 1); } return; }
46,708
get_charset_number
eloqsql/mysys/charset.c
uint get_charset_number(const char *charset_name, uint cs_flags, myf flags) { uint id; const char *new_charset_name= flags & MY_UTF8_IS_UTF8MB3 ? "utf8mb3" : "utf8mb4"; my_pthread_once(&charsets_initialized, init_available_charsets); if ((id= get_charset_number_internal(charset_name, cs_flags))) return id; if ((charset_name= !my_strcasecmp(&my_charset_latin1, charset_name, "utf8") ? new_charset_name : NULL)) return get_charset_number_internal(charset_name, cs_flags); return 0; }
O0
c
get_charset_number: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq -0x20(%rbp), %rdx andq $0x400, %rdx # imm = 0x400 leaq 0x5058b(%rip), %rax # 0x795b0 leaq 0x5057c(%rip), %rcx # 0x795a8 cmpq $0x0, %rdx cmovneq %rcx, %rax movq %rax, -0x30(%rbp) leaq 0x3655e5(%rip), %rdi # 0x38e624 leaq -0x306(%rip), %rsi # 0x28d40 callq 0x24270 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi callq 0x290e0 movl %eax, -0x24(%rbp) cmpl $0x0, %eax je 0x29067 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x290ca leaq 0x24b7b2(%rip), %rax # 0x274820 movq 0xc0(%rax), %rax movq 0x40(%rax), %rax movq -0x10(%rbp), %rsi leaq 0x24b79c(%rip), %rdi # 0x274820 leaq 0x5052d(%rip), %rdx # 0x795b8 callq *%rax cmpl $0x0, %eax jne 0x2909c movq -0x30(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x290a4 xorl %eax, %eax movq %rax, -0x38(%rbp) jmp 0x290a4 movq -0x38(%rbp), %rax movq %rax, -0x10(%rbp) cmpq $0x0, %rax je 0x290c3 movq -0x10(%rbp), %rdi movl -0x14(%rbp), %esi callq 0x290e0 movl %eax, -0x4(%rbp) jmp 0x290ca movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
get_charset_number: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_14], esi mov [rbp+var_20], rdx mov rdx, [rbp+var_20] and rdx, 400h lea rax, aUtf8mb4; "utf8mb4" lea rcx, aUtf8mb3; "utf8mb3" cmp rdx, 0 cmovnz rax, rcx mov [rbp+var_30], rax lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, [rbp+var_10] mov esi, [rbp+var_14] call get_charset_number_internal mov [rbp+var_24], eax cmp eax, 0 jz short loc_29067 mov eax, [rbp+var_24] mov [rbp+var_4], eax jmp short loc_290CA loc_29067: lea rax, my_charset_latin1 mov rax, [rax+0C0h] mov rax, [rax+40h] mov rsi, [rbp+var_10] lea rdi, my_charset_latin1 lea rdx, aUtf8; "utf8" call rax cmp eax, 0 jnz short loc_2909C mov rax, [rbp+var_30] mov [rbp+var_38], rax jmp short loc_290A4 loc_2909C: xor eax, eax mov [rbp+var_38], rax jmp short $+2 loc_290A4: mov rax, [rbp+var_38] mov [rbp+var_10], rax cmp rax, 0 jz short loc_290C3 mov rdi, [rbp+var_10] mov esi, [rbp+var_14] call get_charset_number_internal mov [rbp+var_4], eax jmp short loc_290CA loc_290C3: mov [rbp+var_4], 0 loc_290CA: mov eax, [rbp+var_4] add rsp, 40h pop rbp retn
long long get_charset_number(long long a1, unsigned int a2, __int16 a3) { const char *v3; // rax const char *v5; // [rsp+8h] [rbp-38h] const char *v6; // [rsp+10h] [rbp-30h] unsigned int charset_number_internal; // [rsp+1Ch] [rbp-24h] v3 = "utf8mb4"; if ( (a3 & 0x400) != 0 ) v3 = "utf8mb3"; v6 = v3; pthread_once(&charsets_initialized, init_available_charsets); charset_number_internal = get_charset_number_internal(a1, a2); if ( charset_number_internal ) { return charset_number_internal; } else { if ( (*(unsigned int ( **)(void *, long long, const char *))(*((_QWORD *)&my_charset_latin1 + 24) + 64LL))( &my_charset_latin1, a1, "utf8") ) { v5 = 0LL; } else { v5 = v6; } if ( v5 ) return (unsigned int)get_charset_number_internal(v5, a2); else return 0; } }
get_charset_number: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV RDX,qword ptr [RBP + -0x20] AND RDX,0x400 LEA RAX,[0x1795b0] LEA RCX,[0x1795a8] CMP RDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x30],RAX LEA RDI,[0x48e624] LEA RSI,[0x128d40] CALL 0x00124270 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] CALL 0x001290e0 MOV dword ptr [RBP + -0x24],EAX CMP EAX,0x0 JZ 0x00129067 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX JMP 0x001290ca LAB_00129067: LEA RAX,[0x374820] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x40] MOV RSI,qword ptr [RBP + -0x10] LEA RDI,[0x374820] LEA RDX,[0x1795b8] CALL RAX CMP EAX,0x0 JNZ 0x0012909c MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x38],RAX JMP 0x001290a4 LAB_0012909c: XOR EAX,EAX MOV qword ptr [RBP + -0x38],RAX JMP 0x001290a4 LAB_001290a4: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x10],RAX CMP RAX,0x0 JZ 0x001290c3 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x14] CALL 0x001290e0 MOV dword ptr [RBP + -0x4],EAX JMP 0x001290ca LAB_001290c3: MOV dword ptr [RBP + -0x4],0x0 LAB_001290ca: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x40 POP RBP RET
int get_charset_number(int8 param_1,int4 param_2,ulong param_3) { int iVar1; char *local_40; int local_c; local_40 = "utf8mb4"; if ((param_3 & 0x400) != 0) { local_40 = "utf8mb3"; } pthread_once(&charsets_initialized,init_available_charsets); local_c = get_charset_number_internal(param_1,param_2); if (local_c == 0) { iVar1 = (**(code **)(PTR_my_collation_8bit_simple_ci_handler_003748e0 + 0x40)) (&my_charset_latin1,param_1,&DAT_001795b8); if (iVar1 != 0) { local_40 = (char *)0x0; } if (local_40 == (char *)0x0) { local_c = 0; } else { local_c = get_charset_number_internal(local_40,param_2); } } return local_c; }
46,709
js_async_generator_await
bluesky950520[P]quickjs/quickjs.c
static int js_async_generator_await(JSContext *ctx, JSAsyncGeneratorData *s, JSValue value) { JSValue promise, resolving_funcs[2], resolving_funcs1[2]; int i, res; promise = js_promise_resolve(ctx, ctx->promise_ctor, 1, &value, 0); if (JS_IsException(promise)) goto fail; if (js_async_generator_resolve_function_create(ctx, JS_MKPTR(JS_TAG_OBJECT, s->generator), resolving_funcs, FALSE)) { JS_FreeValue(ctx, promise); goto fail; } /* Note: no need to create 'thrownawayCapability' as in the spec */ for(i = 0; i < 2; i++) resolving_funcs1[i] = JS_UNDEFINED; res = perform_promise_then(ctx, promise, resolving_funcs, resolving_funcs1); JS_FreeValue(ctx, promise); for(i = 0; i < 2; i++) JS_FreeValue(ctx, resolving_funcs[i]); if (res) goto fail; return 0; fail: return -1; }
O0
c
js_async_generator_await: subq $0xb8, %rsp movq %rdx, 0xa0(%rsp) movq %rcx, 0xa8(%rsp) movq %rdi, 0x98(%rsp) movq %rsi, 0x90(%rsp) movq 0x98(%rsp), %rdi movq 0x98(%rsp), %rax movq 0x88(%rax), %rsi movq 0x90(%rax), %rdx movl $0x1, %ecx leaq 0xa0(%rsp), %r8 xorl %r9d, %r9d callq 0x91830 movq %rax, 0x28(%rsp) movq %rdx, 0x30(%rsp) movq 0x28(%rsp), %rax movq %rax, 0x80(%rsp) movq 0x30(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x80(%rsp), %rdi movq 0x88(%rsp), %rsi callq 0x22a00 cmpl $0x0, %eax je 0x962ad jmp 0x963fa movq 0x98(%rsp), %rdi movq 0x90(%rsp), %rax movq (%rax), %rax movq %rax, 0x18(%rsp) movq $-0x1, 0x20(%rsp) leaq 0x60(%rsp), %rcx movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx xorl %r8d, %r8d callq 0x96550 cmpl $0x0, %eax je 0x9630c movq 0x98(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x229d0 jmp 0x963fa movl $0x0, 0x3c(%rsp) cmpl $0x2, 0x3c(%rsp) jge 0x9635b movslq 0x3c(%rsp), %rcx leaq 0x40(%rsp), %rax shlq $0x4, %rcx addq %rcx, %rax movl $0x0, 0x8(%rsp) movq $0x3, 0x10(%rsp) movq 0x8(%rsp), %rcx movq %rcx, (%rax) movq 0x10(%rsp), %rcx movq %rcx, 0x8(%rax) movl 0x3c(%rsp), %eax addl $0x1, %eax movl %eax, 0x3c(%rsp) jmp 0x96314 movq 0x98(%rsp), %rdi leaq 0x60(%rsp), %rcx leaq 0x40(%rsp), %r8 movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x737a0 movl %eax, 0x38(%rsp) movq 0x98(%rsp), %rdi movq 0x80(%rsp), %rsi movq 0x88(%rsp), %rdx callq 0x229d0 movl $0x0, 0x3c(%rsp) cmpl $0x2, 0x3c(%rsp) jge 0x963e4 movq 0x98(%rsp), %rdi movslq 0x3c(%rsp), %rcx leaq 0x60(%rsp), %rax shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rsi movq 0x8(%rax), %rdx callq 0x229d0 movl 0x3c(%rsp), %eax addl $0x1, %eax movl %eax, 0x3c(%rsp) jmp 0x963ab cmpl $0x0, 0x38(%rsp) je 0x963ed jmp 0x963fa movl $0x0, 0xb4(%rsp) jmp 0x96405 movl $0xffffffff, 0xb4(%rsp) # imm = 0xFFFFFFFF movl 0xb4(%rsp), %eax addq $0xb8, %rsp retq nopw %cs:(%rax,%rax)
js_async_generator_await: sub rsp, 0B8h mov [rsp+0B8h+var_18], rdx mov [rsp+0B8h+var_10], rcx mov [rsp+0B8h+var_20], rdi mov [rsp+0B8h+var_28], rsi mov rdi, [rsp+0B8h+var_20] mov rax, [rsp+0B8h+var_20] mov rsi, [rax+88h] mov rdx, [rax+90h] mov ecx, 1 lea r8, [rsp+0B8h+var_18] xor r9d, r9d call js_promise_resolve mov [rsp+0B8h+var_90], rax mov [rsp+0B8h+var_88], rdx mov rax, [rsp+0B8h+var_90] mov [rsp+0B8h+var_38], rax mov rax, [rsp+0B8h+var_88] mov [rsp+0B8h+var_30], rax mov rdi, [rsp+0B8h+var_38] mov rsi, [rsp+0B8h+var_30] call JS_IsException_1 cmp eax, 0 jz short loc_962AD jmp loc_963FA loc_962AD: mov rdi, [rsp+0B8h+var_20] mov rax, [rsp+0B8h+var_28] mov rax, [rax] mov [rsp+0B8h+var_A0], rax mov [rsp+0B8h+var_98], 0FFFFFFFFFFFFFFFFh lea rcx, [rsp+0B8h+var_58] mov rsi, [rsp+0B8h+var_A0] mov rdx, [rsp+0B8h+var_98] xor r8d, r8d call js_async_generator_resolve_function_create cmp eax, 0 jz short loc_9630C mov rdi, [rsp+0B8h+var_20] mov rsi, [rsp+0B8h+var_38] mov rdx, [rsp+0B8h+var_30] call JS_FreeValue jmp loc_963FA loc_9630C: mov [rsp+0B8h+var_7C], 0 loc_96314: cmp [rsp+0B8h+var_7C], 2 jge short loc_9635B movsxd rcx, [rsp+0B8h+var_7C] lea rax, [rsp+0B8h+var_78] shl rcx, 4 add rax, rcx mov dword ptr [rsp+0B8h+var_B0], 0 mov [rsp+0B8h+var_A8], 3 mov rcx, [rsp+0B8h+var_B0] mov [rax], rcx mov rcx, [rsp+0B8h+var_A8] mov [rax+8], rcx mov eax, [rsp+0B8h+var_7C] add eax, 1 mov [rsp+0B8h+var_7C], eax jmp short loc_96314 loc_9635B: mov rdi, [rsp+0B8h+var_20] lea rcx, [rsp+0B8h+var_58] lea r8, [rsp+0B8h+var_78] mov rsi, [rsp+0B8h+var_38] mov rdx, [rsp+0B8h+var_30] call perform_promise_then mov [rsp+0B8h+var_80], eax mov rdi, [rsp+0B8h+var_20] mov rsi, [rsp+0B8h+var_38] mov rdx, [rsp+0B8h+var_30] call JS_FreeValue mov [rsp+0B8h+var_7C], 0 loc_963AB: cmp [rsp+0B8h+var_7C], 2 jge short loc_963E4 mov rdi, [rsp+0B8h+var_20] movsxd rcx, [rsp+0B8h+var_7C] lea rax, [rsp+0B8h+var_58] shl rcx, 4 add rax, rcx mov rsi, [rax] mov rdx, [rax+8] call JS_FreeValue mov eax, [rsp+0B8h+var_7C] add eax, 1 mov [rsp+0B8h+var_7C], eax jmp short loc_963AB loc_963E4: cmp [rsp+0B8h+var_80], 0 jz short loc_963ED jmp short loc_963FA loc_963ED: mov [rsp+0B8h+var_4], 0 jmp short loc_96405 loc_963FA: mov [rsp+0B8h+var_4], 0FFFFFFFFh loc_96405: mov eax, [rsp+0B8h+var_4] add rsp, 0B8h retn
long long js_async_generator_await( long long a1, _QWORD *a2, long long a3, long long a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, double a9, double a10, __m128 a11, __m128 a12) { long long v12; // rdx _QWORD *v13; // rax long long v15; // [rsp+8h] [rbp-B0h] int v16; // [rsp+38h] [rbp-80h] int i; // [rsp+3Ch] [rbp-7Ch] int j; // [rsp+3Ch] [rbp-7Ch] _OWORD v19[2]; // [rsp+40h] [rbp-78h] BYREF _QWORD v20[4]; // [rsp+60h] [rbp-58h] BYREF long long v21; // [rsp+80h] [rbp-38h] long long v22; // [rsp+88h] [rbp-30h] _QWORD *v23; // [rsp+90h] [rbp-28h] long long v24; // [rsp+98h] [rbp-20h] long long v25[2]; // [rsp+A0h] [rbp-18h] BYREF v25[0] = a3; v25[1] = a4; v24 = a1; v23 = a2; v21 = js_promise_resolve( a1, *(_DWORD **)(a1 + 136), *(_QWORD *)(a1 + 144), 1, v25, 0, a5, a6, a7, a8, a9, a10, a11, a12); v22 = v12; if ( JS_IsException_1(v21, v12) ) return (unsigned int)-1; if ( (unsigned int)js_async_generator_resolve_function_create(v24, *v23, -1LL, v20, 0LL) ) { JS_FreeValue(v24, v21, v22); return (unsigned int)-1; } for ( i = 0; i < 2; ++i ) { v13 = &v19[i]; LODWORD(v15) = 0; *v13 = v15; v13[1] = 3LL; } v16 = perform_promise_then(v24, v21, v22, (long long)v20, (long long)v19); JS_FreeValue(v24, v21, v22); for ( j = 0; j < 2; ++j ) JS_FreeValue(v24, v20[2 * j], v20[2 * j + 1]); if ( v16 ) return (unsigned int)-1; return 0; }
js_async_generator_await: SUB RSP,0xb8 MOV qword ptr [RSP + 0xa0],RDX MOV qword ptr [RSP + 0xa8],RCX MOV qword ptr [RSP + 0x98],RDI MOV qword ptr [RSP + 0x90],RSI MOV RDI,qword ptr [RSP + 0x98] MOV RAX,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RAX + 0x88] MOV RDX,qword ptr [RAX + 0x90] MOV ECX,0x1 LEA R8,[RSP + 0xa0] XOR R9D,R9D CALL 0x00191830 MOV qword ptr [RSP + 0x28],RAX MOV qword ptr [RSP + 0x30],RDX MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0x80] MOV RSI,qword ptr [RSP + 0x88] CALL 0x00122a00 CMP EAX,0x0 JZ 0x001962ad JMP 0x001963fa LAB_001962ad: MOV RDI,qword ptr [RSP + 0x98] MOV RAX,qword ptr [RSP + 0x90] MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x20],-0x1 LEA RCX,[RSP + 0x60] MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] XOR R8D,R8D CALL 0x00196550 CMP EAX,0x0 JZ 0x0019630c MOV RDI,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x001229d0 JMP 0x001963fa LAB_0019630c: MOV dword ptr [RSP + 0x3c],0x0 LAB_00196314: CMP dword ptr [RSP + 0x3c],0x2 JGE 0x0019635b MOVSXD RCX,dword ptr [RSP + 0x3c] LEA RAX,[RSP + 0x40] SHL RCX,0x4 ADD RAX,RCX MOV dword ptr [RSP + 0x8],0x0 MOV qword ptr [RSP + 0x10],0x3 MOV RCX,qword ptr [RSP + 0x8] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV EAX,dword ptr [RSP + 0x3c] ADD EAX,0x1 MOV dword ptr [RSP + 0x3c],EAX JMP 0x00196314 LAB_0019635b: MOV RDI,qword ptr [RSP + 0x98] LEA RCX,[RSP + 0x60] LEA R8,[RSP + 0x40] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x001737a0 MOV dword ptr [RSP + 0x38],EAX MOV RDI,qword ptr [RSP + 0x98] MOV RSI,qword ptr [RSP + 0x80] MOV RDX,qword ptr [RSP + 0x88] CALL 0x001229d0 MOV dword ptr [RSP + 0x3c],0x0 LAB_001963ab: CMP dword ptr [RSP + 0x3c],0x2 JGE 0x001963e4 MOV RDI,qword ptr [RSP + 0x98] MOVSXD RCX,dword ptr [RSP + 0x3c] LEA RAX,[RSP + 0x60] SHL RCX,0x4 ADD RAX,RCX MOV RSI,qword ptr [RAX] MOV RDX,qword ptr [RAX + 0x8] CALL 0x001229d0 MOV EAX,dword ptr [RSP + 0x3c] ADD EAX,0x1 MOV dword ptr [RSP + 0x3c],EAX JMP 0x001963ab LAB_001963e4: CMP dword ptr [RSP + 0x38],0x0 JZ 0x001963ed JMP 0x001963fa LAB_001963ed: MOV dword ptr [RSP + 0xb4],0x0 JMP 0x00196405 LAB_001963fa: MOV dword ptr [RSP + 0xb4],0xffffffff LAB_00196405: MOV EAX,dword ptr [RSP + 0xb4] ADD RSP,0xb8 RET
int4 js_async_generator_await(long param_1,int8 *param_2,int8 param_3,int8 param_4) { int iVar1; uint uStack_ac; int local_7c; long local_78 [4]; long local_58; int8 auStack_50 [3]; int1 local_38 [16]; int8 *local_28; long local_20; int8 local_18; int8 local_10; local_28 = param_2; local_20 = param_1; local_18 = param_3; local_10 = param_4; local_38 = js_promise_resolve(param_1,*(int8 *)(param_1 + 0x88), *(int8 *)(param_1 + 0x90),1,&local_18,0); iVar1 = JS_IsException(local_38._0_8_,local_38._8_8_); if (iVar1 == 0) { iVar1 = js_async_generator_resolve_function_create (local_20,*local_28,0xffffffffffffffff,local_78 + 4,0); if (iVar1 == 0) { for (local_7c = 0; local_7c < 2; local_7c = local_7c + 1) { local_78[(long)local_7c * 2] = (ulong)uStack_ac << 0x20; local_78[(long)local_7c * 2 + 1] = 3; } iVar1 = perform_promise_then(local_20,local_38._0_8_,local_38._8_8_,local_78 + 4,local_78); JS_FreeValue(local_20,local_38._0_8_,local_38._8_8_); for (local_7c = 0; local_7c < 2; local_7c = local_7c + 1) { JS_FreeValue(local_20,local_78[(long)local_7c * 2 + 4], *(int8 *)(local_38 + (long)local_7c * 0x10 + -0x18)); } if (iVar1 == 0) { return 0; } } else { JS_FreeValue(local_20,local_38._0_8_,local_38._8_8_); } } return 0xffffffff; }
46,710
cs_copy_data
eloqsql/mysys/charset.c
static int cs_copy_data(struct charset_info_st *to, CHARSET_INFO *from) { to->number= from->number ? from->number : to->number; /* Don't replace csname if already set */ if (from->cs_name.str && !to->cs_name.str) { if (!(to->cs_name.str= my_once_memdup(from->cs_name.str, from->cs_name.length + 1, MYF(MY_WME)))) goto err; to->cs_name.length= from->cs_name.length; } if (from->coll_name.str) { if (!(to->coll_name.str= my_once_memdup(from->coll_name.str, from->coll_name.length + 1, MYF(MY_WME)))) goto err; to->coll_name.length= from->coll_name.length; } if (from->comment) if (!(to->comment= my_once_strdup(from->comment,MYF(MY_WME)))) goto err; if (from->m_ctype) { if (!(to->m_ctype= (uchar*) my_once_memdup((char*) from->m_ctype, MY_CS_CTYPE_TABLE_SIZE, MYF(MY_WME)))) goto err; if (init_state_maps(to)) goto err; } if (from->to_lower) if (!(to->to_lower= (uchar*) my_once_memdup((char*) from->to_lower, MY_CS_TO_LOWER_TABLE_SIZE, MYF(MY_WME)))) goto err; if (from->to_upper) if (!(to->to_upper= (uchar*) my_once_memdup((char*) from->to_upper, MY_CS_TO_UPPER_TABLE_SIZE, MYF(MY_WME)))) goto err; if (from->sort_order) { if (!(to->sort_order= (uchar*) my_once_memdup((char*) from->sort_order, MY_CS_SORT_ORDER_TABLE_SIZE, MYF(MY_WME)))) goto err; } if (from->tab_to_uni) { uint sz= MY_CS_TO_UNI_TABLE_SIZE*sizeof(uint16); if (!(to->tab_to_uni= (uint16*) my_once_memdup((char*)from->tab_to_uni, sz, MYF(MY_WME)))) goto err; } if (from->tailoring) if (!(to->tailoring= my_once_strdup(from->tailoring,MYF(MY_WME)))) goto err; return 0; err: return 1; }
O0
c
cs_copy_data: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq -0x18(%rbp), %rax cmpl $0x0, (%rax) je 0x709e4 movq -0x18(%rbp), %rax movl (%rax), %eax movl %eax, -0x20(%rbp) jmp 0x709ed movq -0x10(%rbp), %rax movl (%rax), %eax movl %eax, -0x20(%rbp) movl -0x20(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, (%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x10(%rax) je 0x70a4d movq -0x10(%rbp), %rax cmpq $0x0, 0x10(%rax) jne 0x70a4d movq -0x18(%rbp), %rax movq 0x10(%rax), %rdi movq -0x18(%rbp), %rax movq 0x18(%rax), %rsi addq $0x1, %rsi movl $0x10, %edx callq 0x7da60 movq -0x10(%rbp), %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax jne 0x70a3d jmp 0x70c29 movq -0x18(%rbp), %rax movq 0x18(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x18(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0x70a99 movq -0x18(%rbp), %rax movq 0x20(%rax), %rdi movq -0x18(%rbp), %rax movq 0x28(%rax), %rsi addq $0x1, %rsi movl $0x10, %edx callq 0x7da60 movq -0x10(%rbp), %rcx movq %rax, 0x20(%rcx) cmpq $0x0, %rax jne 0x70a89 jmp 0x70c29 movq -0x18(%rbp), %rax movq 0x28(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, 0x28(%rax) movq -0x18(%rbp), %rax cmpq $0x0, 0x30(%rax) je 0x70acb movq -0x18(%rbp), %rax movq 0x30(%rax), %rdi movl $0x10, %esi callq 0x7da00 movq -0x10(%rbp), %rcx movq %rax, 0x30(%rcx) cmpq $0x0, %rax jne 0x70ac9 jmp 0x70c29 jmp 0x70acb movq -0x18(%rbp), %rax cmpq $0x0, 0x40(%rax) je 0x70b14 movq -0x18(%rbp), %rax movq 0x40(%rax), %rdi movl $0x101, %esi # imm = 0x101 movl $0x10, %edx callq 0x7da60 movq -0x10(%rbp), %rcx movq %rax, 0x40(%rcx) cmpq $0x0, %rax jne 0x70b00 jmp 0x70c29 movq -0x10(%rbp), %rdi callq 0x70d40 cmpb $0x0, %al je 0x70b12 jmp 0x70c29 jmp 0x70b14 movq -0x18(%rbp), %rax cmpq $0x0, 0x48(%rax) je 0x70b4b movq -0x18(%rbp), %rax movq 0x48(%rax), %rdi movl $0x100, %esi # imm = 0x100 movl $0x10, %edx callq 0x7da60 movq -0x10(%rbp), %rcx movq %rax, 0x48(%rcx) cmpq $0x0, %rax jne 0x70b49 jmp 0x70c29 jmp 0x70b4b movq -0x18(%rbp), %rax cmpq $0x0, 0x50(%rax) je 0x70b82 movq -0x18(%rbp), %rax movq 0x50(%rax), %rdi movl $0x100, %esi # imm = 0x100 movl $0x10, %edx callq 0x7da60 movq -0x10(%rbp), %rcx movq %rax, 0x50(%rcx) cmpq $0x0, %rax jne 0x70b80 jmp 0x70c29 jmp 0x70b82 movq -0x18(%rbp), %rax cmpq $0x0, 0x58(%rax) je 0x70bb6 movq -0x18(%rbp), %rax movq 0x58(%rax), %rdi movl $0x100, %esi # imm = 0x100 movl $0x10, %edx callq 0x7da60 movq -0x10(%rbp), %rcx movq %rax, 0x58(%rcx) cmpq $0x0, %rax jne 0x70bb4 jmp 0x70c29 jmp 0x70bb6 movq -0x18(%rbp), %rax cmpq $0x0, 0x68(%rax) je 0x70bf1 movl $0x200, -0x1c(%rbp) # imm = 0x200 movq -0x18(%rbp), %rax movq 0x68(%rax), %rdi movl -0x1c(%rbp), %eax movl %eax, %esi movl $0x10, %edx callq 0x7da60 movq -0x10(%rbp), %rcx movq %rax, 0x68(%rcx) cmpq $0x0, %rax jne 0x70bef jmp 0x70c29 jmp 0x70bf1 movq -0x18(%rbp), %rax cmpq $0x0, 0x38(%rax) je 0x70c20 movq -0x18(%rbp), %rax movq 0x38(%rax), %rdi movl $0x10, %esi callq 0x7da00 movq -0x10(%rbp), %rcx movq %rax, 0x38(%rcx) cmpq $0x0, %rax jne 0x70c1e jmp 0x70c29 jmp 0x70c20 movl $0x0, -0x4(%rbp) jmp 0x70c30 movl $0x1, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
cs_copy_data: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov rax, [rbp+var_18] cmp dword ptr [rax], 0 jz short loc_709E4 mov rax, [rbp+var_18] mov eax, [rax] mov [rbp+var_20], eax jmp short loc_709ED loc_709E4: mov rax, [rbp+var_10] mov eax, [rax] mov [rbp+var_20], eax loc_709ED: mov ecx, [rbp+var_20] mov rax, [rbp+var_10] mov [rax], ecx mov rax, [rbp+var_18] cmp qword ptr [rax+10h], 0 jz short loc_70A4D mov rax, [rbp+var_10] cmp qword ptr [rax+10h], 0 jnz short loc_70A4D mov rax, [rbp+var_18] mov rdi, [rax+10h] mov rax, [rbp+var_18] mov rsi, [rax+18h] add rsi, 1 mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+10h], rax cmp rax, 0 jnz short loc_70A3D jmp loc_70C29 loc_70A3D: mov rax, [rbp+var_18] mov rcx, [rax+18h] mov rax, [rbp+var_10] mov [rax+18h], rcx loc_70A4D: mov rax, [rbp+var_18] cmp qword ptr [rax+20h], 0 jz short loc_70A99 mov rax, [rbp+var_18] mov rdi, [rax+20h] mov rax, [rbp+var_18] mov rsi, [rax+28h] add rsi, 1 mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+20h], rax cmp rax, 0 jnz short loc_70A89 jmp loc_70C29 loc_70A89: mov rax, [rbp+var_18] mov rcx, [rax+28h] mov rax, [rbp+var_10] mov [rax+28h], rcx loc_70A99: mov rax, [rbp+var_18] cmp qword ptr [rax+30h], 0 jz short loc_70ACB mov rax, [rbp+var_18] mov rdi, [rax+30h] mov esi, 10h call my_once_strdup mov rcx, [rbp+var_10] mov [rcx+30h], rax cmp rax, 0 jnz short loc_70AC9 jmp loc_70C29 loc_70AC9: jmp short $+2 loc_70ACB: mov rax, [rbp+var_18] cmp qword ptr [rax+40h], 0 jz short loc_70B14 mov rax, [rbp+var_18] mov rdi, [rax+40h] mov esi, 101h mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+40h], rax cmp rax, 0 jnz short loc_70B00 jmp loc_70C29 loc_70B00: mov rdi, [rbp+var_10] call init_state_maps cmp al, 0 jz short loc_70B12 jmp loc_70C29 loc_70B12: jmp short $+2 loc_70B14: mov rax, [rbp+var_18] cmp qword ptr [rax+48h], 0 jz short loc_70B4B mov rax, [rbp+var_18] mov rdi, [rax+48h] mov esi, 100h mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+48h], rax cmp rax, 0 jnz short loc_70B49 jmp loc_70C29 loc_70B49: jmp short $+2 loc_70B4B: mov rax, [rbp+var_18] cmp qword ptr [rax+50h], 0 jz short loc_70B82 mov rax, [rbp+var_18] mov rdi, [rax+50h] mov esi, 100h mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+50h], rax cmp rax, 0 jnz short loc_70B80 jmp loc_70C29 loc_70B80: jmp short $+2 loc_70B82: mov rax, [rbp+var_18] cmp qword ptr [rax+58h], 0 jz short loc_70BB6 mov rax, [rbp+var_18] mov rdi, [rax+58h] mov esi, 100h mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+58h], rax cmp rax, 0 jnz short loc_70BB4 jmp short loc_70C29 loc_70BB4: jmp short $+2 loc_70BB6: mov rax, [rbp+var_18] cmp qword ptr [rax+68h], 0 jz short loc_70BF1 mov [rbp+var_1C], 200h mov rax, [rbp+var_18] mov rdi, [rax+68h] mov eax, [rbp+var_1C] mov esi, eax mov edx, 10h call my_once_memdup mov rcx, [rbp+var_10] mov [rcx+68h], rax cmp rax, 0 jnz short loc_70BEF jmp short loc_70C29 loc_70BEF: jmp short $+2 loc_70BF1: mov rax, [rbp+var_18] cmp qword ptr [rax+38h], 0 jz short loc_70C20 mov rax, [rbp+var_18] mov rdi, [rax+38h] mov esi, 10h call my_once_strdup mov rcx, [rbp+var_10] mov [rcx+38h], rax cmp rax, 0 jnz short loc_70C1E jmp short loc_70C29 loc_70C1E: jmp short $+2 loc_70C20: mov [rbp+var_4], 0 jmp short loc_70C30 loc_70C29: mov [rbp+var_4], 1 loc_70C30: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long cs_copy_data(int *a1, int *a2) { long long v2; // rax long long v3; // rax long long v4; // rax long long v5; // rax long long v6; // rax long long v7; // rax long long v8; // rax long long v9; // rax long long v10; // rax int v12; // [rsp+0h] [rbp-20h] if ( *a2 ) v12 = *a2; else v12 = *a1; *a1 = v12; if ( *((_QWORD *)a2 + 2) && !*((_QWORD *)a1 + 2) ) { v2 = my_once_memdup(*((_QWORD *)a2 + 2), *((_QWORD *)a2 + 3) + 1LL, 16LL); *((_QWORD *)a1 + 2) = v2; if ( !v2 ) return 1; *((_QWORD *)a1 + 3) = *((_QWORD *)a2 + 3); } if ( !*((_QWORD *)a2 + 4) ) goto LABEL_11; v3 = my_once_memdup(*((_QWORD *)a2 + 4), *((_QWORD *)a2 + 5) + 1LL, 16LL); *((_QWORD *)a1 + 4) = v3; if ( !v3 ) return 1; *((_QWORD *)a1 + 5) = *((_QWORD *)a2 + 5); LABEL_11: if ( *((_QWORD *)a2 + 6) ) { v4 = my_once_strdup(*((_QWORD *)a2 + 6), 16LL); *((_QWORD *)a1 + 6) = v4; if ( !v4 ) return 1; } if ( *((_QWORD *)a2 + 8) ) { v5 = my_once_memdup(*((_QWORD *)a2 + 8), 257LL, 16LL); *((_QWORD *)a1 + 8) = v5; if ( !v5 || (unsigned __int8)init_state_maps(a1) ) return 1; } if ( *((_QWORD *)a2 + 9) ) { v6 = my_once_memdup(*((_QWORD *)a2 + 9), 256LL, 16LL); *((_QWORD *)a1 + 9) = v6; if ( !v6 ) return 1; } if ( *((_QWORD *)a2 + 10) ) { v7 = my_once_memdup(*((_QWORD *)a2 + 10), 256LL, 16LL); *((_QWORD *)a1 + 10) = v7; if ( !v7 ) return 1; } if ( *((_QWORD *)a2 + 11) ) { v8 = my_once_memdup(*((_QWORD *)a2 + 11), 256LL, 16LL); *((_QWORD *)a1 + 11) = v8; if ( !v8 ) return 1; } if ( *((_QWORD *)a2 + 13) ) { v9 = my_once_memdup(*((_QWORD *)a2 + 13), 512LL, 16LL); *((_QWORD *)a1 + 13) = v9; if ( !v9 ) return 1; } if ( *((_QWORD *)a2 + 7) ) { v10 = my_once_strdup(*((_QWORD *)a2 + 7), 16LL); *((_QWORD *)a1 + 7) = v10; if ( !v10 ) return 1; } return 0; }
cs_copy_data: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV RAX,qword ptr [RBP + -0x18] CMP dword ptr [RAX],0x0 JZ 0x001709e4 MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x20],EAX JMP 0x001709ed LAB_001709e4: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x20],EAX LAB_001709ed: MOV ECX,dword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x10],0x0 JZ 0x00170a4d MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x10],0x0 JNZ 0x00170a4d MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x18] ADD RSI,0x1 MOV EDX,0x10 CALL 0x0017da60 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JNZ 0x00170a3d JMP 0x00170c29 LAB_00170a3d: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x18],RCX LAB_00170a4d: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x20],0x0 JZ 0x00170a99 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x20] MOV RAX,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RAX + 0x28] ADD RSI,0x1 MOV EDX,0x10 CALL 0x0017da60 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x20],RAX CMP RAX,0x0 JNZ 0x00170a89 JMP 0x00170c29 LAB_00170a89: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RAX + 0x28] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x28],RCX LAB_00170a99: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x30],0x0 JZ 0x00170acb MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x30] MOV ESI,0x10 CALL 0x0017da00 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x30],RAX CMP RAX,0x0 JNZ 0x00170ac9 JMP 0x00170c29 LAB_00170ac9: JMP 0x00170acb LAB_00170acb: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x40],0x0 JZ 0x00170b14 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x40] MOV ESI,0x101 MOV EDX,0x10 CALL 0x0017da60 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x40],RAX CMP RAX,0x0 JNZ 0x00170b00 JMP 0x00170c29 LAB_00170b00: MOV RDI,qword ptr [RBP + -0x10] CALL 0x00170d40 CMP AL,0x0 JZ 0x00170b12 JMP 0x00170c29 LAB_00170b12: JMP 0x00170b14 LAB_00170b14: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x48],0x0 JZ 0x00170b4b MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x48] MOV ESI,0x100 MOV EDX,0x10 CALL 0x0017da60 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x48],RAX CMP RAX,0x0 JNZ 0x00170b49 JMP 0x00170c29 LAB_00170b49: JMP 0x00170b4b LAB_00170b4b: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x50],0x0 JZ 0x00170b82 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x50] MOV ESI,0x100 MOV EDX,0x10 CALL 0x0017da60 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x50],RAX CMP RAX,0x0 JNZ 0x00170b80 JMP 0x00170c29 LAB_00170b80: JMP 0x00170b82 LAB_00170b82: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x58],0x0 JZ 0x00170bb6 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x58] MOV ESI,0x100 MOV EDX,0x10 CALL 0x0017da60 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x58],RAX CMP RAX,0x0 JNZ 0x00170bb4 JMP 0x00170c29 LAB_00170bb4: JMP 0x00170bb6 LAB_00170bb6: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x68],0x0 JZ 0x00170bf1 MOV dword ptr [RBP + -0x1c],0x200 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x68] MOV EAX,dword ptr [RBP + -0x1c] MOV ESI,EAX MOV EDX,0x10 CALL 0x0017da60 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x68],RAX CMP RAX,0x0 JNZ 0x00170bef JMP 0x00170c29 LAB_00170bef: JMP 0x00170bf1 LAB_00170bf1: MOV RAX,qword ptr [RBP + -0x18] CMP qword ptr [RAX + 0x38],0x0 JZ 0x00170c20 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x38] MOV ESI,0x10 CALL 0x0017da00 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x38],RAX CMP RAX,0x0 JNZ 0x00170c1e JMP 0x00170c29 LAB_00170c1e: JMP 0x00170c20 LAB_00170c20: MOV dword ptr [RBP + -0x4],0x0 JMP 0x00170c30 LAB_00170c29: MOV dword ptr [RBP + -0x4],0x1 LAB_00170c30: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 cs_copy_data(int *param_1,int *param_2) { char cVar1; long lVar2; int local_28; int4 local_c; if (*param_2 == 0) { local_28 = *param_1; } else { local_28 = *param_2; } *param_1 = local_28; if ((*(long *)(param_2 + 4) == 0) || (*(long *)(param_1 + 4) != 0)) { LAB_00170a4d: if (*(long *)(param_2 + 8) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 8),*(long *)(param_2 + 10) + 1,0x10); *(long *)(param_1 + 8) = lVar2; if (lVar2 == 0) goto LAB_00170c29; *(int8 *)(param_1 + 10) = *(int8 *)(param_2 + 10); } if (*(long *)(param_2 + 0xc) != 0) { lVar2 = my_once_strdup(*(int8 *)(param_2 + 0xc),0x10); *(long *)(param_1 + 0xc) = lVar2; if (lVar2 == 0) goto LAB_00170c29; } if (*(long *)(param_2 + 0x10) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x10),0x101,0x10); *(long *)(param_1 + 0x10) = lVar2; if ((lVar2 == 0) || (cVar1 = init_state_maps(param_1), cVar1 != '\0')) goto LAB_00170c29; } if (*(long *)(param_2 + 0x12) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x12),0x100,0x10); *(long *)(param_1 + 0x12) = lVar2; if (lVar2 == 0) goto LAB_00170c29; } if (*(long *)(param_2 + 0x14) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x14),0x100,0x10); *(long *)(param_1 + 0x14) = lVar2; if (lVar2 == 0) goto LAB_00170c29; } if (*(long *)(param_2 + 0x16) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x16),0x100,0x10); *(long *)(param_1 + 0x16) = lVar2; if (lVar2 == 0) goto LAB_00170c29; } if (*(long *)(param_2 + 0x1a) != 0) { lVar2 = my_once_memdup(*(int8 *)(param_2 + 0x1a),0x200,0x10); *(long *)(param_1 + 0x1a) = lVar2; if (lVar2 == 0) goto LAB_00170c29; } if (*(long *)(param_2 + 0xe) != 0) { lVar2 = my_once_strdup(*(int8 *)(param_2 + 0xe),0x10); *(long *)(param_1 + 0xe) = lVar2; if (lVar2 == 0) goto LAB_00170c29; } local_c = 0; } else { lVar2 = my_once_memdup(*(int8 *)(param_2 + 4),*(long *)(param_2 + 6) + 1,0x10); *(long *)(param_1 + 4) = lVar2; if (lVar2 != 0) { *(int8 *)(param_1 + 6) = *(int8 *)(param_2 + 6); goto LAB_00170a4d; } LAB_00170c29: local_c = 1; } return local_c; }
46,711
testing::internal::FlagToEnvVar[abi:cxx11](char const*)
giladroyz[P]FindPeaks/build_O1/_deps/googletest-src/googletest/src/gtest-port.cc
static std::string FlagToEnvVar(const char* flag) { const std::string full_flag = (Message() << GTEST_FLAG_PREFIX_ << flag).GetString(); Message env_var; for (size_t i = 0; i != full_flag.length(); i++) { env_var << ToUpper(full_flag.c_str()[i]); } return env_var.GetString(); }
O1
cpp
testing::internal::FlagToEnvVar[abi:cxx11](char const*): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x30, %rsp movq %rsi, %r15 movq %rdi, %rbx leaq 0x8(%rsp), %r14 movq %r14, %rdi callq 0x1cd64 movq (%r14), %r14 leaq 0x10(%r14), %r12 leaq 0x2acd2(%rip), %rsi # 0x422a5 movl $0x6, %r13d movl $0x6, %edx movq %r12, %rdi callq 0x85b0 testq %r15, %r15 je 0x175f8 movq %r15, %rdi callq 0x8200 movq %rax, %r13 jmp 0x175ff leaq 0x28fea(%rip), %r15 # 0x405e9 movq %r12, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x85b0 leaq 0x10(%rsp), %rdi movq %r14, %rsi callq 0x1cfc7 testq %r14, %r14 je 0x17628 movq (%r14), %rax movq %r14, %rdi callq *0x8(%rax) leaq 0x8(%rsp), %rdi callq 0x1cd64 cmpq $0x0, 0x18(%rsp) je 0x17678 movq 0x8(%rsp), %r14 addq $0x10, %r14 xorl %r12d, %r12d leaq 0x7(%rsp), %r15 movq 0x10(%rsp), %rax movzbl (%rax,%r12), %edi callq 0x8a00 movb %al, 0x7(%rsp) movl $0x1, %edx movq %r14, %rdi movq %r15, %rsi callq 0x85b0 incq %r12 cmpq 0x18(%rsp), %r12 jne 0x1764b movq 0x8(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x1cfc7 testq %r14, %r14 je 0x17696 movq (%r14), %rax movq %r14, %rdi callq *0x8(%rax) leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x176b1 movq 0x20(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rax addq $0x30, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq jmp 0x176dc movq %rax, %rbx jmp 0x176f8 movq %rax, %rbx testq %r14, %r14 je 0x17713 movq (%r14), %rax movq %r14, %rdi callq *0x8(%rax) jmp 0x17713 movq %rax, %rbx movq 0x8(%rsp), %rdi testq %rdi, %rdi je 0x176ef movq (%rdi), %rax callq *0x8(%rax) movq $0x0, 0x8(%rsp) leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x17713 movq 0x20(%rsp), %rsi incq %rsi callq 0x84e0 movq %rbx, %rdi callq 0x8990
_ZN7testing8internalL12FlagToEnvVarB5cxx11EPKc: push r15 push r14 push r13 push r12 push rbx sub rsp, 30h mov r15, rsi mov rbx, rdi lea r14, [rsp+58h+var_50] mov rdi, r14; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) mov r14, [r14] lea r12, [r14+10h] lea rsi, aGtest; "gtest_" mov r13d, 6 mov edx, 6 mov rdi, r12 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) test r15, r15 jz short loc_175F8 mov rdi, r15 call _strlen mov r13, rax jmp short loc_175FF loc_175F8: lea r15, aNull; "(null)" loc_175FF: mov rdi, r12 mov rsi, r15 mov rdx, r13 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rdi, [rsp+58h+var_48] mov rsi, r14 call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) test r14, r14 jz short loc_17628 mov rax, [r14] mov rdi, r14 call qword ptr [rax+8] loc_17628: lea rdi, [rsp+58h+var_50]; this call _ZN7testing7MessageC2Ev; testing::Message::Message(void) cmp [rsp+58h+var_40], 0 jz short loc_17678 mov r14, [rsp+58h+var_50] add r14, 10h xor r12d, r12d lea r15, [rsp+58h+var_51] loc_1764B: mov rax, [rsp+58h+var_48] movzx edi, byte ptr [rax+r12] call _toupper mov [rsp+58h+var_51], al mov edx, 1 mov rdi, r14 mov rsi, r15 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) inc r12 cmp r12, [rsp+58h+var_40] jnz short loc_1764B loc_17678: mov r14, [rsp+58h+var_50] mov rdi, rbx mov rsi, r14 call _ZN7testing8internal20StringStreamToStringEPNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEE; testing::internal::StringStreamToString(std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>> *) test r14, r14 jz short loc_17696 mov rax, [r14] mov rdi, r14 call qword ptr [rax+8] loc_17696: lea rax, [rsp+58h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_176B1 mov rsi, [rsp+58h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_176B1: mov rax, rbx add rsp, 30h pop rbx pop r12 pop r13 pop r14 pop r15 retn jmp short loc_176DC mov rbx, rax jmp short loc_176F8 mov rbx, rax test r14, r14 jz short loc_17713 mov rax, [r14] mov rdi, r14 call qword ptr [rax+8] jmp short loc_17713 loc_176DC: mov rbx, rax mov rdi, [rsp+arg_0] test rdi, rdi jz short loc_176EF mov rax, [rdi] call qword ptr [rax+8] loc_176EF: mov [rsp+arg_0], 0 loc_176F8: lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_17713 mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_17713: mov rdi, rbx call __Unwind_Resume
long long testing::internal::FlagToEnvVar[abi:cxx11](long long a1, const char *a2) { const char *v2; // r15 long long v3; // r14 long long v4; // r13 int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d int v9; // edx int v10; // ecx int v11; // r8d int v12; // r9d long long v13; // r14 long long i; // r12 long long v15; // r14 char v17; // [rsp+7h] [rbp-51h] BYREF long long v18; // [rsp+8h] [rbp-50h] BYREF unsigned __int8 *v19; // [rsp+10h] [rbp-48h] BYREF long long v20; // [rsp+18h] [rbp-40h] long long v21; // [rsp+20h] [rbp-38h] BYREF v2 = a2; testing::Message::Message((testing::Message *)&v18); v3 = v18; v4 = 6LL; std::__ostream_insert<char,std::char_traits<char>>(v18 + 16, "gtest_", 6LL); if ( a2 ) v4 = strlen(a2); else v2 = "(null)"; std::__ostream_insert<char,std::char_traits<char>>(v3 + 16, v2, v4); testing::internal::StringStreamToString((unsigned int)&v19, v3, v5, v6, v7, v8); if ( v3 ) (*(void ( **)(long long))(*(_QWORD *)v3 + 8LL))(v3); testing::Message::Message((testing::Message *)&v18); if ( v20 ) { v13 = v18 + 16; for ( i = 0LL; i != v20; ++i ) { v17 = toupper(v19[i]); std::__ostream_insert<char,std::char_traits<char>>(v13, &v17, 1LL); } } v15 = v18; testing::internal::StringStreamToString(a1, v18, v9, v10, v11, v12); if ( v15 ) (*(void ( **)(long long))(*(_QWORD *)v15 + 8LL))(v15); if ( v19 != (unsigned __int8 *)&v21 ) operator delete(v19, v21 + 1); return a1; }
FlagToEnvVar[abi:cxx11]: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R15,RSI MOV RBX,RDI LEA R14,[RSP + 0x8] MOV RDI,R14 CALL 0x0011cd64 MOV R14,qword ptr [R14] LEA R12,[R14 + 0x10] LAB_001175cc: LEA RSI,[0x1422a5] MOV R13D,0x6 MOV EDX,0x6 MOV RDI,R12 CALL 0x001085b0 TEST R15,R15 JZ 0x001175f8 MOV RDI,R15 CALL 0x00108200 MOV R13,RAX JMP 0x001175ff LAB_001175f8: LEA R15,[0x1405e9] LAB_001175ff: MOV RDI,R12 MOV RSI,R15 MOV RDX,R13 CALL 0x001085b0 LEA RDI,[RSP + 0x10] MOV RSI,R14 CALL 0x0011cfc7 LAB_0011761a: TEST R14,R14 JZ 0x00117628 MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX + 0x8] LAB_00117628: LEA RDI,[RSP + 0x8] CALL 0x0011cd64 CMP qword ptr [RSP + 0x18],0x0 JZ 0x00117678 MOV R14,qword ptr [RSP + 0x8] ADD R14,0x10 XOR R12D,R12D LEA R15,[RSP + 0x7] LAB_0011764b: MOV RAX,qword ptr [RSP + 0x10] MOVZX EDI,byte ptr [RAX + R12*0x1] CALL 0x00108a00 MOV byte ptr [RSP + 0x7],AL LAB_0011765e: MOV EDX,0x1 MOV RDI,R14 MOV RSI,R15 CALL 0x001085b0 INC R12 CMP R12,qword ptr [RSP + 0x18] JNZ 0x0011764b LAB_00117678: MOV R14,qword ptr [RSP + 0x8] LAB_0011767d: MOV RDI,RBX MOV RSI,R14 CALL 0x0011cfc7 LAB_00117688: TEST R14,R14 JZ 0x00117696 MOV RAX,qword ptr [R14] MOV RDI,R14 CALL qword ptr [RAX + 0x8] LAB_00117696: LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x001176b1 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x001084e0 LAB_001176b1: MOV RAX,RBX ADD RSP,0x30 POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* testing::internal::FlagToEnvVar[abi:cxx11](char const*) */ internal * __thiscall testing::internal::FlagToEnvVar_abi_cxx11_(internal *this,char *param_1) { long *plVar1; int iVar2; long lVar3; size_t sVar4; ostream *poVar5; char local_51; long *local_50; long *local_48; long local_40; long local_38 [2]; Message::Message((Message *)&local_50); plVar1 = local_50; poVar5 = (ostream *)(local_50 + 2); /* try { // try from 001175cc to 00117619 has its CatchHandler @ 001176c9 */ sVar4 = 6; std::__ostream_insert<char,std::char_traits<char>>(poVar5,"gtest_",6); if (param_1 == (char *)0x0) { param_1 = "(null)"; } else { sVar4 = strlen(param_1); } std::__ostream_insert<char,std::char_traits<char>>(poVar5,param_1,sVar4); StringStreamToString((stringstream *)&local_48); if (plVar1 != (long *)0x0) { (**(code **)(*plVar1 + 8))(plVar1); } /* try { // try from 00117628 to 00117631 has its CatchHandler @ 001176c4 */ Message::Message((Message *)&local_50); if (local_40 != 0) { poVar5 = (ostream *)(local_50 + 2); lVar3 = 0; do { iVar2 = toupper((uint)*(byte *)((long)local_48 + lVar3)); local_51 = (char)iVar2; /* try { // try from 0011765e to 0011766d has its CatchHandler @ 001176dc */ std::__ostream_insert<char,std::char_traits<char>>(poVar5,&local_51,1); lVar3 = lVar3 + 1; } while (lVar3 != local_40); } /* try { // try from 0011767d to 00117687 has its CatchHandler @ 001176c2 */ StringStreamToString((stringstream *)this); if (local_50 != (long *)0x0) { (**(code **)(*local_50 + 8))(local_50); } if (local_48 != local_38) { operator_delete(local_48,local_38[0] + 1); } return this; }
46,712
pvio_socket_internal_connect
eloqsql/libmariadb/plugins/pvio/pvio_socket.c
static int pvio_socket_internal_connect(MARIADB_PVIO *pvio, const struct sockaddr *name, size_t namelen) { int rc= 0; struct st_pvio_socket *csock= NULL; int timeout; #ifndef _WIN32 unsigned int wait_conn= 1; time_t start_t= time(NULL); #endif if (!pvio || !pvio->data) return 1; csock= (struct st_pvio_socket *)pvio->data; timeout= pvio->timeout[PVIO_CONNECT_TIMEOUT]; /* set non blocking */ pvio_socket_blocking(pvio, 0, 0); #ifndef _WIN32 do { rc= connect(csock->socket, (struct sockaddr*) name, (int)namelen); if (time(NULL) - start_t > (time_t)timeout/1000) break; usleep(wait_conn); wait_conn= wait_conn >= 1000000 ? 1000000 : wait_conn * 2; } while (rc == -1 && (errno == EINTR || errno == EAGAIN)); /* in case a timeout values was set we need to check error values EINPROGRESS */ if (timeout != 0 && rc == -1 && errno == EINPROGRESS) { rc= pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout); if (rc < 1) return -1; { int error; socklen_t error_len= sizeof(error); if ((rc = getsockopt(csock->socket, SOL_SOCKET, SO_ERROR, (char *)&error, &error_len)) < 0) return errno; else if (error) return error; } } #ifdef __APPLE__ if (csock->socket) { int val= 1; setsockopt(csock->socket, SOL_SOCKET, SO_NOSIGPIPE, (void *)&val, sizeof(int)); } #endif #else rc= connect(csock->socket, (struct sockaddr*) name, (int)namelen); if (rc == SOCKET_ERROR) { if (WSAGetLastError() == WSAEWOULDBLOCK) { if (pvio_socket_wait_io_or_timeout(pvio, FALSE, timeout) < 0) return -1; rc= 0; } } #endif return rc; }
O0
c
pvio_socket_internal_connect: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl $0x0, -0x24(%rbp) movq $0x0, -0x30(%rbp) movl $0x1, -0x38(%rbp) xorl %eax, %eax movl %eax, %edi callq 0x143c0 movq %rax, -0x40(%rbp) cmpq $0x0, -0x10(%rbp) je 0x5d028 movq -0x10(%rbp), %rax cmpq $0x0, (%rax) jne 0x5d034 movl $0x1, -0x4(%rbp) jmp 0x5d188 movq -0x10(%rbp), %rax movq (%rax), %rax movq %rax, -0x30(%rbp) movq -0x10(%rbp), %rax movl 0x24(%rax), %eax movl %eax, -0x34(%rbp) movq -0x10(%rbp), %rdi xorl %esi, %esi xorl %eax, %eax movl %eax, %edx callq 0x5bba0 movq -0x30(%rbp), %rax movl (%rax), %edi movq -0x18(%rbp), %rsi movq -0x20(%rbp), %rax movl %eax, %edx callq 0x14380 movl %eax, -0x24(%rbp) xorl %eax, %eax movl %eax, %edi callq 0x143c0 subq -0x40(%rbp), %rax movq %rax, -0x50(%rbp) movslq -0x34(%rbp), %rax movl $0x3e8, %ecx # imm = 0x3E8 cqto idivq %rcx movq %rax, %rcx movq -0x50(%rbp), %rax cmpq %rcx, %rax jle 0x5d09d jmp 0x5d102 movl -0x38(%rbp), %edi callq 0x14630 cmpl $0xf4240, -0x38(%rbp) # imm = 0xF4240 jb 0x5d0b8 movl $0xf4240, %eax # imm = 0xF4240 movl %eax, -0x54(%rbp) jmp 0x5d0c0 movl -0x38(%rbp), %eax shll %eax movl %eax, -0x54(%rbp) movl -0x54(%rbp), %eax movl %eax, -0x38(%rbp) xorl %eax, %eax cmpl $-0x1, -0x24(%rbp) movb %al, -0x55(%rbp) jne 0x5d0f7 callq 0x14050 movq %rax, %rcx movb $0x1, %al cmpl $0x4, (%rcx) movb %al, -0x56(%rbp) je 0x5d0f1 callq 0x14050 cmpl $0xb, (%rax) sete %al movb %al, -0x56(%rbp) movb -0x56(%rbp), %al movb %al, -0x55(%rbp) movb -0x55(%rbp), %al testb $0x1, %al jne 0x5d058 cmpl $0x0, -0x34(%rbp) je 0x5d182 cmpl $-0x1, -0x24(%rbp) jne 0x5d182 callq 0x14050 cmpl $0x73, (%rax) jne 0x5d182 movq -0x10(%rbp), %rdi movl -0x34(%rbp), %edx xorl %esi, %esi callq 0x5ba50 movl %eax, -0x24(%rbp) cmpl $0x1, -0x24(%rbp) jge 0x5d138 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x5d188 movl $0x4, -0x48(%rbp) movq -0x30(%rbp), %rax movl (%rax), %edi movl $0x1, %esi movl $0x4, %edx leaq -0x44(%rbp), %rcx leaq -0x48(%rbp), %r8 callq 0x14310 movl %eax, -0x24(%rbp) cmpl $0x0, %eax jge 0x5d170 callq 0x14050 movl (%rax), %eax movl %eax, -0x4(%rbp) jmp 0x5d188 cmpl $0x0, -0x44(%rbp) je 0x5d17e movl -0x44(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x5d188 jmp 0x5d180 jmp 0x5d182 movl -0x24(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
pvio_socket_internal_connect: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], 0 mov [rbp+var_30], 0 mov [rbp+var_38], 1 xor eax, eax mov edi, eax call _time mov [rbp+var_40], rax cmp [rbp+var_10], 0 jz short loc_5D028 mov rax, [rbp+var_10] cmp qword ptr [rax], 0 jnz short loc_5D034 loc_5D028: mov [rbp+var_4], 1 jmp loc_5D188 loc_5D034: mov rax, [rbp+var_10] mov rax, [rax] mov [rbp+var_30], rax mov rax, [rbp+var_10] mov eax, [rax+24h] mov [rbp+var_34], eax mov rdi, [rbp+var_10] xor esi, esi xor eax, eax mov edx, eax call pvio_socket_blocking loc_5D058: mov rax, [rbp+var_30] mov edi, [rax] mov rsi, [rbp+var_18] mov rax, [rbp+var_20] mov edx, eax call _connect mov [rbp+var_24], eax xor eax, eax mov edi, eax call _time sub rax, [rbp+var_40] mov [rbp+var_50], rax movsxd rax, [rbp+var_34] mov ecx, 3E8h cqo idiv rcx mov rcx, rax mov rax, [rbp+var_50] cmp rax, rcx jle short loc_5D09D jmp short loc_5D102 loc_5D09D: mov edi, [rbp+var_38] call _usleep cmp [rbp+var_38], 0F4240h jb short loc_5D0B8 mov eax, 0F4240h mov [rbp+var_54], eax jmp short loc_5D0C0 loc_5D0B8: mov eax, [rbp+var_38] shl eax, 1 mov [rbp+var_54], eax loc_5D0C0: mov eax, [rbp+var_54] mov [rbp+var_38], eax xor eax, eax cmp [rbp+var_24], 0FFFFFFFFh mov [rbp+var_55], al jnz short loc_5D0F7 call ___errno_location mov rcx, rax mov al, 1 cmp dword ptr [rcx], 4 mov [rbp+var_56], al jz short loc_5D0F1 call ___errno_location cmp dword ptr [rax], 0Bh setz al mov [rbp+var_56], al loc_5D0F1: mov al, [rbp+var_56] mov [rbp+var_55], al loc_5D0F7: mov al, [rbp+var_55] test al, 1 jnz loc_5D058 loc_5D102: cmp [rbp+var_34], 0 jz short loc_5D182 cmp [rbp+var_24], 0FFFFFFFFh jnz short loc_5D182 call ___errno_location cmp dword ptr [rax], 73h ; 's' jnz short loc_5D182 mov rdi, [rbp+var_10] mov edx, [rbp+var_34] xor esi, esi call pvio_socket_wait_io_or_timeout mov [rbp+var_24], eax cmp [rbp+var_24], 1 jge short loc_5D138 mov [rbp+var_4], 0FFFFFFFFh jmp short loc_5D188 loc_5D138: mov [rbp+var_48], 4 mov rax, [rbp+var_30] mov edi, [rax] mov esi, 1 mov edx, 4 lea rcx, [rbp+var_44] lea r8, [rbp+var_48] call _getsockopt mov [rbp+var_24], eax cmp eax, 0 jge short loc_5D170 call ___errno_location mov eax, [rax] mov [rbp+var_4], eax jmp short loc_5D188 loc_5D170: cmp [rbp+var_44], 0 jz short loc_5D17E mov eax, [rbp+var_44] mov [rbp+var_4], eax jmp short loc_5D188 loc_5D17E: jmp short $+2 loc_5D180: jmp short $+2 loc_5D182: mov eax, [rbp+var_24] mov [rbp+var_4], eax loc_5D188: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long pvio_socket_internal_connect(int **a1, long long a2, long long a3) { long long v3; // rdi long long v4; // rdi bool v6; // [rsp+Ah] [rbp-56h] bool v7; // [rsp+Bh] [rbp-55h] int v8; // [rsp+Ch] [rbp-54h] int v9; // [rsp+18h] [rbp-48h] BYREF unsigned int v10; // [rsp+1Ch] [rbp-44h] BYREF long long v11; // [rsp+20h] [rbp-40h] unsigned int v12; // [rsp+28h] [rbp-38h] signed int v13; // [rsp+2Ch] [rbp-34h] unsigned int *v14; // [rsp+30h] [rbp-30h] int v15; // [rsp+3Ch] [rbp-24h] long long v16; // [rsp+40h] [rbp-20h] long long v17; // [rsp+48h] [rbp-18h] int **v18; // [rsp+50h] [rbp-10h] v18 = a1; v17 = a2; v16 = a3; v15 = 0; v14 = 0LL; v12 = 1; v11 = time(0LL); if ( a1 && *v18 ) { v14 = (unsigned int *)*v18; v13 = *((_DWORD *)v18 + 9); pvio_socket_blocking((unsigned int **)v18, 0, 0LL); do { v15 = connect(*v14, v17, (unsigned int)v16); v3 = 0LL; if ( time(0LL) - v11 > v13 / 1000LL ) break; v3 = v12; usleep(v12); if ( v12 < 0xF4240 ) v8 = 2 * v12; else v8 = 1000000; v12 = v8; v7 = 0; if ( v15 == -1 ) { v6 = 1; if ( *(_DWORD *)__errno_location(v3) != 4 ) v6 = *(_DWORD *)__errno_location(v3) == 11; v7 = v6; } } while ( v7 ); if ( v13 && v15 == -1 && *(_DWORD *)__errno_location(v3) == 115 ) { v15 = pvio_socket_wait_io_or_timeout(v18, 0, v13); if ( v15 < 1 ) return (unsigned int)-1; v9 = 4; v4 = *v14; v15 = getsockopt(v4, 1LL, 4LL, &v10, &v9); if ( v15 < 0 ) return *(unsigned int *)__errno_location(v4); if ( v10 ) return v10; } return (unsigned int)v15; } return 1; }
pvio_socket_internal_connect: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],0x0 MOV qword ptr [RBP + -0x30],0x0 MOV dword ptr [RBP + -0x38],0x1 XOR EAX,EAX MOV EDI,EAX CALL 0x001143c0 MOV qword ptr [RBP + -0x40],RAX CMP qword ptr [RBP + -0x10],0x0 JZ 0x0015d028 MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX],0x0 JNZ 0x0015d034 LAB_0015d028: MOV dword ptr [RBP + -0x4],0x1 JMP 0x0015d188 LAB_0015d034: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x24] MOV dword ptr [RBP + -0x34],EAX MOV RDI,qword ptr [RBP + -0x10] XOR ESI,ESI XOR EAX,EAX MOV EDX,EAX CALL 0x0015bba0 LAB_0015d058: MOV RAX,qword ptr [RBP + -0x30] MOV EDI,dword ptr [RAX] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x20] MOV EDX,EAX CALL 0x00114380 MOV dword ptr [RBP + -0x24],EAX XOR EAX,EAX MOV EDI,EAX CALL 0x001143c0 SUB RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x50],RAX MOVSXD RAX,dword ptr [RBP + -0x34] MOV ECX,0x3e8 CQO IDIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x50] CMP RAX,RCX JLE 0x0015d09d JMP 0x0015d102 LAB_0015d09d: MOV EDI,dword ptr [RBP + -0x38] CALL 0x00114630 CMP dword ptr [RBP + -0x38],0xf4240 JC 0x0015d0b8 MOV EAX,0xf4240 MOV dword ptr [RBP + -0x54],EAX JMP 0x0015d0c0 LAB_0015d0b8: MOV EAX,dword ptr [RBP + -0x38] SHL EAX,0x1 MOV dword ptr [RBP + -0x54],EAX LAB_0015d0c0: MOV EAX,dword ptr [RBP + -0x54] MOV dword ptr [RBP + -0x38],EAX XOR EAX,EAX CMP dword ptr [RBP + -0x24],-0x1 MOV byte ptr [RBP + -0x55],AL JNZ 0x0015d0f7 CALL 0x00114050 MOV RCX,RAX MOV AL,0x1 CMP dword ptr [RCX],0x4 MOV byte ptr [RBP + -0x56],AL JZ 0x0015d0f1 CALL 0x00114050 CMP dword ptr [RAX],0xb SETZ AL MOV byte ptr [RBP + -0x56],AL LAB_0015d0f1: MOV AL,byte ptr [RBP + -0x56] MOV byte ptr [RBP + -0x55],AL LAB_0015d0f7: MOV AL,byte ptr [RBP + -0x55] TEST AL,0x1 JNZ 0x0015d058 LAB_0015d102: CMP dword ptr [RBP + -0x34],0x0 JZ 0x0015d182 CMP dword ptr [RBP + -0x24],-0x1 JNZ 0x0015d182 CALL 0x00114050 CMP dword ptr [RAX],0x73 JNZ 0x0015d182 MOV RDI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x34] XOR ESI,ESI CALL 0x0015ba50 MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x1 JGE 0x0015d138 MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0015d188 LAB_0015d138: MOV dword ptr [RBP + -0x48],0x4 MOV RAX,qword ptr [RBP + -0x30] MOV EDI,dword ptr [RAX] MOV ESI,0x1 MOV EDX,0x4 LEA RCX,[RBP + -0x44] LEA R8,[RBP + -0x48] CALL 0x00114310 MOV dword ptr [RBP + -0x24],EAX CMP EAX,0x0 JGE 0x0015d170 CALL 0x00114050 MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x4],EAX JMP 0x0015d188 LAB_0015d170: CMP dword ptr [RBP + -0x44],0x0 JZ 0x0015d17e MOV EAX,dword ptr [RBP + -0x44] MOV dword ptr [RBP + -0x4],EAX JMP 0x0015d188 LAB_0015d17e: JMP 0x0015d180 LAB_0015d180: JMP 0x0015d182 LAB_0015d182: MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x4],EAX LAB_0015d188: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int pvio_socket_internal_connect(long *param_1,sockaddr *param_2,int8 param_3) { time_t tVar1; int *piVar2; bool bVar3; __useconds_t local_5c; socklen_t local_50; int local_4c; time_t local_48; __useconds_t local_40; int local_3c; int *local_38; int local_2c; int8 local_28; sockaddr *local_20; long *local_18; local_2c = 0; local_38 = (int *)0x0; local_40 = 1; local_28 = param_3; local_20 = param_2; local_18 = param_1; local_48 = time((time_t *)0x0); if ((local_18 == (long *)0x0) || (*local_18 == 0)) { return 1; } local_38 = (int *)*local_18; local_3c = *(int *)((long)local_18 + 0x24); pvio_socket_blocking(local_18,0,0); do { local_2c = connect(*local_38,local_20,(socklen_t)local_28); tVar1 = time((time_t *)0x0); if ((long)local_3c / 1000 < tVar1 - local_48) break; usleep(local_40); if (local_40 < 1000000) { local_5c = local_40 << 1; } else { local_5c = 1000000; } local_40 = local_5c; bVar3 = false; if (local_2c == -1) { piVar2 = __errno_location(); bVar3 = true; if (*piVar2 != 4) { piVar2 = __errno_location(); bVar3 = *piVar2 == 0xb; } } } while (bVar3); if (((local_3c != 0) && (local_2c == -1)) && (piVar2 = __errno_location(), *piVar2 == 0x73)) { local_2c = pvio_socket_wait_io_or_timeout(local_18,0,local_3c); if (local_2c < 1) { return -1; } local_50 = 4; local_2c = getsockopt(*local_38,1,4,&local_4c,&local_50); if (local_2c < 0) { piVar2 = __errno_location(); return *piVar2; } if (local_4c != 0) { return local_4c; } } return local_2c; }
46,713
get_sleb128
bluesky950520[P]quickjs/quickjs.c
static int get_sleb128(int32_t *pval, const uint8_t *buf, const uint8_t *buf_end) { int ret; uint32_t val; ret = get_leb128(&val, buf, buf_end); if (ret < 0) { *pval = 0; return -1; } *pval = (val >> 1) ^ -(val & 1); return ret; }
O0
c
get_sleb128: subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq %rdx, 0x8(%rsp) movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdx movq %rsp, %rdi callq 0x72ff0 movl %eax, 0x4(%rsp) cmpl $0x0, 0x4(%rsp) jge 0x73115 movq 0x18(%rsp), %rax movl $0x0, (%rax) movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF jmp 0x73135 movl (%rsp), %ecx shrl %ecx movl (%rsp), %edx andl $0x1, %edx xorl %eax, %eax subl %edx, %eax xorl %eax, %ecx movq 0x18(%rsp), %rax movl %ecx, (%rax) movl 0x4(%rsp), %eax movl %eax, 0x24(%rsp) movl 0x24(%rsp), %eax addq $0x28, %rsp retq nop
get_sleb128: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov [rsp+28h+var_20], rdx mov rsi, [rsp+28h+var_18] mov rdx, [rsp+28h+var_20] mov rdi, rsp call get_leb128 mov [rsp+28h+var_24], eax cmp [rsp+28h+var_24], 0 jge short loc_73115 mov rax, [rsp+28h+var_10] mov dword ptr [rax], 0 mov [rsp+28h+var_4], 0FFFFFFFFh jmp short loc_73135 loc_73115: mov ecx, [rsp+28h+var_28] shr ecx, 1 mov edx, [rsp+28h+var_28] and edx, 1 xor eax, eax sub eax, edx xor ecx, eax mov rax, [rsp+28h+var_10] mov [rax], ecx mov eax, [rsp+28h+var_24] mov [rsp+28h+var_4], eax loc_73135: mov eax, [rsp+28h+var_4] add rsp, 28h retn
long long get_sleb128(int *a1, _BYTE *a2, unsigned long long a3) { unsigned int v4; // [rsp+0h] [rbp-28h] BYREF int leb128; // [rsp+4h] [rbp-24h] unsigned long long v6; // [rsp+8h] [rbp-20h] _BYTE *v7; // [rsp+10h] [rbp-18h] int *v8; // [rsp+18h] [rbp-10h] v8 = a1; v7 = a2; v6 = a3; leb128 = get_leb128(&v4, a2, a3); if ( leb128 >= 0 ) { *v8 = -(v4 & 1) ^ (v4 >> 1); return (unsigned int)leb128; } else { *v8 = 0; return (unsigned int)-1; } }
get_sleb128: SUB RSP,0x28 MOV qword ptr [RSP + 0x18],RDI MOV qword ptr [RSP + 0x10],RSI MOV qword ptr [RSP + 0x8],RDX MOV RSI,qword ptr [RSP + 0x10] MOV RDX,qword ptr [RSP + 0x8] MOV RDI,RSP CALL 0x00172ff0 MOV dword ptr [RSP + 0x4],EAX CMP dword ptr [RSP + 0x4],0x0 JGE 0x00173115 MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX],0x0 MOV dword ptr [RSP + 0x24],0xffffffff JMP 0x00173135 LAB_00173115: MOV ECX,dword ptr [RSP] SHR ECX,0x1 MOV EDX,dword ptr [RSP] AND EDX,0x1 XOR EAX,EAX SUB EAX,EDX XOR ECX,EAX MOV RAX,qword ptr [RSP + 0x18] MOV dword ptr [RAX],ECX MOV EAX,dword ptr [RSP + 0x4] MOV dword ptr [RSP + 0x24],EAX LAB_00173135: MOV EAX,dword ptr [RSP + 0x24] ADD RSP,0x28 RET
int get_sleb128(uint *param_1,int8 param_2,int8 param_3) { uint local_28 [2]; int8 local_20; int8 local_18; uint *local_10; int local_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_4 = get_leb128(local_28,param_2,param_3); if (local_4 < 0) { *local_10 = 0; local_4 = -1; } else { *local_10 = local_28[0] >> 1 ^ -(local_28[0] & 1); } return local_4; }
46,714
get_sleb128
bluesky950520[P]quickjs/quickjs.c
static int get_sleb128(int32_t *pval, const uint8_t *buf, const uint8_t *buf_end) { int ret; uint32_t val; ret = get_leb128(&val, buf, buf_end); if (ret < 0) { *pval = 0; return -1; } *pval = (val >> 1) ^ -(val & 1); return ret; }
O1
c
get_sleb128: movl $0xffffffff, %eax # imm = 0xFFFFFFFF xorl %r8d, %r8d movl $0x0, %r9d movl %eax, %r10d cmpq %rdx, %rsi jae 0x10dc9 pushq %rbx incq %rsi xorl %ecx, %ecx xorl %r10d, %r10d xorl %r9d, %r9d movl %r9d, %r11d movzbl -0x1(%rsi), %ebx movl %ebx, %r9d andl $0x7f, %r9d shll %cl, %r9d orl %r11d, %r9d testb %bl, %bl jns 0x10de7 cmpl $0x4, %r10d leal 0x1(%r10), %r10d setb %r11b cmpq %rdx, %rsi setb %bl andb %r11b, %bl addl $0x7, %ecx incq %rsi cmpb $0x1, %bl je 0x10d8a xorl %r9d, %r9d movl %eax, %r10d popq %rbx movl %r9d, %ecx shrl %ecx andl $0x1, %r9d negl %r9d xorl %ecx, %r9d testl %r10d, %r10d cmovsl %r8d, %r9d cmovnsl %r10d, %eax movl %r9d, (%rdi) retq incl %r10d jmp 0x10dc8
get_sleb128: mov eax, 0FFFFFFFFh xor r8d, r8d mov r9d, 0 mov r10d, eax cmp rsi, rdx jnb short loc_10DC9 push rbx inc rsi xor ecx, ecx xor r10d, r10d xor r9d, r9d loc_10D8A: mov r11d, r9d movzx ebx, byte ptr [rsi-1] mov r9d, ebx and r9d, 7Fh shl r9d, cl or r9d, r11d test bl, bl jns short loc_10DE7 cmp r10d, 4 lea r10d, [r10+1] setb r11b cmp rsi, rdx setb bl and bl, r11b add ecx, 7 inc rsi cmp bl, 1 jz short loc_10D8A xor r9d, r9d mov r10d, eax loc_10DC8: pop rbx loc_10DC9: mov ecx, r9d shr ecx, 1 and r9d, 1 neg r9d xor r9d, ecx test r10d, r10d cmovs r9d, r8d cmovns eax, r10d mov [rdi], r9d retn loc_10DE7: inc r10d jmp short loc_10DC8
long long get_sleb128(int *a1, unsigned long long a2, unsigned long long a3) { long long result; // rax unsigned int v4; // r9d int v5; // r10d unsigned long long v6; // rsi char v7; // cl unsigned int v8; // r10d bool v9; // cf bool v10; // bl int v11; // r9d result = 0xFFFFFFFFLL; v4 = 0; v5 = -1; if ( a2 < a3 ) { v6 = a2 + 1; v7 = 0; v8 = 0; v4 = 0; while ( 1 ) { v4 |= (*(_BYTE *)(v6 - 1) & 0x7F) << v7; if ( *(char *)(v6 - 1) >= 0 ) break; v9 = v8++ < 4; v10 = v9 && v6 < a3; v7 += 7; ++v6; if ( !v10 ) { v4 = 0; v5 = -1; goto LABEL_6; } } v5 = v8 + 1; } LABEL_6: v11 = (v4 >> 1) ^ -(v4 & 1); if ( v5 >= 0 ) result = (unsigned int)v5; else v11 = 0; *a1 = v11; return result; }
46,715
get_sleb128
bluesky950520[P]quickjs/quickjs.c
static int get_sleb128(int32_t *pval, const uint8_t *buf, const uint8_t *buf_end) { int ret; uint32_t val; ret = get_leb128(&val, buf, buf_end); if (ret < 0) { *pval = 0; return -1; } *pval = (val >> 1) ^ -(val & 1); return ret; }
O2
c
get_sleb128: pushq %rbx subq $0x10, %rsp movq %rdi, %rbx leaq 0xc(%rsp), %rdi callq 0x3b072 testl %eax, %eax js 0x3b0e2 movl 0xc(%rsp), %ecx movl %ecx, %edx shrl %edx andl $0x1, %ecx negl %ecx xorl %edx, %ecx jmp 0x3b0e7 pushq $-0x1 popq %rax xorl %ecx, %ecx movl %ecx, (%rbx) addq $0x10, %rsp popq %rbx retq
get_sleb128: push rbx sub rsp, 10h mov rbx, rdi lea rdi, [rsp+18h+var_C] call get_leb128 test eax, eax js short loc_3B0E2 mov ecx, [rsp+18h+var_C] mov edx, ecx shr edx, 1 and ecx, 1 neg ecx xor ecx, edx jmp short loc_3B0E7 loc_3B0E2: push 0FFFFFFFFFFFFFFFFh pop rax xor ecx, ecx loc_3B0E7: mov [rbx], ecx add rsp, 10h pop rbx retn
long long get_sleb128(int *a1, long long a2, unsigned long long a3) { long long result; // rax int v4; // ecx _DWORD v5[3]; // [rsp+Ch] [rbp-Ch] BYREF result = get_leb128(v5, a2, a3); if ( (int)result < 0 ) { result = -1LL; v4 = 0; } else { v4 = (v5[0] >> 1) ^ -(v5[0] & 1); } *a1 = v4; return result; }
get_sleb128: PUSH RBX SUB RSP,0x10 MOV RBX,RDI LEA RDI,[RSP + 0xc] CALL 0x0013b072 TEST EAX,EAX JS 0x0013b0e2 MOV ECX,dword ptr [RSP + 0xc] MOV EDX,ECX SHR EDX,0x1 AND ECX,0x1 NEG ECX XOR ECX,EDX JMP 0x0013b0e7 LAB_0013b0e2: PUSH -0x1 POP RAX XOR ECX,ECX LAB_0013b0e7: MOV dword ptr [RBX],ECX ADD RSP,0x10 POP RBX RET
int8 get_sleb128(uint *param_1) { int8 uVar1; uint uVar2; uint local_c; uVar1 = get_leb128(&local_c); if ((int)uVar1 < 0) { uVar1 = 0xffffffffffffffff; uVar2 = 0; } else { uVar2 = -(local_c & 1) ^ local_c >> 1; } *param_1 = uVar2; return uVar1; }
46,716
my_uni_utf16
eloqsql/strings/ctype-ucs2.c
int my_uni_utf16(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { if (wc <= 0xFFFF) { if (s + 2 > e) return MY_CS_TOOSMALL2; if (MY_UTF16_SURROGATE(wc)) return MY_CS_ILUNI; *s++= (uchar) (wc >> 8); *s= (uchar) (wc & 0xFF); return 2; } if (wc <= 0x10FFFF) { if (s + 4 > e) return MY_CS_TOOSMALL4; *s++= (uchar) ((wc-= 0x10000) >> 18) | 0xD8; *s++= (uchar) (wc >> 10) & 0xFF; *s++= (uchar) ((wc >> 8) & 3) | 0xDC; *s= (uchar) wc & 0xFF; return 4; } return MY_CS_ILUNI; }
O0
c
my_uni_utf16: pushq %rbp movq %rsp, %rbp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) cmpq $0xffff, -0x18(%rbp) # imm = 0xFFFF ja 0xa9faf movq -0x20(%rbp), %rax addq $0x2, %rax cmpq -0x28(%rbp), %rax jbe 0xa9f58 movl $0xffffff9a, -0x4(%rbp) # imm = 0xFFFFFF9A jmp 0xaa072 movq -0x18(%rbp), %rax andq $0xf800, %rax # imm = 0xF800 cmpq $0xd800, %rax # imm = 0xD800 jne 0xa9f76 movl $0x0, -0x4(%rbp) jmp 0xaa072 movq -0x18(%rbp), %rax shrq $0x8, %rax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax andq $0xff, %rax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x2, -0x4(%rbp) jmp 0xaa072 cmpq $0x10ffff, -0x18(%rbp) # imm = 0x10FFFF ja 0xaa06b movq -0x20(%rbp), %rax addq $0x4, %rax cmpq -0x28(%rbp), %rax jbe 0xa9fd7 movl $0xffffff98, -0x4(%rbp) # imm = 0xFFFFFF98 jmp 0xaa072 movq -0x18(%rbp), %rax subq $0x10000, %rax # imm = 0x10000 movq %rax, -0x18(%rbp) shrq $0x12, %rax movzbl %al, %eax orl $0xd8, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0xa, %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax shrq $0x8, %rax andq $0x3, %rax movzbl %al, %eax orl $0xdc, %eax movb %al, %cl movq -0x20(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x20(%rbp) movb %cl, (%rax) movq -0x18(%rbp), %rax movzbl %al, %eax andl $0xff, %eax movb %al, %cl movq -0x20(%rbp), %rax movb %cl, (%rax) movl $0x4, -0x4(%rbp) jmp 0xaa072 movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_uni_utf16: push rbp mov rbp, rsp mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx cmp [rbp+var_18], 0FFFFh ja short loc_A9FAF mov rax, [rbp+var_20] add rax, 2 cmp rax, [rbp+var_28] jbe short loc_A9F58 mov [rbp+var_4], 0FFFFFF9Ah jmp loc_AA072 loc_A9F58: mov rax, [rbp+var_18] and rax, 0F800h cmp rax, 0D800h jnz short loc_A9F76 mov [rbp+var_4], 0 jmp loc_AA072 loc_A9F76: mov rax, [rbp+var_18] shr rax, 8 mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] and rax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 2 jmp loc_AA072 loc_A9FAF: cmp [rbp+var_18], offset unk_10FFFF ja loc_AA06B mov rax, [rbp+var_20] add rax, 4 cmp rax, [rbp+var_28] jbe short loc_A9FD7 mov [rbp+var_4], 0FFFFFF98h jmp loc_AA072 loc_A9FD7: mov rax, [rbp+var_18] sub rax, offset stru_10000 mov [rbp+var_18], rax shr rax, 12h movzx eax, al or eax, 0D8h mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] shr rax, 0Ah movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] shr rax, 8 and rax, 3 movzx eax, al or eax, 0DCh mov cl, al mov rax, [rbp+var_20] mov rdx, rax add rdx, 1 mov [rbp+var_20], rdx mov [rax], cl mov rax, [rbp+var_18] movzx eax, al and eax, 0FFh mov cl, al mov rax, [rbp+var_20] mov [rax], cl mov [rbp+var_4], 4 jmp short loc_AA072 loc_AA06B: mov [rbp+var_4], 0 loc_AA072: mov eax, [rbp+var_4] pop rbp retn
long long my_uni_utf16(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { if ( a2 > 0xFFFF ) { if ( a2 > (unsigned long long)&unk_10FFFF ) { return 0; } else if ( (unsigned long long)(a3 + 4) <= a4 ) { *a3 = ((a2 - (unsigned long long)&stru_10000) >> 18) | 0xD8; a3[1] = (a2 - (unsigned long long)&stru_10000) >> 10; a3[2] = ((unsigned __int16)(a2 - (_QWORD)&stru_10000) >> 8) & 3 | 0xDC; a3[3] = a2 - (_QWORD)&stru_10000; return 4; } else { return (unsigned int)-104; } } else if ( (unsigned long long)(a3 + 2) <= a4 ) { if ( (a2 & 0xF800) == 0xD800 ) { return 0; } else { *a3 = BYTE1(a2); a3[1] = a2; return 2; } } else { return (unsigned int)-102; } }
my_uni_utf16: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX CMP qword ptr [RBP + -0x18],0xffff JA 0x001a9faf MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x2 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001a9f58 MOV dword ptr [RBP + -0x4],0xffffff9a JMP 0x001aa072 LAB_001a9f58: MOV RAX,qword ptr [RBP + -0x18] AND RAX,0xf800 CMP RAX,0xd800 JNZ 0x001a9f76 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001aa072 LAB_001a9f76: MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] AND RAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x2 JMP 0x001aa072 LAB_001a9faf: CMP qword ptr [RBP + -0x18],0x10ffff JA 0x001aa06b MOV RAX,qword ptr [RBP + -0x20] ADD RAX,0x4 CMP RAX,qword ptr [RBP + -0x28] JBE 0x001a9fd7 MOV dword ptr [RBP + -0x4],0xffffff98 JMP 0x001aa072 LAB_001a9fd7: MOV RAX,qword ptr [RBP + -0x18] SUB RAX,0x10000 MOV qword ptr [RBP + -0x18],RAX SHR RAX,0x12 MOVZX EAX,AL OR EAX,0xd8 MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0xa MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] SHR RAX,0x8 AND RAX,0x3 MOVZX EAX,AL OR EAX,0xdc MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x20],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x18] MOVZX EAX,AL AND EAX,0xff MOV CL,AL MOV RAX,qword ptr [RBP + -0x20] MOV byte ptr [RAX],CL MOV dword ptr [RBP + -0x4],0x4 JMP 0x001aa072 LAB_001aa06b: MOV dword ptr [RBP + -0x4],0x0 LAB_001aa072: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_uni_utf16(int8 param_1,ulong param_2,byte *param_3,byte *param_4) { int4 local_c; if (param_2 < 0x10000) { if (param_4 < param_3 + 2) { local_c = 0xffffff9a; } else if ((param_2 & 0xf800) == 0xd800) { local_c = 0; } else { *param_3 = (byte)(param_2 >> 8); param_3[1] = (byte)param_2; local_c = 2; } } else if (param_2 < 0x110000) { if (param_4 < param_3 + 4) { local_c = 0xffffff98; } else { param_2 = param_2 - 0x10000; *param_3 = (byte)(param_2 >> 0x12) | 0xd8; param_3[1] = (byte)(param_2 >> 10); param_3[2] = (byte)(param_2 >> 8) & 3 | 0xdc; param_3[3] = (byte)param_2; local_c = 4; } } else { local_c = 0; } return local_c; }
46,717
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/common.cpp
common_chat_templates common_chat_templates_from_model(const struct llama_model * model, const std::string & chat_template_override) { auto vocab = llama_model_get_vocab(model); std::string default_template_src = chat_template_override; std::string template_tool_use_src = chat_template_override; bool has_explicit_template = !chat_template_override.empty(); if (chat_template_override.empty()) { auto str = llama_model_chat_template(model, /* name */ nullptr); if (str) { default_template_src = str; has_explicit_template = true; } str = llama_model_chat_template(model, /* name */ "tool_use"); if (str) { template_tool_use_src = str; has_explicit_template = true; } } if (default_template_src.empty() || default_template_src == "chatml") { if (!template_tool_use_src.empty()) { default_template_src = template_tool_use_src; } else { default_template_src = R"( {%- for message in messages -%} {{- "<|im_start|>" + message.role + "\n" + message.content + "<|im_end|>\n" -}} {%- endfor -%} {%- if add_generation_prompt -%} {{- "<|im_start|>assistant\n" -}} {%- endif -%} )"; } } const auto get_token = [&](llama_token token, const char * name, const char * jinja_variable_name) { if (token == LLAMA_TOKEN_NULL) { if (default_template_src.find(jinja_variable_name) != std::string::npos || template_tool_use_src.find(jinja_variable_name) != std::string::npos) { LOG_WRN("%s: warning: vocab does not have a %s token, jinja template won't work as intended.\n", __func__, name); } return std::string(); } else { return common_token_to_piece(vocab, token, true); } }; auto token_bos = get_token(llama_vocab_bos(vocab), "BOS", "bos_token"); auto token_eos = get_token(llama_vocab_eos(vocab), "EOS", "eos_token"); return { has_explicit_template, std::make_unique<minja::chat_template>(default_template_src, token_bos, token_eos), template_tool_use_src.empty() ? nullptr : std::make_unique<minja::chat_template>(template_tool_use_src, token_bos, token_eos) }; }
O0
cpp
common_chat_templates_from_model(llama_model const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x118, %rsp # imm = 0x118 movq %rdi, 0x38(%rsp) movq %rdi, %rax movq %rax, 0x40(%rsp) movq %rdi, 0x110(%rsp) movq %rsi, 0x108(%rsp) movq %rdx, 0x100(%rsp) movq 0x108(%rsp), %rdi callq 0x5e220 movq %rax, 0xf8(%rsp) movq 0x100(%rsp), %rsi leaq 0xd8(%rsp), %rdi callq 0x5d1f0 movq 0x100(%rsp), %rsi leaq 0xb8(%rsp), %rdi callq 0x5d1f0 jmp 0xf6bdd movq 0x100(%rsp), %rdi callq 0x5d4e0 xorb $-0x1, %al andb $0x1, %al movb %al, 0xab(%rsp) movq 0x100(%rsp), %rdi callq 0x5d4e0 testb $0x1, %al jne 0xf6c0b jmp 0xf6ce2 movq 0x108(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x5ddd0 movq %rax, 0x30(%rsp) jmp 0xf6c23 movq 0x30(%rsp), %rax movq %rax, 0xa0(%rsp) cmpq $0x0, 0xa0(%rsp) je 0xf6c8e movq 0xa0(%rsp), %rsi leaq 0xd8(%rsp), %rdi callq 0x5d6c0 jmp 0xf6c52 movb $0x1, 0xab(%rsp) jmp 0xf6c8e movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0xf6f26 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0xf6f19 movq 0x108(%rsp), %rdi leaq 0x122f70(%rip), %rsi # 0x219c0d callq 0x5ddd0 movq %rax, 0x28(%rsp) jmp 0xf6ca9 movq 0x28(%rsp), %rax movq %rax, 0xa0(%rsp) cmpq $0x0, 0xa0(%rsp) je 0xf6ce0 movq 0xa0(%rsp), %rsi leaq 0xb8(%rsp), %rdi callq 0x5d6c0 jmp 0xf6cd8 movb $0x1, 0xab(%rsp) jmp 0xf6ce2 leaq 0xd8(%rsp), %rdi callq 0x5d4e0 testb $0x1, %al jne 0xf6d17 leaq 0x122f1c(%rip), %rsi # 0x219c16 leaq 0xd8(%rsp), %rdi callq 0x8fcb0 movb %al, 0x27(%rsp) jmp 0xf6d0d movb 0x27(%rsp), %al testb $0x1, %al jne 0xf6d17 jmp 0xf6d5b leaq 0xb8(%rsp), %rdi callq 0x5d4e0 testb $0x1, %al jne 0xf6d41 leaq 0xd8(%rsp), %rdi leaq 0xb8(%rsp), %rsi callq 0x5e420 jmp 0xf6d3f jmp 0xf6d59 leaq 0x122ed5(%rip), %rsi # 0x219c1d leaq 0xd8(%rsp), %rdi callq 0x5d6c0 jmp 0xf6d57 jmp 0xf6d59 jmp 0xf6d5b leaq 0xd8(%rsp), %rax movq %rax, 0x88(%rsp) leaq 0xb8(%rsp), %rax movq %rax, 0x90(%rsp) leaq 0xf8(%rsp), %rax movq %rax, 0x98(%rsp) movq 0xf8(%rsp), %rdi callq 0x5e4d0 movl %eax, 0x20(%rsp) jmp 0xf6d9e movl 0x20(%rsp), %edx leaq 0x122fba(%rip), %rcx # 0x219d63 leaq 0x122fb7(%rip), %r8 # 0x219d67 leaq 0x68(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0xf6f40 jmp 0xf6dc4 movq 0xf8(%rsp), %rdi callq 0x5df80 movl %eax, 0x1c(%rsp) jmp 0xf6dd7 movl 0x1c(%rsp), %edx leaq 0x122f8f(%rip), %rcx # 0x219d71 leaq 0x122f8c(%rip), %r8 # 0x219d75 leaq 0x48(%rsp), %rdi leaq 0x88(%rsp), %rsi callq 0xf6f40 jmp 0xf6dfd movq 0x38(%rsp), %rdi movb 0xab(%rsp), %al andb $0x1, %al movb %al, (%rdi) addq $0x8, %rdi movq %rdi, 0x10(%rsp) leaq 0xd8(%rsp), %rsi leaq 0x68(%rsp), %rdx leaq 0x48(%rsp), %rcx callq 0x1053f0 jmp 0xf6e2f movq 0x38(%rsp), %rax addq $0x10, %rax movq %rax, 0x8(%rsp) leaq 0xb8(%rsp), %rdi callq 0x5d4e0 testb $0x1, %al jne 0xf6e50 jmp 0xf6e60 movq 0x8(%rsp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x105480 jmp 0xf6e80 movq 0x8(%rsp), %rdi leaq 0xb8(%rsp), %rsi leaq 0x68(%rsp), %rdx leaq 0x48(%rsp), %rcx callq 0x1053f0 jmp 0xf6e7e jmp 0xf6e80 leaq 0x48(%rsp), %rdi callq 0x5e568 leaq 0x68(%rsp), %rdi callq 0x5e568 leaq 0xb8(%rsp), %rdi callq 0x5e568 leaq 0xd8(%rsp), %rdi callq 0x5e568 movq 0x40(%rsp), %rax addq $0x118, %rsp # imm = 0x118 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0xf6f0f movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) jmp 0xf6f05 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xb0(%rsp) movl %eax, 0xac(%rsp) callq 0x1054c0 leaq 0x48(%rsp), %rdi callq 0x5e568 leaq 0x68(%rsp), %rdi callq 0x5e568 leaq 0xb8(%rsp), %rdi callq 0x5e568 leaq 0xd8(%rsp), %rdi callq 0x5e568 movq 0xb0(%rsp), %rdi callq 0x5dbc0
_Z32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 118h mov [rsp+118h+var_E0], rdi mov rax, rdi mov [rsp+118h+var_D8], rax mov [rsp+118h+var_8], rdi mov [rsp+118h+var_10], rsi mov [rsp+118h+var_18], rdx mov rdi, [rsp+118h+var_10] call _llama_model_get_vocab mov [rsp+118h+var_20], rax mov rsi, [rsp+118h+var_18] lea rdi, [rsp+118h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) mov rsi, [rsp+118h+var_18] lea rdi, [rsp+118h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1ERKS4_; std::string::basic_string(std::string const&) jmp short $+2 loc_F6BDD: mov rdi, [rsp+118h+var_18] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) xor al, 0FFh and al, 1 mov [rsp+118h+var_6D], al mov rdi, [rsp+118h+var_18] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_F6C0B jmp loc_F6CE2 loc_F6C0B: mov rdi, [rsp+118h+var_10] xor eax, eax mov esi, eax call _llama_model_chat_template mov [rsp+118h+var_E8], rax jmp short $+2 loc_F6C23: mov rax, [rsp+118h+var_E8] mov [rsp+118h+var_78], rax cmp [rsp+118h+var_78], 0 jz short loc_F6C8E mov rsi, [rsp+118h+var_78] lea rdi, [rsp+118h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) jmp short $+2 loc_F6C52: mov [rsp+118h+var_6D], 1 jmp short loc_F6C8E mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp loc_F6F26 mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp loc_F6F19 loc_F6C8E: mov rdi, [rsp+118h+var_10] lea rsi, aToolUse; "tool_use" call _llama_model_chat_template mov [rsp+118h+var_F0], rax jmp short $+2 loc_F6CA9: mov rax, [rsp+118h+var_F0] mov [rsp+118h+var_78], rax cmp [rsp+118h+var_78], 0 jz short loc_F6CE0 mov rsi, [rsp+118h+var_78] lea rdi, [rsp+118h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) jmp short $+2 loc_F6CD8: mov [rsp+118h+var_6D], 1 loc_F6CE0: jmp short $+2 loc_F6CE2: lea rdi, [rsp+118h+var_40] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_F6D17 lea rsi, aChatml; "chatml" lea rdi, [rsp+118h+var_40] call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rsp+118h+var_F1], al jmp short $+2 loc_F6D0D: mov al, [rsp+118h+var_F1] test al, 1 jnz short loc_F6D17 jmp short loc_F6D5B loc_F6D17: lea rdi, [rsp+118h+var_60] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_F6D41 lea rdi, [rsp+118h+var_40] lea rsi, [rsp+118h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSERKS4_; std::string::operator=(std::string const&) jmp short $+2 loc_F6D3F: jmp short loc_F6D59 loc_F6D41: lea rsi, aForMessageInMe; "\n {%- for message in me"... lea rdi, [rsp+118h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) jmp short $+2 loc_F6D57: jmp short $+2 loc_F6D59: jmp short $+2 loc_F6D5B: lea rax, [rsp+118h+var_40] mov [rsp+118h+var_90], rax lea rax, [rsp+118h+var_60] mov [rsp+118h+var_88], rax lea rax, [rsp+118h+var_20] mov [rsp+118h+var_80], rax mov rdi, [rsp+118h+var_20] call _llama_vocab_bos mov [rsp+118h+var_F8], eax jmp short $+2 loc_F6D9E: mov edx, [rsp+118h+var_F8] lea rcx, aBos; "BOS" lea r8, aBosToken; "bos_token" lea rdi, [rsp+118h+var_B0] lea rsi, [rsp+118h+var_90] call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) jmp short $+2 loc_F6DC4: mov rdi, [rsp+118h+var_20] call _llama_vocab_eos mov [rsp+118h+var_FC], eax jmp short $+2 loc_F6DD7: mov edx, [rsp+118h+var_FC] lea rcx, aEos; "EOS" lea r8, aEosToken; "eos_token" lea rdi, [rsp+118h+var_D0] lea rsi, [rsp+118h+var_90] call _ZZ32common_chat_templates_from_modelPK11llama_modelRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEENK3$_0clB5cxx11EiPKcSC_; common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()(int,char const*,char const*) jmp short $+2 loc_F6DFD: mov rdi, [rsp+118h+var_E0] mov al, [rsp+118h+var_6D] and al, 1 mov [rdi], al add rdi, 8; int mov qword ptr [rsp+118h+var_108], rdi; int lea rsi, [rsp+118h+var_40]; int lea rdx, [rsp+118h+var_B0]; int lea rcx, [rsp+118h+var_D0]; int call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &) jmp short $+2 loc_F6E2F: mov rax, [rsp+118h+var_E0] add rax, 10h mov [rsp+118h+var_110], rax; void * lea rdi, [rsp+118h+var_60] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) test al, 1 jnz short loc_F6E50 jmp short loc_F6E60 loc_F6E50: mov rdi, [rsp+118h+var_110] xor eax, eax mov esi, eax call _ZNSt10unique_ptrIN5minja13chat_templateESt14default_deleteIS1_EEC2IS3_vEEDn; std::unique_ptr<minja::chat_template>::unique_ptr<std::default_delete<minja::chat_template>,void>(decltype(nullptr)) jmp short loc_F6E80 loc_F6E60: mov rdi, [rsp+118h+var_110]; int lea rsi, [rsp+118h+var_60]; int lea rdx, [rsp+118h+var_B0]; int lea rcx, [rsp+118h+var_D0]; int call _ZSt11make_uniqueIN5minja13chat_templateEJRNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_S8_EENSt9_MakeUniqIT_E15__single_objectEDpOT0_; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>(std::string &,std::string &,std::string &) jmp short $+2 loc_F6E7E: jmp short $+2 loc_F6E80: lea rdi, [rsp+118h+var_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+118h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+118h+var_D8] add rsp, 118h retn mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp short loc_F6F0F mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax jmp short loc_F6F05 mov rdi, [rsp+arg_8] mov rcx, rax mov eax, edx mov [rsp+arg_A8], rcx mov [rsp+arg_A4], eax call _ZNSt10unique_ptrIN5minja13chat_templateESt14default_deleteIS1_EED2Ev; std::unique_ptr<minja::chat_template>::~unique_ptr() loc_F6F05: lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F6F0F: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F6F19: lea rdi, [rsp+arg_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_F6F26: lea rdi, [rsp+arg_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rdi, [rsp+arg_A8] call __Unwind_Resume
bool * common_chat_templates_from_model(bool *a1, long long a2, long long a3) { int v3; // r8d int v4; // r9d int v5; // r8d int v6; // r9d int v8; // [rsp+0h] [rbp-118h] int v9; // [rsp+0h] [rbp-118h] void *v10; // [rsp+8h] [rbp-110h] void *v11; // [rsp+8h] [rbp-110h] int v12; // [rsp+10h] [rbp-108h] long long v13; // [rsp+18h] [rbp-100h] long long v14; // [rsp+18h] [rbp-100h] unsigned int v15; // [rsp+20h] [rbp-F8h] int v16[8]; // [rsp+48h] [rbp-D0h] BYREF int v17[8]; // [rsp+68h] [rbp-B0h] BYREF _QWORD v18[3]; // [rsp+88h] [rbp-90h] BYREF const char *v19; // [rsp+A0h] [rbp-78h] bool v20; // [rsp+ABh] [rbp-6Dh] int v21[8]; // [rsp+B8h] [rbp-60h] BYREF int v22[8]; // [rsp+D8h] [rbp-40h] BYREF long long vocab; // [rsp+F8h] [rbp-20h] BYREF long long v24; // [rsp+100h] [rbp-18h] long long v25; // [rsp+108h] [rbp-10h] bool *v26; // [rsp+110h] [rbp-8h] v26 = a1; v25 = a2; v24 = a3; vocab = llama_model_get_vocab(a2); std::string::basic_string(v22, v24); std::string::basic_string(v21, v24); v20 = (std::string::empty(v24) & 1) == 0; if ( (std::string::empty(v24) & 1) != 0 ) { v19 = (const char *)llama_model_chat_template(v25, 0LL); if ( v19 ) { std::string::operator=(v22, v19); v20 = 1; } v19 = (const char *)llama_model_chat_template(v25, "tool_use"); if ( v19 ) { std::string::operator=(v21, v19); v20 = 1; } } if ( (std::string::empty(v22) & 1) != 0 || std::operator==<char>((long long)v22, (long long)"chatml") ) { if ( (std::string::empty(v21) & 1) != 0 ) std::string::operator=( v22, "\n" " {%- for message in messages -%}\n" " {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n" " {%- endfor -%}\n" " {%- if add_generation_prompt -%}\n" " {{- \"<|im_start|>assistant\\n\" -}}\n" " {%- endif -%}\n" " "); else std::string::operator=(v22, v21); } v18[0] = v22; v18[1] = v21; v18[2] = &vocab; v15 = llama_vocab_bos(vocab); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v17, v18, v15, "BOS", "bos_token"); HIDWORD(v13) = llama_vocab_eos(vocab); common_chat_templates_from_model(llama_model const*,std::string const&)::$_0::operator()[abi:cxx11]( v16, v18, HIDWORD(v13), "EOS", "eos_token"); *a1 = v20; std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>( (_DWORD)a1 + 8, (int)v22, (int)v17, (int)v16, v3, v4, v8, v10, (_DWORD)a1 + 8, v13); v11 = a1 + 16; if ( (std::string::empty(v21) & 1) != 0 ) std::unique_ptr<minja::chat_template>::unique_ptr<std::default_delete<minja::chat_template>,void>(v11, 0LL); else std::make_unique<minja::chat_template,std::string &,std::string &,std::string &>( (int)v11, (int)v21, (int)v17, (int)v16, v5, v6, v9, v11, v12, v14); std::string::~string(v16); std::string::~string(v17); std::string::~string(v21); std::string::~string(v22); return a1; }
common_chat_templates_from_model: SUB RSP,0x118 MOV qword ptr [RSP + 0x38],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x40],RAX MOV qword ptr [RSP + 0x110],RDI MOV qword ptr [RSP + 0x108],RSI MOV qword ptr [RSP + 0x100],RDX MOV RDI,qword ptr [RSP + 0x108] CALL 0x0015e220 MOV qword ptr [RSP + 0xf8],RAX MOV RSI,qword ptr [RSP + 0x100] LEA RDI,[RSP + 0xd8] CALL 0x0015d1f0 MOV RSI,qword ptr [RSP + 0x100] LAB_001f6bce: LEA RDI,[RSP + 0xb8] CALL 0x0015d1f0 JMP 0x001f6bdd LAB_001f6bdd: MOV RDI,qword ptr [RSP + 0x100] CALL 0x0015d4e0 XOR AL,0xff AND AL,0x1 MOV byte ptr [RSP + 0xab],AL MOV RDI,qword ptr [RSP + 0x100] CALL 0x0015d4e0 TEST AL,0x1 JNZ 0x001f6c0b JMP 0x001f6ce2 LAB_001f6c0b: MOV RDI,qword ptr [RSP + 0x108] LAB_001f6c13: XOR EAX,EAX MOV ESI,EAX CALL 0x0015ddd0 MOV qword ptr [RSP + 0x30],RAX JMP 0x001f6c23 LAB_001f6c23: MOV RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0xa0],RAX CMP qword ptr [RSP + 0xa0],0x0 JZ 0x001f6c8e MOV RSI,qword ptr [RSP + 0xa0] LEA RDI,[RSP + 0xd8] CALL 0x0015d6c0 JMP 0x001f6c52 LAB_001f6c52: MOV byte ptr [RSP + 0xab],0x1 JMP 0x001f6c8e LAB_001f6c8e: MOV RDI,qword ptr [RSP + 0x108] LEA RSI,[0x319c0d] CALL 0x0015ddd0 MOV qword ptr [RSP + 0x28],RAX JMP 0x001f6ca9 LAB_001f6ca9: MOV RAX,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0xa0],RAX CMP qword ptr [RSP + 0xa0],0x0 JZ 0x001f6ce0 MOV RSI,qword ptr [RSP + 0xa0] LEA RDI,[RSP + 0xb8] CALL 0x0015d6c0 JMP 0x001f6cd8 LAB_001f6cd8: MOV byte ptr [RSP + 0xab],0x1 LAB_001f6ce0: JMP 0x001f6ce2 LAB_001f6ce2: LEA RDI,[RSP + 0xd8] CALL 0x0015d4e0 TEST AL,0x1 JNZ 0x001f6d17 LEA RSI,[0x319c16] LEA RDI,[RSP + 0xd8] CALL 0x0018fcb0 MOV byte ptr [RSP + 0x27],AL JMP 0x001f6d0d LAB_001f6d0d: MOV AL,byte ptr [RSP + 0x27] TEST AL,0x1 JNZ 0x001f6d17 JMP 0x001f6d5b LAB_001f6d17: LEA RDI,[RSP + 0xb8] CALL 0x0015d4e0 TEST AL,0x1 JNZ 0x001f6d41 LEA RDI,[RSP + 0xd8] LEA RSI,[RSP + 0xb8] CALL 0x0015e420 JMP 0x001f6d3f LAB_001f6d3f: JMP 0x001f6d59 LAB_001f6d41: LEA RSI,[0x319c1d] LEA RDI,[RSP + 0xd8] CALL 0x0015d6c0 JMP 0x001f6d57 LAB_001f6d57: JMP 0x001f6d59 LAB_001f6d59: JMP 0x001f6d5b LAB_001f6d5b: LEA RAX,[RSP + 0xd8] MOV qword ptr [RSP + 0x88],RAX LEA RAX,[RSP + 0xb8] MOV qword ptr [RSP + 0x90],RAX LEA RAX,[RSP + 0xf8] MOV qword ptr [RSP + 0x98],RAX MOV RDI,qword ptr [RSP + 0xf8] CALL 0x0015e4d0 MOV dword ptr [RSP + 0x20],EAX JMP 0x001f6d9e LAB_001f6d9e: MOV EDX,dword ptr [RSP + 0x20] LEA RCX,[0x319d63] LEA R8,[0x319d67] LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x88] CALL 0x001f6f40 JMP 0x001f6dc4 LAB_001f6dc4: MOV RDI,qword ptr [RSP + 0xf8] LAB_001f6dcc: CALL 0x0015df80 MOV dword ptr [RSP + 0x1c],EAX JMP 0x001f6dd7 LAB_001f6dd7: MOV EDX,dword ptr [RSP + 0x1c] LEA RCX,[0x319d71] LEA R8,[0x319d75] LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x88] CALL 0x001f6f40 JMP 0x001f6dfd LAB_001f6dfd: MOV RDI,qword ptr [RSP + 0x38] MOV AL,byte ptr [RSP + 0xab] AND AL,0x1 MOV byte ptr [RDI],AL ADD RDI,0x8 MOV qword ptr [RSP + 0x10],RDI LAB_001f6e16: LEA RSI,[RSP + 0xd8] LEA RDX,[RSP + 0x68] LEA RCX,[RSP + 0x48] CALL 0x002053f0 JMP 0x001f6e2f LAB_001f6e2f: MOV RAX,qword ptr [RSP + 0x38] ADD RAX,0x10 MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0xb8] CALL 0x0015d4e0 TEST AL,0x1 JNZ 0x001f6e50 JMP 0x001f6e60 LAB_001f6e50: MOV RDI,qword ptr [RSP + 0x8] XOR EAX,EAX MOV ESI,EAX CALL 0x00205480 JMP 0x001f6e80 LAB_001f6e60: MOV RDI,qword ptr [RSP + 0x8] LEA RSI,[RSP + 0xb8] LEA RDX,[RSP + 0x68] LEA RCX,[RSP + 0x48] CALL 0x002053f0 LAB_001f6e7c: JMP 0x001f6e7e LAB_001f6e7e: JMP 0x001f6e80 LAB_001f6e80: LEA RDI,[RSP + 0x48] CALL 0x0015e568 LEA RDI,[RSP + 0x68] CALL 0x0015e568 LEA RDI,[RSP + 0xb8] CALL 0x0015e568 LEA RDI,[RSP + 0xd8] CALL 0x0015e568 MOV RAX,qword ptr [RSP + 0x40] ADD RSP,0x118 RET
/* common_chat_templates_from_model(llama_model const*, std::__cxx11::string const&) */ llama_model * common_chat_templates_from_model(llama_model *param_1,string *param_2) { byte bVar1; bool bVar2; uint uVar3; ulong uVar4; string *in_RDX; string local_d0 [32]; string local_b0 [32]; string *local_90; string *local_88; int8 *local_80; char *local_78; byte local_6d; string local_60 [32]; string local_40 [32]; int8 local_20; string *local_18; string *local_10; llama_model *local_8; local_18 = in_RDX; local_10 = param_2; local_8 = param_1; local_20 = llama_model_get_vocab(param_2); std::__cxx11::string::string(local_40,local_18); /* try { // try from 001f6bce to 001f6bda has its CatchHandler @ 001f6c5c */ std::__cxx11::string::string(local_60,local_18); bVar1 = std::__cxx11::string::empty(); local_6d = (bVar1 ^ 0xff) & 1; uVar4 = std::__cxx11::string::empty(); if ((uVar4 & 1) != 0) { /* try { // try from 001f6c13 to 001f6dc1 has its CatchHandler @ 001f6c75 */ local_78 = (char *)llama_model_chat_template(local_10,0); if (local_78 != (char *)0x0) { std::__cxx11::string::operator=(local_40,local_78); local_6d = 1; } local_78 = (char *)llama_model_chat_template(local_10,"tool_use"); if (local_78 != (char *)0x0) { std::__cxx11::string::operator=(local_60,local_78); local_6d = 1; } } uVar4 = std::__cxx11::string::empty(); if (((uVar4 & 1) != 0) || (bVar2 = std::operator==(local_40,"chatml"), bVar2)) { uVar4 = std::__cxx11::string::empty(); if ((uVar4 & 1) == 0) { std::__cxx11::string::operator=(local_40,local_60); } else { std::__cxx11::string::operator= (local_40, "\n {%- for message in messages -%}\n {{- \"<|im_start|>\" + message.role + \"\\n\" + message.content + \"<|im_end|>\\n\" -}}\n {%- endfor -%}\n {%- if add_generation_prompt -%}\n {{- \"<|im_start|>assistant\\n\" -}}\n {%- endif -%}\n " ); } } local_90 = local_40; local_88 = local_60; local_80 = &local_20; uVar3 = llama_vocab_bos(local_20); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_b0,(char *)&local_90,(char *)(ulong)uVar3); /* try { // try from 001f6dcc to 001f6dfa has its CatchHandler @ 001f6ebb */ uVar3 = llama_vocab_eos(local_20); common_chat_templates_from_model(llama_model_const*,std::__cxx11::string_const&)::$_0:: operator()[abi_cxx11_((int)local_d0,(char *)&local_90,(char *)(ulong)uVar3); *param_1 = (llama_model)(local_6d & 1); /* try { // try from 001f6e16 to 001f6e2c has its CatchHandler @ 001f6ed1 */ std:: make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&> ((string *)(param_1 + 8),local_40,local_b0); uVar4 = std::__cxx11::string::empty(); if ((uVar4 & 1) == 0) { /* try { // try from 001f6e60 to 001f6e7b has its CatchHandler @ 001f6ee7 */ std:: make_unique<minja::chat_template,std::__cxx11::string&,std::__cxx11::string&,std::__cxx11::string&> ((string *)(param_1 + 0x10),local_60,local_b0); } else { std::unique_ptr<minja::chat_template,std::default_delete<minja::chat_template>>:: unique_ptr<std::default_delete<minja::chat_template>,void> ((_func_decltype_nullptr *)(param_1 + 0x10)); } std::__cxx11::string::~string(local_d0); std::__cxx11::string::~string(local_b0); std::__cxx11::string::~string(local_60); std::__cxx11::string::~string(local_40); return param_1; }
46,718
ma_check_index
eloqsql/storage/maria/ma_search.c
int _ma_check_index(MARIA_HA *info, int inx) { if (inx < 0 || ! maria_is_key_active(info->s->state.key_map, inx)) { my_errno=HA_ERR_WRONG_INDEX; return -1; } if (info->lastinx != inx) /* Index changed */ { info->lastinx = inx; info->last_key.keyinfo= info->s->keyinfo + inx; info->last_key.flag= 0; info->page_changed=1; info->update= ((info->update & (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED)) | HA_STATE_NEXT_FOUND | HA_STATE_PREV_FOUND); } if ((info->opt_flag & WRITE_CACHE_USED) && flush_io_cache(&info->rec_cache)) { if (unlikely(!my_errno)) my_errno= HA_ERR_INTERNAL_ERROR; /* Impossible */ return(-1); } if (unlikely(maria_is_crashed(info))) { my_errno= HA_ERR_CRASHED; return(-1); } return(inx); }
O0
c
ma_check_index: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) cmpl $0x0, -0x14(%rbp) jl 0x6904a movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x140(%rax), %rax movl -0x14(%rbp), %ecx movl $0x1, %edx shlq %cl, %rdx movq %rdx, %rcx andq %rcx, %rax cmpq $0x0, %rax je 0x69042 movb $0x1, %al testb $0x1, %al jne 0x69061 jmp 0x6904a xorl %eax, %eax testb $0x1, %al jne 0x69061 jmp 0x6904a callq 0xf6090 movl $0x7c, (%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x6917f movq -0x10(%rbp), %rax movl 0x62c(%rax), %eax cmpl -0x14(%rbp), %eax je 0x690dd movl -0x14(%rbp), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x62c(%rax) movq -0x10(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rcx movslq -0x14(%rbp), %rax imulq $0x118, %rax, %rax # imm = 0x118 addq %rax, %rcx movq -0x10(%rbp), %rax movq %rcx, 0x208(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x218(%rax) movq -0x10(%rbp), %rax movb $0x1, 0x684(%rax) movq -0x10(%rbp), %rax movl 0x624(%rax), %ecx andl $0x401, %ecx # imm = 0x401 orl $0x10, %ecx orl $0x20, %ecx movq -0x10(%rbp), %rax movl %ecx, 0x624(%rax) movq -0x10(%rbp), %rax movl 0x61c(%rax), %eax andl $0x10, %eax cmpl $0x0, %eax je 0x69142 movq -0x10(%rbp), %rdi addq $0x4b8, %rdi # imm = 0x4B8 movl $0x1, %esi callq 0xe0bb0 cmpl $0x0, %eax je 0x69142 callq 0xf6090 cmpl $0x0, (%rax) setne %al xorb $-0x1, %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x69139 callq 0xf6090 movl $0x7a, (%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x6917f movq -0x10(%rbp), %rax movq (%rax), %rax movl 0x170(%rax), %eax andl $0x2, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x69179 callq 0xf6090 movl $0x7e, (%rax) movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF jmp 0x6917f movl -0x14(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopl (%rax,%rax)
_ma_check_index: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_14], esi cmp [rbp+var_14], 0 jl short loc_6904A mov rax, [rbp+var_10] mov rax, [rax] mov rax, [rax+140h] mov ecx, [rbp+var_14] mov edx, 1 shl rdx, cl mov rcx, rdx and rax, rcx cmp rax, 0 jz short loc_69042 mov al, 1 test al, 1 jnz short loc_69061 jmp short loc_6904A loc_69042: xor eax, eax test al, 1 jnz short loc_69061 jmp short $+2 loc_6904A: call _my_thread_var mov dword ptr [rax], 7Ch ; '|' mov [rbp+var_4], 0FFFFFFFFh jmp loc_6917F loc_69061: mov rax, [rbp+var_10] mov eax, [rax+62Ch] cmp eax, [rbp+var_14] jz short loc_690DD mov ecx, [rbp+var_14] mov rax, [rbp+var_10] mov [rax+62Ch], ecx mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rax+570h] movsxd rax, [rbp+var_14] imul rax, 118h add rcx, rax mov rax, [rbp+var_10] mov [rax+208h], rcx mov rax, [rbp+var_10] mov dword ptr [rax+218h], 0 mov rax, [rbp+var_10] mov byte ptr [rax+684h], 1 mov rax, [rbp+var_10] mov ecx, [rax+624h] and ecx, 401h or ecx, 10h or ecx, 20h mov rax, [rbp+var_10] mov [rax+624h], ecx loc_690DD: mov rax, [rbp+var_10] mov eax, [rax+61Ch] and eax, 10h cmp eax, 0 jz short loc_69142 mov rdi, [rbp+var_10] add rdi, 4B8h mov esi, 1 call my_b_flush_io_cache cmp eax, 0 jz short loc_69142 call _my_thread_var cmp dword ptr [rax], 0 setnz al xor al, 0FFh and al, 1 movzx eax, al cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_69139 call _my_thread_var mov dword ptr [rax], 7Ah ; 'z' loc_69139: mov [rbp+var_4], 0FFFFFFFFh jmp short loc_6917F loc_69142: mov rax, [rbp+var_10] mov rax, [rax] mov eax, [rax+170h] and eax, 2 cmp eax, 0 setnz al and al, 1 movzx eax, al cdqe cmp rax, 0 jz short loc_69179 call _my_thread_var mov dword ptr [rax], 7Eh ; '~' mov [rbp+var_4], 0FFFFFFFFh jmp short loc_6917F loc_69179: mov eax, [rbp+var_14] mov [rbp+var_4], eax loc_6917F: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long ma_check_index(long long a1, const char *a2) { unsigned int v3; // [rsp+Ch] [rbp-14h] long long v4; // [rsp+10h] [rbp-10h] v4 = a1; v3 = (unsigned int)a2; if ( (int)a2 >= 0 && ((1LL << (char)a2) & *(_QWORD *)(*(_QWORD *)a1 + 320LL)) != 0 ) { if ( *(_DWORD *)(a1 + 1580) != (_DWORD)a2 ) { *(_DWORD *)(a1 + 1580) = (_DWORD)a2; *(_QWORD *)(a1 + 520) = 280LL * (int)a2 + *(_QWORD *)(*(_QWORD *)a1 + 1392LL); *(_DWORD *)(a1 + 536) = 0; *(_BYTE *)(a1 + 1668) = 1; *(_DWORD *)(a1 + 1572) = *(_DWORD *)(a1 + 1572) & 0x401 | 0x30; } if ( (*(_DWORD *)(a1 + 1564) & 0x10) != 0 && (a1 += 1208LL, a2 = (_BYTE *)(&dword_0 + 1), (unsigned int)my_b_flush_io_cache(v4 + 1208, 1LL)) ) { if ( !*(_DWORD *)my_thread_var(a1, (_BYTE *)&dword_0 + 1) ) *(_DWORD *)my_thread_var(a1, (_BYTE *)&dword_0 + 1) = 122; return (unsigned int)-1; } else if ( (*(_DWORD *)(*(_QWORD *)v4 + 368LL) & 2) != 0 ) { *(_DWORD *)my_thread_var(a1, a2) = 126; return (unsigned int)-1; } else { return v3; } } else { *(_DWORD *)my_thread_var(a1, a2) = 124; return (unsigned int)-1; } }
_ma_check_index: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI CMP dword ptr [RBP + -0x14],0x0 JL 0x0016904a MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x140] MOV ECX,dword ptr [RBP + -0x14] MOV EDX,0x1 SHL RDX,CL MOV RCX,RDX AND RAX,RCX CMP RAX,0x0 JZ 0x00169042 MOV AL,0x1 TEST AL,0x1 JNZ 0x00169061 JMP 0x0016904a LAB_00169042: XOR EAX,EAX TEST AL,0x1 JNZ 0x00169061 JMP 0x0016904a LAB_0016904a: CALL 0x001f6090 MOV dword ptr [RAX],0x7c MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0016917f LAB_00169061: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x62c] CMP EAX,dword ptr [RBP + -0x14] JZ 0x001690dd MOV ECX,dword ptr [RBP + -0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x62c],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RAX + 0x570] MOVSXD RAX,dword ptr [RBP + -0x14] IMUL RAX,RAX,0x118 ADD RCX,RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x208],RCX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x218],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV byte ptr [RAX + 0x684],0x1 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x624] AND ECX,0x401 OR ECX,0x10 OR ECX,0x20 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x624],ECX LAB_001690dd: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x61c] AND EAX,0x10 CMP EAX,0x0 JZ 0x00169142 MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x4b8 MOV ESI,0x1 CALL 0x001e0bb0 CMP EAX,0x0 JZ 0x00169142 CALL 0x001f6090 CMP dword ptr [RAX],0x0 SETNZ AL XOR AL,0xff AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00169139 CALL 0x001f6090 MOV dword ptr [RAX],0x7a LAB_00169139: MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0016917f LAB_00169142: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV EAX,dword ptr [RAX + 0x170] AND EAX,0x2 CMP EAX,0x0 SETNZ AL AND AL,0x1 MOVZX EAX,AL CDQE CMP RAX,0x0 JZ 0x00169179 CALL 0x001f6090 MOV dword ptr [RAX],0x7e MOV dword ptr [RBP + -0x4],0xffffffff JMP 0x0016917f LAB_00169179: MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x4],EAX LAB_0016917f: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
/* WARNING: Removing unreachable block (ram,0x00169040) */ int _ma_check_index(long *param_1,int param_2) { int iVar1; int4 *puVar2; int *piVar3; int local_c; if ((param_2 < 0) || ((*(ulong *)(*param_1 + 0x140) & 1L << ((byte)param_2 & 0x3f)) == 0)) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7c; local_c = -1; } else { if (*(int *)((long)param_1 + 0x62c) != param_2) { *(int *)((long)param_1 + 0x62c) = param_2; param_1[0x41] = *(long *)(*param_1 + 0x570) + (long)param_2 * 0x118; *(int4 *)(param_1 + 0x43) = 0; *(int1 *)((long)param_1 + 0x684) = 1; *(uint *)((long)param_1 + 0x624) = *(uint *)((long)param_1 + 0x624) & 0x401 | 0x30; } if (((*(uint *)((long)param_1 + 0x61c) & 0x10) == 0) || (iVar1 = my_b_flush_io_cache(param_1 + 0x97,1), iVar1 == 0)) { local_c = param_2; if ((*(uint *)(*param_1 + 0x170) & 2) != 0) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; local_c = -1; } } else { piVar3 = (int *)_my_thread_var(); if (*piVar3 == 0) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7a; } local_c = -1; } } return local_c; }
46,719
minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
llama.cpp/common/minja/minja.hpp
Value get_named(const std::string & name) { for (const auto & [key, value] : kwargs) { if (key == name) return value; } return Value(); }
O3
cpp
minja::ArgumentsValue::get_named(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movq %rdi, %rbx movq 0x18(%rsi), %r14 movq 0x20(%rsi), %r13 cmpq %r13, %r14 je 0x713d8 movq (%rdx), %r15 movq 0x8(%rdx), %r12 cmpq %r12, 0x8(%r14) jne 0x713cf testq %r12, %r12 je 0x71416 movq (%r14), %rdi movq %r15, %rsi movq %r12, %rdx callq 0x1d9b0 testl %eax, %eax je 0x71416 addq $0x70, %r14 cmpq %r13, %r14 jne 0x713b2 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 0x60b38 movq %r14, %rdi movl $0x1, %esi callq 0x60b38 jmp 0x71425 addq $0x20, %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x63080 movq %rbx, %rax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZN5minja14ArgumentsValue9get_namedERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push r13 push r12 push rbx mov rbx, rdi mov r14, [rsi+18h] mov r13, [rsi+20h] cmp r14, r13 jz short loc_713D8 mov r15, [rdx] mov r12, [rdx+8] loc_713B2: cmp [r14+8], r12 jnz short loc_713CF test r12, r12 jz short loc_71416 mov rdi, [r14] mov rsi, r15 mov rdx, r12 call _bcmp test eax, eax jz short loc_71416 loc_713CF: add r14, 70h ; 'p' cmp r14, r13 jnz short loc_713B2 loc_713D8: 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_71425 loc_71416: add r14, 20h ; ' ' mov rdi, rbx; this mov rsi, r14; minja::Value * call _ZN5minja5ValueC2ERKS0_; minja::Value::Value(minja::Value const&) loc_71425: mov rax, rbx pop rbx pop r12 pop r13 pop r14 pop r15 retn
minja::Value * minja::ArgumentsValue::get_named(minja::Value *this, long long a2, long long *a3) { _QWORD *v3; // r14 _QWORD *v4; // r13 long long v5; // r15 long long v6; // r12 v3 = *(_QWORD **)(a2 + 24); v4 = *(_QWORD **)(a2 + 32); if ( v3 == v4 ) { LABEL_7: *((_QWORD *)this + 9) = 0LL; *(_OWORD *)this = 0LL; *((_OWORD *)this + 1) = 0LL; *((_OWORD *)this + 2) = 0LL; *((_OWORD *)this + 3) = 0LL; *((_BYTE *)this + 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 *)this + 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 *)this + 64); } else { v5 = *a3; v6 = a3[1]; while ( v3[1] != v6 || v6 && (unsigned int)bcmp(*v3, v5) ) { v3 += 14; if ( v3 == v4 ) goto LABEL_7; } minja::Value::Value(this, (const minja::Value *)(v3 + 4)); } return this; }
get_named: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV RBX,RDI MOV R14,qword ptr [RSI + 0x18] MOV R13,qword ptr [RSI + 0x20] CMP R14,R13 JZ 0x001713d8 MOV R15,qword ptr [RDX] MOV R12,qword ptr [RDX + 0x8] LAB_001713b2: CMP qword ptr [R14 + 0x8],R12 JNZ 0x001713cf TEST R12,R12 JZ 0x00171416 MOV RDI,qword ptr [R14] MOV RSI,R15 MOV RDX,R12 CALL 0x0011d9b0 TEST EAX,EAX JZ 0x00171416 LAB_001713cf: ADD R14,0x70 CMP R14,R13 JNZ 0x001713b2 LAB_001713d8: 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 0x00160b38 MOV RDI,R14 MOV ESI,0x1 CALL 0x00160b38 JMP 0x00171425 LAB_00171416: ADD R14,0x20 MOV RDI,RBX MOV RSI,R14 CALL 0x00163080 LAB_00171425: MOV RAX,RBX POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* minja::ArgumentsValue::get_named(std::__cxx11::string const&) */ string * minja::ArgumentsValue::get_named(string *param_1) { int8 *puVar1; void *__s2; size_t __n; int iVar2; int8 *in_RDX; long in_RSI; bool bVar3; int8 *puVar4; puVar4 = *(int8 **)(in_RSI + 0x18); puVar1 = *(int8 **)(in_RSI + 0x20); if (puVar4 != puVar1) { __s2 = (void *)*in_RDX; __n = in_RDX[1]; do { if ((puVar4[1] == __n) && ((__n == 0 || (iVar2 = bcmp((void *)*puVar4,__s2,__n), iVar2 == 0))) ) { Value::Value((Value *)param_1,(Value *)(puVar4 + 4)); return param_1; } puVar4 = puVar4 + 0xe; } while (puVar4 != puVar1); } bVar3 = (bool)((char)param_1 + '@'); *(int8 *)(param_1 + 0x48) = 0; *(int8 *)param_1 = 0; *(int8 *)(param_1 + 8) = 0; *(int8 *)(param_1 + 0x10) = 0; *(int8 *)(param_1 + 0x18) = 0; *(int8 *)(param_1 + 0x20) = 0; *(int8 *)(param_1 + 0x28) = 0; *(int8 *)(param_1 + 0x30) = 0; *(int8 *)(param_1 + 0x38) = 0; param_1[0x40] = (string)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(bVar3); 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(bVar3); return param_1; }
46,720
DrawTextEx
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint) { if (font.texture.id == 0) font = GetFontDefault(); // Security check in case of not valid font int size = TextLength(text); // Total size in bytes of the text, scanned by codepoints in loop float textOffsetY = 0; // Offset between lines (on linebreak '\n') float textOffsetX = 0.0f; // Offset X to next character to draw float scaleFactor = fontSize/font.baseSize; // Character quad scaling factor for (int i = 0; i < size;) { // Get next codepoint from byte string and glyph index in font int codepointByteCount = 0; int codepoint = GetCodepointNext(&text[i], &codepointByteCount); int index = GetGlyphIndex(font, codepoint); if (codepoint == '\n') { // NOTE: Line spacing is a global variable, use SetTextLineSpacing() to setup textOffsetY += (fontSize + textLineSpacing); textOffsetX = 0.0f; } else { if ((codepoint != ' ') && (codepoint != '\t')) { DrawTextCodepoint(font, codepoint, (Vector2){ position.x + textOffsetX, position.y + textOffsetY }, fontSize, tint); } if (font.glyphs[index].advanceX == 0) textOffsetX += ((float)font.recs[index].width*scaleFactor + spacing); else textOffsetX += ((float)font.glyphs[index].advanceX*scaleFactor + spacing); } i += codepointByteCount; // Move text bytes counter to next codepoint } }
O0
c
DrawTextEx: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp leaq 0x10(%rbp), %rax movq %rax, -0x80(%rbp) movlpd %xmm0, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdi, -0x18(%rbp) movss %xmm1, -0x1c(%rbp) movss %xmm2, -0x20(%rbp) cmpl $0x0, 0xc(%rax) jne 0xe5e1a leaq -0x50(%rbp), %rdi callq 0xe1500 movq -0x80(%rbp), %rdi leaq -0x50(%rbp), %rsi movl $0x30, %edx callq 0xa400 movq -0x18(%rbp), %rdi callq 0xe5fe0 movl %eax, %ecx movq -0x80(%rbp), %rax movl %ecx, -0x54(%rbp) xorps %xmm0, %xmm0 movss %xmm0, -0x58(%rbp) xorps %xmm0, %xmm0 movss %xmm0, -0x5c(%rbp) movss -0x1c(%rbp), %xmm0 cvtsi2ssl (%rax), %xmm1 divss %xmm1, %xmm0 movss %xmm0, -0x60(%rbp) movl $0x0, -0x64(%rbp) movl -0x64(%rbp), %eax cmpl -0x54(%rbp), %eax jge 0xe5fce movl $0x0, -0x68(%rbp) movq -0x18(%rbp), %rdi movslq -0x64(%rbp), %rax addq %rax, %rdi leaq -0x68(%rbp), %rsi callq 0xe6020 movl %eax, %ecx movq -0x80(%rbp), %rax movl %ecx, -0x6c(%rbp) movl -0x6c(%rbp), %edi movups (%rax), %xmm0 movups 0x10(%rax), %xmm1 movups 0x20(%rax), %xmm2 movq %rsp, %rax movups %xmm2, 0x20(%rax) movups %xmm1, 0x10(%rax) movups %xmm0, (%rax) callq 0xe6220 movl %eax, -0x70(%rbp) cmpl $0xa, -0x6c(%rbp) jne 0xe5ed7 movss -0x1c(%rbp), %xmm0 cvtsi2ssl 0x12e2a8(%rip), %xmm1 # 0x214164 addss %xmm1, %xmm0 addss -0x58(%rbp), %xmm0 movss %xmm0, -0x58(%rbp) xorps %xmm0, %xmm0 movss %xmm0, -0x5c(%rbp) jmp 0xe5fc0 cmpl $0x20, -0x6c(%rbp) je 0xe5f3b cmpl $0x9, -0x6c(%rbp) je 0xe5f3b movq -0x80(%rbp), %rax movl -0x6c(%rbp), %edi movss -0x8(%rbp), %xmm0 movss -0x5c(%rbp), %xmm1 addss %xmm1, %xmm0 movss %xmm0, -0x78(%rbp) movss -0x4(%rbp), %xmm0 movss -0x58(%rbp), %xmm1 addss %xmm1, %xmm0 movss %xmm0, -0x74(%rbp) movss -0x1c(%rbp), %xmm1 movsd -0x78(%rbp), %xmm0 movl -0xc(%rbp), %esi movups (%rax), %xmm2 movups 0x10(%rax), %xmm3 movups 0x20(%rax), %xmm4 movq %rsp, %rax movups %xmm4, 0x20(%rax) movups %xmm3, 0x10(%rax) movups %xmm2, (%rax) callq 0xe62c0 movq -0x80(%rbp), %rax movq 0x28(%rax), %rax movslq -0x70(%rbp), %rcx imulq $0x28, %rcx, %rcx addq %rcx, %rax cmpl $0x0, 0xc(%rax) jne 0xe5f8a movq -0x80(%rbp), %rax movq 0x20(%rax), %rax movslq -0x70(%rbp), %rcx shlq $0x4, %rcx addq %rcx, %rax movss 0x8(%rax), %xmm0 movss -0x60(%rbp), %xmm2 movss -0x20(%rbp), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 addss -0x5c(%rbp), %xmm0 movss %xmm0, -0x5c(%rbp) jmp 0xe5fbe movq -0x80(%rbp), %rax movq 0x28(%rax), %rax movslq -0x70(%rbp), %rcx imulq $0x28, %rcx, %rcx addq %rcx, %rax cvtsi2ssl 0xc(%rax), %xmm0 movss -0x60(%rbp), %xmm2 movss -0x20(%rbp), %xmm1 mulss %xmm2, %xmm0 addss %xmm1, %xmm0 addss -0x5c(%rbp), %xmm0 movss %xmm0, -0x5c(%rbp) jmp 0xe5fc0 movl -0x68(%rbp), %eax addl -0x64(%rbp), %eax movl %eax, -0x64(%rbp) jmp 0xe5e55 addq $0xb0, %rsp popq %rbp retq nopw (%rax,%rax)
DrawTextEx: push rbp mov rbp, rsp sub rsp, 0B0h lea rax, [rbp+arg_0] mov [rbp+var_80], rax movlpd [rbp+var_8], xmm0 mov [rbp+var_C], esi mov [rbp+var_18], rdi movss [rbp+var_1C], xmm1 movss [rbp+var_20], xmm2 cmp dword ptr [rax+0Ch], 0 jnz short loc_E5E1A lea rdi, [rbp+var_50] call GetFontDefault mov rdi, [rbp+var_80] lea rsi, [rbp+var_50] mov edx, 30h ; '0' call _memcpy loc_E5E1A: mov rdi, [rbp+var_18] call TextLength mov ecx, eax mov rax, [rbp+var_80] mov [rbp+var_54], ecx xorps xmm0, xmm0 movss [rbp+var_58], xmm0 xorps xmm0, xmm0 movss [rbp+var_5C], xmm0 movss xmm0, [rbp+var_1C] cvtsi2ss xmm1, dword ptr [rax] divss xmm0, xmm1 movss [rbp+var_60], xmm0 mov [rbp+var_64], 0 loc_E5E55: mov eax, [rbp+var_64] cmp eax, [rbp+var_54] jge loc_E5FCE mov [rbp+var_68], 0 mov rdi, [rbp+var_18] movsxd rax, [rbp+var_64] add rdi, rax lea rsi, [rbp+var_68] call GetCodepointNext mov ecx, eax mov rax, [rbp+var_80] mov [rbp+var_6C], ecx mov edi, [rbp+var_6C] movups xmm0, xmmword ptr [rax] movups xmm1, xmmword ptr [rax+10h] movups xmm2, xmmword ptr [rax+20h] mov rax, rsp movups xmmword ptr [rax+20h], xmm2 movups xmmword ptr [rax+10h], xmm1 movups xmmword ptr [rax], xmm0 call GetGlyphIndex mov [rbp+var_70], eax cmp [rbp+var_6C], 0Ah jnz short loc_E5ED7 movss xmm0, [rbp+var_1C] cvtsi2ss xmm1, cs:textLineSpacing addss xmm0, xmm1 addss xmm0, [rbp+var_58] movss [rbp+var_58], xmm0 xorps xmm0, xmm0 movss [rbp+var_5C], xmm0 jmp loc_E5FC0 loc_E5ED7: cmp [rbp+var_6C], 20h ; ' ' jz short loc_E5F3B cmp [rbp+var_6C], 9 jz short loc_E5F3B mov rax, [rbp+var_80] mov edi, [rbp+var_6C] movss xmm0, dword ptr [rbp+var_8] movss xmm1, [rbp+var_5C] addss xmm0, xmm1 movss dword ptr [rbp+var_78], xmm0 movss xmm0, dword ptr [rbp+var_8+4] movss xmm1, [rbp+var_58] addss xmm0, xmm1 movss dword ptr [rbp+var_78+4], xmm0 movss xmm1, [rbp+var_1C] movsd xmm0, [rbp+var_78] mov esi, [rbp+var_C] movups xmm2, xmmword ptr [rax] movups xmm3, xmmword ptr [rax+10h] movups xmm4, xmmword ptr [rax+20h] mov rax, rsp movups xmmword ptr [rax+20h], xmm4 movups xmmword ptr [rax+10h], xmm3 movups xmmword ptr [rax], xmm2 call DrawTextCodepoint loc_E5F3B: mov rax, [rbp+var_80] mov rax, [rax+28h] movsxd rcx, [rbp+var_70] imul rcx, 28h ; '(' add rax, rcx cmp dword ptr [rax+0Ch], 0 jnz short loc_E5F8A mov rax, [rbp+var_80] mov rax, [rax+20h] movsxd rcx, [rbp+var_70] shl rcx, 4 add rax, rcx movss xmm0, dword ptr [rax+8] movss xmm2, [rbp+var_60] movss xmm1, [rbp+var_20] mulss xmm0, xmm2 addss xmm0, xmm1 addss xmm0, [rbp+var_5C] movss [rbp+var_5C], xmm0 jmp short loc_E5FBE loc_E5F8A: mov rax, [rbp+var_80] mov rax, [rax+28h] movsxd rcx, [rbp+var_70] imul rcx, 28h ; '(' add rax, rcx cvtsi2ss xmm0, dword ptr [rax+0Ch] movss xmm2, [rbp+var_60] movss xmm1, [rbp+var_20] mulss xmm0, xmm2 addss xmm0, xmm1 addss xmm0, [rbp+var_5C] movss [rbp+var_5C], xmm0 loc_E5FBE: jmp short $+2 loc_E5FC0: mov eax, [rbp+var_68] add eax, [rbp+var_64] mov [rbp+var_64], eax jmp loc_E5E55 loc_E5FCE: add rsp, 0B0h pop rbp retn
long long DrawTextEx( long long a1, int a2, double a3, float a4, float a5, long long a6, long long a7, long long a8, long long a9, long long a10, long long a11, long long a12, long long a13, long long a14, long long a15) { long long result; // rax int v16; // edx int v17; // r8d int v18; // r9d int v19; // edx int v20; // ecx int v21; // r8d int v22; // r9d int GlyphIndex; // [rsp+40h] [rbp-70h] int CodepointNext; // [rsp+44h] [rbp-6Ch] int v25; // [rsp+48h] [rbp-68h] BYREF unsigned int i; // [rsp+4Ch] [rbp-64h] float v27; // [rsp+50h] [rbp-60h] float v28; // [rsp+54h] [rbp-5Ch] float v29; // [rsp+58h] [rbp-58h] int v30; // [rsp+5Ch] [rbp-54h] _BYTE v31[48]; // [rsp+60h] [rbp-50h] BYREF float v32; // [rsp+90h] [rbp-20h] float v33; // [rsp+94h] [rbp-1Ch] long long v34; // [rsp+98h] [rbp-18h] int v35; // [rsp+A4h] [rbp-Ch] double v36; // [rsp+A8h] [rbp-8h] v36 = a3; v35 = a2; v34 = a1; v33 = a4; v32 = a5; if ( !HIDWORD(a11) ) { GetFontDefault((long long)v31); memcpy(&a10, v31, 48LL); } v30 = TextLength(v34); v29 = 0.0; v28 = 0.0; v27 = v33 / (float)(int)a10; for ( i = 0; ; i += v25 ) { result = i; if ( (int)i >= v30 ) break; v25 = 0; CodepointNext = GetCodepointNext((int)i + v34, &v25); GlyphIndex = GetGlyphIndex( CodepointNext, (unsigned int)&v25, v16, CodepointNext, v17, v18, a10, a11, a12, a13, a14, a15); if ( CodepointNext == 10 ) { v29 = (float)(v33 + (float)textLineSpacing) + v29; v28 = 0.0; } else { if ( CodepointNext != 32 && CodepointNext != 9 ) DrawTextCodepoint(CodepointNext, v35, v19, v20, v21, v22, a10); if ( *(_DWORD *)(40LL * GlyphIndex + a15 + 12) ) v28 = (float)((float)((float)*(int *)(40LL * GlyphIndex + a15 + 12) * v27) + v32) + v28; else v28 = (float)((float)(*(float *)(16LL * GlyphIndex + a14 + 8) * v27) + v32) + v28; } } return result; }
DrawTextEx: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x80],RAX MOVLPD qword ptr [RBP + -0x8],XMM0 MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDI MOVSS dword ptr [RBP + -0x1c],XMM1 MOVSS dword ptr [RBP + -0x20],XMM2 CMP dword ptr [RAX + 0xc],0x0 JNZ 0x001e5e1a LEA RDI,[RBP + -0x50] CALL 0x001e1500 MOV RDI,qword ptr [RBP + -0x80] LEA RSI,[RBP + -0x50] MOV EDX,0x30 CALL 0x0010a400 LAB_001e5e1a: MOV RDI,qword ptr [RBP + -0x18] CALL 0x001e5fe0 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x80] MOV dword ptr [RBP + -0x54],ECX XORPS XMM0,XMM0 MOVSS dword ptr [RBP + -0x58],XMM0 XORPS XMM0,XMM0 MOVSS dword ptr [RBP + -0x5c],XMM0 MOVSS XMM0,dword ptr [RBP + -0x1c] CVTSI2SS XMM1,dword ptr [RAX] DIVSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x60],XMM0 MOV dword ptr [RBP + -0x64],0x0 LAB_001e5e55: MOV EAX,dword ptr [RBP + -0x64] CMP EAX,dword ptr [RBP + -0x54] JGE 0x001e5fce MOV dword ptr [RBP + -0x68],0x0 MOV RDI,qword ptr [RBP + -0x18] MOVSXD RAX,dword ptr [RBP + -0x64] ADD RDI,RAX LEA RSI,[RBP + -0x68] CALL 0x001e6020 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x80] MOV dword ptr [RBP + -0x6c],ECX MOV EDI,dword ptr [RBP + -0x6c] MOVUPS XMM0,xmmword ptr [RAX] MOVUPS XMM1,xmmword ptr [RAX + 0x10] MOVUPS XMM2,xmmword ptr [RAX + 0x20] MOV RAX,RSP MOVUPS xmmword ptr [RAX + 0x20],XMM2 MOVUPS xmmword ptr [RAX + 0x10],XMM1 MOVUPS xmmword ptr [RAX],XMM0 CALL 0x001e6220 MOV dword ptr [RBP + -0x70],EAX CMP dword ptr [RBP + -0x6c],0xa JNZ 0x001e5ed7 MOVSS XMM0,dword ptr [RBP + -0x1c] CVTSI2SS XMM1,dword ptr [0x00314164] ADDSS XMM0,XMM1 ADDSS XMM0,dword ptr [RBP + -0x58] MOVSS dword ptr [RBP + -0x58],XMM0 XORPS XMM0,XMM0 MOVSS dword ptr [RBP + -0x5c],XMM0 JMP 0x001e5fc0 LAB_001e5ed7: CMP dword ptr [RBP + -0x6c],0x20 JZ 0x001e5f3b CMP dword ptr [RBP + -0x6c],0x9 JZ 0x001e5f3b MOV RAX,qword ptr [RBP + -0x80] MOV EDI,dword ptr [RBP + -0x6c] MOVSS XMM0,dword ptr [RBP + -0x8] MOVSS XMM1,dword ptr [RBP + -0x5c] ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x78],XMM0 MOVSS XMM0,dword ptr [RBP + -0x4] MOVSS XMM1,dword ptr [RBP + -0x58] ADDSS XMM0,XMM1 MOVSS dword ptr [RBP + -0x74],XMM0 MOVSS XMM1,dword ptr [RBP + -0x1c] MOVSD XMM0,qword ptr [RBP + -0x78] MOV ESI,dword ptr [RBP + -0xc] MOVUPS XMM2,xmmword ptr [RAX] MOVUPS XMM3,xmmword ptr [RAX + 0x10] MOVUPS XMM4,xmmword ptr [RAX + 0x20] MOV RAX,RSP MOVUPS xmmword ptr [RAX + 0x20],XMM4 MOVUPS xmmword ptr [RAX + 0x10],XMM3 MOVUPS xmmword ptr [RAX],XMM2 CALL 0x001e62c0 LAB_001e5f3b: MOV RAX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RAX + 0x28] MOVSXD RCX,dword ptr [RBP + -0x70] IMUL RCX,RCX,0x28 ADD RAX,RCX CMP dword ptr [RAX + 0xc],0x0 JNZ 0x001e5f8a MOV RAX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RAX + 0x20] MOVSXD RCX,dword ptr [RBP + -0x70] SHL RCX,0x4 ADD RAX,RCX MOVSS XMM0,dword ptr [RAX + 0x8] MOVSS XMM2,dword ptr [RBP + -0x60] MOVSS XMM1,dword ptr [RBP + -0x20] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 ADDSS XMM0,dword ptr [RBP + -0x5c] MOVSS dword ptr [RBP + -0x5c],XMM0 JMP 0x001e5fbe LAB_001e5f8a: MOV RAX,qword ptr [RBP + -0x80] MOV RAX,qword ptr [RAX + 0x28] MOVSXD RCX,dword ptr [RBP + -0x70] IMUL RCX,RCX,0x28 ADD RAX,RCX CVTSI2SS XMM0,dword ptr [RAX + 0xc] MOVSS XMM2,dword ptr [RBP + -0x60] MOVSS XMM1,dword ptr [RBP + -0x20] MULSS XMM0,XMM2 ADDSS XMM0,XMM1 ADDSS XMM0,dword ptr [RBP + -0x5c] MOVSS dword ptr [RBP + -0x5c],XMM0 LAB_001e5fbe: JMP 0x001e5fc0 LAB_001e5fc0: MOV EAX,dword ptr [RBP + -0x68] ADD EAX,dword ptr [RBP + -0x64] MOV dword ptr [RBP + -0x64],EAX JMP 0x001e5e55 LAB_001e5fce: ADD RSP,0xb0 POP RBP RET
void DrawTextEx(int8 param_1,float param_2,float param_3,long param_4,int4 param_5) { int iVar1; int iVar2; float fVar3; int in_stack_00000008; int8 in_stack_00000010; long in_stack_00000028; long in_stack_00000030; int local_70; int local_6c; float local_68; float local_64; float local_60; int local_5c; int1 local_58 [48]; float local_28; float local_24; long local_20; int4 local_14; int8 local_10; local_28 = param_3; local_24 = param_2; local_20 = param_4; local_14 = param_5; local_10 = param_1; if (in_stack_00000010._4_4_ == 0) { GetFontDefault(local_58); memcpy(&stack0x00000008,local_58,0x30); } local_5c = TextLength(local_20); local_60 = 0.0; local_64 = 0.0; local_68 = local_24 / (float)in_stack_00000008; for (local_6c = 0; local_6c < local_5c; local_6c = local_70 + local_6c) { local_70 = 0; iVar1 = GetCodepointNext(local_20 + local_6c,&local_70); iVar2 = GetGlyphIndex(iVar1); if (iVar1 == 10) { local_60 = local_24 + (float)textLineSpacing + local_60; local_64 = 0.0; } else { if ((iVar1 != 0x20) && (iVar1 != 9)) { DrawTextCodepoint((float)local_10 + local_64,local_24,iVar1,local_14); } if (*(int *)(in_stack_00000030 + (long)iVar2 * 0x28 + 0xc) == 0) { fVar3 = *(float *)(in_stack_00000028 + (long)iVar2 * 0x10 + 8); } else { fVar3 = (float)*(int *)(in_stack_00000030 + (long)iVar2 * 0x28 + 0xc); } local_64 = fVar3 * local_68 + local_28 + local_64; } } return; }
46,721
DrawTextEx
csit-sgu[P]mit-game-2025_1/Libraries/raylib/src/rtext.c
void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint) { if (font.texture.id == 0) font = GetFontDefault(); // Security check in case of not valid font int size = TextLength(text); // Total size in bytes of the text, scanned by codepoints in loop float textOffsetY = 0; // Offset between lines (on linebreak '\n') float textOffsetX = 0.0f; // Offset X to next character to draw float scaleFactor = fontSize/font.baseSize; // Character quad scaling factor for (int i = 0; i < size;) { // Get next codepoint from byte string and glyph index in font int codepointByteCount = 0; int codepoint = GetCodepointNext(&text[i], &codepointByteCount); int index = GetGlyphIndex(font, codepoint); if (codepoint == '\n') { // NOTE: Line spacing is a global variable, use SetTextLineSpacing() to setup textOffsetY += (fontSize + textLineSpacing); textOffsetX = 0.0f; } else { if ((codepoint != ' ') && (codepoint != '\t')) { DrawTextCodepoint(font, codepoint, (Vector2){ position.x + textOffsetX, position.y + textOffsetY }, fontSize, tint); } if (font.glyphs[index].advanceX == 0) textOffsetX += ((float)font.recs[index].width*scaleFactor + spacing); else textOffsetX += ((float)font.glyphs[index].advanceX*scaleFactor + spacing); } i += codepointByteCount; // Move text bytes counter to next codepoint } }
O1
c
DrawTextEx: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movl %esi, 0x54(%rsp) movss %xmm2, 0x4c(%rsp) movss %xmm1, 0x40(%rsp) movaps %xmm0, 0x60(%rsp) movq %rdi, %r14 leaq 0xc0(%rsp), %rax cmpl $0x0, 0xc(%rax) jne 0x8a261 movups 0xbd6c8(%rip), %xmm0 # 0x147910 movups %xmm0, 0x20(%rax) movups 0xbd6ad(%rip), %xmm0 # 0x147900 movups %xmm0, 0x10(%rax) movups 0xbd692(%rip), %xmm0 # 0x1478f0 movups %xmm0, (%rax) xorl %r13d, %r13d testq %r14, %r14 je 0x8a27e cmpb $0x0, (%r14) je 0x8a27e xorl %r13d, %r13d cmpb $0x0, 0x1(%r14,%r13) leaq 0x1(%r13), %r13 jne 0x8a272 testl %r13d, %r13d jle 0x8a415 leaq 0xc0(%rsp), %rax xorps %xmm0, %xmm0 cvtsi2ssl (%rax), %xmm0 movss 0x40(%rsp), %xmm1 divss %xmm0, %xmm1 movss %xmm1, 0x48(%rsp) movl 0x4(%rax), %ebp movq 0x28(%rax), %rbx movaps 0x60(%rsp), %xmm0 shufps $0x55, %xmm0, %xmm0 # xmm0 = xmm0[1,1,1,1] movaps %xmm0, 0x70(%rsp) movq 0x20(%rax), %rax movq %rax, 0x58(%rsp) xorps %xmm0, %xmm0 movss %xmm0, 0x44(%rsp) movss %xmm0, 0x3c(%rsp) xorl %r12d, %r12d movl $0x0, 0x50(%rsp) movslq %r12d, %rdi addq %r14, %rdi leaq 0x50(%rsp), %rsi callq 0x8a441 movl $0x0, %r15d movl $0x0, %ecx testl %ebp, %ebp jle 0x8a325 xorl %r15d, %r15d movq %rbx, %rdx xorl %ecx, %ecx movl %ecx, %esi movl (%rdx), %edi cmpl $0x3f, %edi movl %r15d, %ecx cmovnel %esi, %ecx cmpl %eax, %edi je 0x8a325 incq %r15 addq $0x28, %rdx cmpq %r15, %rbp jne 0x8a305 xorl %r15d, %r15d testl %r15d, %r15d jne 0x8a337 cmpl %eax, (%rbx) movl $0x0, %edx cmovel %edx, %ecx movl %ecx, %r15d cmpl $0x9, %eax je 0x8a3c4 cmpl $0x20, %eax je 0x8a3c4 cmpl $0xa, %eax jne 0x8a379 xorps %xmm0, %xmm0 cvtsi2ssl 0xb2573(%rip), %xmm0 # 0x13c8c8 addss 0x40(%rsp), %xmm0 movss 0x44(%rsp), %xmm1 addss %xmm0, %xmm1 movss %xmm1, 0x44(%rsp) xorps %xmm0, %xmm0 movss %xmm0, 0x3c(%rsp) jmp 0x8a407 movaps 0x60(%rsp), %xmm0 addss 0x3c(%rsp), %xmm0 movaps 0x70(%rsp), %xmm1 addss 0x44(%rsp), %xmm1 unpcklps %xmm1, %xmm0 # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1] leaq 0xc0(%rsp), %rcx movups (%rcx), %xmm1 movups 0x10(%rcx), %xmm2 movups 0x20(%rcx), %xmm3 movups %xmm3, 0x20(%rsp) movups %xmm2, 0x10(%rsp) movups %xmm1, (%rsp) movl %eax, %edi movss 0x40(%rsp), %xmm1 movl 0x54(%rsp), %esi callq 0x8a5c7 movslq %r15d, %rax leaq (%rax,%rax,4), %rcx movl 0xc(%rbx,%rcx,8), %ecx testl %ecx, %ecx je 0x8a3dc xorps %xmm0, %xmm0 cvtsi2ss %ecx, %xmm0 jmp 0x8a3eb shlq $0x4, %rax movq 0x58(%rsp), %rcx movss 0x8(%rcx,%rax), %xmm0 mulss 0x48(%rsp), %xmm0 addss 0x4c(%rsp), %xmm0 movss 0x3c(%rsp), %xmm1 addss %xmm0, %xmm1 movss %xmm1, 0x3c(%rsp) addl 0x50(%rsp), %r12d cmpl %r13d, %r12d jl 0x8a2d6 addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
DrawTextEx: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov [rsp+0B8h+var_64], esi movss [rsp+0B8h+var_6C], xmm2 movss [rsp+0B8h+var_78], xmm1 movaps [rsp+0B8h+var_58], xmm0 mov r14, rdi lea rax, [rsp+0B8h+arg_0] cmp dword ptr [rax+0Ch], 0 jnz short loc_8A261 movups xmm0, cs:xmmword_147910 movups xmmword ptr [rax+20h], xmm0 movups xmm0, cs:xmmword_147900 movups xmmword ptr [rax+10h], xmm0 movups xmm0, cs:defaultFont movups xmmword ptr [rax], xmm0 loc_8A261: xor r13d, r13d test r14, r14 jz short loc_8A27E cmp byte ptr [r14], 0 jz short loc_8A27E xor r13d, r13d loc_8A272: cmp byte ptr [r14+r13+1], 0 lea r13, [r13+1] jnz short loc_8A272 loc_8A27E: test r13d, r13d jle loc_8A415 lea rax, [rsp+0B8h+arg_0] xorps xmm0, xmm0 cvtsi2ss xmm0, dword ptr [rax] movss xmm1, [rsp+0B8h+var_78] divss xmm1, xmm0 movss [rsp+0B8h+var_70], xmm1 mov ebp, [rax+4] mov rbx, [rax+28h] movaps xmm0, [rsp+0B8h+var_58] shufps xmm0, xmm0, 55h ; 'U' movaps [rsp+0B8h+var_48], xmm0 mov rax, [rax+20h] mov [rsp+0B8h+var_60], rax xorps xmm0, xmm0 movss [rsp+0B8h+var_74], xmm0 movss [rsp+0B8h+var_7C], xmm0 xor r12d, r12d loc_8A2D6: mov [rsp+0B8h+var_68], 0 movsxd rdi, r12d add rdi, r14 lea rsi, [rsp+0B8h+var_68] call GetCodepointNext mov r15d, 0 mov ecx, 0 test ebp, ebp jle short loc_8A325 xor r15d, r15d mov rdx, rbx xor ecx, ecx loc_8A305: mov esi, ecx mov edi, [rdx] cmp edi, 3Fh ; '?' mov ecx, r15d cmovnz ecx, esi cmp edi, eax jz short loc_8A325 inc r15 add rdx, 28h ; '(' cmp rbp, r15 jnz short loc_8A305 xor r15d, r15d loc_8A325: test r15d, r15d jnz short loc_8A337 cmp [rbx], eax mov edx, 0 cmovz ecx, edx mov r15d, ecx loc_8A337: cmp eax, 9 jz loc_8A3C4 cmp eax, 20h ; ' ' jz short loc_8A3C4 cmp eax, 0Ah jnz short loc_8A379 xorps xmm0, xmm0 cvtsi2ss xmm0, cs:textLineSpacing addss xmm0, [rsp+0B8h+var_78] movss xmm1, [rsp+0B8h+var_74] addss xmm1, xmm0 movss [rsp+0B8h+var_74], xmm1 xorps xmm0, xmm0 movss [rsp+0B8h+var_7C], xmm0 jmp loc_8A407 loc_8A379: movaps xmm0, [rsp+0B8h+var_58] addss xmm0, [rsp+0B8h+var_7C] movaps xmm1, [rsp+0B8h+var_48] addss xmm1, [rsp+0B8h+var_74] unpcklps xmm0, xmm1 lea rcx, [rsp+0B8h+arg_0] movups xmm1, xmmword ptr [rcx] movups xmm2, xmmword ptr [rcx+10h] movups xmm3, xmmword ptr [rcx+20h] movups [rsp+0B8h+var_98], xmm3 movups [rsp+0B8h+var_A8], xmm2 movups [rsp+0B8h+var_B8], xmm1 mov edi, eax movss xmm1, [rsp+0B8h+var_78] mov esi, [rsp+0B8h+var_64] call DrawTextCodepoint loc_8A3C4: movsxd rax, r15d lea rcx, [rax+rax*4] mov ecx, [rbx+rcx*8+0Ch] test ecx, ecx jz short loc_8A3DC xorps xmm0, xmm0 cvtsi2ss xmm0, ecx jmp short loc_8A3EB loc_8A3DC: shl rax, 4 mov rcx, [rsp+0B8h+var_60] movss xmm0, dword ptr [rcx+rax+8] loc_8A3EB: mulss xmm0, [rsp+0B8h+var_70] addss xmm0, [rsp+0B8h+var_6C] movss xmm1, [rsp+0B8h+var_7C] addss xmm1, xmm0 movss [rsp+0B8h+var_7C], xmm1 loc_8A407: add r12d, [rsp+0B8h+var_68] cmp r12d, r13d jl loc_8A2D6 loc_8A415: add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long DrawTextEx( _BYTE *a1, int a2, __m128 a3, float a4, float a5, long long a6, long long a7, long long a8, long long a9, __int128 a10, __int128 a11, __int128 a12) { long long result; // rax long long v13; // r13 long long v15; // rbp _DWORD *v16; // rbx int v17; // r12d _DWORD *v18; // rdx int v19; // r8d int v20; // r9d long long v21; // r15 int v22; // ecx int v23; // esi int v24; // ecx float v25; // xmm0_4 float v26; // [rsp+3Ch] [rbp-7Ch] float v27; // [rsp+44h] [rbp-74h] float v28; // [rsp+48h] [rbp-70h] int v29; // [rsp+50h] [rbp-68h] BYREF int v30; // [rsp+54h] [rbp-64h] long long v31; // [rsp+58h] [rbp-60h] __m128 v32; // [rsp+60h] [rbp-58h] __m128 v33; // [rsp+70h] [rbp-48h] v30 = a2; v32 = a3; result = (long long)&a10; if ( !HIDWORD(a10) ) { a12 = xmmword_147910; a11 = xmmword_147900; a10 = defaultFont; } LODWORD(v13) = 0; if ( a1 && *a1 ) { v13 = 0LL; while ( a1[++v13] != 0 ) ; } if ( (int)v13 > 0 ) { v28 = a4 / (float)(int)a10; v15 = DWORD1(a10); v16 = (_DWORD *)*((_QWORD *)&a12 + 1); v33 = _mm_shuffle_ps(v32, v32, 85); v31 = a12; v27 = 0.0; v26 = 0.0; v17 = 0; while ( 1 ) { v29 = 0; result = GetCodepointNext(&a1[v17], &v29); LODWORD(v21) = 0; v22 = 0; if ( (int)v15 > 0 ) { v21 = 0LL; v18 = v16; v22 = 0; while ( 1 ) { v23 = v22; v22 = v21; if ( *v18 != 63 ) v22 = v23; if ( *v18 == (_DWORD)result ) break; ++v21; v18 += 10; if ( v15 == v21 ) { LODWORD(v21) = 0; break; } } } if ( !(_DWORD)v21 ) { LODWORD(v18) = 0; if ( *v16 == (_DWORD)result ) v22 = 0; LODWORD(v21) = v22; } if ( (_DWORD)result == 9 || (_DWORD)result == 32 ) goto LABEL_25; if ( (_DWORD)result != 10 ) break; v27 = v27 + (float)((float)textLineSpacing + a4); v26 = 0.0; LABEL_29: v17 += v29; if ( v17 >= (int)v13 ) return result; } DrawTextCodepoint(result, v30, (_DWORD)v18, (unsigned int)&a10, v19, v20, a10); LABEL_25: result = (int)v21; v24 = v16[10 * (int)v21 + 3]; if ( v24 ) { v25 = (float)v24; } else { result = 16LL * (int)v21; v25 = *(float *)(v31 + result + 8); } v26 = v26 + (float)((float)(v25 * v28) + a5); goto LABEL_29; } return result; }
DrawTextEx: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV dword ptr [RSP + 0x54],ESI MOVSS dword ptr [RSP + 0x4c],XMM2 MOVSS dword ptr [RSP + 0x40],XMM1 MOVAPS xmmword ptr [RSP + 0x60],XMM0 MOV R14,RDI LEA RAX,[RSP + 0xc0] CMP dword ptr [RAX + 0xc],0x0 JNZ 0x0018a261 MOVUPS XMM0,xmmword ptr [0x00247910] MOVUPS xmmword ptr [RAX + 0x20],XMM0 MOVUPS XMM0,xmmword ptr [0x00247900] MOVUPS xmmword ptr [RAX + 0x10],XMM0 MOVUPS XMM0,xmmword ptr [0x002478f0] MOVUPS xmmword ptr [RAX],XMM0 LAB_0018a261: XOR R13D,R13D TEST R14,R14 JZ 0x0018a27e CMP byte ptr [R14],0x0 JZ 0x0018a27e XOR R13D,R13D LAB_0018a272: CMP byte ptr [R14 + R13*0x1 + 0x1],0x0 LEA R13,[R13 + 0x1] JNZ 0x0018a272 LAB_0018a27e: TEST R13D,R13D JLE 0x0018a415 LEA RAX,[RSP + 0xc0] XORPS XMM0,XMM0 CVTSI2SS XMM0,dword ptr [RAX] MOVSS XMM1,dword ptr [RSP + 0x40] DIVSS XMM1,XMM0 MOVSS dword ptr [RSP + 0x48],XMM1 MOV EBP,dword ptr [RAX + 0x4] MOV RBX,qword ptr [RAX + 0x28] MOVAPS XMM0,xmmword ptr [RSP + 0x60] SHUFPS XMM0,XMM0,0x55 MOVAPS xmmword ptr [RSP + 0x70],XMM0 MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x58],RAX XORPS XMM0,XMM0 MOVSS dword ptr [RSP + 0x44],XMM0 MOVSS dword ptr [RSP + 0x3c],XMM0 XOR R12D,R12D LAB_0018a2d6: MOV dword ptr [RSP + 0x50],0x0 MOVSXD RDI,R12D ADD RDI,R14 LEA RSI,[RSP + 0x50] CALL 0x0018a441 MOV R15D,0x0 MOV ECX,0x0 TEST EBP,EBP JLE 0x0018a325 XOR R15D,R15D MOV RDX,RBX XOR ECX,ECX LAB_0018a305: MOV ESI,ECX MOV EDI,dword ptr [RDX] CMP EDI,0x3f MOV ECX,R15D CMOVNZ ECX,ESI CMP EDI,EAX JZ 0x0018a325 INC R15 ADD RDX,0x28 CMP RBP,R15 JNZ 0x0018a305 XOR R15D,R15D LAB_0018a325: TEST R15D,R15D JNZ 0x0018a337 CMP dword ptr [RBX],EAX MOV EDX,0x0 CMOVZ ECX,EDX MOV R15D,ECX LAB_0018a337: CMP EAX,0x9 JZ 0x0018a3c4 CMP EAX,0x20 JZ 0x0018a3c4 CMP EAX,0xa JNZ 0x0018a379 XORPS XMM0,XMM0 CVTSI2SS XMM0,dword ptr [0x0023c8c8] ADDSS XMM0,dword ptr [RSP + 0x40] MOVSS XMM1,dword ptr [RSP + 0x44] ADDSS XMM1,XMM0 MOVSS dword ptr [RSP + 0x44],XMM1 XORPS XMM0,XMM0 MOVSS dword ptr [RSP + 0x3c],XMM0 JMP 0x0018a407 LAB_0018a379: MOVAPS XMM0,xmmword ptr [RSP + 0x60] ADDSS XMM0,dword ptr [RSP + 0x3c] MOVAPS XMM1,xmmword ptr [RSP + 0x70] ADDSS XMM1,dword ptr [RSP + 0x44] UNPCKLPS XMM0,XMM1 LEA RCX,[RSP + 0xc0] MOVUPS XMM1,xmmword ptr [RCX] MOVUPS XMM2,xmmword ptr [RCX + 0x10] MOVUPS XMM3,xmmword ptr [RCX + 0x20] MOVUPS xmmword ptr [RSP + 0x20],XMM3 MOVUPS xmmword ptr [RSP + 0x10],XMM2 MOVUPS xmmword ptr [RSP],XMM1 MOV EDI,EAX MOVSS XMM1,dword ptr [RSP + 0x40] MOV ESI,dword ptr [RSP + 0x54] CALL 0x0018a5c7 LAB_0018a3c4: MOVSXD RAX,R15D LEA RCX,[RAX + RAX*0x4] MOV ECX,dword ptr [RBX + RCX*0x8 + 0xc] TEST ECX,ECX JZ 0x0018a3dc XORPS XMM0,XMM0 CVTSI2SS XMM0,ECX JMP 0x0018a3eb LAB_0018a3dc: SHL RAX,0x4 MOV RCX,qword ptr [RSP + 0x58] MOVSS XMM0,dword ptr [RCX + RAX*0x1 + 0x8] LAB_0018a3eb: MULSS XMM0,dword ptr [RSP + 0x48] ADDSS XMM0,dword ptr [RSP + 0x4c] MOVSS XMM1,dword ptr [RSP + 0x3c] ADDSS XMM1,XMM0 MOVSS dword ptr [RSP + 0x3c],XMM1 LAB_0018a407: ADD R12D,dword ptr [RSP + 0x50] CMP R12D,R13D JL 0x0018a2d6 LAB_0018a415: ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void DrawTextEx(float param_1,float param_2,float param_3,char *param_4,int4 param_5) { long lVar1; int iVar2; int iVar3; ulong uVar4; ulong uVar5; int *piVar6; int iVar7; long lVar8; int iVar9; ulong uVar10; float fVar11; int iStack0000000000000008; uint uStack000000000000000c; int8 in_stack_00000010; long in_stack_00000028; int *in_stack_00000030; float local_7c; int local_68; int4 local_64; long local_60; float local_58; if (in_stack_00000010._4_4_ == 0) { in_stack_00000028 = defaultFont._32_8_; in_stack_00000030 = (int *)defaultFont._40_8_; _iStack0000000000000008 = defaultFont._0_8_; } lVar8 = 0; if ((param_4 != (char *)0x0) && (*param_4 != '\0')) { lVar8 = 0; do { lVar1 = lVar8 + 1; lVar8 = lVar8 + 1; } while (param_4[lVar1] != '\0'); } if (0 < (int)lVar8) { local_60 = in_stack_00000028; local_7c = 0.0; iVar7 = 0; local_64 = param_5; local_58 = param_1; do { local_68 = 0; iVar2 = GetCodepointNext(param_4 + iVar7,&local_68); uVar10 = 0; iVar3 = 0; if (0 < (int)uStack000000000000000c) { uVar10 = 0; uVar4 = 0; piVar6 = in_stack_00000030; do { uVar5 = uVar10 & 0xffffffff; if (*piVar6 != 0x3f) { uVar5 = uVar4; } iVar3 = (int)uVar5; if (*piVar6 == iVar2) goto LAB_0018a325; uVar10 = uVar10 + 1; piVar6 = piVar6 + 10; uVar4 = uVar5; } while (uStack000000000000000c != uVar10); uVar10 = 0; } LAB_0018a325: iVar9 = (int)uVar10; if (((int)uVar10 == 0) && (iVar9 = iVar3, *in_stack_00000030 == iVar2)) { iVar9 = 0; } if ((iVar2 == 9) || (iVar2 == 0x20)) { LAB_0018a3c4: if (in_stack_00000030[(long)iVar9 * 10 + 3] == 0) { fVar11 = *(float *)(local_60 + 8 + (long)iVar9 * 0x10); } else { fVar11 = (float)in_stack_00000030[(long)iVar9 * 10 + 3]; } local_7c = local_7c + fVar11 * (param_2 / (float)iStack0000000000000008) + param_3; } else { if (iVar2 != 10) { DrawTextCodepoint(local_58 + local_7c,param_2,iVar2,local_64); goto LAB_0018a3c4; } local_7c = 0.0; } iVar7 = iVar7 + local_68; } while (iVar7 < (int)lVar8); } return; }
46,722
ma_check_print_warning
eloqsql/storage/maria/unittest/../ma_check_standalone.h
void _ma_check_print_warning(HA_CHECK *param, const char *fmt,...) { va_list args; DBUG_ENTER("_ma_check_print_warning"); DBUG_PRINT("enter", ("format: %s", fmt)); fflush(stdout); if (!param->warning_printed && !param->error_printed) { if (param->testflag & T_SILENT) fprintf(stderr,"%s: Aria file %s\n",my_progname_short, param->isam_file_name); param->out_flag|= O_DATA_LOST; } param->warning_printed++; va_start(args,fmt); fprintf(stderr,"%s: warning: ",my_progname_short); vfprintf(stderr, fmt, args); fputc('\n',stderr); fflush(stderr); va_end(args); DBUG_VOID_RETURN; }
O3
c
ma_check_print_warning: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xc8, %rsp movq %rsi, %rbx movq %rdi, %r14 movq %rdx, -0xd0(%rbp) movq %rcx, -0xc8(%rbp) movq %r8, -0xc0(%rbp) movq %r9, -0xb8(%rbp) testb %al, %al je 0x33298 movaps %xmm0, -0xb0(%rbp) movaps %xmm1, -0xa0(%rbp) movaps %xmm2, -0x90(%rbp) movaps %xmm3, -0x80(%rbp) movaps %xmm4, -0x70(%rbp) movaps %xmm5, -0x60(%rbp) movaps %xmm6, -0x50(%rbp) movaps %xmm7, -0x40(%rbp) movq 0x359cf9(%rip), %rax # 0x38cf98 movq (%rax), %rdi callq 0x2a430 movb 0x209a2(%r14), %al testb %al, %al jne 0x33307 cmpl $0x0, 0x2096c(%r14) je 0x332c0 xorl %eax, %eax jmp 0x33307 testb $0x40, 0xb12(%r14) jne 0x332ce xorl %eax, %eax jmp 0x332ff movq 0x359ccb(%rip), %rax # 0x38cfa0 movq (%rax), %rdi leaq 0xbddcd9(%rip), %rax # 0xc10fb8 movq (%rax), %rcx movq (%r14), %r8 leaq 0xad657(%rip), %rdx # 0xe0943 movl $0x1, %esi xorl %eax, %eax callq 0x2a200 movb 0x209a2(%r14), %al orb $0x4, 0x20968(%r14) incb %al movb %al, 0x209a2(%r14) leaq -0xe0(%rbp), %rax leaq -0x30(%rbp), %r14 movq %rax, 0x10(%r14) leaq 0x10(%rbp), %rax movq %rax, 0x8(%r14) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%r14) movq 0x359c65(%rip), %r15 # 0x38cfa0 movq (%r15), %rdi leaq 0xbddc73(%rip), %rax # 0xc10fb8 movq (%rax), %rcx leaq 0xad606(%rip), %rdx # 0xe0955 movl $0x1, %esi xorl %eax, %eax callq 0x2a200 movq (%r15), %rdi movl $0x1, %esi movq %rbx, %rdx movq %r14, %rcx callq 0x2a7c0 movq (%r15), %rsi movl $0xa, %edi callq 0x2a740 movq (%r15), %rdi callq 0x2a430 addq $0xc8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
_ma_check_print_warning: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 0C8h mov rbx, rsi mov r14, rdi mov [rbp+var_D0], rdx mov [rbp+var_C8], rcx mov [rbp+var_C0], r8 mov [rbp+var_B8], r9 test al, al jz short loc_33298 movaps [rbp+var_B0], xmm0 movaps [rbp+var_A0], xmm1 movaps [rbp+var_90], xmm2 movaps [rbp+var_80], xmm3 movaps [rbp+var_70], xmm4 movaps [rbp+var_60], xmm5 movaps [rbp+var_50], xmm6 movaps [rbp+var_40], xmm7 loc_33298: mov rax, cs:stdout_ptr mov rdi, [rax] call _fflush mov al, [r14+209A2h] test al, al jnz short loc_33307 cmp dword ptr [r14+2096Ch], 0 jz short loc_332C0 xor eax, eax jmp short loc_33307 loc_332C0: test byte ptr [r14+0B12h], 40h jnz short loc_332CE xor eax, eax jmp short loc_332FF loc_332CE: mov rax, cs:stderr_ptr mov rdi, [rax] lea rax, my_progname_short mov rcx, [rax] mov r8, [r14] lea rdx, aSAriaFileS; "%s: Aria file %s\n" mov esi, 1 xor eax, eax call ___fprintf_chk mov al, [r14+209A2h] loc_332FF: or byte ptr ds:stru_20968.r_offset[r14], 4 loc_33307: inc al mov [r14+209A2h], al lea rax, [rbp+var_E0] lea r14, [rbp+var_30] mov [r14+10h], rax lea rax, [rbp+arg_0] mov [r14+8], rax mov rax, 3000000010h mov [r14], rax mov r15, cs:stderr_ptr mov rdi, [r15] lea rax, my_progname_short mov rcx, [rax] lea rdx, aSWarning; "%s: warning: " mov esi, 1 xor eax, eax call ___fprintf_chk mov rdi, [r15] mov esi, 1 mov rdx, rbx mov rcx, r14 call ___vfprintf_chk mov rsi, [r15] mov edi, 0Ah call _fputc mov rdi, [r15] call _fflush add rsp, 0C8h pop rbx pop r14 pop r15 pop rbp retn
long long ma_check_print_warning(long long a1, long long a2, ...) { char v2; // al va_list va; // [rsp+B0h] [rbp-30h] BYREF fflush(stdout); v2 = *(_BYTE *)(a1 + 133538); if ( !v2 ) { if ( *(_DWORD *)(a1 + 133484) ) { v2 = 0; } else { if ( (*(_BYTE *)(a1 + 2834) & 0x40) != 0 ) { __fprintf_chk(stderr, 1LL, "%s: Aria file %s\n", my_progname_short, *(const char **)a1); v2 = *(_BYTE *)(a1 + 133538); } else { v2 = 0; } *((_BYTE *)&stru_20968.r_offset + a1) |= 4u; } } *(_BYTE *)(a1 + 133538) = v2 + 1; va_start(va, a2); __fprintf_chk(stderr, 1LL, "%s: warning: ", my_progname_short); __vfprintf_chk(stderr, 1LL, a2, va); fputc(10LL, stderr); return fflush(stderr); }
_ma_check_print_warning: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xc8 MOV RBX,RSI MOV R14,RDI MOV qword ptr [RBP + -0xd0],RDX MOV qword ptr [RBP + -0xc8],RCX MOV qword ptr [RBP + -0xc0],R8 MOV qword ptr [RBP + -0xb8],R9 TEST AL,AL JZ 0x00133298 MOVAPS xmmword ptr [RBP + -0xb0],XMM0 MOVAPS xmmword ptr [RBP + -0xa0],XMM1 MOVAPS xmmword ptr [RBP + -0x90],XMM2 MOVAPS xmmword ptr [RBP + -0x80],XMM3 MOVAPS xmmword ptr [RBP + -0x70],XMM4 MOVAPS xmmword ptr [RBP + -0x60],XMM5 MOVAPS xmmword ptr [RBP + -0x50],XMM6 MOVAPS xmmword ptr [RBP + -0x40],XMM7 LAB_00133298: MOV RAX,qword ptr [0x0048cf98] MOV RDI,qword ptr [RAX] CALL 0x0012a430 MOV AL,byte ptr [R14 + 0x209a2] TEST AL,AL JNZ 0x00133307 CMP dword ptr [R14 + 0x2096c],0x0 JZ 0x001332c0 XOR EAX,EAX JMP 0x00133307 LAB_001332c0: TEST byte ptr [R14 + 0xb12],0x40 JNZ 0x001332ce XOR EAX,EAX JMP 0x001332ff LAB_001332ce: MOV RAX,qword ptr [0x0048cfa0] MOV RDI,qword ptr [RAX] LEA RAX,[0xd10fb8] MOV RCX,qword ptr [RAX] MOV R8,qword ptr [R14] LEA RDX,[0x1e0943] MOV ESI,0x1 XOR EAX,EAX CALL 0x0012a200 MOV AL,byte ptr [R14 + 0x209a2] LAB_001332ff: OR byte ptr [R14 + 0x20968],0x4 LAB_00133307: INC AL MOV byte ptr [R14 + 0x209a2],AL LEA RAX,[RBP + -0xe0] LEA R14,[RBP + -0x30] MOV qword ptr [R14 + 0x10],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [R14 + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [R14],RAX MOV R15,qword ptr [0x0048cfa0] MOV RDI,qword ptr [R15] LEA RAX,[0xd10fb8] MOV RCX,qword ptr [RAX] LEA RDX,[0x1e0955] MOV ESI,0x1 XOR EAX,EAX CALL 0x0012a200 MOV RDI,qword ptr [R15] MOV ESI,0x1 MOV RDX,RBX MOV RCX,R14 CALL 0x0012a7c0 MOV RSI,qword ptr [R15] MOV EDI,0xa CALL 0x0012a740 MOV RDI,qword ptr [R15] CALL 0x0012a430 ADD RSP,0xc8 POP RBX POP R14 POP R15 POP RBP RET
void _ma_check_print_warning (int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int8 *param_9,int8 param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { int *puVar1; char in_AL; char cVar2; int1 local_e8 [16]; int8 local_d8; int8 local_d0; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; int1 *local_30; int1 *local_28; if (in_AL != '\0') { local_b8 = param_1; local_a8 = param_2; local_98 = param_3; local_88 = param_4; local_78 = param_5; local_68 = param_6; local_58 = param_7; local_48 = param_8; } local_d8 = param_11; local_d0 = param_12; local_c8 = param_13; local_c0 = param_14; fflush(*(FILE **)PTR_stdout_0048cf98); cVar2 = *(char *)((long)param_9 + 0x209a2); if (cVar2 == '\0') { if (*(int *)((long)param_9 + 0x2096c) == 0) { if ((*(byte *)((long)param_9 + 0xb12) & 0x40) == 0) { cVar2 = '\0'; } else { __fprintf_chk(*(int8 *)PTR_stderr_0048cfa0,1,"%s: Aria file %s\n",my_progname_short, *param_9); cVar2 = *(char *)((long)param_9 + 0x209a2); } *(byte *)(param_9 + 0x412d) = *(byte *)(param_9 + 0x412d) | 4; } else { cVar2 = '\0'; } } *(char *)((long)param_9 + 0x209a2) = cVar2 + '\x01'; puVar1 = PTR_stderr_0048cfa0; local_28 = local_e8; local_30 = &stack0x00000008; local_38 = 0x3000000010; __fprintf_chk(*(int8 *)PTR_stderr_0048cfa0,1,"%s: warning: ",my_progname_short); __vfprintf_chk(*(int8 *)puVar1,1,param_10,&local_38); fputc(10,*(FILE **)puVar1); fflush(*(FILE **)puVar1); return; }
46,723
mi_read_key_record
eloqsql/storage/myisam/mi_key.c
int _mi_read_key_record(MI_INFO *info, my_off_t filepos, uchar *buf) { fast_mi_writeinfo(info); if (filepos != HA_OFFSET_ERROR) { if (info->lastinx >= 0) { /* Read only key */ if (_mi_put_key_in_record(info,(uint) info->lastinx, TRUE, buf)) { mi_print_error(info->s, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; return -1; } info->update|= HA_STATE_AKTIV; /* We should find a record */ return 0; } my_errno=HA_ERR_WRONG_INDEX; } return(-1); /* Wrong data to read */ }
O3
c
mi_read_key_record: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r14 movq (%rdi), %rax cmpl $0x0, 0x368(%rax) jne 0x819fd movq %r14, %rdi xorl %esi, %esi callq 0x82be6 movl $0xffffffff, %ebx # imm = 0xFFFFFFFF cmpq $-0x1, %r12 je 0x81a5f movl 0x1d4(%r14), %esi testl %esi, %esi js 0x81a48 movq %r14, %rdi movl $0x1, %edx movq %r15, %rcx callq 0x81a6a testl %eax, %eax je 0x81a55 movq (%r14), %rax movq 0x268(%rax), %rsi movl $0x7e, %edi callq 0x8121e callq 0xa7c22 movl $0x7e, (%rax) jmp 0x81a5f callq 0xa7c22 movl $0x7c, (%rax) jmp 0x81a5f orb $0x2, 0x1d0(%r14) xorl %ebx, %ebx movl %ebx, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
_mi_read_key_record: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r15, rdx mov r12, rsi mov r14, rdi mov rax, [rdi] cmp dword ptr [rax+368h], 0 jnz short loc_819FD mov rdi, r14 xor esi, esi call _mi_writeinfo loc_819FD: mov ebx, 0FFFFFFFFh cmp r12, 0FFFFFFFFFFFFFFFFh jz short loc_81A5F mov esi, [r14+1D4h] test esi, esi js short loc_81A48 mov rdi, r14 mov edx, 1 mov rcx, r15 call _mi_put_key_in_record test eax, eax jz short loc_81A55 mov rax, [r14] mov rsi, [rax+268h] mov edi, 7Eh ; '~' call mi_report_error call _my_thread_var mov dword ptr [rax], 7Eh ; '~' jmp short loc_81A5F loc_81A48: call _my_thread_var mov dword ptr [rax], 7Ch ; '|' jmp short loc_81A5F loc_81A55: or byte ptr [r14+1D0h], 2 xor ebx, ebx loc_81A5F: mov eax, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long mi_read_key_record(unsigned int *a1, long long a2, long long a3) { unsigned int v4; // ebx const char *v5; // rsi const char *v6; // rsi if ( !*(_DWORD *)(*(_QWORD *)a1 + 872LL) ) mi_writeinfo(a1, 0LL); v4 = -1; if ( a2 != -1 ) { v5 = (const char *)a1[117]; if ( (int)v5 < 0 ) { *(_DWORD *)my_thread_var(a1, v5) = 124; } else if ( (unsigned int)mi_put_key_in_record(a1, v5, 1LL, a3) ) { v6 = *(const char **)(*(_QWORD *)a1 + 616LL); mi_report_error(126, (long long)v6); *(_DWORD *)my_thread_var(126LL, v6) = 126; } else { *((_BYTE *)a1 + 464) |= 2u; return 0; } } return v4; }
_mi_read_key_record: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R15,RDX MOV R12,RSI MOV R14,RDI MOV RAX,qword ptr [RDI] CMP dword ptr [RAX + 0x368],0x0 JNZ 0x001819fd MOV RDI,R14 XOR ESI,ESI CALL 0x00182be6 LAB_001819fd: MOV EBX,0xffffffff CMP R12,-0x1 JZ 0x00181a5f MOV ESI,dword ptr [R14 + 0x1d4] TEST ESI,ESI JS 0x00181a48 MOV RDI,R14 MOV EDX,0x1 MOV RCX,R15 CALL 0x00181a6a TEST EAX,EAX JZ 0x00181a55 MOV RAX,qword ptr [R14] MOV RSI,qword ptr [RAX + 0x268] MOV EDI,0x7e CALL 0x0018121e CALL 0x001a7c22 MOV dword ptr [RAX],0x7e JMP 0x00181a5f LAB_00181a48: CALL 0x001a7c22 MOV dword ptr [RAX],0x7c JMP 0x00181a5f LAB_00181a55: OR byte ptr [R14 + 0x1d0],0x2 XOR EBX,EBX LAB_00181a5f: MOV EAX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
int8 _mi_read_key_record(long *param_1,long param_2,int8 param_3) { int iVar1; int4 *puVar2; int8 uVar3; if (*(int *)(*param_1 + 0x368) == 0) { _mi_writeinfo(param_1,0); } uVar3 = 0xffffffff; if (param_2 != -1) { if (*(int *)((long)param_1 + 0x1d4) < 0) { puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7c; } else { iVar1 = _mi_put_key_in_record(param_1,*(int *)((long)param_1 + 0x1d4),1,param_3); if (iVar1 == 0) { *(byte *)(param_1 + 0x3a) = *(byte *)(param_1 + 0x3a) | 2; uVar3 = 0; } else { mi_report_error(0x7e,*(int8 *)(*param_1 + 0x268)); puVar2 = (int4 *)_my_thread_var(); *puVar2 = 0x7e; } } } return uVar3; }
46,724
init_state_maps
eloqsql/mysys/charset.c
static my_bool init_state_maps(struct charset_info_st *cs) { uint i; uchar *state_map; uchar *ident_map; if (!(cs->state_map= state_map= (uchar*) my_once_alloc(256*2, MYF(MY_WME)))) return 1; cs->ident_map= ident_map= state_map + 256; /* Fill state_map with states to get a faster parser */ for (i=0; i < 256 ; i++) { if (my_isalpha(cs,i)) state_map[i]=(uchar) MY_LEX_IDENT; else if (my_isdigit(cs,i)) state_map[i]=(uchar) MY_LEX_NUMBER_IDENT; else if (is_multi_byte_ident(cs, i)) state_map[i]=(uchar) MY_LEX_IDENT; else if (my_isspace(cs,i)) state_map[i]=(uchar) MY_LEX_SKIP; else state_map[i]=(uchar) MY_LEX_CHAR; } state_map[(uchar)'_']=state_map[(uchar)'$']=(uchar) MY_LEX_IDENT; state_map[(uchar)'\'']=(uchar) MY_LEX_STRING; state_map[(uchar)'.']=(uchar) MY_LEX_REAL_OR_POINT; state_map[(uchar)'>']=state_map[(uchar)'=']=state_map[(uchar)'!']= (uchar) MY_LEX_CMP_OP; state_map[(uchar)'<']= (uchar) MY_LEX_LONG_CMP_OP; state_map[(uchar)'&']=state_map[(uchar)'|']=(uchar) MY_LEX_BOOL; state_map[(uchar)'#']=(uchar) MY_LEX_COMMENT; state_map[(uchar)';']=(uchar) MY_LEX_SEMICOLON; state_map[(uchar)':']=(uchar) MY_LEX_SET_VAR; state_map[0]=(uchar) MY_LEX_EOL; state_map[(uchar)'\\']= (uchar) MY_LEX_ESCAPE; state_map[(uchar)'/']= (uchar) MY_LEX_LONG_COMMENT; state_map[(uchar)'*']= (uchar) MY_LEX_END_LONG_COMMENT; state_map[(uchar)'@']= (uchar) MY_LEX_USER_END; state_map[(uchar) '`']= (uchar) MY_LEX_USER_VARIABLE_DELIMITER; state_map[(uchar)'"']= (uchar) MY_LEX_STRING_OR_DELIMITER; state_map[(uchar)'-']= (uchar) MY_LEX_MINUS_OR_COMMENT; state_map[(uchar)',']= (uchar) MY_LEX_COMMA; state_map[(uchar)'?']= (uchar) MY_LEX_PLACEHOLDER; /* Create a second map to make it faster to find identifiers */ for (i=0; i < 256 ; i++) { ident_map[i]= (uchar) (state_map[i] == MY_LEX_IDENT || state_map[i] == MY_LEX_NUMBER_IDENT); } /* Special handling of hex and binary strings */ state_map[(uchar)'x']= state_map[(uchar)'X']= (uchar) MY_LEX_IDENT_OR_HEX; state_map[(uchar)'b']= state_map[(uchar)'B']= (uchar) MY_LEX_IDENT_OR_BIN; state_map[(uchar)'n']= state_map[(uchar)'N']= (uchar) MY_LEX_IDENT_OR_NCHAR; return 0; }
O3
c
init_state_maps: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movl $0x200, %edi # imm = 0x200 movl $0x10, %esi callq 0x2dbc4 movq %rax, 0x80(%r14) testq %rax, %rax je 0x28fae movq %rax, %rbx movq %rax, %r13 addq $0x100, %r13 # imm = 0x100 movq %r13, 0x88(%r14) xorl %r15d, %r15d leaq -0x29(%rbp), %r12 movq 0x40(%r14), %rax movzbl 0x1(%rax,%r15), %eax testb $0x3, %al je 0x28eba movb $0x2, (%rbx,%r15) jmp 0x28ef9 testb $0x4, %al jne 0x28ef4 movb %r15b, -0x29(%rbp) movq 0xb8(%r14), %rax movq %r14, %rdi movq %r12, %rsi leaq -0x28(%rbp), %rdx callq *0xc0(%rax) addl $0x64, %eax cmpl $-0x6, %eax jae 0x28eb3 movq 0x40(%r14), %rax testb $0x8, 0x1(%rax,%r15) jne 0x28f07 movb $0x1, (%rbx,%r15) jmp 0x28ef9 movb $0xe, (%rbx,%r15) incq %r15 cmpq $0x100, %r15 # imm = 0x100 jne 0x28ea5 jmp 0x28f0e movb $0x1a, (%rbx,%r15) jmp 0x28ef9 movw $0x1b02, 0x5f(%rbx) # imm = 0x1B02 movb $0x8, 0x3e(%rbx) movb $0x11, 0x7c(%rbx) movw $0xa11, 0x26(%rbx) # imm = 0xA11 movl $0x8091617, 0x3a(%rbx) # imm = 0x8091617 movb $0x12, (%rbx) movb $0x13, 0x5c(%rbx) movb $0x15, 0x2a(%rbx) movl $0x20b2108, 0x21(%rbx) # imm = 0x20B2108 movl $0x14102224, 0x2c(%rbx) # imm = 0x14102224 movw $0x1823, 0x3f(%rbx) # imm = 0x1823 movq $-0x100, %rax movdqa 0x3eef9(%rip), %xmm0 # 0x67e50 movdqa 0x3ef01(%rip), %xmm1 # 0x67e60 movdqa 0x3ef09(%rip), %xmm2 # 0x67e70 movdqu (%r13,%rax), %xmm3 movdqa %xmm3, %xmm4 pcmpeqb %xmm0, %xmm4 pcmpeqb %xmm1, %xmm3 por %xmm4, %xmm3 pand %xmm2, %xmm3 movdqu %xmm3, 0x100(%r13,%rax) addq $0x10, %rax jne 0x28f67 movb $0x1e, %al movb %al, 0x58(%rbx) movb %al, 0x78(%rbx) movb $0x1f, %al movb %al, 0x42(%rbx) movb %al, 0x62(%rbx) movb $0x20, %al movb %al, 0x4e(%rbx) movb %al, 0x6e(%rbx) xorl %eax, %eax jmp 0x28fb0 movb $0x1, %al addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
init_state_maps: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rdi mov edi, 200h mov esi, 10h call my_once_alloc mov [r14+80h], rax test rax, rax jz loc_28FAE mov rbx, rax mov r13, rax add r13, 100h mov [r14+88h], r13 xor r15d, r15d lea r12, [rbp+var_29] loc_28EA5: mov rax, [r14+40h] movzx eax, byte ptr [rax+r15+1] test al, 3 jz short loc_28EBA loc_28EB3: mov byte ptr [rbx+r15], 2 jmp short loc_28EF9 loc_28EBA: test al, 4 jnz short loc_28EF4 mov [rbp+var_29], r15b mov rax, [r14+0B8h] mov rdi, r14 mov rsi, r12 lea rdx, [rbp+var_28] call qword ptr [rax+0C0h] add eax, 64h ; 'd' cmp eax, 0FFFFFFFAh jnb short loc_28EB3 mov rax, [r14+40h] test byte ptr [rax+r15+1], 8 jnz short loc_28F07 mov byte ptr [rbx+r15], 1 jmp short loc_28EF9 loc_28EF4: mov byte ptr [rbx+r15], 0Eh loc_28EF9: inc r15 cmp r15, 100h jnz short loc_28EA5 jmp short loc_28F0E loc_28F07: mov byte ptr [rbx+r15], 1Ah jmp short loc_28EF9 loc_28F0E: mov word ptr [rbx+5Fh], 1B02h mov byte ptr [rbx+3Eh], 8 mov byte ptr [rbx+7Ch], 11h mov word ptr [rbx+26h], 0A11h mov dword ptr [rbx+3Ah], 8091617h mov byte ptr [rbx], 12h mov byte ptr [rbx+5Ch], 13h mov byte ptr [rbx+2Ah], 15h mov dword ptr [rbx+21h], 20B2108h mov dword ptr [rbx+2Ch], 14102224h mov word ptr [rbx+3Fh], 1823h mov rax, 0FFFFFFFFFFFFFF00h movdqa xmm0, cs:xmmword_67E50 movdqa xmm1, cs:xmmword_67E60 movdqa xmm2, cs:xmmword_67E70 loc_28F67: movdqu xmm3, xmmword ptr [r13+rax+0] movdqa xmm4, xmm3 pcmpeqb xmm4, xmm0 pcmpeqb xmm3, xmm1 por xmm3, xmm4 pand xmm3, xmm2 movdqu xmmword ptr [r13+rax+100h], xmm3 add rax, 10h jnz short loc_28F67 mov al, 1Eh mov [rbx+58h], al mov [rbx+78h], al mov al, 1Fh mov [rbx+42h], al mov [rbx+62h], al mov al, 20h ; ' ' mov [rbx+4Eh], al mov [rbx+6Eh], al xor eax, eax jmp short loc_28FB0 loc_28FAE: mov al, 1 loc_28FB0: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long init_state_maps(_QWORD *a1) { long long v1; // rax long long v2; // rax long long v3; // rbx long long v4; // r13 long long i; // r15 char v6; // al long long v7; // rax __m128i si128; // xmm0 __m128i v9; // xmm1 __m128i v10; // xmm2 __m128i v11; // xmm3 char v13; // [rsp+1h] [rbp-29h] BYREF _BYTE v14[40]; // [rsp+2h] [rbp-28h] BYREF v13 = HIBYTE(v1); v2 = my_once_alloc(512LL, 16LL); a1[16] = v2; if ( !v2 ) return 1LL; v3 = v2; v4 = v2 + 256; a1[17] = v2 + 256; for ( i = 0LL; i != 256; ++i ) { v6 = *(_BYTE *)(a1[8] + i + 1); if ( (v6 & 3) != 0 ) { LABEL_4: *(_BYTE *)(v3 + i) = 2; continue; } if ( (v6 & 4) != 0 ) { *(_BYTE *)(v3 + i) = 14; } else { v13 = i; if ( (*(unsigned int ( **)(_QWORD *, char *, _BYTE *))(a1[23] + 192LL))(a1, &v13, v14) + 100 >= 0xFFFFFFFA ) goto LABEL_4; if ( (*(_BYTE *)(a1[8] + i + 1) & 8) != 0 ) *(_BYTE *)(v3 + i) = 26; else *(_BYTE *)(v3 + i) = 1; } } *(_WORD *)(v3 + 95) = 6914; *(_BYTE *)(v3 + 62) = 8; *(_BYTE *)(v3 + 124) = 17; *(_WORD *)(v3 + 38) = 2577; *(_DWORD *)(v3 + 58) = 134813207; *(_BYTE *)v3 = 18; *(_BYTE *)(v3 + 92) = 19; *(_BYTE *)(v3 + 42) = 21; *(_DWORD *)(v3 + 33) = 34283784; *(_DWORD *)(v3 + 44) = 336601636; *(_WORD *)(v3 + 63) = 6179; v7 = -256LL; si128 = _mm_load_si128((const __m128i *)&xmmword_67E50); v9 = _mm_load_si128((const __m128i *)&xmmword_67E60); v10 = _mm_load_si128(xmmword_67E70); do { v11 = _mm_loadu_si128((const __m128i *)(v4 + v7)); *(__m128i *)(v4 + v7 + 256) = _mm_and_si128(_mm_or_si128(_mm_cmpeq_epi8(v11, v9), _mm_cmpeq_epi8(v11, si128)), v10); v7 += 16LL; } while ( v7 ); *(_BYTE *)(v3 + 88) = 30; *(_BYTE *)(v3 + 120) = 30; *(_BYTE *)(v3 + 66) = 31; *(_BYTE *)(v3 + 98) = 31; *(_BYTE *)(v3 + 78) = 32; *(_BYTE *)(v3 + 110) = 32; return 0LL; }
init_state_maps: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV EDI,0x200 MOV ESI,0x10 CALL 0x0012dbc4 MOV qword ptr [R14 + 0x80],RAX TEST RAX,RAX JZ 0x00128fae MOV RBX,RAX MOV R13,RAX ADD R13,0x100 MOV qword ptr [R14 + 0x88],R13 XOR R15D,R15D LEA R12,[RBP + -0x29] LAB_00128ea5: MOV RAX,qword ptr [R14 + 0x40] MOVZX EAX,byte ptr [RAX + R15*0x1 + 0x1] TEST AL,0x3 JZ 0x00128eba LAB_00128eb3: MOV byte ptr [RBX + R15*0x1],0x2 JMP 0x00128ef9 LAB_00128eba: TEST AL,0x4 JNZ 0x00128ef4 MOV byte ptr [RBP + -0x29],R15B MOV RAX,qword ptr [R14 + 0xb8] MOV RDI,R14 MOV RSI,R12 LEA RDX,[RBP + -0x28] CALL qword ptr [RAX + 0xc0] ADD EAX,0x64 CMP EAX,-0x6 JNC 0x00128eb3 MOV RAX,qword ptr [R14 + 0x40] TEST byte ptr [RAX + R15*0x1 + 0x1],0x8 JNZ 0x00128f07 MOV byte ptr [RBX + R15*0x1],0x1 JMP 0x00128ef9 LAB_00128ef4: MOV byte ptr [RBX + R15*0x1],0xe LAB_00128ef9: INC R15 CMP R15,0x100 JNZ 0x00128ea5 JMP 0x00128f0e LAB_00128f07: MOV byte ptr [RBX + R15*0x1],0x1a JMP 0x00128ef9 LAB_00128f0e: MOV word ptr [RBX + 0x5f],0x1b02 MOV byte ptr [RBX + 0x3e],0x8 MOV byte ptr [RBX + 0x7c],0x11 MOV word ptr [RBX + 0x26],0xa11 MOV dword ptr [RBX + 0x3a],0x8091617 MOV byte ptr [RBX],0x12 MOV byte ptr [RBX + 0x5c],0x13 MOV byte ptr [RBX + 0x2a],0x15 MOV dword ptr [RBX + 0x21],0x20b2108 MOV dword ptr [RBX + 0x2c],0x14102224 MOV word ptr [RBX + 0x3f],0x1823 MOV RAX,-0x100 MOVDQA XMM0,xmmword ptr [0x00167e50] MOVDQA XMM1,xmmword ptr [0x00167e60] MOVDQA XMM2,xmmword ptr [0x00167e70] LAB_00128f67: MOVDQU XMM3,xmmword ptr [R13 + RAX*0x1] MOVDQA XMM4,XMM3 PCMPEQB XMM4,XMM0 PCMPEQB XMM3,XMM1 POR XMM3,XMM4 PAND XMM3,XMM2 MOVDQU xmmword ptr [R13 + RAX*0x1 + 0x100],XMM3 ADD RAX,0x10 JNZ 0x00128f67 MOV AL,0x1e MOV byte ptr [RBX + 0x58],AL MOV byte ptr [RBX + 0x78],AL MOV AL,0x1f MOV byte ptr [RBX + 0x42],AL MOV byte ptr [RBX + 0x62],AL MOV AL,0x20 MOV byte ptr [RBX + 0x4e],AL MOV byte ptr [RBX + 0x6e],AL XOR EAX,EAX JMP 0x00128fb0 LAB_00128fae: MOV AL,0x1 LAB_00128fb0: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 init_state_maps(long param_1) { char *pcVar1; byte *pbVar2; byte bVar3; char cVar4; char cVar5; char cVar6; char cVar7; char cVar8; char cVar9; char cVar10; char cVar11; char cVar12; char cVar13; char cVar14; char cVar15; char cVar16; char cVar17; char cVar18; char cVar19; char cVar20; char cVar21; char cVar22; char cVar23; char cVar24; char cVar25; char cVar26; char cVar27; char cVar28; char cVar29; char cVar30; char cVar31; char cVar32; char cVar33; char cVar34; char cVar35; char cVar36; char cVar37; char cVar38; char cVar39; char cVar40; char cVar41; char cVar42; char cVar43; char cVar44; char cVar45; char cVar46; char cVar47; char cVar48; char cVar49; char cVar50; byte bVar51; byte bVar52; byte bVar53; byte bVar54; byte bVar55; byte bVar56; byte bVar57; byte bVar58; byte bVar59; byte bVar60; byte bVar61; byte bVar62; byte bVar63; byte bVar64; byte bVar65; int iVar66; int8 in_RAX; int1 *puVar67; int8 uVar68; long lVar69; int8 uStack_38; uStack_38 = in_RAX; puVar67 = (int1 *)my_once_alloc(0x200,0x10); *(int1 **)(param_1 + 0x80) = puVar67; if (puVar67 == (int1 *)0x0) { uVar68 = 1; } else { *(int1 **)(param_1 + 0x88) = puVar67 + 0x100; lVar69 = 0; do { bVar3 = *(byte *)(*(long *)(param_1 + 0x40) + 1 + lVar69); if ((bVar3 & 3) == 0) { if ((bVar3 & 4) == 0) { uStack_38 = CONCAT17((char)lVar69,(int7)uStack_38); iVar66 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0)) (param_1,(long)&uStack_38 + 7,&stack0xffffffffffffffd0); if (0xfffffff9 < iVar66 + 100U) goto LAB_00128eb3; if ((*(byte *)(*(long *)(param_1 + 0x40) + 1 + lVar69) & 8) == 0) { puVar67[lVar69] = 1; } else { puVar67[lVar69] = 0x1a; } } else { puVar67[lVar69] = 0xe; } } else { LAB_00128eb3: puVar67[lVar69] = 2; } lVar69 = lVar69 + 1; } while (lVar69 != 0x100); *(int2 *)(puVar67 + 0x5f) = 0x1b02; puVar67[0x3e] = 8; puVar67[0x7c] = 0x11; *(int2 *)(puVar67 + 0x26) = 0xa11; *(int4 *)(puVar67 + 0x3a) = 0x8091617; *puVar67 = 0x12; puVar67[0x5c] = 0x13; puVar67[0x2a] = 0x15; *(int4 *)(puVar67 + 0x21) = 0x20b2108; *(int4 *)(puVar67 + 0x2c) = 0x14102224; *(int2 *)(puVar67 + 0x3f) = 0x1823; bVar65 = UNK_00167e7f; bVar64 = UNK_00167e7e; bVar63 = UNK_00167e7d; bVar62 = UNK_00167e7c; bVar61 = UNK_00167e7b; bVar60 = UNK_00167e7a; bVar59 = UNK_00167e79; bVar58 = UNK_00167e78; bVar57 = UNK_00167e77; bVar56 = UNK_00167e76; bVar55 = UNK_00167e75; bVar54 = UNK_00167e74; bVar53 = UNK_00167e73; bVar52 = UNK_00167e72; bVar51 = UNK_00167e71; bVar3 = DAT_00167e70; cVar50 = UNK_00167e6f; cVar49 = UNK_00167e6e; cVar48 = UNK_00167e6d; cVar47 = UNK_00167e6c; cVar46 = UNK_00167e6b; cVar45 = UNK_00167e6a; cVar44 = UNK_00167e69; cVar43 = UNK_00167e68; cVar42 = UNK_00167e67; cVar41 = UNK_00167e66; cVar40 = UNK_00167e65; cVar39 = UNK_00167e64; cVar38 = UNK_00167e63; cVar37 = UNK_00167e62; cVar36 = UNK_00167e61; cVar35 = DAT_00167e60; cVar34 = UNK_00167e5f; cVar33 = UNK_00167e5e; cVar32 = UNK_00167e5d; cVar31 = UNK_00167e5c; cVar30 = UNK_00167e5b; cVar29 = UNK_00167e5a; cVar28 = UNK_00167e59; cVar27 = UNK_00167e58; cVar26 = UNK_00167e57; cVar25 = UNK_00167e56; cVar24 = UNK_00167e55; cVar23 = UNK_00167e54; cVar22 = UNK_00167e53; cVar21 = UNK_00167e52; cVar20 = UNK_00167e51; cVar19 = DAT_00167e50; lVar69 = -0x100; do { pcVar1 = puVar67 + 0x100 + lVar69; cVar4 = pcVar1[1]; cVar5 = pcVar1[2]; cVar6 = pcVar1[3]; cVar7 = pcVar1[4]; cVar8 = pcVar1[5]; cVar9 = pcVar1[6]; cVar10 = pcVar1[7]; cVar11 = pcVar1[8]; cVar12 = pcVar1[9]; cVar13 = pcVar1[10]; cVar14 = pcVar1[0xb]; cVar15 = pcVar1[0xc]; cVar16 = pcVar1[0xd]; cVar17 = pcVar1[0xe]; cVar18 = pcVar1[0xf]; pbVar2 = puVar67 + lVar69 + 0x200; *pbVar2 = (-(*pcVar1 == cVar35) | -(*pcVar1 == cVar19)) & bVar3; pbVar2[1] = (-(cVar4 == cVar36) | -(cVar4 == cVar20)) & bVar51; pbVar2[2] = (-(cVar5 == cVar37) | -(cVar5 == cVar21)) & bVar52; pbVar2[3] = (-(cVar6 == cVar38) | -(cVar6 == cVar22)) & bVar53; pbVar2[4] = (-(cVar7 == cVar39) | -(cVar7 == cVar23)) & bVar54; pbVar2[5] = (-(cVar8 == cVar40) | -(cVar8 == cVar24)) & bVar55; pbVar2[6] = (-(cVar9 == cVar41) | -(cVar9 == cVar25)) & bVar56; pbVar2[7] = (-(cVar10 == cVar42) | -(cVar10 == cVar26)) & bVar57; pbVar2[8] = (-(cVar11 == cVar43) | -(cVar11 == cVar27)) & bVar58; pbVar2[9] = (-(cVar12 == cVar44) | -(cVar12 == cVar28)) & bVar59; pbVar2[10] = (-(cVar13 == cVar45) | -(cVar13 == cVar29)) & bVar60; pbVar2[0xb] = (-(cVar14 == cVar46) | -(cVar14 == cVar30)) & bVar61; pbVar2[0xc] = (-(cVar15 == cVar47) | -(cVar15 == cVar31)) & bVar62; pbVar2[0xd] = (-(cVar16 == cVar48) | -(cVar16 == cVar32)) & bVar63; pbVar2[0xe] = (-(cVar17 == cVar49) | -(cVar17 == cVar33)) & bVar64; pbVar2[0xf] = (-(cVar18 == cVar50) | -(cVar18 == cVar34)) & bVar65; lVar69 = lVar69 + 0x10; } while (lVar69 != 0); puVar67[0x58] = 0x1e; puVar67[0x78] = 0x1e; puVar67[0x42] = 0x1f; puVar67[0x62] = 0x1f; puVar67[0x4e] = 0x20; puVar67[0x6e] = 0x20; uVar68 = 0; } return uVar68; }
46,725
ma_get_key
eloqsql/storage/maria/ma_search.c
uchar *_ma_get_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *keypos) { uint page_flag, nod_flag; MARIA_KEYDEF *keyinfo= key->keyinfo; uchar *page; DBUG_ENTER("_ma_get_key"); page= ma_page->buff; page_flag= ma_page->flag; nod_flag= ma_page->node; if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY)) && ! (page_flag & KEYPAGE_FLAG_HAS_TRANSID)) { bmove(key->data, keypos, keyinfo->keylength+nod_flag); key->ref_length= keyinfo->share->rec_reflength; key->data_length= keyinfo->keylength - key->ref_length; key->flag= 0; DBUG_RETURN(keypos+keyinfo->keylength+nod_flag); } else { page+= keyinfo->share->keypage_header + nod_flag; key->data[0]= 0; /* safety */ while (page <= keypos) { if (!(*keyinfo->get_key)(key, page_flag, nod_flag, &page)) { _ma_set_fatal_error_with_share(keyinfo->share, HA_ERR_CRASHED); DBUG_RETURN(0); } } } DBUG_PRINT("exit",("page: %p length: %u", page, key->data_length + key->ref_length)); DBUG_RETURN(page); }
O0
c
ma_get_key: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x30(%rbp) movq -0x18(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rax movl 0x2c(%rax), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rax movl 0x28(%rax), %eax movl %eax, -0x28(%rbp) movq -0x30(%rbp), %rax movzwl 0xa2(%rax), %eax andl $0x28, %eax cmpl $0x0, %eax jne 0x6c8bd movl -0x24(%rbp), %eax andl $0x2, %eax cmpl $0x0, %eax jne 0x6c8bd movq -0x10(%rbp), %rax movq (%rax), %rdi movq -0x20(%rbp), %rsi movq -0x30(%rbp), %rax movzwl 0xaa(%rax), %eax addl -0x28(%rbp), %eax movl %eax, %eax movl %eax, %edx callq 0x2a130 movq -0x30(%rbp), %rax movq (%rax), %rax movl 0x740(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x14(%rax) movq -0x30(%rbp), %rax movzwl 0xaa(%rax), %ecx movq -0x10(%rbp), %rax subl 0x14(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x18(%rax) movq -0x20(%rbp), %rax movq -0x30(%rbp), %rcx movzwl 0xaa(%rcx), %ecx movslq %ecx, %rcx addq %rcx, %rax movl -0x28(%rbp), %ecx addq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0x6c93b movq -0x30(%rbp), %rax movq (%rax), %rax movl 0x744(%rax), %ecx addl -0x28(%rbp), %ecx movq -0x38(%rbp), %rax movl %ecx, %ecx addq %rcx, %rax movq %rax, -0x38(%rbp) movq -0x10(%rbp), %rax movq (%rax), %rax movb $0x0, (%rax) movq -0x38(%rbp), %rax cmpq -0x20(%rbp), %rax ja 0x6c92b movq -0x30(%rbp), %rax movq 0xe0(%rax), %rax movq -0x10(%rbp), %rdi movl -0x24(%rbp), %esi movl -0x28(%rbp), %edx leaq -0x38(%rbp), %rcx callq *%rax cmpl $0x0, %eax jne 0x6c929 movq -0x30(%rbp), %rax movq (%rax), %rdi movl $0x7e, %esi callq 0x33910 movq $0x0, -0x8(%rbp) jmp 0x6c93b jmp 0x6c8e4 jmp 0x6c92d jmp 0x6c92f jmp 0x6c931 jmp 0x6c933 movq -0x38(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ma_get_key: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov rax, [rbp+var_10] mov rax, [rax+8] mov [rbp+var_30], rax mov rax, [rbp+var_18] mov rax, [rax+10h] mov [rbp+var_38], rax mov rax, [rbp+var_18] mov eax, [rax+2Ch] mov [rbp+var_24], eax mov rax, [rbp+var_18] mov eax, [rax+28h] mov [rbp+var_28], eax mov rax, [rbp+var_30] movzx eax, word ptr [rax+0A2h] and eax, 28h cmp eax, 0 jnz loc_6C8BD mov eax, [rbp+var_24] and eax, 2 cmp eax, 0 jnz short loc_6C8BD mov rax, [rbp+var_10] mov rdi, [rax] mov rsi, [rbp+var_20] mov rax, [rbp+var_30] movzx eax, word ptr [rax+0AAh] add eax, [rbp+var_28] mov eax, eax mov edx, eax call _memmove mov rax, [rbp+var_30] mov rax, [rax] mov ecx, [rax+740h] mov rax, [rbp+var_10] mov [rax+14h], ecx mov rax, [rbp+var_30] movzx ecx, word ptr [rax+0AAh] mov rax, [rbp+var_10] sub ecx, [rax+14h] mov rax, [rbp+var_10] mov [rax+10h], ecx mov rax, [rbp+var_10] mov dword ptr [rax+18h], 0 mov rax, [rbp+var_20] mov rcx, [rbp+var_30] movzx ecx, word ptr [rcx+0AAh] movsxd rcx, ecx add rax, rcx mov ecx, [rbp+var_28] add rax, rcx mov [rbp+var_8], rax jmp short loc_6C93B loc_6C8BD: mov rax, [rbp+var_30] mov rax, [rax] mov ecx, [rax+744h] add ecx, [rbp+var_28] mov rax, [rbp+var_38] mov ecx, ecx add rax, rcx mov [rbp+var_38], rax mov rax, [rbp+var_10] mov rax, [rax] mov byte ptr [rax], 0 loc_6C8E4: mov rax, [rbp+var_38] cmp rax, [rbp+var_20] ja short loc_6C92B mov rax, [rbp+var_30] mov rax, [rax+0E0h] mov rdi, [rbp+var_10] mov esi, [rbp+var_24] mov edx, [rbp+var_28] lea rcx, [rbp+var_38] call rax cmp eax, 0 jnz short loc_6C929 mov rax, [rbp+var_30] mov rdi, [rax] mov esi, 7Eh ; '~' call _ma_set_fatal_error_with_share mov [rbp+var_8], 0 jmp short loc_6C93B loc_6C929: jmp short loc_6C8E4 loc_6C92B: jmp short $+2 loc_6C92D: jmp short $+2 loc_6C92F: jmp short $+2 loc_6C931: jmp short $+2 loc_6C933: mov rax, [rbp+var_38] mov [rbp+var_8], rax loc_6C93B: mov rax, [rbp+var_8] add rsp, 40h pop rbp retn
long long ma_get_key(long long a1, long long a2, unsigned long long a3) { long long v3; // rdx long long v4; // rcx long long v5; // r8 int v6; // r9d unsigned long long v8; // [rsp+8h] [rbp-38h] BYREF long long v9; // [rsp+10h] [rbp-30h] unsigned int v10; // [rsp+18h] [rbp-28h] unsigned int v11; // [rsp+1Ch] [rbp-24h] unsigned long long v12; // [rsp+20h] [rbp-20h] long long v13; // [rsp+28h] [rbp-18h] long long v14; // [rsp+30h] [rbp-10h] v14 = a1; v13 = a2; v12 = a3; v9 = *(_QWORD *)(a1 + 8); v8 = *(_QWORD *)(a2 + 16); v11 = *(_DWORD *)(a2 + 44); v10 = *(_DWORD *)(a2 + 40); if ( (*(_WORD *)(v9 + 162) & 0x28) != 0 || (v11 & 2) != 0 ) { v8 += v10 + *(_DWORD *)(*(_QWORD *)v9 + 1860LL); **(_BYTE **)v14 = 0; while ( v8 <= v12 ) { if ( !(*(unsigned int ( **)(long long, _QWORD, _QWORD, unsigned long long *))(v9 + 224))(v14, v11, v10, &v8) ) { ma_set_fatal_error_with_share(*(_QWORD *)v9, 126, v3, v4, v5, v6); return 0LL; } } return v8; } else { memmove(*(_QWORD *)v14, v12, v10 + *(unsigned __int16 *)(v9 + 170)); *(_DWORD *)(v14 + 20) = *(_DWORD *)(*(_QWORD *)v9 + 1856LL); *(_DWORD *)(v14 + 16) = *(unsigned __int16 *)(v9 + 170) - *(_DWORD *)(v14 + 20); *(_DWORD *)(v14 + 24) = 0; return v10 + *(unsigned __int16 *)(v9 + 170) + v12; } }
_ma_get_key: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x2c] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RAX + 0x28] MOV dword ptr [RBP + -0x28],EAX MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0xa2] AND EAX,0x28 CMP EAX,0x0 JNZ 0x0016c8bd MOV EAX,dword ptr [RBP + -0x24] AND EAX,0x2 CMP EAX,0x0 JNZ 0x0016c8bd MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x30] MOVZX EAX,word ptr [RAX + 0xaa] ADD EAX,dword ptr [RBP + -0x28] MOV EAX,EAX MOV EDX,EAX CALL 0x0012a130 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x740] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x14],ECX MOV RAX,qword ptr [RBP + -0x30] MOVZX ECX,word ptr [RAX + 0xaa] MOV RAX,qword ptr [RBP + -0x10] SUB ECX,dword ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x18],0x0 MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x30] MOVZX ECX,word ptr [RCX + 0xaa] MOVSXD RCX,ECX ADD RAX,RCX MOV ECX,dword ptr [RBP + -0x28] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x0016c93b LAB_0016c8bd: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV ECX,dword ptr [RAX + 0x744] ADD ECX,dword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x38] MOV ECX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x38],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV byte ptr [RAX],0x0 LAB_0016c8e4: MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RBP + -0x20] JA 0x0016c92b MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0xe0] MOV RDI,qword ptr [RBP + -0x10] MOV ESI,dword ptr [RBP + -0x24] MOV EDX,dword ptr [RBP + -0x28] LEA RCX,[RBP + -0x38] CALL RAX CMP EAX,0x0 JNZ 0x0016c929 MOV RAX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RAX] MOV ESI,0x7e CALL 0x00133910 MOV qword ptr [RBP + -0x8],0x0 JMP 0x0016c93b LAB_0016c929: JMP 0x0016c8e4 LAB_0016c92b: JMP 0x0016c92d LAB_0016c92d: JMP 0x0016c92f LAB_0016c92f: JMP 0x0016c931 LAB_0016c931: JMP 0x0016c933 LAB_0016c933: MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RBP + -0x8],RAX LAB_0016c93b: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x40 POP RBP RET
void * _ma_get_key(int8 *param_1,long param_2,void *param_3) { int iVar1; void *local_40; long *local_38; uint local_30; uint local_2c; void *local_28; long local_20; int8 *local_18; void *local_10; local_38 = (long *)param_1[1]; local_40 = *(void **)(param_2 + 0x10); local_2c = *(uint *)(param_2 + 0x2c); local_30 = *(uint *)(param_2 + 0x28); local_28 = param_3; local_20 = param_2; local_18 = param_1; if (((*(ushort *)((long)local_38 + 0xa2) & 0x28) == 0) && ((local_2c & 2) == 0)) { memmove((void *)*param_1,param_3,(ulong)(*(ushort *)((long)local_38 + 0xaa) + local_30)); *(int4 *)((long)local_18 + 0x14) = *(int4 *)(*local_38 + 0x740); *(uint *)(local_18 + 2) = (uint)*(ushort *)((long)local_38 + 0xaa) - *(int *)((long)local_18 + 0x14); *(int4 *)(local_18 + 3) = 0; local_10 = (void *)((long)local_28 + (ulong)local_30 + (long)(int)(uint)*(ushort *)((long)local_38 + 0xaa)); } else { local_40 = (void *)((long)local_40 + (ulong)(*(int *)(*local_38 + 0x744) + local_30)); *(int1 *)*param_1 = 0; do { if (local_28 < local_40) { return local_40; } iVar1 = (*(code *)local_38[0x1c])(local_18,local_2c,local_30,&local_40); } while (iVar1 != 0); _ma_set_fatal_error_with_share(*local_38,0x7e); local_10 = (void *)0x0; } return local_10; }
46,726
minja::SliceExpr::~SliceExpr()
monkey531[P]llama/common/minja.hpp
SliceExpr(const Location & location, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e) : Expression(location), start(std::move(s)), end(std::move(e)) {}
O1
cpp
minja::SliceExpr::~SliceExpr(): pushq %rbx movq %rdi, %rbx leaq 0x7d123(%rip), %rax # 0xec858 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x6f74a callq 0x31024 movq 0x28(%rbx), %rdi testq %rdi, %rdi je 0x6f758 callq 0x31024 leaq 0x7cdc9(%rip), %rax # 0xec528 addq $0x10, %rax movq %rax, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x6f774 callq 0x31024 movl $0x40, %esi movq %rbx, %rdi popq %rbx jmp 0x196d0
_ZN5minja9SliceExprD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja9SliceExprE; `vtable for'minja::SliceExpr add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_6F74A call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6F74A: mov rdi, [rbx+28h] test rdi, rdi jz short loc_6F758 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6F758: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rbx], rax mov rdi, [rbx+10h] test rdi, rdi jz short loc_6F774 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6F774: mov esi, 40h ; '@'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::SliceExpr::~SliceExpr(minja::SliceExpr *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi volatile signed __int32 *v4; // rdi *(_QWORD *)this = &`vtable for'minja::SliceExpr + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); v3 = (volatile signed __int32 *)*((_QWORD *)this + 5); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); *(_QWORD *)this = &`vtable for'minja::Expression + 2; v4 = (volatile signed __int32 *)*((_QWORD *)this + 2); if ( v4 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4); operator delete(this, 0x40uLL); }
~SliceExpr: PUSH RBX MOV RBX,RDI LEA RAX,[0x1ec858] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0016f74a CALL 0x00131024 LAB_0016f74a: MOV RDI,qword ptr [RBX + 0x28] TEST RDI,RDI JZ 0x0016f758 CALL 0x00131024 LAB_0016f758: LEA RAX,[0x1ec528] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x0016f774 CALL 0x00131024 LAB_0016f774: MOV ESI,0x40 MOV RDI,RBX POP RBX JMP 0x001196d0
/* minja::SliceExpr::~SliceExpr() */ void __thiscall minja::SliceExpr::~SliceExpr(SliceExpr *this) { *(int ***)this = &PTR_do_evaluate_001ec868; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28)); } *(int ***)this = &PTR___cxa_pure_virtual_001ec538; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10)); } operator_delete(this,0x40); return; }
46,727
minja::SliceExpr::~SliceExpr()
monkey531[P]llama/common/minja.hpp
SliceExpr(const Location & location, std::shared_ptr<Expression> && s, std::shared_ptr<Expression> && e) : Expression(location), start(std::move(s)), end(std::move(e)) {}
O3
cpp
minja::SliceExpr::~SliceExpr(): pushq %rbx movq %rdi, %rbx leaq 0x7bac7(%rip), %rax # 0xe9858 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x6dda6 callq 0x309ec movq 0x28(%rbx), %rdi testq %rdi, %rdi je 0x6ddb4 callq 0x309ec leaq 0x7b76d(%rip), %rax # 0xe9528 addq $0x10, %rax movq %rax, (%rbx) movq 0x10(%rbx), %rdi testq %rdi, %rdi je 0x6ddd1 popq %rbx jmp 0x309ec popq %rbx retq nop
_ZN5minja9SliceExprD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja9SliceExprE; `vtable for'minja::SliceExpr add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_6DDA6 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6DDA6: mov rdi, [rbx+28h] test rdi, rdi jz short loc_6DDB4 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6DDB4: lea rax, _ZTVN5minja10ExpressionE; `vtable for'minja::Expression add rax, 10h mov [rbx], rax mov rdi, [rbx+10h] test rdi, rdi jz short loc_6DDD1 pop rbx jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_6DDD1: pop rbx retn
void minja::SliceExpr::~SliceExpr(minja::SliceExpr *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi volatile signed __int32 *v4; // rdi *(_QWORD *)this = &`vtable for'minja::SliceExpr + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); v3 = (volatile signed __int32 *)*((_QWORD *)this + 5); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); *(_QWORD *)this = &`vtable for'minja::Expression + 2; v4 = (volatile signed __int32 *)*((_QWORD *)this + 2); if ( v4 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v4); }
~SliceExpr: PUSH RBX MOV RBX,RDI LEA RAX,[0x1e9858] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0016dda6 CALL 0x001309ec LAB_0016dda6: MOV RDI,qword ptr [RBX + 0x28] TEST RDI,RDI JZ 0x0016ddb4 CALL 0x001309ec LAB_0016ddb4: LEA RAX,[0x1e9528] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x10] TEST RDI,RDI JZ 0x0016ddd1 POP RBX JMP 0x001309ec LAB_0016ddd1: POP RBX RET
/* minja::SliceExpr::~SliceExpr() */ void __thiscall minja::SliceExpr::~SliceExpr(SliceExpr *this) { *(int ***)this = &PTR_do_evaluate_001e9868; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x28)); } *(int ***)this = &PTR___cxa_pure_virtual_001e9538; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x10)); return; } return; }
46,728
ftb_phrase_add_word
eloqsql/storage/myisam/ft_boolean_search.c
static int ftb_phrase_add_word(MYSQL_FTPARSER_PARAM *param, const char *word, int word_len, MYSQL_FTPARSER_BOOLEAN_INFO *boolean_info __attribute__((unused))) { MY_FTB_PHRASE_PARAM *phrase_param= param->mysql_ftparam; FT_WORD *w= (FT_WORD *)phrase_param->document->data; LIST *phrase, *document; w->pos= (uchar*) word; w->len= word_len; phrase_param->document= phrase_param->document->prev; if (phrase_param->phrase_length > phrase_param->document_length) { phrase_param->document_length++; return 0; } /* TODO: rewrite phrase search to avoid comparing the same word twice. */ for (phrase= phrase_param->phrase, document= phrase_param->document->next; phrase; phrase= phrase->next, document= document->next) { FT_WORD *phrase_word= (FT_WORD *)phrase->data; FT_WORD *document_word= (FT_WORD *)document->data; if (my_strnncoll(phrase_param->cs, (uchar*) phrase_word->pos, phrase_word->len, (uchar*) document_word->pos, document_word->len)) return 0; } phrase_param->match++; return 0; }
O0
c
ftb_phrase_add_word: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax movq %rax, -0x30(%rbp) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq 0x10(%rax), %rax movq %rax, -0x38(%rbp) movq -0x18(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, (%rax) movslq -0x1c(%rbp), %rcx movq -0x38(%rbp), %rax movq %rcx, 0x10(%rax) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq (%rax), %rcx movq -0x30(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x30(%rbp), %rax movl 0x18(%rax), %eax movq -0x30(%rbp), %rcx cmpl 0x1c(%rcx), %eax jbe 0xa1466 movq -0x30(%rbp), %rax movl 0x1c(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x1c(%rax) movl $0x0, -0x4(%rbp) jmp 0xa1523 movq -0x30(%rbp), %rax movq (%rax), %rax movq %rax, -0x40(%rbp) movq -0x30(%rbp), %rax movq 0x8(%rax), %rax movq 0x8(%rax), %rax movq %rax, -0x48(%rbp) cmpq $0x0, -0x40(%rbp) je 0xa150f movq -0x40(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rax movq 0x10(%rax), %rax movq %rax, -0x58(%rbp) movq -0x30(%rbp), %rax movq 0x10(%rax), %rax movq 0xc0(%rax), %rax movq 0x8(%rax), %rax movq -0x30(%rbp), %rcx movq 0x10(%rcx), %rdi movq -0x50(%rbp), %rcx movq (%rcx), %rsi movq -0x50(%rbp), %rcx movq 0x10(%rcx), %rdx movq -0x58(%rbp), %rcx movq (%rcx), %rcx movq -0x58(%rbp), %r8 movq 0x10(%r8), %r8 xorl %r9d, %r9d callq *%rax cmpl $0x0, %eax je 0xa14f0 movl $0x0, -0x4(%rbp) jmp 0xa1523 jmp 0xa14f2 movq -0x40(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x40(%rbp) movq -0x48(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x48(%rbp) jmp 0xa1481 movq -0x30(%rbp), %rax movl 0x20(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x20(%rax) movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x60, %rsp popq %rbp retq nopl (%rax)
ftb_phrase_add_word: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov rax, [rbp+var_10] mov rax, [rax+18h] mov [rbp+var_30], rax mov rax, [rbp+var_30] mov rax, [rax+8] mov rax, [rax+10h] mov [rbp+var_38], rax mov rcx, [rbp+var_18] mov rax, [rbp+var_38] mov [rax], rcx movsxd rcx, [rbp+var_1C] mov rax, [rbp+var_38] mov [rax+10h], rcx mov rax, [rbp+var_30] mov rax, [rax+8] mov rcx, [rax] mov rax, [rbp+var_30] mov [rax+8], rcx mov rax, [rbp+var_30] mov eax, [rax+18h] mov rcx, [rbp+var_30] cmp eax, [rcx+1Ch] jbe short loc_A1466 mov rax, [rbp+var_30] mov ecx, [rax+1Ch] add ecx, 1 mov [rax+1Ch], ecx mov [rbp+var_4], 0 jmp loc_A1523 loc_A1466: mov rax, [rbp+var_30] mov rax, [rax] mov [rbp+var_40], rax mov rax, [rbp+var_30] mov rax, [rax+8] mov rax, [rax+8] mov [rbp+var_48], rax loc_A1481: cmp [rbp+var_40], 0 jz loc_A150F mov rax, [rbp+var_40] mov rax, [rax+10h] mov [rbp+var_50], rax mov rax, [rbp+var_48] mov rax, [rax+10h] mov [rbp+var_58], rax mov rax, [rbp+var_30] mov rax, [rax+10h] mov rax, [rax+0C0h] mov rax, [rax+8] mov rcx, [rbp+var_30] mov rdi, [rcx+10h] mov rcx, [rbp+var_50] mov rsi, [rcx] mov rcx, [rbp+var_50] mov rdx, [rcx+10h] mov rcx, [rbp+var_58] mov rcx, [rcx] mov r8, [rbp+var_58] mov r8, [r8+10h] xor r9d, r9d call rax cmp eax, 0 jz short loc_A14F0 mov [rbp+var_4], 0 jmp short loc_A1523 loc_A14F0: jmp short $+2 loc_A14F2: mov rax, [rbp+var_40] mov rax, [rax+8] mov [rbp+var_40], rax mov rax, [rbp+var_48] mov rax, [rax+8] mov [rbp+var_48], rax jmp loc_A1481 loc_A150F: mov rax, [rbp+var_30] mov ecx, [rax+20h] add ecx, 1 mov [rax+20h], ecx mov [rbp+var_4], 0 loc_A1523: mov eax, [rbp+var_4] add rsp, 60h pop rbp retn
long long ftb_phrase_add_word(long long a1, long long a2, int a3) { long long v4; // [rsp+18h] [rbp-48h] long long v5; // [rsp+20h] [rbp-40h] _QWORD *v6; // [rsp+28h] [rbp-38h] long long *v7; // [rsp+30h] [rbp-30h] v7 = *(long long **)(a1 + 24); v6 = *(_QWORD **)(v7[1] + 16); *v6 = a2; v6[2] = a3; v7[1] = *(_QWORD *)v7[1]; if ( *((_DWORD *)v7 + 6) <= *((_DWORD *)v7 + 7) ) { v5 = *v7; v4 = *(_QWORD *)(v7[1] + 8); while ( v5 ) { if ( (*(unsigned int ( **)(long long, _QWORD, _QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)(v7[2] + 192) + 8LL))( v7[2], **(_QWORD **)(v5 + 16), *(_QWORD *)(*(_QWORD *)(v5 + 16) + 16LL), **(_QWORD **)(v4 + 16), *(_QWORD *)(*(_QWORD *)(v4 + 16) + 16LL), 0LL) ) { return 0LL; } v5 = *(_QWORD *)(v5 + 8); v4 = *(_QWORD *)(v4 + 8); } ++*((_DWORD *)v7 + 8); } else { ++*((_DWORD *)v7 + 7); } return 0LL; }
ftb_phrase_add_word: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX MOV qword ptr [RBP + -0x28],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x38],RAX MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX],RCX MOVSXD RCX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x38] MOV qword ptr [RAX + 0x10],RCX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x30] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBP + -0x30] MOV EAX,dword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x30] CMP EAX,dword ptr [RCX + 0x1c] JBE 0x001a1466 MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX + 0x1c] ADD ECX,0x1 MOV dword ptr [RAX + 0x1c],ECX MOV dword ptr [RBP + -0x4],0x0 JMP 0x001a1523 LAB_001a1466: MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x48],RAX LAB_001a1481: CMP qword ptr [RBP + -0x40],0x0 JZ 0x001a150f MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX + 0x8] MOV RCX,qword ptr [RBP + -0x30] MOV RDI,qword ptr [RCX + 0x10] MOV RCX,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RCX] MOV RCX,qword ptr [RBP + -0x50] MOV RDX,qword ptr [RCX + 0x10] MOV RCX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RCX] MOV R8,qword ptr [RBP + -0x58] MOV R8,qword ptr [R8 + 0x10] XOR R9D,R9D CALL RAX CMP EAX,0x0 JZ 0x001a14f0 MOV dword ptr [RBP + -0x4],0x0 JMP 0x001a1523 LAB_001a14f0: JMP 0x001a14f2 LAB_001a14f2: MOV RAX,qword ptr [RBP + -0x40] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x48],RAX JMP 0x001a1481 LAB_001a150f: MOV RAX,qword ptr [RBP + -0x30] MOV ECX,dword ptr [RAX + 0x20] ADD ECX,0x1 MOV dword ptr [RAX + 0x20],ECX MOV dword ptr [RBP + -0x4],0x0 LAB_001a1523: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x60 POP RBP RET
int4 ftb_phrase_add_word(long param_1,int8 param_2,int param_3) { long *plVar1; int8 *puVar2; int iVar3; long local_50; long local_48; plVar1 = *(long **)(param_1 + 0x18); puVar2 = *(int8 **)(plVar1[1] + 0x10); *puVar2 = param_2; puVar2[2] = (long)param_3; plVar1[1] = *(long *)plVar1[1]; if (*(uint *)((long)plVar1 + 0x1c) < *(uint *)(plVar1 + 3)) { *(int *)((long)plVar1 + 0x1c) = *(int *)((long)plVar1 + 0x1c) + 1; } else { local_50 = *(long *)(plVar1[1] + 8); for (local_48 = *plVar1; local_48 != 0; local_48 = *(long *)(local_48 + 8)) { iVar3 = (**(code **)(*(long *)(plVar1[2] + 0xc0) + 8)) (plVar1[2],**(int8 **)(local_48 + 0x10), (*(int8 **)(local_48 + 0x10))[2],**(int8 **)(local_50 + 0x10), (*(int8 **)(local_50 + 0x10))[2],0); if (iVar3 != 0) { return 0; } local_50 = *(long *)(local_50 + 8); } *(int *)(plVar1 + 4) = (int)plVar1[4] + 1; } return 0; }
46,729
my_strnxfrm_unicode_full_bin_internal
eloqsql/strings/ctype-utf8.c
size_t my_strnxfrm_unicode_full_bin_internal(CHARSET_INFO *cs, uchar *dst, uchar *de, uint *nweights, const uchar *src, const uchar *se) { my_wc_t UNINIT_VAR(wc); uchar *dst0= dst; DBUG_ASSERT(src || !se); DBUG_ASSERT(cs->state & MY_CS_BINSORT); for (; dst < de && *nweights; (*nweights)--) { int res; if ((res= my_ci_mb_wc(cs, &wc, src, se)) <= 0) break; src+= res; *dst++= (uchar) (wc >> 16); if (dst < de) { *dst++= (uchar) ((wc >> 8) & 0xFF); if (dst < de) *dst++= (uchar) (wc & 0xFF); } } return dst - dst0; }
O3
c
my_strnxfrm_unicode_full_bin_internal: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r9, -0x40(%rbp) movq %rsi, %rax movq %rsi, -0x38(%rbp) cmpq %rdx, %rsi jae 0x57d09 movq %r8, %r15 movq %rcx, %r12 movq %rdx, %r13 movq %rdi, %rbx movl (%rcx), %ecx movq -0x38(%rbp), %r14 testl %ecx, %ecx je 0x57d06 movq 0xb8(%rbx), %rax movq %rbx, %rdi leaq -0x30(%rbp), %rsi movq %r15, %rdx movq -0x40(%rbp), %rcx callq *0x28(%rax) testl %eax, %eax jle 0x57d06 movl %eax, %ecx movb -0x2e(%rbp), %dl leaq 0x1(%r14), %rax movb %dl, (%r14) cmpq %r13, %rax jae 0x57ced movb -0x2f(%rbp), %dl leaq 0x2(%r14), %rax movb %dl, 0x1(%r14) cmpq %r13, %rax jae 0x57ced movb -0x30(%rbp), %al movb %al, 0x2(%r14) addq $0x3, %r14 movq %r14, %rax movl %ecx, %ecx addq %rcx, %r15 movl (%r12), %ecx decl %ecx movl %ecx, (%r12) movq %rax, %r14 cmpq %r13, %rax jb 0x57c9e jmp 0x57d09 movq %r14, %rax subq -0x38(%rbp), %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_strnxfrm_unicode_full_bin_internal: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], r9 mov rax, rsi mov [rbp+var_38], rsi cmp rsi, rdx jnb short loc_57D09 mov r15, r8 mov r12, rcx mov r13, rdx mov rbx, rdi mov ecx, [rcx] mov r14, [rbp+var_38] loc_57C9E: test ecx, ecx jz short loc_57D06 mov rax, [rbx+0B8h] mov rdi, rbx lea rsi, [rbp+var_30] mov rdx, r15 mov rcx, [rbp+var_40] call qword ptr [rax+28h] test eax, eax jle short loc_57D06 mov ecx, eax mov dl, [rbp+var_2E] lea rax, [r14+1] mov [r14], dl cmp rax, r13 jnb short loc_57CED mov dl, [rbp+var_2F] lea rax, [r14+2] mov [r14+1], dl cmp rax, r13 jnb short loc_57CED mov al, [rbp+var_30] mov [r14+2], al add r14, 3 mov rax, r14 loc_57CED: mov ecx, ecx add r15, rcx mov ecx, [r12] dec ecx mov [r12], ecx mov r14, rax cmp rax, r13 jb short loc_57C9E jmp short loc_57D09 loc_57D06: mov rax, r14 loc_57D09: sub rax, [rbp+var_38] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_strnxfrm_unicode_full_bin_internal( long long a1, _BYTE *a2, unsigned long long a3, int *a4, long long a5, long long a6) { _BYTE *v6; // rax int v10; // ecx _BYTE *v11; // r14 int v12; // eax unsigned int v13; // ecx _BYTE v16[48]; // [rsp+10h] [rbp-30h] BYREF v6 = a2; if ( (unsigned long long)a2 < a3 ) { v10 = *a4; v11 = a2; while ( v10 ) { v12 = (*(long long ( **)(long long, _BYTE *, long long, long long))(*(_QWORD *)(a1 + 184) + 40LL))( a1, v16, a5, a6); if ( v12 <= 0 ) break; v13 = v12; v6 = v11 + 1; *v11 = v16[2]; if ( (unsigned long long)(v11 + 1) < a3 ) { v6 = v11 + 2; v11[1] = v16[1]; if ( (unsigned long long)(v11 + 2) < a3 ) { v11[2] = v16[0]; v6 = v11 + 3; } } a5 += v13; v10 = *a4 - 1; *a4 = v10; v11 = v6; if ( (unsigned long long)v6 >= a3 ) return v6 - a2; } v6 = v11; } return v6 - a2; }
my_strnxfrm_unicode_full_bin_internal: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],R9 MOV RAX,RSI MOV qword ptr [RBP + -0x38],RSI CMP RSI,RDX JNC 0x00157d09 MOV R15,R8 MOV R12,RCX MOV R13,RDX MOV RBX,RDI MOV ECX,dword ptr [RCX] MOV R14,qword ptr [RBP + -0x38] LAB_00157c9e: TEST ECX,ECX JZ 0x00157d06 MOV RAX,qword ptr [RBX + 0xb8] MOV RDI,RBX LEA RSI,[RBP + -0x30] MOV RDX,R15 MOV RCX,qword ptr [RBP + -0x40] CALL qword ptr [RAX + 0x28] TEST EAX,EAX JLE 0x00157d06 MOV ECX,EAX MOV DL,byte ptr [RBP + -0x2e] LEA RAX,[R14 + 0x1] MOV byte ptr [R14],DL CMP RAX,R13 JNC 0x00157ced MOV DL,byte ptr [RBP + -0x2f] LEA RAX,[R14 + 0x2] MOV byte ptr [R14 + 0x1],DL CMP RAX,R13 JNC 0x00157ced MOV AL,byte ptr [RBP + -0x30] MOV byte ptr [R14 + 0x2],AL ADD R14,0x3 MOV RAX,R14 LAB_00157ced: MOV ECX,ECX ADD R15,RCX MOV ECX,dword ptr [R12] DEC ECX MOV dword ptr [R12],ECX MOV R14,RAX CMP RAX,R13 JC 0x00157c9e JMP 0x00157d09 LAB_00157d06: MOV RAX,R14 LAB_00157d09: SUB RAX,qword ptr [RBP + -0x38] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_strnxfrm_unicode_full_bin_internal (long param_1,int1 *param_2,int1 *param_3,int *param_4,long param_5, int8 param_6) { uint uVar1; int iVar2; int1 *puVar3; int1 *puVar4; int1 local_38; int1 local_37; int1 local_36; puVar4 = param_2; if (param_2 < param_3) { iVar2 = *param_4; puVar3 = param_2; do { puVar4 = puVar3; if ((iVar2 == 0) || (uVar1 = (**(code **)(*(long *)(param_1 + 0xb8) + 0x28))(param_1,&local_38,param_5,param_6) , (int)uVar1 < 1)) break; puVar4 = puVar3 + 1; *puVar3 = local_36; if (puVar4 < param_3) { puVar4 = puVar3 + 2; puVar3[1] = local_37; if (puVar4 < param_3) { puVar3[2] = local_38; puVar4 = puVar3 + 3; } } param_5 = param_5 + (ulong)uVar1; iVar2 = *param_4 + -1; *param_4 = iVar2; puVar3 = puVar4; } while (puVar4 < param_3); } return (long)puVar4 - (long)param_2; }
46,730
unsigned char msgpack23::Unpacker::read_integral<unsigned char, 0>()
msgpack23/include/msgpack23/msgpack23.h
[[nodiscard]] T read_integral() { if (position_ + sizeof(T) > data_.size()) { throw std::out_of_range("Unpacker doesn't have enough data."); } T result{}; std::memcpy(&result, data_.data() + position_, sizeof(T)); increment(sizeof(T)); result = from_big_endian(result); return result; }
O0
c
unsigned char msgpack23::Unpacker::read_integral<unsigned char, 0>(): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x28(%rbp) movq 0x10(%rdi), %rax addq $0x1, %rax movq %rax, -0x20(%rbp) callq 0x296e0 movq %rax, %rcx movq -0x20(%rbp), %rax cmpq %rcx, %rax jbe 0x2b751 movl $0x10, %edi callq 0x16280 movq %rax, %rdi movq %rdi, %rax movq %rax, -0x30(%rbp) leaq 0xa2ac9(%rip), %rsi # 0xce1e5 callq 0x160b0 jmp 0x2b723 movq -0x30(%rbp), %rdi movq 0x10a872(%rip), %rsi # 0x135fa0 movq 0x10a843(%rip), %rdx # 0x135f78 callq 0x16aa0 movq -0x30(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x10(%rbp) movl %eax, -0x14(%rbp) callq 0x163d0 jmp 0x2b78b movq -0x28(%rbp), %rdi movb $0x0, -0x15(%rbp) callq 0x29700 movq -0x28(%rbp), %rdi movq 0x10(%rdi), %rcx movb (%rax,%rcx), %al movb %al, -0x15(%rbp) movl $0x1, %esi callq 0x29520 movzbl -0x15(%rbp), %edi callq 0x2b7a0 movb %al, -0x15(%rbp) movb -0x15(%rbp), %al addq $0x30, %rsp popq %rbp retq movq -0x10(%rbp), %rdi callq 0x16af0 nopw %cs:(%rax,%rax) nop
_ZN9msgpack238Unpacker13read_integralIhTnNSt9enable_ifIXsr3stdE13is_unsigned_vIT_EEiE4typeELi0EEES3_v: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov rdi, [rbp+var_8] mov [rbp+var_28], rdi mov rax, [rdi+10h] add rax, 1 mov [rbp+var_20], rax call _ZNKSt4spanIKSt4byteLm18446744073709551615EE4sizeEv; std::span<std::byte const,18446744073709551615ul>::size(void) mov rcx, rax mov rax, [rbp+var_20] cmp rax, rcx jbe short loc_2B751 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rbp+var_30], rax lea rsi, aUnpackerDoesnT; "Unpacker doesn't have enough data." call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*) jmp short $+2 loc_2B723: mov rdi, [rbp+var_30]; void * mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *) call ___cxa_throw mov rdi, [rbp+var_30]; void * mov rcx, rax mov eax, edx mov [rbp+var_10], rcx mov [rbp+var_14], eax call ___cxa_free_exception jmp short loc_2B78B loc_2B751: mov rdi, [rbp+var_28] mov [rbp+var_15], 0 call _ZNKSt4spanIKSt4byteLm18446744073709551615EE4dataEv; std::span<std::byte const,18446744073709551615ul>::data(void) mov rdi, [rbp+var_28]; this mov rcx, [rdi+10h] mov al, [rax+rcx] mov [rbp+var_15], al mov esi, 1; unsigned __int64 call _ZN9msgpack238Unpacker9incrementEm; msgpack23::Unpacker::increment(ulong) movzx edi, [rbp+var_15] call _ZN9msgpack2315from_big_endianITkSt8integralhEET_S1_ mov [rbp+var_15], al mov al, [rbp+var_15] add rsp, 30h pop rbp retn loc_2B78B: mov rdi, [rbp+var_10] call __Unwind_Resume
long long ZN9msgpack238Unpacker13read_integralIhTnNSt9enable_ifIXsr3stdE13is_unsigned_vIT_EEiE4typeELi0EEES3_v( msgpack23::Unpacker *a1) { std::out_of_range *exception; // [rsp+0h] [rbp-30h] unsigned long long v3; // [rsp+10h] [rbp-20h] unsigned __int8 v4; // [rsp+1Bh] [rbp-15h] v3 = *((_QWORD *)a1 + 2) + 1LL; if ( v3 > std::span<std::byte const,18446744073709551615ul>::size((long long)a1) ) { exception = (std::out_of_range *)__cxa_allocate_exception(0x10uLL); std::out_of_range::out_of_range(exception, "Unpacker doesn't have enough data."); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::out_of_range, (void (*)(void *))&std::out_of_range::~out_of_range); } v4 = *(_BYTE *)(std::span<std::byte const,18446744073709551615ul>::data((long long)a1) + *((_QWORD *)a1 + 2)); msgpack23::Unpacker::increment(a1, 1LL); return ZN9msgpack2315from_big_endianITkSt8integralhEET_S1_(v4); }
_ZN9msgpack238Unpacker13read_integralIhTnNSt9enable_ifIXsr3stdE13is_unsigned_vIT_EEiE4typeELi0EEES3_v: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x28],RDI MOV RAX,qword ptr [RDI + 0x10] ADD RAX,0x1 MOV qword ptr [RBP + -0x20],RAX CALL 0x001296e0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] CMP RAX,RCX JBE 0x0012b751 MOV EDI,0x10 CALL 0x00116280 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RBP + -0x30],RAX LAB_0012b715: LEA RSI,[0x1ce1e5] CALL 0x001160b0 LAB_0012b721: JMP 0x0012b723 LAB_0012b723: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,qword ptr [0x00235fa0] MOV RDX,qword ptr [0x00235f78] CALL 0x00116aa0 LAB_0012b751: MOV RDI,qword ptr [RBP + -0x28] MOV byte ptr [RBP + -0x15],0x0 CALL 0x00129700 MOV RDI,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RDI + 0x10] MOV AL,byte ptr [RAX + RCX*0x1] MOV byte ptr [RBP + -0x15],AL MOV ESI,0x1 CALL 0x00129520 MOVZX EDI,byte ptr [RBP + -0x15] CALL 0x0012b7a0 MOV byte ptr [RBP + -0x15],AL MOV AL,byte ptr [RBP + -0x15] ADD RSP,0x30 POP RBP RET
int8 _ZN9msgpack238Unpacker13read_integralIhTnNSt9enable_ifIXsr3stdE13is_unsigned_vIT_EEiE4typeELi0EEES3_v (span<std::byte_const,18446744073709551615ul> *param_1) { int1 uVar1; ulong uVar2; out_of_range *this; long lVar3; int8 uVar4; lVar3 = *(long *)(param_1 + 0x10); uVar2 = std::span<std::byte_const,18446744073709551615ul>::size(param_1); if (uVar2 < lVar3 + 1U) { this = (out_of_range *)__cxa_allocate_exception(0x10); /* try { // try from 0012b715 to 0012b720 has its CatchHandler @ 0012b73a */ std::out_of_range::out_of_range(this,"Unpacker doesn\'t have enough data."); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_00235fa0,PTR__out_of_range_00235f78); } lVar3 = std::span<std::byte_const,18446744073709551615ul>::data(param_1); uVar1 = *(int1 *)(lVar3 + *(long *)(param_1 + 0x10)); msgpack23::Unpacker::increment((Unpacker *)param_1,1); uVar4 = _ZN9msgpack2315from_big_endianITkSt8integralhEET_S1_(uVar1); return uVar4; }
46,731
js_parse_expr2
bluesky950520[P]quickjs/quickjs.c
static __exception int js_parse_expr2(JSParseState *s, int parse_flags) { BOOL comma = FALSE; for(;;) { if (js_parse_assign_expr2(s, parse_flags)) return -1; if (comma) { /* prevent get_lvalue from using the last expression as an lvalue. This also prevents the conversion of of get_var to get_ref for method lookup in function call inside `with` statement. */ s->cur_func->last_opcode_pos = -1; } if (s->token.val != ',') break; comma = TRUE; if (next_token(s)) return -1; emit_op(s, OP_drop); } return 0; }
O2
c
js_parse_expr2: pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %esi, %ebp movq %rdi, %r14 movb $0x1, %r12b pushq $-0x1 popq %rbx pushq $0xe popq %r15 movq %r14, %rdi movl %ebp, %esi callq 0x5e007 testl %eax, %eax jne 0x5dffc testb $0x1, %r12b jne 0x5dfd7 movq 0x90(%r14), %rax orl $-0x1, 0x168(%rax) cmpl $0x2c, 0x20(%r14) jne 0x5dffa movq %r14, %rdi callq 0x535fe testl %eax, %eax jne 0x5dffc movq %r14, %rdi movl %r15d, %esi callq 0x535cb xorl %r12d, %r12d jmp 0x5dfb5 xorl %ebx, %ebx movl %ebx, %eax popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq
js_parse_expr2: push rbp push r15 push r14 push r12 push rbx mov ebp, esi mov r14, rdi mov r12b, 1 push 0FFFFFFFFFFFFFFFFh pop rbx push 0Eh pop r15 loc_5DFB5: mov rdi, r14 mov esi, ebp call js_parse_assign_expr2 test eax, eax jnz short loc_5DFFC test r12b, 1 jnz short loc_5DFD7 mov rax, [r14+90h] or dword ptr [rax+168h], 0FFFFFFFFh loc_5DFD7: cmp dword ptr [r14+20h], 2Ch ; ',' jnz short loc_5DFFA mov rdi, r14 call next_token test eax, eax jnz short loc_5DFFC mov rdi, r14 mov esi, r15d call emit_op xor r12d, r12d jmp short loc_5DFB5 loc_5DFFA: xor ebx, ebx loc_5DFFC: mov eax, ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn
long long js_parse_expr2( long long a1, unsigned int a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { char v10; // r12 unsigned int v11; // ebx long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 v10 = 1; v11 = -1; while ( !(unsigned int)js_parse_assign_expr2(a1, a2) ) { if ( (v10 & 1) == 0 ) *(_DWORD *)(*(_QWORD *)(a1 + 144) + 360LL) = -1; if ( *(_DWORD *)(a1 + 32) != 44 ) return 0; if ( (unsigned int)next_token(a1, a2, v12, a3, a4, a5, a6, v16, v17, a9, a10, v13, v14, v15) ) return v11; emit_op(a1, 14); v10 = 0; } return v11; }
js_parse_expr2: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EBP,ESI MOV R14,RDI MOV R12B,0x1 PUSH -0x1 POP RBX PUSH 0xe POP R15 LAB_0015dfb5: MOV RDI,R14 MOV ESI,EBP CALL 0x0015e007 TEST EAX,EAX JNZ 0x0015dffc TEST R12B,0x1 JNZ 0x0015dfd7 MOV RAX,qword ptr [R14 + 0x90] OR dword ptr [RAX + 0x168],0xffffffff LAB_0015dfd7: CMP dword ptr [R14 + 0x20],0x2c JNZ 0x0015dffa MOV RDI,R14 CALL 0x001535fe TEST EAX,EAX JNZ 0x0015dffc MOV RDI,R14 MOV ESI,R15D CALL 0x001535cb XOR R12D,R12D JMP 0x0015dfb5 LAB_0015dffa: XOR EBX,EBX LAB_0015dffc: MOV EAX,EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET
int4 js_parse_expr2(long param_1,int4 param_2) { int iVar1; bool bVar2; bVar2 = true; while( true ) { iVar1 = js_parse_assign_expr2(param_1,param_2); if (iVar1 != 0) { return 0xffffffff; } if (!bVar2) { *(int4 *)(*(long *)(param_1 + 0x90) + 0x168) = 0xffffffff; } if (*(int *)(param_1 + 0x20) != 0x2c) break; iVar1 = next_token(param_1); if (iVar1 != 0) { return 0xffffffff; } emit_op(param_1,0xe); bVar2 = false; } return 0; }
46,732
rtree_fill_reinsert_list
eloqsql/storage/myisam/rt_index.c
static int rtree_fill_reinsert_list(stPageList *ReinsertList, my_off_t page, int level) { DBUG_ENTER("rtree_fill_reinsert_list"); DBUG_PRINT("rtree", ("page: %lu level: %d", (ulong) page, level)); if (ReinsertList->n_pages == ReinsertList->m_pages) { ReinsertList->m_pages += REINSERT_BUFFER_INC; if (!(ReinsertList->pages = (stPageLevel*) my_realloc(mi_key_memory_stPageList_pages, (uchar*)ReinsertList->pages, ReinsertList->m_pages * sizeof(stPageLevel), MYF(MY_ALLOW_ZERO_PTR)))) goto err1; } /* save page to ReinsertList */ ReinsertList->pages[ReinsertList->n_pages].offs = page; ReinsertList->pages[ReinsertList->n_pages].level = level; ReinsertList->n_pages++; DBUG_RETURN(0); err1: DBUG_RETURN(-1); /* purecov: inspected */ }
O0
c
rtree_fill_reinsert_list: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) jmp 0xee295 movq -0x10(%rbp), %rax movq (%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x8(%rcx), %rax jne 0xee2ef movq -0x10(%rbp), %rax movq 0x8(%rax), %rcx addq $0xa, %rcx movq %rcx, 0x8(%rax) leaq 0xbc181f(%rip), %rax # 0xcafadc movl (%rax), %edi movq -0x10(%rbp), %rax movq 0x10(%rax), %rsi movq -0x10(%rbp), %rax movq 0x8(%rax), %rdx shlq $0x4, %rdx movl $0x40, %ecx callq 0x11f860 movq -0x10(%rbp), %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax jne 0xee2ed jmp 0xee33f jmp 0xee2ef movq -0x18(%rbp), %rcx movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rdx movq (%rdx), %rdx shlq $0x4, %rdx addq %rdx, %rax movq %rcx, 0x8(%rax) movl -0x1c(%rbp), %ecx movq -0x10(%rbp), %rax movq 0x10(%rax), %rax movq -0x10(%rbp), %rdx movq (%rdx), %rdx shlq $0x4, %rdx addq %rdx, %rax movl %ecx, (%rax) movq -0x10(%rbp), %rax movq (%rax), %rcx addq $0x1, %rcx movq %rcx, (%rax) movl $0x0, -0x4(%rbp) jmp 0xee348 jmp 0xee341 movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF movl -0x4(%rbp), %eax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax,%rax)
rtree_fill_reinsert_list: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx jmp short $+2 loc_EE295: mov rax, [rbp+var_10] mov rax, [rax] mov rcx, [rbp+var_10] cmp rax, [rcx+8] jnz short loc_EE2EF mov rax, [rbp+var_10] mov rcx, [rax+8] add rcx, 0Ah mov [rax+8], rcx lea rax, mi_key_memory_stPageList_pages mov edi, [rax] mov rax, [rbp+var_10] mov rsi, [rax+10h] mov rax, [rbp+var_10] mov rdx, [rax+8] shl rdx, 4 mov ecx, 40h ; '@' call my_realloc mov rcx, [rbp+var_10] mov [rcx+10h], rax cmp rax, 0 jnz short loc_EE2ED jmp short loc_EE33F loc_EE2ED: jmp short $+2 loc_EE2EF: mov rcx, [rbp+var_18] mov rax, [rbp+var_10] mov rax, [rax+10h] mov rdx, [rbp+var_10] mov rdx, [rdx] shl rdx, 4 add rax, rdx mov [rax+8], rcx mov ecx, [rbp+var_1C] mov rax, [rbp+var_10] mov rax, [rax+10h] mov rdx, [rbp+var_10] mov rdx, [rdx] shl rdx, 4 add rax, rdx mov [rax], ecx mov rax, [rbp+var_10] mov rcx, [rax] add rcx, 1 mov [rax], rcx mov [rbp+var_4], 0 jmp short loc_EE348 loc_EE33F: jmp short $+2 loc_EE341: mov [rbp+var_4], 0FFFFFFFFh loc_EE348: mov eax, [rbp+var_4] add rsp, 20h pop rbp retn
long long rtree_fill_reinsert_list(_QWORD *a1, long long a2, int a3) { long long v3; // rax if ( *a1 == a1[1] && (a1[1] += 10LL, v3 = my_realloc(mi_key_memory_stPageList_pages, a1[2], 16LL * a1[1], 64LL), (a1[2] = v3) == 0LL) ) { return (unsigned int)-1; } else { *(_QWORD *)(16LL * *a1 + a1[2] + 8) = a2; *(_DWORD *)(16LL * (*a1)++ + a1[2]) = a3; return 0; } }
rtree_fill_reinsert_list: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV dword ptr [RBP + -0x1c],EDX JMP 0x001ee295 LAB_001ee295: MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x8] JNZ 0x001ee2ef MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x8] ADD RCX,0xa MOV qword ptr [RAX + 0x8],RCX LEA RAX,[0xdafadc] MOV EDI,dword ptr [RAX] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x8] SHL RDX,0x4 MOV ECX,0x40 CALL 0x0021f860 MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JNZ 0x001ee2ed JMP 0x001ee33f LAB_001ee2ed: JMP 0x001ee2ef LAB_001ee2ef: MOV RCX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RDX] SHL RDX,0x4 ADD RAX,RDX MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RBP + -0x1c] MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RDX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RDX] SHL RDX,0x4 ADD RAX,RDX MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX] ADD RCX,0x1 MOV qword ptr [RAX],RCX MOV dword ptr [RBP + -0x4],0x0 JMP 0x001ee348 LAB_001ee33f: JMP 0x001ee341 LAB_001ee341: MOV dword ptr [RBP + -0x4],0xffffffff LAB_001ee348: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x20 POP RBP RET
int4 rtree_fill_reinsert_list(long *param_1,int8 param_2,int4 param_3) { long lVar1; if (*param_1 == param_1[1]) { param_1[1] = param_1[1] + 10; lVar1 = my_realloc(mi_key_memory_stPageList_pages,param_1[2],param_1[1] << 4,0x40); param_1[2] = lVar1; if (lVar1 == 0) { return 0xffffffff; } } *(int8 *)(param_1[2] + *param_1 * 0x10 + 8) = param_2; *(int4 *)(param_1[2] + *param_1 * 0x10) = param_3; *param_1 = *param_1 + 1; return 0; }
46,733
cr_union1
bluesky950520[P]quickjs/libunicode.c
int cr_union1(CharRange *cr, const uint32_t *b_pt, int b_len) { CharRange a = *cr; int ret; cr->len = 0; cr->size = 0; cr->points = NULL; ret = cr_op(cr, a.points, a.len, b_pt, b_len, CR_OP_UNION); cr_free(&a); return ret; }
O1
c
cr_union1: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %r8d movq %rsi, %rcx movl (%rdi), %edx movq 0x8(%rdi), %rbx movq 0x10(%rdi), %r14 movq 0x18(%rdi), %r15 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rbx, %rsi xorl %r9d, %r9d callq 0x986fe movl %eax, %ebp movq %r14, %rdi movq %rbx, %rsi xorl %edx, %edx callq *%r15 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
cr_union1: push rbp push r15 push r14 push rbx push rax mov r8d, edx mov rcx, rsi mov edx, [rdi] mov rbx, [rdi+8] mov r14, [rdi+10h] mov r15, [rdi+18h] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov rsi, rbx xor r9d, r9d call cr_op mov ebp, eax mov rdi, r14 mov rsi, rbx xor edx, edx call r15 mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long cr_union1(unsigned long long a1, long long a2, int a3) { int v4; // edx long long v5; // rbx long long v6; // r14 void ( *v7)(long long, long long, _QWORD); // r15 unsigned int v8; // ebp v4 = *(_DWORD *)a1; v5 = *(_QWORD *)(a1 + 8); v6 = *(_QWORD *)(a1 + 16); v7 = *(void ( **)(long long, long long, _QWORD))(a1 + 24); *(_OWORD *)a1 = 0LL; v8 = cr_op(a1, v5, v4, a2, a3, 0); v7(v6, v5, 0LL); return v8; }
cr_union1: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R8D,EDX MOV RCX,RSI MOV EDX,dword ptr [RDI] MOV RBX,qword ptr [RDI + 0x8] MOV R14,qword ptr [RDI + 0x10] MOV R15,qword ptr [RDI + 0x18] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV RSI,RBX XOR R9D,R9D CALL 0x001986fe MOV EBP,EAX MOV RDI,R14 MOV RSI,RBX XOR EDX,EDX CALL R15 MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 cr_union1(int8 *param_1,int8 param_2,int4 param_3) { int8 uVar1; int8 uVar2; code *pcVar3; int4 uVar4; uVar4 = *(int4 *)param_1; uVar1 = param_1[1]; uVar2 = param_1[2]; pcVar3 = (code *)param_1[3]; *param_1 = 0; param_1[1] = 0; uVar4 = cr_op(param_1,uVar1,uVar4,param_2,param_3,0); (*pcVar3)(uVar2,uVar1,0); return uVar4; }
46,734
cr_union1
bluesky950520[P]quickjs/libunicode.c
int cr_union1(CharRange *cr, const uint32_t *b_pt, int b_len) { CharRange a = *cr; int ret; cr->len = 0; cr->size = 0; cr->points = NULL; ret = cr_op(cr, a.points, a.len, b_pt, b_len, CR_OP_UNION); cr_free(&a); return ret; }
O2
c
cr_union1: pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax movl %edx, %r8d movq %rsi, %rcx movl (%rdi), %edx movq 0x8(%rdi), %rbx movq 0x10(%rdi), %r14 movq 0x18(%rdi), %r15 xorps %xmm0, %xmm0 movups %xmm0, (%rdi) movq %rbx, %rsi xorl %r9d, %r9d callq 0x7f4b5 movl %eax, %ebp movq %r14, %rdi movq %rbx, %rsi xorl %edx, %edx callq *%r15 movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq
cr_union1: push rbp push r15 push r14 push rbx push rax mov r8d, edx mov rcx, rsi mov edx, [rdi] mov rbx, [rdi+8] mov r14, [rdi+10h] mov r15, [rdi+18h] xorps xmm0, xmm0 movups xmmword ptr [rdi], xmm0 mov rsi, rbx xor r9d, r9d call cr_op mov ebp, eax mov rdi, r14 mov rsi, rbx xor edx, edx call r15 mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long cr_union1(long long a1, long long a2, int a3) { int v4; // edx long long v5; // rbx long long v6; // r14 void ( *v7)(long long, long long, _QWORD); // r15 unsigned int v8; // ebp v4 = *(_DWORD *)a1; v5 = *(_QWORD *)(a1 + 8); v6 = *(_QWORD *)(a1 + 16); v7 = *(void ( **)(long long, long long, _QWORD))(a1 + 24); *(_OWORD *)a1 = 0LL; v8 = cr_op((const char *)a1, v5, v4, a2, a3, 0); v7(v6, v5, 0LL); return v8; }
cr_union1: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX MOV R8D,EDX MOV RCX,RSI MOV EDX,dword ptr [RDI] MOV RBX,qword ptr [RDI + 0x8] MOV R14,qword ptr [RDI + 0x10] MOV R15,qword ptr [RDI + 0x18] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI],XMM0 MOV RSI,RBX XOR R9D,R9D CALL 0x0017f4b5 MOV EBP,EAX MOV RDI,R14 MOV RSI,RBX XOR EDX,EDX CALL R15 MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
int4 cr_union1(int8 *param_1,int8 param_2,int4 param_3) { int8 uVar1; int8 uVar2; code *pcVar3; int4 uVar4; uVar4 = *(int4 *)param_1; uVar1 = param_1[1]; uVar2 = param_1[2]; pcVar3 = (code *)param_1[3]; *param_1 = 0; param_1[1] = 0; uVar4 = cr_op(param_1,uVar1,uVar4,param_2,param_3,0); (*pcVar3)(uVar2,uVar1,0); return uVar4; }
46,735
coro::detail::sync_wait_event::wait()
AlayaLite/build_O3/_deps/libcoro-src/src/sync_wait.cpp
auto sync_wait_event::wait() noexcept -> void { std::unique_lock<std::mutex> lk{m_mutex}; m_cv.wait(lk, [this] { return m_set.load(std::memory_order::seq_cst); }); }
O3
cpp
coro::detail::sync_wait_event::wait(): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdi, %rbx movq %rsp, %rdi movq %rbx, (%rdi) movb $0x0, 0x8(%rdi) callq 0x5454 movb $0x1, 0x8(%rsp) movb 0x58(%rbx), %al testb $0x1, %al jne 0x5424 leaq 0x28(%rbx), %r14 movq %rsp, %r15 movq %r14, %rdi movq %r15, %rsi callq 0x30a0 movb 0x58(%rbx), %al testb $0x1, %al je 0x5412 movq %rsp, %rdi callq 0x543e addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rdi callq 0x45a6
_ZN4coro6detail15sync_wait_event4waitEv: push r15 push r14 push rbx sub rsp, 10h mov rbx, rdi mov rdi, rsp mov [rdi], rbx mov byte ptr [rdi+8], 0 call _ZNSt11unique_lockISt5mutexE4lockEv; std::unique_lock<std::mutex>::lock(void) mov [rsp+28h+var_20], 1 mov al, [rbx+58h] test al, 1 jnz short loc_5424 lea r14, [rbx+28h] mov r15, rsp loc_5412: mov rdi, r14 mov rsi, r15 call __ZNSt18condition_variable4waitERSt11unique_lockISt5mutexE; std::condition_variable::wait(std::unique_lock<std::mutex> &) mov al, [rbx+58h] test al, 1 jz short loc_5412 loc_5424: mov rdi, rsp call _ZNSt11unique_lockISt5mutexED2Ev; std::unique_lock<std::mutex>::~unique_lock() add rsp, 10h pop rbx pop r14 pop r15 retn mov rdi, rax call __clang_call_terminate
long long coro::detail::sync_wait_event::wait(coro::detail::sync_wait_event *this, long long a2) { coro::detail::sync_wait_event *v3; // [rsp+0h] [rbp-28h] BYREF char v4; // [rsp+8h] [rbp-20h] v3 = this; v4 = 0; std::unique_lock<std::mutex>::lock(&v3, a2); v4 = 1; while ( (*((_BYTE *)this + 88) & 1) == 0 ) std::condition_variable::wait((char *)this + 40, &v3); return std::unique_lock<std::mutex>::~unique_lock(&v3); }
wait: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDI MOV RDI,RSP MOV qword ptr [RDI],RBX MOV byte ptr [RDI + 0x8],0x0 LAB_001053fa: CALL 0x00105454 MOV byte ptr [RSP + 0x8],0x1 MOV AL,byte ptr [RBX + 0x58] TEST AL,0x1 JNZ 0x00105424 LEA R14,[RBX + 0x28] MOV R15,RSP LAB_00105412: MOV RDI,R14 MOV RSI,R15 CALL 0x001030a0 MOV AL,byte ptr [RBX + 0x58] TEST AL,0x1 JZ 0x00105412 LAB_00105424: MOV RDI,RSP CALL 0x0010543e ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* coro::detail::sync_wait_event::wait() */ void __thiscall coro::detail::sync_wait_event::wait(sync_wait_event *this) { sync_wait_event *local_28; int1 local_20; local_20 = 0; local_28 = this; /* try { // try from 001053fa to 001053fe has its CatchHandler @ 00105436 */ std::unique_lock<std::mutex>::lock(); local_20 = 1; if (((byte)this[0x58] & 1) == 0) { do { std::condition_variable::wait((unique_lock *)(this + 0x28)); } while (((byte)this[0x58] & 1) == 0); } std::unique_lock<std::mutex>::~unique_lock((unique_lock<std::mutex> *)&local_28); return; }
46,736
my_error_unregister_all
eloqsql/mysys/my_error.c
void my_error_unregister_all(void) { struct my_err_head *cursor, *saved_next; for (cursor= my_errmsgs_globerrs.meh_next; cursor != NULL; cursor= saved_next) { /* We need this ptr, but we're about to free its container, so save it. */ saved_next= cursor->meh_next; my_free(cursor); } my_errmsgs_globerrs.meh_next= NULL; /* Freed in first iteration above. */ my_errmsgs_list= &my_errmsgs_globerrs; }
O3
c
my_error_unregister_all: movq 0x2c5503(%rip), %rdi # 0x2f6d10 testq %rdi, %rdi je 0x3182e pushq %rbp movq %rsp, %rbp pushq %rbx pushq %rax movq (%rdi), %rbx callq 0x2bd7e movq %rbx, %rdi testq %rbx, %rbx jne 0x31818 addq $0x8, %rsp popq %rbx popq %rbp movq $0x0, 0x2c54d7(%rip) # 0x2f6d10 leaq 0x2c54d0(%rip), %rax # 0x2f6d10 movq %rax, 0x2c54c1(%rip) # 0x2f6d08 retq
my_error_unregister_all: mov rdi, cs:my_errmsgs_globerrs test rdi, rdi jz short loc_3182E push rbp mov rbp, rsp push rbx push rax loc_31818: mov rbx, [rdi] call my_free mov rdi, rbx test rbx, rbx jnz short loc_31818 add rsp, 8 pop rbx pop rbp loc_3182E: mov cs:my_errmsgs_globerrs, 0 lea rax, my_errmsgs_globerrs mov cs:my_errmsgs_list, rax retn
long long *my_error_unregister_all() { _QWORD *v0; // rdi _QWORD *v1; // rbx long long *result; // rax v0 = (_QWORD *)my_errmsgs_globerrs; if ( my_errmsgs_globerrs ) { do { v1 = (_QWORD *)*v0; my_free((long long)v0); v0 = v1; } while ( v1 ); } my_errmsgs_globerrs = 0LL; result = &my_errmsgs_globerrs; my_errmsgs_list = &my_errmsgs_globerrs; return result; }
my_error_unregister_all: MOV RDI,qword ptr [0x003f6d10] TEST RDI,RDI JZ 0x0013182e PUSH RBP MOV RBP,RSP PUSH RBX PUSH RAX LAB_00131818: MOV RBX,qword ptr [RDI] CALL 0x0012bd7e MOV RDI,RBX TEST RBX,RBX JNZ 0x00131818 ADD RSP,0x8 POP RBX POP RBP LAB_0013182e: MOV qword ptr [0x003f6d10],0x0 LEA RAX,[0x3f6d10] MOV qword ptr [0x003f6d08],RAX RET
void my_error_unregister_all(void) { long *plVar1; plVar1 = my_errmsgs_globerrs; if (my_errmsgs_globerrs != (long *)0x0) { do { plVar1 = (long *)*plVar1; my_free(); } while (plVar1 != (long *)0x0); } my_errmsgs_globerrs = (long *)0x0; my_errmsgs_list = (int *)&my_errmsgs_globerrs; return; }
46,737
my_getcputime
eloqsql/mysys/my_getsystime.c
ulonglong my_getcputime() { #ifdef CLOCK_THREAD_CPUTIME_ID struct timespec tp; if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &tp)) return 0; return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100; #elif defined(__NR_clock_gettime) struct timespec tp; if (syscall(__NR_clock_gettime, CLOCK_THREAD_CPUTIME_ID, &tp)) return 0; return (ulonglong)tp.tv_sec*10000000+(ulonglong)tp.tv_nsec/100; #endif /* CLOCK_THREAD_CPUTIME_ID */ return 0; }
O0
c
my_getcputime: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl $0x3, %edi leaq -0x18(%rbp), %rsi callq 0x2a2d0 cmpl $0x0, %eax je 0xf62e5 movq $0x0, -0x8(%rbp) jmp 0xf630d imulq $0x989680, -0x18(%rbp), %rax # imm = 0x989680 movq %rax, -0x20(%rbp) movq -0x10(%rbp), %rax movl $0x64, %ecx xorl %edx, %edx divq %rcx movq %rax, %rcx movq -0x20(%rbp), %rax addq %rcx, %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
my_getcputime: push rbp mov rbp, rsp sub rsp, 20h mov edi, 3 lea rsi, [rbp+var_18] call _clock_gettime cmp eax, 0 jz short loc_F62E5 mov [rbp+var_8], 0 jmp short loc_F630D loc_F62E5: imul rax, [rbp+var_18], 989680h mov [rbp+var_20], rax mov rax, [rbp+var_10] mov ecx, 64h ; 'd' xor edx, edx div rcx mov rcx, rax mov rax, [rbp+var_20] add rax, rcx mov [rbp+var_8], rax loc_F630D: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
unsigned long long my_getcputime() { long long v1; // [rsp+8h] [rbp-18h] BYREF unsigned long long v2; // [rsp+10h] [rbp-10h] if ( (unsigned int)clock_gettime(3LL, &v1) ) return 0LL; else return v2 / 0x64 + 10000000 * v1; }
my_getcputime: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV EDI,0x3 LEA RSI,[RBP + -0x18] CALL 0x0012a2d0 CMP EAX,0x0 JZ 0x001f62e5 MOV qword ptr [RBP + -0x8],0x0 JMP 0x001f630d LAB_001f62e5: IMUL RAX,qword ptr [RBP + -0x18],0x989680 MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x10] MOV ECX,0x64 XOR EDX,EDX DIV RCX MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x20] ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX LAB_001f630d: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
long my_getcputime(void) { int iVar1; timespec local_20; long local_10; iVar1 = clock_gettime(3,&local_20); if (iVar1 == 0) { local_10 = local_20.tv_sec * 10000000 + (ulong)local_20.tv_nsec / 100; } else { local_10 = 0; } return local_10; }
46,738
lookup_setup_actor(PFS_thread*, char const*, unsigned int, char const*, unsigned int, bool*, bool*)
eloqsql/storage/perfschema/pfs_setup_actor.cc
void lookup_setup_actor(PFS_thread *thread, const char *user, uint user_length, const char *host, uint host_length, bool *enabled, bool *history) { PFS_setup_actor_key key; PFS_setup_actor **entry; int i; LF_PINS* pins= get_setup_actor_hash_pins(thread); if (unlikely(pins == NULL)) { *enabled= false; *history= false; return; } for (i= 1; i<=4; i++) { /* WL#988 Roles is not implemented, so we do not have a role name. Looking up "%" in SETUP_ACTORS.ROLE. */ switch(i) { case 1: set_setup_actor_key(&key, user, user_length, host, host_length, "%", 1); break; case 2: set_setup_actor_key(&key, user, user_length, "%", 1, "%", 1); break; case 3: set_setup_actor_key(&key, "%", 1, host, host_length, "%", 1); break; case 4: set_setup_actor_key(&key, "%", 1, "%", 1, "%", 1); break; } entry= reinterpret_cast<PFS_setup_actor**> (lf_hash_search(&setup_actor_hash, pins, key.m_hash_key, key.m_key_length)); if (entry && (entry != MY_ERRPTR)) { PFS_setup_actor *pfs= *entry; lf_hash_search_unpin(pins); *enabled= pfs->m_enabled; *history= pfs->m_history; return; } lf_hash_search_unpin(pins); } *enabled= false; *history= false; return; }
O0
cpp
lookup_setup_actor(PFS_thread*, char const*, unsigned int, char const*, unsigned int, bool*, bool*): pushq %rbp movq %rsp, %rbp subq $0x340, %rsp # imm = 0x340 movq 0x10(%rbp), %rax movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x2d8(%rbp) movq %rsi, -0x2e0(%rbp) movl %edx, -0x2e4(%rbp) movq %rcx, -0x2f0(%rbp) movl %r8d, -0x2f4(%rbp) movq %r9, -0x300(%rbp) movq -0x2d8(%rbp), %rdi callq 0x47c40 movq %rax, -0x318(%rbp) cmpq $0x0, -0x318(%rbp) sete %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x48173 movq -0x300(%rbp), %rax movb $0x0, (%rax) movq 0x10(%rbp), %rax movb $0x0, (%rax) jmp 0x4836b movl $0x1, -0x30c(%rbp) cmpl $0x4, -0x30c(%rbp) jg 0x4835a movl -0x30c(%rbp), %eax decl %eax movl %eax, %ecx movq %rcx, -0x338(%rbp) subl $0x3, %eax ja 0x48282 movq -0x338(%rbp), %rax leaq 0x6bd06(%rip), %rcx # 0xb3eb8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq -0x2e0(%rbp), %rsi movl -0x2e4(%rbp), %edx movq -0x2f0(%rbp), %rcx movl -0x2f4(%rbp), %r8d leaq -0x2d0(%rbp), %rdi leaq 0x66ff5(%rip), %r9 # 0xaf1d9 movl $0x1, (%rsp) callq 0x47cb0 jmp 0x48282 movq -0x2e0(%rbp), %rsi movl -0x2e4(%rbp), %edx leaq -0x2d0(%rbp), %rdi leaq 0x66fc9(%rip), %r9 # 0xaf1d9 movl $0x1, %r8d movq %r9, %rcx movl $0x1, (%rsp) callq 0x47cb0 jmp 0x48282 movq -0x2f0(%rbp), %rcx movl -0x2f4(%rbp), %r8d leaq -0x2d0(%rbp), %rdi leaq 0x66f96(%rip), %r9 # 0xaf1d9 movl $0x1, %edx movq %r9, %rsi movl $0x1, (%rsp) callq 0x47cb0 jmp 0x48282 leaq -0x2d0(%rbp), %rdi leaq 0x66f72(%rip), %r9 # 0xaf1d9 movl $0x1, %r8d movq %r9, %rsi movl %r8d, %edx movq %r9, %rcx movl $0x1, (%rsp) callq 0x47cb0 movq -0x318(%rbp), %rsi leaq -0x2d0(%rbp), %rdx movl -0xc(%rbp), %ecx leaq 0x3c71e6(%rip), %rdi # 0x40f480 callq 0x5da70 movq %rax, -0x308(%rbp) cmpq $0x0, -0x308(%rbp) je 0x48321 movl $0x1, %eax cmpq %rax, -0x308(%rbp) je 0x48321 movq -0x308(%rbp), %rax movq (%rax), %rax movq %rax, -0x320(%rbp) jmp 0x482d1 jmp 0x482d3 movq -0x318(%rbp), %rcx movq $0x0, -0x328(%rbp) movq -0x328(%rbp), %rax xchgq %rax, 0x10(%rcx) movq -0x320(%rbp), %rax movb 0x2fc(%rax), %cl movq -0x300(%rbp), %rax andb $0x1, %cl movb %cl, (%rax) movq -0x320(%rbp), %rax movb 0x2fd(%rax), %cl movq 0x10(%rbp), %rax andb $0x1, %cl movb %cl, (%rax) jmp 0x4836b jmp 0x48323 jmp 0x48325 jmp 0x48327 movq -0x318(%rbp), %rcx movq $0x0, -0x330(%rbp) movq -0x330(%rbp), %rax xchgq %rax, 0x10(%rcx) jmp 0x48346 movl -0x30c(%rbp), %eax addl $0x1, %eax movl %eax, -0x30c(%rbp) jmp 0x4817d movq -0x300(%rbp), %rax movb $0x0, (%rax) movq 0x10(%rbp), %rax movb $0x0, (%rax) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x48386 addq $0x340, %rsp # imm = 0x340 popq %rbp retq callq 0x26360 nopl (%rax,%rax)
_Z18lookup_setup_actorP10PFS_threadPKcjS2_jPbS3_: push rbp mov rbp, rsp sub rsp, 340h mov rax, [rbp+arg_0] mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_2D8], rdi mov [rbp+var_2E0], rsi mov [rbp+var_2E4], edx mov [rbp+var_2F0], rcx mov [rbp+var_2F4], r8d mov [rbp+var_300], r9 mov rdi, [rbp+var_2D8]; PFS_thread * call _ZL25get_setup_actor_hash_pinsP10PFS_thread; get_setup_actor_hash_pins(PFS_thread *) mov [rbp+var_318], rax cmp [rbp+var_318], 0 setz al and al, 1 movzx eax, al cmp eax, 0 jz short loc_48173 mov rax, [rbp+var_300] mov byte ptr [rax], 0 mov rax, [rbp+arg_0] mov byte ptr [rax], 0 jmp loc_4836B loc_48173: mov [rbp+var_30C], 1 loc_4817D: cmp [rbp+var_30C], 4 jg loc_4835A mov eax, [rbp+var_30C] dec eax; switch 4 cases mov ecx, eax mov [rbp+var_338], rcx sub eax, 3 ja def_481B9; jumptable 00000000000481B9 default case mov rax, [rbp+var_338] lea rcx, jpt_481B9 movsxd rax, ds:(jpt_481B9 - 0B3EB8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_481BB: mov rsi, [rbp+var_2E0]; jumptable 00000000000481B9 case 1 mov edx, [rbp+var_2E4] mov rcx, [rbp+var_2F0] mov r8d, [rbp+var_2F4] lea rdi, [rbp+var_2D0] lea r9, asc_AF1D9; "%" mov [rsp+340h+var_340], 1 call _ZL19set_setup_actor_keyP19PFS_setup_actor_keyPKcjS2_jS2_j; set_setup_actor_key(PFS_setup_actor_key *,char const*,uint,char const*,uint,char const*,uint) jmp def_481B9; jumptable 00000000000481B9 default case loc_481F5: mov rsi, [rbp+var_2E0]; jumptable 00000000000481B9 case 2 mov edx, [rbp+var_2E4] lea rdi, [rbp+var_2D0] lea r9, asc_AF1D9; "%" mov r8d, 1 mov rcx, r9 mov [rsp+340h+var_340], 1 call _ZL19set_setup_actor_keyP19PFS_setup_actor_keyPKcjS2_jS2_j; set_setup_actor_key(PFS_setup_actor_key *,char const*,uint,char const*,uint,char const*,uint) jmp short def_481B9; jumptable 00000000000481B9 default case loc_48227: mov rcx, [rbp+var_2F0]; jumptable 00000000000481B9 case 3 mov r8d, [rbp+var_2F4] lea rdi, [rbp+var_2D0] lea r9, asc_AF1D9; "%" mov edx, 1 mov rsi, r9 mov [rsp+340h+var_340], 1 call _ZL19set_setup_actor_keyP19PFS_setup_actor_keyPKcjS2_jS2_j; set_setup_actor_key(PFS_setup_actor_key *,char const*,uint,char const*,uint,char const*,uint) jmp short def_481B9; jumptable 00000000000481B9 default case loc_48259: lea rdi, [rbp+var_2D0]; jumptable 00000000000481B9 case 4 lea r9, asc_AF1D9; "%" mov r8d, 1 mov rsi, r9 mov edx, r8d mov rcx, r9 mov [rsp+340h+var_340], 1 call _ZL19set_setup_actor_keyP19PFS_setup_actor_keyPKcjS2_jS2_j; set_setup_actor_key(PFS_setup_actor_key *,char const*,uint,char const*,uint,char const*,uint) def_481B9: mov rsi, [rbp+var_318]; jumptable 00000000000481B9 default case lea rdx, [rbp+var_2D0] mov ecx, [rbp+var_C] lea rdi, setup_actor_hash call lf_hash_search mov [rbp+var_308], rax cmp [rbp+var_308], 0 jz short loc_48321 mov eax, 1 cmp [rbp+var_308], rax jz short loc_48321 mov rax, [rbp+var_308] mov rax, [rax] mov [rbp+var_320], rax jmp short $+2 loc_482D1: jmp short $+2 loc_482D3: mov rcx, [rbp+var_318] mov [rbp+var_328], 0 mov rax, [rbp+var_328] xchg rax, [rcx+10h] mov rax, [rbp+var_320] mov cl, [rax+2FCh] mov rax, [rbp+var_300] and cl, 1 mov [rax], cl mov rax, [rbp+var_320] mov cl, [rax+2FDh] mov rax, [rbp+arg_0] and cl, 1 mov [rax], cl jmp short loc_4836B loc_48321: jmp short $+2 loc_48323: jmp short $+2 loc_48325: jmp short $+2 loc_48327: mov rcx, [rbp+var_318] mov [rbp+var_330], 0 mov rax, [rbp+var_330] xchg rax, [rcx+10h] jmp short $+2 loc_48346: mov eax, [rbp+var_30C] add eax, 1 mov [rbp+var_30C], eax jmp loc_4817D loc_4835A: mov rax, [rbp+var_300] mov byte ptr [rax], 0 mov rax, [rbp+arg_0] mov byte ptr [rax], 0 loc_4836B: mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_48386 add rsp, 340h pop rbp retn loc_48386: call ___stack_chk_fail
unsigned long long lookup_setup_actor( PFS_thread *a1, const char *a2, unsigned int a3, const char *a4, unsigned int a5, bool *a6, bool *a7) { long long v8; // [rsp+20h] [rbp-320h] long long setup_actor_hash_pins; // [rsp+28h] [rbp-318h] int i; // [rsp+34h] [rbp-30Ch] long long *v11; // [rsp+38h] [rbp-308h] _BYTE v16[708]; // [rsp+70h] [rbp-2D0h] BYREF unsigned int v17; // [rsp+334h] [rbp-Ch] unsigned long long v18; // [rsp+338h] [rbp-8h] v18 = __readfsqword(0x28u); setup_actor_hash_pins = get_setup_actor_hash_pins(a1); if ( setup_actor_hash_pins ) { for ( i = 1; i <= 4; ++i ) { switch ( i ) { case 1: set_setup_actor_key((long long)v16, (long long)a2, a3, (long long)a4, a5, (long long)"%", 1u); break; case 2: set_setup_actor_key((long long)v16, (long long)a2, a3, (long long)"%", 1u, (long long)"%", 1u); break; case 3: set_setup_actor_key((long long)v16, (long long)"%", 1u, (long long)a4, a5, (long long)"%", 1u); break; case 4: set_setup_actor_key((long long)v16, (long long)"%", 1u, (long long)"%", 1u, (long long)"%", 1u); break; default: break; } v11 = (long long *)lf_hash_search(&setup_actor_hash, setup_actor_hash_pins, v16, v17); if ( (unsigned long long)v11 >= 2 ) { v8 = *v11; _InterlockedExchange64((volatile long long *)(setup_actor_hash_pins + 16), 0LL); *a6 = *(_BYTE *)(v8 + 764) & 1; *a7 = *(_BYTE *)(v8 + 765) & 1; return __readfsqword(0x28u); } _InterlockedExchange64((volatile long long *)(setup_actor_hash_pins + 16), 0LL); } *a6 = 0; *a7 = 0; } else { *a6 = 0; *a7 = 0; } return __readfsqword(0x28u); }
lookup_setup_actor: PUSH RBP MOV RBP,RSP SUB RSP,0x340 MOV RAX,qword ptr [RBP + 0x10] MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x2d8],RDI MOV qword ptr [RBP + -0x2e0],RSI MOV dword ptr [RBP + -0x2e4],EDX MOV qword ptr [RBP + -0x2f0],RCX MOV dword ptr [RBP + -0x2f4],R8D MOV qword ptr [RBP + -0x300],R9 MOV RDI,qword ptr [RBP + -0x2d8] CALL 0x00147c40 MOV qword ptr [RBP + -0x318],RAX CMP qword ptr [RBP + -0x318],0x0 SETZ AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x00148173 MOV RAX,qword ptr [RBP + -0x300] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + 0x10] MOV byte ptr [RAX],0x0 JMP 0x0014836b LAB_00148173: MOV dword ptr [RBP + -0x30c],0x1 LAB_0014817d: CMP dword ptr [RBP + -0x30c],0x4 JG 0x0014835a MOV EAX,dword ptr [RBP + -0x30c] DEC EAX MOV ECX,EAX MOV qword ptr [RBP + -0x338],RCX SUB EAX,0x3 JA 0x00148282 MOV RAX,qword ptr [RBP + -0x338] LEA RCX,[0x1b3eb8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_1: MOV RSI,qword ptr [RBP + -0x2e0] MOV EDX,dword ptr [RBP + -0x2e4] MOV RCX,qword ptr [RBP + -0x2f0] MOV R8D,dword ptr [RBP + -0x2f4] LEA RDI,[RBP + -0x2d0] LEA R9,[0x1af1d9] MOV dword ptr [RSP],0x1 CALL 0x00147cb0 JMP 0x00148282 caseD_2: MOV RSI,qword ptr [RBP + -0x2e0] MOV EDX,dword ptr [RBP + -0x2e4] LEA RDI,[RBP + -0x2d0] LEA R9,[0x1af1d9] MOV R8D,0x1 MOV RCX,R9 MOV dword ptr [RSP],0x1 CALL 0x00147cb0 JMP 0x00148282 caseD_3: MOV RCX,qword ptr [RBP + -0x2f0] MOV R8D,dword ptr [RBP + -0x2f4] LEA RDI,[RBP + -0x2d0] LEA R9,[0x1af1d9] MOV EDX,0x1 MOV RSI,R9 MOV dword ptr [RSP],0x1 CALL 0x00147cb0 JMP 0x00148282 caseD_4: LEA RDI,[RBP + -0x2d0] LEA R9,[0x1af1d9] MOV R8D,0x1 MOV RSI,R9 MOV EDX,R8D MOV RCX,R9 MOV dword ptr [RSP],0x1 CALL 0x00147cb0 default: MOV RSI,qword ptr [RBP + -0x318] LEA RDX,[RBP + -0x2d0] MOV ECX,dword ptr [RBP + -0xc] LEA RDI,[0x50f480] CALL 0x0015da70 MOV qword ptr [RBP + -0x308],RAX CMP qword ptr [RBP + -0x308],0x0 JZ 0x00148321 MOV EAX,0x1 CMP qword ptr [RBP + -0x308],RAX JZ 0x00148321 MOV RAX,qword ptr [RBP + -0x308] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x320],RAX JMP 0x001482d1 LAB_001482d1: JMP 0x001482d3 LAB_001482d3: MOV RCX,qword ptr [RBP + -0x318] MOV qword ptr [RBP + -0x328],0x0 MOV RAX,qword ptr [RBP + -0x328] XCHG qword ptr [RCX + 0x10],RAX MOV RAX,qword ptr [RBP + -0x320] MOV CL,byte ptr [RAX + 0x2fc] MOV RAX,qword ptr [RBP + -0x300] AND CL,0x1 MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x320] MOV CL,byte ptr [RAX + 0x2fd] MOV RAX,qword ptr [RBP + 0x10] AND CL,0x1 MOV byte ptr [RAX],CL JMP 0x0014836b LAB_00148321: JMP 0x00148323 LAB_00148323: JMP 0x00148325 LAB_00148325: JMP 0x00148327 LAB_00148327: MOV RCX,qword ptr [RBP + -0x318] MOV qword ptr [RBP + -0x330],0x0 MOV RAX,qword ptr [RBP + -0x330] XCHG qword ptr [RCX + 0x10],RAX JMP 0x00148346 LAB_00148346: MOV EAX,dword ptr [RBP + -0x30c] ADD EAX,0x1 MOV dword ptr [RBP + -0x30c],EAX JMP 0x0014817d LAB_0014835a: MOV RAX,qword ptr [RBP + -0x300] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + 0x10] MOV byte ptr [RAX],0x0 LAB_0014836b: MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x00148386 ADD RSP,0x340 POP RBP RET LAB_00148386: CALL 0x00126360
/* lookup_setup_actor(PFS_thread*, char const*, unsigned int, char const*, unsigned int, bool*, bool*) */ void lookup_setup_actor(PFS_thread *param_1,char *param_2,uint param_3,char *param_4,uint param_5, bool *param_6,bool *param_7) { long lVar1; long lVar2; long *plVar3; long in_FS_OFFSET; int local_314; PFS_setup_actor_key local_2d8 [708]; int4 local_14; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); lVar2 = get_setup_actor_hash_pins(param_1); if (lVar2 == 0) { *param_6 = false; *param_7 = false; } else { for (local_314 = 1; local_314 < 5; local_314 = local_314 + 1) { switch(local_314) { case 1: set_setup_actor_key(local_2d8,param_2,param_3,param_4,param_5,"%",1); break; case 2: set_setup_actor_key(local_2d8,param_2,param_3,"%",1,"%",1); break; case 3: set_setup_actor_key(local_2d8,"%",1,param_4,param_5,"%",1); break; case 4: set_setup_actor_key(local_2d8,"%",1,"%",1,"%",1); } plVar3 = (long *)lf_hash_search(setup_actor_hash,lVar2,local_2d8,local_14); if ((plVar3 != (long *)0x0) && (plVar3 != (long *)0x1)) { lVar1 = *plVar3; LOCK(); *(int8 *)(lVar2 + 0x10) = 0; UNLOCK(); *param_6 = (bool)(*(byte *)(lVar1 + 0x2fc) & 1); *param_7 = (bool)(*(byte *)(lVar1 + 0x2fd) & 1); goto LAB_0014836b; } LOCK(); *(int8 *)(lVar2 + 0x10) = 0; UNLOCK(); } *param_6 = false; *param_7 = false; } LAB_0014836b: if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return; }
46,739
coro::thread_pool::~thread_pool()
AlayaLite/build_O3/_deps/libcoro-src/src/thread_pool.cpp
thread_pool::~thread_pool() { shutdown(); }
O3
cpp
coro::thread_pool::~thread_pool(): pushq %rbx movq %rdi, %rbx leaq 0x7b55(%rip), %rax # 0xcbc8 addq $0x10, %rax movq %rax, (%rdi) callq 0x50de leaq 0xd0(%rbx), %rdi callq 0x5996 leaq 0x90(%rbx), %rdi callq 0x561c leaq 0x50(%rbx), %rdi callq 0x5638 movq 0x40(%rbx), %rax testq %rax, %rax je 0x50b7 leaq 0x30(%rbx), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x20(%rbx), %rax testq %rax, %rax je 0x50d1 addq $0x10, %rbx movq %rbx, %rdi movq %rbx, %rsi movl $0x3, %edx callq *%rax popq %rbx retq jmp 0x50d5 movq %rax, %rdi callq 0x40e0 nop
_ZN4coro11thread_poolD2Ev: push rbx; Alternative name is 'coro::thread_pool::~thread_pool()' mov rbx, rdi lea rax, _ZTVN4coro11thread_poolE; `vtable for'coro::thread_pool add rax, 10h mov [rdi], rax call _ZN4coro11thread_pool8shutdownEv; coro::thread_pool::shutdown(void) lea rdi, [rbx+0D0h] call _ZNSt11_Deque_baseINSt7__n486116coroutine_handleIvEESaIS2_EED2Ev; std::_Deque_base<std::__n4861::coroutine_handle<void>>::~_Deque_base() lea rdi, [rbx+90h]; this call _ZNSt3_V222condition_variable_anyD2Ev; std::_V2::condition_variable_any::~condition_variable_any() lea rdi, [rbx+50h] call _ZNSt6vectorISt6threadSaIS0_EED2Ev; std::vector<std::thread>::~vector() mov rax, [rbx+40h] test rax, rax jz short loc_50B7 lea rdi, [rbx+30h] mov rsi, rdi mov edx, 3 call rax loc_50B7: mov rax, [rbx+20h] test rax, rax jz short loc_50D1 add rbx, 10h mov rdi, rbx mov rsi, rbx mov edx, 3 call rax loc_50D1: pop rbx retn jmp short $+2 loc_50D5: mov rdi, rax call __clang_call_terminate
void coro::thread_pool::~thread_pool(coro::thread_pool *this) { void ( *v1)(char *, char *, long long); // rax void ( *v2)(char *, char *, long long); // rax *(_QWORD *)this = &`vtable for'coro::thread_pool + 2; coro::thread_pool::shutdown(this); std::_Deque_base<std::__n4861::coroutine_handle<void>>::~_Deque_base((char *)this + 208); std::_V2::condition_variable_any::~condition_variable_any((coro::thread_pool *)((char *)this + 144)); std::vector<std::thread>::~vector((char *)this + 80); v1 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 8); if ( v1 ) v1((char *)this + 48, (char *)this + 48, 3LL); v2 = (void ( *)(char *, char *, long long))*((_QWORD *)this + 4); if ( v2 ) v2((char *)this + 16, (char *)this + 16, 3LL); }
~thread_pool: PUSH RBX MOV RBX,RDI LEA RAX,[0x10cbc8] ADD RAX,0x10 MOV qword ptr [RDI],RAX CALL 0x001050de LEA RDI,[RBX + 0xd0] CALL 0x00105996 LEA RDI,[RBX + 0x90] CALL 0x0010561c LEA RDI,[RBX + 0x50] CALL 0x00105638 MOV RAX,qword ptr [RBX + 0x40] TEST RAX,RAX JZ 0x001050b7 LEA RDI,[RBX + 0x30] LAB_001050ad: MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001050b7: MOV RAX,qword ptr [RBX + 0x20] TEST RAX,RAX JZ 0x001050d1 ADD RBX,0x10 LAB_001050c4: MOV RDI,RBX MOV RSI,RBX MOV EDX,0x3 CALL RAX LAB_001050d1: POP RBX RET
/* coro::thread_pool::~thread_pool() */ void __thiscall coro::thread_pool::~thread_pool(thread_pool *this) { *(int ***)this = &PTR__thread_pool_0010cbd8; shutdown(this); std:: _Deque_base<std::__n4861::coroutine_handle<void>,std::allocator<std::__n4861::coroutine_handle<void>>> ::~_Deque_base((_Deque_base<std::__n4861::coroutine_handle<void>,std::allocator<std::__n4861::coroutine_handle<void>>> *)(this + 0xd0)); std::_V2::condition_variable_any::~condition_variable_any((condition_variable_any *)(this + 0x90)) ; std::vector<std::thread,std::allocator<std::thread>>::~vector ((vector<std::thread,std::allocator<std::thread>> *)(this + 0x50)); if (*(code **)(this + 0x40) != (code *)0x0) { /* try { // try from 001050ad to 001050b6 has its CatchHandler @ 001050d5 */ (**(code **)(this + 0x40))(this + 0x30,this + 0x30,3); } if (*(code **)(this + 0x20) != (code *)0x0) { /* try { // try from 001050c4 to 001050d0 has its CatchHandler @ 001050d3 */ (**(code **)(this + 0x20))(this + 0x10,this + 0x10,3); } return; }
46,740
fini_one_value
eloqsql/mysys/my_getopt.c
static void fini_one_value(const struct my_option *option, void *variable, longlong value __attribute__ ((unused))) { DBUG_ENTER("fini_one_value"); switch ((option->var_type & GET_TYPE_MASK)) { case GET_STR_ALLOC: my_free(*((char**) variable)); *((char**) variable)= NULL; break; default: /* dummy default to avoid compiler warnings */ break; } DBUG_VOID_RETURN; }
O0
c
fini_one_value: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x30(%rax), %eax andl $0x3f, %eax subl $0xa, %eax jne 0xf758e jmp 0xf7575 movq -0x10(%rbp), %rax movq (%rax), %rdi callq 0xfc3a0 movq -0x10(%rbp), %rax movq $0x0, (%rax) jmp 0xf7590 jmp 0xf7590 jmp 0xf7592 jmp 0xf7594 addq $0x20, %rsp popq %rbp retq nopw (%rax,%rax)
fini_one_value: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov eax, [rax+30h] and eax, 3Fh sub eax, 0Ah jnz short loc_F758E jmp short $+2 loc_F7575: mov rax, [rbp+var_10] mov rdi, [rax] call my_free mov rax, [rbp+var_10] mov qword ptr [rax], 0 jmp short loc_F7590 loc_F758E: jmp short $+2 loc_F7590: jmp short $+2 loc_F7592: jmp short $+2 loc_F7594: add rsp, 20h pop rbp retn
_QWORD * fini_one_value(long long a1, _QWORD *a2) { _QWORD *result; // rax result = (_QWORD *)((*(_DWORD *)(a1 + 48) & 0x3Fu) - 10); if ( (*(_DWORD *)(a1 + 48) & 0x3F) == 0xA ) { my_free(*a2); result = a2; *a2 = 0LL; } return result; }
fini_one_value: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x30] AND EAX,0x3f SUB EAX,0xa JNZ 0x001f758e JMP 0x001f7575 LAB_001f7575: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX] CALL 0x001fc3a0 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],0x0 JMP 0x001f7590 LAB_001f758e: JMP 0x001f7590 LAB_001f7590: JMP 0x001f7592 LAB_001f7592: JMP 0x001f7594 LAB_001f7594: ADD RSP,0x20 POP RBP RET
void fini_one_value(long param_1,int8 *param_2) { if ((*(uint *)(param_1 + 0x30) & 0x3f) == 10) { my_free(*param_2); *param_2 = 0; } return; }
46,741
ma_trnman_end_trans_hook
eloqsql/storage/maria/ma_state.c
my_bool _ma_trnman_end_trans_hook(TRN *trn, my_bool commit, my_bool active_transactions) { my_bool error= 0; MARIA_USED_TABLES *tables, *next; DBUG_ENTER("_ma_trnman_end_trans_hook"); DBUG_PRINT("enter", ("trn: %p used_tables: %p", trn, trn->used_tables)); for (tables= (MARIA_USED_TABLES*) trn->used_tables; tables; tables= next) { MARIA_SHARE *share= tables->share; next= tables->next; if (commit) { MARIA_STATE_HISTORY *history; mysql_mutex_lock(&share->intern_lock); /* We only have to update history state if something changed */ if (tables->state_current.changed) { if (tables->state_current.no_transid) { /* The change was done without using transid on rows (like in bulk insert). In this case this thread is the only one that is using the table and all rows will be visible for all transactions. */ _ma_reset_history(share); } else { if (active_transactions && share->now_transactional && trnman_exists_active_transactions(share->state_history->trid, trn->commit_trid, 1)) { /* There exist transactions that are still using the current share->state_history. Create a new history item for this commit and add it first in the state_history list. This ensures that all history items are stored in the list in decresing trid order. */ if (!(history= my_malloc(PSI_INSTRUMENT_ME, sizeof(*history), MYF(MY_WME)))) { /* purecov: begin inspected */ error= 1; mysql_mutex_unlock(&share->intern_lock); my_free(tables); continue; /* purecov: end */ } history->state= share->state_history->state; history->next= share->state_history; share->state_history= history; } else { /* Previous history can't be seen by anyone, reuse old memory */ history= share->state_history; DBUG_PRINT("info", ("removing history->trid: %lu new: %lu", (ulong) history->trid, (ulong) trn->commit_trid)); } history->state.records+= (tables->state_current.records - tables->state_start.records); history->state.checksum+= (tables->state_current.checksum - tables->state_start.checksum); history->trid= trn->commit_trid; share->state.last_change_trn= trn->commit_trid; if (history->next) { /* Remove not visible states */ share->state_history= _ma_remove_not_visible_states(history, 0, 1); } DBUG_PRINT("info", ("share: %p in_trans: %d", share, share->in_trans)); } } /* The following calls frees &share->intern_lock */ decrement_share_in_trans(share); } else { /* We need to keep share->in_trans correct because of the check in free_maria_share() */ mysql_mutex_lock(&share->intern_lock); decrement_share_in_trans(share); } my_free(tables); } trn->used_tables= 0; trn->used_instances= 0; DBUG_RETURN(error); }
O3
c
ma_trnman_end_trans_hook: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movl %edx, -0x30(%rbp) leaq 0x58(%rdi), %rax movq %rax, -0x40(%rbp) movq %rdi, -0x38(%rbp) movq 0x58(%rdi), %r15 testq %r15, %r15 je 0x439e4 movl %esi, %r14d movl $0x0, -0x2c(%rbp) movq %r15, %r12 movq (%r15), %r15 movq 0x8(%r12), %rbx leaq 0x8f0(%rbx), %r13 movq 0x930(%rbx), %rax movq %r13, %rdi testb %r14b, %r14b je 0x438d5 testq %rax, %rax jne 0x43994 callq 0x2a200 movb 0x44(%r12), %al testb $0x1, %al je 0x43940 testb $0x2, %al jne 0x438e5 cmpb $0x0, -0x30(%rbp) je 0x438ef cmpb $0x0, 0x7e7(%rbx) je 0x438ef movq 0x450(%rbx), %rax movq 0x8(%rax), %rdi movq -0x38(%rbp), %rax movq 0x88(%rax), %rsi movl $0x1, %edx callq 0x620f9 testb %al, %al je 0x438ef movl $0x48, %esi movl $0x10, %edx xorl %edi, %edi callq 0xaa1d9 testq %rax, %rax je 0x43979 movq %rax, %rdi movq 0x450(%rbx), %rax movq 0x40(%rax), %rcx movq %rcx, 0x40(%rdi) movups 0x10(%rax), %xmm0 movups 0x20(%rax), %xmm1 movups 0x30(%rax), %xmm2 movups %xmm2, 0x30(%rdi) movups %xmm1, 0x20(%rdi) movups %xmm0, 0x10(%rdi) movq 0x450(%rbx), %rax movq %rax, (%rdi) movq %rdi, 0x450(%rbx) jmp 0x438f6 testq %rax, %rax jne 0x439bc callq 0x2a200 jmp 0x43940 movq %rbx, %rdi callq 0x43a07 jmp 0x43940 movq 0x450(%rbx), %rdi movq 0x10(%r12), %rax subq 0x48(%r12), %rax addq %rax, 0x10(%rdi) movl 0x40(%r12), %eax subl 0x78(%r12), %eax addl %eax, 0x40(%rdi) movq -0x38(%rbp), %rax movq 0x88(%rax), %rax movq %rax, 0x8(%rdi) movq %rax, 0xe8(%rbx) cmpq $0x0, (%rdi) je 0x43940 xorl %esi, %esi movl $0x1, %edx callq 0x43382 movq %rax, 0x450(%rbx) decl 0x7ac(%rbx) je 0x4395e movq 0x930(%rbx), %rdi testq %rdi, %rdi jne 0x439aa movq %r13, %rdi callq 0x2a1d0 jmp 0x43966 movq %rbx, %rdi callq 0x5cd40 movq %r12, %rdi callq 0xaa406 testq %r15, %r15 jne 0x437fb jmp 0x439eb movq 0x930(%rbx), %rdi testq %rdi, %rdi jne 0x439d2 movq %r13, %rdi callq 0x2a1d0 movb $0x1, %al movl %eax, -0x2c(%rbp) jmp 0x43966 leaq 0xa17f6(%rip), %rsi # 0xe5191 movl $0x1d7, %edx # imm = 0x1D7 callq 0x308cf jmp 0x4382e leaq 0x3500a7(%rip), %rax # 0x393a58 movq (%rax), %rax callq *0x160(%rax) jmp 0x43954 leaq 0xa17ce(%rip), %rsi # 0xe5191 movl $0x224, %edx # imm = 0x224 callq 0x308cf jmp 0x43940 leaq 0x35007f(%rip), %rax # 0x393a58 movq (%rax), %rax callq *0x160(%rax) jmp 0x43985 movl $0x0, -0x2c(%rbp) xorps %xmm0, %xmm0 movq -0x40(%rbp), %rax movups %xmm0, (%rax) movl -0x2c(%rbp), %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_trnman_end_trans_hook: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_30], edx lea rax, [rdi+58h] mov [rbp+var_40], rax mov [rbp+var_38], rdi mov r15, [rdi+58h] test r15, r15 jz loc_439E4 mov r14d, esi mov [rbp+var_2C], 0 loc_437FB: mov r12, r15 mov r15, [r15] mov rbx, [r12+8] lea r13, [rbx+8F0h] mov rax, [rbx+930h] mov rdi, r13 test r14b, r14b jz loc_438D5 test rax, rax jnz loc_43994 call _pthread_mutex_lock loc_4382E: mov al, [r12+44h] test al, 1 jz loc_43940 test al, 2 jnz loc_438E5 cmp byte ptr [rbp+var_30], 0 jz loc_438EF cmp byte ptr [rbx+7E7h], 0 jz loc_438EF mov rax, [rbx+450h] mov rdi, [rax+8] mov rax, [rbp+var_38] mov rsi, [rax+88h] mov edx, 1 call trnman_exists_active_transactions test al, al jz short loc_438EF mov esi, 48h ; 'H' mov edx, 10h xor edi, edi call my_malloc test rax, rax jz loc_43979 mov rdi, rax mov rax, [rbx+450h] mov rcx, [rax+40h] mov [rdi+40h], rcx movups xmm0, xmmword ptr [rax+10h] movups xmm1, xmmword ptr [rax+20h] movups xmm2, xmmword ptr [rax+30h] movups xmmword ptr [rdi+30h], xmm2 movups xmmword ptr [rdi+20h], xmm1 movups xmmword ptr [rdi+10h], xmm0 mov rax, [rbx+450h] mov [rdi], rax mov [rbx+450h], rdi jmp short loc_438F6 loc_438D5: test rax, rax jnz loc_439BC call _pthread_mutex_lock jmp short loc_43940 loc_438E5: mov rdi, rbx call _ma_reset_history jmp short loc_43940 loc_438EF: mov rdi, [rbx+450h] loc_438F6: mov rax, [r12+10h] sub rax, [r12+48h] add [rdi+10h], rax mov eax, [r12+40h] sub eax, [r12+78h] add [rdi+40h], eax mov rax, [rbp+var_38] mov rax, [rax+88h] mov [rdi+8], rax mov [rbx+0E8h], rax cmp qword ptr [rdi], 0 jz short loc_43940 xor esi, esi mov edx, 1 call _ma_remove_not_visible_states mov [rbx+450h], rax loc_43940: dec dword ptr [rbx+7ACh] jz short loc_4395E mov rdi, [rbx+930h] test rdi, rdi jnz short loc_439AA loc_43954: mov rdi, r13 call _pthread_mutex_unlock jmp short loc_43966 loc_4395E: mov rdi, rbx call free_maria_share loc_43966: mov rdi, r12 call my_free test r15, r15 jnz loc_437FB jmp short loc_439EB loc_43979: mov rdi, [rbx+930h] test rdi, rdi jnz short loc_439D2 loc_43985: mov rdi, r13 call _pthread_mutex_unlock mov al, 1 mov [rbp+var_2C], eax jmp short loc_43966 loc_43994: lea rsi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 1D7h call psi_mutex_lock jmp loc_4382E loc_439AA: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_43954 loc_439BC: lea rsi, aWorkspaceLlm4b_32; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 224h call psi_mutex_lock jmp loc_43940 loc_439D2: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_43985 loc_439E4: mov [rbp+var_2C], 0 loc_439EB: xorps xmm0, xmm0 mov rax, [rbp+var_40] movups xmmword ptr [rax], xmm0 mov eax, [rbp+var_2C] add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_trnman_end_trans_hook(long long a1, char a2, char a3) { _QWORD *v3; // r15 _QWORD *v4; // r12 long long v5; // rbx long long v6; // rax long long v7; // rdi char v8; // al long long v9; // rax long long v10; // rdi long long v11; // rax __int128 v12; // xmm0 __int128 v13; // xmm1 long long v14; // rax long long v16; // rax _OWORD *v18; // [rsp+0h] [rbp-40h] unsigned int v21; // [rsp+14h] [rbp-2Ch] v18 = (_OWORD *)(a1 + 88); v3 = *(_QWORD **)(a1 + 88); if ( v3 ) { v21 = 0; while ( 1 ) { v4 = v3; v3 = (_QWORD *)*v3; v5 = v4[1]; v6 = *(_QWORD *)(v5 + 2352); v7 = v5 + 2288; if ( a2 ) { if ( v6 ) psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x1D7u); else pthread_mutex_lock(v7); v8 = *((_BYTE *)v4 + 68); if ( (v8 & 1) != 0 ) { if ( (v8 & 2) != 0 ) { ma_reset_history(v5); } else { if ( a3 && *(_BYTE *)(v5 + 2023) && (unsigned __int8)trnman_exists_active_transactions( *(_QWORD *)(*(_QWORD *)(v5 + 1104) + 8LL), *(_QWORD *)(a1 + 136), 1LL) ) { v9 = my_malloc(0LL, 72LL, 16LL); if ( !v9 ) { if ( *(_QWORD *)(v5 + 2352) ) PSI_server[44](); v16 = pthread_mutex_unlock(v5 + 2288); LOBYTE(v16) = 1; v21 = v16; goto LABEL_24; } v10 = v9; v11 = *(_QWORD *)(v5 + 1104); *(_QWORD *)(v10 + 64) = *(_QWORD *)(v11 + 64); v12 = *(_OWORD *)(v11 + 16); v13 = *(_OWORD *)(v11 + 32); *(_OWORD *)(v10 + 48) = *(_OWORD *)(v11 + 48); *(_OWORD *)(v10 + 32) = v13; *(_OWORD *)(v10 + 16) = v12; *(_QWORD *)v10 = *(_QWORD *)(v5 + 1104); *(_QWORD *)(v5 + 1104) = v10; } else { v10 = *(_QWORD *)(v5 + 1104); } *(_QWORD *)(v10 + 16) += v4[2] - v4[9]; *(_DWORD *)(v10 + 64) += *((_DWORD *)v4 + 16) - *((_DWORD *)v4 + 30); v14 = *(_QWORD *)(a1 + 136); *(_QWORD *)(v10 + 8) = v14; *(_QWORD *)(v5 + 232) = v14; if ( *(_QWORD *)v10 ) *(_QWORD *)(v5 + 1104) = ma_remove_not_visible_states((_QWORD *)v10, 0, 1); } } } else if ( v6 ) { psi_mutex_lock(v7, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c", 0x224u); } else { pthread_mutex_lock(v7); } if ( (*(_DWORD *)(v5 + 1964))-- == 1 ) { free_maria_share(v5); } else { if ( *(_QWORD *)(v5 + 2352) ) PSI_server[44](); pthread_mutex_unlock(v5 + 2288); } LABEL_24: my_free(v4); if ( !v3 ) goto LABEL_32; } } v21 = 0; LABEL_32: *v18 = 0LL; return v21; }
_ma_trnman_end_trans_hook: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV dword ptr [RBP + -0x30],EDX LEA RAX,[RDI + 0x58] MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x38],RDI MOV R15,qword ptr [RDI + 0x58] TEST R15,R15 JZ 0x001439e4 MOV R14D,ESI MOV dword ptr [RBP + -0x2c],0x0 LAB_001437fb: MOV R12,R15 MOV R15,qword ptr [R15] MOV RBX,qword ptr [R12 + 0x8] LEA R13,[RBX + 0x8f0] MOV RAX,qword ptr [RBX + 0x930] MOV RDI,R13 TEST R14B,R14B JZ 0x001438d5 TEST RAX,RAX JNZ 0x00143994 CALL 0x0012a200 LAB_0014382e: MOV AL,byte ptr [R12 + 0x44] TEST AL,0x1 JZ 0x00143940 TEST AL,0x2 JNZ 0x001438e5 CMP byte ptr [RBP + -0x30],0x0 JZ 0x001438ef CMP byte ptr [RBX + 0x7e7],0x0 JZ 0x001438ef MOV RAX,qword ptr [RBX + 0x450] MOV RDI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RAX + 0x88] MOV EDX,0x1 CALL 0x001620f9 TEST AL,AL JZ 0x001438ef MOV ESI,0x48 MOV EDX,0x10 XOR EDI,EDI CALL 0x001aa1d9 TEST RAX,RAX JZ 0x00143979 MOV RDI,RAX MOV RAX,qword ptr [RBX + 0x450] MOV RCX,qword ptr [RAX + 0x40] MOV qword ptr [RDI + 0x40],RCX MOVUPS XMM0,xmmword ptr [RAX + 0x10] MOVUPS XMM1,xmmword ptr [RAX + 0x20] MOVUPS XMM2,xmmword ptr [RAX + 0x30] MOVUPS xmmword ptr [RDI + 0x30],XMM2 MOVUPS xmmword ptr [RDI + 0x20],XMM1 MOVUPS xmmword ptr [RDI + 0x10],XMM0 MOV RAX,qword ptr [RBX + 0x450] MOV qword ptr [RDI],RAX MOV qword ptr [RBX + 0x450],RDI JMP 0x001438f6 LAB_001438d5: TEST RAX,RAX JNZ 0x001439bc CALL 0x0012a200 JMP 0x00143940 LAB_001438e5: MOV RDI,RBX CALL 0x00143a07 JMP 0x00143940 LAB_001438ef: MOV RDI,qword ptr [RBX + 0x450] LAB_001438f6: MOV RAX,qword ptr [R12 + 0x10] SUB RAX,qword ptr [R12 + 0x48] ADD qword ptr [RDI + 0x10],RAX MOV EAX,dword ptr [R12 + 0x40] SUB EAX,dword ptr [R12 + 0x78] ADD dword ptr [RDI + 0x40],EAX MOV RAX,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RAX + 0x88] MOV qword ptr [RDI + 0x8],RAX MOV qword ptr [RBX + 0xe8],RAX CMP qword ptr [RDI],0x0 JZ 0x00143940 XOR ESI,ESI MOV EDX,0x1 CALL 0x00143382 MOV qword ptr [RBX + 0x450],RAX LAB_00143940: DEC dword ptr [RBX + 0x7ac] JZ 0x0014395e MOV RDI,qword ptr [RBX + 0x930] TEST RDI,RDI JNZ 0x001439aa LAB_00143954: MOV RDI,R13 CALL 0x0012a1d0 JMP 0x00143966 LAB_0014395e: MOV RDI,RBX CALL 0x0015cd40 LAB_00143966: MOV RDI,R12 CALL 0x001aa406 TEST R15,R15 JNZ 0x001437fb JMP 0x001439eb LAB_00143979: MOV RDI,qword ptr [RBX + 0x930] TEST RDI,RDI JNZ 0x001439d2 LAB_00143985: MOV RDI,R13 CALL 0x0012a1d0 MOV AL,0x1 MOV dword ptr [RBP + -0x2c],EAX JMP 0x00143966 LAB_00143994: LEA RSI,[0x1e5191] MOV EDX,0x1d7 CALL 0x001308cf JMP 0x0014382e LAB_001439aa: LEA RAX,[0x493a58] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00143954 LAB_001439bc: LEA RSI,[0x1e5191] MOV EDX,0x224 CALL 0x001308cf JMP 0x00143940 LAB_001439d2: LEA RAX,[0x493a58] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00143985 LAB_001439e4: MOV dword ptr [RBP + -0x2c],0x0 LAB_001439eb: XORPS XMM0,XMM0 MOV RAX,qword ptr [RBP + -0x40] MOVUPS xmmword ptr [RAX],XMM0 MOV EAX,dword ptr [RBP + -0x2c] ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 _ma_trnman_end_trans_hook(long param_1,char param_2,char param_3) { pthread_mutex_t *__mutex; int *piVar1; long *plVar2; long lVar3; long lVar4; int4 uVar5; int4 uVar6; int4 uVar7; int4 uVar8; long lVar9; long lVar10; long lVar11; char cVar12; int iVar13; long *plVar14; int8 uVar15; long *plVar16; int4 local_34; if (*(long **)(param_1 + 0x58) == (long *)0x0) { local_34 = 0; } else { local_34 = 0; plVar16 = *(long **)(param_1 + 0x58); do { plVar2 = (long *)*plVar16; lVar3 = plVar16[1]; __mutex = (pthread_mutex_t *)(lVar3 + 0x8f0); if (param_2 == '\0') { if (*(long *)(lVar3 + 0x930) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c" ,0x224); } LAB_00143940: piVar1 = (int *)(lVar3 + 0x7ac); *piVar1 = *piVar1 + -1; if (*piVar1 == 0) { free_maria_share(lVar3); } else { if (*(long *)(lVar3 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); } } else { if (*(long *)(lVar3 + 0x930) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_state.c" ,0x1d7); } if ((*(byte *)((long)plVar16 + 0x44) & 1) == 0) goto LAB_00143940; if ((*(byte *)((long)plVar16 + 0x44) & 2) != 0) { _ma_reset_history(lVar3); goto LAB_00143940; } if (((param_3 == '\0') || (*(char *)(lVar3 + 0x7e7) == '\0')) || (cVar12 = trnman_exists_active_transactions (*(int8 *)(*(long *)(lVar3 + 0x450) + 8), *(int8 *)(param_1 + 0x88),1), cVar12 == '\0')) { plVar14 = *(long **)(lVar3 + 0x450); LAB_001438f6: plVar14[2] = plVar14[2] + (plVar16[2] - plVar16[9]); *(int *)(plVar14 + 8) = (int)plVar14[8] + ((int)plVar16[8] - (int)plVar16[0xf]); lVar4 = *(long *)(param_1 + 0x88); plVar14[1] = lVar4; *(long *)(lVar3 + 0xe8) = lVar4; if (*plVar14 != 0) { uVar15 = _ma_remove_not_visible_states(plVar14,0,1); *(int8 *)(lVar3 + 0x450) = uVar15; } goto LAB_00143940; } plVar14 = (long *)my_malloc(0,0x48,0x10); if (plVar14 != (long *)0x0) { lVar4 = *(long *)(lVar3 + 0x450); plVar14[8] = *(long *)(lVar4 + 0x40); uVar5 = *(int4 *)(lVar4 + 0x10); uVar6 = *(int4 *)(lVar4 + 0x14); uVar7 = *(int4 *)(lVar4 + 0x18); uVar8 = *(int4 *)(lVar4 + 0x1c); lVar9 = *(long *)(lVar4 + 0x20); lVar10 = *(long *)(lVar4 + 0x28); lVar11 = *(long *)(lVar4 + 0x38); plVar14[6] = *(long *)(lVar4 + 0x30); plVar14[7] = lVar11; plVar14[4] = lVar9; plVar14[5] = lVar10; *(int4 *)(plVar14 + 2) = uVar5; *(int4 *)((long)plVar14 + 0x14) = uVar6; *(int4 *)(plVar14 + 3) = uVar7; *(int4 *)((long)plVar14 + 0x1c) = uVar8; *plVar14 = *(long *)(lVar3 + 0x450); *(long **)(lVar3 + 0x450) = plVar14; goto LAB_001438f6; } if (*(long *)(lVar3 + 0x930) != 0) { (**(code **)(PSI_server + 0x160))(); } iVar13 = pthread_mutex_unlock(__mutex); local_34 = (int4)CONCAT71((uint7)(uint3)((uint)iVar13 >> 8),1); } my_free(plVar16); plVar16 = plVar2; } while (plVar2 != (long *)0x0); } *(int8 *)(param_1 + 0x58) = 0; *(int8 *)(param_1 + 0x60) = 0; return local_34; }
46,742
my_hash_sort_utf16_nopad_bin
eloqsql/strings/ctype-ucs2.c
static void my_hash_sort_utf16_nopad_bin(CHARSET_INFO *cs __attribute__((unused)), const uchar *pos, size_t len, ulong *nr1, ulong *nr2) { const uchar *end= pos + len; register ulong m1= *nr1, m2= *nr2; for ( ; pos < end ; pos++) { MY_HASH_ADD(m1, m2, (uint)*pos); } *nr1= m1; *nr2= m2; }
O3
c
my_hash_sort_utf16_nopad_bin: movq (%rcx), %rax movq (%r8), %rdi testq %rdx, %rdx jle 0x81c9c pushq %rbp movq %rsp, %rbp addq %rsi, %rdx movl %eax, %r9d andl $0x3f, %r9d addq %rdi, %r9 movzbl (%rsi), %r10d imulq %r9, %r10 movq %rax, %r9 shlq $0x8, %r9 addq %r10, %r9 xorq %r9, %rax addq $0x3, %rdi incq %rsi cmpq %rdx, %rsi jb 0x81c70 popq %rbp movq %rax, (%rcx) movq %rdi, (%r8) retq
my_hash_sort_utf16_nopad_bin: mov rax, [rcx] mov rdi, [r8] test rdx, rdx jle short loc_81C9C push rbp mov rbp, rsp add rdx, rsi loc_81C70: mov r9d, eax and r9d, 3Fh add r9, rdi movzx r10d, byte ptr [rsi] imul r10, r9 mov r9, rax shl r9, 8 add r9, r10 xor rax, r9 add rdi, 3 inc rsi cmp rsi, rdx jb short loc_81C70 pop rbp loc_81C9C: mov [rcx], rax mov [r8], rdi retn
long long my_hash_sort_utf16_nopad_bin(long long a1, unsigned __int8 *a2, long long a3, long long *a4, long long *a5) { long long result; // rax long long v6; // rdi unsigned __int8 *v7; // rdx result = *a4; v6 = *a5; if ( a3 > 0 ) { v7 = &a2[a3]; do { result ^= (v6 + (result & 0x3F)) * *a2 + (result << 8); v6 += 3LL; ++a2; } while ( a2 < v7 ); } *a4 = result; *a5 = v6; return result; }
my_hash_sort_utf16_nopad_bin: MOV RAX,qword ptr [RCX] MOV RDI,qword ptr [R8] TEST RDX,RDX JLE 0x00181c9c PUSH RBP MOV RBP,RSP ADD RDX,RSI LAB_00181c70: MOV R9D,EAX AND R9D,0x3f ADD R9,RDI MOVZX R10D,byte ptr [RSI] IMUL R10,R9 MOV R9,RAX SHL R9,0x8 ADD R9,R10 XOR RAX,R9 ADD RDI,0x3 INC RSI CMP RSI,RDX JC 0x00181c70 POP RBP LAB_00181c9c: MOV qword ptr [RCX],RAX MOV qword ptr [R8],RDI RET
void my_hash_sort_utf16_nopad_bin (int8 param_1,byte *param_2,long param_3,ulong *param_4,long *param_5) { ulong uVar1; byte *pbVar2; long lVar3; uVar1 = *param_4; lVar3 = *param_5; if (0 < param_3) { pbVar2 = param_2 + param_3; do { uVar1 = uVar1 ^ uVar1 * 0x100 + (ulong)*param_2 * ((ulong)((uint)uVar1 & 0x3f) + lVar3); lVar3 = lVar3 + 3; param_2 = param_2 + 1; } while (param_2 < pbVar2); } *param_4 = uVar1; *param_5 = lVar3; return; }
46,743
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>::type_name() const
monkey531[P]llama/common/json.hpp
JSON_HEDLEY_RETURNS_NON_NULL const char* type_name() const noexcept { switch (m_data.m_type) { case value_t::null: return "null"; case value_t::object: return "object"; case value_t::array: return "array"; case value_t::string: return "string"; case value_t::boolean: return "boolean"; case value_t::binary: return "binary"; case value_t::discarded: return "discarded"; case value_t::number_integer: case value_t::number_unsigned: case value_t::number_float: default: return "number"; } }
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>::type_name() const: movq %rdi, -0x10(%rsp) movq -0x10(%rsp), %rax movzbl (%rax), %eax movq %rax, -0x18(%rsp) subq $0x9, %rax ja 0xb7601 movq -0x18(%rsp), %rax leaq 0x152034(%rip), %rcx # 0x2095c8 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x15c15a(%rip), %rax # 0x2136fe movq %rax, -0x8(%rsp) jmp 0xb760d leaq 0x15c896(%rip), %rax # 0x213e48 movq %rax, -0x8(%rsp) jmp 0xb760d leaq 0x15bdb9(%rip), %rax # 0x213379 movq %rax, -0x8(%rsp) jmp 0xb760d leaq 0x15305f(%rip), %rax # 0x20a62d movq %rax, -0x8(%rsp) jmp 0xb760d leaq 0x15866f(%rip), %rax # 0x20fc4b movq %rax, -0x8(%rsp) jmp 0xb760d leaq 0x158669(%rip), %rax # 0x20fc53 movq %rax, -0x8(%rsp) jmp 0xb760d leaq 0x158662(%rip), %rax # 0x20fc5a movq %rax, -0x8(%rsp) jmp 0xb760d jmp 0xb7601 leaq 0x164425(%rip), %rax # 0x21ba2d movq %rax, -0x8(%rsp) movq -0x8(%rsp), %rax retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv: mov [rsp+var_10], rdi mov rax, [rsp+var_10] movzx eax, byte ptr [rax] mov [rsp+var_18], rax sub rax, 9; switch 10 cases ja short def_B759B; jumptable 00000000000B759B default case mov rax, [rsp+var_18] lea rcx, jpt_B759B movsxd rax, ds:(jpt_B759B - 2095C8h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_B759D: lea rax, aOnNull_0+5; jumptable 00000000000B759B case 0 mov [rsp+var_8], rax jmp short loc_B760D loc_B75AB: lea rax, aIsNotAnObject+0Ch; jumptable 00000000000B759B case 1 mov [rsp+var_8], rax jmp short loc_B760D loc_B75B9: lea rax, aExpectedExpres_5+17h; jumptable 00000000000B759B case 2 mov [rsp+var_8], rax jmp short loc_B760D loc_B75C7: lea rax, aPrefixBosToUse+37h; jumptable 00000000000B759B case 3 mov [rsp+var_8], rax jmp short loc_B760D loc_B75D5: lea rax, aBoolean; jumptable 00000000000B759B case 4 mov [rsp+var_8], rax jmp short loc_B760D loc_B75E3: lea rax, aBinary; jumptable 00000000000B759B case 8 mov [rsp+var_8], rax jmp short loc_B760D loc_B75F1: lea rax, aDiscarded; jumptable 00000000000B759B case 9 mov [rsp+var_8], rax jmp short loc_B760D loc_B75FF: jmp short $+2; jumptable 00000000000B759B cases 5-7 def_B759B: lea rax, aHighPrecisionN+0Fh; jumptable 00000000000B759B default case mov [rsp+var_8], rax loc_B760D: mov rax, [rsp+var_8] retn
char * 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( _BYTE *a1) { char *v2; // [rsp+10h] [rbp-8h] switch ( *a1 ) { case 0: v2 = "null"; break; case 1: v2 = "object"; break; case 2: v2 = (char *)"array"; break; case 3: v2 = "string"; break; case 4: v2 = "boolean"; break; case 8: v2 = "binary"; break; case 9: v2 = "discarded"; break; default: v2 = "number"; break; } return v2; }
type_name: MOV qword ptr [RSP + -0x10],RDI MOV RAX,qword ptr [RSP + -0x10] MOVZX EAX,byte ptr [RAX] MOV qword ptr [RSP + -0x18],RAX SUB RAX,0x9 JA 0x001b7601 MOV RAX,qword ptr [RSP + -0x18] LEA RCX,[0x3095c8] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RAX,[0x3136fe] MOV qword ptr [RSP + -0x8],RAX JMP 0x001b760d caseD_1: LEA RAX,[0x313e48] MOV qword ptr [RSP + -0x8],RAX JMP 0x001b760d caseD_2: LEA RAX,[0x313379] MOV qword ptr [RSP + -0x8],RAX JMP 0x001b760d caseD_3: LEA RAX,[0x30a62d] MOV qword ptr [RSP + -0x8],RAX JMP 0x001b760d caseD_4: LEA RAX,[0x30fc4b] MOV qword ptr [RSP + -0x8],RAX JMP 0x001b760d caseD_8: LEA RAX,[0x30fc53] MOV qword ptr [RSP + -0x8],RAX JMP 0x001b760d caseD_9: LEA RAX,[0x30fc5a] MOV qword ptr [RSP + -0x8],RAX JMP 0x001b760d caseD_5: JMP 0x001b7601 default: LEA RAX,[0x31ba2d] MOV qword ptr [RSP + -0x8],RAX LAB_001b760d: MOV RAX,qword ptr [RSP + -0x8] 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>::type_name() const */ char * __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> ::type_name(basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this) { char *local_8; switch(*this) { case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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: local_8 = "null"; break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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: local_8 = "object"; break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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: local_8 = "array"; break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x3: local_8 = "string"; break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x4: local_8 = "boolean"; break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x5: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x6: case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x7: default: local_8 = "number"; break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x8: local_8 = "binary"; break; case (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x9: local_8 = "discarded"; } return local_8; }
46,744
multadd
eloqsql/strings/dtoa.c
static Bigint *multadd(Bigint *b, int m, int a, Stack_alloc *alloc) { int i, wds; ULong *x; ULLong carry, y; Bigint *b1; wds= b->wds; x= b->p.x; i= 0; carry= a; do { y= *x * (ULLong)m + carry; carry= y >> 32; *x++= (ULong)(y & FFFFFFFF); } while (++i < wds); if (carry) { if (wds >= b->maxwds) { b1= Balloc(b->k+1, alloc); Bcopy(b1, b); Bfree(b, alloc); b= b1; } b->p.x[wds++]= (ULong) carry; b->wds= wds; } return b; }
O3
c
multadd: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rcx, %r14 movq %rdi, %rbx movslq 0x14(%rdi), %r12 movq (%rdi), %rax movslq %edx, %r13 movslq %esi, %rcx cmpl $0x2, %r12d movl $0x1, %edx cmovgel %r12d, %edx xorl %esi, %esi movl (%rax,%rsi,4), %edi imulq %rcx, %rdi addq %r13, %rdi movq %rdi, %r13 shrq $0x20, %r13 movl %edi, (%rax,%rsi,4) incq %rsi cmpl %esi, %edx jne 0xd69b2 shrq $0x20, %rdi je 0xd6a1f cmpl 0xc(%rbx), %r12d jl 0xd6a10 movl 0x8(%rbx), %edi incl %edi movq %r14, %rsi callq 0xd6358 movq %rax, %r15 leaq 0x10(%rax), %rdi leaq 0x10(%rbx), %rsi movslq 0x14(%rbx), %rax leaq 0x8(,%rax,4), %rdx callq 0x29080 movq %rbx, %rdi movq %r14, %rsi callq 0xd6751 movq %r15, %rbx movq (%rbx), %rax leal 0x1(%r12), %ecx movl %r13d, (%rax,%r12,4) movl %ecx, 0x14(%rbx) movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
multadd: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r14, rcx mov rbx, rdi movsxd r12, dword ptr [rdi+14h] mov rax, [rdi] movsxd r13, edx movsxd rcx, esi cmp r12d, 2 mov edx, 1 cmovge edx, r12d xor esi, esi loc_D69B2: mov edi, [rax+rsi*4] imul rdi, rcx add rdi, r13 mov r13, rdi shr r13, 20h mov [rax+rsi*4], edi inc rsi cmp edx, esi jnz short loc_D69B2 shr rdi, 20h jz short loc_D6A1F cmp r12d, [rbx+0Ch] jl short loc_D6A10 mov edi, [rbx+8] inc edi mov rsi, r14 call Balloc mov r15, rax lea rdi, [rax+10h] lea rsi, [rbx+10h] movsxd rax, dword ptr [rbx+14h] lea rdx, ds:8[rax*4] call _memcpy mov rdi, rbx mov rsi, r14 call Bfree mov rbx, r15 loc_D6A10: mov rax, [rbx] lea ecx, [r12+1] mov [rax+r12*4], r13d mov [rbx+14h], ecx loc_D6A1F: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
unsigned long long multadd(unsigned long long a1, int a2, int a3, unsigned long long *a4) { unsigned long long v5; // rbx long long v6; // r12 long long v7; // rax unsigned long long v8; // r13 long long v9; // rcx int v10; // edx long long v11; // rsi unsigned long long v12; // rdi long long v13; // r15 v5 = a1; v6 = *(int *)(a1 + 20); v7 = *(_QWORD *)a1; v8 = a3; v9 = a2; v10 = 1; if ( (int)v6 >= 2 ) v10 = *(_DWORD *)(a1 + 20); v11 = 0LL; do { v12 = v8 + v9 * *(unsigned int *)(v7 + 4 * v11); v8 = HIDWORD(v12); *(_DWORD *)(v7 + 4 * v11++) = v12; } while ( v10 != (_DWORD)v11 ); if ( HIDWORD(v12) ) { if ( (int)v6 >= *(_DWORD *)(v5 + 12) ) { v13 = Balloc(*(_DWORD *)(v5 + 8) + 1, (long long)a4); memcpy(v13 + 16, v5 + 16, 4LL * *(int *)(v5 + 20) + 8); Bfree(v5, a4); v5 = v13; } *(_DWORD *)(*(_QWORD *)v5 + 4 * v6) = HIDWORD(v12); *(_DWORD *)(v5 + 20) = v6 + 1; } return v5; }
multadd: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R14,RCX MOV RBX,RDI MOVSXD R12,dword ptr [RDI + 0x14] MOV RAX,qword ptr [RDI] MOVSXD R13,EDX MOVSXD RCX,ESI CMP R12D,0x2 MOV EDX,0x1 CMOVGE EDX,R12D XOR ESI,ESI LAB_001d69b2: MOV EDI,dword ptr [RAX + RSI*0x4] IMUL RDI,RCX ADD RDI,R13 MOV R13,RDI SHR R13,0x20 MOV dword ptr [RAX + RSI*0x4],EDI INC RSI CMP EDX,ESI JNZ 0x001d69b2 SHR RDI,0x20 JZ 0x001d6a1f CMP R12D,dword ptr [RBX + 0xc] JL 0x001d6a10 MOV EDI,dword ptr [RBX + 0x8] INC EDI MOV RSI,R14 CALL 0x001d6358 MOV R15,RAX LEA RDI,[RAX + 0x10] LEA RSI,[RBX + 0x10] MOVSXD RAX,dword ptr [RBX + 0x14] LEA RDX,[0x8 + RAX*0x4] CALL 0x00129080 MOV RDI,RBX MOV RSI,R14 CALL 0x001d6751 MOV RBX,R15 LAB_001d6a10: MOV RAX,qword ptr [RBX] LEA ECX,[R12 + 0x1] MOV dword ptr [RAX + R12*0x4],R13D MOV dword ptr [RBX + 0x14],ECX LAB_001d6a1f: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long * multadd(long *param_1,int param_2,int param_3,int8 param_4) { int iVar1; long lVar2; long *plVar3; int iVar4; long lVar5; ulong uVar6; ulong uVar7; iVar1 = *(int *)((long)param_1 + 0x14); lVar2 = *param_1; uVar7 = (ulong)param_3; iVar4 = 1; if (1 < iVar1) { iVar4 = iVar1; } lVar5 = 0; do { uVar6 = (ulong)*(uint *)(lVar2 + lVar5 * 4) * (long)param_2 + uVar7; uVar7 = uVar6 >> 0x20; *(int *)(lVar2 + lVar5 * 4) = (int)uVar6; lVar5 = lVar5 + 1; } while (iVar4 != (int)lVar5); plVar3 = param_1; if (uVar6 >> 0x20 != 0) { if (*(int *)((long)param_1 + 0xc) <= iVar1) { plVar3 = (long *)Balloc((int)param_1[1] + 1,param_4); memcpy(plVar3 + 2,param_1 + 2,(long)*(int *)((long)param_1 + 0x14) * 4 + 8); Bfree(param_1,param_4); } *(int *)(*plVar3 + (long)iVar1 * 4) = (int)(uVar6 >> 0x20); *(int *)((long)plVar3 + 0x14) = iVar1 + 1; } return plVar3; }
46,745
ftxui::Screen::Print() const
Andrewchistyakov[P]flashcards_lyc/build_O3/_deps/ftxui-src/src/ftxui/screen/screen.cpp
void Screen::Print() const { std::cout << ToString() << '\0' << std::flush; }
O3
cpp
ftxui::Screen::Print() const: pushq %rbx subq $0x30, %rsp movq %rdi, %rsi leaq 0x10(%rsp), %rbx movq %rbx, %rdi callq 0x39158 movq (%rbx), %rsi movq 0x8(%rbx), %rdx movq 0x1f7d1(%rip), %rdi # 0x58fb8 callq 0xb490 leaq 0xf(%rsp), %rsi movb $0x0, (%rsi) movl $0x1, %edx movq %rax, %rdi callq 0xb490 movq %rax, %rdi callq 0xb280 leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x39824 movq 0x20(%rsp), %rsi incq %rsi callq 0xb400 addq $0x30, %rsp popq %rbx retq movq %rax, %rbx leaq 0x20(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x39848 movq 0x20(%rsp), %rsi incq %rsi callq 0xb400 movq %rbx, %rdi callq 0xb780
_ZNK5ftxui6Screen5PrintEv: push rbx sub rsp, 30h mov rsi, rdi lea rbx, [rsp+38h+var_28] mov rdi, rbx call _ZNK5ftxui6Screen8ToStringB5cxx11Ev; ftxui::Screen::ToString(void) mov rsi, [rbx] mov rdx, [rbx+8] mov rdi, cs:_ZSt4cout_ptr call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) lea rsi, [rsp+38h+var_29] mov byte ptr [rsi], 0 mov edx, 1 mov rdi, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov rdi, rax; this call __ZNSo5flushEv; std::ostream::flush(void) lea rax, [rsp+38h+var_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_39824 mov rsi, [rsp+38h+var_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_39824: add rsp, 30h pop rbx retn mov rbx, rax lea rax, [rsp+arg_18] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_39848 mov rsi, [rsp+arg_18] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_39848: mov rdi, rbx call __Unwind_Resume
void ftxui::Screen::Print(ftxui::Screen *this) { long long v1; // rax std::ostream *v2; // rax char v3; // [rsp+Fh] [rbp-29h] BYREF void *v4[2]; // [rsp+10h] [rbp-28h] BYREF long long v5; // [rsp+20h] [rbp-18h] BYREF ftxui::Screen::ToString[abi:cxx11]((long long)v4, (long long)this); v1 = std::__ostream_insert<char,std::char_traits<char>>(&std::cout, v4[0], v4[1]); v3 = 0; v2 = (std::ostream *)std::__ostream_insert<char,std::char_traits<char>>(v1, &v3, 1LL); std::ostream::flush(v2); if ( v4[0] != &v5 ) operator delete(v4[0], v5 + 1); }
Print: PUSH RBX SUB RSP,0x30 MOV RSI,RDI LEA RBX,[RSP + 0x10] MOV RDI,RBX CALL 0x00139158 MOV RSI,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] LAB_001397e0: MOV RDI,qword ptr [0x00158fb8] CALL 0x0010b490 LEA RSI,[RSP + 0xf] MOV byte ptr [RSI],0x0 MOV EDX,0x1 MOV RDI,RAX CALL 0x0010b490 MOV RDI,RAX CALL 0x0010b280 LAB_00139809: LEA RAX,[RSP + 0x20] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00139824 MOV RSI,qword ptr [RSP + 0x20] INC RSI CALL 0x0010b400 LAB_00139824: ADD RSP,0x30 POP RBX RET
/* ftxui::Screen::Print() const */ void ftxui::Screen::Print(void) { ostream *poVar1; char local_29; long *local_28; long local_20; long local_18 [2]; ToString_abi_cxx11_(); /* try { // try from 001397e0 to 00139808 has its CatchHandler @ 0013982a */ poVar1 = std::__ostream_insert<char,std::char_traits<char>> ((ostream *)PTR_cout_00158fb8,(char *)local_28,local_20); local_29 = '\0'; std::__ostream_insert<char,std::char_traits<char>>(poVar1,&local_29,1); std::ostream::flush(); if (local_28 != local_18) { operator_delete(local_28,local_18[0] + 1); } return; }
46,746
nglog::LogDestination::FlushLogFiles(int)
ng-log[P]ng-log/src/logging.cc
inline void LogDestination::FlushLogFiles(int min_severity) { // Prevent any subtle race conditions by wrapping a mutex lock around // all this stuff. std::lock_guard<std::mutex> l{log_mutex}; for (int i = min_severity; i < NUM_SEVERITIES; i++) { LogDestination* log = log_destination(static_cast<LogSeverity>(i)); if (log != nullptr) { log->logger_->Flush(); } } }
O3
cpp
nglog::LogDestination::FlushLogFiles(int): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x10, %rsp movl %edi, %ebx leaq 0x2e1f6(%rip), %rdi # 0x490e8 callq 0x11e50 testl %eax, %eax jne 0x1af94 cmpl $0x3, %ebx jg 0x1af7a leaq 0x1f125(%rip), %r13 # 0x3a030 leaq 0x8(%rsp), %r14 movl %ebx, %r12d movq (%r13,%r12,8), %rax testq %rax, %rax jne 0x1af66 movl $0xd0, %edi callq 0x11900 movq %rax, %r15 movq %rax, %rdi movl %ebx, %esi xorl %edx, %edx callq 0x13a84 leaq (,%r12,8), %r12 addq %r13, %r12 movq $0x0, 0x8(%rsp) movq %r12, %rdi movq %r15, %rsi callq 0x1be78 movq %r14, %rdi callq 0x1a99e movq (%r12), %rax testq %rax, %rax je 0x1af73 movq 0xc8(%rax), %rdi movq (%rdi), %rax callq *0x18(%rax) incl %ebx cmpl $0x4, %ebx jne 0x1af10 leaq 0x2e167(%rip), %rdi # 0x490e8 callq 0x116a0 addq $0x10, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl %eax, %edi callq 0x115d0 movq %rax, %rbx movl $0xd0, %esi movq %r15, %rdi callq 0x11960 jmp 0x1afb0 movq %rax, %rbx leaq 0x2e131(%rip), %rdi # 0x490e8 callq 0x116a0 movq %rbx, %rdi callq 0x121a0
_ZN5nglog14LogDestination13FlushLogFilesEi: push r15 push r14 push r13 push r12 push rbx sub rsp, 10h mov ebx, edi lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_lock test eax, eax jnz loc_1AF94 cmp ebx, 3 jg short loc_1AF7A lea r13, _ZN5nglog14LogDestination17log_destinations_E; nglog::LogDestination::log_destinations_ lea r14, [rsp+38h+var_30] loc_1AF10: mov r12d, ebx mov rax, [r13+r12*8+0] test rax, rax jnz short loc_1AF66 mov edi, 0D0h; unsigned __int64 call __Znwm; operator new(ulong) mov r15, rax mov rdi, rax mov esi, ebx xor edx, edx call _ZN5nglog14LogDestinationC2ENS_11LogSeverityEPKc; nglog::LogDestination::LogDestination(nglog::LogSeverity,char const*) lea r12, ds:0[r12*8] add r12, r13 mov [rsp+38h+var_30], 0 mov rdi, r12 mov rsi, r15 call _ZNSt15__uniq_ptr_implIN5nglog14LogDestinationESt14default_deleteIS1_EE5resetEPS1_; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset(nglog::LogDestination*) mov rdi, r14 call _ZNSt10unique_ptrIN5nglog14LogDestinationESt14default_deleteIS1_EED2Ev; std::unique_ptr<nglog::LogDestination>::~unique_ptr() mov rax, [r12] test rax, rax jz short loc_1AF73 loc_1AF66: mov rdi, [rax+0C8h] mov rax, [rdi] call qword ptr [rax+18h] loc_1AF73: inc ebx cmp ebx, 4 jnz short loc_1AF10 loc_1AF7A: lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock add rsp, 10h pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_1AF94: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) mov rbx, rax mov esi, 0D0h; unsigned __int64 mov rdi, r15; void * call __ZdlPvm; operator delete(void *,ulong) jmp short loc_1AFB0 mov rbx, rax loc_1AFB0: lea rdi, _ZN5nglogL9log_mutexE; nglog::log_mutex call _pthread_mutex_unlock mov rdi, rbx call __Unwind_Resume
long long nglog::LogDestination::FlushLogFiles(nglog::LogDestination *this) { int v1; // ebx int v2; // eax long long v3; // rax long long v4; // r15 nglog::LogDestination *v6; // [rsp+8h] [rbp-30h] BYREF v1 = (int)this; v2 = pthread_mutex_lock(&nglog::log_mutex); if ( v2 ) std::__throw_system_error(v2); if ( (int)this <= 3 ) { do { v3 = nglog::LogDestination::log_destinations_[v1]; if ( v3 || (v4 = operator new(0xD0uLL), nglog::LogDestination::LogDestination(v4, v1, 0LL), v6 = 0LL, std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>::reset( &nglog::LogDestination::log_destinations_[v1], v4), std::unique_ptr<nglog::LogDestination>::~unique_ptr(&v6), (v3 = nglog::LogDestination::log_destinations_[v1]) != 0) ) { (*(void ( **)(_QWORD))(**(_QWORD **)(v3 + 200) + 24LL))(*(_QWORD *)(v3 + 200)); } ++v1; } while ( v1 != 4 ); } return pthread_mutex_unlock(&nglog::log_mutex); }
FlushLogFiles: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x10 MOV EBX,EDI LEA RDI,[0x1490e8] CALL 0x00111e50 TEST EAX,EAX JNZ 0x0011af94 CMP EBX,0x3 JG 0x0011af7a LEA R13,[0x13a030] LEA R14,[RSP + 0x8] LAB_0011af10: MOV R12D,EBX MOV RAX,qword ptr [R13 + R12*0x8] TEST RAX,RAX JNZ 0x0011af66 LAB_0011af1d: MOV EDI,0xd0 CALL 0x00111900 LAB_0011af27: MOV R15,RAX MOV RDI,RAX MOV ESI,EBX XOR EDX,EDX CALL 0x00113a84 LEA R12,[R12*0x8] ADD R12,R13 MOV qword ptr [RSP + 0x8],0x0 MOV RDI,R12 MOV RSI,R15 CALL 0x0011be78 MOV RDI,R14 CALL 0x0011a99e MOV RAX,qword ptr [R12] TEST RAX,RAX JZ 0x0011af73 LAB_0011af66: MOV RDI,qword ptr [RAX + 0xc8] MOV RAX,qword ptr [RDI] LAB_0011af70: CALL qword ptr [RAX + 0x18] LAB_0011af73: INC EBX CMP EBX,0x4 JNZ 0x0011af10 LAB_0011af7a: LEA RDI,[0x1490e8] CALL 0x001116a0 ADD RSP,0x10 POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_0011af94: MOV EDI,EAX CALL 0x001115d0
/* nglog::LogDestination::FlushLogFiles(int) */ void nglog::LogDestination::FlushLogFiles(int param_1) { int iVar1; LogDestination *pLVar2; long lVar3; uint uVar4; int8 local_30; ulong uVar5; uVar5 = (ulong)(uint)param_1; iVar1 = pthread_mutex_lock((pthread_mutex_t *)log_mutex); if (iVar1 != 0) { /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar1); } if (param_1 < 4) { do { lVar3 = (&log_destinations_)[uVar5]; if (lVar3 == 0) { /* try { // try from 0011af1d to 0011af26 has its CatchHandler @ 0011afad */ pLVar2 = (LogDestination *)operator_new(0xd0); /* try { // try from 0011af27 to 0011af35 has its CatchHandler @ 0011af9b */ LogDestination(pLVar2,uVar5,0); local_30 = 0; std::__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>>:: reset((__uniq_ptr_impl<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) (&log_destinations_ + uVar5),pLVar2); std::unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>>:: ~unique_ptr((unique_ptr<nglog::LogDestination,std::default_delete<nglog::LogDestination>> *) &local_30); lVar3 = *(long *)(&log_destinations_ + uVar5); if (lVar3 != 0) goto LAB_0011af66; } else { LAB_0011af66: /* try { // try from 0011af70 to 0011af72 has its CatchHandler @ 0011afad */ (**(code **)(**(long **)(lVar3 + 200) + 0x18))(); } uVar4 = (int)uVar5 + 1; uVar5 = (ulong)uVar4; } while (uVar4 != 4); } pthread_mutex_unlock((pthread_mutex_t *)log_mutex); return; }
46,747
mi_find_half_pos
eloqsql/storage/myisam/mi_write.c
uchar *_mi_find_half_pos(uint nod_flag, MI_KEYDEF *keyinfo, uchar *page, uchar *key, uint *return_key_length, uchar **after_key) { uint keys,length,key_ref_length; uchar *end,*lastpos; DBUG_ENTER("_mi_find_half_pos"); key_ref_length=2+nod_flag; length=mi_getint(page)-key_ref_length; page+=key_ref_length; if (!(keyinfo->flag & (HA_PACK_KEY | HA_SPACE_PACK_USED | HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) { key_ref_length=keyinfo->keylength+nod_flag; keys=length/(key_ref_length*2); *return_key_length=keyinfo->keylength; end=page+keys*key_ref_length; *after_key=end+key_ref_length; memcpy(key,end,key_ref_length); DBUG_RETURN(end); } end=page+length/2-key_ref_length; /* This is aprox. half */ *key='\0'; do { lastpos=page; if (!(length=(*keyinfo->get_key)(keyinfo,nod_flag,&page,key))) DBUG_RETURN(0); } while (page < end); *return_key_length=length; *after_key=page; DBUG_PRINT("exit",("returns: %p page: %p half: %p", lastpos, page, end)); DBUG_RETURN(lastpos); }
O3
c
mi_find_half_pos: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movq %rdx, %r12 movq %rsi, %r11 movl %edi, %r10d leal 0x2(%r10), %esi movzbl 0x1(%rdx), %edx movzbl (%r12), %eax andl $0x7f, %eax shll $0x8, %eax orl %edx, %eax subl %esi, %eax addq %rsi, %r12 movq %r12, -0x30(%rbp) testb $0x2e, 0xa(%r11) je 0x8918a movq %r8, -0x38(%rbp) movq %r9, -0x40(%rbp) shrl %eax addq %r12, %rax subq %rsi, %rax movq %rax, -0x48(%rbp) movb $0x0, (%rcx) movq %r12, %r14 movq %r11, %rdi movq %r10, %rbx movl %r10d, %esi leaq -0x30(%rbp), %rdx movq %rcx, %r15 movq %r11, %r13 callq *0x48(%r11) testl %eax, %eax je 0x891be movq -0x30(%rbp), %r12 cmpq -0x48(%rbp), %r12 movq %r15, %rcx movq %rbx, %r10 movq %r13, %r11 jb 0x8914a movq -0x38(%rbp), %rcx movl %eax, (%rcx) movq -0x40(%rbp), %rax movq %r12, (%rax) jmp 0x891c1 movzwl 0x12(%r11), %edi addl %edi, %r10d leal (%r10,%r10), %esi xorl %edx, %edx divl %esi movl %edi, (%r8) imull %r10d, %eax addq %rax, %r12 leaq (%r12,%r10), %rax movq %rax, (%r9) movq %rcx, %rdi movq %r12, %rsi movq %r10, %rdx callq 0x29080 movq %r12, %r14 jmp 0x891c1 xorl %r14d, %r14d movq %r14, %rax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_mi_find_half_pos: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12, rdx mov r11, rsi mov r10d, edi lea esi, [r10+2] movzx edx, byte ptr [rdx+1] movzx eax, byte ptr [r12] and eax, 7Fh shl eax, 8 or eax, edx sub eax, esi add r12, rsi mov [rbp+var_30], r12 test byte ptr [r11+0Ah], 2Eh jz short loc_8918A mov [rbp+var_38], r8 mov [rbp+var_40], r9 shr eax, 1 add rax, r12 sub rax, rsi mov [rbp+var_48], rax mov byte ptr [rcx], 0 loc_8914A: mov r14, r12 mov rdi, r11 mov rbx, r10 mov esi, r10d lea rdx, [rbp+var_30] mov r15, rcx mov r13, r11 call qword ptr [r11+48h] test eax, eax jz short loc_891BE mov r12, [rbp+var_30] cmp r12, [rbp+var_48] mov rcx, r15 mov r10, rbx mov r11, r13 jb short loc_8914A mov rcx, [rbp+var_38] mov [rcx], eax mov rax, [rbp+var_40] mov [rax], r12 jmp short loc_891C1 loc_8918A: movzx edi, word ptr [r11+12h] add r10d, edi lea esi, [r10+r10] xor edx, edx div esi mov [r8], edi imul eax, r10d add r12, rax lea rax, [r12+r10] mov [r9], rax mov rdi, rcx mov rsi, r12 mov rdx, r10 call _memcpy mov r14, r12 jmp short loc_891C1 loc_891BE: xor r14d, r14d loc_891C1: mov rax, r14 add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * mi_find_half_pos(unsigned int a1, long long a2, _BYTE *a3, _BYTE *a4, _DWORD *a5, _QWORD *a6) { long long v7; // r10 long long v8; // rsi unsigned int v9; // eax _BYTE *v10; // r12 _BYTE *v11; // r14 long long v12; // rbx _BYTE *v13; // r15 long long v14; // r13 int v15; // eax int v16; // edi long long v17; // r10 _BYTE *v18; // r12 _BYTE *v20; // [rsp+8h] [rbp-48h] _BYTE *v23; // [rsp+20h] [rbp-30h] BYREF v7 = a1; v8 = a1 + 2; v9 = ((unsigned __int8)a3[1] | ((*a3 & 0x7F) << 8)) - v8; v10 = &a3[v8]; v23 = &a3[v8]; if ( (*(_BYTE *)(a2 + 10) & 0x2E) != 0 ) { v20 = &a3[v9 >> 1]; *a4 = 0; while ( 1 ) { v11 = v10; v12 = v7; v13 = a4; v14 = a2; v15 = (*(long long ( **)(long long, _QWORD, _BYTE **))(a2 + 72))(a2, (unsigned int)v7, &v23); if ( !v15 ) break; v10 = v23; a4 = v13; v7 = v12; a2 = v14; if ( v23 >= v20 ) { *a5 = v15; *a6 = v10; return v11; } } return 0LL; } else { v16 = *(unsigned __int16 *)(a2 + 18); v17 = (unsigned int)(v16 + v7); *a5 = v16; v18 = &v10[(unsigned int)v17 * (v9 / (2 * (int)v17))]; *a6 = &v18[v17]; memcpy(a4, v18, v17); return v18; } }
_mi_find_half_pos: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12,RDX MOV R11,RSI MOV R10D,EDI LEA ESI,[R10 + 0x2] MOVZX EDX,byte ptr [RDX + 0x1] MOVZX EAX,byte ptr [R12] AND EAX,0x7f SHL EAX,0x8 OR EAX,EDX SUB EAX,ESI ADD R12,RSI MOV qword ptr [RBP + -0x30],R12 TEST byte ptr [R11 + 0xa],0x2e JZ 0x0018918a MOV qword ptr [RBP + -0x38],R8 MOV qword ptr [RBP + -0x40],R9 SHR EAX,0x1 ADD RAX,R12 SUB RAX,RSI MOV qword ptr [RBP + -0x48],RAX MOV byte ptr [RCX],0x0 LAB_0018914a: MOV R14,R12 MOV RDI,R11 MOV RBX,R10 MOV ESI,R10D LEA RDX,[RBP + -0x30] MOV R15,RCX MOV R13,R11 CALL qword ptr [R11 + 0x48] TEST EAX,EAX JZ 0x001891be MOV R12,qword ptr [RBP + -0x30] CMP R12,qword ptr [RBP + -0x48] MOV RCX,R15 MOV R10,RBX MOV R11,R13 JC 0x0018914a MOV RCX,qword ptr [RBP + -0x38] MOV dword ptr [RCX],EAX MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RAX],R12 JMP 0x001891c1 LAB_0018918a: MOVZX EDI,word ptr [R11 + 0x12] ADD R10D,EDI LEA ESI,[R10 + R10*0x1] XOR EDX,EDX DIV ESI MOV dword ptr [R8],EDI IMUL EAX,R10D ADD R12,RAX LEA RAX,[R12 + R10*0x1] MOV qword ptr [R9],RAX MOV RDI,RCX MOV RSI,R12 MOV RDX,R10 CALL 0x00129080 MOV R14,R12 JMP 0x001891c1 LAB_001891be: XOR R14D,R14D LAB_001891c1: MOV RAX,R14 ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
byte * _mi_find_half_pos(int param_1,long param_2,byte *param_3,int1 *param_4,uint *param_5, long *param_6) { uint uVar1; byte *pbVar2; uint uVar3; byte *__src; byte *local_38; uVar3 = param_1 + 2; uVar1 = ((*param_3 & 0x7f) << 8 | (uint)param_3[1]) - uVar3; local_38 = param_3 + uVar3; if ((*(byte *)(param_2 + 10) & 0x2e) == 0) { uVar3 = param_1 + (uint)*(ushort *)(param_2 + 0x12); *param_5 = (uint)*(ushort *)(param_2 + 0x12); __src = local_38 + (uVar1 / (uVar3 * 2)) * uVar3; *param_6 = (long)(__src + uVar3); memcpy(param_4,__src,(ulong)uVar3); } else { pbVar2 = local_38 + ((ulong)(uVar1 >> 1) - (ulong)uVar3); *param_4 = 0; do { __src = local_38; uVar1 = (**(code **)(param_2 + 0x48))(param_2,param_1,&local_38,param_4); if (uVar1 == 0) { return (byte *)0x0; } } while (local_38 < pbVar2); *param_5 = uVar1; *param_6 = (long)local_38; } return __src; }
46,748
ma_store_var_pack_key
eloqsql/storage/maria/ma_search.c
void _ma_store_var_pack_key(MARIA_KEYDEF *keyinfo __attribute__((unused)), register uchar *key_pos, register MARIA_KEY_PARAM *s_temp) { uint length; uchar *org_key_pos= key_pos; if (s_temp->ref_length) { /* Packed against previous key */ store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->ref_length); /* If not same key after */ if (s_temp->ref_length != s_temp->pack_marker) store_key_length_inc(key_pos,s_temp->key_length); } else { /* Not packed against previous key */ store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->key_length); } bmove(key_pos, s_temp->key, (length= s_temp->totlength - (uint) (key_pos-org_key_pos))); key_pos+= length; if (!s_temp->next_key_pos) /* No following key */ goto end; if (s_temp->prev_length) { /* Extend next key because new key didn't have same prefix as prev key */ if (s_temp->part_of_prev_key) { store_pack_length(s_temp->pack_marker == 128,key_pos, s_temp->part_of_prev_key); store_key_length_inc(key_pos,s_temp->n_length); } else { s_temp->n_length+= s_temp->store_not_null; store_pack_length(s_temp->pack_marker == 128,key_pos, s_temp->n_length); } memcpy(key_pos, s_temp->prev_key, s_temp->prev_length); key_pos+= s_temp->prev_length; } else if (s_temp->n_ref_length) { store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->n_ref_length); if (s_temp->n_ref_length != s_temp->pack_marker) { /* Not identical key */ store_key_length_inc(key_pos,s_temp->n_length); } } else { s_temp->n_length+= s_temp->store_not_null; store_pack_length(s_temp->pack_marker == 128,key_pos,s_temp->n_length); } end: s_temp->changed_length= (uint) (key_pos - org_key_pos); }
O3
c
ma_store_var_pack_key: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rdx, %r14 movq %rsi, %rdx movl 0x20(%r14), %eax movl 0x3c(%r14), %ecx testl %eax, %eax je 0x58a23 movl $0x1, %ebx cmpl $0x80, %ecx jne 0x58a37 movq %rdx, %rcx jmp 0x58a46 movl 0x24(%r14), %eax cmpl $0x80, %ecx jne 0x58a67 leaq 0x1(%rdx), %rbx movb %al, (%rdx) jmp 0x58a8a leaq 0x1(%rdx), %rcx movb %ah, (%rdx) movl 0x20(%r14), %eax movl $0x2, %ebx addq %rdx, %rbx movb %al, (%rcx) movl 0x20(%r14), %eax cmpl 0x3c(%r14), %eax je 0x58a8a movl 0x24(%r14), %eax cmpl $0xfe, %eax ja 0x58a76 movb %al, (%rbx) incq %rbx jmp 0x58a8a movb %ah, (%rdx) movb 0x24(%r14), %al leaq 0x2(%rdx), %rbx movb %al, 0x1(%rdx) jmp 0x58a8a movb $-0x1, (%rbx) movzwl 0x24(%r14), %eax rolw $0x8, %ax movw %ax, 0x1(%rbx) addq $0x3, %rbx movq (%r14), %rsi movq %rdx, %r12 movl %edx, %r15d subl %ebx, %r15d addl 0x30(%r14), %r15d movq %rbx, %rdi movq %r15, %rdx callq 0x29120 addq %r15, %rbx cmpq $0x0, 0x10(%r14) je 0x58b77 cmpl $0x0, 0x38(%r14) je 0x58ad6 movl 0x34(%r14), %eax testl %eax, %eax je 0x58afd movl $0x1, %ecx cmpl $0x80, 0x3c(%r14) jne 0x58b23 movq %rbx, %rdx jmp 0x58b32 movl 0x28(%r14), %eax testl %eax, %eax je 0x58b87 movl $0x1, %ecx cmpl $0x80, 0x3c(%r14) jne 0x58bad movq %rbx, %rdx jmp 0x58bbc movsbl 0x48(%r14), %eax addl 0x2c(%r14), %eax movl %eax, 0x2c(%r14) cmpl $0x80, 0x3c(%r14) je 0x58b42 movb %ah, (%rbx) movb 0x2c(%r14), %al movb %al, 0x1(%rbx) addq $0x2, %rbx jmp 0x58b5d leaq 0x1(%rbx), %rdx movb %ah, (%rbx) movl 0x34(%r14), %eax movl $0x2, %ecx addq %rcx, %rbx movb %al, (%rdx) movl 0x2c(%r14), %eax cmpl $0xfe, %eax ja 0x58b49 movb %al, (%rbx) incq %rbx jmp 0x58b5d movb $-0x1, (%rbx) movzwl 0x2c(%r14), %eax rolw $0x8, %ax movw %ax, 0x1(%rbx) addq $0x3, %rbx movq %rbx, %r15 movq 0x8(%r14), %rsi movl 0x38(%r14), %edx movq %rbx, %rdi callq 0x29080 movl 0x38(%r14), %ebx addq %r15, %rbx subl %r12d, %ebx movl %ebx, 0x40(%r14) popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movsbl 0x48(%r14), %eax addl 0x2c(%r14), %eax movl %eax, 0x2c(%r14) cmpl $0x80, 0x3c(%r14) je 0x58bd6 movb %ah, (%rbx) movb 0x2c(%r14), %al movb %al, 0x1(%rbx) addq $0x2, %rbx jmp 0x58b77 leaq 0x1(%rbx), %rdx movb %ah, (%rbx) movl 0x28(%r14), %eax movl $0x2, %ecx addq %rcx, %rbx movb %al, (%rdx) movl 0x28(%r14), %eax cmpl 0x3c(%r14), %eax je 0x58b77 movl 0x2c(%r14), %eax cmpl $0xfe, %eax ja 0x58bdd movb %al, (%rbx) incq %rbx jmp 0x58b77 movb $-0x1, (%rbx) movzwl 0x2c(%r14), %eax rolw $0x8, %ax movw %ax, 0x1(%rbx) addq $0x3, %rbx jmp 0x58b77
_ma_store_var_pack_key: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov r14, rdx mov rdx, rsi mov eax, [r14+20h] mov ecx, [r14+3Ch] test eax, eax jz short loc_58A23 mov ebx, 1 cmp ecx, 80h jnz short loc_58A37 mov rcx, rdx jmp short loc_58A46 loc_58A23: mov eax, [r14+24h] cmp ecx, 80h jnz short loc_58A67 lea rbx, [rdx+1] mov [rdx], al jmp short loc_58A8A loc_58A37: lea rcx, [rdx+1] mov [rdx], ah mov eax, [r14+20h] mov ebx, 2 loc_58A46: add rbx, rdx mov [rcx], al mov eax, [r14+20h] cmp eax, [r14+3Ch] jz short loc_58A8A mov eax, [r14+24h] cmp eax, 0FEh ja short loc_58A76 mov [rbx], al inc rbx jmp short loc_58A8A loc_58A67: mov [rdx], ah mov al, [r14+24h] lea rbx, [rdx+2] mov [rdx+1], al jmp short loc_58A8A loc_58A76: mov byte ptr [rbx], 0FFh movzx eax, word ptr [r14+24h] rol ax, 8 mov [rbx+1], ax add rbx, 3 loc_58A8A: mov rsi, [r14] mov r12, rdx mov r15d, edx sub r15d, ebx add r15d, [r14+30h] mov rdi, rbx mov rdx, r15 call _memmove add rbx, r15 cmp qword ptr [r14+10h], 0 jz loc_58B77 cmp dword ptr [r14+38h], 0 jz short loc_58AD6 mov eax, [r14+34h] test eax, eax jz short loc_58AFD mov ecx, 1 cmp dword ptr [r14+3Ch], 80h jnz short loc_58B23 mov rdx, rbx jmp short loc_58B32 loc_58AD6: mov eax, [r14+28h] test eax, eax jz loc_58B87 mov ecx, 1 cmp dword ptr [r14+3Ch], 80h jnz loc_58BAD mov rdx, rbx jmp loc_58BBC loc_58AFD: movsx eax, byte ptr [r14+48h] add eax, [r14+2Ch] mov [r14+2Ch], eax cmp dword ptr [r14+3Ch], 80h jz short loc_58B42 mov [rbx], ah mov al, [r14+2Ch] mov [rbx+1], al add rbx, 2 jmp short loc_58B5D loc_58B23: lea rdx, [rbx+1] mov [rbx], ah mov eax, [r14+34h] mov ecx, 2 loc_58B32: add rbx, rcx mov [rdx], al mov eax, [r14+2Ch] cmp eax, 0FEh ja short loc_58B49 loc_58B42: mov [rbx], al inc rbx jmp short loc_58B5D loc_58B49: mov byte ptr [rbx], 0FFh movzx eax, word ptr [r14+2Ch] rol ax, 8 mov [rbx+1], ax add rbx, 3 loc_58B5D: mov r15, rbx mov rsi, [r14+8] mov edx, [r14+38h] mov rdi, rbx call _memcpy mov ebx, [r14+38h] add rbx, r15 loc_58B77: sub ebx, r12d mov [r14+40h], ebx pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_58B87: movsx eax, byte ptr [r14+48h] add eax, [r14+2Ch] mov [r14+2Ch], eax cmp dword ptr [r14+3Ch], 80h jz short loc_58BD6 mov [rbx], ah mov al, [r14+2Ch] mov [rbx+1], al add rbx, 2 jmp short loc_58B77 loc_58BAD: lea rdx, [rbx+1] mov [rbx], ah mov eax, [r14+28h] mov ecx, 2 loc_58BBC: add rbx, rcx mov [rdx], al mov eax, [r14+28h] cmp eax, [r14+3Ch] jz short loc_58B77 mov eax, [r14+2Ch] cmp eax, 0FEh ja short loc_58BDD loc_58BD6: mov [rbx], al inc rbx jmp short loc_58B77 loc_58BDD: mov byte ptr [rbx], 0FFh movzx eax, word ptr [r14+2Ch] rol ax, 8 mov [rbx+1], ax add rbx, 3 jmp short loc_58B77
char ma_store_var_pack_key(long long a1, _BYTE *a2, long long a3) { int v4; // eax int v5; // ecx long long v6; // rbx _BYTE *v7; // rcx int v8; // eax _BYTE *v9; // rbx unsigned int v10; // eax long long v11; // r15 unsigned int v12; // eax _BYTE *v13; // rbx int v14; // eax long long v15; // rcx _BYTE *v16; // rdx int v17; // eax long long v18; // rcx _BYTE *v19; // rdx unsigned int v20; // eax v4 = *(_DWORD *)(a3 + 32); v5 = *(_DWORD *)(a3 + 60); if ( v4 ) { v6 = 1LL; if ( v5 == 128 ) { v7 = a2; } else { v7 = a2 + 1; *a2 = BYTE1(v4); v4 = *(_DWORD *)(a3 + 32); v6 = 2LL; } v9 = &a2[v6]; *v7 = v4; if ( *(_DWORD *)(a3 + 32) != *(_DWORD *)(a3 + 60) ) { v10 = *(_DWORD *)(a3 + 36); if ( v10 > 0xFE ) { *v9 = -1; *(_WORD *)(v9 + 1) = __ROL2__(*(_WORD *)(a3 + 36), 8); v9 += 3; } else { *v9++ = v10; } } } else { v8 = *(_DWORD *)(a3 + 36); if ( v5 == 128 ) { v9 = a2 + 1; *a2 = v8; } else { *a2 = BYTE1(v8); v9 = a2 + 2; a2[1] = *(_BYTE *)(a3 + 36); } } v11 = (unsigned int)(*(_DWORD *)(a3 + 48) + (_DWORD)a2 - (_DWORD)v9); LOBYTE(v12) = memmove(v9, *(_QWORD *)a3, v11); v13 = &v9[v11]; if ( *(_QWORD *)(a3 + 16) ) { if ( *(_DWORD *)(a3 + 56) ) { v14 = *(_DWORD *)(a3 + 52); if ( v14 ) { v15 = 1LL; if ( *(_DWORD *)(a3 + 60) == 128 ) { v16 = v13; } else { v16 = v13 + 1; *v13 = BYTE1(v14); v14 = *(_DWORD *)(a3 + 52); v15 = 2LL; } v13 += v15; *v16 = v14; v20 = *(_DWORD *)(a3 + 44); if ( v20 > 0xFE ) { *v13 = -1; *(_WORD *)(v13 + 1) = __ROL2__(*(_WORD *)(a3 + 44), 8); v13 += 3; goto LABEL_26; } } else { v20 = *(_DWORD *)(a3 + 44) + *(char *)(a3 + 72); *(_DWORD *)(a3 + 44) = v20; if ( *(_DWORD *)(a3 + 60) != 128 ) { *v13 = BYTE1(v20); v13[1] = *(_BYTE *)(a3 + 44); v13 += 2; LABEL_26: LOBYTE(v12) = memcpy(v13, *(_QWORD *)(a3 + 8), *(unsigned int *)(a3 + 56)); LODWORD(v13) = (_DWORD)v13 + *(_DWORD *)(a3 + 56); goto LABEL_27; } } *v13++ = v20; goto LABEL_26; } v17 = *(_DWORD *)(a3 + 40); if ( !v17 ) { v12 = *(_DWORD *)(a3 + 44) + *(char *)(a3 + 72); *(_DWORD *)(a3 + 44) = v12; if ( *(_DWORD *)(a3 + 60) != 128 ) { *v13 = BYTE1(v12); LOBYTE(v12) = *(_BYTE *)(a3 + 44); v13[1] = v12; LODWORD(v13) = (_DWORD)v13 + 2; goto LABEL_27; } LABEL_33: *v13 = v12; LODWORD(v13) = (_DWORD)v13 + 1; goto LABEL_27; } v18 = 1LL; if ( *(_DWORD *)(a3 + 60) == 128 ) { v19 = v13; } else { v19 = v13 + 1; *v13 = BYTE1(v17); v17 = *(_DWORD *)(a3 + 40); v18 = 2LL; } v13 += v18; *v19 = v17; v12 = *(_DWORD *)(a3 + 40); if ( v12 != *(_DWORD *)(a3 + 60) ) { v12 = *(_DWORD *)(a3 + 44); if ( v12 > 0xFE ) { *v13 = -1; LOWORD(v12) = __ROL2__(*(_WORD *)(a3 + 44), 8); *(_WORD *)(v13 + 1) = v12; LODWORD(v13) = (_DWORD)v13 + 3; goto LABEL_27; } goto LABEL_33; } } LABEL_27: *(_DWORD *)(a3 + 64) = (_DWORD)v13 - (_DWORD)a2; return v12; }
_ma_store_var_pack_key: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV R14,RDX MOV RDX,RSI MOV EAX,dword ptr [R14 + 0x20] MOV ECX,dword ptr [R14 + 0x3c] TEST EAX,EAX JZ 0x00158a23 MOV EBX,0x1 CMP ECX,0x80 JNZ 0x00158a37 MOV RCX,RDX JMP 0x00158a46 LAB_00158a23: MOV EAX,dword ptr [R14 + 0x24] CMP ECX,0x80 JNZ 0x00158a67 LEA RBX,[RDX + 0x1] MOV byte ptr [RDX],AL JMP 0x00158a8a LAB_00158a37: LEA RCX,[RDX + 0x1] MOV byte ptr [RDX],AH MOV EAX,dword ptr [R14 + 0x20] MOV EBX,0x2 LAB_00158a46: ADD RBX,RDX MOV byte ptr [RCX],AL MOV EAX,dword ptr [R14 + 0x20] CMP EAX,dword ptr [R14 + 0x3c] JZ 0x00158a8a MOV EAX,dword ptr [R14 + 0x24] CMP EAX,0xfe JA 0x00158a76 MOV byte ptr [RBX],AL INC RBX JMP 0x00158a8a LAB_00158a67: MOV byte ptr [RDX],AH MOV AL,byte ptr [R14 + 0x24] LEA RBX,[RDX + 0x2] MOV byte ptr [RDX + 0x1],AL JMP 0x00158a8a LAB_00158a76: MOV byte ptr [RBX],0xff MOVZX EAX,word ptr [R14 + 0x24] ROL AX,0x8 MOV word ptr [RBX + 0x1],AX ADD RBX,0x3 LAB_00158a8a: MOV RSI,qword ptr [R14] MOV R12,RDX MOV R15D,EDX SUB R15D,EBX ADD R15D,dword ptr [R14 + 0x30] MOV RDI,RBX MOV RDX,R15 CALL 0x00129120 ADD RBX,R15 CMP qword ptr [R14 + 0x10],0x0 JZ 0x00158b77 CMP dword ptr [R14 + 0x38],0x0 JZ 0x00158ad6 MOV EAX,dword ptr [R14 + 0x34] TEST EAX,EAX JZ 0x00158afd MOV ECX,0x1 CMP dword ptr [R14 + 0x3c],0x80 JNZ 0x00158b23 MOV RDX,RBX JMP 0x00158b32 LAB_00158ad6: MOV EAX,dword ptr [R14 + 0x28] TEST EAX,EAX JZ 0x00158b87 MOV ECX,0x1 CMP dword ptr [R14 + 0x3c],0x80 JNZ 0x00158bad MOV RDX,RBX JMP 0x00158bbc LAB_00158afd: MOVSX EAX,byte ptr [R14 + 0x48] ADD EAX,dword ptr [R14 + 0x2c] MOV dword ptr [R14 + 0x2c],EAX CMP dword ptr [R14 + 0x3c],0x80 JZ 0x00158b42 MOV byte ptr [RBX],AH MOV AL,byte ptr [R14 + 0x2c] MOV byte ptr [RBX + 0x1],AL ADD RBX,0x2 JMP 0x00158b5d LAB_00158b23: LEA RDX,[RBX + 0x1] MOV byte ptr [RBX],AH MOV EAX,dword ptr [R14 + 0x34] MOV ECX,0x2 LAB_00158b32: ADD RBX,RCX MOV byte ptr [RDX],AL MOV EAX,dword ptr [R14 + 0x2c] CMP EAX,0xfe JA 0x00158b49 LAB_00158b42: MOV byte ptr [RBX],AL INC RBX JMP 0x00158b5d LAB_00158b49: MOV byte ptr [RBX],0xff MOVZX EAX,word ptr [R14 + 0x2c] ROL AX,0x8 MOV word ptr [RBX + 0x1],AX ADD RBX,0x3 LAB_00158b5d: MOV R15,RBX MOV RSI,qword ptr [R14 + 0x8] MOV EDX,dword ptr [R14 + 0x38] MOV RDI,RBX CALL 0x00129080 MOV EBX,dword ptr [R14 + 0x38] ADD RBX,R15 LAB_00158b77: SUB EBX,R12D MOV dword ptr [R14 + 0x40],EBX POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00158b87: MOVSX EAX,byte ptr [R14 + 0x48] ADD EAX,dword ptr [R14 + 0x2c] MOV dword ptr [R14 + 0x2c],EAX CMP dword ptr [R14 + 0x3c],0x80 JZ 0x00158bd6 MOV byte ptr [RBX],AH MOV AL,byte ptr [R14 + 0x2c] MOV byte ptr [RBX + 0x1],AL ADD RBX,0x2 JMP 0x00158b77 LAB_00158bad: LEA RDX,[RBX + 0x1] MOV byte ptr [RBX],AH MOV EAX,dword ptr [R14 + 0x28] MOV ECX,0x2 LAB_00158bbc: ADD RBX,RCX MOV byte ptr [RDX],AL MOV EAX,dword ptr [R14 + 0x28] CMP EAX,dword ptr [R14 + 0x3c] JZ 0x00158b77 MOV EAX,dword ptr [R14 + 0x2c] CMP EAX,0xfe JA 0x00158bdd LAB_00158bd6: MOV byte ptr [RBX],AL INC RBX JMP 0x00158b77 LAB_00158bdd: MOV byte ptr [RBX],0xff MOVZX EAX,word ptr [R14 + 0x2c] ROL AX,0x8 MOV word ptr [RBX + 0x1],AX ADD RBX,0x3 JMP 0x00158b77
void _ma_store_var_pack_key(int8 param_1,int1 *param_2,int8 *param_3) { int iVar1; uint uVar2; int1 *puVar3; long lVar4; int1 *puVar5; ulong __n; iVar1 = *(int *)(param_3 + 4); if (iVar1 == 0) { if (*(int *)((long)param_3 + 0x3c) == 0x80) { puVar5 = param_2 + 1; *param_2 = (char)*(int4 *)((long)param_3 + 0x24); } else { *param_2 = (char)((uint)*(int4 *)((long)param_3 + 0x24) >> 8); puVar5 = param_2 + 2; param_2[1] = *(int1 *)((long)param_3 + 0x24); } } else { lVar4 = 1; puVar3 = param_2; if (*(int *)((long)param_3 + 0x3c) != 0x80) { *param_2 = (char)((uint)iVar1 >> 8); iVar1 = *(int *)(param_3 + 4); lVar4 = 2; puVar3 = param_2 + 1; } puVar5 = param_2 + lVar4; *puVar3 = (char)iVar1; if (*(int *)(param_3 + 4) != *(int *)((long)param_3 + 0x3c)) { if (*(uint *)((long)param_3 + 0x24) < 0xff) { *puVar5 = (char)*(uint *)((long)param_3 + 0x24); puVar5 = puVar5 + 1; } else { *puVar5 = 0xff; *(ushort *)(puVar5 + 1) = *(ushort *)((long)param_3 + 0x24) << 8 | *(ushort *)((long)param_3 + 0x24) >> 8; puVar5 = puVar5 + 3; } } } __n = (ulong)(uint)(((int)param_2 - (int)puVar5) + *(int *)(param_3 + 6)); memmove(puVar5,(void *)*param_3,__n); puVar5 = puVar5 + __n; if (param_3[2] == 0) goto LAB_00158b77; if (*(int *)(param_3 + 7) == 0) { iVar1 = *(int *)(param_3 + 5); if (iVar1 == 0) { uVar2 = (int)*(char *)(param_3 + 9) + *(int *)((long)param_3 + 0x2c); *(uint *)((long)param_3 + 0x2c) = uVar2; if (*(int *)((long)param_3 + 0x3c) != 0x80) { *puVar5 = (char)(uVar2 >> 8); puVar5[1] = *(int1 *)((long)param_3 + 0x2c); puVar5 = puVar5 + 2; goto LAB_00158b77; } } else { lVar4 = 1; puVar3 = puVar5; if (*(int *)((long)param_3 + 0x3c) != 0x80) { *puVar5 = (char)((uint)iVar1 >> 8); iVar1 = *(int *)(param_3 + 5); lVar4 = 2; puVar3 = puVar5 + 1; } puVar5 = puVar5 + lVar4; *puVar3 = (char)iVar1; if (*(int *)(param_3 + 5) == *(int *)((long)param_3 + 0x3c)) goto LAB_00158b77; uVar2 = *(uint *)((long)param_3 + 0x2c); if (0xfe < uVar2) { *puVar5 = 0xff; *(ushort *)(puVar5 + 1) = *(ushort *)((long)param_3 + 0x2c) << 8 | *(ushort *)((long)param_3 + 0x2c) >> 8; puVar5 = puVar5 + 3; goto LAB_00158b77; } } *puVar5 = (char)uVar2; puVar5 = puVar5 + 1; goto LAB_00158b77; } iVar1 = *(int *)((long)param_3 + 0x34); if (iVar1 == 0) { uVar2 = (int)*(char *)(param_3 + 9) + *(int *)((long)param_3 + 0x2c); *(uint *)((long)param_3 + 0x2c) = uVar2; if (*(int *)((long)param_3 + 0x3c) == 0x80) goto LAB_00158b42; *puVar5 = (char)(uVar2 >> 8); puVar5[1] = *(int1 *)((long)param_3 + 0x2c); puVar5 = puVar5 + 2; } else { lVar4 = 1; puVar3 = puVar5; if (*(int *)((long)param_3 + 0x3c) != 0x80) { *puVar5 = (char)((uint)iVar1 >> 8); iVar1 = *(int *)((long)param_3 + 0x34); lVar4 = 2; puVar3 = puVar5 + 1; } puVar5 = puVar5 + lVar4; *puVar3 = (char)iVar1; uVar2 = *(uint *)((long)param_3 + 0x2c); if (uVar2 < 0xff) { LAB_00158b42: *puVar5 = (char)uVar2; puVar5 = puVar5 + 1; } else { *puVar5 = 0xff; *(ushort *)(puVar5 + 1) = *(ushort *)((long)param_3 + 0x2c) << 8 | *(ushort *)((long)param_3 + 0x2c) >> 8; puVar5 = puVar5 + 3; } } memcpy(puVar5,(void *)param_3[1],(ulong)*(uint *)(param_3 + 7)); puVar5 = puVar5 + *(uint *)(param_3 + 7); LAB_00158b77: *(int *)(param_3 + 8) = (int)puVar5 - (int)param_2; return; }
46,749
inline_mysql_file_create
eloqsql/include/mysql/psi/mysql_file.h
static inline File inline_mysql_file_create( #ifdef HAVE_PSI_FILE_INTERFACE PSI_file_key key, const char *src_file, uint src_line, #endif const char *filename, int create_flags, int access_flags, myf myFlags) { File file; #ifdef HAVE_PSI_FILE_INTERFACE struct PSI_file_locker *locker; PSI_file_locker_state state; locker= PSI_FILE_CALL(get_thread_file_name_locker)(&state, key, PSI_FILE_CREATE, filename, &locker); if (psi_likely(locker != NULL)) { PSI_FILE_CALL(start_file_open_wait)(locker, src_file, src_line); file= my_create(filename, create_flags, access_flags, myFlags); PSI_FILE_CALL(end_file_open_wait_and_bind_to_descriptor)(locker, file); return file; } #endif file= my_create(filename, create_flags, access_flags, myFlags); return file; }
O0
c
inline_mysql_file_create: pushq %rbp movq %rsp, %rbp subq $0x80, %rsp movq 0x10(%rbp), %rax movl %edi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) movl %r8d, -0x24(%rbp) movl %r9d, -0x28(%rbp) leaq 0x26663c(%rip), %rax # 0x2bf0b8 movq (%rax), %rax movq 0x148(%rax), %rax movl -0x8(%rbp), %esi movq -0x20(%rbp), %rcx leaq -0x80(%rbp), %rdi xorl %edx, %edx leaq -0x38(%rbp), %r8 callq *%rax movq %rax, -0x38(%rbp) cmpq $0x0, -0x38(%rbp) setne %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax setne %al andb $0x1, %al movzbl %al, %eax cltq cmpq $0x0, %rax je 0x58b13 leaq 0x2665f4(%rip), %rax # 0x2bf0b8 movq (%rax), %rax movq 0x1f0(%rax), %rax movq -0x38(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x14(%rbp), %edx callq *%rax movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movl -0x28(%rbp), %edx movq 0x10(%rbp), %rcx callq 0xef060 movl %eax, -0x2c(%rbp) leaq 0x2665c0(%rip), %rax # 0x2bf0b8 movq (%rax), %rax movq 0x200(%rax), %rax movq -0x38(%rbp), %rdi movl -0x2c(%rbp), %esi callq *%rax movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0x58b2f movq -0x20(%rbp), %rdi movl -0x24(%rbp), %esi movl -0x28(%rbp), %edx movq 0x10(%rbp), %rcx callq 0xef060 movl %eax, -0x2c(%rbp) movl -0x2c(%rbp), %eax movl %eax, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x80, %rsp popq %rbp retq nopl (%rax,%rax)
inline_mysql_file_create_0: push rbp mov rbp, rsp sub rsp, 80h mov rax, [rbp+arg_0] mov [rbp+var_8], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx mov [rbp+var_24], r8d mov [rbp+var_28], r9d lea rax, PSI_server mov rax, [rax] mov rax, [rax+148h] mov esi, [rbp+var_8] mov rcx, [rbp+var_20] lea rdi, [rbp+var_80] xor edx, edx lea r8, [rbp+var_38] call rax mov [rbp+var_38], rax cmp [rbp+var_38], 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_58B13 lea rax, PSI_server mov rax, [rax] mov rax, [rax+1F0h] mov rdi, [rbp+var_38] mov rsi, [rbp+var_10] mov edx, [rbp+var_14] call rax mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov edx, [rbp+var_28] mov rcx, [rbp+arg_0] call my_create mov [rbp+var_2C], eax lea rax, PSI_server mov rax, [rax] mov rax, [rax+200h] mov rdi, [rbp+var_38] mov esi, [rbp+var_2C] call rax mov eax, [rbp+var_2C] mov [rbp+var_4], eax jmp short loc_58B2F loc_58B13: mov rdi, [rbp+var_20] mov esi, [rbp+var_24] mov edx, [rbp+var_28] mov rcx, [rbp+arg_0] call my_create mov [rbp+var_2C], eax mov eax, [rbp+var_2C] mov [rbp+var_4], eax loc_58B2F: mov eax, [rbp+var_4] add rsp, 80h pop rbp retn
long long inline_mysql_file_create_0( unsigned int a1, long long a2, unsigned int a3, long long a4, unsigned int a5, unsigned int a6, long long a7) { _BYTE v8[72]; // [rsp+0h] [rbp-80h] BYREF long long v9; // [rsp+48h] [rbp-38h] BYREF unsigned int v10; // [rsp+54h] [rbp-2Ch] unsigned int v11; // [rsp+58h] [rbp-28h] unsigned int v12; // [rsp+5Ch] [rbp-24h] long long v13; // [rsp+60h] [rbp-20h] unsigned int v14; // [rsp+6Ch] [rbp-14h] long long v15; // [rsp+70h] [rbp-10h] unsigned int v16; // [rsp+78h] [rbp-8h] v16 = a1; v15 = a2; v14 = a3; v13 = a4; v12 = a5; v11 = a6; v9 = ((long long ( *)(_BYTE *, _QWORD, _QWORD, long long, long long *))PSI_server[41])(v8, a1, 0LL, a4, &v9); if ( v9 ) { ((void ( *)(long long, long long, _QWORD))PSI_server[62])(v9, v15, v14); v10 = my_create(v13, v12, v11, a7); ((void ( *)(long long, _QWORD))PSI_server[64])(v9, v10); } else { return (unsigned int)my_create(v13, v12, v11, a7); } return v10; }
inline_mysql_file_create: PUSH RBP MOV RBP,RSP SUB RSP,0x80 MOV RAX,qword ptr [RBP + 0x10] MOV dword ptr [RBP + -0x8],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX MOV dword ptr [RBP + -0x24],R8D MOV dword ptr [RBP + -0x28],R9D LEA RAX,[0x3bf0b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x148] MOV ESI,dword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x80] XOR EDX,EDX LEA R8,[RBP + -0x38] CALL RAX MOV qword ptr [RBP + -0x38],RAX CMP qword ptr [RBP + -0x38],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 0x00158b13 LEA RAX,[0x3bf0b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x1f0] MOV RDI,qword ptr [RBP + -0x38] MOV RSI,qword ptr [RBP + -0x10] MOV EDX,dword ptr [RBP + -0x14] CALL RAX MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV EDX,dword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + 0x10] CALL 0x001ef060 MOV dword ptr [RBP + -0x2c],EAX LEA RAX,[0x3bf0b8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x200] MOV RDI,qword ptr [RBP + -0x38] MOV ESI,dword ptr [RBP + -0x2c] CALL RAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX JMP 0x00158b2f LAB_00158b13: MOV RDI,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RBP + -0x24] MOV EDX,dword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + 0x10] CALL 0x001ef060 MOV dword ptr [RBP + -0x2c],EAX MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [RBP + -0x4],EAX LAB_00158b2f: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x80 POP RBP RET
int4 inline_mysql_file_create (int4 param_1,int8 param_2,int4 param_3,int8 param_4, int4 param_5,int4 param_6,int8 param_7) { int1 local_88 [72]; long local_40; int4 local_34; int4 local_30; int4 local_2c; int8 local_28; int4 local_1c; int8 local_18; int4 local_10; int4 local_c; local_30 = param_6; local_2c = param_5; local_28 = param_4; local_1c = param_3; local_18 = param_2; local_10 = param_1; local_40 = (**(code **)(PSI_server + 0x148))(local_88,param_1,0,param_4,&local_40); if (local_40 == 0) { local_c = my_create(local_28,local_2c,local_30,param_7); } else { (**(code **)(PSI_server + 0x1f0))(local_40,local_18,local_1c); local_34 = my_create(local_28,local_2c,local_30,param_7); (**(code **)(PSI_server + 0x200))(local_40,local_34); local_c = local_34; } return local_c; }
46,750
bf_cmp
bluesky950520[P]quickjs/libbf.c
int bf_cmp(const bf_t *a, const bf_t *b) { int res; if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) { res = 2; } else if (a->sign != b->sign) { if (a->expn == BF_EXP_ZERO && b->expn == BF_EXP_ZERO) res = 0; else res = 1 - 2 * a->sign; } else { res = bf_cmpu(a, b); if (a->sign) res = -res; } return res; }
O0
c
bf_cmp: subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq %rsi, 0x8(%rsp) movq 0x10(%rsp), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, 0x10(%rax) je 0xe7208 movq 0x8(%rsp), %rax movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF cmpq %rcx, 0x10(%rax) jne 0xe7215 movl $0x2, 0x4(%rsp) jmp 0xe729e movq 0x10(%rsp), %rax movl 0x8(%rax), %eax movq 0x8(%rsp), %rcx cmpl 0x8(%rcx), %eax je 0xe7272 movq 0x10(%rsp), %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 cmpq %rcx, 0x10(%rax) jne 0xe725b movq 0x8(%rsp), %rax movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000 cmpq %rcx, 0x10(%rax) jne 0xe725b movl $0x0, 0x4(%rsp) jmp 0xe7270 movq 0x10(%rsp), %rax movl 0x8(%rax), %ecx shll %ecx movl $0x1, %eax subl %ecx, %eax movl %eax, 0x4(%rsp) jmp 0xe729c movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rsi callq 0xe6f40 movl %eax, 0x4(%rsp) movq 0x10(%rsp), %rax cmpl $0x0, 0x8(%rax) je 0xe729a xorl %eax, %eax subl 0x4(%rsp), %eax movl %eax, 0x4(%rsp) jmp 0xe729c jmp 0xe729e movl 0x4(%rsp), %eax addq $0x18, %rsp retq nopw (%rax,%rax)
bf_cmp: sub rsp, 18h mov [rsp+18h+var_8], rdi mov [rsp+18h+var_10], rsi mov rax, [rsp+18h+var_8] mov rcx, 7FFFFFFFFFFFFFFFh cmp [rax+10h], rcx jz short loc_E7208 mov rax, [rsp+18h+var_10] mov rcx, 7FFFFFFFFFFFFFFFh cmp [rax+10h], rcx jnz short loc_E7215 loc_E7208: mov [rsp+18h+var_14], 2 jmp loc_E729E loc_E7215: mov rax, [rsp+18h+var_8] mov eax, [rax+8] mov rcx, [rsp+18h+var_10] cmp eax, [rcx+8] jz short loc_E7272 mov rax, [rsp+18h+var_8] mov rcx, 8000000000000000h cmp [rax+10h], rcx jnz short loc_E725B mov rax, [rsp+18h+var_10] mov rcx, 8000000000000000h cmp [rax+10h], rcx jnz short loc_E725B mov [rsp+18h+var_14], 0 jmp short loc_E7270 loc_E725B: mov rax, [rsp+18h+var_8] mov ecx, [rax+8] shl ecx, 1 mov eax, 1 sub eax, ecx mov [rsp+18h+var_14], eax loc_E7270: jmp short loc_E729C loc_E7272: mov rdi, [rsp+18h+var_8] mov rsi, [rsp+18h+var_10] call bf_cmpu mov [rsp+18h+var_14], eax mov rax, [rsp+18h+var_8] cmp dword ptr [rax+8], 0 jz short loc_E729A xor eax, eax sub eax, [rsp+18h+var_14] mov [rsp+18h+var_14], eax loc_E729A: jmp short $+2 loc_E729C: jmp short $+2 loc_E729E: mov eax, [rsp+18h+var_14] add rsp, 18h retn
long long bf_cmp(long long a1, long long a2) { unsigned int v3; // [rsp+4h] [rbp-14h] if ( *(_QWORD *)(a1 + 16) == 0x7FFFFFFFFFFFFFFFLL || *(_QWORD *)(a2 + 16) == 0x7FFFFFFFFFFFFFFFLL ) { return 2; } else if ( *(_DWORD *)(a1 + 8) == *(_DWORD *)(a2 + 8) ) { v3 = bf_cmpu(a1, a2); if ( *(_DWORD *)(a1 + 8) ) return -v3; } else if ( *(_QWORD *)(a1 + 16) == 0x8000000000000000LL && *(_QWORD *)(a2 + 16) == 0x8000000000000000LL ) { return 0; } else { return (unsigned int)(1 - 2 * *(_DWORD *)(a1 + 8)); } return v3; }
bf_cmp: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RAX,qword ptr [RSP + 0x10] MOV RCX,0x7fffffffffffffff CMP qword ptr [RAX + 0x10],RCX JZ 0x001e7208 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,0x7fffffffffffffff CMP qword ptr [RAX + 0x10],RCX JNZ 0x001e7215 LAB_001e7208: MOV dword ptr [RSP + 0x4],0x2 JMP 0x001e729e LAB_001e7215: MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX + 0x8] MOV RCX,qword ptr [RSP + 0x8] CMP EAX,dword ptr [RCX + 0x8] JZ 0x001e7272 MOV RAX,qword ptr [RSP + 0x10] MOV RCX,-0x8000000000000000 CMP qword ptr [RAX + 0x10],RCX JNZ 0x001e725b MOV RAX,qword ptr [RSP + 0x8] MOV RCX,-0x8000000000000000 CMP qword ptr [RAX + 0x10],RCX JNZ 0x001e725b MOV dword ptr [RSP + 0x4],0x0 JMP 0x001e7270 LAB_001e725b: MOV RAX,qword ptr [RSP + 0x10] MOV ECX,dword ptr [RAX + 0x8] SHL ECX,0x1 MOV EAX,0x1 SUB EAX,ECX MOV dword ptr [RSP + 0x4],EAX LAB_001e7270: JMP 0x001e729c LAB_001e7272: MOV RDI,qword ptr [RSP + 0x10] MOV RSI,qword ptr [RSP + 0x8] CALL 0x001e6f40 MOV dword ptr [RSP + 0x4],EAX MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x8],0x0 JZ 0x001e729a XOR EAX,EAX SUB EAX,dword ptr [RSP + 0x4] MOV dword ptr [RSP + 0x4],EAX LAB_001e729a: JMP 0x001e729c LAB_001e729c: JMP 0x001e729e LAB_001e729e: MOV EAX,dword ptr [RSP + 0x4] ADD RSP,0x18 RET
int bf_cmp(long param_1,long param_2) { int4 local_14; if ((*(long *)(param_1 + 0x10) == 0x7fffffffffffffff) || (*(long *)(param_2 + 0x10) == 0x7fffffffffffffff)) { local_14 = 2; } else if (*(int *)(param_1 + 8) == *(int *)(param_2 + 8)) { local_14 = bf_cmpu(param_1,param_2); if (*(int *)(param_1 + 8) != 0) { local_14 = -local_14; } } else if ((*(long *)(param_1 + 0x10) == -0x8000000000000000) && (*(long *)(param_2 + 0x10) == -0x8000000000000000)) { local_14 = 0; } else { local_14 = *(int *)(param_1 + 8) * -2 + 1; } return local_14; }
46,751
bf_cmp
bluesky950520[P]quickjs/libbf.c
int bf_cmp(const bf_t *a, const bf_t *b) { int res; if (a->expn == BF_EXP_NAN || b->expn == BF_EXP_NAN) { res = 2; } else if (a->sign != b->sign) { if (a->expn == BF_EXP_ZERO && b->expn == BF_EXP_ZERO) res = 0; else res = 1 - 2 * a->sign; } else { res = bf_cmpu(a, b); if (a->sign) res = -res; } return res; }
O1
c
bf_cmp: movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF movq 0x10(%rdi), %rcx movl $0x2, %eax cmpq %rdx, %rcx je 0x85549 movq 0x10(%rsi), %r8 cmpq %rdx, %r8 je 0x85549 pushq %rbx movl 0x8(%rdi), %ebx cmpl 0x8(%rsi), %ebx jne 0x8552f callq 0x8542a movl %eax, %ecx negl %eax testl %ebx, %ebx cmovel %ecx, %eax jmp 0x85548 incq %rdx xorq %rdx, %rcx xorq %rdx, %r8 xorl %eax, %eax orq %rcx, %r8 je 0x85548 addl %ebx, %ebx movl $0x1, %eax subl %ebx, %eax popq %rbx retq
bf_cmp: mov rdx, 7FFFFFFFFFFFFFFFh mov rcx, [rdi+10h] mov eax, 2 cmp rcx, rdx jz short locret_85549 mov r8, [rsi+10h] cmp r8, rdx jz short locret_85549 push rbx mov ebx, [rdi+8] cmp ebx, [rsi+8] jnz short loc_8552F call bf_cmpu mov ecx, eax neg eax test ebx, ebx cmovz eax, ecx jmp short loc_85548 loc_8552F: inc rdx xor rcx, rdx xor r8, rdx xor eax, eax or r8, rcx jz short loc_85548 add ebx, ebx mov eax, 1 sub eax, ebx loc_85548: pop rbx locret_85549: retn
long long bf_cmp(long long a1, long long a2) { long long v2; // rcx long long result; // rax long long v4; // r8 int v5; // ebx unsigned int v6; // ecx v2 = *(_QWORD *)(a1 + 16); result = 2LL; if ( v2 != 0x7FFFFFFFFFFFFFFFLL ) { v4 = *(_QWORD *)(a2 + 16); if ( v4 != 0x7FFFFFFFFFFFFFFFLL ) { v5 = *(_DWORD *)(a1 + 8); if ( v5 == *(_DWORD *)(a2 + 8) ) { v6 = bf_cmpu((_QWORD *)a1, (_QWORD *)a2); result = -v6; if ( !v5 ) return v6; } else { result = 0LL; if ( v2 ^ 0x8000000000000000LL | v4 ^ 0x8000000000000000LL ) return (unsigned int)(1 - 2 * v5); } } } return result; }
bf_cmp: MOV RDX,0x7fffffffffffffff MOV RCX,qword ptr [RDI + 0x10] MOV EAX,0x2 CMP RCX,RDX JZ 0x00185549 MOV R8,qword ptr [RSI + 0x10] CMP R8,RDX JZ 0x00185549 PUSH RBX MOV EBX,dword ptr [RDI + 0x8] CMP EBX,dword ptr [RSI + 0x8] JNZ 0x0018552f CALL 0x0018542a MOV ECX,EAX NEG EAX TEST EBX,EBX CMOVZ EAX,ECX JMP 0x00185548 LAB_0018552f: INC RDX XOR RCX,RDX XOR R8,RDX XOR EAX,EAX OR R8,RCX JZ 0x00185548 ADD EBX,EBX MOV EAX,0x1 SUB EAX,EBX LAB_00185548: POP RBX LAB_00185549: RET
int bf_cmp(long param_1,long param_2) { int iVar1; int iVar2; int iVar3; iVar3 = 2; if ((*(long *)(param_1 + 0x10) != 0x7fffffffffffffff) && (*(long *)(param_2 + 0x10) != 0x7fffffffffffffff)) { iVar1 = *(int *)(param_1 + 8); if (iVar1 == *(int *)(param_2 + 8)) { iVar2 = bf_cmpu(); iVar3 = -iVar2; if (iVar1 == 0) { iVar3 = iVar2; } } else { iVar3 = 0; if (*(long *)(param_2 + 0x10) != -0x8000000000000000 || *(long *)(param_1 + 0x10) != -0x8000000000000000) { iVar3 = iVar1 * -2 + 1; } } } return iVar3; }
46,752
js_worker_get_onmessage
bluesky950520[P]quickjs/quickjs-libc.c
static JSValue js_worker_get_onmessage(JSContext *ctx, JSValue this_val) { JSRuntime *rt = JS_GetRuntime(ctx); JSThreadState *ts = js_get_thread_state(rt); JSWorkerData *worker = JS_GetOpaque2(ctx, this_val, ts->worker_class_id); JSWorkerMessageHandler *port; if (!worker) return JS_EXCEPTION; port = worker->msg_handler; if (port) { return JS_DupValue(ctx, port->on_message_func); } else { return JS_NULL; } }
O2
c
js_worker_get_onmessage: pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx callq 0x1a185 movq %rax, %rdi callq 0x1028a movl 0x7c(%rax), %ecx movq %rbx, %rdi movq %r15, %rsi movq %r14, %rdx callq 0x21207 testq %rax, %rax je 0x13156 movq 0x10(%rax), %rax testq %rax, %rax je 0x1315a movq 0x18(%rax), %rsi movq 0x20(%rax), %rdx movq %rbx, %rdi callq 0x16ffb movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movl %eax, %eax jmp 0x13161 pushq $0x6 jmp 0x1315c pushq $0x2 popq %rdx xorl %eax, %eax xorl %ecx, %ecx orq %rcx, %rax popq %rbx popq %r14 popq %r15 retq
js_worker_get_onmessage: push r15 push r14 push rbx mov r14, rdx mov r15, rsi mov rbx, rdi call JS_GetRuntime mov rdi, rax call js_get_thread_state mov ecx, [rax+7Ch] mov rdi, rbx mov rsi, r15 mov rdx, r14 call JS_GetOpaque2 test rax, rax jz short loc_13156 mov rax, [rax+10h] test rax, rax jz short loc_1315A mov rsi, [rax+18h] mov rdx, [rax+20h] mov rdi, rbx call JS_DupValue mov rcx, 0FFFFFFFF00000000h and rcx, rax mov eax, eax jmp short loc_13161 loc_13156: push 6 jmp short loc_1315C loc_1315A: push 2 loc_1315C: pop rdx xor eax, eax xor ecx, ecx loc_13161: or rax, rcx pop rbx pop r14 pop r15 retn
unsigned long long js_worker_get_onmessage(long long a1, long long a2, long long a3) { int Runtime; // eax int v5; // edx int v6; // ecx int v7; // r8d int v8; // r9d long long thread_state; // rax long long Opaque2; // rax long long v11; // rax unsigned long long v12; // rcx long long v13; // rax char v15; // [rsp+0h] [rbp-18h] Runtime = JS_GetRuntime(a1); thread_state = js_get_thread_state(Runtime, a2, v5, v6, v7, v8, v15); Opaque2 = JS_GetOpaque2(a1, a2, a3, *(unsigned int *)(thread_state + 124)); if ( Opaque2 && (v11 = *(_QWORD *)(Opaque2 + 16)) != 0 ) { v13 = JS_DupValue(a1, *(_QWORD *)(v11 + 24), *(_QWORD *)(v11 + 32)); v12 = v13 & 0xFFFFFFFF00000000LL; v13 = (unsigned int)v13; } else { v13 = 0LL; v12 = 0LL; } return v12 | v13; }
js_worker_get_onmessage: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDX MOV R15,RSI MOV RBX,RDI CALL 0x0011a185 MOV RDI,RAX CALL 0x0011028a MOV ECX,dword ptr [RAX + 0x7c] MOV RDI,RBX MOV RSI,R15 MOV RDX,R14 CALL 0x00121207 TEST RAX,RAX JZ 0x00113156 MOV RAX,qword ptr [RAX + 0x10] TEST RAX,RAX JZ 0x0011315a MOV RSI,qword ptr [RAX + 0x18] MOV RDX,qword ptr [RAX + 0x20] MOV RDI,RBX CALL 0x00116ffb MOV RCX,-0x100000000 AND RCX,RAX MOV EAX,EAX JMP 0x00113161 LAB_00113156: PUSH 0x6 JMP 0x0011315c LAB_0011315a: PUSH 0x2 LAB_0011315c: POP RDX XOR EAX,EAX XOR ECX,ECX LAB_00113161: OR RAX,RCX POP RBX POP R14 POP R15 RET
ulong js_worker_get_onmessage(int8 param_1,int8 param_2,int8 param_3) { int8 uVar1; long lVar2; ulong uVar3; ulong uVar4; uVar1 = JS_GetRuntime(); lVar2 = js_get_thread_state(uVar1); lVar2 = JS_GetOpaque2(param_1,param_2,param_3,*(int4 *)(lVar2 + 0x7c)); if ((lVar2 == 0) || (lVar2 = *(long *)(lVar2 + 0x10), lVar2 == 0)) { uVar3 = 0; uVar4 = 0; } else { uVar3 = JS_DupValue(param_1,*(int8 *)(lVar2 + 0x18),*(int8 *)(lVar2 + 0x20)); uVar4 = uVar3 & 0xffffffff00000000; uVar3 = uVar3 & 0xffffffff; } return uVar3 | uVar4; }
46,753
change_key_cache_param
eloqsql/mysys/mf_keycache.c
void change_key_cache_param(KEY_CACHE *keycache, uint division_limit, uint age_threshold) { if (keycache->key_cache_inited) { pthread_mutex_lock(&keycache->op_lock); keycache->interface_funcs->change_param(keycache->keycache_cb, division_limit, age_threshold); pthread_mutex_unlock(&keycache->op_lock); } }
O0
c
change_key_cache_param: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movl %edx, -0x10(%rbp) movq -0x8(%rbp), %rax cmpb $0x0, 0x48(%rax) je 0xe8d52 movq -0x8(%rbp), %rdi addq $0x58, %rdi callq 0x2a220 movq -0x8(%rbp), %rax movq 0x10(%rax), %rax movq 0x10(%rax), %rax movq -0x8(%rbp), %rcx movq 0x8(%rcx), %rdi movl -0xc(%rbp), %esi movl -0x10(%rbp), %edx callq *%rax movq -0x8(%rbp), %rdi addq $0x58, %rdi callq 0x2a1f0 addq $0x10, %rsp popq %rbp retq nopl (%rax,%rax)
change_key_cache_param: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_10], edx mov rax, [rbp+var_8] cmp byte ptr [rax+48h], 0 jz short loc_E8D52 mov rdi, [rbp+var_8] add rdi, 58h ; 'X' call _pthread_mutex_lock mov rax, [rbp+var_8] mov rax, [rax+10h] mov rax, [rax+10h] mov rcx, [rbp+var_8] mov rdi, [rcx+8] mov esi, [rbp+var_C] mov edx, [rbp+var_10] call rax mov rdi, [rbp+var_8] add rdi, 58h ; 'X' call _pthread_mutex_unlock loc_E8D52: add rsp, 10h pop rbp retn
long long change_key_cache_param(long long a1, unsigned int a2, unsigned int a3) { long long result; // rax result = a1; if ( *(_BYTE *)(a1 + 72) ) { pthread_mutex_lock(a1 + 88); (*(void ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)(a1 + 16) + 16LL))(*(_QWORD *)(a1 + 8), a2, a3); return pthread_mutex_unlock(a1 + 88); } return result; }
change_key_cache_param: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV dword ptr [RBP + -0x10],EDX MOV RAX,qword ptr [RBP + -0x8] CMP byte ptr [RAX + 0x48],0x0 JZ 0x001e8d52 MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x58 CALL 0x0012a220 MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x8] MOV RDI,qword ptr [RCX + 0x8] MOV ESI,dword ptr [RBP + -0xc] MOV EDX,dword ptr [RBP + -0x10] CALL RAX MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x58 CALL 0x0012a1f0 LAB_001e8d52: ADD RSP,0x10 POP RBP RET
void change_key_cache_param(long param_1,int4 param_2,int4 param_3) { if (*(char *)(param_1 + 0x48) != '\0') { pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x58)); (**(code **)(*(long *)(param_1 + 0x10) + 0x10))(*(int8 *)(param_1 + 8),param_2,param_3); pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x58)); } return; }
46,754
change_key_cache_param
eloqsql/mysys/mf_keycache.c
void change_key_cache_param(KEY_CACHE *keycache, uint division_limit, uint age_threshold) { if (keycache->key_cache_inited) { pthread_mutex_lock(&keycache->op_lock); keycache->interface_funcs->change_param(keycache->keycache_cb, division_limit, age_threshold); pthread_mutex_unlock(&keycache->op_lock); } }
O3
c
change_key_cache_param: cmpb $0x0, 0x48(%rdi) je 0x9c02b pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movl %edx, %ebx movl %esi, %r14d movq %rdi, %r15 leaq 0x58(%rdi), %r12 movq %r12, %rdi callq 0x2a220 movq 0x8(%r15), %rdi movq 0x10(%r15), %rax movl %r14d, %esi movl %ebx, %edx callq *0x10(%rax) movq %r12, %rdi popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x2a1e0 retq
change_key_cache_param: cmp byte ptr [rdi+48h], 0 jz short locret_9C02B push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov ebx, edx mov r14d, esi mov r15, rdi lea r12, [rdi+58h] mov rdi, r12 call _pthread_mutex_lock mov rdi, [r15+8] mov rax, [r15+10h] mov esi, r14d mov edx, ebx call qword ptr [rax+10h] mov rdi, r12 pop rbx pop r12 pop r14 pop r15 pop rbp jmp _pthread_mutex_unlock locret_9C02B: retn
long long change_key_cache_param(long long a1, unsigned int a2, unsigned int a3) { long long result; // rax if ( *(_BYTE *)(a1 + 72) ) { pthread_mutex_lock(a1 + 88); (*(void ( **)(_QWORD, _QWORD, _QWORD))(*(_QWORD *)(a1 + 16) + 16LL))(*(_QWORD *)(a1 + 8), a2, a3); return pthread_mutex_unlock(a1 + 88); } return result; }
change_key_cache_param: CMP byte ptr [RDI + 0x48],0x0 JZ 0x0019c02b PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV EBX,EDX MOV R14D,ESI MOV R15,RDI LEA R12,[RDI + 0x58] MOV RDI,R12 CALL 0x0012a220 MOV RDI,qword ptr [R15 + 0x8] MOV RAX,qword ptr [R15 + 0x10] MOV ESI,R14D MOV EDX,EBX CALL qword ptr [RAX + 0x10] MOV RDI,R12 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x0012a1e0 LAB_0019c02b: RET
void change_key_cache_param(long param_1,int4 param_2,int4 param_3) { if (*(char *)(param_1 + 0x48) != '\0') { pthread_mutex_lock((pthread_mutex_t *)(param_1 + 0x58)); (**(code **)(*(long *)(param_1 + 0x10) + 0x10))(*(int8 *)(param_1 + 8),param_2,param_3); pthread_mutex_unlock((pthread_mutex_t *)(param_1 + 0x58)); return; } return; }
46,755
my_convert_using_func
eloqsql/strings/ctype.c
uint32 my_convert_using_func(char *to, size_t to_length, CHARSET_INFO *to_cs, my_charset_conv_wc_mb wc_mb, const char *from, size_t from_length, CHARSET_INFO *from_cs, my_charset_conv_mb_wc mb_wc, uint *errors) { int cnvres; my_wc_t wc; const uchar *from_end= (const uchar*) from + from_length; char *to_start= to; uchar *to_end= (uchar*) to + to_length; uint error_count= 0; while (1) { if ((cnvres= (*mb_wc)(from_cs, &wc, (uchar*) from, from_end)) > 0) from+= cnvres; else if (cnvres == MY_CS_ILSEQ) { error_count++; from++; wc= '?'; } else if (cnvres > MY_CS_TOOSMALL) { /* A correct multibyte sequence detected But it doesn't have Unicode mapping. */ error_count++; from+= (-cnvres); wc= '?'; } else { if ((uchar *) from >= from_end) break; /* End of line */ /* Incomplete byte sequence */ error_count++; from++; wc= '?'; } outp: if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0) to+= cnvres; else if (cnvres == MY_CS_ILUNI && wc != '?') { error_count++; wc= '?'; goto outp; } else break; } *errors= error_count; return (uint32) (to - to_start); }
O0
c
my_convert_using_func: pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq 0x20(%rbp), %rax movq 0x18(%rbp), %rax movq 0x10(%rbp), %rax movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x8(%rbp), %rax addq -0x10(%rbp), %rax movq %rax, -0x58(%rbp) movl $0x0, -0x5c(%rbp) movq 0x18(%rbp), %rax movq 0x10(%rbp), %rdi movq -0x28(%rbp), %rdx movq -0x48(%rbp), %rcx leaq -0x40(%rbp), %rsi callq *%rax movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0xc0aa4 movl -0x34(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0xc0b22 cmpl $0x0, -0x34(%rbp) jne 0xc0ac9 movl -0x5c(%rbp), %eax addl $0x1, %eax movl %eax, -0x5c(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq $0x3f, -0x40(%rbp) jmp 0xc0b20 cmpl $-0x65, -0x34(%rbp) jle 0xc0af5 movl -0x5c(%rbp), %eax addl $0x1, %eax movl %eax, -0x5c(%rbp) xorl %ecx, %ecx subl -0x34(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) movq $0x3f, -0x40(%rbp) jmp 0xc0b1e movq -0x28(%rbp), %rax cmpq -0x48(%rbp), %rax jb 0xc0b01 jmp 0xc0b7c movl -0x5c(%rbp), %eax addl $0x1, %eax movl %eax, -0x5c(%rbp) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq $0x3f, -0x40(%rbp) jmp 0xc0b20 jmp 0xc0b22 jmp 0xc0b24 movq -0x20(%rbp), %rax movq -0x18(%rbp), %rdi movq -0x40(%rbp), %rsi movq -0x8(%rbp), %rdx movq -0x58(%rbp), %rcx callq *%rax movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0xc0b55 movl -0x34(%rbp), %ecx movq -0x8(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x8(%rbp) jmp 0xc0b77 cmpl $0x0, -0x34(%rbp) jne 0xc0b75 cmpq $0x3f, -0x40(%rbp) je 0xc0b75 movl -0x5c(%rbp), %eax addl $0x1, %eax movl %eax, -0x5c(%rbp) movq $0x3f, -0x40(%rbp) jmp 0xc0b24 jmp 0xc0b7c jmp 0xc0a73 movl -0x5c(%rbp), %ecx movq 0x20(%rbp), %rax movl %ecx, (%rax) movq -0x8(%rbp), %rax movq -0x50(%rbp), %rcx subq %rcx, %rax addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_convert_using_func: push rbp mov rbp, rsp sub rsp, 60h mov rax, [rbp+arg_10] mov rax, [rbp+arg_8] mov rax, [rbp+arg_0] 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 [rbp+var_30], r9 mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_48], rax mov rax, [rbp+var_8] mov [rbp+var_50], rax mov rax, [rbp+var_8] add rax, [rbp+var_10] mov [rbp+var_58], rax mov [rbp+var_5C], 0 loc_C0A73: mov rax, [rbp+arg_8] mov rdi, [rbp+arg_0] mov rdx, [rbp+var_28] mov rcx, [rbp+var_48] lea rsi, [rbp+var_40] call rax mov [rbp+var_34], eax cmp eax, 0 jle short loc_C0AA4 mov ecx, [rbp+var_34] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax jmp short loc_C0B22 loc_C0AA4: cmp [rbp+var_34], 0 jnz short loc_C0AC9 mov eax, [rbp+var_5C] add eax, 1 mov [rbp+var_5C], eax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov [rbp+var_40], 3Fh ; '?' jmp short loc_C0B20 loc_C0AC9: cmp [rbp+var_34], 0FFFFFF9Bh jle short loc_C0AF5 mov eax, [rbp+var_5C] add eax, 1 mov [rbp+var_5C], eax xor ecx, ecx sub ecx, [rbp+var_34] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax mov [rbp+var_40], 3Fh ; '?' jmp short loc_C0B1E loc_C0AF5: mov rax, [rbp+var_28] cmp rax, [rbp+var_48] jb short loc_C0B01 jmp short loc_C0B7C loc_C0B01: mov eax, [rbp+var_5C] add eax, 1 mov [rbp+var_5C], eax mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov [rbp+var_40], 3Fh ; '?' loc_C0B1E: jmp short $+2 loc_C0B20: jmp short $+2 loc_C0B22: jmp short $+2 loc_C0B24: mov rax, [rbp+var_20] mov rdi, [rbp+var_18] mov rsi, [rbp+var_40] mov rdx, [rbp+var_8] mov rcx, [rbp+var_58] call rax mov [rbp+var_34], eax cmp eax, 0 jle short loc_C0B55 mov ecx, [rbp+var_34] mov rax, [rbp+var_8] movsxd rcx, ecx add rax, rcx mov [rbp+var_8], rax jmp short loc_C0B77 loc_C0B55: cmp [rbp+var_34], 0 jnz short loc_C0B75 cmp [rbp+var_40], 3Fh ; '?' jz short loc_C0B75 mov eax, [rbp+var_5C] add eax, 1 mov [rbp+var_5C], eax mov [rbp+var_40], 3Fh ; '?' jmp short loc_C0B24 loc_C0B75: jmp short loc_C0B7C loc_C0B77: jmp loc_C0A73 loc_C0B7C: mov ecx, [rbp+var_5C] mov rax, [rbp+arg_10] mov [rax], ecx mov rax, [rbp+var_8] mov rcx, [rbp+var_50] sub rax, rcx add rsp, 60h pop rbp retn
long long my_convert_using_func( long long a1, long long a2, long long a3, long long ( *a4)(long long, long long, long long, long long), unsigned long long a5, long long a6, long long a7, long long ( *a8)(long long, long long *, unsigned long long, unsigned long long), _DWORD *a9) { int v10; // [rsp+4h] [rbp-5Ch] unsigned long long v11; // [rsp+18h] [rbp-48h] long long v12; // [rsp+20h] [rbp-40h] BYREF int v13; // [rsp+2Ch] [rbp-34h] long long v14; // [rsp+30h] [rbp-30h] unsigned long long v15; // [rsp+38h] [rbp-28h] long long ( *v16)(long long, long long, long long, long long); // [rsp+40h] [rbp-20h] long long v17; // [rsp+48h] [rbp-18h] long long v18; // [rsp+50h] [rbp-10h] long long v19; // [rsp+58h] [rbp-8h] v19 = a1; v18 = a2; v17 = a3; v16 = a4; v15 = a5; v14 = a6; v11 = a6 + a5; v10 = 0; while ( 1 ) { v13 = a8(a7, &v12, v15, v11); if ( v13 > 0 ) { v15 += v13; goto LABEL_10; } if ( !v13 ) { ++v10; ++v15; v12 = 63LL; goto LABEL_10; } if ( v13 > -101 ) { ++v10; v15 += -v13; v12 = 63LL; goto LABEL_10; } if ( v15 >= v11 ) break; ++v10; ++v15; v12 = 63LL; LABEL_10: while ( 1 ) { v13 = v16(v17, v12, v19, a2 + a1); if ( v13 > 0 ) break; if ( v13 || v12 == 63 ) goto LABEL_15; ++v10; v12 = 63LL; } v19 += v13; } LABEL_15: *a9 = v10; return v19 - a1; }
my_convert_using_func: PUSH RBP MOV RBP,RSP SUB RSP,0x60 MOV RAX,qword ptr [RBP + 0x20] MOV RAX,qword ptr [RBP + 0x18] MOV RAX,qword ptr [RBP + 0x10] 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 qword ptr [RBP + -0x30],R9 MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x8] ADD RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x58],RAX MOV dword ptr [RBP + -0x5c],0x0 LAB_001c0a73: MOV RAX,qword ptr [RBP + 0x18] MOV RDI,qword ptr [RBP + 0x10] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x48] LEA RSI,[RBP + -0x40] CALL RAX MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x001c0aa4 MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX JMP 0x001c0b22 LAB_001c0aa4: CMP dword ptr [RBP + -0x34],0x0 JNZ 0x001c0ac9 MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x1 MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x40],0x3f JMP 0x001c0b20 LAB_001c0ac9: CMP dword ptr [RBP + -0x34],-0x65 JLE 0x001c0af5 MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x1 MOV dword ptr [RBP + -0x5c],EAX XOR ECX,ECX SUB ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x28] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x40],0x3f JMP 0x001c0b1e LAB_001c0af5: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x48] JC 0x001c0b01 JMP 0x001c0b7c LAB_001c0b01: MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x1 MOV dword ptr [RBP + -0x5c],EAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x40],0x3f LAB_001c0b1e: JMP 0x001c0b20 LAB_001c0b20: JMP 0x001c0b22 LAB_001c0b22: JMP 0x001c0b24 LAB_001c0b24: MOV RAX,qword ptr [RBP + -0x20] MOV RDI,qword ptr [RBP + -0x18] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x58] CALL RAX MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x001c0b55 MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x8] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x8],RAX JMP 0x001c0b77 LAB_001c0b55: CMP dword ptr [RBP + -0x34],0x0 JNZ 0x001c0b75 CMP qword ptr [RBP + -0x40],0x3f JZ 0x001c0b75 MOV EAX,dword ptr [RBP + -0x5c] ADD EAX,0x1 MOV dword ptr [RBP + -0x5c],EAX MOV qword ptr [RBP + -0x40],0x3f JMP 0x001c0b24 LAB_001c0b75: JMP 0x001c0b7c LAB_001c0b77: JMP 0x001c0a73 LAB_001c0b7c: MOV ECX,dword ptr [RBP + -0x5c] MOV RAX,qword ptr [RBP + 0x20] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RBP + -0x50] SUB RAX,RCX ADD RSP,0x60 POP RBP RET
long my_convert_using_func (long param_1,long param_2,int8 param_3,code *param_4,ulong param_5, long param_6,int8 param_7,code *param_8,int *param_9) { int local_64; long local_48; int local_3c; long local_38; ulong local_30; code *local_28; int8 local_20; long local_18; long local_10; local_64 = 0; local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_18 = param_2; local_10 = param_1; do { local_3c = (*param_8)(param_7,&local_48,local_30); if (local_3c < 1) { if (local_3c == 0) { local_30 = local_30 + 1; } else if (local_3c < -100) { if (param_5 + param_6 <= local_30) { LAB_001c0b7c: *param_9 = local_64; return local_10 - param_1; } local_30 = local_30 + 1; } else { local_30 = local_30 + (long)-local_3c; } local_64 = local_64 + 1; local_48 = 0x3f; } else { local_30 = local_30 + (long)local_3c; } while (local_3c = (*local_28)(local_20,local_48,local_10,param_1 + param_2), local_3c < 1) { if ((local_3c != 0) || (local_48 == 0x3f)) goto LAB_001c0b7c; local_64 = local_64 + 1; local_48 = 0x3f; local_3c = 0; } local_10 = local_10 + local_3c; } while( true ); }
46,756
bool (anonymous namespace)::IsCorrectFieldType<bool>(DatabaseFieldTypes)
SylCore-WoTLK/src/server/database/Database/Field.cpp
inline bool IsCorrectFieldType(DatabaseFieldTypes type) { // Int8 if constexpr (std::is_same_v<T, bool> || std::is_same_v<T, int8> || std::is_same_v<T, uint8>) { if (type == DatabaseFieldTypes::Int8) return true; } // In16 if constexpr (std::is_same_v<T, uint16> || std::is_same_v<T, int16>) { if (type == DatabaseFieldTypes::Int16) return true; } // Int32 if constexpr (std::is_same_v<T, uint32> || std::is_same_v<T, int32>) { if (type == DatabaseFieldTypes::Int32) return true; } // Int64 if constexpr (std::is_same_v<T, uint64> || std::is_same_v<T, int64>) { if (type == DatabaseFieldTypes::Int64) return true; } // float if constexpr (std::is_same_v<T, float>) { if (type == DatabaseFieldTypes::Float) return true; } // dobule if constexpr (std::is_same_v<T, double>) { if (type == DatabaseFieldTypes::Double || type == DatabaseFieldTypes::Decimal) return true; } // Binary if constexpr (std::is_same_v<T, Binary>) { if (type == DatabaseFieldTypes::Binary) return true; } return false; }
O0
cpp
bool (anonymous namespace)::IsCorrectFieldType<bool>(DatabaseFieldTypes): movb %dil, %al movb %al, -0x2(%rsp) cmpb $0x1, -0x2(%rsp) jne 0xdeef5 movb $0x1, -0x1(%rsp) jmp 0xdeefa movb $0x0, -0x1(%rsp) movb -0x1(%rsp), %al andb $0x1, %al retq nopw %cs:(%rax,%rax)
_ZN12_GLOBAL__N_118IsCorrectFieldTypeIbEEb18DatabaseFieldTypes: mov al, dil mov [rsp+var_2], al cmp [rsp+var_2], 1 jnz short loc_DEEF5 mov [rsp+var_1], 1 jmp short loc_DEEFA loc_DEEF5: mov [rsp+var_1], 0 loc_DEEFA: mov al, [rsp+var_1] and al, 1 retn
bool `anonymous namespace'::IsCorrectFieldType<bool>(char a1) { return a1 == 1; }
IsCorrectFieldType<bool>: MOV AL,DIL MOV byte ptr [RSP + -0x2],AL CMP byte ptr [RSP + -0x2],0x1 JNZ 0x001deef5 MOV byte ptr [RSP + -0x1],0x1 JMP 0x001deefa LAB_001deef5: MOV byte ptr [RSP + -0x1],0x0 LAB_001deefa: MOV AL,byte ptr [RSP + -0x1] AND AL,0x1 RET
/* bool (anonymous namespace)::IsCorrectFieldType<bool>(DatabaseFieldTypes) */ bool (anonymous_namespace)::IsCorrectFieldType<bool>(char param_1) { return param_1 == '\x01'; }
46,757
YogaTest_dirty_propagation_changing_layout_config_Test::~YogaTest_dirty_propagation_changing_layout_config_Test()
yoga-mod/tests/YGDirtyMarkingTest.cpp
TEST(YogaTest, dirty_propagation_changing_layout_config) { YGNodeRef root = YGNodeNew(); YGNodeStyleSetAlignItems(root, YGAlignFlexStart); YGNodeStyleSetWidth(root, 100); YGNodeStyleSetHeight(root, 100); YGNodeRef root_child0 = YGNodeNew(); YGNodeStyleSetWidth(root_child0, 50); YGNodeStyleSetHeight(root_child0, 20); YGNodeInsertChild(root, root_child0, 0); YGNodeRef root_child1 = YGNodeNew(); YGNodeStyleSetWidth(root_child1, 50); YGNodeStyleSetHeight(root_child1, 20); YGNodeInsertChild(root, root_child1, 1); YGNodeRef root_child0_child0 = YGNodeNew(); YGNodeStyleSetWidth(root_child0_child0, 25); YGNodeStyleSetHeight(root_child0_child0, 20); YGNodeInsertChild(root, root_child0_child0, 0); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); EXPECT_FALSE(YGNodeIsDirty(root)); EXPECT_FALSE(YGNodeIsDirty(root_child0)); EXPECT_FALSE(YGNodeIsDirty(root_child1)); EXPECT_FALSE(YGNodeIsDirty(root_child0_child0)); YGConfigRef newConfig = YGConfigNew(); YGConfigSetErrata(newConfig, YGErrataStretchFlexBasis); YGNodeSetConfig(root_child0, newConfig); EXPECT_TRUE(YGNodeIsDirty(root)); EXPECT_TRUE(YGNodeIsDirty(root_child0)); EXPECT_FALSE(YGNodeIsDirty(root_child1)); EXPECT_FALSE(YGNodeIsDirty(root_child0_child0)); YGNodeCalculateLayout(root, YGUndefined, YGUndefined, YGDirectionLTR); EXPECT_FALSE(YGNodeIsDirty(root)); EXPECT_FALSE(YGNodeIsDirty(root_child0)); EXPECT_FALSE(YGNodeIsDirty(root_child1)); EXPECT_FALSE(YGNodeIsDirty(root_child0_child0)); YGConfigFree(newConfig); YGNodeFreeRecursive(root); }
O0
cpp
YogaTest_dirty_propagation_changing_layout_config_Test::~YogaTest_dirty_propagation_changing_layout_config_Test(): pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rdi movq %rdi, -0x10(%rbp) callq 0xf9400 movq -0x10(%rbp), %rdi movl $0x10, %esi callq 0x354d0 addq $0x10, %rsp popq %rbp retq nopl (%rax)
_ZN54YogaTest_dirty_propagation_changing_layout_config_TestD0Ev: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov rdi, [rbp+var_8]; this mov [rbp+var_10], rdi call _ZN54YogaTest_dirty_propagation_changing_layout_config_TestD2Ev; YogaTest_dirty_propagation_changing_layout_config_Test::~YogaTest_dirty_propagation_changing_layout_config_Test() mov rdi, [rbp+var_10]; void * mov esi, 10h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) add rsp, 10h pop rbp retn
void YogaTest_dirty_propagation_changing_layout_config_Test::~YogaTest_dirty_propagation_changing_layout_config_Test( YogaTest_dirty_propagation_changing_layout_config_Test *this) { YogaTest_dirty_propagation_changing_layout_config_Test::~YogaTest_dirty_propagation_changing_layout_config_Test(this); operator delete(this, 0x10uLL); }
~YogaTest_dirty_propagation_changing_layout_config_Test: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV RDI,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RDI CALL 0x001f9400 MOV RDI,qword ptr [RBP + -0x10] MOV ESI,0x10 CALL 0x001354d0 ADD RSP,0x10 POP RBP RET
/* YogaTest_dirty_propagation_changing_layout_config_Test::~YogaTest_dirty_propagation_changing_layout_config_Test() */ void __thiscall YogaTest_dirty_propagation_changing_layout_config_Test:: ~YogaTest_dirty_propagation_changing_layout_config_Test (YogaTest_dirty_propagation_changing_layout_config_Test *this) { ~YogaTest_dirty_propagation_changing_layout_config_Test(this); operator_delete(this,0x10); return; }
46,758
html_emit_wait
navaro[P]qoraal-tictactoe/src/services/www/parts/html.c
int32_t html_emit_wait (const char * ep, uint16_t event, uint16_t parm, HTTP_USER_T * user, uint32_t timeout) { if (!_html_emit || !_html_mutex) return E_UNEXP ; if (!user) return E_PARM ; uint32_t mask ; int32_t idx ; if (ep == 0) idx = 0 ; else idx = engine_statemachine_idx (ep) ; if (idx < 0) return idx ; MUTEX_LOCK () ; mask = _html_event_mask & (1 << idx) ; MUTEX_UNLOCK () ; if (!mask) return E_NOTFOUND ; _html_emit->response = -1 ; _html_emit->user = user ; if (event) { engine_queue_masked_event (mask, event, parm) ; } MUTEX_LOCK () ; int32_t res = engine_queue_masked_event (mask, ENGINE_EVENT_ID_GET(_html_render), 0) ; if (res == EOK) { _html_event_mask &= ~mask ; } MUTEX_UNLOCK () ; if (res == EOK) { os_event_wait_timeout (&_html_emit->complete, 1, mask, 0, OS_MS2TICKS(timeout)) ; if (_html_emit->response >= 0) { httpserver_chunked_complete (_html_emit->user) ; } } else { DBG_ENGINE_LOG(ENGINE_LOG_TYPE_ERROR, "error: failed %d to queue event %d\n", res, ENGINE_EVENT_ID_GET(_html_render)) ; } return EOK ; }
O3
c
html_emit_wait: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax cmpq $0x0, 0x2cb27(%rip) # 0x40940 movl $0xfffff6fa, %r14d # imm = 0xFFFFF6FA je 0x13f9a cmpq $0x0, 0x2cb0b(%rip) # 0x40938 je 0x13f9a movq %rcx, %rbx testq %rcx, %rcx je 0x13e5a movl %r8d, %r15d movl %edx, %r13d movl %esi, %r12d testq %rdi, %rdi je 0x13e65 callq 0x101e0 movl %eax, %r14d testl %eax, %eax jns 0x13e68 jmp 0x13f9a movl $0xfffff6ff, %r14d # imm = 0xFFFFF6FF jmp 0x13f9a xorl %r14d, %r14d movl %r15d, -0x2c(%rbp) leaq 0x2cac5(%rip), %rdi # 0x40938 callq 0x14ff0 movl $0x1, %r15d movl %r14d, %ecx shll %cl, %r15d movl 0x2caa5(%rip), %r14d # 0x40930 leaq 0x2caa6(%rip), %rdi # 0x40938 callq 0x15015 andl %r15d, %r14d je 0x13f2c movq 0x2ca99(%rip), %rax # 0x40940 movl $0xffffffff, 0x8(%rax) # imm = 0xFFFFFFFF movq %rbx, (%rax) testw %r12w, %r12w movl -0x2c(%rbp), %r15d je 0x13ecb movzwl %r13w, %edx movzwl %r12w, %esi movl %r14d, %edi callq 0xfe43 leaq 0x2ca66(%rip), %rdi # 0x40938 callq 0x14ff0 leaq 0xe7ba(%rip), %r12 # 0x22698 subq 0x2a0fb(%rip), %r12 # 0x3dfe0 shrq $0x4, %r12 movzwl %r12w, %esi movl %r14d, %r13d xorl %r14d, %r14d movl %r13d, %edi xorl %edx, %edx callq 0xfe43 testl %eax, %eax je 0x13f34 movl %eax, %ebx leaq 0x2ca2e(%rip), %rdi # 0x40938 callq 0x15015 movzwl %r12w, %r8d leaq 0x1dba3(%rip), %rdx # 0x31abd xorl %edi, %edi movl $0x2, %esi movl %ebx, %ecx xorl %eax, %eax callq 0xe379 jmp 0x13f9a movl $0xfffff6fc, %r14d # imm = 0xFFFFF6FC jmp 0x13f9a movl %r13d, %eax notl %eax andl %eax, 0x2c9f1(%rip) # 0x40930 leaq 0x2c9f2(%rip), %rdi # 0x40938 callq 0x15015 movq 0x2c9ee(%rip), %rdi # 0x40940 addq $0x18, %rdi imull $0x3e8, %r15d, %eax # imm = 0x3E8 addq $0x3e7, %rax # imm = 0x3E7 movabsq $0x4189374bc6a7f0, %rcx # imm = 0x4189374BC6A7F0 mulq %rcx movq %rdx, %r8 xorl %r14d, %r14d movl $0x1, %esi movl %r13d, %edx xorl %ecx, %ecx callq 0x1550e movq 0x2c9b4(%rip), %rax # 0x40940 cmpl $0x0, 0x8(%rax) js 0x13f9a movq (%rax), %rdi callq 0x1de3b movl %r14d, %eax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
html_emit_wait: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax cmp cs:_html_emit, 0 mov r14d, 0FFFFF6FAh jz loc_13F9A cmp cs:_html_mutex, 0 jz loc_13F9A mov rbx, rcx test rcx, rcx jz short loc_13E5A mov r15d, r8d mov r13d, edx mov r12d, esi test rdi, rdi jz short loc_13E65 call engine_statemachine_idx mov r14d, eax test eax, eax jns short loc_13E68 jmp loc_13F9A loc_13E5A: mov r14d, 0FFFFF6FFh jmp loc_13F9A loc_13E65: xor r14d, r14d loc_13E68: mov [rbp+var_2C], r15d lea rdi, _html_mutex call os_mutex_lock mov r15d, 1 mov ecx, r14d shl r15d, cl mov r14d, cs:_html_event_mask lea rdi, _html_mutex call os_mutex_unlock and r14d, r15d jz loc_13F2C mov rax, cs:_html_emit mov dword ptr [rax+8], 0FFFFFFFFh mov [rax], rbx test r12w, r12w mov r15d, [rbp+var_2C] jz short loc_13ECB movzx edx, r13w movzx esi, r12w mov edi, r14d call engine_queue_masked_event loc_13ECB: lea rdi, _html_mutex call os_mutex_lock lea r12, __engine_event__html_render sub r12, cs:__engine_event_base___ptr_0 shr r12, 4 movzx esi, r12w mov r13d, r14d xor r14d, r14d mov edi, r13d xor edx, edx call engine_queue_masked_event test eax, eax jz short loc_13F34 mov ebx, eax lea rdi, _html_mutex call os_mutex_unlock movzx r8d, r12w lea rdx, aErrorFailedDTo; "error: failed %d to queue event %d\n" xor edi, edi mov esi, 2 mov ecx, ebx xor eax, eax call engine_log jmp short loc_13F9A loc_13F2C: mov r14d, 0FFFFF6FCh jmp short loc_13F9A loc_13F34: mov eax, r13d not eax and cs:_html_event_mask, eax lea rdi, _html_mutex call os_mutex_unlock mov rdi, cs:_html_emit add rdi, 18h imul eax, r15d, 3E8h add rax, 3E7h mov rcx, 4189374BC6A7F0h mul rcx mov r8, rdx xor r14d, r14d mov esi, 1 mov edx, r13d xor ecx, ecx call os_event_wait_timeout mov rax, cs:_html_emit cmp dword ptr [rax+8], 0 js short loc_13F9A mov rdi, [rax] call httpserver_chunked_complete loc_13F9A: mov eax, r14d add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long html_emit_wait( long long a1, unsigned __int16 a2, unsigned __int16 a3, long long a4, int a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, double a10, double a11, __m128 a12, __m128 a13) { char v13; // al int v14; // r14d int v18; // r15d int v19; // r14d double v20; // xmm4_8 double v21; // xmm5_8 unsigned int v22; // r14d _QWORD *v23; // rax unsigned long long v24; // r12 unsigned int v25; // r13d double v26; // xmm4_8 double v27; // xmm5_8 unsigned int v28; // eax unsigned int v29; // ebx long long v30; // r9 __m128 v31; // xmm4 __m128 v32; // xmm5 char v34; // [rsp-4h] [rbp-30h] int v35; // [rsp+0h] [rbp-2Ch] v34 = v13; v14 = -2310; if ( html_emit && html_mutex ) { if ( a4 ) { if ( a1 ) { v14 = engine_statemachine_idx(a1); if ( v14 < 0 ) return (unsigned int)v14; } else { LOBYTE(v14) = 0; } v35 = a5; os_mutex_lock(&html_mutex); v18 = 1 << v14; v19 = html_event_mask; os_mutex_unlock(&html_mutex); v22 = v18 & v19; if ( v22 ) { v23 = (_QWORD *)html_emit; *(_DWORD *)(html_emit + 8) = -1; *v23 = a4; if ( a2 ) engine_queue_masked_event(v22, a2, a3, a6, a7, a8, a9, v20, v21, a12, a13); os_mutex_lock(&html_mutex); v24 = (unsigned long long)((char *)_engine_event__html_render - (char *)_engine_event_base__) >> 4; v25 = v22; v14 = 0; v28 = engine_queue_masked_event(v25, v24, 0, a6, a7, a8, a9, v26, v27, a12, a13); if ( v28 ) { v29 = v28; os_mutex_unlock(&html_mutex); engine_log( 0LL, 2, (long long)aErrorFailedDTo, v29, (unsigned __int16)v24, v30, a6, a7, a8, a9, v31, v32, a12, a13, v34); } else { html_event_mask &= ~v25; os_mutex_unlock(&html_mutex); v14 = 0; os_event_wait_timeout( html_emit + 24, 1LL, v25, 0LL, (0x4189374BC6A7F0LL * (unsigned __int128)((unsigned long long)(unsigned int)(1000 * v35) + 999)) >> 64); if ( *(int *)(html_emit + 8) >= 0 ) httpserver_chunked_complete(*(_QWORD *)html_emit); } } else { return (unsigned int)-2308; } } else { return (unsigned int)-2305; } } return (unsigned int)v14; }
html_emit_wait: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX CMP qword ptr [0x00140940],0x0 MOV R14D,0xfffff6fa JZ 0x00113f9a CMP qword ptr [0x00140938],0x0 JZ 0x00113f9a MOV RBX,RCX TEST RCX,RCX JZ 0x00113e5a MOV R15D,R8D MOV R13D,EDX MOV R12D,ESI TEST RDI,RDI JZ 0x00113e65 CALL 0x001101e0 MOV R14D,EAX TEST EAX,EAX JNS 0x00113e68 JMP 0x00113f9a LAB_00113e5a: MOV R14D,0xfffff6ff JMP 0x00113f9a LAB_00113e65: XOR R14D,R14D LAB_00113e68: MOV dword ptr [RBP + -0x2c],R15D LEA RDI,[0x140938] CALL 0x00114ff0 MOV R15D,0x1 MOV ECX,R14D SHL R15D,CL MOV R14D,dword ptr [0x00140930] LEA RDI,[0x140938] CALL 0x00115015 AND R14D,R15D JZ 0x00113f2c MOV RAX,qword ptr [0x00140940] MOV dword ptr [RAX + 0x8],0xffffffff MOV qword ptr [RAX],RBX TEST R12W,R12W MOV R15D,dword ptr [RBP + -0x2c] JZ 0x00113ecb MOVZX EDX,R13W MOVZX ESI,R12W MOV EDI,R14D CALL 0x0010fe43 LAB_00113ecb: LEA RDI,[0x140938] CALL 0x00114ff0 LEA R12,[0x122698] SUB R12,qword ptr [0x0013dfe0] SHR R12,0x4 MOVZX ESI,R12W MOV R13D,R14D XOR R14D,R14D MOV EDI,R13D XOR EDX,EDX CALL 0x0010fe43 TEST EAX,EAX JZ 0x00113f34 MOV EBX,EAX LEA RDI,[0x140938] CALL 0x00115015 MOVZX R8D,R12W LEA RDX,[0x131abd] XOR EDI,EDI MOV ESI,0x2 MOV ECX,EBX XOR EAX,EAX CALL 0x0010e379 JMP 0x00113f9a LAB_00113f2c: MOV R14D,0xfffff6fc JMP 0x00113f9a LAB_00113f34: MOV EAX,R13D NOT EAX AND dword ptr [0x00140930],EAX LEA RDI,[0x140938] CALL 0x00115015 MOV RDI,qword ptr [0x00140940] ADD RDI,0x18 IMUL EAX,R15D,0x3e8 ADD RAX,0x3e7 MOV RCX,0x4189374bc6a7f0 MUL RCX MOV R8,RDX XOR R14D,R14D MOV ESI,0x1 MOV EDX,R13D XOR ECX,ECX CALL 0x0011550e MOV RAX,qword ptr [0x00140940] CMP dword ptr [RAX + 0x8],0x0 JS 0x00113f9a MOV RDI,qword ptr [RAX] CALL 0x0011de3b LAB_00113f9a: MOV EAX,R14D ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int html_emit_wait(long param_1,short param_2,int2 param_3,long param_4,int param_5) { long *plVar1; int iVar2; ulong uVar3; uint uVar4; iVar2 = -0x906; if ((_html_emit != (long *)0x0) && (_html_mutex != 0)) { if (param_4 == 0) { iVar2 = -0x901; } else { if (param_1 == 0) { iVar2 = 0; } else { iVar2 = engine_statemachine_idx(); if (iVar2 < 0) { return iVar2; } } os_mutex_lock(&_html_mutex); uVar4 = _html_event_mask; os_mutex_unlock(&_html_mutex); plVar1 = _html_emit; uVar4 = uVar4 & 1 << ((byte)iVar2 & 0x1f); if (uVar4 == 0) { iVar2 = -0x904; } else { *(int4 *)(_html_emit + 1) = 0xffffffff; *plVar1 = param_4; if (param_2 != 0) { engine_queue_masked_event(uVar4,param_2,param_3); } os_mutex_lock(&_html_mutex); uVar3 = (ulong)((long)__engine_event__html_render - (long)PTR___engine_event__console_char_0013dfe0) >> 4; iVar2 = engine_queue_masked_event(uVar4,uVar3 & 0xffff,0); if (iVar2 == 0) { _html_event_mask = _html_event_mask & ~uVar4; os_mutex_unlock(&_html_mutex); os_event_wait_timeout (_html_emit + 3,1,uVar4,0,((ulong)(uint)(param_5 * 1000) + 999) / 1000); iVar2 = 0; if (-1 < (int)_html_emit[1]) { httpserver_chunked_complete(*_html_emit); iVar2 = 0; } } else { os_mutex_unlock(&_html_mutex); engine_log(0,2,s_error__failed__d_to_queue_event___00131abd,iVar2,uVar3 & 0xffff); iVar2 = 0; } } } } return iVar2; }
46,759
list_builtin_chat_templates[abi:cxx11]()
llama.cpp/common/arg.cpp
static std::string list_builtin_chat_templates() { std::vector<const char *> supported_tmpl; int32_t res = llama_chat_builtin_templates(nullptr, 0); supported_tmpl.resize(res); res = llama_chat_builtin_templates(supported_tmpl.data(), supported_tmpl.size()); std::ostringstream msg; for (auto & tmpl : supported_tmpl) { msg << tmpl << (&tmpl == &supported_tmpl.back() ? "" : ", "); } return msg.str(); }
O3
cpp
list_builtin_chat_templates[abi:cxx11](): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x198, %rsp # imm = 0x198 movq %rdi, %rbx xorps %xmm0, %xmm0 movaps %xmm0, (%rsp) movq $0x0, 0x10(%rsp) xorl %edi, %edi xorl %esi, %esi callq 0x24140 movslq %eax, %rsi movq %rsp, %rdi callq 0xb4e88 movq (%rsp), %rdi movq 0x8(%rsp), %rsi subq %rdi, %rsi sarq $0x3, %rsi callq 0x24140 movq %rbx, 0x18(%rsp) leaq 0x20(%rsp), %rdi callq 0x245e0 movq (%rsp), %r12 movq 0x8(%rsp), %r13 cmpq %r13, %r12 je 0x8ca14 leaq 0xba250(%rip), %rbp # 0x146bf0 leaq 0xbf55c(%rip), %rbx # 0x14bf03 leaq 0x20(%rsp), %r14 movq (%r12), %r15 testq %r15, %r15 je 0x8c9cd movq %r15, %rdi callq 0x23890 movq %r14, %rdi movq %r15, %rsi movq %rax, %rdx callq 0x24690 jmp 0x8c9e9 movq 0x20(%rsp), %rax movq -0x18(%rax), %rax leaq (%rsp,%rax), %rdi addq $0x20, %rdi movl 0x20(%rdi), %esi orl $0x1, %esi callq 0x24980 movq 0x8(%rsp), %rax addq $-0x8, %rax xorl %edx, %edx cmpq %rax, %r12 setne %dl movq %rbx, %rsi cmoveq %rbp, %rsi addl %edx, %edx movq %r14, %rdi callq 0x24690 addq $0x8, %r12 cmpq %r13, %r12 jne 0x8c9ac leaq 0x28(%rsp), %rsi movq 0x18(%rsp), %rdi callq 0x23860 movq 0x10252e(%rip), %rsi # 0x18ef58 leaq 0x20(%rsp), %rdi callq 0x240c0 leaq 0x90(%rsp), %rdi callq 0x24080 movq (%rsp), %rdi testq %rdi, %rdi je 0x8ca57 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x231f0 addq $0x198, %rsp # imm = 0x198 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x8ca72 jmp 0x8ca6d movq %rax, %rbx jmp 0x8ca93 movq %rax, %rbx movq 0x1024dc(%rip), %rsi # 0x18ef58 leaq 0x20(%rsp), %rdi callq 0x240c0 leaq 0x90(%rsp), %rdi callq 0x24080 movq (%rsp), %rdi testq %rdi, %rdi je 0x8caa9 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x231f0 movq %rbx, %rdi callq 0x23ee0
_ZL27list_builtin_chat_templatesB5cxx11v: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 198h mov rbx, rdi xorps xmm0, xmm0 movaps xmmword ptr [rsp+1C8h+var_1C8], xmm0 mov [rsp+1C8h+var_1B8], 0 xor edi, edi xor esi, esi call _llama_chat_builtin_templates movsxd rsi, eax mov rdi, rsp call _ZNSt6vectorIPKcSaIS1_EE6resizeEm; std::vector<char const*>::resize(ulong) mov rdi, [rsp+1C8h+var_1C8] mov rsi, [rsp+1C8h+var_1C8+8] sub rsi, rdi sar rsi, 3 call _llama_chat_builtin_templates mov [rsp+1C8h+var_1B0], rbx lea rdi, [rsp+1C8h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev; std::ostringstream::basic_ostringstream(void) mov r12, [rsp+1C8h+var_1C8] mov r13, [rsp+1C8h+var_1C8+8] cmp r12, r13 jz short loc_8CA14 lea rbp, aExampleToolCal+1Dh; "" lea rbx, aZuD+6; ", " lea r14, [rsp+1C8h+var_1A8] loc_8C9AC: mov r15, [r12] test r15, r15 jz short loc_8C9CD mov rdi, r15 call _strlen mov rdi, r14 mov rsi, r15 mov rdx, rax call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) jmp short loc_8C9E9 loc_8C9CD: mov rax, [rsp+1C8h+var_1A8] mov rax, [rax-18h] lea rdi, [rsp+rax+1C8h+var_1C8] add rdi, 20h ; ' ' mov esi, [rdi+20h] or esi, 1 call __ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate; std::ios::clear(std::_Ios_Iostate) loc_8C9E9: mov rax, [rsp+1C8h+var_1C8+8] add rax, 0FFFFFFFFFFFFFFF8h xor edx, edx cmp r12, rax setnz dl mov rsi, rbx cmovz rsi, rbp add edx, edx mov rdi, r14 call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) add r12, 8 cmp r12, r13 jnz short loc_8C9AC loc_8CA14: lea rsi, [rsp+1C8h+var_1A0] mov rdi, [rsp+1C8h+var_1B0] call __ZNKSt7__cxx1115basic_stringbufIcSt11char_traitsIcESaIcEE3strEv; std::stringbuf::str(void) mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+1C8h+var_1A8] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+1C8h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() mov rdi, [rsp+1C8h+var_1C8]; void * test rdi, rdi jz short loc_8CA57 mov rsi, [rsp+1C8h+var_1B8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8CA57: add rsp, 198h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_8CA72 jmp short $+2 loc_8CA6D: mov rbx, rax jmp short loc_8CA93 loc_8CA72: mov rbx, rax mov rsi, cs:_ZTTNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEE_ptr lea rdi, [rsp+arg_18] call __ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEED2Ev; std::ostringstream::~ostringstream() lea rdi, [rsp+arg_88]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_8CA93: mov rdi, [rsp+0]; void * test rdi, rdi jz short loc_8CAA9 mov rsi, [rsp+arg_8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_8CAA9: mov rdi, rbx call __Unwind_Resume
void list_builtin_chat_templates[abi:cxx11](long long a1) { int v1; // eax _QWORD *v2; // r12 _QWORD *i; // r13 long long v4; // r15 long long v5; // rax char *v6; // rsi void *v7[2]; // [rsp+0h] [rbp-1C8h] BYREF long long v8; // [rsp+10h] [rbp-1B8h] long long v9; // [rsp+18h] [rbp-1B0h] long long v10; // [rsp+20h] [rbp-1A8h] BYREF _BYTE v11[104]; // [rsp+28h] [rbp-1A0h] BYREF _BYTE v12[312]; // [rsp+90h] [rbp-138h] BYREF *(_OWORD *)v7 = 0LL; v8 = 0LL; v1 = llama_chat_builtin_templates(0LL, 0LL); std::vector<char const*>::resize(v7, v1); llama_chat_builtin_templates(v7[0], ((char *)v7[1] - (char *)v7[0]) >> 3); v9 = a1; std::ostringstream::basic_ostringstream(&v10); v2 = v7[0]; for ( i = v7[1]; v2 != i; ++v2 ) { v4 = *v2; if ( *v2 ) { v5 = strlen(*v2); std::__ostream_insert<char,std::char_traits<char>>(&v10, v4, v5); } else { std::ios::clear(&v11[*(_QWORD *)(v10 - 24) - 8], *(_DWORD *)&v11[*(_QWORD *)(v10 - 24) + 24] | 1u); } v6 = ", "; if ( v2 == (_QWORD *)((char *)v7[1] - 8) ) v6 = ""; std::__ostream_insert<char,std::char_traits<char>>( &v10, v6, 2 * (unsigned int)(v2 != (_QWORD *)((char *)v7[1] - 8))); } std::stringbuf::str(v9, v11); std::ostringstream::~ostringstream(&v10, &`VTT for'std::ostringstream); std::ios_base::~ios_base((std::ios_base *)v12); if ( v7[0] ) operator delete(v7[0], v8 - (unsigned long long)v7[0]); }
list_builtin_chat_templates[abi:cxx11]: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x198 MOV RBX,RDI XORPS XMM0,XMM0 MOVAPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x10],0x0 LAB_0018c953: XOR EDI,EDI XOR ESI,ESI CALL 0x00124140 MOVSXD RSI,EAX MOV RDI,RSP CALL 0x001b4e88 MOV RDI,qword ptr [RSP] MOV RSI,qword ptr [RSP + 0x8] SUB RSI,RDI SAR RSI,0x3 CALL 0x00124140 LAB_0018c97c: MOV qword ptr [RSP + 0x18],RBX LEA RDI,[RSP + 0x20] CALL 0x001245e0 MOV R12,qword ptr [RSP] MOV R13,qword ptr [RSP + 0x8] CMP R12,R13 JZ 0x0018ca14 LEA RBP,[0x246bf0] LEA RBX,[0x24bf03] LEA R14,[RSP + 0x20] LAB_0018c9ac: MOV R15,qword ptr [R12] TEST R15,R15 JZ 0x0018c9cd MOV RDI,R15 CALL 0x00123890 LAB_0018c9bd: MOV RDI,R14 MOV RSI,R15 MOV RDX,RAX CALL 0x00124690 JMP 0x0018c9e9 LAB_0018c9cd: MOV RAX,qword ptr [RSP + 0x20] MOV RAX,qword ptr [RAX + -0x18] LEA RDI,[RSP + RAX*0x1] ADD RDI,0x20 MOV ESI,dword ptr [RDI + 0x20] OR ESI,0x1 CALL 0x00124980 LAB_0018c9e9: MOV RAX,qword ptr [RSP + 0x8] ADD RAX,-0x8 XOR EDX,EDX CMP R12,RAX SETNZ DL MOV RSI,RBX CMOVZ RSI,RBP ADD EDX,EDX MOV RDI,R14 CALL 0x00124690 ADD R12,0x8 CMP R12,R13 JNZ 0x0018c9ac LAB_0018ca14: LEA RSI,[RSP + 0x28] LAB_0018ca19: MOV RDI,qword ptr [RSP + 0x18] CALL 0x00123860 LAB_0018ca23: MOV RSI,qword ptr [0x0028ef58] LEA RDI,[RSP + 0x20] CALL 0x001240c0 LEA RDI,[RSP + 0x90] CALL 0x00124080 MOV RDI,qword ptr [RSP] TEST RDI,RDI JZ 0x0018ca57 MOV RSI,qword ptr [RSP + 0x10] SUB RSI,RDI CALL 0x001231f0 LAB_0018ca57: ADD RSP,0x198 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* WARNING: Unknown calling convention -- yet parameter storage is locked */ /* list_builtin_chat_templates[abi:cxx11]() */ void list_builtin_chat_templates_abi_cxx11_(void) { int8 *puVar1; int iVar2; size_t sVar3; char *pcVar4; int8 *puVar5; int8 *local_1c8; int8 *puStack_1c0; long local_1b8; long local_1a8 [4]; uint auStack_188 [20]; ios_base local_138 [264]; local_1c8 = (int8 *)0x0; puStack_1c0 = (int8 *)0x0; local_1b8 = 0; /* try { // try from 0018c953 to 0018c97b has its CatchHandler @ 0018ca6d */ iVar2 = llama_chat_builtin_templates(0,0); std::vector<char_const*,std::allocator<char_const*>>::resize ((vector<char_const*,std::allocator<char_const*>> *)&local_1c8,(long)iVar2); llama_chat_builtin_templates(local_1c8,(long)puStack_1c0 - (long)local_1c8 >> 3); /* try { // try from 0018c97c to 0018c98a has its CatchHandler @ 0018ca6b */ std::__cxx11::ostringstream::ostringstream((ostringstream *)local_1a8); puVar1 = puStack_1c0; if (local_1c8 != puStack_1c0) { puVar5 = local_1c8; do { pcVar4 = (char *)*puVar5; if (pcVar4 == (char *)0x0) { std::ios::clear((long)local_1a8 + *(long *)(local_1a8[0] + -0x18), *(uint *)((long)auStack_188 + *(long *)(local_1a8[0] + -0x18)) | 1); } else { sVar3 = strlen(pcVar4); /* try { // try from 0018c9bd to 0018ca0a has its CatchHandler @ 0018ca72 */ std::__ostream_insert<char,std::char_traits<char>>((ostream *)local_1a8,pcVar4,sVar3); } pcVar4 = ", "; if (puVar5 == puStack_1c0 + -1) { pcVar4 = ""; } std::__ostream_insert<char,std::char_traits<char>> ((ostream *)local_1a8,pcVar4,(ulong)((uint)(puVar5 != puStack_1c0 + -1) * 2)); puVar5 = puVar5 + 1; } while (puVar5 != puVar1); } /* try { // try from 0018ca19 to 0018ca22 has its CatchHandler @ 0018ca69 */ std::__cxx11::stringbuf::str(); std::__cxx11::ostringstream::~ostringstream((ostringstream *)local_1a8); std::ios_base::~ios_base(local_138); if (local_1c8 != (int8 *)0x0) { operator_delete(local_1c8,local_1b8 - (long)local_1c8); } return; }
46,760
my_instr_bin
eloqsql/strings/ctype-bin.c
static uint my_instr_bin(CHARSET_INFO *cs __attribute__((unused)), const char *b, size_t b_length, const char *s, size_t s_length, my_match_t *match, uint nmatch) { register const uchar *str, *search, *end, *search_end; 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 */ } str= (const uchar*) b; search= (const uchar*) s; end= (const uchar*) b+b_length-s_length+1; search_end= (const uchar*) s + s_length; skip: while (str != end) { if ( (*str++) == (*search)) { register const uchar *i,*j; i= str; j= search+1; while (j != search_end) if ((*i++) != (*j++)) goto skip; if (nmatch > 0) { match[0].beg= 0; match[0].end= (uint) (str- (const uchar*)b-1); match[0].mb_len= match[0].end; if (nmatch > 1) { match[1].beg= match[0].end; match[1].end= (uint)(match[0].end+s_length); match[1].mb_len= match[1].end-match[1].beg; } } return 2; } } } return 0; }
O0
c
my_instr_bin: pushq %rbp movq %rsp, %rbp movl 0x10(%rbp), %eax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) movq -0x30(%rbp), %rax cmpq -0x20(%rbp), %rax ja 0x38feb cmpq $0x0, -0x30(%rbp) jne 0x38eb6 cmpl $0x0, 0x10(%rbp) je 0x38eaa movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x38(%rbp), %rax movl $0x0, 0x4(%rax) movq -0x38(%rbp), %rax movl $0x0, 0x8(%rax) movl $0x1, -0x4(%rbp) jmp 0x38ff2 movq -0x18(%rbp), %rax movq %rax, -0x40(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax addq -0x20(%rbp), %rax xorl %ecx, %ecx subq -0x30(%rbp), %rcx addq %rcx, %rax addq $0x1, %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x58(%rbp) jmp 0x38eed movq -0x40(%rbp), %rax cmpq -0x50(%rbp), %rax je 0x38fe9 movq -0x40(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x40(%rbp) movzbl (%rax), %eax movq -0x48(%rbp), %rcx movzbl (%rcx), %ecx cmpl %ecx, %eax jne 0x38fe4 movq -0x40(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x48(%rbp), %rax addq $0x1, %rax movq %rax, -0x68(%rbp) movq -0x68(%rbp), %rax cmpq -0x58(%rbp), %rax je 0x38f66 movq -0x60(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x60(%rbp) movzbl (%rax), %eax movq -0x68(%rbp), %rcx movq %rcx, %rdx addq $0x1, %rdx movq %rdx, -0x68(%rbp) movzbl (%rcx), %ecx cmpl %ecx, %eax je 0x38f64 jmp 0x38eeb jmp 0x38f30 cmpl $0x0, 0x10(%rbp) jbe 0x38fdb movq -0x38(%rbp), %rax movl $0x0, (%rax) movq -0x40(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax subq $0x1, %rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, 0x4(%rax) movq -0x38(%rbp), %rax movl 0x4(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x8(%rax) cmpl $0x1, 0x10(%rbp) jbe 0x38fd9 movq -0x38(%rbp), %rax movl 0x4(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0xc(%rax) movq -0x38(%rbp), %rax movl 0x4(%rax), %eax addq -0x30(%rbp), %rax movl %eax, %ecx movq -0x38(%rbp), %rax movl %ecx, 0x10(%rax) movq -0x38(%rbp), %rax movl 0x10(%rax), %ecx movq -0x38(%rbp), %rax subl 0xc(%rax), %ecx movq -0x38(%rbp), %rax movl %ecx, 0x14(%rax) jmp 0x38fdb movl $0x2, -0x4(%rbp) jmp 0x38ff2 jmp 0x38eed jmp 0x38feb movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax popq %rbp retq nopw (%rax,%rax)
my_instr_bin: push rbp mov rbp, rsp mov eax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 mov rax, [rbp+var_30] cmp rax, [rbp+var_20] ja loc_38FEB cmp [rbp+var_30], 0 jnz short loc_38EB6 cmp [rbp+arg_0], 0 jz short loc_38EAA mov rax, [rbp+var_38] mov dword ptr [rax], 0 mov rax, [rbp+var_38] mov dword ptr [rax+4], 0 mov rax, [rbp+var_38] mov dword ptr [rax+8], 0 loc_38EAA: mov [rbp+var_4], 1 jmp loc_38FF2 loc_38EB6: mov rax, [rbp+var_18] mov [rbp+var_40], rax mov rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_18] add rax, [rbp+var_20] xor ecx, ecx sub rcx, [rbp+var_30] add rax, rcx add rax, 1 mov [rbp+var_50], rax mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_58], rax loc_38EEB: jmp short $+2 loc_38EED: mov rax, [rbp+var_40] cmp rax, [rbp+var_50] jz loc_38FE9 mov rax, [rbp+var_40] mov rcx, rax add rcx, 1 mov [rbp+var_40], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_48] movzx ecx, byte ptr [rcx] cmp eax, ecx jnz loc_38FE4 mov rax, [rbp+var_40] mov [rbp+var_60], rax mov rax, [rbp+var_48] add rax, 1 mov [rbp+var_68], rax loc_38F30: mov rax, [rbp+var_68] cmp rax, [rbp+var_58] jz short loc_38F66 mov rax, [rbp+var_60] mov rcx, rax add rcx, 1 mov [rbp+var_60], rcx movzx eax, byte ptr [rax] mov rcx, [rbp+var_68] mov rdx, rcx add rdx, 1 mov [rbp+var_68], rdx movzx ecx, byte ptr [rcx] cmp eax, ecx jz short loc_38F64 jmp short loc_38EEB loc_38F64: jmp short loc_38F30 loc_38F66: cmp [rbp+arg_0], 0 jbe short loc_38FDB mov rax, [rbp+var_38] mov dword ptr [rax], 0 mov rax, [rbp+var_40] mov rcx, [rbp+var_18] sub rax, rcx sub rax, 1 mov ecx, eax mov rax, [rbp+var_38] mov [rax+4], ecx mov rax, [rbp+var_38] mov ecx, [rax+4] mov rax, [rbp+var_38] mov [rax+8], ecx cmp [rbp+arg_0], 1 jbe short loc_38FD9 mov rax, [rbp+var_38] mov ecx, [rax+4] mov rax, [rbp+var_38] mov [rax+0Ch], ecx mov rax, [rbp+var_38] mov eax, [rax+4] add rax, [rbp+var_30] mov ecx, eax mov rax, [rbp+var_38] mov [rax+10h], ecx mov rax, [rbp+var_38] mov ecx, [rax+10h] mov rax, [rbp+var_38] sub ecx, [rax+0Ch] mov rax, [rbp+var_38] mov [rax+14h], ecx loc_38FD9: jmp short $+2 loc_38FDB: mov [rbp+var_4], 2 jmp short loc_38FF2 loc_38FE4: jmp loc_38EED loc_38FE9: jmp short $+2 loc_38FEB: mov [rbp+var_4], 0 loc_38FF2: mov eax, [rbp+var_4] pop rbp retn
long long my_instr_bin( long long a1, unsigned __int8 *a2, unsigned long long a3, unsigned __int8 *a4, unsigned long long a5, _DWORD *a6, unsigned int a7) { unsigned __int8 *v7; // rax unsigned __int8 *v8; // rax unsigned __int8 *v9; // rcx unsigned __int8 *v11; // [rsp+0h] [rbp-68h] unsigned __int8 *v12; // [rsp+8h] [rbp-60h] unsigned __int8 *v13; // [rsp+10h] [rbp-58h] unsigned __int8 *v14; // [rsp+28h] [rbp-40h] if ( a5 > a3 ) return 0; if ( a5 ) { v14 = a2; v13 = &a4[a5]; LABEL_7: while ( v14 != &a2[a3 - a5 + 1] ) { v7 = v14++; if ( *v7 == *a4 ) { v12 = v14; v11 = a4 + 1; while ( v11 != v13 ) { v8 = v12++; v9 = v11++; if ( *v8 != *v9 ) goto LABEL_7; } if ( a7 ) { *a6 = 0; a6[1] = (_DWORD)v14 - (_DWORD)a2 - 1; a6[2] = a6[1]; if ( a7 > 1 ) { a6[3] = a6[1]; a6[4] = a5 + a6[1]; a6[5] = a6[4] - a6[3]; } } return 2; } } return 0; } if ( a7 ) { *a6 = 0; a6[1] = 0; a6[2] = 0; } return 1; }
my_instr_bin: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 MOV RAX,qword ptr [RBP + -0x30] CMP RAX,qword ptr [RBP + -0x20] JA 0x00138feb CMP qword ptr [RBP + -0x30],0x0 JNZ 0x00138eb6 CMP dword ptr [RBP + 0x10],0x0 JZ 0x00138eaa MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x4],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x8],0x0 LAB_00138eaa: MOV dword ptr [RBP + -0x4],0x1 JMP 0x00138ff2 LAB_00138eb6: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x40],RAX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] ADD RAX,qword ptr [RBP + -0x20] XOR ECX,ECX SUB RCX,qword ptr [RBP + -0x30] ADD RAX,RCX ADD RAX,0x1 MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x58],RAX LAB_00138eeb: JMP 0x00138eed LAB_00138eed: MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RBP + -0x50] JZ 0x00138fe9 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x40],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x48] MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JNZ 0x00138fe4 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x48] ADD RAX,0x1 MOV qword ptr [RBP + -0x68],RAX LAB_00138f30: MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RBP + -0x58] JZ 0x00138f66 MOV RAX,qword ptr [RBP + -0x60] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x60],RCX MOVZX EAX,byte ptr [RAX] MOV RCX,qword ptr [RBP + -0x68] MOV RDX,RCX ADD RDX,0x1 MOV qword ptr [RBP + -0x68],RDX MOVZX ECX,byte ptr [RCX] CMP EAX,ECX JZ 0x00138f64 JMP 0x00138eeb LAB_00138f64: JMP 0x00138f30 LAB_00138f66: CMP dword ptr [RBP + 0x10],0x0 JBE 0x00138fdb MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x40] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX SUB RAX,0x1 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x4],ECX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x8],ECX CMP dword ptr [RBP + 0x10],0x1 JBE 0x00138fd9 MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x4] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0xc],ECX MOV RAX,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RAX + 0x4] ADD RAX,qword ptr [RBP + -0x30] MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x10],ECX MOV RAX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x38] SUB ECX,dword ptr [RAX + 0xc] MOV RAX,qword ptr [RBP + -0x38] MOV dword ptr [RAX + 0x14],ECX LAB_00138fd9: JMP 0x00138fdb LAB_00138fdb: MOV dword ptr [RBP + -0x4],0x2 JMP 0x00138ff2 LAB_00138fe4: JMP 0x00138eed LAB_00138fe9: JMP 0x00138feb LAB_00138feb: MOV dword ptr [RBP + -0x4],0x0 LAB_00138ff2: MOV EAX,dword ptr [RBP + -0x4] POP RBP RET
int4 my_instr_bin(int8 param_1,char *param_2,ulong param_3,char *param_4,ulong param_5, int4 *param_6,uint param_7) { char cVar1; char cVar2; char *pcVar3; char *local_70; char *local_68; char *local_48; if (param_5 <= param_3) { if (param_5 == 0) { if (param_7 != 0) { *param_6 = 0; param_6[1] = 0; param_6[2] = 0; } return 1; } local_48 = param_2; while (local_48 != param_2 + (param_3 - param_5) + 1) { pcVar3 = local_48 + 1; cVar1 = *local_48; local_48 = pcVar3; if (cVar1 == *param_4) { local_70 = param_4 + 1; local_68 = pcVar3; do { if (local_70 == param_4 + param_5) { if (param_7 != 0) { *param_6 = 0; param_6[1] = ((int)pcVar3 - (int)param_2) + -1; param_6[2] = param_6[1]; if (1 < param_7) { param_6[3] = param_6[1]; param_6[4] = param_6[1] + (int)param_5; param_6[5] = param_6[4] - param_6[3]; } } return 2; } cVar1 = *local_68; cVar2 = *local_70; local_70 = local_70 + 1; local_68 = local_68 + 1; } while (cVar1 == cVar2); } } } return 0; }
46,761
promise_reaction_job
bluesky950520[P]quickjs/quickjs.c
static JSValue promise_reaction_job(JSContext *ctx, int argc, JSValue *argv) { JSValue handler, arg, func; JSValue res, res2; BOOL is_reject; assert(argc == 5); handler = argv[2]; is_reject = JS_ToBool(ctx, argv[3]); arg = argv[4]; promise_trace(ctx, "promise_reaction_job: is_reject=%d\n", is_reject); if (JS_IsUndefined(handler)) { if (is_reject) { res = JS_Throw(ctx, js_dup(arg)); } else { res = js_dup(arg); } } else { res = JS_Call(ctx, handler, JS_UNDEFINED, 1, &arg); } is_reject = JS_IsException(res); if (is_reject) res = JS_GetException(ctx); func = argv[is_reject]; /* as an extension, we support undefined as value to avoid creating a dummy promise in the 'await' implementation of async functions */ if (!JS_IsUndefined(func)) { res2 = JS_Call(ctx, func, JS_UNDEFINED, 1, &res); } else { res2 = JS_UNDEFINED; } JS_FreeValue(ctx, res); return res2; }
O0
c
promise_reaction_job: subq $0x118, %rsp # imm = 0x118 movq %rdi, 0x100(%rsp) movl %esi, 0xfc(%rsp) movq %rdx, 0xf0(%rsp) movq 0xf0(%rsp), %rax movq 0x20(%rax), %rcx movq %rcx, 0xe0(%rsp) movq 0x28(%rax), %rax movq %rax, 0xe8(%rsp) movq 0x100(%rsp), %rdi movq 0xf0(%rsp), %rax movq 0x30(%rax), %rsi movq 0x38(%rax), %rdx callq 0x3e820 movl %eax, 0xac(%rsp) movq 0xf0(%rsp), %rax movq 0x40(%rax), %rcx movq %rcx, 0xd0(%rsp) movq 0x48(%rax), %rax movq %rax, 0xd8(%rsp) movq 0xe0(%rsp), %rdi movq 0xe8(%rsp), %rsi callq 0x34550 cmpl $0x0, %eax je 0x7b3f9 cmpl $0x0, 0xac(%rsp) je 0x7b3b8 movq 0x100(%rsp), %rax movq %rax, 0x10(%rsp) movq 0xd0(%rsp), %rdi movq 0xd8(%rsp), %rsi callq 0x279c0 movq 0x10(%rsp), %rdi movq %rax, 0x88(%rsp) movq %rdx, 0x90(%rsp) movq 0x88(%rsp), %rsi movq 0x90(%rsp), %rdx callq 0x331f0 movq %rax, 0x98(%rsp) movq %rdx, 0xa0(%rsp) movq 0x98(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0xb8(%rsp) jmp 0x7b3f7 movq 0xd0(%rsp), %rdi movq 0xd8(%rsp), %rsi callq 0x279c0 movq %rax, 0x78(%rsp) movq %rdx, 0x80(%rsp) movq 0x78(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0x80(%rsp), %rax movq %rax, 0xb8(%rsp) jmp 0x7b467 movq 0x100(%rsp), %rdi movl $0x0, 0x58(%rsp) movq $0x3, 0x60(%rsp) movq 0xe0(%rsp), %rsi movq 0xe8(%rsp), %rdx movq 0x58(%rsp), %rcx movq 0x60(%rsp), %r8 movl $0x1, %r9d leaq 0xd0(%rsp), %rax movq %rax, (%rsp) callq 0x40340 movq %rax, 0x68(%rsp) movq %rdx, 0x70(%rsp) movq 0x68(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0x70(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0xb0(%rsp), %rdi movq 0xb8(%rsp), %rsi callq 0x29fb0 movl %eax, 0xac(%rsp) cmpl $0x0, 0xac(%rsp) je 0x7b4be movq 0x100(%rsp), %rdi callq 0x33260 movq %rax, 0x48(%rsp) movq %rdx, 0x50(%rsp) movq 0x48(%rsp), %rax movq %rax, 0xb0(%rsp) movq 0x50(%rsp), %rax movq %rax, 0xb8(%rsp) movq 0xf0(%rsp), %rax movslq 0xac(%rsp), %rcx shlq $0x4, %rcx addq %rcx, %rax movq (%rax), %rcx movq %rcx, 0xc0(%rsp) movq 0x8(%rax), %rax movq %rax, 0xc8(%rsp) movq 0xc0(%rsp), %rdi movq 0xc8(%rsp), %rsi callq 0x34550 cmpl $0x0, %eax jne 0x7b576 movq 0x100(%rsp), %rdi movl $0x0, 0x28(%rsp) movq $0x3, 0x30(%rsp) movq 0xc0(%rsp), %rsi movq 0xc8(%rsp), %rdx movq 0x28(%rsp), %rcx movq 0x30(%rsp), %r8 movl $0x1, %r9d leaq 0xb0(%rsp), %rax movq %rax, (%rsp) callq 0x40340 movq %rax, 0x38(%rsp) movq %rdx, 0x40(%rsp) movq 0x38(%rsp), %rax movq %rax, 0x108(%rsp) movq 0x40(%rsp), %rax movq %rax, 0x110(%rsp) jmp 0x7b5a1 movl $0x0, 0x18(%rsp) movq $0x3, 0x20(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x108(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x110(%rsp) movq 0x100(%rsp), %rdi movq 0xb0(%rsp), %rsi movq 0xb8(%rsp), %rdx callq 0x29f80 movq 0x108(%rsp), %rax movq 0x110(%rsp), %rdx addq $0x118, %rsp # imm = 0x118 retq nopw %cs:(%rax,%rax)
promise_reaction_job: sub rsp, 118h mov [rsp+118h+var_18], rdi mov [rsp+118h+var_1C], esi mov [rsp+118h+var_28], rdx mov rax, [rsp+118h+var_28] mov rcx, [rax+20h] mov [rsp+118h+var_38], rcx mov rax, [rax+28h] mov [rsp+118h+var_30], rax mov rdi, [rsp+118h+var_18] mov rax, [rsp+118h+var_28] mov rsi, [rax+30h] mov rdx, [rax+38h] call JS_ToBool mov [rsp+118h+var_6C], eax mov rax, [rsp+118h+var_28] mov rcx, [rax+40h] mov [rsp+118h+var_48], rcx mov rax, [rax+48h] mov [rsp+118h+var_40], rax mov rdi, [rsp+118h+var_38] mov rsi, [rsp+118h+var_30] call JS_IsUndefined_1 cmp eax, 0 jz loc_7B3F9 cmp [rsp+118h+var_6C], 0 jz short loc_7B3B8 mov rax, [rsp+118h+var_18] mov [rsp+118h+var_108], rax mov rdi, [rsp+118h+var_48] mov rsi, [rsp+118h+var_40] call js_dup mov rdi, [rsp+118h+var_108] mov [rsp+118h+var_90], rax mov [rsp+118h+var_88], rdx mov rsi, [rsp+118h+var_90] mov rdx, [rsp+118h+var_88] call JS_Throw mov [rsp+118h+var_80], rax mov [rsp+118h+var_78], rdx mov rax, [rsp+118h+var_80] mov [rsp+118h+var_68], rax mov rax, [rsp+118h+var_78] mov [rsp+118h+var_60], rax jmp short loc_7B3F7 loc_7B3B8: mov rdi, [rsp+118h+var_48] mov rsi, [rsp+118h+var_40] call js_dup mov [rsp+118h+var_A0], rax mov [rsp+118h+var_98], rdx mov rax, [rsp+118h+var_A0] mov [rsp+118h+var_68], rax mov rax, [rsp+118h+var_98] mov [rsp+118h+var_60], rax loc_7B3F7: jmp short loc_7B467 loc_7B3F9: mov rdi, [rsp+118h+var_18] mov dword ptr [rsp+118h+var_C0], 0 mov [rsp+118h+var_B8], 3 mov rsi, [rsp+118h+var_38] mov rdx, [rsp+118h+var_30] mov rcx, [rsp+118h+var_C0] mov r8, [rsp+118h+var_B8] mov r9d, 1 lea rax, [rsp+118h+var_48] mov [rsp+118h+var_118], rax call JS_Call mov [rsp+118h+var_B0], rax mov [rsp+118h+var_A8], rdx mov rax, [rsp+118h+var_B0] mov [rsp+118h+var_68], rax mov rax, [rsp+118h+var_A8] mov [rsp+118h+var_60], rax loc_7B467: mov rdi, [rsp+118h+var_68] mov rsi, [rsp+118h+var_60] call JS_IsException_1 mov [rsp+118h+var_6C], eax cmp [rsp+118h+var_6C], 0 jz short loc_7B4BE mov rdi, [rsp+118h+var_18] call JS_GetException mov [rsp+118h+var_D0], rax mov [rsp+118h+var_C8], rdx mov rax, [rsp+118h+var_D0] mov [rsp+118h+var_68], rax mov rax, [rsp+118h+var_C8] mov [rsp+118h+var_60], rax loc_7B4BE: mov rax, [rsp+118h+var_28] movsxd rcx, [rsp+118h+var_6C] shl rcx, 4 add rax, rcx mov rcx, [rax] mov [rsp+118h+var_58], rcx mov rax, [rax+8] mov [rsp+118h+var_50], rax mov rdi, [rsp+118h+var_58] mov rsi, [rsp+118h+var_50] call JS_IsUndefined_1 cmp eax, 0 jnz short loc_7B576 mov rdi, [rsp+118h+var_18] mov dword ptr [rsp+118h+var_F0], 0 mov [rsp+118h+var_E8], 3 mov rsi, [rsp+118h+var_58] mov rdx, [rsp+118h+var_50] mov rcx, [rsp+118h+var_F0] mov r8, [rsp+118h+var_E8] mov r9d, 1 lea rax, [rsp+118h+var_68] mov [rsp+118h+var_118], rax call JS_Call mov [rsp+118h+var_E0], rax mov [rsp+118h+var_D8], rdx mov rax, [rsp+118h+var_E0] mov [rsp+118h+var_10], rax mov rax, [rsp+118h+var_D8] mov [rsp+118h+var_8], rax jmp short loc_7B5A1 loc_7B576: mov dword ptr [rsp+118h+var_100], 0 mov [rsp+118h+var_F8], 3 mov rax, [rsp+118h+var_100] mov [rsp+118h+var_10], rax mov rax, [rsp+118h+var_F8] mov [rsp+118h+var_8], rax loc_7B5A1: mov rdi, [rsp+118h+var_18] mov rsi, [rsp+118h+var_68] mov rdx, [rsp+118h+var_60] call JS_FreeValue mov rax, [rsp+118h+var_10] mov rdx, [rsp+118h+var_8] add rsp, 118h retn
long long promise_reaction_job(long long a1, int a2, long long a3) { long long v3; // rdx long long v4; // rdx long long v5; // rdx long long v6; // rdx long long *v7; // rax long long v8; // rdx long long v10; // [rsp+18h] [rbp-100h] _DWORD *v11; // [rsp+88h] [rbp-90h] int v12; // [rsp+ACh] [rbp-6Ch] BOOL IsException_1; // [rsp+ACh] [rbp-6Ch] long long Exception; // [rsp+B0h] [rbp-68h] BYREF long long v15; // [rsp+B8h] [rbp-60h] long long v16; // [rsp+C0h] [rbp-58h] long long v17; // [rsp+C8h] [rbp-50h] _DWORD *v18; // [rsp+D0h] [rbp-48h] BYREF long long v19; // [rsp+D8h] [rbp-40h] long long v20; // [rsp+E0h] [rbp-38h] long long v21; // [rsp+E8h] [rbp-30h] long long v22; // [rsp+F0h] [rbp-28h] int v23; // [rsp+FCh] [rbp-1Ch] long long v24; // [rsp+100h] [rbp-18h] long long v25; // [rsp+108h] [rbp-10h] long long v26; // [rsp+110h] [rbp-8h] v24 = a1; v23 = a2; v22 = a3; v20 = *(_QWORD *)(a3 + 32); v21 = *(_QWORD *)(a3 + 40); v12 = JS_ToBool(a1, *(_DWORD **)(a3 + 48), *(_QWORD *)(a3 + 56)); v18 = *(_DWORD **)(v22 + 64); v19 = *(_QWORD *)(v22 + 72); if ( JS_IsUndefined_1(v20, v21) ) { if ( v12 ) { v11 = js_dup(v18, v19); Exception = JS_Throw(v24, (long long)v11, v3); } else { Exception = (long long)js_dup(v18, v19); } v15 = v4; } else { Exception = JS_Call(v24, v20, v21, 0, 3, 1, (long long)&v18); v15 = v5; } IsException_1 = JS_IsException_1(Exception, v15); if ( IsException_1 ) { Exception = JS_GetException(v24); v15 = v6; } v7 = (long long *)(16LL * IsException_1 + v22); v16 = *v7; v17 = v7[1]; if ( JS_IsUndefined_1(v16, v17) ) { LODWORD(v10) = 0; v25 = v10; v26 = 3LL; } else { v25 = JS_Call(v24, v16, v17, 0, 3, 1, (long long)&Exception); v26 = v8; } JS_FreeValue(v24, Exception, v15); return v25; }
promise_reaction_job: SUB RSP,0x118 MOV qword ptr [RSP + 0x100],RDI MOV dword ptr [RSP + 0xfc],ESI MOV qword ptr [RSP + 0xf0],RDX MOV RAX,qword ptr [RSP + 0xf0] MOV RCX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0xe0],RCX MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0xe8],RAX MOV RDI,qword ptr [RSP + 0x100] MOV RAX,qword ptr [RSP + 0xf0] MOV RSI,qword ptr [RAX + 0x30] MOV RDX,qword ptr [RAX + 0x38] CALL 0x0013e820 MOV dword ptr [RSP + 0xac],EAX MOV RAX,qword ptr [RSP + 0xf0] MOV RCX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0xd0],RCX MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RSP + 0xd8],RAX MOV RDI,qword ptr [RSP + 0xe0] MOV RSI,qword ptr [RSP + 0xe8] CALL 0x00134550 CMP EAX,0x0 JZ 0x0017b3f9 CMP dword ptr [RSP + 0xac],0x0 JZ 0x0017b3b8 MOV RAX,qword ptr [RSP + 0x100] MOV qword ptr [RSP + 0x10],RAX MOV RDI,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RSP + 0xd8] CALL 0x001279c0 MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x88],RAX MOV qword ptr [RSP + 0x90],RDX MOV RSI,qword ptr [RSP + 0x88] MOV RDX,qword ptr [RSP + 0x90] CALL 0x001331f0 MOV qword ptr [RSP + 0x98],RAX MOV qword ptr [RSP + 0xa0],RDX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0xb8],RAX JMP 0x0017b3f7 LAB_0017b3b8: MOV RDI,qword ptr [RSP + 0xd0] MOV RSI,qword ptr [RSP + 0xd8] CALL 0x001279c0 MOV qword ptr [RSP + 0x78],RAX MOV qword ptr [RSP + 0x80],RDX MOV RAX,qword ptr [RSP + 0x78] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0xb8],RAX LAB_0017b3f7: JMP 0x0017b467 LAB_0017b3f9: MOV RDI,qword ptr [RSP + 0x100] MOV dword ptr [RSP + 0x58],0x0 MOV qword ptr [RSP + 0x60],0x3 MOV RSI,qword ptr [RSP + 0xe0] MOV RDX,qword ptr [RSP + 0xe8] MOV RCX,qword ptr [RSP + 0x58] MOV R8,qword ptr [RSP + 0x60] MOV R9D,0x1 LEA RAX,[RSP + 0xd0] MOV qword ptr [RSP],RAX CALL 0x00140340 MOV qword ptr [RSP + 0x68],RAX MOV qword ptr [RSP + 0x70],RDX MOV RAX,qword ptr [RSP + 0x68] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0x70] MOV qword ptr [RSP + 0xb8],RAX LAB_0017b467: MOV RDI,qword ptr [RSP + 0xb0] MOV RSI,qword ptr [RSP + 0xb8] CALL 0x00129fb0 MOV dword ptr [RSP + 0xac],EAX CMP dword ptr [RSP + 0xac],0x0 JZ 0x0017b4be MOV RDI,qword ptr [RSP + 0x100] CALL 0x00133260 MOV qword ptr [RSP + 0x48],RAX MOV qword ptr [RSP + 0x50],RDX MOV RAX,qword ptr [RSP + 0x48] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0x50] MOV qword ptr [RSP + 0xb8],RAX LAB_0017b4be: MOV RAX,qword ptr [RSP + 0xf0] MOVSXD RCX,dword ptr [RSP + 0xac] SHL RCX,0x4 ADD RAX,RCX MOV RCX,qword ptr [RAX] MOV qword ptr [RSP + 0xc0],RCX MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0xc8],RAX MOV RDI,qword ptr [RSP + 0xc0] MOV RSI,qword ptr [RSP + 0xc8] CALL 0x00134550 CMP EAX,0x0 JNZ 0x0017b576 MOV RDI,qword ptr [RSP + 0x100] MOV dword ptr [RSP + 0x28],0x0 MOV qword ptr [RSP + 0x30],0x3 MOV RSI,qword ptr [RSP + 0xc0] MOV RDX,qword ptr [RSP + 0xc8] MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x30] MOV R9D,0x1 LEA RAX,[RSP + 0xb0] MOV qword ptr [RSP],RAX CALL 0x00140340 MOV qword ptr [RSP + 0x38],RAX MOV qword ptr [RSP + 0x40],RDX MOV RAX,qword ptr [RSP + 0x38] MOV qword ptr [RSP + 0x108],RAX MOV RAX,qword ptr [RSP + 0x40] MOV qword ptr [RSP + 0x110],RAX JMP 0x0017b5a1 LAB_0017b576: MOV dword ptr [RSP + 0x18],0x0 MOV qword ptr [RSP + 0x20],0x3 MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x108],RAX MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x110],RAX LAB_0017b5a1: MOV RDI,qword ptr [RSP + 0x100] MOV RSI,qword ptr [RSP + 0xb0] MOV RDX,qword ptr [RSP + 0xb8] CALL 0x00129f80 MOV RAX,qword ptr [RSP + 0x108] MOV RDX,qword ptr [RSP + 0x110] ADD RSP,0x118 RET
int1 [16] promise_reaction_job(int8 param_1,int4 param_2,long param_3) { int8 uVar1; int iVar2; int iVar3; int8 *puVar4; int1 auVar5 [16]; uint uStack_fc; uint uStack_ec; uint uStack_bc; int1 local_68 [16]; int8 local_58; int8 local_50; int8 local_48; int8 local_40; int8 local_38; int8 local_30; long local_28; int4 local_1c; int8 local_18; int1 local_10 [16]; local_38 = *(int8 *)(param_3 + 0x20); local_30 = *(int8 *)(param_3 + 0x28); local_28 = param_3; local_1c = param_2; local_18 = param_1; iVar2 = JS_ToBool(param_1,*(int8 *)(param_3 + 0x30),*(int8 *)(param_3 + 0x38)); local_48 = *(int8 *)(local_28 + 0x40); local_40 = *(int8 *)(local_28 + 0x48); iVar3 = JS_IsUndefined(local_38,local_30); uVar1 = local_18; if (iVar3 == 0) { local_68 = JS_Call(local_18,local_38,local_30,(ulong)uStack_bc << 0x20,3,1,&local_48); } else if (iVar2 == 0) { local_68 = js_dup(local_48,local_40); } else { auVar5 = js_dup(local_48,local_40); local_68 = JS_Throw(uVar1,auVar5._0_8_,auVar5._8_8_); } iVar2 = JS_IsException(local_68._0_8_,local_68._8_8_); auVar5 = local_68; if (iVar2 != 0) { auVar5 = JS_GetException(local_18); } puVar4 = (int8 *)(local_28 + (long)iVar2 * 0x10); local_58 = *puVar4; local_50 = puVar4[1]; local_68 = auVar5; iVar2 = JS_IsUndefined(local_58,local_50); if (iVar2 == 0) { local_10 = JS_Call(local_18,local_58,local_50,(ulong)uStack_ec << 0x20,3,1,local_68); } else { local_10._8_8_ = 3; local_10._0_8_ = (ulong)uStack_fc << 0x20; } JS_FreeValue(local_18,local_68._0_8_,local_68._8_8_); return local_10; }
46,762
minja::strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/minja.hpp
static std::string strip(const std::string & s) { auto start = s.find_first_not_of(" \t\n\r"); if (start == std::string::npos) return ""; auto end = s.find_last_not_of(" \t\n\r"); return s.substr(start, end - start + 1); }
O0
cpp
minja::strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x58, %rsp movq %rdi, 0x10(%rsp) movq %rdi, %rax movq %rax, 0x18(%rsp) movq %rdi, 0x50(%rsp) movq %rsi, 0x48(%rsp) movq 0x48(%rsp), %rdi leaq 0x3ab4a(%rip), %rsi # 0x2141d1 xorl %eax, %eax movl %eax, %edx callq 0x5af80 movq %rax, 0x40(%rsp) cmpq $-0x1, 0x40(%rsp) jne 0x1d96ea leaq 0x3f(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x5b0e0 movq 0x10(%rsp), %rdi movq 0x8(%rsp), %rdx leaq 0x35b82(%rip), %rsi # 0x20f23f callq 0x630d0 jmp 0x1d96c4 leaq 0x3f(%rsp), %rdi callq 0x5b560 jmp 0x1d9729 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x30(%rsp) movl %eax, 0x2c(%rsp) leaq 0x3f(%rsp), %rdi callq 0x5b560 jmp 0x1d9733 movq 0x48(%rsp), %rdi leaq 0x3aadb(%rip), %rsi # 0x2141d1 movq $-0x1, %rdx callq 0x5af10 movq 0x10(%rsp), %rdi movq %rax, 0x20(%rsp) movq 0x48(%rsp), %rsi movq 0x40(%rsp), %rdx movq 0x20(%rsp), %rcx subq 0x40(%rsp), %rcx addq $0x1, %rcx callq 0x5b130 movq 0x18(%rsp), %rax addq $0x58, %rsp retq movq 0x30(%rsp), %rdi callq 0x5aba0 nopl (%rax)
_ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE_0: sub rsp, 58h mov [rsp+58h+var_48], rdi mov rax, rdi mov [rsp+58h+var_40], rax mov [rsp+58h+var_8], rdi mov [rsp+58h+var_10], rsi mov rdi, [rsp+58h+var_10] lea rsi, asc_2141D1; " \t\n\r" xor eax, eax mov edx, eax call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcm; std::string::find_first_not_of(char const*,ulong) mov [rsp+58h+var_18], rax cmp [rsp+58h+var_18], 0FFFFFFFFFFFFFFFFh jnz short loc_1D96EA lea rdi, [rsp+58h+var_19] mov [rsp+58h+var_50], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdi, [rsp+58h+var_48] mov rdx, [rsp+58h+var_50] lea rsi, aExampleSpecifi+27h; "" call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_1D96C4: lea rdi, [rsp+58h+var_19] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_1D9729 mov rcx, rax mov eax, edx mov [rsp+arg_28], rcx mov [rsp+arg_24], eax lea rdi, [rsp+arg_37] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_1D9733 loc_1D96EA: mov rdi, [rsp+58h+var_10] lea rsi, asc_2141D1; " \t\n\r" mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE16find_last_not_ofEPKcm; std::string::find_last_not_of(char const*,ulong) mov rdi, [rsp+58h+var_48] mov [rsp+58h+var_38], rax mov rsi, [rsp+58h+var_10] mov rdx, [rsp+58h+var_18] mov rcx, [rsp+58h+var_38] sub rcx, [rsp+58h+var_18] add rcx, 1 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) loc_1D9729: mov rax, [rsp+58h+var_40] add rsp, 58h retn loc_1D9733: mov rdi, [rsp+arg_28] call __Unwind_Resume
long long minja::strip(long long a1, long long a2) { long long last_not_of; // [rsp+20h] [rbp-38h] char v4; // [rsp+3Fh] [rbp-19h] BYREF long long first_not_of; // [rsp+40h] [rbp-18h] long long v6; // [rsp+48h] [rbp-10h] long long v7; // [rsp+50h] [rbp-8h] v7 = a1; v6 = a2; first_not_of = std::string::find_first_not_of(a2, " \t\n\r", 0LL); if ( first_not_of == -1 ) { std::allocator<char>::allocator(&v4, " \t\n\r"); std::string::basic_string<std::allocator<char>>(a1, (long long)"", (long long)&v4); std::allocator<char>::~allocator(&v4); } else { last_not_of = std::string::find_last_not_of(v6, " \t\n\r", -1LL); std::string::substr(a1, v6, first_not_of, last_not_of - first_not_of + 1); } return a1; }
46,763
minja::strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/minja.hpp
static std::string strip(const std::string & s) { auto start = s.find_first_not_of(" \t\n\r"); if (start == std::string::npos) return ""; auto end = s.find_last_not_of(" \t\n\r"); return s.substr(start, end - start + 1); }
O1
cpp
minja::strip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %rbx leaq 0x7b2c7(%rip), %rsi # 0xf37ea movl $0x4, %ecx movq %r14, %rdi xorl %edx, %edx callq 0x1bf00 cmpq $-0x1, %rax je 0x7856d movq %rax, %r15 leaq 0x7b2a8(%rip), %rsi # 0xf37ea movl $0x4, %ecx movq %r14, %rdi movq $-0x1, %rdx callq 0x1be50 subq %r15, %rax leaq 0x1(%rax), %rcx movq %rbx, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x1b940 jmp 0x78586 leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x70e06(%rip), %rdx # 0xe9381 movq %rbx, %rdi movq %rdx, %rsi callq 0x22ba6 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq
_ZN5minjaL5stripERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push r15 push r14 push rbx mov r14, rsi mov rbx, rdi lea rsi, asc_F37EA; " \t\n\r" mov ecx, 4 mov rdi, r14 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE17find_first_not_ofEPKcmm; std::string::find_first_not_of(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_7856D mov r15, rax lea rsi, asc_F37EA; " \t\n\r" mov ecx, 4 mov rdi, r14 mov rdx, 0FFFFFFFFFFFFFFFFh call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE16find_last_not_ofEPKcmm; std::string::find_last_not_of(char const*,ulong,ulong) sub rax, r15 lea rcx, [rax+1] mov rdi, rbx mov rsi, r14 mov rdx, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) jmp short loc_78586 loc_7856D: lea rax, [rbx+10h] mov [rbx], rax lea rdx, aTarget+9; "" mov rdi, rbx mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_78586: mov rax, rbx pop rbx pop r14 pop r15 retn
_QWORD * minja::strip(_QWORD *a1, long long a2) { long long first_not_of; // rax long long v3; // r15 long long last_not_of; // rax first_not_of = std::string::find_first_not_of(a2, " \t\n\r", 0LL, 4LL); if ( first_not_of == -1 ) { *a1 = a1 + 2; std::string::_M_construct<char const*>(a1, "", (long long)""); } else { v3 = first_not_of; last_not_of = std::string::find_last_not_of(a2, " \t\n\r", -1LL, 4LL); std::string::substr(a1, a2, v3, last_not_of - v3 + 1); } return a1; }
strip: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV RBX,RDI LEA RSI,[0x1f37ea] MOV ECX,0x4 MOV RDI,R14 XOR EDX,EDX CALL 0x0011bf00 CMP RAX,-0x1 JZ 0x0017856d MOV R15,RAX LEA RSI,[0x1f37ea] MOV ECX,0x4 MOV RDI,R14 MOV RDX,-0x1 CALL 0x0011be50 SUB RAX,R15 LEA RCX,[RAX + 0x1] MOV RDI,RBX MOV RSI,R14 MOV RDX,R15 CALL 0x0011b940 JMP 0x00178586 LAB_0017856d: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RDX,[0x1e9381] MOV RDI,RBX MOV RSI,RDX CALL 0x00122ba6 LAB_00178586: MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* minja::strip(std::__cxx11::string const&) */ minja * __thiscall minja::strip(minja *this,string *param_1) { long lVar1; lVar1 = std::__cxx11::string::find_first_not_of((char *)param_1,0x1f37ea,0); if (lVar1 == -1) { *(minja **)this = this + 0x10; std::__cxx11::string::_M_construct<char_const*>(this,""); } else { std::__cxx11::string::find_last_not_of((char *)param_1,0x1f37ea,0xffffffffffffffff); std::__cxx11::string::substr((ulong)this,(ulong)param_1); } return this; }
46,764
xml_string_clone
eloqsql/storage/maria/libmarias3/src/xml.c
static uint8_t* xml_string_clone(struct xml_string* s) { uint8_t* clone; if (!s) { return 0; } clone = ms3_ccalloc(s->length + 1, sizeof(uint8_t)); xml_string_copy(s, clone, s->length); clone[s->length] = 0; return clone; }
O0
c
xml_string_clone: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movq %rdi, -0x10(%rbp) cmpq $0x0, -0x10(%rbp) jne 0x184ed movq $0x0, -0x8(%rbp) jmp 0x1853b movq 0xaacc(%rip), %rax # 0x22fc0 movq (%rax), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rdi addq $0x1, %rdi movl $0x1, %esi callq *%rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rdi movq -0x18(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x8(%rax), %rdx callq 0xa5c0 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rcx movb $0x0, (%rax,%rcx) movq -0x18(%rbp), %rax movq %rax, -0x8(%rbp) movq -0x8(%rbp), %rax addq $0x20, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
xml_string_clone: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], rdi cmp [rbp+var_10], 0 jnz short loc_184ED mov [rbp+var_8], 0 jmp short loc_1853B loc_184ED: mov rax, cs:ms3_ccalloc_ptr mov rax, [rax] mov rcx, [rbp+var_10] mov rdi, [rcx+8] add rdi, 1 mov esi, 1 call rax mov [rbp+var_18], rax mov rdi, [rbp+var_10] mov rsi, [rbp+var_18] mov rax, [rbp+var_10] mov rdx, [rax+8] call _xml_string_copy mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov rcx, [rcx+8] mov byte ptr [rax+rcx], 0 mov rax, [rbp+var_18] mov [rbp+var_8], rax loc_1853B: mov rax, [rbp+var_8] add rsp, 20h pop rbp retn
long long xml_string_clone(long long a1) { long long v2; // [rsp+8h] [rbp-18h] if ( !a1 ) return 0LL; v2 = ms3_ccalloc(*(_QWORD *)(a1 + 8) + 1LL, 1LL); xml_string_copy(a1, v2, *(_QWORD *)(a1 + 8)); *(_BYTE *)(v2 + *(_QWORD *)(a1 + 8)) = 0; return v2; }
xml_string_clone: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV qword ptr [RBP + -0x10],RDI CMP qword ptr [RBP + -0x10],0x0 JNZ 0x001184ed MOV qword ptr [RBP + -0x8],0x0 JMP 0x0011853b LAB_001184ed: MOV RAX,qword ptr [0x00122fc0] MOV RAX,qword ptr [RAX] MOV RCX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RCX + 0x8] ADD RDI,0x1 MOV ESI,0x1 CALL RAX MOV qword ptr [RBP + -0x18],RAX MOV RDI,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x8] CALL 0x0010a5c0 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x8] MOV byte ptr [RAX + RCX*0x1],0x0 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x8],RAX LAB_0011853b: MOV RAX,qword ptr [RBP + -0x8] ADD RSP,0x20 POP RBP RET
long xml_string_clone(long param_1) { int8 local_10; if (param_1 == 0) { local_10 = 0; } else { local_10 = (**(code **)PTR_ms3_ccalloc_00122fc0)(*(long *)(param_1 + 8) + 1,1); xml_string_copy(param_1,local_10,*(int8 *)(param_1 + 8)); *(int1 *)(local_10 + *(long *)(param_1 + 8)) = 0; } return local_10; }
46,765
minja::Value::contains(minja::Value const&) const
monkey531[P]llama/common/minja.hpp
bool contains(const Value & value) const { if (is_null()) throw std::runtime_error("Undefined value or reference"); if (array_) { for (const auto& item : *array_) { if (item.to_bool() && item == value) return true; } return false; } else if (object_) { if (!value.is_hashable()) throw std::runtime_error("Unashable type: " + value.dump()); return object_->find(value.primitive_) != object_->end(); } else { throw std::runtime_error("contains can only be called on arrays and objects: " + dump()); } }
O2
cpp
minja::Value::contains(minja::Value const&) const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x48, %rsp movq %rsi, %r14 movq %rdi, %r15 callq 0xb52d4 testb %al, %al jne 0xb6221 movq 0x10(%r15), %rax testq %rax, %rax je 0xb61e1 movq (%rax), %rbx movq 0x8(%rax), %r15 cmpq %r15, %rbx setne %bpl je 0xb6214 movq %rbx, %rdi callq 0xb5de4 testb %al, %al je 0xb61db movq %rbx, %rdi movq %r14, %rsi callq 0xb6544 testb %al, %al jne 0xb6214 addq $0x50, %rbx jmp 0xb61b7 cmpq $0x0, 0x20(%r15) je 0xb6251 movq %r14, %rdi callq 0xb6144 testb %al, %al je 0xb62ae movq 0x20(%r15), %rdi addq $0x40, %r14 movq %r14, %rsi callq 0xb66d8 movq 0x20(%r15), %rcx cmpq 0x8(%rcx), %rax setne %bpl movl %ebp, %eax addq $0x48, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq pushq $0x10 popq %rdi callq 0x28580 movq %rax, %rbx leaq 0x4b6f8(%rip), %rsi # 0x10192b movq %rax, %rdi callq 0x28410 movq 0xb0dae(%rip), %rsi # 0x166ff0 movq 0xb0d0f(%rip), %rdx # 0x166f58 movq %rbx, %rdi callq 0x29320 pushq $0x10 popq %rdi callq 0x28580 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r15, %rsi xorl %ecx, %ecx callq 0xb5618 leaq 0x4b6e4(%rip), %rsi # 0x101959 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x3bd5f movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x291e0 xorl %ebp, %ebp movq 0xb0d53(%rip), %rsi # 0x166ff0 movq 0xb0cb4(%rip), %rdx # 0x166f58 movq %rbx, %rdi callq 0x29320 jmp 0xb6309 pushq $0x10 popq %rdi callq 0x28580 movq %rax, %rbx leaq 0x8(%rsp), %rdi pushq $-0x1 popq %rdx movq %r14, %rsi xorl %ecx, %ecx callq 0xb5618 leaq 0x4b676(%rip), %rsi # 0x101948 leaq 0x28(%rsp), %rdi leaq 0x8(%rsp), %rdx callq 0x3bd5f movb $0x1, %bpl leaq 0x28(%rsp), %rsi movq %rbx, %rdi callq 0x291e0 xorl %ebp, %ebp movq 0xb0cf6(%rip), %rsi # 0x166ff0 movq 0xb0c57(%rip), %rdx # 0x166f58 movq %rbx, %rdi callq 0x29320 jmp 0xb630d jmp 0xb631c movq %rax, %r14 leaq 0x28(%rsp), %rdi callq 0x29678 jmp 0xb6322 movq %rax, %r14 movb $0x1, %bpl leaq 0x8(%rsp), %rdi callq 0x29678 testb %bpl, %bpl jne 0xb633a jmp 0xb6342 jmp 0xb6337 jmp 0xb6337 movq %rax, %r14 movq %rbx, %rdi callq 0x28830 movq %r14, %rdi callq 0x293c0
_ZNK5minja5Value8containsERKS0_: push rbp push r15 push r14 push rbx sub rsp, 48h mov r14, rsi mov r15, rdi call _ZNK5minja5Value7is_nullEv; minja::Value::is_null(void) test al, al jnz short loc_B6221 mov rax, [r15+10h] test rax, rax jz short loc_B61E1 mov rbx, [rax] mov r15, [rax+8] loc_B61B7: cmp rbx, r15 setnz bpl jz short loc_B6214 mov rdi, rbx; this call _ZNK5minja5Value7to_boolEv; minja::Value::to_bool(void) test al, al jz short loc_B61DB mov rdi, rbx mov rsi, r14 call _ZNK5minja5ValueeqERKS0_; minja::Value::operator==(minja::Value const&) test al, al jnz short loc_B6214 loc_B61DB: add rbx, 50h ; 'P' jmp short loc_B61B7 loc_B61E1: cmp qword ptr [r15+20h], 0 jz short loc_B6251 mov rdi, r14; this call _ZNK5minja5Value12is_primitiveEv; minja::Value::is_primitive(void) test al, al jz loc_B62AE mov rdi, [r15+20h] add r14, 40h ; '@' mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE4findERSJ_; nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const,minja::Value>>>::find(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 rcx, [r15+20h] cmp rax, [rcx+8] setnz bpl loc_B6214: mov eax, ebp add rsp, 48h pop rbx pop r14 pop r15 pop rbp retn loc_B6221: 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:lptinfo; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_B6251: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r15 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aContainsCanOnl; "contains can only be called on arrays a"... lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+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:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw jmp short loc_B6309 loc_B62AE: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rdi, [rsp+68h+var_60] push 0FFFFFFFFFFFFFFFFh pop rdx mov rsi, r14 xor ecx, ecx call _ZNK5minja5Value4dumpB5cxx11Eib; minja::Value::dump(int,bool) lea rsi, aUnashableType; "Unashable type: " lea rdi, [rsp+68h+var_40] lea rdx, [rsp+68h+var_60] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_OS8_; std::operator+<char>(char const*,std::string&&) mov bpl, 1 lea rsi, [rsp+68h+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:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_B6309: jmp short loc_B630D jmp short loc_B631C loc_B630D: mov r14, rax lea rdi, [rsp+68h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_B6322 loc_B631C: mov r14, rax mov bpl, 1 loc_B6322: lea rdi, [rsp+68h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() test bpl, bpl jnz short loc_B633A jmp short loc_B6342 jmp short loc_B6337 jmp short $+2 loc_B6337: mov r14, rax loc_B633A: mov rdi, rbx; void * call ___cxa_free_exception loc_B6342: mov rdi, r14 call __Unwind_Resume
long long minja::Value::contains(minja::Value ***this, const minja::Value *a2) { unsigned int v2; // ebp minja::Value **v3; // rax minja::Value *v4; // rbx minja::Value *v5; // r15 std::runtime_error *exception; // rbx void *v8; // rbx void *v9; // rbx _BYTE v10[32]; // [rsp+8h] [rbp-60h] BYREF _BYTE v11[64]; // [rsp+28h] [rbp-40h] BYREF if ( minja::Value::is_null((minja::Value *)this) ) { 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); } v3 = this[2]; if ( v3 ) { v4 = *v3; v5 = v3[1]; while ( 1 ) { LOBYTE(v2) = v4 != v5; if ( v4 == v5 || (unsigned __int8)minja::Value::to_bool(v4) && (unsigned __int8)minja::Value::operator==(v4, a2) ) break; v4 = (minja::Value *)((char *)v4 + 80); } } else { if ( !this[4] ) { v8 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)this, 0xFFFFFFFF, 0); std::operator+<char>((long long)v11, (long long)"contains can only be called on arrays and objects: ", (long long)v10); std::runtime_error::runtime_error(v8, v11); __cxa_throw( v8, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } if ( !minja::Value::is_primitive(a2) ) { v9 = __cxa_allocate_exception(0x10uLL); minja::Value::dump[abi:cxx11]((long long)v10, (long long)a2, 0xFFFFFFFF, 0); std::operator+<char>((long long)v11, (long long)"Unashable type: ", (long long)v10); std::runtime_error::runtime_error(v9, v11); __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } LOBYTE(v2) = nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> const,minja::Value>>>::find( this[4], (char *)a2 + 64) != (_QWORD)this[4][1]; } return v2; }
contains: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x48 MOV R14,RSI MOV R15,RDI CALL 0x001b52d4 TEST AL,AL JNZ 0x001b6221 MOV RAX,qword ptr [R15 + 0x10] TEST RAX,RAX JZ 0x001b61e1 MOV RBX,qword ptr [RAX] MOV R15,qword ptr [RAX + 0x8] LAB_001b61b7: CMP RBX,R15 SETNZ BPL JZ 0x001b6214 MOV RDI,RBX CALL 0x001b5de4 TEST AL,AL JZ 0x001b61db MOV RDI,RBX MOV RSI,R14 CALL 0x001b6544 TEST AL,AL JNZ 0x001b6214 LAB_001b61db: ADD RBX,0x50 JMP 0x001b61b7 LAB_001b61e1: CMP qword ptr [R15 + 0x20],0x0 JZ 0x001b6251 MOV RDI,R14 CALL 0x001b6144 TEST AL,AL JZ 0x001b62ae MOV RDI,qword ptr [R15 + 0x20] ADD R14,0x40 MOV RSI,R14 CALL 0x001b66d8 MOV RCX,qword ptr [R15 + 0x20] CMP RAX,qword ptr [RCX + 0x8] SETNZ BPL LAB_001b6214: MOV EAX,EBP ADD RSP,0x48 POP RBX POP R14 POP R15 POP RBP RET LAB_001b6221: PUSH 0x10 POP RDI CALL 0x00128580 MOV RBX,RAX LAB_001b622c: LEA RSI,[0x20192b] MOV RDI,RAX CALL 0x00128410 LAB_001b623b: MOV RSI,qword ptr [0x00266ff0] MOV RDX,qword ptr [0x00266f58] MOV RDI,RBX CALL 0x00129320 LAB_001b6251: PUSH 0x10 POP RDI CALL 0x00128580 MOV RBX,RAX LAB_001b625c: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R15 XOR ECX,ECX CALL 0x001b5618 LAB_001b626e: LEA RSI,[0x201959] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x0013bd5f MOV BPL,0x1 LAB_001b6287: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x001291e0 XOR EBP,EBP MOV RSI,qword ptr [0x00266ff0] MOV RDX,qword ptr [0x00266f58] MOV RDI,RBX CALL 0x00129320 LAB_001b62ae: PUSH 0x10 POP RDI CALL 0x00128580 MOV RBX,RAX LAB_001b62b9: LEA RDI,[RSP + 0x8] PUSH -0x1 POP RDX MOV RSI,R14 XOR ECX,ECX CALL 0x001b5618 LAB_001b62cb: LEA RSI,[0x201948] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x8] CALL 0x0013bd5f MOV BPL,0x1 LAB_001b62e4: LEA RSI,[RSP + 0x28] MOV RDI,RBX CALL 0x001291e0 XOR EBP,EBP MOV RSI,qword ptr [0x00266ff0] MOV RDX,qword ptr [0x00266f58] MOV RDI,RBX CALL 0x00129320
/* minja::Value::contains(minja::Value const&) const */ ulong __thiscall minja::Value::contains(Value *this,Value *param_1) { int8 *puVar1; Value *pVVar2; char cVar3; long lVar4; runtime_error *prVar5; Value *this_00; ulong unaff_RBP; int1 local_60 [32]; string local_40 [32]; cVar3 = is_null(this); if (cVar3 != '\0') { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001b622c to 001b623a has its CatchHandler @ 001b6337 */ std::runtime_error::runtime_error(prVar5,"Undefined value or reference"); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_00266ff0,PTR__runtime_error_00266f58); } puVar1 = *(int8 **)(this + 0x10); if (puVar1 == (int8 *)0x0) { if (*(long *)(this + 0x20) == 0) { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001b625c to 001b626d has its CatchHandler @ 001b6335 */ dump_abi_cxx11_((int)local_60,SUB81(this,0)); /* try { // try from 001b626e to 001b6283 has its CatchHandler @ 001b631c */ std::operator+((char *)local_40, (string *)"contains can only be called on arrays and objects: "); /* try { // try from 001b6287 to 001b62ab has its CatchHandler @ 001b630d */ std::runtime_error::runtime_error(prVar5,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_00266ff0,PTR__runtime_error_00266f58); } cVar3 = is_primitive(param_1); if (cVar3 == '\0') { prVar5 = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001b62b9 to 001b62ca has its CatchHandler @ 001b6333 */ dump_abi_cxx11_((int)local_60,SUB81(param_1,0)); /* try { // try from 001b62cb to 001b62e0 has its CatchHandler @ 001b630b */ std::operator+((char *)local_40,(string *)"Unashable type: "); /* try { // try from 001b62e4 to 001b6308 has its CatchHandler @ 001b6309 */ std::runtime_error::runtime_error(prVar5,local_40); /* WARNING: Subroutine does not return */ __cxa_throw(prVar5,PTR_typeinfo_00266ff0,PTR__runtime_error_00266f58); } lVar4 = 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 + 0x20),(basic_json *)(param_1 + 0x40)); unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),lVar4 != *(long *)(*(long *)(this + 0x20) + 8)); } else { pVVar2 = (Value *)puVar1[1]; for (this_00 = (Value *)*puVar1; unaff_RBP = CONCAT71((int7)(unaff_RBP >> 8),this_00 != pVVar2), this_00 != pVVar2; this_00 = this_00 + 0x50) { cVar3 = to_bool(this_00); if (cVar3 != '\0') { cVar3 = operator==(this_00,param_1); if (cVar3 != '\0') break; } } } return unaff_RBP & 0xffffffff; }
46,766
nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...)
ng-log[P]ng-log/src/raw_logging.cc
void RawLog(LogSeverity severity, const char* file, int line, const char* format, ...) { if (!(FLAGS_logtostdout || FLAGS_logtostderr || severity >= FLAGS_stderrthreshold || FLAGS_alsologtostderr || !IsLoggingInitialized())) { return; // this stderr log message is suppressed } // We do not have any any option other that string streams to obtain the // thread identifier as the corresponding value is not convertible to an // integer. Use a statically allocated buffer to avoid dynamic memory // allocations. StaticStringBuf<kLogBufSize> sbuf; std::ostream oss(&sbuf); oss << std::setw(5) << std::this_thread::get_id(); // can't call localtime_r here: it can allocate char buffer[kLogBufSize]; char* buf = buffer; size_t size = sizeof(buffer); // NOTE: this format should match the specification in base/logging.h DoRawLog(&buf, &size, "%c00000000 00:00:00.000000 %s %s:%d] RAW: ", GetLogSeverityName(severity)[0], sbuf.data(), const_basename(const_cast<char*>(file)), line); // Record the position and size of the buffer after the prefix const char* msg_start = buf; const size_t msg_size = size; va_list ap; va_start(ap, format); bool no_chop = VADoRawLog(&buf, &size, format, ap); va_end(ap); if (no_chop) { DoRawLog(&buf, &size, "\n"); } else { DoRawLog(&buf, &size, "RAW_LOG ERROR: The Message was too long!\n"); } // We make a raw syscall to write directly to the stderr file descriptor, // avoiding FILE buffering (to avoid invoking malloc()), and bypassing // libc (to side-step any libc interception). // We write just once to avoid races with other invocations of RawLog. safe_write(fileno(stderr), buffer, strlen(buffer)); if (severity == NGLOG_FATAL) { std::call_once(crashed, [file, line, msg_start, msg_size] { crash_reason.filename = file; crash_reason.line_number = line; memcpy(crash_buf, msg_start, msg_size); // Don't include prefix crash_reason.message = crash_buf; #ifdef HAVE_STACKTRACE crash_reason.depth = GetStackTrace(crash_reason.stack, ARRAYSIZE(crash_reason.stack), 1); #else crash_reason.depth = 0; #endif SetCrashReason(&crash_reason); }); LogMessage::Fail(); // abort() } }
O0
cpp
nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...): pushq %rbp movq %rsp, %rbp subq $0x1a70, %rsp # imm = 0x1A70 testb %al, %al je 0x4c0c7 movaps %xmm0, -0x19f0(%rbp) movaps %xmm1, -0x19e0(%rbp) movaps %xmm2, -0x19d0(%rbp) movaps %xmm3, -0x19c0(%rbp) movaps %xmm4, -0x19b0(%rbp) movaps %xmm5, -0x19a0(%rbp) movaps %xmm6, -0x1990(%rbp) movaps %xmm7, -0x1980(%rbp) movq %r9, -0x19f8(%rbp) movq %r8, -0x1a00(%rbp) movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movl %edx, -0x14(%rbp) movq %rcx, -0x20(%rbp) leaq 0x2bbb0(%rip), %rax # 0x77c9a testb $0x1, (%rax) jne 0x4c125 leaq 0x2bb9c(%rip), %rax # 0x77c92 testb $0x1, (%rax) jne 0x4c125 movl -0x4(%rbp), %eax leaq 0x2bb9b(%rip), %rcx # 0x77ca0 cmpl (%rcx), %eax jge 0x4c125 leaq 0x2bb84(%rip), %rax # 0x77c94 testb $0x1, (%rax) jne 0x4c125 callq 0x4f6f0 testb $0x1, %al jne 0x4c120 jmp 0x4c125 jmp 0x4c3fc leaq -0xc18(%rbp), %rdi movq %rdi, -0x1a28(%rbp) callq 0x4c420 movq -0x1a28(%rbp), %rsi leaq -0xd28(%rbp), %rdi callq 0x9280 jmp 0x4c14d movl $0x5, %edi callq 0x1d720 movl %eax, -0x1a2c(%rbp) jmp 0x4c15f movl -0x1a2c(%rbp), %eax movl %eax, -0xd38(%rbp) movl -0xd38(%rbp), %esi leaq -0xd28(%rbp), %rdi callq 0x9870 movq %rax, -0x1a38(%rbp) jmp 0x4c186 callq 0x1d6f0 movq -0x1a38(%rbp), %rdi movq %rax, -0xd40(%rbp) movq -0xd40(%rbp), %rsi callq 0x1d760 jmp 0x4c1a7 leaq -0x1900(%rbp), %rax movq %rax, -0x1908(%rbp) movq $0xbb8, -0x1910(%rbp) # imm = 0xBB8 movl -0x4(%rbp), %edi callq 0x130f0 movq %rax, -0x1a40(%rbp) jmp 0x4c1d1 movq -0x1a40(%rbp), %rax movsbl (%rax), %eax movl %eax, -0x1a54(%rbp) leaq -0xc18(%rbp), %rdi callq 0x4c5e0 movq %rax, -0x1a50(%rbp) movq -0x10(%rbp), %rdi callq 0x4f730 movq %rax, -0x1a48(%rbp) jmp 0x4c206 movq -0x1a48(%rbp), %r9 movq -0x1a50(%rbp), %r8 movl -0x1a54(%rbp), %ecx movl -0x14(%rbp), %edx movq %rsp, %rax movl %edx, (%rax) leaq 0x6d23(%rip), %rdx # 0x52f4c xorl %eax, %eax leaq -0x1908(%rbp), %rdi leaq -0x1910(%rbp), %rsi callq 0x4c4e0 jmp 0x4c240 movq -0x1908(%rbp), %rax movq %rax, -0x1918(%rbp) movq -0x1910(%rbp), %rax movq %rax, -0x1920(%rbp) leaq -0x1a20(%rbp), %rax movq %rax, -0x1930(%rbp) leaq 0x10(%rbp), %rax movq %rax, -0x1938(%rbp) movl $0x30, -0x193c(%rbp) movl $0x20, -0x1940(%rbp) movq -0x20(%rbp), %rdx leaq -0x1908(%rbp), %rdi leaq -0x1910(%rbp), %rsi leaq -0x1940(%rbp), %rcx callq 0x4c690 movb %al, -0x1a55(%rbp) jmp 0x4c2af movb -0x1a55(%rbp), %al andb $0x1, %al movb %al, -0x1941(%rbp) leaq -0x1940(%rbp), %rax testb $0x1, -0x1941(%rbp) je 0x4c327 leaq 0x5c42(%rip), %rdx # 0x51f16 xorl %eax, %eax leaq -0x1908(%rbp), %rdi leaq -0x1910(%rbp), %rsi callq 0x4c4e0 jmp 0x4c2eb jmp 0x4c347 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xd30(%rbp) movl %eax, -0xd34(%rbp) jmp 0x4c405 movq %rax, %rcx movl %edx, %eax movq %rcx, -0xd30(%rbp) movl %eax, -0xd34(%rbp) leaq -0xd28(%rbp), %rdi callq 0x9c20 jmp 0x4c405 leaq 0x6c49(%rip), %rdx # 0x52f77 xorl %eax, %eax leaq -0x1908(%rbp), %rdi leaq -0x1910(%rbp), %rsi callq 0x4c4e0 jmp 0x4c345 jmp 0x4c347 movq 0x2ac62(%rip), %rax # 0x76fb0 movq (%rax), %rdi callq 0x9770 movl %eax, -0x1a64(%rbp) leaq -0x1900(%rbp), %rax movq %rax, -0x1a60(%rbp) leaq -0x1900(%rbp), %rdi callq 0x92e0 movl -0x1a64(%rbp), %esi movq -0x1a60(%rbp), %rdx movq %rax, %rcx movl $0x1, %edi movb $0x0, %al callq 0x90b0 cmpl $0x3, -0x4(%rbp) jne 0x4c3e4 movq -0x10(%rbp), %rax movq %rax, -0x1968(%rbp) movl -0x14(%rbp), %eax movl %eax, -0x1960(%rbp) movq -0x1918(%rbp), %rax movq %rax, -0x1958(%rbp) movq -0x1920(%rbp), %rax movq %rax, -0x1950(%rbp) leaq 0x3ad71(%rip), %rdi # 0x87140 leaq -0x1968(%rbp), %rsi callq 0x4c720 jmp 0x4c3dd callq 0x153b0 jmp 0x4c3e4 leaq -0xd28(%rbp), %rdi callq 0x9c20 leaq -0xc18(%rbp), %rdi callq 0x4c7a0 addq $0x1a70, %rsp # imm = 0x1A70 popq %rbp retq leaq -0xc18(%rbp), %rdi callq 0x4c7a0 movq -0xd30(%rbp), %rdi callq 0x9d40 nopl (%rax)
_ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z: push rbp mov rbp, rsp sub rsp, 1A70h test al, al jz short loc_4C0C7 movaps [rbp+var_19F0], xmm0 movaps [rbp+var_19E0], xmm1 movaps [rbp+var_19D0], xmm2 movaps [rbp+var_19C0], xmm3 movaps [rbp+var_19B0], xmm4 movaps [rbp+var_19A0], xmm5 movaps [rbp+var_1990], xmm6 movaps [rbp+var_1980], xmm7 loc_4C0C7: mov [rbp+var_19F8], r9 mov [rbp+var_1A00], r8 mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_14], edx mov [rbp+var_20], rcx lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout test byte ptr [rax], 1 jnz short loc_4C125 lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr test byte ptr [rax], 1 jnz short loc_4C125 mov eax, [rbp+var_4] lea rcx, _ZN3fLI21FLAGS_stderrthresholdE; fLI::FLAGS_stderrthreshold cmp eax, [rcx] jge short loc_4C125 lea rax, _ZN3fLB21FLAGS_alsologtostderrE; fLB::FLAGS_alsologtostderr test byte ptr [rax], 1 jnz short loc_4C125 call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void) test al, 1 jnz short loc_4C120 jmp short loc_4C125 loc_4C120: jmp loc_4C3FC loc_4C125: lea rdi, [rbp+var_C18] mov [rbp+var_1A28], rdi call _ZN5nglog12_GLOBAL__N_115StaticStringBufILm3000EEC2Ev; nglog::`anonymous namespace'::StaticStringBuf<3000ul>::StaticStringBuf(void) mov rsi, [rbp+var_1A28] lea rdi, [rbp+var_D28] call __ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE; std::ostream::ostream(std::streambuf *) jmp short $+2 loc_4C14D: mov edi, 5; int call _ZSt4setwi; std::setw(int) mov [rbp+var_1A2C], eax jmp short $+2 loc_4C15F: mov eax, [rbp+var_1A2C] mov [rbp+var_D38], eax mov esi, [rbp+var_D38] lea rdi, [rbp+var_D28]; this call __ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_St5_Setw; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::_Setw) mov [rbp+var_1A38], rax jmp short $+2 loc_4C186: call _ZNSt11this_thread6get_idEv; std::this_thread::get_id(void) mov rdi, [rbp+var_1A38] mov [rbp+var_D40], rax mov rsi, [rbp+var_D40]; char * call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_NSt6thread2idE; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::thread::id) jmp short $+2 loc_4C1A7: lea rax, [rbp+var_1900] mov [rbp+var_1908], rax mov [rbp+var_1910], 0BB8h mov edi, [rbp+var_4] call _ZN5nglog18GetLogSeverityNameENS_11LogSeverityE; nglog::GetLogSeverityName(nglog::LogSeverity) mov [rbp+var_1A40], rax jmp short $+2 loc_4C1D1: mov rax, [rbp+var_1A40] movsx eax, byte ptr [rax] mov dword ptr [rbp+var_1A54], eax lea rdi, [rbp+var_C18] call _ZN5nglog12_GLOBAL__N_115StaticStringBufILm3000EE4dataEv; nglog::`anonymous namespace'::StaticStringBuf<3000ul>::data(void) mov [rbp+var_1A54+4], rax mov rdi, [rbp+var_10]; this call _ZN5nglog5tools14const_basenameEPKc; nglog::tools::const_basename(char const*) mov [rbp+var_1A48], rax jmp short $+2 loc_4C206: mov r9, [rbp+var_1A48] mov r8, [rbp+var_1A54+4] mov ecx, dword ptr [rbp+var_1A54]; char * mov edx, [rbp+var_14] mov rax, rsp mov [rax], edx lea rdx, aC0000000000000; "%c00000000 00:00:00.000000 %s %s:%d] RA"... xor eax, eax lea rdi, [rbp+var_1908]; this lea rsi, [rbp+var_1910]; char ** call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...) jmp short $+2 loc_4C240: mov rax, [rbp+var_1908] mov [rbp+var_1918], rax mov rax, [rbp+var_1910] mov [rbp+var_1920], rax lea rax, [rbp+var_1A20] mov [rbp+var_1930], rax lea rax, [rbp+arg_0] mov [rbp+var_1938], rax mov [rbp+var_193C], 30h ; '0' mov dword ptr [rbp+var_1940], 20h ; ' ' mov rdx, [rbp+var_20]; unsigned __int64 * lea rdi, [rbp+var_1908]; this lea rsi, [rbp+var_1910]; char ** lea rcx, [rbp+var_1940]; char * call _ZN5nglogL10VADoRawLogEPPcPmPKcP13__va_list_tag; nglog::VADoRawLog(char **,ulong *,char const*,__va_list_tag *) mov [rbp+var_1A55], al jmp short $+2 loc_4C2AF: mov al, [rbp+var_1A55] and al, 1 mov [rbp+var_1941], al lea rax, [rbp+var_1940] test [rbp+var_1941], 1 jz short loc_4C327 lea rdx, asc_51F15+1; unsigned __int64 * xor eax, eax lea rdi, [rbp+var_1908]; this lea rsi, [rbp+var_1910]; char ** call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...) jmp short $+2 loc_4C2EB: jmp short loc_4C347 mov rcx, rax mov eax, edx mov [rbp+var_D30], rcx mov [rbp+var_D34], eax jmp loc_4C405 mov rcx, rax mov eax, edx mov [rbp+var_D30], rcx mov [rbp+var_D34], eax lea rdi, [rbp+var_D28]; this call __ZNSoD1Ev; std::ostream::~ostream() jmp loc_4C405 loc_4C327: lea rdx, aRawLogErrorThe; "RAW_LOG ERROR: The Message was too long"... xor eax, eax lea rdi, [rbp+var_1908]; this lea rsi, [rbp+var_1910]; char ** call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...) jmp short $+2 loc_4C345: jmp short $+2 loc_4C347: mov rax, cs:stderr_ptr mov rdi, [rax] call _fileno mov [rbp+var_1A64], eax lea rax, [rbp+var_1900] mov [rbp+var_1A60], rax lea rdi, [rbp+var_1900] call _strlen mov esi, [rbp+var_1A64] mov rdx, [rbp+var_1A60] mov rcx, rax mov edi, 1 mov al, 0 call _syscall cmp [rbp+var_4], 3 jnz short loc_4C3E4 mov rax, [rbp+var_10] mov [rbp+var_1968], rax mov eax, [rbp+var_14] mov [rbp+var_1960], eax mov rax, [rbp+var_1918] mov [rbp+var_1958], rax mov rax, [rbp+var_1920] mov [rbp+var_1950], rax lea rdi, _ZN5nglogL7crashedE; this lea rsi, [rbp+var_1968] call _ZSt9call_onceIZN5nglog6RawLogENS0_11LogSeverityEPKciS3_zE3$_0JEEvRSt9once_flagOT_DpOT0_; std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>(std::once_flag &,nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0 &&) jmp short $+2 loc_4C3DD: call _ZN5nglog10LogMessage4FailEv; nglog::LogMessage::Fail(void) jmp short $+2 loc_4C3E4: lea rdi, [rbp+var_D28]; this call __ZNSoD1Ev; std::ostream::~ostream() lea rdi, [rbp+var_C18] call _ZN5nglog12_GLOBAL__N_115StaticStringBufILm3000EED2Ev; nglog::`anonymous namespace'::StaticStringBuf<3000ul>::~StaticStringBuf() loc_4C3FC: add rsp, 1A70h pop rbp retn loc_4C405: lea rdi, [rbp+var_C18] call _ZN5nglog12_GLOBAL__N_115StaticStringBufILm3000EED2Ev; nglog::`anonymous namespace'::StaticStringBuf<3000ul>::~StaticStringBuf() mov rdi, [rbp+var_D30] call __Unwind_Resume
long long nglog::RawLog(nglog *a1, nglog::tools *a2, int a3, unsigned long long *a4, ...) { long long result; // rax char *v5; // rsi __va_list_tag *v6; // r8 const char *v7; // rcx long long v8; // rax unsigned int v9; // [rsp+Ch] [rbp-1A64h] unsigned int v10; // [rsp+1Ch] [rbp-1A54h] char *v11; // [rsp+20h] [rbp-1A50h] long long v12; // [rsp+28h] [rbp-1A48h] long long v13; // [rsp+38h] [rbp-1A38h] nglog::tools *v14; // [rsp+108h] [rbp-1968h] BYREF int v15; // [rsp+110h] [rbp-1960h] _BYTE *v16; // [rsp+118h] [rbp-1958h] char *v17; // [rsp+120h] [rbp-1950h] va_list va; // [rsp+130h] [rbp-1940h] BYREF char *v20; // [rsp+150h] [rbp-1920h] _BYTE *v21; // [rsp+158h] [rbp-1918h] char *v22; // [rsp+160h] [rbp-1910h] BYREF _BYTE *v23; // [rsp+168h] [rbp-1908h] BYREF _BYTE v24[3008]; // [rsp+170h] [rbp-1900h] BYREF char *id; // [rsp+D30h] [rbp-D40h] unsigned int v26; // [rsp+D38h] [rbp-D38h] _BYTE v27[272]; // [rsp+D48h] [rbp-D28h] BYREF _BYTE v28[3064]; // [rsp+E58h] [rbp-C18h] BYREF unsigned long long *v29; // [rsp+1A50h] [rbp-20h] int v30; // [rsp+1A5Ch] [rbp-14h] nglog::tools *v31; // [rsp+1A60h] [rbp-10h] int v32; // [rsp+1A6Ch] [rbp-4h] v32 = (int)a1; v31 = a2; v30 = a3; v29 = a4; if ( (fLB::FLAGS_logtostdout & 1) != 0 || (fLB::FLAGS_logtostderr & 1) != 0 || v32 >= fLI::FLAGS_stderrthreshold || (fLB::FLAGS_alsologtostderr & 1) != 0 || (result = nglog::IsLoggingInitialized(a1), (result & 1) == 0) ) { nglog::`anonymous namespace'::StaticStringBuf<3000ul>::StaticStringBuf(); std::ostream::ostream(v27, v28); v26 = std::setw(5u); v13 = std::operator<<<char,std::char_traits<char>>(v27, v26); id = (char *)std::this_thread::get_id((std::this_thread *)v27); v5 = id; std::operator<<<char,std::char_traits<char>>(v13, (long long)id); v23 = v24; v22 = (_BYTE *)(&stru_BA8 + 16); v10 = *nglog::GetLogSeverityName(v32); v11 = (char *)nglog::`anonymous namespace'::StaticStringBuf<3000ul>::data(v28); v12 = nglog::tools::const_basename(v31, v5); nglog::DoRawLog( (nglog *)&v23, &v22, (unsigned long long *)"%c00000000 00:00:00.000000 %s %s:%d] RAW: ", (const char *)v10, v11, v12, v30); v21 = v23; v20 = v22; va_start(va, a4); if ( nglog::VADoRawLog((nglog *)&v23, &v22, v29, (const char *)va, v6) & 1 ) nglog::DoRawLog((nglog *)&v23, &v22, (unsigned long long *)"\n", v7); else nglog::DoRawLog((nglog *)&v23, &v22, (unsigned long long *)"RAW_LOG ERROR: The Message was too long!\n", v7); v9 = fileno(stderr); v8 = strlen(v24); syscall(1LL, v9, v24, v8); if ( v32 == 3 ) { v14 = v31; v15 = v30; v16 = v21; v17 = v20; std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>(&nglog::crashed, &v14); nglog::LogMessage::Fail((nglog::LogMessage *)&nglog::crashed); } std::ostream::~ostream((std::ostream *)v27); return nglog::`anonymous namespace'::StaticStringBuf<3000ul>::~StaticStringBuf(v28); } return result; }
RawLog: PUSH RBP MOV RBP,RSP SUB RSP,0x1a70 TEST AL,AL JZ 0x0014c0c7 MOVAPS xmmword ptr [RBP + -0x19f0],XMM0 MOVAPS xmmword ptr [RBP + -0x19e0],XMM1 MOVAPS xmmword ptr [RBP + -0x19d0],XMM2 MOVAPS xmmword ptr [RBP + -0x19c0],XMM3 MOVAPS xmmword ptr [RBP + -0x19b0],XMM4 MOVAPS xmmword ptr [RBP + -0x19a0],XMM5 MOVAPS xmmword ptr [RBP + -0x1990],XMM6 MOVAPS xmmword ptr [RBP + -0x1980],XMM7 LAB_0014c0c7: MOV qword ptr [RBP + -0x19f8],R9 MOV qword ptr [RBP + -0x1a00],R8 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV dword ptr [RBP + -0x14],EDX MOV qword ptr [RBP + -0x20],RCX LEA RAX,[0x177c9a] TEST byte ptr [RAX],0x1 JNZ 0x0014c125 LEA RAX,[0x177c92] TEST byte ptr [RAX],0x1 JNZ 0x0014c125 MOV EAX,dword ptr [RBP + -0x4] LEA RCX,[0x177ca0] CMP EAX,dword ptr [RCX] JGE 0x0014c125 LEA RAX,[0x177c94] TEST byte ptr [RAX],0x1 JNZ 0x0014c125 CALL 0x0014f6f0 TEST AL,0x1 JNZ 0x0014c120 JMP 0x0014c125 LAB_0014c120: JMP 0x0014c3fc LAB_0014c125: LEA RDI,[RBP + -0xc18] MOV qword ptr [RBP + -0x1a28],RDI CALL 0x0014c420 MOV RSI,qword ptr [RBP + -0x1a28] LAB_0014c13f: LEA RDI,[RBP + -0xd28] CALL 0x00109280 JMP 0x0014c14d LAB_0014c14d: MOV EDI,0x5 CALL 0x0011d720 MOV dword ptr [RBP + -0x1a2c],EAX JMP 0x0014c15f LAB_0014c15f: MOV EAX,dword ptr [RBP + -0x1a2c] MOV dword ptr [RBP + -0xd38],EAX MOV ESI,dword ptr [RBP + -0xd38] LEA RDI,[RBP + -0xd28] CALL 0x00109870 MOV qword ptr [RBP + -0x1a38],RAX JMP 0x0014c186 LAB_0014c186: CALL 0x0011d6f0 MOV RDI,qword ptr [RBP + -0x1a38] MOV qword ptr [RBP + -0xd40],RAX MOV RSI,qword ptr [RBP + -0xd40] CALL 0x0011d760 JMP 0x0014c1a7 LAB_0014c1a7: LEA RAX,[RBP + -0x1900] MOV qword ptr [RBP + -0x1908],RAX MOV qword ptr [RBP + -0x1910],0xbb8 MOV EDI,dword ptr [RBP + -0x4] CALL 0x001130f0 MOV qword ptr [RBP + -0x1a40],RAX JMP 0x0014c1d1 LAB_0014c1d1: MOV RAX,qword ptr [RBP + -0x1a40] MOVSX EAX,byte ptr [RAX] MOV dword ptr [RBP + -0x1a54],EAX LEA RDI,[RBP + -0xc18] CALL 0x0014c5e0 MOV qword ptr [RBP + -0x1a50],RAX MOV RDI,qword ptr [RBP + -0x10] CALL 0x0014f730 MOV qword ptr [RBP + -0x1a48],RAX JMP 0x0014c206 LAB_0014c206: MOV R9,qword ptr [RBP + -0x1a48] MOV R8,qword ptr [RBP + -0x1a50] MOV ECX,dword ptr [RBP + -0x1a54] MOV EDX,dword ptr [RBP + -0x14] MOV RAX,RSP MOV dword ptr [RAX],EDX LEA RDX,[0x152f4c] XOR EAX,EAX LEA RDI,[RBP + -0x1908] LEA RSI,[RBP + -0x1910] CALL 0x0014c4e0 JMP 0x0014c240 LAB_0014c240: MOV RAX,qword ptr [RBP + -0x1908] MOV qword ptr [RBP + -0x1918],RAX MOV RAX,qword ptr [RBP + -0x1910] MOV qword ptr [RBP + -0x1920],RAX LEA RAX,[RBP + -0x1a20] MOV qword ptr [RBP + -0x1930],RAX LEA RAX,[RBP + 0x10] MOV qword ptr [RBP + -0x1938],RAX MOV dword ptr [RBP + -0x193c],0x30 MOV dword ptr [RBP + -0x1940],0x20 MOV RDX,qword ptr [RBP + -0x20] LEA RDI,[RBP + -0x1908] LEA RSI,[RBP + -0x1910] LEA RCX,[RBP + -0x1940] CALL 0x0014c690 MOV byte ptr [RBP + -0x1a55],AL JMP 0x0014c2af LAB_0014c2af: MOV AL,byte ptr [RBP + -0x1a55] AND AL,0x1 MOV byte ptr [RBP + -0x1941],AL LEA RAX,[RBP + -0x1940] TEST byte ptr [RBP + -0x1941],0x1 JZ 0x0014c327 LEA RDX,[0x151f16] XOR EAX,EAX LEA RDI,[RBP + -0x1908] LEA RSI,[RBP + -0x1910] CALL 0x0014c4e0 JMP 0x0014c2eb LAB_0014c2eb: JMP 0x0014c347 LAB_0014c327: LEA RDX,[0x152f77] XOR EAX,EAX LEA RDI,[RBP + -0x1908] LEA RSI,[RBP + -0x1910] CALL 0x0014c4e0 JMP 0x0014c345 LAB_0014c345: JMP 0x0014c347 LAB_0014c347: MOV RAX,qword ptr [0x00176fb0] MOV RDI,qword ptr [RAX] CALL 0x00109770 MOV dword ptr [RBP + -0x1a64],EAX LEA RAX,[RBP + -0x1900] MOV qword ptr [RBP + -0x1a60],RAX LEA RDI,[RBP + -0x1900] CALL 0x001092e0 MOV ESI,dword ptr [RBP + -0x1a64] MOV RDX,qword ptr [RBP + -0x1a60] MOV RCX,RAX MOV EDI,0x1 MOV AL,0x0 CALL 0x001090b0 CMP dword ptr [RBP + -0x4],0x3 JNZ 0x0014c3e4 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x1968],RAX MOV EAX,dword ptr [RBP + -0x14] MOV dword ptr [RBP + -0x1960],EAX MOV RAX,qword ptr [RBP + -0x1918] MOV qword ptr [RBP + -0x1958],RAX MOV RAX,qword ptr [RBP + -0x1920] MOV qword ptr [RBP + -0x1950],RAX LEA RDI,[0x187140] LEA RSI,[RBP + -0x1968] CALL 0x0014c720 JMP 0x0014c3dd LAB_0014c3dd: CALL 0x001153b0 LAB_0014c3e2: JMP 0x0014c3e4 LAB_0014c3e4: LEA RDI,[RBP + -0xd28] CALL 0x00109c20 LEA RDI,[RBP + -0xc18] CALL 0x0014c7a0 LAB_0014c3fc: ADD RSP,0x1a70 POP RBP RET
/* nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...) */ void nglog::RawLog(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int param_9,char *param_10,int4 param_11,char *param_12,int8 param_13, int8 param_14,...) { char cVar1; char in_AL; uint uVar2; ulong uVar3; ostream *poVar4; char *pcVar5; int8 uVar6; int8 uVar7; size_t sVar8; int1 local_1a28 [32]; int8 local_1a08; int8 local_1a00; int8 local_19f8; int8 local_19e8; int8 local_19d8; int8 local_19c8; int8 local_19b8; int8 local_19a8; int8 local_1998; int8 local_1988; char *local_1970; int4 local_1968; char *local_1960; ulong local_1958; byte local_1949; int4 local_1948; int4 local_1944; int1 *local_1940; int1 *local_1938; ulong local_1928; char *local_1920; ulong local_1918; char *local_1910; char local_1908 [3008]; int8 local_d48; int4 local_d40; ostream local_d30 [272]; StaticStringBuf<3000ul> local_c20 [3064]; char *local_28; int4 local_1c; char *local_18; int local_c; if (in_AL != '\0') { local_19f8 = param_1; local_19e8 = param_2; local_19d8 = param_3; local_19c8 = param_4; local_19b8 = param_5; local_19a8 = param_6; local_1998 = param_7; local_1988 = param_8; } local_1a08 = param_13; local_1a00 = param_14; local_28 = param_12; local_1c = param_11; local_18 = param_10; local_c = param_9; if (((((fLB::FLAGS_logtostdout & 1) != 0) || ((fLB::FLAGS_logtostderr & 1) != 0)) || (fLI::FLAGS_stderrthreshold <= param_9)) || (((fLB::FLAGS_alsologtostderr & 1) != 0 || (uVar3 = IsLoggingInitialized(), (uVar3 & 1) == 0))) ) { (anonymous_namespace)::StaticStringBuf<3000ul>::StaticStringBuf(local_c20); /* try { // try from 0014c13f to 0014c14a has its CatchHandler @ 0014c2ed */ std::ostream::ostream(local_d30,(streambuf *)local_c20); /* try { // try from 0014c14d to 0014c3e1 has its CatchHandler @ 0014c304 */ local_d40 = std::setw(5); poVar4 = std::operator<<(local_d30,local_d40); local_d48 = std::this_thread::get_id(); std::operator<<(poVar4,local_d48); local_1910 = local_1908; local_1918 = 3000; pcVar5 = (char *)GetLogSeverityName(local_c); cVar1 = *pcVar5; uVar6 = (anonymous_namespace)::StaticStringBuf<3000ul>::data(local_c20); uVar7 = tools::const_basename(local_18); DoRawLog(&local_1910,&local_1918,"%c00000000 00:00:00.000000 %s %s:%d] RAW: ", (ulong)(uint)(int)cVar1,uVar6,uVar7,local_1c); local_1920 = local_1910; local_1928 = local_1918; local_1938 = local_1a28; local_1940 = &stack0x00000008; local_1944 = 0x30; local_1948 = 0x20; local_1949 = VADoRawLog(&local_1910,&local_1918,local_28,(__va_list_tag *)&local_1948); local_1949 = local_1949 & 1; if (local_1949 == 0) { DoRawLog(&local_1910,&local_1918,"RAW_LOG ERROR: The Message was too long!\n"); } else { DoRawLog(&local_1910,&local_1918,"\n"); } uVar2 = fileno(*(FILE **)PTR_stderr_00176fb0); sVar8 = strlen(local_1908); syscall(1,(ulong)uVar2,local_1908,sVar8); if (local_c == 3) { local_1970 = local_18; local_1968 = local_1c; local_1960 = local_1920; local_1958 = local_1928; std::call_once<nglog::RawLog(nglog::LogSeverity,char_const*,int,char_const*,___)::__0> ((once_flag *)&crashed,(__0 *)&local_1970); LogMessage::Fail(); } std::ostream::~ostream(local_d30); (anonymous_namespace)::StaticStringBuf<3000ul>::~StaticStringBuf(local_c20); } return; }
46,767
nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...)
ng-log[P]ng-log/src/raw_logging.cc
void RawLog(LogSeverity severity, const char* file, int line, const char* format, ...) { if (!(FLAGS_logtostdout || FLAGS_logtostderr || severity >= FLAGS_stderrthreshold || FLAGS_alsologtostderr || !IsLoggingInitialized())) { return; // this stderr log message is suppressed } // We do not have any any option other that string streams to obtain the // thread identifier as the corresponding value is not convertible to an // integer. Use a statically allocated buffer to avoid dynamic memory // allocations. StaticStringBuf<kLogBufSize> sbuf; std::ostream oss(&sbuf); oss << std::setw(5) << std::this_thread::get_id(); // can't call localtime_r here: it can allocate char buffer[kLogBufSize]; char* buf = buffer; size_t size = sizeof(buffer); // NOTE: this format should match the specification in base/logging.h DoRawLog(&buf, &size, "%c00000000 00:00:00.000000 %s %s:%d] RAW: ", GetLogSeverityName(severity)[0], sbuf.data(), const_basename(const_cast<char*>(file)), line); // Record the position and size of the buffer after the prefix const char* msg_start = buf; const size_t msg_size = size; va_list ap; va_start(ap, format); bool no_chop = VADoRawLog(&buf, &size, format, ap); va_end(ap); if (no_chop) { DoRawLog(&buf, &size, "\n"); } else { DoRawLog(&buf, &size, "RAW_LOG ERROR: The Message was too long!\n"); } // We make a raw syscall to write directly to the stderr file descriptor, // avoiding FILE buffering (to avoid invoking malloc()), and bypassing // libc (to side-step any libc interception). // We write just once to avoid races with other invocations of RawLog. safe_write(fileno(stderr), buffer, strlen(buffer)); if (severity == NGLOG_FATAL) { std::call_once(crashed, [file, line, msg_start, msg_size] { crash_reason.filename = file; crash_reason.line_number = line; memcpy(crash_buf, msg_start, msg_size); // Don't include prefix crash_reason.message = crash_buf; #ifdef HAVE_STACKTRACE crash_reason.depth = GetStackTrace(crash_reason.stack, ARRAYSIZE(crash_reason.stack), 1); #else crash_reason.depth = 0; #endif SetCrashReason(&crash_reason); }); LogMessage::Fail(); // abort() } }
O2
cpp
nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x19e8, %rsp # imm = 0x19E8 movq %rcx, %r15 movl %edx, %ebx movq %rsi, %r14 movl %edi, %ebp testb %al, %al je 0x1cfef movaps %xmm0, 0xa0(%rsp) movaps %xmm1, 0xb0(%rsp) movaps %xmm2, 0xc0(%rsp) movaps %xmm3, 0xd0(%rsp) movaps %xmm4, 0xe0(%rsp) movaps %xmm5, 0xf0(%rsp) movaps %xmm6, 0x100(%rsp) movaps %xmm7, 0x110(%rsp) movq %r8, 0x90(%rsp) movq %r9, 0x98(%rsp) leaq 0x14ae4(%rip), %rax # 0x31aea cmpb $0x0, (%rax) je 0x1d1fa leaq 0x238(%rsp), %r13 movq %r13, %rdi callq 0x8120 leaq 0x13bf2(%rip), %rax # 0x30c18 movq %rax, (%r13) leaq 0x278(%rsp), %r12 leaq 0xe30(%rsp), %rax movq %r12, -0x18(%r12) movq %r12, -0x20(%r12) movq %rax, -0x10(%r12) movq %r12, -0x38(%r12) movq %r12, -0x30(%r12) movq %rax, -0x28(%r12) leaq 0x128(%rsp), %rdi movq %r13, %rsi callq 0x81f0 leaq 0x128(%rsp), %r13 movq (%r13), %rax movq -0x18(%rax), %rax movq $0x5, 0x138(%rsp,%rax) callq 0x84e0 movq %r13, %rdi movq %rax, %rsi callq 0xffa2 leaq 0xe30(%rsp), %rax movq %rax, 0x10(%rsp) movq $0xbb8, 0x8(%rsp) # imm = 0xBB8 movl %ebp, %edi callq 0xb250 movsbl (%rax), %r13d movq 0x260(%rsp), %rax cmpq 0x258(%rsp), %rax je 0x1d0e6 cmpq 0x268(%rsp), %rax je 0x1d0e6 cmpb $0x0, -0x1(%rax) je 0x1d0e6 leaq 0x238(%rsp), %rdi xorl %esi, %esi callq 0x8210 movq %r14, %rdi callq 0x1e96d movq %r14, 0x20(%rsp) movl %ebx, 0x1c(%rsp) movl %ebx, (%rsp) leaq 0x4d7b(%rip), %rdx # 0x21e7c leaq 0x10(%rsp), %rbx leaq 0x8(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi movl %r13d, %ecx movq %r12, %r8 movq %rax, %r9 xorl %eax, %eax callq 0x1d2fd movq (%rbx), %r12 movq (%r14), %r13 leaq 0x70(%rsp), %rax leaq 0x30(%rsp), %rcx movq %rax, 0x10(%rcx) leaq 0x1a20(%rsp), %rax movq %rax, 0x8(%rcx) movabsq $0x3000000020, %rax # imm = 0x3000000020 movq %rax, (%rcx) movq %r12, %rdi movq %r13, %rsi movq %r15, %rdx callq 0x8370 leaq 0x4d44(%rip), %rdx # 0x21ea7 testl %eax, %eax js 0x1d185 movl %eax, %eax movq %r13, %rcx subq %rax, %rcx jb 0x1d185 movq %rcx, 0x8(%rsp) addq %r12, %rax movq %rax, 0x10(%rsp) leaq 0x3cc5(%rip), %rdx # 0x20e4a leaq 0x10(%rsp), %rdi leaq 0x8(%rsp), %rsi xorl %eax, %eax callq 0x1d2fd movq 0x13df3(%rip), %rax # 0x30f90 movq (%rax), %rdi callq 0x85f0 movl %eax, %ebx leaq 0xe30(%rsp), %r14 movq %r14, %rdi callq 0x8230 pushq $0x1 popq %rdi movl %ebx, %esi movq %r14, %rdx movq %rax, %rcx xorl %eax, %eax callq 0x8080 cmpl $0x3, %ebp je 0x1d238 leaq 0x130(%rsp), %rdi callq 0x8190 leaq 0x238(%rsp), %rdi callq 0x8b40 addq $0x19e8, %rsp # imm = 0x19E8 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x148e1(%rip), %rax # 0x31ae2 cmpb $0x0, (%rax) jne 0x1d00f leaq 0x148df(%rip), %rax # 0x31af0 cmpl %ebp, (%rax) jle 0x1d00f leaq 0x148c4(%rip), %rax # 0x31ae4 cmpb $0x0, (%rax) jne 0x1d00f callq 0x1e960 testb %al, %al je 0x1d00f jmp 0x1d1e8 leaq 0x50(%rsp), %rax movq 0x20(%rsp), %rcx movq %rcx, (%rax) movl 0x1c(%rsp), %ecx movl %ecx, 0x8(%rax) movq %r12, 0x10(%rax) movq %r13, 0x18(%rax) leaq 0x28(%rsp), %r14 movq %rax, (%r14) movq %fs:0x0, %rax addq 0x13cf4(%rip), %rax # 0x30f60 movq %rax, %rbx movq %r14, (%rax) movq %fs:0x0, %rax addq 0x13cf6(%rip), %rax # 0x30f78 movq %rax, %r14 leaq 0x130(%rip), %rax # 0x1d3bc movq %rax, (%r14) leaq 0x23d0a(%rip), %rdi # 0x40fa0 movq 0x13d13(%rip), %rsi # 0x30fb0 callq 0x8550 testl %eax, %eax jne 0x1d2b3 andq $0x0, (%rbx) andq $0x0, (%r14) callq 0xc320 movl %eax, %edi callq 0x83c0 jmp 0x1d2d8 movq %rax, %rdi callq 0xa24f andq $0x0, (%rbx) movq %rax, %rbx andq $0x0, (%r14) jmp 0x1d2db jmp 0x1d2d8 movq %rax, %rbx jmp 0x1d2e8 movq %rax, %rbx leaq 0x130(%rsp), %rdi callq 0x8190 leaq 0x238(%rsp), %rdi callq 0x8b40 movq %rbx, %rdi callq 0x8a40
_ZN5nglog6RawLogENS_11LogSeverityEPKciS2_z: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 19E8h mov r15, rcx mov ebx, edx mov r14, rsi mov ebp, edi test al, al jz short loc_1CFEF movaps [rsp+1A18h+var_1978], xmm0 movaps [rsp+1A18h+var_1968], xmm1 movaps [rsp+1A18h+var_1958], xmm2 movaps [rsp+1A18h+var_1948], xmm3 movaps [rsp+1A18h+var_1938], xmm4 movaps [rsp+1A18h+var_1928], xmm5 movaps [rsp+1A18h+var_1918], xmm6 movaps [rsp+1A18h+var_1908], xmm7 loc_1CFEF: mov [rsp+1A18h+var_1988], r8 mov [rsp+1A18h+var_1980], r9 lea rax, _ZN3fLB17FLAGS_logtostdoutE; fLB::FLAGS_logtostdout cmp byte ptr [rax], 0 jz loc_1D1FA loc_1D00F: lea r13, [rsp+1A18h+var_17E0] mov rdi, r13 call __ZNSt15basic_streambufIcSt11char_traitsIcEEC2Ev; std::streambuf::basic_streambuf(void) lea rax, off_30C18 mov [r13+0], rax lea r12, [rsp+1A18h+var_17A0] lea rax, [rsp+1A18h+var_BE8] mov [r12-18h], r12 mov [r12-20h], r12 mov [r12-10h], rax mov [r12-38h], r12 mov [r12-30h], r12 mov [r12-28h], rax lea rdi, [rsp+1A18h+var_18F0] mov rsi, r13 call __ZNSoC1EPSt15basic_streambufIcSt11char_traitsIcEE; std::ostream::ostream(std::streambuf *) lea r13, [rsp+1A18h+var_18F0] mov rax, [r13+0] mov rax, [rax-18h] mov [rsp+rax+1A18h+var_18E0], 5 call _pthread_self mov rdi, r13 mov rsi, rax call _ZStlsIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_NSt6thread2idE; std::operator<<<char,std::char_traits<char>>(std::ostream &,std::thread::id) lea rax, [rsp+1A18h+var_BE8] mov [rsp+1A18h+var_1A08], rax mov [rsp+1A18h+var_1A10], 0BB8h mov edi, ebp call _ZN5nglog18GetLogSeverityNameENS_11LogSeverityE; nglog::GetLogSeverityName(nglog::LogSeverity) movsx r13d, byte ptr [rax] mov rax, [rsp+1A18h+var_17B8] cmp rax, [rsp+1A18h+var_17C0] jz short loc_1D0E6 cmp rax, [rsp+1A18h+var_17B0] jz short loc_1D0E6 cmp byte ptr [rax-1], 0 jz short loc_1D0E6 lea rdi, [rsp+1A18h+var_17E0] xor esi, esi; char * call __ZNSt15basic_streambufIcSt11char_traitsIcEE5sputcEc; std::streambuf::sputc(char) loc_1D0E6: mov rdi, r14; this call _ZN5nglog5tools14const_basenameEPKc; nglog::tools::const_basename(char const*) mov [rsp+1A18h+var_19F8], r14 mov [rsp+1A18h+var_19FC], ebx mov [rsp+1A18h+var_1A18], ebx lea rdx, aC0000000000000; "%c00000000 00:00:00.000000 %s %s:%d] RA"... lea rbx, [rsp+1A18h+var_1A08] lea r14, [rsp+1A18h+var_1A10] mov rdi, rbx; this mov rsi, r14; char ** mov ecx, r13d; char * mov r8, r12 mov r9, rax xor eax, eax call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...) mov r12, [rbx] mov r13, [r14] lea rax, [rsp+1A18h+var_19A8] lea rcx, [rsp+1A18h+var_19E8] mov [rcx+10h], rax lea rax, [rsp+1A18h+arg_0] mov [rcx+8], rax mov rax, 3000000020h mov [rcx], rax mov rdi, r12 mov rsi, r13 mov rdx, r15 call _vsnprintf lea rdx, aRawLogErrorThe; "RAW_LOG ERROR: The Message was too long"... test eax, eax js short loc_1D185 mov eax, eax mov rcx, r13 sub rcx, rax; char * jb short loc_1D185 mov [rsp+1A18h+var_1A10], rcx add rax, r12 mov [rsp+1A18h+var_1A08], rax lea rdx, asc_20E49+1; unsigned __int64 * loc_1D185: lea rdi, [rsp+1A18h+var_1A08]; this lea rsi, [rsp+1A18h+var_1A10]; char ** xor eax, eax call _ZN5nglogL8DoRawLogEPPcPmPKcz; nglog::DoRawLog(char **,ulong *,char const*,...) mov rax, cs:stderr_ptr mov rdi, [rax] call _fileno mov ebx, eax lea r14, [rsp+1A18h+var_BE8] mov rdi, r14 call _strlen push 1 pop rdi mov esi, ebx mov rdx, r14 mov rcx, rax xor eax, eax call _syscall cmp ebp, 3 jz short loc_1D238 lea rdi, [rsp+1A18h+var_18E8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() lea rdi, [rsp+1A18h+var_17E0]; this call __ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev; std::streambuf::~streambuf() loc_1D1E8: add rsp, 19E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1D1FA: lea rax, _ZN3fLB17FLAGS_logtostderrE; fLB::FLAGS_logtostderr cmp byte ptr [rax], 0 jnz loc_1D00F lea rax, _ZN3fLI21FLAGS_stderrthresholdE; fLI::FLAGS_stderrthreshold cmp [rax], ebp jle loc_1D00F lea rax, _ZN3fLB21FLAGS_alsologtostderrE; fLB::FLAGS_alsologtostderr cmp byte ptr [rax], 0 jnz loc_1D00F call _ZN5nglog20IsLoggingInitializedEv; nglog::IsLoggingInitialized(void) test al, al jz loc_1D00F jmp short loc_1D1E8 loc_1D238: lea rax, [rsp+1A18h+var_19C8] mov rcx, [rsp+1A18h+var_19F8] mov [rax], rcx mov ecx, [rsp+1A18h+var_19FC] mov [rax+8], ecx mov [rax+10h], r12 mov [rax+18h], r13 lea r14, [rsp+1A18h+var_19F0] mov [r14], rax mov rax, fs:0 add rax, cs:off_30F60 mov rbx, rax mov [rax], r14 mov rax, fs:0 add rax, cs:off_30F78 mov r14, rax lea rax, _ZZNSt9once_flag18_Prepare_executionC1IZSt9call_onceIZN5nglog6RawLogENS3_11LogSeverityEPKciS6_zE3$_0JEEvRS_OT_DpOT0_EUlvE_EERS9_ENUlvE_8__invokeEv; std::once_flag::_Prepare_execution::_Prepare_execution<std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>(std::once_flag&,nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0 &&)::{lambda(void)#1}>(nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0&)::{lambda(void)#1}::__invoke(void) mov [r14], rax lea rdi, _ZN5nglogL7crashedE; this mov rsi, cs:__once_proxy_ptr call _pthread_once test eax, eax jnz short loc_1D2B3 and qword ptr [rbx], 0 and qword ptr [r14], 0 call _ZN5nglog10LogMessage4FailEv; nglog::LogMessage::Fail(void) loc_1D2B3: mov edi, eax; int call __ZSt20__throw_system_errori; std::__throw_system_error(int) jmp short loc_1D2D8 mov rdi, rax call __clang_call_terminate and qword ptr [rbx], 0 mov rbx, rax and qword ptr [r14], 0 jmp short loc_1D2DB jmp short loc_1D2D8 mov rbx, rax jmp short loc_1D2E8 loc_1D2D8: mov rbx, rax loc_1D2DB: lea rdi, [rsp+1A18h+var_18E8]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() loc_1D2E8: lea rdi, [rsp+1A18h+var_17E0] call __ZNSt15basic_streambufIcSt11char_traitsIcEED2Ev; std::streambuf::~streambuf() mov rdi, rbx call __Unwind_Resume
long long nglog::RawLog(nglog *a1, nglog::tools *a2, int a3, const char *a4, ...) { const char *v7; // rsi unsigned int v8; // r13d long long v9; // rax _BYTE *v10; // r12 char *v11; // r13 unsigned int v12; // eax const char *v13; // rcx char *v14; // rdx unsigned int v15; // ebx long long v16; // rax long long result; // rax nglog::tools ****v18; // rbx _QWORD *v19; // r14 int v20; // eax char *v21; // [rsp+8h] [rbp-1A10h] BYREF _BYTE *v22; // [rsp+10h] [rbp-1A08h] BYREF int v23; // [rsp+1Ch] [rbp-19FCh] nglog::tools *v24; // [rsp+20h] [rbp-19F8h] nglog::tools **v25; // [rsp+28h] [rbp-19F0h] BYREF va_list va; // [rsp+30h] [rbp-19E8h] BYREF nglog::tools *v27; // [rsp+50h] [rbp-19C8h] BYREF int v28; // [rsp+58h] [rbp-19C0h] _BYTE *v29; // [rsp+60h] [rbp-19B8h] char *v30; // [rsp+68h] [rbp-19B0h] long long v31; // [rsp+128h] [rbp-18F0h] BYREF _BYTE v32[264]; // [rsp+130h] [rbp-18E8h] BYREF _QWORD v33[4]; // [rsp+238h] [rbp-17E0h] BYREF _BYTE *v34; // [rsp+258h] [rbp-17C0h] _BYTE *v35; // [rsp+260h] [rbp-17B8h] _BYTE *v36; // [rsp+268h] [rbp-17B0h] _BYTE v37[3000]; // [rsp+278h] [rbp-17A0h] BYREF _BYTE v38[3048]; // [rsp+E30h] [rbp-BE8h] BYREF if ( fLB::FLAGS_logtostdout || fLB::FLAGS_logtostderr || fLI::FLAGS_stderrthreshold <= (int)a1 || fLB::FLAGS_alsologtostderr || (result = nglog::IsLoggingInitialized(a1), !(_BYTE)result) ) { std::streambuf::basic_streambuf(v33); v33[0] = &off_30C18; v35 = v37; v34 = v37; v36 = v38; v33[1] = v37; v33[2] = v37; v33[3] = v38; std::ostream::ostream(&v31, v33); *(_QWORD *)&v32[*(_QWORD *)(v31 - 24) + 8] = 5LL; v7 = (const char *)pthread_self(); std::operator<<<char,std::char_traits<char>>((long long)&v31, (long long)v7); v22 = v38; v21 = (_BYTE *)(&stru_BA8 + 16); v8 = *nglog::GetLogSeverityName((int)a1); if ( v35 != v34 && v35 != v36 && *(v35 - 1) ) { v7 = 0LL; std::streambuf::sputc(v33, 0LL); } v9 = nglog::tools::const_basename(a2, v7); v24 = a2; v23 = a3; nglog::DoRawLog( (nglog *)&v22, &v21, (unsigned long long *)"%c00000000 00:00:00.000000 %s %s:%d] RAW: ", (const char *)v8, v37, v9, a3); v10 = v22; v11 = v21; va_start(va, a4); v12 = vsnprintf(v22, v21, a4, va); v14 = "RAW_LOG ERROR: The Message was too long!\n"; if ( (v12 & 0x80000000) == 0 ) { v13 = &v11[-v12]; if ( (unsigned long long)v11 >= v12 ) { v21 = &v11[-v12]; v22 = &v10[v12]; v14 = "\n"; } } nglog::DoRawLog((nglog *)&v22, &v21, (unsigned long long *)v14, v13); v15 = fileno(stderr); v16 = strlen(v38); syscall(1LL, v15, v38, v16); if ( (_DWORD)a1 == 3 ) { v27 = v24; v28 = v23; v29 = v10; v30 = v11; v25 = &v27; v18 = (nglog::tools ****)((char *)&std::__once_callable + __readfsqword(0)); *v18 = &v25; v19 = (_QWORD *)((char *)&std::__once_call + __readfsqword(0)); *v19 = std::once_flag::_Prepare_execution::_Prepare_execution<void std::call_once<nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0>(std::once_flag&,nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0 &&)::{lambda(void)#1}>(nglog::RawLog(nglog::LogSeverity,char const*,int,char const*,...)::$_0&)::{lambda(void)#1}::__invoke; v20 = pthread_once(&nglog::crashed, &_once_proxy); if ( !v20 ) { *v18 = 0LL; *v19 = 0LL; nglog::LogMessage::Fail((nglog::LogMessage *)&nglog::crashed); } std::__throw_system_error(v20); } std::ios_base::~ios_base((std::ios_base *)v32); return std::streambuf::~streambuf(v33); } return result; }
RawLog: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x19e8 MOV R15,RCX MOV EBX,EDX MOV R14,RSI MOV EBP,EDI TEST AL,AL JZ 0x0011cfef MOVAPS xmmword ptr [RSP + 0xa0],XMM0 MOVAPS xmmword ptr [RSP + 0xb0],XMM1 MOVAPS xmmword ptr [RSP + 0xc0],XMM2 MOVAPS xmmword ptr [RSP + 0xd0],XMM3 MOVAPS xmmword ptr [RSP + 0xe0],XMM4 MOVAPS xmmword ptr [RSP + 0xf0],XMM5 MOVAPS xmmword ptr [RSP + 0x100],XMM6 MOVAPS xmmword ptr [RSP + 0x110],XMM7 LAB_0011cfef: MOV qword ptr [RSP + 0x90],R8 MOV qword ptr [RSP + 0x98],R9 LEA RAX,[0x131aea] CMP byte ptr [RAX],0x0 JZ 0x0011d1fa LAB_0011d00f: LEA R13,[RSP + 0x238] MOV RDI,R13 CALL 0x00108120 LEA RAX,[0x130c18] MOV qword ptr [R13],RAX LEA R12,[RSP + 0x278] LEA RAX,[RSP + 0xe30] MOV qword ptr [R12 + -0x18],R12 MOV qword ptr [R12 + -0x20],R12 MOV qword ptr [R12 + -0x10],RAX MOV qword ptr [R12 + -0x38],R12 MOV qword ptr [R12 + -0x30],R12 MOV qword ptr [R12 + -0x28],RAX LAB_0011d058: LEA RDI,[RSP + 0x128] MOV RSI,R13 CALL 0x001081f0 LEA R13,[RSP + 0x128] MOV RAX,qword ptr [R13] MOV RAX,qword ptr [RAX + -0x18] MOV qword ptr [RSP + RAX*0x1 + 0x138],0x5 CALL 0x001084e0 LAB_0011d089: MOV RDI,R13 MOV RSI,RAX CALL 0x0010ffa2 LEA RAX,[RSP + 0xe30] MOV qword ptr [RSP + 0x10],RAX MOV qword ptr [RSP + 0x8],0xbb8 LAB_0011d0aa: MOV EDI,EBP CALL 0x0010b250 MOVSX R13D,byte ptr [RAX] MOV RAX,qword ptr [RSP + 0x260] CMP RAX,qword ptr [RSP + 0x258] JZ 0x0011d0e6 CMP RAX,qword ptr [RSP + 0x268] JZ 0x0011d0e6 CMP byte ptr [RAX + -0x1],0x0 JZ 0x0011d0e6 LAB_0011d0d7: LEA RDI,[RSP + 0x238] XOR ESI,ESI CALL 0x00108210 LAB_0011d0e6: MOV RDI,R14 CALL 0x0011e96d LAB_0011d0ee: MOV qword ptr [RSP + 0x20],R14 MOV dword ptr [RSP + 0x1c],EBX MOV dword ptr [RSP],EBX LEA RDX,[0x121e7c] LEA RBX,[RSP + 0x10] LEA R14,[RSP + 0x8] MOV RDI,RBX MOV RSI,R14 MOV ECX,R13D MOV R8,R12 MOV R9,RAX XOR EAX,EAX CALL 0x0011d2fd MOV R12,qword ptr [RBX] MOV R13,qword ptr [R14] LEA RAX,[RSP + 0x70] LEA RCX,[RSP + 0x30] MOV qword ptr [RCX + 0x10],RAX LEA RAX,[RSP + 0x1a20] MOV qword ptr [RCX + 0x8],RAX MOV RAX,0x3000000020 MOV qword ptr [RCX],RAX MOV RDI,R12 MOV RSI,R13 MOV RDX,R15 CALL 0x00108370 LEA RDX,[0x121ea7] TEST EAX,EAX JS 0x0011d185 MOV EAX,EAX MOV RCX,R13 SUB RCX,RAX JC 0x0011d185 MOV qword ptr [RSP + 0x8],RCX ADD RAX,R12 MOV qword ptr [RSP + 0x10],RAX LEA RDX,[0x120e4a] LAB_0011d185: LEA RDI,[RSP + 0x10] LEA RSI,[RSP + 0x8] XOR EAX,EAX CALL 0x0011d2fd MOV RAX,qword ptr [0x00130f90] MOV RDI,qword ptr [RAX] CALL 0x001085f0 MOV EBX,EAX LEA R14,[RSP + 0xe30] MOV RDI,R14 CALL 0x00108230 PUSH 0x1 POP RDI MOV ESI,EBX MOV RDX,R14 MOV RCX,RAX XOR EAX,EAX CALL 0x00108080 CMP EBP,0x3 JZ 0x0011d238 LEA RDI,[RSP + 0x130] CALL 0x00108190 LEA RDI,[RSP + 0x238] CALL 0x00108b40 LAB_0011d1e8: ADD RSP,0x19e8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011d1fa: LEA RAX,[0x131ae2] CMP byte ptr [RAX],0x0 JNZ 0x0011d00f LEA RAX,[0x131af0] CMP dword ptr [RAX],EBP JLE 0x0011d00f LEA RAX,[0x131ae4] CMP byte ptr [RAX],0x0 JNZ 0x0011d00f CALL 0x0011e960 TEST AL,AL JZ 0x0011d00f JMP 0x0011d1e8 LAB_0011d238: LEA RAX,[RSP + 0x50] MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX],RCX MOV ECX,dword ptr [RSP + 0x1c] MOV dword ptr [RAX + 0x8],ECX MOV qword ptr [RAX + 0x10],R12 MOV qword ptr [RAX + 0x18],R13 LEA R14,[RSP + 0x28] MOV qword ptr [R14],RAX MOV RAX,qword ptr FS:[0x0] ADD RAX,qword ptr [0x00130f60] MOV RBX,RAX MOV qword ptr [RAX],R14 MOV RAX,qword ptr FS:[0x0] ADD RAX,qword ptr [0x00130f78] MOV R14,RAX LEA RAX,[0x11d3bc] MOV qword ptr [R14],RAX LAB_0011d28f: LEA RDI,[0x140fa0] MOV RSI,qword ptr [0x00130fb0] CALL 0x00108550 TEST EAX,EAX JNZ 0x0011d2b3 AND qword ptr [RBX],0x0 AND qword ptr [R14],0x0 LAB_0011d2ae: CALL 0x0010c320 LAB_0011d2b3: MOV EDI,EAX CALL 0x001083c0
/* nglog::RawLog(nglog::LogSeverity, char const*, int, char const*, ...) */ void nglog::RawLog(int8 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int param_9,char *param_10,int4 param_11,char *param_12,int8 param_13, int8 param_14,...) { ulong uVar1; char in_AL; char cVar2; uint uVar3; int iVar4; pthread_t pVar5; char *pcVar6; int8 uVar7; ulong uVar8; size_t sVar9; long *plVar10; int8 *puVar11; char *pcVar12; long *in_FS_OFFSET; ulong local_1a10; char *local_1a08; int4 local_19fc; char *local_19f8; char **local_19f0; int8 local_19e8; int1 *local_19e0; int1 *local_19d8; char *local_19c8; int4 local_19c0; char *local_19b8; ulong local_19b0; int1 local_19a8 [32]; int8 local_1988; int8 local_1980; int8 local_1978; int8 local_1968; int8 local_1958; int8 local_1948; int8 local_1938; int8 local_1928; int8 local_1918; int8 local_1908; long local_18f0; ios_base local_18e8 [8]; int8 auStack_18e0 [32]; int **local_17e0; char *local_17d8; char *local_17d0; char *local_17c8; char *local_17c0; char *local_17b8; char *local_17b0; char local_17a0 [3000]; char local_be8 [3000]; if (in_AL != '\0') { local_1978 = param_1; local_1968 = param_2; local_1958 = param_3; local_1948 = param_4; local_1938 = param_5; local_1928 = param_6; local_1918 = param_7; local_1908 = param_8; } local_1988 = param_13; local_1980 = param_14; if ((((fLB::FLAGS_logtostdout != '\0') || (fLB::FLAGS_logtostderr != '\0')) || (fLI::FLAGS_stderrthreshold <= param_9)) || ((fLB::FLAGS_alsologtostderr != '\0' || (cVar2 = IsLoggingInitialized(), cVar2 == '\0')))) { std::streambuf::streambuf((streambuf *)&local_17e0); local_17e0 = &PTR__streambuf_00130c18; local_17c8 = local_be8; /* try { // try from 0011d058 to 0011d067 has its CatchHandler @ 0011d2d3 */ local_17d8 = local_17a0; local_17d0 = local_17a0; local_17c0 = local_17a0; local_17b8 = local_17a0; local_17b0 = local_17c8; std::ostream::ostream((ostream *)&local_18f0,(streambuf *)&local_17e0); *(int8 *)((long)auStack_18e0 + *(long *)(local_18f0 + -0x18)) = 5; pVar5 = pthread_self(); /* try { // try from 0011d089 to 0011d093 has its CatchHandler @ 0011d2d1 */ std::operator<<(&local_18f0,pVar5); local_1a08 = local_be8; local_1a10 = 3000; /* try { // try from 0011d0aa to 0011d0b0 has its CatchHandler @ 0011d2d8 */ pcVar6 = (char *)GetLogSeverityName(param_9); cVar2 = *pcVar6; if ((local_17b8 != local_17c0) && ((local_17b8 != local_17b0 && (local_17b8[-1] != '\0')))) { /* try { // try from 0011d0d7 to 0011d0e5 has its CatchHandler @ 0011d2bc */ std::streambuf::sputc((char)&local_17e0); } /* try { // try from 0011d0e6 to 0011d0ed has its CatchHandler @ 0011d2d8 */ uVar7 = tools::const_basename(param_10); local_19fc = param_11; local_19f8 = param_10; DoRawLog(&local_1a08,&local_1a10,"%c00000000 00:00:00.000000 %s %s:%d] RAW: ", (ulong)(uint)(int)cVar2,local_17a0,uVar7,param_11); pcVar6 = local_1a08; uVar1 = local_1a10; local_19d8 = local_19a8; local_19e0 = &stack0x00000008; local_19e8 = 0x3000000020; uVar3 = vsnprintf(local_1a08,local_1a10,param_12,&local_19e8); pcVar12 = "RAW_LOG ERROR: The Message was too long!\n"; if (-1 < (int)uVar3) { uVar8 = (ulong)uVar3; if (uVar8 <= uVar1) { local_1a08 = pcVar6 + uVar8; pcVar12 = "\n"; local_1a10 = uVar1 - uVar8; } } DoRawLog(&local_1a08,&local_1a10,pcVar12); uVar3 = fileno(*(FILE **)PTR_stderr_00130f90); sVar9 = strlen(local_be8); syscall(1,(ulong)uVar3,local_be8,sVar9); if (param_9 == 3) { local_19f0 = &local_19c8; local_19c8 = local_19f8; local_19c0 = local_19fc; local_19b8 = pcVar6; local_19b0 = uVar1; plVar10 = (long *)(PTR_00130f60 + *in_FS_OFFSET); *plVar10 = (long)&local_19f0; puVar11 = (int8 *)(PTR_00130f78 + *in_FS_OFFSET); *puVar11 = std::once_flag::_Prepare_execution:: _Prepare_execution<std::call_once<nglog::RawLog(nglog::LogSeverity,char_const*,int,char_const*,...)::$_0>(std::once_flag&,nglog::RawLog(nglog::LogSeverity,char_const*,int,char_const*,...)::$_0&&)::{lambda()#1}()#1}>(nglog::RawLog(nglog::LogSeverity,char_const*,int,char_const*,...)::$_0&) ::{lambda()#1}::__invoke; /* try { // try from 0011d28f to 0011d2a1 has its CatchHandler @ 0011d2c4 */ iVar4 = pthread_once(&crashed,(__init_routine *)PTR___once_proxy_00130fb0); if (iVar4 == 0) { *plVar10 = 0; *puVar11 = 0; /* try { // try from 0011d2ae to 0011d2b2 has its CatchHandler @ 0011d2ba */ iVar4 = LogMessage::Fail(); } /* try { // try from 0011d2b3 to 0011d2b9 has its CatchHandler @ 0011d2c4 */ /* WARNING: Subroutine does not return */ std::__throw_system_error(iVar4); } std::ios_base::~ios_base(local_18e8); std::streambuf::~streambuf((streambuf *)&local_17e0); } return; }
46,768
plutovg_matrix_invert
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-matrix.c
bool plutovg_matrix_invert(const plutovg_matrix_t* matrix, plutovg_matrix_t* inverse) { float det = (matrix->a * matrix->d - matrix->b * matrix->c); if(det == 0.f) return false; if(inverse) { float inv_det = 1.f / det; float a = matrix->a * inv_det; float b = matrix->b * inv_det; float c = matrix->c * inv_det; float d = matrix->d * inv_det; float e = (matrix->c * matrix->f - matrix->d * matrix->e) * inv_det; float f = (matrix->b * matrix->e - matrix->a * matrix->f) * inv_det; plutovg_matrix_init(inverse, d, -b, -c, a, e, f); } return true; }
O1
c
plutovg_matrix_invert: movss (%rdi), %xmm2 movss 0x4(%rdi), %xmm0 movss 0xc(%rdi), %xmm4 movss 0x8(%rdi), %xmm3 movaps %xmm3, %xmm5 mulss %xmm0, %xmm5 movaps %xmm2, %xmm1 mulss %xmm4, %xmm1 subss %xmm5, %xmm1 testq %rsi, %rsi je 0x27fad xorps %xmm5, %xmm5 ucomiss %xmm5, %xmm1 jne 0x27f2e jnp 0x27fad movaps 0x1b1cb(%rip), %xmm5 # 0x43100 xorps %xmm0, %xmm5 movss 0x1b1b4(%rip), %xmm6 # 0x430f4 divss %xmm1, %xmm6 movss 0x10(%rdi), %xmm7 movss 0x14(%rdi), %xmm8 mulss %xmm7, %xmm0 mulss %xmm4, %xmm7 mulss %xmm6, %xmm4 movaps %xmm3, %xmm9 mulss %xmm8, %xmm9 subss %xmm7, %xmm9 mulss %xmm6, %xmm9 mulss %xmm2, %xmm8 mulss %xmm6, %xmm2 subss %xmm8, %xmm0 mulss %xmm6, %xmm0 xorps 0x1b179(%rip), %xmm3 # 0x43100 mulss %xmm6, %xmm5 mulss %xmm6, %xmm3 movss %xmm4, (%rsi) movss %xmm5, 0x4(%rsi) movss %xmm3, 0x8(%rsi) movss %xmm2, 0xc(%rsi) movss %xmm9, 0x10(%rsi) movss %xmm0, 0x14(%rsi) xorps %xmm0, %xmm0 cmpneqss %xmm0, %xmm1 movd %xmm1, %eax andl $0x1, %eax retq
plutovg_matrix_invert: movss xmm2, dword ptr [rdi] movss xmm0, dword ptr [rdi+4] movss xmm4, dword ptr [rdi+0Ch] movss xmm3, dword ptr [rdi+8] movaps xmm5, xmm3 mulss xmm5, xmm0 movaps xmm1, xmm2 mulss xmm1, xmm4 subss xmm1, xmm5 test rsi, rsi jz loc_27FAD xorps xmm5, xmm5 ucomiss xmm1, xmm5 jnz short loc_27F2E jnp short loc_27FAD loc_27F2E: movaps xmm5, cs:xmmword_43100 xorps xmm5, xmm0 movss xmm6, cs:flt_430F4 divss xmm6, xmm1 movss xmm7, dword ptr [rdi+10h] movss xmm8, dword ptr [rdi+14h] mulss xmm0, xmm7 mulss xmm7, xmm4 mulss xmm4, xmm6 movaps xmm9, xmm3 mulss xmm9, xmm8 subss xmm9, xmm7 mulss xmm9, xmm6 mulss xmm8, xmm2 mulss xmm2, xmm6 subss xmm0, xmm8 mulss xmm0, xmm6 xorps xmm3, cs:xmmword_43100 mulss xmm5, xmm6 mulss xmm3, xmm6 movss dword ptr [rsi], xmm4 movss dword ptr [rsi+4], xmm5 movss dword ptr [rsi+8], xmm3 movss dword ptr [rsi+0Ch], xmm2 movss dword ptr [rsi+10h], xmm9 movss dword ptr [rsi+14h], xmm0 loc_27FAD: xorps xmm0, xmm0 cmpneqss xmm1, xmm0 movd eax, xmm1 and eax, 1 retn
long long plutovg_matrix_invert(float *a1, float *a2) { float v2; // xmm2_4 float v3; // xmm0_4 float v4; // xmm4_4 float v5; // xmm3_4 __m128 v6; // xmm1 float v7; // xmm7_4 float v8; // xmm8_4 v2 = *a1; v3 = a1[1]; v4 = a1[3]; v5 = a1[2]; v6 = (__m128)*(unsigned int *)a1; v6.m128_f32[0] = (float)(v6.m128_f32[0] * v4) - (float)(v5 * v3); if ( a2 && v6.m128_f32[0] != 0.0 ) { v7 = a1[4]; v8 = a1[5]; *a2 = v4 * (float)(1.0 / v6.m128_f32[0]); a2[1] = (float)-v3 * (float)(1.0 / v6.m128_f32[0]); a2[2] = (float)-v5 * (float)(1.0 / v6.m128_f32[0]); a2[3] = v2 * (float)(1.0 / v6.m128_f32[0]); a2[4] = (float)((float)(v5 * v8) - (float)(v7 * v4)) * (float)(1.0 / v6.m128_f32[0]); a2[5] = (float)((float)(v3 * v7) - (float)(v8 * v2)) * (float)(1.0 / v6.m128_f32[0]); } return _mm_cvtsi128_si32((__m128i)_mm_cmpneq_ss(v6, (__m128)0LL)) & 1; }
plutovg_matrix_invert: MOVSS XMM2,dword ptr [RDI] MOVSS XMM0,dword ptr [RDI + 0x4] MOVSS XMM4,dword ptr [RDI + 0xc] MOVSS XMM3,dword ptr [RDI + 0x8] MOVAPS XMM5,XMM3 MULSS XMM5,XMM0 MOVAPS XMM1,XMM2 MULSS XMM1,XMM4 SUBSS XMM1,XMM5 TEST RSI,RSI JZ 0x00127fad XORPS XMM5,XMM5 UCOMISS XMM1,XMM5 JNZ 0x00127f2e JNP 0x00127fad LAB_00127f2e: MOVAPS XMM5,xmmword ptr [0x00143100] XORPS XMM5,XMM0 MOVSS XMM6,dword ptr [0x001430f4] DIVSS XMM6,XMM1 MOVSS XMM7,dword ptr [RDI + 0x10] MOVSS XMM8,dword ptr [RDI + 0x14] MULSS XMM0,XMM7 MULSS XMM7,XMM4 MULSS XMM4,XMM6 MOVAPS XMM9,XMM3 MULSS XMM9,XMM8 SUBSS XMM9,XMM7 MULSS XMM9,XMM6 MULSS XMM8,XMM2 MULSS XMM2,XMM6 SUBSS XMM0,XMM8 MULSS XMM0,XMM6 XORPS XMM3,xmmword ptr [0x00143100] MULSS XMM5,XMM6 MULSS XMM3,XMM6 MOVSS dword ptr [RSI],XMM4 MOVSS dword ptr [RSI + 0x4],XMM5 MOVSS dword ptr [RSI + 0x8],XMM3 MOVSS dword ptr [RSI + 0xc],XMM2 MOVSS dword ptr [RSI + 0x10],XMM9 MOVSS dword ptr [RSI + 0x14],XMM0 LAB_00127fad: XORPS XMM0,XMM0 CMPNEQSS XMM1,XMM0 MOVD EAX,XMM1 AND EAX,0x1 RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ byte plutovg_matrix_invert(float *param_1,float *param_2) { float fVar1; float fVar2; float fVar3; float fVar4; float fVar5; float fVar6; float fVar7; float fVar8; float fVar9; float fVar10; fVar1 = *param_1; fVar2 = param_1[1]; fVar3 = param_1[3]; fVar4 = param_1[2]; fVar7 = fVar1 * fVar3 - fVar4 * fVar2; if ((param_2 != (float *)0x0) && ((fVar7 != 0.0 || (NAN(fVar7))))) { fVar9 = (float)(_DAT_00143100 ^ (uint)fVar2); fVar10 = DAT_001430f4 / fVar7; fVar5 = param_1[4]; fVar6 = param_1[5]; fVar8 = (float)((uint)fVar4 ^ _DAT_00143100); *param_2 = fVar3 * fVar10; param_2[1] = fVar9 * fVar10; param_2[2] = fVar8 * fVar10; param_2[3] = fVar1 * fVar10; param_2[4] = (fVar4 * fVar6 - fVar5 * fVar3) * fVar10; param_2[5] = (fVar2 * fVar5 - fVar6 * fVar1) * fVar10; } return -(fVar7 != 0.0) & 1; }
46,769
Catch::Clara::Detail::BoundLambda<Catch::makeCommandLineParser(Catch::ConfigData&)::$_5>::setValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.hpp
auto setValue( std::string const& arg ) -> ParserResult override { return invokeLambda<typename UnaryLambdaTraits<L>::ArgType>( m_lambda, arg ); }
O3
cpp
Catch::Clara::Detail::BoundLambda<Catch::makeCommandLineParser(Catch::ConfigData&)::$_5>::setValue(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xb8, %rsp movq %rsi, %r14 movq %rdi, %rbx leaq 0x38(%rsp), %r15 movq %r15, -0x10(%r15) movq $0x0, -0x8(%r15) movb $0x0, (%r15) leaq 0x28(%rsp), %rdi movq %rdx, %rsi callq 0x81d42 xorl %ebp, %ebp leaq 0xa8(%rsp), %r12 movq %rbp, -0x18(%r12) leaq 0xba9ff(%rip), %r13 # 0x130650 addq $0x10, %r13 movq %r13, -0x20(%r12) movq %r12, -0x10(%r12) movq %rbp, -0x8(%r12) movb $0x0, (%r12) leaq 0x8(%rsp), %rdi leaq 0x28(%rsp), %rsi callq 0x573e7 leaq 0x696d9(%rip), %rsi # 0xdf358 leaq 0x8(%rsp), %rdi callq 0x2f448 testl %eax, %eax je 0x75d34 leaq 0x696c6(%rip), %rsi # 0xdf35e leaq 0x8(%rsp), %rdi callq 0x2f448 testl %eax, %eax je 0x75d21 leaq 0x62b83(%rip), %rsi # 0xd8830 leaq 0x8(%rsp), %rdi callq 0x2f448 testl %eax, %eax je 0x75d28 leaq 0x67b6b(%rip), %rsi # 0xdd82d leaq 0x8(%rsp), %rdi callq 0x2f448 testl %eax, %eax je 0x75d2f leaq 0x6968d(%rip), %rsi # 0xdf364 leaq 0x68(%rsp), %rdi leaq 0x28(%rsp), %rdx callq 0x775b0 leaq 0x696b7(%rip), %rsi # 0xdf3a4 leaq 0x68(%rsp), %rdi callq 0x7736e leaq 0x58(%rsp), %rcx movq (%rax), %rdx movq %rax, %rdi addq $0x10, %rdi cmpq %rdi, %rdx je 0x75dc0 movq %rdx, 0x48(%rsp) movq (%rdi), %rsi movq %rsi, 0x58(%rsp) jmp 0x75dc9 movl $0x1, %ebp jmp 0x75d34 movl $0x2, %ebp jmp 0x75d34 movl $0x3, %ebp movq 0x8(%r14), %rax movl %ebp, 0x60(%rax) xorl %eax, %eax movq %rax, 0x8(%rbx) movq %r13, (%rbx) leaq 0x20(%rbx), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x18(%rbx) movb $0x0, 0x20(%rbx) leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x75d6f movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 movq %r13, 0x88(%rsp) movq 0x98(%rsp), %rdi cmpq %r12, %rdi je 0x75d94 movq 0xa8(%rsp), %rsi incq %rsi callq 0x17150 movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x75dab movq 0x38(%rsp), %rsi incq %rsi callq 0x17150 movq %rbx, %rax addq $0xb8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movups (%rdi), %xmm0 movups %xmm0, (%rcx) movq %rcx, %rdx movq 0x8(%rax), %rsi movq %rdi, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) movl $0x2, 0x8(%rbx) movq %r13, (%rbx) leaq 0x20(%rbx), %rax movq %rax, 0x10(%rbx) cmpq %rcx, %rdx je 0x75e02 movq %rdx, 0x10(%rbx) movq 0x58(%rsp), %rax movq %rax, 0x20(%rbx) jmp 0x75e08 movups (%rcx), %xmm0 movups %xmm0, (%rax) movq %rsi, 0x18(%rbx) movq %rcx, 0x48(%rsp) movq $0x0, 0x50(%rsp) movb $0x0, 0x58(%rsp) leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x75d54 movq 0x78(%rsp), %rsi incq %rsi callq 0x17150 jmp 0x75d54 movq %rax, %rbx leaq 0x78(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x75e66 movq 0x78(%rsp), %rsi incq %rsi callq 0x17150 jmp 0x75e66 movq %rax, %rbx leaq 0x18(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x75e86 movq 0x18(%rsp), %rsi incq %rsi callq 0x17150 jmp 0x75e86 movq %rax, %rbx movq %r13, 0x88(%rsp) movq 0x98(%rsp), %rdi cmpq %r12, %rdi je 0x75eb0 movq 0xa8(%rsp), %rsi incq %rsi callq 0x17150 jmp 0x75eb0 movq %rax, %rbx movq 0x28(%rsp), %rdi cmpq %r15, %rdi je 0x75ec7 movq 0x38(%rsp), %rsi incq %rsi callq 0x17150 movq %rbx, %rdi callq 0x17740 nop
_ZN5Catch5Clara6Detail11BoundLambdaIZNS_21makeCommandLineParserERNS_10ConfigDataEE3$_5E8setValueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0B8h mov r14, rsi mov rbx, rdi lea r15, [rsp+0E8h+var_B0] mov [r15-10h], r15 mov qword ptr [r15-8], 0 mov byte ptr [r15], 0 lea rdi, [rsp+0E8h+var_C0] mov rsi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) xor ebp, ebp lea r12, [rsp+0E8h+var_40] mov [r12-18h], rbp lea r13, _ZTVN5Catch5Clara6Detail11BasicResultINS0_15ParseResultTypeEEE; `vtable for'Catch::Clara::Detail::BasicResult<Catch::Clara::ParseResultType> add r13, 10h mov [r12-20h], r13 mov [r12-10h], r12 mov [r12-8], rbp mov byte ptr [r12], 0 lea rdi, [rsp+0E8h+var_E0] lea rsi, [rsp+0E8h+var_C0] call _ZN5Catch7toLowerERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; Catch::toLower(std::string const&) lea rsi, aNever; "never" lea rdi, [rsp+0E8h+var_E0] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz loc_75D34 lea rsi, aStart; "start" lea rdi, [rsp+0E8h+var_E0] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_75D21 lea rsi, aMutexScopedLoc+28h; "exit" lea rdi, [rsp+0E8h+var_E0] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_75D28 lea rsi, aNeverStartExit+11h; "both" lea rdi, [rsp+0E8h+var_E0] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_75D2F lea rsi, aKeypressArgume; "keypress argument must be one of: never"... lea rdi, [rsp+0E8h+var_80] lea rdx, [rsp+0E8h+var_C0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rsi, aNotRecognised; "' not recognised" lea rdi, [rsp+0E8h+var_80] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rcx, [rsp+0E8h+var_90] mov rdx, [rax] mov rdi, rax add rdi, 10h cmp rdx, rdi jz loc_75DC0 mov [rsp+0E8h+var_A0], rdx mov rsi, [rdi] mov [rsp+0E8h+var_90], rsi jmp loc_75DC9 loc_75D21: mov ebp, 1 jmp short loc_75D34 loc_75D28: mov ebp, 2 jmp short loc_75D34 loc_75D2F: mov ebp, 3 loc_75D34: mov rax, [r14+8] mov [rax+60h], ebp xor eax, eax mov [rbx+8], rax mov [rbx], r13 lea rcx, [rbx+20h] mov [rbx+10h], rcx mov [rbx+18h], rax mov byte ptr [rbx+20h], 0 loc_75D54: lea rax, [rsp+0E8h+var_D0] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_75D6F mov rsi, [rsp+0E8h+var_D0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_75D6F: mov [rsp+0E8h+var_60], r13 mov rdi, [rsp+0E8h+var_50]; void * cmp rdi, r12 jz short loc_75D94 mov rsi, [rsp+0E8h+var_40] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_75D94: mov rdi, [rsp+0E8h+var_C0]; void * cmp rdi, r15 jz short loc_75DAB mov rsi, [rsp+0E8h+var_B0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_75DAB: mov rax, rbx add rsp, 0B8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_75DC0: movups xmm0, xmmword ptr [rdi] movups xmmword ptr [rcx], xmm0 mov rdx, rcx loc_75DC9: mov rsi, [rax+8] mov [rax], rdi mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 mov dword ptr [rbx+8], 2 mov [rbx], r13 lea rax, [rbx+20h] mov [rbx+10h], rax cmp rdx, rcx jz short loc_75E02 mov [rbx+10h], rdx mov rax, [rsp+0E8h+var_90] mov [rbx+20h], rax jmp short loc_75E08 loc_75E02: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rax], xmm0 loc_75E08: mov [rbx+18h], rsi mov [rsp+0E8h+var_A0], rcx mov [rsp+0E8h+var_98], 0 mov byte ptr [rsp+0E8h+var_90], 0 lea rax, [rsp+0E8h+var_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz loc_75D54 mov rsi, [rsp+0E8h+var_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_75D54 mov rbx, rax lea rax, [rsp+arg_70] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_75E66 mov rsi, [rsp+arg_70] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_75E66 mov rbx, rax loc_75E66: lea rax, [rsp+arg_10] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_75E86 mov rsi, [rsp+arg_10] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_75E86 mov rbx, rax loc_75E86: mov [rsp+arg_80], r13 mov rdi, [rsp+arg_90]; void * cmp rdi, r12 jz short loc_75EB0 mov rsi, [rsp+arg_A0] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_75EB0 mov rbx, rax loc_75EB0: mov rdi, [rsp+arg_20]; void * cmp rdi, r15 jz short loc_75EC7 mov rsi, [rsp+arg_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_75EC7: mov rdi, rbx call __Unwind_Resume
long long Catch::Clara::Detail::BoundLambda<Catch::makeCommandLineParser(Catch::ConfigData &)::$_5>::setValue( long long a1, long long a2, long long a3) { int v4; // ebp long long *v5; // r13 long long v6; // rax __int128 *v7; // rdx __int128 *v8; // rdi long long v10; // rsi void *v11[2]; // [rsp+8h] [rbp-E0h] BYREF long long v12; // [rsp+18h] [rbp-D0h] BYREF void *v13[2]; // [rsp+28h] [rbp-C0h] BYREF _QWORD v14[2]; // [rsp+38h] [rbp-B0h] BYREF __int128 *v15; // [rsp+48h] [rbp-A0h] long long v16; // [rsp+50h] [rbp-98h] __int128 v17; // [rsp+58h] [rbp-90h] BYREF void *v18[2]; // [rsp+68h] [rbp-80h] BYREF long long v19; // [rsp+78h] [rbp-70h] BYREF long long *v20; // [rsp+88h] [rbp-60h] long long v21; // [rsp+90h] [rbp-58h] void *v22; // [rsp+98h] [rbp-50h] long long v23; // [rsp+A0h] [rbp-48h] _QWORD v24[8]; // [rsp+A8h] [rbp-40h] BYREF v13[0] = v14; v13[1] = 0LL; LOBYTE(v14[0]) = 0; std::string::_M_assign(v13, a3); v4 = 0; v21 = 0LL; v5 = &`vtable for'Catch::Clara::Detail::BasicResult<Catch::Clara::ParseResultType> + 2; v20 = &`vtable for'Catch::Clara::Detail::BasicResult<Catch::Clara::ParseResultType> + 2; v22 = v24; v23 = 0LL; LOBYTE(v24[0]) = 0; Catch::toLower((long long *)v11, (long long)v13); if ( !(unsigned int)std::string::compare(v11, (long long)"never") ) goto LABEL_10; if ( !(unsigned int)std::string::compare(v11, (long long)"start") ) { v4 = 1; LABEL_10: *(_DWORD *)(*(_QWORD *)(a2 + 8) + 96LL) = v4; *(_QWORD *)(a1 + 8) = 0LL; *(_QWORD *)a1 = v5; *(_QWORD *)(a1 + 16) = a1 + 32; *(_QWORD *)(a1 + 24) = 0LL; *(_BYTE *)(a1 + 32) = 0; goto LABEL_11; } if ( !(unsigned int)std::string::compare(v11, (long long)"exit") ) { v4 = 2; goto LABEL_10; } if ( !(unsigned int)std::string::compare(v11, (long long)"both") ) { v4 = 3; goto LABEL_10; } std::operator+<char>(v18, "keypress argument must be one of: never, start, exit or both. '", v13); v6 = std::string::append(v18, "' not recognised"); v7 = *(__int128 **)v6; v8 = (__int128 *)(v6 + 16); if ( *(_QWORD *)v6 == v6 + 16 ) { v17 = *v8; v7 = &v17; } else { v15 = *(__int128 **)v6; *(_QWORD *)&v17 = *(_QWORD *)v8; } v10 = *(_QWORD *)(v6 + 8); *(_QWORD *)v6 = v8; *(_QWORD *)(v6 + 8) = 0LL; *(_BYTE *)(v6 + 16) = 0; *(_DWORD *)(a1 + 8) = 2; *(_QWORD *)a1 = v5; *(_QWORD *)(a1 + 16) = a1 + 32; if ( v7 == &v17 ) { *(_OWORD *)(a1 + 32) = v17; } else { *(_QWORD *)(a1 + 16) = v7; *(_QWORD *)(a1 + 32) = v17; } *(_QWORD *)(a1 + 24) = v10; v15 = &v17; v16 = 0LL; LOBYTE(v17) = 0; if ( v18[0] != &v19 ) operator delete(v18[0], v19 + 1); LABEL_11: if ( v11[0] != &v12 ) operator delete(v11[0], v12 + 1); v20 = &`vtable for'Catch::Clara::Detail::BasicResult<Catch::Clara::ParseResultType> + 2; if ( v22 != v24 ) operator delete(v22, v24[0] + 1LL); if ( v13[0] != v14 ) operator delete(v13[0], v14[0] + 1LL); return a1; }
setValue: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xb8 MOV R14,RSI MOV RBX,RDI LEA R15,[RSP + 0x38] MOV qword ptr [R15 + -0x10],R15 MOV qword ptr [R15 + -0x8],0x0 MOV byte ptr [R15],0x0 LAB_00175c2e: LEA RDI,[RSP + 0x28] MOV RSI,RDX CALL 0x00181d42 XOR EBP,EBP LEA R12,[RSP + 0xa8] MOV qword ptr [R12 + -0x18],RBP LEA R13,[0x230650] ADD R13,0x10 MOV qword ptr [R12 + -0x20],R13 MOV qword ptr [R12 + -0x10],R12 MOV qword ptr [R12 + -0x8],RBP MOV byte ptr [R12],0x0 LAB_00175c69: LEA RDI,[RSP + 0x8] LEA RSI,[RSP + 0x28] CALL 0x001573e7 LEA RSI,[0x1df358] LEA RDI,[RSP + 0x8] CALL 0x0012f448 TEST EAX,EAX JZ 0x00175d34 LEA RSI,[0x1df35e] LEA RDI,[RSP + 0x8] CALL 0x0012f448 TEST EAX,EAX JZ 0x00175d21 LEA RSI,[0x1d8830] LEA RDI,[RSP + 0x8] CALL 0x0012f448 TEST EAX,EAX JZ 0x00175d28 LEA RSI,[0x1dd82d] LEA RDI,[RSP + 0x8] CALL 0x0012f448 TEST EAX,EAX JZ 0x00175d2f LAB_00175cd0: LEA RSI,[0x1df364] LEA RDI,[RSP + 0x68] LEA RDX,[RSP + 0x28] CALL 0x001775b0 LAB_00175ce6: LEA RSI,[0x1df3a4] LEA RDI,[RSP + 0x68] CALL 0x0017736e LAB_00175cf7: LEA RCX,[RSP + 0x58] MOV RDX,qword ptr [RAX] MOV RDI,RAX ADD RDI,0x10 CMP RDX,RDI JZ 0x00175dc0 MOV qword ptr [RSP + 0x48],RDX MOV RSI,qword ptr [RDI] MOV qword ptr [RSP + 0x58],RSI JMP 0x00175dc9 LAB_00175d21: MOV EBP,0x1 JMP 0x00175d34 LAB_00175d28: MOV EBP,0x2 JMP 0x00175d34 LAB_00175d2f: MOV EBP,0x3 LAB_00175d34: MOV RAX,qword ptr [R14 + 0x8] MOV dword ptr [RAX + 0x60],EBP XOR EAX,EAX MOV qword ptr [RBX + 0x8],RAX MOV qword ptr [RBX],R13 LEA RCX,[RBX + 0x20] MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RBX + 0x18],RAX MOV byte ptr [RBX + 0x20],0x0 LAB_00175d54: LEA RAX,[RSP + 0x18] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00175d6f MOV RSI,qword ptr [RSP + 0x18] INC RSI CALL 0x00117150 LAB_00175d6f: MOV qword ptr [RSP + 0x88],R13 MOV RDI,qword ptr [RSP + 0x98] CMP RDI,R12 JZ 0x00175d94 MOV RSI,qword ptr [RSP + 0xa8] INC RSI CALL 0x00117150 LAB_00175d94: MOV RDI,qword ptr [RSP + 0x28] CMP RDI,R15 JZ 0x00175dab MOV RSI,qword ptr [RSP + 0x38] INC RSI CALL 0x00117150 LAB_00175dab: MOV RAX,RBX ADD RSP,0xb8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00175dc0: MOVUPS XMM0,xmmword ptr [RDI] MOVUPS xmmword ptr [RCX],XMM0 MOV RDX,RCX LAB_00175dc9: MOV RSI,qword ptr [RAX + 0x8] MOV qword ptr [RAX],RDI MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 MOV dword ptr [RBX + 0x8],0x2 MOV qword ptr [RBX],R13 LEA RAX,[RBX + 0x20] MOV qword ptr [RBX + 0x10],RAX CMP RDX,RCX JZ 0x00175e02 MOV qword ptr [RBX + 0x10],RDX MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RBX + 0x20],RAX JMP 0x00175e08 LAB_00175e02: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RAX],XMM0 LAB_00175e08: MOV qword ptr [RBX + 0x18],RSI MOV qword ptr [RSP + 0x48],RCX MOV qword ptr [RSP + 0x50],0x0 MOV byte ptr [RSP + 0x58],0x0 LEA RAX,[RSP + 0x78] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00175d54 MOV RSI,qword ptr [RSP + 0x78] INC RSI CALL 0x00117150 JMP 0x00175d54
/* Catch::Clara::Detail::BoundLambda<Catch::makeCommandLineParser(Catch::ConfigData&)::$_5>::setValue(std::__cxx11::string const&) */ string * Catch::Clara::Detail::BoundLambda<Catch::makeCommandLineParser(Catch::ConfigData&)::$_5>:: setValue(string *param_1) { long lVar1; int iVar2; long *plVar3; string *in_RDX; ulong *puVar4; int4 uVar5; long in_RSI; ulong *puVar6; long *local_e0 [2]; long local_d0 [2]; int1 *local_c0; int8 local_b8; int1 local_b0; int7 uStack_af; ulong *local_a0; int8 local_98; ulong local_90; long lStack_88; long *local_80 [2]; long local_70 [2]; int **local_60; int8 local_58; int1 *local_50; int8 local_48; int1 local_40; int7 uStack_3f; local_b8 = 0; local_b0 = 0; /* try { // try from 00175c2e to 00175c3a has its CatchHandler @ 00175ead */ local_c0 = &local_b0; std::__cxx11::string::_M_assign((string *)&local_c0,in_RDX); uVar5 = 0; local_58 = 0; local_60 = &PTR__BasicResult_00230660; local_48 = 0; local_40 = 0; /* try { // try from 00175c69 to 00175c77 has its CatchHandler @ 00175e83 */ local_50 = &local_40; toLower((Catch *)local_e0,(string *)&local_c0); iVar2 = std::__cxx11::string::compare((string *)local_e0,"never"); if (iVar2 != 0) { iVar2 = std::__cxx11::string::compare((string *)local_e0,"start"); if (iVar2 == 0) { uVar5 = 1; } else { iVar2 = std::__cxx11::string::compare((string *)local_e0,"exit"); if (iVar2 == 0) { uVar5 = 2; } else { iVar2 = std::__cxx11::string::compare((string *)local_e0,"both"); if (iVar2 != 0) { /* try { // try from 00175cd0 to 00175ce5 has its CatchHandler @ 00175e63 */ std::operator+((char *)local_80, (string *) "keypress argument must be one of: never, start, exit or both. \'"); /* try { // try from 00175ce6 to 00175cf6 has its CatchHandler @ 00175e43 */ plVar3 = (long *)std::__cxx11::string::append((string *)local_80,"\' not recognised"); local_a0 = &local_90; puVar6 = (ulong *)(plVar3 + 2); if ((ulong *)*plVar3 == puVar6) { local_90 = *puVar6; lStack_88 = plVar3[3]; puVar4 = local_a0; } else { local_90 = *puVar6; puVar4 = (ulong *)*plVar3; } lVar1 = plVar3[1]; *plVar3 = (long)puVar6; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; *(int4 *)(param_1 + 8) = 2; *(int ***)param_1 = &PTR__BasicResult_00230660; *(string **)(param_1 + 0x10) = param_1 + 0x20; if (puVar4 == local_a0) { *(ulong *)(param_1 + 0x20) = local_90; *(long *)(param_1 + 0x28) = lStack_88; } else { *(ulong **)(param_1 + 0x10) = puVar4; *(ulong *)(param_1 + 0x20) = local_90; } *(long *)(param_1 + 0x18) = lVar1; local_98 = 0; local_90 = local_90 & 0xffffffffffffff00; if (local_80[0] != local_70) { operator_delete(local_80[0],local_70[0] + 1); } goto LAB_00175d54; } uVar5 = 3; } } } *(int4 *)(*(long *)(in_RSI + 8) + 0x60) = uVar5; *(int8 *)(param_1 + 8) = 0; *(int ***)param_1 = &PTR__BasicResult_00230660; *(string **)(param_1 + 0x10) = param_1 + 0x20; *(int8 *)(param_1 + 0x18) = 0; param_1[0x20] = (string)0x0; LAB_00175d54: if (local_e0[0] != local_d0) { operator_delete(local_e0[0],local_d0[0] + 1); } local_60 = &PTR__BasicResult_00230660; if (local_50 != &local_40) { operator_delete(local_50,CONCAT71(uStack_3f,local_40) + 1); } if (local_c0 != &local_b0) { operator_delete(local_c0,CONCAT71(uStack_af,local_b0) + 1); } return param_1; }
46,770
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
monkey531[P]llama/common/json.hpp
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
O1
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movb $0x0, (%rdi) movq $0x0, 0x8(%rdi) movl $0x1, %esi callq 0x58c4e movq %rbx, %rdi movl $0x1, %esi callq 0x58c4e movq (%r12), %r15 movq 0x8(%r12), %r12 movq %rsp, %rdi movq %r13, %rsi callq 0x58624 addq %r15, %r12 movzbl %r14b, %r8d movzbl %bpl, %r9d leaq 0x20(%rsp), %rdi movq %rsp, %rcx movq %r15, %rsi movq %r12, %rdx callq 0x58578 leaq 0x20(%rsp), %rdi movl $0x1, %esi movq %rbx, %rdx callq 0x58682 leaq 0x48(%rsp), %r14 movq %r14, %rdi callq 0x59180 movq -0x18(%r14), %rax testq %rax, %rax je 0x584f7 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0x5850e movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0x58552 jmp 0x58552 movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x58c20 jmp 0x58539 movq %rax, %r14 movq 0x10(%rsp), %rax testq %rax, %rax je 0x5855d movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0x5855d movq %rax, %rdi callq 0x22abb movq %rax, %r14 movq %rbx, %rdi xorl %esi, %esi callq 0x58c4e movq %rbx, %rdi callq 0x5e43a movq %r14, %rdi callq 0x1bfc0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIRKS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov ebp, r8d mov r14d, ecx mov r13, rdx mov r12, rsi mov rbx, rdi mov byte ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov r15, [r12] mov r12, [r12+8] mov rdi, rsp mov rsi, r13 call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) add r12, r15 movzx r8d, r14b movzx r9d, bpl lea rdi, [rsp+118h+var_F8] mov rcx, rsp mov rsi, r15 mov rdx, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) lea rdi, [rsp+118h+var_F8]; int mov esi, 1 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&) lea r14, [rsp+118h+var_D0] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer() mov rax, [r14-18h] test rax, rax jz short loc_584F7 lea rdi, [rsp+118h+var_F8] mov rsi, rdi mov edx, 3 call rax loc_584F7: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_5850E mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_5850E: mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_58552 jmp short loc_58552 mov r14, rax lea rdi, [rsp+118h+var_F8] call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() jmp short loc_58539 mov r14, rax loc_58539: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_5855D mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_5855D loc_58552: mov rdi, rax call __clang_call_terminate mov r14, rax loc_5855D: mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string const&>( long long a1, long long *a2, long long a3, unsigned __int8 a4, unsigned __int8 a5) { long long v8; // r15 long long v9; // r12 _BYTE v11[16]; // [rsp+0h] [rbp-118h] BYREF void ( *v12)(_BYTE *, _BYTE *, long long); // [rsp+10h] [rbp-108h] int v13[4]; // [rsp+20h] [rbp-F8h] BYREF void ( *v14)(int *, int *, long long); // [rsp+30h] [rbp-E8h] _BYTE v15[208]; // [rsp+48h] [rbp-D0h] BYREF *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant( a1, 1LL); 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( a1, 1LL); v8 = *a2; v9 = a2[1]; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( v11, a3); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>( v13, v8, v8 + v9, v11, a4, a5); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse((int)v13); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer( v15, 1LL); if ( v14 ) v14(v13, v13, 3LL); if ( v12 ) v12(v11, v11, 3LL); return a1; }
parse<std::__cxx11::string_const&>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV EBP,R8D MOV R14D,ECX MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV byte ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV ESI,0x1 CALL 0x00158c4e MOV RDI,RBX MOV ESI,0x1 CALL 0x00158c4e MOV R15,qword ptr [R12] MOV R12,qword ptr [R12 + 0x8] LAB_00158497: MOV RDI,RSP MOV RSI,R13 CALL 0x00158624 ADD R12,R15 LAB_001584a5: MOVZX R8D,R14B MOVZX R9D,BPL LEA RDI,[RSP + 0x20] MOV RCX,RSP MOV RSI,R15 MOV RDX,R12 CALL 0x00158578 LAB_001584c0: LEA RDI,[RSP + 0x20] MOV ESI,0x1 MOV RDX,RBX CALL 0x00158682 LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x00159180 MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x001584f7 LAB_001584e8: LEA RDI,[RSP + 0x20] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001584f7: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x0015850e LAB_00158501: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_0015850e: MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::parse<std::__cxx11::string const&>(std::__cxx11::string const&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool, bool) */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::parse<std::__cxx11::string_const&> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,long *param_1,function *param_3,int1 param_4,int1 param_5) { long lVar1; long lVar2; function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> afStack_118 [16]; code *local_108; parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_f8 [16]; code *local_e8; lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_d0 [160]; *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0; *(int8 *)(this + 8) = 0; assert_invariant(SUB81(this,0)); assert_invariant(SUB81(this,0)); lVar1 = *param_1; lVar2 = param_1[1]; /* try { // try from 00158497 to 001584a1 has its CatchHandler @ 0015855a */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function(afStack_118,param_3); /* try { // try from 001584a5 to 001584bf has its CatchHandler @ 00158536 */ parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> (local_f8,lVar1,lVar2 + lVar1,afStack_118,param_4,param_5); /* try { // try from 001584c0 to 001584d1 has its CatchHandler @ 00158527 */ detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::parse(local_f8,true,(basic_json *)this); detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::~lexer(local_d0); if (local_e8 != (code *)0x0) { /* try { // try from 001584e8 to 001584f6 has its CatchHandler @ 00158525 */ (*local_e8)(local_f8,local_f8,3); } if (local_108 != (code *)0x0) { /* try { // try from 00158501 to 0015850d has its CatchHandler @ 00158523 */ (*local_108)(afStack_118,afStack_118,3); } return this; }
46,771
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool)
monkey531[P]llama/common/json.hpp
JSON_HEDLEY_WARN_UNUSED_RESULT static basic_json parse(InputType&& i, const parser_callback_t cb = nullptr, const bool allow_exceptions = true, const bool ignore_comments = false) { basic_json result; parser(detail::input_adapter(std::forward<InputType>(i)), cb, allow_exceptions, ignore_comments).parse(true, result); return result; }
O3
cpp
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::parse<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&)>, bool, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movl %r8d, %ebp movl %ecx, %r14d movq %rdx, %r13 movq %rsi, %r12 movq %rdi, %rbx movb $0x0, (%rdi) movq $0x0, 0x8(%rdi) movl $0x1, %esi callq 0x586c0 movq %rbx, %rdi movl $0x1, %esi callq 0x586c0 movq (%r12), %r15 movq 0x8(%r12), %r12 movq %rsp, %rdi movq %r13, %rsi callq 0x58062 addq %r15, %r12 movzbl %r14b, %r8d movzbl %bpl, %r9d leaq 0x20(%rsp), %rdi movq %rsp, %rcx movq %r15, %rsi movq %r12, %rdx callq 0x57fb6 leaq 0x20(%rsp), %rdi movl $0x1, %esi movq %rbx, %rdx callq 0x580c0 leaq 0x48(%rsp), %r14 movq %r14, %rdi callq 0x58bf2 movq -0x18(%r14), %rax testq %rax, %rax je 0xa4cc1 leaq 0x20(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq 0x10(%rsp), %rax testq %rax, %rax je 0xa4cd8 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq jmp 0xa4d1c jmp 0xa4d1c movq %rax, %r14 leaq 0x20(%rsp), %rdi callq 0x58692 jmp 0xa4d03 movq %rax, %r14 movq 0x10(%rsp), %rax testq %rax, %rax je 0xa4d27 movq %rsp, %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax jmp 0xa4d27 movq %rax, %rdi callq 0x21aaf movq %rax, %r14 movq %rbx, %rdi xorl %esi, %esi callq 0x586c0 movq %rbx, %rdi callq 0x5dbae movq %r14, %rdi callq 0x1afc0 nop
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5parseIS9_EESD_OT_St8functionIFbiNS0_6detail13parse_event_tERSD_EEbb: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov ebp, r8d mov r14d, ecx mov r13, rdx mov r12, rsi mov rbx, rdi mov byte ptr [rdi], 0 mov qword ptr [rdi+8], 0 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov r15, [r12] mov r12, [r12+8] mov rdi, rsp mov rsi, r13 call _ZNSt8functionIFbiN8nlohmann16json_abi_v3_11_36detail13parse_event_tERNS1_10basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES6_IhSaIhEEvEEEEC2ERKSJ_; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)>::function(std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> &)> const&) add r12, r15 movzx r8d, r14b movzx r9d, bpl lea rdi, [rsp+118h+var_F8] mov rcx, rsp mov rsi, r15 mov rdx, r12 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE6parserINS0_6detail22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS9_EEEEEENSF_6parserISD_T_EESO_St8functionIFbiNSF_13parse_event_tERSD_EEbb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>(nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>,std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&)>,bool,bool) lea rdi, [rsp+118h+var_F8]; int mov esi, 1 mov rdx, rbx call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEE5parseEbRSF_; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse(bool,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&) lea r14, [rsp+118h+var_D0] mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer() mov rax, [r14-18h] test rax, rax jz short loc_A4CC1 lea rdi, [rsp+118h+var_F8] mov rsi, rdi mov edx, 3 call rax loc_A4CC1: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_A4CD8 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax loc_A4CD8: mov rax, rbx add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn jmp short loc_A4D1C jmp short loc_A4D1C mov r14, rax lea rdi, [rsp+118h+var_F8] call _ZN8nlohmann16json_abi_v3_11_36detail6parserINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcSB_EEEEED2Ev; nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~parser() jmp short loc_A4D03 mov r14, rax loc_A4D03: mov rax, [rsp+118h+var_108] test rax, rax jz short loc_A4D27 mov rdi, rsp mov rsi, rdi mov edx, 3 call rax jmp short loc_A4D27 loc_A4D1C: mov rdi, rax call __clang_call_terminate mov r14, rax loc_A4D27: mov rdi, rbx xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parse<std::string>( long long a1, long long *a2, long long a3, unsigned __int8 a4, unsigned __int8 a5) { long long v8; // r15 long long v9; // r12 __int128 v11; // [rsp+0h] [rbp-118h] BYREF void ( *v12)(__int128 *, __int128 *, long long); // [rsp+10h] [rbp-108h] int v13[4]; // [rsp+20h] [rbp-F8h] BYREF void ( *v14)(int *, int *, long long); // [rsp+30h] [rbp-E8h] _QWORD v15[26]; // [rsp+48h] [rbp-D0h] BYREF *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 8) = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); v8 = *a2; v9 = a2[1]; std::function<bool ()(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void> &)>::function( &v11, a3); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>( (long long)v13, v8, v8 + v9, &v11, a4, a5); nlohmann::json_abi_v3_11_3::detail::parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::parse( (long long)v13, 1, (_BYTE *)a1); nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::string>>>::~lexer(v15); if ( v14 ) v14(v13, v13, 3LL); if ( v12 ) v12(&v11, &v11, 3LL); return a1; }
parse<std::__cxx11::string>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV EBP,R8D MOV R14D,ECX MOV R13,RDX MOV R12,RSI MOV RBX,RDI MOV byte ptr [RDI],0x0 MOV qword ptr [RDI + 0x8],0x0 MOV ESI,0x1 CALL 0x001586c0 MOV RDI,RBX MOV ESI,0x1 CALL 0x001586c0 MOV R15,qword ptr [R12] MOV R12,qword ptr [R12 + 0x8] LAB_001a4c61: MOV RDI,RSP MOV RSI,R13 CALL 0x00158062 ADD R12,R15 LAB_001a4c6f: MOVZX R8D,R14B MOVZX R9D,BPL LEA RDI,[RSP + 0x20] MOV RCX,RSP MOV RSI,R15 MOV RDX,R12 CALL 0x00157fb6 LAB_001a4c8a: LEA RDI,[RSP + 0x20] MOV ESI,0x1 MOV RDX,RBX CALL 0x001580c0 LEA R14,[RSP + 0x48] MOV RDI,R14 CALL 0x00158bf2 MOV RAX,qword ptr [R14 + -0x18] TEST RAX,RAX JZ 0x001a4cc1 LAB_001a4cb2: LEA RDI,[RSP + 0x20] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001a4cc1: MOV RAX,qword ptr [RSP + 0x10] TEST RAX,RAX JZ 0x001a4cd8 LAB_001a4ccb: MOV RDI,RSP MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001a4cd8: MOV RAX,RBX ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::parse<std::__cxx11::string >(std::__cxx11::string&&, std::function<bool (int, nlohmann::json_abi_v3_11_3::detail::parse_event_t, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&)>, bool, bool) */ basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> * __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::parse<std::__cxx11::string> (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,long *param_1,function *param_3,int1 param_4,int1 param_5) { long lVar1; long lVar2; function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> afStack_118 [16]; code *local_108; parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_f8 [16]; code *local_e8; lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> local_d0 [160]; *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0; *(int8 *)(this + 8) = 0; assert_invariant(SUB81(this,0)); assert_invariant(SUB81(this,0)); lVar1 = *param_1; lVar2 = param_1[1]; /* try { // try from 001a4c61 to 001a4c6b has its CatchHandler @ 001a4d24 */ std:: function<bool(int,nlohmann::json_abi_v3_11_3::detail::parse_event_t,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>&)> ::function(afStack_118,param_3); /* try { // try from 001a4c6f to 001a4c89 has its CatchHandler @ 001a4d00 */ parser<nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> (local_f8,lVar1,lVar2 + lVar1,afStack_118,param_4,param_5); /* try { // try from 001a4c8a to 001a4c9b has its CatchHandler @ 001a4cf1 */ detail:: parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::parse(local_f8,true,(basic_json *)this); detail:: lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>> ::~lexer(local_d0); if (local_e8 != (code *)0x0) { /* try { // try from 001a4cb2 to 001a4cc0 has its CatchHandler @ 001a4cef */ (*local_e8)(local_f8,local_f8,3); } if (local_108 != (code *)0x0) { /* try { // try from 001a4ccb to 001a4cd7 has its CatchHandler @ 001a4ced */ (*local_108)(afStack_118,afStack_118,3); } return this; }
46,772
uf_blob
eloqsql/storage/myisam/mi_packrec.c
static void uf_blob(MI_COLUMNDEF *rec, MI_BIT_BUFF *bit_buff, uchar *to, uchar *end) { if (get_bit(bit_buff)) bzero((uchar*) to,(end-to)); else { ulong length=get_bits(bit_buff,rec->space_length_bits); uint pack_length=(uint) (end-to)-portable_sizeof_char_ptr; if (bit_buff->blob_pos+length > bit_buff->blob_end) { bit_buff->error=1; bzero((uchar*) to,(end-to)); return; } decode_bytes(rec,bit_buff,bit_buff->blob_pos,bit_buff->blob_pos+length); _mi_store_blob_length((uchar*) to,pack_length,length); memcpy(to+pack_length, &bit_buff->blob_pos, sizeof(char*)); bit_buff->blob_pos+=length; } }
O0
c
uf_blob: 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 0xbf257 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 0xbf27b jmp 0xbf296 movq -0x10(%rbp), %rdi callq 0xbdad0 movq -0x10(%rbp), %rax movl $0x1f, 0x4(%rax) movq -0x10(%rbp), %rax movl (%rax), %eax andl $0x80000000, %eax # imm = 0x80000000 cmpl $0x0, %eax je 0xbf296 movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx xorl %esi, %esi callq 0x2a2a0 jmp 0xbf395 movq -0x10(%rbp), %rax movl 0x4(%rax), %eax movq -0x8(%rbp), %rcx cmpl 0x1c(%rcx), %eax jb 0xbf2d9 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 0x2024ef(%rip), %rcx # 0x2c17c0 andl (%rcx,%rdx,4), %eax movl %eax, -0x30(%rbp) jmp 0xbf2ec movq -0x10(%rbp), %rdi movq -0x8(%rbp), %rax movl 0x1c(%rax), %esi callq 0xbc280 movl %eax, -0x30(%rbp) movl -0x30(%rbp), %eax movl %eax, %eax movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movq -0x18(%rbp), %rcx subq %rcx, %rax subl $0x8, %eax movl %eax, -0x2c(%rbp) movq -0x10(%rbp), %rax movq 0x18(%rax), %rax addq -0x28(%rbp), %rax movq -0x10(%rbp), %rcx cmpq 0x20(%rcx), %rax jbe 0xbf33f movq -0x10(%rbp), %rax movl $0x1, 0x28(%rax) movq -0x18(%rbp), %rdi movq -0x20(%rbp), %rdx movq -0x18(%rbp), %rax subq %rax, %rdx xorl %esi, %esi callq 0x2a2a0 jmp 0xbf395 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movq -0x10(%rbp), %rax movq 0x18(%rax), %rdx movq -0x10(%rbp), %rax movq 0x18(%rax), %rcx addq -0x28(%rbp), %rcx callq 0xbe1e0 movq -0x18(%rbp), %rdi movl -0x2c(%rbp), %esi movq -0x28(%rbp), %rax movl %eax, %edx callq 0xacea0 movq -0x18(%rbp), %rax movl -0x2c(%rbp), %ecx movq -0x10(%rbp), %rdx movq 0x18(%rdx), %rdx movq %rdx, (%rax,%rcx) movq -0x28(%rbp), %rcx movq -0x10(%rbp), %rax addq 0x18(%rax), %rcx movq %rcx, 0x18(%rax) addq $0x30, %rsp popq %rbp retq nopl (%rax,%rax)
uf_blob_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_BF257 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_BF27B jmp short loc_BF296 loc_BF257: 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_BF296 loc_BF27B: mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax xor esi, esi call _memset jmp loc_BF395 loc_BF296: mov rax, [rbp+var_10] mov eax, [rax+4] mov rcx, [rbp+var_8] cmp eax, [rcx+1Ch] jb short loc_BF2D9 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_30], eax jmp short loc_BF2EC loc_BF2D9: mov rdi, [rbp+var_10] mov rax, [rbp+var_8] mov esi, [rax+1Ch] call fill_and_get_bits_0 mov [rbp+var_30], eax loc_BF2EC: mov eax, [rbp+var_30] mov eax, eax mov [rbp+var_28], rax mov rax, [rbp+var_20] mov rcx, [rbp+var_18] sub rax, rcx sub eax, 8 mov [rbp+var_2C], eax mov rax, [rbp+var_10] mov rax, [rax+18h] add rax, [rbp+var_28] mov rcx, [rbp+var_10] cmp rax, [rcx+20h] jbe short loc_BF33F mov rax, [rbp+var_10] mov dword ptr [rax+28h], 1 mov rdi, [rbp+var_18] mov rdx, [rbp+var_20] mov rax, [rbp+var_18] sub rdx, rax xor esi, esi call _memset jmp short loc_BF395 loc_BF33F: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov rax, [rbp+var_10] mov rdx, [rax+18h] mov rax, [rbp+var_10] mov rcx, [rax+18h] add rcx, [rbp+var_28] call decode_bytes_0 mov rdi, [rbp+var_18] mov esi, [rbp+var_2C] mov rax, [rbp+var_28] mov edx, eax call _mi_store_blob_length mov rax, [rbp+var_18] mov ecx, [rbp+var_2C] mov rdx, [rbp+var_10] mov rdx, [rdx+18h] mov [rax+rcx], rdx mov rcx, [rbp+var_28] mov rax, [rbp+var_10] add rcx, [rax+18h] mov [rax+18h], rcx loc_BF395: add rsp, 30h pop rbp retn
long long uf_blob_0(long long a1, long long a2, _BYTE *a3, long long a4) { int v4; // eax int v5; // ecx long long result; // rax unsigned int v7; // eax int v8; // ecx unsigned int bits_0; // [rsp+0h] [rbp-30h] unsigned int v10; // [rsp+4h] [rbp-2Ch] if ( *(_DWORD *)(a2 + 4) ) { v4 = *(_DWORD *)a2; v5 = *(_DWORD *)(a2 + 4) - 1; *(_DWORD *)(a2 + 4) = v5; if ( ((1 << v5) & v4) == 0 ) goto LABEL_6; return memset(a3, 0LL, a4 - (_QWORD)a3); } fill_buffer_0(a2); *(_DWORD *)(a2 + 4) = 31; if ( *(int *)a2 < 0 ) return memset(a3, 0LL, a4 - (_QWORD)a3); LABEL_6: if ( *(_DWORD *)(a2 + 4) < *(_DWORD *)(a1 + 28) ) { bits_0 = fill_and_get_bits_0((_DWORD *)a2, *(_DWORD *)(a1 + 28)); } else { v7 = *(_DWORD *)a2; v8 = *(_DWORD *)(a2 + 4) - *(_DWORD *)(a1 + 28); *(_DWORD *)(a2 + 4) = v8; bits_0 = mask_0[*(unsigned int *)(a1 + 28)] & (v7 >> v8); } v10 = a4 - (_DWORD)a3 - 8; if ( (unsigned long long)bits_0 + *(_QWORD *)(a2 + 24) <= *(_QWORD *)(a2 + 32) ) { decode_bytes_0(a1, a2, *(_BYTE **)(a2 + 24), (_BYTE *)(bits_0 + *(_QWORD *)(a2 + 24))); mi_store_blob_length(a3, v10, bits_0); *(_QWORD *)&a3[v10] = *(_QWORD *)(a2 + 24); result = a2; *(_QWORD *)(a2 + 24) += bits_0; } else { *(_DWORD *)(a2 + 40) = 1; return memset(a3, 0LL, a4 - (_QWORD)a3); } return result; }
uf_blob: 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 0x001bf257 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 0x001bf27b JMP 0x001bf296 LAB_001bf257: MOV RDI,qword ptr [RBP + -0x10] CALL 0x001bdad0 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 0x001bf296 LAB_001bf27b: MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX XOR ESI,ESI CALL 0x0012a2a0 JMP 0x001bf395 LAB_001bf296: 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 0x001bf2d9 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,[0x3c17c0] AND EAX,dword ptr [RCX + RDX*0x4] MOV dword ptr [RBP + -0x30],EAX JMP 0x001bf2ec LAB_001bf2d9: MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RAX + 0x1c] CALL 0x001bc280 MOV dword ptr [RBP + -0x30],EAX LAB_001bf2ec: MOV EAX,dword ptr [RBP + -0x30] MOV EAX,EAX MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x18] SUB RAX,RCX SUB EAX,0x8 MOV dword ptr [RBP + -0x2c],EAX MOV RAX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RAX + 0x18] ADD RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x20] JBE 0x001bf33f MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x28],0x1 MOV RDI,qword ptr [RBP + -0x18] MOV RDX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RBP + -0x18] SUB RDX,RAX XOR ESI,ESI CALL 0x0012a2a0 JMP 0x001bf395 LAB_001bf33f: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RAX + 0x18] ADD RCX,qword ptr [RBP + -0x28] CALL 0x001be1e0 MOV RDI,qword ptr [RBP + -0x18] MOV ESI,dword ptr [RBP + -0x2c] MOV RAX,qword ptr [RBP + -0x28] MOV EDX,EAX CALL 0x001acea0 MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x2c] MOV RDX,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RDX + 0x18] MOV qword ptr [RAX + RCX*0x1],RDX MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x10] ADD RCX,qword ptr [RAX + 0x18] MOV qword ptr [RAX + 0x18],RCX LAB_001bf395: ADD RSP,0x30 POP RBP RET
void uf_blob(long param_1,uint *param_2,void *param_3,long param_4) { uint uVar1; ulong uVar2; uint local_38; 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_38 = fill_and_get_bits(param_2); } else { uVar1 = param_2[1] - *(int *)(param_1 + 0x1c); param_2[1] = uVar1; local_38 = *param_2 >> ((byte)uVar1 & 0x1f) & *(uint *)(mask + (ulong)*(uint *)(param_1 + 0x1c) * 4); } uVar2 = (ulong)local_38; uVar1 = ((int)param_4 - (int)param_3) - 8; if (*(ulong *)(param_2 + 8) < *(long *)(param_2 + 6) + uVar2) { param_2[10] = 1; memset(param_3,0,param_4 - (long)param_3); } else { decode_bytes(param_1,param_2,*(int8 *)(param_2 + 6),*(long *)(param_2 + 6) + uVar2); _mi_store_blob_length(param_3,uVar1,uVar2); *(int8 *)((long)param_3 + (ulong)uVar1) = *(int8 *)(param_2 + 6); *(ulong *)(param_2 + 6) = uVar2 + *(long *)(param_2 + 6); } } else { memset(param_3,0,param_4 - (long)param_3); } return; }
46,773
bitmap_is_subset
eloqsql/mysys/my_bitmap.c
my_bool bitmap_is_subset(const MY_BITMAP *map1, const MY_BITMAP *map2) { my_bitmap_map *m1= map1->bitmap, *m2= map2->bitmap, *end; DBUG_ASSERT(map1->bitmap && map2->bitmap); DBUG_ASSERT(map1->n_bits==map2->n_bits); end= map1->last_word_ptr; while (m1 < end) { if ((*m1++) & ~(*m2++)) return 0; } /* here both maps have the same number of bits - see assert above */ return ((*m1 & ~*m2 & ~map1->last_word_mask) ? 0 : 1); }
O3
c
bitmap_is_subset: pushq %rbp movq %rsp, %rbp movq (%rdi), %rax movq 0x8(%rdi), %rdx movq (%rsi), %rcx cmpq %rdx, %rax jae 0x9d6a6 leaq 0x4(%rax), %rsi movl (%rcx), %r8d addq $0x4, %rcx notl %r8d testl %r8d, (%rax) movq %rsi, %rax je 0x9d687 xorl %eax, %eax jmp 0x9d6b2 movl 0x18(%rdi), %edx orl (%rcx), %edx notl %edx testl %edx, (%rax) sete %al popq %rbp retq
bitmap_is_subset: push rbp mov rbp, rsp mov rax, [rdi] mov rdx, [rdi+8] mov rcx, [rsi] loc_9D687: cmp rax, rdx jnb short loc_9D6A6 lea rsi, [rax+4] mov r8d, [rcx] add rcx, 4 not r8d test [rax], r8d mov rax, rsi jz short loc_9D687 xor eax, eax jmp short loc_9D6B2 loc_9D6A6: mov edx, [rdi+18h] or edx, [rcx] not edx test [rax], edx setz al loc_9D6B2: pop rbp retn
bool bitmap_is_subset(long long a1, int **a2) { _DWORD *v2; // rax int *v3; // rcx int v4; // r8d v2 = *(_DWORD **)a1; v3 = *a2; while ( (unsigned long long)v2 < *(_QWORD *)(a1 + 8) ) { v4 = *v3++; if ( (~v4 & *v2++) != 0 ) return 0; } return (~(*v3 | *(_DWORD *)(a1 + 24)) & *v2) == 0; }
bitmap_is_subset: PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI] MOV RDX,qword ptr [RDI + 0x8] MOV RCX,qword ptr [RSI] LAB_0019d687: CMP RAX,RDX JNC 0x0019d6a6 LEA RSI,[RAX + 0x4] MOV R8D,dword ptr [RCX] ADD RCX,0x4 NOT R8D TEST dword ptr [RAX],R8D MOV RAX,RSI JZ 0x0019d687 XOR EAX,EAX JMP 0x0019d6b2 LAB_0019d6a6: MOV EDX,dword ptr [RDI + 0x18] OR EDX,dword ptr [RCX] NOT EDX TEST dword ptr [RAX],EDX SETZ AL LAB_0019d6b2: POP RBP RET
int8 bitmap_is_subset(int8 *param_1,int8 *param_2) { uint uVar1; uint uVar2; uint *puVar3; uint *puVar4; puVar4 = (uint *)*param_2; puVar3 = (uint *)*param_1; do { if ((uint *)param_1[1] <= puVar3) { return CONCAT71((int7)((ulong)puVar3 >> 8), (*puVar3 & ~(*(uint *)(param_1 + 3) | *puVar4)) == 0); } uVar1 = *puVar4; puVar4 = puVar4 + 1; uVar2 = *puVar3; puVar3 = puVar3 + 1; } while ((uVar2 & ~uVar1) == 0); return 0; }
46,774
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::key() const
monkey531[P]llama/common/json.hpp
const typename object_t::key_type& key() const { JSON_ASSERT(m_object != nullptr); if (JSON_HEDLEY_LIKELY(m_object->is_object())) { return m_it.object_iterator->first; } JSON_THROW(invalid_iterator::create(207, "cannot use key() for non-object iterators", m_object)); }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const>::key() const: pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq (%rdi), %rax testq %rax, %rax je 0xb1969 movq %rdi, %r14 cmpb $0x1, (%rax) jne 0xb190b movq 0x8(%r14), %rax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1d5b0 movq %rax, %rbx leaq 0x18(%rsp), %r15 movq %r15, -0x10(%r15) leaq 0x66de7(%rip), %rsi # 0x11870f leaq 0x66e09(%rip), %rdx # 0x118738 leaq 0x8(%rsp), %rdi callq 0x2698a movq (%r14), %rcx movb $0x1, %bpl leaq 0x8(%rsp), %rdx movq %rbx, %rdi movl $0xcf, %esi callq 0xb1faa xorl %ebp, %ebp leaq 0xa57fe(%rip), %rsi # 0x157158 leaq -0x25a2d(%rip), %rdx # 0x8bf34 movq %rbx, %rdi callq 0x1e5a0 leaq 0x63a1c(%rip), %rdi # 0x11538c leaq 0x5c0ec(%rip), %rdx # 0x10da63 leaq 0x67d16(%rip), %rcx # 0x119694 movl $0x3519, %esi # imm = 0x3519 xorl %eax, %eax callq 0x1e4f0 movq %rax, %r14 movq 0x8(%rsp), %rdi cmpq %r15, %rdi je 0xb19ac movq 0x18(%rsp), %rsi incq %rsi callq 0x1dc40 jmp 0xb19ac movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xb19b9 movq %rbx, %rdi callq 0x1d8b0 movq %r14, %rdi callq 0x1e650 nop
_ZNK8nlohmann16json_abi_v3_11_36detail9iter_implIKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE3keyEv: push rbp; char push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov rax, [rdi] test rax, rax jz short loc_B1969 mov r14, rdi cmp byte ptr [rax], 1 jnz short loc_B190B mov rax, [r14+8] add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_B190B: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax lea r15, [rsp+48h+var_30] mov [r15-10h], r15 lea rsi, aCannotUseKeyFo; "cannot use key() for non-object iterato"... lea rdx, aCannotUseKeyFo+29h; "" lea rdi, [rsp+48h+var_40] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rcx, [r14] mov bpl, 1 lea rdx, [rsp+48h+var_40] mov rdi, rbx; this mov esi, 0CFh; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_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_36detail16invalid_iteratorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw loc_B1969: lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aAnchorMObjectN+7; "m_object != nullptr" mov esi, 3519h xor eax, eax call _ggml_abort mov r14, rax mov rdi, [rsp+48h+var_40]; void * cmp rdi, r15 jz short loc_B19AC mov rsi, [rsp+48h+var_30] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B19AC mov r14, rax mov bpl, 1 loc_B19AC: test bpl, bpl jz short loc_B19B9 mov rdi, rbx; void * call ___cxa_free_exception loc_B19B9: mov rdi, r14 call __Unwind_Resume
key: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RAX,qword ptr [RDI] TEST RAX,RAX JZ 0x001b1969 MOV R14,RDI CMP byte ptr [RAX],0x1 JNZ 0x001b190b MOV RAX,qword ptr [R14 + 0x8] ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_001b190b: MOV EDI,0x20 CALL 0x0011d5b0 MOV RBX,RAX LEA R15,[RSP + 0x18] MOV qword ptr [R15 + -0x10],R15 LAB_001b1921: LEA RSI,[0x21870f] LEA RDX,[0x218738] LEA RDI,[RSP + 0x8] CALL 0x0012698a MOV RCX,qword ptr [R14] MOV BPL,0x1 LAB_001b193f: LEA RDX,[RSP + 0x8] MOV RDI,RBX MOV ESI,0xcf CALL 0x001b1faa XOR EBP,EBP LEA RSI,[0x257158] LEA RDX,[0x18bf34] MOV RDI,RBX CALL 0x0011e5a0 LAB_001b1969: LEA RDI,[0x21538c] LEA RDX,[0x20da63] LEA RCX,[0x219694] MOV ESI,0x3519 XOR EAX,EAX CALL 0x0011e4f0
/* nlohmann::json_abi_v3_11_3::detail::iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const>::key() const */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> ::key(iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const> *this) { int8 uVar1; int1 *local_40 [2]; int1 local_30 [16]; if (*(char **)this == (char *)0x0) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x3519, "GGML_ASSERT(%s) failed","m_object != nullptr"); } if (**(char **)this == '\x01') { return *(int8 *)(this + 8); } uVar1 = __cxa_allocate_exception(0x20); local_40[0] = local_30; /* try { // try from 001b1921 to 001b1938 has its CatchHandler @ 001b19a6 */ std::__cxx11::string::_M_construct<char_const*> (local_40,"cannot use key() for non-object iterators",""); /* try { // try from 001b193f to 001b1968 has its CatchHandler @ 001b198a */ _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (uVar1,0xcf,local_40,*(int8 *)this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar1,&invalid_iterator::typeinfo,exception::~exception); }
46,775
get_record_position
eloqsql/storage/maria/ma_blockrec.c
static uchar *get_record_position(MARIA_SHARE *share, uchar *buff, uint record_number, uchar **end_of_data) { uint block_size= share->block_size; uint number_of_records= (uint) buff[DIR_COUNT_OFFSET]; uchar *dir; uchar *data; uint offset, length; #ifdef SANITY_CHECKS if (record_number >= number_of_records || record_number > ((block_size - PAGE_HEADER_SIZE(share) - PAGE_SUFFIX_SIZE) / DIR_ENTRY_SIZE)) { DBUG_PRINT("error", ("Wrong row number: record_number: %u number_of_records: %u", record_number, number_of_records)); return 0; } #endif dir= dir_entry_pos(buff, block_size, record_number); offset= uint2korr(dir); length= uint2korr(dir + 2); #ifdef SANITY_CHECKS if (offset < PAGE_HEADER_SIZE(share) || offset + length > (block_size - number_of_records * DIR_ENTRY_SIZE - PAGE_SUFFIX_SIZE)) { DBUG_PRINT("error", ("Wrong row position: record_number: %u offset: %u " "length: %u number_of_records: %u", record_number, offset, length, number_of_records)); return 0; } #endif data= buff + offset; *end_of_data= data + length; return data; }
O3
c
get_record_position: pushq %rbp movq %rsp, %rbp movq %rsi, %rax movzbl 0x8(%rsi), %esi cmpl %edx, %esi jbe 0x4aff3 movl 0x7bc(%rdi), %r8d movl 0xc18(%rdi), %edi movl %r8d, %r9d subl %edi, %r9d addl $-0x10, %r9d shrl $0x2, %r9d cmpl %edx, %r9d jb 0x4aff3 addl $0xc, %edi leaq (%rax,%r8), %r9 shll $0x2, %edx subq %rdx, %r9 movzwl -0x8(%r9), %edx cmpl %edx, %edi ja 0x4aff3 movzwl -0x6(%r9), %edi leal (%rdi,%rdx), %r9d shll $0x2, %esi subl %esi, %r8d addl $-0x4, %r8d cmpl %r8d, %r9d jbe 0x4aff7 xorl %eax, %eax popq %rbp retq movl %edx, %edx addq %rdx, %rax movl %edi, %edx addq %rax, %rdx movq %rdx, (%rcx) jmp 0x4aff5
get_record_position: push rbp mov rbp, rsp mov rax, rsi movzx esi, byte ptr [rsi+8] cmp esi, edx jbe short loc_4AFF3 mov r8d, [rdi+7BCh] mov edi, [rdi+0C18h] mov r9d, r8d sub r9d, edi add r9d, 0FFFFFFF0h shr r9d, 2 cmp r9d, edx jb short loc_4AFF3 add edi, 0Ch lea r9, [rax+r8] shl edx, 2 sub r9, rdx movzx edx, word ptr [r9-8] cmp edi, edx ja short loc_4AFF3 movzx edi, word ptr [r9-6] lea r9d, [rdi+rdx] shl esi, 2 sub r8d, esi add r8d, 0FFFFFFFCh cmp r9d, r8d jbe short loc_4AFF7 loc_4AFF3: xor eax, eax loc_4AFF5: pop rbp retn loc_4AFF7: mov edx, edx add rax, rdx mov edx, edi add rdx, rax mov [rcx], rdx jmp short loc_4AFF5
long long get_record_position(long long a1, long long a2, unsigned int a3, _QWORD *a4) { unsigned int v5; // esi long long v6; // r8 int v7; // edi long long v8; // r9 unsigned int v9; // edx long long result; // rax v5 = *(unsigned __int8 *)(a2 + 8); if ( v5 <= a3 ) return 0LL; v6 = *(unsigned int *)(a1 + 1980); v7 = *(_DWORD *)(a1 + 3096); if ( (unsigned int)(v6 - v7 - 16) >> 2 < a3 ) return 0LL; v8 = a2 + v6 - 4 * a3; v9 = *(unsigned __int16 *)(v8 - 8); if ( v7 + 12 > v9 || *(unsigned __int16 *)(v8 - 6) + v9 > (unsigned int)v6 - 4 * v5 - 4 ) return 0LL; result = *(unsigned __int16 *)(v8 - 8) + a2; *a4 = result + *(unsigned __int16 *)(v8 - 6); return result; }
get_record_position: PUSH RBP MOV RBP,RSP MOV RAX,RSI MOVZX ESI,byte ptr [RSI + 0x8] CMP ESI,EDX JBE 0x0014aff3 MOV R8D,dword ptr [RDI + 0x7bc] MOV EDI,dword ptr [RDI + 0xc18] MOV R9D,R8D SUB R9D,EDI ADD R9D,-0x10 SHR R9D,0x2 CMP R9D,EDX JC 0x0014aff3 ADD EDI,0xc LEA R9,[RAX + R8*0x1] SHL EDX,0x2 SUB R9,RDX MOVZX EDX,word ptr [R9 + -0x8] CMP EDI,EDX JA 0x0014aff3 MOVZX EDI,word ptr [R9 + -0x6] LEA R9D,[RDI + RDX*0x1] SHL ESI,0x2 SUB R8D,ESI ADD R8D,-0x4 CMP R9D,R8D JBE 0x0014aff7 LAB_0014aff3: XOR EAX,EAX LAB_0014aff5: POP RBP RET LAB_0014aff7: MOV EDX,EDX ADD RAX,RDX MOV EDX,EDI ADD RDX,RAX MOV qword ptr [RCX],RDX JMP 0x0014aff5
long get_record_position(long param_1,long param_2,uint param_3,long *param_4) { ushort uVar1; ushort uVar2; uint uVar3; long lVar4; if (param_3 < *(byte *)(param_2 + 8)) { uVar3 = *(uint *)(param_1 + 0x7bc); if (param_3 <= (uVar3 - *(int *)(param_1 + 0xc18)) - 0x10 >> 2) { lVar4 = (param_2 + (ulong)uVar3) - (ulong)(param_3 << 2); uVar1 = *(ushort *)(lVar4 + -8); if ((*(int *)(param_1 + 0xc18) + 0xcU <= (uint)uVar1) && (uVar2 = *(ushort *)(lVar4 + -6), (uint)uVar2 + (uint)uVar1 <= (uVar3 + (uint)*(byte *)(param_2 + 8) * -4) - 4)) { *param_4 = (ulong)uVar2 + param_2 + (ulong)uVar1; return param_2 + (ulong)uVar1; } } } return 0; }
46,776
void Config::Set<bool>(Config::LayerType, Config::Info<bool> const&, std::common_type<bool>::type const&)
Dolphin-anty/Source/Core/Common/Config/Config.h
void Set(LayerType layer, const Info<T>& info, const std::common_type_t<T>& value) { if (GetLayer(layer)->Set(info, value)) OnConfigChanged(); }
O3
c
void Config::Set<bool>(Config::LayerType, Config::Info<bool> const&, std::common_type<bool>::type const&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rdx, %rbx movq %rsi, %r14 movl %edi, %esi movq %rsp, %r15 movq %r15, %rdi callq 0x17cda movq (%r15), %rdi movq %r14, %rsi movq %rbx, %rdx callq 0xdcd4 movl %eax, %ebx movq 0x8(%r15), %rdi testq %rdi, %rdi je 0xdcc1 callq 0xe286 testb %bl, %bl je 0xdcca callq 0x17dc9 addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq
_ZN6Config3SetIbEEvNS_9LayerTypeERKNS_4InfoIT_EERKNSt11common_typeIJS3_EE4typeE: push r15 push r14 push rbx sub rsp, 10h mov rbx, rdx mov r14, rsi mov esi, edi mov r15, rsp mov rdi, r15 call _ZN6Config8GetLayerENS_9LayerTypeE; Config::GetLayer(Config::LayerType) mov rdi, [r15] mov rsi, r14 mov rdx, rbx call _ZN6Config5Layer3SetIbEEbRKNS_8LocationERKT_; Config::Layer::Set<bool>(Config::Location const&,bool const&) mov ebx, eax mov rdi, [r15+8]; this test rdi, rdi jz short loc_DCC1 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_DCC1: test bl, bl jz short loc_DCCA call _ZN6Config15OnConfigChangedEv; Config::OnConfigChanged(void) loc_DCCA: add rsp, 10h pop rbx pop r14 pop r15 retn
long long Config::Set<bool>(unsigned int a1, long long a2, long long a3) { long long result; // rax char v5; // bl Config *v6; // rdi long long v7; // [rsp+0h] [rbp-28h] BYREF Config *v8; // [rsp+8h] [rbp-20h] Config::GetLayer(&v7, a1); result = Config::Layer::Set<bool>(v7, a2, a3); v5 = result; v6 = v8; if ( v8 ) result = std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(); if ( v5 ) return Config::OnConfigChanged(v6); return result; }
Set<bool>: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RDX MOV R14,RSI MOV ESI,EDI MOV R15,RSP MOV RDI,R15 CALL 0x00117cda MOV RDI,qword ptr [R15] MOV RSI,R14 MOV RDX,RBX CALL 0x0010dcd4 MOV EBX,EAX MOV RDI,qword ptr [R15 + 0x8] TEST RDI,RDI JZ 0x0010dcc1 CALL 0x0010e286 LAB_0010dcc1: TEST BL,BL JZ 0x0010dcca CALL 0x00117dc9 LAB_0010dcca: ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* void Config::Set<bool>(Config::LayerType, Config::Info<bool> const&, std::common_type<bool>::type const&) */ void Config::Set<bool>(int4 param_1,bool *param_2) { bool bVar1; Location *local_28; _Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *local_20; GetLayer((Config *)&local_28,param_1); bVar1 = Layer::Set<bool>(local_28,param_2); if (local_20 != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(local_20); } if (bVar1) { OnConfigChanged((Config *)local_20); } return; }
46,777
ma_apply_redo_purge_row_head_or_tail
eloqsql/storage/maria/ma_blockrec.c
uint _ma_apply_redo_purge_row_head_or_tail(MARIA_HA *info, LSN lsn, uint page_type, const uchar *header) { MARIA_SHARE *share= info->s; pgcache_page_no_t page; uint rownr, empty_space; uchar *buff; int result; uint error; MARIA_PINNED_PAGE page_link; DBUG_ENTER("_ma_apply_redo_purge_row_head_or_tail"); page= page_korr(header); rownr= dirpos_korr(header+PAGE_STORE_SIZE); DBUG_PRINT("enter", ("rowid: %lu page: %lu rownr: %u", (ulong) ma_recordpos(page, rownr), (ulong) page, rownr)); share->state.changed|= (STATE_CHANGED | STATE_NOT_ZEROFILLED | STATE_NOT_MOVABLE); if (!(buff= pagecache_read(share->pagecache, &info->dfile, page, 0, 0, PAGECACHE_PLAIN_PAGE, PAGECACHE_LOCK_WRITE, &page_link.link))) goto err; if (lsn_korr(buff) >= lsn) { /* Already applied Note that in case the page is not anymore a head or tail page a future redo will fix the bitmap. */ check_skipped_lsn(info, lsn_korr(buff), 1, page); if ((uint) (buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == page_type) { empty_space= uint2korr(buff+EMPTY_SPACE_OFFSET); if (!enough_free_entries_on_page(share, buff)) empty_space= 0; /* Page is full */ if (_ma_bitmap_set(info, page, page_type == HEAD_PAGE, empty_space)) goto err; } pagecache_unlock_by_link(share->pagecache, page_link.link, PAGECACHE_LOCK_WRITE_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); DBUG_RETURN(0); } DBUG_ASSERT((buff[PAGE_TYPE_OFFSET] & PAGE_TYPE_MASK) == (uchar) page_type); if (delete_dir_entry(share, buff, rownr, &empty_space) < 0) { _ma_set_fatal_error(info, HA_ERR_WRONG_IN_RECORD); goto err; } page_link.unlock= PAGECACHE_LOCK_WRITE_UNLOCK; page_link.changed= 1; push_dynamic(&info->pinned_pages, (void*) &page_link); result= 0; if (!enough_free_entries_on_page(share, buff)) empty_space= 0; /* Page is full */ /* This will work even if the page was marked as UNALLOCATED_PAGE */ if (_ma_bitmap_set(info, page, page_type == HEAD_PAGE, empty_space)) result= my_errno; DBUG_RETURN(result); err: error= my_errno; pagecache_unlock_by_link(share->pagecache, page_link.link, PAGECACHE_LOCK_WRITE_UNLOCK, PAGECACHE_UNPIN, LSN_IMPOSSIBLE, LSN_IMPOSSIBLE, 0, FALSE); _ma_mark_file_crashed(share); DBUG_ASSERT(!maria_assert_if_crashed_table); DBUG_RETURN((my_errno= error)); }
O3
c
ma_apply_redo_purge_row_head_or_tail: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x28, %rsp movl %edx, %r12d movq %rsi, -0x30(%rbp) movq %rdi, %r14 movq (%rdi), %rbx movl (%rcx), %eax movzbl 0x4(%rcx), %r15d movzbl 0x5(%rcx), %ecx movl %ecx, -0x34(%rbp) orl $0x181, 0x170(%rbx) # imm = 0x181 shlq $0x20, %r15 orq %rax, %r15 movq 0x600(%rbx), %rdi leaq 0x470(%r14), %rsi leaq -0x50(%rbp), %rax movq %r15, %rdx xorl %ecx, %ecx xorl %r8d, %r8d movl $0x1, %r9d pushq %rax pushq $0x4 callq 0x32522 addq $0x10, %rsp testq %rax, %rax je 0x5f8c1 movq %rax, %r13 movzwl (%rax), %eax shlq $0x20, %rax movzbl 0x2(%r13), %ecx shlq $0x30, %rcx orq %rax, %rcx movl 0x3(%r13), %esi orq %rcx, %rsi cmpq -0x30(%rbp), %rsi jge 0x5f837 movl 0x7bc(%rbx), %edi leaq -0x38(%rbp), %rcx movq %r13, %rsi movl -0x34(%rbp), %edx callq 0x5f913 testl %eax, %eax js 0x5f8b4 leaq -0x50(%rbp), %rsi movl $0x6, 0x8(%rsi) movb $0x1, 0x10(%rsi) leaq 0x2e8(%r14), %rdi callq 0x91aae movq %rbx, %rdi movq %r13, %rsi callq 0x5bee6 xorl %r13d, %r13d movl $0x0, %ecx testb %al, %al je 0x5f80e movl -0x38(%rbp), %ecx xorl %edx, %edx cmpl $0x1, %r12d sete %dl movq %r14, %rdi movq %r15, %rsi callq 0x41b8f testb %al, %al je 0x5f901 callq 0xa1a0a movl (%rax), %r13d jmp 0x5f901 movq %r14, %rdi movl $0x1, %edx movq %r15, %rcx callq 0x4c6e5 movzbl 0x7(%r13), %eax andl $0x7, %eax cmpl %r12d, %eax jne 0x5f887 movzwl 0xa(%r13), %eax movl %eax, -0x30(%rbp) movq %rbx, %rdi movq %r13, %rsi callq 0x5bee6 xorl %ecx, %ecx testb %al, %al cmovnel -0x30(%rbp), %ecx xorl %edx, %edx cmpl $0x1, %r12d sete %dl movq %r14, %rdi movq %r15, %rsi callq 0x41b8f testb %al, %al jne 0x5f8c1 movq 0x600(%rbx), %rdi movq -0x50(%rbp), %rsi xorl %r13d, %r13d movl $0x6, %edx movl $0x3, %ecx xorl %r8d, %r8d xorl %r9d, %r9d pushq %r13 pushq %r13 callq 0x3223d addq $0x10, %rsp jmp 0x5f901 movq %r14, %rdi movl $0x7f, %esi callq 0x36934 callq 0xa1a0a movl (%rax), %r13d movq 0x600(%rbx), %rdi movq -0x50(%rbp), %rsi movl $0x6, %edx movl $0x3, %ecx xorl %r8d, %r8d xorl %r9d, %r9d xorl %eax, %eax pushq %rax pushq %rax callq 0x3223d addq $0x10, %rsp movq %rbx, %rdi callq 0x38132 callq 0xa1a0a movl %r13d, (%rax) movl %r13d, %eax addq $0x28, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
_ma_apply_redo_purge_row_head_or_tail: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 28h mov r12d, edx mov [rbp+var_30], rsi mov r14, rdi mov rbx, [rdi] mov eax, [rcx] movzx r15d, byte ptr [rcx+4] movzx ecx, byte ptr [rcx+5] mov [rbp+var_34], ecx or dword ptr [rbx+170h], 181h shl r15, 20h or r15, rax mov rdi, [rbx+600h] lea rsi, [r14+470h] lea rax, [rbp+var_50] mov rdx, r15 xor ecx, ecx xor r8d, r8d mov r9d, 1 push rax push 4 call pagecache_read add rsp, 10h test rax, rax jz loc_5F8C1 mov r13, rax movzx eax, word ptr [rax] shl rax, 20h movzx ecx, byte ptr [r13+2] shl rcx, 30h or rcx, rax mov esi, [r13+3] or rsi, rcx cmp rsi, [rbp+var_30] jge short loc_5F837 mov edi, [rbx+7BCh] lea rcx, [rbp+var_38] mov rsi, r13 mov edx, [rbp+var_34] call delete_dir_entry test eax, eax js loc_5F8B4 lea rsi, [rbp+var_50] mov dword ptr [rsi+8], 6 mov byte ptr [rsi+10h], 1 lea rdi, [r14+2E8h] call insert_dynamic mov rdi, rbx mov rsi, r13 call enough_free_entries_on_page xor r13d, r13d mov ecx, 0 test al, al jz short loc_5F80E mov ecx, [rbp+var_38] loc_5F80E: xor edx, edx cmp r12d, 1 setz dl mov rdi, r14 mov rsi, r15 call _ma_bitmap_set test al, al jz loc_5F901 call _my_thread_var mov r13d, [rax] jmp loc_5F901 loc_5F837: mov rdi, r14 mov edx, 1 mov rcx, r15 call check_skipped_lsn movzx eax, byte ptr [r13+7] and eax, 7 cmp eax, r12d jnz short loc_5F887 movzx eax, word ptr [r13+0Ah] mov dword ptr [rbp+var_30], eax mov rdi, rbx mov rsi, r13 call enough_free_entries_on_page xor ecx, ecx test al, al cmovnz ecx, dword ptr [rbp+var_30] xor edx, edx cmp r12d, 1 setz dl mov rdi, r14 mov rsi, r15 call _ma_bitmap_set test al, al jnz short loc_5F8C1 loc_5F887: mov rdi, [rbx+600h] mov rsi, [rbp+var_50] xor r13d, r13d mov edx, 6 mov ecx, 3 xor r8d, r8d xor r9d, r9d push r13 push r13 call pagecache_unlock_by_link add rsp, 10h jmp short loc_5F901 loc_5F8B4: mov rdi, r14 mov esi, 7Fh call _ma_set_fatal_error loc_5F8C1: call _my_thread_var mov r13d, [rax] mov rdi, [rbx+600h] mov rsi, [rbp+var_50] 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 mov rdi, rbx call _ma_mark_file_crashed call _my_thread_var mov [rax], r13d loc_5F901: mov eax, r13d add rsp, 28h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long ma_apply_redo_purge_row_head_or_tail(long long *a1, signed long long a2, int a3, unsigned int *a4) { long long v6; // rbx long long v7; // rax long long v8; // r15 const char *v9; // r15 long long v10; // rdi const char *v11; // rsi unsigned __int16 *v12; // rax unsigned __int16 *v13; // r13 signed long long v14; // rsi long long v15; // rdx long long v16; // rcx long long v17; // r8 int v18; // r9d bool v19; // al unsigned int v20; // r13d unsigned int v21; // ecx bool v22; // al unsigned int v23; // ecx const char *v24; // rsi const char *v26; // [rsp+0h] [rbp-50h] BYREF int v27; // [rsp+8h] [rbp-48h] char v28; // [rsp+10h] [rbp-40h] unsigned int v29; // [rsp+18h] [rbp-38h] BYREF unsigned int v30; // [rsp+1Ch] [rbp-34h] signed long long v31; // [rsp+20h] [rbp-30h] v31 = a2; v6 = *a1; v7 = *a4; v8 = *((unsigned __int8 *)a4 + 4); v30 = *((unsigned __int8 *)a4 + 5); *(_DWORD *)(v6 + 368) |= 0x181u; v9 = (const char *)(v7 | (v8 << 32)); v10 = *(_QWORD *)(v6 + 1536); v11 = (const char *)(a1 + 142); v12 = (unsigned __int16 *)pagecache_read(v10, (long long)(a1 + 142), (long long)v9, 0, 0LL, 1, 4u, &v26); if ( !v12 ) goto LABEL_14; v13 = v12; v14 = ((unsigned long long)*v12 << 32) | ((unsigned long long)*((unsigned __int8 *)v12 + 2) << 48) | *(unsigned int *)((char *)v12 + 3); if ( v14 >= v31 ) { check_skipped_lsn((long long)a1, v14, 1, (int)v9); if ( (*((_BYTE *)v13 + 7) & 7) != a3 ) goto LABEL_12; LODWORD(v31) = v13[5]; v22 = enough_free_entries_on_page(v6, v13); v23 = 0; if ( v22 ) v23 = v31; v10 = (long long)a1; v11 = v9; if ( !(unsigned __int8)ma_bitmap_set(a1, (unsigned long long)v9, a3 == 1, v23) ) { LABEL_12: v20 = 0; pagecache_unlock_by_link(*(_QWORD *)(v6 + 1536), (long long)v26, 6, 3, 0LL, 0LL, 0); return v20; } LABEL_14: v20 = *(_DWORD *)my_thread_var(v10, v11); v24 = v26; pagecache_unlock_by_link(*(_QWORD *)(v6 + 1536), (long long)v26, 6, 3, 0LL, 0LL, 0); ma_mark_file_crashed(v6); *(_DWORD *)my_thread_var(v6, v24) = v20; return v20; } if ( (int)delete_dir_entry(*(unsigned int *)(v6 + 1980), v12, v30, &v29) < 0 ) { v10 = (long long)a1; v11 = (_BYTE *)(&dword_7C + 3); ma_set_fatal_error(a1, 127LL, v15, v16, v17, v18); goto LABEL_14; } v27 = 6; v28 = 1; insert_dynamic(a1 + 93, &v26); v19 = enough_free_entries_on_page(v6, v13); v20 = 0; v21 = 0; if ( v19 ) v21 = v29; if ( (unsigned __int8)ma_bitmap_set(a1, (unsigned long long)v9, a3 == 1, v21) ) return *(unsigned int *)my_thread_var(a1, v9); return v20; }
_ma_apply_redo_purge_row_head_or_tail: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x28 MOV R12D,EDX MOV qword ptr [RBP + -0x30],RSI MOV R14,RDI MOV RBX,qword ptr [RDI] MOV EAX,dword ptr [RCX] MOVZX R15D,byte ptr [RCX + 0x4] MOVZX ECX,byte ptr [RCX + 0x5] MOV dword ptr [RBP + -0x34],ECX OR dword ptr [RBX + 0x170],0x181 SHL R15,0x20 OR R15,RAX MOV RDI,qword ptr [RBX + 0x600] LEA RSI,[R14 + 0x470] LEA RAX,[RBP + -0x50] MOV RDX,R15 XOR ECX,ECX XOR R8D,R8D MOV R9D,0x1 PUSH RAX PUSH 0x4 CALL 0x00132522 ADD RSP,0x10 TEST RAX,RAX JZ 0x0015f8c1 MOV R13,RAX MOVZX EAX,word ptr [RAX] SHL RAX,0x20 MOVZX ECX,byte ptr [R13 + 0x2] SHL RCX,0x30 OR RCX,RAX MOV ESI,dword ptr [R13 + 0x3] OR RSI,RCX CMP RSI,qword ptr [RBP + -0x30] JGE 0x0015f837 MOV EDI,dword ptr [RBX + 0x7bc] LEA RCX,[RBP + -0x38] MOV RSI,R13 MOV EDX,dword ptr [RBP + -0x34] CALL 0x0015f913 TEST EAX,EAX JS 0x0015f8b4 LEA RSI,[RBP + -0x50] MOV dword ptr [RSI + 0x8],0x6 MOV byte ptr [RSI + 0x10],0x1 LEA RDI,[R14 + 0x2e8] CALL 0x00191aae MOV RDI,RBX MOV RSI,R13 CALL 0x0015bee6 XOR R13D,R13D MOV ECX,0x0 TEST AL,AL JZ 0x0015f80e MOV ECX,dword ptr [RBP + -0x38] LAB_0015f80e: XOR EDX,EDX CMP R12D,0x1 SETZ DL MOV RDI,R14 MOV RSI,R15 CALL 0x00141b8f TEST AL,AL JZ 0x0015f901 CALL 0x001a1a0a MOV R13D,dword ptr [RAX] JMP 0x0015f901 LAB_0015f837: MOV RDI,R14 MOV EDX,0x1 MOV RCX,R15 CALL 0x0014c6e5 MOVZX EAX,byte ptr [R13 + 0x7] AND EAX,0x7 CMP EAX,R12D JNZ 0x0015f887 MOVZX EAX,word ptr [R13 + 0xa] MOV dword ptr [RBP + -0x30],EAX MOV RDI,RBX MOV RSI,R13 CALL 0x0015bee6 XOR ECX,ECX TEST AL,AL CMOVNZ ECX,dword ptr [RBP + -0x30] XOR EDX,EDX CMP R12D,0x1 SETZ DL MOV RDI,R14 MOV RSI,R15 CALL 0x00141b8f TEST AL,AL JNZ 0x0015f8c1 LAB_0015f887: MOV RDI,qword ptr [RBX + 0x600] MOV RSI,qword ptr [RBP + -0x50] XOR R13D,R13D MOV EDX,0x6 MOV ECX,0x3 XOR R8D,R8D XOR R9D,R9D PUSH R13 PUSH R13 CALL 0x0013223d ADD RSP,0x10 JMP 0x0015f901 LAB_0015f8b4: MOV RDI,R14 MOV ESI,0x7f CALL 0x00136934 LAB_0015f8c1: CALL 0x001a1a0a MOV R13D,dword ptr [RAX] MOV RDI,qword ptr [RBX + 0x600] MOV RSI,qword ptr [RBP + -0x50] MOV EDX,0x6 MOV ECX,0x3 XOR R8D,R8D XOR R9D,R9D XOR EAX,EAX PUSH RAX PUSH RAX CALL 0x0013223d ADD RSP,0x10 MOV RDI,RBX CALL 0x00138132 CALL 0x001a1a0a MOV dword ptr [RAX],R13D LAB_0015f901: MOV EAX,R13D ADD RSP,0x28 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int4 _ma_apply_redo_purge_row_head_or_tail(long *param_1,ulong param_2,uint param_3,uint5 *param_4) { long lVar1; uint5 uVar2; char cVar3; int iVar4; ushort *puVar5; int4 *puVar6; int4 uVar7; ulong uVar8; ulong uVar9; int8 local_58; int4 local_50; int1 local_48; int4 local_40; uint local_3c; ulong local_38; lVar1 = *param_1; uVar2 = *param_4; local_3c = (uint)*(byte *)((long)param_4 + 5); *(uint *)(lVar1 + 0x170) = *(uint *)(lVar1 + 0x170) | 0x181; uVar9 = (ulong)uVar2; local_38 = param_2; puVar5 = (ushort *) pagecache_read(*(int8 *)(lVar1 + 0x600),param_1 + 0x8e,uVar9,0,0,1,4,&local_58); if (puVar5 != (ushort *)0x0) { uVar8 = (ulong)*(uint *)((long)puVar5 + 3) | (ulong)(byte)puVar5[1] << 0x30 | (ulong)*puVar5 << 0x20; if ((long)local_38 <= (long)uVar8) { check_skipped_lsn(param_1,uVar8,1,uVar9); if ((*(byte *)((long)puVar5 + 7) & 7) == param_3) { local_38 = CONCAT44(local_38._4_4_,(uint)puVar5[5]); cVar3 = enough_free_entries_on_page(lVar1,puVar5); uVar8 = 0; if (cVar3 != '\0') { uVar8 = local_38 & 0xffffffff; } cVar3 = _ma_bitmap_set(param_1,uVar9,param_3 == 1,uVar8); if (cVar3 != '\0') goto LAB_0015f8c1; } pagecache_unlock_by_link(*(int8 *)(lVar1 + 0x600),local_58,6,3,0,0,0,0); return 0; } iVar4 = delete_dir_entry(*(int4 *)(lVar1 + 0x7bc),puVar5,local_3c,&local_40); if (-1 < iVar4) { local_50 = 6; local_48 = 1; insert_dynamic(param_1 + 0x5d); cVar3 = enough_free_entries_on_page(lVar1,puVar5); uVar7 = 0; if (cVar3 != '\0') { uVar7 = local_40; } cVar3 = _ma_bitmap_set(param_1,uVar9,param_3 == 1,uVar7); if (cVar3 == '\0') { return 0; } puVar6 = (int4 *)_my_thread_var(); return *puVar6; } _ma_set_fatal_error(param_1,0x7f); } LAB_0015f8c1: puVar6 = (int4 *)_my_thread_var(); uVar7 = *puVar6; pagecache_unlock_by_link(*(int8 *)(lVar1 + 0x600),local_58,6,3,0,0,0,0); _ma_mark_file_crashed(lVar1); puVar6 = (int4 *)_my_thread_var(); *puVar6 = uVar7; return uVar7; }
46,778
minja::TextTemplateToken::~TextTemplateToken()
monkey531[P]llama/common/minja.hpp
TextTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, const std::string& t) : TemplateToken(Type::Text, location, pre, post), text(t) {}
O3
cpp
minja::TextTemplateToken::~TextTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0x9193b(%rip), %rax # 0x12af00 addq $0x10, %rax movq %rax, (%rdi) movq 0x30(%rdi), %rdi leaq 0x40(%rbx), %rax cmpq %rax, %rdi je 0x995e4 movq (%rax), %rsi incq %rsi callq 0x1a8e0 leaq 0x90d0d(%rip), %rax # 0x12a2f8 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x99600 callq 0x6e096 movl $0x50, %esi movq %rbx, %rdi popq %rbx jmp 0x1a8e0
_ZN5minja17TextTemplateTokenD0Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja17TextTemplateTokenE; `vtable for'minja::TextTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+30h]; void * lea rax, [rbx+40h] cmp rdi, rax jz short loc_995E4 mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_995E4: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_99600 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_99600: mov esi, 50h ; 'P'; unsigned __int64 mov rdi, rbx; void * pop rbx jmp __ZdlPvm; operator delete(void *,ulong)
void minja::TextTemplateToken::~TextTemplateToken(minja::TextTemplateToken *this) { char *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::TextTemplateToken + 2; v2 = (char *)*((_QWORD *)this + 6); if ( v2 != (char *)this + 64 ) operator delete(v2, *((_QWORD *)this + 8) + 1LL); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); operator delete(this, 0x50uLL); }
~TextTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x22af00] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x30] LEA RAX,[RBX + 0x40] CMP RDI,RAX JZ 0x001995e4 MOV RSI,qword ptr [RAX] INC RSI CALL 0x0011a8e0 LAB_001995e4: LEA RAX,[0x22a2f8] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x00199600 CALL 0x0016e096 LAB_00199600: MOV ESI,0x50 MOV RDI,RBX POP RBX JMP 0x0011a8e0
/* minja::TextTemplateToken::~TextTemplateToken() */ void __thiscall minja::TextTemplateToken::~TextTemplateToken(TextTemplateToken *this) { *(int ***)this = &PTR__TextTemplateToken_0022af10; if (*(TextTemplateToken **)(this + 0x30) != this + 0x40) { operator_delete(*(TextTemplateToken **)(this + 0x30),*(long *)(this + 0x40) + 1); } *(int ***)this = &PTR__TemplateToken_0022a308; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); } operator_delete(this,0x50); return; }
46,779
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, 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>::array_t&&)
monkey531[P]llama/common/json.hpp
static void construct(BasicJsonType& j, typename BasicJsonType::array_t&& arr) { j.m_data.m_value.destroy(j.m_data.m_type); j.m_data.m_type = value_t::array; j.m_data.m_value = std::move(arr); j.set_parents(); j.assert_invariant(); }
O1
cpp
void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>&, 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>::array_t&&): pushq %r14 pushq %rbx pushq %rax movq %rsi, %rbx movq %rdi, %r14 addq $0x8, %rdi movzbl (%r14), %esi callq 0x3ec36 movb $0x2, (%r14) movl $0x18, %edi callq 0x18690 movups (%rbx), %xmm0 movups %xmm0, (%rax) movq 0x10(%rbx), %rcx movq %rcx, 0x10(%rax) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq $0x0, 0x10(%rbx) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi addq $0x8, %rsp popq %rbx popq %r14 jmp 0x3da52 nop
_ZN8nlohmann16json_abi_v3_11_36detail20external_constructorILNS1_7value_tE2EE9constructINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES8_IhSaIhEEvEEEEvRT_ONSJ_7array_tE: push r14 push rbx push rax mov rbx, rsi mov r14, rdi add rdi, 8 movzx esi, byte ptr [r14] call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE10json_value7destroyENS0_6detail7value_tE; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::json_value::destroy(nlohmann::json_abi_v3_11_3::detail::value_t) mov byte ptr [r14], 2 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) movups xmm0, xmmword ptr [rbx] movups xmmword ptr [rax], xmm0 mov rcx, [rbx+10h] mov [rax+10h], rcx xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov qword ptr [rbx+10h], 0 mov [r14+8], rax mov rdi, r14 mov esi, 1 add rsp, 8 pop rbx pop r14 jmp _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)
long long nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<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>>( unsigned __int8 *a1, long long a2) { long long result; // rax nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::json_value::destroy( (void **)a1 + 1, *a1); *a1 = 2; result = operator new(0x18uLL); *(_OWORD *)result = *(_OWORD *)a2; *(_QWORD *)(result + 16) = *(_QWORD *)(a2 + 16); *(_OWORD *)a2 = 0LL; *(_QWORD *)(a2 + 16) = 0LL; *((_QWORD *)a1 + 1) = result; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)a1); return result; }
construct<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 R14 PUSH RBX PUSH RAX MOV RBX,RSI MOV R14,RDI ADD RDI,0x8 MOVZX ESI,byte ptr [R14] CALL 0x0013ec36 MOV byte ptr [R14],0x2 MOV EDI,0x18 CALL 0x00118690 MOVUPS XMM0,xmmword ptr [RBX] MOVUPS xmmword ptr [RAX],XMM0 MOV RCX,qword ptr [RBX + 0x10] MOV qword ptr [RAX + 0x10],RCX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV qword ptr [RBX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 ADD RSP,0x8 POP RBX POP R14 JMP 0x0013da52
/* void nlohmann::json_abi_v3_11_3::detail::external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>::construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, 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>::array_t&&) */ void nlohmann::json_abi_v3_11_3::detail:: external_constructor<(nlohmann::json_abi_v3_11_3::detail::value_t)2>:: construct<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> (basic_json *param_1,array_t *param_2) { int8 uVar1; int8 *puVar2; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::json_value::destroy((json_value *)(param_1 + 8),*param_1); *param_1 = (basic_json)0x2; puVar2 = (int8 *)operator_new(0x18); uVar1 = *(int8 *)(param_2 + 8); *puVar2 = *(int8 *)param_2; puVar2[1] = uVar1; puVar2[2] = *(int8 *)(param_2 + 0x10); *(int8 *)param_2 = 0; *(int8 *)(param_2 + 8) = 0; *(int8 *)(param_2 + 0x10) = 0; *(int8 **)(param_1 + 8) = puVar2; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(param_1,0)); return; }
46,780
my_vsnprintf_mb2
eloqsql/strings/ctype-ucs2.c
static size_t my_vsnprintf_mb2(char *dst, size_t n, const char* fmt, va_list ap) { char *start=dst, *end= dst + n - 1; for (; *fmt ; fmt++) { if (fmt[0] != '%') { if (dst == end) /* End of buffer */ break; *dst++='\0'; *dst++= *fmt; /* Copy ordinary char */ continue; } fmt++; /* Skip if max size is used (to be compatible with printf) */ while ( (*fmt >= '0' && *fmt <= '9') || *fmt == '.' || *fmt == '-') fmt++; if (*fmt == 'l') fmt++; if (*fmt == 's') /* String parameter */ { char *par= va_arg(ap, char *); size_t plen; size_t left_len= (size_t)(end-dst); if (!par) par= (char*) "(null)"; plen= strlen(par); if (left_len <= plen * 2) plen = left_len / 2 - 1; for ( ; plen ; plen--, dst+=2, par++) { dst[0]= '\0'; dst[1]= par[0]; } continue; } else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */ { int iarg; char nbuf[16]; char *pbuf= nbuf; if ((size_t) (end - dst) < 32) break; iarg= va_arg(ap, int); if (*fmt == 'd') int10_to_str((long) iarg, nbuf, -10); else int10_to_str((long) (uint) iarg, nbuf,10); for (; pbuf[0]; pbuf++) { *dst++= '\0'; *dst++= *pbuf; } continue; } /* We come here on '%%', unknown code or too long parameter */ if (dst == end) break; *dst++= '\0'; *dst++= '%'; /* % used as % or unknown code */ } DBUG_ASSERT(dst <= end); *dst='\0'; /* End of errmessage */ return (size_t) (dst - start); }
O0
c
my_vsnprintf_mb2: pushq %rbp movq %rsp, %rbp subq $0xb0, %rsp movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x28(%rbp) movq %rsi, -0x30(%rbp) movq %rdx, -0x38(%rbp) movq %rcx, -0x40(%rbp) movq -0x28(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax addq $-0x1, %rax movq %rax, -0x50(%rbp) movq -0x38(%rbp), %rax cmpb $0x0, (%rax) je 0xbadea movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x25, %eax je 0xbab16 movq -0x28(%rbp), %rax cmpq -0x50(%rbp), %rax jne 0xbaae8 jmp 0xbadea movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x38(%rbp), %rax movb (%rax), %cl movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movb %cl, (%rax) jmp 0xbadd9 movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x30, %eax jl 0xbab3f movq -0x38(%rbp), %rax movsbl (%rax), %ecx movb $0x1, %al cmpl $0x39, %ecx movb %al, -0x79(%rbp) jle 0xbab60 movq -0x38(%rbp), %rax movsbl (%rax), %ecx movb $0x1, %al cmpl $0x2e, %ecx movb %al, -0x79(%rbp) je 0xbab60 movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x2d, %eax sete %al movb %al, -0x79(%rbp) movb -0x79(%rbp), %al testb $0x1, %al jne 0xbab69 jmp 0xbab77 movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0xbab22 movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x6c, %eax jne 0xbab8f movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x73, %eax jne 0xbac93 movq -0x40(%rbp), %rax movq %rax, -0x88(%rbp) movl (%rax), %eax movl %eax, -0x80(%rbp) cmpl $0x28, %eax ja 0xbabd3 movq -0x88(%rbp), %rcx movl -0x80(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0x90(%rbp) jmp 0xbabf0 movq -0x88(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0x90(%rbp) movq -0x90(%rbp), %rax movq (%rax), %rax movq %rax, -0x58(%rbp) movq -0x50(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax movq %rax, -0x68(%rbp) cmpq $0x0, -0x58(%rbp) jne 0xbac1f leaq 0x29d94(%rip), %rax # 0xe49af movq %rax, -0x58(%rbp) movq -0x58(%rbp), %rdi callq 0x38410 movq %rax, -0x60(%rbp) movq -0x68(%rbp), %rax movq -0x60(%rbp), %rcx shlq %rcx cmpq %rcx, %rax ja 0xbac4b movq -0x68(%rbp), %rax shrq %rax subq $0x1, %rax movq %rax, -0x60(%rbp) jmp 0xbac4d cmpq $0x0, -0x60(%rbp) je 0xbac8e movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x58(%rbp), %rax movb (%rax), %cl movq -0x28(%rbp), %rax movb %cl, 0x1(%rax) movq -0x60(%rbp), %rax addq $-0x1, %rax movq %rax, -0x60(%rbp) movq -0x28(%rbp), %rax addq $0x2, %rax movq %rax, -0x28(%rbp) movq -0x58(%rbp), %rax addq $0x1, %rax movq %rax, -0x58(%rbp) jmp 0xbac4d jmp 0xbadd9 movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x64, %eax je 0xbacaf movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x75, %eax jne 0xbada7 leaq -0x20(%rbp), %rax movq %rax, -0x78(%rbp) movq -0x50(%rbp), %rax movq -0x28(%rbp), %rcx subq %rcx, %rax cmpq $0x20, %rax jae 0xbaccd jmp 0xbadea movq -0x40(%rbp), %rax movq %rax, -0xa0(%rbp) movl (%rax), %eax movl %eax, -0x94(%rbp) cmpl $0x28, %eax ja 0xbad07 movq -0xa0(%rbp), %rcx movl -0x94(%rbp), %edx movslq %edx, %rax addq 0x10(%rcx), %rax addl $0x8, %edx movl %edx, (%rcx) movq %rax, -0xa8(%rbp) jmp 0xbad24 movq -0xa0(%rbp), %rcx movq 0x8(%rcx), %rax movq %rax, %rdx addq $0x8, %rdx movq %rdx, 0x8(%rcx) movq %rax, -0xa8(%rbp) movq -0xa8(%rbp), %rax movl (%rax), %eax movl %eax, -0x6c(%rbp) movq -0x38(%rbp), %rax movsbl (%rax), %eax cmpl $0x64, %eax jne 0xbad50 movslq -0x6c(%rbp), %rdi leaq -0x20(%rbp), %rsi movl $0xfffffff6, %edx # imm = 0xFFFFFFF6 callq 0xd1ef0 jmp 0xbad63 movl -0x6c(%rbp), %eax movl %eax, %edi leaq -0x20(%rbp), %rsi movl $0xa, %edx callq 0xd1ef0 jmp 0xbad65 movq -0x78(%rbp), %rax cmpb $0x0, (%rax) je 0xbada5 movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x78(%rbp), %rax movb (%rax), %cl movq -0x28(%rbp), %rax movq %rax, %rdx addq $0x1, %rdx movq %rdx, -0x28(%rbp) movb %cl, (%rax) movq -0x78(%rbp), %rax addq $0x1, %rax movq %rax, -0x78(%rbp) jmp 0xbad65 jmp 0xbadd9 jmp 0xbada9 movq -0x28(%rbp), %rax cmpq -0x50(%rbp), %rax jne 0xbadb5 jmp 0xbadea movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x0, (%rax) movq -0x28(%rbp), %rax movq %rax, %rcx addq $0x1, %rcx movq %rcx, -0x28(%rbp) movb $0x25, (%rax) movq -0x38(%rbp), %rax addq $0x1, %rax movq %rax, -0x38(%rbp) jmp 0xbaac0 jmp 0xbadec jmp 0xbadee movq -0x28(%rbp), %rax movb $0x0, (%rax) movq -0x28(%rbp), %rax movq -0x48(%rbp), %rcx subq %rcx, %rax movq %rax, -0xb0(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0xbae29 movq -0xb0(%rbp), %rax addq $0xb0, %rsp popq %rbp retq callq 0x382c0 nop
my_vsnprintf_mb2: push rbp mov rbp, rsp sub rsp, 0B0h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_28], rdi mov [rbp+var_30], rsi mov [rbp+var_38], rdx mov [rbp+var_40], rcx mov rax, [rbp+var_28] mov [rbp+var_48], rax mov rax, [rbp+var_28] add rax, [rbp+var_30] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_50], rax loc_BAAC0: mov rax, [rbp+var_38] cmp byte ptr [rax], 0 jz loc_BADEA mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 25h ; '%' jz short loc_BAB16 mov rax, [rbp+var_28] cmp rax, [rbp+var_50] jnz short loc_BAAE8 jmp loc_BADEA loc_BAAE8: mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_38] mov cl, [rax] mov rax, [rbp+var_28] mov rdx, rax add rdx, 1 mov [rbp+var_28], rdx mov [rax], cl jmp loc_BADD9 loc_BAB16: mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax loc_BAB22: mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 30h ; '0' jl short loc_BAB3F mov rax, [rbp+var_38] movsx ecx, byte ptr [rax] mov al, 1 cmp ecx, 39h ; '9' mov [rbp+var_79], al jle short loc_BAB60 loc_BAB3F: mov rax, [rbp+var_38] movsx ecx, byte ptr [rax] mov al, 1 cmp ecx, 2Eh ; '.' mov [rbp+var_79], al jz short loc_BAB60 mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 2Dh ; '-' setz al mov [rbp+var_79], al loc_BAB60: mov al, [rbp+var_79] test al, 1 jnz short loc_BAB69 jmp short loc_BAB77 loc_BAB69: mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp short loc_BAB22 loc_BAB77: mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 6Ch ; 'l' jnz short loc_BAB8F mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax loc_BAB8F: mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 73h ; 's' jnz loc_BAC93 mov rax, [rbp+var_40] mov [rbp+var_88], rax mov eax, [rax] mov [rbp+var_80], eax cmp eax, 28h ; '(' ja short loc_BABD3 mov rcx, [rbp+var_88] mov edx, [rbp+var_80] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_90], rax jmp short loc_BABF0 loc_BABD3: mov rcx, [rbp+var_88] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_90], rax loc_BABF0: mov rax, [rbp+var_90] mov rax, [rax] mov [rbp+var_58], rax mov rax, [rbp+var_50] mov rcx, [rbp+var_28] sub rax, rcx mov [rbp+var_68], rax cmp [rbp+var_58], 0 jnz short loc_BAC1F lea rax, aNull; "(null)" mov [rbp+var_58], rax loc_BAC1F: mov rdi, [rbp+var_58] call _strlen mov [rbp+var_60], rax mov rax, [rbp+var_68] mov rcx, [rbp+var_60] shl rcx, 1 cmp rax, rcx ja short loc_BAC4B mov rax, [rbp+var_68] shr rax, 1 sub rax, 1 mov [rbp+var_60], rax loc_BAC4B: jmp short $+2 loc_BAC4D: cmp [rbp+var_60], 0 jz short loc_BAC8E mov rax, [rbp+var_28] mov byte ptr [rax], 0 mov rax, [rbp+var_58] mov cl, [rax] mov rax, [rbp+var_28] mov [rax+1], cl mov rax, [rbp+var_60] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_60], rax mov rax, [rbp+var_28] add rax, 2 mov [rbp+var_28], rax mov rax, [rbp+var_58] add rax, 1 mov [rbp+var_58], rax jmp short loc_BAC4D loc_BAC8E: jmp loc_BADD9 loc_BAC93: mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 64h ; 'd' jz short loc_BACAF mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 75h ; 'u' jnz loc_BADA7 loc_BACAF: lea rax, [rbp+var_20] mov [rbp+var_78], rax mov rax, [rbp+var_50] mov rcx, [rbp+var_28] sub rax, rcx cmp rax, 20h ; ' ' jnb short loc_BACCD jmp loc_BADEA loc_BACCD: mov rax, [rbp+var_40] mov [rbp+var_A0], rax mov eax, [rax] mov [rbp+var_94], eax cmp eax, 28h ; '(' ja short loc_BAD07 mov rcx, [rbp+var_A0] mov edx, [rbp+var_94] movsxd rax, edx add rax, [rcx+10h] add edx, 8 mov [rcx], edx mov [rbp+var_A8], rax jmp short loc_BAD24 loc_BAD07: mov rcx, [rbp+var_A0] mov rax, [rcx+8] mov rdx, rax add rdx, 8 mov [rcx+8], rdx mov [rbp+var_A8], rax loc_BAD24: mov rax, [rbp+var_A8] mov eax, [rax] mov [rbp+var_6C], eax mov rax, [rbp+var_38] movsx eax, byte ptr [rax] cmp eax, 64h ; 'd' jnz short loc_BAD50 movsxd rdi, [rbp+var_6C] lea rsi, [rbp+var_20] mov edx, 0FFFFFFF6h call int10_to_str jmp short loc_BAD63 loc_BAD50: mov eax, [rbp+var_6C] mov edi, eax lea rsi, [rbp+var_20] mov edx, 0Ah call int10_to_str loc_BAD63: jmp short $+2 loc_BAD65: mov rax, [rbp+var_78] cmp byte ptr [rax], 0 jz short loc_BADA5 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_78] mov cl, [rax] mov rax, [rbp+var_28] mov rdx, rax add rdx, 1 mov [rbp+var_28], rdx mov [rax], cl mov rax, [rbp+var_78] add rax, 1 mov [rbp+var_78], rax jmp short loc_BAD65 loc_BADA5: jmp short loc_BADD9 loc_BADA7: jmp short $+2 loc_BADA9: mov rax, [rbp+var_28] cmp rax, [rbp+var_50] jnz short loc_BADB5 jmp short loc_BADEA loc_BADB5: mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, rax add rcx, 1 mov [rbp+var_28], rcx mov byte ptr [rax], 25h ; '%' loc_BADD9: mov rax, [rbp+var_38] add rax, 1 mov [rbp+var_38], rax jmp loc_BAAC0 loc_BADEA: jmp short $+2 loc_BADEC: jmp short $+2 loc_BADEE: mov rax, [rbp+var_28] mov byte ptr [rax], 0 mov rax, [rbp+var_28] mov rcx, [rbp+var_48] sub rax, rcx mov [rbp+var_B0], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_BAE29 mov rax, [rbp+var_B0] add rsp, 0B0h pop rbp retn loc_BAE29: call ___stack_chk_fail
_BYTE * my_vsnprintf_mb2(_BYTE *a1, long long a2, _BYTE *a3, int *a4) { _BYTE *v4; // rax const char **v5; // rax unsigned int *v6; // rax _BYTE *v7; // rax _BYTE *v8; // rax int v10; // [rsp+1Ch] [rbp-94h] int v11; // [rsp+30h] [rbp-80h] bool v12; // [rsp+37h] [rbp-79h] _BYTE *v13; // [rsp+38h] [rbp-78h] unsigned int v14; // [rsp+44h] [rbp-6Ch] unsigned long long v15; // [rsp+48h] [rbp-68h] long long v16; // [rsp+50h] [rbp-60h] const char *v17; // [rsp+58h] [rbp-58h] long long v18; // [rsp+60h] [rbp-50h] _BYTE *v21; // [rsp+88h] [rbp-28h] _BYTE v22[24]; // [rsp+90h] [rbp-20h] BYREF unsigned long long v23; // [rsp+A8h] [rbp-8h] v23 = __readfsqword(0x28u); v21 = a1; v18 = (long long)&a1[a2 - 1]; while ( *a3 ) { if ( *a3 == 37 ) { ++a3; while ( 1 ) { if ( (char)*a3 < 48 || (v12 = 1, (char)*a3 > 57) ) { v12 = 1; if ( *a3 != 46 ) v12 = *a3 == 45; } if ( !v12 ) break; ++a3; } if ( *a3 == 108 ) ++a3; if ( *a3 == 115 ) { v11 = *a4; if ( (unsigned int)*a4 > 0x28 ) { v5 = (const char **)*((_QWORD *)a4 + 1); *((_QWORD *)a4 + 1) = v5 + 1; } else { v5 = (const char **)(*((_QWORD *)a4 + 2) + v11); *a4 = v11 + 8; } v17 = *v5; v15 = v18 - (_QWORD)v21; if ( !*v5 ) v17 = "(null)"; v16 = strlen(v17); if ( v15 <= 2 * v16 ) v16 = (v15 >> 1) - 1; while ( v16 ) { *v21 = 0; v21[1] = *v17; --v16; v21 += 2; ++v17; } } else if ( *a3 == 100 || *a3 == 117 ) { v13 = v22; if ( (unsigned long long)(v18 - (_QWORD)v21) < 0x20 ) break; v10 = *a4; if ( (unsigned int)*a4 > 0x28 ) { v6 = (unsigned int *)*((_QWORD *)a4 + 1); *((_QWORD *)a4 + 1) = v6 + 2; } else { v6 = (unsigned int *)(*((_QWORD *)a4 + 2) + v10); *a4 = v10 + 8; } v14 = *v6; if ( *a3 == 100 ) int10_to_str((int)v14, v22, 4294967286LL); else int10_to_str(v14, v22, 10LL); while ( *v13 ) { *v21 = 0; v7 = v21 + 1; v21 += 2; *v7 = *v13++; } } else { if ( v21 == (_BYTE *)v18 ) break; *v21 = 0; v8 = v21 + 1; v21 += 2; *v8 = 37; } } else { if ( v21 == (_BYTE *)v18 ) break; *v21 = 0; v4 = v21 + 1; v21 += 2; *v4 = *a3; } ++a3; } *v21 = 0; return (_BYTE *)(v21 - a1); }
my_vsnprintf_mb2: PUSH RBP MOV RBP,RSP SUB RSP,0xb0 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x28],RDI MOV qword ptr [RBP + -0x30],RSI MOV qword ptr [RBP + -0x38],RDX MOV qword ptr [RBP + -0x40],RCX MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] ADD RAX,-0x1 MOV qword ptr [RBP + -0x50],RAX LAB_001baac0: MOV RAX,qword ptr [RBP + -0x38] CMP byte ptr [RAX],0x0 JZ 0x001badea MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x25 JZ 0x001bab16 MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x50] JNZ 0x001baae8 JMP 0x001badea LAB_001baae8: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x38] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOV byte ptr [RAX],CL JMP 0x001badd9 LAB_001bab16: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX LAB_001bab22: MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x30 JL 0x001bab3f MOV RAX,qword ptr [RBP + -0x38] MOVSX ECX,byte ptr [RAX] MOV AL,0x1 CMP ECX,0x39 MOV byte ptr [RBP + -0x79],AL JLE 0x001bab60 LAB_001bab3f: MOV RAX,qword ptr [RBP + -0x38] MOVSX ECX,byte ptr [RAX] MOV AL,0x1 CMP ECX,0x2e MOV byte ptr [RBP + -0x79],AL JZ 0x001bab60 MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x2d SETZ AL MOV byte ptr [RBP + -0x79],AL LAB_001bab60: MOV AL,byte ptr [RBP + -0x79] TEST AL,0x1 JNZ 0x001bab69 JMP 0x001bab77 LAB_001bab69: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x001bab22 LAB_001bab77: MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x6c JNZ 0x001bab8f MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX LAB_001bab8f: MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x73 JNZ 0x001bac93 MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0x88],RAX MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x80],EAX CMP EAX,0x28 JA 0x001babd3 MOV RCX,qword ptr [RBP + -0x88] MOV EDX,dword ptr [RBP + -0x80] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0x90],RAX JMP 0x001babf0 LAB_001babd3: MOV RCX,qword ptr [RBP + -0x88] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0x90],RAX LAB_001babf0: MOV RAX,qword ptr [RBP + -0x90] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX MOV qword ptr [RBP + -0x68],RAX CMP qword ptr [RBP + -0x58],0x0 JNZ 0x001bac1f LEA RAX,[0x1e49af] MOV qword ptr [RBP + -0x58],RAX LAB_001bac1f: MOV RDI,qword ptr [RBP + -0x58] CALL 0x00138410 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x68] MOV RCX,qword ptr [RBP + -0x60] SHL RCX,0x1 CMP RAX,RCX JA 0x001bac4b MOV RAX,qword ptr [RBP + -0x68] SHR RAX,0x1 SUB RAX,0x1 MOV qword ptr [RBP + -0x60],RAX LAB_001bac4b: JMP 0x001bac4d LAB_001bac4d: CMP qword ptr [RBP + -0x60],0x0 JZ 0x001bac8e MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x58] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX + 0x1],CL MOV RAX,qword ptr [RBP + -0x60] ADD RAX,-0x1 MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x2 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x1 MOV qword ptr [RBP + -0x58],RAX JMP 0x001bac4d LAB_001bac8e: JMP 0x001badd9 LAB_001bac93: MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x64 JZ 0x001bacaf MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x75 JNZ 0x001bada7 LAB_001bacaf: LEA RAX,[RBP + -0x20] MOV qword ptr [RBP + -0x78],RAX MOV RAX,qword ptr [RBP + -0x50] MOV RCX,qword ptr [RBP + -0x28] SUB RAX,RCX CMP RAX,0x20 JNC 0x001baccd JMP 0x001badea LAB_001baccd: MOV RAX,qword ptr [RBP + -0x40] MOV qword ptr [RBP + -0xa0],RAX MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x94],EAX CMP EAX,0x28 JA 0x001bad07 MOV RCX,qword ptr [RBP + -0xa0] MOV EDX,dword ptr [RBP + -0x94] MOVSXD RAX,EDX ADD RAX,qword ptr [RCX + 0x10] ADD EDX,0x8 MOV dword ptr [RCX],EDX MOV qword ptr [RBP + -0xa8],RAX JMP 0x001bad24 LAB_001bad07: MOV RCX,qword ptr [RBP + -0xa0] MOV RAX,qword ptr [RCX + 0x8] MOV RDX,RAX ADD RDX,0x8 MOV qword ptr [RCX + 0x8],RDX MOV qword ptr [RBP + -0xa8],RAX LAB_001bad24: MOV RAX,qword ptr [RBP + -0xa8] MOV EAX,dword ptr [RAX] MOV dword ptr [RBP + -0x6c],EAX MOV RAX,qword ptr [RBP + -0x38] MOVSX EAX,byte ptr [RAX] CMP EAX,0x64 JNZ 0x001bad50 MOVSXD RDI,dword ptr [RBP + -0x6c] LEA RSI,[RBP + -0x20] MOV EDX,0xfffffff6 CALL 0x001d1ef0 JMP 0x001bad63 LAB_001bad50: MOV EAX,dword ptr [RBP + -0x6c] MOV EDI,EAX LEA RSI,[RBP + -0x20] MOV EDX,0xa CALL 0x001d1ef0 LAB_001bad63: JMP 0x001bad65 LAB_001bad65: MOV RAX,qword ptr [RBP + -0x78] CMP byte ptr [RAX],0x0 JZ 0x001bada5 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x78] MOV CL,byte ptr [RAX] MOV RAX,qword ptr [RBP + -0x28] MOV RDX,RAX ADD RDX,0x1 MOV qword ptr [RBP + -0x28],RDX MOV byte ptr [RAX],CL MOV RAX,qword ptr [RBP + -0x78] ADD RAX,0x1 MOV qword ptr [RBP + -0x78],RAX JMP 0x001bad65 LAB_001bada5: JMP 0x001badd9 LAB_001bada7: JMP 0x001bada9 LAB_001bada9: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x50] JNZ 0x001badb5 JMP 0x001badea LAB_001badb5: MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,RAX ADD RCX,0x1 MOV qword ptr [RBP + -0x28],RCX MOV byte ptr [RAX],0x25 LAB_001badd9: MOV RAX,qword ptr [RBP + -0x38] ADD RAX,0x1 MOV qword ptr [RBP + -0x38],RAX JMP 0x001baac0 LAB_001badea: JMP 0x001badec LAB_001badec: JMP 0x001badee LAB_001badee: MOV RAX,qword ptr [RBP + -0x28] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x48] SUB RAX,RCX MOV qword ptr [RBP + -0xb0],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x001bae29 MOV RAX,qword ptr [RBP + -0xb0] ADD RSP,0xb0 POP RBP RET LAB_001bae29: CALL 0x001382c0
long my_vsnprintf_mb2(int1 *param_1,long param_2,char *param_3,uint *param_4) { uint uVar1; int1 *puVar2; char *pcVar3; int1 *puVar4; long in_FS_OFFSET; bool bVar5; int *local_b0; long *local_98; char *local_80; size_t local_68; char *local_60; char *local_40; int1 *local_30; char local_28 [24]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); puVar2 = param_1 + param_2 + -1; local_30 = param_1; for (local_40 = param_3; *local_40 != '\0'; local_40 = local_40 + 1) { if (*local_40 == '%') { do { pcVar3 = local_40; local_40 = pcVar3 + 1; if (((*local_40 < '0') || (bVar5 = true, '9' < *local_40)) && (bVar5 = true, *local_40 != '.')) { bVar5 = *local_40 == '-'; } } while (bVar5); if (*local_40 == 'l') { local_40 = pcVar3 + 2; } if (*local_40 == 's') { uVar1 = *param_4; if (uVar1 < 0x29) { local_98 = (long *)((long)(int)uVar1 + *(long *)(param_4 + 4)); *param_4 = uVar1 + 8; } else { local_98 = *(long **)(param_4 + 2); *(long **)(param_4 + 2) = local_98 + 1; } local_60 = (char *)*local_98; if (local_60 == (char *)0x0) { local_60 = "(null)"; } local_68 = strlen(local_60); if ((ulong)((long)puVar2 - (long)local_30) <= local_68 * 2) { local_68 = ((ulong)((long)puVar2 - (long)local_30) >> 1) - 1; } for (; local_68 != 0; local_68 = local_68 - 1) { *local_30 = 0; local_30[1] = *local_60; local_30 = local_30 + 2; local_60 = local_60 + 1; } } else if ((*local_40 == 'd') || (*local_40 == 'u')) { local_80 = local_28; if ((ulong)((long)puVar2 - (long)local_30) < 0x20) break; uVar1 = *param_4; if (uVar1 < 0x29) { local_b0 = (int *)((long)(int)uVar1 + *(long *)(param_4 + 4)); *param_4 = uVar1 + 8; } else { local_b0 = *(int **)(param_4 + 2); *(int **)(param_4 + 2) = local_b0 + 2; } if (*local_40 == 'd') { int10_to_str((long)*local_b0,local_28,0xfffffff6); } else { int10_to_str(*local_b0,local_28,10); } for (; *local_80 != '\0'; local_80 = local_80 + 1) { pcVar3 = local_30 + 1; *local_30 = 0; local_30 = local_30 + 2; *pcVar3 = *local_80; } } else { if (local_30 == puVar2) break; puVar4 = local_30 + 1; *local_30 = 0; local_30 = local_30 + 2; *puVar4 = 0x25; } } else { if (local_30 == puVar2) break; pcVar3 = local_30 + 1; *local_30 = 0; local_30 = local_30 + 2; *pcVar3 = *local_40; } } *local_30 = 0; if (*(long *)(in_FS_OFFSET + 0x28) != local_10) { /* WARNING: Subroutine does not return */ __stack_chk_fail(); } return (long)local_30 - (long)param_1; }
46,781
common_sampler_sample(common_sampler*, llama_context*, int, bool)
monkey531[P]llama/common/sampling.cpp
llama_token common_sampler_sample(struct common_sampler * gsmpl, struct llama_context * ctx, int idx, bool grammar_first) { gsmpl->set_logits(ctx, idx); auto & grmr = gsmpl->grmr; auto & chain = gsmpl->chain; auto & cur_p = gsmpl->cur_p; // initialized by set_logits if (grammar_first) { llama_sampler_apply(grmr, &cur_p); } llama_sampler_apply(chain, &cur_p); GGML_ASSERT(cur_p.selected != -1 && "no selected token during sampling - check your sampling configuration"); const llama_token id = cur_p.data[cur_p.selected].id; if (grammar_first) { return id; } // check if it the sampled token fits the grammar { llama_token_data single_token_data = { id, 1.0f, 0.0f }; llama_token_data_array single_token_data_array = { &single_token_data, 1, -1, false }; llama_sampler_apply(grmr, &single_token_data_array); const bool is_valid = single_token_data_array.data[0].logit != -INFINITY; if (is_valid) { return id; } } // resampling: // if the token is not valid, sample again, but first apply the grammar sampler and then the sampling chain gsmpl->set_logits(ctx, idx); llama_sampler_apply(grmr, &cur_p); llama_sampler_apply(chain, &cur_p); GGML_ASSERT(cur_p.selected != -1 && "no selected token during re-sampling - check your sampling configuration"); return cur_p.data[cur_p.selected].id; }
O3
cpp
common_sampler_sample(common_sampler*, llama_context*, int, bool): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movl %ecx, %r12d movl %edx, %ebp movq %rsi, %r15 movq %rdi, %rbx callq 0xce5e2 leaq 0x198(%rbx), %r14 testl %r12d, %r12d je 0xcd4f9 movq 0x138(%rbx), %rdi movq %r14, %rsi callq 0x1adc0 movq 0x140(%rbx), %rdi movq %r14, %rsi callq 0x1adc0 movq 0x1a8(%rbx), %rax cmpq $-0x1, %rax je 0xcd5d8 movq (%r14), %rcx leaq (%rax,%rax,2), %rax movl (%rcx,%rax,4), %r13d testb %r12b, %r12b jne 0xcd5c6 leaq 0xc(%rsp), %rax movl %r13d, (%rax) movss 0x18ba3(%rip), %xmm0 # 0xe60e0 movlps %xmm0, 0x4(%rax) leaq 0x18(%rsp), %r12 movq %rax, (%r12) movq $0x1, 0x8(%r12) movq $-0x1, 0x10(%r12) movb $0x0, 0x18(%r12) movq 0x138(%rbx), %rdi movq %r12, %rsi callq 0x1adc0 movq (%r12), %rax movss 0x27b8f(%rip), %xmm0 # 0xf510c ucomiss 0x4(%rax), %xmm0 jb 0xcd5c6 movq %rbx, %rdi movq %r15, %rsi movl %ebp, %edx callq 0xce5e2 movq 0x138(%rbx), %rdi movq %r14, %rsi callq 0x1adc0 movq 0x140(%rbx), %rdi movq %r14, %rsi callq 0x1adc0 movq 0x1a8(%rbx), %rax cmpq $-0x1, %rax je 0xcd5f4 movq (%r14), %rcx leaq (%rax,%rax,2), %rax movl (%rcx,%rax,4), %r13d movl %r13d, %eax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x27ca2(%rip), %rdi # 0xf5281 leaq 0x1e831(%rip), %rdx # 0xebe17 leaq 0x27d5e(%rip), %rcx # 0xf534b movl $0x133, %esi # imm = 0x133 jmp 0xcd60e leaq 0x27c86(%rip), %rdi # 0xf5281 leaq 0x1e815(%rip), %rdx # 0xebe17 leaq 0x27da2(%rip), %rcx # 0xf53ab movl $0x14f, %esi # imm = 0x14F xorl %eax, %eax callq 0x1aed0
_Z21common_sampler_sampleP14common_samplerP13llama_contextib: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r12d, ecx mov ebp, edx mov r15, rsi mov rbx, rdi call _ZN14common_sampler10set_logitsEP13llama_contexti; common_sampler::set_logits(llama_context *,int) lea r14, [rbx+198h] test r12d, r12d jz short loc_CD4F9 mov rdi, [rbx+138h] mov rsi, r14 call _llama_sampler_apply loc_CD4F9: mov rdi, [rbx+140h] mov rsi, r14 call _llama_sampler_apply mov rax, [rbx+1A8h] cmp rax, 0FFFFFFFFFFFFFFFFh jz loc_CD5D8 mov rcx, [r14] lea rax, [rax+rax*2] mov r13d, [rcx+rax*4] test r12b, r12b jnz loc_CD5C6 lea rax, [rsp+68h+var_5C] mov [rax], r13d movss xmm0, cs:dword_E60E0 movlps qword ptr [rax+4], xmm0 lea r12, [rsp+68h+var_50] mov [r12], rax mov qword ptr [r12+8], 1 mov qword ptr [r12+10h], 0FFFFFFFFFFFFFFFFh mov byte ptr [r12+18h], 0 mov rdi, [rbx+138h] mov rsi, r12 call _llama_sampler_apply mov rax, [r12] movss xmm0, cs:dword_F510C ucomiss xmm0, dword ptr [rax+4] jb short loc_CD5C6 mov rdi, rbx mov rsi, r15 mov edx, ebp call _ZN14common_sampler10set_logitsEP13llama_contexti; common_sampler::set_logits(llama_context *,int) mov rdi, [rbx+138h] mov rsi, r14 call _llama_sampler_apply mov rdi, [rbx+140h] mov rsi, r14 call _llama_sampler_apply mov rax, [rbx+1A8h] cmp rax, 0FFFFFFFFFFFFFFFFh jz short loc_CD5F4 mov rcx, [r14] lea rax, [rax+rax*2] mov r13d, [rcx+rax*4] loc_CD5C6: mov eax, r13d add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_CD5D8: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurPSelected1N; "cur_p.selected != -1 && \"no selected t"... mov esi, 133h jmp short loc_CD60E loc_CD5F4: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aCurPSelected1N_0; "cur_p.selected != -1 && \"no selected t"... mov esi, 14Fh loc_CD60E: xor eax, eax call _ggml_abort
long long common_sampler_sample(_QWORD *a1, long long a2, unsigned int a3, int a4) { _QWORD *v6; // r14 long long v7; // rax unsigned int v8; // r13d long long v9; // rax double v11; // xmm0_8 int v12; // [rsp+Ch] [rbp-5Ch] BYREF double v13; // [rsp+10h] [rbp-58h] BYREF _QWORD v14[3]; // [rsp+18h] [rbp-50h] BYREF char v15; // [rsp+30h] [rbp-38h] ((void (*)(void))common_sampler::set_logits)(); v6 = a1 + 51; if ( a4 ) llama_sampler_apply(a1[39], a1 + 51); llama_sampler_apply(a1[40], a1 + 51); v7 = a1[53]; if ( v7 == -1 ) { v11 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp", 307LL, "GGML_ASSERT(%s) failed", "cur_p.selected != -1 && \"no selected token during sampling - check your sampling configuration\""); } else { v8 = *(_DWORD *)(*v6 + 12 * v7); if ( (_BYTE)a4 ) return v8; v12 = *(_DWORD *)(*v6 + 12 * v7); _mm_storel_ps(&v13, (__m128)0x3F800000u); v14[0] = &v12; v14[1] = 1LL; v14[2] = -1LL; v15 = 0; llama_sampler_apply(a1[39], v14); if ( *(float *)(v14[0] + 4LL) > -INFINITY ) return v8; common_sampler::set_logits(a1, a2, a3); llama_sampler_apply(a1[39], a1 + 51); llama_sampler_apply(a1[40], a1 + 51); v9 = a1[53]; if ( v9 != -1 ) return *(unsigned int *)(*v6 + 12 * v9); v11 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp", 335LL, "GGML_ASSERT(%s) failed", "cur_p.selected != -1 && \"no selected token during re-sampling - check your sampling configuration\""); } return common_sampler_sample_and_accept_n(v11); }
common_sampler_sample: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R12D,ECX MOV EBP,EDX MOV R15,RSI MOV RBX,RDI CALL 0x001ce5e2 LEA R14,[RBX + 0x198] TEST R12D,R12D JZ 0x001cd4f9 MOV RDI,qword ptr [RBX + 0x138] MOV RSI,R14 CALL 0x0011adc0 LAB_001cd4f9: MOV RDI,qword ptr [RBX + 0x140] MOV RSI,R14 CALL 0x0011adc0 MOV RAX,qword ptr [RBX + 0x1a8] CMP RAX,-0x1 JZ 0x001cd5d8 MOV RCX,qword ptr [R14] LEA RAX,[RAX + RAX*0x2] MOV R13D,dword ptr [RCX + RAX*0x4] TEST R12B,R12B JNZ 0x001cd5c6 LEA RAX,[RSP + 0xc] MOV dword ptr [RAX],R13D MOVSS XMM0,dword ptr [0x001e60e0] MOVLPS qword ptr [RAX + 0x4],XMM0 LEA R12,[RSP + 0x18] MOV qword ptr [R12],RAX MOV qword ptr [R12 + 0x8],0x1 MOV qword ptr [R12 + 0x10],-0x1 MOV byte ptr [R12 + 0x18],0x0 MOV RDI,qword ptr [RBX + 0x138] MOV RSI,R12 CALL 0x0011adc0 MOV RAX,qword ptr [R12] MOVSS XMM0,dword ptr [0x001f510c] UCOMISS XMM0,dword ptr [RAX + 0x4] JC 0x001cd5c6 MOV RDI,RBX MOV RSI,R15 MOV EDX,EBP CALL 0x001ce5e2 MOV RDI,qword ptr [RBX + 0x138] MOV RSI,R14 CALL 0x0011adc0 MOV RDI,qword ptr [RBX + 0x140] MOV RSI,R14 CALL 0x0011adc0 MOV RAX,qword ptr [RBX + 0x1a8] CMP RAX,-0x1 JZ 0x001cd5f4 MOV RCX,qword ptr [R14] LEA RAX,[RAX + RAX*0x2] MOV R13D,dword ptr [RCX + RAX*0x4] LAB_001cd5c6: MOV EAX,R13D ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001cd5d8: LEA RDI,[0x1f5281] LEA RDX,[0x1ebe17] LEA RCX,[0x1f534b] MOV ESI,0x133 JMP 0x001cd60e LAB_001cd5f4: LEA RDI,[0x1f5281] LEA RDX,[0x1ebe17] LEA RCX,[0x1f53ab] MOV ESI,0x14f LAB_001cd60e: XOR EAX,EAX CALL 0x0011aed0
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ /* common_sampler_sample(common_sampler*, llama_context*, int, bool) */ int4 common_sampler_sample(common_sampler *param_1,llama_context *param_2,int param_3,bool param_4) { common_sampler *pcVar1; int7 in_register_00000009; char *pcVar2; int8 uVar3; int4 uVar4; int4 local_5c; ulong local_58; int4 *local_50; int8 local_48; int8 local_40; int1 local_38; common_sampler::set_logits(param_1,param_2,param_3); pcVar1 = param_1 + 0x198; if ((int)CONCAT71(in_register_00000009,param_4) != 0) { llama_sampler_apply(*(int8 *)(param_1 + 0x138),pcVar1); } llama_sampler_apply(*(int8 *)(param_1 + 0x140),pcVar1); if (*(long *)(param_1 + 0x1a8) != -1) { uVar4 = *(int4 *)(*(long *)pcVar1 + *(long *)(param_1 + 0x1a8) * 0xc); if (!param_4) { local_50 = &local_5c; local_58 = (ulong)_DAT_001e60e0; local_48 = 1; local_40 = 0xffffffffffffffff; local_38 = 0; local_5c = uVar4; llama_sampler_apply(*(int8 *)(param_1 + 0x138),&local_50); if ((float)local_50[1] <= DAT_001f510c) { common_sampler::set_logits(param_1,param_2,param_3); llama_sampler_apply(*(int8 *)(param_1 + 0x138),pcVar1); llama_sampler_apply(*(int8 *)(param_1 + 0x140),pcVar1); if (*(long *)(param_1 + 0x1a8) == -1) { pcVar2 = "cur_p.selected != -1 && \"no selected token during re-sampling - check your sampling configuration\"" ; uVar3 = 0x14f; goto LAB_001cd60e; } uVar4 = *(int4 *)(*(long *)pcVar1 + *(long *)(param_1 + 0x1a8) * 0xc); } } return uVar4; } pcVar2 = "cur_p.selected != -1 && \"no selected token during sampling - check your sampling configuration\"" ; uVar3 = 0x133; LAB_001cd60e: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/sampling.cpp",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
46,782
PFS_single_stat::aggregate_no_check(PFS_single_stat const*)
eloqsql/storage/perfschema/pfs_stat.h
inline void aggregate_no_check(const PFS_single_stat *stat) { m_count+= stat->m_count; m_sum+= stat->m_sum; if (unlikely(m_min > stat->m_min)) m_min= stat->m_min; if (unlikely(m_max < stat->m_max)) m_max= stat->m_max; }
O0
c
PFS_single_stat::aggregate_no_check(PFS_single_stat const*): pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x18(%rbp) movq -0x10(%rbp), %rcx movq (%rcx), %rcx addq (%rax), %rcx movq %rcx, (%rax) movq -0x10(%rbp), %rcx movq 0x8(%rcx), %rcx addq 0x8(%rax), %rcx movq %rcx, 0x8(%rax) movq 0x10(%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x10(%rcx), %rax seta %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x3fbca movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x10(%rcx), %rcx movq %rcx, 0x10(%rax) movq -0x18(%rbp), %rax movq 0x18(%rax), %rax movq -0x10(%rbp), %rcx cmpq 0x18(%rcx), %rax setb %al andb $0x1, %al movzbl %al, %eax cmpl $0x0, %eax je 0x3fbf7 movq -0x18(%rbp), %rax movq -0x10(%rbp), %rcx movq 0x18(%rcx), %rcx movq %rcx, 0x18(%rax) popq %rbp retq nopl (%rax)
_ZN15PFS_single_stat18aggregate_no_checkEPKS_: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_18], rax mov rcx, [rbp+var_10] mov rcx, [rcx] add rcx, [rax] mov [rax], rcx mov rcx, [rbp+var_10] mov rcx, [rcx+8] add rcx, [rax+8] mov [rax+8], rcx mov rax, [rax+10h] mov rcx, [rbp+var_10] cmp rax, [rcx+10h] setnbe al and al, 1 movzx eax, al cmp eax, 0 jz short loc_3FBCA mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov rcx, [rcx+10h] mov [rax+10h], rcx loc_3FBCA: mov rax, [rbp+var_18] mov rax, [rax+18h] mov rcx, [rbp+var_10] cmp rax, [rcx+18h] setb al and al, 1 movzx eax, al cmp eax, 0 jz short loc_3FBF7 mov rax, [rbp+var_18] mov rcx, [rbp+var_10] mov rcx, [rcx+18h] mov [rax+18h], rcx loc_3FBF7: pop rbp retn
long long PFS_single_stat::aggregate_no_check(PFS_single_stat *this, const PFS_single_stat *a2) { long long result; // rax *(_QWORD *)this += *(_QWORD *)a2; *((_QWORD *)this + 1) += *((_QWORD *)a2 + 1); if ( *((_QWORD *)this + 2) > *((_QWORD *)a2 + 2) ) *((_QWORD *)this + 2) = *((_QWORD *)a2 + 2); result = *((_QWORD *)this + 3) < *((_QWORD *)a2 + 3); if ( *((_QWORD *)this + 3) < *((_QWORD *)a2 + 3) ) { result = (long long)this; *((_QWORD *)this + 3) = *((_QWORD *)a2 + 3); } return result; }
aggregate_no_check: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x18],RAX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX] ADD RCX,qword ptr [RAX] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x8] ADD RCX,qword ptr [RAX + 0x8] MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x10] SETA AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0013fbca MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x10] MOV qword ptr [RAX + 0x10],RCX LAB_0013fbca: MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RCX + 0x18] SETC AL AND AL,0x1 MOVZX EAX,AL CMP EAX,0x0 JZ 0x0013fbf7 MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RCX + 0x18] MOV qword ptr [RAX + 0x18],RCX LAB_0013fbf7: POP RBP RET
/* PFS_single_stat::aggregate_no_check(PFS_single_stat const*) */ void __thiscall PFS_single_stat::aggregate_no_check(PFS_single_stat *this,PFS_single_stat *param_1) { *(long *)this = *(long *)param_1 + *(long *)this; *(long *)(this + 8) = *(long *)(param_1 + 8) + *(long *)(this + 8); if (*(ulong *)(param_1 + 0x10) < *(ulong *)(this + 0x10)) { *(int8 *)(this + 0x10) = *(int8 *)(param_1 + 0x10); } if (*(ulong *)(this + 0x18) < *(ulong *)(param_1 + 0x18)) { *(int8 *)(this + 0x18) = *(int8 *)(param_1 + 0x18); } return; }
46,783
OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/../vtr/array.h
const_reference operator[](int index) const { return _begin[index]; }
O1
c
OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>&) const: movq (%rsi), %rcx movslq (%rcx), %rax movq 0x1b0(%rdi), %rdx movzwl (%rdx,%rax,2), %eax movslq 0x8(%rsi), %rsi cmpq $0x2, %rsi jl 0x43029 movl $0x1, %edi movslq (%rcx,%rdi,4), %r8 orw (%rdx,%r8,2), %ax incq %rdi cmpq %rdi, %rsi jne 0x43018 retq
_ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level20getFaceCompositeVTagERNS1_10ConstArrayIiEE: mov rcx, [rsi] movsxd rax, dword ptr [rcx] mov rdx, [rdi+1B0h] movzx eax, word ptr [rdx+rax*2] movsxd rsi, dword ptr [rsi+8] cmp rsi, 2 jl short locret_43029 mov edi, 1 loc_43018: movsxd r8, dword ptr [rcx+rdi*4] or ax, [rdx+r8*2] inc rdi cmp rsi, rdi jnz short loc_43018 locret_43029: retn
__int16 OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag(long long a1, int **a2) { long long v2; // rcx long long v3; // rdx __int16 result; // ax long long v5; // rsi long long i; // rdi v2 = (long long)*a2; v3 = *(_QWORD *)(a1 + 432); result = *(_WORD *)(v3 + 2LL * **a2); v5 = *((int *)a2 + 2); if ( v5 >= 2 ) { for ( i = 1LL; i != v5; ++i ) result |= *(_WORD *)(v3 + 2LL * *(int *)(v2 + 4 * i)); } return result; }
getFaceCompositeVTag: MOV RCX,qword ptr [RSI] MOVSXD RAX,dword ptr [RCX] MOV RDX,qword ptr [RDI + 0x1b0] MOVZX EAX,word ptr [RDX + RAX*0x2] MOVSXD RSI,dword ptr [RSI + 0x8] CMP RSI,0x2 JL 0x00143029 MOV EDI,0x1 LAB_00143018: MOVSXD R8,dword ptr [RCX + RDI*0x4] OR AX,word ptr [RDX + R8*0x2] INC RDI CMP RSI,RDI JNZ 0x00143018 LAB_00143029: RET
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>&) const */ ushort __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag(Level *this,ConstArray *param_1) { ushort uVar1; long lVar2; uVar1 = *(ushort *)(*(long *)(this + 0x1b0) + (long)**(int **)param_1 * 2); if (1 < (long)*(int *)(param_1 + 8)) { lVar2 = 1; do { uVar1 = uVar1 | *(ushort *)(*(long *)(this + 0x1b0) + (long)(*(int **)param_1)[lVar2] * 2); lVar2 = lVar2 + 1; } while (*(int *)(param_1 + 8) != lVar2); } return uVar1; }
46,784
OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>&) const
NVIDIA-RTX[P]OSD-Lite/opensubdiv/vtr/../vtr/array.h
const_reference operator[](int index) const { return _begin[index]; }
O3
c
OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>&) const: movq (%rsi), %rcx movslq (%rcx), %rax movq 0x1b0(%rdi), %rdx movzwl (%rdx,%rax,2), %eax movslq 0x8(%rsi), %rsi cmpq $0x2, %rsi jl 0x4448b movl $0x1, %edi movslq (%rcx,%rdi,4), %r8 orw (%rdx,%r8,2), %ax incq %rdi cmpq %rdi, %rsi jne 0x4447a retq
_ZNK10OpenSubdiv6v3_6_03Vtr8internal5Level20getFaceCompositeVTagERNS1_10ConstArrayIiEE: mov rcx, [rsi] movsxd rax, dword ptr [rcx] mov rdx, [rdi+1B0h] movzx eax, word ptr [rdx+rax*2] movsxd rsi, dword ptr [rsi+8] cmp rsi, 2 jl short locret_4448B mov edi, 1 loc_4447A: movsxd r8, dword ptr [rcx+rdi*4] or ax, [rdx+r8*2] inc rdi cmp rsi, rdi jnz short loc_4447A locret_4448B: retn
__int16 OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag(long long a1, int **a2) { long long v2; // rcx long long v3; // rdx __int16 result; // ax long long v5; // rsi long long i; // rdi v2 = (long long)*a2; v3 = *(_QWORD *)(a1 + 432); result = *(_WORD *)(v3 + 2LL * **a2); v5 = *((int *)a2 + 2); if ( v5 >= 2 ) { for ( i = 1LL; i != v5; ++i ) result |= *(_WORD *)(v3 + 2LL * *(int *)(v2 + 4 * i)); } return result; }
getFaceCompositeVTag: MOV RCX,qword ptr [RSI] MOVSXD RAX,dword ptr [RCX] MOV RDX,qword ptr [RDI + 0x1b0] MOVZX EAX,word ptr [RDX + RAX*0x2] MOVSXD RSI,dword ptr [RSI + 0x8] CMP RSI,0x2 JL 0x0014448b MOV EDI,0x1 LAB_0014447a: MOVSXD R8,dword ptr [RCX + RDI*0x4] OR AX,word ptr [RDX + R8*0x2] INC RDI CMP RSI,RDI JNZ 0x0014447a LAB_0014448b: RET
/* OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag(OpenSubdiv::v3_6_0::Vtr::ConstArray<int>&) const */ ushort __thiscall OpenSubdiv::v3_6_0::Vtr::internal::Level::getFaceCompositeVTag(Level *this,ConstArray *param_1) { ushort uVar1; long lVar2; uVar1 = *(ushort *)(*(long *)(this + 0x1b0) + (long)**(int **)param_1 * 2); if (1 < (long)*(int *)(param_1 + 8)) { lVar2 = 1; do { uVar1 = uVar1 | *(ushort *)(*(long *)(this + 0x1b0) + (long)(*(int **)param_1)[lVar2] * 2); lVar2 = lVar2 + 1; } while (*(int *)(param_1 + 8) != lVar2); } return uVar1; }
46,785
thr_unlock
eloqsql/mysys/thr_lock.c
void thr_unlock(THR_LOCK_DATA *data, uint unlock_flags) { THR_LOCK *lock=data->lock; enum thr_lock_type lock_type=data->type; DBUG_ENTER("thr_unlock"); DBUG_PRINT("lock",("data: %p thread: %lu lock: %p", data, (ulong) data->owner->thread_id, lock)); mysql_mutex_lock(&lock->mutex); check_locks(lock,"start of release lock", lock_type, 0); if (((*data->prev)=data->next)) /* remove from lock-list */ data->next->prev= data->prev; else if (lock_type <= TL_READ_NO_INSERT) lock->read.last=data->prev; else if (lock_type == TL_WRITE_DELAYED && data->cond) { /* This only happens in extreme circumstances when a write delayed lock that is waiting for a lock */ lock->write_wait.last=data->prev; /* Put it on wait queue */ } else lock->write.last=data->prev; if (unlock_flags & THR_UNLOCK_UPDATE_STATUS) { /* External lock was not called; Update or restore status */ if (lock_type >= TL_WRITE_CONCURRENT_INSERT) { if (lock->update_status) (*lock->update_status)(data->status_param); } else { if (lock->restore_status) (*lock->restore_status)(data->status_param); } } if (lock_type == TL_READ_NO_INSERT) lock->read_no_write_count--; data->type=TL_UNLOCK; /* Mark unlocked */ wake_up_waiters(lock); mysql_mutex_unlock(&lock->mutex); DBUG_VOID_RETURN; }
O3
c
thr_unlock: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movl %esi, %r12d movq %rdi, %r15 movq 0x18(%rdi), %r14 movl 0x40(%rdi), %r13d leaq 0x18(%r14), %rbx cmpq $0x0, 0x58(%r14) jne 0x5cd8a movq %rbx, %rdi callq 0x28530 movq 0x8(%r15), %rax movq 0x10(%r15), %rcx movq %rax, (%rcx) testq %rax, %rax je 0x5cce1 movq 0x10(%r15), %rcx movq %rcx, 0x10(%rax) jmp 0x5cd1c cmpl $0x5, %r13d jg 0x5ccf1 movq 0x10(%r15), %rax movq %rax, 0x78(%r14) jmp 0x5cd1c cmpl $0x9, %r13d jne 0x5cd11 cmpq $0x0, 0x20(%r15) je 0x5cd11 movq 0x10(%r15), %rax movq %rax, 0x88(%r14) testb $0x1, %r12b jne 0x5cd28 jmp 0x5cd5b movq 0x10(%r15), %rax movq %rax, 0x98(%r14) testb $0x1, %r12b je 0x5cd4e cmpl $0x8, %r13d jl 0x5cd3c movq 0xc0(%r14), %rax testq %rax, %rax je 0x5cd5b movq 0x28(%r15), %rdi callq *%rax jmp 0x5cd5b movq 0xc8(%r14), %rax testq %rax, %rax je 0x5cd4e movq 0x28(%r15), %rdi callq *%rax cmpl $0x5, %r13d jne 0x5cd5b decl 0xa8(%r14) movl $0x0, 0x40(%r15) movq %r14, %rdi callq 0x5cdb5 movq 0x58(%r14), %rdi testq %rdi, %rdi jne 0x5cda3 movq %rbx, %rdi addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp jmp 0x28260 leaq 0x360fd(%rip), %rsi # 0x92e8e movq %rbx, %rdi movl $0x3c0, %edx # imm = 0x3C0 callq 0x29e8c jmp 0x5ccc7 leaq 0x2d35a6(%rip), %rax # 0x330350 movq (%rax), %rax callq *0x160(%rax) jmp 0x5cd74
thr_unlock: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov r12d, esi mov r15, rdi mov r14, [rdi+18h] mov r13d, [rdi+40h] lea rbx, [r14+18h] cmp qword ptr [r14+58h], 0 jnz loc_5CD8A mov rdi, rbx call _pthread_mutex_lock loc_5CCC7: mov rax, [r15+8] mov rcx, [r15+10h] mov [rcx], rax test rax, rax jz short loc_5CCE1 mov rcx, [r15+10h] mov [rax+10h], rcx jmp short loc_5CD1C loc_5CCE1: cmp r13d, 5 jg short loc_5CCF1 mov rax, [r15+10h] mov [r14+78h], rax jmp short loc_5CD1C loc_5CCF1: cmp r13d, 9 jnz short loc_5CD11 cmp qword ptr [r15+20h], 0 jz short loc_5CD11 mov rax, [r15+10h] mov [r14+88h], rax test r12b, 1 jnz short loc_5CD28 jmp short loc_5CD5B loc_5CD11: mov rax, [r15+10h] mov [r14+98h], rax loc_5CD1C: test r12b, 1 jz short loc_5CD4E cmp r13d, 8 jl short loc_5CD3C loc_5CD28: mov rax, [r14+0C0h] test rax, rax jz short loc_5CD5B mov rdi, [r15+28h] call rax jmp short loc_5CD5B loc_5CD3C: mov rax, [r14+0C8h] test rax, rax jz short loc_5CD4E mov rdi, [r15+28h] call rax loc_5CD4E: cmp r13d, 5 jnz short loc_5CD5B dec dword ptr [r14+0A8h] loc_5CD5B: mov dword ptr [r15+40h], 0 mov rdi, r14 call wake_up_waiters mov rdi, [r14+58h] test rdi, rdi jnz short loc_5CDA3 loc_5CD74: mov rdi, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp jmp _pthread_mutex_unlock loc_5CD8A: lea rsi, aWorkspaceLlm4b_11; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 3C0h call psi_mutex_lock jmp loc_5CCC7 loc_5CDA3: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_5CD74
long long thr_unlock(long long a1, char a2) { long long v2; // r14 int v3; // r13d long long v4; // rax void ( *v5)(_QWORD); // rax void ( *v6)(_QWORD); // rax long long v7; // rdi v2 = *(_QWORD *)(a1 + 24); v3 = *(_DWORD *)(a1 + 64); if ( *(_QWORD *)(v2 + 88) ) psi_mutex_lock(v2 + 24, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c", 0x3C0u); else pthread_mutex_lock(v2 + 24); v4 = *(_QWORD *)(a1 + 8); **(_QWORD **)(a1 + 16) = v4; if ( v4 ) { *(_QWORD *)(v4 + 16) = *(_QWORD *)(a1 + 16); } else if ( v3 > 5 ) { if ( v3 == 9 && *(_QWORD *)(a1 + 32) ) { *(_QWORD *)(v2 + 136) = *(_QWORD *)(a1 + 16); if ( (a2 & 1) == 0 ) goto LABEL_20; goto LABEL_14; } *(_QWORD *)(v2 + 152) = *(_QWORD *)(a1 + 16); } else { *(_QWORD *)(v2 + 120) = *(_QWORD *)(a1 + 16); } if ( (a2 & 1) != 0 ) { if ( v3 >= 8 ) { LABEL_14: v5 = *(void ( **)(_QWORD))(v2 + 192); if ( v5 ) v5(*(_QWORD *)(a1 + 40)); goto LABEL_20; } v6 = *(void ( **)(_QWORD))(v2 + 200); if ( v6 ) v6(*(_QWORD *)(a1 + 40)); } if ( v3 == 5 ) --*(_DWORD *)(v2 + 168); LABEL_20: *(_DWORD *)(a1 + 64) = 0; wake_up_waiters(v2); v7 = *(_QWORD *)(v2 + 88); if ( v7 ) ((void ( *)(long long))PSI_server[44])(v7); return pthread_mutex_unlock(v2 + 24); }
thr_unlock: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R12D,ESI MOV R15,RDI MOV R14,qword ptr [RDI + 0x18] MOV R13D,dword ptr [RDI + 0x40] LEA RBX,[R14 + 0x18] CMP qword ptr [R14 + 0x58],0x0 JNZ 0x0015cd8a MOV RDI,RBX CALL 0x00128530 LAB_0015ccc7: MOV RAX,qword ptr [R15 + 0x8] MOV RCX,qword ptr [R15 + 0x10] MOV qword ptr [RCX],RAX TEST RAX,RAX JZ 0x0015cce1 MOV RCX,qword ptr [R15 + 0x10] MOV qword ptr [RAX + 0x10],RCX JMP 0x0015cd1c LAB_0015cce1: CMP R13D,0x5 JG 0x0015ccf1 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [R14 + 0x78],RAX JMP 0x0015cd1c LAB_0015ccf1: CMP R13D,0x9 JNZ 0x0015cd11 CMP qword ptr [R15 + 0x20],0x0 JZ 0x0015cd11 MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [R14 + 0x88],RAX TEST R12B,0x1 JNZ 0x0015cd28 JMP 0x0015cd5b LAB_0015cd11: MOV RAX,qword ptr [R15 + 0x10] MOV qword ptr [R14 + 0x98],RAX LAB_0015cd1c: TEST R12B,0x1 JZ 0x0015cd4e CMP R13D,0x8 JL 0x0015cd3c LAB_0015cd28: MOV RAX,qword ptr [R14 + 0xc0] TEST RAX,RAX JZ 0x0015cd5b MOV RDI,qword ptr [R15 + 0x28] CALL RAX JMP 0x0015cd5b LAB_0015cd3c: MOV RAX,qword ptr [R14 + 0xc8] TEST RAX,RAX JZ 0x0015cd4e MOV RDI,qword ptr [R15 + 0x28] CALL RAX LAB_0015cd4e: CMP R13D,0x5 JNZ 0x0015cd5b DEC dword ptr [R14 + 0xa8] LAB_0015cd5b: MOV dword ptr [R15 + 0x40],0x0 MOV RDI,R14 CALL 0x0015cdb5 MOV RDI,qword ptr [R14 + 0x58] TEST RDI,RDI JNZ 0x0015cda3 LAB_0015cd74: MOV RDI,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP JMP 0x00128260 LAB_0015cd8a: LEA RSI,[0x192e8e] MOV RDI,RBX MOV EDX,0x3c0 CALL 0x00129e8c JMP 0x0015ccc7 LAB_0015cda3: LEA RAX,[0x430350] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x0015cd74
void thr_unlock(long param_1,uint param_2) { pthread_mutex_t *__mutex; int iVar1; long lVar2; long lVar3; lVar2 = *(long *)(param_1 + 0x18); iVar1 = *(int *)(param_1 + 0x40); __mutex = (pthread_mutex_t *)(lVar2 + 0x18); if (*(long *)(lVar2 + 0x58) == 0) { pthread_mutex_lock(__mutex); } else { psi_mutex_lock(__mutex,"/workspace/llm4binary/github2025/eloqsql/mysys/thr_lock.c",0x3c0); } lVar3 = *(long *)(param_1 + 8); **(long **)(param_1 + 0x10) = lVar3; if (lVar3 == 0) { if (iVar1 < 6) { *(int8 *)(lVar2 + 0x78) = *(int8 *)(param_1 + 0x10); goto LAB_0015cd1c; } if ((iVar1 != 9) || (*(long *)(param_1 + 0x20) == 0)) { *(int8 *)(lVar2 + 0x98) = *(int8 *)(param_1 + 0x10); goto LAB_0015cd1c; } *(int8 *)(lVar2 + 0x88) = *(int8 *)(param_1 + 0x10); if ((param_2 & 1) == 0) goto LAB_0015cd5b; LAB_0015cd28: if (*(code **)(lVar2 + 0xc0) != (code *)0x0) { (**(code **)(lVar2 + 0xc0))(*(int8 *)(param_1 + 0x28)); } } else { *(int8 *)(lVar3 + 0x10) = *(int8 *)(param_1 + 0x10); LAB_0015cd1c: if ((param_2 & 1) != 0) { if (7 < iVar1) goto LAB_0015cd28; if (*(code **)(lVar2 + 200) != (code *)0x0) { (**(code **)(lVar2 + 200))(*(int8 *)(param_1 + 0x28)); } } if (iVar1 == 5) { *(int *)(lVar2 + 0xa8) = *(int *)(lVar2 + 0xa8) + -1; } } LAB_0015cd5b: *(int4 *)(param_1 + 0x40) = 0; wake_up_waiters(lVar2); if (*(long *)(lVar2 + 0x58) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(__mutex); return; }
46,786
js_inner_module_evaluation
bluesky950520[P]quickjs/quickjs.c
static int js_inner_module_evaluation(JSContext *ctx, JSModuleDef *m, int index, JSModuleDef **pstack_top, JSValue *pvalue) { JSModuleDef *m1; int i; if (js_check_stack_overflow(ctx->rt, 0)) { JS_ThrowStackOverflow(ctx); *pvalue = JS_GetException(ctx); return -1; } #ifdef DUMP_MODULE_RESOLVE if (check_dump_flag(ctx->rt, DUMP_MODULE_RESOLVE)) { char buf1[ATOM_GET_STR_BUF_SIZE]; printf("js_inner_module_evaluation '%s':\n", JS_AtomGetStr(ctx, buf1, sizeof(buf1), m->module_name)); } #endif if (m->status == JS_MODULE_STATUS_EVALUATING_ASYNC || m->status == JS_MODULE_STATUS_EVALUATED) { if (m->eval_has_exception) { *pvalue = JS_DupValue(ctx, m->eval_exception); return -1; } else { *pvalue = JS_UNDEFINED; return index; } } if (m->status == JS_MODULE_STATUS_EVALUATING) { *pvalue = JS_UNDEFINED; return index; } assert(m->status == JS_MODULE_STATUS_LINKED); m->status = JS_MODULE_STATUS_EVALUATING; m->dfs_index = index; m->dfs_ancestor_index = index; m->pending_async_dependencies = 0; index++; /* push 'm' on stack */ m->stack_prev = *pstack_top; *pstack_top = m; for(i = 0; i < m->req_module_entries_count; i++) { JSReqModuleEntry *rme = &m->req_module_entries[i]; m1 = rme->module; index = js_inner_module_evaluation(ctx, m1, index, pstack_top, pvalue); if (index < 0) return -1; assert(m1->status == JS_MODULE_STATUS_EVALUATING || m1->status == JS_MODULE_STATUS_EVALUATING_ASYNC || m1->status == JS_MODULE_STATUS_EVALUATED); if (m1->status == JS_MODULE_STATUS_EVALUATING) { m->dfs_ancestor_index = min_int(m->dfs_ancestor_index, m1->dfs_ancestor_index); } else { m1 = m1->cycle_root; assert(m1->status == JS_MODULE_STATUS_EVALUATING_ASYNC || m1->status == JS_MODULE_STATUS_EVALUATED); if (m1->eval_has_exception) { *pvalue = JS_DupValue(ctx, m1->eval_exception); return -1; } } if (m1->async_evaluation) { m->pending_async_dependencies++; if (js_resize_array(ctx, (void **)&m1->async_parent_modules, sizeof(m1->async_parent_modules[0]), &m1->async_parent_modules_size, m1->async_parent_modules_count + 1)) { *pvalue = JS_GetException(ctx); return -1; } m1->async_parent_modules[m1->async_parent_modules_count++] = m; } } if (m->pending_async_dependencies > 0) { assert(!m->async_evaluation); m->async_evaluation = TRUE; m->async_evaluation_timestamp = ctx->rt->module_async_evaluation_next_timestamp++; } else if (m->has_tla) { assert(!m->async_evaluation); m->async_evaluation = TRUE; m->async_evaluation_timestamp = ctx->rt->module_async_evaluation_next_timestamp++; js_execute_async_module(ctx, m); } else { if (js_execute_sync_module(ctx, m, pvalue) < 0) return -1; } assert(m->dfs_ancestor_index <= m->dfs_index); if (m->dfs_index == m->dfs_ancestor_index) { for(;;) { /* pop m1 from stack */ m1 = *pstack_top; *pstack_top = m1->stack_prev; if (!m1->async_evaluation) { m1->status = JS_MODULE_STATUS_EVALUATED; } else { m1->status = JS_MODULE_STATUS_EVALUATING_ASYNC; } /* spec bug: cycle_root must be assigned before the test */ m1->cycle_root = m; if (m1 == m) break; } } *pvalue = JS_UNDEFINED; return index; }
O2
c
js_inner_module_evaluation: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, %rbx movq %rdi, %r12 movq 0x18(%rdi), %rax cmpq %rbp, 0xe8(%rax) jbe 0x4015a movq %r12, %rdi callq 0x39941 movq 0x18(%r12), %rcx movq 0xf0(%rcx), %rdx movq 0xf8(%rcx), %rax andl $0x0, 0xf0(%rcx) movq $0x4, 0xf8(%rcx) movq %rdx, (%rbx) jmp 0x40195 movl %edx, %r14d movq %rsi, %r15 movl 0x80(%rsi), %eax movl %eax, %esi shrl $0x18, %esi leal -0x4(%rsi), %edx cmpl $0x2, %edx jae 0x4019b cmpb $0x0, 0xf0(%r15) je 0x401a0 movq 0xf8(%r15), %rcx movq 0x100(%r15), %rax cmpl $-0x9, %eax jb 0x40192 incl (%rcx) movq %rcx, (%rbx) pushq $-0x1 popq %r14 jmp 0x401a6 cmpl $0x3, %esi jne 0x401bc andl $0x0, (%rbx) pushq $0x3 popq %rax movq %rax, 0x8(%rbx) movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r12, -0x30(%rbp) movq %rbx, -0x38(%rbp) andl $0xffffff, %eax # imm = 0xFFFFFF orl $0x3000000, %eax # imm = 0x3000000 movl %eax, 0x80(%r15) movl %r14d, 0x84(%r15) movl %r14d, 0x88(%r15) andl $0x0, 0xa8(%r15) incl %r14d movq (%rcx), %rax movq %rax, 0x90(%r15) movq %rcx, -0x40(%rbp) movq %r15, (%rcx) pushq $0x8 popq %r12 xorl %r13d, %r13d movslq 0x20(%r15), %rax cmpq %rax, %r13 jge 0x402dc movq 0x18(%r15), %rax movq (%rax,%r12), %rbx movq -0x30(%rbp), %rdi movq %rbx, %rsi movl %r14d, %edx movq -0x40(%rbp), %rcx movq -0x38(%rbp), %r8 callq 0x40104 testl %eax, %eax js 0x40323 movl %eax, %r14d movzbl 0x83(%rbx), %eax shll $0x18, %eax cmpl $0x3000000, %eax # imm = 0x3000000 jne 0x40269 movl 0x88(%r15), %eax movl 0x88(%rbx), %ecx cmpl %ecx, %eax cmovll %eax, %ecx movl %ecx, 0x88(%r15) jmp 0x4027d movq 0xb8(%rbx), %rbx cmpb $0x0, 0xf0(%rbx) jne 0x4035c cmpl $0x0, 0xac(%rbx) je 0x402d0 incl 0xa8(%r15) leaq 0x98(%rbx), %rsi leaq 0xa4(%rbx), %rcx movl 0xa0(%rbx), %r8d incl %r8d movq -0x30(%rbp), %rdi pushq $0x8 popq %rdx callq 0x3ec9f testl %eax, %eax jne 0x4032b movq 0x98(%rbx), %rax movslq 0xa0(%rbx), %rcx leal 0x1(%rcx), %edx movl %edx, 0xa0(%rbx) movq %r15, (%rax,%rcx,8) incq %r13 addq $0x10, %r12 jmp 0x40206 cmpl $0x0, 0xa8(%r15) jle 0x4037a movl $0x1, 0xac(%r15) movq -0x30(%rbp), %rax movq 0x18(%rax), %rax movq 0x158(%rax), %rcx leaq 0x1(%rcx), %rdx movq %rdx, 0x158(%rax) movq %rcx, 0xb0(%r15) movq -0x38(%rbp), %rbx movq -0x40(%rbp), %r12 jmp 0x403dc pushq $-0x1 popq %rax jmp 0x401ad movq -0x30(%rbp), %rax movq 0x18(%rax), %rcx movq 0xf0(%rcx), %rdx movq 0xf8(%rcx), %rax andl $0x0, 0xf0(%rcx) movq $0x4, 0xf8(%rcx) movq -0x38(%rbp), %rbx jmp 0x40155 movq 0xf8(%rbx), %rcx movq 0x100(%rbx), %rax cmpl $-0x9, %eax jb 0x40371 incl (%rcx) movq -0x38(%rbp), %rbx jmp 0x40192 cmpb $0x0, 0x80(%r15) movq -0x38(%rbp), %rbx movq -0x40(%rbp), %r12 je 0x403c2 movl $0x1, 0xac(%r15) movq -0x30(%rbp), %rdi movq 0x18(%rdi), %rax movq 0x158(%rax), %rcx leaq 0x1(%rcx), %rdx movq %rdx, 0x158(%rax) movq %rcx, 0xb0(%r15) movq %r15, %rsi callq 0x40423 jmp 0x403dc movq -0x30(%rbp), %rdi movq %r15, %rsi movq %rbx, %rdx callq 0x40544 testl %eax, %eax pushq $-0x1 popq %rax js 0x401ad movl 0x84(%r15), %eax cmpl 0x88(%r15), %eax jne 0x401a0 movq (%r12), %rax movq 0x90(%rax), %rcx movq %rcx, (%r12) cmpl $0x0, 0xac(%rax) sete %cl orb $0x4, %cl movb %cl, 0x83(%rax) movq %r15, 0xb8(%rax) cmpq %r15, %rax jne 0x403f0 jmp 0x401a0
js_inner_module_evaluation: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov rbx, r8 mov r12, rdi mov rax, [rdi+18h] cmp [rax+0E8h], rbp jbe short loc_4015A mov rdi, r12 call JS_ThrowStackOverflow mov rcx, [r12+18h] mov rdx, [rcx+0F0h] mov rax, [rcx+0F8h] and dword ptr [rcx+0F0h], 0 mov qword ptr [rcx+0F8h], 4 loc_40155: mov [rbx], rdx jmp short loc_40195 loc_4015A: mov r14d, edx mov r15, rsi mov eax, [rsi+80h] mov esi, eax shr esi, 18h lea edx, [rsi-4] cmp edx, 2 jnb short loc_4019B cmp byte ptr [r15+0F0h], 0 jz short loc_401A0 mov rcx, [r15+0F8h] mov rax, [r15+100h] cmp eax, 0FFFFFFF7h jb short loc_40192 inc dword ptr [rcx] loc_40192: mov [rbx], rcx loc_40195: push 0FFFFFFFFFFFFFFFFh pop r14 jmp short loc_401A6 loc_4019B: cmp esi, 3 jnz short loc_401BC loc_401A0: and dword ptr [rbx], 0 push 3 pop rax loc_401A6: mov [rbx+8], rax mov eax, r14d loc_401AD: add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_401BC: mov [rbp+var_30], r12 mov [rbp+var_38], rbx and eax, 0FFFFFFh or eax, 3000000h mov [r15+80h], eax mov [r15+84h], r14d mov [r15+88h], r14d and dword ptr [r15+0A8h], 0 inc r14d mov rax, [rcx] mov [r15+90h], rax mov [rbp+var_40], rcx mov [rcx], r15 push 8 loc_40201: pop r12 xor r13d, r13d loc_40206: movsxd rax, dword ptr [r15+20h] cmp r13, rax jge loc_402DC mov rax, [r15+18h] mov rbx, [rax+r12] mov rdi, [rbp+var_30] mov rsi, rbx mov edx, r14d mov rcx, [rbp+var_40] mov r8, [rbp+var_38] call js_inner_module_evaluation test eax, eax js loc_40323 mov r14d, eax movzx eax, byte ptr [rbx+83h] shl eax, 18h cmp eax, 3000000h jnz short loc_40269 mov eax, [r15+88h] mov ecx, [rbx+88h] cmp eax, ecx cmovl ecx, eax mov [r15+88h], ecx jmp short loc_4027D loc_40269: mov rbx, [rbx+0B8h] cmp byte ptr [rbx+0F0h], 0 jnz loc_4035C loc_4027D: cmp dword ptr [rbx+0ACh], 0 jz short loc_402D0 inc dword ptr [r15+0A8h] lea rsi, [rbx+98h] lea rcx, [rbx+0A4h] mov r8d, [rbx+0A0h] inc r8d mov rdi, [rbp+var_30] push 8 pop rdx call js_resize_array test eax, eax jnz short loc_4032B mov rax, [rbx+98h] movsxd rcx, dword ptr [rbx+0A0h] lea edx, [rcx+1] mov [rbx+0A0h], edx mov [rax+rcx*8], r15 loc_402D0: inc r13 add r12, 10h jmp loc_40206 loc_402DC: cmp dword ptr [r15+0A8h], 0 jle loc_4037A mov dword ptr [r15+0ACh], 1 mov rax, [rbp+var_30] mov rax, [rax+18h] mov rcx, [rax+158h] lea rdx, [rcx+1] mov [rax+158h], rdx mov [r15+0B0h], rcx mov rbx, [rbp+var_38] mov r12, [rbp+var_40] jmp loc_403DC loc_40323: push 0FFFFFFFFFFFFFFFFh pop rax jmp loc_401AD loc_4032B: mov rax, [rbp+var_30] mov rcx, [rax+18h] mov rdx, [rcx+0F0h] mov rax, [rcx+0F8h] and dword ptr [rcx+0F0h], 0 mov qword ptr [rcx+0F8h], 4 mov rbx, [rbp+var_38] jmp loc_40155 loc_4035C: mov rcx, [rbx+0F8h] mov rax, [rbx+100h] cmp eax, 0FFFFFFF7h jb short loc_40371 inc dword ptr [rcx] loc_40371: mov rbx, [rbp+var_38] jmp loc_40192 loc_4037A: cmp byte ptr [r15+80h], 0 mov rbx, [rbp+var_38] mov r12, [rbp+var_40] jz short loc_403C2 mov dword ptr [r15+0ACh], 1 mov rdi, [rbp+var_30] mov rax, [rdi+18h] mov rcx, [rax+158h] lea rdx, [rcx+1] mov [rax+158h], rdx mov [r15+0B0h], rcx mov rsi, r15 call js_execute_async_module jmp short loc_403DC loc_403C2: mov rdi, [rbp+var_30] mov rsi, r15 mov rdx, rbx call js_execute_sync_module test eax, eax push 0FFFFFFFFFFFFFFFFh pop rax js loc_401AD loc_403DC: mov eax, [r15+84h] cmp eax, [r15+88h] jnz loc_401A0 loc_403F0: mov rax, [r12] mov rcx, [rax+90h] mov [r12], rcx cmp dword ptr [rax+0ACh], 0 setz cl or cl, 4 mov [rax+83h], cl mov [rax+0B8h], r15 cmp rax, r15 jnz short loc_403F0 jmp loc_401A0
long long js_inner_module_evaluation( long long a1, long long a2, long long a3, long long *a4, long long a5, long long a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, __m128 a12, __m128 a13, __m128 a14) { _QWORD *v14; // rbx long long v15; // rcx long long v16; // rdx long long v17; // rax unsigned int v18; // r14d unsigned int v19; // eax _DWORD *v20; // rcx long long result; // rax long long v22; // r12 long long i; // r13 long long v24; // rbx int v25; // eax int v26; // ecx long long v27; // rax long long v28; // rcx long long v29; // rax long long v30; // rcx long long *v31; // r12 long long v32; // rcx long long v33; // rax long long v34; // rcx bool v35; // sf long long v36; // rax char v37; // [rsp+0h] [rbp-40h] long long savedregs; // [rsp+40h] [rbp+0h] BYREF v14 = (_QWORD *)a5; if ( *(_QWORD *)(*(_QWORD *)(a1 + 24) + 232LL) <= (unsigned long long)&savedregs ) { v18 = a3; v19 = *(_DWORD *)(a2 + 128); if ( HIBYTE(v19) - 4 >= 2u ) { if ( HIBYTE(v19) != 3 ) { *(_DWORD *)(a2 + 128) = v19 & 0xFFFFFF | 0x3000000; *(_DWORD *)(a2 + 132) = a3; *(_DWORD *)(a2 + 136) = a3; *(_DWORD *)(a2 + 168) = 0; v18 = a3 + 1; *(_QWORD *)(a2 + 144) = *a4; *a4 = a2; v22 = 8LL; for ( i = 0LL; i < *(int *)(a2 + 32); ++i ) { v24 = *(_QWORD *)(*(_QWORD *)(a2 + 24) + v22); v25 = js_inner_module_evaluation(a1, v24, v18, a4, a5); if ( v25 < 0 ) return -1LL; v18 = v25; if ( *(unsigned __int8 *)(v24 + 131) << 24 == 50331648 ) { v26 = *(_DWORD *)(v24 + 136); if ( *(_DWORD *)(a2 + 136) < v26 ) v26 = *(_DWORD *)(a2 + 136); *(_DWORD *)(a2 + 136) = v26; } else { v24 = *(_QWORD *)(v24 + 184); if ( *(_BYTE *)(v24 + 240) ) { v20 = *(_DWORD **)(v24 + 248); v17 = *(_QWORD *)(v24 + 256); if ( (unsigned int)v17 >= 0xFFFFFFF7 ) ++*v20; v14 = (_QWORD *)a5; goto LABEL_8; } } if ( *(_DWORD *)(v24 + 172) ) { ++*(_DWORD *)(a2 + 168); if ( (unsigned int)js_resize_array(a1, v24 + 152, 8LL, (_DWORD *)(v24 + 164), *(_DWORD *)(v24 + 160) + 1) ) { v32 = *(_QWORD *)(a1 + 24); v16 = *(_QWORD *)(v32 + 240); v17 = *(_QWORD *)(v32 + 248); *(_DWORD *)(v32 + 240) = 0; *(_QWORD *)(v32 + 248) = 4LL; v14 = (_QWORD *)a5; goto LABEL_3; } v27 = *(_QWORD *)(v24 + 152); v28 = *(int *)(v24 + 160); *(_DWORD *)(v24 + 160) = v28 + 1; *(_QWORD *)(v27 + 8 * v28) = a2; } v22 += 16LL; } if ( *(int *)(a2 + 168) <= 0 ) { v14 = (_QWORD *)a5; v31 = a4; if ( *(_BYTE *)(a2 + 128) ) { *(_DWORD *)(a2 + 172) = 1; v33 = *(_QWORD *)(a1 + 24); v34 = *(_QWORD *)(v33 + 344); *(_QWORD *)(v33 + 344) = v34 + 1; *(_QWORD *)(a2 + 176) = v34; js_execute_async_module(a1, a2); } else { v35 = (int)js_execute_sync_module(a1, a2, a5) < 0; result = -1LL; if ( v35 ) return result; } } else { *(_DWORD *)(a2 + 172) = 1; v29 = *(_QWORD *)(a1 + 24); v30 = *(_QWORD *)(v29 + 344); *(_QWORD *)(v29 + 344) = v30 + 1; *(_QWORD *)(a2 + 176) = v30; v14 = (_QWORD *)a5; v31 = a4; } if ( *(_DWORD *)(a2 + 132) == *(_DWORD *)(a2 + 136) ) { do { v36 = *v31; *v31 = *(_QWORD *)(*v31 + 144); *(_BYTE *)(v36 + 131) = (*(_DWORD *)(v36 + 172) == 0) | 4; *(_QWORD *)(v36 + 184) = a2; } while ( v36 != a2 ); } } } else if ( *(_BYTE *)(a2 + 240) ) { v20 = *(_DWORD **)(a2 + 248); v17 = *(_QWORD *)(a2 + 256); if ( (unsigned int)v17 >= 0xFFFFFFF7 ) ++*v20; LABEL_8: *v14 = v20; goto LABEL_9; } *(_DWORD *)v14 = 0; v17 = 3LL; goto LABEL_12; } JS_ThrowStackOverflow(a1, a7, a8, a9, a10, a11, a12, a13, a14, a2, a3, (long long)a4, a5, a6, v37); v15 = *(_QWORD *)(a1 + 24); v16 = *(_QWORD *)(v15 + 240); v17 = *(_QWORD *)(v15 + 248); *(_DWORD *)(v15 + 240) = 0; *(_QWORD *)(v15 + 248) = 4LL; LABEL_3: *v14 = v16; LABEL_9: v18 = -1; LABEL_12: v14[1] = v17; return v18; }
js_inner_module_evaluation: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV RBX,R8 MOV R12,RDI MOV RAX,qword ptr [RDI + 0x18] CMP qword ptr [RAX + 0xe8],RBP JBE 0x0014015a MOV RDI,R12 CALL 0x00139941 MOV RCX,qword ptr [R12 + 0x18] MOV RDX,qword ptr [RCX + 0xf0] MOV RAX,qword ptr [RCX + 0xf8] AND dword ptr [RCX + 0xf0],0x0 MOV qword ptr [RCX + 0xf8],0x4 LAB_00140155: MOV qword ptr [RBX],RDX JMP 0x00140195 LAB_0014015a: MOV R14D,EDX MOV R15,RSI MOV EAX,dword ptr [RSI + 0x80] MOV ESI,EAX SHR ESI,0x18 LEA EDX,[RSI + -0x4] CMP EDX,0x2 JNC 0x0014019b CMP byte ptr [R15 + 0xf0],0x0 JZ 0x001401a0 MOV RCX,qword ptr [R15 + 0xf8] MOV RAX,qword ptr [R15 + 0x100] CMP EAX,-0x9 JC 0x00140192 INC dword ptr [RCX] LAB_00140192: MOV qword ptr [RBX],RCX LAB_00140195: PUSH -0x1 POP R14 JMP 0x001401a6 LAB_0014019b: CMP ESI,0x3 JNZ 0x001401bc LAB_001401a0: AND dword ptr [RBX],0x0 PUSH 0x3 POP RAX LAB_001401a6: MOV qword ptr [RBX + 0x8],RAX MOV EAX,R14D LAB_001401ad: ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001401bc: MOV qword ptr [RBP + -0x30],R12 MOV qword ptr [RBP + -0x38],RBX AND EAX,0xffffff OR EAX,0x3000000 MOV dword ptr [R15 + 0x80],EAX MOV dword ptr [R15 + 0x84],R14D MOV dword ptr [R15 + 0x88],R14D AND dword ptr [R15 + 0xa8],0x0 INC R14D MOV RAX,qword ptr [RCX] MOV qword ptr [R15 + 0x90],RAX MOV qword ptr [RBP + -0x40],RCX MOV qword ptr [RCX],R15 PUSH 0x8 POP R12 XOR R13D,R13D LAB_00140206: MOVSXD RAX,dword ptr [R15 + 0x20] CMP R13,RAX JGE 0x001402dc MOV RAX,qword ptr [R15 + 0x18] MOV RBX,qword ptr [RAX + R12*0x1] MOV RDI,qword ptr [RBP + -0x30] MOV RSI,RBX MOV EDX,R14D MOV RCX,qword ptr [RBP + -0x40] MOV R8,qword ptr [RBP + -0x38] CALL 0x00140104 TEST EAX,EAX JS 0x00140323 MOV R14D,EAX MOVZX EAX,byte ptr [RBX + 0x83] SHL EAX,0x18 CMP EAX,0x3000000 JNZ 0x00140269 MOV EAX,dword ptr [R15 + 0x88] MOV ECX,dword ptr [RBX + 0x88] CMP EAX,ECX CMOVL ECX,EAX MOV dword ptr [R15 + 0x88],ECX JMP 0x0014027d LAB_00140269: MOV RBX,qword ptr [RBX + 0xb8] CMP byte ptr [RBX + 0xf0],0x0 JNZ 0x0014035c LAB_0014027d: CMP dword ptr [RBX + 0xac],0x0 JZ 0x001402d0 INC dword ptr [R15 + 0xa8] LEA RSI,[RBX + 0x98] LEA RCX,[RBX + 0xa4] MOV R8D,dword ptr [RBX + 0xa0] INC R8D MOV RDI,qword ptr [RBP + -0x30] PUSH 0x8 POP RDX CALL 0x0013ec9f TEST EAX,EAX JNZ 0x0014032b MOV RAX,qword ptr [RBX + 0x98] MOVSXD RCX,dword ptr [RBX + 0xa0] LEA EDX,[RCX + 0x1] MOV dword ptr [RBX + 0xa0],EDX MOV qword ptr [RAX + RCX*0x8],R15 LAB_001402d0: INC R13 ADD R12,0x10 JMP 0x00140206 LAB_001402dc: CMP dword ptr [R15 + 0xa8],0x0 JLE 0x0014037a MOV dword ptr [R15 + 0xac],0x1 MOV RAX,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RAX + 0x18] MOV RCX,qword ptr [RAX + 0x158] LEA RDX,[RCX + 0x1] MOV qword ptr [RAX + 0x158],RDX MOV qword ptr [R15 + 0xb0],RCX MOV RBX,qword ptr [RBP + -0x38] MOV R12,qword ptr [RBP + -0x40] JMP 0x001403dc LAB_00140323: PUSH -0x1 POP RAX JMP 0x001401ad LAB_0014032b: MOV RAX,qword ptr [RBP + -0x30] MOV RCX,qword ptr [RAX + 0x18] MOV RDX,qword ptr [RCX + 0xf0] MOV RAX,qword ptr [RCX + 0xf8] AND dword ptr [RCX + 0xf0],0x0 MOV qword ptr [RCX + 0xf8],0x4 MOV RBX,qword ptr [RBP + -0x38] JMP 0x00140155 LAB_0014035c: MOV RCX,qword ptr [RBX + 0xf8] MOV RAX,qword ptr [RBX + 0x100] CMP EAX,-0x9 JC 0x00140371 INC dword ptr [RCX] LAB_00140371: MOV RBX,qword ptr [RBP + -0x38] JMP 0x00140192 LAB_0014037a: CMP byte ptr [R15 + 0x80],0x0 MOV RBX,qword ptr [RBP + -0x38] MOV R12,qword ptr [RBP + -0x40] JZ 0x001403c2 MOV dword ptr [R15 + 0xac],0x1 MOV RDI,qword ptr [RBP + -0x30] MOV RAX,qword ptr [RDI + 0x18] MOV RCX,qword ptr [RAX + 0x158] LEA RDX,[RCX + 0x1] MOV qword ptr [RAX + 0x158],RDX MOV qword ptr [R15 + 0xb0],RCX MOV RSI,R15 CALL 0x00140423 JMP 0x001403dc LAB_001403c2: MOV RDI,qword ptr [RBP + -0x30] MOV RSI,R15 MOV RDX,RBX CALL 0x00140544 TEST EAX,EAX PUSH -0x1 POP RAX JS 0x001401ad LAB_001403dc: MOV EAX,dword ptr [R15 + 0x84] CMP EAX,dword ptr [R15 + 0x88] JNZ 0x001401a0 LAB_001403f0: MOV RAX,qword ptr [R12] MOV RCX,qword ptr [RAX + 0x90] MOV qword ptr [R12],RCX CMP dword ptr [RAX + 0xac],0x0 SETZ CL OR CL,0x4 MOV byte ptr [RAX + 0x83],CL MOV qword ptr [RAX + 0xb8],R15 CMP RAX,R15 JNZ 0x001403f0 JMP 0x001401a0
ulong js_inner_module_evaluation (long param_1,long param_2,uint param_3,long *param_4,int8 *param_5) { int iVar1; int8 uVar2; int *piVar3; int8 uVar4; long lVar5; uint uVar6; long lVar7; long lVar8; if (&stack0xfffffffffffffff8 < *(int1 **)(*(long *)(param_1 + 0x18) + 0xe8)) { JS_ThrowStackOverflow(param_1); lVar7 = *(long *)(param_1 + 0x18); uVar4 = *(int8 *)(lVar7 + 0xf0); uVar2 = *(int8 *)(lVar7 + 0xf8); *(int4 *)(lVar7 + 0xf0) = 0; *(int8 *)(lVar7 + 0xf8) = 4; LAB_00140155: *param_5 = uVar4; LAB_00140195: param_3 = 0xffffffff; } else { uVar6 = *(uint *)(param_2 + 0x80) >> 0x18; if (uVar6 - 4 < 2) { if (*(char *)(param_2 + 0xf0) != '\0') { piVar3 = *(int **)(param_2 + 0xf8); uVar2 = *(int8 *)(param_2 + 0x100); if (0xfffffff6 < (uint)uVar2) { *piVar3 = *piVar3 + 1; } LAB_00140192: *param_5 = piVar3; goto LAB_00140195; } } else if (uVar6 != 3) { *(uint *)(param_2 + 0x80) = *(uint *)(param_2 + 0x80) & 0xffffff | 0x3000000; *(uint *)(param_2 + 0x84) = param_3; *(uint *)(param_2 + 0x88) = param_3; *(int4 *)(param_2 + 0xa8) = 0; param_3 = param_3 + 1; *(long *)(param_2 + 0x90) = *param_4; *param_4 = param_2; lVar7 = 8; for (lVar8 = 0; lVar8 < *(int *)(param_2 + 0x20); lVar8 = lVar8 + 1) { lVar5 = *(long *)(*(long *)(param_2 + 0x18) + lVar7); param_3 = js_inner_module_evaluation(param_1,lVar5,param_3,param_4,param_5); if ((int)param_3 < 0) { return 0xffffffffffffffff; } if (*(char *)(lVar5 + 0x83) == '\x03') { iVar1 = *(int *)(lVar5 + 0x88); if (*(int *)(param_2 + 0x88) < *(int *)(lVar5 + 0x88)) { iVar1 = *(int *)(param_2 + 0x88); } *(int *)(param_2 + 0x88) = iVar1; } else { lVar5 = *(long *)(lVar5 + 0xb8); if (*(char *)(lVar5 + 0xf0) != '\0') { piVar3 = *(int **)(lVar5 + 0xf8); uVar2 = *(int8 *)(lVar5 + 0x100); if (0xfffffff6 < (uint)uVar2) { *piVar3 = *piVar3 + 1; } goto LAB_00140192; } } if (*(int *)(lVar5 + 0xac) != 0) { *(int *)(param_2 + 0xa8) = *(int *)(param_2 + 0xa8) + 1; iVar1 = js_resize_array(param_1,lVar5 + 0x98,8,lVar5 + 0xa4,*(int *)(lVar5 + 0xa0) + 1); if (iVar1 != 0) { lVar7 = *(long *)(param_1 + 0x18); uVar4 = *(int8 *)(lVar7 + 0xf0); uVar2 = *(int8 *)(lVar7 + 0xf8); *(int4 *)(lVar7 + 0xf0) = 0; *(int8 *)(lVar7 + 0xf8) = 4; goto LAB_00140155; } iVar1 = *(int *)(lVar5 + 0xa0); *(int *)(lVar5 + 0xa0) = iVar1 + 1; *(long *)(*(long *)(lVar5 + 0x98) + (long)iVar1 * 8) = param_2; } lVar7 = lVar7 + 0x10; } if (*(int *)(param_2 + 0xa8) < 1) { if (*(char *)(param_2 + 0x80) == '\0') { iVar1 = js_execute_sync_module(param_1,param_2,param_5); if (iVar1 < 0) { return 0xffffffffffffffff; } } else { *(int4 *)(param_2 + 0xac) = 1; lVar7 = *(long *)(*(long *)(param_1 + 0x18) + 0x158); *(long *)(*(long *)(param_1 + 0x18) + 0x158) = lVar7 + 1; *(long *)(param_2 + 0xb0) = lVar7; js_execute_async_module(param_1,param_2); } } else { *(int4 *)(param_2 + 0xac) = 1; lVar7 = *(long *)(*(long *)(param_1 + 0x18) + 0x158); *(long *)(*(long *)(param_1 + 0x18) + 0x158) = lVar7 + 1; *(long *)(param_2 + 0xb0) = lVar7; } if (*(int *)(param_2 + 0x84) == *(int *)(param_2 + 0x88)) { do { lVar7 = *param_4; *param_4 = *(long *)(lVar7 + 0x90); *(byte *)(lVar7 + 0x83) = *(int *)(lVar7 + 0xac) == 0 | 4; *(long *)(lVar7 + 0xb8) = param_2; } while (lVar7 != param_2); } } *(int4 *)param_5 = 0; uVar2 = 3; } param_5[1] = uVar2; return (ulong)param_3; }
46,787
google::protobuf::UnknownFieldSet::default_instance()
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/unknown_field_set.cc
const UnknownFieldSet& UnknownFieldSet::default_instance() { static auto instance = internal::OnShutdownDelete(new UnknownFieldSet()); return *instance; }
O0
cpp
google::protobuf::UnknownFieldSet::default_instance(): subq $0x28, %rsp cmpb $0x0, 0x339ed5(%rip) # 0x774c60 jne 0x43ade4 leaq 0x339ecc(%rip), %rdi # 0x774c60 callq 0x192280 cmpl $0x0, %eax je 0x43ade4 movl $0x18, %edi callq 0x18da00 movq %rax, 0x10(%rsp) jmp 0x43adaf movq 0x10(%rsp), %rdi callq 0x3b8a80 jmp 0x43adbb movq 0x10(%rsp), %rdi callq 0x43be00 movq %rax, 0x8(%rsp) jmp 0x43adcc movq 0x8(%rsp), %rax movq %rax, 0x339e80(%rip) # 0x774c58 leaq 0x339e81(%rip), %rdi # 0x774c60 callq 0x196900 movq 0x339e6d(%rip), %rax # 0x774c58 addq $0x28, %rsp retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) jmp 0x43ae18 movq 0x10(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0x20(%rsp) movl %eax, 0x1c(%rsp) callq 0x1961a0 leaq 0x339e41(%rip), %rdi # 0x774c60 callq 0x193750 movq 0x20(%rsp), %rdi callq 0x198ce0 nop
_ZN6google8protobuf15UnknownFieldSet16default_instanceEv: sub rsp, 28h cmp cs:_ZGVZN6google8protobuf15UnknownFieldSet16default_instanceEvE8instance, 0; `guard variable for'google::protobuf::UnknownFieldSet::default_instance(void)::instance jnz short loc_43ADE4 lea rdi, _ZGVZN6google8protobuf15UnknownFieldSet16default_instanceEvE8instance; __guard * call ___cxa_guard_acquire cmp eax, 0 jz short loc_43ADE4 mov edi, 18h; unsigned __int64 call __Znwm; operator new(ulong) mov [rsp+28h+var_18], rax jmp short $+2 loc_43ADAF: mov rdi, [rsp+28h+var_18]; this call _ZN6google8protobuf15UnknownFieldSetC2Ev; google::protobuf::UnknownFieldSet::UnknownFieldSet(void) jmp short $+2 loc_43ADBB: mov rdi, [rsp+28h+var_18] call _ZN6google8protobuf8internal16OnShutdownDeleteINS0_15UnknownFieldSetEEEPT_S5_; google::protobuf::internal::OnShutdownDelete<google::protobuf::UnknownFieldSet>(google::protobuf::UnknownFieldSet *) mov [rsp+28h+var_20], rax jmp short $+2 loc_43ADCC: mov rax, [rsp+28h+var_20] mov cs:_ZZN6google8protobuf15UnknownFieldSet16default_instanceEvE8instance, rax; google::protobuf::UnknownFieldSet::default_instance(void)::instance lea rdi, _ZGVZN6google8protobuf15UnknownFieldSet16default_instanceEvE8instance; __guard * call ___cxa_guard_release loc_43ADE4: mov rax, cs:_ZZN6google8protobuf15UnknownFieldSet16default_instanceEvE8instance; google::protobuf::UnknownFieldSet::default_instance(void)::instance add rsp, 28h retn mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax jmp short loc_43AE18 mov rdi, [rsp+arg_8]; void * mov rcx, rax mov eax, edx mov [rsp+arg_18], rcx mov [rsp+arg_14], eax call __ZdlPv; operator delete(void *) loc_43AE18: lea rdi, _ZGVZN6google8protobuf15UnknownFieldSet16default_instanceEvE8instance; __guard * call ___cxa_guard_abort mov rdi, [rsp+arg_18] call __Unwind_Resume
long long google::protobuf::UnknownFieldSet::default_instance(google::protobuf::UnknownFieldSet *this) { google::protobuf::UnknownFieldSet *v2; // [rsp+10h] [rbp-18h] if ( !(_BYTE)`guard variable for'google::protobuf::UnknownFieldSet::default_instance(void)::instance && __cxa_guard_acquire(&`guard variable for'google::protobuf::UnknownFieldSet::default_instance(void)::instance) ) { v2 = (google::protobuf::UnknownFieldSet *)operator new(0x18uLL); google::protobuf::UnknownFieldSet::UnknownFieldSet(v2); google::protobuf::UnknownFieldSet::default_instance(void)::instance = google::protobuf::internal::OnShutdownDelete<google::protobuf::UnknownFieldSet>(v2); __cxa_guard_release(&`guard variable for'google::protobuf::UnknownFieldSet::default_instance(void)::instance); } return google::protobuf::UnknownFieldSet::default_instance(void)::instance; }
operator->: PUSH RAX MOV qword ptr [RSP],RDI MOV RDI,qword ptr [RSP] CALL 0x0043b000 POP RCX RET
/* std::unique_ptr<unifex::manual_lifetime<unifex::_seq::_op<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<aimrt::rpc::Status>::type>::type, unifex::_then::_receiver<unifex::_async_scope::_receiver<unifex::_then::_sender<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<aimrt::rpc::Status>::type>::type>::type, aimrt::protocols::time_manipulator_plugin::TimeManipulatorServiceCoService::TimeManipulatorServiceCoService()::$_2::operator()(aimrt_rpc_context_base_t const*, void const*, void*, aimrt_function_base_t*) const::{lambda(aimrt::rpc::Status)#1}>::type>::type, aimrt::protocols::time_manipulator_plugin::TimeManipulatorServiceCoService::TimeManipulatorServiceCoService()::$_2::operator()(aimrt_rpc_context_base_t const*, void const*, void*, aimrt_function_base_t*) const::{lambda(aimrt::rpc::Status)#1}>::type>::type>, std::default_delete<unifex::manual_lifetime<unifex::_seq::_op<unifex::_inline_sched::scheduler::schedule_task&&, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<aimrt::rpc::Status>::type>::type, unifex::_then::_receiver<unifex::_async_scope::_receiver<unifex::_then::_sender<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task, unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn, unifex::_inline_sched::scheduler, unifex::_task::_task<aimrt::rpc::Status>::type>::type>::type, aimrt::protocols::time_manipulator_plugin::TimeManipulatorServiceCoService::TimeManipulatorServiceCoService()::$_2::operator()(aimrt_rpc_context_base_t const*, void const*, void*, aimrt_function_base_t*) const::{lambda(aimrt::rpc::Status)#1}>::type>::type, aimrt::protocols::time_manipulator_plugin::TimeManipulatorServiceCoService::TimeManipulatorServiceCoService()::$_2::operator()(aimrt_rpc_context_base_t const*, void const*, void*, aimrt_function_base_t*) const::{lambda(aimrt::rpc::Status)#1}>::type>::type> > >::TEMPNAMEPLACEHOLDERVALUE() const */ void __thiscall std:: unique_ptr<unifex::manual_lifetime<unifex::_seq::_op<unifex::_inline_sched::scheduler::schedule_task&&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<aimrt::rpc::Status>::type>::type,unifex::_then::_receiver<unifex::_async_scope::_receiver<unifex::_then::_sender<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<aimrt::rpc::Status>::type>::type>::type,aimrt::protocols::time_manipulator_plugin::TimeManipulatorServiceCoService::TimeManipulatorServiceCoService()::$_2::operator()(aimrt_rpc_context_base_t_const*,void_const*,void*,aimrt_function_base_t*)const::{lambda(aimrt::rpc::Status)#1}>::type>::type,aimrt::protocols::time_manipulator_plugin::TimeManipulatorServiceCoService::TimeManipulatorServiceCoService()::$_2::operator()(aimrt_rpc_context_base_t_const*,void_const*,void*,aimrt_funct...nst*,void_const*,void*,aimrt_function_base_t*)const::{lambda(aimrt::rpc::Status)#1}>::type>::type>>> ::operator->(unique_ptr<unifex::manual_lifetime<unifex::_seq::_op<unifex::_inline_sched::scheduler::schedule_task&&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<aimrt::rpc::Status>::type>::type,unifex::_then::_receiver<unifex::_async_scope::_receiver<unifex::_then::_sender<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<aimrt::rpc::Status>::type>::type>::type,aimrt::protocols::time_manipulator_plugin::TimeManipulatorServiceCoService::TimeManipulatorServiceCoService()::__2::operator()(aimrt_rpc_context_base_t_const*,void_const*,void*,aimrt_function_base_t*)const::_lambda(aimrt::rpc::Status)_1_>::type>::type,aimrt::protocols::time_manipulator_plugin::TimeManipulatorServiceCoService::TimeManipulatorServiceCoService()::__2::operator()(aimrt_rpc_context_base_t_const*,void_const*,void*,aimrt_funct___nst*,void_const*,void*,aimrt_function_base_t*)const::_lambda(aimrt::rpc::Status)_1_>::type>::type>>> *this) { unique_ptr<unifex::manual_lifetime<unifex::_seq::_op<unifex::_inline_sched::scheduler::schedule_task&&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<aimrt::rpc::Status>::type>::type,unifex::_then::_receiver<unifex::_async_scope::_receiver<unifex::_then::_sender<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<aimrt::rpc::Status>::type>::type>::type,aimrt::protocols::time_manipulator_plugin::TimeManipulatorServiceCoService::TimeManipulatorServiceCoService()::$_2::TEMPNAMEPLACEHOLDERVALUE(aimrt_rpc_context_base_t_const*,void_const*,void*,aimrt_function_base_t*)const::{lambda(aimrt::rpc::Status)#1}>::type>::type,aimrt::protocols::time_manipulator_plugin::TimeManipulatorServiceCoService::TimeManipulatorServiceCoService()::$_2::TEMPNAMEPLACEHOLDERVALUE(aimrt_rpc_context_base_t_const*,v...nst*,void_const*,void*,aimrt_function_base_t*)const::{lambda(aimrt::rpc::Status)#1}>::type>::type>>> ::operator()((unique_ptr<unifex::manual_lifetime<unifex::_seq::_op<unifex::_inline_sched::scheduler::schedule_task&&,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<aimrt::rpc::Status>::type>::type,unifex::_then::_receiver<unifex::_async_scope::_receiver<unifex::_then::_sender<unifex::_seq::_sender<unifex::_inline_sched::scheduler::schedule_task,unifex::_with_query_value::_sender<unifex::_get_scheduler::_fn,unifex::_inline_sched::scheduler,unifex::_task::_task<aimrt::rpc::Status>::type>::type>::type,aimrt::protocols::time_manipulator_plugin::TimeManipulatorServiceCoService::TimeManipulatorServiceCoService()::__2::TEMPNAMEPLACEHOLDERVALUE(aimrt_rpc_context_base_t_const*,void_const*,void*,aimrt_function_base_t*)const::_lambda(aimrt::rpc::Status)_1_>::type>::type,aimrt::protocols::time_manipulator_plugin::TimeManipulatorServiceCoService::TimeManipulatorServiceCoService()::__2::TEMPNAMEPLACEHOLDERVALUE(aimrt_rpc_context_base_t_const*,v___nst*,void_const*,void*,aimrt_function_base_t*)const::_lambda(aimrt::rpc::Status)_1_>::type>::type>>> *)this); return; }
46,788
minja::ElifTemplateToken::~ElifTemplateToken()
monkey531[P]llama/common/minja.hpp
ElifTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<Expression> && c) : TemplateToken(Type::Elif, location, pre, post), condition(std::move(c)) {}
O1
cpp
minja::ElifTemplateToken::~ElifTemplateToken(): pushq %rbx movq %rdi, %rbx leaq 0x706bd(%rip), %rax # 0xedce8 addq $0x10, %rax movq %rax, (%rdi) movq 0x38(%rdi), %rdi testq %rdi, %rdi je 0x7d640 callq 0x42d00 leaq 0x6fe21(%rip), %rax # 0xed468 addq $0x10, %rax movq %rax, (%rbx) movq 0x18(%rbx), %rdi testq %rdi, %rdi je 0x7d65d popq %rbx jmp 0x42d00 popq %rbx retq nop
_ZN5minja17ElifTemplateTokenD2Ev: push rbx mov rbx, rdi lea rax, _ZTVN5minja17ElifTemplateTokenE; `vtable for'minja::ElifTemplateToken add rax, 10h mov [rdi], rax mov rdi, [rdi+38h] test rdi, rdi jz short loc_7D640 call _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7D640: lea rax, _ZTVN5minja13TemplateTokenE; `vtable for'minja::TemplateToken add rax, 10h mov [rbx], rax mov rdi, [rbx+18h] test rdi, rdi jz short loc_7D65D pop rbx jmp _ZNSt16_Sp_counted_baseILN9__gnu_cxx12_Lock_policyE2EE10_M_releaseEv; std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(void) loc_7D65D: pop rbx retn
void minja::ElifTemplateToken::~ElifTemplateToken(minja::ElifTemplateToken *this) { volatile signed __int32 *v2; // rdi volatile signed __int32 *v3; // rdi *(_QWORD *)this = &`vtable for'minja::ElifTemplateToken + 2; v2 = (volatile signed __int32 *)*((_QWORD *)this + 7); if ( v2 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v2); *(_QWORD *)this = &`vtable for'minja::TemplateToken + 2; v3 = (volatile signed __int32 *)*((_QWORD *)this + 3); if ( v3 ) std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release(v3); }
~ElifTemplateToken: PUSH RBX MOV RBX,RDI LEA RAX,[0x1edce8] ADD RAX,0x10 MOV qword ptr [RDI],RAX MOV RDI,qword ptr [RDI + 0x38] TEST RDI,RDI JZ 0x0017d640 CALL 0x00142d00 LAB_0017d640: LEA RAX,[0x1ed468] ADD RAX,0x10 MOV qword ptr [RBX],RAX MOV RDI,qword ptr [RBX + 0x18] TEST RDI,RDI JZ 0x0017d65d POP RBX JMP 0x00142d00 LAB_0017d65d: POP RBX RET
/* minja::ElifTemplateToken::~ElifTemplateToken() */ void __thiscall minja::ElifTemplateToken::~ElifTemplateToken(ElifTemplateToken *this) { *(int ***)this = &PTR__ElifTemplateToken_001edcf8; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x38)); } *(int ***)this = &PTR__TemplateToken_001ed478; if (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18) != (_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> *)0x0) { std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (*(_Sp_counted_base<(__gnu_cxx::_Lock_policy)2> **)(this + 0x18)); return; } return; }
46,789
gguf_set_arr_str
ngxson[P]ggml-easy/ggml/src/gguf.cpp
void gguf_set_arr_str(struct gguf_context * ctx, const char * key, const char ** data, size_t n) { gguf_check_reserved_keys(key, data); gguf_remove_key(ctx, key); std::vector<std::string> tmp(n); for (size_t i = 0; i < n; ++i) { tmp[i] = data[i]; } ctx->kv.emplace_back(key, tmp); }
O0
cpp
gguf_set_arr_str: subq $0xa8, %rsp movq %rdi, 0xa0(%rsp) movq %rsi, 0x98(%rsp) movq %rdx, 0x90(%rsp) movq %rcx, 0x88(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x18(%rsp) leaq 0x67(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x46d70 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx leaq 0x68(%rsp), %rdi callq 0x46990 jmp 0x911e9 movq 0x90(%rsp), %rsi leaq 0x68(%rsp), %rdi callq 0x91370 jmp 0x911fd leaq 0x68(%rsp), %rdi callq 0x42540 leaq 0x67(%rsp), %rdi callq 0x441a0 movq 0xa0(%rsp), %rdi movq 0x98(%rsp), %rsi callq 0x451c0 movq 0x88(%rsp), %rax movq %rax, 0x8(%rsp) leaq 0x37(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x40c20 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x38(%rsp), %rdi callq 0x414c0 jmp 0x91258 leaq 0x37(%rsp), %rdi callq 0x40b20 movq $0x0, 0x28(%rsp) movq 0x28(%rsp), %rax cmpq 0x88(%rsp), %rax jae 0x91325 movq 0x90(%rsp), %rax movq 0x28(%rsp), %rsi movq (%rax,%rsi,8), %rax movq %rax, (%rsp) leaq 0x38(%rsp), %rdi callq 0x47210 movq (%rsp), %rsi movq %rax, %rdi callq 0x45250 jmp 0x912ab jmp 0x912ad movq 0x28(%rsp), %rax addq $0x1, %rax movq %rax, 0x28(%rsp) jmp 0x9126b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0x912e5 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x68(%rsp), %rdi callq 0x42540 leaq 0x67(%rsp), %rdi callq 0x441a0 jmp 0x91357 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x37(%rsp), %rdi callq 0x40b20 jmp 0x91357 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x38(%rsp), %rdi callq 0x42c20 jmp 0x91357 movq 0xa0(%rsp), %rdi addq $0x8, %rdi leaq 0x98(%rsp), %rsi leaq 0x38(%rsp), %rdx callq 0x42e40 jmp 0x91345 leaq 0x38(%rsp), %rdi callq 0x42c20 addq $0xa8, %rsp retq movq 0x58(%rsp), %rdi callq 0x46d20 nopw %cs:(%rax,%rax)
gguf_set_arr_str: sub rsp, 0A8h 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 rax, [rsp+0A8h+var_10] mov [rsp+0A8h+var_90], rax lea rdi, [rsp+0A8h+var_41] mov [rsp+0A8h+var_88], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+0A8h+var_90] mov rdx, [rsp+0A8h+var_88] lea rdi, [rsp+0A8h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_911E9: mov rsi, [rsp+0A8h+var_18] lea rdi, [rsp+0A8h+var_40] call _ZL24gguf_check_reserved_keysIPPKcEvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEET_; gguf_check_reserved_keys<char const**>(std::string const&,char const**) jmp short $+2 loc_911FD: lea rdi, [rsp+0A8h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+0A8h+var_41] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() mov rdi, [rsp+0A8h+var_8] mov rsi, [rsp+0A8h+var_10] call _gguf_remove_key mov rax, [rsp+0A8h+var_20] mov [rsp+0A8h+var_A0], rax lea rdi, [rsp+0A8h+var_71] mov [rsp+0A8h+var_98], rdi call __ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEC2Ev; std::allocator<std::string>::allocator(void) mov rsi, [rsp+0A8h+var_A0] mov rdx, [rsp+0A8h+var_98] lea rdi, [rsp+0A8h+var_70] call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2EmRKS6_; std::vector<std::string>::vector(ulong,std::allocator<std::string> const&) jmp short $+2 loc_91258: lea rdi, [rsp+0A8h+var_71] call __ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; std::allocator<std::string>::~allocator() mov [rsp+0A8h+var_80], 0 loc_9126B: mov rax, [rsp+0A8h+var_80] cmp rax, [rsp+0A8h+var_20] jnb loc_91325 mov rax, [rsp+0A8h+var_18] mov rsi, [rsp+0A8h+var_80] mov rax, [rax+rsi*8] mov [rsp+0A8h+var_A8], rax lea rdi, [rsp+0A8h+var_70] call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rsi, [rsp+0A8h+var_A8] mov rdi, rax call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEPKc; std::string::operator=(char const*) jmp short $+2 loc_912AB: jmp short $+2 loc_912AD: mov rax, [rsp+0A8h+var_80] add rax, 1 mov [rsp+0A8h+var_80], rax jmp short loc_9126B mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp short loc_912E5 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax lea rdi, [rsp+arg_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_912E5: lea rdi, [rsp+arg_5F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp short loc_91357 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax lea rdi, [rsp+arg_2F] call __ZNSaINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEED2Ev; std::allocator<std::string>::~allocator() jmp short loc_91357 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax lea rdi, [rsp+arg_30] call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_91357 loc_91325: mov rdi, [rsp+0A8h+var_8] add rdi, 8 lea rsi, [rsp+0A8h+var_10] lea rdx, [rsp+0A8h+var_70] call __ZNSt6vectorI7gguf_kvSaIS0_EE12emplace_backIJRPKcRS_INSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaISC_EEEEERS0_DpOT_; std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<std::string,std::allocator<std::allocator<char>>>>(char const*&,std::vector&<std::string,std::allocator<std::allocator<char>>> &&) jmp short $+2 loc_91345: lea rdi, [rsp+0A8h+var_70] call __ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() add rsp, 0A8h retn loc_91357: mov rdi, [rsp+arg_50] call __Unwind_Resume
long long gguf_set_arr_str(long long a1, long long a2, long long a3, unsigned long long a4) { int v4; // ecx int v5; // r8d int v6; // r9d int v7; // ecx int v8; // r8d int v9; // r9d long long v10; // rax long long v12; // [rsp+0h] [rbp-A8h] int v13; // [rsp+8h] [rbp-A0h] unsigned long long i; // [rsp+28h] [rbp-80h] char v15; // [rsp+37h] [rbp-71h] BYREF _BYTE v16[47]; // [rsp+38h] [rbp-70h] BYREF char v17; // [rsp+67h] [rbp-41h] BYREF _BYTE v18[32]; // [rsp+68h] [rbp-40h] BYREF unsigned long long v19; // [rsp+88h] [rbp-20h] long long v20; // [rsp+90h] [rbp-18h] long long v21; // [rsp+98h] [rbp-10h] BYREF long long v22; // [rsp+A0h] [rbp-8h] v22 = a1; v21 = a2; v20 = a3; v19 = a4; std::allocator<char>::allocator(); std::string::basic_string<std::allocator<char>>((unsigned int)v18, a2, (unsigned int)&v17, v4, v5, v6); gguf_check_reserved_keys<char const**>(v18, v20); std::string::~string(v18); std::allocator<char>::~allocator(&v17); gguf_remove_key(v22, v21); v13 = v19; std::allocator<std::string>::allocator(); std::vector<std::string>::vector((unsigned int)v16, v13, (unsigned int)&v15, v7, v8, v9); std::allocator<std::string>::~allocator(&v15); for ( i = 0LL; i < v19; ++i ) { v12 = *(_QWORD *)(v20 + 8 * i); v10 = std::vector<std::string>::operator[](v16); std::string::operator=(v10, v12); } std::vector<gguf_kv>::emplace_back<char const*&,std::vector&<std::string,std::allocator<std::allocator<char>>>>( v22 + 8, &v21, v16); return std::vector<std::string>::~vector(v16); }
gguf_set_arr_str: SUB RSP,0xa8 MOV qword ptr [RSP + 0xa0],RDI MOV qword ptr [RSP + 0x98],RSI MOV qword ptr [RSP + 0x90],RDX MOV qword ptr [RSP + 0x88],RCX MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x67] MOV qword ptr [RSP + 0x20],RDI CALL 0x00146d70 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_001911dd: LEA RDI,[RSP + 0x68] CALL 0x00146990 JMP 0x001911e9 LAB_001911e9: MOV RSI,qword ptr [RSP + 0x90] LAB_001911f1: LEA RDI,[RSP + 0x68] CALL 0x00191370 LAB_001911fb: JMP 0x001911fd LAB_001911fd: LEA RDI,[RSP + 0x68] CALL 0x00142540 LEA RDI,[RSP + 0x67] CALL 0x001441a0 MOV RDI,qword ptr [RSP + 0xa0] MOV RSI,qword ptr [RSP + 0x98] CALL 0x001451c0 MOV RAX,qword ptr [RSP + 0x88] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x37] MOV qword ptr [RSP + 0x10],RDI CALL 0x00140c20 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_0019124c: LEA RDI,[RSP + 0x38] CALL 0x001414c0 JMP 0x00191258 LAB_00191258: LEA RDI,[RSP + 0x37] CALL 0x00140b20 MOV qword ptr [RSP + 0x28],0x0 LAB_0019126b: MOV RAX,qword ptr [RSP + 0x28] CMP RAX,qword ptr [RSP + 0x88] JNC 0x00191325 MOV RAX,qword ptr [RSP + 0x90] MOV RSI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RAX + RSI*0x8] MOV qword ptr [RSP],RAX LEA RDI,[RSP + 0x38] CALL 0x00147210 MOV RSI,qword ptr [RSP] MOV RDI,RAX LAB_001912a4: CALL 0x00145250 JMP 0x001912ab LAB_001912ab: JMP 0x001912ad LAB_001912ad: MOV RAX,qword ptr [RSP + 0x28] ADD RAX,0x1 MOV qword ptr [RSP + 0x28],RAX JMP 0x0019126b LAB_00191325: MOV RDI,qword ptr [RSP + 0xa0] ADD RDI,0x8 LEA RSI,[RSP + 0x98] LEA RDX,[RSP + 0x38] CALL 0x00142e40 LAB_00191343: JMP 0x00191345 LAB_00191345: LEA RDI,[RSP + 0x38] CALL 0x00142c20 ADD RSP,0xa8 RET
void gguf_set_arr_str(long param_1,char *param_2,char **param_3,ulong param_4) { char *pcVar1; ulong uVar2; string *this; ulong local_80; allocator<std::__cxx11::string> local_71; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> local_70 [47]; allocator local_41; string local_40 [32]; ulong local_20; char **local_18; char *local_10; long local_8; local_20 = param_4; local_18 = param_3; local_10 = param_2; local_8 = param_1; std::allocator<char>::allocator(); /* try { // try from 001911dd to 001911e6 has its CatchHandler @ 001912bd */ std::__cxx11::string::string<std::allocator<char>>(local_40,param_2,&local_41); /* try { // try from 001911f1 to 001911fa has its CatchHandler @ 001912cd */ gguf_check_reserved_keys<char_const**>(local_40,local_18); std::__cxx11::string::~string(local_40); std::allocator<char>::~allocator((allocator<char> *)&local_41); gguf_remove_key(local_8,local_10); uVar2 = local_20; std::allocator<std::__cxx11::string>::allocator(&local_71); /* try { // try from 0019124c to 00191255 has its CatchHandler @ 001912f1 */ std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::vector (local_70,uVar2,(allocator *)&local_71); std::allocator<std::__cxx11::string>::~allocator(&local_71); for (local_80 = 0; local_80 < local_20; local_80 = local_80 + 1) { pcVar1 = local_18[local_80]; this = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] (local_70,local_80); /* try { // try from 001912a4 to 00191342 has its CatchHandler @ 0019130b */ std::__cxx11::string::operator=(this,pcVar1); } std::vector<gguf_kv,std::allocator<gguf_kv>>:: emplace_back<char_const*&,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>&> ((vector<gguf_kv,std::allocator<gguf_kv>> *)(local_8 + 8),&local_10,(vector *)local_70); std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector(local_70); return; }
46,790
init_functions
eloqsql/mysys/mf_iocache.c
static void init_functions(IO_CACHE* info) { enum cache_type type= info->type; info->read_function = 0; /* Force a core if used */ info->write_function = 0; /* Force a core if used */ switch (type) { case READ_NET: /* Must be initialized by the caller. The problem is that _my_b_net_read has to be defined in sql directory because of the dependency on THD, and therefore cannot be visible to programs that link against mysys but know nothing about THD, such as myisamchk */ DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); break; case SEQ_READ_APPEND: info->read_function = _my_b_seq_read; DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); break; case READ_CACHE: if (info->myflags & MY_ENCRYPT) { DBUG_ASSERT(info->share == 0); info->read_function = _my_b_encr_read; break; } /* fall through */ case WRITE_CACHE: if (info->myflags & MY_ENCRYPT) { info->write_function = _my_b_encr_write; break; } /* fall through */ case READ_FIFO: DBUG_ASSERT(!(info->myflags & MY_ENCRYPT)); info->read_function = info->share ? _my_b_cache_read_r : _my_b_cache_read; info->write_function = info->share ? _my_b_cache_write_r : _my_b_cache_write; break; case TYPE_NOT_SET: DBUG_ASSERT(0); break; } if (type == READ_CACHE || type == WRITE_CACHE || type == SEQ_READ_APPEND) info->myflags|= MY_FULL_IO; else info->myflags&= ~MY_FULL_IO; }
O3
c
init_functions: pushq %rbp movq %rsp, %rbp movl 0xb0(%rdi), %eax xorps %xmm0, %xmm0 movups %xmm0, 0xa0(%rdi) decl %eax cmpl $0x3, %eax ja 0x98061 leaq 0xa0(%rdi), %rcx leaq 0x4bf5c(%rip), %rdx # 0xe3f5c movslq (%rdx,%rax,4), %rsi addq %rdx, %rsi jmpq *%rsi testb $0x40, 0xf8(%rdi) je 0x98027 leaq 0xb7286f(%rip), %rax # 0xc0a888 movq (%rax), %rax jmp 0x9807b testb $0x40, 0xf8(%rdi) jne 0x98080 cmpq $0x0, 0x98(%rdi) leaq 0x18ea(%rip), %rcx # 0x99920 leaq 0x8b1(%rip), %rdx # 0x988ee cmoveq %rcx, %rdx movq %rdx, 0xa0(%rdi) leaq 0x1cea(%rip), %rcx # 0x99d39 leaq 0xbde(%rip), %rdx # 0x98c34 cmoveq %rcx, %rdx movq %rdx, 0xa8(%rdi) cmpl $0x2, %eax jbe 0x98091 movl $0xfffffdff, %eax # imm = 0xFFFFFDFF andq %rax, 0xf8(%rdi) jmp 0x98098 leaq 0x1409(%rip), %rax # 0x99484 movq %rax, (%rcx) jmp 0x98091 leaq 0xb72809(%rip), %rax # 0xc0a890 movq (%rax), %rax movq %rax, 0xa8(%rdi) orb $0x2, 0xf9(%rdi) popq %rbp retq
init_functions: push rbp mov rbp, rsp mov eax, [rdi+0B0h] xorps xmm0, xmm0 movups xmmword ptr [rdi+0A0h], xmm0 dec eax; switch 4 cases cmp eax, 3 ja short def_98007; jumptable 0000000000098007 default case lea rcx, [rdi+0A0h] lea rdx, jpt_98007 movsxd rsi, ds:(jpt_98007 - 0E3F5Ch)[rdx+rax*4] add rsi, rdx jmp rsi; switch jump loc_98009: test byte ptr [rdi+0F8h], 40h; jumptable 0000000000098007 case 1 jz short loc_98027; jumptable 0000000000098007 case 4 lea rax, _my_b_encr_read mov rax, [rax] jmp short loc_9807B loc_9801E: test byte ptr [rdi+0F8h], 40h; jumptable 0000000000098007 case 2 jnz short loc_98080 loc_98027: cmp qword ptr [rdi+98h], 0; jumptable 0000000000098007 case 4 lea rcx, _my_b_cache_read lea rdx, _my_b_cache_read_r cmovz rdx, rcx mov [rdi+0A0h], rdx lea rcx, _my_b_cache_write lea rdx, _my_b_cache_write_r cmovz rdx, rcx mov [rdi+0A8h], rdx def_98007: cmp eax, 2; jumptable 0000000000098007 default case jbe short loc_98091 mov eax, 0FFFFFDFFh and [rdi+0F8h], rax jmp short loc_98098 loc_98074: lea rax, _my_b_seq_read; jumptable 0000000000098007 case 3 loc_9807B: mov [rcx], rax jmp short loc_98091 loc_98080: lea rax, _my_b_encr_write mov rax, [rax] mov [rdi+0A8h], rax loc_98091: or byte ptr [rdi+0F9h], 2 loc_98098: pop rbp retn
long long init_functions(long long a1) { int v1; // eax long long result; // rax bool v3; // zf long long ( *v4)(); // rdx long long ( *v5)(); // rdx v1 = *(_DWORD *)(a1 + 176); *(_OWORD *)(a1 + 160) = 0LL; result = (unsigned int)(v1 - 1); switch ( (int)result ) { case 0: if ( (*(_BYTE *)(a1 + 248) & 0x40) == 0 ) goto LABEL_5; result = my_b_encr_read; goto LABEL_13; case 1: if ( (*(_BYTE *)(a1 + 248) & 0x40) == 0 ) goto LABEL_5; result = my_b_encr_write; *(_QWORD *)(a1 + 168) = my_b_encr_write; goto LABEL_15; case 2: result = (long long)my_b_seq_read; LABEL_13: *(_QWORD *)(a1 + 160) = result; goto LABEL_15; case 3: LABEL_5: v3 = *(_QWORD *)(a1 + 152) == 0LL; v4 = my_b_cache_read_r; if ( !*(_QWORD *)(a1 + 152) ) v4 = my_b_cache_read; *(_QWORD *)(a1 + 160) = v4; v5 = my_b_cache_write_r; if ( v3 ) v5 = my_b_cache_write; *(_QWORD *)(a1 + 168) = v5; goto LABEL_10; default: LABEL_10: if ( (unsigned int)result <= 2 ) { LABEL_15: *(_BYTE *)(a1 + 249) |= 2u; } else { result = 4294966783LL; *(_QWORD *)(a1 + 248) &= 0xFFFFFDFFuLL; } return result; } }
init_functions: PUSH RBP MOV RBP,RSP MOV EAX,dword ptr [RDI + 0xb0] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RDI + 0xa0],XMM0 DEC EAX CMP EAX,0x3 JA 0x00198061 LEA RCX,[RDI + 0xa0] LEA RDX,[0x1e3f5c] MOVSXD RSI,dword ptr [RDX + RAX*0x4] ADD RSI,RDX switchD: JMP RSI caseD_0: TEST byte ptr [RDI + 0xf8],0x40 JZ 0x00198027 LEA RAX,[0xd0a888] MOV RAX,qword ptr [RAX] JMP 0x0019807b caseD_1: TEST byte ptr [RDI + 0xf8],0x40 JNZ 0x00198080 caseD_3: CMP qword ptr [RDI + 0x98],0x0 LEA RCX,[0x199920] LEA RDX,[0x1988ee] CMOVZ RDX,RCX MOV qword ptr [RDI + 0xa0],RDX LEA RCX,[0x199d39] LEA RDX,[0x198c34] CMOVZ RDX,RCX MOV qword ptr [RDI + 0xa8],RDX LAB_00198061: CMP EAX,0x2 JBE 0x00198091 MOV EAX,0xfffffdff AND qword ptr [RDI + 0xf8],RAX JMP 0x00198098 caseD_2: LEA RAX,[0x199484] LAB_0019807b: MOV qword ptr [RCX],RAX JMP 0x00198091 LAB_00198080: LEA RAX,[0xd0a890] MOV RAX,qword ptr [RAX] MOV qword ptr [RDI + 0xa8],RAX LAB_00198091: OR byte ptr [RDI + 0xf9],0x2 LAB_00198098: POP RBP RET
void init_functions(long param_1) { uint uVar1; code *pcVar2; bool bVar3; *(int8 *)(param_1 + 0xa0) = 0; *(int8 *)(param_1 + 0xa8) = 0; uVar1 = *(int *)(param_1 + 0xb0) - 1; if (3 < uVar1) goto LAB_00198061; switch(uVar1) { case 0: pcVar2 = _my_b_encr_read; if ((*(byte *)(param_1 + 0xf8) & 0x40) == 0) goto switchD_00198007_caseD_3; break; case 1: if ((*(byte *)(param_1 + 0xf8) & 0x40) != 0) { *(int8 *)(param_1 + 0xa8) = _my_b_encr_write; goto LAB_00198091; } case 3: switchD_00198007_caseD_3: bVar3 = *(long *)(param_1 + 0x98) == 0; pcVar2 = _my_b_cache_read_r; if (bVar3) { pcVar2 = _my_b_cache_read; } *(code **)(param_1 + 0xa0) = pcVar2; pcVar2 = _my_b_cache_write_r; if (bVar3) { pcVar2 = _my_b_cache_write; } *(code **)(param_1 + 0xa8) = pcVar2; LAB_00198061: if (2 < uVar1) { *(ulong *)(param_1 + 0xf8) = *(ulong *)(param_1 + 0xf8) & 0xfffffdff; return; } goto LAB_00198091; case 2: pcVar2 = _my_b_seq_read; } *(code **)(param_1 + 0xa0) = pcVar2; LAB_00198091: *(byte *)(param_1 + 0xf9) = *(byte *)(param_1 + 0xf9) | 2; return; }
46,791
testing::AssertionResult testing::(anonymous namespace)::IsSubstringImpl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(bool, char const*, char const*, 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&)
seiftnesse[P]memoryallocator/build_O3/_deps/googletest-src/googletest/src/gtest.cc
AssertionResult IsSubstringImpl(bool expected_to_be_substring, const char* needle_expr, const char* haystack_expr, const StringType& needle, const StringType& haystack) { if (IsSubstringPred(needle, haystack) == expected_to_be_substring) return AssertionSuccess(); const bool is_wide_string = sizeof(needle[0]) > 1; const char* const begin_string_quote = is_wide_string ? "L\"" : "\""; return AssertionFailure() << "Value of: " << needle_expr << "\n" << " Actual: " << begin_string_quote << needle << "\"\n" << "Expected: " << (expected_to_be_substring ? "" : "not ") << "a substring of " << haystack_expr << "\n" << "Which is: " << begin_string_quote << haystack << "\""; }
O3
cpp
testing::AssertionResult testing::(anonymous namespace)::IsSubstringImpl<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(bool, char const*, char const*, 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&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x30, %rsp movq %r9, %r15 movq %r8, %r12 movl %esi, %ebp movq %rdi, %r14 movq %rdx, 0x20(%rsp) movq %rcx, 0x18(%rsp) movq (%r8), %rsi movq 0x8(%r8), %rcx movq %r9, %rdi xorl %edx, %edx callq 0x9970 cmpq $-0x1, %rax setne %al xorb %bpl, %al je 0x22b5c leaq 0x21019(%rip), %rax # 0x43a4e movq %rax, (%rsp) leaq 0x10(%rsp), %rbx movb $0x0, -0x8(%rbx) movq $0x0, (%rbx) leaq 0x20488(%rip), %rsi # 0x42ed8 leaq 0x8(%rsp), %rdi callq 0x39f4c leaq 0x20(%rsp), %rsi movq %rax, %rdi callq 0x1000e leaq 0x20bf1(%rip), %rsi # 0x4365f movq %rax, %rdi callq 0x360ee leaq 0x20467(%rip), %rsi # 0x42ee4 movq %rax, %rdi callq 0x39f4c movq %rsp, %rsi movq %rax, %rdi callq 0x1000e movq %rax, %rdi movq %r12, %rsi callq 0x1011c leaq 0x20fbf(%rip), %rsi # 0x43a61 movq %rax, %rdi callq 0x1009e leaq 0x2043f(%rip), %rsi # 0x42ef0 movq %rax, %rdi callq 0x39f4c leaq 0x20ba0(%rip), %rcx # 0x43660 leaq 0x21f30(%rip), %rdx # 0x449f7 testb %bpl, %bpl cmovneq %rcx, %rdx leaq 0x28(%rsp), %rsi movq %rdx, (%rsi) movq %rax, %rdi callq 0x1000e leaq 0x21f17(%rip), %rsi # 0x449fc movq %rax, %rdi callq 0x3dcec leaq 0x18(%rsp), %rsi movq %rax, %rdi callq 0x1000e leaq 0x20b5e(%rip), %rsi # 0x4365f movq %rax, %rdi callq 0x360ee leaq 0x203a1(%rip), %rsi # 0x42eb1 movq %rax, %rdi callq 0x39f4c movq %rsp, %rsi movq %rax, %rdi callq 0x1000e movq %rax, %rdi movq %r15, %rsi callq 0x1011c leaq 0x20f19(%rip), %rsi # 0x43a4e movq %rax, %rdi callq 0x360ee movq %r14, %rdi movq %rax, %rsi callq 0x11e20 movq 0x10(%rsp), %rsi testq %rsi, %rsi je 0x22b68 movq %rbx, %rdi callq 0xf598 jmp 0x22b68 movb $0x1, (%r14) movq $0x0, 0x8(%r14) addq $0x30, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq jmp 0x22b77 movq %rax, %r14 movq 0x10(%rsp), %rsi testq %rsi, %rsi je 0x22b8c movq %rbx, %rdi callq 0xf598 movq %r14, %rdi callq 0x99a0
_ZN7testing12_GLOBAL__N_115IsSubstringImplINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEENS_15AssertionResultEbPKcSA_RKT_SD_: push rbp push r15 push r14 push r12 push rbx sub rsp, 30h mov r15, r9 mov r12, r8 mov ebp, esi mov r14, rdi mov [rsp+58h+var_38], rdx mov [rsp+58h+var_40], rcx mov rsi, [r8] mov rcx, [r8+8] mov rdi, r9 xor edx, edx call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcmm; std::string::find(char const*,ulong,ulong) cmp rax, 0FFFFFFFFFFFFFFFFh setnz al xor al, bpl jz loc_22B5C lea rax, aFailure_0+0Fh; "\"" mov [rsp+58h+var_58], rax; __int64 lea rbx, [rsp+58h+var_48] mov byte ptr [rbx-8], 0 mov qword ptr [rbx], 0 lea rsi, aValueOf; "Value of: " lea rdi, [rsp+58h+var_50]; this call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&) lea rsi, [rsp+58h+var_38] mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) lea rsi, aSFromSSMsTotal+19h; "\n" mov rdi, rax; this call _ZN7testing15AssertionResultlsIA2_cEERS0_RKT_; testing::AssertionResult::operator<<<char [2]>(char [2] const&) lea rsi, aActual_0+1; " Actual: " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&) mov rsi, rsp mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) mov rdi, rax; this mov rsi, r12 call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&) lea rsi, aType_0+0Dh; "\"\n" mov rdi, rax; this call _ZN7testing15AssertionResultlsIA3_cEERS0_RKT_; testing::AssertionResult::operator<<<char [3]>(char [3] const&) lea rsi, aExpected_1+1; "Expected: " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&) lea rcx, aSFromSSMsTotal+1Ah; "" lea rdx, aNot; "not " test bpl, bpl cmovnz rdx, rcx lea rsi, [rsp+58h+var_30] mov [rsi], rdx mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) lea rsi, aASubstringOf; "a substring of " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA16_cEERS0_RKT_; testing::AssertionResult::operator<<<char [16]>(char [16] const&) lea rsi, [rsp+58h+var_40] mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) lea rsi, aSFromSSMsTotal+19h; "\n" mov rdi, rax; this call _ZN7testing15AssertionResultlsIA2_cEERS0_RKT_; testing::AssertionResult::operator<<<char [2]>(char [2] const&) lea rsi, aWhichIs+5; "Which is: " mov rdi, rax; this call _ZN7testing15AssertionResultlsIA11_cEERS0_RKT_; testing::AssertionResult::operator<<<char [11]>(char [11] const&) mov rsi, rsp mov rdi, rax; this call _ZN7testing15AssertionResultlsIPKcEERS0_RKT_; testing::AssertionResult::operator<<<char const*>(char const* const&) mov rdi, rax; this mov rsi, r15 call _ZN7testing15AssertionResultlsINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEERS0_RKT_; testing::AssertionResult::operator<<<std::string>(std::string const&) lea rsi, aFailure_0+0Fh; "\"" mov rdi, rax; this call _ZN7testing15AssertionResultlsIA2_cEERS0_RKT_; testing::AssertionResult::operator<<<char [2]>(char [2] const&) mov rdi, r14 mov rsi, rax call _ZN7testing15AssertionResultC2ERKS0_; testing::AssertionResult::AssertionResult(testing::AssertionResult const&) mov rsi, [rsp+58h+var_48] test rsi, rsi jz short loc_22B68 mov rdi, rbx call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) jmp short loc_22B68 loc_22B5C: mov byte ptr [r14], 1 mov qword ptr [r14+8], 0 loc_22B68: add rsp, 30h pop rbx pop r12 pop r14 pop r15 pop rbp retn jmp short $+2 loc_22B77: mov r14, rax mov rsi, [rsp+arg_8] test rsi, rsi jz short loc_22B8C mov rdi, rbx call _ZNKSt14default_deleteINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEclEPS5_; std::default_delete<std::string>::operator()(std::string*) loc_22B8C: mov rdi, r14 call __Unwind_Resume
void testing::`anonymous namespace'::IsSubstringImpl<std::string>( testing::AssertionResult *a1, char a2, const char *a3, const char *a4, _QWORD *a5, _QWORD *a6) { testing::AssertionResult *v8; // rax testing::AssertionResult *v9; // rax testing::AssertionResult *v10; // rax testing::AssertionResult *v11; // rax testing::AssertionResult *v12; // rax testing::AssertionResult *v13; // rax testing::AssertionResult *v14; // rax testing::AssertionResult *v15; // rax const char *v16; // rdx testing::AssertionResult *v17; // rax testing::AssertionResult *v18; // rax testing::AssertionResult *v19; // rax testing::AssertionResult *v20; // rax testing::AssertionResult *v21; // rax testing::AssertionResult *v22; // rax testing::AssertionResult *v23; // rax const testing::AssertionResult *v24; // rax long long v25; // [rsp+0h] [rbp-58h] BYREF _BYTE v26[8]; // [rsp+8h] [rbp-50h] BYREF long long v27; // [rsp+10h] [rbp-48h] BYREF const char *v28; // [rsp+18h] [rbp-40h] BYREF const char *v29; // [rsp+20h] [rbp-38h] BYREF const char *v30; // [rsp+28h] [rbp-30h] BYREF v29 = a3; v28 = a4; if ( a2 != (std::string::find(a6, *a5, 0LL, a5[1]) != -1) ) { v26[0] = 0; v27 = 0LL; v8 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>( (testing::AssertionResult *)v26, (long long)"\""); v9 = testing::AssertionResult::operator<<<char const*>(v8, &v29); v10 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [2]>(v9, v25); v11 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>(v10, v25); v12 = testing::AssertionResult::operator<<<char const*>(v11, (const char **)&v25); v13 = testing::AssertionResult::operator<<<std::string>(v12, a5); v14 = testing::AssertionResult::operator<<<char [3]>(v13, (long long)"\"\n"); v15 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>(v14, v25); v16 = "not "; if ( a2 ) v16 = ""; v30 = v16; v17 = testing::AssertionResult::operator<<<char const*>(v15, &v30); v18 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [16]>(v17, v25); v19 = testing::AssertionResult::operator<<<char const*>(v18, &v28); v20 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [2]>(v19, v25); v21 = (testing::AssertionResult *)testing::AssertionResult::operator<<<char [11]>(v20, v25); v22 = testing::AssertionResult::operator<<<char const*>(v21, (const char **)&v25); v23 = testing::AssertionResult::operator<<<std::string>(v22, a6); v24 = (const testing::AssertionResult *)testing::AssertionResult::operator<<<char [2]>(v23, v25); testing::AssertionResult::AssertionResult(a1, v24); if ( v27 ) std::default_delete<std::string>::operator()((long long)&v27, v27); } else { *(_BYTE *)a1 = 1; *((_QWORD *)a1 + 1) = 0LL; } }
IsSubstringImpl<std::__cxx11::string>: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x30 MOV R15,R9 MOV R12,R8 MOV EBP,ESI MOV R14,RDI MOV qword ptr [RSP + 0x20],RDX MOV qword ptr [RSP + 0x18],RCX MOV RSI,qword ptr [R8] MOV RCX,qword ptr [R8 + 0x8] MOV RDI,R9 XOR EDX,EDX CALL 0x00109970 CMP RAX,-0x1 SETNZ AL XOR AL,BPL JZ 0x00122b5c LEA RAX,[0x143a4e] MOV qword ptr [RSP],RAX LEA RBX,[RSP + 0x10] MOV byte ptr [RBX + -0x8],0x0 MOV qword ptr [RBX],0x0 LAB_00122a49: LEA RSI,[0x142ed8] LEA RDI,[RSP + 0x8] CALL 0x00139f4c LEA RSI,[RSP + 0x20] MOV RDI,RAX CALL 0x0011000e LEA RSI,[0x14365f] MOV RDI,RAX CALL 0x001360ee LEA RSI,[0x142ee4] MOV RDI,RAX CALL 0x00139f4c MOV RSI,RSP MOV RDI,RAX CALL 0x0011000e MOV RDI,RAX MOV RSI,R12 CALL 0x0011011c LEA RSI,[0x143a61] MOV RDI,RAX CALL 0x0011009e LEA RSI,[0x142ef0] MOV RDI,RAX CALL 0x00139f4c LEA RCX,[0x143660] LEA RDX,[0x1449f7] TEST BPL,BPL CMOVNZ RDX,RCX LEA RSI,[RSP + 0x28] MOV qword ptr [RSI],RDX LAB_00122ad6: MOV RDI,RAX CALL 0x0011000e LEA RSI,[0x1449fc] MOV RDI,RAX CALL 0x0013dcec LEA RSI,[RSP + 0x18] MOV RDI,RAX CALL 0x0011000e LEA RSI,[0x14365f] MOV RDI,RAX CALL 0x001360ee LEA RSI,[0x142eb1] MOV RDI,RAX CALL 0x00139f4c MOV RSI,RSP MOV RDI,RAX CALL 0x0011000e MOV RDI,RAX MOV RSI,R15 CALL 0x0011011c LEA RSI,[0x143a4e] MOV RDI,RAX CALL 0x001360ee MOV RDI,R14 MOV RSI,RAX CALL 0x00111e20 LAB_00122b48: MOV RSI,qword ptr [RSP + 0x10] TEST RSI,RSI JZ 0x00122b68 MOV RDI,RBX CALL 0x0010f598 JMP 0x00122b68 LAB_00122b5c: MOV byte ptr [R14],0x1 MOV qword ptr [R14 + 0x8],0x0 LAB_00122b68: ADD RSP,0x30 POP RBX POP R12 POP R14 POP R15 POP RBP RET
/* testing::AssertionResult testing::(anonymous namespace)::IsSubstringImpl<std::__cxx11::string >(bool, char const*, char const*, std::__cxx11::string const&, std::__cxx11::string const&) */ void __thiscall testing::(anonymous_namespace)::IsSubstringImpl<std::__cxx11::string> (_anonymous_namespace_ *this,bool param_1,char *param_2,char *param_3,string *param_4, string *param_5) { long lVar1; AssertionResult *pAVar2; char *local_58; AssertionResult local_50 [8]; string *local_48; char *local_40; char *local_38; char *local_30; local_40 = param_3; local_38 = param_2; lVar1 = std::__cxx11::string::find((char *)param_5,*(ulong *)param_4,0); if ((lVar1 != -1) == param_1) { *this = (_anonymous_namespace_)0x1; *(int8 *)(this + 8) = 0; } else { local_58 = "\""; local_50[0] = (AssertionResult)0x0; local_48 = (string *)0x0; /* try { // try from 00122a49 to 00122ab8 has its CatchHandler @ 00122b75 */ pAVar2 = AssertionResult::operator<<(local_50,"Value of: "); pAVar2 = AssertionResult::operator<<(pAVar2,&local_38); pAVar2 = AssertionResult::operator<<(pAVar2,"\n"); pAVar2 = AssertionResult::operator<<(pAVar2," Actual: "); pAVar2 = AssertionResult::operator<<(pAVar2,&local_58); pAVar2 = AssertionResult::operator<<(pAVar2,param_4); pAVar2 = AssertionResult::operator<<(pAVar2,"\"\n"); pAVar2 = AssertionResult::operator<<(pAVar2,"Expected: "); local_30 = "not "; if (param_1) { local_30 = ""; } /* try { // try from 00122ad6 to 00122b47 has its CatchHandler @ 00122b77 */ pAVar2 = AssertionResult::operator<<(pAVar2,&local_30); pAVar2 = AssertionResult::operator<<(pAVar2,"a substring of "); pAVar2 = AssertionResult::operator<<(pAVar2,&local_40); pAVar2 = AssertionResult::operator<<(pAVar2,"\n"); pAVar2 = AssertionResult::operator<<(pAVar2,"Which is: "); pAVar2 = AssertionResult::operator<<(pAVar2,&local_58); pAVar2 = AssertionResult::operator<<(pAVar2,param_5); pAVar2 = AssertionResult::operator<<(pAVar2,"\""); AssertionResult::AssertionResult((AssertionResult *)this,pAVar2); if (local_48 != (string *)0x0) { std::default_delete<std::__cxx11::string>::operator() ((default_delete<std::__cxx11::string> *)&local_48,local_48); } } return; }
46,792
ma_free_root
eloqsql/libmariadb/libmariadb/ma_alloc.c
void ma_free_root(MA_MEM_ROOT *root, myf MyFlags) { reg1 MA_USED_MEM *next,*old; if (!root) return; /* purecov: inspected */ if (!(MyFlags & MY_KEEP_PREALLOC)) root->pre_alloc=0; for ( next=root->used; next ;) { old=next; next= next->next ; if (old != root->pre_alloc) free(old); } for (next= root->free ; next ; ) { old=next; next= next->next ; if (old != root->pre_alloc) free(old); } root->used=root->free=0; if (root->pre_alloc) { root->free=root->pre_alloc; root->free->left=root->pre_alloc->size-ALIGN_SIZE(sizeof(MA_USED_MEM)); root->free->next=0; } }
O3
c
ma_free_root: testq %rdi, %rdi je 0x1e821 pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx testb $0x1, %sil jne 0x1e7b8 movq $0x0, 0x10(%rbx) movq 0x8(%rbx), %rdi testq %rdi, %rdi je 0x1e7d7 movq (%rdi), %r14 cmpq 0x10(%rbx), %rdi je 0x1e7cf callq 0x13570 movq %r14, %rdi testq %r14, %r14 jne 0x1e7c1 movq (%rbx), %rdi testq %rdi, %rdi je 0x1e7f5 movq (%rdi), %r14 cmpq 0x10(%rbx), %rdi je 0x1e7ed callq 0x13570 movq %r14, %rdi testq %r14, %r14 jne 0x1e7df xorps %xmm0, %xmm0 movups %xmm0, (%rbx) movq 0x10(%rbx), %rax testq %rax, %rax je 0x1e81d movq %rax, (%rbx) movq 0x10(%rax), %rcx addq $-0x18, %rcx movq %rcx, 0x8(%rax) movq (%rbx), %rax movq $0x0, (%rax) popq %rbx popq %r14 popq %rbp retq
ma_free_root: test rdi, rdi jz locret_1E821 push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi test sil, 1 jnz short loc_1E7B8 mov qword ptr [rbx+10h], 0 loc_1E7B8: mov rdi, [rbx+8] test rdi, rdi jz short loc_1E7D7 loc_1E7C1: mov r14, [rdi] cmp rdi, [rbx+10h] jz short loc_1E7CF call _free loc_1E7CF: mov rdi, r14 test r14, r14 jnz short loc_1E7C1 loc_1E7D7: mov rdi, [rbx] test rdi, rdi jz short loc_1E7F5 loc_1E7DF: mov r14, [rdi] cmp rdi, [rbx+10h] jz short loc_1E7ED call _free loc_1E7ED: mov rdi, r14 test r14, r14 jnz short loc_1E7DF loc_1E7F5: xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 mov rax, [rbx+10h] test rax, rax jz short loc_1E81D mov [rbx], rax mov rcx, [rax+10h] add rcx, 0FFFFFFFFFFFFFFE8h mov [rax+8], rcx mov rax, [rbx] mov qword ptr [rax], 0 loc_1E81D: pop rbx pop r14 pop rbp locret_1E821: retn
void ma_free_root(long long a1, char a2) { _QWORD *v3; // rdi _QWORD *v4; // r14 _QWORD *v5; // rdi _QWORD *v6; // r14 long long v7; // rax if ( a1 ) { if ( (a2 & 1) == 0 ) *(_QWORD *)(a1 + 16) = 0LL; v3 = *(_QWORD **)(a1 + 8); if ( v3 ) { do { v4 = (_QWORD *)*v3; if ( v3 != *(_QWORD **)(a1 + 16) ) free(v3); v3 = v4; } while ( v4 ); } v5 = *(_QWORD **)a1; if ( *(_QWORD *)a1 ) { do { v6 = (_QWORD *)*v5; if ( v5 != *(_QWORD **)(a1 + 16) ) free(v5); v5 = v6; } while ( v6 ); } *(_OWORD *)a1 = 0LL; v7 = *(_QWORD *)(a1 + 16); if ( v7 ) { *(_QWORD *)a1 = v7; *(_QWORD *)(v7 + 8) = *(_QWORD *)(v7 + 16) - 24LL; **(_QWORD **)a1 = 0LL; } } }
ma_free_root: TEST RDI,RDI JZ 0x0011e821 PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI TEST SIL,0x1 JNZ 0x0011e7b8 MOV qword ptr [RBX + 0x10],0x0 LAB_0011e7b8: MOV RDI,qword ptr [RBX + 0x8] TEST RDI,RDI JZ 0x0011e7d7 LAB_0011e7c1: MOV R14,qword ptr [RDI] CMP RDI,qword ptr [RBX + 0x10] JZ 0x0011e7cf CALL 0x00113570 LAB_0011e7cf: MOV RDI,R14 TEST R14,R14 JNZ 0x0011e7c1 LAB_0011e7d7: MOV RDI,qword ptr [RBX] TEST RDI,RDI JZ 0x0011e7f5 LAB_0011e7df: MOV R14,qword ptr [RDI] CMP RDI,qword ptr [RBX + 0x10] JZ 0x0011e7ed CALL 0x00113570 LAB_0011e7ed: MOV RDI,R14 TEST R14,R14 JNZ 0x0011e7df LAB_0011e7f5: XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 MOV RAX,qword ptr [RBX + 0x10] TEST RAX,RAX JZ 0x0011e81d MOV qword ptr [RBX],RAX MOV RCX,qword ptr [RAX + 0x10] ADD RCX,-0x18 MOV qword ptr [RAX + 0x8],RCX MOV RAX,qword ptr [RBX] MOV qword ptr [RAX],0x0 LAB_0011e81d: POP RBX POP R14 POP RBP LAB_0011e821: RET
void ma_free_root(long *param_1,byte param_2) { int8 *puVar1; long lVar2; int8 *puVar3; if (param_1 != (long *)0x0) { if ((param_2 & 1) == 0) { param_1[2] = 0; } puVar1 = (int8 *)param_1[1]; while (puVar3 = puVar1, puVar3 != (int8 *)0x0) { puVar1 = (int8 *)*puVar3; if (puVar3 != (int8 *)param_1[2]) { free(puVar3); } } puVar1 = (int8 *)*param_1; while (puVar3 = puVar1, puVar3 != (int8 *)0x0) { puVar1 = (int8 *)*puVar3; if (puVar3 != (int8 *)param_1[2]) { free(puVar3); } } *param_1 = 0; param_1[1] = 0; lVar2 = param_1[2]; if (lVar2 != 0) { *param_1 = lVar2; *(long *)(lVar2 + 8) = *(long *)(lVar2 + 0x10) + -0x18; *(int8 *)*param_1 = 0; } } return; }
46,793
my_charset_get_by_name
eloqsql/mysys/charset.c
CHARSET_INFO * my_charset_get_by_name(MY_CHARSET_LOADER *loader, const char *cs_name, uint cs_flags, myf flags) { uint cs_number; CHARSET_INFO *cs; DBUG_ENTER("get_charset_by_csname"); DBUG_PRINT("enter",("name: '%s'", cs_name)); my_pthread_once(&charsets_initialized, init_available_charsets); cs_number= get_charset_number(cs_name, cs_flags, flags); cs= cs_number ? get_internal_charset(loader, cs_number, flags) : NULL; if (!cs && (flags & MY_WME)) { char index_file[FN_REFLEN + sizeof(MY_CHARSET_INDEX)]; strmov(get_charsets_dir(index_file),MY_CHARSET_INDEX); my_error(EE_UNKNOWN_CHARSET, MYF(ME_BELL), cs_name, index_file); } DBUG_RETURN(cs); }
O0
c
my_charset_get_by_name: pushq %rbp movq %rsp, %rbp subq $0x260, %rsp # imm = 0x260 movq %fs:0x28, %rax movq %rax, -0x8(%rbp) movq %rdi, -0x228(%rbp) movq %rsi, -0x230(%rbp) movl %edx, -0x234(%rbp) movq %rcx, -0x240(%rbp) jmp 0x2ed55 leaq 0x367a98(%rip), %rdi # 0x3967f4 leaq -0xae3(%rip), %rsi # 0x2e280 callq 0x24250 movq -0x230(%rbp), %rdi movl -0x234(%rbp), %esi movq -0x240(%rbp), %rdx callq 0x2e540 movl %eax, -0x244(%rbp) cmpl $0x0, -0x244(%rbp) je 0x2edb2 movq -0x228(%rbp), %rdi movl -0x244(%rbp), %esi movq -0x240(%rbp), %rdx callq 0x2e8d0 movq %rax, -0x258(%rbp) jmp 0x2edbd xorl %eax, %eax movq %rax, -0x258(%rbp) jmp 0x2edbd movq -0x258(%rbp), %rax movq %rax, -0x250(%rbp) cmpq $0x0, -0x250(%rbp) jne 0x2ee20 movq -0x240(%rbp), %rax andq $0x10, %rax cmpq $0x0, %rax je 0x2ee20 leaq -0x220(%rbp), %rdi callq 0x2df40 movq %rax, %rdi leaq 0x521e1(%rip), %rsi # 0x80fdd callq 0x242a0 movq -0x230(%rbp), %rdx leaq -0x220(%rbp), %rcx movl $0x16, %edi movl $0x4, %esi movb $0x0, %al callq 0x36660 jmp 0x2ee22 movq -0x250(%rbp), %rax movq %rax, -0x260(%rbp) movq %fs:0x28, %rax movq -0x8(%rbp), %rcx cmpq %rcx, %rax jne 0x2ee52 movq -0x260(%rbp), %rax addq $0x260, %rsp # imm = 0x260 popq %rbp retq callq 0x24300 nopw (%rax,%rax)
my_charset_get_by_name: push rbp mov rbp, rsp sub rsp, 260h mov rax, fs:28h mov [rbp+var_8], rax mov [rbp+var_228], rdi mov [rbp+var_230], rsi mov [rbp+var_234], edx mov [rbp+var_240], rcx jmp short $+2 loc_2ED55: lea rdi, charsets_initialized lea rsi, init_available_charsets call _pthread_once mov rdi, [rbp+var_230] mov esi, [rbp+var_234] mov rdx, [rbp+var_240] call get_charset_number mov [rbp+var_244], eax cmp [rbp+var_244], 0 jz short loc_2EDB2 mov rdi, [rbp+var_228] mov esi, [rbp+var_244] mov rdx, [rbp+var_240] call get_internal_charset mov [rbp+var_258], rax jmp short loc_2EDBD loc_2EDB2: xor eax, eax mov [rbp+var_258], rax jmp short $+2 loc_2EDBD: mov rax, [rbp+var_258] mov [rbp+var_250], rax cmp [rbp+var_250], 0 jnz short loc_2EE20 mov rax, [rbp+var_240] and rax, 10h cmp rax, 0 jz short loc_2EE20 lea rdi, [rbp+var_220] call get_charsets_dir mov rdi, rax lea rsi, aIndexXml; "Index.xml" call _stpcpy mov rdx, [rbp+var_230] lea rcx, [rbp+var_220] mov edi, 16h mov esi, 4 mov al, 0 call my_error loc_2EE20: jmp short $+2 loc_2EE22: mov rax, [rbp+var_250] mov [rbp+var_260], rax mov rax, fs:28h mov rcx, [rbp+var_8] cmp rax, rcx jnz short loc_2EE52 mov rax, [rbp+var_260] add rsp, 260h pop rbp retn loc_2EE52: call ___stack_chk_fail
long long my_charset_get_by_name(long long a1, long long a2, unsigned int a3, long long a4) { long long charsets_dir; // rax int v5; // r8d int v6; // r9d long long internal_charset; // [rsp+8h] [rbp-258h] unsigned int charset_number; // [rsp+1Ch] [rbp-244h] _BYTE v12[536]; // [rsp+40h] [rbp-220h] BYREF unsigned long long v13; // [rsp+258h] [rbp-8h] v13 = __readfsqword(0x28u); pthread_once(&charsets_initialized, init_available_charsets); charset_number = get_charset_number(a2, a3, a4); if ( charset_number ) internal_charset = get_internal_charset(a1, charset_number, a4); else internal_charset = 0LL; if ( !internal_charset && (a4 & 0x10) != 0 ) { charsets_dir = get_charsets_dir((long long)v12); stpcpy(charsets_dir, "Index.xml"); my_error(22, 4, a2, (unsigned int)v12, v5, v6); } return internal_charset; }
my_charset_get_by_name: PUSH RBP MOV RBP,RSP SUB RSP,0x260 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x8],RAX MOV qword ptr [RBP + -0x228],RDI MOV qword ptr [RBP + -0x230],RSI MOV dword ptr [RBP + -0x234],EDX MOV qword ptr [RBP + -0x240],RCX JMP 0x0012ed55 LAB_0012ed55: LEA RDI,[0x4967f4] LEA RSI,[0x12e280] CALL 0x00124250 MOV RDI,qword ptr [RBP + -0x230] MOV ESI,dword ptr [RBP + -0x234] MOV RDX,qword ptr [RBP + -0x240] CALL 0x0012e540 MOV dword ptr [RBP + -0x244],EAX CMP dword ptr [RBP + -0x244],0x0 JZ 0x0012edb2 MOV RDI,qword ptr [RBP + -0x228] MOV ESI,dword ptr [RBP + -0x244] MOV RDX,qword ptr [RBP + -0x240] CALL 0x0012e8d0 MOV qword ptr [RBP + -0x258],RAX JMP 0x0012edbd LAB_0012edb2: XOR EAX,EAX MOV qword ptr [RBP + -0x258],RAX JMP 0x0012edbd LAB_0012edbd: MOV RAX,qword ptr [RBP + -0x258] MOV qword ptr [RBP + -0x250],RAX CMP qword ptr [RBP + -0x250],0x0 JNZ 0x0012ee20 MOV RAX,qword ptr [RBP + -0x240] AND RAX,0x10 CMP RAX,0x0 JZ 0x0012ee20 LEA RDI,[RBP + -0x220] CALL 0x0012df40 MOV RDI,RAX LEA RSI,[0x180fdd] CALL 0x001242a0 MOV RDX,qword ptr [RBP + -0x230] LEA RCX,[RBP + -0x220] MOV EDI,0x16 MOV ESI,0x4 MOV AL,0x0 CALL 0x00136660 LAB_0012ee20: JMP 0x0012ee22 LAB_0012ee22: MOV RAX,qword ptr [RBP + -0x250] MOV qword ptr [RBP + -0x260],RAX MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,RCX JNZ 0x0012ee52 MOV RAX,qword ptr [RBP + -0x260] ADD RSP,0x260 POP RBP RET LAB_0012ee52: CALL 0x00124300
long my_charset_get_by_name(int8 param_1,int8 param_2,int4 param_3,ulong param_4) { int iVar1; char *__dest; long in_FS_OFFSET; long local_260; int1 local_228 [536]; long local_10; local_10 = *(long *)(in_FS_OFFSET + 0x28); pthread_once(&charsets_initialized,init_available_charsets); iVar1 = get_charset_number(param_2,param_3,param_4); if (iVar1 == 0) { local_260 = 0; } else { local_260 = get_internal_charset(param_1,iVar1,param_4); } if ((local_260 == 0) && ((param_4 & 0x10) != 0)) { __dest = (char *)get_charsets_dir(local_228); stpcpy(__dest,"Index.xml"); my_error(0x16,4,param_2,local_228); } if (*(long *)(in_FS_OFFSET + 0x28) == local_10) { return local_260; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
46,794
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&)
monkey531[P]llama/common/common.cpp
bool string_parse_kv_override(const char * data, std::vector<llama_model_kv_override> & overrides) { const char * sep = strchr(data, '='); if (sep == nullptr || sep - data >= 128) { LOG_ERR("%s: malformed KV override '%s'\n", __func__, data); return false; } llama_model_kv_override kvo; std::strncpy(kvo.key, data, sep - data); kvo.key[sep - data] = 0; sep++; if (strncmp(sep, "int:", 4) == 0) { sep += 4; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_INT; kvo.val_i64 = std::atol(sep); } else if (strncmp(sep, "float:", 6) == 0) { sep += 6; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_FLOAT; kvo.val_f64 = std::atof(sep); } else if (strncmp(sep, "bool:", 5) == 0) { sep += 5; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_BOOL; if (std::strcmp(sep, "true") == 0) { kvo.val_bool = true; } else if (std::strcmp(sep, "false") == 0) { kvo.val_bool = false; } else { LOG_ERR("%s: invalid boolean value for KV override '%s'\n", __func__, data); return false; } } else if (strncmp(sep, "str:", 4) == 0) { sep += 4; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_STR; if (strlen(sep) > 127) { LOG_ERR("%s: malformed KV override '%s', value cannot exceed 127 chars\n", __func__, data); return false; } strncpy(kvo.val_str, sep, 127); kvo.val_str[127] = '\0'; } else { LOG_ERR("%s: invalid type for KV override '%s'\n", __func__, data); return false; } overrides.emplace_back(std::move(kvo)); return true; }
O0
cpp
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&): subq $0x128, %rsp # imm = 0x128 movq %rdi, 0x118(%rsp) movq %rsi, 0x110(%rsp) movq 0x118(%rsp), %rdi movl $0x3d, %esi callq 0x5a980 movq %rax, 0x108(%rsp) cmpq $0x0, 0x108(%rsp) je 0xee1d7 movq 0x108(%rsp), %rax movq 0x118(%rsp), %rcx subq %rcx, %rax cmpq $0x80, %rax jl 0xee21f jmp 0xee1d9 xorl %eax, %eax leaq 0x1b8436(%rip), %rcx # 0x2a6618 cmpl (%rcx), %eax jg 0xee210 callq 0x1be7b0 movq %rax, %rdi movq 0x118(%rsp), %r8 movl $0x4, %esi leaq 0x1244b8(%rip), %rdx # 0x2126ba leaq 0x1244d1(%rip), %rcx # 0x2126da movb $0x0, %al callq 0x1be8a0 jmp 0xee212 movb $0x0, 0x127(%rsp) jmp 0xee50c movq %rsp, %rdi addq $0x4, %rdi movq 0x118(%rsp), %rsi movq 0x108(%rsp), %rdx movq 0x118(%rsp), %rax subq %rax, %rdx callq 0x5a260 movq 0x108(%rsp), %rax movq 0x118(%rsp), %rcx subq %rcx, %rax movb $0x0, 0x4(%rsp,%rax) movq 0x108(%rsp), %rax addq $0x1, %rax movq %rax, 0x108(%rsp) movq 0x108(%rsp), %rdi leaq 0x124472(%rip), %rsi # 0x2126f3 movl $0x4, %edx callq 0x5a3e0 cmpl $0x0, %eax jne 0xee2c5 movq 0x108(%rsp), %rax addq $0x4, %rax movq %rax, 0x108(%rsp) movl $0x0, (%rsp) movq 0x108(%rsp), %rdi callq 0x5aa80 movq %rax, 0x88(%rsp) jmp 0xee4f4 movq 0x108(%rsp), %rdi leaq 0x124424(%rip), %rsi # 0x2126f8 movl $0x6, %edx callq 0x5a3e0 cmpl $0x0, %eax jne 0xee319 movq 0x108(%rsp), %rax addq $0x6, %rax movq %rax, 0x108(%rsp) movl $0x1, (%rsp) movq 0x108(%rsp), %rdi callq 0x5aea0 movsd %xmm0, 0x88(%rsp) jmp 0xee4f2 movq 0x108(%rsp), %rdi leaq 0x1243d7(%rip), %rsi # 0x2126ff movl $0x5, %edx callq 0x5a3e0 cmpl $0x0, %eax jne 0xee3eb movq 0x108(%rsp), %rax addq $0x5, %rax movq %rax, 0x108(%rsp) movl $0x2, (%rsp) movq 0x108(%rsp), %rdi leaq 0x11bd89(%rip), %rsi # 0x20a0ee callq 0x5aeb0 cmpl $0x0, %eax jne 0xee379 movb $0x1, 0x88(%rsp) jmp 0xee3e6 movq 0x108(%rsp), %rdi leaq 0x11ea4f(%rip), %rsi # 0x20cdd7 callq 0x5aeb0 cmpl $0x0, %eax jne 0xee39c movb $0x0, 0x88(%rsp) jmp 0xee3e4 jmp 0xee39e xorl %eax, %eax leaq 0x1b8271(%rip), %rcx # 0x2a6618 cmpl (%rcx), %eax jg 0xee3d5 callq 0x1be7b0 movq %rax, %rdi movq 0x118(%rsp), %r8 movl $0x4, %esi leaq 0x12433e(%rip), %rdx # 0x212705 leaq 0x12430c(%rip), %rcx # 0x2126da movb $0x0, %al callq 0x1be8a0 jmp 0xee3d7 movb $0x0, 0x127(%rsp) jmp 0xee50c jmp 0xee3e6 jmp 0xee4f0 movq 0x108(%rsp), %rdi leaq 0x12433b(%rip), %rsi # 0x212735 movl $0x4, %edx callq 0x5a3e0 cmpl $0x0, %eax jne 0xee4a9 movq 0x108(%rsp), %rax addq $0x4, %rax movq %rax, 0x108(%rsp) movl $0x3, (%rsp) movq 0x108(%rsp), %rdi callq 0x5a6a0 cmpq $0x7f, %rax jbe 0xee483 jmp 0xee43d xorl %eax, %eax leaq 0x1b81d2(%rip), %rcx # 0x2a6618 cmpl (%rcx), %eax jg 0xee474 callq 0x1be7b0 movq %rax, %rdi movq 0x118(%rsp), %r8 movl $0x4, %esi leaq 0x1242d4(%rip), %rdx # 0x21273a leaq 0x12426d(%rip), %rcx # 0x2126da movb $0x0, %al callq 0x1be8a0 jmp 0xee476 movb $0x0, 0x127(%rsp) jmp 0xee50c movq %rsp, %rdi addq $0x88, %rdi movq 0x108(%rsp), %rsi movl $0x7f, %edx callq 0x5a260 movb $0x0, 0x107(%rsp) jmp 0xee4ee jmp 0xee4ab xorl %eax, %eax leaq 0x1b8164(%rip), %rcx # 0x2a6618 cmpl (%rcx), %eax jg 0xee4e2 callq 0x1be7b0 movq %rax, %rdi movq 0x118(%rsp), %r8 movl $0x4, %esi leaq 0x1242a5(%rip), %rdx # 0x212779 leaq 0x1241ff(%rip), %rcx # 0x2126da movb $0x0, %al callq 0x1be8a0 jmp 0xee4e4 movb $0x0, 0x127(%rsp) jmp 0xee50c jmp 0xee4f0 jmp 0xee4f2 jmp 0xee4f4 movq 0x110(%rsp), %rdi movq %rsp, %rsi callq 0xf7eb0 movb $0x1, 0x127(%rsp) movb 0x127(%rsp), %al andb $0x1, %al addq $0x128, %rsp # imm = 0x128 retq nopl (%rax)
_Z24string_parse_kv_overridePKcRSt6vectorI23llama_model_kv_overrideSaIS2_EE: sub rsp, 128h mov [rsp+128h+var_10], rdi mov [rsp+128h+var_18], rsi mov rdi, [rsp+128h+var_10] mov esi, 3Dh ; '=' call _strchr mov [rsp+128h+var_20], rax cmp [rsp+128h+var_20], 0 jz short loc_EE1D7 mov rax, [rsp+128h+var_20] mov rcx, [rsp+128h+var_10] sub rax, rcx cmp rax, 80h jl short loc_EE21F loc_EE1D7: jmp short $+2 loc_EE1D9: xor eax, eax lea rcx, common_log_verbosity_thold cmp eax, [rcx] jg short loc_EE210 call _Z15common_log_mainv; common_log_main(void) mov rdi, rax mov r8, [rsp+128h+var_10] mov esi, 4 lea rdx, aSMalformedKvOv; "%s: malformed KV override '%s'\n" lea rcx, aStringParseKvO; "string_parse_kv_override" mov al, 0 call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_EE210: jmp short $+2 loc_EE212: mov [rsp+128h+var_1], 0 jmp loc_EE50C loc_EE21F: mov rdi, rsp add rdi, 4 mov rsi, [rsp+128h+var_10] mov rdx, [rsp+128h+var_20] mov rax, [rsp+128h+var_10] sub rdx, rax call _strncpy mov rax, [rsp+128h+var_20] mov rcx, [rsp+128h+var_10] sub rax, rcx mov [rsp+rax+128h+var_124], 0 mov rax, [rsp+128h+var_20] add rax, 1 mov [rsp+128h+var_20], rax mov rdi, [rsp+128h+var_20] lea rsi, aInt; "int:" mov edx, 4 call _strncmp cmp eax, 0 jnz short loc_EE2C5 mov rax, [rsp+128h+var_20] add rax, 4 mov [rsp+128h+var_20], rax mov [rsp+128h+var_128], 0 mov rdi, [rsp+128h+var_20] call _atol mov [rsp+128h+var_A0], rax jmp loc_EE4F4 loc_EE2C5: mov rdi, [rsp+128h+var_20] lea rsi, aFloat; "float:" mov edx, 6 call _strncmp cmp eax, 0 jnz short loc_EE319 mov rax, [rsp+128h+var_20] add rax, 6 mov [rsp+128h+var_20], rax mov [rsp+128h+var_128], 1 mov rdi, [rsp+128h+var_20] call _atof movsd [rsp+128h+var_A0], xmm0 jmp loc_EE4F2 loc_EE319: mov rdi, [rsp+128h+var_20] lea rsi, aBool; "bool:" mov edx, 5 call _strncmp cmp eax, 0 jnz loc_EE3EB mov rax, [rsp+128h+var_20] add rax, 5 mov [rsp+128h+var_20], rax mov [rsp+128h+var_128], 2 mov rdi, [rsp+128h+var_20] lea rsi, aTrue; "true" call _strcmp cmp eax, 0 jnz short loc_EE379 mov byte ptr [rsp+128h+var_A0], 1 jmp short loc_EE3E6 loc_EE379: mov rdi, [rsp+128h+var_20] lea rsi, aAdvancedOption+0ABh; "false" call _strcmp cmp eax, 0 jnz short loc_EE39C mov byte ptr [rsp+128h+var_A0], 0 jmp short loc_EE3E4 loc_EE39C: jmp short $+2 loc_EE39E: xor eax, eax lea rcx, common_log_verbosity_thold cmp eax, [rcx] jg short loc_EE3D5 call _Z15common_log_mainv; common_log_main(void) mov rdi, rax mov r8, [rsp+128h+var_10] mov esi, 4 lea rdx, aSInvalidBoolea; "%s: invalid boolean value for KV overri"... lea rcx, aStringParseKvO; "string_parse_kv_override" mov al, 0 call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_EE3D5: jmp short $+2 loc_EE3D7: mov [rsp+128h+var_1], 0 jmp loc_EE50C loc_EE3E4: jmp short $+2 loc_EE3E6: jmp loc_EE4F0 loc_EE3EB: mov rdi, [rsp+128h+var_20] lea rsi, aStr; "str:" mov edx, 4 call _strncmp cmp eax, 0 jnz loc_EE4A9 mov rax, [rsp+128h+var_20] add rax, 4 mov [rsp+128h+var_20], rax mov [rsp+128h+var_128], 3 mov rdi, [rsp+128h+var_20] call _strlen cmp rax, 7Fh jbe short loc_EE483 jmp short $+2 loc_EE43D: xor eax, eax lea rcx, common_log_verbosity_thold cmp eax, [rcx] jg short loc_EE474 call _Z15common_log_mainv; common_log_main(void) mov rdi, rax mov r8, [rsp+128h+var_10] mov esi, 4 lea rdx, aSMalformedKvOv_0; "%s: malformed KV override '%s', value c"... lea rcx, aStringParseKvO; "string_parse_kv_override" mov al, 0 call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_EE474: jmp short $+2 loc_EE476: mov [rsp+128h+var_1], 0 jmp loc_EE50C loc_EE483: mov rdi, rsp add rdi, 88h mov rsi, [rsp+128h+var_20] mov edx, 7Fh call _strncpy mov [rsp+128h+var_21], 0 jmp short loc_EE4EE loc_EE4A9: jmp short $+2 loc_EE4AB: xor eax, eax lea rcx, common_log_verbosity_thold cmp eax, [rcx] jg short loc_EE4E2 call _Z15common_log_mainv; common_log_main(void) mov rdi, rax mov r8, [rsp+128h+var_10] mov esi, 4 lea rdx, aSInvalidTypeFo; "%s: invalid type for KV override '%s'\n" lea rcx, aStringParseKvO; "string_parse_kv_override" mov al, 0 call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) loc_EE4E2: jmp short $+2 loc_EE4E4: mov [rsp+128h+var_1], 0 jmp short loc_EE50C loc_EE4EE: jmp short $+2 loc_EE4F0: jmp short $+2 loc_EE4F2: jmp short $+2 loc_EE4F4: mov rdi, [rsp+128h+var_18] mov rsi, rsp call _ZNSt6vectorI23llama_model_kv_overrideSaIS0_EE12emplace_backIJS0_EEERS0_DpOT_; std::vector<llama_model_kv_override>::emplace_back<llama_model_kv_override>(llama_model_kv_override &&) mov [rsp+128h+var_1], 1 loc_EE50C: mov al, [rsp+128h+var_1] and al, 1 add rsp, 128h retn
char string_parse_kv_override(long long a1, long long a2) { int v2; // eax int v3; // r9d int v4; // eax int v5; // r9d int v6; // eax int v7; // r9d int v8; // eax int v9; // r9d int v11; // [rsp+0h] [rbp-128h] BYREF _BYTE v12[132]; // [rsp+4h] [rbp-124h] BYREF long long v13[15]; // [rsp+88h] [rbp-A0h] BYREF char v14; // [rsp+107h] [rbp-21h] long long v15; // [rsp+108h] [rbp-20h] long long v16; // [rsp+110h] [rbp-18h] long long v17; // [rsp+118h] [rbp-10h] v17 = a1; v16 = a2; v15 = strchr(a1, 61LL); if ( !v15 || v15 - v17 >= 128 ) { if ( common_log_verbosity_thold >= 0 ) { v2 = common_log_main(); common_log_add( v2, 4, (unsigned int)"%s: malformed KV override '%s'\n", (unsigned int)"string_parse_kv_override", v17, v3); } return 0; } strncpy(v12, v17, v15 - v17); v12[v15 - v17] = 0; if ( !(unsigned int)strncmp(++v15, "int:", 4LL) ) { v15 += 4LL; v11 = 0; v13[0] = atol(v15); LABEL_27: std::vector<llama_model_kv_override>::emplace_back<llama_model_kv_override>(v16, &v11); return 1; } if ( !(unsigned int)strncmp(v15, "float:", 6LL) ) { v15 += 6LL; v11 = 1; v13[0] = atof(v15); goto LABEL_27; } if ( !(unsigned int)strncmp(v15, "bool:", 5LL) ) { v15 += 5LL; v11 = 2; if ( !(unsigned int)strcmp(v15, "true") ) { LOBYTE(v13[0]) = 1; goto LABEL_27; } if ( !(unsigned int)strcmp(v15, "false") ) { LOBYTE(v13[0]) = 0; goto LABEL_27; } if ( common_log_verbosity_thold >= 0 ) { v4 = common_log_main(); common_log_add( v4, 4, (unsigned int)"%s: invalid boolean value for KV override '%s'\n", (unsigned int)"string_parse_kv_override", v17, v5); } return 0; } else if ( !(unsigned int)strncmp(v15, "str:", 4LL) ) { v15 += 4LL; v11 = 3; if ( (unsigned long long)strlen(v15) <= 0x7F ) { strncpy(v13, v15, 127LL); v14 = 0; goto LABEL_27; } if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); common_log_add( v6, 4, (unsigned int)"%s: malformed KV override '%s', value cannot exceed 127 chars\n", (unsigned int)"string_parse_kv_override", v17, v7); } return 0; } else { if ( common_log_verbosity_thold >= 0 ) { v8 = common_log_main(); common_log_add( v8, 4, (unsigned int)"%s: invalid type for KV override '%s'\n", (unsigned int)"string_parse_kv_override", v17, v9); } return 0; } }
string_parse_kv_override: SUB RSP,0x128 MOV qword ptr [RSP + 0x118],RDI MOV qword ptr [RSP + 0x110],RSI MOV RDI,qword ptr [RSP + 0x118] MOV ESI,0x3d CALL 0x0015a980 MOV qword ptr [RSP + 0x108],RAX CMP qword ptr [RSP + 0x108],0x0 JZ 0x001ee1d7 MOV RAX,qword ptr [RSP + 0x108] MOV RCX,qword ptr [RSP + 0x118] SUB RAX,RCX CMP RAX,0x80 JL 0x001ee21f LAB_001ee1d7: JMP 0x001ee1d9 LAB_001ee1d9: XOR EAX,EAX LEA RCX,[0x3a6618] CMP EAX,dword ptr [RCX] JG 0x001ee210 CALL 0x002be7b0 MOV RDI,RAX MOV R8,qword ptr [RSP + 0x118] MOV ESI,0x4 LEA RDX,[0x3126ba] LEA RCX,[0x3126da] MOV AL,0x0 CALL 0x002be8a0 LAB_001ee210: JMP 0x001ee212 LAB_001ee212: MOV byte ptr [RSP + 0x127],0x0 JMP 0x001ee50c LAB_001ee21f: MOV RDI,RSP ADD RDI,0x4 MOV RSI,qword ptr [RSP + 0x118] MOV RDX,qword ptr [RSP + 0x108] MOV RAX,qword ptr [RSP + 0x118] SUB RDX,RAX CALL 0x0015a260 MOV RAX,qword ptr [RSP + 0x108] MOV RCX,qword ptr [RSP + 0x118] SUB RAX,RCX MOV byte ptr [RSP + RAX*0x1 + 0x4],0x0 MOV RAX,qword ptr [RSP + 0x108] ADD RAX,0x1 MOV qword ptr [RSP + 0x108],RAX MOV RDI,qword ptr [RSP + 0x108] LEA RSI,[0x3126f3] MOV EDX,0x4 CALL 0x0015a3e0 CMP EAX,0x0 JNZ 0x001ee2c5 MOV RAX,qword ptr [RSP + 0x108] ADD RAX,0x4 MOV qword ptr [RSP + 0x108],RAX MOV dword ptr [RSP],0x0 MOV RDI,qword ptr [RSP + 0x108] CALL 0x0015aa80 MOV qword ptr [RSP + 0x88],RAX JMP 0x001ee4f4 LAB_001ee2c5: MOV RDI,qword ptr [RSP + 0x108] LEA RSI,[0x3126f8] MOV EDX,0x6 CALL 0x0015a3e0 CMP EAX,0x0 JNZ 0x001ee319 MOV RAX,qword ptr [RSP + 0x108] ADD RAX,0x6 MOV qword ptr [RSP + 0x108],RAX MOV dword ptr [RSP],0x1 MOV RDI,qword ptr [RSP + 0x108] CALL 0x0015aea0 MOVSD qword ptr [RSP + 0x88],XMM0 JMP 0x001ee4f2 LAB_001ee319: MOV RDI,qword ptr [RSP + 0x108] LEA RSI,[0x3126ff] MOV EDX,0x5 CALL 0x0015a3e0 CMP EAX,0x0 JNZ 0x001ee3eb MOV RAX,qword ptr [RSP + 0x108] ADD RAX,0x5 MOV qword ptr [RSP + 0x108],RAX MOV dword ptr [RSP],0x2 MOV RDI,qword ptr [RSP + 0x108] LEA RSI,[0x30a0ee] CALL 0x0015aeb0 CMP EAX,0x0 JNZ 0x001ee379 MOV byte ptr [RSP + 0x88],0x1 JMP 0x001ee3e6 LAB_001ee379: MOV RDI,qword ptr [RSP + 0x108] LEA RSI,[0x30cdd7] CALL 0x0015aeb0 CMP EAX,0x0 JNZ 0x001ee39c MOV byte ptr [RSP + 0x88],0x0 JMP 0x001ee3e4 LAB_001ee39c: JMP 0x001ee39e LAB_001ee39e: XOR EAX,EAX LEA RCX,[0x3a6618] CMP EAX,dword ptr [RCX] JG 0x001ee3d5 CALL 0x002be7b0 MOV RDI,RAX MOV R8,qword ptr [RSP + 0x118] MOV ESI,0x4 LEA RDX,[0x312705] LEA RCX,[0x3126da] MOV AL,0x0 CALL 0x002be8a0 LAB_001ee3d5: JMP 0x001ee3d7 LAB_001ee3d7: MOV byte ptr [RSP + 0x127],0x0 JMP 0x001ee50c LAB_001ee3e4: JMP 0x001ee3e6 LAB_001ee3e6: JMP 0x001ee4f0 LAB_001ee3eb: MOV RDI,qword ptr [RSP + 0x108] LEA RSI,[0x312735] MOV EDX,0x4 CALL 0x0015a3e0 CMP EAX,0x0 JNZ 0x001ee4a9 MOV RAX,qword ptr [RSP + 0x108] ADD RAX,0x4 MOV qword ptr [RSP + 0x108],RAX MOV dword ptr [RSP],0x3 MOV RDI,qword ptr [RSP + 0x108] CALL 0x0015a6a0 CMP RAX,0x7f JBE 0x001ee483 JMP 0x001ee43d LAB_001ee43d: XOR EAX,EAX LEA RCX,[0x3a6618] CMP EAX,dword ptr [RCX] JG 0x001ee474 CALL 0x002be7b0 MOV RDI,RAX MOV R8,qword ptr [RSP + 0x118] MOV ESI,0x4 LEA RDX,[0x31273a] LEA RCX,[0x3126da] MOV AL,0x0 CALL 0x002be8a0 LAB_001ee474: JMP 0x001ee476 LAB_001ee476: MOV byte ptr [RSP + 0x127],0x0 JMP 0x001ee50c LAB_001ee483: MOV RDI,RSP ADD RDI,0x88 MOV RSI,qword ptr [RSP + 0x108] MOV EDX,0x7f CALL 0x0015a260 MOV byte ptr [RSP + 0x107],0x0 JMP 0x001ee4ee LAB_001ee4a9: JMP 0x001ee4ab LAB_001ee4ab: XOR EAX,EAX LEA RCX,[0x3a6618] CMP EAX,dword ptr [RCX] JG 0x001ee4e2 CALL 0x002be7b0 MOV RDI,RAX MOV R8,qword ptr [RSP + 0x118] MOV ESI,0x4 LEA RDX,[0x312779] LEA RCX,[0x3126da] MOV AL,0x0 CALL 0x002be8a0 LAB_001ee4e2: JMP 0x001ee4e4 LAB_001ee4e4: MOV byte ptr [RSP + 0x127],0x0 JMP 0x001ee50c LAB_001ee4ee: JMP 0x001ee4f0 LAB_001ee4f0: JMP 0x001ee4f2 LAB_001ee4f2: JMP 0x001ee4f4 LAB_001ee4f4: MOV RDI,qword ptr [RSP + 0x110] MOV RSI,RSP CALL 0x001f7eb0 MOV byte ptr [RSP + 0x127],0x1 LAB_001ee50c: MOV AL,byte ptr [RSP + 0x127] AND AL,0x1 ADD RSP,0x128 RET
/* string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override> >&) */ int1 string_parse_kv_override(char *param_1,vector *param_2) { int iVar1; int8 uVar2; size_t sVar3; int4 local_128; char acStack_124 [132]; double local_a0 [15]; int1 local_21; char *local_20; vector *local_18; char *local_10; local_18 = param_2; local_10 = param_1; local_20 = strchr(param_1,0x3d); if ((local_20 == (char *)0x0) || (0x7f < (long)local_20 - (long)local_10)) { if (-1 < common_log_verbosity_thold) { uVar2 = common_log_main(); common_log_add(uVar2,4,"%s: malformed KV override \'%s\'\n","string_parse_kv_override", local_10); } return 0; } strncpy(acStack_124,local_10,(long)local_20 - (long)local_10); local_20[(long)(acStack_124 + -(long)local_10)] = '\0'; local_20 = local_20 + 1; iVar1 = strncmp(local_20,"int:",4); if (iVar1 == 0) { local_20 = local_20 + 4; local_128 = 0; local_a0[0] = (double)atol(local_20); } else { iVar1 = strncmp(local_20,"float:",6); if (iVar1 == 0) { local_20 = local_20 + 6; local_128 = 1; local_a0[0] = atof(local_20); } else { iVar1 = strncmp(local_20,"bool:",5); if (iVar1 == 0) { local_20 = local_20 + 5; local_128 = 2; iVar1 = strcmp(local_20,"true"); if (iVar1 == 0) { local_a0[0] = (double)CONCAT71(local_a0[0]._1_7_,1); } else { iVar1 = strcmp(local_20,"false"); if (iVar1 != 0) { if (-1 < common_log_verbosity_thold) { uVar2 = common_log_main(); common_log_add(uVar2,4,"%s: invalid boolean value for KV override \'%s\'\n", "string_parse_kv_override",local_10); } return 0; } local_a0[0] = (double)((ulong)local_a0[0] & 0xffffffffffffff00); } } else { iVar1 = strncmp(local_20,"str:",4); if (iVar1 != 0) { if (-1 < common_log_verbosity_thold) { uVar2 = common_log_main(); common_log_add(uVar2,4,"%s: invalid type for KV override \'%s\'\n", "string_parse_kv_override",local_10); } return 0; } local_20 = local_20 + 4; local_128 = 3; sVar3 = strlen(local_20); if (0x7f < sVar3) { if (-1 < common_log_verbosity_thold) { uVar2 = common_log_main(); common_log_add(uVar2,4, "%s: malformed KV override \'%s\', value cannot exceed 127 chars\n", "string_parse_kv_override",local_10); } return 0; } strncpy((char *)local_a0,local_20,0x7f); local_21 = 0; } } } std::vector<llama_model_kv_override,std::allocator<llama_model_kv_override>>:: emplace_back<llama_model_kv_override> ((vector<llama_model_kv_override,std::allocator<llama_model_kv_override>> *)local_18, (llama_model_kv_override *)&local_128); return 1; }
46,795
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&)
monkey531[P]llama/common/common.cpp
bool string_parse_kv_override(const char * data, std::vector<llama_model_kv_override> & overrides) { const char * sep = strchr(data, '='); if (sep == nullptr || sep - data >= 128) { LOG_ERR("%s: malformed KV override '%s'\n", __func__, data); return false; } llama_model_kv_override kvo; std::strncpy(kvo.key, data, sep - data); kvo.key[sep - data] = 0; sep++; if (strncmp(sep, "int:", 4) == 0) { sep += 4; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_INT; kvo.val_i64 = std::atol(sep); } else if (strncmp(sep, "float:", 6) == 0) { sep += 6; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_FLOAT; kvo.val_f64 = std::atof(sep); } else if (strncmp(sep, "bool:", 5) == 0) { sep += 5; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_BOOL; if (std::strcmp(sep, "true") == 0) { kvo.val_bool = true; } else if (std::strcmp(sep, "false") == 0) { kvo.val_bool = false; } else { LOG_ERR("%s: invalid boolean value for KV override '%s'\n", __func__, data); return false; } } else if (strncmp(sep, "str:", 4) == 0) { sep += 4; kvo.tag = LLAMA_KV_OVERRIDE_TYPE_STR; if (strlen(sep) > 127) { LOG_ERR("%s: malformed KV override '%s', value cannot exceed 127 chars\n", __func__, data); return false; } strncpy(kvo.val_str, sep, 127); kvo.val_str[127] = '\0'; } else { LOG_ERR("%s: invalid type for KV override '%s'\n", __func__, data); return false; } overrides.emplace_back(std::move(kvo)); return true; }
O3
cpp
string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override>>&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x110, %rsp # imm = 0x110 movq %rsi, %r14 movq %rdi, %rbx movl $0x3d, %esi callq 0x1a320 testq %rax, %rax je 0x73134 movq %rax, %r15 movq %rax, %r12 subq %rbx, %r12 cmpq $0x80, %r12 jl 0x73170 leaq 0xba2fd(%rip), %rax # 0x12d438 cmpl $0x0, (%rax) js 0x7331c callq 0xcb8a7 leaq 0x7bb86(%rip), %rdx # 0xeecd6 leaq 0x7bb9f(%rip), %rcx # 0xeecf6 xorl %ebp, %ebp movq %rax, %rdi movl $0x4, %esi movq %rbx, %r8 xorl %eax, %eax callq 0xcb944 jmp 0x7331e leaq 0xc(%rsp), %rdi movq %rbx, %rsi movq %r12, %rdx callq 0x1a490 movb $0x0, 0xc(%rsp,%r12) leaq 0x1(%r15), %r12 leaq 0x7bb7e(%rip), %rsi # 0xeed0f movl $0x4, %edx movq %r12, %rdi callq 0x1a450 testl %eax, %eax je 0x73213 leaq 0x7bb6b(%rip), %rsi # 0xeed14 movl $0x6, %edx movq %r12, %rdi callq 0x1a450 testl %eax, %eax je 0x73231 leaq 0x7bb5a(%rip), %rsi # 0xeed1b movl $0x5, %edx movq %r12, %rdi callq 0x1a450 testl %eax, %eax je 0x7328c leaq 0x7bb74(%rip), %rsi # 0xeed51 movl $0x4, %edx movq %r12, %rdi callq 0x1a450 testl %eax, %eax je 0x732e3 leaq 0xba23f(%rip), %rax # 0x12d438 cmpl $0x0, (%rax) js 0x7331c callq 0xcb8a7 leaq 0x7bb87(%rip), %rdx # 0xeed95 jmp 0x73150 addq $0x5, %r15 movl $0x0, 0x8(%rsp) movq %r15, %rdi callq 0x1aa70 movq %rax, 0x90(%rsp) jmp 0x7324e addq $0x7, %r15 movl $0x1, 0x8(%rsp) movq %r15, %rdi callq 0x1aad0 movsd %xmm0, 0x90(%rsp) movq 0x8(%r14), %rax cmpq 0x10(%r14), %rax je 0x73274 leaq 0x8(%rsp), %rsi movl $0x108, %edx # imm = 0x108 movq %rax, %rdi callq 0x1a750 addq $0x108, 0x8(%r14) # imm = 0x108 jmp 0x73284 leaq 0x8(%rsp), %rdx movq %r14, %rdi movq %rax, %rsi callq 0xb8b4a movb $0x1, %bpl jmp 0x7331e addq $0x6, %r15 movl $0x2, 0x8(%rsp) leaq 0x7393b(%rip), %rsi # 0xe6bda movq %r15, %rdi callq 0x1ac50 testl %eax, %eax je 0x73330 leaq 0x7660d(%rip), %rsi # 0xe98c3 movq %r15, %rdi callq 0x1ac50 testl %eax, %eax je 0x7335e leaq 0xba16b(%rip), %rax # 0x12d438 cmpl $0x0, (%rax) js 0x7331c callq 0xcb8a7 leaq 0x7ba43(%rip), %rdx # 0xeed21 jmp 0x73150 addq $0x5, %r15 movl $0x3, 0x8(%rsp) movq %r15, %rdi callq 0x1a400 cmpq $0x80, %rax jb 0x7333d leaq 0xba132(%rip), %rax # 0x12d438 cmpl $0x0, (%rax) js 0x7331c callq 0xcb8a7 leaq 0x7ba3f(%rip), %rdx # 0xeed56 jmp 0x73150 xorl %ebp, %ebp movl %ebp, %eax addq $0x110, %rsp # imm = 0x110 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movb $0x1, 0x90(%rsp) jmp 0x7324e leaq 0x90(%rsp), %rbx movl $0x7f, %edx movq %rbx, %rdi movq %r15, %rsi callq 0x1a490 movb $0x0, 0x7f(%rbx) jmp 0x7324e movb $0x0, 0x90(%rsp) jmp 0x7324e
_Z24string_parse_kv_overridePKcRSt6vectorI23llama_model_kv_overrideSaIS2_EE: push rbp push r15 push r14 push r12 push rbx sub rsp, 110h mov r14, rsi mov rbx, rdi mov esi, 3Dh ; '=' call _strchr test rax, rax jz short loc_73134 mov r15, rax mov r12, rax sub r12, rbx cmp r12, 80h jl short loc_73170 loc_73134: lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_7331C call _Z15common_log_mainv; common_log_main(void) lea rdx, aSMalformedKvOv; "%s: malformed KV override '%s'\n" loc_73150: lea rcx, aStringParseKvO; "string_parse_kv_override" xor ebp, ebp mov rdi, rax mov esi, 4 mov r8, rbx xor eax, eax call _Z14common_log_addP10common_log14ggml_log_levelPKcz; common_log_add(common_log *,ggml_log_level,char const*,...) jmp loc_7331E loc_73170: lea rdi, [rsp+138h+var_12C] mov rsi, rbx mov rdx, r12 call _strncpy mov [rsp+r12+138h+var_12C], 0 lea r12, [r15+1] lea rsi, aInt; "int:" mov edx, 4 mov rdi, r12 call _strncmp test eax, eax jz short loc_73213 lea rsi, aFloat; "float:" mov edx, 6 mov rdi, r12 call _strncmp test eax, eax jz short loc_73231 lea rsi, aBool; "bool:" mov edx, 5 mov rdi, r12 call _strncmp test eax, eax jz loc_7328C lea rsi, aStr; "str:" mov edx, 4 mov rdi, r12 call _strncmp test eax, eax jz loc_732E3 lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js loc_7331C call _Z15common_log_mainv; common_log_main(void) lea rdx, aSInvalidTypeFo; "%s: invalid type for KV override '%s'\n" jmp loc_73150 loc_73213: add r15, 5 mov [rsp+138h+var_130], 0 mov rdi, r15 call _atol mov [rsp+138h+var_A8], rax jmp short loc_7324E loc_73231: add r15, 7 mov [rsp+138h+var_130], 1 mov rdi, r15 call _atof movsd [rsp+138h+var_A8], xmm0 loc_7324E: mov rax, [r14+8] cmp rax, [r14+10h] jz short loc_73274 lea rsi, [rsp+138h+var_130] mov edx, 108h mov rdi, rax call _memcpy add qword ptr [r14+8], 108h jmp short loc_73284 loc_73274: lea rdx, [rsp+138h+var_130] mov rdi, r14 mov rsi, rax call _ZNSt6vectorI23llama_model_kv_overrideSaIS0_EE17_M_realloc_insertIJS0_EEEvN9__gnu_cxx17__normal_iteratorIPS0_S2_EEDpOT_; std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>(__gnu_cxx::__normal_iterator<llama_model_kv_override*,std::vector<llama_model_kv_override>>,llama_model_kv_override &&) loc_73284: mov bpl, 1 jmp loc_7331E loc_7328C: add r15, 6 mov [rsp+138h+var_130], 2 lea rsi, aTrue; "true" mov rdi, r15 call _strcmp test eax, eax jz loc_73330 lea rsi, aAdvancedOption+0ABh; "false" mov rdi, r15 call _strcmp test eax, eax jz loc_7335E lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_7331C call _Z15common_log_mainv; common_log_main(void) lea rdx, aSInvalidBoolea; "%s: invalid boolean value for KV overri"... jmp loc_73150 loc_732E3: add r15, 5 mov [rsp+138h+var_130], 3 mov rdi, r15 call _strlen cmp rax, 80h jb short loc_7333D lea rax, common_log_verbosity_thold cmp dword ptr [rax], 0 js short loc_7331C call _Z15common_log_mainv; common_log_main(void) lea rdx, aSMalformedKvOv_0; "%s: malformed KV override '%s', value c"... jmp loc_73150 loc_7331C: xor ebp, ebp loc_7331E: mov eax, ebp add rsp, 110h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_73330: mov byte ptr [rsp+138h+var_A8], 1 jmp loc_7324E loc_7333D: lea rbx, [rsp+138h+var_A8] mov edx, 7Fh mov rdi, rbx mov rsi, r15 call _strncpy mov byte ptr [rbx+7Fh], 0 jmp loc_7324E loc_7335E: mov byte ptr [rsp+138h+var_A8], 0 jmp loc_7324E
long long string_parse_kv_override(long long a1, long long a2) { unsigned int v2; // ebp long long v3; // rax long long v4; // r15 long long v5; // r12 int v6; // eax int v7; // r9d const char *v8; // rdx long long v9; // r15 long long v10; // r15 int v12; // [rsp+8h] [rbp-130h] BYREF _BYTE v13[132]; // [rsp+Ch] [rbp-12Ch] BYREF long long v14[15]; // [rsp+90h] [rbp-A8h] BYREF char v15; // [rsp+10Fh] [rbp-29h] v3 = strchr(a1, 61LL); if ( !v3 || (v4 = v3, v5 = v3 - a1, v3 - a1 >= 128) ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: malformed KV override '%s'\n"; LABEL_5: v2 = 0; common_log_add(v6, 4, (_DWORD)v8, (unsigned int)"string_parse_kv_override", a1, v7); return v2; } return 0; } strncpy(v13, a1, v3 - a1); v13[v5] = 0; if ( !(unsigned int)strncmp(v4 + 1, "int:", 4LL) ) { v12 = 0; v14[0] = atol(v4 + 5); } else if ( !(unsigned int)strncmp(v4 + 1, "float:", 6LL) ) { v12 = 1; v14[0] = atof(v4 + 7); } else if ( !(unsigned int)strncmp(v4 + 1, "bool:", 5LL) ) { v9 = v4 + 6; v12 = 2; if ( !(unsigned int)strcmp(v9, "true") ) { LOBYTE(v14[0]) = 1; } else { if ( (unsigned int)strcmp(v9, "false") ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: invalid boolean value for KV override '%s'\n"; goto LABEL_5; } return 0; } LOBYTE(v14[0]) = 0; } } else { if ( (unsigned int)strncmp(v4 + 1, "str:", 4LL) ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: invalid type for KV override '%s'\n"; goto LABEL_5; } return 0; } v10 = v4 + 5; v12 = 3; if ( (unsigned long long)strlen(v10) >= 0x80 ) { if ( common_log_verbosity_thold >= 0 ) { v6 = common_log_main(); v8 = "%s: malformed KV override '%s', value cannot exceed 127 chars\n"; goto LABEL_5; } return 0; } strncpy(v14, v10, 127LL); v15 = 0; } if ( *(_QWORD *)(a2 + 8) == *(_QWORD *)(a2 + 16) ) { std::vector<llama_model_kv_override>::_M_realloc_insert<llama_model_kv_override>(a2, *(_QWORD *)(a2 + 8), &v12); } else { memcpy(*(_QWORD *)(a2 + 8), &v12, 264LL); *(_QWORD *)(a2 + 8) += 264LL; } LOBYTE(v2) = 1; return v2; }
string_parse_kv_override: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x110 MOV R14,RSI MOV RBX,RDI MOV ESI,0x3d CALL 0x0011a320 TEST RAX,RAX JZ 0x00173134 MOV R15,RAX MOV R12,RAX SUB R12,RBX CMP R12,0x80 JL 0x00173170 LAB_00173134: LEA RAX,[0x22d438] CMP dword ptr [RAX],0x0 JS 0x0017331c CALL 0x001cb8a7 LEA RDX,[0x1eecd6] LAB_00173150: LEA RCX,[0x1eecf6] XOR EBP,EBP MOV RDI,RAX MOV ESI,0x4 MOV R8,RBX XOR EAX,EAX CALL 0x001cb944 JMP 0x0017331e LAB_00173170: LEA RDI,[RSP + 0xc] MOV RSI,RBX MOV RDX,R12 CALL 0x0011a490 MOV byte ptr [RSP + R12*0x1 + 0xc],0x0 LEA R12,[R15 + 0x1] LEA RSI,[0x1eed0f] MOV EDX,0x4 MOV RDI,R12 CALL 0x0011a450 TEST EAX,EAX JZ 0x00173213 LEA RSI,[0x1eed14] MOV EDX,0x6 MOV RDI,R12 CALL 0x0011a450 TEST EAX,EAX JZ 0x00173231 LEA RSI,[0x1eed1b] MOV EDX,0x5 MOV RDI,R12 CALL 0x0011a450 TEST EAX,EAX JZ 0x0017328c LEA RSI,[0x1eed51] MOV EDX,0x4 MOV RDI,R12 CALL 0x0011a450 TEST EAX,EAX JZ 0x001732e3 LEA RAX,[0x22d438] CMP dword ptr [RAX],0x0 JS 0x0017331c CALL 0x001cb8a7 LEA RDX,[0x1eed95] JMP 0x00173150 LAB_00173213: ADD R15,0x5 MOV dword ptr [RSP + 0x8],0x0 MOV RDI,R15 CALL 0x0011aa70 MOV qword ptr [RSP + 0x90],RAX JMP 0x0017324e LAB_00173231: ADD R15,0x7 MOV dword ptr [RSP + 0x8],0x1 MOV RDI,R15 CALL 0x0011aad0 MOVSD qword ptr [RSP + 0x90],XMM0 LAB_0017324e: MOV RAX,qword ptr [R14 + 0x8] CMP RAX,qword ptr [R14 + 0x10] JZ 0x00173274 LEA RSI,[RSP + 0x8] MOV EDX,0x108 MOV RDI,RAX CALL 0x0011a750 ADD qword ptr [R14 + 0x8],0x108 JMP 0x00173284 LAB_00173274: LEA RDX,[RSP + 0x8] MOV RDI,R14 MOV RSI,RAX CALL 0x001b8b4a LAB_00173284: MOV BPL,0x1 JMP 0x0017331e LAB_0017328c: ADD R15,0x6 MOV dword ptr [RSP + 0x8],0x2 LEA RSI,[0x1e6bda] MOV RDI,R15 CALL 0x0011ac50 TEST EAX,EAX JZ 0x00173330 LEA RSI,[0x1e98c3] MOV RDI,R15 CALL 0x0011ac50 TEST EAX,EAX JZ 0x0017335e LEA RAX,[0x22d438] CMP dword ptr [RAX],0x0 JS 0x0017331c CALL 0x001cb8a7 LEA RDX,[0x1eed21] JMP 0x00173150 LAB_001732e3: ADD R15,0x5 MOV dword ptr [RSP + 0x8],0x3 MOV RDI,R15 CALL 0x0011a400 CMP RAX,0x80 JC 0x0017333d LEA RAX,[0x22d438] CMP dword ptr [RAX],0x0 JS 0x0017331c CALL 0x001cb8a7 LEA RDX,[0x1eed56] JMP 0x00173150 LAB_0017331c: XOR EBP,EBP LAB_0017331e: MOV EAX,EBP ADD RSP,0x110 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_00173330: MOV byte ptr [RSP + 0x90],0x1 JMP 0x0017324e LAB_0017333d: LEA RBX,[RSP + 0x90] MOV EDX,0x7f MOV RDI,RBX MOV RSI,R15 CALL 0x0011a490 MOV byte ptr [RBX + 0x7f],0x0 JMP 0x0017324e LAB_0017335e: MOV byte ptr [RSP + 0x90],0x0 JMP 0x0017324e
/* string_parse_kv_override(char const*, std::vector<llama_model_kv_override, std::allocator<llama_model_kv_override> >&) */ ulong string_parse_kv_override(char *param_1,vector *param_2) { char *__s1; void *__dest; int iVar1; char *pcVar2; int8 uVar3; int8 unaff_RBP; ulong uVar4; size_t sVar5; int4 local_130; char local_12c [132]; double local_a8 [15]; int1 local_29; pcVar2 = strchr(param_1,0x3d); if ((pcVar2 == (char *)0x0) || (sVar5 = (long)pcVar2 - (long)param_1, 0x7f < (long)sVar5)) { if (common_log_verbosity_thold < 0) goto LAB_0017331c; uVar3 = common_log_main(); pcVar2 = "%s: malformed KV override \'%s\'\n"; goto LAB_00173150; } strncpy(local_12c,param_1,sVar5); local_12c[sVar5] = '\0'; __s1 = pcVar2 + 1; iVar1 = strncmp(__s1,"int:",4); if (iVar1 == 0) { local_130 = 0; local_a8[0] = (double)atol(pcVar2 + 5); } else { iVar1 = strncmp(__s1,"float:",6); if (iVar1 == 0) { local_130 = 1; local_a8[0] = atof(pcVar2 + 7); } else { iVar1 = strncmp(__s1,"bool:",5); if (iVar1 != 0) { iVar1 = strncmp(__s1,"str:",4); if (iVar1 == 0) { local_130 = 3; sVar5 = strlen(pcVar2 + 5); if (sVar5 < 0x80) { strncpy((char *)local_a8,pcVar2 + 5,0x7f); local_29 = 0; goto LAB_0017324e; } if (common_log_verbosity_thold < 0) goto LAB_0017331c; uVar3 = common_log_main(); pcVar2 = "%s: malformed KV override \'%s\', value cannot exceed 127 chars\n"; } else { if (common_log_verbosity_thold < 0) { LAB_0017331c: uVar4 = 0; goto LAB_0017331e; } uVar3 = common_log_main(); pcVar2 = "%s: invalid type for KV override \'%s\'\n"; } LAB_00173150: uVar4 = 0; common_log_add(uVar3,4,pcVar2,"string_parse_kv_override",param_1); goto LAB_0017331e; } local_130 = 2; iVar1 = strcmp(pcVar2 + 6,"true"); if (iVar1 == 0) { local_a8[0] = (double)CONCAT71(local_a8[0]._1_7_,1); } else { iVar1 = strcmp(pcVar2 + 6,"false"); if (iVar1 != 0) { if (common_log_verbosity_thold < 0) goto LAB_0017331c; uVar3 = common_log_main(); pcVar2 = "%s: invalid boolean value for KV override \'%s\'\n"; goto LAB_00173150; } local_a8[0] = (double)((ulong)local_a8[0] & 0xffffffffffffff00); } } } LAB_0017324e: __dest = *(void **)(param_2 + 8); if (__dest == *(void **)(param_2 + 0x10)) { std::vector<llama_model_kv_override,std::allocator<llama_model_kv_override>>:: _M_realloc_insert<llama_model_kv_override> ((vector<llama_model_kv_override,std::allocator<llama_model_kv_override>> *)param_2, __dest,&local_130); } else { memcpy(__dest,&local_130,0x108); *(long *)(param_2 + 8) = *(long *)(param_2 + 8) + 0x108; } uVar4 = CONCAT71((int7)((ulong)unaff_RBP >> 8),1); LAB_0017331e: return uVar4 & 0xffffffff; }
46,796
format_literal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
static std::string format_literal(const std::string & literal) { std::string escaped = replacePattern(literal, GRAMMAR_LITERAL_ESCAPE_RE, [&](const std::smatch & match) { char c = match.str()[0]; return GRAMMAR_LITERAL_ESCAPES.at(c); }); return "\"" + escaped + "\""; }
O1
cpp
format_literal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x88, %rsp movq %rdi, 0x80(%rsp) xorps %xmm0, %xmm0 leaq 0x60(%rsp), %rcx movaps %xmm0, (%rcx) leaq 0x2f9(%rip), %rax # 0x35764 movq %rax, 0x18(%rcx) leaq 0x35e(%rip), %rax # 0x357d4 movq %rax, 0x10(%rcx) movq %rsp, %r12 movaps %xmm0, 0x10(%r12) movaps %xmm0, (%r12) leaq 0x30(%rsp), %rax movq %rax, -0x10(%rax) movq $0x0, -0x8(%rax) movb $0x0, (%rax) movq (%rsi), %r14 movq 0x8(%rsi), %r15 addq %r14, %r15 leaq 0xba74b(%rip), %r13 # 0xefbf8 leaq 0x20(%rsp), %rbp leaq 0x40(%rsp), %rbx movq %r14, %rdi movq %r15, %rsi movq %r12, %rdx movq %r13, %rcx xorl %r8d, %r8d callq 0x44665 testb %al, %al je 0x35591 movq (%rsp), %rax movq 0x8(%rsp), %rcx movq %rcx, %rdx subq %rax, %rdx leaq -0x48(%rcx), %rsi cmpq $0x48, %rdx movq %rax, %rdx cmoveq %rsi, %rdx cmpq %rax, %rcx cmoveq %rsi, %rdx movq (%rdx), %r8 subq 0x18(%rsp), %r8 movq 0x28(%rsp), %rsi movq %rbp, %rdi xorl %edx, %edx movq %r14, %rcx callq 0x19760 cmpq $0x0, 0x70(%rsp) je 0x3568f movq %rbx, %rdi leaq 0x60(%rsp), %rsi movq %r12, %rdx callq *0x78(%rsp) movq 0x40(%rsp), %rsi movq 0x48(%rsp), %rdx movq %rbp, %rdi callq 0x191d0 movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x3555b movq 0x50(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x8(%rsp), %rax movq %rax, %rcx subq (%rsp), %rcx sarq $0x3, %rcx movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB imulq %rdx, %rcx leaq -0x18(%rax), %rdx addq $-0x48, %rax cmpq $0x4, %rcx cmovaeq %rdx, %rax movq (%rax), %r14 jmp 0x354b7 leaq 0x20(%rsp), %rdi movq 0x8(%rdi), %rsi subq %r14, %r15 xorl %edx, %edx movq %r14, %rcx movq %r15, %r8 callq 0x19760 movq (%rsp), %rdi testq %rdi, %rdi movq 0x80(%rsp), %rbx je 0x355c8 movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x196b0 movq 0x70(%rsp), %rax testq %rax, %rax je 0x355e1 leaq 0x60(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax leaq 0x8d3d3(%rip), %rsi # 0xc29bb movq %rsp, %rdi leaq 0x20(%rsp), %rdx callq 0x4d8d1 leaq 0x8d3bf(%rip), %rsi # 0xc29bb movq %rsp, %rdi callq 0x19d00 leaq 0x10(%rbx), %rdx movq %rdx, (%rbx) movq (%rax), %rsi movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rsi je 0x35626 movq %rsi, (%rbx) movq (%rcx), %rdx movq %rdx, 0x10(%rbx) jmp 0x3562c movups (%rcx), %xmm0 movups %xmm0, (%rdx) movq 0x8(%rax), %rdx movq %rdx, 0x8(%rbx) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x3565e movq 0x10(%rsp), %rsi incq %rsi callq 0x196b0 movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x3567a movq 0x30(%rsp), %rsi incq %rsi callq 0x196b0 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x19250 jmp 0x3575b movq %rax, %rbx leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x356bc movq 0x10(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x356bc movq %rax, %rbx movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x35753 movq 0x30(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x35753 jmp 0x35705 jmp 0x35705 movq %rax, %rbx movq 0x40(%rsp), %rdi leaq 0x50(%rsp), %rax cmpq %rax, %rdi je 0x35708 movq 0x50(%rsp), %rsi incq %rsi callq 0x196b0 jmp 0x35708 jmp 0x35705 movq %rax, %rbx movq 0x20(%rsp), %rdi leaq 0x30(%rsp), %rax cmpq %rax, %rdi je 0x35724 movq 0x30(%rsp), %rsi incq %rsi callq 0x196b0 movq (%rsp), %rdi testq %rdi, %rdi je 0x3573a movq 0x10(%rsp), %rsi subq %rdi, %rsi callq 0x196b0 movq 0x70(%rsp), %rax testq %rax, %rax je 0x35753 leaq 0x60(%rsp), %rdi movq %rdi, %rsi movl $0x3, %edx callq *%rax movq %rbx, %rdi callq 0x19be0 movq %rax, %rdi callq 0x28537 nop
_ZL14format_literalRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 88h mov [rsp+0B8h+var_38], rdi xorps xmm0, xmm0 lea rcx, [rsp+0B8h+var_58] movaps xmmword ptr [rcx], xmm0 lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_13match_resultsIN9__gnu_cxx17__normal_iteratorIPKcS5_EESaINS0_9sub_matchISB_EEEEEEZL14format_literalRKS5_E3$_0E9_M_invokeERKSt9_Any_dataSH_; std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_invoke(std::_Any_data const&,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&) mov [rcx+18h], rax lea rax, _ZNSt17_Function_handlerIFNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS0_13match_resultsIN9__gnu_cxx17__normal_iteratorIPKcS5_EESaINS0_9sub_matchISB_EEEEEEZL14format_literalRKS5_E3$_0E10_M_managerERSt9_Any_dataRKSN_St18_Manager_operation; std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_manager(std::_Any_data &,std::_Any_data const&,std::_Manager_operation) mov [rcx+10h], rax mov r12, rsp movaps xmmword ptr [r12+10h], xmm0 movaps xmmword ptr [r12], xmm0 lea rax, [rsp+0B8h+var_88] mov [rax-10h], rax mov qword ptr [rax-8], 0 mov byte ptr [rax], 0 mov r14, [rsi] mov r15, [rsi+8] add r15, r14 lea r13, _Z25GRAMMAR_LITERAL_ESCAPE_REB5cxx11; GRAMMAR_LITERAL_ESCAPE_RE lea rbp, [rsp+0B8h+var_98] lea rbx, [rsp+0B8h+var_78] loc_354B7: mov rdi, r14 mov rsi, r15 mov rdx, r12 mov rcx, r13 xor r8d, r8d call _ZNSt8__detail17__regex_algo_implIN9__gnu_cxx17__normal_iteratorIPKcNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEESaINS5_9sub_matchISB_EEEcNS5_12regex_traitsIcEELNS_20_RegexExecutorPolicyE0ELb0EEEbT_SI_RNS5_13match_resultsISI_T0_EERKNS5_11basic_regexIT1_T2_EENSt15regex_constants15match_flag_typeE; std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>(__gnu_cxx::__normal_iterator<char const*,std::string>,__gnu_cxx::__normal_iterator<char const*,std::string>,std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> &,std::basic_regex<char,std::regex_traits<char>> const&,std::regex_constants::match_flag_type) test al, al jz loc_35591 mov rax, [rsp+0B8h+var_B8] mov rcx, [rsp+0B8h+var_B0] mov rdx, rcx sub rdx, rax lea rsi, [rcx-48h] cmp rdx, 48h ; 'H' mov rdx, rax cmovz rdx, rsi cmp rcx, rax cmovz rdx, rsi mov r8, [rdx] sub r8, [rsp+0B8h+var_A0] mov rsi, [rsp+0B8h+var_90] mov rdi, rbp xor edx, edx mov rcx, r14 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) cmp [rsp+0B8h+var_48], 0 jz loc_3568F mov rdi, rbx lea rsi, [rsp+0B8h+var_58] mov rdx, r12 call [rsp+0B8h+var_40] mov rsi, [rsp+0B8h+var_78] mov rdx, [rsp+0B8h+var_70] mov rdi, rbp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm; std::string::_M_append(char const*,ulong) mov rdi, [rsp+0B8h+var_78]; void * lea rax, [rsp+0B8h+var_68] cmp rdi, rax jz short loc_3555B mov rsi, [rsp+0B8h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3555B: mov rax, [rsp+0B8h+var_B0] mov rcx, rax sub rcx, [rsp+0B8h+var_B8] sar rcx, 3 mov rdx, 0AAAAAAAAAAAAAAABh imul rcx, rdx lea rdx, [rax-18h] add rax, 0FFFFFFFFFFFFFFB8h cmp rcx, 4 cmovnb rax, rdx mov r14, [rax] jmp loc_354B7 loc_35591: lea rdi, [rsp+0B8h+var_98] mov rsi, [rdi+8] sub r15, r14 xor edx, edx mov rcx, r14 mov r8, r15 call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7replaceEmmPKcm; std::string::replace(ulong,ulong,char const*,ulong) mov rdi, [rsp+0B8h+var_B8]; void * test rdi, rdi mov rbx, [rsp+0B8h+var_38] jz short loc_355C8 mov rsi, [rsp+0B8h+var_A8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_355C8: mov rax, [rsp+0B8h+var_48] test rax, rax jz short loc_355E1 lea rdi, [rsp+0B8h+var_58] mov rsi, rdi mov edx, 3 call rax loc_355E1: lea rsi, aName+9; "\"" mov rdi, rsp lea rdx, [rsp+0B8h+var_98] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_RKS8_; std::operator+<char>(char const*,std::string const&) lea rsi, aName+9; "\"" mov rdi, rsp call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea rdx, [rbx+10h] mov [rbx], rdx mov rsi, [rax] mov rcx, rax add rcx, 10h cmp rsi, rcx jz short loc_35626 mov [rbx], rsi mov rdx, [rcx] mov [rbx+10h], rdx jmp short loc_3562C loc_35626: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [rdx], xmm0 loc_3562C: mov rdx, [rax+8] mov [rbx+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rax, [rsp+0B8h+var_A8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_3565E mov rsi, [rsp+0B8h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3565E: mov rdi, [rsp+0B8h+var_98]; void * lea rax, [rsp+0B8h+var_88] cmp rdi, rax jz short loc_3567A mov rsi, [rsp+0B8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3567A: mov rax, rbx add rsp, 88h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3568F: call __ZSt25__throw_bad_function_callv; std::__throw_bad_function_call(void) jmp loc_3575B mov rbx, rax lea rax, [rsp+0B8h+var_A8] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_356BC mov rsi, [rsp+0B8h+var_A8] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_356BC mov rbx, rax loc_356BC: mov rdi, [rsp+0B8h+var_98]; void * lea rax, [rsp+0B8h+var_88] cmp rdi, rax jz loc_35753 mov rsi, [rsp+0B8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_35753 jmp short loc_35705 jmp short loc_35705 mov rbx, rax mov rdi, [rsp+0B8h+var_78]; void * lea rax, [rsp+0B8h+var_68] cmp rdi, rax jz short loc_35708 mov rsi, [rsp+0B8h+var_68] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_35708 jmp short $+2 loc_35705: mov rbx, rax loc_35708: mov rdi, [rsp+0B8h+var_98]; void * lea rax, [rsp+0B8h+var_88] cmp rdi, rax jz short loc_35724 mov rsi, [rsp+0B8h+var_88] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_35724: mov rdi, [rsp+0B8h+var_B8]; void * test rdi, rdi jz short loc_3573A mov rsi, [rsp+0B8h+var_A8] sub rsi, rdi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_3573A: mov rax, [rsp+0B8h+var_48] test rax, rax jz short loc_35753 lea rdi, [rsp+0B8h+var_58] mov rsi, rdi mov edx, 3 call rax loc_35753: mov rdi, rbx call __Unwind_Resume loc_3575B: mov rdi, rax call __clang_call_terminate
long long format_literal(long long a1, long long *a2) { long long v2; // r14 long long v3; // r15 long long *v4; // rax long long v5; // rbx long long v6; // rax _OWORD *v7; // rcx __int128 v9; // [rsp+0h] [rbp-B8h] BYREF __int128 v10; // [rsp+10h] [rbp-A8h] BYREF void *v11; // [rsp+20h] [rbp-98h] BYREF long long v12; // [rsp+28h] [rbp-90h] _QWORD v13[2]; // [rsp+30h] [rbp-88h] BYREF void *v14[2]; // [rsp+40h] [rbp-78h] BYREF long long v15; // [rsp+50h] [rbp-68h] BYREF __int128 v16; // [rsp+60h] [rbp-58h] BYREF long long ( *v17)(); // [rsp+70h] [rbp-48h] long long ( *v18)(); // [rsp+78h] [rbp-40h] long long v19; // [rsp+80h] [rbp-38h] v19 = a1; v16 = 0LL; v18 = std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_invoke; v17 = std::_Function_handler<std::string ()(std::match_results<__gnu_cxx::__normal_iterator<char const*,std::string>> const&),format_literal(std::string const&)::$_0>::_M_manager; v10 = 0LL; v9 = 0LL; v11 = v13; v12 = 0LL; LOBYTE(v13[0]) = 0; v2 = *a2; v3 = *a2 + a2[1]; while ( (unsigned __int8)std::__detail::__regex_algo_impl<__gnu_cxx::__normal_iterator<char const*,std::string>,std::allocator<std::sub_match<__gnu_cxx::__normal_iterator<char const*,std::string>>>,char,std::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false>( v2, v3, &v9, &GRAMMAR_LITERAL_ESCAPE_RE[abi:cxx11], 0LL) ) { std::string::replace(&v11, v12, 0LL); if ( !v17 ) std::__throw_bad_function_call(); ((void ( *)(void **, __int128 *, __int128 *))v18)(v14, &v16, &v9); std::string::_M_append(&v11, v14[0], v14[1]); if ( v14[0] != &v15 ) operator delete(v14[0], v15 + 1); v4 = (long long *)(*((_QWORD *)&v9 + 1) - 72LL); if ( 0xAAAAAAAAAAAAAAABLL * ((long long)(*((_QWORD *)&v9 + 1) - v9) >> 3) >= 4 ) v4 = (long long *)(*((_QWORD *)&v9 + 1) - 24LL); v2 = *v4; } std::string::replace(&v11, v12, 0LL); v5 = v19; if ( (_QWORD)v9 ) operator delete((void *)v9, v10 - v9); if ( v17 ) ((void ( *)(__int128 *, __int128 *, long long))v17)(&v16, &v16, 3LL); std::operator+<char>(&v9, "\"", &v11); v6 = std::string::append(&v9, "\""); *(_QWORD *)v5 = v5 + 16; v7 = (_OWORD *)(v6 + 16); if ( *(_QWORD *)v6 == v6 + 16 ) { *(_OWORD *)(v5 + 16) = *v7; } else { *(_QWORD *)v5 = *(_QWORD *)v6; *(_QWORD *)(v5 + 16) = *(_QWORD *)v7; } *(_QWORD *)(v5 + 8) = *(_QWORD *)(v6 + 8); *(_QWORD *)v6 = v7; *(_QWORD *)(v6 + 8) = 0LL; *(_BYTE *)(v6 + 16) = 0; if ( (__int128 *)v9 != &v10 ) operator delete((void *)v9, v10 + 1); if ( v11 != v13 ) operator delete(v11, v13[0] + 1LL); return v5; }
format_literal: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x88 MOV qword ptr [RSP + 0x80],RDI XORPS XMM0,XMM0 LEA RCX,[RSP + 0x60] MOVAPS xmmword ptr [RCX],XMM0 LEA RAX,[0x135764] MOV qword ptr [RCX + 0x18],RAX LEA RAX,[0x1357d4] MOV qword ptr [RCX + 0x10],RAX MOV R12,RSP MOVAPS xmmword ptr [R12 + 0x10],XMM0 MOVAPS xmmword ptr [R12],XMM0 LEA RAX,[RSP + 0x30] MOV qword ptr [RAX + -0x10],RAX MOV qword ptr [RAX + -0x8],0x0 MOV byte ptr [RAX],0x0 MOV R14,qword ptr [RSI] MOV R15,qword ptr [RSI + 0x8] ADD R15,R14 LEA R13,[0x1efbf8] LEA RBP,[RSP + 0x20] LEA RBX,[RSP + 0x40] LAB_001354b7: MOV RDI,R14 MOV RSI,R15 MOV RDX,R12 MOV RCX,R13 XOR R8D,R8D CALL 0x00144665 TEST AL,AL JZ 0x00135591 MOV RAX,qword ptr [RSP] MOV RCX,qword ptr [RSP + 0x8] MOV RDX,RCX SUB RDX,RAX LEA RSI,[RCX + -0x48] CMP RDX,0x48 MOV RDX,RAX CMOVZ RDX,RSI CMP RCX,RAX CMOVZ RDX,RSI MOV R8,qword ptr [RDX] SUB R8,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x28] MOV RDI,RBP XOR EDX,EDX MOV RCX,R14 CALL 0x00119760 CMP qword ptr [RSP + 0x70],0x0 JZ 0x0013568f LAB_0013551e: MOV RDI,RBX LEA RSI,[RSP + 0x60] MOV RDX,R12 CALL qword ptr [RSP + 0x78] MOV RSI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x48] LAB_00135537: MOV RDI,RBP CALL 0x001191d0 MOV RDI,qword ptr [RSP + 0x40] LEA RAX,[RSP + 0x50] CMP RDI,RAX JZ 0x0013555b MOV RSI,qword ptr [RSP + 0x50] INC RSI CALL 0x001196b0 LAB_0013555b: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,RAX SUB RCX,qword ptr [RSP] SAR RCX,0x3 MOV RDX,-0x5555555555555555 IMUL RCX,RDX LEA RDX,[RAX + -0x18] ADD RAX,-0x48 CMP RCX,0x4 CMOVNC RAX,RDX MOV R14,qword ptr [RAX] JMP 0x001354b7 LAB_00135591: LEA RDI,[RSP + 0x20] MOV RSI,qword ptr [RDI + 0x8] SUB R15,R14 LAB_0013559d: XOR EDX,EDX MOV RCX,R14 MOV R8,R15 CALL 0x00119760 MOV RDI,qword ptr [RSP] TEST RDI,RDI MOV RBX,qword ptr [RSP + 0x80] JZ 0x001355c8 MOV RSI,qword ptr [RSP + 0x10] SUB RSI,RDI CALL 0x001196b0 LAB_001355c8: MOV RAX,qword ptr [RSP + 0x70] TEST RAX,RAX JZ 0x001355e1 LAB_001355d2: LEA RDI,[RSP + 0x60] MOV RSI,RDI MOV EDX,0x3 CALL RAX LAB_001355e1: LEA RSI,[0x1c29bb] MOV RDI,RSP LEA RDX,[RSP + 0x20] CALL 0x0014d8d1 LAB_001355f5: LEA RSI,[0x1c29bb] MOV RDI,RSP CALL 0x00119d00 LEA RDX,[RBX + 0x10] MOV qword ptr [RBX],RDX MOV RSI,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RSI,RCX JZ 0x00135626 MOV qword ptr [RBX],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RBX + 0x10],RDX JMP 0x0013562c LAB_00135626: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [RDX],XMM0 LAB_0013562c: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RBX + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LEA RAX,[RSP + 0x10] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x0013565e MOV RSI,qword ptr [RSP + 0x10] INC RSI CALL 0x001196b0 LAB_0013565e: MOV RDI,qword ptr [RSP + 0x20] LEA RAX,[RSP + 0x30] CMP RDI,RAX JZ 0x0013567a MOV RSI,qword ptr [RSP + 0x30] INC RSI CALL 0x001196b0 LAB_0013567a: MOV RAX,RBX ADD RSP,0x88 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013568f: CALL 0x00119250
/* format_literal(std::__cxx11::string const&) */ string * format_literal(string *param_1) { string *psVar1; bool bVar2; ulong *puVar3; int8 *puVar4; long *plVar5; ulong *in_RSI; ulong uVar6; long lVar7; long *local_b8; long lStack_b0; long local_a8 [2]; int1 *local_98; ulong local_90; int1 local_88; int7 uStack_87; long *local_78 [2]; long local_68 [2]; int8 local_58; int8 uStack_50; code *local_48; code *local_40; string *local_38; local_58 = 0; uStack_50 = 0; local_40 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>const&),format_literal(std::__cxx11::string_const&)::$_0> ::_M_invoke; local_48 = std:: _Function_handler<std::__cxx11::string(std::__cxx11::match_results<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>>const&),format_literal(std::__cxx11::string_const&)::$_0> ::_M_manager; local_a8[0] = 0; local_a8[1] = 0; local_b8 = (long *)0x0; lStack_b0 = 0; local_98 = &local_88; local_90 = 0; local_88 = 0; uVar6 = *in_RSI; lVar7 = in_RSI[1] + uVar6; local_38 = param_1; while( true ) { /* try { // try from 001354b7 to 00135511 has its CatchHandler @ 00135705 */ bVar2 = std::__detail:: __regex_algo_impl<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>,std::allocator<std::__cxx11::sub_match<__gnu_cxx::__normal_iterator<char_const*,std::__cxx11::string>>>,char,std::__cxx11::regex_traits<char>,(std::__detail::_RegexExecutorPolicy)0,false> (uVar6,lVar7,&local_b8,GRAMMAR_LITERAL_ESCAPE_RE_abi_cxx11_,0); if (!bVar2) { /* try { // try from 0013559d to 001355a9 has its CatchHandler @ 001356de */ std::__cxx11::string::replace((ulong)&local_98,local_90,(char *)0x0,uVar6); psVar1 = local_38; if (local_b8 != (long *)0x0) { operator_delete(local_b8,local_a8[0] - (long)local_b8); } if (local_48 != (code *)0x0) { /* try { // try from 001355d2 to 001355e0 has its CatchHandler @ 00135694 */ (*local_48)(&local_58,&local_58,3); } /* try { // try from 001355e1 to 001355f4 has its CatchHandler @ 001356b9 */ std::operator+((char *)&local_b8,(string *)&DAT_001c29bb); /* try { // try from 001355f5 to 00135603 has its CatchHandler @ 00135699 */ puVar4 = (int8 *)std::__cxx11::string::append((char *)&local_b8); *(string **)psVar1 = psVar1 + 0x10; plVar5 = puVar4 + 2; if ((long *)*puVar4 == plVar5) { lVar7 = puVar4[3]; *(long *)(psVar1 + 0x10) = *plVar5; *(long *)(psVar1 + 0x18) = lVar7; } else { *(long **)psVar1 = (long *)*puVar4; *(long *)(psVar1 + 0x10) = *plVar5; } *(int8 *)(psVar1 + 8) = puVar4[1]; *puVar4 = plVar5; puVar4[1] = 0; *(int1 *)(puVar4 + 2) = 0; if (local_b8 != local_a8) { operator_delete(local_b8,local_a8[0] + 1); } if (local_98 != &local_88) { operator_delete(local_98,CONCAT71(uStack_87,local_88) + 1); } return psVar1; } std::__cxx11::string::replace((ulong)&local_98,local_90,(char *)0x0,uVar6); if (local_48 == (code *)0x0) break; /* try { // try from 0013551e to 0013552c has its CatchHandler @ 00135703 */ (*local_40)(local_78,&local_58,&local_b8); /* try { // try from 00135537 to 0013553e has its CatchHandler @ 001356e2 */ std::__cxx11::string::_M_append((char *)&local_98,(ulong)local_78[0]); if (local_78[0] != local_68) { operator_delete(local_78[0],local_68[0] + 1); } puVar3 = (ulong *)(lStack_b0 + -0x48); if (3 < (ulong)((lStack_b0 - (long)local_b8 >> 3) * -0x5555555555555555)) { puVar3 = (ulong *)(lStack_b0 + -0x18); } uVar6 = *puVar3; } /* WARNING: Subroutine does not return */ /* try { // try from 0013568f to 00135693 has its CatchHandler @ 001356e0 */ std::__throw_bad_function_call(); }
46,797
mi_pack_get_block_info
eloqsql/storage/myisam/mi_packrec.c
uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff, MI_BLOCK_INFO *info, uchar **rec_buff_p, File file, my_off_t filepos) { uchar *header=info->header; uint head_length, UNINIT_VAR(ref_length); if (file >= 0) { ref_length=myisam->s->pack.ref_length; /* We can't use mysql_file_pread() here because mi_read_rnd_pack_record assumes position is ok */ mysql_file_seek(file, filepos, MY_SEEK_SET, MYF(0)); if (mysql_file_read(file, header, ref_length, MYF(MY_NABP))) return BLOCK_FATAL_ERROR; DBUG_DUMP("header",(uchar*) header,ref_length); } head_length= read_pack_length((uint) myisam->s->pack.version, header, &info->rec_len); if (myisam->s->base.blobs) { head_length+= read_pack_length((uint) myisam->s->pack.version, header + head_length, &info->blob_len); /* Ensure that the record buffer is big enough for the compressed record plus all expanded blobs. [We do not have an extra buffer for the resulting blobs. Sigh.] */ if (!(mi_alloc_rec_buff(myisam,info->rec_len + info->blob_len, rec_buff_p))) return BLOCK_FATAL_ERROR; /* not enough memory */ bit_buff->blob_pos= (uchar*) *rec_buff_p + info->rec_len; bit_buff->blob_end= bit_buff->blob_pos + info->blob_len; myisam->blob_length=info->blob_len; } info->filepos=filepos+head_length; if (file > 0) { info->offset=MY_MIN(info->rec_len, ref_length - head_length); memcpy(*rec_buff_p, header + head_length, info->offset); } return 0; }
O3
c
mi_pack_get_block_info: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movl %r8d, %r12d movq %rdx, %rbx movq %rsi, -0x40(%rbp) movq %rdi, %r14 testl %r8d, %r8d movq %r9, -0x48(%rbp) js 0x81a23 movq %r9, %r15 movq %rcx, -0x30(%rbp) movq (%r14), %rax movl 0x240(%rax), %r13d leaq 0x304674(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x90(%rbp), %rdi movl %r12d, %esi movl $0x8, %edx callq *0x158(%rax) testq %rax, %rax jne 0x81b85 movl %r12d, %edi movq %r15, %rsi xorl %edx, %edx xorl %ecx, %ecx callq 0xa0d10 leaq 0x30463d(%rip), %rax # 0x386010 movq (%rax), %rax leaq -0x90(%rbp), %rdi movl %r12d, %esi movl $0x6, %edx callq *0x158(%rax) testq %rax, %rax movq %r13, -0x38(%rbp) jne 0x81b98 movl $0x4, %ecx movl %r12d, %edi movq %rbx, %rsi movq %r13, %rdx callq 0xa0b10 movq %rax, %r13 movl $0x20, %r15d testq %r13, %r13 movq -0x30(%rbp), %rcx jne 0x81b73 jmp 0x81a27 movq %rax, -0x38(%rbp) movzbl (%rbx), %esi cmpq $0xfd, %rsi ja 0x81a3f movl $0x1, %r15d movq -0x38(%rbp), %rdi jmp 0x81a82 cmpl $0xfe, %esi movq -0x38(%rbp), %rdi jne 0x81a57 movzwl 0x1(%rbx), %esi movl $0x3, %r15d jmp 0x81a82 movq (%r14), %rax cmpb $0x1, 0x244(%rax) jne 0x81a79 movzwl 0x1(%rbx), %eax movzbl 0x3(%rbx), %esi shll $0x10, %esi orq %rax, %rsi movl $0x4, %r15d jmp 0x81a82 movl 0x1(%rbx), %esi movl $0x5, %r15d movq %rsi, 0x18(%rbx) movq (%r14), %rdx cmpl $0x0, 0x188(%rdx) je 0x81b38 movl %r15d, %edi movzbl (%rbx,%rdi), %eax cmpq $0xfd, %rax ja 0x81aae movl $0x1, -0x30(%rbp) jmp 0x81af0 cmpl $0xfe, %eax jne 0x81ac3 movzwl 0x1(%rbx,%rdi), %eax movl $0x3, -0x30(%rbp) jmp 0x81af0 cmpb $0x1, 0x244(%rdx) jne 0x81ae5 movzwl 0x1(%rbx,%rdi), %edx movzbl 0x3(%rbx,%rdi), %eax shll $0x10, %eax orq %rdx, %rax movl $0x4, -0x30(%rbp) jmp 0x81af0 movl 0x1(%rbx,%rdi), %eax movl $0x5, -0x30(%rbp) movq %rax, 0x30(%rbx) addq %rax, %rsi movq %r14, %rdi movq %rcx, %rdx movq %rcx, %r13 callq 0x7fcc9 testq %rax, %rax je 0x81b6d movq (%r13), %rax addq 0x18(%rbx), %rax movq -0x40(%rbp), %rcx movq %rax, 0x18(%rcx) addq 0x30(%rbx), %rax addl -0x30(%rbp), %r15d movq %rax, 0x20(%rcx) movq 0x30(%rbx), %rax movq %rax, 0x1b8(%r14) movq %r13, %rcx movq -0x38(%rbp), %rdi movl %r15d, %eax movq -0x48(%rbp), %rdx addq %rax, %rdx movq %rdx, 0x38(%rbx) xorl %r15d, %r15d testl %r12d, %r12d jle 0x81b73 movq 0x18(%rbx), %rdx subl %eax, %edi cmpq %rdi, %rdx cmovael %edi, %edx movl %edx, 0x54(%rbx) movq (%rcx), %rdi addq %rax, %rbx movq %rbx, %rsi callq 0x29080 jmp 0x81b73 movl $0x20, %r15d movl %r15d, %eax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rdi movl %r12d, %esi movq %r15, %rdx callq 0x2e469 jmp 0x819cc movq %rax, %r15 leaq 0x30446e(%rip), %rax # 0x386010 movq (%rax), %rax leaq 0x59e0a(%rip), %rdx # 0xdb9b6 movq %r15, %rdi movq %r13, %rsi movl $0x566, %ecx # imm = 0x566 callq *0x210(%rax) movl $0x4, %ecx movl %r12d, %edi movq %rbx, %rsi movq %r13, %rdx callq 0xa0b10 movq %r13, %rcx movq %rax, %r13 xorl %esi, %esi testq %rax, %rax cmoveq %rcx, %rsi leaq 0x30442a(%rip), %rax # 0x386010 movq (%rax), %rax movq %r15, %rdi callq *0x218(%rax) jmp 0x81a0e
_mi_pack_get_block_info: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov r12d, r8d mov rbx, rdx mov [rbp+var_40], rsi mov r14, rdi test r8d, r8d mov [rbp+var_48], r9 js loc_81A23 mov r15, r9 mov [rbp+var_30], rcx mov rax, [r14] mov r13d, [rax+240h] lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_90] mov esi, r12d mov edx, 8 call qword ptr [rax+158h] test rax, rax jnz loc_81B85 mov edi, r12d mov rsi, r15 xor edx, edx xor ecx, ecx call my_seek loc_819CC: lea rax, PSI_server mov rax, [rax] lea rdi, [rbp+var_90] mov esi, r12d mov edx, 6 call qword ptr [rax+158h] test rax, rax mov [rbp+var_38], r13 jnz loc_81B98 mov ecx, 4 mov edi, r12d mov rsi, rbx mov rdx, r13 call my_read mov r13, rax loc_81A0E: mov r15d, 20h ; ' ' test r13, r13 mov rcx, [rbp+var_30] jnz loc_81B73 jmp short loc_81A27 loc_81A23: mov [rbp+var_38], rax loc_81A27: movzx esi, byte ptr [rbx] cmp rsi, 0FDh ja short loc_81A3F mov r15d, 1 mov rdi, [rbp+var_38] jmp short loc_81A82 loc_81A3F: cmp esi, 0FEh mov rdi, [rbp+var_38] jnz short loc_81A57 movzx esi, word ptr [rbx+1] mov r15d, 3 jmp short loc_81A82 loc_81A57: mov rax, [r14] cmp byte ptr [rax+244h], 1 jnz short loc_81A79 movzx eax, word ptr [rbx+1] movzx esi, byte ptr [rbx+3] shl esi, 10h or rsi, rax mov r15d, 4 jmp short loc_81A82 loc_81A79: mov esi, [rbx+1] mov r15d, 5 loc_81A82: mov [rbx+18h], rsi mov rdx, [r14] cmp dword ptr [rdx+188h], 0 jz loc_81B38 mov edi, r15d movzx eax, byte ptr [rbx+rdi] cmp rax, 0FDh ja short loc_81AAE mov dword ptr [rbp+var_30], 1 jmp short loc_81AF0 loc_81AAE: cmp eax, 0FEh jnz short loc_81AC3 movzx eax, word ptr [rbx+rdi+1] mov dword ptr [rbp+var_30], 3 jmp short loc_81AF0 loc_81AC3: cmp byte ptr [rdx+244h], 1 jnz short loc_81AE5 movzx edx, word ptr [rbx+rdi+1] movzx eax, byte ptr [rbx+rdi+3] shl eax, 10h or rax, rdx mov dword ptr [rbp+var_30], 4 jmp short loc_81AF0 loc_81AE5: mov eax, [rbx+rdi+1] mov dword ptr [rbp+var_30], 5 loc_81AF0: mov [rbx+30h], rax add rsi, rax mov rdi, r14 mov rdx, rcx mov r13, rcx call mi_alloc_rec_buff test rax, rax jz short loc_81B6D mov rax, [r13+0] add rax, [rbx+18h] mov rcx, [rbp+var_40] mov [rcx+18h], rax add rax, [rbx+30h] add r15d, dword ptr [rbp+var_30] mov [rcx+20h], rax mov rax, [rbx+30h] mov [r14+1B8h], rax mov rcx, r13 mov rdi, [rbp+var_38] loc_81B38: mov eax, r15d mov rdx, [rbp+var_48] add rdx, rax mov [rbx+38h], rdx xor r15d, r15d test r12d, r12d jle short loc_81B73 mov rdx, [rbx+18h] sub edi, eax cmp rdx, rdi cmovnb edx, edi mov [rbx+54h], edx mov rdi, [rcx] add rbx, rax mov rsi, rbx call _memcpy jmp short loc_81B73 loc_81B6D: mov r15d, 20h ; ' ' loc_81B73: mov eax, r15d add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_81B85: mov rdi, rax mov esi, r12d mov rdx, r15 call _mi_pack_get_block_info_cold_1 jmp loc_819CC loc_81B98: mov r15, rax lea rax, PSI_server mov rax, [rax] lea rdx, aWorkspaceLlm4b_18; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, r15 mov rsi, r13 mov ecx, 566h call qword ptr [rax+210h] mov ecx, 4 mov edi, r12d mov rsi, rbx mov rdx, r13 call my_read mov rcx, r13 mov r13, rax xor esi, esi test rax, rax cmovz rsi, rcx lea rax, PSI_server mov rax, [rax] mov rdi, r15 call qword ptr [rax+218h] jmp loc_81A0E
long long mi_pack_get_block_info( long long *a1, long long a2, unsigned __int8 *a3, _QWORD *a4, long long a5, long long a6) { long long v6; // rax unsigned int v7; // r12d long long v11; // r13 long long v12; // rax long long v13; // rax long long v14; // r13 unsigned int v15; // r15d unsigned long long v16; // rsi unsigned int v17; // r15d int v18; // edi unsigned long long v19; // rax _QWORD *v20; // r13 long long v21; // rax long long v22; // rcx long long v23; // rax unsigned long long v24; // rdx unsigned long long v25; // rdi long long v27; // r15 long long v28; // rax long long v29; // rcx long long v30; // rsi _BYTE v31[72]; // [rsp+0h] [rbp-90h] BYREF long long v32; // [rsp+48h] [rbp-48h] long long v33; // [rsp+50h] [rbp-40h] long long v34; // [rsp+58h] [rbp-38h] _QWORD *v35; // [rsp+60h] [rbp-30h] v7 = a5; v33 = a2; v32 = a6; if ( (int)a5 < 0 ) { v34 = v6; } else { v35 = a4; v11 = *(unsigned int *)(*a1 + 576); v12 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v31, (unsigned int)a5, 8LL); if ( v12 ) mi_pack_get_block_info_cold_1(v12, v7, a6); else my_seek(v7, a6, 0LL, 0LL); v13 = ((long long ( *)(_BYTE *, _QWORD, long long))PSI_server[43])(v31, v7, 6LL); v34 = v11; if ( v13 ) { v27 = v13; ((void ( *)(long long, long long, const char *, long long))PSI_server[66])( v13, v11, "/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 1382LL); v28 = my_read(v7, a3, v11, 4LL); v29 = v11; v14 = v28; v30 = 0LL; if ( !v28 ) v30 = v29; ((void ( *)(long long, long long))PSI_server[67])(v27, v30); } else { v14 = my_read(v7, a3, v11, 4LL); } v15 = 32; a4 = v35; if ( v14 ) return v15; } v16 = *a3; if ( v16 > 0xFD ) { v18 = v34; if ( (_DWORD)v16 == 254 ) { v16 = *(unsigned __int16 *)(a3 + 1); v17 = 3; } else if ( *(_BYTE *)(*a1 + 580) == 1 ) { v16 = *(unsigned __int16 *)(a3 + 1) | (unsigned long long)(a3[3] << 16); v17 = 4; } else { v16 = *(unsigned int *)(a3 + 1); v17 = 5; } } else { v17 = 1; v18 = v34; } *((_QWORD *)a3 + 3) = v16; if ( *(_DWORD *)(*a1 + 392) ) { v19 = a3[v17]; if ( v19 > 0xFD ) { if ( (_DWORD)v19 == 254 ) { v19 = *(unsigned __int16 *)&a3[v17 + 1]; LODWORD(v35) = 3; } else if ( *(_BYTE *)(*a1 + 580) == 1 ) { v19 = *(unsigned __int16 *)&a3[v17 + 1] | (unsigned long long)(a3[v17 + 3] << 16); LODWORD(v35) = 4; } else { v19 = *(unsigned int *)&a3[v17 + 1]; LODWORD(v35) = 5; } } else { LODWORD(v35) = 1; } *((_QWORD *)a3 + 6) = v19; v20 = a4; if ( !mi_alloc_rec_buff(a1, v19 + v16, a4, (long long)a4, a5, a6) ) return 32; v21 = *((_QWORD *)a3 + 3) + *v20; v22 = v33; *(_QWORD *)(v33 + 24) = v21; v17 += (unsigned int)v35; *(_QWORD *)(v22 + 32) = *((_QWORD *)a3 + 6) + v21; a1[55] = *((_QWORD *)a3 + 6); a4 = v20; v18 = v34; } v23 = v17; *((_QWORD *)a3 + 7) = v17 + v32; v15 = 0; if ( (int)v7 > 0 ) { v24 = *((_QWORD *)a3 + 3); v25 = (unsigned int)(v18 - v23); if ( v24 >= v25 ) v24 = (unsigned int)v25; *((_DWORD *)a3 + 21) = v24; memcpy(*a4, &a3[v23], v24); } return v15; }
_mi_pack_get_block_info: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV R12D,R8D MOV RBX,RDX MOV qword ptr [RBP + -0x40],RSI MOV R14,RDI TEST R8D,R8D MOV qword ptr [RBP + -0x48],R9 JS 0x00181a23 MOV R15,R9 MOV qword ptr [RBP + -0x30],RCX MOV RAX,qword ptr [R14] MOV R13D,dword ptr [RAX + 0x240] LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x90] MOV ESI,R12D MOV EDX,0x8 CALL qword ptr [RAX + 0x158] TEST RAX,RAX JNZ 0x00181b85 MOV EDI,R12D MOV RSI,R15 XOR EDX,EDX XOR ECX,ECX CALL 0x001a0d10 LAB_001819cc: LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDI,[RBP + -0x90] MOV ESI,R12D MOV EDX,0x6 CALL qword ptr [RAX + 0x158] TEST RAX,RAX MOV qword ptr [RBP + -0x38],R13 JNZ 0x00181b98 MOV ECX,0x4 MOV EDI,R12D MOV RSI,RBX MOV RDX,R13 CALL 0x001a0b10 MOV R13,RAX LAB_00181a0e: MOV R15D,0x20 TEST R13,R13 MOV RCX,qword ptr [RBP + -0x30] JNZ 0x00181b73 JMP 0x00181a27 LAB_00181a23: MOV qword ptr [RBP + -0x38],RAX LAB_00181a27: MOVZX ESI,byte ptr [RBX] CMP RSI,0xfd JA 0x00181a3f MOV R15D,0x1 MOV RDI,qword ptr [RBP + -0x38] JMP 0x00181a82 LAB_00181a3f: CMP ESI,0xfe MOV RDI,qword ptr [RBP + -0x38] JNZ 0x00181a57 MOVZX ESI,word ptr [RBX + 0x1] MOV R15D,0x3 JMP 0x00181a82 LAB_00181a57: MOV RAX,qword ptr [R14] CMP byte ptr [RAX + 0x244],0x1 JNZ 0x00181a79 MOVZX EAX,word ptr [RBX + 0x1] MOVZX ESI,byte ptr [RBX + 0x3] SHL ESI,0x10 OR RSI,RAX MOV R15D,0x4 JMP 0x00181a82 LAB_00181a79: MOV ESI,dword ptr [RBX + 0x1] MOV R15D,0x5 LAB_00181a82: MOV qword ptr [RBX + 0x18],RSI MOV RDX,qword ptr [R14] CMP dword ptr [RDX + 0x188],0x0 JZ 0x00181b38 MOV EDI,R15D MOVZX EAX,byte ptr [RBX + RDI*0x1] CMP RAX,0xfd JA 0x00181aae MOV dword ptr [RBP + -0x30],0x1 JMP 0x00181af0 LAB_00181aae: CMP EAX,0xfe JNZ 0x00181ac3 MOVZX EAX,word ptr [RBX + RDI*0x1 + 0x1] MOV dword ptr [RBP + -0x30],0x3 JMP 0x00181af0 LAB_00181ac3: CMP byte ptr [RDX + 0x244],0x1 JNZ 0x00181ae5 MOVZX EDX,word ptr [RBX + RDI*0x1 + 0x1] MOVZX EAX,byte ptr [RBX + RDI*0x1 + 0x3] SHL EAX,0x10 OR RAX,RDX MOV dword ptr [RBP + -0x30],0x4 JMP 0x00181af0 LAB_00181ae5: MOV EAX,dword ptr [RBX + RDI*0x1 + 0x1] MOV dword ptr [RBP + -0x30],0x5 LAB_00181af0: MOV qword ptr [RBX + 0x30],RAX ADD RSI,RAX MOV RDI,R14 MOV RDX,RCX MOV R13,RCX CALL 0x0017fcc9 TEST RAX,RAX JZ 0x00181b6d MOV RAX,qword ptr [R13] ADD RAX,qword ptr [RBX + 0x18] MOV RCX,qword ptr [RBP + -0x40] MOV qword ptr [RCX + 0x18],RAX ADD RAX,qword ptr [RBX + 0x30] ADD R15D,dword ptr [RBP + -0x30] MOV qword ptr [RCX + 0x20],RAX MOV RAX,qword ptr [RBX + 0x30] MOV qword ptr [R14 + 0x1b8],RAX MOV RCX,R13 MOV RDI,qword ptr [RBP + -0x38] LAB_00181b38: MOV EAX,R15D MOV RDX,qword ptr [RBP + -0x48] ADD RDX,RAX MOV qword ptr [RBX + 0x38],RDX XOR R15D,R15D TEST R12D,R12D JLE 0x00181b73 MOV RDX,qword ptr [RBX + 0x18] SUB EDI,EAX CMP RDX,RDI CMOVNC EDX,EDI MOV dword ptr [RBX + 0x54],EDX MOV RDI,qword ptr [RCX] ADD RBX,RAX MOV RSI,RBX CALL 0x00129080 JMP 0x00181b73 LAB_00181b6d: MOV R15D,0x20 LAB_00181b73: MOV EAX,R15D ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00181b85: MOV RDI,RAX MOV ESI,R12D MOV RDX,R15 CALL 0x0012e469 JMP 0x001819cc LAB_00181b98: MOV R15,RAX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] LEA RDX,[0x1db9b6] MOV RDI,R15 MOV RSI,R13 MOV ECX,0x566 CALL qword ptr [RAX + 0x210] MOV ECX,0x4 MOV EDI,R12D MOV RSI,RBX MOV RDX,R13 CALL 0x001a0b10 MOV RCX,R13 MOV R13,RAX XOR ESI,ESI TEST RAX,RAX CMOVZ RSI,RCX LEA RAX,[0x486010] MOV RAX,qword ptr [RAX] MOV RDI,R15 CALL qword ptr [RAX + 0x218] JMP 0x00181a0e
int8 _mi_pack_get_block_info (long *param_1,long param_2,byte *param_3,long *param_4,int param_5,long param_6) { ulong in_RAX; long lVar1; long lVar2; ulong uVar3; ulong uVar4; int iVar5; ulong uVar6; int1 local_98 [72]; long local_50; long local_48; ulong local_40; long *local_38; local_50 = param_6; local_48 = param_2; local_40 = in_RAX; if (-1 < param_5) { uVar4 = (ulong)*(uint *)(*param_1 + 0x240); local_38 = param_4; lVar1 = (**(code **)(PSI_server + 0x158))(local_98,param_5,8); if (lVar1 == 0) { my_seek(param_5,param_6,0,0); } else { _mi_pack_get_block_info_cold_1(lVar1,param_5,param_6); } lVar1 = (**(code **)(PSI_server + 0x158))(local_98,param_5,6); local_40 = uVar4; if (lVar1 == 0) { lVar2 = my_read(param_5,param_3,uVar4,4); } else { (**(code **)(PSI_server + 0x210)) (lVar1,uVar4,"/workspace/llm4binary/github2025/eloqsql/storage/myisam/mi_packrec.c", 0x566); lVar2 = my_read(param_5,param_3,uVar4,4); uVar6 = 0; if (lVar2 == 0) { uVar6 = uVar4; } (**(code **)(PSI_server + 0x218))(lVar1,uVar6); } param_4 = local_38; if (lVar2 != 0) { return 0x20; } } uVar4 = (ulong)*param_3; if (uVar4 < 0xfe) { uVar6 = 1; } else if (*param_3 == 0xfe) { uVar4 = (ulong)*(ushort *)(param_3 + 1); uVar6 = 3; } else if (*(char *)(*param_1 + 0x244) == '\x01') { uVar4 = (ulong)*(uint3 *)(param_3 + 1); uVar6 = 4; } else { uVar4 = (ulong)*(uint *)(param_3 + 1); uVar6 = 5; } iVar5 = (int)local_40; *(ulong *)(param_3 + 0x18) = uVar4; if (*(int *)(*param_1 + 0x188) != 0) { uVar3 = (ulong)param_3[uVar6]; if (uVar3 < 0xfe) { local_38 = (long *)CONCAT44(local_38._4_4_,1); } else if (param_3[uVar6] == 0xfe) { uVar3 = (ulong)*(ushort *)(param_3 + uVar6 + 1); local_38 = (long *)CONCAT44(local_38._4_4_,3); } else if (*(char *)(*param_1 + 0x244) == '\x01') { uVar3 = (ulong)CONCAT12(param_3[uVar6 + 3],*(int2 *)(param_3 + uVar6 + 1)); local_38 = (long *)CONCAT44(local_38._4_4_,4); } else { uVar3 = (ulong)*(uint *)(param_3 + uVar6 + 1); local_38 = (long *)CONCAT44(local_38._4_4_,5); } *(ulong *)(param_3 + 0x30) = uVar3; lVar1 = mi_alloc_rec_buff(param_1,uVar4 + uVar3,param_4); if (lVar1 == 0) { return 0x20; } lVar1 = *param_4; lVar2 = *(long *)(param_3 + 0x18); *(long *)(local_48 + 0x18) = lVar1 + lVar2; uVar6 = (ulong)(uint)((int)uVar6 + (int)local_38); *(long *)(local_48 + 0x20) = lVar1 + lVar2 + *(long *)(param_3 + 0x30); param_1[0x37] = *(long *)(param_3 + 0x30); iVar5 = (int)local_40; } *(ulong *)(param_3 + 0x38) = local_50 + uVar6; if (0 < param_5) { uVar3 = (ulong)(uint)(iVar5 - (int)uVar6); uVar4 = *(ulong *)(param_3 + 0x18) & 0xffffffff; if (uVar3 <= *(ulong *)(param_3 + 0x18)) { uVar4 = uVar3; } *(int *)(param_3 + 0x54) = (int)uVar4; memcpy((void *)*param_4,param_3 + uVar6,uVar4); } return 0; }
46,798
main
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MainSinCache.cpp
int main(int argc, char **argv) { if (!parseParameters(argc, argv)) { return -1; } // Open CSV file and write header std::ofstream csvFile(std::string(traceFilePath) + ".csv"); csvFile << "cacheSize,blockSize,associativity,missRate,totalCycles\n"; for (uint32_t cacheSize = 4 * 1024; cacheSize <= 1024 * 1024; cacheSize *= 4) { for (uint32_t blockSize = 32; blockSize <= 256; blockSize *= 2) { for (uint32_t associativity = 2; associativity <= 32; associativity *= 2) { uint32_t blockNum = cacheSize / blockSize; if (blockNum % associativity != 0) continue; simulateCache(csvFile, cacheSize, blockSize, associativity); } } } printf("Result has been written to %s\n", (std::string(traceFilePath) + ".csv").c_str()); csvFile.close(); return 0; }
O0
cpp
main: subq $0x2e8, %rsp # imm = 0x2E8 movl $0x0, 0x2e4(%rsp) movl %edi, 0x2e0(%rsp) movq %rsi, 0x2d8(%rsp) movl 0x2e0(%rsp), %edi movq 0x2d8(%rsp), %rsi callq 0x2850 testb $0x1, %al jne 0x2519 movl $0xffffffff, 0x2e4(%rsp) # imm = 0xFFFFFFFF jmp 0x282c movq 0x9c90(%rip), %rax # 0xc1b0 movq %rax, 0x18(%rsp) leaq 0x97(%rsp), %rdi movq %rdi, 0x20(%rsp) callq 0x22d0 movq 0x18(%rsp), %rsi movq 0x20(%rsp), %rdx leaq 0x98(%rsp), %rdi callq 0x2200 jmp 0x2550 leaq 0x5aad(%rip), %rdx # 0x8004 leaq 0xb8(%rsp), %rdi leaq 0x98(%rsp), %rsi callq 0x2ef0 jmp 0x256e leaq 0xd8(%rsp), %rdi leaq 0xb8(%rsp), %rsi movl $0x10, %edx callq 0x2300 jmp 0x258a leaq 0xb8(%rsp), %rdi callq 0x2110 leaq 0x98(%rsp), %rdi callq 0x2110 leaq 0x97(%rsp), %rdi callq 0x21a0 leaq 0x5a51(%rip), %rsi # 0x8009 leaq 0xd8(%rsp), %rdi callq 0x2170 jmp 0x25c7 movl $0x1000, 0x80(%rsp) # imm = 0x1000 cmpl $0x100000, 0x80(%rsp) # imm = 0x100000 ja 0x2712 movl $0x20, 0x7c(%rsp) cmpl $0x100, 0x7c(%rsp) # imm = 0x100 ja 0x26fa movl $0x2, 0x78(%rsp) cmpl $0x20, 0x78(%rsp) ja 0x26e9 movl 0x80(%rsp), %eax xorl %edx, %edx divl 0x7c(%rsp) movl %eax, 0x74(%rsp) movl 0x74(%rsp), %eax xorl %edx, %edx divl 0x78(%rsp) cmpl $0x0, %edx je 0x26ba jmp 0x26da movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x268f movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x2682 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0xb8(%rsp), %rdi callq 0x2110 leaq 0x98(%rsp), %rdi callq 0x2110 leaq 0x97(%rsp), %rdi callq 0x21a0 jmp 0x283b movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x281d movl 0x80(%rsp), %esi movl 0x7c(%rsp), %edx movl 0x78(%rsp), %ecx leaq 0xd8(%rsp), %rdi callq 0x2930 jmp 0x26d8 jmp 0x26da movl 0x78(%rsp), %eax shll %eax movl %eax, 0x78(%rsp) jmp 0x2601 jmp 0x26eb movl 0x7c(%rsp), %eax shll %eax movl %eax, 0x7c(%rsp) jmp 0x25eb jmp 0x26fc movl 0x80(%rsp), %eax shll $0x2, %eax movl %eax, 0x80(%rsp) jmp 0x25d2 movq 0x9a97(%rip), %rax # 0xc1b0 movq %rax, 0x8(%rsp) leaq 0x2f(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x22d0 movq 0x8(%rsp), %rsi movq 0x10(%rsp), %rdx leaq 0x30(%rsp), %rdi callq 0x2200 jmp 0x2743 leaq 0x58ba(%rip), %rdx # 0x8004 leaq 0x50(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0x2ef0 jmp 0x275b leaq 0x50(%rsp), %rdi callq 0x20c0 movq %rax, %rsi leaq 0x58d2(%rip), %rdi # 0x8041 xorl %eax, %eax callq 0x2040 jmp 0x2778 leaq 0x50(%rsp), %rdi callq 0x2110 leaq 0x30(%rsp), %rdi callq 0x2110 leaq 0x2f(%rsp), %rdi callq 0x21a0 leaq 0xd8(%rsp), %rdi callq 0x2230 jmp 0x27a5 movl $0x0, 0x2e4(%rsp) leaq 0xd8(%rsp), %rdi callq 0x2260 jmp 0x282c movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x2813 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) jmp 0x2809 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x88(%rsp) movl %eax, 0x84(%rsp) leaq 0x50(%rsp), %rdi callq 0x2110 leaq 0x30(%rsp), %rdi callq 0x2110 leaq 0x2f(%rsp), %rdi callq 0x21a0 leaq 0xd8(%rsp), %rdi callq 0x2260 jmp 0x283b movl 0x2e4(%rsp), %eax addq $0x2e8, %rsp # imm = 0x2E8 retq movq 0x88(%rsp), %rdi callq 0x22c0 nopl (%rax,%rax)
main: sub rsp, 2E8h mov [rsp+2E8h+var_4], 0 mov [rsp+2E8h+var_8], edi mov [rsp+2E8h+var_10], rsi mov edi, [rsp+2E8h+var_8]; int mov rsi, [rsp+2E8h+var_10]; char ** call _Z15parseParametersiPPc; parseParameters(int,char **) test al, 1 jnz short loc_2519 mov [rsp+2E8h+var_4], 0FFFFFFFFh jmp loc_282C loc_2519: mov rax, cs:traceFilePath mov [rsp+2E8h+var_2D0], rax lea rdi, [rsp+2E8h+var_251] mov [rsp+2E8h+var_2C8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+2E8h+var_2D0] mov rdx, [rsp+2E8h+var_2C8] lea rdi, [rsp+2E8h+var_250] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) jmp short $+2 loc_2550: lea rdx, aCsv; ".csv" lea rdi, [rsp+2E8h+var_230] lea rsi, [rsp+2E8h+var_250] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_256E: lea rdi, [rsp+2E8h+var_210] lea rsi, [rsp+2E8h+var_230] mov edx, 10h call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode) jmp short $+2 loc_258A: lea rdi, [rsp+2E8h+var_230] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+2E8h+var_250] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+2E8h+var_251] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rsi, aCachesizeBlock; "cacheSize,blockSize,associativity,missR"... lea rdi, [rsp+2E8h+var_210] call __ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc; std::operator<<<std::char_traits<char>>(std::ostream &,char const*) jmp short $+2 loc_25C7: mov [rsp+2E8h+var_268], 1000h loc_25D2: cmp [rsp+2E8h+var_268], 100000h ja loc_2712 mov [rsp+2E8h+var_26C], 20h ; ' ' loc_25EB: cmp [rsp+2E8h+var_26C], 100h ja loc_26FA mov [rsp+2E8h+var_270], 2 loc_2601: cmp [rsp+2E8h+var_270], 20h ; ' ' ja loc_26E9 mov eax, [rsp+2E8h+var_268] xor edx, edx div [rsp+2E8h+var_26C] mov [rsp+2E8h+var_274], eax mov eax, [rsp+2E8h+var_274] xor edx, edx div [rsp+2E8h+var_270] cmp edx, 0 jz loc_26BA jmp loc_26DA mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_268F mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_2682 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_B0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_2682: lea rdi, [rsp+arg_90] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_268F: lea rdi, [rsp+arg_8F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() jmp loc_283B mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp loc_281D loc_26BA: mov esi, [rsp+2E8h+var_268] mov edx, [rsp+2E8h+var_26C] mov ecx, [rsp+2E8h+var_270] lea rdi, [rsp+2E8h+var_210] call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjj; simulateCache(std::ofstream &,uint,uint,uint) jmp short $+2 loc_26D8: jmp short $+2 loc_26DA: mov eax, [rsp+2E8h+var_270] shl eax, 1 mov [rsp+2E8h+var_270], eax jmp loc_2601 loc_26E9: jmp short $+2 loc_26EB: mov eax, [rsp+2E8h+var_26C] shl eax, 1 mov [rsp+2E8h+var_26C], eax jmp loc_25EB loc_26FA: jmp short $+2 loc_26FC: mov eax, [rsp+2E8h+var_268] shl eax, 2 mov [rsp+2E8h+var_268], eax jmp loc_25D2 loc_2712: mov rax, cs:traceFilePath mov [rsp+2E8h+var_2E0], rax lea rdi, [rsp+2E8h+var_2B9] mov [rsp+2E8h+var_2D8], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rsi, [rsp+2E8h+var_2E0] mov rdx, [rsp+2E8h+var_2D8] lea rdi, [rsp+2E8h+var_2B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) jmp short $+2 loc_2743: lea rdx, aCsv; ".csv" lea rdi, [rsp+2E8h+var_298] lea rsi, [rsp+2E8h+var_2B8] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_PKS5_; std::operator+<char>(std::string&&,char const*) jmp short $+2 loc_275B: lea rdi, [rsp+2E8h+var_298] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rsi, rax lea rdi, aResultHasBeenW; "Result has been written to %s\n" xor eax, eax call _printf jmp short $+2 loc_2778: lea rdi, [rsp+2E8h+var_298] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+2E8h+var_2B8] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+2E8h+var_2B9] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+2E8h+var_210] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void) jmp short $+2 loc_27A5: mov [rsp+2E8h+var_4], 0 lea rdi, [rsp+2E8h+var_210] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() jmp short loc_282C mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_2813 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax jmp short loc_2809 mov rcx, rax mov eax, edx mov [rsp+arg_80], rcx mov [rsp+arg_7C], eax lea rdi, [rsp+arg_48] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_2809: lea rdi, [rsp+arg_28] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_2813: lea rdi, [rsp+arg_27] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_281D: lea rdi, [rsp+arg_D0] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() jmp short loc_283B loc_282C: mov eax, [rsp+2E8h+var_4] add rsp, 2E8h retn loc_283B: mov rdi, [rsp+arg_80] call __Unwind_Resume
int main(int argc, const char **argv, const char **envp) { const char *v3; // rax long long v5; // [rsp+8h] [rbp-2E0h] long long v6; // [rsp+18h] [rbp-2D0h] char v7; // [rsp+2Fh] [rbp-2B9h] BYREF _BYTE v8[32]; // [rsp+30h] [rbp-2B8h] BYREF _BYTE v9[36]; // [rsp+50h] [rbp-298h] BYREF int v10; // [rsp+74h] [rbp-274h] unsigned int k; // [rsp+78h] [rbp-270h] unsigned int j; // [rsp+7Ch] [rbp-26Ch] unsigned int i; // [rsp+80h] [rbp-268h] char v14; // [rsp+97h] [rbp-251h] BYREF _BYTE v15[32]; // [rsp+98h] [rbp-250h] BYREF _BYTE v16[32]; // [rsp+B8h] [rbp-230h] BYREF _BYTE v17[512]; // [rsp+D8h] [rbp-210h] BYREF char **v18; // [rsp+2D8h] [rbp-10h] int v19; // [rsp+2E0h] [rbp-8h] int v20; // [rsp+2E4h] [rbp-4h] v20 = 0; v19 = argc; v18 = (char **)argv; if ( (parseParameters(argc, (char **)argv) & 1) == 0 ) return -1; v6 = traceFilePath; std::allocator<char>::allocator(); std::string::basic_string(v15, v6, &v14); std::operator+<char>(v16, v15, ".csv"); std::ofstream::basic_ofstream(v17, v16, 16LL); std::string::~string(v16); std::string::~string(v15); std::allocator<char>::~allocator(&v14); std::operator<<<std::char_traits<char>>(v17, "cacheSize,blockSize,associativity,missRate,totalCycles\n"); for ( i = 4096; i <= 0x100000; i *= 4 ) { for ( j = 32; j <= 0x100; j *= 2 ) { for ( k = 2; k <= 0x20; k *= 2 ) { v10 = i / j; if ( !(i / j % k) ) simulateCache(v17, i, j, k); } } } v5 = traceFilePath; std::allocator<char>::allocator(); std::string::basic_string(v8, v5, &v7); std::operator+<char>(v9, v8, ".csv"); v3 = (const char *)std::string::c_str(v9); printf("Result has been written to %s\n", v3); std::string::~string(v9); std::string::~string(v8); std::allocator<char>::~allocator(&v7); std::ofstream::close(v17); v20 = 0; std::ofstream::~ofstream(v17); return v20; }
main: SUB RSP,0x2e8 MOV dword ptr [RSP + 0x2e4],0x0 MOV dword ptr [RSP + 0x2e0],EDI MOV qword ptr [RSP + 0x2d8],RSI MOV EDI,dword ptr [RSP + 0x2e0] MOV RSI,qword ptr [RSP + 0x2d8] CALL 0x00102850 TEST AL,0x1 JNZ 0x00102519 MOV dword ptr [RSP + 0x2e4],0xffffffff JMP 0x0010282c LAB_00102519: MOV RAX,qword ptr [0x0010c1b0] MOV qword ptr [RSP + 0x18],RAX LEA RDI,[RSP + 0x97] MOV qword ptr [RSP + 0x20],RDI CALL 0x001022d0 MOV RSI,qword ptr [RSP + 0x18] MOV RDX,qword ptr [RSP + 0x20] LAB_00102541: LEA RDI,[RSP + 0x98] CALL 0x00102200 JMP 0x00102550 LAB_00102550: LEA RDX,[0x108004] LEA RDI,[RSP + 0xb8] LEA RSI,[RSP + 0x98] CALL 0x00102ef0 JMP 0x0010256e LAB_0010256e: LEA RDI,[RSP + 0xd8] LEA RSI,[RSP + 0xb8] MOV EDX,0x10 CALL 0x00102300 JMP 0x0010258a LAB_0010258a: LEA RDI,[RSP + 0xb8] CALL 0x00102110 LEA RDI,[RSP + 0x98] CALL 0x00102110 LEA RDI,[RSP + 0x97] CALL 0x001021a0 LAB_001025b1: LEA RSI,[0x108009] LEA RDI,[RSP + 0xd8] CALL 0x00102170 JMP 0x001025c7 LAB_001025c7: MOV dword ptr [RSP + 0x80],0x1000 LAB_001025d2: CMP dword ptr [RSP + 0x80],0x100000 JA 0x00102712 MOV dword ptr [RSP + 0x7c],0x20 LAB_001025eb: CMP dword ptr [RSP + 0x7c],0x100 JA 0x001026fa MOV dword ptr [RSP + 0x78],0x2 LAB_00102601: CMP dword ptr [RSP + 0x78],0x20 JA 0x001026e9 MOV EAX,dword ptr [RSP + 0x80] XOR EDX,EDX DIV dword ptr [RSP + 0x7c] MOV dword ptr [RSP + 0x74],EAX MOV EAX,dword ptr [RSP + 0x74] XOR EDX,EDX DIV dword ptr [RSP + 0x78] CMP EDX,0x0 JZ 0x001026ba JMP 0x001026da LAB_001026ba: MOV ESI,dword ptr [RSP + 0x80] MOV EDX,dword ptr [RSP + 0x7c] MOV ECX,dword ptr [RSP + 0x78] LEA RDI,[RSP + 0xd8] CALL 0x00102930 JMP 0x001026d8 LAB_001026d8: JMP 0x001026da LAB_001026da: MOV EAX,dword ptr [RSP + 0x78] SHL EAX,0x1 MOV dword ptr [RSP + 0x78],EAX JMP 0x00102601 LAB_001026e9: JMP 0x001026eb LAB_001026eb: MOV EAX,dword ptr [RSP + 0x7c] SHL EAX,0x1 MOV dword ptr [RSP + 0x7c],EAX JMP 0x001025eb LAB_001026fa: JMP 0x001026fc LAB_001026fc: MOV EAX,dword ptr [RSP + 0x80] SHL EAX,0x2 MOV dword ptr [RSP + 0x80],EAX JMP 0x001025d2 LAB_00102712: MOV RAX,qword ptr [0x0010c1b0] MOV qword ptr [RSP + 0x8],RAX LEA RDI,[RSP + 0x2f] MOV qword ptr [RSP + 0x10],RDI CALL 0x001022d0 MOV RSI,qword ptr [RSP + 0x8] MOV RDX,qword ptr [RSP + 0x10] LAB_00102737: LEA RDI,[RSP + 0x30] CALL 0x00102200 JMP 0x00102743 LAB_00102743: LEA RDX,[0x108004] LEA RDI,[RSP + 0x50] LEA RSI,[RSP + 0x30] CALL 0x00102ef0 JMP 0x0010275b LAB_0010275b: LEA RDI,[RSP + 0x50] CALL 0x001020c0 MOV RSI,RAX LAB_00102768: LEA RDI,[0x108041] XOR EAX,EAX CALL 0x00102040 JMP 0x00102778 LAB_00102778: LEA RDI,[RSP + 0x50] CALL 0x00102110 LEA RDI,[RSP + 0x30] CALL 0x00102110 LEA RDI,[RSP + 0x2f] CALL 0x001021a0 LAB_00102796: LEA RDI,[RSP + 0xd8] CALL 0x00102230 LAB_001027a3: JMP 0x001027a5 LAB_001027a5: MOV dword ptr [RSP + 0x2e4],0x0 LEA RDI,[RSP + 0xd8] CALL 0x00102260 JMP 0x0010282c LAB_0010282c: MOV EAX,dword ptr [RSP + 0x2e4] ADD RSP,0x2e8 RET
int4 main(int param_1,char **param_2) { char *pcVar1; ulong uVar2; int8 uVar3; allocator local_2b9; string local_2b8 [32]; string local_298 [36]; uint local_274; uint local_270; uint local_26c; uint local_268; allocator local_251; string local_250 [32]; string local_230 [32]; ofstream local_210 [512]; char **local_10; int local_8; int4 local_4; local_4 = 0; local_10 = param_2; local_8 = param_1; uVar2 = parseParameters(param_1,param_2); pcVar1 = traceFilePath; if ((uVar2 & 1) == 0) { local_4 = 0xffffffff; } else { std::allocator<char>::allocator(); /* try { // try from 00102541 to 0010254d has its CatchHandler @ 00102635 */ std::__cxx11::string::string(local_250,pcVar1,&local_251); /* try { // try from 00102550 to 0010256b has its CatchHandler @ 0010264b */ std::operator+(local_230,(char *)local_250); /* try { // try from 0010256e to 00102587 has its CatchHandler @ 00102661 */ std::ofstream::ofstream(local_210,local_230,0x10); std::__cxx11::string::~string(local_230); std::__cxx11::string::~string(local_250); std::allocator<char>::~allocator((allocator<char> *)&local_251); /* try { // try from 001025b1 to 001026d5 has its CatchHandler @ 001026a1 */ std::operator<<((ostream *)local_210,"cacheSize,blockSize,associativity,missRate,totalCycles\n") ; for (local_268 = 0x1000; pcVar1 = traceFilePath, local_268 < 0x100001; local_268 = local_268 << 2) { for (local_26c = 0x20; local_26c < 0x101; local_26c = local_26c << 1) { for (local_270 = 2; local_270 < 0x21; local_270 = local_270 << 1) { local_274 = local_268 / local_26c; if (local_274 % local_270 == 0) { simulateCache(local_210,local_268,local_26c,local_270); } } } } std::allocator<char>::allocator(); /* try { // try from 00102737 to 00102740 has its CatchHandler @ 001027bf */ std::__cxx11::string::string(local_2b8,pcVar1,&local_2b9); /* try { // try from 00102743 to 00102758 has its CatchHandler @ 001027d5 */ std::operator+(local_298,(char *)local_2b8); uVar3 = std::__cxx11::string::c_str(); /* try { // try from 00102768 to 00102775 has its CatchHandler @ 001027eb */ printf("Result has been written to %s\n",uVar3); std::__cxx11::string::~string(local_298); std::__cxx11::string::~string(local_2b8); std::allocator<char>::~allocator((allocator<char> *)&local_2b9); /* try { // try from 00102796 to 001027a2 has its CatchHandler @ 001026a1 */ std::ofstream::close(); local_4 = 0; std::ofstream::~ofstream(local_210); } return local_4; }
46,799
main
DanielDanyang[P]CSC3050-2025-Spring-Project-4/src/MainSinCache.cpp
int main(int argc, char **argv) { if (!parseParameters(argc, argv)) { return -1; } // Open CSV file and write header std::ofstream csvFile(std::string(traceFilePath) + ".csv"); csvFile << "cacheSize,blockSize,associativity,missRate,totalCycles\n"; for (uint32_t cacheSize = 4 * 1024; cacheSize <= 1024 * 1024; cacheSize *= 4) { for (uint32_t blockSize = 32; blockSize <= 256; blockSize *= 2) { for (uint32_t associativity = 2; associativity <= 32; associativity *= 2) { uint32_t blockNum = cacheSize / blockSize; if (blockNum % associativity != 0) continue; simulateCache(csvFile, cacheSize, blockSize, associativity); } } } printf("Result has been written to %s\n", (std::string(traceFilePath) + ".csv").c_str()); csvFile.close(); return 0; }
O3
cpp
main: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x248, %rsp # imm = 0x248 callq 0x2861 movl %eax, %ecx movl $0xffffffff, %eax # imm = 0xFFFFFFFF testb %cl, %cl je 0x27ec movq 0x5b88(%rip), %rsi # 0x8180 leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x20b0 leaq 0x29f6(%rip), %rsi # 0x5004 leaq 0x28(%rsp), %rdi callq 0x2280 leaq 0x18(%rsp), %r13 movq %r13, -0x10(%r13) movq (%rax), %rdx movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rdx je 0x263f movq %rdx, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x2647 movups (%rcx), %xmm0 movups %xmm0, (%r13) movq 0x8(%rax), %rdx leaq 0x8(%rsp), %rsi movq %rdx, 0x8(%rsi) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x48(%rsp), %rdi movl $0x10, %edx callq 0x2290 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x2681 callq 0x2150 leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2694 callq 0x2150 leaq 0x296e(%rip), %rsi # 0x5009 leaq 0x48(%rsp), %rdi movl $0x37, %edx callq 0x2190 movl $0x1000, %ebx # imm = 0x1000 leaq 0x48(%rsp), %r14 movl $0x20, %r15d movl %ebx, %eax xorl %edx, %edx divl %r15d movl %eax, %ebp movl $0x2, %r12d leal -0x1(%r12), %eax testl %eax, %ebp jne 0x26e2 movq %r14, %rdi movl %ebx, %esi movl %r15d, %edx movl %r12d, %ecx callq 0x28be leal (%r12,%r12), %eax cmpl $0x11, %r12d movl %eax, %r12d jb 0x26c9 leal (%r15,%r15), %eax cmpl $0x81, %r15d movl %eax, %r15d jb 0x26ba leal (,%rbx,4), %eax cmpl $0x40001, %ebx # imm = 0x40001 movl %eax, %ebx jb 0x26b4 movq 0x5a69(%rip), %rsi # 0x8180 leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x20b0 leaq 0x28d7(%rip), %rsi # 0x5004 leaq 0x28(%rsp), %rdi callq 0x2280 movq %r13, 0x8(%rsp) movq (%rax), %rsi movq %rax, %rcx addq $0x10, %rcx cmpq %rcx, %rsi je 0x275a movq %rsi, 0x8(%rsp) movq (%rcx), %rdx movq %rdx, 0x18(%rsp) jmp 0x2765 movups (%rcx), %xmm0 movups %xmm0, (%r13) movq %r13, %rsi movq 0x8(%rax), %rdx movq %rdx, 0x10(%rsp) movq %rcx, (%rax) movq $0x0, 0x8(%rax) movb $0x0, 0x10(%rax) leaq 0x28bd(%rip), %rdi # 0x5041 xorl %eax, %eax callq 0x2050 movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x279a callq 0x2150 movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x27ae callq 0x2150 leaq 0x48(%rsp), %rdi callq 0x21e0 movq 0x5811(%rip), %rax # 0x7fd0 movq (%rax), %rcx movq 0x18(%rax), %rax leaq 0x50(%rsp), %rdi movq %rcx, -0x8(%rdi) movq -0x18(%rcx), %rcx movq %rax, 0x48(%rsp,%rcx) callq 0x2130 leaq 0x140(%rsp), %rdi callq 0x2090 xorl %eax, %eax addq $0x248, %rsp # imm = 0x248 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx movq 0x28(%rsp), %rdi leaq 0x38(%rsp), %rax cmpq %rax, %rdi je 0x284f callq 0x2150 jmp 0x284f jmp 0x284c movq %rax, %rbx movq 0x8(%rsp), %rdi cmpq %r13, %rdi je 0x2830 callq 0x2150 jmp 0x2830 movq %rax, %rbx leaq 0x38(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0x2859 callq 0x2150 jmp 0x2859 movq %rax, %rbx jmp 0x2859 jmp 0x284c movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x2200 movq %rbx, %rdi callq 0x2260
main: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 248h call _Z15parseParametersiPPc; parseParameters(int,char **) mov ecx, eax mov eax, 0FFFFFFFFh test cl, cl jz loc_27EC mov rsi, cs:traceFilePath lea rdi, [rsp+278h+var_250] lea rdx, [rsp+278h+var_271] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) lea rsi, aCsv; ".csv" lea rdi, [rsp+278h+var_250] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) lea r13, [rsp+278h+var_260] mov [r13-10h], r13 mov rdx, [rax] mov rcx, rax add rcx, 10h cmp rdx, rcx jz short loc_263F mov [rsp+278h+var_270], rdx mov rdx, [rcx] mov [rsp+278h+var_260], rdx jmp short loc_2647 loc_263F: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 loc_2647: mov rdx, [rax+8] lea rsi, [rsp+278h+var_270] mov [rsi+8], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, [rsp+278h+var_230] mov edx, 10h call __ZNSt14basic_ofstreamIcSt11char_traitsIcEEC1ERKNSt7__cxx1112basic_stringIcS1_SaIcEEESt13_Ios_Openmode; std::ofstream::basic_ofstream(std::string const&,std::_Ios_Openmode) mov rdi, [rsp+278h+var_270]; void * cmp rdi, r13 jz short loc_2681 call __ZdlPv; operator delete(void *) loc_2681: lea rax, [rsp+278h+var_240] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2694 call __ZdlPv; operator delete(void *) loc_2694: lea rsi, aCachesizeBlock_0; "cacheSize,blockSize,associativity,missR"... lea rdi, [rsp+278h+var_230] mov edx, 37h ; '7' call __ZSt16__ostream_insertIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_PKS3_l; std::__ostream_insert<char,std::char_traits<char>>(std::ostream &,char const*,long) mov ebx, 1000h lea r14, [rsp+278h+var_230] loc_26B4: mov r15d, 20h ; ' ' loc_26BA: mov eax, ebx xor edx, edx div r15d mov ebp, eax mov r12d, 2 loc_26C9: lea eax, [r12-1] test ebp, eax jnz short loc_26E2 mov rdi, r14 mov esi, ebx mov edx, r15d mov ecx, r12d call _Z13simulateCacheRSt14basic_ofstreamIcSt11char_traitsIcEEjjj; simulateCache(std::ofstream &,uint,uint,uint) loc_26E2: lea eax, [r12+r12] cmp r12d, 11h mov r12d, eax jb short loc_26C9 lea eax, [r15+r15] cmp r15d, 81h mov r15d, eax jb short loc_26BA lea eax, ds:0[rbx*4] cmp ebx, 40001h mov ebx, eax jb short loc_26B4 mov rsi, cs:traceFilePath lea rdi, [rsp+278h+var_250] lea rdx, [rsp+278h+var_271] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2EPKcRKS3_; std::string::basic_string(char const*,std::allocator<char> const&) lea rsi, aCsv; ".csv" lea rdi, [rsp+278h+var_250] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6appendEPKc; std::string::append(char const*) mov [rsp+278h+var_270], r13 mov rsi, [rax] mov rcx, rax add rcx, 10h cmp rsi, rcx jz short loc_275A mov [rsp+278h+var_270], rsi mov rdx, [rcx] mov [rsp+278h+var_260], rdx jmp short loc_2765 loc_275A: movups xmm0, xmmword ptr [rcx] movups xmmword ptr [r13+0], xmm0 mov rsi, r13 loc_2765: mov rdx, [rax+8] mov [rsp+278h+var_268], rdx mov [rax], rcx mov qword ptr [rax+8], 0 mov byte ptr [rax+10h], 0 lea rdi, aResultHasBeenW; "Result has been written to %s\n" xor eax, eax call _printf mov rdi, [rsp+278h+var_270]; void * cmp rdi, r13 jz short loc_279A call __ZdlPv; operator delete(void *) loc_279A: mov rdi, [rsp+278h+var_250]; void * lea rax, [rsp+278h+var_240] cmp rdi, rax jz short loc_27AE call __ZdlPv; operator delete(void *) loc_27AE: lea rdi, [rsp+278h+var_230] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEE5closeEv; std::ofstream::close(void) mov rax, cs:_ZTTSt14basic_ofstreamIcSt11char_traitsIcEE_ptr mov rcx, [rax] mov rax, [rax+18h] lea rdi, [rsp+278h+var_228] mov [rdi-8], rcx mov rcx, [rcx-18h] mov [rsp+rcx+278h+var_230], rax call __ZNSt13basic_filebufIcSt11char_traitsIcEED2Ev; std::filebuf::~filebuf() lea rdi, [rsp+278h+var_138]; this call __ZNSt8ios_baseD2Ev; std::ios_base::~ios_base() xor eax, eax loc_27EC: add rsp, 248h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn mov rbx, rax mov rdi, [rsp+arg_20]; void * lea rax, [rsp+arg_30] cmp rdi, rax jz short loc_284F call __ZdlPv; operator delete(void *) jmp short loc_284F jmp short loc_284C mov rbx, rax mov rdi, [rsp+arg_0]; void * cmp rdi, r13 jz short loc_2830 call __ZdlPv; operator delete(void *) jmp short loc_2830 mov rbx, rax loc_2830: lea rax, [rsp+arg_30] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_2859 call __ZdlPv; operator delete(void *) jmp short loc_2859 mov rbx, rax jmp short loc_2859 jmp short $+2 loc_284C: mov rbx, rax loc_284F: lea rdi, [rsp+arg_40] call __ZNSt14basic_ofstreamIcSt11char_traitsIcEED1Ev; std::ofstream::~ofstream() loc_2859: mov rdi, rbx call __Unwind_Resume
int main(int argc, const char **argv, const char **envp) { char v3; // cl int result; // eax long long v5; // rax __int128 *v6; // rcx int v7; // r8d int v8; // r9d unsigned int v9; // ebx unsigned int v10; // r15d unsigned int v11; // r12d bool v12; // cf long long v13; // rax const char *v14; // rsi __int128 *v15; // rcx long long v16; // rax int v17; // [rsp+0h] [rbp-278h] char v18; // [rsp+7h] [rbp-271h] BYREF void *v19; // [rsp+8h] [rbp-270h] BYREF long long v20; // [rsp+10h] [rbp-268h] __int128 v21; // [rsp+18h] [rbp-260h] BYREF void *v22; // [rsp+28h] [rbp-250h] BYREF int v23; // [rsp+30h] [rbp-248h] _DWORD v24[4]; // [rsp+38h] [rbp-240h] BYREF long long v25; // [rsp+48h] [rbp-230h] BYREF _BYTE v26[312]; // [rsp+140h] [rbp-138h] BYREF v3 = parseParameters(argc, (char **)argv); result = -1; if ( v3 ) { std::string::basic_string(&v22, traceFilePath, &v18); v5 = std::string::append(&v22, ".csv"); v19 = &v21; v6 = (__int128 *)(v5 + 16); if ( *(_QWORD *)v5 == v5 + 16 ) { v21 = *v6; } else { v19 = *(void **)v5; *(_QWORD *)&v21 = *(_QWORD *)v6; } v20 = *(_QWORD *)(v5 + 8); *(_QWORD *)v5 = v6; *(_QWORD *)(v5 + 8) = 0LL; *(_BYTE *)(v5 + 16) = 0; std::ofstream::basic_ofstream(&v25, &v19, 16LL); if ( v19 != &v21 ) operator delete(v19); if ( v22 != v24 ) operator delete(v22); std::__ostream_insert<char,std::char_traits<char>>( &v25, "cacheSize,blockSize,associativity,missRate,totalCycles\n", 55LL); v9 = 4096; do { v10 = 32; do { v11 = 2; do { if ( ((v11 - 1) & (v9 / v10)) == 0 ) simulateCache( (unsigned int)&v25, v9, v10, v11, v7, v8, v17, (_DWORD)v19, v20, v21, DWORD2(v21), (_DWORD)v22, v23, v24[0], v24[2], v25); v12 = v11 < 0x11; v11 *= 2; } while ( v12 ); v12 = v10 < 0x81; v10 *= 2; } while ( v12 ); v12 = v9 < 0x40001; v9 *= 4; } while ( v12 ); std::string::basic_string(&v22, traceFilePath, &v18); v13 = std::string::append(&v22, ".csv"); v19 = &v21; v14 = *(const char **)v13; v15 = (__int128 *)(v13 + 16); if ( *(_QWORD *)v13 == v13 + 16 ) { v21 = *v15; v14 = (const char *)&v21; } else { v19 = *(void **)v13; *(_QWORD *)&v21 = *(_QWORD *)v15; } v20 = *(_QWORD *)(v13 + 8); *(_QWORD *)v13 = v15; *(_QWORD *)(v13 + 8) = 0LL; *(_BYTE *)(v13 + 16) = 0; printf("Result has been written to %s\n", v14); if ( v19 != &v21 ) operator delete(v19); if ( v22 != v24 ) operator delete(v22); std::ofstream::close(&v25); v16 = `VTT for'std::ofstream[3]; v25 = `VTT for'std::ofstream[0]; *(_QWORD *)(v26 + *(_QWORD *)(`VTT for'std::ofstream[0] - 24LL) + 232) = v16; std::filebuf::~filebuf(); std::ios_base::~ios_base((std::ios_base *)v26); return 0; } return result; }
main: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x248 CALL 0x00102861 MOV ECX,EAX MOV EAX,0xffffffff TEST CL,CL JZ 0x001027ec MOV RSI,qword ptr [0x00108180] LAB_001025f8: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] CALL 0x001020b0 LAB_00102607: LEA RSI,[0x105004] LEA RDI,[RSP + 0x28] CALL 0x00102280 LEA R13,[RSP + 0x18] MOV qword ptr [R13 + -0x10],R13 MOV RDX,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RDX,RCX JZ 0x0010263f MOV qword ptr [RSP + 0x8],RDX MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x00102647 LAB_0010263f: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM0 LAB_00102647: MOV RDX,qword ptr [RAX + 0x8] LEA RSI,[RSP + 0x8] MOV qword ptr [RSI + 0x8],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LAB_00102663: LEA RDI,[RSP + 0x48] MOV EDX,0x10 CALL 0x00102290 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x00102681 CALL 0x00102150 LAB_00102681: LEA RAX,[RSP + 0x38] MOV RDI,qword ptr [RAX + -0x10] CMP RDI,RAX JZ 0x00102694 CALL 0x00102150 LAB_00102694: LEA RSI,[0x105009] LEA RDI,[RSP + 0x48] MOV EDX,0x37 CALL 0x00102190 MOV EBX,0x1000 LEA R14,[RSP + 0x48] LAB_001026b4: MOV R15D,0x20 LAB_001026ba: MOV EAX,EBX XOR EDX,EDX DIV R15D MOV EBP,EAX MOV R12D,0x2 LAB_001026c9: LEA EAX,[R12 + -0x1] TEST EBP,EAX JNZ 0x001026e2 LAB_001026d2: MOV RDI,R14 MOV ESI,EBX MOV EDX,R15D MOV ECX,R12D CALL 0x001028be LAB_001026e2: LEA EAX,[R12 + R12*0x1] CMP R12D,0x11 MOV R12D,EAX JC 0x001026c9 LEA EAX,[R15 + R15*0x1] CMP R15D,0x81 MOV R15D,EAX JC 0x001026ba LEA EAX,[RBX*0x4] CMP EBX,0x40001 MOV EBX,EAX JC 0x001026b4 MOV RSI,qword ptr [0x00108180] LAB_00102717: LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] CALL 0x001020b0 LAB_00102726: LEA RSI,[0x105004] LEA RDI,[RSP + 0x28] CALL 0x00102280 MOV qword ptr [RSP + 0x8],R13 MOV RSI,qword ptr [RAX] MOV RCX,RAX ADD RCX,0x10 CMP RSI,RCX JZ 0x0010275a MOV qword ptr [RSP + 0x8],RSI MOV RDX,qword ptr [RCX] MOV qword ptr [RSP + 0x18],RDX JMP 0x00102765 LAB_0010275a: MOVUPS XMM0,xmmword ptr [RCX] MOVUPS xmmword ptr [R13],XMM0 MOV RSI,R13 LAB_00102765: MOV RDX,qword ptr [RAX + 0x8] MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RAX],RCX MOV qword ptr [RAX + 0x8],0x0 MOV byte ptr [RAX + 0x10],0x0 LEA RDI,[0x105041] XOR EAX,EAX CALL 0x00102050 MOV RDI,qword ptr [RSP + 0x8] CMP RDI,R13 JZ 0x0010279a CALL 0x00102150 LAB_0010279a: MOV RDI,qword ptr [RSP + 0x28] LEA RAX,[RSP + 0x38] CMP RDI,RAX JZ 0x001027ae CALL 0x00102150 LAB_001027ae: LEA RDI,[RSP + 0x48] CALL 0x001021e0 LAB_001027b8: MOV RAX,qword ptr [0x00107fd0] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x18] LEA RDI,[RSP + 0x50] MOV qword ptr [RDI + -0x8],RCX MOV RCX,qword ptr [RCX + -0x18] MOV qword ptr [RSP + RCX*0x1 + 0x48],RAX CALL 0x00102130 LEA RDI,[RSP + 0x140] CALL 0x00102090 XOR EAX,EAX LAB_001027ec: ADD RSP,0x248 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
int8 main(int param_1,char **param_2) { char cVar1; int8 uVar2; long *plVar3; long *plVar4; uint uVar5; uint uVar6; uint uVar7; ulong uVar8; bool bVar9; allocator local_271; long *local_270; long local_268; long local_260; int4 uStack_258; int4 uStack_254; int1 *local_250 [2]; int1 local_240 [16]; long local_230; filebuf local_228 [240]; ios_base local_138 [264]; cVar1 = parseParameters(param_1,param_2); uVar2 = 0xffffffff; if (cVar1 != '\0') { /* try { // try from 001025f8 to 00102606 has its CatchHandler @ 00102845 */ std::__cxx11::string::string((string *)local_250,traceFilePath,&local_271); /* try { // try from 00102607 to 00102617 has its CatchHandler @ 0010282d */ plVar3 = (long *)std::__cxx11::string::append((char *)local_250); plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { local_260 = *plVar4; uStack_258 = (int4)plVar3[3]; uStack_254 = *(int4 *)((long)plVar3 + 0x1c); local_270 = &local_260; } else { local_260 = *plVar4; local_270 = (long *)*plVar3; } local_268 = plVar3[1]; *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; /* try { // try from 00102663 to 00102671 has its CatchHandler @ 00102819 */ std::ofstream::ofstream((ofstream *)&local_230,&local_270,0x10); if (local_270 != &local_260) { operator_delete(local_270); } if (local_250[0] != local_240) { operator_delete(local_250[0]); } /* try { // try from 00102694 to 001026a9 has its CatchHandler @ 0010284a */ std::__ostream_insert<char,std::char_traits<char>> ((ostream *)&local_230,"cacheSize,blockSize,associativity,missRate,totalCycles\n",0x37 ); uVar5 = 0x1000; do { uVar8 = 0x20; do { uVar6 = 2; do { uVar7 = (uint)uVar8; if (((uint)(uVar5 / uVar8) & uVar6 - 1) == 0) { /* try { // try from 001026d2 to 001026e1 has its CatchHandler @ 0010284c */ simulateCache((ofstream *)&local_230,uVar5,uVar7,uVar6); } bVar9 = uVar6 < 0x11; uVar6 = uVar6 * 2; } while (bVar9); uVar8 = (ulong)(uVar7 * 2); } while (uVar7 < 0x81); bVar9 = uVar5 < 0x40001; uVar5 = uVar5 * 4; } while (bVar9); /* try { // try from 00102717 to 00102725 has its CatchHandler @ 00102817 */ std::__cxx11::string::string((string *)local_250,traceFilePath,&local_271); /* try { // try from 00102726 to 00102736 has its CatchHandler @ 001027fe */ plVar3 = (long *)std::__cxx11::string::append((char *)local_250); plVar4 = plVar3 + 2; if ((long *)*plVar3 == plVar4) { local_260 = *plVar4; uStack_258 = (int4)plVar3[3]; uStack_254 = *(int4 *)((long)plVar3 + 0x1c); local_270 = &local_260; } else { local_260 = *plVar4; local_270 = (long *)*plVar3; } local_268 = plVar3[1]; *plVar3 = (long)plVar4; plVar3[1] = 0; *(int1 *)(plVar3 + 2) = 0; printf("Result has been written to %s\n",local_270); if (local_270 != &local_260) { operator_delete(local_270); } if (local_250[0] != local_240) { operator_delete(local_250[0]); } /* try { // try from 001027ae to 001027b7 has its CatchHandler @ 0010284a */ std::ofstream::close(); local_230 = *(long *)PTR_VTT_00107fd0; *(int8 *)(local_228 + *(long *)(local_230 + -0x18) + -8) = *(int8 *)(PTR_VTT_00107fd0 + 0x18); std::filebuf::~filebuf(local_228); std::ios_base::~ios_base(local_138); uVar2 = 0; } return uVar2; }