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
7,900
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::skip_bom()
monkey531[P]llama/common/./json.hpp
bool skip_bom() { if (get() == 0xEF) { // check if we completely parse the BOM return get() == 0xBB && get() == 0xBF; } // the first character is not the beginning of the BOM; unget it to // process is later unget(); return true; }
O0
cpp
nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*, std::vector<char, std::allocator<char>>>>>::skip_bom(): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq 0x18(%rsp), %rdi movq %rdi, 0x10(%rsp) callq 0x205410 cmpl $0xef, %eax jne 0x20415b movq 0x10(%rsp), %rdi callq 0x205410 movl %eax, %ecx xorl %eax, %eax cmpl $0xbb, %ecx movb %al, 0xf(%rsp) jne 0x20414f movq 0x10(%rsp), %rdi callq 0x205410 cmpl $0xbf, %eax sete %al movb %al, 0xf(%rsp) movb 0xf(%rsp), %al andb $0x1, %al movb %al, 0x27(%rsp) jmp 0x20416a movq 0x10(%rsp), %rdi callq 0x2054f0 movb $0x1, 0x27(%rsp) movb 0x27(%rsp), %al andb $0x1, %al addq $0x28, %rsp retq nopw %cs:(%rax,%rax) nop
_ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE8skip_bomEv: sub rsp, 28h mov [rsp+28h+var_10], rdi mov rdi, [rsp+28h+var_10] mov [rsp+28h+var_18], rdi call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE3getEv; 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::vector<char>>>>::get(void) cmp eax, 0EFh jnz short loc_20415B mov rdi, [rsp+28h+var_18] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE3getEv; 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::vector<char>>>>::get(void) mov ecx, eax xor eax, eax cmp ecx, 0BBh mov [rsp+28h+var_19], al jnz short loc_20414F mov rdi, [rsp+28h+var_18] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE3getEv; 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::vector<char>>>>::get(void) cmp eax, 0BFh setz al mov [rsp+28h+var_19], al loc_20414F: mov al, [rsp+28h+var_19] and al, 1 mov [rsp+28h+var_1], al jmp short loc_20416A loc_20415B: mov rdi, [rsp+28h+var_18] call _ZN8nlohmann16json_abi_v3_11_36detail5lexerINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEENS1_22iterator_input_adapterIN9__gnu_cxx17__normal_iteratorIPKcS5_IcSA_EEEEEE5ungetEv; 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::vector<char>>>>::unget(void) mov [rsp+28h+var_1], 1 loc_20416A: mov al, [rsp+28h+var_1] and al, 1 add rsp, 28h retn
char nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::skip_bom( long long a1) { bool v2; // [rsp+Fh] [rbp-19h] if ( (unsigned int)((long long (*)(void))nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::get)() == 239 ) { v2 = 0; if ( (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::get(a1) == 187 ) return (unsigned int)nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::get(a1) == 191; return v2; } else { nlohmann::json_abi_v3_11_3::detail::lexer<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,nlohmann::json_abi_v3_11_3::detail::iterator_input_adapter<__gnu_cxx::__normal_iterator<char const*,std::vector<char>>>>::unget(a1); return 1; } }
_ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA16_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV qword ptr [RSP + 0x8],RSI MOV RDI,qword ptr [RSP + 0x10] MOV qword ptr [RSP],RDI MOV RSI,qword ptr [RSP + 0x8] CALL 0x002893a0 MOV RAX,qword ptr [RSP] MOV qword ptr [RAX + 0x10],0x0 ADD RSP,0x18 RET
void _ZN8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEC2IJRA16_KcETnNSt9enable_ifIXsr3std16is_constructibleISF_DpT_EE5valueEiE4typeELi0EEEDpOSM_ (long param_1,int8 param_2) { _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2IRA16_KcA16_cTnNSt9enable_ifIXaantsr6detail13is_basic_jsonIT0_EE5valuesr6detail18is_compatible_typeISD_SK_EE5valueEiE4typeELi0EEEOT_ (param_1,param_2); *(int8 *)(param_1 + 0x10) = 0; return; }
7,901
PVG_FT_Stroker_Rewind
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-ft-stroker.c
void PVG_FT_Stroker_Rewind(PVG_FT_Stroker stroker) { if (stroker) { ft_stroke_border_reset(&stroker->borders[0]); ft_stroke_border_reset(&stroker->borders[1]); } }
O3
c
PVG_FT_Stroker_Rewind: testq %rdi, %rdi je 0x3cc7d xorl %eax, %eax movl %eax, 0x70(%rdi) movl $0xffffffff, %ecx # imm = 0xFFFFFFFF movl %ecx, 0x8c(%rdi) movb %al, 0x90(%rdi) movl %eax, 0x98(%rdi) movl %ecx, 0xb4(%rdi) movb %al, 0xb8(%rdi) retq
PVG_FT_Stroker_Rewind: test rdi, rdi jz short locret_3CC7D xor eax, eax mov [rdi+70h], eax mov ecx, 0FFFFFFFFh mov [rdi+8Ch], ecx mov [rdi+90h], al mov [rdi+98h], eax mov [rdi+0B4h], ecx mov [rdi+0B8h], al locret_3CC7D: retn
long long PVG_FT_Stroker_Rewind(long long a1) { long long result; // rax if ( a1 ) { result = 0LL; *(_DWORD *)(a1 + 112) = 0; *(_DWORD *)(a1 + 140) = -1; *(_BYTE *)(a1 + 144) = 0; *(_DWORD *)(a1 + 152) = 0; *(_DWORD *)(a1 + 180) = -1; *(_BYTE *)(a1 + 184) = 0; } return result; }
PVG_FT_Stroker_Rewind: TEST RDI,RDI JZ 0x0013cc7d XOR EAX,EAX MOV dword ptr [RDI + 0x70],EAX MOV ECX,0xffffffff MOV dword ptr [RDI + 0x8c],ECX MOV byte ptr [RDI + 0x90],AL MOV dword ptr [RDI + 0x98],EAX MOV dword ptr [RDI + 0xb4],ECX MOV byte ptr [RDI + 0xb8],AL LAB_0013cc7d: RET
void PVG_FT_Stroker_Rewind(long param_1) { if (param_1 != 0) { *(int4 *)(param_1 + 0x70) = 0; *(int4 *)(param_1 + 0x8c) = 0xffffffff; *(int1 *)(param_1 + 0x90) = 0; *(int4 *)(param_1 + 0x98) = 0; *(int4 *)(param_1 + 0xb4) = 0xffffffff; *(int1 *)(param_1 + 0xb8) = 0; } return; }
7,902
my_wc_mb_bin
eloqsql/strings/ctype-bin.c
int my_wc_mb_bin(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { if (s >= e) return MY_CS_TOOSMALL; if (wc < 256) { s[0]= (char) wc; return 1; } return MY_CS_ILUNI; }
O3
c
my_wc_mb_bin: pushq %rbp movq %rsp, %rbp movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x4f23f xorl %eax, %eax cmpq $0xff, %rsi ja 0x4f23f movb %sil, (%rdx) movl $0x1, %eax popq %rbp retq
my_wc_mb_bin: push rbp mov rbp, rsp mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short loc_4F23F xor eax, eax cmp rsi, 0FFh ja short loc_4F23F mov [rdx], sil mov eax, 1 loc_4F23F: pop rbp retn
long long my_wc_mb_bin(long long a1, unsigned long long a2, _BYTE *a3, unsigned long long a4) { long long result; // rax result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { result = 0LL; if ( a2 <= 0xFF ) { *a3 = a2; return 1LL; } } return result; }
my_wc_mb_bin: PUSH RBP MOV RBP,RSP MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x0014f23f XOR EAX,EAX CMP RSI,0xff JA 0x0014f23f MOV byte ptr [RDX],SIL MOV EAX,0x1 LAB_0014f23f: POP RBP RET
int8 my_wc_mb_bin(int8 param_1,ulong param_2,int1 *param_3,int1 *param_4) { int8 uVar1; uVar1 = 0xffffff9b; if ((param_3 < param_4) && (uVar1 = 0, param_2 < 0x100)) { *param_3 = (char)param_2; uVar1 = 1; } return uVar1; }
7,903
ma_real_read
eloqsql/libmariadb/libmariadb/ma_net.c
static ulong ma_real_read(NET *net, size_t *complen) { uchar *pos; ssize_t length; uint i; ulong len=packet_error; size_t remain= (net->compress ? NET_HEADER_SIZE+COMP_HEADER_SIZE : NET_HEADER_SIZE); *complen = 0; net->reading_or_writing=1; pos = net->buff + net->where_b; /* net->packet -4 */ for (i=0 ; i < 2 ; i++) { while (remain > 0) { /* First read is done with non blocking mode */ if ((length=ma_pvio_cache_read(net->pvio, pos,remain)) <= 0L) { len= packet_error; net->error=2; /* Close socket */ goto end; } remain -= (ulong) length; pos+= (ulong) length; } if (i == 0) { /* First parts is packet length */ ulong helping; net->pkt_nr= net->buff[net->where_b + 3]; net->compress_pkt_nr= ++net->pkt_nr; #ifdef HAVE_COMPRESS if (net->compress) { /* complen is > 0 if package is really compressed */ *complen=uint3korr(&(net->buff[net->where_b + NET_HEADER_SIZE])); } #endif len=uint3korr(net->buff+net->where_b); if (!len) goto end; helping = max(len,(ulong)*complen) + net->where_b; /* The necessary size of net->buff */ if (helping >= net->max_packet) { if (net_realloc(net, helping)) { len= packet_error; /* Return error */ goto end; } } pos=net->buff + net->where_b; remain = len; } } end: net->reading_or_writing=0; return(len); }
O3
c
ma_real_read: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movl $0xffffffff, %r13d # imm = 0xFFFFFFFF xorl %eax, %eax cmpb $0x0, 0x84(%rdi) setne %al leaq (%rax,%rax,2), %r15 addq $0x4, %r15 movq %rsi, -0x30(%rbp) movq $0x0, (%rsi) movb $0x1, 0x80(%rdi) movq 0x8(%rdi), %r12 addq 0x48(%rdi), %r12 movb $0x1, %r14b movq (%rbx), %rdi movq %r12, %rsi movq %r15, %rdx callq 0x4101d testq %rax, %rax jle 0x55707 addq %rax, %r12 subq %rax, %r15 jne 0x55622 testb $0x1, %r14b je 0x55714 movq 0x8(%rbx), %rax movq 0x48(%rbx), %r12 movzbl 0x3(%rax,%r12), %ecx incl %ecx movl %ecx, 0x60(%rbx) movl %ecx, 0x64(%rbx) cmpb $0x0, 0x84(%rbx) je 0x5568b movzwl 0x4(%rax,%r12), %ecx movzbl 0x6(%rax,%r12), %eax shll $0x10, %eax orq %rcx, %rax movq -0x30(%rbp), %rcx movq %rax, (%rcx) movq 0x8(%rbx), %rax movq 0x48(%rbx), %r12 movzwl (%rax,%r12), %ecx movzbl 0x2(%rax,%r12), %r15d shll $0x10, %r15d orq %rcx, %r15 je 0x5572d movq -0x30(%rbp), %rcx movq (%rcx), %r14 cmpq %r14, %r15 cmovaq %r15, %r14 addq %r12, %r14 cmpq 0x50(%rbx), %r14 jb 0x556f9 cmpq %r14, 0x58(%rbx) jbe 0x55732 addq $0xfff, %r14 # imm = 0xFFF andq $-0x1000, %r14 # imm = 0xF000 leaq 0x7(%r14), %rsi movq %rax, %rdi callq 0x360b0 testq %rax, %rax je 0x55759 movq %rax, 0x18(%rbx) movq %rax, 0x8(%rbx) movq %r14, 0x50(%rbx) movq %rax, %rcx addq %r14, %rcx movq %rcx, 0x10(%rbx) movq 0x48(%rbx), %r12 addq %rax, %r12 xorl %r14d, %r14d movq %r15, %r13 jmp 0x55622 movb $0x2, 0x94(%rbx) movl $0xffffffff, %r13d # imm = 0xFFFFFFFF movb $0x0, 0x80(%rbx) movq %r13, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq xorl %r13d, %r13d jmp 0x55714 movb $0x1, 0x94(%rbx) movq (%rbx), %r8 movq 0x40(%r8), %rdi leaq 0x2e4669(%rip), %rax # 0x339db0 movq (%rax), %rdx movl $0x7e4, %esi # imm = 0x7E4 xorl %ecx, %ecx xorl %eax, %eax callq *0x50(%r8) jmp 0x5570e movb $0x1, 0x94(%rbx) jmp 0x5570e
ma_real_read: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov rbx, rdi mov r13d, 0FFFFFFFFh xor eax, eax cmp byte ptr [rdi+84h], 0 setnz al lea r15, [rax+rax*2] add r15, 4 mov [rbp+var_30], rsi mov qword ptr [rsi], 0 mov byte ptr [rdi+80h], 1 mov r12, [rdi+8] add r12, [rdi+48h] mov r14b, 1 loc_55622: mov rdi, [rbx] mov rsi, r12 mov rdx, r15 call ma_pvio_cache_read test rax, rax jle loc_55707 add r12, rax sub r15, rax jnz short loc_55622 test r14b, 1 jz loc_55714 mov rax, [rbx+8] mov r12, [rbx+48h] movzx ecx, byte ptr [rax+r12+3] inc ecx mov [rbx+60h], ecx mov [rbx+64h], ecx cmp byte ptr [rbx+84h], 0 jz short loc_5568B movzx ecx, word ptr [rax+r12+4] movzx eax, byte ptr [rax+r12+6] shl eax, 10h or rax, rcx mov rcx, [rbp+var_30] mov [rcx], rax mov rax, [rbx+8] mov r12, [rbx+48h] loc_5568B: movzx ecx, word ptr [rax+r12] movzx r15d, byte ptr [rax+r12+2] shl r15d, 10h or r15, rcx jz loc_5572D mov rcx, [rbp+var_30] mov r14, [rcx] cmp r15, r14 cmova r14, r15 add r14, r12 cmp r14, [rbx+50h] jb short loc_556F9 cmp [rbx+58h], r14 jbe short loc_55732 add r14, 0FFFh and r14, 0FFFFFFFFFFFFF000h lea rsi, [r14+7] mov rdi, rax call _realloc test rax, rax jz short loc_55759 mov [rbx+18h], rax mov [rbx+8], rax mov [rbx+50h], r14 mov rcx, rax add rcx, r14 mov [rbx+10h], rcx mov r12, [rbx+48h] loc_556F9: add r12, rax xor r14d, r14d mov r13, r15 jmp loc_55622 loc_55707: mov byte ptr [rbx+94h], 2 loc_5570E: mov r13d, 0FFFFFFFFh loc_55714: mov byte ptr [rbx+80h], 0 mov rax, r13 add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_5572D: xor r13d, r13d jmp short loc_55714 loc_55732: mov byte ptr [rbx+94h], 1 mov r8, [rbx] mov rdi, [r8+40h] lea rax, SQLSTATE_UNKNOWN mov rdx, [rax] mov esi, 7E4h xor ecx, ecx xor eax, eax call qword ptr [r8+50h] jmp short loc_5570E loc_55759: mov byte ptr [rbx+94h], 1 jmp short loc_5570E
long long ma_real_read(long long a1, unsigned long long *a2) { long long v2; // r13 unsigned long long v3; // r15 long long v4; // r12 char i; // r14 long long v6; // rax long long v7; // rax long long v8; // r12 int v9; // ecx unsigned long long v10; // r14 unsigned long long v11; // r14 unsigned long long v12; // r14 v2 = 0xFFFFFFFFLL; v3 = 3LL * (*(_BYTE *)(a1 + 132) != 0) + 4; *a2 = 0LL; *(_BYTE *)(a1 + 128) = 1; v4 = *(_QWORD *)(a1 + 72) + *(_QWORD *)(a1 + 8); for ( i = 1; ; i = 0 ) { do { v6 = ma_pvio_cache_read(*(_QWORD **)a1, v4, v3); if ( v6 <= 0 ) { *(_BYTE *)(a1 + 148) = 2; goto LABEL_16; } v4 += v6; v3 -= v6; } while ( v3 ); if ( (i & 1) == 0 ) goto LABEL_17; v7 = *(_QWORD *)(a1 + 8); v8 = *(_QWORD *)(a1 + 72); v9 = *(unsigned __int8 *)(v7 + v8 + 3) + 1; *(_DWORD *)(a1 + 96) = v9; *(_DWORD *)(a1 + 100) = v9; if ( *(_BYTE *)(a1 + 132) ) { *a2 = *(unsigned __int16 *)(v7 + v8 + 4) | (unsigned long long)(*(unsigned __int8 *)(v7 + v8 + 6) << 16); v7 = *(_QWORD *)(a1 + 8); v8 = *(_QWORD *)(a1 + 72); } v3 = *(unsigned __int16 *)(v7 + v8) | (unsigned long long)(*(unsigned __int8 *)(v7 + v8 + 2) << 16); if ( !v3 ) break; v10 = *a2; if ( v3 > *a2 ) v10 = *(unsigned __int16 *)(v7 + v8) | (unsigned long long)(*(unsigned __int8 *)(v7 + v8 + 2) << 16); v11 = v8 + v10; if ( v11 >= *(_QWORD *)(a1 + 80) ) { if ( *(_QWORD *)(a1 + 88) <= v11 ) { *(_BYTE *)(a1 + 148) = 1; (*(void ( **)(_QWORD, long long, char *, _QWORD))(*(_QWORD *)a1 + 80LL))( *(_QWORD *)(*(_QWORD *)a1 + 64LL), 2020LL, SQLSTATE_UNKNOWN, 0LL); } else { v12 = (v11 + 4095) & 0xFFFFFFFFFFFFF000LL; v7 = realloc(v7, v12 + 7); if ( v7 ) { *(_QWORD *)(a1 + 24) = v7; *(_QWORD *)(a1 + 8) = v7; *(_QWORD *)(a1 + 80) = v12; *(_QWORD *)(a1 + 16) = v12 + v7; v8 = *(_QWORD *)(a1 + 72); goto LABEL_14; } *(_BYTE *)(a1 + 148) = 1; } LABEL_16: v2 = 0xFFFFFFFFLL; goto LABEL_17; } LABEL_14: v4 = v7 + v8; v2 = v3; } v2 = 0LL; LABEL_17: *(_BYTE *)(a1 + 128) = 0; return v2; }
ma_real_read: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV R13D,0xffffffff XOR EAX,EAX CMP byte ptr [RDI + 0x84],0x0 SETNZ AL LEA R15,[RAX + RAX*0x2] ADD R15,0x4 MOV qword ptr [RBP + -0x30],RSI MOV qword ptr [RSI],0x0 MOV byte ptr [RDI + 0x80],0x1 MOV R12,qword ptr [RDI + 0x8] ADD R12,qword ptr [RDI + 0x48] MOV R14B,0x1 LAB_00155622: MOV RDI,qword ptr [RBX] MOV RSI,R12 MOV RDX,R15 CALL 0x0014101d TEST RAX,RAX JLE 0x00155707 ADD R12,RAX SUB R15,RAX JNZ 0x00155622 TEST R14B,0x1 JZ 0x00155714 MOV RAX,qword ptr [RBX + 0x8] MOV R12,qword ptr [RBX + 0x48] MOVZX ECX,byte ptr [RAX + R12*0x1 + 0x3] INC ECX MOV dword ptr [RBX + 0x60],ECX MOV dword ptr [RBX + 0x64],ECX CMP byte ptr [RBX + 0x84],0x0 JZ 0x0015568b MOVZX ECX,word ptr [RAX + R12*0x1 + 0x4] MOVZX EAX,byte ptr [RAX + R12*0x1 + 0x6] SHL EAX,0x10 OR RAX,RCX MOV RCX,qword ptr [RBP + -0x30] MOV qword ptr [RCX],RAX MOV RAX,qword ptr [RBX + 0x8] MOV R12,qword ptr [RBX + 0x48] LAB_0015568b: MOVZX ECX,word ptr [RAX + R12*0x1] MOVZX R15D,byte ptr [RAX + R12*0x1 + 0x2] SHL R15D,0x10 OR R15,RCX JZ 0x0015572d MOV RCX,qword ptr [RBP + -0x30] MOV R14,qword ptr [RCX] CMP R15,R14 CMOVA R14,R15 ADD R14,R12 CMP R14,qword ptr [RBX + 0x50] JC 0x001556f9 CMP qword ptr [RBX + 0x58],R14 JBE 0x00155732 ADD R14,0xfff AND R14,-0x1000 LEA RSI,[R14 + 0x7] MOV RDI,RAX CALL 0x001360b0 TEST RAX,RAX JZ 0x00155759 MOV qword ptr [RBX + 0x18],RAX MOV qword ptr [RBX + 0x8],RAX MOV qword ptr [RBX + 0x50],R14 MOV RCX,RAX ADD RCX,R14 MOV qword ptr [RBX + 0x10],RCX MOV R12,qword ptr [RBX + 0x48] LAB_001556f9: ADD R12,RAX XOR R14D,R14D MOV R13,R15 JMP 0x00155622 LAB_00155707: MOV byte ptr [RBX + 0x94],0x2 LAB_0015570e: MOV R13D,0xffffffff LAB_00155714: MOV byte ptr [RBX + 0x80],0x0 MOV RAX,R13 ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0015572d: XOR R13D,R13D JMP 0x00155714 LAB_00155732: MOV byte ptr [RBX + 0x94],0x1 MOV R8,qword ptr [RBX] MOV RDI,qword ptr [R8 + 0x40] LEA RAX,[0x439db0] MOV RDX,qword ptr [RAX] MOV ESI,0x7e4 XOR ECX,ECX XOR EAX,EAX CALL qword ptr [R8 + 0x50] JMP 0x0015570e LAB_00155759: MOV byte ptr [RBX + 0x94],0x1 JMP 0x0015570e
ulong ma_real_read(long *param_1,ulong *param_2) { char cVar1; long lVar2; void *__ptr; int iVar3; long lVar4; ulong uVar5; bool bVar6; ulong uVar7; uVar5 = 0xffffffff; cVar1 = *(char *)((long)param_1 + 0x84); *param_2 = 0; *(int1 *)(param_1 + 0x10) = 1; lVar4 = param_1[1] + param_1[9]; bVar6 = true; uVar7 = (ulong)(cVar1 != '\0') * 3 + 4; do { do { lVar2 = ma_pvio_cache_read(*param_1,lVar4,uVar7); if (lVar2 < 1) { *(int1 *)((long)param_1 + 0x94) = 2; LAB_0015570e: uVar5 = 0xffffffff; LAB_00155714: *(int1 *)(param_1 + 0x10) = 0; return uVar5; } lVar4 = lVar4 + lVar2; uVar7 = uVar7 - lVar2; } while (uVar7 != 0); if (!bVar6) goto LAB_00155714; __ptr = (void *)param_1[1]; lVar4 = param_1[9]; iVar3 = *(byte *)((long)__ptr + lVar4 + 3) + 1; *(int *)(param_1 + 0xc) = iVar3; *(int *)((long)param_1 + 100) = iVar3; if (*(char *)((long)param_1 + 0x84) != '\0') { *param_2 = (ulong)CONCAT12(*(int1 *)((long)__ptr + lVar4 + 6), *(int2 *)((long)__ptr + lVar4 + 4)); __ptr = (void *)param_1[1]; lVar4 = param_1[9]; } uVar5 = (ulong)CONCAT12(*(int1 *)((long)__ptr + lVar4 + 2), *(int2 *)((long)__ptr + lVar4)); if (uVar5 == 0) { uVar5 = 0; goto LAB_00155714; } uVar7 = *param_2; if (*param_2 < uVar5) { uVar7 = uVar5; } uVar7 = uVar7 + lVar4; if ((ulong)param_1[10] <= uVar7) { if ((ulong)param_1[0xb] <= uVar7) { *(int1 *)((long)param_1 + 0x94) = 1; (**(code **)(*param_1 + 0x50))(*(int8 *)(*param_1 + 0x40),0x7e4,SQLSTATE_UNKNOWN,0); goto LAB_0015570e; } uVar7 = uVar7 + 0xfff & 0xfffffffffffff000; __ptr = realloc(__ptr,uVar7 + 7); if (__ptr == (void *)0x0) { *(int1 *)((long)param_1 + 0x94) = 1; goto LAB_0015570e; } param_1[3] = (long)__ptr; param_1[1] = (long)__ptr; param_1[10] = uVar7; param_1[2] = (long)__ptr + uVar7; lVar4 = param_1[9]; } lVar4 = lVar4 + (long)__ptr; bVar6 = false; uVar7 = uVar5; } while( true ); }
7,904
mi_ft_segiterator_dummy_init
eloqsql/storage/myisam/ft_update.c
void _mi_ft_segiterator_dummy_init(const uchar *record, uint len, FT_SEG_ITERATOR *ftsi) { DBUG_ENTER("_mi_ft_segiterator_dummy_init"); ftsi->num=1; ftsi->seg=0; ftsi->pos=record; ftsi->len=len; DBUG_VOID_RETURN; }
O0
c
mi_ft_segiterator_dummy_init: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq -0x18(%rbp), %rax movl $0x1, (%rax) movq -0x18(%rbp), %rax movq $0x0, 0x8(%rax) movq -0x8(%rbp), %rcx movq -0x18(%rbp), %rax movq %rcx, 0x18(%rax) movl -0xc(%rbp), %ecx movq -0x18(%rbp), %rax movl %ecx, 0x4(%rax) jmp 0xa24cd popq %rbp retq nop
_mi_ft_segiterator_dummy_init: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov rax, [rbp+var_18] mov dword ptr [rax], 1 mov rax, [rbp+var_18] mov qword ptr [rax+8], 0 mov rcx, [rbp+var_8] mov rax, [rbp+var_18] mov [rax+18h], rcx mov ecx, [rbp+var_C] mov rax, [rbp+var_18] mov [rax+4], ecx jmp short $+2 loc_A24CD: pop rbp retn
long long mi_ft_segiterator_dummy_init(long long a1, int a2, long long a3) { long long result; // rax *(_DWORD *)a3 = 1; *(_QWORD *)(a3 + 8) = 0LL; *(_QWORD *)(a3 + 24) = a1; result = a3; *(_DWORD *)(a3 + 4) = a2; return result; }
_mi_ft_segiterator_dummy_init: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x1 MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x8],0x0 MOV RCX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RAX + 0x18],RCX MOV ECX,dword ptr [RBP + -0xc] MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX + 0x4],ECX JMP 0x001a24cd LAB_001a24cd: POP RBP RET
void _mi_ft_segiterator_dummy_init(int8 param_1,int4 param_2,int4 *param_3) { *param_3 = 1; *(int8 *)(param_3 + 2) = 0; *(int8 *)(param_3 + 6) = param_1; param_3[1] = param_2; return; }
7,905
stbi_load_from_file_16
monkey531[P]llama/examples/llava/../../common/stb_image.h
STBIDEF stbi__uint16 *stbi_load_from_file_16(FILE *f, int *x, int *y, int *comp, int req_comp) { stbi__uint16 *result; stbi__context s; stbi__start_file(&s,f); result = stbi__load_and_postprocess_16bit(&s,x,y,comp,req_comp); if (result) { // need to 'unget' all the characters in the IO buffer fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); } return result; }
O1
c
stbi_load_from_file_16: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movl %r8d, %ebp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq 0x12df1d(%rip), %rax # 0x156d20 leaq 0x40(%rsp), %rcx movq %rax, -0x18(%rcx) movups 0x12defd(%rip), %xmm0 # 0x156d10 movups %xmm0, -0x28(%rcx) movq %rdi, -0x10(%rcx) movabsq $0x8000000001, %rax # imm = 0x8000000001 movq %rax, -0x8(%rcx) movl $0x0, 0x80(%rcx) movq %rcx, 0x98(%rcx) movq %rcx, 0x88(%rcx) leaq 0x8(%rsp), %r13 movq %r13, %rdi callq 0x3c9f9 movq 0xc8(%r13), %rax movq %rax, 0xd8(%r13) movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx movl %ebp, %r8d callq 0x28eab movq %rax, %r14 testq %rax, %rax je 0x28e96 movl 0xc8(%rsp), %eax subl 0xd0(%rsp), %eax movslq %eax, %rsi movq %rbx, %rdi movl $0x1, %edx callq 0x1dda0 movq %r14, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
stbi_load_from_file_16: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov ebp, r8d mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi mov rax, cs:off_156D20 lea rcx, [rsp+118h+var_D8] mov [rcx-18h], rax movups xmm0, xmmword ptr cs:_ZL21stbi__stdio_callbacks; stbi__stdio_callbacks movups xmmword ptr [rcx-28h], xmm0 mov [rcx-10h], rdi mov rax, 8000000001h mov [rcx-8], rax mov dword ptr [rcx+80h], 0 mov [rcx+98h], rcx mov [rcx+88h], rcx lea r13, [rsp+118h+var_110] mov rdi, r13 call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [r13+0C8h] mov [r13+0D8h], rax mov rdi, r13 mov rsi, r12 mov rdx, r15 mov rcx, r14 mov r8d, ebp call _ZL32stbi__load_and_postprocess_16bitP13stbi__contextPiS1_S1_i; stbi__load_and_postprocess_16bit(stbi__context *,int *,int *,int *,int) mov r14, rax test rax, rax jz short loc_28E96 mov eax, [rsp+118h+var_50] sub eax, [rsp+118h+var_48] movsxd rsi, eax mov rdi, rbx mov edx, 1 call _fseek loc_28E96: mov rax, r14 add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long stbi_load_from_file_16(long long a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v8; // r14 _BYTE v10[16]; // [rsp+8h] [rbp-110h] BYREF __int128 v11; // [rsp+18h] [rbp-100h] long long ( *v12)(void *); // [rsp+28h] [rbp-F0h] long long v13; // [rsp+30h] [rbp-E8h] long long v14; // [rsp+38h] [rbp-E0h] _BYTE v15[128]; // [rsp+40h] [rbp-D8h] BYREF int v16; // [rsp+C0h] [rbp-58h] _BYTE *v17; // [rsp+C8h] [rbp-50h] long long v18; // [rsp+D0h] [rbp-48h] _BYTE *v19; // [rsp+D8h] [rbp-40h] long long v20; // [rsp+E0h] [rbp-38h] v12 = stbi__stdio_eof; v11 = *(_OWORD *)&stbi__stdio_callbacks; v13 = a1; v14 = 0x8000000001LL; v16 = 0; v19 = v15; v17 = v15; stbi__refill_buffer(v10); v20 = v18; v8 = stbi__load_and_postprocess_16bit(v10, a2, a3, a4, a5); if ( v8 ) fseek(a1, (int)v17 - (int)v18, 1LL); return v8; }
stbi_load_from_file_16: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV EBP,R8D MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV RAX,qword ptr [0x00256d20] LEA RCX,[RSP + 0x40] MOV qword ptr [RCX + -0x18],RAX MOVUPS XMM0,xmmword ptr [0x00256d10] MOVUPS xmmword ptr [RCX + -0x28],XMM0 MOV qword ptr [RCX + -0x10],RDI MOV RAX,0x8000000001 MOV qword ptr [RCX + -0x8],RAX MOV dword ptr [RCX + 0x80],0x0 MOV qword ptr [RCX + 0x98],RCX MOV qword ptr [RCX + 0x88],RCX LEA R13,[RSP + 0x8] MOV RDI,R13 CALL 0x0013c9f9 MOV RAX,qword ptr [R13 + 0xc8] MOV qword ptr [R13 + 0xd8],RAX MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 MOV R8D,EBP CALL 0x00128eab MOV R14,RAX TEST RAX,RAX JZ 0x00128e96 MOV EAX,dword ptr [RSP + 0xc8] SUB EAX,dword ptr [RSP + 0xd0] MOVSXD RSI,EAX MOV RDI,RBX MOV EDX,0x1 CALL 0x0011dda0 LAB_00128e96: MOV RAX,R14 ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long stbi_load_from_file_16(FILE *param_1,int *param_2,int *param_3,int *param_4,int param_5) { long lVar1; stbi__context local_110 [40]; FILE *local_e8; int8 local_e0; int1 local_d8 [128]; int4 local_58; int1 *local_50; int local_48; int1 *local_40; local_50 = local_d8; local_110._32_8_ = stbi__stdio_callbacks._16_8_; local_110._16_8_ = stbi__stdio_callbacks._0_8_; local_110._24_8_ = stbi__stdio_callbacks._8_8_; local_e0 = 0x8000000001; local_58 = 0; local_e8 = param_1; local_40 = local_50; stbi__refill_buffer(local_110); lVar1 = stbi__load_and_postprocess_16bit(local_110,param_2,param_3,param_4,param_5); if (lVar1 != 0) { fseek(param_1,(long)((int)local_50 - local_48),1); } return lVar1; }
7,906
stbi_load_from_file_16
monkey531[P]llama/examples/llava/../../common/stb_image.h
STBIDEF stbi__uint16 *stbi_load_from_file_16(FILE *f, int *x, int *y, int *comp, int req_comp) { stbi__uint16 *result; stbi__context s; stbi__start_file(&s,f); result = stbi__load_and_postprocess_16bit(&s,x,y,comp,req_comp); if (result) { // need to 'unget' all the characters in the IO buffer fseek(f, - (int) (s.img_buffer_end - s.img_buffer), SEEK_CUR); } return result; }
O3
c
stbi_load_from_file_16: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xe8, %rsp movl %r8d, %ebp movq %rcx, %r14 movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %rbx movq 0x12b01a(%rip), %rax # 0x153d60 leaq 0x40(%rsp), %rcx movq %rax, -0x18(%rcx) movups 0x12affa(%rip), %xmm0 # 0x153d50 movups %xmm0, -0x28(%rcx) movq %rdi, -0x10(%rcx) movabsq $0x8000000001, %rax # imm = 0x8000000001 movq %rax, -0x8(%rcx) movl $0x0, 0x80(%rcx) movq %rcx, 0x98(%rcx) movq %rcx, 0x88(%rcx) leaq 0x8(%rsp), %r13 movq %r13, %rdi callq 0x3c5ff movq 0xc8(%r13), %rax movq %rax, 0xd8(%r13) movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx movq %r14, %rcx movl %ebp, %r8d callq 0x28dee movq %rax, %r14 testq %rax, %rax je 0x28dd9 movl 0xc8(%rsp), %eax subl 0xd0(%rsp), %eax movslq %eax, %rsi movq %rbx, %rdi movl $0x1, %edx callq 0x1ddb0 movq %r14, %rax addq $0xe8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
stbi_load_from_file_16: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0E8h mov ebp, r8d mov r14, rcx mov r15, rdx mov r12, rsi mov rbx, rdi mov rax, cs:off_153D60 lea rcx, [rsp+118h+var_D8] mov [rcx-18h], rax movups xmm0, xmmword ptr cs:_ZL21stbi__stdio_callbacks; stbi__stdio_callbacks movups xmmword ptr [rcx-28h], xmm0 mov [rcx-10h], rdi mov rax, 8000000001h mov [rcx-8], rax mov dword ptr [rcx+80h], 0 mov [rcx+98h], rcx mov [rcx+88h], rcx lea r13, [rsp+118h+var_110] mov rdi, r13 call _ZL19stbi__refill_bufferP13stbi__context; stbi__refill_buffer(stbi__context *) mov rax, [r13+0C8h] mov [r13+0D8h], rax mov rdi, r13 mov rsi, r12 mov rdx, r15 mov rcx, r14 mov r8d, ebp call _ZL32stbi__load_and_postprocess_16bitP13stbi__contextPiS1_S1_i; stbi__load_and_postprocess_16bit(stbi__context *,int *,int *,int *,int) mov r14, rax test rax, rax jz short loc_28DD9 mov eax, [rsp+118h+var_50] sub eax, [rsp+118h+var_48] movsxd rsi, eax mov rdi, rbx mov edx, 1 call _fseek loc_28DD9: mov rax, r14 add rsp, 0E8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long stbi_load_from_file_16(long long a1, long long a2, long long a3, long long a4, unsigned int a5) { long long v8; // r14 _BYTE v10[16]; // [rsp+8h] [rbp-110h] BYREF __int128 v11; // [rsp+18h] [rbp-100h] long long ( *v12)(void *); // [rsp+28h] [rbp-F0h] long long v13; // [rsp+30h] [rbp-E8h] long long v14; // [rsp+38h] [rbp-E0h] _BYTE v15[128]; // [rsp+40h] [rbp-D8h] BYREF int v16; // [rsp+C0h] [rbp-58h] _BYTE *v17; // [rsp+C8h] [rbp-50h] long long v18; // [rsp+D0h] [rbp-48h] _BYTE *v19; // [rsp+D8h] [rbp-40h] long long v20; // [rsp+E0h] [rbp-38h] v12 = stbi__stdio_eof; v11 = *(_OWORD *)&stbi__stdio_callbacks; v13 = a1; v14 = 0x8000000001LL; v16 = 0; v19 = v15; v17 = v15; stbi__refill_buffer(v10); v20 = v18; v8 = stbi__load_and_postprocess_16bit(v10, a2, a3, a4, a5); if ( v8 ) fseek(a1, (int)v17 - (int)v18, 1LL); return v8; }
stbi_load_from_file_16: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xe8 MOV EBP,R8D MOV R14,RCX MOV R15,RDX MOV R12,RSI MOV RBX,RDI MOV RAX,qword ptr [0x00253d60] LEA RCX,[RSP + 0x40] MOV qword ptr [RCX + -0x18],RAX MOVUPS XMM0,xmmword ptr [0x00253d50] MOVUPS xmmword ptr [RCX + -0x28],XMM0 MOV qword ptr [RCX + -0x10],RDI MOV RAX,0x8000000001 MOV qword ptr [RCX + -0x8],RAX MOV dword ptr [RCX + 0x80],0x0 MOV qword ptr [RCX + 0x98],RCX MOV qword ptr [RCX + 0x88],RCX LEA R13,[RSP + 0x8] MOV RDI,R13 CALL 0x0013c5ff MOV RAX,qword ptr [R13 + 0xc8] MOV qword ptr [R13 + 0xd8],RAX MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 MOV RCX,R14 MOV R8D,EBP CALL 0x00128dee MOV R14,RAX TEST RAX,RAX JZ 0x00128dd9 MOV EAX,dword ptr [RSP + 0xc8] SUB EAX,dword ptr [RSP + 0xd0] MOVSXD RSI,EAX MOV RDI,RBX MOV EDX,0x1 CALL 0x0011ddb0 LAB_00128dd9: MOV RAX,R14 ADD RSP,0xe8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long stbi_load_from_file_16(FILE *param_1,int *param_2,int *param_3,int *param_4,int param_5) { long lVar1; stbi__context local_110 [40]; FILE *local_e8; int8 local_e0; int1 local_d8 [128]; int4 local_58; int1 *local_50; int local_48; int1 *local_40; local_50 = local_d8; local_110._32_8_ = stbi__stdio_callbacks._16_8_; local_110._16_8_ = stbi__stdio_callbacks._0_8_; local_110._24_8_ = stbi__stdio_callbacks._8_8_; local_e0 = 0x8000000001; local_58 = 0; local_e8 = param_1; local_40 = local_50; stbi__refill_buffer(local_110); lVar1 = stbi__load_and_postprocess_16bit(local_110,param_2,param_3,param_4,param_5); if (lVar1 != 0) { fseek(param_1,(long)((int)local_50 - local_48),1); } return lVar1; }
7,907
js_dataview_get_byteOffset
bluesky950520[P]quickjs/quickjs.c
static JSValue js_dataview_get_byteOffset(JSContext *ctx, JSValue this_val) { JSTypedArray *ta; JSObject *p; p = get_dataview(ctx, this_val); if (!p) return JS_EXCEPTION; if (dataview_is_oob(p)) return JS_ThrowTypeErrorArrayBufferOOB(ctx); ta = p->u.typed_array; return js_uint32(ta->offset); }
O2
c
js_dataview_get_byteOffset: pushq %r15 pushq %r14 pushq %rbx movq %rdi, %r14 callq 0x6ecea pushq $0x6 popq %rbx testq %rax, %rax je 0x6e845 movq %rax, %r15 movq %rax, %rdi callq 0x6ed0f testl %eax, %eax je 0x6e84b movq %r14, %rdi callq 0x3289b xorl %eax, %eax xorl %ecx, %ecx jmp 0x6e87e movq 0x30(%r15), %rax movslq 0x20(%rax), %rax xorl %ecx, %ecx movl %eax, %edx cvtsi2sd %rdx, %xmm0 testq %rax, %rax movq %xmm0, %rdx cmovnsq %rax, %rdx pushq $0x7 popq %rbx cmovnsq %rcx, %rbx movabsq $0x7fffffff00000000, %rcx # imm = 0x7FFFFFFF00000000 andq %rdx, %rcx movl %edx, %eax orq %rcx, %rax movq %rbx, %rdx popq %rbx popq %r14 popq %r15 retq
js_dataview_get_byteOffset: push r15 push r14 push rbx mov r14, rdi call get_dataview push 6 pop rbx test rax, rax jz short loc_6E845 mov r15, rax mov rdi, rax call dataview_is_oob test eax, eax jz short loc_6E84B mov rdi, r14 call JS_ThrowTypeErrorArrayBufferOOB loc_6E845: xor eax, eax xor ecx, ecx jmp short loc_6E87E loc_6E84B: mov rax, [r15+30h] movsxd rax, dword ptr [rax+20h] xor ecx, ecx mov edx, eax cvtsi2sd xmm0, rdx test rax, rax movq rdx, xmm0 cmovns rdx, rax push 7 pop rbx cmovns rbx, rcx mov rcx, 7FFFFFFF00000000h and rcx, rdx mov eax, edx loc_6E87E: or rax, rcx mov rdx, rbx pop rbx pop r14 pop r15 retn
long long js_dataview_get_byteOffset( long long a1, long long a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, double a7, double a8, __m128 a9, __m128 a10) { long long dataview; // rax long long v11; // r15 long long v12; // rdx long long v13; // rcx long long v14; // r8 long long v15; // r9 __m128 v16; // xmm4 __m128 v17; // xmm5 long long v18; // rax long long v19; // rcx double v20; // rdx char v22; // [rsp+0h] [rbp-18h] dataview = get_dataview(a1); if ( !dataview ) goto LABEL_4; v11 = dataview; if ( (unsigned int)dataview_is_oob(dataview) ) { JS_ThrowTypeErrorArrayBufferOOB(a1, a3, a4, a5, a6, v16, v17, a9, a10, a2, v12, v13, v14, v15, v22); LABEL_4: v18 = 0LL; v19 = 0LL; return v19 | v18; } v20 = (double)*(int *)(*(_QWORD *)(v11 + 48) + 32LL); if ( *(int *)(*(_QWORD *)(v11 + 48) + 32LL) >= 0LL ) *(_QWORD *)&v20 = *(int *)(*(_QWORD *)(v11 + 48) + 32LL); v19 = *(_QWORD *)&v20 & 0x7FFFFFFF00000000LL; v18 = LODWORD(v20); return v19 | v18; }
js_dataview_get_byteOffset: PUSH R15 PUSH R14 PUSH RBX MOV R14,RDI CALL 0x0016ecea PUSH 0x6 POP RBX TEST RAX,RAX JZ 0x0016e845 MOV R15,RAX MOV RDI,RAX CALL 0x0016ed0f TEST EAX,EAX JZ 0x0016e84b MOV RDI,R14 CALL 0x0013289b LAB_0016e845: XOR EAX,EAX XOR ECX,ECX JMP 0x0016e87e LAB_0016e84b: MOV RAX,qword ptr [R15 + 0x30] MOVSXD RAX,dword ptr [RAX + 0x20] XOR ECX,ECX MOV EDX,EAX CVTSI2SD XMM0,RDX TEST RAX,RAX MOVQ RDX,XMM0 CMOVNS RDX,RAX PUSH 0x7 POP RBX CMOVNS RBX,RCX MOV RCX,0x7fffffff00000000 AND RCX,RDX MOV EAX,EDX LAB_0016e87e: OR RAX,RCX MOV RDX,RBX POP RBX POP R14 POP R15 RET
int1 [16] js_dataview_get_byteOffset(int8 param_1) { uint uVar1; int iVar2; long lVar3; ulong uVar4; double dVar5; ulong uVar6; double dVar7; int8 uVar8; int1 auVar9 [16]; lVar3 = get_dataview(); uVar8 = 6; if (lVar3 != 0) { iVar2 = dataview_is_oob(lVar3); if (iVar2 == 0) { uVar1 = *(uint *)(*(long *)(lVar3 + 0x30) + 0x20); dVar5 = (double)(long)(int)uVar1; dVar7 = (double)uVar1; if (-1 < (long)dVar5) { dVar7 = dVar5; } uVar8 = 7; if (-1 < (long)dVar5) { uVar8 = 0; } uVar6 = (ulong)dVar7 & 0x7fffffff00000000; uVar4 = (ulong)dVar7 & 0xffffffff; goto LAB_0016e87e; } JS_ThrowTypeErrorArrayBufferOOB(param_1); } uVar4 = 0; uVar6 = 0; LAB_0016e87e: auVar9._0_8_ = uVar4 | uVar6; auVar9._8_8_ = uVar8; return auVar9; }
7,908
pcre2_callout_enumerate_8
eloqsql/build_O3/extra/pcre2/src/pcre2/src/pcre2_pattern_info.c
PCRE2_CALL_CONVENTION pcre2_callout_enumerate(const pcre2_code *code, int (*callback)(pcre2_callout_enumerate_block *, void *), void *callout_data) { pcre2_real_code *re = (pcre2_real_code *)code; pcre2_callout_enumerate_block cb; PCRE2_SPTR cc; #ifdef SUPPORT_UNICODE BOOL utf; #endif if (re == NULL) return PCRE2_ERROR_NULL; #ifdef SUPPORT_UNICODE utf = (re->overall_options & PCRE2_UTF) != 0; #endif /* Check that the first field in the block is the magic number. If it is not, return with PCRE2_ERROR_BADMAGIC. */ if (re->magic_number != MAGIC_NUMBER) return PCRE2_ERROR_BADMAGIC; /* Check that this pattern was compiled in the correct bit mode */ if ((re->flags & (PCRE2_CODE_UNIT_WIDTH/8)) == 0) return PCRE2_ERROR_BADMODE; cb.version = 0; cc = (PCRE2_SPTR)((uint8_t *)re + sizeof(pcre2_real_code)) + re->name_count * re->name_entry_size; while (TRUE) { int rc; switch (*cc) { case OP_END: return 0; case OP_CHAR: case OP_CHARI: case OP_NOT: case OP_NOTI: case OP_STAR: case OP_MINSTAR: case OP_PLUS: case OP_MINPLUS: case OP_QUERY: case OP_MINQUERY: case OP_UPTO: case OP_MINUPTO: case OP_EXACT: case OP_POSSTAR: case OP_POSPLUS: case OP_POSQUERY: case OP_POSUPTO: case OP_STARI: case OP_MINSTARI: case OP_PLUSI: case OP_MINPLUSI: case OP_QUERYI: case OP_MINQUERYI: case OP_UPTOI: case OP_MINUPTOI: case OP_EXACTI: case OP_POSSTARI: case OP_POSPLUSI: case OP_POSQUERYI: case OP_POSUPTOI: case OP_NOTSTAR: case OP_NOTMINSTAR: case OP_NOTPLUS: case OP_NOTMINPLUS: case OP_NOTQUERY: case OP_NOTMINQUERY: case OP_NOTUPTO: case OP_NOTMINUPTO: case OP_NOTEXACT: case OP_NOTPOSSTAR: case OP_NOTPOSPLUS: case OP_NOTPOSQUERY: case OP_NOTPOSUPTO: case OP_NOTSTARI: case OP_NOTMINSTARI: case OP_NOTPLUSI: case OP_NOTMINPLUSI: case OP_NOTQUERYI: case OP_NOTMINQUERYI: case OP_NOTUPTOI: case OP_NOTMINUPTOI: case OP_NOTEXACTI: case OP_NOTPOSSTARI: case OP_NOTPOSPLUSI: case OP_NOTPOSQUERYI: case OP_NOTPOSUPTOI: cc += PRIV(OP_lengths)[*cc]; #ifdef SUPPORT_UNICODE if (utf && HAS_EXTRALEN(cc[-1])) cc += GET_EXTRALEN(cc[-1]); #endif break; case OP_TYPESTAR: case OP_TYPEMINSTAR: case OP_TYPEPLUS: case OP_TYPEMINPLUS: case OP_TYPEQUERY: case OP_TYPEMINQUERY: case OP_TYPEUPTO: case OP_TYPEMINUPTO: case OP_TYPEEXACT: case OP_TYPEPOSSTAR: case OP_TYPEPOSPLUS: case OP_TYPEPOSQUERY: case OP_TYPEPOSUPTO: cc += PRIV(OP_lengths)[*cc]; #ifdef SUPPORT_UNICODE if (cc[-1] == OP_PROP || cc[-1] == OP_NOTPROP) cc += 2; #endif break; #if defined SUPPORT_UNICODE || PCRE2_CODE_UNIT_WIDTH != 8 case OP_XCLASS: cc += GET(cc, 1); break; #endif case OP_MARK: case OP_COMMIT_ARG: case OP_PRUNE_ARG: case OP_SKIP_ARG: case OP_THEN_ARG: cc += PRIV(OP_lengths)[*cc] + cc[1]; break; case OP_CALLOUT: cb.pattern_position = GET(cc, 1); cb.next_item_length = GET(cc, 1 + LINK_SIZE); cb.callout_number = cc[1 + 2*LINK_SIZE]; cb.callout_string_offset = 0; cb.callout_string_length = 0; cb.callout_string = NULL; rc = callback(&cb, callout_data); if (rc != 0) return rc; cc += PRIV(OP_lengths)[*cc]; break; case OP_CALLOUT_STR: cb.pattern_position = GET(cc, 1); cb.next_item_length = GET(cc, 1 + LINK_SIZE); cb.callout_number = 0; cb.callout_string_offset = GET(cc, 1 + 3*LINK_SIZE); cb.callout_string_length = GET(cc, 1 + 2*LINK_SIZE) - (1 + 4*LINK_SIZE) - 2; cb.callout_string = cc + (1 + 4*LINK_SIZE) + 1; rc = callback(&cb, callout_data); if (rc != 0) return rc; cc += GET(cc, 1 + 2*LINK_SIZE); break; default: cc += PRIV(OP_lengths)[*cc]; break; } } }
O3
c
pcre2_callout_enumerate_8: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, -0x38(%rbp) movq %rsi, -0x30(%rbp) testq %rdi, %rdi je 0xbded7 movl $0xffffffe1, %eax # imm = 0xFFFFFFE1 cmpl $0x50435245, 0x50(%rdi) # imm = 0x50435245 jne 0xbdedc movl $0xffffffe0, %eax # imm = 0xFFFFFFE0 testb $0x1, 0x60(%rdi) je 0xbdedc movl 0x58(%rdi), %r12d leaq -0x50(%rbp), %rax movl $0x0, -0x20(%rax) movzwl 0x86(%rdi), %eax movzwl 0x84(%rdi), %ecx imulq %rax, %rcx leaq (%rdi,%rcx), %rbx addq $0x88, %rbx leaq 0x5af0d(%rip), %r13 # 0x118c50 leaq 0x5b0e6(%rip), %r15 # 0x118e30 movl $0x155, %esi # imm = 0x155 leaq 0x5a856(%rip), %r14 # 0x1185ac movzbl (%rbx), %eax leal -0x1d(%rax), %ecx cmpl $0x38, %ecx jae 0xbdd8a movzbl (%r13,%rax), %eax addq %rax, %rbx btl $0x13, %r12d jae 0xbdd56 movzbl -0x1(%rbx), %eax cmpq $0xc0, %rax jb 0xbdd56 andl $0x3f, %eax movzbl (%r15,%rax), %eax addq %rax, %rbx jmp 0xbdd56 leal -0x55(%rax), %ecx cmpl $0x22, %ecx ja 0xbddb8 movslq (%r14,%rcx,4), %rcx addq %r14, %rcx jmpq *%rcx movzbl (%r13,%rax), %eax leaq (%rbx,%rax), %rcx movb -0x1(%rbx,%rax), %al addb $-0xf, %al xorl %edx, %edx cmpb $0x2, %al setb %dl leaq (%rcx,%rdx,2), %rbx jmp 0xbdd56 leal -0x99(%rax), %ecx cmpl $0x8, %ecx ja 0xbdec5 btl %ecx, %esi jae 0xbdec5 movzbl (%r13,%rax), %eax movzbl 0x1(%rbx), %ecx addq %rbx, %rcx addq %rax, %rcx movq %rcx, %rbx jmp 0xbdd56 movzwl 0x1(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movq %rax, -0x68(%rbp) movzwl 0x3(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movq %rax, -0x60(%rbp) movl $0x0, -0x58(%rbp) movzwl 0x7(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movq %rax, -0x50(%rbp) movzwl 0x5(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax addl $-0xb, %eax movq %rax, -0x48(%rbp) leaq 0xa(%rbx), %rax movq %rax, -0x40(%rbp) leaq -0x70(%rbp), %rdi movq -0x38(%rbp), %rsi callq *-0x30(%rbp) testl %eax, %eax jne 0xbdedc movzwl 0x5(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax jmp 0xbdeb8 movzwl 0x1(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax addq %rax, %rbx jmp 0xbdd56 movzwl 0x1(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movq %rax, -0x68(%rbp) movzwl 0x3(%rbx), %eax rolw $0x8, %ax movzwl %ax, %eax movq %rax, -0x60(%rbp) movzbl 0x5(%rbx), %eax movl %eax, -0x58(%rbp) leaq -0x50(%rbp), %rax xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) leaq -0x70(%rbp), %rdi movq -0x38(%rbp), %rsi callq *-0x30(%rbp) testl %eax, %eax jne 0xbdedc movzbl (%rbx), %eax movzbl (%r13,%rax), %eax addq %rax, %rbx movl $0x155, %esi # imm = 0x155 jmp 0xbdd56 testl %eax, %eax je 0xbdedc movzbl (%r13,%rax), %eax addq %rax, %rbx jmp 0xbdd56 movl $0xffffffcd, %eax # imm = 0xFFFFFFCD addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
pcre2_callout_enumerate_8: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rbp+var_38], rdx mov [rbp+var_30], rsi test rdi, rdi jz loc_BDED7 mov eax, 0FFFFFFE1h cmp dword ptr [rdi+50h], 50435245h jnz loc_BDEDC mov eax, 0FFFFFFE0h test byte ptr [rdi+60h], 1 jz loc_BDEDC mov r12d, [rdi+58h] lea rax, [rbp+var_50] mov dword ptr [rax-20h], 0 movzx eax, word ptr [rdi+86h] movzx ecx, word ptr [rdi+84h] imul rcx, rax lea rbx, [rdi+rcx] add rbx, 88h lea r13, _pcre2_OP_lengths_8 lea r15, _pcre2_utf8_table4 mov esi, 155h lea r14, jpt_BDD99 loc_BDD56: movzx eax, byte ptr [rbx] lea ecx, [rax-1Dh] cmp ecx, 38h ; '8' jnb short loc_BDD8A movzx eax, byte ptr [r13+rax+0] add rbx, rax bt r12d, 13h jnb short loc_BDD56 movzx eax, byte ptr [rbx-1] cmp rax, 0C0h jb short loc_BDD56 and eax, 3Fh movzx eax, byte ptr [r15+rax] add rbx, rax jmp short loc_BDD56 loc_BDD8A: lea ecx, [rax-55h]; switch 35 cases cmp ecx, 22h ja short def_BDD99; jumptable 00000000000BDD99 default case movsxd rcx, ds:(jpt_BDD99 - 1185ACh)[r14+rcx*4] add rcx, r14 jmp rcx; switch jump loc_BDD9B: movzx eax, byte ptr [r13+rax+0]; jumptable 00000000000BDD99 cases 85-97 lea rcx, [rbx+rax] mov al, [rbx+rax-1] add al, 0F1h xor edx, edx cmp al, 2 setb dl lea rbx, [rcx+rdx*2] jmp short loc_BDD56 def_BDD99: lea ecx, [rax-99h]; jumptable 00000000000BDD99 default case cmp ecx, 8 ja loc_BDEC5 bt esi, ecx jnb loc_BDEC5 movzx eax, byte ptr [r13+rax+0] movzx ecx, byte ptr [rbx+1] add rcx, rbx add rcx, rax mov rbx, rcx jmp loc_BDD56 loc_BDDE8: movzx eax, word ptr [rbx+1]; jumptable 00000000000BDD99 case 119 rol ax, 8 movzx eax, ax mov [rbp+var_68], rax movzx eax, word ptr [rbx+3] rol ax, 8 movzx eax, ax mov [rbp+var_60], rax mov [rbp+var_58], 0 movzx eax, word ptr [rbx+7] rol ax, 8 movzx eax, ax mov [rbp+var_50], rax movzx eax, word ptr [rbx+5] rol ax, 8 movzx eax, ax add eax, 0FFFFFFF5h mov [rbp+var_48], rax lea rax, [rbx+0Ah] mov [rbp+var_40], rax lea rdi, [rbp+var_70] mov rsi, [rbp+var_38] call [rbp+var_30] test eax, eax jnz loc_BDEDC movzx eax, word ptr [rbx+5] rol ax, 8 movzx eax, ax jmp short loc_BDEB8 loc_BDE56: movzx eax, word ptr [rbx+1]; jumptable 00000000000BDD99 case 112 rol ax, 8 movzx eax, ax add rbx, rax jmp loc_BDD56 loc_BDE69: movzx eax, word ptr [rbx+1]; jumptable 00000000000BDD99 case 118 rol ax, 8 movzx eax, ax mov [rbp+var_68], rax movzx eax, word ptr [rbx+3] rol ax, 8 movzx eax, ax mov [rbp+var_60], rax movzx eax, byte ptr [rbx+5] mov [rbp+var_58], eax lea rax, [rbp+var_50] xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 lea rdi, [rbp+var_70] mov rsi, [rbp+var_38] call [rbp+var_30] test eax, eax jnz short loc_BDEDC movzx eax, byte ptr [rbx] movzx eax, byte ptr [r13+rax+0] loc_BDEB8: add rbx, rax mov esi, 155h jmp loc_BDD56 loc_BDEC5: test eax, eax jz short loc_BDEDC loc_BDEC9: movzx eax, byte ptr [r13+rax+0]; jumptable 00000000000BDD99 cases 98-111,113-117 add rbx, rax jmp loc_BDD56 loc_BDED7: mov eax, 0FFFFFFCDh loc_BDEDC: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long pcre2_callout_enumerate_8(long long a1, long long ( *a2)(int *, long long), long long a3) { long long result; // rax int v4; // r12d unsigned __int8 *v5; // rbx int v6; // esi unsigned long long v7; // rax long long v8; // rax int v9; // [rsp+0h] [rbp-70h] BYREF long long v10; // [rsp+8h] [rbp-68h] long long v11; // [rsp+10h] [rbp-60h] int v12; // [rsp+18h] [rbp-58h] __int128 v13; // [rsp+20h] [rbp-50h] unsigned __int8 *v14; // [rsp+30h] [rbp-40h] long long v15; // [rsp+38h] [rbp-38h] long long ( *v16)(int *, long long); // [rsp+40h] [rbp-30h] v15 = a3; v16 = a2; if ( !a1 ) return 4294967245LL; result = 4294967265LL; if ( *(_DWORD *)(a1 + 80) == 1346589253 ) { result = 4294967264LL; if ( (*(_BYTE *)(a1 + 96) & 1) != 0 ) { v4 = *(_DWORD *)(a1 + 88); v9 = 0; v5 = (unsigned __int8 *)(a1 + *(unsigned __int16 *)(a1 + 134) * (unsigned long long)*(unsigned __int16 *)(a1 + 132) + 136); v6 = 341; while ( 1 ) { while ( 1 ) { result = *v5; if ( (unsigned int)(result - 29) >= 0x38 ) break; v5 += pcre2_OP_lengths_8[result]; if ( (v4 & 0x80000) != 0 ) { v7 = *(v5 - 1); if ( v7 >= 0xC0 ) v5 += pcre2_utf8_table4[v7 & 0x3F]; } } switch ( *v5 ) { case 'U': case 'V': case 'W': case 'X': case 'Y': case 'Z': case '[': case '\\': case ']': case '^': case '_': case '`': case 'a': v5 += 2 * ((unsigned __int8)(v5[pcre2_OP_lengths_8[result] - 1] - 15) < 2u) + pcre2_OP_lengths_8[result]; continue; case 'b': case 'c': case 'd': case 'e': case 'f': case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': case 'm': case 'n': case 'o': case 'q': case 'r': case 's': case 't': case 'u': goto LABEL_21; case 'p': v5 += (unsigned __int16)__ROL2__(*(_WORD *)(v5 + 1), 8); continue; case 'v': v10 = (unsigned __int16)__ROL2__(*(_WORD *)(v5 + 1), 8); v11 = (unsigned __int16)__ROL2__(*(_WORD *)(v5 + 3), 8); v12 = v5[5]; v13 = 0LL; v14 = 0LL; result = v16(&v9, v15); if ( (_DWORD)result ) return result; v8 = pcre2_OP_lengths_8[*v5]; goto LABEL_19; case 'w': v10 = (unsigned __int16)__ROL2__(*(_WORD *)(v5 + 1), 8); v11 = (unsigned __int16)__ROL2__(*(_WORD *)(v5 + 3), 8); v12 = 0; *(_QWORD *)&v13 = (unsigned __int16)__ROL2__(*(_WORD *)(v5 + 7), 8); *((_QWORD *)&v13 + 1) = (unsigned int)(unsigned __int16)__ROL2__(*(_WORD *)(v5 + 5), 8) - 11; v14 = v5 + 10; result = v16(&v9, v15); if ( (_DWORD)result ) return result; v8 = (unsigned __int16)__ROL2__(*(_WORD *)(v5 + 5), 8); LABEL_19: v5 += v8; v6 = 341; continue; default: if ( (unsigned int)(result - 153) <= 8 && _bittest(&v6, result - 153) ) { v5 += pcre2_OP_lengths_8[result] + (unsigned long long)v5[1]; } else { if ( !*v5 ) return result; LABEL_21: v5 += pcre2_OP_lengths_8[result]; } break; } } } } return result; }
pcre2_callout_enumerate_8: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RBP + -0x38],RDX MOV qword ptr [RBP + -0x30],RSI TEST RDI,RDI JZ 0x001bded7 MOV EAX,0xffffffe1 CMP dword ptr [RDI + 0x50],0x50435245 JNZ 0x001bdedc MOV EAX,0xffffffe0 TEST byte ptr [RDI + 0x60],0x1 JZ 0x001bdedc MOV R12D,dword ptr [RDI + 0x58] LEA RAX,[RBP + -0x50] MOV dword ptr [RAX + -0x20],0x0 MOVZX EAX,word ptr [RDI + 0x86] MOVZX ECX,word ptr [RDI + 0x84] IMUL RCX,RAX LEA RBX,[RDI + RCX*0x1] ADD RBX,0x88 LEA R13,[0x218c50] LEA R15,[0x218e30] MOV ESI,0x155 LEA R14,[0x2185ac] LAB_001bdd56: MOVZX EAX,byte ptr [RBX] LEA ECX,[RAX + -0x1d] CMP ECX,0x38 JNC 0x001bdd8a MOVZX EAX,byte ptr [R13 + RAX*0x1] ADD RBX,RAX BT R12D,0x13 JNC 0x001bdd56 MOVZX EAX,byte ptr [RBX + -0x1] CMP RAX,0xc0 JC 0x001bdd56 AND EAX,0x3f MOVZX EAX,byte ptr [R15 + RAX*0x1] ADD RBX,RAX JMP 0x001bdd56 LAB_001bdd8a: LEA ECX,[RAX + -0x55] CMP ECX,0x22 JA 0x001bddb8 MOVSXD RCX,dword ptr [R14 + RCX*0x4] ADD RCX,R14 switchD: JMP RCX caseD_55: MOVZX EAX,byte ptr [R13 + RAX*0x1] LEA RCX,[RBX + RAX*0x1] MOV AL,byte ptr [RBX + RAX*0x1 + -0x1] ADD AL,0xf1 XOR EDX,EDX CMP AL,0x2 SETC DL LEA RBX,[RCX + RDX*0x2] JMP 0x001bdd56 default: LEA ECX,[RAX + -0x99] CMP ECX,0x8 JA 0x001bdec5 BT ESI,ECX JNC 0x001bdec5 MOVZX EAX,byte ptr [R13 + RAX*0x1] MOVZX ECX,byte ptr [RBX + 0x1] ADD RCX,RBX ADD RCX,RAX MOV RBX,RCX JMP 0x001bdd56 caseD_77: MOVZX EAX,word ptr [RBX + 0x1] ROL AX,0x8 MOVZX EAX,AX MOV qword ptr [RBP + -0x68],RAX MOVZX EAX,word ptr [RBX + 0x3] ROL AX,0x8 MOVZX EAX,AX MOV qword ptr [RBP + -0x60],RAX MOV dword ptr [RBP + -0x58],0x0 MOVZX EAX,word ptr [RBX + 0x7] ROL AX,0x8 MOVZX EAX,AX MOV qword ptr [RBP + -0x50],RAX MOVZX EAX,word ptr [RBX + 0x5] ROL AX,0x8 MOVZX EAX,AX ADD EAX,-0xb MOV qword ptr [RBP + -0x48],RAX LEA RAX,[RBX + 0xa] MOV qword ptr [RBP + -0x40],RAX LEA RDI,[RBP + -0x70] MOV RSI,qword ptr [RBP + -0x38] CALL qword ptr [RBP + -0x30] TEST EAX,EAX JNZ 0x001bdedc MOVZX EAX,word ptr [RBX + 0x5] ROL AX,0x8 MOVZX EAX,AX JMP 0x001bdeb8 caseD_70: MOVZX EAX,word ptr [RBX + 0x1] ROL AX,0x8 MOVZX EAX,AX ADD RBX,RAX JMP 0x001bdd56 caseD_76: MOVZX EAX,word ptr [RBX + 0x1] ROL AX,0x8 MOVZX EAX,AX MOV qword ptr [RBP + -0x68],RAX MOVZX EAX,word ptr [RBX + 0x3] ROL AX,0x8 MOVZX EAX,AX MOV qword ptr [RBP + -0x60],RAX MOVZX EAX,byte ptr [RBX + 0x5] MOV dword ptr [RBP + -0x58],EAX LEA RAX,[RBP + -0x50] XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 LEA RDI,[RBP + -0x70] MOV RSI,qword ptr [RBP + -0x38] CALL qword ptr [RBP + -0x30] TEST EAX,EAX JNZ 0x001bdedc MOVZX EAX,byte ptr [RBX] MOVZX EAX,byte ptr [R13 + RAX*0x1] LAB_001bdeb8: ADD RBX,RAX MOV ESI,0x155 JMP 0x001bdd56 LAB_001bdec5: TEST EAX,EAX JZ 0x001bdedc caseD_62: MOVZX EAX,byte ptr [R13 + RAX*0x1] ADD RBX,RAX JMP 0x001bdd56 LAB_001bded7: MOV EAX,0xffffffcd LAB_001bdedc: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
ulong pcre2_callout_enumerate_8(long param_1,code *param_2,int8 param_3) { byte bVar1; uint uVar2; ulong uVar3; byte *pbVar4; int4 local_78 [2]; ulong local_70; ulong local_68; uint local_60; ulong local_58; ulong uStack_50; byte *local_48; int8 local_40; code *local_38; if (param_1 == 0) { uVar3 = 0xffffffcd; } else { uVar3 = 0xffffffe1; if ((*(int *)(param_1 + 0x50) == 0x50435245) && (uVar3 = 0xffffffe0, (*(byte *)(param_1 + 0x60) & 1) != 0)) { uVar2 = *(uint *)(param_1 + 0x58); local_78[0] = 0; pbVar4 = (byte *)(param_1 + (ulong)*(ushort *)(param_1 + 0x84) * (ulong)*(ushort *)(param_1 + 0x86) + 0x88); local_40 = param_3; local_38 = param_2; LAB_001bdd56: while( true ) { bVar1 = *pbVar4; uVar3 = (ulong)bVar1; if (0x37 < bVar1 - 0x1d) break; pbVar4 = pbVar4 + (byte)_pcre2_OP_lengths_8[uVar3]; if (((uVar2 >> 0x13 & 1) != 0) && (0xbf < pbVar4[-1])) { pbVar4 = pbVar4 + (byte)_pcre2_utf8_table4[pbVar4[-1] & 0x3f]; } } switch(bVar1) { case 0x55: case 0x56: case 0x57: case 0x58: case 0x59: case 0x5a: case 0x5b: case 0x5c: case 0x5d: case 0x5e: case 0x5f: case 0x60: case 0x61: pbVar4 = pbVar4 + (ulong)((byte)(pbVar4[(ulong)(byte)_pcre2_OP_lengths_8[uVar3] - 1] - 0xf) < 2) * 2 + (ulong)(byte)_pcre2_OP_lengths_8[uVar3]; goto LAB_001bdd56; case 0x62: case 99: case 100: case 0x65: case 0x66: case 0x67: case 0x68: case 0x69: case 0x6a: case 0x6b: case 0x6c: case 0x6d: case 0x6e: case 0x6f: case 0x71: case 0x72: case 0x73: case 0x74: case 0x75: switchD_001bdd99_caseD_62: pbVar4 = pbVar4 + (byte)_pcre2_OP_lengths_8[uVar3]; goto LAB_001bdd56; case 0x70: pbVar4 = pbVar4 + (ushort)(*(ushort *)(pbVar4 + 1) << 8 | *(ushort *)(pbVar4 + 1) >> 8); goto LAB_001bdd56; case 0x76: local_70 = (ulong)(ushort)(*(ushort *)(pbVar4 + 1) << 8 | *(ushort *)(pbVar4 + 1) >> 8); local_68 = (ulong)(ushort)(*(ushort *)(pbVar4 + 3) << 8 | *(ushort *)(pbVar4 + 3) >> 8); local_60 = (uint)pbVar4[5]; local_58 = 0; uStack_50 = 0; local_48 = (byte *)0x0; uVar3 = (*local_38)(local_78,local_40); if ((int)uVar3 != 0) { return uVar3; } uVar3 = (ulong)(byte)_pcre2_OP_lengths_8[*pbVar4]; break; case 0x77: local_70 = (ulong)(ushort)(*(ushort *)(pbVar4 + 1) << 8 | *(ushort *)(pbVar4 + 1) >> 8); local_68 = (ulong)(ushort)(*(ushort *)(pbVar4 + 3) << 8 | *(ushort *)(pbVar4 + 3) >> 8); local_60 = 0; local_58 = (ulong)(ushort)(*(ushort *)(pbVar4 + 7) << 8 | *(ushort *)(pbVar4 + 7) >> 8); uStack_50 = (ulong)((ushort)(*(ushort *)(pbVar4 + 5) << 8 | *(ushort *)(pbVar4 + 5) >> 8) - 0xb); local_48 = pbVar4 + 10; uVar3 = (*local_38)(local_78,local_40); if ((int)uVar3 != 0) { return uVar3; } uVar3 = (ulong)(ushort)(*(ushort *)(pbVar4 + 5) << 8 | *(ushort *)(pbVar4 + 5) >> 8); break; default: if ((8 < bVar1 - 0x99) || ((0x155U >> (bVar1 - 0x99 & 0x1f) & 1) == 0)) { if (bVar1 == 0) { return uVar3; } goto switchD_001bdd99_caseD_62; } pbVar4 = pbVar4 + (ulong)(byte)_pcre2_OP_lengths_8[uVar3] + (ulong)pbVar4[1]; goto LAB_001bdd56; } pbVar4 = pbVar4 + uVar3; goto LAB_001bdd56; } } return uVar3; }
7,909
Rpl_filter::set_do_table(char const*)
eloqsql/sql/rpl_filter.cc
int Rpl_filter::set_do_table(const char* table_spec) { int status; if (do_table_inited) { my_hash_free(&do_table); do_table_inited= 0; } status= parse_filter_rule(table_spec, &Rpl_filter::add_do_table); if (do_table_inited && status) { if (!do_table.records) { my_hash_free(&do_table); do_table_inited= 0; } } return status; }
O0
cpp
Rpl_filter::set_do_table(char const*): pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq -0x8(%rbp), %rax movq %rax, -0x30(%rbp) testb $0x1, 0x135(%rax) je 0x8e04c5 movq -0x30(%rbp), %rdi callq 0x1306e80 movq -0x30(%rbp), %rax movb $0x0, 0x135(%rax) movq -0x30(%rbp), %rdi movq -0x10(%rbp), %rsi leaq -0x264(%rip), %rax # 0x8e0270 movq %rax, -0x28(%rbp) movq $0x0, -0x20(%rbp) movq -0x28(%rbp), %rdx movq -0x20(%rbp), %rcx callq 0x8e00f0 movl %eax, %ecx movq -0x30(%rbp), %rax movl %ecx, -0x14(%rbp) testb $0x1, 0x135(%rax) je 0x8e0526 cmpl $0x0, -0x14(%rbp) je 0x8e0526 movq -0x30(%rbp), %rax cmpq $0x0, 0x18(%rax) jne 0x8e0524 movq -0x30(%rbp), %rdi callq 0x1306e80 movq -0x30(%rbp), %rax movb $0x0, 0x135(%rax) jmp 0x8e0526 movl -0x14(%rbp), %eax addq $0x30, %rsp popq %rbp retq nop
_ZN10Rpl_filter12set_do_tableEPKc: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov rax, [rbp+var_8] mov [rbp+var_30], rax test byte ptr [rax+135h], 1 jz short loc_8E04C5 mov rdi, [rbp+var_30] call my_hash_free mov rax, [rbp+var_30] mov byte ptr [rax+135h], 0 loc_8E04C5: mov rdi, [rbp+var_30] mov rsi, [rbp+var_10] lea rax, _ZN10Rpl_filter12add_do_tableEPKc; Rpl_filter::add_do_table(char const*) mov [rbp+var_28], rax mov [rbp+var_20], 0 mov rdx, [rbp+var_28] mov rcx, [rbp+var_20] call _ZN10Rpl_filter17parse_filter_ruleEPKcMS_FiS1_E; Rpl_filter::parse_filter_rule(char const*,int (Rpl_filter::*)(char const*)) mov ecx, eax mov rax, [rbp+var_30] mov [rbp+var_14], ecx test byte ptr [rax+135h], 1 jz short loc_8E0526 cmp [rbp+var_14], 0 jz short loc_8E0526 mov rax, [rbp+var_30] cmp qword ptr [rax+18h], 0 jnz short loc_8E0524 mov rdi, [rbp+var_30] call my_hash_free mov rax, [rbp+var_30] mov byte ptr [rax+135h], 0 loc_8E0524: jmp short $+2 loc_8E0526: mov eax, [rbp+var_14] add rsp, 30h pop rbp retn
long long Rpl_filter::set_do_table(Rpl_filter *this, const char *a2) { unsigned int v2; // ecx unsigned int v4; // [rsp+1Ch] [rbp-14h] if ( (*((_BYTE *)this + 309) & 1) != 0 ) { my_hash_free(this); *((_BYTE *)this + 309) = 0; } v2 = Rpl_filter::parse_filter_rule((long long)this, (long long)a2, (char *)Rpl_filter::add_do_table, 0LL); v4 = v2; if ( (*((_BYTE *)this + 309) & 1) != 0 && v2 && !*((_QWORD *)this + 3) ) { my_hash_free(this); *((_BYTE *)this + 309) = 0; } return v4; }
__cxx_global_var_init.11: PUSH RBP MOV RBP,RSP LEA RDI,[0x2710aac] MOV ESI,0x20 CALL 0x008fd550 POP RBP RET
void __cxx_global_var_init_11(void) { time_round_mode_t::time_round_mode_t((time_round_mode_t *)&TIME_FRAC_TRUNCATE,0x20); return; }
7,910
LefDefParser::defwBlockageLayerPushdown(char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defwWriter.cpp
int defwBlockageLayerPushdown(const char *layerName) { defwFunc = DEFW_BLOCKAGE_LAYER; // Current function of writer if (!defwFile) return DEFW_UNINITIALIZED; // May be user already define component or layer or layer slots if (defwState != DEFW_BLOCKAGE_START && ((defwState == DEFW_BLOCKAGE_PLACE) || (defwState == DEFW_BLOCKAGE_LAYER))) return DEFW_BAD_DATA; if ((layerName == 0) || (*layerName == 0)) // require return DEFW_BAD_DATA; if (defwState == DEFW_BLOCKAGE_RECT) fprintf(defwFile, " ;\n"); // end the previous rectangle fprintf(defwFile, " - LAYER %s + PUSHDOWN\n", layerName); defwCounter--; defwLines++; defwState = DEFW_BLOCKAGE_LAYER; defwBlockageHasSD = 0; return DEFW_OK; }
O0
cpp
LefDefParser::defwBlockageLayerPushdown(char const*): subq $0x18, %rsp movq %rdi, 0x8(%rsp) leaq 0xc248(%rip), %rax # 0x2b168 movl $0x2c, (%rax) leaq 0xc22b(%rip), %rax # 0x2b158 cmpq $0x0, (%rax) jne 0x1ef40 movl $0x1, 0x14(%rsp) jmp 0x1f01d leaq 0xc21d(%rip), %rax # 0x2b164 cmpl $0x2b, (%rax) je 0x1ef71 leaq 0xc211(%rip), %rax # 0x2b164 cmpl $0x2d, (%rax) je 0x1ef64 leaq 0xc205(%rip), %rax # 0x2b164 cmpl $0x2c, (%rax) jne 0x1ef71 movl $0x3, 0x14(%rsp) jmp 0x1f01d cmpq $0x0, 0x8(%rsp) je 0x1ef86 movq 0x8(%rsp), %rax movsbl (%rax), %eax cmpl $0x0, %eax jne 0x1ef93 movl $0x3, 0x14(%rsp) jmp 0x1f01d leaq 0xc1ca(%rip), %rax # 0x2b164 cmpl $0x2e, (%rax) jne 0x1efb7 leaq 0xc1b2(%rip), %rax # 0x2b158 movq (%rax), %rdi leaq 0x4ea2(%rip), %rsi # 0x23e52 movb $0x0, %al callq 0x10f0 leaq 0xc19a(%rip), %rax # 0x2b158 movq (%rax), %rdi movq 0x8(%rsp), %rdx leaq 0x6130(%rip), %rsi # 0x250fd movb $0x0, %al callq 0x10f0 leaq 0xc19d(%rip), %rax # 0x2b178 movl (%rax), %ecx addl $-0x1, %ecx leaq 0xc191(%rip), %rax # 0x2b178 movl %ecx, (%rax) leaq 0xc170(%rip), %rax # 0x2b160 movl (%rax), %ecx addl $0x1, %ecx leaq 0xc164(%rip), %rax # 0x2b160 movl %ecx, (%rax) leaq 0xc15f(%rip), %rax # 0x2b164 movl $0x2c, (%rax) movl $0x0, 0xc183(%rip) # 0x2b198 movl $0x0, 0x14(%rsp) movl 0x14(%rsp), %eax addq $0x18, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser25defwBlockageLayerPushdownEPKc: sub rsp, 18h mov [rsp+18h+var_10], rdi lea rax, _ZN12LefDefParser8defwFuncE; LefDefParser::defwFunc mov dword ptr [rax], 2Ch ; ',' lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile cmp qword ptr [rax], 0 jnz short loc_1EF40 mov [rsp+18h+var_4], 1 jmp loc_1F01D loc_1EF40: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 2Bh ; '+' jz short loc_1EF71 lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 2Dh ; '-' jz short loc_1EF64 lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 2Ch ; ',' jnz short loc_1EF71 loc_1EF64: mov [rsp+18h+var_4], 3 jmp loc_1F01D loc_1EF71: cmp [rsp+18h+var_10], 0 jz short loc_1EF86 mov rax, [rsp+18h+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jnz short loc_1EF93 loc_1EF86: mov [rsp+18h+var_4], 3 jmp loc_1F01D loc_1EF93: lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState cmp dword ptr [rax], 2Eh ; '.' jnz short loc_1EFB7 lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] lea rsi, aDividercharS+10h; " ;\n" mov al, 0 call _fprintf loc_1EFB7: lea rax, _ZN12LefDefParser8defwFileE; LefDefParser::defwFile mov rdi, [rax] mov rdx, [rsp+18h+var_10] lea rsi, aLayerSPushdown; " - LAYER %s + PUSHDOWN\n" mov al, 0 call _fprintf lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter mov ecx, [rax] add ecx, 0FFFFFFFFh lea rax, _ZN12LefDefParser11defwCounterE; LefDefParser::defwCounter mov [rax], ecx lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov ecx, [rax] add ecx, 1 lea rax, _ZN12LefDefParser9defwLinesE; LefDefParser::defwLines mov [rax], ecx lea rax, _ZN12LefDefParser9defwStateE; LefDefParser::defwState mov dword ptr [rax], 2Ch ; ',' mov cs:_ZN12LefDefParserL17defwBlockageHasSDE, 0; LefDefParser::defwBlockageHasSD mov [rsp+18h+var_4], 0 loc_1F01D: mov eax, [rsp+18h+var_4] add rsp, 18h retn
long long LefDefParser::defwBlockageLayerPushdown(LefDefParser *this, const char *a2) { LefDefParser::defwFunc = 44; if ( LefDefParser::defwFile ) { if ( LefDefParser::defwState != 43 && (LefDefParser::defwState == 45 || LefDefParser::defwState == 44) ) { return 3; } else if ( this && *(_BYTE *)this ) { if ( LefDefParser::defwState == 46 ) fprintf(LefDefParser::defwFile, " ;\n"); fprintf(LefDefParser::defwFile, " - LAYER %s + PUSHDOWN\n", (const char *)this); --LefDefParser::defwCounter; ++LefDefParser::defwLines; LefDefParser::defwState = 44; LefDefParser::defwBlockageHasSD = 0; return 0; } else { return 3; } } else { return 1; } }
defwBlockageLayerPushdown: SUB RSP,0x18 MOV qword ptr [RSP + 0x8],RDI LEA RAX,[0x12b168] MOV dword ptr [RAX],0x2c LEA RAX,[0x12b158] CMP qword ptr [RAX],0x0 JNZ 0x0011ef40 MOV dword ptr [RSP + 0x14],0x1 JMP 0x0011f01d LAB_0011ef40: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x2b JZ 0x0011ef71 LEA RAX,[0x12b164] CMP dword ptr [RAX],0x2d JZ 0x0011ef64 LEA RAX,[0x12b164] CMP dword ptr [RAX],0x2c JNZ 0x0011ef71 LAB_0011ef64: MOV dword ptr [RSP + 0x14],0x3 JMP 0x0011f01d LAB_0011ef71: CMP qword ptr [RSP + 0x8],0x0 JZ 0x0011ef86 MOV RAX,qword ptr [RSP + 0x8] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JNZ 0x0011ef93 LAB_0011ef86: MOV dword ptr [RSP + 0x14],0x3 JMP 0x0011f01d LAB_0011ef93: LEA RAX,[0x12b164] CMP dword ptr [RAX],0x2e JNZ 0x0011efb7 LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] LEA RSI,[0x123e52] MOV AL,0x0 CALL 0x001010f0 LAB_0011efb7: LEA RAX,[0x12b158] MOV RDI,qword ptr [RAX] MOV RDX,qword ptr [RSP + 0x8] LEA RSI,[0x1250fd] MOV AL,0x0 CALL 0x001010f0 LEA RAX,[0x12b178] MOV ECX,dword ptr [RAX] ADD ECX,-0x1 LEA RAX,[0x12b178] MOV dword ptr [RAX],ECX LEA RAX,[0x12b160] MOV ECX,dword ptr [RAX] ADD ECX,0x1 LEA RAX,[0x12b160] MOV dword ptr [RAX],ECX LEA RAX,[0x12b164] MOV dword ptr [RAX],0x2c MOV dword ptr [0x0012b198],0x0 MOV dword ptr [RSP + 0x14],0x0 LAB_0011f01d: MOV EAX,dword ptr [RSP + 0x14] ADD RSP,0x18 RET
/* LefDefParser::defwBlockageLayerPushdown(char const*) */ int4 LefDefParser::defwBlockageLayerPushdown(char *param_1) { int4 local_4; defwFunc = 0x2c; if (defwFile == (FILE *)0x0) { local_4 = 1; } else if ((defwState == 0x2b) || ((defwState != 0x2d && (defwState != 0x2c)))) { if ((param_1 == (char *)0x0) || (*param_1 == '\0')) { local_4 = 3; } else { if (defwState == 0x2e) { fprintf(defwFile," ;\n"); } fprintf(defwFile," - LAYER %s + PUSHDOWN\n",param_1); defwCounter = defwCounter + -1; defwLines = defwLines + 1; defwState = 0x2c; defwBlockageHasSD = 0; local_4 = 0; } } else { local_4 = 3; } return local_4; }
7,911
lf_dynarray_iterate
eloqsql/mysys/lf_dynarray.c
int lf_dynarray_iterate(LF_DYNARRAY *array, lf_dynarray_func func, void *arg) { int i, res; for (i= 0; i < LF_DYNARRAY_LEVELS; i++) if ((res= recursive_iterate(array, array->level[i], i, func, arg))) return res; return 0; }
O0
c
lf_dynarray_iterate: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movl $0x0, -0x24(%rbp) cmpl $0x4, -0x24(%rbp) jge 0xfebfe movq -0x10(%rbp), %rdi movq -0x10(%rbp), %rax movslq -0x24(%rbp), %rcx movq (%rax,%rcx,8), %rsi movl -0x24(%rbp), %edx movq -0x18(%rbp), %rcx movq -0x20(%rbp), %r8 callq 0xfec10 movl %eax, -0x28(%rbp) cmpl $0x0, %eax je 0xfebf1 movl -0x28(%rbp), %eax movl %eax, -0x4(%rbp) jmp 0xfec05 jmp 0xfebf3 movl -0x24(%rbp), %eax addl $0x1, %eax movl %eax, -0x24(%rbp) jmp 0xfebbb movl $0x0, -0x4(%rbp) movl -0x4(%rbp), %eax addq $0x30, %rsp popq %rbp retq nop
lf_dynarray_iterate: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx mov [rbp+var_24], 0 loc_FEBBB: cmp [rbp+var_24], 4 jge short loc_FEBFE mov rdi, [rbp+var_10] mov rax, [rbp+var_10] movsxd rcx, [rbp+var_24] mov rsi, [rax+rcx*8] mov edx, [rbp+var_24] mov rcx, [rbp+var_18] mov r8, [rbp+var_20] call recursive_iterate mov [rbp+var_28], eax cmp eax, 0 jz short loc_FEBF1 mov eax, [rbp+var_28] mov [rbp+var_4], eax jmp short loc_FEC05 loc_FEBF1: jmp short $+2 loc_FEBF3: mov eax, [rbp+var_24] add eax, 1 mov [rbp+var_24], eax jmp short loc_FEBBB loc_FEBFE: mov [rbp+var_4], 0 loc_FEC05: mov eax, [rbp+var_4] add rsp, 30h pop rbp retn
long long lf_dynarray_iterate(long long a1, long long a2, long long a3) { unsigned int v4; // [rsp+8h] [rbp-28h] int i; // [rsp+Ch] [rbp-24h] for ( i = 0; i < 4; ++i ) { v4 = recursive_iterate(a1, *(_QWORD *)(a1 + 8LL * i), (unsigned int)i, a2, a3); if ( v4 ) return v4; } return 0; }
lf_dynarray_iterate: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX MOV dword ptr [RBP + -0x24],0x0 LAB_001febbb: CMP dword ptr [RBP + -0x24],0x4 JGE 0x001febfe MOV RDI,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,dword ptr [RBP + -0x24] MOV RSI,qword ptr [RAX + RCX*0x8] MOV EDX,dword ptr [RBP + -0x24] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x20] CALL 0x001fec10 MOV dword ptr [RBP + -0x28],EAX CMP EAX,0x0 JZ 0x001febf1 MOV EAX,dword ptr [RBP + -0x28] MOV dword ptr [RBP + -0x4],EAX JMP 0x001fec05 LAB_001febf1: JMP 0x001febf3 LAB_001febf3: MOV EAX,dword ptr [RBP + -0x24] ADD EAX,0x1 MOV dword ptr [RBP + -0x24],EAX JMP 0x001febbb LAB_001febfe: MOV dword ptr [RBP + -0x4],0x0 LAB_001fec05: MOV EAX,dword ptr [RBP + -0x4] ADD RSP,0x30 POP RBP RET
int lf_dynarray_iterate(long param_1,int8 param_2,int8 param_3) { int iVar1; int local_2c; local_2c = 0; while( true ) { if (3 < local_2c) { return 0; } iVar1 = recursive_iterate(param_1,*(int8 *)(param_1 + (long)local_2c * 8),local_2c,param_2 ,param_3); if (iVar1 != 0) break; local_2c = local_2c + 1; } return iVar1; }
7,912
MergeSegment
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
segment_t *MergeSegment(segment_t *first_segment, segment_t *second_segment) { if (!first_segment || !second_segment) { HEAP_LOG("Merge failed: invalid segments (first=%p, second=%p)\n", first_segment, second_segment); return first_segment; } check_memory_corruption(first_segment); check_memory_corruption(second_segment); // Update cached pointer if needed if (last_free_segment == second_segment) { last_free_segment = first_segment; } int original_size = first_segment->size; // Combine the sizes and update the list first_segment->size += second_segment->size; first_segment->next = second_segment->next; // Update next segment's prev pointer if (second_segment->next) { second_segment->next->prev = first_segment; } // For debug builds, invalidate the merged segment if (debug_mode) { second_segment->magic = 0; } HEAP_LOG("Segments merged: first=%p, second=%p, new size=%d blocks (was %d)\n", first_segment, second_segment, first_segment->size, original_size); // Update integrity metadata for the merged segment initialize_segment_integrity(first_segment); return first_segment; }
O1
c
MergeSegment: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx testq %rdi, %rdi sete %al testq %rsi, %rsi sete %cl orb %al, %cl jne 0x28c1 movq %rsi, %r14 movq %rbx, %rdi callq 0x2f68 movq %r14, %rdi callq 0x2f68 leaq 0x3867(%rip), %rax # 0x60e8 cmpq %r14, (%rax) jne 0x2889 movq %rbx, (%rax) movl 0x4(%r14), %eax addl %eax, 0x4(%rbx) movq 0x8(%r14), %rax movq %rax, 0x8(%rbx) movq 0x8(%r14), %rax testq %rax, %rax je 0x28a5 movq %rbx, 0x10(%rax) leaq 0x4104884(%rip), %rax # 0x4107130 cmpl $0x0, (%rax) je 0x28b9 movl $0x0, 0x28(%r14) movq %rbx, %rdi callq 0x2807 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
MergeSegment: push r14 push rbx push rax mov rbx, rdi test rdi, rdi setz al test rsi, rsi setz cl or cl, al jnz short loc_28C1 mov r14, rsi mov rdi, rbx call check_memory_corruption mov rdi, r14 call check_memory_corruption lea rax, last_free_segment cmp [rax], r14 jnz short loc_2889 mov [rax], rbx loc_2889: mov eax, [r14+4] add [rbx+4], eax mov rax, [r14+8] mov [rbx+8], rax mov rax, [r14+8] test rax, rax jz short loc_28A5 mov [rax+10h], rbx loc_28A5: lea rax, debug_mode cmp dword ptr [rax], 0 jz short loc_28B9 mov dword ptr [r14+28h], 0 loc_28B9: mov rdi, rbx call initialize_segment_integrity loc_28C1: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long MergeSegment(long long a1, long long a2) { long long v2; // rax if ( a1 != 0 && a2 != 0 ) { check_memory_corruption(a1); check_memory_corruption(a2); if ( last_free_segment == a2 ) last_free_segment = a1; *(_DWORD *)(a1 + 4) += *(_DWORD *)(a2 + 4); *(_QWORD *)(a1 + 8) = *(_QWORD *)(a2 + 8); v2 = *(_QWORD *)(a2 + 8); if ( v2 ) *(_QWORD *)(v2 + 16) = a1; if ( debug_mode ) *(_DWORD *)(a2 + 40) = 0; initialize_segment_integrity(a1); } return a1; }
MergeSegment: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI TEST RDI,RDI SETZ AL TEST RSI,RSI SETZ CL OR CL,AL JNZ 0x001028c1 MOV R14,RSI MOV RDI,RBX CALL 0x00102f68 MOV RDI,R14 CALL 0x00102f68 LEA RAX,[0x1060e8] CMP qword ptr [RAX],R14 JNZ 0x00102889 MOV qword ptr [RAX],RBX LAB_00102889: MOV EAX,dword ptr [R14 + 0x4] ADD dword ptr [RBX + 0x4],EAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RBX + 0x8],RAX MOV RAX,qword ptr [R14 + 0x8] TEST RAX,RAX JZ 0x001028a5 MOV qword ptr [RAX + 0x10],RBX LAB_001028a5: LEA RAX,[0x4207130] CMP dword ptr [RAX],0x0 JZ 0x001028b9 MOV dword ptr [R14 + 0x28],0x0 LAB_001028b9: MOV RDI,RBX CALL 0x00102807 LAB_001028c1: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
long MergeSegment(long param_1,long param_2) { if (param_2 != 0 && param_1 != 0) { check_memory_corruption(param_1); check_memory_corruption(param_2); if (last_free_segment == param_2) { last_free_segment = param_1; } *(int *)(param_1 + 4) = *(int *)(param_1 + 4) + *(int *)(param_2 + 4); *(int8 *)(param_1 + 8) = *(int8 *)(param_2 + 8); if (*(long *)(param_2 + 8) != 0) { *(long *)(*(long *)(param_2 + 8) + 0x10) = param_1; } if (debug_mode != 0) { *(int4 *)(param_2 + 0x28) = 0; } initialize_segment_integrity(param_1); } return param_1; }
7,913
MergeSegment
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
segment_t *MergeSegment(segment_t *first_segment, segment_t *second_segment) { if (!first_segment || !second_segment) { HEAP_LOG("Merge failed: invalid segments (first=%p, second=%p)\n", first_segment, second_segment); return first_segment; } check_memory_corruption(first_segment); check_memory_corruption(second_segment); // Update cached pointer if needed if (last_free_segment == second_segment) { last_free_segment = first_segment; } int original_size = first_segment->size; // Combine the sizes and update the list first_segment->size += second_segment->size; first_segment->next = second_segment->next; // Update next segment's prev pointer if (second_segment->next) { second_segment->next->prev = first_segment; } // For debug builds, invalidate the merged segment if (debug_mode) { second_segment->magic = 0; } HEAP_LOG("Segments merged: first=%p, second=%p, new size=%d blocks (was %d)\n", first_segment, second_segment, first_segment->size, original_size); // Update integrity metadata for the merged segment initialize_segment_integrity(first_segment); return first_segment; }
O3
c
MergeSegment: pushq %r14 pushq %rbx pushq %rax movq %rdi, %rbx testq %rdi, %rdi sete %al testq %rsi, %rsi sete %cl orb %al, %cl jne 0x2821 movq %rsi, %r14 movq %rbx, %rdi callq 0x2ee8 movq %r14, %rdi callq 0x2ee8 leaq 0x2903(%rip), %rax # 0x50e8 cmpq %r14, (%rax) jne 0x27ed movq %rbx, (%rax) movl 0x4(%r14), %eax addl %eax, 0x4(%rbx) movq 0x8(%r14), %rax movq %rax, 0x8(%rbx) testq %rax, %rax je 0x2805 movq %rbx, 0x10(%rax) leaq 0x4103924(%rip), %rax # 0x4106130 cmpl $0x0, (%rax) je 0x2819 movl $0x0, 0x28(%r14) movq %rbx, %rdi callq 0x276b movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
MergeSegment: push r14 push rbx push rax mov rbx, rdi test rdi, rdi setz al test rsi, rsi setz cl or cl, al jnz short loc_2821 mov r14, rsi mov rdi, rbx call check_memory_corruption mov rdi, r14 call check_memory_corruption lea rax, last_free_segment cmp [rax], r14 jnz short loc_27ED mov [rax], rbx loc_27ED: mov eax, [r14+4] add [rbx+4], eax mov rax, [r14+8] mov [rbx+8], rax test rax, rax jz short loc_2805 mov [rax+10h], rbx loc_2805: lea rax, debug_mode cmp dword ptr [rax], 0 jz short loc_2819 mov dword ptr [r14+28h], 0 loc_2819: mov rdi, rbx call initialize_segment_integrity loc_2821: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
long long MergeSegment(long long a1, long long a2) { long long v2; // rax if ( a1 != 0 && a2 != 0 ) { check_memory_corruption(a1); check_memory_corruption(a2); if ( last_free_segment == a2 ) last_free_segment = a1; *(_DWORD *)(a1 + 4) += *(_DWORD *)(a2 + 4); v2 = *(_QWORD *)(a2 + 8); *(_QWORD *)(a1 + 8) = v2; if ( v2 ) *(_QWORD *)(v2 + 16) = a1; if ( debug_mode ) *(_DWORD *)(a2 + 40) = 0; initialize_segment_integrity(a1); } return a1; }
MergeSegment: PUSH R14 PUSH RBX PUSH RAX MOV RBX,RDI TEST RDI,RDI SETZ AL TEST RSI,RSI SETZ CL OR CL,AL JNZ 0x00102821 MOV R14,RSI MOV RDI,RBX CALL 0x00102ee8 MOV RDI,R14 CALL 0x00102ee8 LEA RAX,[0x1050e8] CMP qword ptr [RAX],R14 JNZ 0x001027ed MOV qword ptr [RAX],RBX LAB_001027ed: MOV EAX,dword ptr [R14 + 0x4] ADD dword ptr [RBX + 0x4],EAX MOV RAX,qword ptr [R14 + 0x8] MOV qword ptr [RBX + 0x8],RAX TEST RAX,RAX JZ 0x00102805 MOV qword ptr [RAX + 0x10],RBX LAB_00102805: LEA RAX,[0x4206130] CMP dword ptr [RAX],0x0 JZ 0x00102819 MOV dword ptr [R14 + 0x28],0x0 LAB_00102819: MOV RDI,RBX CALL 0x0010276b LAB_00102821: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
long MergeSegment(long param_1,long param_2) { long lVar1; if (param_2 != 0 && param_1 != 0) { check_memory_corruption(param_1); check_memory_corruption(param_2); if (last_free_segment == param_2) { last_free_segment = param_1; } *(int *)(param_1 + 4) = *(int *)(param_1 + 4) + *(int *)(param_2 + 4); lVar1 = *(long *)(param_2 + 8); *(long *)(param_1 + 8) = lVar1; if (lVar1 != 0) { *(long *)(lVar1 + 0x10) = param_1; } if (debug_mode != 0) { *(int4 *)(param_2 + 0x28) = 0; } initialize_segment_integrity(param_1); } return param_1; }
7,914
Modbus::createServerPort(ModbusInterface*, Modbus::ProtocolType, void const*, bool)
serhmarch[P]ModbusBridge/modbus/src/Modbus.cpp
ModbusServerPort *createServerPort(ModbusInterface *device, ProtocolType type, const void *settings, bool blocking) { ModbusServerPort *serv = nullptr; switch (type) { case RTU: case ASC: { ModbusPort *port = createPort(type, settings, blocking); serv = new ModbusServerResource(port, device); } break; case TCP: { ModbusTcpServer *tcp = new ModbusTcpServer(device); const TcpSettings *s = reinterpret_cast<const TcpSettings*>(settings); tcp->setPort (s->port ); tcp->setTimeout(s->timeout); serv = tcp; } break; } return serv; }
O0
cpp
Modbus::createServerPort(ModbusInterface*, Modbus::ProtocolType, void const*, bool): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movb %cl, %al movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) andb $0x1, %al movb %al, -0x19(%rbp) movq $0x0, -0x28(%rbp) movl -0xc(%rbp), %eax movl %eax, -0x54(%rbp) subl $0x2, %eax jb 0xafac jmp 0xaf9f movl -0x54(%rbp), %eax subl $0x2, %eax je 0xb012 jmp 0xb089 movl -0xc(%rbp), %edi movq -0x18(%rbp), %rsi movzbl -0x19(%rbp), %edx andl $0x1, %edx callq 0xac30 movq %rax, -0x30(%rbp) movl $0x10, %edi callq 0x6410 movq %rax, %rdi movq %rdi, %rax movq %rax, -0x60(%rbp) movq -0x30(%rbp), %rsi movq -0x8(%rbp), %rdx callq 0x1a3f0 jmp 0xafe6 movq -0x60(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0xb089 movq -0x60(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x38(%rbp) movl %eax, -0x3c(%rbp) movl $0x10, %esi callq 0x6420 jmp 0xb093 movl $0x10, %edi callq 0x6410 movq %rax, %rdi movq %rdi, %rax movq %rax, -0x68(%rbp) movq -0x8(%rbp), %rsi callq 0x25740 jmp 0xb031 movq -0x68(%rbp), %rax movq %rax, -0x48(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) movq -0x48(%rbp), %rdi movq -0x50(%rbp), %rax movzwl 0x8(%rax), %esi callq 0x1d220 movq -0x48(%rbp), %rdi movq -0x50(%rbp), %rax movzwl 0xa(%rax), %esi callq 0x1d290 movq -0x48(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0xb089 movq -0x68(%rbp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, -0x38(%rbp) movl %eax, -0x3c(%rbp) movl $0x10, %esi callq 0x6420 jmp 0xb093 movq -0x28(%rbp), %rax addq $0x70, %rsp popq %rbp retq movq -0x38(%rbp), %rdi callq 0x6710 nopl (%rax)
_ZN6Modbus16createServerPortEP15ModbusInterfaceNS_12ProtocolTypeEPKvb: push rbp mov rbp, rsp sub rsp, 70h mov al, cl mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx and al, 1 mov [rbp+var_19], al mov [rbp+var_28], 0 mov eax, [rbp+var_C] mov [rbp+var_54], eax sub eax, 2 jb short loc_AFAC jmp short $+2 loc_AF9F: mov eax, [rbp+var_54] sub eax, 2 jz short loc_B012 jmp loc_B089 loc_AFAC: mov edi, [rbp+var_C] mov rsi, [rbp+var_18] movzx edx, [rbp+var_19] and edx, 1 call _ZN6Modbus10createPortENS_12ProtocolTypeEPKvb; Modbus::createPort(Modbus::ProtocolType,void const*,bool) mov [rbp+var_30], rax mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax; this mov rax, rdi mov [rbp+var_60], rax mov rsi, [rbp+var_30]; ModbusPort * mov rdx, [rbp+var_8]; ModbusInterface * call _ZN20ModbusServerResourceC2EP10ModbusPortP15ModbusInterface; ModbusServerResource::ModbusServerResource(ModbusPort *,ModbusInterface *) jmp short $+2 loc_AFE6: mov rax, [rbp+var_60] mov [rbp+var_28], rax jmp loc_B089 mov rdi, [rbp+var_60]; void * mov rcx, rax mov eax, edx mov [rbp+var_38], rcx mov [rbp+var_3C], eax mov esi, 10h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp loc_B093 loc_B012: mov edi, 10h; unsigned __int64 call __Znwm; operator new(ulong) mov rdi, rax; this mov rax, rdi mov [rbp+var_68], rax mov rsi, [rbp+var_8]; ModbusInterface * call _ZN15ModbusTcpServerC2EP15ModbusInterface; ModbusTcpServer::ModbusTcpServer(ModbusInterface *) jmp short $+2 loc_B031: mov rax, [rbp+var_68] mov [rbp+var_48], rax mov rax, [rbp+var_18] mov [rbp+var_50], rax mov rdi, [rbp+var_48]; this mov rax, [rbp+var_50] movzx esi, word ptr [rax+8]; unsigned __int16 call _ZN15ModbusTcpServer7setPortEt; ModbusTcpServer::setPort(ushort) mov rdi, [rbp+var_48]; this mov rax, [rbp+var_50] movzx esi, word ptr [rax+0Ah]; unsigned int call _ZN15ModbusTcpServer10setTimeoutEj; ModbusTcpServer::setTimeout(uint) mov rax, [rbp+var_48] mov [rbp+var_28], rax jmp short loc_B089 mov rdi, [rbp+var_68]; void * mov rcx, rax mov eax, edx mov [rbp+var_38], rcx mov [rbp+var_3C], eax mov esi, 10h; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_B093 loc_B089: mov rax, [rbp+var_28] add rsp, 70h pop rbp retn loc_B093: mov rdi, [rbp+var_38] call __Unwind_Resume
ModbusTcpServer * Modbus::createServerPort(ModbusInterface *a1, unsigned int a2, long long a3, char a4) { ModbusTcpServer *v5; // [rsp+8h] [rbp-68h] ModbusServerResource *v6; // [rsp+10h] [rbp-60h] ModbusRtuPort *Port; // [rsp+40h] [rbp-30h] long long v8; // [rsp+48h] [rbp-28h] v8 = 0LL; if ( a2 < 2 ) { Port = Modbus::createPort(a2, a3, a4 & 1); v6 = (ModbusServerResource *)operator new(0x10uLL); ModbusServerResource::ModbusServerResource(v6, Port, a1); return v6; } else if ( a2 == 2 ) { v5 = (ModbusTcpServer *)operator new(0x10uLL); ModbusTcpServer::ModbusTcpServer(v5, a1); ModbusTcpServer::setPort(v5, *(_WORD *)(a3 + 8)); ModbusTcpServer::setTimeout(v5, *(unsigned __int16 *)(a3 + 10)); return v5; } return (ModbusTcpServer *)v8; }
createServerPort: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV AL,CL MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI MOV qword ptr [RBP + -0x18],RDX AND AL,0x1 MOV byte ptr [RBP + -0x19],AL MOV qword ptr [RBP + -0x28],0x0 MOV EAX,dword ptr [RBP + -0xc] MOV dword ptr [RBP + -0x54],EAX SUB EAX,0x2 JC 0x0010afac JMP 0x0010af9f LAB_0010af9f: MOV EAX,dword ptr [RBP + -0x54] SUB EAX,0x2 JZ 0x0010b012 JMP 0x0010b089 LAB_0010afac: MOV EDI,dword ptr [RBP + -0xc] MOV RSI,qword ptr [RBP + -0x18] MOVZX EDX,byte ptr [RBP + -0x19] AND EDX,0x1 CALL 0x0010ac30 MOV qword ptr [RBP + -0x30],RAX MOV EDI,0x10 CALL 0x00106410 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RBP + -0x60],RAX MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x8] LAB_0010afdf: CALL 0x0011a3f0 LAB_0010afe4: JMP 0x0010afe6 LAB_0010afe6: MOV RAX,qword ptr [RBP + -0x60] MOV qword ptr [RBP + -0x28],RAX JMP 0x0010b089 LAB_0010b012: MOV EDI,0x10 CALL 0x00106410 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RBP + -0x68],RAX MOV RSI,qword ptr [RBP + -0x8] LAB_0010b02a: CALL 0x00125740 LAB_0010b02f: JMP 0x0010b031 LAB_0010b031: MOV RAX,qword ptr [RBP + -0x68] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x50] MOVZX ESI,word ptr [RAX + 0x8] CALL 0x0011d220 MOV RDI,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + -0x50] MOVZX ESI,word ptr [RAX + 0xa] CALL 0x0011d290 MOV RAX,qword ptr [RBP + -0x48] MOV qword ptr [RBP + -0x28],RAX JMP 0x0010b089 LAB_0010b089: MOV RAX,qword ptr [RBP + -0x28] ADD RSP,0x70 POP RBP RET
/* Modbus::createServerPort(ModbusInterface*, Modbus::ProtocolType, void const*, bool) */ ModbusServerResource * Modbus::createServerPort(ModbusInterface *param_1,uint param_2,long param_3,byte param_4) { ModbusPort *pMVar1; int8 local_30; local_30 = (ModbusTcpServer *)0x0; if (param_2 < 2) { pMVar1 = (ModbusPort *)createPort(param_2,param_3,param_4 & 1); local_30 = (ModbusTcpServer *)operator_new(0x10); /* try { // try from 0010afdf to 0010afe3 has its CatchHandler @ 0010aff3 */ ModbusServerResource::ModbusServerResource((ModbusServerResource *)local_30,pMVar1,param_1); } else if (param_2 == 2) { local_30 = (ModbusTcpServer *)operator_new(0x10); /* try { // try from 0010b02a to 0010b02e has its CatchHandler @ 0010b06d */ ModbusTcpServer::ModbusTcpServer(local_30,param_1); ModbusTcpServer::setPort(local_30,*(ushort *)(param_3 + 8)); ModbusTcpServer::setTimeout(local_30,(uint)*(ushort *)(param_3 + 10)); } return (ModbusServerResource *)local_30; }
7,915
Modbus::createServerPort(ModbusInterface*, Modbus::ProtocolType, void const*, bool)
serhmarch[P]ModbusBridge/modbus/src/Modbus.cpp
ModbusServerPort *createServerPort(ModbusInterface *device, ProtocolType type, const void *settings, bool blocking) { ModbusServerPort *serv = nullptr; switch (type) { case RTU: case ASC: { ModbusPort *port = createPort(type, settings, blocking); serv = new ModbusServerResource(port, device); } break; case TCP: { ModbusTcpServer *tcp = new ModbusTcpServer(device); const TcpSettings *s = reinterpret_cast<const TcpSettings*>(settings); tcp->setPort (s->port ); tcp->setTimeout(s->timeout); serv = tcp; } break; } return serv; }
O2
cpp
Modbus::createServerPort(ModbusInterface*, Modbus::ProtocolType, void const*, bool): pushq %r15 pushq %r14 pushq %rbx movq %rdx, %r15 movq %rdi, %r14 xorl %ebx, %ebx cmpl $0x2, %esi jae 0x76ee movzbl %cl, %edx movl %esi, %edi movq %r15, %rsi callq 0x755f movq %rax, %r15 pushq $0x10 popq %rdi callq 0x5320 movq %rax, %rbx movq %rax, %rdi movq %r15, %rsi movq %r14, %rdx callq 0xc420 jmp 0x7720 jne 0x7720 pushq $0x10 popq %rdi callq 0x5320 movq %rax, %rbx movq %rax, %rdi movq %r14, %rsi callq 0x10f5c movzwl 0x8(%r15), %esi movq %rbx, %rdi callq 0xd818 movzwl 0xa(%r15), %esi movq %rbx, %rdi callq 0xd830 movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq jmp 0x772b movq %rax, %r14 pushq $0x10 popq %rsi movq %rbx, %rdi callq 0x5330 movq %r14, %rdi callq 0x5570
_ZN6Modbus16createServerPortEP15ModbusInterfaceNS_12ProtocolTypeEPKvb: push r15 push r14 push rbx mov r15, rdx mov r14, rdi xor ebx, ebx cmp esi, 2 jnb short loc_76EE movzx edx, cl mov edi, esi mov rsi, r15 call _ZN6Modbus10createPortENS_12ProtocolTypeEPKvb; Modbus::createPort(Modbus::ProtocolType,void const*,bool) mov r15, rax push 10h pop rdi; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rdi, rax; this mov rsi, r15; ModbusPort * mov rdx, r14; ModbusInterface * call _ZN20ModbusServerResourceC2EP10ModbusPortP15ModbusInterface; ModbusServerResource::ModbusServerResource(ModbusPort *,ModbusInterface *) jmp short loc_7720 loc_76EE: jnz short loc_7720 push 10h pop rdi; unsigned __int64 call __Znwm; operator new(ulong) mov rbx, rax mov rdi, rax; this mov rsi, r14; ModbusInterface * call _ZN15ModbusTcpServerC2EP15ModbusInterface; ModbusTcpServer::ModbusTcpServer(ModbusInterface *) movzx esi, word ptr [r15+8]; unsigned __int16 mov rdi, rbx; this call _ZN15ModbusTcpServer7setPortEt; ModbusTcpServer::setPort(ushort) movzx esi, word ptr [r15+0Ah]; unsigned int mov rdi, rbx; this call _ZN15ModbusTcpServer10setTimeoutEj; ModbusTcpServer::setTimeout(uint) loc_7720: mov rax, rbx pop rbx pop r14 pop r15 retn jmp short $+2 loc_772B: mov r14, rax push 10h pop rsi; unsigned __int64 mov rdi, rbx; void * call __ZdlPvm; operator delete(void *,ulong) mov rdi, r14 call __Unwind_Resume
ModbusTcpServer * Modbus::createServerPort(ModbusInterface *a1, unsigned int a2, long long a3, bool a4) { ModbusTcpServer *v5; // rbx ModbusPort *Port; // r15 v5 = 0LL; if ( a2 >= 2 ) { if ( a2 == 2 ) { v5 = (ModbusTcpServer *)operator new(0x10uLL); ModbusTcpServer::ModbusTcpServer(v5, a1); ModbusTcpServer::setPort(v5, *(_WORD *)(a3 + 8)); ModbusTcpServer::setTimeout(v5, *(unsigned __int16 *)(a3 + 10)); } } else { Port = Modbus::createPort(a2, a3, a4); v5 = (ModbusTcpServer *)operator new(0x10uLL); ModbusServerResource::ModbusServerResource(v5, Port, a1); } return v5; }
createServerPort: PUSH R15 PUSH R14 PUSH RBX MOV R15,RDX MOV R14,RDI XOR EBX,EBX CMP ESI,0x2 JNC 0x001076ee MOVZX EDX,CL MOV EDI,ESI MOV RSI,R15 CALL 0x0010755f MOV R15,RAX PUSH 0x10 POP RDI CALL 0x00105320 MOV RBX,RAX LAB_001076de: MOV RDI,RAX MOV RSI,R15 MOV RDX,R14 CALL 0x0010c420 LAB_001076ec: JMP 0x00107720 LAB_001076ee: JNZ 0x00107720 PUSH 0x10 POP RDI CALL 0x00105320 MOV RBX,RAX LAB_001076fb: MOV RDI,RAX MOV RSI,R14 CALL 0x00110f5c LAB_00107706: MOVZX ESI,word ptr [R15 + 0x8] MOV RDI,RBX CALL 0x0010d818 MOVZX ESI,word ptr [R15 + 0xa] MOV RDI,RBX CALL 0x0010d830 LAB_00107720: MOV RAX,RBX POP RBX POP R14 POP R15 RET
/* Modbus::createServerPort(ModbusInterface*, Modbus::ProtocolType, void const*, bool) */ ModbusServerResource * Modbus::createServerPort(ModbusInterface *param_1,uint param_2,long param_3,int1 param_4) { ModbusPort *pMVar1; ModbusServerResource *this; this = (ModbusServerResource *)0x0; if (param_2 < 2) { pMVar1 = (ModbusPort *)createPort(param_2,param_3,param_4); this = (ModbusServerResource *)operator_new(0x10); /* try { // try from 001076de to 001076eb has its CatchHandler @ 0010772b */ ModbusServerResource::ModbusServerResource(this,pMVar1,param_1); } else if (param_2 == 2) { this = (ModbusServerResource *)operator_new(0x10); /* try { // try from 001076fb to 00107705 has its CatchHandler @ 00107729 */ ModbusTcpServer::ModbusTcpServer((ModbusTcpServer *)this,param_1); ModbusTcpServer::setPort((ModbusTcpServer *)this,*(ushort *)(param_3 + 8)); ModbusTcpServer::setTimeout((ModbusTcpServer *)this,(uint)*(ushort *)(param_3 + 10)); } return this; }
7,916
Engine::probeTT(unsigned long, int, int&, int, int, chess::Move&)
Razamindset[P]pawnstar-chess-engine/src/engine/tts.cpp
bool Engine::probeTT(uint64_t hash, int depth, int& score, int alpha, int beta, Move& bestMove) { auto it = transpositionTable.find(hash); if (it == transpositionTable.end()) { return false; } const TTEntry& entry = it->second; ttHits++; if (entry.depth >= depth) { score = entry.score; bestMove = entry.bestMove; // Handle differnt entry types if (entry.type == TTEntryType::EXACT) { score = entry.score; return true; } else if (entry.type == TTEntryType::LOWER && entry.score >= beta) { score = entry.score; return true; } else if (entry.type == TTEntryType::UPPER && entry.score <= alpha) { score = entry.score; return true; } } else { // If insufficient depth we can still use the best move bestMove = entry.bestMove; } return false; }
O0
cpp
Engine::probeTT(unsigned long, int, int&, int, int, chess::Move&): pushq %rbp movq %rsp, %rbp subq $0x50, %rsp movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movl %edx, -0x1c(%rbp) movq %rcx, -0x28(%rbp) movl %r8d, -0x2c(%rbp) movl %r9d, -0x30(%rbp) movq -0x10(%rbp), %rdi movq %rdi, -0x50(%rbp) addq $0xd8, %rdi leaq -0x18(%rbp), %rsi callq 0x205e0 movq -0x50(%rbp), %rdi movq %rax, -0x38(%rbp) addq $0xd8, %rdi callq 0x20640 movq %rax, -0x40(%rbp) leaq -0x38(%rbp), %rdi leaq -0x40(%rbp), %rsi callq 0x20610 testb $0x1, %al jne 0x20416 jmp 0x2041f movb $0x0, -0x1(%rbp) jmp 0x204f6 leaq -0x38(%rbp), %rdi callq 0x20670 movq %rax, %rcx movq -0x50(%rbp), %rax addq $0x8, %rcx movq %rcx, -0x48(%rbp) movl 0x110(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x110(%rax) movq -0x48(%rbp), %rax movl 0xc(%rax), %eax cmpl -0x1c(%rbp), %eax jl 0x204e5 movq -0x48(%rbp), %rax movl 0x8(%rax), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movq -0x48(%rbp), %rcx movq 0x10(%rbp), %rax movl 0x14(%rcx), %ecx movl %ecx, (%rax) movq -0x48(%rbp), %rax cmpl $0x0, 0x10(%rax) jne 0x2048d movq -0x48(%rbp), %rax movl 0x8(%rax), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x204f6 movq -0x48(%rbp), %rax cmpl $0x1, 0x10(%rax) jne 0x204b6 movq -0x48(%rbp), %rax movl 0x8(%rax), %eax cmpl -0x30(%rbp), %eax jl 0x204b6 movq -0x48(%rbp), %rax movl 0x8(%rax), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x204f6 movq -0x48(%rbp), %rax cmpl $0x2, 0x10(%rax) jne 0x204df movq -0x48(%rbp), %rax movl 0x8(%rax), %eax cmpl -0x2c(%rbp), %eax jg 0x204df movq -0x48(%rbp), %rax movl 0x8(%rax), %ecx movq -0x28(%rbp), %rax movl %ecx, (%rax) movb $0x1, -0x1(%rbp) jmp 0x204f6 jmp 0x204e1 jmp 0x204e3 jmp 0x204f2 movq -0x48(%rbp), %rcx movq 0x10(%rbp), %rax movl 0x14(%rcx), %ecx movl %ecx, (%rax) movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x50, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN6Engine7probeTTEmiRiiiRN5chess4MoveE: push rbp mov rbp, rsp sub rsp, 50h mov rax, [rbp+arg_0] mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_1C], edx mov [rbp+var_28], rcx mov [rbp+var_2C], r8d mov [rbp+var_30], r9d mov rdi, [rbp+var_10] mov [rbp+var_50], rdi add rdi, 0D8h lea rsi, [rbp+var_18] call _ZNSt13unordered_mapIm7TTEntrySt4hashImESt8equal_toImESaISt4pairIKmS0_EEE4findERS6_; std::unordered_map<ulong,TTEntry>::find(ulong const&) mov rdi, [rbp+var_50] mov [rbp+var_38], rax add rdi, 0D8h call _ZNSt13unordered_mapIm7TTEntrySt4hashImESt8equal_toImESaISt4pairIKmS0_EEE3endEv; std::unordered_map<ulong,TTEntry>::end(void) loc_203FF: mov [rbp+var_40], rax lea rdi, [rbp+var_38] lea rsi, [rbp+var_40] call _ZNSt8__detaileqERKNS_19_Node_iterator_baseISt4pairIKm7TTEntryELb0EEES7_; std::__detail::operator==(std::__detail::_Node_iterator_base<std::pair<ulong const,TTEntry>,false> const&,std::__detail::_Node_iterator_base<std::pair<ulong const,TTEntry>,false> const&) test al, 1 jnz short loc_20416 jmp short loc_2041F loc_20416: mov [rbp+var_1], 0 jmp loc_204F6 loc_2041F: lea rdi, [rbp+var_38] call _ZNKSt8__detail14_Node_iteratorISt4pairIKm7TTEntryELb0ELb0EEptEv; std::__detail::_Node_iterator<std::pair<ulong const,TTEntry>,false,false>::operator->(void) mov rcx, rax mov rax, [rbp+var_50] add rcx, 8 mov [rbp+var_48], rcx mov ecx, [rax+110h] add ecx, 1 mov [rax+110h], ecx mov rax, [rbp+var_48] mov eax, [rax+0Ch] cmp eax, [rbp+var_1C] jl loc_204E5 mov rax, [rbp+var_48] mov ecx, [rax+8] mov rax, [rbp+var_28] mov [rax], ecx mov rcx, [rbp+var_48] mov rax, [rbp+arg_0] mov ecx, [rcx+14h] mov [rax], ecx mov rax, [rbp+var_48] cmp dword ptr [rax+10h], 0 jnz short loc_2048D mov rax, [rbp+var_48] mov ecx, [rax+8] mov rax, [rbp+var_28] mov [rax], ecx mov [rbp+var_1], 1 jmp short loc_204F6 loc_2048D: mov rax, [rbp+var_48] cmp dword ptr [rax+10h], 1 jnz short loc_204B6 mov rax, [rbp+var_48] mov eax, [rax+8] cmp eax, [rbp+var_30] jl short loc_204B6 mov rax, [rbp+var_48] mov ecx, [rax+8] mov rax, [rbp+var_28] mov [rax], ecx mov [rbp+var_1], 1 jmp short loc_204F6 loc_204B6: mov rax, [rbp+var_48] cmp dword ptr [rax+10h], 2 jnz short loc_204DF mov rax, [rbp+var_48] mov eax, [rax+8] cmp eax, [rbp+var_2C] jg short loc_204DF mov rax, [rbp+var_48] mov ecx, [rax+8] mov rax, [rbp+var_28] mov [rax], ecx mov [rbp+var_1], 1 jmp short loc_204F6 loc_204DF: jmp short $+2 loc_204E1: jmp short $+2 loc_204E3: jmp short loc_204F2 loc_204E5: mov rcx, [rbp+var_48] mov rax, [rbp+arg_0] mov ecx, [rcx+14h] mov [rax], ecx loc_204F2: mov [rbp+var_1], 0 loc_204F6: mov al, [rbp+var_1] and al, 1 add rsp, 50h pop rbp retn
char Engine::probeTT(Engine *this, long long a2, int a3, int *a4, int a5, int a6, chess::Move *a7) { _DWORD *v7; // rax long long v9; // [rsp+10h] [rbp-40h] BYREF long long v10; // [rsp+18h] [rbp-38h] BYREF int v11; // [rsp+20h] [rbp-30h] int v12; // [rsp+24h] [rbp-2Ch] int *v13; // [rsp+28h] [rbp-28h] int v14; // [rsp+34h] [rbp-1Ch] _QWORD v15[2]; // [rsp+38h] [rbp-18h] BYREF v15[1] = this; v15[0] = a2; v14 = a3; v13 = a4; v12 = a5; v11 = a6; v10 = std::unordered_map<unsigned long,TTEntry>::find((char *)this + 216, v15); v9 = std::unordered_map<unsigned long,TTEntry>::end((char *)this + 216); if ( (std::__detail::operator==(&v10, &v9) & 1) == 0 ) { v7 = (_DWORD *)std::__detail::_Node_iterator<std::pair<unsigned long const,TTEntry>,false,false>::operator->(&v10); ++*((_DWORD *)this + 68); if ( v7[5] < v14 ) { *(_DWORD *)a7 = v7[7]; } else { *v13 = v7[4]; *(_DWORD *)a7 = v7[7]; if ( !v7[6] ) { *v13 = v7[4]; return 1; } if ( v7[6] == 1 && v7[4] >= v11 ) { *v13 = v7[4]; return 1; } if ( v7[6] == 2 && v7[4] <= v12 ) { *v13 = v7[4]; return 1; } } return 0; } return 0; }
probeTT: PUSH RBP MOV RBP,RSP SUB RSP,0x50 MOV RAX,qword ptr [RBP + 0x10] 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 dword ptr [RBP + -0x2c],R8D MOV dword ptr [RBP + -0x30],R9D MOV RDI,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x50],RDI ADD RDI,0xd8 LEA RSI,[RBP + -0x18] CALL 0x001205e0 MOV RDI,qword ptr [RBP + -0x50] MOV qword ptr [RBP + -0x38],RAX ADD RDI,0xd8 CALL 0x00120640 MOV qword ptr [RBP + -0x40],RAX LEA RDI,[RBP + -0x38] LEA RSI,[RBP + -0x40] CALL 0x00120610 TEST AL,0x1 JNZ 0x00120416 JMP 0x0012041f LAB_00120416: MOV byte ptr [RBP + -0x1],0x0 JMP 0x001204f6 LAB_0012041f: LEA RDI,[RBP + -0x38] CALL 0x00120670 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x50] ADD RCX,0x8 MOV qword ptr [RBP + -0x48],RCX MOV ECX,dword ptr [RAX + 0x110] ADD ECX,0x1 MOV dword ptr [RAX + 0x110],ECX MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0xc] CMP EAX,dword ptr [RBP + -0x1c] JL 0x001204e5 MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + 0x10] MOV ECX,dword ptr [RCX + 0x14] MOV dword ptr [RAX],ECX MOV RAX,qword ptr [RBP + -0x48] CMP dword ptr [RAX + 0x10],0x0 JNZ 0x0012048d MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV byte ptr [RBP + -0x1],0x1 JMP 0x001204f6 LAB_0012048d: MOV RAX,qword ptr [RBP + -0x48] CMP dword ptr [RAX + 0x10],0x1 JNZ 0x001204b6 MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x8] CMP EAX,dword ptr [RBP + -0x30] JL 0x001204b6 MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV byte ptr [RBP + -0x1],0x1 JMP 0x001204f6 LAB_001204b6: MOV RAX,qword ptr [RBP + -0x48] CMP dword ptr [RAX + 0x10],0x2 JNZ 0x001204df MOV RAX,qword ptr [RBP + -0x48] MOV EAX,dword ptr [RAX + 0x8] CMP EAX,dword ptr [RBP + -0x2c] JG 0x001204df MOV RAX,qword ptr [RBP + -0x48] MOV ECX,dword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x28] MOV dword ptr [RAX],ECX MOV byte ptr [RBP + -0x1],0x1 JMP 0x001204f6 LAB_001204df: JMP 0x001204e1 LAB_001204e1: JMP 0x001204e3 LAB_001204e3: JMP 0x001204f2 LAB_001204e5: MOV RCX,qword ptr [RBP + -0x48] MOV RAX,qword ptr [RBP + 0x10] MOV ECX,dword ptr [RCX + 0x14] MOV dword ptr [RAX],ECX LAB_001204f2: MOV byte ptr [RBP + -0x1],0x0 LAB_001204f6: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x50 POP RBP RET
/* Engine::probeTT(unsigned long, int, int&, int, int, chess::Move&) */ int1 __thiscall Engine::probeTT(Engine *this,ulong param_1,int param_2,int *param_3,int param_4,int param_5, Move *param_6) { ulong uVar1; long lVar2; int8 local_48; int8 local_40; int local_38; int local_34; int *local_30; int local_24; ulong local_20; Engine *local_18; local_38 = param_5; local_34 = param_4; local_30 = param_3; local_24 = param_2; local_20 = param_1; local_18 = this; local_40 = std:: unordered_map<unsigned_long,TTEntry,std::hash<unsigned_long>,std::equal_to<unsigned_long>,std::allocator<std::pair<unsigned_long_const,TTEntry>>> ::find((unordered_map<unsigned_long,TTEntry,std::hash<unsigned_long>,std::equal_to<unsigned_long>,std::allocator<std::pair<unsigned_long_const,TTEntry>>> *)(this + 0xd8),&local_20); local_48 = std:: unordered_map<unsigned_long,TTEntry,std::hash<unsigned_long>,std::equal_to<unsigned_long>,std::allocator<std::pair<unsigned_long_const,TTEntry>>> ::end(); uVar1 = std::__detail::operator== ((_Node_iterator_base *)&local_40,(_Node_iterator_base *)&local_48); if ((uVar1 & 1) != 0) { return 0; } lVar2 = std::__detail::_Node_iterator<std::pair<unsigned_long_const,TTEntry>,false,false>:: operator->((_Node_iterator<std::pair<unsigned_long_const,TTEntry>,false,false> *)&local_40 ); *(int *)(this + 0x110) = *(int *)(this + 0x110) + 1; if (*(int *)(lVar2 + 0x14) < local_24) { *(int4 *)param_6 = *(int4 *)(lVar2 + 0x1c); } else { *local_30 = *(int *)(lVar2 + 0x10); *(int4 *)param_6 = *(int4 *)(lVar2 + 0x1c); if (*(int *)(lVar2 + 0x18) == 0) { *local_30 = *(int *)(lVar2 + 0x10); return 1; } if ((*(int *)(lVar2 + 0x18) == 1) && (local_38 <= *(int *)(lVar2 + 0x10))) { *local_30 = *(int *)(lVar2 + 0x10); return 1; } if ((*(int *)(lVar2 + 0x18) == 2) && (*(int *)(lVar2 + 0x10) <= local_34)) { *local_30 = *(int *)(lVar2 + 0x10); return 1; } } return 0; }
7,917
Engine::probeTT(unsigned long, int, int&, int, int, chess::Move&)
Razamindset[P]pawnstar-chess-engine/src/engine/tts.cpp
bool Engine::probeTT(uint64_t hash, int depth, int& score, int alpha, int beta, Move& bestMove) { auto it = transpositionTable.find(hash); if (it == transpositionTable.end()) { return false; } const TTEntry& entry = it->second; ttHits++; if (entry.depth >= depth) { score = entry.score; bestMove = entry.bestMove; // Handle differnt entry types if (entry.type == TTEntryType::EXACT) { score = entry.score; return true; } else if (entry.type == TTEntryType::LOWER && entry.score >= beta) { score = entry.score; return true; } else if (entry.type == TTEntryType::UPPER && entry.score <= alpha) { score = entry.score; return true; } } else { // If insufficient depth we can still use the best move bestMove = entry.bestMove; } return false; }
O1
cpp
Engine::probeTT(unsigned long, int, int&, int, int, chess::Move&): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %edx, %r10d movq 0xd8(%rdi), %rbx movq 0xe0(%rdi), %r14 xorl %r12d, %r12d movq %rsi, %rax xorl %edx, %edx divq %r14 movq (%rbx,%rdx,8), %rax testq %rax, %rax je 0xce88 movq (%rax), %r15 movq %rax, %r12 cmpq %rsi, 0x8(%r15) je 0xce88 movq %rdx, %r11 movq %r15, %r13 movq (%r15), %r15 testq %r15, %r15 je 0xce85 movq 0x8(%r15), %rbx movq %rbx, %rax xorl %edx, %edx divq %r14 movl $0x0, %r12d cmpq %r11, %rdx jne 0xce88 movq %r13, %r12 cmpq %rsi, %rbx jne 0xce59 jmp 0xce88 xorl %r12d, %r12d testq %r12, %r12 je 0xce93 movq (%r12), %rax jmp 0xce95 xorl %eax, %eax testq %rax, %rax je 0xceb0 incl 0x110(%rdi) movq 0x30(%rsp), %rdx cmpl %r10d, 0x1c(%rax) jge 0xcebc movl 0x24(%rax), %eax movl %eax, (%rdx) xorl %eax, %eax popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq movl 0x18(%rax), %esi movl %esi, (%rcx) movl 0x24(%rax), %esi movl %esi, (%rdx) movl 0x20(%rax), %edx cmpl $0x2, %edx je 0xcee9 cmpl $0x1, %edx je 0xcedc testl %edx, %edx jne 0xceb0 movl 0x18(%rax), %eax jmp 0xcef1 movl 0x18(%rax), %esi cmpl %r9d, %esi jge 0xcef5 cmpl $0x2, %edx jne 0xceb0 movl 0x18(%rax), %eax cmpl %r8d, %eax jg 0xceb0 movl %eax, (%rcx) jmp 0xcef7 movl %esi, (%rcx) movb $0x1, %al jmp 0xceb2 nop
_ZN6Engine7probeTTEmiRiiiRN5chess4MoveE: push r15 push r14 push r13 push r12 push rbx mov r10d, edx mov rbx, [rdi+0D8h] mov r14, [rdi+0E0h] xor r12d, r12d mov rax, rsi xor edx, edx div r14 mov rax, [rbx+rdx*8] test rax, rax jz short loc_CE88 mov r15, [rax] mov r12, rax cmp [r15+8], rsi jz short loc_CE88 mov r11, rdx loc_CE59: mov r13, r15 mov r15, [r15] test r15, r15 jz short loc_CE85 mov rbx, [r15+8] mov rax, rbx xor edx, edx div r14 mov r12d, 0 cmp rdx, r11 jnz short loc_CE88 mov r12, r13 cmp rbx, rsi jnz short loc_CE59 jmp short loc_CE88 loc_CE85: xor r12d, r12d loc_CE88: test r12, r12 jz short loc_CE93 mov rax, [r12] jmp short loc_CE95 loc_CE93: xor eax, eax loc_CE95: test rax, rax jz short loc_CEB0 inc dword ptr [rdi+110h] mov rdx, [rsp+28h+arg_0] cmp [rax+1Ch], r10d jge short loc_CEBC mov eax, [rax+24h] mov [rdx], eax loc_CEB0: xor eax, eax loc_CEB2: pop rbx pop r12 pop r13 pop r14 pop r15 retn loc_CEBC: mov esi, [rax+18h] mov [rcx], esi mov esi, [rax+24h] mov [rdx], esi mov edx, [rax+20h] cmp edx, 2 jz short loc_CEE9 cmp edx, 1 jz short loc_CEDC test edx, edx jnz short loc_CEB0 mov eax, [rax+18h] jmp short loc_CEF1 loc_CEDC: mov esi, [rax+18h] cmp esi, r9d jge short loc_CEF5 cmp edx, 2 jnz short loc_CEB0 loc_CEE9: mov eax, [rax+18h] cmp eax, r8d jg short loc_CEB0 loc_CEF1: mov [rcx], eax jmp short loc_CEF7 loc_CEF5: mov [rcx], esi loc_CEF7: mov al, 1 jmp short loc_CEB2
char Engine::probeTT(long long a1, unsigned long long a2, int a3, _DWORD *a4, int a5, int a6, _DWORD *a7) { unsigned long long v7; // r14 _QWORD *v8; // r12 long long v9; // rax _QWORD *v10; // r15 _QWORD *v11; // r13 _DWORD *v12; // rax int v14; // edx int v15; // eax int v16; // esi v7 = *(_QWORD *)(a1 + 224); v8 = 0LL; v9 = *(_QWORD *)(*(_QWORD *)(a1 + 216) + 8 * (a2 % v7)); if ( v9 ) { v10 = *(_QWORD **)v9; v8 = *(_QWORD **)(*(_QWORD *)(a1 + 216) + 8 * (a2 % v7)); if ( *(_QWORD *)(*(_QWORD *)v9 + 8LL) != a2 ) { while ( 1 ) { v11 = v10; v10 = (_QWORD *)*v10; if ( !v10 ) break; v8 = 0LL; if ( v10[1] % v7 == a2 % v7 ) { v8 = v11; if ( v10[1] != a2 ) continue; } goto LABEL_8; } v8 = 0LL; } } LABEL_8: if ( v8 ) v12 = (_DWORD *)*v8; else v12 = 0LL; if ( !v12 ) return 0; ++*(_DWORD *)(a1 + 272); if ( v12[7] < a3 ) { *a7 = v12[9]; return 0; } *a4 = v12[6]; *a7 = v12[9]; v14 = v12[8]; if ( v14 == 2 ) { v15 = v12[6]; if ( v15 > a5 ) return 0; LABEL_22: *a4 = v15; return 1; } if ( v14 != 1 ) { if ( v14 ) return 0; v15 = v12[6]; goto LABEL_22; } v16 = v12[6]; if ( v16 < a6 ) return 0; *a4 = v16; return 1; }
probeTT: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV R10D,EDX MOV RBX,qword ptr [RDI + 0xd8] MOV R14,qword ptr [RDI + 0xe0] XOR R12D,R12D MOV RAX,RSI XOR EDX,EDX DIV R14 MOV RAX,qword ptr [RBX + RDX*0x8] TEST RAX,RAX JZ 0x0010ce88 MOV R15,qword ptr [RAX] MOV R12,RAX CMP qword ptr [R15 + 0x8],RSI JZ 0x0010ce88 MOV R11,RDX LAB_0010ce59: MOV R13,R15 MOV R15,qword ptr [R15] TEST R15,R15 JZ 0x0010ce85 MOV RBX,qword ptr [R15 + 0x8] MOV RAX,RBX XOR EDX,EDX DIV R14 MOV R12D,0x0 CMP RDX,R11 JNZ 0x0010ce88 MOV R12,R13 CMP RBX,RSI JNZ 0x0010ce59 JMP 0x0010ce88 LAB_0010ce85: XOR R12D,R12D LAB_0010ce88: TEST R12,R12 JZ 0x0010ce93 MOV RAX,qword ptr [R12] JMP 0x0010ce95 LAB_0010ce93: XOR EAX,EAX LAB_0010ce95: TEST RAX,RAX JZ 0x0010ceb0 INC dword ptr [RDI + 0x110] MOV RDX,qword ptr [RSP + 0x30] CMP dword ptr [RAX + 0x1c],R10D JGE 0x0010cebc MOV EAX,dword ptr [RAX + 0x24] MOV dword ptr [RDX],EAX LAB_0010ceb0: XOR EAX,EAX LAB_0010ceb2: POP RBX POP R12 POP R13 POP R14 POP R15 RET LAB_0010cebc: MOV ESI,dword ptr [RAX + 0x18] MOV dword ptr [RCX],ESI MOV ESI,dword ptr [RAX + 0x24] MOV dword ptr [RDX],ESI MOV EDX,dword ptr [RAX + 0x20] CMP EDX,0x2 JZ 0x0010cee9 CMP EDX,0x1 JZ 0x0010cedc TEST EDX,EDX JNZ 0x0010ceb0 MOV EAX,dword ptr [RAX + 0x18] JMP 0x0010cef1 LAB_0010cedc: MOV ESI,dword ptr [RAX + 0x18] CMP ESI,R9D JGE 0x0010cef5 CMP EDX,0x2 JNZ 0x0010ceb0 LAB_0010cee9: MOV EAX,dword ptr [RAX + 0x18] CMP EAX,R8D JG 0x0010ceb0 LAB_0010cef1: MOV dword ptr [RCX],EAX JMP 0x0010cef7 LAB_0010cef5: MOV dword ptr [RCX],ESI LAB_0010cef7: MOV AL,0x1 JMP 0x0010ceb2
/* Engine::probeTT(unsigned long, int, int&, int, int, chess::Move&) */ int8 __thiscall Engine::probeTT(Engine *this,ulong param_1,int param_2,int *param_3,int param_4,int param_5, Move *param_6) { int iVar1; uint uVar2; ulong *puVar3; ulong uVar4; ulong *puVar5; ulong *puVar6; uVar4 = param_1 % *(ulong *)(this + 0xe0); puVar3 = *(ulong **)(*(long *)(this + 0xd8) + uVar4 * 8); puVar5 = (ulong *)0x0; if ((puVar3 != (ulong *)0x0) && (puVar6 = (ulong *)*puVar3, puVar5 = puVar3, puVar6[1] != param_1) ) { while (puVar3 = (ulong *)*puVar6, puVar3 != (ulong *)0x0) { puVar5 = (ulong *)0x0; if ((puVar3[1] % *(ulong *)(this + 0xe0) != uVar4) || (puVar5 = puVar6, puVar6 = puVar3, puVar3[1] == param_1)) goto LAB_0010ce88; } puVar5 = (ulong *)0x0; } LAB_0010ce88: if (puVar5 == (ulong *)0x0) { uVar4 = 0; } else { uVar4 = *puVar5; } if (uVar4 == 0) { return 0; } *(int *)(this + 0x110) = *(int *)(this + 0x110) + 1; if (*(int *)(uVar4 + 0x1c) < param_2) { *(int4 *)param_6 = *(int4 *)(uVar4 + 0x24); return 0; } *param_3 = *(int *)(uVar4 + 0x18); *(int4 *)param_6 = *(int4 *)(uVar4 + 0x24); iVar1 = *(int *)(uVar4 + 0x20); if (iVar1 == 2) { uVar2 = *(uint *)(uVar4 + 0x18); if (param_4 < (int)uVar2) { return 0; } } else { if (iVar1 == 1) { if (*(int *)(uVar4 + 0x18) < param_5) { return 0; } *param_3 = *(int *)(uVar4 + 0x18); goto LAB_0010cef7; } if (iVar1 != 0) { return 0; } uVar2 = *(uint *)(uVar4 + 0x18); } uVar4 = (ulong)uVar2; *param_3 = uVar2; LAB_0010cef7: return CONCAT71((int7)(uVar4 >> 8),1); }
7,918
Engine::probeTT(unsigned long, int, int&, int, int, chess::Move&)
Razamindset[P]pawnstar-chess-engine/src/engine/tts.cpp
bool Engine::probeTT(uint64_t hash, int depth, int& score, int alpha, int beta, Move& bestMove) { auto it = transpositionTable.find(hash); if (it == transpositionTable.end()) { return false; } const TTEntry& entry = it->second; ttHits++; if (entry.depth >= depth) { score = entry.score; bestMove = entry.bestMove; // Handle differnt entry types if (entry.type == TTEntryType::EXACT) { score = entry.score; return true; } else if (entry.type == TTEntryType::LOWER && entry.score >= beta) { score = entry.score; return true; } else if (entry.type == TTEntryType::UPPER && entry.score <= alpha) { score = entry.score; return true; } } else { // If insufficient depth we can still use the best move bestMove = entry.bestMove; } return false; }
O3
cpp
Engine::probeTT(unsigned long, int, int&, int, int, chess::Move&): pushq %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x10, %rsp movl %r9d, %ebp movl %r8d, %r14d movq %rcx, %rbx movl %edx, %r15d movq %rdi, %r12 leaq 0x8(%rsp), %rax movq %rsi, (%rax) addq $0xd8, %rdi movq %rax, %rsi callq 0xbbf0 testq %rax, %rax je 0xbb2b incl 0x110(%r12) movq 0x40(%rsp), %rcx cmpl %r15d, 0x1c(%rax) jge 0xbb3a movl 0x24(%rax), %eax movl %eax, (%rcx) xorl %eax, %eax addq $0x10, %rsp popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp retq movl 0x18(%rax), %edx movl %edx, (%rbx) movl 0x24(%rax), %edx movl %edx, (%rcx) movl 0x20(%rax), %ecx cmpl $0x2, %ecx je 0xbb63 cmpl $0x1, %ecx je 0xbb5a testl %ecx, %ecx jne 0xbb2b movl 0x18(%rax), %eax jmp 0xbb6b movl 0x18(%rax), %eax cmpl %ebp, %eax jl 0xbb2b jmp 0xbb6b movl 0x18(%rax), %eax cmpl %r14d, %eax jg 0xbb2b movl %eax, (%rbx) movb $0x1, %al jmp 0xbb2d nop
_ZN6Engine7probeTTEmiRiiiRN5chess4MoveE: push rbp push r15 push r14 push r12 push rbx sub rsp, 10h mov ebp, r9d mov r14d, r8d mov rbx, rcx mov r15d, edx mov r12, rdi lea rax, [rsp+38h+var_30] mov [rax], rsi add rdi, 0D8h mov rsi, rax call _ZNSt10_HashtableImSt4pairIKm7TTEntryESaIS3_ENSt8__detail10_Select1stESt8equal_toImESt4hashImENS5_18_Mod_range_hashingENS5_20_Default_ranged_hashENS5_20_Prime_rehash_policyENS5_17_Hashtable_traitsILb0ELb0ELb1EEEE4findERS1_; std::_Hashtable<ulong,std::pair<ulong const,TTEntry>,std::allocator<std::pair<ulong const,TTEntry>>,std::__detail::_Select1st,std::equal_to<ulong>,std::hash<ulong>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find(ulong const&) test rax, rax jz short loc_BB2B inc dword ptr [r12+110h] mov rcx, [rsp+38h+arg_0] cmp [rax+1Ch], r15d jge short loc_BB3A mov eax, [rax+24h] mov [rcx], eax loc_BB2B: xor eax, eax loc_BB2D: add rsp, 10h pop rbx pop r12 pop r14 pop r15 pop rbp retn loc_BB3A: mov edx, [rax+18h] mov [rbx], edx mov edx, [rax+24h] mov [rcx], edx mov ecx, [rax+20h] cmp ecx, 2 jz short loc_BB63 cmp ecx, 1 jz short loc_BB5A test ecx, ecx jnz short loc_BB2B mov eax, [rax+18h] jmp short loc_BB6B loc_BB5A: mov eax, [rax+18h] cmp eax, ebp jl short loc_BB2B jmp short loc_BB6B loc_BB63: mov eax, [rax+18h] cmp eax, r14d jg short loc_BB2B loc_BB6B: mov [rbx], eax mov al, 1 jmp short loc_BB2D
char Engine::probeTT(long long a1, long long a2, int a3, _DWORD *a4, int a5, int a6, _DWORD *a7) { _DWORD *v11; // rax int v13; // ecx int v14; // eax _QWORD v15[6]; // [rsp+8h] [rbp-30h] BYREF v15[0] = a2; v11 = (_DWORD *)std::_Hashtable<unsigned long,std::pair<unsigned long const,TTEntry>,std::allocator<std::pair<unsigned long const,TTEntry>>,std::__detail::_Select1st,std::equal_to<unsigned long>,std::hash<unsigned long>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>>::find( a1 + 216, v15); if ( !v11 ) return 0; ++*(_DWORD *)(a1 + 272); if ( v11[7] < a3 ) { *a7 = v11[9]; return 0; } *a4 = v11[6]; *a7 = v11[9]; v13 = v11[8]; if ( v13 == 2 ) { v14 = v11[6]; if ( v14 > a5 ) return 0; } else if ( v13 == 1 ) { v14 = v11[6]; if ( v14 < a6 ) return 0; } else { if ( v13 ) return 0; v14 = v11[6]; } *a4 = v14; return 1; }
probeTT: PUSH RBP PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x10 MOV EBP,R9D MOV R14D,R8D MOV RBX,RCX MOV R15D,EDX MOV R12,RDI LEA RAX,[RSP + 0x8] MOV qword ptr [RAX],RSI ADD RDI,0xd8 MOV RSI,RAX CALL 0x0010bbf0 TEST RAX,RAX JZ 0x0010bb2b INC dword ptr [R12 + 0x110] MOV RCX,qword ptr [RSP + 0x40] CMP dword ptr [RAX + 0x1c],R15D JGE 0x0010bb3a MOV EAX,dword ptr [RAX + 0x24] MOV dword ptr [RCX],EAX LAB_0010bb2b: XOR EAX,EAX LAB_0010bb2d: ADD RSP,0x10 POP RBX POP R12 POP R14 POP R15 POP RBP RET LAB_0010bb3a: MOV EDX,dword ptr [RAX + 0x18] MOV dword ptr [RBX],EDX MOV EDX,dword ptr [RAX + 0x24] MOV dword ptr [RCX],EDX MOV ECX,dword ptr [RAX + 0x20] CMP ECX,0x2 JZ 0x0010bb63 CMP ECX,0x1 JZ 0x0010bb5a TEST ECX,ECX JNZ 0x0010bb2b MOV EAX,dword ptr [RAX + 0x18] JMP 0x0010bb6b LAB_0010bb5a: MOV EAX,dword ptr [RAX + 0x18] CMP EAX,EBP JL 0x0010bb2b JMP 0x0010bb6b LAB_0010bb63: MOV EAX,dword ptr [RAX + 0x18] CMP EAX,R14D JG 0x0010bb2b LAB_0010bb6b: MOV dword ptr [RBX],EAX MOV AL,0x1 JMP 0x0010bb2d
/* Engine::probeTT(unsigned long, int, int&, int, int, chess::Move&) */ int8 __thiscall Engine::probeTT(Engine *this,ulong param_1,int param_2,int *param_3,int param_4,int param_5, Move *param_6) { int iVar1; long lVar2; ulong uVar3; ulong local_30; local_30 = param_1; lVar2 = std:: _Hashtable<unsigned_long,std::pair<unsigned_long_const,TTEntry>,std::allocator<std::pair<unsigned_long_const,TTEntry>>,std::__detail::_Select1st,std::equal_to<unsigned_long>,std::hash<unsigned_long>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> ::find((_Hashtable<unsigned_long,std::pair<unsigned_long_const,TTEntry>,std::allocator<std::pair<unsigned_long_const,TTEntry>>,std::__detail::_Select1st,std::equal_to<unsigned_long>,std::hash<unsigned_long>,std::__detail::_Mod_range_hashing,std::__detail::_Default_ranged_hash,std::__detail::_Prime_rehash_policy,std::__detail::_Hashtable_traits<false,false,true>> *)(this + 0xd8),&local_30); if (lVar2 != 0) { *(int *)(this + 0x110) = *(int *)(this + 0x110) + 1; if (*(int *)(lVar2 + 0x1c) < param_2) { *(int4 *)param_6 = *(int4 *)(lVar2 + 0x24); } else { *param_3 = *(int *)(lVar2 + 0x18); *(int4 *)param_6 = *(int4 *)(lVar2 + 0x24); iVar1 = *(int *)(lVar2 + 0x20); if (iVar1 == 2) { uVar3 = (ulong)*(uint *)(lVar2 + 0x18); if ((int)*(uint *)(lVar2 + 0x18) <= param_4) goto LAB_0010bb6b; } else if (iVar1 == 1) { uVar3 = (ulong)*(uint *)(lVar2 + 0x18); if (param_5 <= (int)*(uint *)(lVar2 + 0x18)) goto LAB_0010bb6b; } else if (iVar1 == 0) { uVar3 = (ulong)*(uint *)(lVar2 + 0x18); LAB_0010bb6b: *param_3 = (int)uVar3; return CONCAT71((int7)(uVar3 >> 8),1); } } } return 0; }
7,919
my_init
eloqsql/mysys/my_init.c
my_bool my_init(void) { char *str; if (my_init_done) return 0; my_init_done= 1; mysys_usage_id++; my_umask= 0660; /* Default umask for new files */ my_umask_dir= 0700; /* Default umask for new directories */ my_global_flags= 0; /* Default creation of new files */ if ((str= getenv("UMASK")) != 0) my_umask= (int) (atoi_octal(str) | 0600); /* Default creation of new dir's */ if ((str= getenv("UMASK_DIR")) != 0) my_umask_dir= (int) (atoi_octal(str) | 0700); init_glob_errs(); instrumented_stdin.m_file= stdin; instrumented_stdin.m_psi= NULL; /* not yet instrumented */ mysql_stdin= & instrumented_stdin; my_progname_short= "unknown"; if (my_progname) my_progname_short= my_progname + dirname_length(my_progname); /* Initialize our mutex handling */ my_mutex_init(); if (my_thread_global_init()) return 1; #if defined(SAFEMALLOC) && !defined(DBUG_OFF) dbug_sanity= sf_sanity; #endif /* $HOME is needed early to parse configuration files located in ~/ */ if ((home_dir= getenv("HOME")) != 0) home_dir= intern_filename(home_dir_buff, home_dir); { DBUG_ENTER("my_init"); DBUG_PROCESS((char*) (my_progname ? my_progname : "unknown")); my_time_init(); my_win_init(); DBUG_PRINT("exit", ("home: '%s'", home_dir)); #ifdef _WIN32 if (win32_init_tcp_ip()) DBUG_RETURN(1); #endif #ifdef CHECK_UNLIKELY init_my_likely(); #endif DBUG_RETURN(0); } }
O3
c
my_init: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx leaq 0x36ce4a(%rip), %rax # 0x3f0b28 cmpb $0x0, (%rax) je 0x83cea xorl %eax, %eax jmp 0x83dd2 leaq 0x36ce3b(%rip), %rcx # 0x3f0b2c incl (%rcx) movb $0x1, (%rax) leaq 0x2ebdcb(%rip), %r14 # 0x36fac8 movl $0x1b0, (%r14) # imm = 0x1B0 leaq 0x2ebdc1(%rip), %rbx # 0x36facc movl $0x1c0, (%rbx) # imm = 0x1C0 leaq 0x36d2e0(%rip), %rax # 0x3f0ff8 movq $0x0, (%rax) leaq 0x3d160(%rip), %rdi # 0xc0e86 callq 0x3a8c0 testq %rax, %rax je 0x83d40 movq %rax, %rdi callq 0x83e0e orl $0x180, %eax # imm = 0x180 movl %eax, (%r14) leaq 0x3d145(%rip), %rdi # 0xc0e8c callq 0x3a8c0 testq %rax, %rax je 0x83d60 movq %rax, %rdi callq 0x83e0e orl $0x1c0, %eax # imm = 0x1C0 movl %eax, (%rbx) callq 0x87eac movq 0x2e8284(%rip), %rax # 0x36bff0 movq (%rax), %rax movq %rax, 0x36cdc2(%rip) # 0x3f0b38 leaq 0x36cdbb(%rip), %rax # 0x3f0b38 movq $0x0, 0x36cdb8(%rip) # 0x3f0b40 leaq 0x36cda1(%rip), %rcx # 0x3f0b30 movq %rax, (%rcx) leaq 0x39d55(%rip), %rax # 0xbdaee leaq 0x36ce38(%rip), %r14 # 0x3f0bd8 movq %rax, (%r14) leaq 0x36ce26(%rip), %rax # 0x3f0bd0 movq (%rax), %rbx testq %rbx, %rbx je 0x83dc0 movq %rbx, %rdi callq 0x7acf4 addq %rbx, %rax movq %rax, (%r14) callq 0x86298 callq 0x85e60 movl %eax, %ecx movb $0x1, %al testb %cl, %cl je 0x83dd7 popq %rbx popq %r14 popq %rbp retq leaq 0x3c181(%rip), %rdi # 0xbff5f callq 0x3a8c0 leaq 0x36cdde(%rip), %rbx # 0x3f0bc8 movq %rax, (%rbx) testq %rax, %rax je 0x83e04 leaq 0x36cfe7(%rip), %rdi # 0x3f0de0 movq %rax, %rsi callq 0x7e699 movq %rax, (%rbx) callq 0x88940 jmp 0x83ce3
my_init: push rbp mov rbp, rsp push r14 push rbx lea rax, my_init_done cmp byte ptr [rax], 0 jz short loc_83CEA loc_83CE3: xor eax, eax jmp loc_83DD2 loc_83CEA: lea rcx, mysys_usage_id inc dword ptr [rcx] mov byte ptr [rax], 1 lea r14, my_umask mov dword ptr [r14], 1B0h lea rbx, my_umask_dir mov dword ptr [rbx], 1C0h lea rax, my_global_flags mov qword ptr [rax], 0 lea rdi, aUmask; "UMASK" call _getenv test rax, rax jz short loc_83D40 mov rdi, rax call atoi_octal or eax, 180h mov [r14], eax loc_83D40: lea rdi, aUmaskDir; "UMASK_DIR" call _getenv test rax, rax jz short loc_83D60 mov rdi, rax call atoi_octal or eax, 1C0h mov [rbx], eax loc_83D60: call init_glob_errs mov rax, cs:stdin_ptr mov rax, [rax] mov cs:instrumented_stdin, rax lea rax, instrumented_stdin mov cs:qword_3F0B40, 0 lea rcx, mysql_stdin mov [rcx], rax lea rax, aUnknown_1; "unknown" lea r14, my_progname_short mov [r14], rax lea rax, my_progname mov rbx, [rax] test rbx, rbx jz short loc_83DC0 mov rdi, rbx call dirname_length add rax, rbx mov [r14], rax loc_83DC0: call my_mutex_init call my_thread_global_init mov ecx, eax mov al, 1 test cl, cl jz short loc_83DD7 loc_83DD2: pop rbx pop r14 pop rbp retn loc_83DD7: lea rdi, aMariadbHome+8; "HOME" call _getenv lea rbx, home_dir mov [rbx], rax test rax, rax jz short loc_83E04 lea rdi, home_dir_buff mov rsi, rax call intern_filename mov [rbx], rax loc_83E04: call my_time_init jmp loc_83CE3
char my_init() { char result; // al long long v1; // rax long long v2; // rax const char *v3; // rbx char v4; // cl _BYTE *v5; // rax if ( my_init_done ) return 0; ++mysys_usage_id; my_init_done = 1; my_umask = 432; my_umask_dir = 448; my_global_flags = 0LL; v1 = getenv("UMASK"); if ( v1 ) my_umask = atoi_octal(v1) | 0x180; v2 = getenv("UMASK_DIR"); if ( v2 ) my_umask_dir = atoi_octal(v2) | 0x1C0; init_glob_errs(); instrumented_stdin = stdin; qword_3F0B40 = 0LL; mysql_stdin = &instrumented_stdin; my_progname_short = "unknown"; v3 = my_progname; if ( my_progname ) my_progname_short = &v3[dirname_length(my_progname)]; my_mutex_init(); v4 = my_thread_global_init(); result = 1; if ( !v4 ) { v5 = (_BYTE *)getenv("HOME"); home_dir = v5; if ( v5 ) home_dir = intern_filename((long long)&home_dir_buff, v5); my_time_init(); return 0; } return result; }
my_init: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX LEA RAX,[0x4f0b28] CMP byte ptr [RAX],0x0 JZ 0x00183cea LAB_00183ce3: XOR EAX,EAX JMP 0x00183dd2 LAB_00183cea: LEA RCX,[0x4f0b2c] INC dword ptr [RCX] MOV byte ptr [RAX],0x1 LEA R14,[0x46fac8] MOV dword ptr [R14],0x1b0 LEA RBX,[0x46facc] MOV dword ptr [RBX],0x1c0 LEA RAX,[0x4f0ff8] MOV qword ptr [RAX],0x0 LEA RDI,[0x1c0e86] CALL 0x0013a8c0 TEST RAX,RAX JZ 0x00183d40 MOV RDI,RAX CALL 0x00183e0e OR EAX,0x180 MOV dword ptr [R14],EAX LAB_00183d40: LEA RDI,[0x1c0e8c] CALL 0x0013a8c0 TEST RAX,RAX JZ 0x00183d60 MOV RDI,RAX CALL 0x00183e0e OR EAX,0x1c0 MOV dword ptr [RBX],EAX LAB_00183d60: CALL 0x00187eac MOV RAX,qword ptr [0x0046bff0] MOV RAX,qword ptr [RAX] MOV qword ptr [0x004f0b38],RAX LEA RAX,[0x4f0b38] MOV qword ptr [0x004f0b40],0x0 LEA RCX,[0x4f0b30] MOV qword ptr [RCX],RAX LEA RAX,[0x1bdaee] LEA R14,[0x4f0bd8] MOV qword ptr [R14],RAX LEA RAX,[0x4f0bd0] MOV RBX,qword ptr [RAX] TEST RBX,RBX JZ 0x00183dc0 MOV RDI,RBX CALL 0x0017acf4 ADD RAX,RBX MOV qword ptr [R14],RAX LAB_00183dc0: CALL 0x00186298 CALL 0x00185e60 MOV ECX,EAX MOV AL,0x1 TEST CL,CL JZ 0x00183dd7 LAB_00183dd2: POP RBX POP R14 POP RBP RET LAB_00183dd7: LEA RDI,[0x1bff5f] CALL 0x0013a8c0 LEA RBX,[0x4f0bc8] MOV qword ptr [RBX],RAX TEST RAX,RAX JZ 0x00183e04 LEA RDI,[0x4f0de0] MOV RSI,RAX CALL 0x0017e699 MOV qword ptr [RBX],RAX LAB_00183e04: CALL 0x00188940 JMP 0x00183ce3
int8 my_init(void) { long lVar1; char cVar2; uint uVar3; char *pcVar4; long lVar5; if (my_init_done == '\0') { mysys_usage_id = mysys_usage_id + 1; my_init_done = '\x01'; my_umask = 0x1b0; my_umask_dir = 0x1c0; my_global_flags = 0; pcVar4 = getenv("UMASK"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask = uVar3 | 0x180; } pcVar4 = getenv("UMASK_DIR"); if (pcVar4 != (char *)0x0) { uVar3 = atoi_octal(pcVar4); my_umask_dir = uVar3 | 0x1c0; } init_glob_errs(); lVar1 = my_progname; instrumented_stdin._0_8_ = *(int8 *)PTR_stdin_0046bff0; instrumented_stdin._8_8_ = 0; mysql_stdin = instrumented_stdin; my_progname_short = "unknown"; if (my_progname != 0) { lVar5 = dirname_length(my_progname); my_progname_short = (char *)(lVar5 + lVar1); } my_mutex_init(); cVar2 = my_thread_global_init(); if (cVar2 != '\0') { return 1; } home_dir = getenv("HOME"); if (home_dir != (char *)0x0) { home_dir = (char *)intern_filename(home_dir_buff,home_dir); } my_time_init(); } return 0; }
7,920
my_casefold_ujis
eloqsql/strings/ctype-ujis.c
static size_t my_casefold_ujis(CHARSET_INFO *cs, const char *src, size_t srclen, char *dst, size_t dstlen __attribute__((unused)), const uchar * const map, size_t is_upper) { const char *srcend= src + srclen, *dst0= dst; while (src < srcend) { size_t mblen= my_ismbchar(cs, src, srcend); if (mblen) { MY_UNICASE_CHARACTER *ch; ch= (mblen == 2) ? get_case_info_for_ch(cs, 0, (uchar) src[0], (uchar) src[1]) : get_case_info_for_ch(cs, 1, (uchar) src[1], (uchar) src[2]); if (ch) { int code= is_upper ? ch->toupper : ch->tolower; src+= mblen; if (code > 0xFFFF) *dst++= (char) (uchar) ((code >> 16) & 0xFF); if (code > 0xFF) *dst++= (char) (uchar) ((code >> 8) & 0xFF); *dst++= (char) (uchar) (code & 0xFF); } else { if (mblen == 3) *dst++= *src++; *dst++= *src++; *dst++= *src++; } } else { *dst++= (char) map[(uchar) *src++]; } } return (size_t) (dst - dst0); }
O3
c
my_casefold_ujis: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %r8, -0x40(%rbp) movq %rcx, %rbx movq %rcx, -0x30(%rbp) testq %rdx, %rdx jle 0xd05ab movq %rdx, %r15 movq %rsi, %r12 movq %rdi, %r13 addq %rsi, %r15 xorl %eax, %eax testq %r9, %r9 sete %al shll $0x2, %eax movq %rax, -0x38(%rbp) xorl %r14d, %r14d movq -0x30(%rbp), %rbx movq 0xb8(%r13), %rax movq %r13, %rdi movq %r12, %rsi movq %r15, %rdx callq *0xc0(%rax) cmpl $0x2, %eax cmovll %r14d, %eax testl %eax, %eax je 0xd0505 cmpl $0x2, %eax jne 0xd051b movzbl (%r12), %ecx movq 0x78(%r13), %rdx movq 0x8(%rdx), %rdx movq (%rdx,%rcx,8), %rcx testq %rcx, %rcx je 0xd0575 movzbl 0x1(%r12), %edx jmp 0xd053c movzbl (%r12), %eax incq %r12 movq -0x40(%rbp), %rcx movb (%rcx,%rax), %al movb %al, (%rbx) jmp 0xd059f movzbl 0x1(%r12), %ecx movq 0x78(%r13), %rdx movq 0x8(%rdx), %rdx movq 0x800(%rdx,%rcx,8), %rcx testq %rcx, %rcx je 0xd0564 movzbl 0x2(%r12), %edx leaq (%rdx,%rdx,2), %rdx leaq (%rcx,%rdx,4), %rcx testq %rcx, %rcx je 0xd0564 movq -0x38(%rbp), %rdx movl (%rcx,%rdx), %ecx cmpl $0x10000, %ecx # imm = 0x10000 jl 0xd058d movl %ecx, %edx shrl $0x10, %edx movb %dl, (%rbx) incq %rbx jmp 0xd0595 cmpl $0x3, %eax jne 0xd0575 movb (%r12), %al incq %r12 movb %al, (%rbx) incq %rbx movb (%r12), %al movb %al, (%rbx) movb 0x1(%r12), %al addq $0x2, %r12 movb %al, 0x1(%rbx) addq $0x2, %rbx jmp 0xd05a2 cmpl $0x100, %ecx # imm = 0x100 jl 0xd059a movb %ch, (%rbx) incq %rbx addq %rax, %r12 movb %cl, (%rbx) incq %rbx cmpq %r15, %r12 jb 0xd04c1 subq -0x30(%rbp), %rbx movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_casefold_ujis: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov [rbp+var_40], r8 mov rbx, rcx mov [rbp+var_30], rcx test rdx, rdx jle loc_D05AB mov r15, rdx mov r12, rsi mov r13, rdi add r15, rsi xor eax, eax test r9, r9 setz al shl eax, 2 mov [rbp+var_38], rax xor r14d, r14d mov rbx, [rbp+var_30] loc_D04C1: mov rax, [r13+0B8h] mov rdi, r13 mov rsi, r12 mov rdx, r15 call qword ptr [rax+0C0h] cmp eax, 2 cmovl eax, r14d test eax, eax jz short loc_D0505 cmp eax, 2 jnz short loc_D051B movzx ecx, byte ptr [r12] mov rdx, [r13+78h] mov rdx, [rdx+8] mov rcx, [rdx+rcx*8] test rcx, rcx jz short loc_D0575 movzx edx, byte ptr [r12+1] jmp short loc_D053C loc_D0505: movzx eax, byte ptr [r12] inc r12 mov rcx, [rbp+var_40] mov al, [rcx+rax] mov [rbx], al jmp loc_D059F loc_D051B: movzx ecx, byte ptr [r12+1] mov rdx, [r13+78h] mov rdx, [rdx+8] mov rcx, [rdx+rcx*8+800h] test rcx, rcx jz short loc_D0564 movzx edx, byte ptr [r12+2] loc_D053C: lea rdx, [rdx+rdx*2] lea rcx, [rcx+rdx*4] test rcx, rcx jz short loc_D0564 mov rdx, [rbp+var_38] mov ecx, [rcx+rdx] cmp ecx, offset stru_10000 jl short loc_D058D mov edx, ecx shr edx, 10h mov [rbx], dl inc rbx jmp short loc_D0595 loc_D0564: cmp eax, 3 jnz short loc_D0575 mov al, [r12] inc r12 mov [rbx], al inc rbx loc_D0575: mov al, [r12] mov [rbx], al mov al, [r12+1] add r12, 2 mov [rbx+1], al add rbx, 2 jmp short loc_D05A2 loc_D058D: cmp ecx, 100h jl short loc_D059A loc_D0595: mov [rbx], ch inc rbx loc_D059A: add r12, rax mov [rbx], cl loc_D059F: inc rbx loc_D05A2: cmp r12, r15 jb loc_D04C1 loc_D05AB: sub rbx, [rbp+var_30] mov rax, rbx add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
_BYTE * my_casefold_ujis( long long a1, unsigned __int8 *a2, long long a3, unsigned __int8 *a4, long long a5, long long a6) { unsigned __int8 *v6; // rbx unsigned __int8 *v7; // r12 unsigned long long v8; // r15 long long v9; // rax long long v10; // rcx long long v11; // rdx long long v12; // rax long long v13; // rcx int v14; // ecx unsigned __int8 v15; // al unsigned __int8 v16; // al long long v19; // [rsp+8h] [rbp-38h] v6 = a4; if ( a3 > 0 ) { v7 = a2; v8 = (unsigned long long)&a2[a3]; v19 = 4 * (unsigned int)(a6 == 0); v6 = a4; while ( 1 ) { v9 = (*(long long ( **)(long long, unsigned __int8 *, unsigned long long))(*(_QWORD *)(a1 + 184) + 192LL))( a1, v7, v8); if ( (int)v9 < 2 ) v9 = 0LL; if ( !(_DWORD)v9 ) { v12 = *v7++; *v6 = *(_BYTE *)(a5 + v12); goto LABEL_21; } if ( (_DWORD)v9 != 2 ) break; v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * *v7); if ( v10 ) { v11 = v7[1]; LABEL_12: v13 = v10 + 12 * v11; if ( v13 ) { v14 = *(_DWORD *)(v13 + v19); if ( v14 >= (int)&stru_10000 ) { *v6++ = BYTE2(v14); goto LABEL_19; } if ( v14 >= 256 ) LABEL_19: *v6++ = BYTE1(v14); v7 += v9; *v6 = v14; LABEL_21: ++v6; goto LABEL_22; } goto LABEL_15; } LABEL_17: *v6 = *v7; v16 = v7[1]; v7 += 2; v6[1] = v16; v6 += 2; LABEL_22: if ( (unsigned long long)v7 >= v8 ) return (_BYTE *)(v6 - a4); } v10 = *(_QWORD *)(*(_QWORD *)(*(_QWORD *)(a1 + 120) + 8LL) + 8LL * v7[1] + 2048); if ( v10 ) { v11 = v7[2]; goto LABEL_12; } LABEL_15: if ( (_DWORD)v9 == 3 ) { v15 = *v7++; *v6++ = v15; } goto LABEL_17; } return (_BYTE *)(v6 - a4); }
my_casefold_ujis: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV qword ptr [RBP + -0x40],R8 MOV RBX,RCX MOV qword ptr [RBP + -0x30],RCX TEST RDX,RDX JLE 0x001d05ab MOV R15,RDX MOV R12,RSI MOV R13,RDI ADD R15,RSI XOR EAX,EAX TEST R9,R9 SETZ AL SHL EAX,0x2 MOV qword ptr [RBP + -0x38],RAX XOR R14D,R14D MOV RBX,qword ptr [RBP + -0x30] LAB_001d04c1: MOV RAX,qword ptr [R13 + 0xb8] MOV RDI,R13 MOV RSI,R12 MOV RDX,R15 CALL qword ptr [RAX + 0xc0] CMP EAX,0x2 CMOVL EAX,R14D TEST EAX,EAX JZ 0x001d0505 CMP EAX,0x2 JNZ 0x001d051b MOVZX ECX,byte ptr [R12] MOV RDX,qword ptr [R13 + 0x78] MOV RDX,qword ptr [RDX + 0x8] MOV RCX,qword ptr [RDX + RCX*0x8] TEST RCX,RCX JZ 0x001d0575 MOVZX EDX,byte ptr [R12 + 0x1] JMP 0x001d053c LAB_001d0505: MOVZX EAX,byte ptr [R12] INC R12 MOV RCX,qword ptr [RBP + -0x40] MOV AL,byte ptr [RCX + RAX*0x1] MOV byte ptr [RBX],AL JMP 0x001d059f LAB_001d051b: MOVZX ECX,byte ptr [R12 + 0x1] MOV RDX,qword ptr [R13 + 0x78] MOV RDX,qword ptr [RDX + 0x8] MOV RCX,qword ptr [RDX + RCX*0x8 + 0x800] TEST RCX,RCX JZ 0x001d0564 MOVZX EDX,byte ptr [R12 + 0x2] LAB_001d053c: LEA RDX,[RDX + RDX*0x2] LEA RCX,[RCX + RDX*0x4] TEST RCX,RCX JZ 0x001d0564 MOV RDX,qword ptr [RBP + -0x38] MOV ECX,dword ptr [RCX + RDX*0x1] CMP ECX,0x10000 JL 0x001d058d MOV EDX,ECX SHR EDX,0x10 MOV byte ptr [RBX],DL INC RBX JMP 0x001d0595 LAB_001d0564: CMP EAX,0x3 JNZ 0x001d0575 MOV AL,byte ptr [R12] INC R12 MOV byte ptr [RBX],AL INC RBX LAB_001d0575: MOV AL,byte ptr [R12] MOV byte ptr [RBX],AL MOV AL,byte ptr [R12 + 0x1] ADD R12,0x2 MOV byte ptr [RBX + 0x1],AL ADD RBX,0x2 JMP 0x001d05a2 LAB_001d058d: CMP ECX,0x100 JL 0x001d059a LAB_001d0595: MOV byte ptr [RBX],CH INC RBX LAB_001d059a: ADD R12,RAX MOV byte ptr [RBX],CL LAB_001d059f: INC RBX LAB_001d05a2: CMP R12,R15 JC 0x001d04c1 LAB_001d05ab: SUB RBX,qword ptr [RBP + -0x30] MOV RAX,RBX ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_casefold_ujis(long param_1,byte *param_2,long param_3,byte *param_4,long param_5, long param_6) { byte *pbVar1; byte bVar2; uint uVar3; int iVar4; long lVar6; byte *pbVar7; byte *pbVar8; ulong uVar5; pbVar7 = param_4; if (0 < param_3) { pbVar8 = param_2 + param_3; do { uVar3 = (**(code **)(*(long *)(param_1 + 0xb8) + 0xc0))(param_1,param_2,pbVar8); uVar5 = (ulong)uVar3; if ((int)uVar3 < 2) { uVar5 = 0; } iVar4 = (int)uVar5; if (iVar4 == 0) { bVar2 = *param_2; param_2 = param_2 + 1; *pbVar7 = *(byte *)(param_5 + (ulong)bVar2); LAB_001d059f: pbVar7 = pbVar7 + 1; } else { if (iVar4 == 2) { lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + (ulong)*param_2 * 8); if (lVar6 != 0) { bVar2 = param_2[1]; LAB_001d053c: lVar6 = lVar6 + (ulong)bVar2 * 0xc; if (lVar6 == 0) goto LAB_001d0564; iVar4 = *(int *)(lVar6 + (ulong)(param_6 == 0) * 4); if (iVar4 < 0x10000) { if (0xff < iVar4) goto LAB_001d0595; } else { *pbVar7 = (byte)((uint)iVar4 >> 0x10); pbVar7 = pbVar7 + 1; LAB_001d0595: *pbVar7 = (byte)((uint)iVar4 >> 8); pbVar7 = pbVar7 + 1; } param_2 = param_2 + uVar5; *pbVar7 = (byte)iVar4; goto LAB_001d059f; } } else { lVar6 = *(long *)(*(long *)(*(long *)(param_1 + 0x78) + 8) + 0x800 + (ulong)param_2[1] * 8 ); if (lVar6 != 0) { bVar2 = param_2[2]; goto LAB_001d053c; } LAB_001d0564: if (iVar4 == 3) { bVar2 = *param_2; param_2 = param_2 + 1; *pbVar7 = bVar2; pbVar7 = pbVar7 + 1; } } *pbVar7 = *param_2; pbVar1 = param_2 + 1; param_2 = param_2 + 2; pbVar7[1] = *pbVar1; pbVar7 = pbVar7 + 2; } } while (param_2 < pbVar8); } return (long)pbVar7 - (long)param_4; }
7,921
get_segment_integrity
seiftnesse[P]memoryallocator/src/custom_alloc_util.c
segment_integrity_t *get_segment_integrity(segment_t *s) { if (!s) return 0; // In our layout, the integrity data comes after the segment_t structure // but before the user data begins. // Calculate the proper aligned offset for the integrity structure uintptr_t segment_addr = (uintptr_t) (s); uintptr_t user_data_addr = (uintptr_t) (SegmentToPtr(s)); // The integrity structure is placed between the segment header and the user data uintptr_t integrity_addr = segment_addr + sizeof(segment_t); // Make sure there's enough space for the integrity structure if (integrity_addr + sizeof(segment_integrity_t) > user_data_addr) { HEAP_LOG("Warning: Not enough space for integrity data in segment %p\n", s); return 0; } return (segment_integrity_t *) (integrity_addr); }
O3
c
get_segment_integrity: testq %rdi, %rdi je 0x2044 leaq 0x3f(%rdi), %rcx andq $-0x10, %rcx leaq 0x3c(%rdi), %rdx addq $0x30, %rdi xorl %eax, %eax cmpq %rcx, %rdx cmovbeq %rdi, %rax retq xorl %eax, %eax retq
get_segment_integrity: test rdi, rdi jz short loc_2044 lea rcx, [rdi+3Fh] and rcx, 0FFFFFFFFFFFFFFF0h lea rdx, [rdi+3Ch] add rdi, 30h ; '0' xor eax, eax cmp rdx, rcx cmovbe rax, rdi retn loc_2044: xor eax, eax retn
long long get_segment_integrity(long long a1) { unsigned long long v1; // rcx unsigned long long v2; // rdx long long v3; // rdi long long result; // rax if ( !a1 ) return 0LL; v1 = (a1 + 63) & 0xFFFFFFFFFFFFFFF0LL; v2 = a1 + 60; v3 = a1 + 48; result = 0LL; if ( v2 <= v1 ) return v3; return result; }
get_segment_integrity: TEST RDI,RDI JZ 0x00102044 LEA RCX,[RDI + 0x3f] AND RCX,-0x10 LEA RDX,[RDI + 0x3c] ADD RDI,0x30 XOR EAX,EAX CMP RDX,RCX CMOVBE RAX,RDI RET LAB_00102044: XOR EAX,EAX RET
long get_segment_integrity(long param_1) { long lVar1; if (param_1 != 0) { lVar1 = 0; if (param_1 + 0x3cU <= (param_1 + 0x3fU & 0xfffffffffffffff0)) { lVar1 = param_1 + 0x30; } return lVar1; } return 0; }
7,922
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> intx::to_string<256u>(intx::uint<256u>, int)
corpus-core[P]colibri-stateless/build_O3/_deps/intx-src/include/intx/intx.hpp
inline std::string to_string(uint<N> x, int base = 10) { if (base < 2 || base > 36) throw_<std::invalid_argument>("invalid base"); if (x == 0) return "0"; auto s = std::string{}; while (x != 0) { // TODO: Use constexpr udivrem_1? const auto res = udivrem(x, uint<N>{base}); const auto d = int(res.rem); const auto c = d < 10 ? '0' + d : 'a' + d - 10; s.push_back(char(c)); x = res.quot; } std::reverse(s.begin(), s.end()); return s; }
O3
cpp
std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> intx::to_string<256u>(intx::uint<256u>, int): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp leal -0x25(%rsi), %eax cmpl $-0x24, %eax jbe 0x4cf8e movq %rdi, %rbx leaq 0xa0(%rsp), %r14 movdqu (%r14), %xmm0 movdqu 0x10(%r14), %xmm1 por %xmm0, %xmm1 leaq 0x10(%rdi), %rax ptest %xmm1, %xmm1 movq %rax, (%rdi) je 0x4cf66 movq %rax, (%rsp) movq $0x0, 0x8(%rbx) movb $0x0, 0x10(%rbx) leaq 0x10(%rsp), %rbp movl %esi, %r13d leaq 0x28(%rsp), %r15 leaq 0x8(%rsp), %r12 movdqu (%r14), %xmm0 movdqu 0x10(%r14), %xmm1 por %xmm0, %xmm1 ptest %xmm1, %xmm1 je 0x4cf23 pxor %xmm0, %xmm0 movdqu %xmm0, (%rbp) movq $0x0, 0x10(%rbp) movq %r13, 0x8(%rsp) movq %r15, %rdi movq %r14, %rsi movq %r12, %rdx callq 0x3fb29 movl 0x48(%rsp), %eax leal 0x57(%rax), %ecx leal 0x30(%rax), %edx cmpl $0xa, %eax cmovgel %ecx, %edx movsbl %dl, %esi movq %rbx, %rdi callq 0x4d006 movdqu 0x28(%rsp), %xmm0 movdqu 0x38(%rsp), %xmm1 movdqu %xmm1, 0x10(%r14) movdqu %xmm0, (%r14) jmp 0x4ceb5 movq (%rbx), %rax movq 0x8(%rbx), %rcx testq %rcx, %rcx setne %dl addq %rax, %rcx decq %rcx cmpq %rax, %rcx seta %sil andb %dl, %sil cmpb $0x1, %sil jne 0x4cf7c incq %rax movb -0x1(%rax), %dl movb (%rcx), %sil movb %sil, -0x1(%rax) movb %dl, (%rcx) decq %rcx leaq 0x1(%rax), %rdx cmpq %rcx, %rax movq %rdx, %rax jb 0x4cf49 jmp 0x4cf7c leaq 0x41e15(%rip), %rsi # 0x8ed82 leaq 0x41e0f(%rip), %rdx # 0x8ed83 movq %rbx, %rdi callq 0x4c8ba movq %rbx, %rax addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x3ca46(%rip), %rdi # 0x899db callq 0x4cfbd movq %rax, %r14 movq (%rbx), %rdi cmpq (%rsp), %rdi je 0x4cfb5 movq (%rsp), %rax movq (%rax), %rsi incq %rsi callq 0x220c0 movq %r14, %rdi callq 0x22310
_ZN4intx9to_stringILj256EEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_4uintIXT_EEEi: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h lea eax, [rsi-25h] cmp eax, 0FFFFFFDCh jbe loc_4CF8E mov rbx, rdi lea r14, [rsp+98h+arg_0] movdqu xmm0, xmmword ptr [r14] movdqu xmm1, xmmword ptr [r14+10h] por xmm1, xmm0 lea rax, [rdi+10h] ptest xmm1, xmm1 mov [rdi], rax jz loc_4CF66 mov [rsp+98h+var_98], rax mov qword ptr [rbx+8], 0 mov byte ptr [rbx+10h], 0 lea rbp, [rsp+98h+var_88] mov r13d, esi lea r15, [rsp+98h+var_70] lea r12, [rsp+98h+var_90] loc_4CEB5: movdqu xmm0, xmmword ptr [r14] movdqu xmm1, xmmword ptr [r14+10h] por xmm1, xmm0 ptest xmm1, xmm1 jz short loc_4CF23 pxor xmm0, xmm0 movdqu xmmword ptr [rbp+0], xmm0 mov qword ptr [rbp+10h], 0 mov [rsp+98h+var_90], r13 mov rdi, r15 mov rsi, r14 mov rdx, r12 call _ZN4intx7udivremILj256ELj256EEENS_10div_resultINS_4uintIXT_EEENS2_IXT0_EEEEERKS3_RKS4_; intx::udivrem<256u,256u>(intx::uint<256u> const&,intx::uint<256u> const&) mov eax, [rsp+98h+var_50] lea ecx, [rax+57h] lea edx, [rax+30h] cmp eax, 0Ah cmovge edx, ecx movsx esi, dl mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9push_backEc; std::string::push_back(char) movdqu xmm0, [rsp+98h+var_70] movdqu xmm1, [rsp+98h+var_60] movdqu xmmword ptr [r14+10h], xmm1 movdqu xmmword ptr [r14], xmm0 jmp short loc_4CEB5 loc_4CF23: mov rax, [rbx] mov rcx, [rbx+8] test rcx, rcx setnz dl add rcx, rax dec rcx cmp rcx, rax setnbe sil and sil, dl cmp sil, 1 jnz short loc_4CF7C inc rax loc_4CF49: mov dl, [rax-1] mov sil, [rcx] mov [rax-1], sil mov [rcx], dl dec rcx lea rdx, [rax+1] cmp rax, rcx mov rax, rdx jb short loc_4CF49 jmp short loc_4CF7C loc_4CF66: lea rsi, aAVal010+12h; "0" lea rdx, aAVal010+13h; "" mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) loc_4CF7C: mov rax, rbx add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4CF8E: lea rdi, aInvalidBase; "invalid base" call _ZN4intx6throw_ISt16invalid_argumentEEvPKc; intx::throw_<std::invalid_argument>(char const*) mov r14, rax mov rdi, [rbx]; void * cmp rdi, [rsp+98h+var_98] jz short loc_4CFB5 mov rax, [rsp+98h+var_98] mov rsi, [rax] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) loc_4CFB5: mov rdi, r14 call __Unwind_Resume
long long intx::to_string<256u>( long long a1, unsigned int a2, _DWORD a3, _DWORD a4, _DWORD a5, _DWORD a6, __m128i a7, __m128i a8) { __m128i v8; // xmm1 __m128i v9; // xmm1 char v10; // dl __m128i v11; // xmm0 long long v12; // rcx bool v13; // dl _BYTE *v14; // rcx unsigned long long v15; // rax char v16; // dl long long v19; // [rsp+8h] [rbp-90h] BYREF __int128 v20; // [rsp+10h] [rbp-88h] long long v21; // [rsp+20h] [rbp-78h] __m128i v22; // [rsp+28h] [rbp-70h] BYREF __m128i v23; // [rsp+38h] [rbp-60h] BYREF int v24; // [rsp+48h] [rbp-50h] if ( a2 - 37 <= 0xFFFFFFDC ) intx::throw_<std::invalid_argument>("invalid base"); v8 = _mm_or_si128(_mm_loadu_si128(&a8), _mm_loadu_si128(&a7)); *(_QWORD *)a1 = a1 + 16; if ( _mm_testz_si128(v8, v8) ) { std::string::_M_construct<char const*>(a1, "0", (long long)""); } else { *(_QWORD *)(a1 + 8) = 0LL; *(_BYTE *)(a1 + 16) = 0; while ( 1 ) { v9 = _mm_or_si128(_mm_loadu_si128(&a8), _mm_loadu_si128(&a7)); if ( _mm_testz_si128(v9, v9) ) break; v20 = 0LL; v21 = 0LL; v19 = a2; intx::udivrem<256u,256u>((long long)&v22, (__int128 *)a7.m128i_i8, (long long)&v19); v10 = v24 + 48; if ( v24 >= 10 ) v10 = v24 + 87; std::string::push_back(a1, (unsigned int)v10); v11 = _mm_loadu_si128(&v22); a8 = _mm_loadu_si128(&v23); a7 = v11; } v12 = *(_QWORD *)(a1 + 8); v13 = v12 != 0; v14 = (_BYTE *)(*(_QWORD *)a1 + v12 - 1); if ( v13 && (unsigned long long)v14 > *(_QWORD *)a1 ) { v15 = *(_QWORD *)a1 + 1LL; do { v16 = *(_BYTE *)(v15 - 1); *(_BYTE *)(v15 - 1) = *v14; *v14-- = v16; } while ( v15++ < (unsigned long long)v14 ); } } return a1; }
to_string<256u>: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 LEA EAX,[RSI + -0x25] CMP EAX,-0x24 JBE 0x0014cf8e MOV RBX,RDI LEA R14,[RSP + 0xa0] MOVDQU XMM0,xmmword ptr [R14] MOVDQU XMM1,xmmword ptr [R14 + 0x10] POR XMM1,XMM0 LEA RAX,[RDI + 0x10] PTEST XMM1,XMM1 MOV qword ptr [RDI],RAX JZ 0x0014cf66 MOV qword ptr [RSP],RAX MOV qword ptr [RBX + 0x8],0x0 MOV byte ptr [RBX + 0x10],0x0 LEA RBP,[RSP + 0x10] MOV R13D,ESI LEA R15,[RSP + 0x28] LEA R12,[RSP + 0x8] LAB_0014ceb5: MOVDQU XMM0,xmmword ptr [R14] MOVDQU XMM1,xmmword ptr [R14 + 0x10] POR XMM1,XMM0 PTEST XMM1,XMM1 JZ 0x0014cf23 PXOR XMM0,XMM0 MOVDQU xmmword ptr [RBP],XMM0 MOV qword ptr [RBP + 0x10],0x0 MOV qword ptr [RSP + 0x8],R13 MOV RDI,R15 MOV RSI,R14 MOV RDX,R12 CALL 0x0013fb29 MOV EAX,dword ptr [RSP + 0x48] LEA ECX,[RAX + 0x57] LEA EDX,[RAX + 0x30] CMP EAX,0xa CMOVGE EDX,ECX MOVSX ESI,DL LAB_0014cf02: MOV RDI,RBX CALL 0x0014d006 LAB_0014cf0a: MOVDQU XMM0,xmmword ptr [RSP + 0x28] MOVDQU XMM1,xmmword ptr [RSP + 0x38] MOVDQU xmmword ptr [R14 + 0x10],XMM1 MOVDQU xmmword ptr [R14],XMM0 JMP 0x0014ceb5 LAB_0014cf23: MOV RAX,qword ptr [RBX] MOV RCX,qword ptr [RBX + 0x8] TEST RCX,RCX SETNZ DL ADD RCX,RAX DEC RCX CMP RCX,RAX SETA SIL AND SIL,DL CMP SIL,0x1 JNZ 0x0014cf7c INC RAX LAB_0014cf49: MOV DL,byte ptr [RAX + -0x1] MOV SIL,byte ptr [RCX] MOV byte ptr [RAX + -0x1],SIL MOV byte ptr [RCX],DL DEC RCX LEA RDX,[RAX + 0x1] CMP RAX,RCX MOV RAX,RDX JC 0x0014cf49 JMP 0x0014cf7c LAB_0014cf66: LEA RSI,[0x18ed82] LEA RDX,[0x18ed83] MOV RDI,RBX CALL 0x0014c8ba LAB_0014cf7c: MOV RAX,RBX ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014cf8e: LEA RDI,[0x1899db] CALL 0x0014cfbd LAB_0014cf9a: MOV R14,RAX MOV RDI,qword ptr [RBX] CMP RDI,qword ptr [RSP] JZ 0x0014cfb5 MOV RAX,qword ptr [RSP] MOV RSI,qword ptr [RAX] INC RSI CALL 0x001220c0 LAB_0014cfb5: MOV RDI,R14 CALL 0x00122310
/* std::__cxx11::string intx::to_string<256u>(intx::uint<256u>, int) */ string * intx::to_string<256u>(string *param_1,uint param_2) { int1 uVar1; int1 *puVar2; int1 auVar3 [16]; int1 auVar4 [16]; int1 auVar5 [16]; int1 auVar6 [16]; int1 *puVar7; int8 extraout_RAX; int1 *puVar8; char cVar9; int8 *unaff_RBX; int8 in_stack_00000008; int8 in_stack_00000010; int8 in_stack_00000018; int8 in_stack_00000020; long *local_98; ulong local_90; int1 local_88 [16]; int8 local_78; int8 local_70; int8 uStack_68; int8 local_60; int8 uStack_58; int local_50; if (param_2 - 0x25 < 0xffffffdd) { throw_<std::invalid_argument>("invalid base"); /* catch() { ... } // from try @ 0014cf02 with catch @ 0014cf9a */ if ((long *)*unaff_RBX != local_98) { operator_delete((long *)*unaff_RBX,*local_98 + 1); } /* WARNING: Subroutine does not return */ _Unwind_Resume(extraout_RAX); } auVar3._8_8_ = in_stack_00000010; auVar3._0_8_ = in_stack_00000008; auVar5._8_8_ = in_stack_00000020; auVar5._0_8_ = in_stack_00000018; *(string **)param_1 = param_1 + 0x10; if (auVar5 == (int1 [16])0x0 && auVar3 == (int1 [16])0x0) { std::__cxx11::string::_M_construct<char_const*>(param_1,"0",""); } else { *(int8 *)(param_1 + 8) = 0; param_1[0x10] = (string)0x0; while (auVar4._8_8_ = in_stack_00000010, auVar4._0_8_ = in_stack_00000008, auVar6._8_8_ = in_stack_00000020, auVar6._0_8_ = in_stack_00000018, auVar6 != (int1 [16])0x0 || auVar4 != (int1 [16])0x0) { local_88 = (int1 [16])0x0; local_78 = 0; local_90 = (ulong)param_2; udivrem<256u,256u>((intx *)&local_70,(uint *)&stack0x00000008,(uint *)&local_90); cVar9 = (char)local_50 + '0'; if (9 < local_50) { cVar9 = (char)local_50 + 'W'; } /* try { // try from 0014cf02 to 0014cf09 has its CatchHandler @ 0014cf9a */ std::__cxx11::string::push_back(param_1,cVar9); in_stack_00000008 = local_70; in_stack_00000010 = uStack_68; in_stack_00000018 = local_60; in_stack_00000020 = uStack_58; } puVar2 = *(int1 **)param_1; puVar8 = puVar2 + *(long *)(param_1 + 8) + -1; if (puVar2 < puVar8 && *(long *)(param_1 + 8) != 0) { do { puVar7 = puVar2 + 1; uVar1 = *puVar2; *puVar2 = *puVar8; *puVar8 = uVar1; puVar8 = puVar8 + -1; puVar2 = puVar7; } while (puVar7 < puVar8); } } return param_1; }
7,923
log_connection_event
eloqsql/plugin/server_audit/server_audit.c
static int log_connection_event(const struct mysql_event_connection *event, const char *type) { time_t ctime; size_t csize; char message[1024]; (void) time(&ctime); csize= log_header(message, sizeof(message)-1, &ctime, servhost, servhost_len, event->user, event->user_length, event->host, event->host_length, event->ip, event->ip_length, event->thread_id, 0, type); csize+= my_snprintf(message+csize, sizeof(message) - 1 - csize, ",%.*s,,%d", event->database.length, event->database.str, event->status); message[csize]= '\n'; return write_log(message, csize + 1, 1); }
O3
c
log_connection_event: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x418, %rsp # imm = 0x418 movq %rdi, %r14 movq %fs:0x28, %rax movq %rax, -0x30(%rbp) leaq -0x438(%rbp), %r12 movq %r12, %rdi callq 0x31e0 movl 0x9d6b(%rip), %ecx # 0xed00 movq 0x10(%r14), %r8 movl 0x18(%r14), %r9d movl 0x58(%r14), %eax movl 0x68(%r14), %r10d movl 0x8(%r14), %r11d subq $0x8, %rsp leaq 0x423c(%rip), %r13 # 0x91f0 leaq -0x430(%rbp), %rbx movl $0x3ff, %r15d # imm = 0x3FF movl $0x3ff, %esi # imm = 0x3FF movq %rbx, %rdi movq %r12, %rdx pushq %r13 pushq $0x0 pushq %r11 pushq %r10 pushq 0x60(%r14) pushq %rax pushq 0x50(%r14) callq 0x6543 addq $0x40, %rsp movq %rax, %r12 movq 0x6fa0(%rip), %rax # 0xbf90 movq (%rax), %r10 leaq (%r12,%rbp), %rdi addq $-0x430, %rdi # imm = 0xFBD0 subq %r12, %r15 movq 0x78(%r14), %rcx movq 0x70(%r14), %r8 movl 0x4(%r14), %r9d leaq 0x4368(%rip), %rdx # 0x937c movq %r15, %rsi xorl %eax, %eax callq *(%r10) leaq (%rax,%r12), %rcx movb $0xa, -0x430(%rbp,%rcx) leaq (%rax,%r12), %rsi incq %rsi movq %rbx, %rdi movl $0x1, %edx callq 0x6920 movq %fs:0x28, %rax cmpq -0x30(%rbp), %rax jne 0x505d addq $0x418, %rsp # imm = 0x418 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x3100
log_connection_event: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 418h mov r14, rdi mov rax, fs:28h mov [rbp+var_30], rax lea r12, [rbp+var_438] mov rdi, r12 call _time mov ecx, cs:servhost_len mov r8, [r14+10h] mov r9d, [r14+18h] mov eax, [r14+58h] mov r10d, [r14+68h] mov r11d, [r14+8] sub rsp, 8 lea r13, aDisconnect; "DISCONNECT" lea rbx, [rbp+var_430] mov r15d, 3FFh mov esi, 3FFh mov rdi, rbx mov rdx, r12 push r13 push 0 push r11 push r10 push qword ptr [r14+60h] push rax push qword ptr [r14+50h] call log_header add rsp, 40h mov r12, rax mov rax, cs:my_snprintf_service_ptr mov r10, [rax] lea rdi, [r12+rbp] add rdi, 0FFFFFFFFFFFFFBD0h sub r15, r12 mov rcx, [r14+78h] mov r8, [r14+70h] mov r9d, [r14+4] lea rdx, aSD; ",%.*s,,%d" mov rsi, r15 xor eax, eax call qword ptr [r10] lea rcx, [rax+r12] mov [rbp+rcx+var_430], 0Ah lea rsi, [rax+r12] inc rsi mov rdi, rbx mov edx, 1 call write_log mov rax, fs:28h cmp rax, [rbp+var_30] jnz short loc_505D add rsp, 418h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_505D: call ___stack_chk_fail
unsigned long long log_connection_event(long long a1) { long long v2; // r12 long long v3; // rax char v5; // [rsp+8h] [rbp-438h] BYREF _BYTE v6[1024]; // [rsp+10h] [rbp-430h] BYREF unsigned long long v7; // [rsp+410h] [rbp-30h] v7 = __readfsqword(0x28u); time(&v5); v2 = log_header( (unsigned int)v6, 1023, (unsigned int)&v5, servhost_len, *(_QWORD *)(a1 + 16), *(_DWORD *)(a1 + 24), *(_QWORD *)(a1 + 80), *(_DWORD *)(a1 + 88), *(_QWORD *)(a1 + 96), *(_DWORD *)(a1 + 104), *(_DWORD *)(a1 + 8), 0LL, (long long)"DISCONNECT"); v3 = ((long long (*)(_BYTE *, long long, const char *, ...))*my_snprintf_service)( &v6[v2], 1023 - v2, ",%.*s,,%d", *(_QWORD *)(a1 + 120), *(const char **)(a1 + 112), *(_DWORD *)(a1 + 4)); v6[v3 + v2] = 10; write_log(v6, v3 + v2 + 1, 1LL); return __readfsqword(0x28u); }
log_connection_event: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x418 MOV R14,RDI MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x30],RAX LEA R12,[RBP + -0x438] MOV RDI,R12 CALL 0x001031e0 MOV ECX,dword ptr [0x0010ed00] MOV R8,qword ptr [R14 + 0x10] MOV R9D,dword ptr [R14 + 0x18] MOV EAX,dword ptr [R14 + 0x58] MOV R10D,dword ptr [R14 + 0x68] MOV R11D,dword ptr [R14 + 0x8] SUB RSP,0x8 LEA R13,[0x1091f0] LEA RBX,[RBP + -0x430] MOV R15D,0x3ff MOV ESI,0x3ff MOV RDI,RBX MOV RDX,R12 PUSH R13 PUSH 0x0 PUSH R11 PUSH R10 PUSH qword ptr [R14 + 0x60] PUSH RAX PUSH qword ptr [R14 + 0x50] CALL 0x00106543 ADD RSP,0x40 MOV R12,RAX MOV RAX,qword ptr [0x0010bf90] MOV R10,qword ptr [RAX] LEA RDI,[R12 + RBP*0x1] ADD RDI,-0x430 SUB R15,R12 MOV RCX,qword ptr [R14 + 0x78] MOV R8,qword ptr [R14 + 0x70] MOV R9D,dword ptr [R14 + 0x4] LEA RDX,[0x10937c] MOV RSI,R15 XOR EAX,EAX CALL qword ptr [R10] LEA RCX,[RAX + R12*0x1] MOV byte ptr [RBP + RCX*0x1 + -0x430],0xa LEA RSI,[RAX + R12*0x1] INC RSI MOV RDI,RBX MOV EDX,0x1 CALL 0x00106920 MOV RAX,qword ptr FS:[0x28] CMP RAX,qword ptr [RBP + -0x30] JNZ 0x0010505d ADD RSP,0x418 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0010505d: CALL 0x00103100
void log_connection_event(long param_1) { long lVar1; long lVar2; long in_FS_OFFSET; time_t local_440; int1 local_438 [1024]; long local_38; local_38 = *(long *)(in_FS_OFFSET + 0x28); time(&local_440); lVar1 = log_header(local_438,0x3ff,&local_440,servhost_len,*(int8 *)(param_1 + 0x10), *(int4 *)(param_1 + 0x18),*(int8 *)(param_1 + 0x50), *(int4 *)(param_1 + 0x58),*(int8 *)(param_1 + 0x60), *(int4 *)(param_1 + 0x68),*(int4 *)(param_1 + 8),0,"DISCONNECT"); lVar2 = (*(code *)**(int8 **)PTR_my_snprintf_service_0010bf90) (local_438 + lVar1,0x3ff - lVar1,",%.*s,,%d",*(int8 *)(param_1 + 0x78), *(int8 *)(param_1 + 0x70),*(int4 *)(param_1 + 4)); local_438[lVar2 + lVar1] = 10; write_log(local_438,lVar2 + lVar1 + 1,1); if (*(long *)(in_FS_OFFSET + 0x28) == local_38) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
7,924
plutovg_paint_destroy
dmazzella[P]pylunasvg/lunasvg/plutovg/source/plutovg-paint.c
void plutovg_paint_destroy(plutovg_paint_t* paint) { if(paint == NULL) return; if(--paint->ref_count == 0) { if(paint->type == PLUTOVG_PAINT_TYPE_TEXTURE) { plutovg_texture_paint_t* texture = (plutovg_texture_paint_t*)(paint); plutovg_surface_destroy(texture->surface); } free(paint); } }
O0
c
plutovg_paint_destroy: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) jne 0x5fb45 jmp 0x5fb7d movq -0x8(%rbp), %rcx movl (%rcx), %eax addl $-0x1, %eax movl %eax, (%rcx) cmpl $0x0, %eax jne 0x5fb7d movq -0x8(%rbp), %rax cmpl $0x2, 0x4(%rax) jne 0x5fb74 movq -0x8(%rbp), %rax movq %rax, -0x10(%rbp) movq -0x10(%rbp), %rax movq 0x28(%rax), %rdi callq 0x65670 movq -0x8(%rbp), %rdi callq 0xb7b0 addq $0x10, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
plutovg_paint_destroy: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jnz short loc_5FB45 jmp short loc_5FB7D loc_5FB45: mov rcx, [rbp+var_8] mov eax, [rcx] add eax, 0FFFFFFFFh mov [rcx], eax cmp eax, 0 jnz short loc_5FB7D mov rax, [rbp+var_8] cmp dword ptr [rax+4], 2 jnz short loc_5FB74 mov rax, [rbp+var_8] mov [rbp+var_10], rax mov rax, [rbp+var_10] mov rdi, [rax+28h] call plutovg_surface_destroy loc_5FB74: mov rdi, [rbp+var_8] call free loc_5FB7D: add rsp, 10h pop rbp retn
long long plutovg_paint_destroy(long long a1) { long long result; // rax if ( a1 ) { result = (unsigned int)(*(_DWORD *)a1 - 1); *(_DWORD *)a1 = result; if ( !(_DWORD)result ) { if ( *(_DWORD *)(a1 + 4) == 2 ) plutovg_surface_destroy(*(_QWORD *)(a1 + 40)); return free(a1); } } return result; }
plutovg_paint_destroy: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JNZ 0x0015fb45 JMP 0x0015fb7d LAB_0015fb45: MOV RCX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RCX] ADD EAX,-0x1 MOV dword ptr [RCX],EAX CMP EAX,0x0 JNZ 0x0015fb7d MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x4],0x2 JNZ 0x0015fb74 MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x28] CALL 0x00165670 LAB_0015fb74: MOV RDI,qword ptr [RBP + -0x8] CALL 0x0010b7b0 LAB_0015fb7d: ADD RSP,0x10 POP RBP RET
void plutovg_paint_destroy(int *param_1) { int iVar1; if ((param_1 != (int *)0x0) && (iVar1 = *param_1, *param_1 = iVar1 + -1, iVar1 + -1 == 0)) { if (param_1[1] == 2) { plutovg_surface_destroy(*(int8 *)(param_1 + 10)); } free(param_1); } return; }
7,925
bool 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>::contains<char const (&) [3], 0>(char const (&) [3]) const
hkr04[P]cpp-mcp/common/json.hpp
constexpr bool is_object() const noexcept { return m_data.m_type == value_t::object; }
O1
cpp
bool 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>::contains<char const (&) [3], 0>(char const (&) [3]) const: cmpb $0x1, (%rdi) jne 0x1015e pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %rbx movq 0x8(%rdi), %r12 movq (%r12), %r15 movq 0x8(%r12), %rax cmpq %rax, %r15 je 0x10164 movq %rsi, %r14 movq %r15, %rdi movq %r14, %rsi callq 0x50f0 testl %eax, %eax je 0x10161 addq $0x30, %r15 movq 0x8(%r12), %rax cmpq %rax, %r15 jne 0x1013f jmp 0x10164 xorl %eax, %eax retq movq %r15, %rax movq 0x8(%rbx), %rcx cmpq 0x8(%rcx), %rax setne %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: cmp byte ptr [rdi], 1 jnz short loc_1015E push r15 push r14 push r12 push rbx push rax mov rbx, rdi mov r12, [rdi+8] mov r15, [r12] mov rax, [r12+8] cmp r15, rax jz short loc_10164 mov r14, rsi loc_1013F: mov rdi, r15 mov rsi, r14 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_10161 add r15, 30h ; '0' mov rax, [r12+8] cmp r15, rax jnz short loc_1013F jmp short loc_10164 loc_1015E: xor eax, eax retn loc_10161: mov rax, r15 loc_10164: mov rcx, [rbx+8] cmp rax, [rcx+8] setnz al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_( long long a1, long long a2) { long long *v2; // r12 long long v3; // r15 long long v4; // rax if ( *(_BYTE *)a1 != 1 ) return 0; v2 = *(long long **)(a1 + 8); v3 = *v2; v4 = v2[1]; if ( *v2 != v4 ) { while ( (unsigned int)std::string::compare(v3, a2) ) { v3 += 48LL; v4 = v2[1]; if ( v3 == v4 ) return v4 != *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } v4 = v3; } return v4 != *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: CMP byte ptr [RDI],0x1 JNZ 0x0011015e PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV RBX,RDI MOV R12,qword ptr [RDI + 0x8] MOV R15,qword ptr [R12] MOV RAX,qword ptr [R12 + 0x8] CMP R15,RAX JZ 0x00110164 MOV R14,RSI LAB_0011013f: MOV RDI,R15 MOV RSI,R14 CALL 0x001050f0 TEST EAX,EAX JZ 0x00110161 ADD R15,0x30 MOV RAX,qword ptr [R12 + 0x8] CMP R15,RAX JNZ 0x0011013f JMP 0x00110164 LAB_0011015e: XOR EAX,EAX RET LAB_00110161: MOV RAX,R15 LAB_00110164: MOV RCX,qword ptr [RBX + 0x8] CMP RAX,qword ptr [RCX + 0x8] SETNZ AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int8 _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA3_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (char *param_1) { long *plVar1; int iVar2; char *pcVar3; char *pcVar4; if (*param_1 != '\x01') { return 0; } plVar1 = *(long **)(param_1 + 8); pcVar3 = (char *)plVar1[1]; pcVar4 = (char *)*plVar1; if ((char *)*plVar1 != pcVar3) { do { pcVar3 = pcVar4; iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar4 = pcVar3 + 0x30; pcVar3 = (char *)plVar1[1]; } while (pcVar4 != pcVar3); } return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != *(char **)(*(long *)(param_1 + 8) + 8)); }
7,926
bool 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>::contains<char const (&) [3], 0>(char const (&) [3]) const
hkr04[P]cpp-mcp/common/json.hpp
constexpr bool is_object() const noexcept { return m_data.m_type == value_t::object; }
O3
cpp
bool 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>::contains<char const (&) [3], 0>(char const (&) [3]) const: cmpb $0x1, (%rdi) jne 0x10445 pushq %r15 pushq %r14 pushq %r12 pushq %rbx pushq %rax movq %rdi, %r14 movq 0x8(%rdi), %r12 movq (%r12), %rbx cmpq 0x8(%r12), %rbx je 0x10448 movq %rsi, %r15 movq %rbx, %rdi movq %r15, %rsi callq 0x50f0 testl %eax, %eax je 0x10438 addq $0x30, %rbx cmpq 0x8(%r12), %rbx jne 0x1041e movq %rbx, %rax movq 0x8(%r14), %rcx movq 0x8(%rcx), %rbx jmp 0x1044b xorl %eax, %eax retq movq %rbx, %rax cmpq %rbx, %rax setne %al addq $0x8, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq nop
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: cmp byte ptr [rdi], 1 jnz short loc_10445 push r15 push r14 push r12 push rbx push rax mov r14, rdi mov r12, [rdi+8] mov rbx, [r12] cmp rbx, [r12+8] jz short loc_10448 mov r15, rsi loc_1041E: mov rdi, rbx mov rsi, r15 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7compareEPKc; std::string::compare(char const*) test eax, eax jz short loc_10438 add rbx, 30h ; '0' cmp rbx, [r12+8] jnz short loc_1041E loc_10438: mov rax, rbx mov rcx, [r14+8] mov rbx, [rcx+8] jmp short loc_1044B loc_10445: xor eax, eax retn loc_10448: mov rax, rbx loc_1044B: cmp rax, rbx setnz al add rsp, 8 pop rbx pop r12 pop r14 pop r15 retn
bool ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_( long long a1, long long a2) { long long *v2; // r12 long long v3; // rbx long long v4; // rax if ( *(_BYTE *)a1 != 1 ) return 0; v2 = *(long long **)(a1 + 8); v3 = *v2; if ( *v2 == v2[1] ) { v4 = *v2; } else { do { if ( !(unsigned int)std::string::compare(v3, a2) ) break; v3 += 48LL; } while ( v3 != v2[1] ); v4 = v3; v3 = *(_QWORD *)(*(_QWORD *)(a1 + 8) + 8LL); } return v4 != v3; }
_ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_: CMP byte ptr [RDI],0x1 JNZ 0x00110445 PUSH R15 PUSH R14 PUSH R12 PUSH RBX PUSH RAX MOV R14,RDI MOV R12,qword ptr [RDI + 0x8] MOV RBX,qword ptr [R12] CMP RBX,qword ptr [R12 + 0x8] JZ 0x00110448 MOV R15,RSI LAB_0011041e: MOV RDI,RBX MOV RSI,R15 CALL 0x001050f0 TEST EAX,EAX JZ 0x00110438 ADD RBX,0x30 CMP RBX,qword ptr [R12 + 0x8] JNZ 0x0011041e LAB_00110438: MOV RAX,RBX MOV RCX,qword ptr [R14 + 0x8] MOV RBX,qword ptr [RCX + 0x8] JMP 0x0011044b LAB_00110445: XOR EAX,EAX RET LAB_00110448: MOV RAX,RBX LAB_0011044b: CMP RAX,RBX SETNZ AL ADD RSP,0x8 POP RBX POP R12 POP R14 POP R15 RET
int8 _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE8containsIRA5_KcTnNSt9enable_ifIXsr6detail32is_usable_as_basic_json_key_typeISD_T_EE5valueEiE4typeELi0EEEbOSJ_ (char *param_1) { long *plVar1; int iVar2; char *pcVar3; char *pcVar4; if (*param_1 != '\x01') { return 0; } plVar1 = *(long **)(param_1 + 8); pcVar3 = (char *)*plVar1; pcVar4 = pcVar3; if (pcVar3 != (char *)plVar1[1]) { do { iVar2 = std::__cxx11::string::compare(pcVar3); if (iVar2 == 0) break; pcVar3 = pcVar3 + 0x30; } while (pcVar3 != (char *)plVar1[1]); pcVar4 = *(char **)(*(long *)(param_1 + 8) + 8); } return CONCAT71((int7)((ulong)pcVar3 >> 8),pcVar3 != pcVar4); }
7,927
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>> const&)
monkey531[P]llama/common/json-schema-to-grammar.cpp
std::string _generate_union_rule(const std::string & name, const std::vector<json> & alt_schemas) { std::vector<std::string> rules; for (size_t i = 0; i < alt_schemas.size(); i++) { rules.push_back(visit(alt_schemas[i], name + (name.empty() ? "alternative-" : "-") + std::to_string(i))); } return string_join(rules, " | "); }
O0
cpp
SchemaConverter::_generate_union_rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::allocator<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&): subq $0x138, %rsp # imm = 0x138 movq %rdi, 0x28(%rsp) movq %rdi, %rax movq %rax, 0x30(%rsp) movq %rdi, 0x130(%rsp) movq %rsi, 0x128(%rsp) movq %rdx, 0x120(%rsp) movq %rcx, 0x118(%rsp) movq 0x128(%rsp), %rax movq %rax, 0x38(%rsp) leaq 0x100(%rsp), %rdi callq 0x64420 movq $0x0, 0xf8(%rsp) movq 0xf8(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x118(%rsp), %rdi callq 0xb0ef0 movq %rax, %rcx movq 0x20(%rsp), %rax cmpq %rcx, %rax jae 0x1af0e2 movq 0x118(%rsp), %rdi movq 0xf8(%rsp), %rsi callq 0x1b3800 movq %rax, 0x10(%rsp) movq 0x120(%rsp), %rdi movq %rdi, 0x18(%rsp) callq 0x5d4e0 movq 0x18(%rsp), %rsi movb %al, %cl leaq 0x6f1fb(%rip), %rax # 0x21e16a leaq 0x65e31(%rip), %rdx # 0x214da7 testb %cl, %cl cmovneq %rax, %rdx leaq 0x98(%rsp), %rdi callq 0x8b5f0 jmp 0x1aef8b movq 0xf8(%rsp), %rsi leaq 0x68(%rsp), %rdi callq 0xb05f0 jmp 0x1aef9f leaq 0xb8(%rsp), %rdi leaq 0x98(%rsp), %rsi leaq 0x68(%rsp), %rdx callq 0x8dae0 jmp 0x1aefbb movq 0x10(%rsp), %rdx movq 0x38(%rsp), %rsi leaq 0xd8(%rsp), %rdi leaq 0xb8(%rsp), %rcx callq 0x1ab650 jmp 0x1aefdc leaq 0x100(%rsp), %rdi leaq 0xd8(%rsp), %rsi callq 0xf9b10 jmp 0x1aeff3 leaq 0xd8(%rsp), %rdi callq 0x5e548 leaq 0xb8(%rsp), %rdi callq 0x5e548 leaq 0x68(%rsp), %rdi callq 0x5e548 leaq 0x98(%rsp), %rdi callq 0x5e548 movq 0xf8(%rsp), %rax addq $0x1, %rax movq %rax, 0xf8(%rsp) jmp 0x1aef0a movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1af18e movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1af0d0 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1af0c6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1af0b9 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0xd8(%rsp), %rdi callq 0x5e548 leaq 0xb8(%rsp), %rdi callq 0x5e548 leaq 0x68(%rsp), %rdi callq 0x5e548 leaq 0x98(%rsp), %rdi callq 0x5e548 jmp 0x1af18e leaq 0x47(%rsp), %rdi movq %rdi, 0x8(%rsp) callq 0x5e0e0 movq 0x8(%rsp), %rdx leaq 0x6f224(%rip), %rsi # 0x21e321 leaq 0x48(%rsp), %rdi callq 0x64360 jmp 0x1af109 movq 0x28(%rsp), %rdi leaq 0x100(%rsp), %rsi leaq 0x48(%rsp), %rdx callq 0xeeb80 jmp 0x1af122 leaq 0x48(%rsp), %rdi callq 0x5e548 leaq 0x47(%rsp), %rdi callq 0x5e520 leaq 0x100(%rsp), %rdi callq 0x64460 movq 0x30(%rsp), %rax addq $0x138, %rsp # imm = 0x138 retq movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) jmp 0x1af184 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x90(%rsp) movl %eax, 0x8c(%rsp) leaq 0x48(%rsp), %rdi callq 0x5e548 leaq 0x47(%rsp), %rdi callq 0x5e520 leaq 0x100(%rsp), %rdi callq 0x64460 movq 0x90(%rsp), %rdi callq 0x5dbc0 nopl (%rax,%rax)
_ZN15SchemaConverter20_generate_union_ruleERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINSA_11ordered_mapES8_S5_blmdSaNSA_14adl_serializerES8_IhSaIhEEvEESaISG_EE: sub rsp, 138h mov [rsp+138h+var_110], rdi mov rax, rdi mov [rsp+138h+var_108], rax mov [rsp+138h+var_8], rdi mov [rsp+138h+var_10], rsi mov [rsp+138h+var_18], rdx mov [rsp+138h+var_20], rcx mov rax, [rsp+138h+var_10] mov [rsp+138h+var_100], rax lea rdi, [rsp+138h+var_38] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEC2Ev; std::vector<std::string>::vector(void) mov [rsp+138h+var_40], 0 loc_1AEF0A: mov rax, [rsp+138h+var_40] mov [rsp+138h+var_118], rax mov rdi, [rsp+138h+var_20] call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EE4sizeEv; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::size(void) mov rcx, rax mov rax, [rsp+138h+var_118] cmp rax, rcx jnb loc_1AF0E2 mov rdi, [rsp+138h+var_20] mov rsi, [rsp+138h+var_40] call _ZNKSt6vectorIN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapES_NSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES_IhSaIhEEvEESaISD_EEixEm; std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>::operator[](ulong) mov qword ptr [rsp+138h+var_128], rax; int mov rdi, [rsp+138h+var_18] mov [rsp+138h+var_120], rdi; __int64 call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5emptyEv; std::string::empty(void) mov rsi, [rsp+138h+var_120]; int mov cl, al; int lea rax, aAlternative; "alternative-" lea rdx, asc_214DA6+1; "-" test cl, cl cmovnz rdx, rax; int lea rdi, [rsp+138h+var_A0]; int call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EERKS8_PKS5_; std::operator+<char>(std::string const&,char const*) jmp short $+2 loc_1AEF8B: mov rsi, [rsp+138h+var_40]; unsigned __int64 lea rdi, [rsp+138h+var_D0]; this call _ZNSt7__cxx119to_stringEm; std::to_string(ulong) jmp short $+2 loc_1AEF9F: lea rdi, [rsp+138h+var_80] lea rsi, [rsp+138h+var_A0] lea rdx, [rsp+138h+var_D0] call _ZStplIcSt11char_traitsIcESaIcEENSt7__cxx1112basic_stringIT_T0_T1_EEOS8_S9_; std::operator+<char>(std::string&&,std::string&) jmp short $+2 loc_1AEFBB: mov rdx, qword ptr [rsp+138h+var_128] mov rsi, [rsp+138h+var_100] lea rdi, [rsp+138h+var_60] lea rcx, [rsp+138h+var_80] call _ZN15SchemaConverter5visitERKN8nlohmann16json_abi_v3_11_310basic_jsonINS1_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS1_14adl_serializerES4_IhSaIhEEvEERKSA_; SchemaConverter::visit(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&,std::string const&) jmp short $+2 loc_1AEFDC: lea rdi, [rsp+138h+var_38] lea rsi, [rsp+138h+var_60] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE9push_backEOS5_; std::vector<std::string>::push_back(std::string&&) jmp short $+2 loc_1AEFF3: lea rdi, [rsp+138h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() mov rax, [rsp+138h+var_40] add rax, 1 mov [rsp+138h+var_40], rax jmp loc_1AEF0A mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp loc_1AF18E mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_1AF0D0 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_1AF0C6 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_1AF0B9 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_D0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1AF0B9: lea rdi, [rsp+arg_B0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1AF0C6: lea rdi, [rsp+arg_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1AF0D0: lea rdi, [rsp+arg_90]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() jmp loc_1AF18E loc_1AF0E2: lea rdi, [rsp+138h+var_F1] mov [rsp+138h+var_130], rdi call __ZNSaIcEC1Ev; std::allocator<char>::allocator(void) mov rdx, [rsp+138h+var_130] lea rsi, asc_21E320+1; " | " lea rdi, [rsp+138h+var_F0] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) jmp short $+2 loc_1AF109: mov rdi, [rsp+138h+var_110] lea rsi, [rsp+138h+var_38] lea rdx, [rsp+138h+var_F0] call _Z11string_joinRKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EERKS5_; string_join(std::vector<std::string> const&,std::string const&) jmp short $+2 loc_1AF122: lea rdi, [rsp+138h+var_F0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() lea rdi, [rsp+138h+var_F1] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() lea rdi, [rsp+138h+var_38] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rax, [rsp+138h+var_108] add rsp, 138h retn mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax jmp short loc_1AF184 mov rcx, rax mov eax, edx mov [rsp+arg_88], rcx mov [rsp+arg_84], eax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_1AF184: lea rdi, [rsp+arg_3F] call __ZNSaIcED1Ev; std::allocator<char>::~allocator() loc_1AF18E: lea rdi, [rsp+arg_F8] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() mov rdi, [rsp+arg_88] call __Unwind_Resume
long long SchemaConverter::_generate_union_rule(long long a1, _BYTE *a2, long long a3, _QWORD *a4) { char v4; // al char *v5; // rdx long long v6; // rdx long long v7; // rcx long long v8; // r8 long long v9; // r9 long long v11; // [rsp+10h] [rbp-128h] long long v12; // [rsp+18h] [rbp-120h] unsigned long long v13; // [rsp+20h] [rbp-118h] long long v14; // [rsp+38h] [rbp-100h] char v15; // [rsp+47h] [rbp-F1h] BYREF _BYTE v16[32]; // [rsp+48h] [rbp-F0h] BYREF _BYTE v17[48]; // [rsp+68h] [rbp-D0h] BYREF int v18[8]; // [rsp+98h] [rbp-A0h] BYREF _BYTE v19[32]; // [rsp+B8h] [rbp-80h] BYREF _BYTE v20[32]; // [rsp+D8h] [rbp-60h] BYREF unsigned long long i; // [rsp+F8h] [rbp-40h] long long v22[3]; // [rsp+100h] [rbp-38h] BYREF _QWORD *v23; // [rsp+118h] [rbp-20h] long long v24; // [rsp+120h] [rbp-18h] _BYTE *v25; // [rsp+128h] [rbp-10h] long long v26; // [rsp+130h] [rbp-8h] v26 = a1; v25 = a2; v24 = a3; v23 = a4; v14 = (long long)a2; std::vector<std::string>::vector((long long)v22); for ( i = 0LL; ; ++i ) { v13 = i; if ( v13 >= std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::size(v23) ) break; v11 = std::vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::operator[]( v23, i); v12 = v24; v4 = std::string::empty(v24); v5 = "-"; if ( v4 ) v5 = "alternative-"; std::operator+<char>((long long)v18, v12, (long long)v5); std::to_string((std::__cxx11 *)v17, i); std::operator+<char>((long long)v19, (long long)v18, (long long)v17); SchemaConverter::visit((long long)v20, v14, v11, (long long)v19); a2 = v20; std::vector<std::string>::push_back((long long)v22, (long long)v20, v6, v7, v8, v9); std::string::~string(v20); std::string::~string(v19); std::string::~string(v17); std::string::~string(v18); } std::allocator<char>::allocator(&v15, a2); std::string::basic_string<std::allocator<char>>((long long)v16, (long long)" | ", (long long)&v15); string_join(a1, v22, (long long)v16); std::string::~string(v16); std::allocator<char>::~allocator(&v15); std::vector<std::string>::~vector(v22); return a1; }
end_object: SUB RSP,0xb8 MOV qword ptr [RSP + 0xb0],RDI MOV RDI,qword ptr [RSP + 0xb0] MOV qword ptr [RSP + 0x18],RDI ADD RDI,0x8 CALL 0x001b02d0 CMP qword ptr [RAX],0x0 JZ 0x001aef88 MOV RDI,qword ptr [RSP + 0x18] MOV RAX,RDI ADD RAX,0x80 MOV qword ptr [RSP + 0x8],RAX ADD RDI,0x8 CALL 0x001afce0 MOV RDI,qword ptr [RSP + 0x18] SUB EAX,0x1 MOV dword ptr [RSP + 0x14],EAX ADD RDI,0x8 CALL 0x001b02d0 MOV RDI,qword ptr [RSP + 0x8] MOV ESI,dword ptr [RSP + 0x14] MOV RCX,qword ptr [RAX] MOV EDX,0x1 CALL 0x001afc80 TEST AL,0x1 JNZ 0x001aef70 MOV RSI,qword ptr [RSP + 0x18] ADD RSI,0xa8 LEA RDI,[RSP + 0xa0] CALL 0x001b1e80 MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x001b02d0 MOV RDI,qword ptr [RAX] LEA RSI,[RSP + 0xa0] CALL 0x001aa700 LEA RDI,[RSP + 0xa0] CALL 0x001a14c0 JMP 0x001aef86 LAB_001aef70: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x001b02d0 MOV RDI,qword ptr [RAX] CALL 0x001b0a20 LAB_001aef86: JMP 0x001aef88 LAB_001aef88: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x001b0720 TEST AL,0x1 JNZ 0x001aef9c JMP 0x001aefbd LAB_001aef9c: LEA RDI,[0x31517e] MOV ESI,0x1bbd LEA RDX,[0x30f070] LEA RCX,[0x316184] MOV AL,0x0 CALL 0x0015def0 LAB_001aefbd: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x20 CALL 0x001afb60 TEST AL,0x1 JNZ 0x001aefd1 JMP 0x001aeff2 LAB_001aefd1: LEA RDI,[0x31517e] MOV ESI,0x1bbe LEA RDX,[0x30f070] LEA RCX,[0x3160fe] MOV AL,0x0 CALL 0x0015def0 LAB_001aeff2: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x001b2070 MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x20 CALL 0x001afc60 MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x001b0720 TEST AL,0x1 JNZ 0x001af119 MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x001b02d0 CMP qword ptr [RAX],0x0 JZ 0x001af119 MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x001b02d0 MOV RDI,qword ptr [RAX] CALL 0x001b2090 TEST AL,0x1 JNZ 0x001af05b JMP 0x001af119 LAB_001af05b: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x001b02d0 MOV RSI,qword ptr [RAX] LEA RDI,[RSP + 0x80] CALL 0x001b20d0 LAB_001af079: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x001b02d0 MOV RSI,qword ptr [RAX] LEA RDI,[RSP + 0x60] CALL 0x001b2140 LEA RDI,[RSP + 0x80] LEA RSI,[RSP + 0x60] CALL 0x001b2110 TEST AL,0x1 JNZ 0x001af0ac JMP 0x001af117 LAB_001af0ac: LEA RDI,[RSP + 0x80] CALL 0x001b2180 MOV RDI,RAX CALL 0x001aa780 TEST AL,0x1 JNZ 0x001af0c7 JMP 0x001af103 LAB_001af0c7: MOV RDI,qword ptr [RSP + 0x18] ADD RDI,0x8 CALL 0x001b02d0 MOV RAX,qword ptr [RAX] MOV qword ptr [RSP],RAX LEA RDI,[RSP + 0x40] LEA RSI,[RSP + 0x80] CALL 0x001b2940 MOV RSI,qword ptr [RSP] LEA RDI,[RSP + 0x20] LEA RDX,[RSP + 0x40] CALL 0x001b23f0 JMP 0x001af117 LAB_001af103: JMP 0x001af105 LAB_001af105: LEA RDI,[RSP + 0x80] CALL 0x001b2980 JMP 0x001af079 LAB_001af117: JMP 0x001af119 LAB_001af119: MOV AL,0x1 AND AL,0x1 ADD RSP,0xb8 RET
/* nlohmann::json_abi_v3_11_3::detail::json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::end_object() */ int8 __thiscall nlohmann::json_abi_v3_11_3::detail:: json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::end_object(json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *this) { int8 uVar1; int iVar2; long *plVar3; int8 *puVar4; ulong uVar5; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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_00; int1 local_98 [32]; 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>> local_78 [32]; int1 local_58 [32]; 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>> local_38 [32]; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> local_18 [16]; json_sax_dom_callback_parser<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> *local_8; local_8 = this; plVar3 = (long *)std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); if (*plVar3 != 0) { iVar2 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::size((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); puVar4 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); uVar5 = 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>&)> ::operator()((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>&)> *)(this + 0x80),iVar2 + -1,1,*puVar4); if ((uVar5 & 1) == 0) { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::basic_json(local_18,this + 0xa8); puVar4 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator=((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)*puVar4,local_18); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::~basic_json(local_18); } else { std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::set_parents(); } } uVar5 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::empty((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); if ((uVar5 & 1) != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1bbd, "GGML_ASSERT(%s) failed","!ref_stack.empty()"); } uVar5 = std::vector<bool,std::allocator<bool>>::empty ((vector<bool,std::allocator<bool>> *)(this + 0x20)); if ((uVar5 & 1) != 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",0x1bbe, "GGML_ASSERT(%s) failed","!keep_stack.empty()"); } std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::pop_back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); std::vector<bool,std::allocator<bool>>::pop_back ((vector<bool,std::allocator<bool>> *)(this + 0x20)); uVar5 = std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::empty((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); if (((uVar5 & 1) == 0) && (plVar3 = (long *)std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)), *plVar3 != 0)) { puVar4 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); uVar5 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::is_structured((basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)*puVar4); if ((uVar5 & 1) != 0) { std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::begin(); while( true ) { std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::end(); uVar5 = _ZNK8nlohmann16json_abi_v3_11_36detail9iter_implINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEEneISG_TnNSt9enable_ifIXoosr3std7is_sameIT_SG_EE5valuesr3std7is_sameISJ_NS2_IKSF_EEEE5valueEDnE4typeELDn0EEEbRKSJ_ (local_38,local_58); if ((uVar5 & 1) == 0) break; this_00 = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *)iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::operator->(local_38); uVar5 = basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::is_discarded(this_00); if ((uVar5 & 1) != 0) { puVar4 = (int8 *) std:: vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> ::back((vector<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*,std::allocator<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>*>> *)(this + 8)); uVar1 = *puVar4; iter_impl<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::iter_impl(local_78,(iter_impl *)local_38); _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE5eraseINS0_6detail9iter_implISD_EETnNSt9enable_ifIXoosr3std7is_sameIT_SH_EE5valuesr3std7is_sameISJ_NSG_IKSD_EEEE5valueEiE4typeELi0EEESJ_SJ_ (local_98,uVar1,local_78); return 1; } 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>> ::operator++(local_38); } } } return 1; }
7,928
PFS_account::aggregate_status(PFS_user*, PFS_host*)
eloqsql/storage/perfschema/pfs_account.cc
void PFS_account::aggregate_status(PFS_user *safe_user, PFS_host *safe_host) { /* Never aggregate to global_status_var, because of the parallel THD -> global_status_var flow. */ if (safe_user != NULL) { /* Aggregate STATUS_BY_ACCOUNT to: - STATUS_BY_USER */ safe_user->m_status_stats.aggregate(& m_status_stats); } if (safe_host != NULL) { /* Aggregate STATUS_BY_ACCOUNT to: - STATUS_BY_HOST */ safe_host->m_status_stats.aggregate(& m_status_stats); } m_status_stats.reset(); return; }
O3
cpp
PFS_account::aggregate_status(PFS_user*, PFS_host*): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdx, %r14 movq %rdi, %rbx testq %rsi, %rsi je 0x45587 addq $0x30, %rsi leaq 0x30(%rbx), %rax movq %rsi, %rdi movq %rax, %rsi callq 0x402f0 testq %r14, %r14 je 0x4559c addq $0x30, %r14 leaq 0x30(%rbx), %rsi movq %r14, %rdi callq 0x402f0 addq $0x30, %rbx movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x402d8
_ZN11PFS_account16aggregate_statusEP8PFS_userP8PFS_host: push rbp mov rbp, rsp push r14 push rbx mov r14, rdx mov rbx, rdi test rsi, rsi jz short loc_45587 add rsi, 30h ; '0' lea rax, [rbx+30h] mov rdi, rsi mov rsi, rax call _ZN16PFS_status_stats9aggregateEPKS_; PFS_status_stats::aggregate(PFS_status_stats const*) loc_45587: test r14, r14 jz short loc_4559C add r14, 30h ; '0' lea rsi, [rbx+30h] mov rdi, r14 call _ZN16PFS_status_stats9aggregateEPKS_; PFS_status_stats::aggregate(PFS_status_stats const*) loc_4559C: add rbx, 30h ; '0' mov rdi, rbx; this pop rbx pop r14 pop rbp jmp _ZN16PFS_status_stats5resetEv; PFS_status_stats::reset(void)
long long PFS_account::aggregate_status(PFS_account *this, PFS_user *a2, PFS_host *a3) { if ( a2 ) PFS_status_stats::aggregate((PFS_user *)((char *)a2 + 48), (PFS_account *)((char *)this + 48)); if ( a3 ) PFS_status_stats::aggregate((PFS_host *)((char *)a3 + 48), (PFS_account *)((char *)this + 48)); return PFS_status_stats::reset((PFS_account *)((char *)this + 48)); }
aggregate_status: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV R14,RDX MOV RBX,RDI TEST RSI,RSI JZ 0x00145587 ADD RSI,0x30 LEA RAX,[RBX + 0x30] MOV RDI,RSI MOV RSI,RAX CALL 0x001402f0 LAB_00145587: TEST R14,R14 JZ 0x0014559c ADD R14,0x30 LEA RSI,[RBX + 0x30] MOV RDI,R14 CALL 0x001402f0 LAB_0014559c: ADD RBX,0x30 MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x001402d8
/* PFS_account::aggregate_status(PFS_user*, PFS_host*) */ void __thiscall PFS_account::aggregate_status(PFS_account *this,PFS_user *param_1,PFS_host *param_2) { if (param_1 != (PFS_user *)0x0) { PFS_status_stats::aggregate ((PFS_status_stats *)(param_1 + 0x30),(PFS_status_stats *)(this + 0x30)); } if (param_2 != (PFS_host *)0x0) { PFS_status_stats::aggregate ((PFS_status_stats *)(param_2 + 0x30),(PFS_status_stats *)(this + 0x30)); } PFS_status_stats::reset((PFS_status_stats *)(this + 0x30)); return; }
7,929
mi_rec_pos
eloqsql/storage/myisam/mi_search.c
my_off_t _mi_rec_pos(MYISAM_SHARE *s, uchar *ptr) { my_off_t pos; switch (s->rec_reflength) { #if SIZEOF_OFF_T > 4 case 8: pos= (my_off_t) mi_uint8korr(ptr); if (pos == HA_OFFSET_ERROR) return HA_OFFSET_ERROR; /* end of list */ break; case 7: pos= (my_off_t) mi_uint7korr(ptr); if (pos == (((my_off_t) 1) << 56) -1) return HA_OFFSET_ERROR; /* end of list */ break; case 6: pos= (my_off_t) mi_uint6korr(ptr); if (pos == (((my_off_t) 1) << 48) -1) return HA_OFFSET_ERROR; /* end of list */ break; case 5: pos= (my_off_t) mi_uint5korr(ptr); if (pos == (((my_off_t) 1) << 40) -1) return HA_OFFSET_ERROR; /* end of list */ break; #else case 8: case 7: case 6: case 5: ptr+= (s->rec_reflength-4); /* fall through */ #endif case 4: pos= (my_off_t) mi_uint4korr(ptr); if (pos == (my_off_t) (uint32) ~0L) return HA_OFFSET_ERROR; break; case 3: pos= (my_off_t) mi_uint3korr(ptr); if (pos == (my_off_t) (1 << 24) -1) return HA_OFFSET_ERROR; break; case 2: pos= (my_off_t) mi_uint2korr(ptr); if (pos == (my_off_t) (1 << 16) -1) return HA_OFFSET_ERROR; break; default: abort(); /* Impossible */ } return ((s->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? pos : pos*s->base.pack_reclength); }
O3
c
mi_rec_pos: movl 0x338(%rdi), %eax addl $-0x2, %eax cmpl $0x6, %eax ja 0x3e866 leaq 0x5ddc7(%rip), %rcx # 0x9c518 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movzwl (%rsi), %ecx rolw $0x8, %cx movq $-0x1, %rax cmpw $-0x1, %cx je 0x3e7b4 movzwl %cx, %ecx jmp 0x3e849 movl (%rsi), %ecx movzwl 0x4(%rsi), %eax shlq $0x30, %rax shlq $0x10, %rcx orq %rax, %rcx bswapq %rcx movq $-0x1, %rax movabsq $0xffffffffffff, %rdx # imm = 0xFFFFFFFFFFFF jmp 0x3e832 movl (%rsi), %ecx bswapl %ecx movq $-0x1, %rax cmpl $-0x1, %ecx jne 0x3e849 retq movl (%rsi), %ecx movzbl 0x4(%rsi), %eax shlq $0x38, %rax shlq $0x18, %rcx orq %rax, %rcx bswapq %rcx movq $-0x1, %rax movabsq $0xffffffffff, %rdx # imm = 0xFFFFFFFFFF jmp 0x3e832 movzwl 0x1(%rsi), %eax rolw $0x8, %ax movzwl %ax, %eax movzbl (%rsi), %ecx shll $0x10, %ecx orq %rax, %rcx movq $-0x1, %rax cmpq $0xffffff, %rcx # imm = 0xFFFFFF je 0x3e7b4 jmp 0x3e849 movl (%rsi), %ecx movzwl 0x4(%rsi), %eax movzbl 0x6(%rsi), %edx shlq $0x38, %rdx shlq $0x28, %rax shlq $0x8, %rcx orq %rax, %rcx orq %rdx, %rcx bswapq %rcx movq $-0x1, %rax movabsq $0xffffffffffffff, %rdx # imm = 0xFFFFFFFFFFFFFF cmpq %rdx, %rcx je 0x3e7b4 jmp 0x3e849 movq (%rsi), %rcx bswapq %rcx cmpq $-0x1, %rcx je 0x3e85e testb $0x5, 0x318(%rdi) jne 0x3e85a imulq 0x148(%rdi), %rcx movq %rcx, %rax retq movq $-0x1, %rax retq pushq %rbp movq %rsp, %rbp callq 0x281e0
_mi_rec_pos: mov eax, [rdi+338h] add eax, 0FFFFFFFEh; switch 7 cases cmp eax, 6 ja def_3E758; jumptable 000000000003E758 default case lea rcx, jpt_3E758 movsxd rax, ds:(jpt_3E758 - 9C518h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_3E75A: movzx ecx, word ptr [rsi]; jumptable 000000000003E758 case 2 rol cx, 8 mov rax, 0FFFFFFFFFFFFFFFFh cmp cx, 0FFFFh jz short locret_3E7B4 movzx ecx, cx jmp loc_3E849 loc_3E776: mov ecx, [rsi]; jumptable 000000000003E758 case 6 movzx eax, word ptr [rsi+4] shl rax, 30h shl rcx, 10h or rcx, rax bswap rcx mov rax, 0FFFFFFFFFFFFFFFFh mov rdx, 0FFFFFFFFFFFFh jmp loc_3E832 loc_3E7A0: mov ecx, [rsi]; jumptable 000000000003E758 case 4 bswap ecx mov rax, 0FFFFFFFFFFFFFFFFh cmp ecx, 0FFFFFFFFh jnz loc_3E849 locret_3E7B4: retn loc_3E7B5: mov ecx, [rsi]; jumptable 000000000003E758 case 5 movzx eax, byte ptr [rsi+4] shl rax, 38h shl rcx, 18h or rcx, rax bswap rcx mov rax, 0FFFFFFFFFFFFFFFFh mov rdx, 0FFFFFFFFFFh jmp short loc_3E832 loc_3E7DC: movzx eax, word ptr [rsi+1]; jumptable 000000000003E758 case 3 rol ax, 8 movzx eax, ax movzx ecx, byte ptr [rsi] shl ecx, 10h or rcx, rax mov rax, 0FFFFFFFFFFFFFFFFh cmp rcx, 0FFFFFFh jz short locret_3E7B4 jmp short loc_3E849 loc_3E802: mov ecx, [rsi]; jumptable 000000000003E758 case 7 movzx eax, word ptr [rsi+4] movzx edx, byte ptr [rsi+6] shl rdx, 38h shl rax, 28h shl rcx, 8 or rcx, rax or rcx, rdx bswap rcx mov rax, 0FFFFFFFFFFFFFFFFh mov rdx, 0FFFFFFFFFFFFFFh loc_3E832: cmp rcx, rdx jz locret_3E7B4 jmp short loc_3E849 loc_3E83D: mov rcx, [rsi]; jumptable 000000000003E758 case 8 bswap rcx cmp rcx, 0FFFFFFFFFFFFFFFFh jz short loc_3E85E loc_3E849: test byte ptr [rdi+318h], 5 jnz short loc_3E85A imul rcx, [rdi+148h] loc_3E85A: mov rax, rcx retn loc_3E85E: mov rax, 0FFFFFFFFFFFFFFFFh retn def_3E758: push rbp; jumptable 000000000003E758 default case mov rbp, rsp call _abort
long long mi_rec_pos(long long a1, _WORD *a2) { unsigned long long v2; // rcx long long result; // rax long long v4; // rdx switch ( *(_DWORD *)(a1 + 824) ) { case 2: LOWORD(v2) = __ROL2__(*a2, 8); result = -1LL; if ( (_WORD)v2 == 0xFFFF ) return result; v2 = (unsigned __int16)v2; goto LABEL_14; case 3: v2 = (unsigned __int16)__ROL2__(*(_WORD *)((char *)a2 + 1), 8) | (unsigned long long)(*(unsigned __int8 *)a2 << 16); result = -1LL; if ( v2 != 0xFFFFFF ) goto LABEL_14; return result; case 4: v2 = _byteswap_ulong(*(_DWORD *)a2); result = -1LL; if ( (_DWORD)v2 == -1 ) return result; goto LABEL_14; case 5: v2 = _byteswap_uint64(((unsigned long long)*((unsigned __int8 *)a2 + 4) << 56) | ((unsigned long long)*(unsigned int *)a2 << 24)); result = -1LL; v4 = 0xFFFFFFFFFFLL; goto LABEL_11; case 6: v2 = _byteswap_uint64(((unsigned long long)(unsigned __int16)a2[2] << 48) | ((unsigned long long)*(unsigned int *)a2 << 16)); result = -1LL; v4 = 0xFFFFFFFFFFFFLL; goto LABEL_11; case 7: v2 = _byteswap_uint64(((unsigned long long)*((unsigned __int8 *)a2 + 6) << 56) | ((unsigned long long)(unsigned __int16)a2[2] << 40) | ((unsigned long long)*(unsigned int *)a2 << 8)); result = -1LL; v4 = 0xFFFFFFFFFFFFFFLL; LABEL_11: if ( v2 != v4 ) goto LABEL_14; return result; case 8: v2 = _byteswap_uint64(*(_QWORD *)a2); if ( v2 == -1LL ) return -1LL; LABEL_14: if ( (*(_BYTE *)(a1 + 792) & 5) == 0 ) v2 *= *(_QWORD *)(a1 + 328); return v2; default: abort(a1); } }
_mi_rec_pos: MOV EAX,dword ptr [RDI + 0x338] ADD EAX,-0x2 CMP EAX,0x6 JA 0x0013e866 LEA RCX,[0x19c518] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_2: MOVZX ECX,word ptr [RSI] ROL CX,0x8 MOV RAX,-0x1 CMP CX,-0x1 JZ 0x0013e7b4 MOVZX ECX,CX JMP 0x0013e849 caseD_6: MOV ECX,dword ptr [RSI] MOVZX EAX,word ptr [RSI + 0x4] SHL RAX,0x30 SHL RCX,0x10 OR RCX,RAX BSWAP RCX MOV RAX,-0x1 MOV RDX,0xffffffffffff JMP 0x0013e832 caseD_4: MOV ECX,dword ptr [RSI] BSWAP ECX MOV RAX,-0x1 CMP ECX,-0x1 JNZ 0x0013e849 LAB_0013e7b4: RET caseD_5: MOV ECX,dword ptr [RSI] MOVZX EAX,byte ptr [RSI + 0x4] SHL RAX,0x38 SHL RCX,0x18 OR RCX,RAX BSWAP RCX MOV RAX,-0x1 MOV RDX,0xffffffffff JMP 0x0013e832 caseD_3: MOVZX EAX,word ptr [RSI + 0x1] ROL AX,0x8 MOVZX EAX,AX MOVZX ECX,byte ptr [RSI] SHL ECX,0x10 OR RCX,RAX MOV RAX,-0x1 CMP RCX,0xffffff JZ 0x0013e7b4 JMP 0x0013e849 caseD_7: MOV ECX,dword ptr [RSI] MOVZX EAX,word ptr [RSI + 0x4] MOVZX EDX,byte ptr [RSI + 0x6] SHL RDX,0x38 SHL RAX,0x28 SHL RCX,0x8 OR RCX,RAX OR RCX,RDX BSWAP RCX MOV RAX,-0x1 MOV RDX,0xffffffffffffff LAB_0013e832: CMP RCX,RDX JZ 0x0013e7b4 JMP 0x0013e849 caseD_8: MOV RCX,qword ptr [RSI] BSWAP RCX CMP RCX,-0x1 JZ 0x0013e85e LAB_0013e849: TEST byte ptr [RDI + 0x318],0x5 JNZ 0x0013e85a IMUL RCX,qword ptr [RDI + 0x148] LAB_0013e85a: MOV RAX,RCX RET LAB_0013e85e: MOV RAX,-0x1 RET default: PUSH RBP MOV RBP,RSP CALL 0x001281e0
ulong _mi_rec_pos(long param_1,ulong *param_2) { ushort uVar1; uint uVar2; ulong uVar3; ulong uVar4; switch(*(int4 *)(param_1 + 0x338)) { case 2: uVar1 = (ushort)*param_2 << 8 | (ushort)*param_2 >> 8; if (uVar1 == 0xffff) { return 0xffffffffffffffff; } uVar4 = (ulong)uVar1; break; case 3: uVar4 = (ulong)CONCAT12((char)*param_2, *(ushort *)((long)param_2 + 1) << 8 | *(ushort *)((long)param_2 + 1) >> 8); if (uVar4 == 0xffffff) { return 0xffffffffffffffff; } break; case 4: uVar2 = (uint)*param_2; uVar2 = uVar2 >> 0x18 | (uVar2 & 0xff0000) >> 8 | (uVar2 & 0xff00) << 8 | uVar2 << 0x18; uVar4 = (ulong)uVar2; if (uVar2 == 0xffffffff) { return 0xffffffffffffffff; } break; case 5: uVar4 = (ulong)(uint)*param_2 << 0x18; uVar4 = (ulong)*(byte *)((long)param_2 + 4) | (uVar4 & 0xff000000000000) >> 0x28 | (uVar4 & 0xff0000000000) >> 0x18 | (uVar4 & 0xff00000000) >> 8 | (uVar4 & 0xff000000) << 8; uVar3 = 0xffffffffff; goto LAB_0013e832; case 6: uVar4 = (ulong)*(ushort *)((long)param_2 + 4) << 0x30; uVar3 = (ulong)(uint)*param_2 << 0x10; uVar4 = uVar4 >> 0x38 | (uVar4 & 0xff000000000000) >> 0x28 | (uVar3 & 0xff0000000000) >> 0x18 | (uVar3 & 0xff00000000) >> 8 | (uVar3 & 0xff000000) << 8 | (uVar3 & 0xff0000) << 0x18; uVar3 = 0xffffffffffff; goto LAB_0013e832; case 7: uVar4 = (ulong)*(ushort *)((long)param_2 + 4) << 0x28; uVar3 = (ulong)(uint)*param_2 << 8; uVar4 = (ulong)*(byte *)((long)param_2 + 6) | (uVar4 & 0xff000000000000) >> 0x28 | (uVar4 & 0xff0000000000) >> 0x18 | (uVar3 & 0xff00000000) >> 8 | (uVar3 & 0xff000000) << 8 | (uVar3 & 0xff0000) << 0x18 | (uVar3 & 0xff00) << 0x28; uVar3 = 0xffffffffffffff; LAB_0013e832: if (uVar4 == uVar3) { return 0xffffffffffffffff; } break; case 8: uVar4 = *param_2; uVar4 = uVar4 >> 0x38 | (uVar4 & 0xff000000000000) >> 0x28 | (uVar4 & 0xff0000000000) >> 0x18 | (uVar4 & 0xff00000000) >> 8 | (uVar4 & 0xff000000) << 8 | (uVar4 & 0xff0000) << 0x18 | (uVar4 & 0xff00) << 0x28 | uVar4 << 0x38; if (uVar4 == 0xffffffffffffffff) { return 0xffffffffffffffff; } break; default: /* WARNING: Subroutine does not return */ abort(); } if ((*(byte *)(param_1 + 0x318) & 5) == 0) { uVar4 = uVar4 * *(long *)(param_1 + 0x148); } return uVar4; }
7,930
testing::internal::PrintOnOneLine(char const*, int)
seiftnesse[P]memoryallocator/build_O3/_deps/googletest-src/googletest/src/gtest.cc
static void PrintOnOneLine(const char* str, int max_length) { if (str != nullptr) { for (int i = 0; *str != '\0'; ++str) { if (i >= max_length) { printf("..."); break; } if (*str == '\n') { printf("\\n"); i += 2; } else { printf("%c", *str); ++i; } } } }
O3
cpp
testing::internal::PrintOnOneLine(char const*, int): pushq %rbp pushq %r14 pushq %rbx testq %rdi, %rdi je 0x3291a movq %rdi, %rbx movb (%rdi), %al testb %al, %al je 0x3291a incq %rbx leaq 0x110e8(%rip), %r14 # 0x439cb xorl %ebp, %ebp cmpl $0xfa, %ebp jae 0x3291f cmpb $0xa, %al jne 0x32902 movq %r14, %rdi xorl %eax, %eax callq 0x9080 movl $0x2, %eax jmp 0x3290f movsbl %al, %edi callq 0x97a0 movl $0x1, %eax addl %eax, %ebp movb (%rbx), %al incq %rbx testb %al, %al jne 0x328e5 popq %rbx popq %r14 popq %rbp retq leaq 0x1121c(%rip), %rdi # 0x43b42 xorl %eax, %eax popq %rbx popq %r14 popq %rbp jmp 0x9080 nop
_ZN7testing8internalL14PrintOnOneLineEPKci: push rbp push r14 push rbx test rdi, rdi jz short loc_3291A mov rbx, rdi mov al, [rdi] test al, al jz short loc_3291A inc rbx lea r14, aN; "\\n" xor ebp, ebp loc_328E5: cmp ebp, 0FAh jnb short loc_3291F cmp al, 0Ah jnz short loc_32902 mov rdi, r14 xor eax, eax call _printf mov eax, 2 jmp short loc_3290F loc_32902: movsx edi, al call _putchar mov eax, 1 loc_3290F: add ebp, eax mov al, [rbx] inc rbx test al, al jnz short loc_328E5 loc_3291A: pop rbx pop r14 pop rbp retn loc_3291F: lea rdi, aGoogleTestInte+20h; "..." xor eax, eax pop rbx pop r14 pop rbp jmp _printf
void testing::internal::PrintOnOneLine(testing::internal *this, const char *a2) { char v2; // al char *v3; // rbx unsigned int v4; // ebp int v5; // eax if ( this ) { v2 = *(_BYTE *)this; if ( *(_BYTE *)this ) { v3 = (char *)this + 1; v4 = 0; while ( v4 < 0xFA ) { if ( v2 == 10 ) { printf("\\n"); v5 = 2; } else { putchar((unsigned int)v2); v5 = 1; } v4 += v5; v2 = *v3++; if ( !v2 ) return; } printf("..."); } } }
PrintOnOneLine: PUSH RBP PUSH R14 PUSH RBX TEST RDI,RDI JZ 0x0013291a MOV RBX,RDI MOV AL,byte ptr [RDI] TEST AL,AL JZ 0x0013291a INC RBX LEA R14,[0x1439cb] XOR EBP,EBP LAB_001328e5: CMP EBP,0xfa JNC 0x0013291f CMP AL,0xa JNZ 0x00132902 MOV RDI,R14 XOR EAX,EAX CALL 0x00109080 MOV EAX,0x2 JMP 0x0013290f LAB_00132902: MOVSX EDI,AL CALL 0x001097a0 MOV EAX,0x1 LAB_0013290f: ADD EBP,EAX MOV AL,byte ptr [RBX] INC RBX TEST AL,AL JNZ 0x001328e5 LAB_0013291a: POP RBX POP R14 POP RBP RET LAB_0013291f: LEA RDI,[0x143b42] XOR EAX,EAX POP RBX POP R14 POP RBP JMP 0x00109080
/* testing::internal::PrintOnOneLine(char const*, int) */ void testing::internal::PrintOnOneLine(char *param_1,int param_2) { char cVar1; int iVar2; char *pcVar3; uint uVar4; if ((param_1 != (char *)0x0) && (cVar1 = *param_1, cVar1 != '\0')) { pcVar3 = param_1 + 1; uVar4 = 0; do { if (0xf9 < uVar4) { printf("..."); return; } if (cVar1 == '\n') { printf("\\n"); iVar2 = 2; } else { putchar((int)cVar1); iVar2 = 1; } uVar4 = uVar4 + iVar2; cVar1 = *pcVar3; pcVar3 = pcVar3 + 1; } while (cVar1 != '\0'); } return; }
7,931
my_rw_wrlock
eloqsql/mysys/thr_rwlock.c
int my_rw_wrlock(my_rw_lock_t *rwp) { pthread_mutex_lock(&rwp->lock); rwp->waiters++; /* another writer queued */ my_rw_lock_assert_not_write_owner(rwp); while (rwp->state) pthread_cond_wait(&rwp->writers, &rwp->lock); rwp->state = -1; rwp->waiters--; #ifdef SAFE_MUTEX rwp->write_thread= pthread_self(); #endif pthread_mutex_unlock(&rwp->lock); return(0); }
O3
c
my_rw_wrlock: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx callq 0x24450 movl 0x8c(%rbx), %eax leal 0x1(%rax), %ecx movl %ecx, 0x8c(%rbx) cmpl $0x0, 0x88(%rbx) je 0x2743c leaq 0x58(%rbx), %r14 movq %r14, %rdi movq %rbx, %rsi callq 0x244d0 cmpl $0x0, 0x88(%rbx) jne 0x27420 movl 0x8c(%rbx), %eax decl %eax movl $0xffffffff, 0x88(%rbx) # imm = 0xFFFFFFFF movl %eax, 0x8c(%rbx) movq %rbx, %rdi callq 0x241f0 xorl %eax, %eax popq %rbx popq %r14 popq %rbp retq
my_rw_wrlock: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi call _pthread_mutex_lock mov eax, [rbx+8Ch] lea ecx, [rax+1] mov [rbx+8Ch], ecx cmp dword ptr [rbx+88h], 0 jz short loc_2743C lea r14, [rbx+58h] loc_27420: mov rdi, r14 mov rsi, rbx call _pthread_cond_wait cmp dword ptr [rbx+88h], 0 jnz short loc_27420 mov eax, [rbx+8Ch] dec eax loc_2743C: mov dword ptr [rbx+88h], 0FFFFFFFFh mov [rbx+8Ch], eax mov rdi, rbx call _pthread_mutex_unlock xor eax, eax pop rbx pop r14 pop rbp retn
long long my_rw_wrlock(long long a1) { int v1; // eax pthread_mutex_lock(a1); v1 = *(_DWORD *)(a1 + 140); *(_DWORD *)(a1 + 140) = v1 + 1; if ( *(_DWORD *)(a1 + 136) ) { do pthread_cond_wait(a1 + 88, a1); while ( *(_DWORD *)(a1 + 136) ); v1 = *(_DWORD *)(a1 + 140) - 1; } *(_DWORD *)(a1 + 136) = -1; *(_DWORD *)(a1 + 140) = v1; pthread_mutex_unlock(a1); return 0LL; }
my_rw_wrlock: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI CALL 0x00124450 MOV EAX,dword ptr [RBX + 0x8c] LEA ECX,[RAX + 0x1] MOV dword ptr [RBX + 0x8c],ECX CMP dword ptr [RBX + 0x88],0x0 JZ 0x0012743c LEA R14,[RBX + 0x58] LAB_00127420: MOV RDI,R14 MOV RSI,RBX CALL 0x001244d0 CMP dword ptr [RBX + 0x88],0x0 JNZ 0x00127420 MOV EAX,dword ptr [RBX + 0x8c] DEC EAX LAB_0012743c: MOV dword ptr [RBX + 0x88],0xffffffff MOV dword ptr [RBX + 0x8c],EAX MOV RDI,RBX CALL 0x001241f0 XOR EAX,EAX POP RBX POP R14 POP RBP RET
int8 my_rw_wrlock(pthread_mutex_t *param_1) { int iVar1; pthread_mutex_lock(param_1); iVar1 = *(int *)((long)param_1 + 0x8c); *(int *)((long)param_1 + 0x8c) = iVar1 + 1; if (*(int *)((long)param_1 + 0x88) != 0) { do { pthread_cond_wait((pthread_cond_t *)((long)param_1 + 0x58),param_1); } while (*(int *)((long)param_1 + 0x88) != 0); iVar1 = *(int *)((long)param_1 + 0x8c) + -1; } *(int4 *)((long)param_1 + 0x88) = 0xffffffff; *(int *)((long)param_1 + 0x8c) = iVar1; pthread_mutex_unlock(param_1); return 0; }
7,932
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/json.hpp
T& operator[](const key_type& key) { return emplace(key, T{}).first->second; }
O3
cpp
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): pushq %r15 pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %rbx movq %rdi, %r14 movq %rsp, %r15 movb $0x0, (%r15) movq $0x0, 0x8(%r15) movq %r15, %rdi movl $0x1, %esi callq 0x40bf2 movq %r15, %rdi movl $0x1, %esi callq 0x40bf2 movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x4d884 movq %rax, %rbx addq $0x20, %rbx movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x40bf2 movq %r14, %rdi callq 0x4d7e0 movq %rbx, %rax addq $0x10, %rsp popq %rbx popq %r14 popq %r15 retq movq %rax, %rbx movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x40bf2 movq %r14, %rdi callq 0x4d7e0 movq %rbx, %rdi callq 0x18c10 nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEEixERSH_: push r15 push r14 push rbx sub rsp, 10h mov rbx, rsi mov r14, rdi mov r15, rsp mov byte ptr [r15], 0 mov qword ptr [r15+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov rsi, rbx mov rdx, r15 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&) mov rbx, rax add rbx, 20h ; ' ' mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rax, rbx add rsp, 10h pop rbx pop r14 pop r15 retn mov rbx, rax mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() mov rdi, rbx call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::operator[]( long long a1, long long a2) { long long v2; // rbx char v4[8]; // [rsp+0h] [rbp-28h] BYREF long long v5; // [rsp+8h] [rbp-20h] v4[0] = 0; v5 = 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(v4); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant(v4); v2 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace( a1, a2, v4) + 32; 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(v4); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v4); return v2; }
operator[]: PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x10 MOV RBX,RSI MOV R14,RDI MOV R15,RSP MOV byte ptr [R15],0x0 MOV qword ptr [R15 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x00140bf2 MOV RDI,R15 MOV ESI,0x1 CALL 0x00140bf2 LAB_0014d788: MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x0014d884 LAB_0014d796: MOV RBX,RAX ADD RBX,0x20 MOV R14,RSP MOV RDI,R14 XOR ESI,ESI CALL 0x00140bf2 MOV RDI,R14 CALL 0x0014d7e0 MOV RAX,RBX ADD RSP,0x10 POP RBX POP R14 POP R15 RET
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > >::operator[](std::__cxx11::string const&) */ long __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::operator[](ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *this,string *param_1) { long lVar1; bool bVar2; basic_json local_28 [8]; int8 local_20; local_28[0] = (basic_json)0x0; local_20 = 0; bVar2 = SUB81(local_28,0); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(bVar2); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar2); /* try { // try from 0014d788 to 0014d795 has its CatchHandler @ 0014d7bf */ lVar1 = emplace(this,param_1,local_28); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(bVar2); basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::data::~data((data *)local_28); return lVar1 + 0x20; }
7,933
ma_SHA1Update
eloqsql/libmariadb/libmariadb/ma_sha1.c
void ma_SHA1Update(_MA_SHA1_CTX * context, const unsigned char *input, size_t inputLen) { unsigned int i, index, partLen; /* Compute number of bytes mod 64 */ index = (unsigned int) ((context->count[0] >> 3) & 0x3F); /* Update number of bits */ if ((context->count[0] += ((uint32) inputLen << 3)) < ((uint32) inputLen << 3)) context->count[1]++; context->count[1] += ((uint32) inputLen >> 29); partLen = 64 - index; /* Transform as many times as possible. */ if (inputLen >= partLen) { memcpy ((unsigned char*) & context->buffer[index], (unsigned char*) input, partLen); ma_SHA1Transform(context->state, context->buffer); for (i = partLen; i + 63 < inputLen; i += 64) ma_SHA1Transform(context->state, &input[i]); index = 0; } else i = 0; /* Buffer remaining input */ memcpy ((unsigned char*) & context->buffer[index], (unsigned char*) & input[i], inputLen - i); }
O0
c
ma_SHA1Update: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq -0x8(%rbp), %rax movl 0x14(%rax), %eax shrl $0x3, %eax andl $0x3f, %eax movl %eax, -0x20(%rbp) movq -0x18(%rbp), %rax shll $0x3, %eax movq -0x8(%rbp), %rcx addl 0x14(%rcx), %eax movl %eax, 0x14(%rcx) movq -0x18(%rbp), %rcx shll $0x3, %ecx cmpl %ecx, %eax jae 0x492ed movq -0x8(%rbp), %rax movl 0x18(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x18(%rax) movq -0x18(%rbp), %rax movl %eax, %ecx shrl $0x1d, %ecx movq -0x8(%rbp), %rax addl 0x18(%rax), %ecx movl %ecx, 0x18(%rax) movl $0x40, %eax subl -0x20(%rbp), %eax movl %eax, -0x24(%rbp) movq -0x18(%rbp), %rax movl -0x24(%rbp), %ecx cmpq %rcx, %rax jb 0x4937f movq -0x8(%rbp), %rdi addq $0x1c, %rdi movl -0x20(%rbp), %eax addq %rax, %rdi movq -0x10(%rbp), %rsi movl -0x24(%rbp), %eax movl %eax, %edx callq 0x13360 movq -0x8(%rbp), %rdi movq -0x8(%rbp), %rsi addq $0x1c, %rsi callq 0x493c0 movl -0x24(%rbp), %eax movl %eax, -0x1c(%rbp) movl -0x1c(%rbp), %eax addl $0x3f, %eax movl %eax, %eax cmpq -0x18(%rbp), %rax jae 0x49376 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi movl -0x1c(%rbp), %eax addq %rax, %rsi callq 0x493c0 movl -0x1c(%rbp), %eax addl $0x40, %eax movl %eax, -0x1c(%rbp) jmp 0x4934a movl $0x0, -0x20(%rbp) jmp 0x49386 movl $0x0, -0x1c(%rbp) movq -0x8(%rbp), %rdi addq $0x1c, %rdi movl -0x20(%rbp), %eax addq %rax, %rdi movq -0x10(%rbp), %rsi movl -0x1c(%rbp), %eax addq %rax, %rsi movq -0x18(%rbp), %rdx movl -0x1c(%rbp), %eax subq %rax, %rdx callq 0x13360 addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
ma_SHA1Update: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_8], rdi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, [rbp+var_8] mov eax, [rax+14h] shr eax, 3 and eax, 3Fh mov [rbp+var_20], eax mov rax, [rbp+var_18] shl eax, 3 mov rcx, [rbp+var_8] add eax, [rcx+14h] mov [rcx+14h], eax mov rcx, [rbp+var_18] shl ecx, 3 cmp eax, ecx jnb short loc_492ED mov rax, [rbp+var_8] mov ecx, [rax+18h] add ecx, 1 mov [rax+18h], ecx loc_492ED: mov rax, [rbp+var_18] mov ecx, eax shr ecx, 1Dh mov rax, [rbp+var_8] add ecx, [rax+18h] mov [rax+18h], ecx mov eax, 40h ; '@' sub eax, [rbp+var_20] mov [rbp+var_24], eax mov rax, [rbp+var_18] mov ecx, [rbp+var_24] cmp rax, rcx jb short loc_4937F mov rdi, [rbp+var_8] add rdi, 1Ch mov eax, [rbp+var_20] add rdi, rax mov rsi, [rbp+var_10] mov eax, [rbp+var_24] mov edx, eax call _memcpy mov rdi, [rbp+var_8] mov rsi, [rbp+var_8] add rsi, 1Ch call ma_SHA1Transform mov eax, [rbp+var_24] mov [rbp+var_1C], eax loc_4934A: mov eax, [rbp+var_1C] add eax, 3Fh ; '?' mov eax, eax cmp rax, [rbp+var_18] jnb short loc_49376 mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] mov eax, [rbp+var_1C] add rsi, rax call ma_SHA1Transform mov eax, [rbp+var_1C] add eax, 40h ; '@' mov [rbp+var_1C], eax jmp short loc_4934A loc_49376: mov [rbp+var_20], 0 jmp short loc_49386 loc_4937F: mov [rbp+var_1C], 0 loc_49386: mov rdi, [rbp+var_8] add rdi, 1Ch mov eax, [rbp+var_20] add rdi, rax mov rsi, [rbp+var_10] mov eax, [rbp+var_1C] add rsi, rax mov rdx, [rbp+var_18] mov eax, [rbp+var_1C] sub rdx, rax call _memcpy add rsp, 30h pop rbp retn
long long ma_SHA1Update(long long a1, long long a2, unsigned long long a3) { unsigned int v3; // eax unsigned int v5; // [rsp+10h] [rbp-20h] unsigned int i; // [rsp+14h] [rbp-1Ch] v5 = (*(_DWORD *)(a1 + 20) >> 3) & 0x3F; v3 = *(_DWORD *)(a1 + 20) + 8 * a3; *(_DWORD *)(a1 + 20) = v3; if ( v3 < 8 * (int)a3 ) ++*(_DWORD *)(a1 + 24); *(_DWORD *)(a1 + 24) += (unsigned int)a3 >> 29; if ( a3 < 64 - v5 ) { i = 0; } else { memcpy(v5 + a1 + 28, a2, 64 - v5); ma_SHA1Transform(a1, a1 + 28); for ( i = 64 - v5; i + 63 < a3; i += 64 ) ma_SHA1Transform(a1, i + a2); v5 = 0; } return memcpy(v5 + a1 + 28, i + a2, a3 - i); }
ma_SHA1Update: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [RBP + -0x8] MOV EAX,dword ptr [RAX + 0x14] SHR EAX,0x3 AND EAX,0x3f MOV dword ptr [RBP + -0x20],EAX MOV RAX,qword ptr [RBP + -0x18] SHL EAX,0x3 MOV RCX,qword ptr [RBP + -0x8] ADD EAX,dword ptr [RCX + 0x14] MOV dword ptr [RCX + 0x14],EAX MOV RCX,qword ptr [RBP + -0x18] SHL ECX,0x3 CMP EAX,ECX JNC 0x001492ed MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x18] ADD ECX,0x1 MOV dword ptr [RAX + 0x18],ECX LAB_001492ed: MOV RAX,qword ptr [RBP + -0x18] MOV ECX,EAX SHR ECX,0x1d MOV RAX,qword ptr [RBP + -0x8] ADD ECX,dword ptr [RAX + 0x18] MOV dword ptr [RAX + 0x18],ECX MOV EAX,0x40 SUB EAX,dword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x24],EAX MOV RAX,qword ptr [RBP + -0x18] MOV ECX,dword ptr [RBP + -0x24] CMP RAX,RCX JC 0x0014937f MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x1c MOV EAX,dword ptr [RBP + -0x20] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX CALL 0x00113360 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x8] ADD RSI,0x1c CALL 0x001493c0 MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x1c],EAX LAB_0014934a: MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x3f MOV EAX,EAX CMP RAX,qword ptr [RBP + -0x18] JNC 0x00149376 MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x1c] ADD RSI,RAX CALL 0x001493c0 MOV EAX,dword ptr [RBP + -0x1c] ADD EAX,0x40 MOV dword ptr [RBP + -0x1c],EAX JMP 0x0014934a LAB_00149376: MOV dword ptr [RBP + -0x20],0x0 JMP 0x00149386 LAB_0014937f: MOV dword ptr [RBP + -0x1c],0x0 LAB_00149386: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x1c MOV EAX,dword ptr [RBP + -0x20] ADD RDI,RAX MOV RSI,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RBP + -0x1c] ADD RSI,RAX MOV RDX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x1c] SUB RDX,RAX CALL 0x00113360 ADD RSP,0x30 POP RBP RET
void ma_SHA1Update(long param_1,void *param_2,ulong param_3) { uint uVar1; int4 local_28; int4 local_24; local_28 = *(uint *)(param_1 + 0x14) >> 3 & 0x3f; uVar1 = (int)param_3 * 8 + *(int *)(param_1 + 0x14); *(uint *)(param_1 + 0x14) = uVar1; if (uVar1 < (uint)((int)param_3 << 3)) { *(int *)(param_1 + 0x18) = *(int *)(param_1 + 0x18) + 1; } *(uint *)(param_1 + 0x18) = ((uint)(param_3 >> 0x1d) & 7) + *(int *)(param_1 + 0x18); local_24 = 0x40 - local_28; if (param_3 < local_24) { local_24 = 0; } else { memcpy((void *)(param_1 + 0x1c + (ulong)local_28),param_2,(ulong)local_24); ma_SHA1Transform(param_1,param_1 + 0x1c); for (; local_24 + 0x3f < param_3; local_24 = local_24 + 0x40) { ma_SHA1Transform(param_1,(long)param_2 + (ulong)local_24); } local_28 = 0; } memcpy((void *)(param_1 + 0x1c + (ulong)local_28),(void *)((long)param_2 + (ulong)local_24), param_3 - local_24); return; }
7,934
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<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*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*)
monkey531[P]llama/common/json.hpp
static invalid_iterator create(int id_, const std::string& what_arg, BasicJsonContext context) { const std::string w = concat(exception::name("invalid_iterator", id_), exception::diagnostics(context), what_arg); return {id_, w.c_str()}; }
O2
cpp
nlohmann::json_abi_v3_11_3::detail::invalid_iterator nlohmann::json_abi_v3_11_3::detail::invalid_iterator::create<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*, 0>(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const*): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x88, %rsp movq %rcx, %r15 movq %rdx, %r14 movl %esi, %ebp movq %rdi, %rbx leaq 0x49907(%rip), %rsi # 0xb4bea leaq 0x28(%rsp), %rdi leaq 0x7(%rsp), %rdx callq 0x29c20 leaq 0x48(%rsp), %rdi leaq 0x28(%rsp), %rsi movl %ebp, %edx callq 0x412cc leaq 0x8(%rsp), %rdi movq %r15, %rsi callq 0x45646 leaq 0x68(%rsp), %rdi leaq 0x48(%rsp), %rsi leaq 0x8(%rsp), %rdx movq %r14, %rcx callq 0x41263 leaq 0x8(%rsp), %rdi callq 0x24348 leaq 0x48(%rsp), %rdi callq 0x24348 leaq 0x28(%rsp), %rdi callq 0x24348 movq 0x68(%rsp), %rdx movq %rbx, %rdi movl %ebp, %esi callq 0x467d6 leaq 0x68(%rsp), %rdi callq 0x24348 movq %rbx, %rax addq $0x88, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movq %rax, %rbx leaq 0x68(%rsp), %rdi jmp 0x6b39f movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x24348 jmp 0x6b38b movq %rax, %rbx leaq 0x48(%rsp), %rdi callq 0x24348 jmp 0x6b39a movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x24348 jmp 0x6b3a9 movq %rax, %rbx movq %rbx, %rdi callq 0x240e0 nop
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: push rbp push r15 push r14 push rbx sub rsp, 88h mov r15, rcx mov r14, rdx mov ebp, esi mov rbx, rdi lea rsi, aInvalidIterato; "invalid_iterator" lea rdi, [rsp+0A8h+var_80] lea rdx, [rsp+0A8h+var_A1] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) lea rdi, [rsp+0A8h+var_60] lea rsi, [rsp+0A8h+var_80] mov edx, ebp call _ZN8nlohmann16json_abi_v3_11_36detail9exception4nameERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEi; nlohmann::json_abi_v3_11_3::detail::exception::name(std::string const&,int) lea rdi, [rsp+0A8h+var_A0] mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail9exception11diagnosticsINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEEEESC_PKT_; nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const*) lea rdi, [rsp+0A8h+var_40] lea rsi, [rsp+0A8h+var_60] lea rdx, [rsp+0A8h+var_A0] mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJS8_S8_RKS8_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>(std::string,std::string,std::string const&) lea rdi, [rsp+0A8h+var_A0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_60]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+0A8h+var_80]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdx, [rsp+0A8h+var_40]; char * mov rdi, rbx; this mov esi, ebp; int call _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iteratorC2EiPKc; nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator(int,char const*) lea rdi, [rsp+0A8h+var_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, rbx add rsp, 88h pop rbx pop r14 pop r15 pop rbp retn mov rbx, rax lea rdi, [rsp+arg_60] jmp short loc_6B39F mov rbx, rax lea rdi, [rsp+arg_0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6B38B mov rbx, rax loc_6B38B: lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6B39A mov rbx, rax loc_6B39A: lea rdi, [rsp+arg_20]; void * loc_6B39F: call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_6B3A9 mov rbx, rax loc_6B3A9: mov rdi, rbx call __Unwind_Resume
nlohmann::json_abi_v3_11_3::detail::invalid_iterator * ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_( nlohmann::json_abi_v3_11_3::detail::invalid_iterator *this, int a2, long long a3) { _QWORD v5[4]; // [rsp+8h] [rbp-A0h] BYREF _QWORD v6[4]; // [rsp+28h] [rbp-80h] BYREF _BYTE v7[32]; // [rsp+48h] [rbp-60h] BYREF char *v8[8]; // [rsp+68h] [rbp-40h] BYREF std::string::basic_string<std::allocator<char>>(v6, (long long)"invalid_iterator"); nlohmann::json_abi_v3_11_3::detail::exception::name((long long)v7, (long long)v6, a2); nlohmann::json_abi_v3_11_3::detail::exception::diagnostics<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>>(v5); nlohmann::json_abi_v3_11_3::detail::concat<std::string,std::string,std::string,std::string const&>( (long long)v8, (long long)v7, (long long)v5, a3); std::string::~string(v5); std::string::~string(v7); std::string::~string(v6); nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator(this, a2, v8[0]); std::string::~string(v8); return this; }
_ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x88 MOV R15,RCX MOV R14,RDX MOV EBP,ESI MOV RBX,RDI LAB_0016b2dc: LEA RSI,[0x1b4bea] LEA RDI,[RSP + 0x28] LEA RDX,[RSP + 0x7] CALL 0x00129c20 LAB_0016b2f2: LEA RDI,[RSP + 0x48] LEA RSI,[RSP + 0x28] MOV EDX,EBP CALL 0x001412cc LAB_0016b303: LEA RDI,[RSP + 0x8] MOV RSI,R15 CALL 0x00145646 LAB_0016b310: LEA RDI,[RSP + 0x68] LEA RSI,[RSP + 0x48] LEA RDX,[RSP + 0x8] MOV RCX,R14 CALL 0x00141263 LEA RDI,[RSP + 0x8] CALL 0x00124348 LEA RDI,[RSP + 0x48] CALL 0x00124348 LEA RDI,[RSP + 0x28] CALL 0x00124348 MOV RDX,qword ptr [RSP + 0x68] LAB_0016b34a: MOV RDI,RBX MOV ESI,EBP CALL 0x001467d6 LAB_0016b354: LEA RDI,[RSP + 0x68] CALL 0x00124348 MOV RAX,RBX ADD RSP,0x88 POP RBX POP R14 POP R15 POP RBP RET
invalid_iterator * _ZN8nlohmann16json_abi_v3_11_36detail16invalid_iterator6createIPKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SK_ (invalid_iterator *param_1,int param_2,string *param_3) { allocator local_a1; string local_a0 [32]; string local_80 [32]; exception local_60 [32]; char *local_40 [4]; /* try { // try from 0016b2dc to 0016b2f1 has its CatchHandler @ 0016b3a6 */ std::__cxx11::string::string<std::allocator<char>>(local_80,"invalid_iterator",&local_a1); /* try { // try from 0016b2f2 to 0016b302 has its CatchHandler @ 0016b397 */ nlohmann::json_abi_v3_11_3::detail::exception::name(local_60,local_80,param_2); /* try { // try from 0016b303 to 0016b30f has its CatchHandler @ 0016b388 */ nlohmann::json_abi_v3_11_3::detail::exception:: diagnostics<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>> (local_a0); /* try { // try from 0016b310 to 0016b326 has its CatchHandler @ 0016b379 */ nlohmann::json_abi_v3_11_3::detail:: concat<std::__cxx11::string,std::__cxx11::string,std::__cxx11::string,std::__cxx11::string_const&> ((detail *)local_40,(string *)local_60,local_a0,param_3); std::__cxx11::string::~string(local_a0); std::__cxx11::string::~string((string *)local_60); std::__cxx11::string::~string(local_80); /* try { // try from 0016b34a to 0016b353 has its CatchHandler @ 0016b36f */ nlohmann::json_abi_v3_11_3::detail::invalid_iterator::invalid_iterator (param_1,param_2,local_40[0]); std::__cxx11::string::~string((string *)local_40); return param_1; }
7,935
LefDefParser::defiNet::addRect(char const*, int, int, int, int, int*, int, char const*, char const*, char const*)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiNet.cpp
void defiNet::addRect(const char* layerName, int xl, int yl, int xh, int yh, int *needCbk, int colorMask, const char* routeStatus, const char* shapeType, const char* routeStatusName) { // This method will only call by specialnet, need to change if net also // calls it. *needCbk = 0; if (numRects_ == rectsAllocated_) { int i; int max; char** newn; int* newxl; int* newyl; int* newxh; int* newyh; int* newMask; char** newRS; char** newST; char** newRSN; max = rectsAllocated_ = (rectsAllocated_ == 0) ? 1000 : rectsAllocated_ * 2; newn = (char**)malloc(sizeof(char*)*max); newRS = (char**)malloc(sizeof(char*)*max); newST = (char**)malloc(sizeof(char*)*max); newRSN = (char**)malloc(sizeof(char*)*max); newxl = (int*)malloc(sizeof(int)*max); newyl = (int*)malloc(sizeof(int)*max); newxh = (int*)malloc(sizeof(int)*max); newyh = (int*)malloc(sizeof(int)*max); newMask = (int*)malloc(sizeof(int)*max); for (i = 0; i < numRects_; i++) { newn[i] = rectNames_[i]; newxl[i] = xl_[i]; newyl[i] = yl_[i]; newxh[i] = xh_[i]; newyh[i] = yh_[i]; newMask[i] = rectMasks_[i]; newRS[i] = rectRouteStatus_[i]; newST[i] = rectShapeTypes_[i]; newRSN[i] = rectRouteStatusShieldNames_[i]; } if (rectNames_) free((char*)(rectNames_)); if (rectRouteStatus_) free((char*)(rectRouteStatus_)); if (rectShapeTypes_) free((char*)(rectShapeTypes_)); if (rectRouteStatusShieldNames_) free((char*)(rectRouteStatusShieldNames_)); if (xl_) { free((char*)(xl_)); free((char*)(yl_)); free((char*)(xh_)); free((char*)(yh_)); free((char*)(rectMasks_)); } rectNames_ = newn; xl_ = newxl; yl_ = newyl; xh_ = newxh; yh_ = newyh; rectMasks_ = newMask; rectRouteStatus_ = newRS; rectShapeTypes_ = newST; rectRouteStatusShieldNames_ = newRSN; } rectNames_[numRects_] = strdup(layerName); xl_[numRects_] = xl; yl_[numRects_] = yl; xh_[numRects_] = xh; yh_[numRects_] = yh; rectMasks_[numRects_] = colorMask; rectRouteStatus_[numRects_] = strdup(routeStatus); rectShapeTypes_[numRects_] = strdup(shapeType); rectRouteStatusShieldNames_[numRects_] = strdup(routeStatusName); numRects_ += 1; if (numRects_ == 1000) // Want to invoke the partial callback if set *needCbk = 1; }
O0
cpp
LefDefParser::defiNet::addRect(char const*, int, int, int, int, int*, int, char const*, char const*, char const*): subq $0x88, %rsp movq 0xb0(%rsp), %rax movq 0xa8(%rsp), %rax movq 0xa0(%rsp), %rax movl 0x98(%rsp), %eax movq 0x90(%rsp), %rax movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movl %edx, 0x74(%rsp) movl %ecx, 0x70(%rsp) movl %r8d, 0x6c(%rsp) movl %r9d, 0x68(%rsp) movq 0x80(%rsp), %rcx movq %rcx, 0x10(%rsp) movq 0x90(%rsp), %rax movl $0x0, (%rax) movl 0x1b0(%rcx), %eax cmpl 0x1b4(%rcx), %eax jne 0x3c06d movq 0x10(%rsp), %rax cmpl $0x0, 0x1b4(%rax) jne 0x3bd13 movl $0x3e8, %eax # imm = 0x3E8 movl %eax, 0xc(%rsp) jmp 0x3bd24 movq 0x10(%rsp), %rax movl 0x1b4(%rax), %eax shll %eax movl %eax, 0xc(%rsp) movq 0x10(%rsp), %rcx movl 0xc(%rsp), %eax movl %eax, 0x1b4(%rcx) movl %eax, 0x60(%rsp) movslq 0x60(%rsp), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, 0x58(%rsp) movslq 0x60(%rsp), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, 0x28(%rsp) movslq 0x60(%rsp), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, 0x20(%rsp) movslq 0x60(%rsp), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, 0x18(%rsp) movslq 0x60(%rsp), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x50(%rsp) movslq 0x60(%rsp), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x48(%rsp) movslq 0x60(%rsp), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x40(%rsp) movslq 0x60(%rsp), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x38(%rsp) movslq 0x60(%rsp), %rdi shlq $0x2, %rdi callq 0x72d0 movq %rax, 0x30(%rsp) movl $0x0, 0x64(%rsp) movq 0x10(%rsp), %rcx movl 0x64(%rsp), %eax cmpl 0x1b0(%rcx), %eax jge 0x3bf18 movq 0x10(%rsp), %rax movq 0x1b8(%rax), %rcx movslq 0x64(%rsp), %rdx movq (%rcx,%rdx,8), %rsi movq 0x58(%rsp), %rcx movslq 0x64(%rsp), %rdx movq %rsi, (%rcx,%rdx,8) movq 0x1c0(%rax), %rcx movslq 0x64(%rsp), %rdx movl (%rcx,%rdx,4), %esi movq 0x50(%rsp), %rcx movslq 0x64(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movq 0x1c8(%rax), %rcx movslq 0x64(%rsp), %rdx movl (%rcx,%rdx,4), %esi movq 0x48(%rsp), %rcx movslq 0x64(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movq 0x1d0(%rax), %rcx movslq 0x64(%rsp), %rdx movl (%rcx,%rdx,4), %esi movq 0x40(%rsp), %rcx movslq 0x64(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movq 0x1d8(%rax), %rcx movslq 0x64(%rsp), %rdx movl (%rcx,%rdx,4), %esi movq 0x38(%rsp), %rcx movslq 0x64(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movq 0x1e0(%rax), %rcx movslq 0x64(%rsp), %rdx movl (%rcx,%rdx,4), %esi movq 0x30(%rsp), %rcx movslq 0x64(%rsp), %rdx movl %esi, (%rcx,%rdx,4) movq 0x1e8(%rax), %rcx movslq 0x64(%rsp), %rdx movq (%rcx,%rdx,8), %rsi movq 0x28(%rsp), %rcx movslq 0x64(%rsp), %rdx movq %rsi, (%rcx,%rdx,8) movq 0x1f8(%rax), %rcx movslq 0x64(%rsp), %rdx movq (%rcx,%rdx,8), %rsi movq 0x20(%rsp), %rcx movslq 0x64(%rsp), %rdx movq %rsi, (%rcx,%rdx,8) movq 0x1f0(%rax), %rax movslq 0x64(%rsp), %rcx movq (%rax,%rcx,8), %rdx movq 0x18(%rsp), %rax movslq 0x64(%rsp), %rcx movq %rdx, (%rax,%rcx,8) movl 0x64(%rsp), %eax addl $0x1, %eax movl %eax, 0x64(%rsp) jmp 0x3bdea movq 0x10(%rsp), %rax cmpq $0x0, 0x1b8(%rax) je 0x3bf38 movq 0x10(%rsp), %rax movq 0x1b8(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax cmpq $0x0, 0x1e8(%rax) je 0x3bf58 movq 0x10(%rsp), %rax movq 0x1e8(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax cmpq $0x0, 0x1f8(%rax) je 0x3bf78 movq 0x10(%rsp), %rax movq 0x1f8(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax cmpq $0x0, 0x1f0(%rax) je 0x3bf98 movq 0x10(%rsp), %rax movq 0x1f0(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax cmpq $0x0, 0x1c0(%rax) je 0x3bffc movq 0x10(%rsp), %rax movq 0x1c0(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax movq 0x1c8(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax movq 0x1d0(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax movq 0x1d8(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax movq 0x1e0(%rax), %rdi callq 0x72a0 movq 0x10(%rsp), %rax movq 0x58(%rsp), %rcx movq %rcx, 0x1b8(%rax) movq 0x50(%rsp), %rcx movq %rcx, 0x1c0(%rax) movq 0x48(%rsp), %rcx movq %rcx, 0x1c8(%rax) movq 0x40(%rsp), %rcx movq %rcx, 0x1d0(%rax) movq 0x38(%rsp), %rcx movq %rcx, 0x1d8(%rax) movq 0x30(%rsp), %rcx movq %rcx, 0x1e0(%rax) movq 0x28(%rsp), %rcx movq %rcx, 0x1e8(%rax) movq 0x20(%rsp), %rcx movq %rcx, 0x1f8(%rax) movq 0x18(%rsp), %rcx movq %rcx, 0x1f0(%rax) movq 0x78(%rsp), %rdi callq 0x73d0 movq 0x10(%rsp), %rcx movq %rax, %rsi movq 0x1b8(%rcx), %rax movslq 0x1b0(%rcx), %rdx movq %rsi, (%rax,%rdx,8) movl 0x74(%rsp), %esi movq 0x1c0(%rcx), %rax movslq 0x1b0(%rcx), %rdx movl %esi, (%rax,%rdx,4) movl 0x70(%rsp), %esi movq 0x1c8(%rcx), %rax movslq 0x1b0(%rcx), %rdx movl %esi, (%rax,%rdx,4) movl 0x6c(%rsp), %esi movq 0x1d0(%rcx), %rax movslq 0x1b0(%rcx), %rdx movl %esi, (%rax,%rdx,4) movl 0x68(%rsp), %esi movq 0x1d8(%rcx), %rax movslq 0x1b0(%rcx), %rdx movl %esi, (%rax,%rdx,4) movl 0x98(%rsp), %edx movq 0x1e0(%rcx), %rax movslq 0x1b0(%rcx), %rcx movl %edx, (%rax,%rcx,4) movq 0xa0(%rsp), %rdi callq 0x73d0 movq 0x10(%rsp), %rcx movq %rax, %rdx movq 0x1e8(%rcx), %rax movslq 0x1b0(%rcx), %rcx movq %rdx, (%rax,%rcx,8) movq 0xa8(%rsp), %rdi callq 0x73d0 movq 0x10(%rsp), %rcx movq %rax, %rdx movq 0x1f8(%rcx), %rax movslq 0x1b0(%rcx), %rcx movq %rdx, (%rax,%rcx,8) movq 0xb0(%rsp), %rdi callq 0x73d0 movq %rax, %rsi movq 0x10(%rsp), %rax movq 0x1f0(%rax), %rcx movslq 0x1b0(%rax), %rdx movq %rsi, (%rcx,%rdx,8) movl 0x1b0(%rax), %ecx addl $0x1, %ecx movl %ecx, 0x1b0(%rax) cmpl $0x3e8, 0x1b0(%rax) # imm = 0x3E8 jne 0x3c19b movq 0x90(%rsp), %rax movl $0x1, (%rax) addq $0x88, %rsp retq nopw %cs:(%rax,%rax)
_ZN12LefDefParser7defiNet7addRectEPKciiiiPiiS2_S2_S2_: sub rsp, 88h mov rax, [rsp+88h+arg_20] mov rax, [rsp+88h+arg_18] mov rax, [rsp+88h+arg_10] mov eax, [rsp+88h+arg_8] mov rax, [rsp+88h+arg_0] mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi mov [rsp+88h+var_14], edx mov [rsp+88h+var_18], ecx mov [rsp+88h+var_1C], r8d mov [rsp+88h+var_20], r9d mov rcx, [rsp+88h+var_8] mov [rsp+88h+var_78], rcx mov rax, [rsp+88h+arg_0] mov dword ptr [rax], 0 mov eax, [rcx+1B0h] cmp eax, [rcx+1B4h] jnz loc_3C06D mov rax, [rsp+88h+var_78] cmp dword ptr [rax+1B4h], 0 jnz short loc_3BD13 mov eax, 3E8h mov [rsp+88h+var_7C], eax jmp short loc_3BD24 loc_3BD13: mov rax, [rsp+88h+var_78] mov eax, [rax+1B4h] shl eax, 1 mov [rsp+88h+var_7C], eax loc_3BD24: mov rcx, [rsp+88h+var_78] mov eax, [rsp+88h+var_7C] mov [rcx+1B4h], eax mov [rsp+88h+var_28], eax movsxd rdi, [rsp+88h+var_28] shl rdi, 3 call _malloc mov [rsp+88h+var_30], rax movsxd rdi, [rsp+88h+var_28] shl rdi, 3 call _malloc mov [rsp+88h+var_60], rax movsxd rdi, [rsp+88h+var_28] shl rdi, 3 call _malloc mov [rsp+88h+var_68], rax movsxd rdi, [rsp+88h+var_28] shl rdi, 3 call _malloc mov [rsp+88h+var_70], rax movsxd rdi, [rsp+88h+var_28] shl rdi, 2 call _malloc mov [rsp+88h+var_38], rax movsxd rdi, [rsp+88h+var_28] shl rdi, 2 call _malloc mov [rsp+88h+var_40], rax movsxd rdi, [rsp+88h+var_28] shl rdi, 2 call _malloc mov [rsp+88h+var_48], rax movsxd rdi, [rsp+88h+var_28] shl rdi, 2 call _malloc mov [rsp+88h+var_50], rax movsxd rdi, [rsp+88h+var_28] shl rdi, 2 call _malloc mov [rsp+88h+var_58], rax mov [rsp+88h+var_24], 0 loc_3BDEA: mov rcx, [rsp+88h+var_78] mov eax, [rsp+88h+var_24] cmp eax, [rcx+1B0h] jge loc_3BF18 mov rax, [rsp+88h+var_78] mov rcx, [rax+1B8h] movsxd rdx, [rsp+88h+var_24] mov rsi, [rcx+rdx*8] mov rcx, [rsp+88h+var_30] movsxd rdx, [rsp+88h+var_24] mov [rcx+rdx*8], rsi mov rcx, [rax+1C0h] movsxd rdx, [rsp+88h+var_24] mov esi, [rcx+rdx*4] mov rcx, [rsp+88h+var_38] movsxd rdx, [rsp+88h+var_24] mov [rcx+rdx*4], esi mov rcx, [rax+1C8h] movsxd rdx, [rsp+88h+var_24] mov esi, [rcx+rdx*4] mov rcx, [rsp+88h+var_40] movsxd rdx, [rsp+88h+var_24] mov [rcx+rdx*4], esi mov rcx, [rax+1D0h] movsxd rdx, [rsp+88h+var_24] mov esi, [rcx+rdx*4] mov rcx, [rsp+88h+var_48] movsxd rdx, [rsp+88h+var_24] mov [rcx+rdx*4], esi mov rcx, [rax+1D8h] movsxd rdx, [rsp+88h+var_24] mov esi, [rcx+rdx*4] mov rcx, [rsp+88h+var_50] movsxd rdx, [rsp+88h+var_24] mov [rcx+rdx*4], esi mov rcx, [rax+1E0h] movsxd rdx, [rsp+88h+var_24] mov esi, [rcx+rdx*4] mov rcx, [rsp+88h+var_58] movsxd rdx, [rsp+88h+var_24] mov [rcx+rdx*4], esi mov rcx, [rax+1E8h] movsxd rdx, [rsp+88h+var_24] mov rsi, [rcx+rdx*8] mov rcx, [rsp+88h+var_60] movsxd rdx, [rsp+88h+var_24] mov [rcx+rdx*8], rsi mov rcx, [rax+1F8h] movsxd rdx, [rsp+88h+var_24] mov rsi, [rcx+rdx*8] mov rcx, [rsp+88h+var_68] movsxd rdx, [rsp+88h+var_24] mov [rcx+rdx*8], rsi mov rax, [rax+1F0h] movsxd rcx, [rsp+88h+var_24] mov rdx, [rax+rcx*8] mov rax, [rsp+88h+var_70] movsxd rcx, [rsp+88h+var_24] mov [rax+rcx*8], rdx mov eax, [rsp+88h+var_24] add eax, 1 mov [rsp+88h+var_24], eax jmp loc_3BDEA loc_3BF18: mov rax, [rsp+88h+var_78] cmp qword ptr [rax+1B8h], 0 jz short loc_3BF38 mov rax, [rsp+88h+var_78] mov rdi, [rax+1B8h] call _free loc_3BF38: mov rax, [rsp+88h+var_78] cmp qword ptr [rax+1E8h], 0 jz short loc_3BF58 mov rax, [rsp+88h+var_78] mov rdi, [rax+1E8h] call _free loc_3BF58: mov rax, [rsp+88h+var_78] cmp qword ptr [rax+1F8h], 0 jz short loc_3BF78 mov rax, [rsp+88h+var_78] mov rdi, [rax+1F8h] call _free loc_3BF78: mov rax, [rsp+88h+var_78] cmp qword ptr [rax+1F0h], 0 jz short loc_3BF98 mov rax, [rsp+88h+var_78] mov rdi, [rax+1F0h] call _free loc_3BF98: mov rax, [rsp+88h+var_78] cmp qword ptr [rax+1C0h], 0 jz short loc_3BFFC mov rax, [rsp+88h+var_78] mov rdi, [rax+1C0h] call _free mov rax, [rsp+88h+var_78] mov rdi, [rax+1C8h] call _free mov rax, [rsp+88h+var_78] mov rdi, [rax+1D0h] call _free mov rax, [rsp+88h+var_78] mov rdi, [rax+1D8h] call _free mov rax, [rsp+88h+var_78] mov rdi, [rax+1E0h] call _free loc_3BFFC: mov rax, [rsp+88h+var_78] mov rcx, [rsp+88h+var_30] mov [rax+1B8h], rcx mov rcx, [rsp+88h+var_38] mov [rax+1C0h], rcx mov rcx, [rsp+88h+var_40] mov [rax+1C8h], rcx mov rcx, [rsp+88h+var_48] mov [rax+1D0h], rcx mov rcx, [rsp+88h+var_50] mov [rax+1D8h], rcx mov rcx, [rsp+88h+var_58] mov [rax+1E0h], rcx mov rcx, [rsp+88h+var_60] mov [rax+1E8h], rcx mov rcx, [rsp+88h+var_68] mov [rax+1F8h], rcx mov rcx, [rsp+88h+var_70] mov [rax+1F0h], rcx loc_3C06D: mov rdi, [rsp+88h+var_10] call _strdup mov rcx, [rsp+88h+var_78] mov rsi, rax mov rax, [rcx+1B8h] movsxd rdx, dword ptr [rcx+1B0h] mov [rax+rdx*8], rsi mov esi, [rsp+88h+var_14] mov rax, [rcx+1C0h] movsxd rdx, dword ptr [rcx+1B0h] mov [rax+rdx*4], esi mov esi, [rsp+88h+var_18] mov rax, [rcx+1C8h] movsxd rdx, dword ptr [rcx+1B0h] mov [rax+rdx*4], esi mov esi, [rsp+88h+var_1C] mov rax, [rcx+1D0h] movsxd rdx, dword ptr [rcx+1B0h] mov [rax+rdx*4], esi mov esi, [rsp+88h+var_20] mov rax, [rcx+1D8h] movsxd rdx, dword ptr [rcx+1B0h] mov [rax+rdx*4], esi mov edx, [rsp+88h+arg_8] mov rax, [rcx+1E0h] movsxd rcx, dword ptr [rcx+1B0h] mov [rax+rcx*4], edx mov rdi, [rsp+88h+arg_10] call _strdup mov rcx, [rsp+88h+var_78] mov rdx, rax mov rax, [rcx+1E8h] movsxd rcx, dword ptr [rcx+1B0h] mov [rax+rcx*8], rdx mov rdi, [rsp+88h+arg_18] call _strdup mov rcx, [rsp+88h+var_78] mov rdx, rax mov rax, [rcx+1F8h] movsxd rcx, dword ptr [rcx+1B0h] mov [rax+rcx*8], rdx mov rdi, [rsp+88h+arg_20] call _strdup mov rsi, rax mov rax, [rsp+88h+var_78] mov rcx, [rax+1F0h] movsxd rdx, dword ptr [rax+1B0h] mov [rcx+rdx*8], rsi mov ecx, [rax+1B0h] add ecx, 1 mov [rax+1B0h], ecx cmp dword ptr [rax+1B0h], 3E8h jnz short loc_3C19B mov rax, [rsp+88h+arg_0] mov dword ptr [rax], 1 loc_3C19B: add rsp, 88h retn
int * LefDefParser::defiNet::addRect( LefDefParser::defiNet *this, const char *a2, int a3, int a4, int a5, int a6, int *a7, int a8, const char *a9, const char *a10, const char *a11) { long long v11; // rsi int *result; // rax int v13; // [rsp+Ch] [rbp-7Ch] long long v14; // [rsp+18h] [rbp-70h] long long v15; // [rsp+20h] [rbp-68h] long long v16; // [rsp+28h] [rbp-60h] long long v17; // [rsp+30h] [rbp-58h] long long v18; // [rsp+38h] [rbp-50h] long long v19; // [rsp+40h] [rbp-48h] long long v20; // [rsp+48h] [rbp-40h] long long v21; // [rsp+50h] [rbp-38h] long long v22; // [rsp+58h] [rbp-30h] int i; // [rsp+64h] [rbp-24h] *a7 = 0; if ( *((_DWORD *)this + 108) == *((_DWORD *)this + 109) ) { if ( *((_DWORD *)this + 109) ) v13 = 2 * *((_DWORD *)this + 109); else v13 = 1000; *((_DWORD *)this + 109) = v13; v22 = malloc(8LL * v13); v16 = malloc(8LL * v13); v15 = malloc(8LL * v13); v14 = malloc(8LL * v13); v21 = malloc(4LL * v13); v20 = malloc(4LL * v13); v19 = malloc(4LL * v13); v18 = malloc(4LL * v13); v17 = malloc(4LL * v13); for ( i = 0; i < *((_DWORD *)this + 108); ++i ) { *(_QWORD *)(v22 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 55) + 8LL * i); *(_DWORD *)(v21 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 56) + 4LL * i); *(_DWORD *)(v20 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 57) + 4LL * i); *(_DWORD *)(v19 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 58) + 4LL * i); *(_DWORD *)(v18 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 59) + 4LL * i); *(_DWORD *)(v17 + 4LL * i) = *(_DWORD *)(*((_QWORD *)this + 60) + 4LL * i); *(_QWORD *)(v16 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 61) + 8LL * i); *(_QWORD *)(v15 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 63) + 8LL * i); *(_QWORD *)(v14 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 62) + 8LL * i); } if ( *((_QWORD *)this + 55) ) free(*((_QWORD *)this + 55)); if ( *((_QWORD *)this + 61) ) free(*((_QWORD *)this + 61)); if ( *((_QWORD *)this + 63) ) free(*((_QWORD *)this + 63)); if ( *((_QWORD *)this + 62) ) free(*((_QWORD *)this + 62)); if ( *((_QWORD *)this + 56) ) { free(*((_QWORD *)this + 56)); free(*((_QWORD *)this + 57)); free(*((_QWORD *)this + 58)); free(*((_QWORD *)this + 59)); free(*((_QWORD *)this + 60)); } *((_QWORD *)this + 55) = v22; *((_QWORD *)this + 56) = v21; *((_QWORD *)this + 57) = v20; *((_QWORD *)this + 58) = v19; *((_QWORD *)this + 59) = v18; *((_QWORD *)this + 60) = v17; *((_QWORD *)this + 61) = v16; *((_QWORD *)this + 63) = v15; *((_QWORD *)this + 62) = v14; } *(_QWORD *)(*((_QWORD *)this + 55) + 8LL * *((int *)this + 108)) = strdup(a2); *(_DWORD *)(*((_QWORD *)this + 56) + 4LL * *((int *)this + 108)) = a3; *(_DWORD *)(*((_QWORD *)this + 57) + 4LL * *((int *)this + 108)) = a4; *(_DWORD *)(*((_QWORD *)this + 58) + 4LL * *((int *)this + 108)) = a5; *(_DWORD *)(*((_QWORD *)this + 59) + 4LL * *((int *)this + 108)) = a6; *(_DWORD *)(*((_QWORD *)this + 60) + 4LL * *((int *)this + 108)) = a8; *(_QWORD *)(*((_QWORD *)this + 61) + 8LL * *((int *)this + 108)) = strdup(a9); *(_QWORD *)(*((_QWORD *)this + 63) + 8LL * *((int *)this + 108)) = strdup(a10); v11 = strdup(a11); result = (int *)this; *(_QWORD *)(*((_QWORD *)this + 62) + 8LL * (int)(*((_DWORD *)this + 108))++) = v11; if ( *((_DWORD *)this + 108) == 1000 ) { result = a7; *a7 = 1; } return result; }
addRect: SUB RSP,0x88 MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RSP + 0xa8] MOV RAX,qword ptr [RSP + 0xa0] MOV EAX,dword ptr [RSP + 0x98] MOV RAX,qword ptr [RSP + 0x90] MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV dword ptr [RSP + 0x74],EDX MOV dword ptr [RSP + 0x70],ECX MOV dword ptr [RSP + 0x6c],R8D MOV dword ptr [RSP + 0x68],R9D MOV RCX,qword ptr [RSP + 0x80] MOV qword ptr [RSP + 0x10],RCX MOV RAX,qword ptr [RSP + 0x90] MOV dword ptr [RAX],0x0 MOV EAX,dword ptr [RCX + 0x1b0] CMP EAX,dword ptr [RCX + 0x1b4] JNZ 0x0013c06d MOV RAX,qword ptr [RSP + 0x10] CMP dword ptr [RAX + 0x1b4],0x0 JNZ 0x0013bd13 MOV EAX,0x3e8 MOV dword ptr [RSP + 0xc],EAX JMP 0x0013bd24 LAB_0013bd13: MOV RAX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RAX + 0x1b4] SHL EAX,0x1 MOV dword ptr [RSP + 0xc],EAX LAB_0013bd24: MOV RCX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0xc] MOV dword ptr [RCX + 0x1b4],EAX MOV dword ptr [RSP + 0x60],EAX MOVSXD RDI,dword ptr [RSP + 0x60] SHL RDI,0x3 CALL 0x001072d0 MOV qword ptr [RSP + 0x58],RAX MOVSXD RDI,dword ptr [RSP + 0x60] SHL RDI,0x3 CALL 0x001072d0 MOV qword ptr [RSP + 0x28],RAX MOVSXD RDI,dword ptr [RSP + 0x60] SHL RDI,0x3 CALL 0x001072d0 MOV qword ptr [RSP + 0x20],RAX MOVSXD RDI,dword ptr [RSP + 0x60] SHL RDI,0x3 CALL 0x001072d0 MOV qword ptr [RSP + 0x18],RAX MOVSXD RDI,dword ptr [RSP + 0x60] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x50],RAX MOVSXD RDI,dword ptr [RSP + 0x60] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x48],RAX MOVSXD RDI,dword ptr [RSP + 0x60] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x40],RAX MOVSXD RDI,dword ptr [RSP + 0x60] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x38],RAX MOVSXD RDI,dword ptr [RSP + 0x60] SHL RDI,0x2 CALL 0x001072d0 MOV qword ptr [RSP + 0x30],RAX MOV dword ptr [RSP + 0x64],0x0 LAB_0013bdea: MOV RCX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RSP + 0x64] CMP EAX,dword ptr [RCX + 0x1b0] JGE 0x0013bf18 MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RAX + 0x1b8] MOVSXD RDX,dword ptr [RSP + 0x64] MOV RSI,qword ptr [RCX + RDX*0x8] MOV RCX,qword ptr [RSP + 0x58] MOVSXD RDX,dword ptr [RSP + 0x64] MOV qword ptr [RCX + RDX*0x8],RSI MOV RCX,qword ptr [RAX + 0x1c0] MOVSXD RDX,dword ptr [RSP + 0x64] MOV ESI,dword ptr [RCX + RDX*0x4] MOV RCX,qword ptr [RSP + 0x50] MOVSXD RDX,dword ptr [RSP + 0x64] MOV dword ptr [RCX + RDX*0x4],ESI MOV RCX,qword ptr [RAX + 0x1c8] MOVSXD RDX,dword ptr [RSP + 0x64] MOV ESI,dword ptr [RCX + RDX*0x4] MOV RCX,qword ptr [RSP + 0x48] MOVSXD RDX,dword ptr [RSP + 0x64] MOV dword ptr [RCX + RDX*0x4],ESI MOV RCX,qword ptr [RAX + 0x1d0] MOVSXD RDX,dword ptr [RSP + 0x64] MOV ESI,dword ptr [RCX + RDX*0x4] MOV RCX,qword ptr [RSP + 0x40] MOVSXD RDX,dword ptr [RSP + 0x64] MOV dword ptr [RCX + RDX*0x4],ESI MOV RCX,qword ptr [RAX + 0x1d8] MOVSXD RDX,dword ptr [RSP + 0x64] MOV ESI,dword ptr [RCX + RDX*0x4] MOV RCX,qword ptr [RSP + 0x38] MOVSXD RDX,dword ptr [RSP + 0x64] MOV dword ptr [RCX + RDX*0x4],ESI MOV RCX,qword ptr [RAX + 0x1e0] MOVSXD RDX,dword ptr [RSP + 0x64] MOV ESI,dword ptr [RCX + RDX*0x4] MOV RCX,qword ptr [RSP + 0x30] MOVSXD RDX,dword ptr [RSP + 0x64] MOV dword ptr [RCX + RDX*0x4],ESI MOV RCX,qword ptr [RAX + 0x1e8] MOVSXD RDX,dword ptr [RSP + 0x64] MOV RSI,qword ptr [RCX + RDX*0x8] MOV RCX,qword ptr [RSP + 0x28] MOVSXD RDX,dword ptr [RSP + 0x64] MOV qword ptr [RCX + RDX*0x8],RSI MOV RCX,qword ptr [RAX + 0x1f8] MOVSXD RDX,dword ptr [RSP + 0x64] MOV RSI,qword ptr [RCX + RDX*0x8] MOV RCX,qword ptr [RSP + 0x20] MOVSXD RDX,dword ptr [RSP + 0x64] MOV qword ptr [RCX + RDX*0x8],RSI MOV RAX,qword ptr [RAX + 0x1f0] MOVSXD RCX,dword ptr [RSP + 0x64] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,dword ptr [RSP + 0x64] MOV qword ptr [RAX + RCX*0x8],RDX MOV EAX,dword ptr [RSP + 0x64] ADD EAX,0x1 MOV dword ptr [RSP + 0x64],EAX JMP 0x0013bdea LAB_0013bf18: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x1b8],0x0 JZ 0x0013bf38 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x1b8] CALL 0x001072a0 LAB_0013bf38: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x1e8],0x0 JZ 0x0013bf58 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x1e8] CALL 0x001072a0 LAB_0013bf58: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x1f8],0x0 JZ 0x0013bf78 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x1f8] CALL 0x001072a0 LAB_0013bf78: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x1f0],0x0 JZ 0x0013bf98 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x1f0] CALL 0x001072a0 LAB_0013bf98: MOV RAX,qword ptr [RSP + 0x10] CMP qword ptr [RAX + 0x1c0],0x0 JZ 0x0013bffc MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x1c0] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x1c8] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x1d0] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x1d8] CALL 0x001072a0 MOV RAX,qword ptr [RSP + 0x10] MOV RDI,qword ptr [RAX + 0x1e0] CALL 0x001072a0 LAB_0013bffc: MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RSP + 0x58] MOV qword ptr [RAX + 0x1b8],RCX MOV RCX,qword ptr [RSP + 0x50] MOV qword ptr [RAX + 0x1c0],RCX MOV RCX,qword ptr [RSP + 0x48] MOV qword ptr [RAX + 0x1c8],RCX MOV RCX,qword ptr [RSP + 0x40] MOV qword ptr [RAX + 0x1d0],RCX MOV RCX,qword ptr [RSP + 0x38] MOV qword ptr [RAX + 0x1d8],RCX MOV RCX,qword ptr [RSP + 0x30] MOV qword ptr [RAX + 0x1e0],RCX MOV RCX,qword ptr [RSP + 0x28] MOV qword ptr [RAX + 0x1e8],RCX MOV RCX,qword ptr [RSP + 0x20] MOV qword ptr [RAX + 0x1f8],RCX MOV RCX,qword ptr [RSP + 0x18] MOV qword ptr [RAX + 0x1f0],RCX LAB_0013c06d: MOV RDI,qword ptr [RSP + 0x78] CALL 0x001073d0 MOV RCX,qword ptr [RSP + 0x10] MOV RSI,RAX MOV RAX,qword ptr [RCX + 0x1b8] MOVSXD RDX,dword ptr [RCX + 0x1b0] MOV qword ptr [RAX + RDX*0x8],RSI MOV ESI,dword ptr [RSP + 0x74] MOV RAX,qword ptr [RCX + 0x1c0] MOVSXD RDX,dword ptr [RCX + 0x1b0] MOV dword ptr [RAX + RDX*0x4],ESI MOV ESI,dword ptr [RSP + 0x70] MOV RAX,qword ptr [RCX + 0x1c8] MOVSXD RDX,dword ptr [RCX + 0x1b0] MOV dword ptr [RAX + RDX*0x4],ESI MOV ESI,dword ptr [RSP + 0x6c] MOV RAX,qword ptr [RCX + 0x1d0] MOVSXD RDX,dword ptr [RCX + 0x1b0] MOV dword ptr [RAX + RDX*0x4],ESI MOV ESI,dword ptr [RSP + 0x68] MOV RAX,qword ptr [RCX + 0x1d8] MOVSXD RDX,dword ptr [RCX + 0x1b0] MOV dword ptr [RAX + RDX*0x4],ESI MOV EDX,dword ptr [RSP + 0x98] MOV RAX,qword ptr [RCX + 0x1e0] MOVSXD RCX,dword ptr [RCX + 0x1b0] MOV dword ptr [RAX + RCX*0x4],EDX MOV RDI,qword ptr [RSP + 0xa0] CALL 0x001073d0 MOV RCX,qword ptr [RSP + 0x10] MOV RDX,RAX MOV RAX,qword ptr [RCX + 0x1e8] MOVSXD RCX,dword ptr [RCX + 0x1b0] MOV qword ptr [RAX + RCX*0x8],RDX MOV RDI,qword ptr [RSP + 0xa8] CALL 0x001073d0 MOV RCX,qword ptr [RSP + 0x10] MOV RDX,RAX MOV RAX,qword ptr [RCX + 0x1f8] MOVSXD RCX,dword ptr [RCX + 0x1b0] MOV qword ptr [RAX + RCX*0x8],RDX MOV RDI,qword ptr [RSP + 0xb0] CALL 0x001073d0 MOV RSI,RAX MOV RAX,qword ptr [RSP + 0x10] MOV RCX,qword ptr [RAX + 0x1f0] MOVSXD RDX,dword ptr [RAX + 0x1b0] MOV qword ptr [RCX + RDX*0x8],RSI MOV ECX,dword ptr [RAX + 0x1b0] ADD ECX,0x1 MOV dword ptr [RAX + 0x1b0],ECX CMP dword ptr [RAX + 0x1b0],0x3e8 JNZ 0x0013c19b MOV RAX,qword ptr [RSP + 0x90] MOV dword ptr [RAX],0x1 LAB_0013c19b: ADD RSP,0x88 RET
/* LefDefParser::defiNet::addRect(char const*, int, int, int, int, int*, int, char const*, char const*, char const*) */ void __thiscall LefDefParser::defiNet::addRect (defiNet *this,char *param_1,int param_2,int param_3,int param_4,int param_5,int *param_6, int param_7,char *param_8,char *param_9,char *param_10) { void *pvVar1; void *pvVar2; void *pvVar3; void *pvVar4; void *pvVar5; void *pvVar6; void *pvVar7; void *pvVar8; void *pvVar9; char *pcVar10; int local_7c; int local_24; *param_6 = 0; if (*(int *)(this + 0x1b0) == *(int *)(this + 0x1b4)) { if (*(int *)(this + 0x1b4) == 0) { local_7c = 1000; } else { local_7c = *(int *)(this + 0x1b4) << 1; } *(int *)(this + 0x1b4) = local_7c; pvVar1 = malloc((long)local_7c << 3); pvVar2 = malloc((long)local_7c << 3); pvVar3 = malloc((long)local_7c << 3); pvVar4 = malloc((long)local_7c << 3); pvVar5 = malloc((long)local_7c << 2); pvVar6 = malloc((long)local_7c << 2); pvVar7 = malloc((long)local_7c << 2); pvVar8 = malloc((long)local_7c << 2); pvVar9 = malloc((long)local_7c << 2); for (local_24 = 0; local_24 < *(int *)(this + 0x1b0); local_24 = local_24 + 1) { *(int8 *)((long)pvVar1 + (long)local_24 * 8) = *(int8 *)(*(long *)(this + 0x1b8) + (long)local_24 * 8); *(int4 *)((long)pvVar5 + (long)local_24 * 4) = *(int4 *)(*(long *)(this + 0x1c0) + (long)local_24 * 4); *(int4 *)((long)pvVar6 + (long)local_24 * 4) = *(int4 *)(*(long *)(this + 0x1c8) + (long)local_24 * 4); *(int4 *)((long)pvVar7 + (long)local_24 * 4) = *(int4 *)(*(long *)(this + 0x1d0) + (long)local_24 * 4); *(int4 *)((long)pvVar8 + (long)local_24 * 4) = *(int4 *)(*(long *)(this + 0x1d8) + (long)local_24 * 4); *(int4 *)((long)pvVar9 + (long)local_24 * 4) = *(int4 *)(*(long *)(this + 0x1e0) + (long)local_24 * 4); *(int8 *)((long)pvVar2 + (long)local_24 * 8) = *(int8 *)(*(long *)(this + 0x1e8) + (long)local_24 * 8); *(int8 *)((long)pvVar3 + (long)local_24 * 8) = *(int8 *)(*(long *)(this + 0x1f8) + (long)local_24 * 8); *(int8 *)((long)pvVar4 + (long)local_24 * 8) = *(int8 *)(*(long *)(this + 0x1f0) + (long)local_24 * 8); } if (*(long *)(this + 0x1b8) != 0) { free(*(void **)(this + 0x1b8)); } if (*(long *)(this + 0x1e8) != 0) { free(*(void **)(this + 0x1e8)); } if (*(long *)(this + 0x1f8) != 0) { free(*(void **)(this + 0x1f8)); } if (*(long *)(this + 0x1f0) != 0) { free(*(void **)(this + 0x1f0)); } if (*(long *)(this + 0x1c0) != 0) { free(*(void **)(this + 0x1c0)); free(*(void **)(this + 0x1c8)); free(*(void **)(this + 0x1d0)); free(*(void **)(this + 0x1d8)); free(*(void **)(this + 0x1e0)); } *(void **)(this + 0x1b8) = pvVar1; *(void **)(this + 0x1c0) = pvVar5; *(void **)(this + 0x1c8) = pvVar6; *(void **)(this + 0x1d0) = pvVar7; *(void **)(this + 0x1d8) = pvVar8; *(void **)(this + 0x1e0) = pvVar9; *(void **)(this + 0x1e8) = pvVar2; *(void **)(this + 0x1f8) = pvVar3; *(void **)(this + 0x1f0) = pvVar4; } pcVar10 = strdup(param_1); *(char **)(*(long *)(this + 0x1b8) + (long)*(int *)(this + 0x1b0) * 8) = pcVar10; *(int *)(*(long *)(this + 0x1c0) + (long)*(int *)(this + 0x1b0) * 4) = param_2; *(int *)(*(long *)(this + 0x1c8) + (long)*(int *)(this + 0x1b0) * 4) = param_3; *(int *)(*(long *)(this + 0x1d0) + (long)*(int *)(this + 0x1b0) * 4) = param_4; *(int *)(*(long *)(this + 0x1d8) + (long)*(int *)(this + 0x1b0) * 4) = param_5; *(int *)(*(long *)(this + 0x1e0) + (long)*(int *)(this + 0x1b0) * 4) = param_7; pcVar10 = strdup(param_8); *(char **)(*(long *)(this + 0x1e8) + (long)*(int *)(this + 0x1b0) * 8) = pcVar10; pcVar10 = strdup(param_9); *(char **)(*(long *)(this + 0x1f8) + (long)*(int *)(this + 0x1b0) * 8) = pcVar10; pcVar10 = strdup(param_10); *(char **)(*(long *)(this + 0x1f0) + (long)*(int *)(this + 0x1b0) * 8) = pcVar10; *(int *)(this + 0x1b0) = *(int *)(this + 0x1b0) + 1; if (*(int *)(this + 0x1b0) == 1000) { *param_6 = 1; } return; }
7,936
String::append(char const*, unsigned long)
eloqsql/sql/sql_string.cc
bool String::append(const char *s,size_t size) { DBUG_ASSERT(size <= UINT_MAX32); // cast to uint32 is safe uint32 arg_length= (uint32) size; if (!arg_length) return FALSE; /* For an ASCII incompatible string, e.g. UCS-2, we need to convert */ if (mbminlen() > 1) { uint32 add_length= arg_length * mbmaxlen(); uint dummy_errors; if (realloc_with_extra_if_needed(str_length+ add_length)) return TRUE; str_length+= copy_and_convert(Ptr + str_length, add_length, charset(), s, arg_length, &my_charset_latin1, &dummy_errors); return FALSE; } /* For an ASCII compatinble string we can just append. */ return Binary_string::append(s, arg_length); }
O0
cpp
String::append(char const*, unsigned long): pushq %rbp movq %rsp, %rbp subq $0x60, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x38(%rbp) jmp 0x27f3e movq -0x20(%rbp), %rax movl %eax, -0x24(%rbp) cmpl $0x0, -0x24(%rbp) jne 0x27f54 movb $0x0, -0x1(%rbp) jmp 0x2801a movq -0x38(%rbp), %rdi callq 0x29ae0 cmpl $0x1, %eax jbe 0x27fff movq -0x38(%rbp), %rdi movl -0x24(%rbp), %eax movl %eax, -0x3c(%rbp) callq 0x29b20 movl -0x3c(%rbp), %ecx movl %eax, %edx movq -0x38(%rbp), %rax imull %edx, %ecx movl %ecx, -0x28(%rbp) movq %rax, %rdi addq $0x8, %rdi movl 0x10(%rax), %eax addl -0x28(%rbp), %eax movl %eax, %eax movl %eax, %esi callq 0x29b40 testb $0x1, %al jne 0x27fa0 jmp 0x27fa6 movb $0x1, -0x1(%rbp) jmp 0x2801a movq -0x38(%rbp), %rdi movq 0x8(%rdi), %rax movl 0x10(%rdi), %ecx addq %rcx, %rax movq %rax, -0x50(%rbp) movl -0x28(%rbp), %eax movq %rax, -0x48(%rbp) callq 0x29b00 movq -0x50(%rbp), %rdi movq -0x48(%rbp), %rsi movq %rax, %rdx movq -0x18(%rbp), %rcx movl -0x24(%rbp), %eax movl %eax, %r8d leaq 0x25fb00(%rip), %r9 # 0x287ae0 leaq -0x2c(%rbp), %rax movq %rax, (%rsp) callq 0x29a80 movl %eax, %ecx movq -0x38(%rbp), %rax addl 0x10(%rax), %ecx movl %ecx, 0x10(%rax) movb $0x0, -0x1(%rbp) jmp 0x2801a movq -0x38(%rbp), %rdi addq $0x8, %rdi movq -0x18(%rbp), %rsi movl -0x24(%rbp), %eax movl %eax, %edx callq 0x29ba0 andb $0x1, %al movb %al, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x60, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
_ZN6String6appendEPKcm: push rbp mov rbp, rsp sub rsp, 60h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_24+4], rdx mov rax, [rbp+var_10] mov [rbp+var_38], rax jmp short $+2 loc_27F3E: mov rax, [rbp+var_24+4] mov dword ptr [rbp+var_24], eax cmp dword ptr [rbp+var_24], 0 jnz short loc_27F54 mov [rbp+var_1], 0 jmp loc_2801A loc_27F54: mov rdi, [rbp+var_38]; this call _ZNK7Charset8mbminlenEv; Charset::mbminlen(void) cmp eax, 1 jbe loc_27FFF mov rdi, [rbp+var_38]; this mov eax, dword ptr [rbp+var_24] mov [rbp+var_3C], eax call _ZNK7Charset8mbmaxlenEv; Charset::mbmaxlen(void) mov ecx, [rbp+var_3C] mov edx, eax mov rax, [rbp+var_38] imul ecx, edx mov [rbp+var_28], ecx mov rdi, rax add rdi, 8; this mov eax, [rax+10h] add eax, [rbp+var_28] mov eax, eax mov esi, eax; unsigned __int64 call _ZN13Binary_string28realloc_with_extra_if_neededEm; Binary_string::realloc_with_extra_if_needed(ulong) test al, 1 jnz short loc_27FA0 jmp short loc_27FA6 loc_27FA0: mov [rbp+var_1], 1 jmp short loc_2801A loc_27FA6: mov rdi, [rbp+var_38]; this mov rax, [rdi+8] mov ecx, [rdi+10h] add rax, rcx mov [rbp+var_50], rax mov eax, [rbp+var_28] mov [rbp+var_48], rax call _ZNK7Charset7charsetEv; Charset::charset(void) mov rdi, [rbp+var_50]; char * mov rsi, [rbp+var_48]; unsigned __int64 mov rdx, rax; charset_info_st * mov rcx, [rbp+var_18]; char * mov eax, dword ptr [rbp+var_24] mov r8d, eax; unsigned __int64 lea r9, my_charset_latin1; charset_info_st * lea rax, [rbp+var_2C] mov [rsp+60h+var_60], rax; unsigned int * call _Z16copy_and_convertPcmPK15charset_info_stPKcmS2_Pj; copy_and_convert(char *,ulong,charset_info_st const*,char const*,ulong,charset_info_st const*,uint *) mov ecx, eax mov rax, [rbp+var_38] add ecx, [rax+10h] mov [rax+10h], ecx mov [rbp+var_1], 0 jmp short loc_2801A loc_27FFF: mov rdi, [rbp+var_38] add rdi, 8; this mov rsi, [rbp+var_18]; char * mov eax, dword ptr [rbp+var_24] mov edx, eax; unsigned __int64 call _ZN13Binary_string6appendEPKcm; Binary_string::append(char const*,ulong) and al, 1 mov [rbp+var_1], al loc_2801A: mov al, [rbp+var_1] and al, 1 add rsp, 60h pop rbp retn
char String::append(String *this, char *a2, long long a3) { const charset_info_st *v3; // rax char *v5; // [rsp+10h] [rbp-50h] unsigned int v6; // [rsp+34h] [rbp-2Ch] BYREF unsigned int v7; // [rsp+38h] [rbp-28h] _DWORD v8[3]; // [rsp+3Ch] [rbp-24h] char *v9; // [rsp+48h] [rbp-18h] String *v10; // [rsp+50h] [rbp-10h] v10 = this; v9 = a2; *(_QWORD *)&v8[1] = a3; v8[0] = a3; if ( !(_DWORD)a3 ) return 0; if ( (unsigned int)Charset::mbminlen(this) <= 1 ) return Binary_string::append((String *)((char *)this + 8), v9, v8[0]) & 1; v7 = Charset::mbmaxlen(this) * v8[0]; if ( (Binary_string::realloc_with_extra_if_needed((String *)((char *)this + 8), v7 + *((_DWORD *)this + 4)) & 1) != 0 ) return 1; v5 = (char *)(*((unsigned int *)this + 4) + *((_QWORD *)this + 1)); v3 = (const charset_info_st *)Charset::charset(this); *((_DWORD *)this + 4) += copy_and_convert(v5, v7, v3, v9, v8[0], (const charset_info_st *)&my_charset_latin1, &v6); return 0; }
append: 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 RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x38],RAX JMP 0x00127f3e LAB_00127f3e: MOV RAX,qword ptr [RBP + -0x20] MOV dword ptr [RBP + -0x24],EAX CMP dword ptr [RBP + -0x24],0x0 JNZ 0x00127f54 MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012801a LAB_00127f54: MOV RDI,qword ptr [RBP + -0x38] CALL 0x00129ae0 CMP EAX,0x1 JBE 0x00127fff MOV RDI,qword ptr [RBP + -0x38] MOV EAX,dword ptr [RBP + -0x24] MOV dword ptr [RBP + -0x3c],EAX CALL 0x00129b20 MOV ECX,dword ptr [RBP + -0x3c] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x38] IMUL ECX,EDX MOV dword ptr [RBP + -0x28],ECX MOV RDI,RAX ADD RDI,0x8 MOV EAX,dword ptr [RAX + 0x10] ADD EAX,dword ptr [RBP + -0x28] MOV EAX,EAX MOV ESI,EAX CALL 0x00129b40 TEST AL,0x1 JNZ 0x00127fa0 JMP 0x00127fa6 LAB_00127fa0: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0012801a LAB_00127fa6: MOV RDI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RDI + 0x8] MOV ECX,dword ptr [RDI + 0x10] ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV EAX,dword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x48],RAX CALL 0x00129b00 MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RBP + -0x48] MOV RDX,RAX MOV RCX,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] MOV R8D,EAX LEA R9,[0x387ae0] LEA RAX,[RBP + -0x2c] MOV qword ptr [RSP],RAX CALL 0x00129a80 MOV ECX,EAX MOV RAX,qword ptr [RBP + -0x38] ADD ECX,dword ptr [RAX + 0x10] MOV dword ptr [RAX + 0x10],ECX MOV byte ptr [RBP + -0x1],0x0 JMP 0x0012801a LAB_00127fff: MOV RDI,qword ptr [RBP + -0x38] ADD RDI,0x8 MOV RSI,qword ptr [RBP + -0x18] MOV EAX,dword ptr [RBP + -0x24] MOV EDX,EAX CALL 0x00129ba0 AND AL,0x1 MOV byte ptr [RBP + -0x1],AL LAB_0012801a: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x60 POP RBP RET
/* String::append(char const*, unsigned long) */ byte __thiscall String::append(String *this,char *param_1,ulong param_2) { uint uVar1; long lVar2; uint uVar3; int iVar4; ulong uVar5; charset_info_st *pcVar6; uint local_34; uint local_30; uint local_2c; ulong local_28; char *local_20; String *local_18; byte local_9; local_2c = (uint)param_2; if (local_2c == 0) { local_9 = 0; } else { local_28 = param_2; local_20 = param_1; local_18 = this; uVar3 = Charset::mbminlen((Charset *)this); uVar1 = local_2c; if (uVar3 < 2) { local_9 = Binary_string::append((Binary_string *)(this + 8),local_20,(ulong)local_2c); local_9 = local_9 & 1; } else { iVar4 = Charset::mbmaxlen((Charset *)this); local_30 = uVar1 * iVar4; uVar5 = Binary_string::realloc_with_extra_if_needed ((Binary_string *)(this + 8),(ulong)(*(int *)(this + 0x10) + local_30)); if ((uVar5 & 1) == 0) { lVar2 = *(long *)(this + 8); uVar1 = *(uint *)(this + 0x10); uVar5 = (ulong)local_30; pcVar6 = (charset_info_st *)Charset::charset((Charset *)this); iVar4 = copy_and_convert((char *)(lVar2 + (ulong)uVar1),uVar5,pcVar6,local_20, (ulong)local_2c,(charset_info_st *)&my_charset_latin1,&local_34); *(int *)(this + 0x10) = iVar4 + *(int *)(this + 0x10); local_9 = 0; } else { local_9 = 1; } } } return local_9; }
7,937
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE bool FindSymbol(uint64_t pc, const int fd, char* out, size_t out_size, uint64_t symbol_offset, const ElfW(Shdr) * strtab, const ElfW(Shdr) * symtab) { if (symtab == nullptr) { return false; } const size_t num_symbols = symtab->sh_size / symtab->sh_entsize; for (unsigned i = 0; i < num_symbols;) { size_t offset = symtab->sh_offset + i * symtab->sh_entsize; // If we are reading Elf64_Sym's, we want to limit this array to // 32 elements (to keep stack consumption low), otherwise we can // have a 64 element Elf32_Sym array. # if defined(__WORDSIZE) && __WORDSIZE == 64 const size_t NUM_SYMBOLS = 32U; # else const size_t NUM_SYMBOLS = 64U; # endif // Read at most NUM_SYMBOLS symbols at once to save read() calls. ElfW(Sym) buf[NUM_SYMBOLS]; size_t num_symbols_to_read = std::min(NUM_SYMBOLS, num_symbols - i); const ssize_t len = ReadFromOffset(fd, &buf, sizeof(buf[0]) * num_symbols_to_read, offset); NGLOG_SAFE_ASSERT(static_cast<size_t>(len) % sizeof(buf[0]) == 0); const size_t num_symbols_in_buf = static_cast<size_t>(len) / sizeof(buf[0]); NGLOG_SAFE_ASSERT(num_symbols_in_buf <= num_symbols_to_read); for (unsigned j = 0; j < num_symbols_in_buf; ++j) { const ElfW(Sym)& symbol = buf[j]; uint64_t start_address = symbol.st_value; start_address += symbol_offset; uint64_t end_address = start_address + symbol.st_size; if (symbol.st_value != 0 && // Skip null value symbols. symbol.st_shndx != 0 && // Skip undefined symbols. start_address <= pc && pc < end_address) { ssize_t len1 = ReadFromOffset(fd, out, out_size, strtab->sh_offset + symbol.st_name); if (len1 <= 0 || memchr(out, '\0', out_size) == nullptr) { memset(out, 0, out_size); return false; } return true; // Obtained the symbol name. } } i += num_symbols_in_buf; } return false; }
O0
cpp
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*): pushq %rbp movq %rsp, %rbp subq $0x3b0, %rsp # imm = 0x3B0 movq 0x10(%rbp), %rax movq %rdi, -0x10(%rbp) movl %esi, -0x14(%rbp) movq %rdx, -0x20(%rbp) movq %rcx, -0x28(%rbp) movq %r8, -0x30(%rbp) movq %r9, -0x38(%rbp) cmpq $0x0, 0x10(%rbp) jne 0x51436 movb $0x0, -0x1(%rbp) jmp 0x51664 movq 0x10(%rbp), %rax movq 0x20(%rax), %rax movq 0x10(%rbp), %rcx xorl %edx, %edx divq 0x38(%rcx) movq %rax, -0x40(%rbp) movl $0x0, -0x44(%rbp) movl -0x44(%rbp), %eax cmpq -0x40(%rbp), %rax jae 0x51660 movq 0x10(%rbp), %rax movq 0x18(%rax), %rax movl -0x44(%rbp), %ecx movq 0x10(%rbp), %rdx imulq 0x38(%rdx), %rcx addq %rcx, %rax movq %rax, -0x50(%rbp) movq $0x20, -0x58(%rbp) movq -0x40(%rbp), %rax movl -0x44(%rbp), %ecx subq %rcx, %rax movq %rax, -0x370(%rbp) leaq -0x58(%rbp), %rdi leaq -0x370(%rbp), %rsi callq 0xee10 movq (%rax), %rax movq %rax, -0x368(%rbp) movl -0x14(%rbp), %edi imulq $0x18, -0x368(%rbp), %rdx movq -0x50(%rbp), %rcx leaq -0x360(%rbp), %rsi callq 0x4fd50 movq %rax, -0x378(%rbp) movq -0x378(%rbp), %rax movl $0x18, %ecx xorl %edx, %edx divq %rcx cmpq $0x0, %rdx jne 0x514e9 jmp 0x514ee callq 0x9390 movq -0x378(%rbp), %rax movl $0x18, %ecx xorl %edx, %edx divq %rcx movq %rax, -0x380(%rbp) movq -0x380(%rbp), %rax cmpq -0x368(%rbp), %rax ja 0x51518 jmp 0x5151d callq 0x9390 movl $0x0, -0x384(%rbp) movl -0x384(%rbp), %eax cmpq -0x380(%rbp), %rax jae 0x5164b movl -0x384(%rbp), %eax movl %eax, %ecx leaq -0x360(%rbp), %rax imulq $0x18, %rcx, %rcx addq %rcx, %rax movq %rax, -0x390(%rbp) movq -0x390(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x398(%rbp) movq -0x30(%rbp), %rax addq -0x398(%rbp), %rax movq %rax, -0x398(%rbp) movq -0x398(%rbp), %rax movq -0x390(%rbp), %rcx addq 0x10(%rcx), %rax movq %rax, -0x3a0(%rbp) movq -0x390(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x51635 movq -0x390(%rbp), %rax movzwl 0x6(%rax), %eax cmpl $0x0, %eax je 0x51635 movq -0x398(%rbp), %rax cmpq -0x10(%rbp), %rax ja 0x51635 movq -0x10(%rbp), %rax cmpq -0x3a0(%rbp), %rax jae 0x51635 movl -0x14(%rbp), %edi movq -0x20(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x38(%rbp), %rax movq 0x18(%rax), %rcx movq -0x390(%rbp), %rax movl (%rax), %eax addq %rax, %rcx callq 0x4fd50 movq %rax, -0x3a8(%rbp) cmpq $0x0, -0x3a8(%rbp) jle 0x5161a movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rdx xorl %esi, %esi callq 0x97f0 cmpq $0x0, %rax jne 0x5162f movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rdx xorl %esi, %esi callq 0x9380 movb $0x0, -0x1(%rbp) jmp 0x51664 movb $0x1, -0x1(%rbp) jmp 0x51664 jmp 0x51637 movl -0x384(%rbp), %eax addl $0x1, %eax movl %eax, -0x384(%rbp) jmp 0x51527 movq -0x380(%rbp), %rcx movl -0x44(%rbp), %eax addq %rcx, %rax movl %eax, -0x44(%rbp) jmp 0x51453 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al andb $0x1, %al addq $0x3b0, %rsp # imm = 0x3B0 popq %rbp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_: push rbp mov rbp, rsp sub rsp, 3B0h mov rax, [rbp+arg_0] mov [rbp+var_14+4], rdi mov dword ptr [rbp+var_14], esi mov qword ptr [rbp+var_20], rdx mov [rbp+var_28], rcx mov [rbp+var_30], r8 mov [rbp+var_38], r9 cmp [rbp+arg_0], 0 jnz short loc_51436 mov [rbp+var_1], 0 jmp loc_51664 loc_51436: mov rax, [rbp+arg_0] mov rax, [rax+20h] mov rcx, [rbp+arg_0] xor edx, edx div qword ptr [rcx+38h] mov [rbp+var_40], rax mov [rbp+var_44], 0 loc_51453: mov eax, [rbp+var_44] cmp rax, [rbp+var_40] jnb loc_51660 mov rax, [rbp+arg_0] mov rax, [rax+18h] mov ecx, [rbp+var_44] mov rdx, [rbp+arg_0] imul rcx, [rdx+38h] add rax, rcx mov [rbp+var_50], rax mov [rbp+var_58], 20h ; ' ' mov rax, [rbp+var_40] mov ecx, [rbp+var_44] sub rax, rcx mov [rbp+var_370], rax lea rdi, [rbp+var_58] lea rsi, [rbp+var_370] call _ZSt3minImERKT_S2_S2_; std::min<ulong>(ulong const&,ulong const&) mov rax, [rax] mov [rbp+var_368], rax mov edi, dword ptr [rbp+var_14]; this imul rdx, [rbp+var_368], 18h; void * mov rcx, [rbp+var_50]; unsigned __int64 lea rsi, [rbp+var_360]; int call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) mov [rbp+var_378], rax mov rax, [rbp+var_378] mov ecx, 18h xor edx, edx div rcx cmp rdx, 0 jnz short loc_514E9 jmp short loc_514EE loc_514E9: call _abort loc_514EE: mov rax, [rbp+var_378] mov ecx, 18h xor edx, edx div rcx mov [rbp+var_380], rax mov rax, [rbp+var_380] cmp rax, [rbp+var_368] ja short loc_51518 jmp short loc_5151D loc_51518: call _abort loc_5151D: mov [rbp+var_384], 0 loc_51527: mov eax, [rbp+var_384] cmp rax, [rbp+var_380] jnb loc_5164B mov eax, [rbp+var_384] mov ecx, eax lea rax, [rbp+var_360] imul rcx, 18h add rax, rcx mov [rbp+var_390], rax mov rax, [rbp+var_390] mov rax, [rax+8] mov [rbp+var_398], rax mov rax, [rbp+var_30] add rax, [rbp+var_398] mov [rbp+var_398], rax mov rax, [rbp+var_398] mov rcx, [rbp+var_390] add rax, [rcx+10h] mov [rbp+var_3A0], rax mov rax, [rbp+var_390] cmp qword ptr [rax+8], 0 jz loc_51635 mov rax, [rbp+var_390] movzx eax, word ptr [rax+6] cmp eax, 0 jz short loc_51635 mov rax, [rbp+var_398] cmp rax, [rbp+var_14+4] ja short loc_51635 mov rax, [rbp+var_14+4] cmp rax, [rbp+var_3A0] jnb short loc_51635 mov edi, dword ptr [rbp+var_14]; this mov rsi, qword ptr [rbp+var_20]; int mov rdx, [rbp+var_28]; void * mov rax, [rbp+var_38] mov rcx, [rax+18h] mov rax, [rbp+var_390] mov eax, [rax] add rcx, rax; unsigned __int64 call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) mov [rbp+var_3A8], rax cmp [rbp+var_3A8], 0 jle short loc_5161A mov rdi, qword ptr [rbp+var_20] mov rdx, [rbp+var_28] xor esi, esi call _memchr cmp rax, 0 jnz short loc_5162F loc_5161A: mov rdi, qword ptr [rbp+var_20] mov rdx, [rbp+var_28] xor esi, esi call _memset mov [rbp+var_1], 0 jmp short loc_51664 loc_5162F: mov [rbp+var_1], 1 jmp short loc_51664 loc_51635: jmp short $+2 loc_51637: mov eax, [rbp+var_384] add eax, 1 mov [rbp+var_384], eax jmp loc_51527 loc_5164B: mov rcx, [rbp+var_380] mov eax, [rbp+var_44] add rax, rcx mov [rbp+var_44], eax jmp loc_51453 loc_51660: mov [rbp+var_1], 0 loc_51664: mov al, [rbp+var_1] and al, 1 add rsp, 3B0h pop rbp retn
char nglog::tools::FindSymbol(long long a1, int a2, long long a3, void *a4, long long a5, long long a6, _QWORD *a7) { long long v7; // rdi unsigned long long v9; // [rsp+18h] [rbp-398h] unsigned int *v10; // [rsp+20h] [rbp-390h] unsigned int i; // [rsp+2Ch] [rbp-384h] unsigned long long v12; // [rsp+30h] [rbp-380h] unsigned long long v13; // [rsp+38h] [rbp-378h] unsigned long long v14; // [rsp+40h] [rbp-370h] BYREF unsigned long long v15; // [rsp+48h] [rbp-368h] _QWORD v16[97]; // [rsp+50h] [rbp-360h] BYREF long long v17; // [rsp+358h] [rbp-58h] BYREF unsigned long long v18; // [rsp+360h] [rbp-50h] unsigned int v19; // [rsp+36Ch] [rbp-44h] unsigned long long v20; // [rsp+370h] [rbp-40h] long long v21; // [rsp+378h] [rbp-38h] long long v22; // [rsp+380h] [rbp-30h] void *v23; // [rsp+388h] [rbp-28h] int v24[2]; // [rsp+390h] [rbp-20h] _DWORD v25[4]; // [rsp+39Ch] [rbp-14h] *(_QWORD *)&v25[1] = a1; v25[0] = a2; *(_QWORD *)v24 = a3; v23 = a4; v22 = a5; v21 = a6; if ( !a7 ) return 0; v20 = a7[4] / a7[7]; v19 = 0; LABEL_4: if ( v19 >= v20 ) return 0; v18 = a7[7] * v19 + a7[3]; v17 = 32LL; v14 = v20 - v19; v15 = *std::min<unsigned long>(&v17, &v14); v7 = v25[0]; v13 = nglog::tools::ReadFromOffset((nglog::tools *)v25[0], (long long)v16, (char *)(24 * v15), v18); if ( v13 % 0x18 ) abort(v7, v16); v12 = v13 / 0x18; if ( v13 / 0x18 > v15 ) abort(v7, v16); for ( i = 0; ; ++i ) { if ( i >= v12 ) { v19 += v12; goto LABEL_4; } v10 = (unsigned int *)&v16[3 * i]; v9 = *((_QWORD *)v10 + 1) + v22; if ( *((_QWORD *)v10 + 1) ) { if ( *((_WORD *)v10 + 3) && v9 <= *(_QWORD *)&v25[1] && *(_QWORD *)&v25[1] < v16[3 * i + 2] + v9 ) break; } } if ( (long long)nglog::tools::ReadFromOffset( (nglog::tools *)v25[0], *(long long *)v24, (char *)v23, *v10 + *(_QWORD *)(v21 + 24)) > 0 && memchr(*(_QWORD *)v24, 0LL, v23) ) { return 1; } memset(*(_QWORD *)v24, 0LL, v23); return 0; }
FindSymbol: PUSH RBP MOV RBP,RSP SUB RSP,0x3b0 MOV RAX,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x10],RDI MOV dword ptr [RBP + -0x14],ESI MOV qword ptr [RBP + -0x20],RDX MOV qword ptr [RBP + -0x28],RCX MOV qword ptr [RBP + -0x30],R8 MOV qword ptr [RBP + -0x38],R9 CMP qword ptr [RBP + 0x10],0x0 JNZ 0x00151436 MOV byte ptr [RBP + -0x1],0x0 JMP 0x00151664 LAB_00151436: MOV RAX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RAX + 0x20] MOV RCX,qword ptr [RBP + 0x10] XOR EDX,EDX DIV qword ptr [RCX + 0x38] MOV qword ptr [RBP + -0x40],RAX MOV dword ptr [RBP + -0x44],0x0 LAB_00151453: MOV EAX,dword ptr [RBP + -0x44] CMP RAX,qword ptr [RBP + -0x40] JNC 0x00151660 MOV RAX,qword ptr [RBP + 0x10] MOV RAX,qword ptr [RAX + 0x18] MOV ECX,dword ptr [RBP + -0x44] MOV RDX,qword ptr [RBP + 0x10] IMUL RCX,qword ptr [RDX + 0x38] ADD RAX,RCX MOV qword ptr [RBP + -0x50],RAX MOV qword ptr [RBP + -0x58],0x20 MOV RAX,qword ptr [RBP + -0x40] MOV ECX,dword ptr [RBP + -0x44] SUB RAX,RCX MOV qword ptr [RBP + -0x370],RAX LEA RDI,[RBP + -0x58] LEA RSI,[RBP + -0x370] CALL 0x0010ee10 MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x368],RAX MOV EDI,dword ptr [RBP + -0x14] IMUL RDX,qword ptr [RBP + -0x368],0x18 MOV RCX,qword ptr [RBP + -0x50] LEA RSI,[RBP + -0x360] CALL 0x0014fd50 MOV qword ptr [RBP + -0x378],RAX MOV RAX,qword ptr [RBP + -0x378] MOV ECX,0x18 XOR EDX,EDX DIV RCX CMP RDX,0x0 JNZ 0x001514e9 JMP 0x001514ee LAB_001514e9: CALL 0x00109390 LAB_001514ee: MOV RAX,qword ptr [RBP + -0x378] MOV ECX,0x18 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0x380],RAX MOV RAX,qword ptr [RBP + -0x380] CMP RAX,qword ptr [RBP + -0x368] JA 0x00151518 JMP 0x0015151d LAB_00151518: CALL 0x00109390 LAB_0015151d: MOV dword ptr [RBP + -0x384],0x0 LAB_00151527: MOV EAX,dword ptr [RBP + -0x384] CMP RAX,qword ptr [RBP + -0x380] JNC 0x0015164b MOV EAX,dword ptr [RBP + -0x384] MOV ECX,EAX LEA RAX,[RBP + -0x360] IMUL RCX,RCX,0x18 ADD RAX,RCX MOV qword ptr [RBP + -0x390],RAX MOV RAX,qword ptr [RBP + -0x390] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x398],RAX MOV RAX,qword ptr [RBP + -0x30] ADD RAX,qword ptr [RBP + -0x398] MOV qword ptr [RBP + -0x398],RAX MOV RAX,qword ptr [RBP + -0x398] MOV RCX,qword ptr [RBP + -0x390] ADD RAX,qword ptr [RCX + 0x10] MOV qword ptr [RBP + -0x3a0],RAX MOV RAX,qword ptr [RBP + -0x390] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00151635 MOV RAX,qword ptr [RBP + -0x390] MOVZX EAX,word ptr [RAX + 0x6] CMP EAX,0x0 JZ 0x00151635 MOV RAX,qword ptr [RBP + -0x398] CMP RAX,qword ptr [RBP + -0x10] JA 0x00151635 MOV RAX,qword ptr [RBP + -0x10] CMP RAX,qword ptr [RBP + -0x3a0] JNC 0x00151635 MOV EDI,dword ptr [RBP + -0x14] MOV RSI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + -0x38] MOV RCX,qword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x390] MOV EAX,dword ptr [RAX] ADD RCX,RAX CALL 0x0014fd50 MOV qword ptr [RBP + -0x3a8],RAX CMP qword ptr [RBP + -0x3a8],0x0 JLE 0x0015161a MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x001097f0 CMP RAX,0x0 JNZ 0x0015162f LAB_0015161a: MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x00109380 MOV byte ptr [RBP + -0x1],0x0 JMP 0x00151664 LAB_0015162f: MOV byte ptr [RBP + -0x1],0x1 JMP 0x00151664 LAB_00151635: JMP 0x00151637 LAB_00151637: MOV EAX,dword ptr [RBP + -0x384] ADD EAX,0x1 MOV dword ptr [RBP + -0x384],EAX JMP 0x00151527 LAB_0015164b: MOV RCX,qword ptr [RBP + -0x380] MOV EAX,dword ptr [RBP + -0x44] ADD RAX,RCX MOV dword ptr [RBP + -0x44],EAX JMP 0x00151453 LAB_00151660: MOV byte ptr [RBP + -0x1],0x0 LAB_00151664: MOV AL,byte ptr [RBP + -0x1] AND AL,0x1 ADD RSP,0x3b0 POP RBP RET
/* nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*) */ int1 nglog::tools::FindSymbol (ulong param_1,int param_2,char *param_3,ulong param_4,ulong param_5,Elf64_Shdr *param_6, Elf64_Shdr *param_7) { ulong *puVar1; ulong uVar2; long lVar3; void *pvVar4; ulong uVar5; uint local_38c; ulong local_378; ulong local_370; uint local_368; short sStack_362; long alStack_360 [96]; ulong local_60; ulong local_58; uint local_4c; ulong local_48; Elf64_Shdr *local_40; ulong local_38; ulong local_30; char *local_28; int local_1c; ulong local_18; if (param_7 != (Elf64_Shdr *)0x0) { local_48 = param_7->sh_size / param_7->sh_entsize; local_40 = param_6; local_38 = param_5; local_30 = param_4; local_28 = param_3; local_1c = param_2; local_18 = param_1; for (local_4c = 0; local_4c < local_48; local_4c = local_4c + (int)uVar2) { local_58 = param_7->sh_offset + (ulong)local_4c * param_7->sh_entsize; local_60 = 0x20; local_378 = local_48 - local_4c; puVar1 = std::min<unsigned_long>(&local_60,&local_378); local_370 = *puVar1; uVar2 = ReadFromOffset(local_1c,&local_368,local_370 * 0x18,local_58); if (uVar2 % 0x18 != 0) { /* WARNING: Subroutine does not return */ abort(); } uVar2 = uVar2 / 0x18; if (local_370 < uVar2) { /* WARNING: Subroutine does not return */ abort(); } for (local_38c = 0; local_38c < uVar2; local_38c = local_38c + 1) { uVar5 = (ulong)local_38c; if ((((alStack_360[uVar5 * 3] != 0) && ((&sStack_362)[uVar5 * 0xc] != 0)) && (local_38 + alStack_360[uVar5 * 3] <= local_18)) && (local_18 < local_38 + alStack_360[uVar5 * 3] + alStack_360[uVar5 * 3 + 1])) { lVar3 = ReadFromOffset(local_1c,local_28,local_30, local_40->sh_offset + (ulong)(&local_368)[uVar5 * 6]); if ((0 < lVar3) && (pvVar4 = memchr(local_28,0,local_30), pvVar4 != (void *)0x0)) { return 1; } memset(local_28,0,local_30); return 0; } } } } return 0; }
7,938
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE bool FindSymbol(uint64_t pc, const int fd, char* out, size_t out_size, uint64_t symbol_offset, const ElfW(Shdr) * strtab, const ElfW(Shdr) * symtab) { if (symtab == nullptr) { return false; } const size_t num_symbols = symtab->sh_size / symtab->sh_entsize; for (unsigned i = 0; i < num_symbols;) { size_t offset = symtab->sh_offset + i * symtab->sh_entsize; // If we are reading Elf64_Sym's, we want to limit this array to // 32 elements (to keep stack consumption low), otherwise we can // have a 64 element Elf32_Sym array. # if defined(__WORDSIZE) && __WORDSIZE == 64 const size_t NUM_SYMBOLS = 32U; # else const size_t NUM_SYMBOLS = 64U; # endif // Read at most NUM_SYMBOLS symbols at once to save read() calls. ElfW(Sym) buf[NUM_SYMBOLS]; size_t num_symbols_to_read = std::min(NUM_SYMBOLS, num_symbols - i); const ssize_t len = ReadFromOffset(fd, &buf, sizeof(buf[0]) * num_symbols_to_read, offset); NGLOG_SAFE_ASSERT(static_cast<size_t>(len) % sizeof(buf[0]) == 0); const size_t num_symbols_in_buf = static_cast<size_t>(len) / sizeof(buf[0]); NGLOG_SAFE_ASSERT(num_symbols_in_buf <= num_symbols_to_read); for (unsigned j = 0; j < num_symbols_in_buf; ++j) { const ElfW(Sym)& symbol = buf[j]; uint64_t start_address = symbol.st_value; start_address += symbol_offset; uint64_t end_address = start_address + symbol.st_size; if (symbol.st_value != 0 && // Skip null value symbols. symbol.st_shndx != 0 && // Skip undefined symbols. start_address <= pc && pc < end_address) { ssize_t len1 = ReadFromOffset(fd, out, out_size, strtab->sh_offset + symbol.st_name); if (len1 <= 0 || memchr(out, '\0', out_size) == nullptr) { memset(out, 0, out_size); return false; } return true; // Obtained the symbol name. } } i += num_symbols_in_buf; } return false; }
O1
cpp
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x348, %rsp # imm = 0x348 movq %r9, 0x30(%rsp) movq %r8, 0x38(%rsp) movl %esi, 0xc(%rsp) movq 0x380(%rsp), %rsi testq %rsi, %rsi je 0x23039 movq %rdx, %rbp movq %rdi, %r13 movq %rcx, 0x28(%rsp) movq 0x20(%rsi), %rax xorl %edx, %edx divq 0x38(%rsi) movq %rax, 0x18(%rsp) xorl %ebx, %ebx movq %rdi, 0x10(%rsp) movl %ebx, %r15d movq 0x18(%rsp), %r14 subq %r15, %r14 jbe 0x23039 movl %edx, %r12d movq 0x38(%rsi), %rcx imulq %r15, %rcx addq 0x18(%rsi), %rcx cmpq $0x20, %r14 movl $0x20, %eax cmovaeq %rax, %r14 leal (,%r14,8), %eax leaq (%rax,%rax,2), %rdx movl 0xc(%rsp), %edi leaq 0x40(%rsp), %rsi callq 0x22388 movq %rax, %rcx movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB mulq %rdx movq %rdx, %rbx rorq $0x3, %rax movabsq $0xaaaaaaaaaaaaaab, %rdx # imm = 0xAAAAAAAAAAAAAAB cmpq %rdx, %rax jae 0x23052 shrq $0x4, %rbx cmpq %r14, %rbx ja 0x23052 movq %r15, 0x20(%rsp) cmpq $0x18, %rcx setae %r14b movl %r12d, %edx jb 0x23015 movl $0x1, %r15d xorl %eax, %eax leaq (%rax,%rax,2), %rcx movq 0x48(%rsp,%rcx,8), %rax movb $0x1, %r12b testq %rax, %rax je 0x22ffd addq 0x38(%rsp), %rax cmpq %r13, %rax ja 0x22ffd leaq (%rsp,%rcx,8), %rcx addq $0x40, %rcx cmpw $0x0, 0x6(%rcx) je 0x22ffd addq 0x10(%rcx), %rax cmpq %r13, %rax jbe 0x22ffd movl (%rcx), %ecx movq 0x30(%rsp), %rax addq 0x18(%rax), %rcx movl 0xc(%rsp), %edi movq %rbp, %rsi movq %rbp, %r13 movq 0x28(%rsp), %rbp movq %rbp, %rdx callq 0x22388 testq %rax, %rax jle 0x22fe3 xorl %r12d, %r12d movq %r13, %rdi xorl %esi, %esi movq %rbp, %rdx callq 0x7590 testq %rax, %rax je 0x22fe3 movb $0x1, %dl jmp 0x22ff5 xorl %r12d, %r12d movq %r13, %rdi xorl %esi, %esi movq %rbp, %rdx callq 0x7290 xorl %edx, %edx movq %r13, %rbp movq 0x10(%rsp), %r13 testb %r12b, %r12b je 0x23015 movl %r15d, %eax incl %r15d cmpq %rax, %rbx seta %r14b ja 0x22f70 testb $0x1, %r14b movl $0x0, %eax cmovnel %eax, %ebx addl 0x20(%rsp), %ebx testb $0x1, %r14b movq 0x380(%rsp), %rsi je 0x22ed4 jmp 0x2303b xorl %edx, %edx andb $0x1, %dl movl %edx, %eax addq $0x348, %rsp # imm = 0x348 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x72a0 nop
_ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 348h mov [rsp+378h+var_348], r9 mov [rsp+378h+var_340], r8 mov dword ptr [rsp+378h+var_36C], esi mov rsi, [rsp+378h+arg_0] test rsi, rsi jz loc_23039 mov rbp, rdx mov r13, rdi mov [rsp+378h+var_350], rcx mov rax, [rsi+20h] xor edx, edx div qword ptr [rsi+38h] mov [rsp+378h+var_360], rax xor ebx, ebx mov [rsp+378h+var_36C+4], rdi loc_22ED4: mov r15d, ebx mov r14, [rsp+378h+var_360] sub r14, r15 jbe loc_23039 mov r12d, edx mov rcx, [rsi+38h] imul rcx, r15 add rcx, [rsi+18h]; unsigned __int64 cmp r14, 20h ; ' ' mov eax, 20h ; ' ' cmovnb r14, rax lea eax, ds:0[r14*8] lea rdx, [rax+rax*2]; void * mov edi, dword ptr [rsp+378h+var_36C]; this lea rsi, [rsp+378h+var_338]; int call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) mov rcx, rax mov rdx, 0AAAAAAAAAAAAAAABh mul rdx mov rbx, rdx ror rax, 3 mov rdx, 0AAAAAAAAAAAAAABh cmp rax, rdx jnb loc_23052 shr rbx, 4 cmp rbx, r14 ja loc_23052 mov [rsp+378h+var_358], r15 cmp rcx, 18h setnb r14b mov edx, r12d jb loc_23015 mov r15d, 1 xor eax, eax loc_22F70: lea rcx, [rax+rax*2] mov rax, [rsp+rcx*8+378h+var_330] mov r12b, 1 test rax, rax jz short loc_22FFD add rax, [rsp+378h+var_340] cmp rax, r13 ja short loc_22FFD lea rcx, [rsp+rcx*8+378h+var_378] add rcx, 40h ; '@' cmp word ptr [rcx+6], 0 jz short loc_22FFD add rax, [rcx+10h] cmp rax, r13 jbe short loc_22FFD mov ecx, [rcx] mov rax, [rsp+378h+var_348] add rcx, [rax+18h]; unsigned __int64 mov edi, dword ptr [rsp+378h+var_36C]; this mov rsi, rbp; int mov r13, rbp mov rbp, [rsp+378h+var_350] mov rdx, rbp; void * call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) test rax, rax jle short loc_22FE3 xor r12d, r12d mov rdi, r13 xor esi, esi mov rdx, rbp call _memchr test rax, rax jz short loc_22FE3 mov dl, 1 jmp short loc_22FF5 loc_22FE3: xor r12d, r12d mov rdi, r13 xor esi, esi mov rdx, rbp call _memset xor edx, edx loc_22FF5: mov rbp, r13 mov r13, [rsp+378h+var_36C+4] loc_22FFD: test r12b, r12b jz short loc_23015 mov eax, r15d inc r15d cmp rbx, rax setnbe r14b ja loc_22F70 loc_23015: test r14b, 1 mov eax, 0 cmovnz ebx, eax add ebx, dword ptr [rsp+378h+var_358] test r14b, 1 mov rsi, [rsp+378h+arg_0] jz loc_22ED4 jmp short loc_2303B loc_23039: xor edx, edx loc_2303B: and dl, 1 mov eax, edx add rsp, 348h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_23052: call _abort
long long nglog::tools::FindSymbol( unsigned long long a1, unsigned int a2, long long a3, char *a4, long long a5, long long a6, long long a7) { long long v7; // rsi unsigned long long v9; // r13 long long v10; // rdx unsigned int v11; // ebx unsigned int v12; // r15d unsigned long long v13; // r14 int v14; // r12d unsigned long long v15; // rcx unsigned long long v16; // rbx bool v17; // r14 unsigned int v18; // r15d unsigned long long v19; // rax long long v20; // rcx long long v21; // rax char v22; // r12 unsigned long long v23; // rax int *v24; // rcx unsigned long long v27; // [rsp+18h] [rbp-360h] unsigned int v28; // [rsp+20h] [rbp-358h] int v32[206]; // [rsp+40h] [rbp-338h] BYREF v7 = a7; if ( a7 ) { v9 = a1; v10 = *(_QWORD *)(a7 + 32) % *(_QWORD *)(a7 + 56); v27 = *(_QWORD *)(a7 + 32) / *(_QWORD *)(a7 + 56); v11 = 0; while ( 1 ) { v12 = v11; v13 = v27 - v11; if ( v27 <= v11 ) break; v14 = v10; if ( v13 >= 0x20 ) v13 = 32LL; v15 = nglog::tools::ReadFromOffset( a2, (long long)v32, (char *)(3LL * (unsigned int)(8 * v13)), *(_QWORD *)(v7 + 24) + v11 * *(_QWORD *)(v7 + 56)); if ( __ROR8__(0xAAAAAAAAAAAAAAABLL * v15, 3) >= 0xAAAAAAAAAAAAAABuLL || (v16 = v15 / 0x18, v15 / 0x18 > v13) ) abort(a2); v28 = v12; v17 = v15 >= 0x18; LODWORD(v10) = v14; if ( v15 >= 0x18 ) { v18 = 1; v19 = 0LL; do { v20 = 3 * v19; v21 = *(_QWORD *)&v32[6 * v19 + 2]; v22 = 1; if ( v21 ) { v23 = a5 + v21; if ( v23 <= v9 ) { v24 = &v32[2 * v20]; if ( *((_WORD *)v24 + 3) ) { if ( *((_QWORD *)v24 + 2) + v23 > v9 ) { if ( (long long)nglog::tools::ReadFromOffset(a2, a3, a4, *(_QWORD *)(a6 + 24) + (unsigned int)*v24) > 0 && (v22 = 0, memchr(a3, 0LL, a4)) ) { LOBYTE(v10) = 1; } else { v22 = 0; memset(a3, 0LL, a4); LODWORD(v10) = 0; } v9 = a1; } } } } if ( !v22 ) break; v19 = v18++; v17 = v16 > v19; } while ( v16 > v19 ); } if ( v17 ) LODWORD(v16) = 0; v11 = v28 + v16; v7 = a7; if ( v17 ) goto LABEL_26; } } LODWORD(v10) = 0; LABEL_26: LOBYTE(v10) = v10 & 1; return (unsigned int)v10; }
FindSymbol: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x348 MOV qword ptr [RSP + 0x30],R9 MOV qword ptr [RSP + 0x38],R8 MOV dword ptr [RSP + 0xc],ESI MOV RSI,qword ptr [RSP + 0x380] TEST RSI,RSI JZ 0x00123039 MOV RBP,RDX MOV R13,RDI MOV qword ptr [RSP + 0x28],RCX MOV RAX,qword ptr [RSI + 0x20] XOR EDX,EDX DIV qword ptr [RSI + 0x38] MOV qword ptr [RSP + 0x18],RAX XOR EBX,EBX MOV qword ptr [RSP + 0x10],RDI LAB_00122ed4: MOV R15D,EBX MOV R14,qword ptr [RSP + 0x18] SUB R14,R15 JBE 0x00123039 MOV R12D,EDX MOV RCX,qword ptr [RSI + 0x38] IMUL RCX,R15 ADD RCX,qword ptr [RSI + 0x18] CMP R14,0x20 MOV EAX,0x20 CMOVNC R14,RAX LEA EAX,[R14*0x8] LEA RDX,[RAX + RAX*0x2] MOV EDI,dword ptr [RSP + 0xc] LEA RSI,[RSP + 0x40] CALL 0x00122388 MOV RCX,RAX MOV RDX,-0x5555555555555555 MUL RDX MOV RBX,RDX ROR RAX,0x3 MOV RDX,0xaaaaaaaaaaaaaab CMP RAX,RDX JNC 0x00123052 SHR RBX,0x4 CMP RBX,R14 JA 0x00123052 MOV qword ptr [RSP + 0x20],R15 CMP RCX,0x18 SETNC R14B MOV EDX,R12D JC 0x00123015 MOV R15D,0x1 XOR EAX,EAX LAB_00122f70: LEA RCX,[RAX + RAX*0x2] MOV RAX,qword ptr [RSP + RCX*0x8 + 0x48] MOV R12B,0x1 TEST RAX,RAX JZ 0x00122ffd ADD RAX,qword ptr [RSP + 0x38] CMP RAX,R13 JA 0x00122ffd LEA RCX,[RSP + RCX*0x8] ADD RCX,0x40 CMP word ptr [RCX + 0x6],0x0 JZ 0x00122ffd ADD RAX,qword ptr [RCX + 0x10] CMP RAX,R13 JBE 0x00122ffd MOV ECX,dword ptr [RCX] MOV RAX,qword ptr [RSP + 0x30] ADD RCX,qword ptr [RAX + 0x18] MOV EDI,dword ptr [RSP + 0xc] MOV RSI,RBP MOV R13,RBP MOV RBP,qword ptr [RSP + 0x28] MOV RDX,RBP CALL 0x00122388 TEST RAX,RAX JLE 0x00122fe3 XOR R12D,R12D MOV RDI,R13 XOR ESI,ESI MOV RDX,RBP CALL 0x00107590 TEST RAX,RAX JZ 0x00122fe3 MOV DL,0x1 JMP 0x00122ff5 LAB_00122fe3: XOR R12D,R12D MOV RDI,R13 XOR ESI,ESI MOV RDX,RBP CALL 0x00107290 XOR EDX,EDX LAB_00122ff5: MOV RBP,R13 MOV R13,qword ptr [RSP + 0x10] LAB_00122ffd: TEST R12B,R12B JZ 0x00123015 MOV EAX,R15D INC R15D CMP RBX,RAX SETA R14B JA 0x00122f70 LAB_00123015: TEST R14B,0x1 MOV EAX,0x0 CMOVNZ EBX,EAX ADD EBX,dword ptr [RSP + 0x20] TEST R14B,0x1 MOV RSI,qword ptr [RSP + 0x380] JZ 0x00122ed4 JMP 0x0012303b LAB_00123039: XOR EDX,EDX LAB_0012303b: AND DL,0x1 MOV EAX,EDX ADD RSP,0x348 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00123052: CALL 0x001072a0
/* nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*) */ ulong nglog::tools::FindSymbol (ulong param_1,int param_2,char *param_3,ulong param_4,ulong param_5, Elf64_Shdr *param_6,Elf64_Shdr *param_7) { bool bVar1; int1 auVar2 [16]; ulong uVar3; ulong uVar4; ulong uVar5; ulong uVar6; long lVar7; void *pvVar8; ulong uVar9; int8 extraout_RDX; int iVar10; uint uVar11; ulong uVar12; bool bVar13; uint local_338; short local_332; long alStack_330 [96]; if (param_7 == (Elf64_Shdr *)0x0) { LAB_00123039: uVar9 = 0; } else { uVar3 = param_7->sh_size / param_7->sh_entsize; uVar9 = param_7->sh_size % param_7->sh_entsize; uVar11 = 0; do { uVar4 = (ulong)uVar11; uVar12 = uVar3 - uVar4; if (uVar3 < uVar4 || uVar12 == 0) goto LAB_00123039; uVar9 = uVar9 & 0xffffffff; if (0x1f < uVar12) { uVar12 = 0x20; } uVar4 = ReadFromOffset(param_2,&local_338,(ulong)(uint)((int)uVar12 * 8) * 3, param_7->sh_entsize * uVar4 + param_7->sh_offset); auVar2._8_8_ = 0; auVar2._0_8_ = uVar4; uVar5 = SUB168(auVar2 * ZEXT816(0xaaaaaaaaaaaaaaab),0); if ((0xaaaaaaaaaaaaaaa < (uVar5 >> 3 | uVar5 << 0x3d)) || (uVar5 = uVar4 / 0x18, uVar12 < uVar5)) { /* WARNING: Subroutine does not return */ abort(); } bVar13 = 0x17 < uVar4; if (bVar13) { uVar12 = 0; uVar4 = 1; do { bVar1 = true; if ((alStack_330[uVar12 * 3] != 0) && (uVar6 = alStack_330[uVar12 * 3] + param_5, uVar6 <= param_1)) { if (((&local_332)[uVar12 * 0xc] != 0) && (param_1 < uVar6 + alStack_330[uVar12 * 3 + 1]) ) { lVar7 = ReadFromOffset(param_2,param_3,param_4, (ulong)(&local_338)[uVar12 * 6] + param_6->sh_offset); if ((lVar7 < 1) || (pvVar8 = memchr(param_3,0,param_4), pvVar8 == (void *)0x0)) { memset(param_3,0,param_4); uVar9 = 0; } else { uVar9 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1); } bVar1 = false; } } if (!bVar1) break; bVar13 = uVar4 < uVar5; bVar1 = uVar4 < uVar5; uVar12 = uVar4; uVar4 = (ulong)((int)uVar4 + 1); } while (bVar1); } iVar10 = (int)uVar5; if (bVar13) { iVar10 = 0; } uVar11 = iVar10 + uVar11; } while (!bVar13); } return uVar9 & 0xffffff01; }
7,939
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*)
ng-log[P]ng-log/src/symbolize.cc
static ATTRIBUTE_NOINLINE bool FindSymbol(uint64_t pc, const int fd, char* out, size_t out_size, uint64_t symbol_offset, const ElfW(Shdr) * strtab, const ElfW(Shdr) * symtab) { if (symtab == nullptr) { return false; } const size_t num_symbols = symtab->sh_size / symtab->sh_entsize; for (unsigned i = 0; i < num_symbols;) { size_t offset = symtab->sh_offset + i * symtab->sh_entsize; // If we are reading Elf64_Sym's, we want to limit this array to // 32 elements (to keep stack consumption low), otherwise we can // have a 64 element Elf32_Sym array. # if defined(__WORDSIZE) && __WORDSIZE == 64 const size_t NUM_SYMBOLS = 32U; # else const size_t NUM_SYMBOLS = 64U; # endif // Read at most NUM_SYMBOLS symbols at once to save read() calls. ElfW(Sym) buf[NUM_SYMBOLS]; size_t num_symbols_to_read = std::min(NUM_SYMBOLS, num_symbols - i); const ssize_t len = ReadFromOffset(fd, &buf, sizeof(buf[0]) * num_symbols_to_read, offset); NGLOG_SAFE_ASSERT(static_cast<size_t>(len) % sizeof(buf[0]) == 0); const size_t num_symbols_in_buf = static_cast<size_t>(len) / sizeof(buf[0]); NGLOG_SAFE_ASSERT(num_symbols_in_buf <= num_symbols_to_read); for (unsigned j = 0; j < num_symbols_in_buf; ++j) { const ElfW(Sym)& symbol = buf[j]; uint64_t start_address = symbol.st_value; start_address += symbol_offset; uint64_t end_address = start_address + symbol.st_size; if (symbol.st_value != 0 && // Skip null value symbols. symbol.st_shndx != 0 && // Skip undefined symbols. start_address <= pc && pc < end_address) { ssize_t len1 = ReadFromOffset(fd, out, out_size, strtab->sh_offset + symbol.st_name); if (len1 <= 0 || memchr(out, '\0', out_size) == nullptr) { memset(out, 0, out_size); return false; } return true; // Obtained the symbol name. } } i += num_symbols_in_buf; } return false; }
O2
cpp
nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x328, %rsp # imm = 0x328 movq %rcx, 0x18(%rsp) movq %rdx, 0x10(%rsp) movq %rdi, %r12 movq 0x360(%rsp), %rdi xorl %ecx, %ecx testq %rdi, %rdi je 0x1e2db movq %r8, %r13 movl %esi, %r8d movq %r9, 0x8(%rsp) movq 0x20(%rdi), %rax xorl %edx, %edx divq 0x38(%rdi) movq %rax, (%rsp) movl %ecx, %ebx movq %rax, %r14 subq %rbx, %r14 jbe 0x1e2d2 movq 0x38(%rdi), %rcx imulq %rbx, %rcx movq %rdi, %r15 addq 0x18(%rdi), %rcx cmpq $0x20, %r14 pushq $0x20 popq %rax cmovaeq %rax, %r14 imulq $0x18, %r14, %rdx movl %r8d, %ebp movl %r8d, %edi leaq 0x20(%rsp), %rsi callq 0x1d737 xorl %edx, %edx pushq $0x18 popq %rcx divq %rcx testq %rdx, %rdx jne 0x1e2ef cmpq %r14, %rax ja 0x1e2ef xorl %ecx, %ecx movl %ebp, %r8d movq %r15, %rdi movl %ecx, %ecx cmpq %rcx, %rax jbe 0x1e276 imulq $0x18, %rcx, %rsi movq 0x28(%rsp,%rsi), %rdx testq %rdx, %rdx je 0x1e272 addq %r13, %rdx cmpq %r12, %rdx ja 0x1e272 addq %rsp, %rsi addq $0x20, %rsi cmpw $0x0, 0x6(%rsi) je 0x1e272 addq 0x10(%rsi), %rdx cmpq %r12, %rdx ja 0x1e282 incl %ecx jmp 0x1e23e leal (%rax,%rbx), %ecx movq (%rsp), %rax jmp 0x1e1e0 movl (%rsi), %ecx movq 0x8(%rsp), %rax addq 0x18(%rax), %rcx movl %r8d, %edi movq 0x10(%rsp), %r12 movq %r12, %rsi movq 0x18(%rsp), %r14 movq %r14, %rdx callq 0x1d737 testq %rax, %rax jle 0x1e2bf movq %r12, %rdi xorl %esi, %esi movq %r14, %rdx callq 0x7620 movb $0x1, %bpl testq %rax, %rax jne 0x1e2ce xorl %ebp, %ebp movq %r12, %rdi xorl %esi, %esi movq %r14, %rdx callq 0x72f0 movq (%rsp), %rax cmpq %rbx, %rax seta %cl andb %bpl, %cl movl %ecx, %eax addq $0x328, %rsp # imm = 0x328 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq callq 0x7300
_ZN5nglog5toolsL10FindSymbolEmiPcmmPK10Elf64_ShdrS4_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 328h mov [rsp+358h+var_340], rcx mov qword ptr [rsp+358h+var_348], rdx mov r12, rdi mov rdi, [rsp+358h+arg_0] xor ecx, ecx test rdi, rdi jz loc_1E2DB mov r13, r8 mov r8d, esi; unsigned __int64 mov [rsp+358h+var_350], r9 mov rax, [rdi+20h] xor edx, edx div qword ptr [rdi+38h] mov [rsp+358h+var_358], rax loc_1E1E0: mov ebx, ecx mov r14, rax sub r14, rbx jbe loc_1E2D2 mov rcx, [rdi+38h] imul rcx, rbx mov r15, rdi add rcx, [rdi+18h]; unsigned __int64 cmp r14, 20h ; ' ' push 20h ; ' ' pop rax cmovnb r14, rax imul rdx, r14, 18h; void * mov ebp, r8d mov edi, r8d; this lea rsi, [rsp+358h+var_338]; int call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) xor edx, edx push 18h pop rcx div rcx test rdx, rdx jnz loc_1E2EF cmp rax, r14 ja loc_1E2EF xor ecx, ecx mov r8d, ebp; unsigned __int64 mov rdi, r15 loc_1E23E: mov ecx, ecx cmp rax, rcx jbe short loc_1E276 imul rsi, rcx, 18h mov rdx, [rsp+rsi+358h+var_330] test rdx, rdx jz short loc_1E272 add rdx, r13 cmp rdx, r12 ja short loc_1E272 add rsi, rsp add rsi, 20h ; ' ' cmp word ptr [rsi+6], 0 jz short loc_1E272 add rdx, [rsi+10h] cmp rdx, r12 ja short loc_1E282 loc_1E272: inc ecx jmp short loc_1E23E loc_1E276: lea ecx, [rax+rbx] mov rax, [rsp+358h+var_358] jmp loc_1E1E0 loc_1E282: mov ecx, [rsi] mov rax, [rsp+358h+var_350] add rcx, [rax+18h]; unsigned __int64 mov edi, r8d; this mov r12, qword ptr [rsp+358h+var_348] mov rsi, r12; int mov r14, [rsp+358h+var_340] mov rdx, r14; void * call _ZN5nglog5toolsL14ReadFromOffsetEiPvmm; nglog::tools::ReadFromOffset(int,void *,ulong,ulong) test rax, rax jle short loc_1E2BF mov rdi, r12 xor esi, esi mov rdx, r14 call _memchr mov bpl, 1 test rax, rax jnz short loc_1E2CE loc_1E2BF: xor ebp, ebp mov rdi, r12 xor esi, esi mov rdx, r14 call _memset loc_1E2CE: mov rax, [rsp+358h+var_358] loc_1E2D2: cmp rax, rbx setnbe cl and cl, bpl loc_1E2DB: mov eax, ecx add rsp, 328h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_1E2EF: call _abort
long long nglog::tools::FindSymbol( unsigned long long a1, unsigned int a2, long long a3, char *a4, long long a5, long long a6, long long a7) { unsigned int v7; // ebp long long v9; // rdi unsigned int v10; // ecx unsigned long long v13; // rax unsigned long long v14; // rbx unsigned long long v15; // r14 long long v16; // r15 long long v17; // rcx long long v18; // rdi unsigned long long v19; // rax unsigned long long v20; // rtt unsigned int v21; // ecx long long v22; // rdx unsigned long long v23; // rdx int *v24; // rsi unsigned long long v26; // [rsp+0h] [rbp-358h] int v30[206]; // [rsp+20h] [rbp-338h] BYREF v9 = a7; v10 = 0; if ( a7 ) { v13 = *(_QWORD *)(a7 + 32) / *(_QWORD *)(a7 + 56); v26 = v13; LABEL_3: v14 = v10; v15 = v13 - v10; if ( v13 > v10 ) { v16 = v9; v17 = *(_QWORD *)(v9 + 24) + v10 * *(_QWORD *)(v9 + 56); if ( v15 >= 0x20 ) v15 = 32LL; v7 = a2; v18 = a2; v20 = nglog::tools::ReadFromOffset(a2, (long long)v30, (char *)(24 * v15), v17); v19 = v20 / 0x18; if ( v20 % 0x18 || v19 > v15 ) abort(v18); v21 = 0; a2 = v7; v9 = v16; while ( 1 ) { if ( v19 <= v21 ) { v10 = v19 + v14; v13 = v26; goto LABEL_3; } v22 = *(_QWORD *)&v30[6 * v21 + 2]; if ( v22 ) { v23 = a5 + v22; if ( v23 <= a1 ) { v24 = &v30[6 * v21]; if ( *((_WORD *)v24 + 3) ) { if ( *((_QWORD *)v24 + 2) + v23 > a1 ) break; } } } ++v21; } if ( (long long)nglog::tools::ReadFromOffset(v7, a3, a4, *(_QWORD *)(a6 + 24) + (unsigned int)*v24) <= 0 || (LOBYTE(v7) = 1, !memchr(a3, 0LL, a4)) ) { LOBYTE(v7) = 0; memset(a3, 0LL, a4); } v13 = v26; } LOBYTE(v10) = v7 & (v13 > v14); } return v10; }
FindSymbol: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x328 MOV qword ptr [RSP + 0x18],RCX MOV qword ptr [RSP + 0x10],RDX MOV R12,RDI MOV RDI,qword ptr [RSP + 0x360] XOR ECX,ECX TEST RDI,RDI JZ 0x0011e2db MOV R13,R8 MOV R8D,ESI MOV qword ptr [RSP + 0x8],R9 MOV RAX,qword ptr [RDI + 0x20] XOR EDX,EDX DIV qword ptr [RDI + 0x38] MOV qword ptr [RSP],RAX LAB_0011e1e0: MOV EBX,ECX MOV R14,RAX SUB R14,RBX JBE 0x0011e2d2 MOV RCX,qword ptr [RDI + 0x38] IMUL RCX,RBX MOV R15,RDI ADD RCX,qword ptr [RDI + 0x18] CMP R14,0x20 PUSH 0x20 POP RAX CMOVNC R14,RAX IMUL RDX,R14,0x18 MOV EBP,R8D MOV EDI,R8D LEA RSI,[RSP + 0x20] CALL 0x0011d737 XOR EDX,EDX PUSH 0x18 POP RCX DIV RCX TEST RDX,RDX JNZ 0x0011e2ef CMP RAX,R14 JA 0x0011e2ef XOR ECX,ECX MOV R8D,EBP MOV RDI,R15 LAB_0011e23e: MOV ECX,ECX CMP RAX,RCX JBE 0x0011e276 IMUL RSI,RCX,0x18 MOV RDX,qword ptr [RSP + RSI*0x1 + 0x28] TEST RDX,RDX JZ 0x0011e272 ADD RDX,R13 CMP RDX,R12 JA 0x0011e272 ADD RSI,RSP ADD RSI,0x20 CMP word ptr [RSI + 0x6],0x0 JZ 0x0011e272 ADD RDX,qword ptr [RSI + 0x10] CMP RDX,R12 JA 0x0011e282 LAB_0011e272: INC ECX JMP 0x0011e23e LAB_0011e276: LEA ECX,[RAX + RBX*0x1] MOV RAX,qword ptr [RSP] JMP 0x0011e1e0 LAB_0011e282: MOV ECX,dword ptr [RSI] MOV RAX,qword ptr [RSP + 0x8] ADD RCX,qword ptr [RAX + 0x18] MOV EDI,R8D MOV R12,qword ptr [RSP + 0x10] MOV RSI,R12 MOV R14,qword ptr [RSP + 0x18] MOV RDX,R14 CALL 0x0011d737 TEST RAX,RAX JLE 0x0011e2bf MOV RDI,R12 XOR ESI,ESI MOV RDX,R14 CALL 0x00107620 MOV BPL,0x1 TEST RAX,RAX JNZ 0x0011e2ce LAB_0011e2bf: XOR EBP,EBP MOV RDI,R12 XOR ESI,ESI MOV RDX,R14 CALL 0x001072f0 LAB_0011e2ce: MOV RAX,qword ptr [RSP] LAB_0011e2d2: CMP RAX,RBX SETA CL AND CL,BPL LAB_0011e2db: MOV EAX,ECX ADD RSP,0x328 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0011e2ef: CALL 0x00107300
/* nglog::tools::FindSymbol(unsigned long, int, char*, unsigned long, unsigned long, Elf64_Shdr const*, Elf64_Shdr const*) */ ulong nglog::tools::FindSymbol (ulong param_1,int param_2,char *param_3,ulong param_4,ulong param_5, Elf64_Shdr *param_6,Elf64_Shdr *param_7) { int1 auVar1 [16]; ulong uVar2; ulong uVar3; ulong uVar4; long lVar5; void *pvVar6; uint uVar7; ulong uVar8; byte bVar9; int unaff_EBP; ulong uVar10; uint local_338; short local_332; long alStack_330 [96]; uVar8 = 0; if (param_7 != (Elf64_Shdr *)0x0) { uVar2 = param_7->sh_size / param_7->sh_entsize; while( true ) { bVar9 = (byte)unaff_EBP; uVar10 = uVar2 - uVar8; uVar3 = uVar8; if (uVar2 < uVar8 || uVar10 == 0) break; if (0x1f < uVar10) { uVar10 = 0x20; } uVar3 = ReadFromOffset(param_2,&local_338,uVar10 * 0x18, param_7->sh_entsize * uVar8 + param_7->sh_offset); auVar1._8_8_ = 0; auVar1._0_8_ = uVar3; uVar4 = SUB168(auVar1 / ZEXT816(0x18),0); if ((uVar3 % 0x18 != 0) || (uVar10 < uVar4)) { /* WARNING: Subroutine does not return */ abort(); } for (uVar7 = 0; uVar3 = (ulong)uVar7, uVar3 < uVar4; uVar7 = uVar7 + 1) { if ((((alStack_330[uVar3 * 3] != 0) && (uVar10 = alStack_330[uVar3 * 3] + param_5, uVar10 <= param_1)) && ((&local_332)[uVar3 * 0xc] != 0)) && (param_1 < uVar10 + alStack_330[uVar3 * 3 + 1])) { uVar3 = (ulong)(&local_338)[uVar3 * 6] + param_6->sh_offset; lVar5 = ReadFromOffset(param_2,param_3,param_4,uVar3); if (0 < lVar5) { pvVar6 = memchr(param_3,0,param_4); bVar9 = 1; if (pvVar6 != (void *)0x0) goto LAB_0011e2d2; } bVar9 = 0; memset(param_3,0,param_4); goto LAB_0011e2d2; } } uVar8 = (ulong)(uint)(SUB164(auVar1 / ZEXT816(0x18),0) + (int)uVar8); unaff_EBP = param_2; } LAB_0011e2d2: uVar8 = CONCAT71((int7)(uVar3 >> 8),uVar8 < uVar2 & bVar9); } return uVar8 & 0xffffffff; }
7,940
LefDefParser::defiComponentMaskShiftLayer::bumpLayers(int)
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiComponent.cpp
void defiComponentMaskShiftLayer::bumpLayers(int size) { int i; char** newLayers = (char**)malloc(sizeof(char*)* size); for (i = 0; i < numLayers_; i++) { newLayers[i] = layers_[i]; } if (layers_) { free((char*)(layers_)); } layers_ = newLayers; layersAllocated_ = size; }
O0
cpp
LefDefParser::defiComponentMaskShiftLayer::bumpLayers(int): subq $0x28, %rsp movq %rdi, 0x20(%rsp) movl %esi, 0x1c(%rsp) movq 0x20(%rsp), %rax movq %rax, 0x8(%rsp) movslq 0x1c(%rsp), %rdi shlq $0x3, %rdi callq 0x72d0 movq %rax, 0x10(%rsp) movl $0x0, 0x18(%rsp) movq 0x8(%rsp), %rcx movl 0x18(%rsp), %eax cmpl 0x4(%rcx), %eax jge 0x16dcd movq 0x8(%rsp), %rax movq 0x8(%rax), %rax movslq 0x18(%rsp), %rcx movq (%rax,%rcx,8), %rdx movq 0x10(%rsp), %rax movslq 0x18(%rsp), %rcx movq %rdx, (%rax,%rcx,8) movl 0x18(%rsp), %eax addl $0x1, %eax movl %eax, 0x18(%rsp) jmp 0x16d92 movq 0x8(%rsp), %rax cmpq $0x0, 0x8(%rax) je 0x16de7 movq 0x8(%rsp), %rax movq 0x8(%rax), %rdi callq 0x72a0 movq 0x8(%rsp), %rax movq 0x10(%rsp), %rcx movq %rcx, 0x8(%rax) movl 0x1c(%rsp), %ecx movl %ecx, (%rax) addq $0x28, %rsp retq
_ZN12LefDefParser27defiComponentMaskShiftLayer10bumpLayersEi: sub rsp, 28h mov [rsp+28h+var_8], rdi mov [rsp+28h+var_C], esi mov rax, [rsp+28h+var_8] mov [rsp+28h+var_20], rax movsxd rdi, [rsp+28h+var_C] shl rdi, 3 call _malloc mov [rsp+28h+var_18], rax mov [rsp+28h+var_10], 0 loc_16D92: mov rcx, [rsp+28h+var_20] mov eax, [rsp+28h+var_10] cmp eax, [rcx+4] jge short loc_16DCD mov rax, [rsp+28h+var_20] mov rax, [rax+8] movsxd rcx, [rsp+28h+var_10] mov rdx, [rax+rcx*8] mov rax, [rsp+28h+var_18] movsxd rcx, [rsp+28h+var_10] mov [rax+rcx*8], rdx mov eax, [rsp+28h+var_10] add eax, 1 mov [rsp+28h+var_10], eax jmp short loc_16D92 loc_16DCD: mov rax, [rsp+28h+var_20] cmp qword ptr [rax+8], 0 jz short loc_16DE7 mov rax, [rsp+28h+var_20] mov rdi, [rax+8] call _free loc_16DE7: mov rax, [rsp+28h+var_20] mov rcx, [rsp+28h+var_18] mov [rax+8], rcx mov ecx, [rsp+28h+var_C] mov [rax], ecx add rsp, 28h retn
LefDefParser::defiComponentMaskShiftLayer * LefDefParser::defiComponentMaskShiftLayer::bumpLayers( LefDefParser::defiComponentMaskShiftLayer *this, int a2) { LefDefParser::defiComponentMaskShiftLayer *result; // rax long long v3; // [rsp+10h] [rbp-18h] int i; // [rsp+18h] [rbp-10h] v3 = malloc(8LL * a2); for ( i = 0; i < *((_DWORD *)this + 1); ++i ) *(_QWORD *)(v3 + 8LL * i) = *(_QWORD *)(*((_QWORD *)this + 1) + 8LL * i); if ( *((_QWORD *)this + 1) ) free(*((_QWORD *)this + 1)); result = this; *((_QWORD *)this + 1) = v3; *(_DWORD *)this = a2; return result; }
bumpLayers: SUB RSP,0x28 MOV qword ptr [RSP + 0x20],RDI MOV dword ptr [RSP + 0x1c],ESI MOV RAX,qword ptr [RSP + 0x20] MOV qword ptr [RSP + 0x8],RAX MOVSXD RDI,dword ptr [RSP + 0x1c] SHL RDI,0x3 CALL 0x001072d0 MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RSP + 0x18],0x0 LAB_00116d92: MOV RCX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RSP + 0x18] CMP EAX,dword ptr [RCX + 0x4] JGE 0x00116dcd MOV RAX,qword ptr [RSP + 0x8] MOV RAX,qword ptr [RAX + 0x8] MOVSXD RCX,dword ptr [RSP + 0x18] MOV RDX,qword ptr [RAX + RCX*0x8] MOV RAX,qword ptr [RSP + 0x10] MOVSXD RCX,dword ptr [RSP + 0x18] MOV qword ptr [RAX + RCX*0x8],RDX MOV EAX,dword ptr [RSP + 0x18] ADD EAX,0x1 MOV dword ptr [RSP + 0x18],EAX JMP 0x00116d92 LAB_00116dcd: MOV RAX,qword ptr [RSP + 0x8] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00116de7 MOV RAX,qword ptr [RSP + 0x8] MOV RDI,qword ptr [RAX + 0x8] CALL 0x001072a0 LAB_00116de7: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RSP + 0x10] MOV qword ptr [RAX + 0x8],RCX MOV ECX,dword ptr [RSP + 0x1c] MOV dword ptr [RAX],ECX ADD RSP,0x28 RET
/* LefDefParser::defiComponentMaskShiftLayer::bumpLayers(int) */ void __thiscall LefDefParser::defiComponentMaskShiftLayer::bumpLayers(defiComponentMaskShiftLayer *this,int param_1) { void *pvVar1; int local_10; pvVar1 = malloc((long)param_1 << 3); for (local_10 = 0; local_10 < *(int *)(this + 4); local_10 = local_10 + 1) { *(int8 *)((long)pvVar1 + (long)local_10 * 8) = *(int8 *)(*(long *)(this + 8) + (long)local_10 * 8); } if (*(long *)(this + 8) != 0) { free(*(void **)(this + 8)); } *(void **)(this + 8) = pvVar1; *(int *)this = param_1; return; }
7,941
my_convert_fix
eloqsql/strings/ctype.c
size_t my_convert_fix(CHARSET_INFO *to_cs, char *to, size_t to_length, CHARSET_INFO *from_cs, const char *from, size_t from_length, size_t nchars, MY_STRCOPY_STATUS *copy_status, MY_STRCONV_STATUS *conv_status) { int cnvres; my_wc_t wc; my_charset_conv_mb_wc mb_wc= from_cs->cset->mb_wc; my_charset_conv_wc_mb wc_mb= to_cs->cset->wc_mb; const uchar *from_end= (const uchar*) from + from_length; uchar *to_end= (uchar*) to + to_length; char *to_start= to; DBUG_ASSERT(to_cs != &my_charset_bin); DBUG_ASSERT(from_cs != &my_charset_bin); copy_status->m_well_formed_error_pos= NULL; conv_status->m_cannot_convert_error_pos= NULL; for ( ; nchars; nchars--) { const char *from_prev= from; if ((cnvres= (*mb_wc)(from_cs, &wc, (uchar*) from, from_end)) > 0) from+= cnvres; else if (cnvres == MY_CS_ILSEQ) { if (!copy_status->m_well_formed_error_pos) copy_status->m_well_formed_error_pos= from; from++; wc= '?'; } else if (cnvres > MY_CS_TOOSMALL) { /* A correct multibyte sequence detected But it doesn't have Unicode mapping. */ if (!conv_status->m_cannot_convert_error_pos) conv_status->m_cannot_convert_error_pos= from; from+= (-cnvres); wc= '?'; } else { if ((uchar *) from >= from_end) break; // End of line // Incomplete byte sequence if (!copy_status->m_well_formed_error_pos) copy_status->m_well_formed_error_pos= from; from++; wc= '?'; } outp: if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0) to+= cnvres; else if (cnvres == MY_CS_ILUNI && wc != '?') { if (!conv_status->m_cannot_convert_error_pos) conv_status->m_cannot_convert_error_pos= from_prev; wc= '?'; goto outp; } else { from= from_prev; break; } } copy_status->m_source_end_pos= from; return to - to_start; }
O0
c
my_convert_fix: pushq %rbp movq %rsp, %rbp subq $0x70, %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 -0x20(%rbp), %rax movq 0xb8(%rax), %rax movq 0x28(%rax), %rax movq %rax, -0x48(%rbp) movq -0x8(%rbp), %rax movq 0xb8(%rax), %rax movq 0x30(%rax), %rax movq %rax, -0x50(%rbp) movq -0x28(%rbp), %rax addq -0x30(%rbp), %rax movq %rax, -0x58(%rbp) movq -0x10(%rbp), %rax addq -0x18(%rbp), %rax movq %rax, -0x60(%rbp) movq -0x10(%rbp), %rax movq %rax, -0x68(%rbp) jmp 0x7f784 jmp 0x7f786 jmp 0x7f788 movq 0x18(%rbp), %rax movq $0x0, 0x8(%rax) movq 0x20(%rbp), %rax movq $0x0, (%rax) cmpq $0x0, 0x10(%rbp) je 0x7f90b movq -0x28(%rbp), %rax movq %rax, -0x70(%rbp) movq -0x48(%rbp), %rax movq -0x20(%rbp), %rdi movq -0x28(%rbp), %rdx movq -0x58(%rbp), %rcx leaq -0x40(%rbp), %rsi callq *%rax movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0x7f7e6 movl -0x34(%rbp), %ecx movq -0x28(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x28(%rbp) jmp 0x7f88f cmpl $0x0, -0x34(%rbp) jne 0x7f819 movq 0x18(%rbp), %rax cmpq $0x0, 0x8(%rax) jne 0x7f803 movq -0x28(%rbp), %rcx movq 0x18(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq $0x3f, -0x40(%rbp) jmp 0x7f88d cmpl $-0x65, -0x34(%rbp) jle 0x7f851 movq 0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0x7f834 movq -0x28(%rbp), %rcx movq 0x20(%rbp), %rax movq %rcx, (%rax) 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 0x7f88b movq -0x28(%rbp), %rax cmpq -0x58(%rbp), %rax jb 0x7f860 jmp 0x7f90b movq 0x18(%rbp), %rax cmpq $0x0, 0x8(%rax) jne 0x7f877 movq -0x28(%rbp), %rcx movq 0x18(%rbp), %rax movq %rcx, 0x8(%rax) movq -0x28(%rbp), %rax addq $0x1, %rax movq %rax, -0x28(%rbp) movq $0x3f, -0x40(%rbp) jmp 0x7f88d jmp 0x7f88f jmp 0x7f891 movq -0x50(%rbp), %rax movq -0x8(%rbp), %rdi movq -0x40(%rbp), %rsi movq -0x10(%rbp), %rdx movq -0x60(%rbp), %rcx callq *%rax movl %eax, -0x34(%rbp) cmpl $0x0, %eax jle 0x7f8c2 movl -0x34(%rbp), %ecx movq -0x10(%rbp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, -0x10(%rbp) jmp 0x7f8f8 cmpl $0x0, -0x34(%rbp) jne 0x7f8ee cmpq $0x3f, -0x40(%rbp) je 0x7f8ee movq 0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0x7f8e4 movq -0x70(%rbp), %rcx movq 0x20(%rbp), %rax movq %rcx, (%rax) movq $0x3f, -0x40(%rbp) jmp 0x7f891 movq -0x70(%rbp), %rax movq %rax, -0x28(%rbp) jmp 0x7f90b jmp 0x7f8fa movq 0x10(%rbp), %rax addq $-0x1, %rax movq %rax, 0x10(%rbp) jmp 0x7f79f movq -0x28(%rbp), %rcx movq 0x18(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rax movq -0x68(%rbp), %rcx subq %rcx, %rax addq $0x70, %rsp popq %rbp retq nopw (%rax,%rax)
my_convert_fix: push rbp mov rbp, rsp sub rsp, 70h 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_20] mov rax, [rax+0B8h] mov rax, [rax+28h] mov [rbp+var_48], rax mov rax, [rbp+var_8] mov rax, [rax+0B8h] mov rax, [rax+30h] mov [rbp+var_50], rax mov rax, [rbp+var_28] add rax, [rbp+var_30] mov [rbp+var_58], rax mov rax, [rbp+var_10] add rax, [rbp+var_18] mov [rbp+var_60], rax mov rax, [rbp+var_10] mov [rbp+var_68], rax jmp short $+2 loc_7F784: jmp short $+2 loc_7F786: jmp short $+2 loc_7F788: mov rax, [rbp+arg_8] mov qword ptr [rax+8], 0 mov rax, [rbp+arg_10] mov qword ptr [rax], 0 loc_7F79F: cmp [rbp+arg_0], 0 jz loc_7F90B mov rax, [rbp+var_28] mov [rbp+var_70], rax mov rax, [rbp+var_48] mov rdi, [rbp+var_20] mov rdx, [rbp+var_28] mov rcx, [rbp+var_58] lea rsi, [rbp+var_40] call rax mov [rbp+var_34], eax cmp eax, 0 jle short loc_7F7E6 mov ecx, [rbp+var_34] mov rax, [rbp+var_28] movsxd rcx, ecx add rax, rcx mov [rbp+var_28], rax jmp loc_7F88F loc_7F7E6: cmp [rbp+var_34], 0 jnz short loc_7F819 mov rax, [rbp+arg_8] cmp qword ptr [rax+8], 0 jnz short loc_7F803 mov rcx, [rbp+var_28] mov rax, [rbp+arg_8] mov [rax+8], rcx loc_7F803: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov [rbp+var_40], 3Fh ; '?' jmp short loc_7F88D loc_7F819: cmp [rbp+var_34], 0FFFFFF9Bh jle short loc_7F851 mov rax, [rbp+arg_10] cmp qword ptr [rax], 0 jnz short loc_7F834 mov rcx, [rbp+var_28] mov rax, [rbp+arg_10] mov [rax], rcx loc_7F834: 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_7F88B loc_7F851: mov rax, [rbp+var_28] cmp rax, [rbp+var_58] jb short loc_7F860 jmp loc_7F90B loc_7F860: mov rax, [rbp+arg_8] cmp qword ptr [rax+8], 0 jnz short loc_7F877 mov rcx, [rbp+var_28] mov rax, [rbp+arg_8] mov [rax+8], rcx loc_7F877: mov rax, [rbp+var_28] add rax, 1 mov [rbp+var_28], rax mov [rbp+var_40], 3Fh ; '?' loc_7F88B: jmp short $+2 loc_7F88D: jmp short $+2 loc_7F88F: jmp short $+2 loc_7F891: mov rax, [rbp+var_50] mov rdi, [rbp+var_8] mov rsi, [rbp+var_40] mov rdx, [rbp+var_10] mov rcx, [rbp+var_60] call rax mov [rbp+var_34], eax cmp eax, 0 jle short loc_7F8C2 mov ecx, [rbp+var_34] mov rax, [rbp+var_10] movsxd rcx, ecx add rax, rcx mov [rbp+var_10], rax jmp short loc_7F8F8 loc_7F8C2: cmp [rbp+var_34], 0 jnz short loc_7F8EE cmp [rbp+var_40], 3Fh ; '?' jz short loc_7F8EE mov rax, [rbp+arg_10] cmp qword ptr [rax], 0 jnz short loc_7F8E4 mov rcx, [rbp+var_70] mov rax, [rbp+arg_10] mov [rax], rcx loc_7F8E4: mov [rbp+var_40], 3Fh ; '?' jmp short loc_7F891 loc_7F8EE: mov rax, [rbp+var_70] mov [rbp+var_28], rax jmp short loc_7F90B loc_7F8F8: jmp short $+2 loc_7F8FA: mov rax, [rbp+arg_0] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+arg_0], rax jmp loc_7F79F loc_7F90B: mov rcx, [rbp+var_28] mov rax, [rbp+arg_8] mov [rax], rcx mov rax, [rbp+var_10] mov rcx, [rbp+var_68] sub rax, rcx add rsp, 70h pop rbp retn
long long my_convert_fix( long long a1, long long a2, long long a3, long long a4, unsigned long long a5, long long a6, long long a7, unsigned long long *a8, unsigned long long *a9) { unsigned long long v10; // [rsp+0h] [rbp-70h] long long v11; // [rsp+10h] [rbp-60h] unsigned long long v12; // [rsp+18h] [rbp-58h] long long ( *v13)(long long, long long, long long, long long); // [rsp+20h] [rbp-50h] long long ( *v14)(long long, long long *, unsigned long long, unsigned long long); // [rsp+28h] [rbp-48h] long long i; // [rsp+30h] [rbp-40h] BYREF int v16; // [rsp+3Ch] [rbp-34h] long long v17; // [rsp+40h] [rbp-30h] unsigned long long v18; // [rsp+48h] [rbp-28h] long long v19; // [rsp+50h] [rbp-20h] long long v20; // [rsp+58h] [rbp-18h] long long v21; // [rsp+60h] [rbp-10h] long long v22; // [rsp+68h] [rbp-8h] v22 = a1; v21 = a2; v20 = a3; v19 = a4; v18 = a5; v17 = a6; v14 = *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a4 + 184) + 40LL); v13 = *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL); v12 = a6 + a5; v11 = a3 + a2; a8[1] = 0LL; *a9 = 0LL; LABEL_2: if ( a7 ) { v10 = v18; v16 = v14(v19, &i, v18, v12); if ( v16 > 0 ) { v18 += v16; goto LABEL_17; } if ( !v16 ) { if ( !a8[1] ) a8[1] = v18; ++v18; i = 63LL; goto LABEL_17; } if ( v16 > -101 ) { if ( !*a9 ) *a9 = v18; v18 += -v16; i = 63LL; goto LABEL_17; } if ( v18 < v12 ) { if ( !a8[1] ) a8[1] = v18; ++v18; for ( i = 63LL; ; i = 63LL ) { LABEL_17: v16 = v13(v22, i, v21, v11); if ( v16 > 0 ) { v21 += v16; --a7; goto LABEL_2; } if ( v16 || i == 63 ) break; if ( !*a9 ) *a9 = v10; } v18 = v10; } } *a8 = v18; return v21 - a2; }
my_convert_fix: PUSH RBP MOV RBP,RSP SUB RSP,0x70 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 + -0x20] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x48],RAX MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x50],RAX MOV RAX,qword ptr [RBP + -0x28] ADD RAX,qword ptr [RBP + -0x30] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [RBP + -0x10] ADD RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x60],RAX MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RBP + -0x68],RAX JMP 0x0017f784 LAB_0017f784: JMP 0x0017f786 LAB_0017f786: JMP 0x0017f788 LAB_0017f788: MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RAX + 0x8],0x0 MOV RAX,qword ptr [RBP + 0x20] MOV qword ptr [RAX],0x0 LAB_0017f79f: CMP qword ptr [RBP + 0x10],0x0 JZ 0x0017f90b MOV RAX,qword ptr [RBP + -0x28] MOV qword ptr [RBP + -0x70],RAX MOV RAX,qword ptr [RBP + -0x48] MOV RDI,qword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x58] LEA RSI,[RBP + -0x40] CALL RAX MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x0017f7e6 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 0x0017f88f LAB_0017f7e6: CMP dword ptr [RBP + -0x34],0x0 JNZ 0x0017f819 MOV RAX,qword ptr [RBP + 0x18] CMP qword ptr [RAX + 0x8],0x0 JNZ 0x0017f803 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RAX + 0x8],RCX LAB_0017f803: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x40],0x3f JMP 0x0017f88d LAB_0017f819: CMP dword ptr [RBP + -0x34],-0x65 JLE 0x0017f851 MOV RAX,qword ptr [RBP + 0x20] CMP qword ptr [RAX],0x0 JNZ 0x0017f834 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + 0x20] MOV qword ptr [RAX],RCX LAB_0017f834: 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 0x0017f88b LAB_0017f851: MOV RAX,qword ptr [RBP + -0x28] CMP RAX,qword ptr [RBP + -0x58] JC 0x0017f860 JMP 0x0017f90b LAB_0017f860: MOV RAX,qword ptr [RBP + 0x18] CMP qword ptr [RAX + 0x8],0x0 JNZ 0x0017f877 MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RAX + 0x8],RCX LAB_0017f877: MOV RAX,qword ptr [RBP + -0x28] ADD RAX,0x1 MOV qword ptr [RBP + -0x28],RAX MOV qword ptr [RBP + -0x40],0x3f LAB_0017f88b: JMP 0x0017f88d LAB_0017f88d: JMP 0x0017f88f LAB_0017f88f: JMP 0x0017f891 LAB_0017f891: MOV RAX,qword ptr [RBP + -0x50] MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x40] MOV RDX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x60] CALL RAX MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JLE 0x0017f8c2 MOV ECX,dword ptr [RBP + -0x34] MOV RAX,qword ptr [RBP + -0x10] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RBP + -0x10],RAX JMP 0x0017f8f8 LAB_0017f8c2: CMP dword ptr [RBP + -0x34],0x0 JNZ 0x0017f8ee CMP qword ptr [RBP + -0x40],0x3f JZ 0x0017f8ee MOV RAX,qword ptr [RBP + 0x20] CMP qword ptr [RAX],0x0 JNZ 0x0017f8e4 MOV RCX,qword ptr [RBP + -0x70] MOV RAX,qword ptr [RBP + 0x20] MOV qword ptr [RAX],RCX LAB_0017f8e4: MOV qword ptr [RBP + -0x40],0x3f JMP 0x0017f891 LAB_0017f8ee: MOV RAX,qword ptr [RBP + -0x70] MOV qword ptr [RBP + -0x28],RAX JMP 0x0017f90b LAB_0017f8f8: JMP 0x0017f8fa LAB_0017f8fa: MOV RAX,qword ptr [RBP + 0x10] ADD RAX,-0x1 MOV qword ptr [RBP + 0x10],RAX JMP 0x0017f79f LAB_0017f90b: MOV RCX,qword ptr [RBP + -0x28] MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RAX],RCX MOV RAX,qword ptr [RBP + -0x10] MOV RCX,qword ptr [RBP + -0x68] SUB RAX,RCX ADD RSP,0x70 POP RBP RET
long my_convert_fix(long param_1,long param_2,long param_3,long param_4,ulong param_5,long param_6, long param_7,ulong *param_8,ulong *param_9) { code *pcVar1; code *pcVar2; ulong uVar3; ulong uVar4; long local_48; int local_3c; long local_38; ulong local_30; long local_28; long local_20; long local_18; long local_10; pcVar1 = *(code **)(*(long *)(param_4 + 0xb8) + 0x28); pcVar2 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30); param_8[1] = 0; *param_9 = 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; for (; uVar3 = local_30, uVar4 = uVar3, param_7 != 0; param_7 = param_7 + -1) { local_3c = (*pcVar1)(local_28,&local_48,local_30); if (local_3c < 1) { if (local_3c == 0) { if (param_8[1] == 0) { param_8[1] = local_30; } local_30 = local_30 + 1; } else if (local_3c < -100) { uVar4 = local_30; if (param_5 + param_6 <= local_30) break; if (param_8[1] == 0) { param_8[1] = local_30; } local_30 = local_30 + 1; } else { if (*param_9 == 0) { *param_9 = local_30; } local_30 = local_30 + (long)-local_3c; } local_48 = 0x3f; } else { local_30 = local_30 + (long)local_3c; } while (local_3c = (*pcVar2)(local_10,local_48,local_18,param_2 + param_3), local_3c < 1) { uVar4 = uVar3; if ((local_3c != 0) || (local_48 == 0x3f)) goto LAB_0017f90b; if (*param_9 == 0) { *param_9 = uVar3; } local_48 = 0x3f; local_3c = 0; } local_18 = local_18 + local_3c; } LAB_0017f90b: local_30 = uVar4; *param_8 = local_30; return local_18 - param_2; }
7,942
my_convert_fix
eloqsql/strings/ctype.c
size_t my_convert_fix(CHARSET_INFO *to_cs, char *to, size_t to_length, CHARSET_INFO *from_cs, const char *from, size_t from_length, size_t nchars, MY_STRCOPY_STATUS *copy_status, MY_STRCONV_STATUS *conv_status) { int cnvres; my_wc_t wc; my_charset_conv_mb_wc mb_wc= from_cs->cset->mb_wc; my_charset_conv_wc_mb wc_mb= to_cs->cset->wc_mb; const uchar *from_end= (const uchar*) from + from_length; uchar *to_end= (uchar*) to + to_length; char *to_start= to; DBUG_ASSERT(to_cs != &my_charset_bin); DBUG_ASSERT(from_cs != &my_charset_bin); copy_status->m_well_formed_error_pos= NULL; conv_status->m_cannot_convert_error_pos= NULL; for ( ; nchars; nchars--) { const char *from_prev= from; if ((cnvres= (*mb_wc)(from_cs, &wc, (uchar*) from, from_end)) > 0) from+= cnvres; else if (cnvres == MY_CS_ILSEQ) { if (!copy_status->m_well_formed_error_pos) copy_status->m_well_formed_error_pos= from; from++; wc= '?'; } else if (cnvres > MY_CS_TOOSMALL) { /* A correct multibyte sequence detected But it doesn't have Unicode mapping. */ if (!conv_status->m_cannot_convert_error_pos) conv_status->m_cannot_convert_error_pos= from; from+= (-cnvres); wc= '?'; } else { if ((uchar *) from >= from_end) break; // End of line // Incomplete byte sequence if (!copy_status->m_well_formed_error_pos) copy_status->m_well_formed_error_pos= from; from++; wc= '?'; } outp: if ((cnvres= (*wc_mb)(to_cs, wc, (uchar*) to, to_end)) > 0) to+= cnvres; else if (cnvres == MY_CS_ILUNI && wc != '?') { if (!conv_status->m_cannot_convert_error_pos) conv_status->m_cannot_convert_error_pos= from_prev; wc= '?'; goto outp; } else { from= from_prev; break; } } copy_status->m_source_end_pos= from; return to - to_start; }
O3
c
my_convert_fix: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x38, %rsp movq %r8, %r14 movq %rdx, %r12 movq %rdi, %r13 movq 0x20(%rbp), %rdi movq 0x18(%rbp), %rdx movq 0x10(%rbp), %r8 movq %rcx, -0x60(%rbp) movq 0xb8(%rcx), %rax movq 0x28(%rax), %rax movq %rax, -0x58(%rbp) movq 0xb8(%r13), %rax movq 0x30(%rax), %rax movq %rax, -0x40(%rbp) xorl %eax, %eax movq %rax, 0x8(%rdx) movq %rax, (%rdi) testq %r8, %r8 movq %rsi, -0x48(%rbp) je 0x5c91b movq %r8, -0x50(%rbp) addq %r14, %r9 movq %r9, -0x38(%rbp) addq %rsi, %r12 movq %rsi, %rbx movq -0x60(%rbp), %rdi leaq -0x30(%rbp), %rsi movq %r14, %rdx movq -0x38(%rbp), %rcx callq *-0x58(%rbp) movl %eax, %r15d testl %eax, %eax jle 0x5c893 movl %r15d, %r15d addq %r14, %r15 movq -0x30(%rbp), %rsi jmp 0x5c8cb je 0x5c8b6 cmpl $-0x64, %r15d jb 0x5c8b0 movq 0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0x5c8a8 movq %r14, (%rax) negl %r15d addq %r14, %r15 jmp 0x5c8f3 cmpq -0x38(%rbp), %r14 jae 0x5c916 movq 0x18(%rbp), %rax cmpq $0x0, 0x8(%rax) jne 0x5c8c5 movq %r14, 0x8(%rax) leaq 0x1(%r14), %r15 jmp 0x5c8f3 movq %r13, %rdi movq %rbx, %rdx movq %r12, %rcx callq *-0x40(%rbp) testl %eax, %eax jg 0x5c902 testl %eax, %eax jne 0x5c916 cmpq $0x3f, -0x30(%rbp) je 0x5c916 movq 0x20(%rbp), %rax cmpq $0x0, (%rax) jne 0x5c8f3 movq %r14, (%rax) movq $0x3f, -0x30(%rbp) movl $0x3f, %esi jmp 0x5c8cb movl %eax, %eax addq %rax, %rbx movq %r15, %r14 decq -0x50(%rbp) jne 0x5c86e jmp 0x5c921 movq %r14, %r15 jmp 0x5c921 movq %r14, %r15 movq %rsi, %rbx movq 0x18(%rbp), %rax movq %r15, (%rax) subq -0x48(%rbp), %rbx movq %rbx, %rax addq $0x38, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
my_convert_fix: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 38h mov r14, r8 mov r12, rdx mov r13, rdi mov rdi, [rbp+arg_10] mov rdx, [rbp+arg_8] mov r8, [rbp+arg_0] mov [rbp+var_60], rcx mov rax, [rcx+0B8h] mov rax, [rax+28h] mov [rbp+var_58], rax mov rax, [r13+0B8h] mov rax, [rax+30h] mov [rbp+var_40], rax xor eax, eax mov [rdx+8], rax mov [rdi], rax test r8, r8 mov [rbp+var_48], rsi jz loc_5C91B mov [rbp+var_50], r8 add r9, r14 mov [rbp+var_38], r9 add r12, rsi mov rbx, rsi loc_5C86E: mov rdi, [rbp+var_60] lea rsi, [rbp+var_30] mov rdx, r14 mov rcx, [rbp+var_38] call [rbp+var_58] mov r15d, eax test eax, eax jle short loc_5C893 mov r15d, r15d add r15, r14 mov rsi, [rbp+var_30] jmp short loc_5C8CB loc_5C893: jz short loc_5C8B6 cmp r15d, 0FFFFFF9Ch jb short loc_5C8B0 mov rax, [rbp+arg_10] cmp qword ptr [rax], 0 jnz short loc_5C8A8 mov [rax], r14 loc_5C8A8: neg r15d add r15, r14 jmp short loc_5C8F3 loc_5C8B0: cmp r14, [rbp+var_38] jnb short loc_5C916 loc_5C8B6: mov rax, [rbp+arg_8] cmp qword ptr [rax+8], 0 jnz short loc_5C8C5 mov [rax+8], r14 loc_5C8C5: lea r15, [r14+1] jmp short loc_5C8F3 loc_5C8CB: mov rdi, r13 mov rdx, rbx mov rcx, r12 call [rbp+var_40] test eax, eax jg short loc_5C902 test eax, eax jnz short loc_5C916 cmp [rbp+var_30], 3Fh ; '?' jz short loc_5C916 mov rax, [rbp+arg_10] cmp qword ptr [rax], 0 jnz short loc_5C8F3 mov [rax], r14 loc_5C8F3: mov [rbp+var_30], 3Fh ; '?' mov esi, 3Fh ; '?' jmp short loc_5C8CB loc_5C902: mov eax, eax add rbx, rax mov r14, r15 dec [rbp+var_50] jnz loc_5C86E jmp short loc_5C921 loc_5C916: mov r15, r14 jmp short loc_5C921 loc_5C91B: mov r15, r14 mov rbx, rsi loc_5C921: mov rax, [rbp+arg_8] mov [rax], r15 sub rbx, [rbp+var_48] mov rax, rbx add rsp, 38h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long my_convert_fix( long long a1, long long a2, long long a3, long long a4, unsigned long long a5, long long a6, long long a7, unsigned long long *a8, unsigned long long *a9) { unsigned long long v9; // r14 long long v10; // r12 long long v11; // rbx int v12; // eax unsigned long long v13; // r15 long long v14; // rsi int v15; // eax long long ( *v18)(long long, long long *, unsigned long long, unsigned long long); // [rsp+8h] [rbp-58h] long long v19; // [rsp+10h] [rbp-50h] long long ( *v21)(long long, long long, long long, long long); // [rsp+20h] [rbp-40h] unsigned long long v22; // [rsp+28h] [rbp-38h] long long v23[6]; // [rsp+30h] [rbp-30h] BYREF v9 = a5; v18 = *(long long ( **)(long long, long long *, unsigned long long, unsigned long long))(*(_QWORD *)(a4 + 184) + 40LL); v21 = *(long long ( **)(long long, long long, long long, long long))(*(_QWORD *)(a1 + 184) + 48LL); a8[1] = 0LL; *a9 = 0LL; if ( a7 ) { v19 = a7; v22 = a5 + a6; v10 = a2 + a3; v11 = a2; while ( 1 ) { v12 = v18(a4, v23, v9, v22); if ( v12 > 0 ) { v13 = v9 + (unsigned int)v12; v14 = v23[0]; goto LABEL_14; } if ( !v12 ) goto LABEL_11; if ( (unsigned int)v12 < 0xFFFFFF9C ) break; if ( !*a9 ) *a9 = v9; v13 = v9 + (unsigned int)-v12; LABEL_19: while ( 1 ) { v23[0] = 63LL; v14 = 63LL; LABEL_14: v15 = v21(a1, v14, v11, v10); if ( v15 > 0 ) break; if ( v15 || v23[0] == 63 ) goto LABEL_22; if ( !*a9 ) *a9 = v9; } v11 += (unsigned int)v15; v9 = v13; if ( !--v19 ) goto LABEL_24; } if ( v9 < v22 ) { LABEL_11: if ( !a8[1] ) a8[1] = v9; v13 = v9 + 1; goto LABEL_19; } LABEL_22: v13 = v9; } else { v13 = a5; v11 = a2; } LABEL_24: *a8 = v13; return v11 - a2; }
my_convert_fix: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x38 MOV R14,R8 MOV R12,RDX MOV R13,RDI MOV RDI,qword ptr [RBP + 0x20] MOV RDX,qword ptr [RBP + 0x18] MOV R8,qword ptr [RBP + 0x10] MOV qword ptr [RBP + -0x60],RCX MOV RAX,qword ptr [RCX + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RBP + -0x58],RAX MOV RAX,qword ptr [R13 + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RBP + -0x40],RAX XOR EAX,EAX MOV qword ptr [RDX + 0x8],RAX MOV qword ptr [RDI],RAX TEST R8,R8 MOV qword ptr [RBP + -0x48],RSI JZ 0x0015c91b MOV qword ptr [RBP + -0x50],R8 ADD R9,R14 MOV qword ptr [RBP + -0x38],R9 ADD R12,RSI MOV RBX,RSI LAB_0015c86e: MOV RDI,qword ptr [RBP + -0x60] LEA RSI,[RBP + -0x30] MOV RDX,R14 MOV RCX,qword ptr [RBP + -0x38] CALL qword ptr [RBP + -0x58] MOV R15D,EAX TEST EAX,EAX JLE 0x0015c893 MOV R15D,R15D ADD R15,R14 MOV RSI,qword ptr [RBP + -0x30] JMP 0x0015c8cb LAB_0015c893: JZ 0x0015c8b6 CMP R15D,-0x64 JC 0x0015c8b0 MOV RAX,qword ptr [RBP + 0x20] CMP qword ptr [RAX],0x0 JNZ 0x0015c8a8 MOV qword ptr [RAX],R14 LAB_0015c8a8: NEG R15D ADD R15,R14 JMP 0x0015c8f3 LAB_0015c8b0: CMP R14,qword ptr [RBP + -0x38] JNC 0x0015c916 LAB_0015c8b6: MOV RAX,qword ptr [RBP + 0x18] CMP qword ptr [RAX + 0x8],0x0 JNZ 0x0015c8c5 MOV qword ptr [RAX + 0x8],R14 LAB_0015c8c5: LEA R15,[R14 + 0x1] JMP 0x0015c8f3 LAB_0015c8cb: MOV RDI,R13 MOV RDX,RBX MOV RCX,R12 CALL qword ptr [RBP + -0x40] TEST EAX,EAX JG 0x0015c902 TEST EAX,EAX JNZ 0x0015c916 CMP qword ptr [RBP + -0x30],0x3f JZ 0x0015c916 MOV RAX,qword ptr [RBP + 0x20] CMP qword ptr [RAX],0x0 JNZ 0x0015c8f3 MOV qword ptr [RAX],R14 LAB_0015c8f3: MOV qword ptr [RBP + -0x30],0x3f MOV ESI,0x3f JMP 0x0015c8cb LAB_0015c902: MOV EAX,EAX ADD RBX,RAX MOV R14,R15 DEC qword ptr [RBP + -0x50] JNZ 0x0015c86e JMP 0x0015c921 LAB_0015c916: MOV R15,R14 JMP 0x0015c921 LAB_0015c91b: MOV R15,R14 MOV RBX,RSI LAB_0015c921: MOV RAX,qword ptr [RBP + 0x18] MOV qword ptr [RAX],R15 SUB RBX,qword ptr [RBP + -0x48] MOV RAX,RBX ADD RSP,0x38 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long my_convert_fix(long param_1,long param_2,long param_3,long param_4,ulong param_5,long param_6, long param_7,ulong *param_8,ulong *param_9) { code *pcVar1; code *pcVar2; uint uVar3; long lVar4; ulong uVar5; ulong uVar6; long local_58; long local_38; pcVar1 = *(code **)(*(long *)(param_4 + 0xb8) + 0x28); pcVar2 = *(code **)(*(long *)(param_1 + 0xb8) + 0x30); param_8[1] = 0; *param_9 = 0; lVar4 = param_2; uVar5 = param_5; if (param_7 != 0) { local_58 = param_7; while( true ) { uVar3 = (*pcVar1)(param_4,&local_38,uVar5,param_6 + param_5); if ((int)uVar3 < 1) break; uVar6 = uVar3 + uVar5; while (uVar3 = (*pcVar2)(param_1,local_38,lVar4,param_3 + param_2), (int)uVar3 < 1) { if ((uVar3 != 0) || (local_38 == 0x3f)) goto LAB_0015c921; if (*param_9 == 0) { *param_9 = uVar5; } LAB_0015c8f3: local_38 = 0x3f; } lVar4 = lVar4 + (ulong)uVar3; local_58 = local_58 + -1; uVar5 = uVar6; if (local_58 == 0) goto LAB_0015c921; } if (uVar3 != 0) { if (0xffffff9b < uVar3) { if (*param_9 == 0) { *param_9 = uVar5; } uVar6 = -uVar3 + uVar5; goto LAB_0015c8f3; } if (param_6 + param_5 <= uVar5) goto LAB_0015c921; } if (param_8[1] == 0) { param_8[1] = uVar5; } uVar6 = uVar5 + 1; goto LAB_0015c8f3; } LAB_0015c921: *param_8 = uVar5; return lVar4 - param_2; }
7,943
ggml_ssm_conv
ngxson[P]ggml-easy/ggml/src/ggml.c
struct ggml_tensor * ggml_ssm_conv( struct ggml_context * ctx, struct ggml_tensor * sx, struct ggml_tensor * c) { GGML_ASSERT(ggml_is_3d(sx)); GGML_ASSERT(ggml_is_matrix(c)); const int64_t d_conv = c->ne[0]; const int64_t d_inner = c->ne[1]; const int64_t n_t = sx->ne[0] - d_conv + 1; // tokens per sequence const int64_t n_s = sx->ne[2]; // TODO: maybe support other strides than 1? // FIXME: this is always true? GGML_ASSERT(sx->ne[0] == d_conv - 1 + n_t); GGML_ASSERT(sx->ne[1] == d_inner); GGML_ASSERT(n_t >= 0); struct ggml_tensor * result = ggml_new_tensor_3d(ctx, GGML_TYPE_F32, d_inner, n_t, n_s); result->op = GGML_OP_SSM_CONV; result->src[0] = sx; result->src[1] = c; return result; }
O0
c
ggml_ssm_conv: subq $0x48, %rsp movq %rdi, 0x40(%rsp) movq %rsi, 0x38(%rsp) movq %rdx, 0x30(%rsp) movq 0x38(%rsp), %rdi callq 0x42e20 testb $0x1, %al jne 0x51fb2 leaq 0x6261f(%rip), %rdi # 0xb45b7 movl $0x11b5, %esi # imm = 0x11B5 leaq 0x6265e(%rip), %rdx # 0xb4602 leaq 0x62fad(%rip), %rcx # 0xb4f58 movb $0x0, %al callq 0x46780 movq 0x30(%rsp), %rdi callq 0x43a50 testb $0x1, %al jne 0x51fe1 leaq 0x625f0(%rip), %rdi # 0xb45b7 movl $0x11b6, %esi # imm = 0x11B6 leaq 0x6262f(%rip), %rdx # 0xb4602 leaq 0x62f8d(%rip), %rcx # 0xb4f67 movb $0x0, %al callq 0x46780 movq 0x30(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x28(%rsp) movq 0x30(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x20(%rsp) movq 0x38(%rsp), %rax movq 0x10(%rax), %rax subq 0x28(%rsp), %rax addq $0x1, %rax movq %rax, 0x18(%rsp) movq 0x38(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x10(%rsp) movq 0x38(%rsp), %rax movq 0x10(%rax), %rax movq 0x28(%rsp), %rcx subq $0x1, %rcx addq 0x18(%rsp), %rcx cmpq %rcx, %rax je 0x5205f leaq 0x62572(%rip), %rdi # 0xb45b7 movl $0x11bf, %esi # imm = 0x11BF leaq 0x625b1(%rip), %rdx # 0xb4602 leaq 0x62f21(%rip), %rcx # 0xb4f79 movb $0x0, %al callq 0x46780 movq 0x38(%rsp), %rax movq 0x18(%rax), %rax cmpq 0x20(%rsp), %rax je 0x52090 leaq 0x62541(%rip), %rdi # 0xb45b7 movl $0x11c0, %esi # imm = 0x11C0 leaq 0x62580(%rip), %rdx # 0xb4602 leaq 0x62f0e(%rip), %rcx # 0xb4f97 movb $0x0, %al callq 0x46780 cmpq $0x0, 0x18(%rsp) jge 0x520b9 leaq 0x62518(%rip), %rdi # 0xb45b7 movl $0x11c1, %esi # imm = 0x11C1 leaq 0x62557(%rip), %rdx # 0xb4602 leaq 0x62efa(%rip), %rcx # 0xb4fac movb $0x0, %al callq 0x46780 movq 0x40(%rsp), %rdi movq 0x20(%rsp), %rdx movq 0x18(%rsp), %rcx movq 0x10(%rsp), %r8 xorl %esi, %esi callq 0x444d0 movq %rax, 0x8(%rsp) movq 0x8(%rsp), %rax movl $0x41, 0x50(%rax) movq 0x38(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, 0x98(%rax) movq 0x30(%rsp), %rcx movq 0x8(%rsp), %rax movq %rcx, 0xa0(%rax) movq 0x8(%rsp), %rax addq $0x48, %rsp retq nopw %cs:(%rax,%rax)
ggml_ssm_conv: sub rsp, 48h mov [rsp+48h+var_8], rdi mov [rsp+48h+var_10], rsi mov [rsp+48h+var_18], rdx mov rdi, [rsp+48h+var_10] call _ggml_is_3d test al, 1 jnz short loc_51FB2 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11B5h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIs3dSx; "ggml_is_3d(sx)" mov al, 0 call _ggml_abort loc_51FB2: mov rdi, [rsp+48h+var_18] call _ggml_is_matrix test al, 1 jnz short loc_51FE1 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11B6h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixC; "ggml_is_matrix(c)" mov al, 0 call _ggml_abort loc_51FE1: mov rax, [rsp+48h+var_18] mov rax, [rax+10h] mov [rsp+48h+var_20], rax mov rax, [rsp+48h+var_18] mov rax, [rax+18h] mov [rsp+48h+var_28], rax mov rax, [rsp+48h+var_10] mov rax, [rax+10h] sub rax, [rsp+48h+var_20] add rax, 1 mov [rsp+48h+var_30], rax mov rax, [rsp+48h+var_10] mov rax, [rax+20h] mov [rsp+48h+var_38], rax mov rax, [rsp+48h+var_10] mov rax, [rax+10h] mov rcx, [rsp+48h+var_20] sub rcx, 1 add rcx, [rsp+48h+var_30] cmp rax, rcx jz short loc_5205F lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11BFh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSxNe0DConv1NT; "sx->ne[0] == d_conv - 1 + n_t" mov al, 0 call _ggml_abort loc_5205F: mov rax, [rsp+48h+var_10] mov rax, [rax+18h] cmp rax, [rsp+48h+var_28] jz short loc_52090 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11C0h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSxNe1DInner; "sx->ne[1] == d_inner" mov al, 0 call _ggml_abort loc_52090: cmp [rsp+48h+var_30], 0 jge short loc_520B9 lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... mov esi, 11C1h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNT0; "n_t >= 0" mov al, 0 call _ggml_abort loc_520B9: mov rdi, [rsp+48h+var_8] mov rdx, [rsp+48h+var_28] mov rcx, [rsp+48h+var_30] mov r8, [rsp+48h+var_38] xor esi, esi call _ggml_new_tensor_3d mov [rsp+48h+var_40], rax mov rax, [rsp+48h+var_40] mov dword ptr [rax+50h], 41h ; 'A' mov rcx, [rsp+48h+var_10] mov rax, [rsp+48h+var_40] mov [rax+98h], rcx mov rcx, [rsp+48h+var_18] mov rax, [rsp+48h+var_40] mov [rax+0A0h], rcx mov rax, [rsp+48h+var_40] add rsp, 48h retn
long long ggml_ssm_conv(long long a1, _QWORD *a2, long long a3) { long long result; // rax long long v4; // [rsp+18h] [rbp-30h] long long v5; // [rsp+20h] [rbp-28h] if ( !ggml_is_3d((long long)a2) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 4533, (long long)"GGML_ASSERT(%s) failed", "ggml_is_3d(sx)"); if ( !ggml_is_matrix(a3) ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 4534, (long long)"GGML_ASSERT(%s) failed", "ggml_is_matrix(c)"); v5 = *(_QWORD *)(a3 + 24); v4 = a2[2] - *(_QWORD *)(a3 + 16) + 1LL; if ( a2[3] != v5 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 4544, (long long)"GGML_ASSERT(%s) failed", "sx->ne[1] == d_inner"); if ( v4 < 0 ) ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", 4545, (long long)"GGML_ASSERT(%s) failed", "n_t >= 0"); result = ggml_new_tensor_3d(a1, 0, v5, v4, a2[4]); *(_DWORD *)(result + 80) = 65; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_ssm_conv: SUB RSP,0x48 MOV qword ptr [RSP + 0x40],RDI MOV qword ptr [RSP + 0x38],RSI MOV qword ptr [RSP + 0x30],RDX MOV RDI,qword ptr [RSP + 0x38] CALL 0x00142e20 TEST AL,0x1 JNZ 0x00151fb2 LEA RDI,[0x1b45b7] MOV ESI,0x11b5 LEA RDX,[0x1b4602] LEA RCX,[0x1b4f58] MOV AL,0x0 CALL 0x00146780 LAB_00151fb2: MOV RDI,qword ptr [RSP + 0x30] CALL 0x00143a50 TEST AL,0x1 JNZ 0x00151fe1 LEA RDI,[0x1b45b7] MOV ESI,0x11b6 LEA RDX,[0x1b4602] LEA RCX,[0x1b4f67] MOV AL,0x0 CALL 0x00146780 LAB_00151fe1: MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x28],RAX MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x20],RAX MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x10] SUB RAX,qword ptr [RSP + 0x28] ADD RAX,0x1 MOV qword ptr [RSP + 0x18],RAX MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x10] MOV RCX,qword ptr [RSP + 0x28] SUB RCX,0x1 ADD RCX,qword ptr [RSP + 0x18] CMP RAX,RCX JZ 0x0015205f LEA RDI,[0x1b45b7] MOV ESI,0x11bf LEA RDX,[0x1b4602] LEA RCX,[0x1b4f79] MOV AL,0x0 CALL 0x00146780 LAB_0015205f: MOV RAX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RAX + 0x18] CMP RAX,qword ptr [RSP + 0x20] JZ 0x00152090 LEA RDI,[0x1b45b7] MOV ESI,0x11c0 LEA RDX,[0x1b4602] LEA RCX,[0x1b4f97] MOV AL,0x0 CALL 0x00146780 LAB_00152090: CMP qword ptr [RSP + 0x18],0x0 JGE 0x001520b9 LEA RDI,[0x1b45b7] MOV ESI,0x11c1 LEA RDX,[0x1b4602] LEA RCX,[0x1b4fac] MOV AL,0x0 CALL 0x00146780 LAB_001520b9: MOV RDI,qword ptr [RSP + 0x40] MOV RDX,qword ptr [RSP + 0x20] MOV RCX,qword ptr [RSP + 0x18] MOV R8,qword ptr [RSP + 0x10] XOR ESI,ESI CALL 0x001444d0 MOV qword ptr [RSP + 0x8],RAX MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX + 0x50],0x41 MOV RCX,qword ptr [RSP + 0x38] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0x98],RCX MOV RCX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x48 RET
long ggml_ssm_conv(int8 param_1,long param_2,long param_3) { int8 uVar1; ulong uVar2; long lVar3; long lVar4; uVar2 = ggml_is_3d(param_2); if ((uVar2 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x11b5, "GGML_ASSERT(%s) failed","ggml_is_3d(sx)"); } uVar2 = ggml_is_matrix(param_3); if ((uVar2 & 1) == 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x11b6, "GGML_ASSERT(%s) failed","ggml_is_matrix(c)"); } lVar4 = *(long *)(param_3 + 0x18); lVar3 = (*(long *)(param_2 + 0x10) - *(long *)(param_3 + 0x10)) + 1; uVar1 = *(int8 *)(param_2 + 0x20); if (*(long *)(param_2 + 0x10) != *(long *)(param_3 + 0x10) + -1 + lVar3) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x11bf, "GGML_ASSERT(%s) failed","sx->ne[0] == d_conv - 1 + n_t"); } if (*(long *)(param_2 + 0x18) != lVar4) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x11c0, "GGML_ASSERT(%s) failed","sx->ne[1] == d_inner"); } if (lVar3 < 0) { ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",0x11c1, "GGML_ASSERT(%s) failed","n_t >= 0"); } lVar4 = ggml_new_tensor_3d(param_1,0,lVar4,lVar3,uVar1); *(int4 *)(lVar4 + 0x50) = 0x41; *(long *)(lVar4 + 0x98) = param_2; *(long *)(lVar4 + 0xa0) = param_3; return lVar4; }
7,944
ggml_ssm_conv
ngxson[P]ggml-easy/ggml/src/ggml.c
struct ggml_tensor * ggml_ssm_conv( struct ggml_context * ctx, struct ggml_tensor * sx, struct ggml_tensor * c) { GGML_ASSERT(ggml_is_3d(sx)); GGML_ASSERT(ggml_is_matrix(c)); const int64_t d_conv = c->ne[0]; const int64_t d_inner = c->ne[1]; const int64_t n_t = sx->ne[0] - d_conv + 1; // tokens per sequence const int64_t n_s = sx->ne[2]; // TODO: maybe support other strides than 1? // FIXME: this is always true? GGML_ASSERT(sx->ne[0] == d_conv - 1 + n_t); GGML_ASSERT(sx->ne[1] == d_inner); GGML_ASSERT(n_t >= 0); struct ggml_tensor * result = ggml_new_tensor_3d(ctx, GGML_TYPE_F32, d_inner, n_t, n_s); result->op = GGML_OP_SSM_CONV; result->src[0] = sx; result->src[1] = c; return result; }
O2
c
ggml_ssm_conv: pushq %r14 pushq %rbx pushq %rax cmpq $0x1, 0x28(%rsi) jne 0x240d2 movq %rdx, %rbx cmpq $0x1, 0x20(%rdx) jne 0x240b6 cmpq $0x1, 0x28(%rbx) jne 0x240b6 movq %rsi, %r14 movq 0x18(%rbx), %rdx cmpq %rdx, 0x18(%rsi) jne 0x240ee movq 0x10(%r14), %rcx subq 0x10(%rbx), %rcx cmpq $-0x2, %rcx jle 0x2410a movq 0x20(%r14), %r8 incq %rcx xorl %esi, %esi callq 0x1d9e0 movl $0x41, 0x50(%rax) movq %r14, 0x98(%rax) movq %rbx, 0xa0(%rax) addq $0x8, %rsp popq %rbx popq %r14 retq leaq 0x274c6(%rip), %rdi # 0x4b583 leaq 0x2750a(%rip), %rdx # 0x4b5ce leaq 0x27dc0(%rip), %rcx # 0x4be8b movl $0x11b6, %esi # imm = 0x11B6 jmp 0x24124 leaq 0x274aa(%rip), %rdi # 0x4b583 leaq 0x274ee(%rip), %rdx # 0x4b5ce leaq 0x27d95(%rip), %rcx # 0x4be7c movl $0x11b5, %esi # imm = 0x11B5 jmp 0x24124 leaq 0x2748e(%rip), %rdi # 0x4b583 leaq 0x274d2(%rip), %rdx # 0x4b5ce leaq 0x27d9a(%rip), %rcx # 0x4be9d movl $0x11c0, %esi # imm = 0x11C0 jmp 0x24124 leaq 0x27472(%rip), %rdi # 0x4b583 leaq 0x274b6(%rip), %rdx # 0x4b5ce leaq 0x27d93(%rip), %rcx # 0x4beb2 movl $0x11c1, %esi # imm = 0x11C1 xorl %eax, %eax callq 0x1e770
ggml_ssm_conv: push r14 push rbx push rax cmp qword ptr [rsi+28h], 1 jnz short loc_240D2 mov rbx, rdx cmp qword ptr [rdx+20h], 1 jnz short loc_240B6 cmp qword ptr [rbx+28h], 1 jnz short loc_240B6 mov r14, rsi mov rdx, [rbx+18h] cmp [rsi+18h], rdx jnz short loc_240EE mov rcx, [r14+10h] sub rcx, [rbx+10h] cmp rcx, 0FFFFFFFFFFFFFFFEh jle short loc_2410A mov r8, [r14+20h] inc rcx xor esi, esi call _ggml_new_tensor_3d mov dword ptr [rax+50h], 41h ; 'A' mov [rax+98h], r14 mov [rax+0A0h], rbx add rsp, 8 pop rbx pop r14 retn loc_240B6: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIsMatrixC; "ggml_is_matrix(c)" mov esi, 11B6h jmp short loc_24124 loc_240D2: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aGgmlIs3dSx; "ggml_is_3d(sx)" mov esi, 11B5h jmp short loc_24124 loc_240EE: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSxNe1DInner; "sx->ne[1] == d_inner" mov esi, 11C0h jmp short loc_24124 loc_2410A: lea rdi, aWorkspaceLlm4b; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNT0; "n_t >= 0" mov esi, 11C1h loc_24124: xor eax, eax call _ggml_abort
long long ggml_ssm_conv( long long a1, _QWORD *a2, _QWORD *a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14) { char v14; // al long long v16; // rdx long long v17; // rcx long long result; // rax const char *v19; // rcx int v20; // esi if ( a2[5] != 1LL ) { v19 = "ggml_is_3d(sx)"; v20 = 4533; goto LABEL_11; } if ( a3[4] != 1LL || a3[5] != 1LL ) { v19 = "ggml_is_matrix(c)"; v20 = 4534; goto LABEL_11; } v16 = a3[3]; if ( a2[3] != v16 ) { v19 = "sx->ne[1] == d_inner"; v20 = 4544; goto LABEL_11; } v17 = a2[2] - a3[2]; if ( v17 <= -2 ) { v19 = "n_t >= 0"; v20 = 4545; LABEL_11: ggml_abort( "/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c", v20, (long long)"GGML_ASSERT(%s) failed", (long long)v19, a13, a14, a4, a5, a6, a7, a8, a9, a10, a11, v14); } result = ggml_new_tensor_3d(a1, 0LL, v16, v17 + 1, a2[4]); *(_DWORD *)(result + 80) = 65; *(_QWORD *)(result + 152) = a2; *(_QWORD *)(result + 160) = a3; return result; }
ggml_ssm_conv: PUSH R14 PUSH RBX PUSH RAX CMP qword ptr [RSI + 0x28],0x1 JNZ 0x001240d2 MOV RBX,RDX CMP qword ptr [RDX + 0x20],0x1 JNZ 0x001240b6 CMP qword ptr [RBX + 0x28],0x1 JNZ 0x001240b6 MOV R14,RSI MOV RDX,qword ptr [RBX + 0x18] CMP qword ptr [RSI + 0x18],RDX JNZ 0x001240ee MOV RCX,qword ptr [R14 + 0x10] SUB RCX,qword ptr [RBX + 0x10] CMP RCX,-0x2 JLE 0x0012410a MOV R8,qword ptr [R14 + 0x20] INC RCX XOR ESI,ESI CALL 0x0011d9e0 MOV dword ptr [RAX + 0x50],0x41 MOV qword ptr [RAX + 0x98],R14 MOV qword ptr [RAX + 0xa0],RBX ADD RSP,0x8 POP RBX POP R14 RET LAB_001240b6: LEA RDI,[0x14b583] LEA RDX,[0x14b5ce] LEA RCX,[0x14be8b] MOV ESI,0x11b6 JMP 0x00124124 LAB_001240d2: LEA RDI,[0x14b583] LEA RDX,[0x14b5ce] LEA RCX,[0x14be7c] MOV ESI,0x11b5 JMP 0x00124124 LAB_001240ee: LEA RDI,[0x14b583] LEA RDX,[0x14b5ce] LEA RCX,[0x14be9d] MOV ESI,0x11c0 JMP 0x00124124 LAB_0012410a: LEA RDI,[0x14b583] LEA RDX,[0x14b5ce] LEA RCX,[0x14beb2] MOV ESI,0x11c1 LAB_00124124: XOR EAX,EAX CALL 0x0011e770
void ggml_ssm_conv(int8 param_1,long param_2,long param_3) { long lVar1; char *pcVar2; int8 uVar3; if (*(long *)(param_2 + 0x28) == 1) { if ((*(long *)(param_3 + 0x20) == 1) && (*(long *)(param_3 + 0x28) == 1)) { if (*(long *)(param_2 + 0x18) == *(long *)(param_3 + 0x18)) { lVar1 = *(long *)(param_2 + 0x10) - *(long *)(param_3 + 0x10); if (-2 < lVar1) { lVar1 = ggml_new_tensor_3d(param_1,0,*(long *)(param_3 + 0x18),lVar1 + 1, *(int8 *)(param_2 + 0x20)); *(int4 *)(lVar1 + 0x50) = 0x41; *(long *)(lVar1 + 0x98) = param_2; *(long *)(lVar1 + 0xa0) = param_3; return; } pcVar2 = "n_t >= 0"; uVar3 = 0x11c1; } else { pcVar2 = "sx->ne[1] == d_inner"; uVar3 = 0x11c0; } } else { pcVar2 = "ggml_is_matrix(c)"; uVar3 = 0x11b6; } } else { pcVar2 = "ggml_is_3d(sx)"; uVar3 = 0x11b5; } /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/ngxson[P]ggml-easy/ggml/src/ggml.c",uVar3, "GGML_ASSERT(%s) failed",pcVar2); }
7,945
JS_ThrowError
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ThrowError(JSContext *ctx, JSErrorEnum error_num, const char *fmt, va_list ap) { JSRuntime *rt = ctx->rt; JSStackFrame *sf; BOOL add_backtrace; /* the backtrace is added later if called from a bytecode function */ sf = rt->current_stack_frame; add_backtrace = !rt->in_out_of_memory && (!sf || (JS_GetFunctionBytecode(sf->cur_func) == NULL)); return JS_ThrowError2(ctx, error_num, fmt, ap, add_backtrace); }
O1
c
JS_ThrowError: movq 0x18(%rdi), %rax xorl %r8d, %r8d cmpb $0x0, 0x100(%rax) jne 0x2f1db movq 0x108(%rax), %rax testq %rax, %rax je 0x218b2 movsd 0x8(%rax), %xmm0 movl 0x10(%rax), %eax movsd %xmm0, -0x8(%rsp) movl $0x1, %r8d cmpl $-0x1, %eax jne 0x2f1db movq -0x8(%rsp), %rax movzwl 0x6(%rax), %r9d cmpq $0x38, %r9 ja 0x2f1db movabsq $0x110000000012000, %r10 # imm = 0x110000000012000 btq %r9, %r10 jae 0x2f1db xorl %r8d, %r8d cmpq $0x0, 0x30(%rax) sete %r8b jmp 0x2f1db movl $0x1, %r8d jmp 0x2f1db
JS_ThrowError: mov rax, [rdi+18h] xor r8d, r8d cmp byte ptr [rax+100h], 0 jnz JS_ThrowError2 mov rax, [rax+108h] test rax, rax jz short loc_218B2 movsd xmm0, qword ptr [rax+8] mov eax, [rax+10h] movsd [rsp+var_8], xmm0 mov r8d, 1 cmp eax, 0FFFFFFFFh jnz JS_ThrowError2 mov rax, [rsp+var_8] movzx r9d, word ptr [rax+6] cmp r9, 38h ; '8' ja JS_ThrowError2 mov r10, 110000000012000h bt r10, r9 jnb JS_ThrowError2 xor r8d, r8d cmp qword ptr [rax+30h], 0 setz r8b jmp JS_ThrowError2 loc_218B2: mov r8d, 1 jmp JS_ThrowError2
long long JS_ThrowError(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax long long v5; // r8 long long v6; // rax unsigned long long v7; // r9 long long v8; // r10 long long v10; // [rsp+0h] [rbp-8h] v4 = *(_QWORD *)(a1 + 24); v5 = 0LL; if ( !*(_BYTE *)(v4 + 256) ) { v6 = *(_QWORD *)(v4 + 264); if ( !v6 ) return JS_ThrowError2(a1, a2, a3, a4, 1LL); v10 = *(_QWORD *)(v6 + 8); v5 = 1LL; if ( *(_DWORD *)(v6 + 16) == -1 ) { v7 = *(unsigned __int16 *)(v10 + 6); if ( v7 <= 0x38 ) { v8 = 0x110000000012000LL; if ( _bittest64(&v8, v7) ) return JS_ThrowError2(a1, a2, a3, a4, *(_QWORD *)(v10 + 48) == 0LL); } } } return JS_ThrowError2(a1, a2, a3, a4, v5); }
JS_ThrowError: MOV RAX,qword ptr [RDI + 0x18] XOR R8D,R8D CMP byte ptr [RAX + 0x100],0x0 JNZ 0x0012f1db MOV RAX,qword ptr [RAX + 0x108] TEST RAX,RAX JZ 0x001218b2 MOVSD XMM0,qword ptr [RAX + 0x8] MOV EAX,dword ptr [RAX + 0x10] MOVSD qword ptr [RSP + -0x8],XMM0 MOV R8D,0x1 CMP EAX,-0x1 JNZ 0x0012f1db MOV RAX,qword ptr [RSP + -0x8] MOVZX R9D,word ptr [RAX + 0x6] CMP R9,0x38 JA 0x0012f1db MOV R10,0x110000000012000 BT R10,R9 JNC 0x0012f1db XOR R8D,R8D CMP qword ptr [RAX + 0x30],0x0 SETZ R8B JMP 0x0012f1db LAB_001218b2: MOV R8D,0x1 JMP 0x0012f1db
void JS_ThrowError(long param_1,int4 param_2,char *param_3,__gnuc_va_list param_4) { long lVar1; int4 uVar2; ulong uVar3; int1 auVar4 [16]; char acStack_128 [264]; uVar2 = 0; if (*(char *)(*(long *)(param_1 + 0x18) + 0x100) == '\0') { lVar1 = *(long *)(*(long *)(param_1 + 0x18) + 0x108); if (lVar1 == 0) { JS_ThrowError2(); return; } uVar2 = 1; if (((*(int *)(lVar1 + 0x10) == -1) && (uVar3 = (ulong)*(ushort *)(*(long *)(lVar1 + 8) + 6), uVar3 < 0x39)) && ((0x110000000012000U >> (uVar3 & 0x3f) & 1) != 0)) { JS_ThrowError2(); return; } } vsnprintf(acStack_128,0x100,param_3,param_4); auVar4 = JS_MakeError(param_1,param_2,acStack_128,uVar2); if (auVar4._8_4_ == 6) { auVar4 = ZEXT816(2) << 0x40; } lVar1 = *(long *)(param_1 + 0x18); JS_FreeValueRT(lVar1,*(int8 *)(lVar1 + 0xf0),*(int8 *)(lVar1 + 0xf8)); *(int1 (*) [16])(lVar1 + 0xf0) = auVar4; return; }
7,946
JS_ThrowError
bluesky950520[P]quickjs/quickjs.c
static JSValue JS_ThrowError(JSContext *ctx, JSErrorEnum error_num, const char *fmt, va_list ap) { JSRuntime *rt = ctx->rt; JSStackFrame *sf; BOOL add_backtrace; /* the backtrace is added later if called from a bytecode function */ sf = rt->current_stack_frame; add_backtrace = !rt->in_out_of_memory && (!sf || (JS_GetFunctionBytecode(sf->cur_func) == NULL)); return JS_ThrowError2(ctx, error_num, fmt, ap, add_backtrace); }
O3
c
JS_ThrowError: movq 0x18(%rdi), %rax xorl %r8d, %r8d cmpb $0x0, 0x100(%rax) jne 0x2ffd7 movq 0x108(%rax), %rax movl $0x1, %r8d testq %rax, %rax je 0x2ffd7 cmpl $-0x1, 0x10(%rax) jne 0x2ffd7 movq 0x8(%rax), %rax movzwl 0x6(%rax), %r9d cmpq $0x38, %r9 ja 0x2ffd7 movabsq $0x110000000012000, %r10 # imm = 0x110000000012000 btq %r9, %r10 jae 0x2ffd7 xorl %r8d, %r8d cmpq $0x0, 0x30(%rax) sete %r8b jmp 0x2ffd7
JS_ThrowError: mov rax, [rdi+18h] xor r8d, r8d cmp byte ptr [rax+100h], 0 jnz JS_ThrowError2 mov rax, [rax+108h] mov r8d, 1 test rax, rax jz JS_ThrowError2 cmp dword ptr [rax+10h], 0FFFFFFFFh jnz JS_ThrowError2 mov rax, [rax+8] movzx r9d, word ptr [rax+6] cmp r9, 38h ; '8' ja JS_ThrowError2 mov r10, 110000000012000h bt r10, r9 jnb JS_ThrowError2 xor r8d, r8d cmp qword ptr [rax+30h], 0 setz r8b jmp JS_ThrowError2
long long JS_ThrowError(long long a1, long long a2, long long a3, long long a4) { long long v4; // rax long long v5; // r8 long long v6; // rax long long v7; // rax unsigned long long v8; // r9 long long v9; // r10 v4 = *(_QWORD *)(a1 + 24); v5 = 0LL; if ( !*(_BYTE *)(v4 + 256) && (v6 = *(_QWORD *)(v4 + 264), v5 = 1LL, v6) && *(_DWORD *)(v6 + 16) == -1 && (v7 = *(_QWORD *)(v6 + 8), v8 = *(unsigned __int16 *)(v7 + 6), v8 <= 0x38) && (v9 = 0x110000000012000LL, _bittest64(&v9, v8)) ) { return JS_ThrowError2(a1, a2, a3, a4, *(_QWORD *)(v7 + 48) == 0LL); } else { return JS_ThrowError2(a1, a2, a3, a4, v5); } }
JS_ThrowError: MOV RAX,qword ptr [RDI + 0x18] XOR R8D,R8D CMP byte ptr [RAX + 0x100],0x0 JNZ 0x0012ffd7 MOV RAX,qword ptr [RAX + 0x108] MOV R8D,0x1 TEST RAX,RAX JZ 0x0012ffd7 CMP dword ptr [RAX + 0x10],-0x1 JNZ 0x0012ffd7 MOV RAX,qword ptr [RAX + 0x8] MOVZX R9D,word ptr [RAX + 0x6] CMP R9,0x38 JA 0x0012ffd7 MOV R10,0x110000000012000 BT R10,R9 JNC 0x0012ffd7 XOR R8D,R8D CMP qword ptr [RAX + 0x30],0x0 SETZ R8B JMP 0x0012ffd7
void JS_ThrowError(long param_1,int4 param_2,char *param_3,__gnuc_va_list param_4) { int iVar1; long lVar2; int4 uVar3; ulong uVar4; int1 auVar5 [16]; char acStack_128 [264]; uVar3 = 0; if (*(char *)(*(long *)(param_1 + 0x18) + 0x100) == '\0') { lVar2 = *(long *)(*(long *)(param_1 + 0x18) + 0x108); uVar3 = 1; if ((((lVar2 != 0) && (*(int *)(lVar2 + 0x10) == -1)) && (uVar4 = (ulong)*(ushort *)(*(long *)(lVar2 + 8) + 6), uVar4 < 0x39)) && ((0x110000000012000U >> (uVar4 & 0x3f) & 1) != 0)) { JS_ThrowError2(); return; } } vsnprintf(acStack_128,0x100,param_3,param_4); auVar5 = JS_MakeError(param_1,param_2,acStack_128,uVar3); if (auVar5._8_4_ == 6) { auVar5 = ZEXT816(2) << 0x40; } lVar2 = *(long *)(param_1 + 0x18); if ((0xfffffff6 < (uint)*(int8 *)(lVar2 + 0xf8)) && (iVar1 = **(int **)(lVar2 + 0xf0), **(int **)(lVar2 + 0xf0) = iVar1 + -1, iVar1 < 2)) { js_free_value_rt(lVar2); } *(int1 (*) [16])(lVar2 + 0xf0) = auVar5; return; }
7,947
safe_hash_set
eloqsql/mysys/my_safehash.c
my_bool safe_hash_set(SAFE_HASH *hash, const uchar *key, uint length, uchar *data) { SAFE_HASH_ENTRY *entry; my_bool error= 0; DBUG_ENTER("safe_hash_set"); DBUG_PRINT("enter",("key: %.*s data: %p", length, key, data)); mysql_rwlock_wrlock(&hash->mutex); entry= (SAFE_HASH_ENTRY*) my_hash_search(&hash->hash, key, length); if (data == hash->default_value) { /* The key is to be associated with the default entry. In this case we can just delete the entry (if it existed) from the hash as a search will return the default entry */ if (!entry) /* nothing to do */ goto end; /* unlink entry from list */ if ((*entry->prev= entry->next)) entry->next->prev= entry->prev; my_hash_delete(&hash->hash, (uchar*) entry); goto end; } if (entry) { /* Entry existed; Just change the pointer to point at the new data */ entry->data= data; } else { if (!(entry= (SAFE_HASH_ENTRY *) my_malloc(key_memory_SAFE_HASH_ENTRY, sizeof(*entry) + length, MYF(MY_WME)))) { error= 1; goto end; } entry->key= (uchar*) (entry +1); memcpy((char*) entry->key, (char*) key, length); entry->length= length; entry->data= data; /* Link entry to list */ if ((entry->next= hash->root)) entry->next->prev= &entry->next; entry->prev= &hash->root; hash->root= entry; if (my_hash_insert(&hash->hash, (uchar*) entry)) { /* This can only happen if hash got out of memory */ my_free(entry); error= 1; goto end; } } end: mysql_rwlock_unlock(&hash->mutex); DBUG_RETURN(error); }
O3
c
safe_hash_set: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rcx, %r12 movl %edx, %r15d movq %rsi, %r14 movq %rdi, %rbx cmpq $0x0, 0x90(%rdi) jne 0xacda4 movq %rbx, %rdi callq 0xaaa79 leaq 0x98(%rbx), %r13 movl %r15d, -0x2c(%rbp) movl %r15d, %r15d movq %r13, %rdi movq %r14, %rsi movq %r15, %rdx callq 0x97686 cmpq %r12, 0x108(%rbx) je 0xaccc2 testq %rax, %rax je 0xacd17 movq %r12, 0x10(%rax) jmp 0xaccea testq %rax, %rax je 0xaccea movq 0x18(%rax), %rcx movq 0x20(%rax), %rdx movq %rcx, (%rdx) testq %rcx, %rcx je 0xaccdf movq 0x20(%rax), %rdx movq %rdx, 0x20(%rcx) movq %r13, %rdi movq %rax, %rsi callq 0x97bea xorl %r14d, %r14d movq 0x90(%rbx), %rdi testq %rdi, %rdi jne 0xacdbd movq %rbx, %rdi callq 0xaab1a movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %r13, -0x38(%rbp) leaq 0xb64bc2(%rip), %rax # 0xc118e4 movl (%rax), %edi leaq 0x28(%r15), %rsi movl $0x10, %edx callq 0xa63e5 testq %rax, %rax je 0xacd9c movq %rax, %r13 leaq 0x28(%rax), %rdi movq %rdi, (%rax) movq %r14, %rsi movq %r15, %rdx callq 0x2a0a0 movl -0x2c(%rbp), %eax movl %eax, 0x8(%r13) movq %r12, 0x10(%r13) leaq 0x110(%rbx), %rax movq 0x110(%rbx), %rcx movq %rcx, 0x18(%r13) testq %rcx, %rcx je 0xacd79 movq %r13, %rdx addq $0x18, %rdx movq %rdx, 0x20(%rcx) movq %rax, 0x20(%r13) movq %r13, (%rax) movq -0x38(%rbp), %rdi movq %r13, %rsi callq 0x978e6 testb %al, %al je 0xaccea movq %r13, %rdi callq 0xa6612 movb $0x1, %r14b jmp 0xacced leaq 0x37e3d(%rip), %rsi # 0xe4be8 movq %rbx, %rdi movl $0xcf, %edx callq 0x307ef jmp 0xacc92 leaq 0x2e2494(%rip), %rax # 0x38f258 movq (%rax), %rax callq *0x168(%rax) jmp 0xaccfd
safe_hash_set: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rcx mov r15d, edx mov r14, rsi mov rbx, rdi cmp qword ptr [rdi+90h], 0 jnz loc_ACDA4 mov rdi, rbx call my_rw_wrlock loc_ACC92: lea r13, [rbx+98h] mov [rbp+var_2C], r15d mov r15d, r15d mov rdi, r13 mov rsi, r14 mov rdx, r15 call my_hash_search cmp [rbx+108h], r12 jz short loc_ACCC2 test rax, rax jz short loc_ACD17 mov [rax+10h], r12 jmp short loc_ACCEA loc_ACCC2: test rax, rax jz short loc_ACCEA mov rcx, [rax+18h] mov rdx, [rax+20h] mov [rdx], rcx test rcx, rcx jz short loc_ACCDF mov rdx, [rax+20h] mov [rcx+20h], rdx loc_ACCDF: mov rdi, r13 mov rsi, rax call my_hash_delete loc_ACCEA: xor r14d, r14d loc_ACCED: mov rdi, [rbx+90h] test rdi, rdi jnz loc_ACDBD loc_ACCFD: mov rdi, rbx call my_rw_unlock mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_ACD17: mov [rbp+var_38], r13 lea rax, key_memory_SAFE_HASH_ENTRY mov edi, [rax] lea rsi, [r15+28h] mov edx, 10h call my_malloc test rax, rax jz short loc_ACD9C mov r13, rax lea rdi, [rax+28h] mov [rax], rdi mov rsi, r14 mov rdx, r15 call _memcpy mov eax, [rbp+var_2C] mov [r13+8], eax mov [r13+10h], r12 lea rax, [rbx+110h] mov rcx, [rbx+110h] mov [r13+18h], rcx test rcx, rcx jz short loc_ACD79 mov rdx, r13 add rdx, 18h mov [rcx+20h], rdx loc_ACD79: mov [r13+20h], rax mov [rax], r13 mov rdi, [rbp+var_38] mov rsi, r13 call my_hash_insert test al, al jz loc_ACCEA mov rdi, r13 call my_free loc_ACD9C: mov r14b, 1 jmp loc_ACCED loc_ACDA4: lea rsi, aWorkspaceLlm4b_42; "/workspace/llm4binary/github2025/eloqsq"... mov rdi, rbx mov edx, 0CFh call psi_rwlock_wrlock jmp loc_ACC92 loc_ACDBD: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+168h] jmp loc_ACCFD
long long safe_hash_set(_QWORD *a1, long long a2, unsigned int a3, long long a4) { unsigned int v6; // r14d long long v7; // rax long long v8; // rcx _QWORD *v10; // rax long long v11; // r13 long long *v12; // rax long long v13; // rcx v6 = a2; if ( a1[18] ) psi_rwlock_wrlock((long long)a1, (long long)"/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c", 0xCFu); else my_rw_wrlock((long long)a1); v7 = my_hash_search((long long)(a1 + 19), a2, a3); if ( a1[33] == a4 ) { if ( v7 ) { v8 = *(_QWORD *)(v7 + 24); **(_QWORD **)(v7 + 32) = v8; if ( v8 ) *(_QWORD *)(v8 + 32) = *(_QWORD *)(v7 + 32); my_hash_delete((long long)(a1 + 19), v7); } goto LABEL_10; } if ( v7 ) { *(_QWORD *)(v7 + 16) = a4; LABEL_10: v6 = 0; goto LABEL_11; } v10 = (_QWORD *)my_malloc(key_memory_SAFE_HASH_ENTRY, a3 + 40LL, 16); if ( v10 ) { v11 = (long long)v10; *v10 = v10 + 5; memcpy(v10 + 5, a2, a3); *(_DWORD *)(v11 + 8) = a3; *(_QWORD *)(v11 + 16) = a4; v12 = a1 + 34; v13 = a1[34]; *(_QWORD *)(v11 + 24) = v13; if ( v13 ) *(_QWORD *)(v13 + 32) = v11 + 24; *(_QWORD *)(v11 + 32) = v12; *v12 = v11; if ( !my_hash_insert((long long)(a1 + 19), v11) ) goto LABEL_10; my_free(v11); } LOBYTE(v6) = 1; LABEL_11: if ( a1[18] ) PSI_server[45](); my_rw_unlock((long long)a1); return v6; }
safe_hash_set: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RCX MOV R15D,EDX MOV R14,RSI MOV RBX,RDI CMP qword ptr [RDI + 0x90],0x0 JNZ 0x001acda4 MOV RDI,RBX CALL 0x001aaa79 LAB_001acc92: LEA R13,[RBX + 0x98] MOV dword ptr [RBP + -0x2c],R15D MOV R15D,R15D MOV RDI,R13 MOV RSI,R14 MOV RDX,R15 CALL 0x00197686 CMP qword ptr [RBX + 0x108],R12 JZ 0x001accc2 TEST RAX,RAX JZ 0x001acd17 MOV qword ptr [RAX + 0x10],R12 JMP 0x001accea LAB_001accc2: TEST RAX,RAX JZ 0x001accea MOV RCX,qword ptr [RAX + 0x18] MOV RDX,qword ptr [RAX + 0x20] MOV qword ptr [RDX],RCX TEST RCX,RCX JZ 0x001accdf MOV RDX,qword ptr [RAX + 0x20] MOV qword ptr [RCX + 0x20],RDX LAB_001accdf: MOV RDI,R13 MOV RSI,RAX CALL 0x00197bea LAB_001accea: XOR R14D,R14D LAB_001acced: MOV RDI,qword ptr [RBX + 0x90] TEST RDI,RDI JNZ 0x001acdbd LAB_001accfd: MOV RDI,RBX CALL 0x001aab1a MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001acd17: MOV qword ptr [RBP + -0x38],R13 LEA RAX,[0xd118e4] MOV EDI,dword ptr [RAX] LEA RSI,[R15 + 0x28] MOV EDX,0x10 CALL 0x001a63e5 TEST RAX,RAX JZ 0x001acd9c MOV R13,RAX LEA RDI,[RAX + 0x28] MOV qword ptr [RAX],RDI MOV RSI,R14 MOV RDX,R15 CALL 0x0012a0a0 MOV EAX,dword ptr [RBP + -0x2c] MOV dword ptr [R13 + 0x8],EAX MOV qword ptr [R13 + 0x10],R12 LEA RAX,[RBX + 0x110] MOV RCX,qword ptr [RBX + 0x110] MOV qword ptr [R13 + 0x18],RCX TEST RCX,RCX JZ 0x001acd79 MOV RDX,R13 ADD RDX,0x18 MOV qword ptr [RCX + 0x20],RDX LAB_001acd79: MOV qword ptr [R13 + 0x20],RAX MOV qword ptr [RAX],R13 MOV RDI,qword ptr [RBP + -0x38] MOV RSI,R13 CALL 0x001978e6 TEST AL,AL JZ 0x001accea MOV RDI,R13 CALL 0x001a6612 LAB_001acd9c: MOV R14B,0x1 JMP 0x001acced LAB_001acda4: LEA RSI,[0x1e4be8] MOV RDI,RBX MOV EDX,0xcf CALL 0x001307ef JMP 0x001acc92 LAB_001acdbd: LEA RAX,[0x48f258] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x168] JMP 0x001accfd
ulong safe_hash_set(long param_1,void *param_2,uint param_3,long param_4) { long lVar1; long lVar2; char cVar3; long lVar4; int8 *puVar5; ulong uVar6; if (*(long *)(param_1 + 0x90) == 0) { my_rw_wrlock(param_1); } else { psi_rwlock_wrlock(param_1,"/workspace/llm4binary/github2025/eloqsql/mysys/my_safehash.c",0xcf); } lVar1 = param_1 + 0x98; uVar6 = (ulong)param_3; lVar4 = my_hash_search(lVar1,param_2,uVar6); if (*(long *)(param_1 + 0x108) == param_4) { if (lVar4 != 0) { lVar2 = *(long *)(lVar4 + 0x18); **(long **)(lVar4 + 0x20) = lVar2; if (lVar2 != 0) { *(int8 *)(lVar2 + 0x20) = *(int8 *)(lVar4 + 0x20); } my_hash_delete(lVar1,lVar4); } } else { if (lVar4 == 0) { puVar5 = (int8 *)my_malloc(key_memory_SAFE_HASH_ENTRY,uVar6 + 0x28,0x10); if (puVar5 != (int8 *)0x0) { *puVar5 = puVar5 + 5; memcpy(puVar5 + 5,param_2,uVar6); *(uint *)(puVar5 + 1) = param_3; puVar5[2] = param_4; lVar4 = *(long *)(param_1 + 0x110); puVar5[3] = lVar4; if (lVar4 != 0) { *(int8 **)(lVar4 + 0x20) = puVar5 + 3; } puVar5[4] = (int8 *)(param_1 + 0x110); *(int8 *)(param_1 + 0x110) = puVar5; cVar3 = my_hash_insert(lVar1,puVar5); if (cVar3 == '\0') goto LAB_001accea; my_free(puVar5); } uVar6 = CONCAT71((int7)((ulong)param_2 >> 8),1); goto LAB_001acced; } *(long *)(lVar4 + 0x10) = param_4; } LAB_001accea: uVar6 = 0; LAB_001acced: if (*(long *)(param_1 + 0x90) != 0) { (**(code **)(PSI_server + 0x168))(); } my_rw_unlock(param_1); return uVar6 & 0xffffffff; }
7,948
json_parse_error
bluesky950520[P]quickjs/quickjs.c
static int json_parse_error(JSParseState *s, const uint8_t *curp, const char *msg) { const uint8_t *p, *line_start; int position = curp - s->buf_start; int line = 1; for (line_start = p = s->buf_start; p < curp; p++) { /* column count does not account for TABs nor wide characters */ if (*p == '\r' || *p == '\n') { p += 1 + (p[0] == '\r' && p[1] == '\n'); line++; line_start = p; } } return js_parse_error(s, "%s in JSON at position %d (line %d column %d)", msg, position, line, (int)(p - line_start) + 1); }
O0
c
json_parse_error: subq $0x38, %rsp movq %rdi, 0x30(%rsp) movq %rsi, 0x28(%rsp) movq %rdx, 0x20(%rsp) movq 0x28(%rsp), %rax movq 0x30(%rsp), %rcx movq 0x68(%rcx), %rcx subq %rcx, %rax movl %eax, 0xc(%rsp) movl $0x1, 0x8(%rsp) movq 0x30(%rsp), %rax movq 0x68(%rax), %rax movq %rax, 0x18(%rsp) movq %rax, 0x10(%rsp) movq 0x18(%rsp), %rax cmpq 0x28(%rsp), %rax jae 0x86ac9 movq 0x18(%rsp), %rax movzbl (%rax), %eax cmpl $0xd, %eax je 0x86a5d movq 0x18(%rsp), %rax movzbl (%rax), %eax cmpl $0xa, %eax jne 0x86ab4 movq 0x18(%rsp), %rax movzbl (%rax), %ecx xorl %eax, %eax cmpl $0xd, %ecx movb %al, 0x7(%rsp) jne 0x86a83 movq 0x18(%rsp), %rax movzbl 0x1(%rax), %eax cmpl $0xa, %eax sete %al movb %al, 0x7(%rsp) movb 0x7(%rsp), %al andb $0x1, %al movzbl %al, %ecx addl $0x1, %ecx movq 0x18(%rsp), %rax movslq %ecx, %rcx addq %rcx, %rax movq %rax, 0x18(%rsp) movl 0x8(%rsp), %eax addl $0x1, %eax movl %eax, 0x8(%rsp) movq 0x18(%rsp), %rax movq %rax, 0x10(%rsp) jmp 0x86ab6 movq 0x18(%rsp), %rax addq $0x1, %rax movq %rax, 0x18(%rsp) jmp 0x86a33 movq 0x30(%rsp), %rdi movq 0x20(%rsp), %rdx movl 0xc(%rsp), %ecx movl 0x8(%rsp), %r8d movq 0x18(%rsp), %rax movq 0x10(%rsp), %rsi subq %rsi, %rax movl %eax, %r9d addl $0x1, %r9d leaq 0x882cf(%rip), %rsi # 0x10edc6 movb $0x0, %al callq 0x48690 addq $0x38, %rsp retq nopw %cs:(%rax,%rax)
json_parse_error: sub rsp, 38h mov [rsp+38h+var_8], rdi mov [rsp+38h+var_10], rsi mov [rsp+38h+var_18], rdx mov rax, [rsp+38h+var_10] mov rcx, [rsp+38h+var_8] mov rcx, [rcx+68h] sub rax, rcx mov [rsp+38h+var_2C], eax mov [rsp+38h+var_30], 1 mov rax, [rsp+38h+var_8] mov rax, [rax+68h] mov [rsp+38h+var_20], rax mov [rsp+38h+var_28], rax loc_86A33: mov rax, [rsp+38h+var_20] cmp rax, [rsp+38h+var_10] jnb loc_86AC9 mov rax, [rsp+38h+var_20] movzx eax, byte ptr [rax] cmp eax, 0Dh jz short loc_86A5D mov rax, [rsp+38h+var_20] movzx eax, byte ptr [rax] cmp eax, 0Ah jnz short loc_86AB4 loc_86A5D: mov rax, [rsp+38h+var_20] movzx ecx, byte ptr [rax] xor eax, eax cmp ecx, 0Dh mov [rsp+38h+var_31], al jnz short loc_86A83 mov rax, [rsp+38h+var_20] movzx eax, byte ptr [rax+1] cmp eax, 0Ah setz al mov [rsp+38h+var_31], al loc_86A83: mov al, [rsp+38h+var_31] and al, 1 movzx ecx, al add ecx, 1 mov rax, [rsp+38h+var_20] movsxd rcx, ecx add rax, rcx mov [rsp+38h+var_20], rax mov eax, [rsp+38h+var_30] add eax, 1 mov [rsp+38h+var_30], eax mov rax, [rsp+38h+var_20] mov [rsp+38h+var_28], rax loc_86AB4: jmp short $+2 loc_86AB6: mov rax, [rsp+38h+var_20] add rax, 1 mov [rsp+38h+var_20], rax jmp loc_86A33 loc_86AC9: mov rdi, [rsp+38h+var_8] mov rdx, [rsp+38h+var_18] mov ecx, [rsp+38h+var_2C] mov r8d, [rsp+38h+var_30] mov rax, [rsp+38h+var_20] mov rsi, [rsp+38h+var_28] sub rax, rsi mov r9d, eax add r9d, 1 lea rsi, aSInJsonAtPosit; "%s in JSON at position %d (line %d colu"... mov al, 0 call js_parse_error add rsp, 38h retn
long long json_parse_error( _QWORD *a1, unsigned long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11) { char v12; // [rsp+0h] [rbp-38h] bool v13; // [rsp+7h] [rbp-31h] unsigned int v14; // [rsp+8h] [rbp-30h] int v15; // [rsp+10h] [rbp-28h] _BYTE *v16; // [rsp+18h] [rbp-20h] v14 = 1; v16 = (_BYTE *)a1[13]; v15 = (int)v16; while ( (unsigned long long)v16 < a2 ) { if ( *v16 == 13 || *v16 == 10 ) { v13 = 0; if ( *v16 == 13 ) v13 = v16[1] == 10; v16 += v13 + 1; ++v14; v15 = (int)v16; } ++v16; } return js_parse_error( a1, (long long)"%s in JSON at position %d (line %d column %d)", a3, (unsigned int)a2 - (unsigned int)a1[13], v14, (unsigned int)((_DWORD)v16 - v15 + 1), a4, a5, a6, a7, a8, a9, a10, a11, v12); }
json_parse_error: SUB RSP,0x38 MOV qword ptr [RSP + 0x30],RDI MOV qword ptr [RSP + 0x28],RSI MOV qword ptr [RSP + 0x20],RDX MOV RAX,qword ptr [RSP + 0x28] MOV RCX,qword ptr [RSP + 0x30] MOV RCX,qword ptr [RCX + 0x68] SUB RAX,RCX MOV dword ptr [RSP + 0xc],EAX MOV dword ptr [RSP + 0x8],0x1 MOV RAX,qword ptr [RSP + 0x30] MOV RAX,qword ptr [RAX + 0x68] MOV qword ptr [RSP + 0x18],RAX MOV qword ptr [RSP + 0x10],RAX LAB_00186a33: MOV RAX,qword ptr [RSP + 0x18] CMP RAX,qword ptr [RSP + 0x28] JNC 0x00186ac9 MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xd JZ 0x00186a5d MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX] CMP EAX,0xa JNZ 0x00186ab4 LAB_00186a5d: MOV RAX,qword ptr [RSP + 0x18] MOVZX ECX,byte ptr [RAX] XOR EAX,EAX CMP ECX,0xd MOV byte ptr [RSP + 0x7],AL JNZ 0x00186a83 MOV RAX,qword ptr [RSP + 0x18] MOVZX EAX,byte ptr [RAX + 0x1] CMP EAX,0xa SETZ AL MOV byte ptr [RSP + 0x7],AL LAB_00186a83: MOV AL,byte ptr [RSP + 0x7] AND AL,0x1 MOVZX ECX,AL ADD ECX,0x1 MOV RAX,qword ptr [RSP + 0x18] MOVSXD RCX,ECX ADD RAX,RCX MOV qword ptr [RSP + 0x18],RAX MOV EAX,dword ptr [RSP + 0x8] ADD EAX,0x1 MOV dword ptr [RSP + 0x8],EAX MOV RAX,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x10],RAX LAB_00186ab4: JMP 0x00186ab6 LAB_00186ab6: MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x1 MOV qword ptr [RSP + 0x18],RAX JMP 0x00186a33 LAB_00186ac9: MOV RDI,qword ptr [RSP + 0x30] MOV RDX,qword ptr [RSP + 0x20] MOV ECX,dword ptr [RSP + 0xc] MOV R8D,dword ptr [RSP + 0x8] MOV RAX,qword ptr [RSP + 0x18] MOV RSI,qword ptr [RSP + 0x10] SUB RAX,RSI MOV R9D,EAX ADD R9D,0x1 LEA RSI,[0x20edc6] MOV AL,0x0 CALL 0x00148690 ADD RSP,0x38 RET
void json_parse_error(long param_1,char *param_2,int8 param_3) { bool local_31; int local_30; char *local_28; char *local_20; local_30 = 1; local_28 = *(char **)(param_1 + 0x68); for (local_20 = local_28; local_20 < param_2; local_20 = local_20 + 1) { if ((*local_20 == '\r') || (*local_20 == '\n')) { local_31 = false; if (*local_20 == '\r') { local_31 = local_20[1] == '\n'; } local_28 = local_20 + (int)(local_31 + 1); local_30 = local_30 + 1; local_20 = local_28; } } js_parse_error(param_1,"%s in JSON at position %d (line %d column %d)",param_3, (int)param_2 - (int)*(int8 *)(param_1 + 0x68),local_30, ((int)local_20 - (int)local_28) + 1); return; }
7,949
json_parse_error
bluesky950520[P]quickjs/quickjs.c
static int json_parse_error(JSParseState *s, const uint8_t *curp, const char *msg) { const uint8_t *p, *line_start; int position = curp - s->buf_start; int line = 1; for (line_start = p = s->buf_start; p < curp; p++) { /* column count does not account for TABs nor wide characters */ if (*p == '\r' || *p == '\n') { p += 1 + (p[0] == '\r' && p[1] == '\n'); line++; line_start = p; } } return js_parse_error(s, "%s in JSON at position %d (line %d column %d)", msg, position, line, (int)(p - line_start) + 1); }
O1
c
json_parse_error: movq %rsi, %rcx movq 0x68(%rdi), %rax movl $0x1, %r8d movq %rax, %rsi movq %rax, %r9 cmpq %rcx, %rax jae 0x4cdb1 movq %rax, %r9 movq %rax, %rsi movzbl (%r9), %r10d cmpl $0xa, %r10d je 0x4cd9b cmpl $0xd, %r10d jne 0x4cda9 xorl %esi, %esi cmpb $0xa, 0x1(%r9) sete %sil incq %rsi jmp 0x4cda0 movl $0x1, %esi addq %rsi, %r9 incl %r8d movq %r9, %rsi incq %r9 cmpq %rcx, %r9 jb 0x4cd7b subl %eax, %ecx subl %esi, %r9d incl %r9d leaq 0x52fa2(%rip), %rsi # 0x9fd62 xorl %eax, %eax jmp 0x2fce9
json_parse_error: mov rcx, rsi mov rax, [rdi+68h] mov r8d, 1 mov rsi, rax mov r9, rax cmp rax, rcx jnb short loc_4CDB1 mov r9, rax mov rsi, rax loc_4CD7B: movzx r10d, byte ptr [r9] cmp r10d, 0Ah jz short loc_4CD9B cmp r10d, 0Dh jnz short loc_4CDA9 xor esi, esi cmp byte ptr [r9+1], 0Ah setz sil inc rsi jmp short loc_4CDA0 loc_4CD9B: mov esi, 1 loc_4CDA0: add r9, rsi inc r8d mov rsi, r9 loc_4CDA9: inc r9 cmp r9, rcx jb short loc_4CD7B loc_4CDB1: sub ecx, eax sub r9d, esi inc r9d lea rsi, aSInJsonAtPosit; "%s in JSON at position %d (line %d colu"... xor eax, eax jmp js_parse_error
long long json_parse_error( long long *a1, unsigned long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14, char a15) { unsigned long long v16; // rax long long v17; // r8 int v18; // esi unsigned __int8 *v19; // r9 int v20; // r10d long long v21; // rsi v16 = a1[13]; v17 = 1LL; v18 = v16; LODWORD(v19) = v16; if ( v16 < a2 ) { v19 = (unsigned __int8 *)a1[13]; v18 = (int)v19; while ( 1 ) { v20 = *v19; if ( v20 == 10 ) break; if ( v20 == 13 ) { v21 = (v19[1] == 10) + 1LL; LABEL_7: v19 += v21; v17 = (unsigned int)(v17 + 1); v18 = (int)v19; } if ( (unsigned long long)++v19 >= a2 ) return js_parse_error( a1, (long long)"%s in JSON at position %d (line %d column %d)", a3, (unsigned int)(a2 - v16), v17, (unsigned int)((_DWORD)v19 - v18 + 1), a4, a5, a6, a7, a8, a9, a10, a11, a15); } v21 = 1LL; goto LABEL_7; } return js_parse_error( a1, (long long)"%s in JSON at position %d (line %d column %d)", a3, (unsigned int)(a2 - v16), v17, (unsigned int)((_DWORD)v19 - v18 + 1), a4, a5, a6, a7, a8, a9, a10, a11, a15); }
json_parse_error: MOV RCX,RSI MOV RAX,qword ptr [RDI + 0x68] MOV R8D,0x1 MOV RSI,RAX MOV R9,RAX CMP RAX,RCX JNC 0x0014cdb1 MOV R9,RAX MOV RSI,RAX LAB_0014cd7b: MOVZX R10D,byte ptr [R9] CMP R10D,0xa JZ 0x0014cd9b CMP R10D,0xd JNZ 0x0014cda9 XOR ESI,ESI CMP byte ptr [R9 + 0x1],0xa SETZ SIL INC RSI JMP 0x0014cda0 LAB_0014cd9b: MOV ESI,0x1 LAB_0014cda0: ADD R9,RSI INC R8D MOV RSI,R9 LAB_0014cda9: INC R9 CMP R9,RCX JC 0x0014cd7b LAB_0014cdb1: SUB ECX,EAX SUB R9D,ESI INC R9D LEA RSI,[0x19fd62] XOR EAX,EAX JMP 0x0012fce9
void json_parse_error(long param_1,char *param_2,int8 param_3) { char *pcVar1; long lVar2; int iVar3; char *pcVar4; char *pcVar5; pcVar1 = *(char **)(param_1 + 0x68); iVar3 = 1; pcVar5 = pcVar1; pcVar4 = pcVar1; do { if (param_2 <= pcVar5) { js_parse_error(param_1,"%s in JSON at position %d (line %d column %d)",param_3, (int)param_2 - (int)pcVar1,iVar3,((int)pcVar5 - (int)pcVar4) + 1); return; } if (*pcVar5 == '\n') { lVar2 = 1; LAB_0014cda0: pcVar4 = pcVar5 + lVar2; iVar3 = iVar3 + 1; pcVar5 = pcVar4; } else if (*pcVar5 == '\r') { lVar2 = (ulong)(pcVar5[1] == '\n') + 1; goto LAB_0014cda0; } pcVar5 = pcVar5 + 1; } while( true ); }
7,950
json_parse_error
bluesky950520[P]quickjs/quickjs.c
static int json_parse_error(JSParseState *s, const uint8_t *curp, const char *msg) { const uint8_t *p, *line_start; int position = curp - s->buf_start; int line = 1; for (line_start = p = s->buf_start; p < curp; p++) { /* column count does not account for TABs nor wide characters */ if (*p == '\r' || *p == '\n') { p += 1 + (p[0] == '\r' && p[1] == '\n'); line++; line_start = p; } } return js_parse_error(s, "%s in JSON at position %d (line %d column %d)", msg, position, line, (int)(p - line_start) + 1); }
O2
c
json_parse_error: pushq %rbx movq %rsi, %rcx movq 0x68(%rdi), %rax movl $0x1, %r8d movabsq $0x1, %rsi movq %rax, %r10 movq %rax, %r9 cmpq %rcx, %r9 jae 0x41ecd movzbl (%r9), %ebx movq %rsi, %r11 cmpl $0xa, %ebx je 0x41ebf cmpl $0xd, %ebx jne 0x41ec8 xorl %r11d, %r11d cmpb $0xa, 0x1(%r9) sete %r11b incq %r11 addq %r11, %r9 incl %r8d movq %r9, %r10 incq %r9 jmp 0x41e9a subl %eax, %ecx subl %r10d, %r9d incl %r9d leaq 0x44dd6(%rip), %rsi # 0x86cb2 xorl %eax, %eax popq %rbx jmp 0x28457
json_parse_error: push rbx mov rcx, rsi mov rax, [rdi+68h] mov r8d, 1 mov rsi, 1 mov r10, rax mov r9, rax loc_41E9A: cmp r9, rcx jnb short loc_41ECD movzx ebx, byte ptr [r9] mov r11, rsi cmp ebx, 0Ah jz short loc_41EBF cmp ebx, 0Dh jnz short loc_41EC8 xor r11d, r11d cmp byte ptr [r9+1], 0Ah setz r11b inc r11 loc_41EBF: add r9, r11 inc r8d mov r10, r9 loc_41EC8: inc r9 jmp short loc_41E9A loc_41ECD: sub ecx, eax sub r9d, r10d inc r9d lea rsi, aSInJsonAtPosit; "%s in JSON at position %d (line %d colu"... xor eax, eax pop rbx jmp js_parse_error
long long json_parse_error( long long *a1, unsigned long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14, char a15) { unsigned __int8 *v15; // rax long long v16; // r8 int v17; // r10d unsigned __int8 *i; // r9 int v19; // ebx long long v20; // r11 v15 = (unsigned __int8 *)a1[13]; v16 = 1LL; v17 = (int)v15; for ( i = v15; (unsigned long long)i < a2; ++i ) { v19 = *i; v20 = 1LL; if ( v19 != 10 ) { if ( v19 != 13 ) continue; v20 = (i[1] == 10) + 1LL; } i += v20; v16 = (unsigned int)(v16 + 1); v17 = (int)i; } return js_parse_error( a1, (long long)"%s in JSON at position %d (line %d column %d)", a3, (unsigned int)(a2 - (_DWORD)v15), v16, (unsigned int)((_DWORD)i - v17 + 1), a4, a5, a6, a7, a8, a9, a10, a11, a15); }
json_parse_error: PUSH RBX MOV RCX,RSI MOV RAX,qword ptr [RDI + 0x68] MOV R8D,0x1 MOV RSI,0x1 MOV R10,RAX MOV R9,RAX LAB_00141e9a: CMP R9,RCX JNC 0x00141ecd MOVZX EBX,byte ptr [R9] MOV R11,RSI CMP EBX,0xa JZ 0x00141ebf CMP EBX,0xd JNZ 0x00141ec8 XOR R11D,R11D CMP byte ptr [R9 + 0x1],0xa SETZ R11B INC R11 LAB_00141ebf: ADD R9,R11 INC R8D MOV R10,R9 LAB_00141ec8: INC R9 JMP 0x00141e9a LAB_00141ecd: SUB ECX,EAX SUB R9D,R10D INC R9D LEA RSI,[0x186cb2] XOR EAX,EAX POP RBX JMP 0x00128457
void json_parse_error(long param_1,char *param_2,int8 param_3) { char *pcVar1; int iVar2; char *pcVar3; char *pcVar4; long lVar5; pcVar1 = *(char **)(param_1 + 0x68); iVar2 = 1; pcVar3 = pcVar1; pcVar4 = pcVar1; do { if (param_2 <= pcVar3) { js_parse_error(param_1,"%s in JSON at position %d (line %d column %d)",param_3, (int)param_2 - (int)pcVar1,iVar2,((int)pcVar3 - (int)pcVar4) + 1); return; } lVar5 = 1; if (*pcVar3 == '\n') { LAB_00141ebf: pcVar3 = pcVar3 + lVar5; iVar2 = iVar2 + 1; pcVar4 = pcVar3; } else if (*pcVar3 == '\r') { lVar5 = (ulong)(pcVar3[1] == '\n') + 1; goto LAB_00141ebf; } pcVar3 = pcVar3 + 1; } while( true ); }
7,951
json_parse_error
bluesky950520[P]quickjs/quickjs.c
static int json_parse_error(JSParseState *s, const uint8_t *curp, const char *msg) { const uint8_t *p, *line_start; int position = curp - s->buf_start; int line = 1; for (line_start = p = s->buf_start; p < curp; p++) { /* column count does not account for TABs nor wide characters */ if (*p == '\r' || *p == '\n') { p += 1 + (p[0] == '\r' && p[1] == '\n'); line++; line_start = p; } } return js_parse_error(s, "%s in JSON at position %d (line %d column %d)", msg, position, line, (int)(p - line_start) + 1); }
O3
c
json_parse_error: movq %rsi, %rcx movq 0x68(%rdi), %rax movl $0x1, %r8d movq %rax, %rsi movq %rax, %r9 cmpq %rcx, %rax jae 0x4ec01 movq %rax, %r9 movq %rax, %rsi movzbl (%r9), %r10d cmpl $0xa, %r10d je 0x4ebeb cmpl $0xd, %r10d jne 0x4ebf9 xorl %esi, %esi cmpb $0xa, 0x1(%r9) sete %sil incq %rsi jmp 0x4ebf0 movl $0x1, %esi addq %rsi, %r9 incl %r8d movq %r9, %rsi incq %r9 cmpq %rcx, %r9 jb 0x4ebcb subl %eax, %ecx subl %esi, %r9d incl %r9d leaq 0x54112(%rip), %rsi # 0xa2d22 xorl %eax, %eax jmp 0x30b0d
json_parse_error: mov rcx, rsi mov rax, [rdi+68h] mov r8d, 1 mov rsi, rax mov r9, rax cmp rax, rcx jnb short loc_4EC01 mov r9, rax mov rsi, rax loc_4EBCB: movzx r10d, byte ptr [r9] cmp r10d, 0Ah jz short loc_4EBEB cmp r10d, 0Dh jnz short loc_4EBF9 xor esi, esi cmp byte ptr [r9+1], 0Ah setz sil inc rsi jmp short loc_4EBF0 loc_4EBEB: mov esi, 1 loc_4EBF0: add r9, rsi inc r8d mov rsi, r9 loc_4EBF9: inc r9 cmp r9, rcx jb short loc_4EBCB loc_4EC01: sub ecx, eax sub r9d, esi inc r9d lea rsi, aSInJsonAtPosit; "%s in JSON at position %d (line %d colu"... xor eax, eax jmp js_parse_error
long long json_parse_error( long long *a1, unsigned long long a2, long long a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, __m128 a11, long long a12, long long a13, long long a14, char a15) { unsigned long long v16; // rax long long v17; // r8 int v18; // esi unsigned __int8 *v19; // r9 int v20; // r10d long long v21; // rsi v16 = a1[13]; v17 = 1LL; v18 = v16; LODWORD(v19) = v16; if ( v16 < a2 ) { v19 = (unsigned __int8 *)a1[13]; v18 = (int)v19; while ( 1 ) { v20 = *v19; if ( v20 == 10 ) break; if ( v20 == 13 ) { v21 = (v19[1] == 10) + 1LL; LABEL_7: v19 += v21; v17 = (unsigned int)(v17 + 1); v18 = (int)v19; } if ( (unsigned long long)++v19 >= a2 ) return js_parse_error( a1, (long long)"%s in JSON at position %d (line %d column %d)", a3, (unsigned int)(a2 - v16), v17, (unsigned int)((_DWORD)v19 - v18 + 1), a4, a5, a6, a7, a8, a9, a10, a11, a15); } v21 = 1LL; goto LABEL_7; } return js_parse_error( a1, (long long)"%s in JSON at position %d (line %d column %d)", a3, (unsigned int)(a2 - v16), v17, (unsigned int)((_DWORD)v19 - v18 + 1), a4, a5, a6, a7, a8, a9, a10, a11, a15); }
json_parse_error: MOV RCX,RSI MOV RAX,qword ptr [RDI + 0x68] MOV R8D,0x1 MOV RSI,RAX MOV R9,RAX CMP RAX,RCX JNC 0x0014ec01 MOV R9,RAX MOV RSI,RAX LAB_0014ebcb: MOVZX R10D,byte ptr [R9] CMP R10D,0xa JZ 0x0014ebeb CMP R10D,0xd JNZ 0x0014ebf9 XOR ESI,ESI CMP byte ptr [R9 + 0x1],0xa SETZ SIL INC RSI JMP 0x0014ebf0 LAB_0014ebeb: MOV ESI,0x1 LAB_0014ebf0: ADD R9,RSI INC R8D MOV RSI,R9 LAB_0014ebf9: INC R9 CMP R9,RCX JC 0x0014ebcb LAB_0014ec01: SUB ECX,EAX SUB R9D,ESI INC R9D LEA RSI,[0x1a2d22] XOR EAX,EAX JMP 0x00130b0d
void json_parse_error(long param_1,char *param_2,int8 param_3) { char *pcVar1; long lVar2; int iVar3; char *pcVar4; char *pcVar5; pcVar1 = *(char **)(param_1 + 0x68); iVar3 = 1; pcVar5 = pcVar1; pcVar4 = pcVar1; do { if (param_2 <= pcVar5) { js_parse_error(param_1,"%s in JSON at position %d (line %d column %d)",param_3, (int)param_2 - (int)pcVar1,iVar3,((int)pcVar5 - (int)pcVar4) + 1); return; } if (*pcVar5 == '\n') { lVar2 = 1; LAB_0014ebf0: pcVar4 = pcVar5 + lVar2; iVar3 = iVar3 + 1; pcVar5 = pcVar4; } else if (*pcVar5 == '\r') { lVar2 = (ulong)(pcVar5[1] == '\n') + 1; goto LAB_0014ebf0; } pcVar5 = pcVar5 + 1; } while( true ); }
7,952
my_charset_loader_init_mysys
eloqsql/mysys/charset.c
void my_charset_loader_init_mysys(MY_CHARSET_LOADER *loader) { loader->error[0]= '\0'; loader->once_alloc= my_once_alloc_c; loader->malloc= my_malloc_c; loader->realloc= my_realloc_c; loader->free= my_free; loader->reporter= my_charset_error_reporter; loader->add_collation= add_collation; }
O0
c
my_charset_loader_init_mysys: pushq %rbp movq %rsp, %rbp movq %rdi, -0x8(%rbp) movq -0x8(%rbp), %rax movb $0x0, (%rax) movq -0x8(%rbp), %rax leaq 0x66(%rip), %rcx # 0x71560 movq %rcx, 0x80(%rax) movq -0x8(%rbp), %rax leaq 0x74(%rip), %rcx # 0x71580 movq %rcx, 0x88(%rax) movq -0x8(%rbp), %rax leaq 0x92(%rip), %rcx # 0x715b0 movq %rcx, 0x90(%rax) movq -0x8(%rbp), %rax leaq 0xe920(%rip), %rcx # 0x7fe50 movq %rcx, 0x98(%rax) leaq 0x1c6522(%rip), %rax # 0x237a60 movq (%rax), %rcx movq -0x8(%rbp), %rax movq %rcx, 0xa0(%rax) movq -0x8(%rbp), %rax leaq 0x99(%rip), %rcx # 0x715f0 movq %rcx, 0xa8(%rax) popq %rbp retq
my_charset_loader_init_mysys: push rbp mov rbp, rsp mov [rbp+var_8], rdi mov rax, [rbp+var_8] mov byte ptr [rax], 0 mov rax, [rbp+var_8] lea rcx, my_once_alloc_c mov [rax+80h], rcx mov rax, [rbp+var_8] lea rcx, my_malloc_c mov [rax+88h], rcx mov rax, [rbp+var_8] lea rcx, my_realloc_c mov [rax+90h], rcx mov rax, [rbp+var_8] lea rcx, my_free mov [rax+98h], rcx lea rax, my_charset_error_reporter mov rcx, [rax] mov rax, [rbp+var_8] mov [rax+0A0h], rcx mov rax, [rbp+var_8] lea rcx, add_collation mov [rax+0A8h], rcx pop rbp retn
long long my_charset_loader_init_mysys(long long a1) { long long result; // rax *(_BYTE *)a1 = 0; *(_QWORD *)(a1 + 128) = my_once_alloc_c; *(_QWORD *)(a1 + 136) = my_malloc_c; *(_QWORD *)(a1 + 144) = my_realloc_c; *(_QWORD *)(a1 + 152) = my_free; *(_QWORD *)(a1 + 160) = my_charset_error_reporter; result = a1; *(_QWORD *)(a1 + 168) = add_collation; return result; }
my_charset_loader_init_mysys: PUSH RBP MOV RBP,RSP MOV qword ptr [RBP + -0x8],RDI MOV RAX,qword ptr [RBP + -0x8] MOV byte ptr [RAX],0x0 MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x171560] MOV qword ptr [RAX + 0x80],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x171580] MOV qword ptr [RAX + 0x88],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x1715b0] MOV qword ptr [RAX + 0x90],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x17fe50] MOV qword ptr [RAX + 0x98],RCX LEA RAX,[0x337a60] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0xa0],RCX MOV RAX,qword ptr [RBP + -0x8] LEA RCX,[0x1715f0] MOV qword ptr [RAX + 0xa8],RCX POP RBP RET
void my_charset_loader_init_mysys(int1 *param_1) { *param_1 = 0; *(code **)(param_1 + 0x80) = my_once_alloc_c; *(code **)(param_1 + 0x88) = my_malloc_c; *(code **)(param_1 + 0x90) = my_realloc_c; *(code **)(param_1 + 0x98) = my_free; *(int **)(param_1 + 0xa0) = my_charset_error_reporter; *(code **)(param_1 + 0xa8) = add_collation; return; }
7,953
my_rw_trywrlock
eloqsql/mysys/thr_rwlock.c
int my_rw_trywrlock(my_rw_lock_t *rwp) { int res; pthread_mutex_lock(&rwp->lock); if (rwp->state) res= EBUSY; /* Can't get lock */ else { res=0; rwp->state = -1; #ifdef SAFE_MUTEX rwp->write_thread= pthread_self(); #endif } pthread_mutex_unlock(&rwp->lock); return(res); }
O3
c
my_rw_trywrlock: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq %rdi, %rbx callq 0x244a0 movl $0x10, %r14d cmpl $0x0, 0x88(%rbx) jne 0x2d2a6 movl $0xffffffff, 0x88(%rbx) # imm = 0xFFFFFFFF xorl %r14d, %r14d movq %rbx, %rdi callq 0x24200 movl %r14d, %eax popq %rbx popq %r14 popq %rbp retq
my_rw_trywrlock: push rbp mov rbp, rsp push r14 push rbx mov rbx, rdi call _pthread_mutex_lock mov r14d, 10h cmp dword ptr [rbx+88h], 0 jnz short loc_2D2A6 mov dword ptr [rbx+88h], 0FFFFFFFFh xor r14d, r14d loc_2D2A6: mov rdi, rbx call _pthread_mutex_unlock mov eax, r14d pop rbx pop r14 pop rbp retn
long long my_rw_trywrlock(long long a1) { unsigned int v1; // r14d pthread_mutex_lock(a1); v1 = 16; if ( !*(_DWORD *)(a1 + 136) ) { *(_DWORD *)(a1 + 136) = -1; v1 = 0; } pthread_mutex_unlock(a1); return v1; }
my_rw_trywrlock: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,RDI CALL 0x001244a0 MOV R14D,0x10 CMP dword ptr [RBX + 0x88],0x0 JNZ 0x0012d2a6 MOV dword ptr [RBX + 0x88],0xffffffff XOR R14D,R14D LAB_0012d2a6: MOV RDI,RBX CALL 0x00124200 MOV EAX,R14D POP RBX POP R14 POP RBP RET
int8 my_rw_trywrlock(pthread_mutex_t *param_1) { int8 uVar1; pthread_mutex_lock(param_1); uVar1 = 0x10; if (*(int *)((long)param_1 + 0x88) == 0) { *(int4 *)((long)param_1 + 0x88) = 0xffffffff; uVar1 = 0; } pthread_mutex_unlock(param_1); return uVar1; }
7,954
intx::reciprocal_3by2(intx::uint<128u>)
corpus-core[P]colibri-stateless/build_O0/_deps/intx-src/include/intx/intx.hpp
inline uint64_t reciprocal_3by2(uint128 d) noexcept { auto v = reciprocal_2by1(d[1]); auto p = d[1] * v; p += d[0]; if (p < d[0]) { --v; if (p >= d[1]) { --v; p -= d[1]; } p -= d[1]; } const auto t = umul(v, d[0]); p += t[1]; if (p < t[1]) { --v; if (p >= d[1]) { if (p > d[1] || t[0] >= d[0]) --v; } } return v; }
O0
cpp
intx::reciprocal_3by2(intx::uint<128u>): pushq %rbp movq %rsp, %rbp subq $0x70, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x8(%rbp) leaq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x617a0 movq (%rax), %rdi callq 0x62f90 movq %rax, -0x18(%rbp) leaq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x617a0 movq (%rax), %rax imulq -0x18(%rbp), %rax movq %rax, -0x20(%rbp) leaq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x617a0 movq (%rax), %rax addq -0x20(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x38(%rbp) leaq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x617a0 movq %rax, %rcx movq -0x38(%rbp), %rax cmpq (%rcx), %rax jae 0x637df movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x40(%rbp) leaq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x617a0 movq %rax, %rcx movq -0x40(%rbp), %rax cmpq (%rcx), %rax jb 0x637c3 movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) leaq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x617a0 movq (%rax), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) leaq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x617a0 movq (%rax), %rcx movq -0x20(%rbp), %rax subq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x18(%rbp), %rax movq %rax, -0x50(%rbp) leaq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x617a0 movq -0x50(%rbp), %rdi movq (%rax), %rsi callq 0x61720 movq %rax, -0x30(%rbp) movq %rdx, -0x28(%rbp) leaq -0x30(%rbp), %rdi movl $0x1, %esi callq 0x618e0 movq (%rax), %rax addq -0x20(%rbp), %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x48(%rbp) leaq -0x30(%rbp), %rdi movl $0x1, %esi callq 0x618e0 movq %rax, %rcx movq -0x48(%rbp), %rax cmpq (%rcx), %rax jae 0x638d4 movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) movq -0x20(%rbp), %rax movq %rax, -0x58(%rbp) leaq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x617a0 movq %rax, %rcx movq -0x58(%rbp), %rax cmpq (%rcx), %rax jb 0x638d2 movq -0x20(%rbp), %rax movq %rax, -0x60(%rbp) leaq -0x10(%rbp), %rdi movl $0x1, %esi callq 0x617a0 movq %rax, %rcx movq -0x60(%rbp), %rax cmpq (%rcx), %rax ja 0x638c4 leaq -0x30(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x618e0 movq (%rax), %rax movq %rax, -0x68(%rbp) leaq -0x10(%rbp), %rdi xorl %eax, %eax movl %eax, %esi callq 0x617a0 movq %rax, %rcx movq -0x68(%rbp), %rax cmpq (%rcx), %rax jb 0x638d0 movq -0x18(%rbp), %rax addq $-0x1, %rax movq %rax, -0x18(%rbp) jmp 0x638d2 jmp 0x638d4 movq -0x18(%rbp), %rax addq $0x70, %rsp popq %rbp retq nop
_ZN4intx15reciprocal_3by2ENS_4uintILj128EEE: push rbp mov rbp, rsp sub rsp, 70h mov [rbp+var_10], rdi mov [rbp+var_8], rsi lea rdi, [rbp+var_10] mov esi, 1; unsigned __int64 call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rdi, [rax]; this call _ZN4intx15reciprocal_2by1Em; intx::reciprocal_2by1(ulong) mov [rbp+var_18], rax lea rdi, [rbp+var_10] mov esi, 1 call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rax, [rax] imul rax, [rbp+var_18] mov [rbp+var_20], rax lea rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rax, [rax] add rax, [rbp+var_20] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov [rbp+var_38], rax lea rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_38] cmp rax, [rcx] jnb short loc_637DF mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax mov rax, [rbp+var_20] mov [rbp+var_40], rax lea rdi, [rbp+var_10] mov esi, 1 call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_40] cmp rax, [rcx] jb short loc_637C3 mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax lea rdi, [rbp+var_10] mov esi, 1 call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rcx, [rax] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax loc_637C3: lea rdi, [rbp+var_10] mov esi, 1 call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rcx, [rax] mov rax, [rbp+var_20] sub rax, rcx mov [rbp+var_20], rax loc_637DF: mov rax, [rbp+var_18] mov [rbp+var_50], rax lea rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rdi, [rbp+var_50]; this mov rsi, [rax]; unsigned __int64 call _ZN4intx4umulEmm; intx::umul(ulong,ulong) mov [rbp+var_30], rax mov [rbp+var_28], rdx lea rdi, [rbp+var_30] mov esi, 1 call _ZNK4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rax, [rax] add rax, [rbp+var_20] mov [rbp+var_20], rax mov rax, [rbp+var_20] mov [rbp+var_48], rax lea rdi, [rbp+var_30] mov esi, 1 call _ZNK4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_48] cmp rax, [rcx] jnb loc_638D4 mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax mov rax, [rbp+var_20] mov [rbp+var_58], rax lea rdi, [rbp+var_10] mov esi, 1 call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_58] cmp rax, [rcx] jb short loc_638D2 mov rax, [rbp+var_20] mov [rbp+var_60], rax lea rdi, [rbp+var_10] mov esi, 1 call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_60] cmp rax, [rcx] ja short loc_638C4 lea rdi, [rbp+var_30] xor eax, eax mov esi, eax call _ZNK4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rax, [rax] mov [rbp+var_68], rax lea rdi, [rbp+var_10] xor eax, eax mov esi, eax call _ZN4intx4uintILj128EEixEm; intx::uint<128u>::operator[](ulong) mov rcx, rax mov rax, [rbp+var_68] cmp rax, [rcx] jb short loc_638D0 loc_638C4: mov rax, [rbp+var_18] add rax, 0FFFFFFFFFFFFFFFFh mov [rbp+var_18], rax loc_638D0: jmp short $+2 loc_638D2: jmp short $+2 loc_638D4: mov rax, [rbp+var_18] add rsp, 70h pop rbp retn
unsigned long long intx::reciprocal_3by2(long long a1, long long a2) { intx **v2; // rax unsigned long long *v3; // rax long long v4; // rdx _QWORD *v5; // rax unsigned long long v7; // [rsp+8h] [rbp-68h] unsigned long long v8; // [rsp+10h] [rbp-60h] unsigned long long v9; // [rsp+18h] [rbp-58h] unsigned long long v10; // [rsp+28h] [rbp-48h] _QWORD v11[2]; // [rsp+40h] [rbp-30h] BYREF unsigned long long v12; // [rsp+50h] [rbp-20h] unsigned long long v13; // [rsp+58h] [rbp-18h] _QWORD v14[2]; // [rsp+60h] [rbp-10h] BYREF v14[0] = a1; v14[1] = a2; v2 = (intx **)intx::uint<128u>::operator[]((long long)v14, 1LL); v13 = intx::reciprocal_2by1(*v2); v12 = v13 * *(_QWORD *)intx::uint<128u>::operator[]((long long)v14, 1LL); v12 += *(_QWORD *)intx::uint<128u>::operator[]((long long)v14, 0LL); if ( v12 < *(_QWORD *)intx::uint<128u>::operator[]((long long)v14, 0LL) ) { --v13; if ( v12 >= *(_QWORD *)intx::uint<128u>::operator[]((long long)v14, 1LL) ) { --v13; v12 -= *(_QWORD *)intx::uint<128u>::operator[]((long long)v14, 1LL); } v12 -= *(_QWORD *)intx::uint<128u>::operator[]((long long)v14, 1LL); } v3 = (unsigned long long *)intx::uint<128u>::operator[]((long long)v14, 0LL); v11[0] = intx::umul(v13, *v3); v11[1] = v4; v5 = (_QWORD *)intx::uint<128u>::operator[]((long long)v11, 1LL); v12 += *v5; v10 = v12; if ( v10 < *(_QWORD *)intx::uint<128u>::operator[]((long long)v11, 1LL) ) { --v13; v9 = v12; if ( v9 >= *(_QWORD *)intx::uint<128u>::operator[]((long long)v14, 1LL) ) { v8 = v12; if ( v8 > *(_QWORD *)intx::uint<128u>::operator[]((long long)v14, 1LL) || (v7 = *(_QWORD *)intx::uint<128u>::operator[]((long long)v11, 0LL), v7 >= *(_QWORD *)intx::uint<128u>::operator[]((long long)v14, 0LL)) ) { --v13; } } } return v13; }
reciprocal_3by2: PUSH RBP MOV RBP,RSP SUB RSP,0x70 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x8],RSI LEA RDI,[RBP + -0x10] MOV ESI,0x1 CALL 0x001617a0 MOV RDI,qword ptr [RAX] CALL 0x00162f90 MOV qword ptr [RBP + -0x18],RAX LEA RDI,[RBP + -0x10] MOV ESI,0x1 CALL 0x001617a0 MOV RAX,qword ptr [RAX] IMUL RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x20],RAX LEA RDI,[RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001617a0 MOV RAX,qword ptr [RAX] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x38],RAX LEA RDI,[RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001617a0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x38] CMP RAX,qword ptr [RCX] JNC 0x001637df MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x40],RAX LEA RDI,[RBP + -0x10] MOV ESI,0x1 CALL 0x001617a0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x40] CMP RAX,qword ptr [RCX] JC 0x001637c3 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX LEA RDI,[RBP + -0x10] MOV ESI,0x1 CALL 0x001617a0 MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001637c3: LEA RDI,[RBP + -0x10] MOV ESI,0x1 CALL 0x001617a0 MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x20] SUB RAX,RCX MOV qword ptr [RBP + -0x20],RAX LAB_001637df: MOV RAX,qword ptr [RBP + -0x18] MOV qword ptr [RBP + -0x50],RAX LEA RDI,[RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001617a0 MOV RDI,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RAX] CALL 0x00161720 MOV qword ptr [RBP + -0x30],RAX MOV qword ptr [RBP + -0x28],RDX LEA RDI,[RBP + -0x30] MOV ESI,0x1 CALL 0x001618e0 MOV RAX,qword ptr [RAX] ADD RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x48],RAX LEA RDI,[RBP + -0x30] MOV ESI,0x1 CALL 0x001618e0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x48] CMP RAX,qword ptr [RCX] JNC 0x001638d4 MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x58],RAX LEA RDI,[RBP + -0x10] MOV ESI,0x1 CALL 0x001617a0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x58] CMP RAX,qword ptr [RCX] JC 0x001638d2 MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RBP + -0x60],RAX LEA RDI,[RBP + -0x10] MOV ESI,0x1 CALL 0x001617a0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x60] CMP RAX,qword ptr [RCX] JA 0x001638c4 LEA RDI,[RBP + -0x30] XOR EAX,EAX MOV ESI,EAX CALL 0x001618e0 MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x68],RAX LEA RDI,[RBP + -0x10] XOR EAX,EAX MOV ESI,EAX CALL 0x001617a0 MOV RCX,RAX MOV RAX,qword ptr [RBP + -0x68] CMP RAX,qword ptr [RCX] JC 0x001638d0 LAB_001638c4: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,-0x1 MOV qword ptr [RBP + -0x18],RAX LAB_001638d0: JMP 0x001638d2 LAB_001638d2: JMP 0x001638d4 LAB_001638d4: MOV RAX,qword ptr [RBP + -0x18] ADD RSP,0x70 POP RBP RET
/* intx::reciprocal_3by2(intx::uint<128u>) */ ulong __thiscall intx::reciprocal_3by2(intx *this,int8 param_2) { ulong uVar1; ulong *puVar2; long *plVar3; ulong uVar4; uint<128u> local_38 [16]; ulong local_28; ulong local_20; intx *local_18; int8 local_10; local_18 = this; local_10 = param_2; puVar2 = (ulong *)uint<128u>::operator[]((uint<128u> *)&local_18,1); local_20 = reciprocal_2by1(*puVar2); plVar3 = (long *)uint<128u>::operator[]((uint<128u> *)&local_18,1); local_28 = *plVar3 * local_20; plVar3 = (long *)uint<128u>::operator[]((uint<128u> *)&local_18,0); uVar4 = *plVar3 + local_28; local_28 = uVar4; puVar2 = (ulong *)uint<128u>::operator[]((uint<128u> *)&local_18,0); uVar1 = local_28; if (uVar4 < *puVar2) { local_20 = local_20 - 1; puVar2 = (ulong *)uint<128u>::operator[]((uint<128u> *)&local_18,1); if (*puVar2 <= uVar1) { local_20 = local_20 - 1; plVar3 = (long *)uint<128u>::operator[]((uint<128u> *)&local_18,1); local_28 = local_28 - *plVar3; } plVar3 = (long *)uint<128u>::operator[]((uint<128u> *)&local_18,1); local_28 = local_28 - *plVar3; } uVar1 = local_20; puVar2 = (ulong *)uint<128u>::operator[]((uint<128u> *)&local_18,0); local_38 = (uint<128u> [16])umul(uVar1,*puVar2); plVar3 = (long *)uint<128u>::operator[](local_38,1); uVar4 = *plVar3 + local_28; local_28 = uVar4; puVar2 = (ulong *)uint<128u>::operator[](local_38,1); uVar1 = local_28; if (uVar4 < *puVar2) { local_20 = local_20 - 1; puVar2 = (ulong *)uint<128u>::operator[]((uint<128u> *)&local_18,1); uVar4 = local_28; if (*puVar2 <= uVar1) { puVar2 = (ulong *)uint<128u>::operator[]((uint<128u> *)&local_18,1); if (uVar4 <= *puVar2) { puVar2 = (ulong *)uint<128u>::operator[](local_38,0); uVar1 = *puVar2; puVar2 = (ulong *)uint<128u>::operator[]((uint<128u> *)&local_18,0); if (uVar1 < *puVar2) { return local_20; } } local_20 = local_20 - 1; } } return local_20; }
7,955
common_chat_format_name[abi:cxx11](common_chat_format)
monkey531[P]llama/common/chat.cpp
std::string common_chat_format_name(common_chat_format format) { switch (format) { case COMMON_CHAT_FORMAT_CONTENT_ONLY: return "Content-only"; case COMMON_CHAT_FORMAT_GENERIC: return "Generic"; case COMMON_CHAT_FORMAT_MISTRAL_NEMO: return "Mistral Nemo"; case COMMON_CHAT_FORMAT_LLAMA_3_X: return "Llama 3.x"; case COMMON_CHAT_FORMAT_LLAMA_3_X_WITH_BUILTIN_TOOLS: return "Llama 3.x with builtin tools"; case COMMON_CHAT_FORMAT_DEEPSEEK_R1: return "DeepSeek R1"; case COMMON_CHAT_FORMAT_FIREFUNCTION_V2: return "FireFunction v2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2: return "Functionary v3.2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1: return "Functionary v3.1 Llama 3.1"; case COMMON_CHAT_FORMAT_HERMES_2_PRO: return "Hermes 2 Pro"; case COMMON_CHAT_FORMAT_COMMAND_R7B: return "Command R7B"; default: throw std::runtime_error("Unknown chat format"); } }
O2
cpp
common_chat_format_name[abi:cxx11](common_chat_format): pushq %r14 pushq %rbx subq $0x18, %rsp cmpl $0xa, %esi ja 0x9afe7 movq %rdi, %rbx movl %esi, %eax leaq 0x1f770(%rip), %rcx # 0xba6a0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x207a8(%rip), %rsi # 0xbb6e8 leaq 0x17(%rsp), %rdx jmp 0x9afd4 leaq 0x207c3(%rip), %rsi # 0xbb714 leaq 0x13(%rsp), %rdx jmp 0x9afd4 leaq 0x2081a(%rip), %rsi # 0xbb779 leaq 0xe(%rsp), %rdx jmp 0x9afd4 leaq 0x20790(%rip), %rsi # 0xbb6fd leaq 0x15(%rsp), %rdx jmp 0x9afd4 leaq 0x2078f(%rip), %rsi # 0xbb70a leaq 0x14(%rsp), %rdx jmp 0x9afd4 leaq 0x207c4(%rip), %rsi # 0xbb74d leaq 0x10(%rsp), %rdx jmp 0x9afd4 leaq 0x2075e(%rip), %rsi # 0xbb6f5 leaq 0x16(%rsp), %rdx jmp 0x9afd4 leaq 0x2078c(%rip), %rsi # 0xbb731 leaq 0x12(%rsp), %rdx jmp 0x9afd4 leaq 0x2078a(%rip), %rsi # 0xbb73d leaq 0x11(%rsp), %rdx jmp 0x9afd4 leaq 0x207c5(%rip), %rsi # 0xbb786 leaq 0xd(%rsp), %rdx jmp 0x9afd4 leaq 0x2078f(%rip), %rsi # 0xbb75e leaq 0xf(%rsp), %rdx movq %rbx, %rdi callq 0x27d88 movq %rbx, %rax addq $0x18, %rsp popq %rbx popq %r14 retq pushq $0x10 popq %rdi callq 0x23470 movq %rax, %rbx leaq 0x20799(%rip), %rsi # 0xbb792 movq %rax, %rdi callq 0x23330 movq 0x63fe0(%rip), %rsi # 0xfefe8 movq 0x63f39(%rip), %rdx # 0xfef48 movq %rbx, %rdi callq 0x23f00 movq %rax, %r14 movq %rbx, %rdi callq 0x236a0 movq %r14, %rdi callq 0x23f80
_Z23common_chat_format_nameB5cxx1118common_chat_format: push r14 push rbx sub rsp, 18h cmp esi, 0Ah; switch 11 cases ja def_9AF37; jumptable 000000000009AF37 default case mov rbx, rdi mov eax, esi lea rcx, jpt_9AF37 movsxd rax, ds:(jpt_9AF37 - 0BA6A0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_9AF39: lea rsi, aContentOnly; jumptable 000000000009AF37 case 0 lea rdx, [rsp+28h+var_11] jmp loc_9AFD4 loc_9AF4A: lea rsi, aLlama3XWithBui; jumptable 000000000009AF37 case 4 lea rdx, [rsp+28h+var_15] jmp short loc_9AFD4 loc_9AF58: lea rsi, aHermes2Pro; jumptable 000000000009AF37 case 9 lea rdx, [rsp+28h+var_1A] jmp short loc_9AFD4 loc_9AF66: lea rsi, aMistralNemo; jumptable 000000000009AF37 case 2 lea rdx, [rsp+28h+var_13] jmp short loc_9AFD4 loc_9AF74: lea rsi, aLlama3X; jumptable 000000000009AF37 case 3 lea rdx, [rsp+28h+var_14] jmp short loc_9AFD4 loc_9AF82: lea rsi, aFunctionaryV32; jumptable 000000000009AF37 case 7 lea rdx, [rsp+28h+var_18] jmp short loc_9AFD4 loc_9AF90: lea rsi, aGeneric; jumptable 000000000009AF37 case 1 lea rdx, [rsp+28h+var_12] jmp short loc_9AFD4 loc_9AF9E: lea rsi, aDeepseekR1; jumptable 000000000009AF37 case 5 lea rdx, [rsp+28h+var_16] jmp short loc_9AFD4 loc_9AFAC: lea rsi, aFirefunctionV2; jumptable 000000000009AF37 case 6 lea rdx, [rsp+28h+var_17] jmp short loc_9AFD4 loc_9AFBA: lea rsi, aCommandR7b; jumptable 000000000009AF37 case 10 lea rdx, [rsp+28h+var_1B] jmp short loc_9AFD4 loc_9AFC8: lea rsi, aFunctionaryV31; jumptable 000000000009AF37 case 8 lea rdx, [rsp+28h+var_19] loc_9AFD4: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_; std::string::basic_string<std::allocator<char>>(char const*,std::allocator<char> const&) mov rax, rbx add rsp, 18h pop rbx pop r14 retn def_9AF37: push 10h; jumptable 000000000009AF37 default case pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnknownChatFor; "Unknown chat format" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZNSt13runtime_errorD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
_QWORD * common_chat_format_name[abi:cxx11](_QWORD *a1, int a2) { const char *v2; // rsi std::runtime_error *exception; // rbx switch ( a2 ) { case 0: v2 = "Content-only"; break; case 1: v2 = "Generic"; break; case 2: v2 = "Mistral Nemo"; break; case 3: v2 = "Llama 3.x"; break; case 4: v2 = "Llama 3.x with builtin tools"; break; case 5: v2 = "DeepSeek R1"; break; case 6: v2 = "FireFunction v2"; break; case 7: v2 = "Functionary v3.2"; break; case 8: v2 = "Functionary v3.1 Llama 3.1"; break; case 9: v2 = "Hermes 2 Pro"; break; case 10: v2 = "Command R7B"; break; default: exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Unknown chat format"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::string::basic_string<std::allocator<char>>(a1, (long long)v2); return a1; }
common_chat_format_name[abi:cxx11]: PUSH R14 PUSH RBX SUB RSP,0x18 CMP ESI,0xa JA 0x0019afe7 MOV RBX,RDI MOV EAX,ESI LEA RCX,[0x1ba6a0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RSI,[0x1bb6e8] LEA RDX,[RSP + 0x17] JMP 0x0019afd4 caseD_4: LEA RSI,[0x1bb714] LEA RDX,[RSP + 0x13] JMP 0x0019afd4 caseD_9: LEA RSI,[0x1bb779] LEA RDX,[RSP + 0xe] JMP 0x0019afd4 caseD_2: LEA RSI,[0x1bb6fd] LEA RDX,[RSP + 0x15] JMP 0x0019afd4 caseD_3: LEA RSI,[0x1bb70a] LEA RDX,[RSP + 0x14] JMP 0x0019afd4 caseD_7: LEA RSI,[0x1bb74d] LEA RDX,[RSP + 0x10] JMP 0x0019afd4 caseD_1: LEA RSI,[0x1bb6f5] LEA RDX,[RSP + 0x16] JMP 0x0019afd4 caseD_5: LEA RSI,[0x1bb731] LEA RDX,[RSP + 0x12] JMP 0x0019afd4 caseD_6: LEA RSI,[0x1bb73d] LEA RDX,[RSP + 0x11] JMP 0x0019afd4 caseD_a: LEA RSI,[0x1bb786] LEA RDX,[RSP + 0xd] JMP 0x0019afd4 caseD_8: LEA RSI,[0x1bb75e] LEA RDX,[RSP + 0xf] LAB_0019afd4: MOV RDI,RBX CALL 0x00127d88 MOV RAX,RBX ADD RSP,0x18 POP RBX POP R14 RET default: PUSH 0x10 POP RDI CALL 0x00123470 MOV RBX,RAX LAB_0019aff2: LEA RSI,[0x1bb792] MOV RDI,RAX CALL 0x00123330 LAB_0019b001: MOV RSI,qword ptr [0x001fefe8] MOV RDX,qword ptr [0x001fef48] MOV RDI,RBX CALL 0x00123f00
/* common_chat_format_name[abi:cxx11](common_chat_format) */ string * common_chat_format_name_abi_cxx11_(string *param_1,int4 param_2) { runtime_error *this; allocator *paVar1; char *pcVar2; allocator local_1b; allocator local_1a; allocator local_19; allocator local_18; allocator local_17; allocator local_16; allocator local_15; allocator local_14; allocator local_13; allocator local_12; allocator local_11; switch(param_2) { case 0: pcVar2 = "Content-only"; paVar1 = &local_11; break; case 1: pcVar2 = "Generic"; paVar1 = &local_12; break; case 2: pcVar2 = "Mistral Nemo"; paVar1 = &local_13; break; case 3: pcVar2 = "Llama 3.x"; paVar1 = &local_14; break; case 4: pcVar2 = "Llama 3.x with builtin tools"; paVar1 = &local_15; break; case 5: pcVar2 = "DeepSeek R1"; paVar1 = &local_16; break; case 6: pcVar2 = "FireFunction v2"; paVar1 = &local_17; break; case 7: pcVar2 = "Functionary v3.2"; paVar1 = &local_18; break; case 8: pcVar2 = "Functionary v3.1 Llama 3.1"; paVar1 = &local_19; break; case 9: pcVar2 = "Hermes 2 Pro"; paVar1 = &local_1a; break; case 10: pcVar2 = "Command R7B"; paVar1 = &local_1b; break; default: this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 0019aff2 to 0019b000 has its CatchHandler @ 0019b017 */ std::runtime_error::runtime_error(this,"Unknown chat format"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_001fefe8,PTR__runtime_error_001fef48); } std::__cxx11::string::string<std::allocator<char>>(param_1,pcVar2,paVar1); return param_1; }
7,956
common_chat_format_name[abi:cxx11](common_chat_format)
monkey531[P]llama/common/chat.cpp
std::string common_chat_format_name(common_chat_format format) { switch (format) { case COMMON_CHAT_FORMAT_CONTENT_ONLY: return "Content-only"; case COMMON_CHAT_FORMAT_GENERIC: return "Generic"; case COMMON_CHAT_FORMAT_MISTRAL_NEMO: return "Mistral Nemo"; case COMMON_CHAT_FORMAT_LLAMA_3_X: return "Llama 3.x"; case COMMON_CHAT_FORMAT_LLAMA_3_X_WITH_BUILTIN_TOOLS: return "Llama 3.x with builtin tools"; case COMMON_CHAT_FORMAT_DEEPSEEK_R1: return "DeepSeek R1"; case COMMON_CHAT_FORMAT_FIREFUNCTION_V2: return "FireFunction v2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_2: return "Functionary v3.2"; case COMMON_CHAT_FORMAT_FUNCTIONARY_V3_1_LLAMA_3_1: return "Functionary v3.1 Llama 3.1"; case COMMON_CHAT_FORMAT_HERMES_2_PRO: return "Hermes 2 Pro"; case COMMON_CHAT_FORMAT_COMMAND_R7B: return "Command R7B"; default: throw std::runtime_error("Unknown chat format"); } }
O3
cpp
common_chat_format_name[abi:cxx11](common_chat_format): pushq %r14 pushq %rbx pushq %rax cmpl $0xa, %esi ja 0xd0f0f movq %rdi, %rbx movl %esi, %eax leaq 0x258db(%rip), %rcx # 0xf66c4 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x268fc(%rip), %rsi # 0xf76fc leaq 0x26901(%rip), %rdx # 0xf7708 jmp 0xd0efc leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x2690e(%rip), %rsi # 0xf7728 leaq 0x26923(%rip), %rdx # 0xf7744 jmp 0xd0efc leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x26959(%rip), %rsi # 0xf778d leaq 0x2695e(%rip), %rdx # 0xf7799 jmp 0xd0efc leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x268c3(%rip), %rsi # 0xf7711 leaq 0x268c8(%rip), %rdx # 0xf771d jmp 0xd0efc leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x268b6(%rip), %rsi # 0xf771e leaq 0x268b8(%rip), %rdx # 0xf7727 jmp 0xd0efc leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x268df(%rip), %rsi # 0xf7761 leaq 0x268e8(%rip), %rdx # 0xf7771 jmp 0xd0efc leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x26870(%rip), %rsi # 0xf7709 leaq 0x26870(%rip), %rdx # 0xf7710 jmp 0xd0efc leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x26895(%rip), %rsi # 0xf7745 leaq 0x26899(%rip), %rdx # 0xf7750 jmp 0xd0efc leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x2688a(%rip), %rsi # 0xf7751 leaq 0x26892(%rip), %rdx # 0xf7760 jmp 0xd0efc leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x268bc(%rip), %rsi # 0xf779a leaq 0x268c0(%rip), %rdx # 0xf77a5 jmp 0xd0efc leaq 0x10(%rbx), %rax movq %rax, (%rbx) leaq 0x2687d(%rip), %rsi # 0xf7772 leaq 0x26890(%rip), %rdx # 0xf778c movq %rbx, %rdi callq 0x22806 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq movl $0x10, %edi callq 0x1a460 movq %rax, %rbx leaq 0x26883(%rip), %rsi # 0xf77a6 movq %rax, %rdi callq 0x1a340 movq 0x5c0b6(%rip), %rsi # 0x12cfe8 movq 0x5c017(%rip), %rdx # 0x12cf50 movq %rbx, %rdi callq 0x1af10 movq %rax, %r14 movq %rbx, %rdi callq 0x1a690 movq %r14, %rdi callq 0x1af90
_Z23common_chat_format_nameB5cxx1118common_chat_format: push r14 push rbx push rax cmp esi, 0Ah; switch 11 cases ja def_D0DF0; jumptable 00000000000D0DF0 default case mov rbx, rdi mov eax, esi lea rcx, jpt_D0DF0 movsxd rax, ds:(jpt_D0DF0 - 0F66C4h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_D0DF2: lea rax, [rbx+10h]; jumptable 00000000000D0DF0 case 0 mov [rbx], rax lea rsi, aContentOnly; "Content-only" lea rdx, aContentOnly+0Ch; "" jmp loc_D0EFC loc_D0E0C: lea rax, [rbx+10h]; jumptable 00000000000D0DF0 case 4 mov [rbx], rax lea rsi, aLlama3XWithBui; "Llama 3.x with builtin tools" lea rdx, aLlama3XWithBui+1Ch; "" jmp loc_D0EFC loc_D0E26: lea rax, [rbx+10h]; jumptable 00000000000D0DF0 case 9 mov [rbx], rax lea rsi, aHermes2Pro; "Hermes 2 Pro" lea rdx, aHermes2Pro+0Ch; "" jmp loc_D0EFC loc_D0E40: lea rax, [rbx+10h]; jumptable 00000000000D0DF0 case 2 mov [rbx], rax lea rsi, aMistralNemo; "Mistral Nemo" lea rdx, aMistralNemo+0Ch; "" jmp loc_D0EFC loc_D0E5A: lea rax, [rbx+10h]; jumptable 00000000000D0DF0 case 3 mov [rbx], rax lea rsi, aLlama3X; "Llama 3.x" lea rdx, aLlama3X+9; "" jmp loc_D0EFC loc_D0E74: lea rax, [rbx+10h]; jumptable 00000000000D0DF0 case 7 mov [rbx], rax lea rsi, aFunctionaryV32; "Functionary v3.2" lea rdx, aFunctionaryV32+10h; "" jmp short loc_D0EFC loc_D0E8B: lea rax, [rbx+10h]; jumptable 00000000000D0DF0 case 1 mov [rbx], rax lea rsi, aGeneric; "Generic" lea rdx, aGeneric+7; "" jmp short loc_D0EFC loc_D0EA2: lea rax, [rbx+10h]; jumptable 00000000000D0DF0 case 5 mov [rbx], rax lea rsi, aDeepseekR1; "DeepSeek R1" lea rdx, aDeepseekR1+0Bh; "" jmp short loc_D0EFC loc_D0EB9: lea rax, [rbx+10h]; jumptable 00000000000D0DF0 case 6 mov [rbx], rax lea rsi, aFirefunctionV2; "FireFunction v2" lea rdx, aFirefunctionV2+0Fh; "" jmp short loc_D0EFC loc_D0ED0: lea rax, [rbx+10h]; jumptable 00000000000D0DF0 case 10 mov [rbx], rax lea rsi, aCommandR7b; "Command R7B" lea rdx, aCommandR7b+0Bh; "" jmp short loc_D0EFC loc_D0EE7: lea rax, [rbx+10h]; jumptable 00000000000D0DF0 case 8 mov [rbx], rax lea rsi, aFunctionaryV31; "Functionary v3.1 Llama 3.1" lea rdx, aFunctionaryV31+1Ah; "" loc_D0EFC: mov rdi, rbx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_M_constructIPKcEEvT_S8_St20forward_iterator_tag; std::string::_M_construct<char const*>(char const*,char const*,std::forward_iterator_tag) mov rax, rbx add rsp, 8 pop rbx pop r14 retn def_D0DF0: mov edi, 10h; jumptable 00000000000D0DF0 default case call ___cxa_allocate_exception mov rbx, rax lea rsi, aUnknownChatFor; "Unknown chat format" mov rdi, rax; this call __ZNSt13runtime_errorC1EPKc; std::runtime_error::runtime_error(char const*) mov rsi, cs:_ZTISt13runtime_error_ptr; lptinfo mov rdx, cs:_ZTISt19_Sp_make_shared_tag; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
_QWORD * common_chat_format_name[abi:cxx11](_QWORD *a1, int a2) { char *v2; // rsi char *v3; // rdx std::runtime_error *exception; // rbx switch ( a2 ) { case 0: *a1 = a1 + 2; v2 = "Content-only"; v3 = ""; break; case 1: *a1 = a1 + 2; v2 = "Generic"; v3 = ""; break; case 2: *a1 = a1 + 2; v2 = "Mistral Nemo"; v3 = ""; break; case 3: *a1 = a1 + 2; v2 = "Llama 3.x"; v3 = ""; break; case 4: *a1 = a1 + 2; v2 = "Llama 3.x with builtin tools"; v3 = ""; break; case 5: *a1 = a1 + 2; v2 = "DeepSeek R1"; v3 = ""; break; case 6: *a1 = a1 + 2; v2 = "FireFunction v2"; v3 = ""; break; case 7: *a1 = a1 + 2; v2 = "Functionary v3.2"; v3 = ""; break; case 8: *a1 = a1 + 2; v2 = "Functionary v3.1 Llama 3.1"; v3 = ""; break; case 9: *a1 = a1 + 2; v2 = "Hermes 2 Pro"; v3 = ""; break; case 10: *a1 = a1 + 2; v2 = "Command R7B"; v3 = ""; break; default: exception = (std::runtime_error *)__cxa_allocate_exception(0x10uLL); std::runtime_error::runtime_error(exception, "Unknown chat format"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::runtime_error, (void (*)(void *))&std::runtime_error::~runtime_error); } std::string::_M_construct<char const*>((long long)a1, v2, (long long)v3); return a1; }
common_chat_format_name[abi:cxx11]: PUSH R14 PUSH RBX PUSH RAX CMP ESI,0xa JA 0x001d0f0f MOV RBX,RDI MOV EAX,ESI LEA RCX,[0x1f66c4] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_0: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1f76fc] LEA RDX,[0x1f7708] JMP 0x001d0efc caseD_4: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1f7728] LEA RDX,[0x1f7744] JMP 0x001d0efc caseD_9: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1f778d] LEA RDX,[0x1f7799] JMP 0x001d0efc caseD_2: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1f7711] LEA RDX,[0x1f771d] JMP 0x001d0efc caseD_3: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1f771e] LEA RDX,[0x1f7727] JMP 0x001d0efc caseD_7: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1f7761] LEA RDX,[0x1f7771] JMP 0x001d0efc caseD_1: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1f7709] LEA RDX,[0x1f7710] JMP 0x001d0efc caseD_5: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1f7745] LEA RDX,[0x1f7750] JMP 0x001d0efc caseD_6: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1f7751] LEA RDX,[0x1f7760] JMP 0x001d0efc caseD_a: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1f779a] LEA RDX,[0x1f77a5] JMP 0x001d0efc caseD_8: LEA RAX,[RBX + 0x10] MOV qword ptr [RBX],RAX LEA RSI,[0x1f7772] LEA RDX,[0x1f778c] LAB_001d0efc: MOV RDI,RBX CALL 0x00122806 MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET default: MOV EDI,0x10 CALL 0x0011a460 MOV RBX,RAX LAB_001d0f1c: LEA RSI,[0x1f77a6] MOV RDI,RAX CALL 0x0011a340 LAB_001d0f2b: MOV RSI,qword ptr [0x0022cfe8] MOV RDX,qword ptr [0x0022cf50] MOV RDI,RBX CALL 0x0011af10
/* common_chat_format_name[abi:cxx11](common_chat_format) */ long * common_chat_format_name_abi_cxx11_(long *param_1,int4 param_2) { runtime_error *this; char *pcVar1; char *pcVar2; switch(param_2) { case 0: *param_1 = (long)(param_1 + 2); pcVar2 = "Content-only"; pcVar1 = ""; break; case 1: *param_1 = (long)(param_1 + 2); pcVar2 = "Generic"; pcVar1 = ""; break; case 2: *param_1 = (long)(param_1 + 2); pcVar2 = "Mistral Nemo"; pcVar1 = ""; break; case 3: *param_1 = (long)(param_1 + 2); pcVar2 = "Llama 3.x"; pcVar1 = ""; break; case 4: *param_1 = (long)(param_1 + 2); pcVar2 = "Llama 3.x with builtin tools"; pcVar1 = ""; break; case 5: *param_1 = (long)(param_1 + 2); pcVar2 = "DeepSeek R1"; pcVar1 = ""; break; case 6: *param_1 = (long)(param_1 + 2); pcVar2 = "FireFunction v2"; pcVar1 = ""; break; case 7: *param_1 = (long)(param_1 + 2); pcVar2 = "Functionary v3.2"; pcVar1 = ""; break; case 8: *param_1 = (long)(param_1 + 2); pcVar2 = "Functionary v3.1 Llama 3.1"; pcVar1 = ""; break; case 9: *param_1 = (long)(param_1 + 2); pcVar2 = "Hermes 2 Pro"; pcVar1 = ""; break; case 10: *param_1 = (long)(param_1 + 2); pcVar2 = "Command R7B"; pcVar1 = ""; break; default: this = (runtime_error *)__cxa_allocate_exception(0x10); /* try { // try from 001d0f1c to 001d0f2a has its CatchHandler @ 001d0f41 */ std::runtime_error::runtime_error(this,"Unknown chat format"); /* WARNING: Subroutine does not return */ __cxa_throw(this,PTR_typeinfo_0022cfe8,PTR__runtime_error_0022cf50); } std::__cxx11::string::_M_construct<char_const*>(param_1,pcVar2,pcVar1); return param_1; }
7,957
minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&)
monkey531[P]llama/common/minja.hpp
MacroTemplateToken(const Location & location, SpaceHandling pre, SpaceHandling post, std::shared_ptr<VariableExpr> && n, Expression::Parameters && p) : TemplateToken(Type::Macro, location, pre, post), name(std::move(n)), params(std::move(p)) {}
O2
cpp
minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::shared_ptr<minja::Expression>>>>&&): pushq %r15 pushq %r14 pushq %rbx movq %r9, %rbx movq %r8, %r14 movl %ecx, %r8d movl %edx, %ecx movq %rsi, %rdx movq %rdi, %r15 pushq $0xd popq %rsi callq 0x60d6a leaq 0x89c01(%rip), %rax # 0xfade8 addq $0x10, %rax movq %rax, (%r15) andq $0x0, 0x38(%r15) movups (%r14), %xmm0 andq $0x0, 0x8(%r14) movups %xmm0, 0x30(%r15) andq $0x0, (%r14) movups (%rbx), %xmm0 movups %xmm0, 0x40(%r15) movq 0x10(%rbx), %rax movq %rax, 0x50(%r15) xorps %xmm0, %xmm0 movups %xmm0, (%rbx) andq $0x0, 0x10(%rbx) popq %rbx popq %r14 popq %r15 retq
_ZN5minja18MacroTemplateTokenC2ERKNS_8LocationENS_13SpaceHandlingES4_OSt10shared_ptrINS_12VariableExprEEOSt6vectorISt4pairINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES5_INS_10ExpressionEEESaISJ_EE: push r15 push r14 push rbx mov rbx, r9 mov r14, r8 mov r8d, ecx mov ecx, edx mov rdx, rsi mov r15, rdi push 0Dh pop rsi call _ZN5minja13TemplateTokenC2ENS0_4TypeERKNS_8LocationENS_13SpaceHandlingES5_; minja::TemplateToken::TemplateToken(minja::TemplateToken::Type,minja::Location const&,minja::SpaceHandling,minja::SpaceHandling) lea rax, _ZTVN5minja18MacroTemplateTokenE; `vtable for'minja::MacroTemplateToken add rax, 10h mov [r15], rax and qword ptr [r15+38h], 0 movups xmm0, xmmword ptr [r14] and qword ptr [r14+8], 0 movups xmmword ptr [r15+30h], xmm0 and qword ptr [r14], 0 movups xmm0, xmmword ptr [rbx] movups xmmword ptr [r15+40h], xmm0 mov rax, [rbx+10h] mov [r15+50h], rax xorps xmm0, xmm0 movups xmmword ptr [rbx], xmm0 and qword ptr [rbx+10h], 0 pop rbx pop r14 pop r15 retn
long long minja::MacroTemplateToken::MacroTemplateToken( long long a1, long long a2, int a3, int a4, __int128 *a5, long long a6) { __int128 v8; // xmm0 long long result; // rax minja::TemplateToken::TemplateToken(a1, 13, a2, a3, a4); *(_QWORD *)a1 = &`vtable for'minja::MacroTemplateToken + 2; *(_QWORD *)(a1 + 56) = 0LL; v8 = *a5; *((_QWORD *)a5 + 1) = 0LL; *(_OWORD *)(a1 + 48) = v8; *(_QWORD *)a5 = 0LL; *(_OWORD *)(a1 + 64) = *(_OWORD *)a6; result = *(_QWORD *)(a6 + 16); *(_QWORD *)(a1 + 80) = result; *(_OWORD *)a6 = 0LL; *(_QWORD *)(a6 + 16) = 0LL; return result; }
MacroTemplateToken: PUSH R15 PUSH R14 PUSH RBX MOV RBX,R9 MOV R14,R8 MOV R8D,ECX MOV ECX,EDX MOV RDX,RSI MOV R15,RDI PUSH 0xd POP RSI CALL 0x00160d6a LEA RAX,[0x1fade8] ADD RAX,0x10 MOV qword ptr [R15],RAX AND qword ptr [R15 + 0x38],0x0 MOVUPS XMM0,xmmword ptr [R14] AND qword ptr [R14 + 0x8],0x0 MOVUPS xmmword ptr [R15 + 0x30],XMM0 AND qword ptr [R14],0x0 MOVUPS XMM0,xmmword ptr [RBX] MOVUPS xmmword ptr [R15 + 0x40],XMM0 MOV RAX,qword ptr [RBX + 0x10] MOV qword ptr [R15 + 0x50],RAX XORPS XMM0,XMM0 MOVUPS xmmword ptr [RBX],XMM0 AND qword ptr [RBX + 0x10],0x0 POP RBX POP R14 POP R15 RET
/* minja::MacroTemplateToken::MacroTemplateToken(minja::Location const&, minja::SpaceHandling, minja::SpaceHandling, std::shared_ptr<minja::VariableExpr>&&, std::vector<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> >, std::allocator<std::pair<std::__cxx11::string, std::shared_ptr<minja::Expression> > > >&&) */ void __thiscall minja::MacroTemplateToken::MacroTemplateToken (MacroTemplateToken *this,int8 param_1,int4 param_3,int4 param_4, int8 *param_5,int8 *param_6) { int8 uVar1; TemplateToken::TemplateToken((TemplateToken *)this,0xd,param_1,param_3,param_4); *(int ***)this = &PTR__MacroTemplateToken_001fadf8; *(int8 *)(this + 0x38) = 0; uVar1 = param_5[1]; param_5[1] = 0; *(int8 *)(this + 0x30) = *param_5; *(int8 *)(this + 0x38) = uVar1; *param_5 = 0; uVar1 = param_6[1]; *(int8 *)(this + 0x40) = *param_6; *(int8 *)(this + 0x48) = uVar1; *(int8 *)(this + 0x50) = param_6[2]; *param_6 = 0; param_6[1] = 0; param_6[2] = 0; return; }
7,958
dump_header_page
eloqsql/storage/maria/ma_loghandler.c
static void dump_header_page(uchar *buff) { LOGHANDLER_FILE_INFO desc; char strbuff[21]; struct tm tmp_tm; time_t header_time; translog_interpret_file_header(&desc, buff); header_time= desc.timestamp/1000000ULL; localtime_r(&header_time, &tmp_tm); printf(" This can be header page:\n" " Timestamp: %04d.%02d.%02d %02d.%02d.%02d (%s)\n" " Aria log version: %lu\n" " Server version: %lu\n" " Server id %lu\n" " Page size %lu\n", tmp_tm.tm_year+1900, tmp_tm.tm_mon+1, tmp_tm.tm_mday, tmp_tm.tm_hour, tmp_tm.tm_min, tmp_tm.tm_sec, llstr(desc.timestamp, strbuff), desc.maria_version, desc.mysql_version, desc.server_id, desc.page_size); if (desc.page_size != TRANSLOG_PAGE_SIZE) printf(" WARNING: page size is not equal compiled in one %lu!!!\n", (ulong) TRANSLOG_PAGE_SIZE); printf(" File number %lu\n" " Max lsn: " LSN_FMT "\n", desc.file_number, LSN_IN_PARTS(desc.max_lsn)); }
O0
c
dump_header_page: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %rbx subq $0xf8, %rsp movq %fs:0x28, %rax movq %rax, -0x20(%rbp) movq %rdi, -0x48(%rbp) movq -0x48(%rbp), %rsi leaq -0x80(%rbp), %rdi callq 0x2e620 movq -0x78(%rbp), %rax movl $0xf4240, %ecx # imm = 0xF4240 xorl %edx, %edx divq %rcx movq %rax, -0xc0(%rbp) leaq -0xc0(%rbp), %rdi leaq -0xb8(%rbp), %rsi callq 0x2a110 movl -0xa4(%rbp), %eax addl $0x76c, %eax # imm = 0x76C movl %eax, -0xd4(%rbp) movl -0xa8(%rbp), %eax addl $0x1, %eax movl %eax, -0xd0(%rbp) movl -0xac(%rbp), %eax movl %eax, -0xcc(%rbp) movl -0xb0(%rbp), %eax movl %eax, -0xc8(%rbp) movl -0xb4(%rbp), %eax movl %eax, -0xc4(%rbp) movl -0xb8(%rbp), %r15d movq -0x78(%rbp), %rdi leaq -0x40(%rbp), %rsi callq 0x14b520 movl -0xd4(%rbp), %esi movl -0xd0(%rbp), %edx movl -0xcc(%rbp), %ecx movl -0xc8(%rbp), %r8d movl -0xc4(%rbp), %r9d movq %rax, %r14 movq -0x70(%rbp), %rbx movq -0x68(%rbp), %r11 movq -0x60(%rbp), %r10 movq -0x58(%rbp), %rax leaq 0x11bc5b(%rip), %rdi # 0x152d83 movl %r15d, (%rsp) movq %r14, 0x8(%rsp) movq %rbx, 0x10(%rsp) movq %r11, 0x18(%rsp) movq %r10, 0x20(%rsp) movq %rax, 0x28(%rsp) movb $0x0, %al callq 0x2a050 cmpq $0x2000, -0x58(%rbp) # imm = 0x2000 je 0x37169 leaq 0x11bccb(%rip), %rdi # 0x152e28 movl $0x2000, %esi # imm = 0x2000 movb $0x0, %al callq 0x2a050 movq -0x80(%rbp), %rax movq -0x50(%rbp), %rsi movq %rax, %rcx shrq $0x20, %rcx movl %ecx, %edx movl %eax, %ecx leaq 0x11bce3(%rip), %rdi # 0x152e66 xorl %eax, %eax callq 0x2a050 movq %fs:0x28, %rax movq -0x20(%rbp), %rcx cmpq %rcx, %rax jne 0x371aa addq $0xf8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq callq 0x2a260 nop
dump_header_page: push rbp mov rbp, rsp push r15 push r14 push rbx sub rsp, 0F8h mov rax, fs:28h mov [rbp+var_20], rax mov [rbp+var_48], rdi mov rsi, [rbp+var_48] lea rdi, [rbp+var_80] call translog_interpret_file_header mov rax, [rbp+var_78] mov ecx, 0F4240h xor edx, edx div rcx mov [rbp+var_C0], rax lea rdi, [rbp+var_C0] lea rsi, [rbp+var_B8] call _localtime_r mov eax, [rbp+var_A4] add eax, 76Ch mov [rbp+var_D4], eax mov eax, [rbp+var_A8] add eax, 1 mov [rbp+var_D0], eax mov eax, [rbp+var_AC] mov [rbp+var_CC], eax mov eax, [rbp+var_B0] mov [rbp+var_C8], eax mov eax, [rbp+var_B4] mov [rbp+var_C4], eax mov r15d, [rbp+var_B8] mov rdi, [rbp+var_78] lea rsi, [rbp+var_40] call llstr mov esi, [rbp+var_D4] mov edx, [rbp+var_D0] mov ecx, [rbp+var_CC] mov r8d, [rbp+var_C8] mov r9d, [rbp+var_C4] mov r14, rax mov rbx, [rbp+var_70] mov r11, [rbp+var_68] mov r10, [rbp+var_60] mov rax, [rbp+var_58] lea rdi, aThisCanBeHeade; " This can be header page:\n Timesta"... mov [rsp+110h+var_110], r15d mov [rsp+110h+var_108], r14 mov [rsp+110h+var_100], rbx mov [rsp+110h+var_F8], r11 mov [rsp+110h+var_F0], r10 mov [rsp+110h+var_E8], rax mov al, 0 call _printf cmp [rbp+var_58], 2000h jz short loc_37169 lea rdi, aWarningPageSiz; " WARNING: page size is not equal c"... mov esi, 2000h mov al, 0 call _printf loc_37169: mov rax, [rbp+var_80] mov rsi, [rbp+var_50] mov rcx, rax shr rcx, 20h mov edx, ecx mov ecx, eax lea rdi, aFileNumberLuMa; " File number %lu\n Max lsn: (%u,0"... xor eax, eax call _printf mov rax, fs:28h mov rcx, [rbp+var_20] cmp rax, rcx jnz short loc_371AA add rsp, 0F8h pop rbx pop r14 pop r15 pop rbp retn loc_371AA: call ___stack_chk_fail
unsigned long long dump_header_page(long long a1) { int v1; // r15d const char *v2; // rax int v4; // [rsp+3Ch] [rbp-D4h] int v5; // [rsp+40h] [rbp-D0h] int v6; // [rsp+44h] [rbp-CCh] int v7; // [rsp+48h] [rbp-C8h] int v8; // [rsp+4Ch] [rbp-C4h] unsigned long long v9; // [rsp+50h] [rbp-C0h] BYREF _DWORD v10[14]; // [rsp+58h] [rbp-B8h] BYREF unsigned long long v11; // [rsp+90h] [rbp-80h] BYREF unsigned long long v12; // [rsp+98h] [rbp-78h] long long v13; // [rsp+A0h] [rbp-70h] long long v14; // [rsp+A8h] [rbp-68h] long long v15; // [rsp+B0h] [rbp-60h] long long v16; // [rsp+B8h] [rbp-58h] long long v17; // [rsp+C0h] [rbp-50h] long long v18; // [rsp+C8h] [rbp-48h] _BYTE v19[32]; // [rsp+D0h] [rbp-40h] BYREF unsigned long long v20; // [rsp+F0h] [rbp-20h] v20 = __readfsqword(0x28u); v18 = a1; translog_interpret_file_header(&v11, a1); v9 = v12 / 0xF4240; localtime_r(&v9, v10, v12 % 0xF4240); v4 = v10[5] + 1900; v5 = v10[4] + 1; v6 = v10[3]; v7 = v10[2]; v8 = v10[1]; v1 = v10[0]; v2 = (const char *)llstr(v12, v19); printf( " This can be header page:\n" " Timestamp: %04d.%02d.%02d %02d.%02d.%02d (%s)\n" " Aria log version: %lu\n" " Server version: %lu\n" " Server id %lu\n" " Page size %lu\n", v4, v5, v6, v7, v8, v1, v2, v13, v14, v15, v16); if ( v16 != 0x2000 ) printf(" WARNING: page size is not equal compiled in one %lu!!!\n", 0x2000LL); printf(" File number %lu\n Max lsn: (%u,0x%x)\n", v17, HIDWORD(v11), v11); return __readfsqword(0x28u); }
dump_header_page: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0xf8 MOV RAX,qword ptr FS:[0x28] MOV qword ptr [RBP + -0x20],RAX MOV qword ptr [RBP + -0x48],RDI MOV RSI,qword ptr [RBP + -0x48] LEA RDI,[RBP + -0x80] CALL 0x0012e620 MOV RAX,qword ptr [RBP + -0x78] MOV ECX,0xf4240 XOR EDX,EDX DIV RCX MOV qword ptr [RBP + -0xc0],RAX LEA RDI,[RBP + -0xc0] LEA RSI,[RBP + -0xb8] CALL 0x0012a110 MOV EAX,dword ptr [RBP + -0xa4] ADD EAX,0x76c MOV dword ptr [RBP + -0xd4],EAX MOV EAX,dword ptr [RBP + -0xa8] ADD EAX,0x1 MOV dword ptr [RBP + -0xd0],EAX MOV EAX,dword ptr [RBP + -0xac] MOV dword ptr [RBP + -0xcc],EAX MOV EAX,dword ptr [RBP + -0xb0] MOV dword ptr [RBP + -0xc8],EAX MOV EAX,dword ptr [RBP + -0xb4] MOV dword ptr [RBP + -0xc4],EAX MOV R15D,dword ptr [RBP + -0xb8] MOV RDI,qword ptr [RBP + -0x78] LEA RSI,[RBP + -0x40] CALL 0x0024b520 MOV ESI,dword ptr [RBP + -0xd4] MOV EDX,dword ptr [RBP + -0xd0] MOV ECX,dword ptr [RBP + -0xcc] MOV R8D,dword ptr [RBP + -0xc8] MOV R9D,dword ptr [RBP + -0xc4] MOV R14,RAX MOV RBX,qword ptr [RBP + -0x70] MOV R11,qword ptr [RBP + -0x68] MOV R10,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x58] LEA RDI,[0x252d83] MOV dword ptr [RSP],R15D MOV qword ptr [RSP + 0x8],R14 MOV qword ptr [RSP + 0x10],RBX MOV qword ptr [RSP + 0x18],R11 MOV qword ptr [RSP + 0x20],R10 MOV qword ptr [RSP + 0x28],RAX MOV AL,0x0 CALL 0x0012a050 CMP qword ptr [RBP + -0x58],0x2000 JZ 0x00137169 LEA RDI,[0x252e28] MOV ESI,0x2000 MOV AL,0x0 CALL 0x0012a050 LAB_00137169: MOV RAX,qword ptr [RBP + -0x80] MOV RSI,qword ptr [RBP + -0x50] MOV RCX,RAX SHR RCX,0x20 MOV EDX,ECX MOV ECX,EAX LEA RDI,[0x252e66] XOR EAX,EAX CALL 0x0012a050 MOV RAX,qword ptr FS:[0x28] MOV RCX,qword ptr [RBP + -0x20] CMP RAX,RCX JNZ 0x001371aa ADD RSP,0xf8 POP RBX POP R14 POP R15 POP RBP RET LAB_001371aa: CALL 0x0012a260
void dump_header_page(int8 param_1) { int8 uVar1; long in_FS_OFFSET; ulong local_c8; tm local_c0; ulong local_88; ulong local_80; int8 local_78; int8 local_70; int8 local_68; long local_60; int8 local_58; int8 local_50; int1 local_48 [32]; long local_28; local_28 = *(long *)(in_FS_OFFSET + 0x28); local_50 = param_1; translog_interpret_file_header(&local_88,param_1); local_c8 = local_80 / 1000000; localtime_r((time_t *)&local_c8,&local_c0); uVar1 = llstr(local_80,local_48); printf(" This can be header page:\n Timestamp: %04d.%02d.%02d %02d.%02d.%02d (%s)\n Aria log version: %lu\n Server version: %lu\n Server id %lu\n Page size %lu\n" ,(ulong)(local_c0.tm_year + 0x76c),(ulong)(local_c0.tm_mon + 1), (ulong)(uint)local_c0.tm_mday,(ulong)(uint)local_c0.tm_hour,(ulong)(uint)local_c0.tm_min, local_c0.tm_sec,uVar1,local_78,local_70,local_68,local_60); if (local_60 != 0x2000) { printf(" WARNING: page size is not equal compiled in one %lu!!!\n",0x2000); } printf(" File number %lu\n Max lsn: (%u,0x%x)\n",local_58,local_88 >> 0x20, local_88 & 0xffffffff); if (*(long *)(in_FS_OFFSET + 0x28) == local_28) { return; } /* WARNING: Subroutine does not return */ __stack_chk_fail(); }
7,959
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp)
monkey531[P]llama/common/json.hpp
inline void grisu2_digit_gen(char* buffer, int& length, int& decimal_exponent, diyfp M_minus, diyfp w, diyfp M_plus) { static_assert(kAlpha >= -60, "internal error"); static_assert(kGamma <= -32, "internal error"); // Generates the digits (and the exponent) of a decimal floating-point // number V = buffer * 10^decimal_exponent in the range [M-, M+]. The diyfp's // w, M- and M+ share the same exponent e, which satisfies alpha <= e <= gamma. // // <--------------------------- delta ----> // <---- dist ---------> // --------------[------------------+-------------------]-------------- // M- w M+ // // Grisu2 generates the digits of M+ from left to right and stops as soon as // V is in [M-,M+]. JSON_ASSERT(M_plus.e >= kAlpha); JSON_ASSERT(M_plus.e <= kGamma); std::uint64_t delta = diyfp::sub(M_plus, M_minus).f; // (significand of (M+ - M-), implicit exponent is e) std::uint64_t dist = diyfp::sub(M_plus, w ).f; // (significand of (M+ - w ), implicit exponent is e) // Split M+ = f * 2^e into two parts p1 and p2 (note: e < 0): // // M+ = f * 2^e // = ((f div 2^-e) * 2^-e + (f mod 2^-e)) * 2^e // = ((p1 ) * 2^-e + (p2 )) * 2^e // = p1 + p2 * 2^e const diyfp one(std::uint64_t{1} << -M_plus.e, M_plus.e); auto p1 = static_cast<std::uint32_t>(M_plus.f >> -one.e); // p1 = f div 2^-e (Since -e >= 32, p1 fits into a 32-bit int.) std::uint64_t p2 = M_plus.f & (one.f - 1); // p2 = f mod 2^-e // 1) // // Generate the digits of the integral part p1 = d[n-1]...d[1]d[0] JSON_ASSERT(p1 > 0); std::uint32_t pow10{}; const int k = find_largest_pow10(p1, pow10); // 10^(k-1) <= p1 < 10^k, pow10 = 10^(k-1) // // p1 = (p1 div 10^(k-1)) * 10^(k-1) + (p1 mod 10^(k-1)) // = (d[k-1] ) * 10^(k-1) + (p1 mod 10^(k-1)) // // M+ = p1 + p2 * 2^e // = d[k-1] * 10^(k-1) + (p1 mod 10^(k-1)) + p2 * 2^e // = d[k-1] * 10^(k-1) + ((p1 mod 10^(k-1)) * 2^-e + p2) * 2^e // = d[k-1] * 10^(k-1) + ( rest) * 2^e // // Now generate the digits d[n] of p1 from left to right (n = k-1,...,0) // // p1 = d[k-1]...d[n] * 10^n + d[n-1]...d[0] // // but stop as soon as // // rest * 2^e = (d[n-1]...d[0] * 2^-e + p2) * 2^e <= delta * 2^e int n = k; while (n > 0) { // Invariants: // M+ = buffer * 10^n + (p1 + p2 * 2^e) (buffer = 0 for n = k) // pow10 = 10^(n-1) <= p1 < 10^n // const std::uint32_t d = p1 / pow10; // d = p1 div 10^(n-1) const std::uint32_t r = p1 % pow10; // r = p1 mod 10^(n-1) // // M+ = buffer * 10^n + (d * 10^(n-1) + r) + p2 * 2^e // = (buffer * 10 + d) * 10^(n-1) + (r + p2 * 2^e) // JSON_ASSERT(d <= 9); buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d // // M+ = buffer * 10^(n-1) + (r + p2 * 2^e) // p1 = r; n--; // // M+ = buffer * 10^n + (p1 + p2 * 2^e) // pow10 = 10^n // // Now check if enough digits have been generated. // Compute // // p1 + p2 * 2^e = (p1 * 2^-e + p2) * 2^e = rest * 2^e // // Note: // Since rest and delta share the same exponent e, it suffices to // compare the significands. const std::uint64_t rest = (std::uint64_t{p1} << -one.e) + p2; if (rest <= delta) { // V = buffer * 10^n, with M- <= V <= M+. decimal_exponent += n; // We may now just stop. But instead look if the buffer could be // decremented to bring V closer to w. // // pow10 = 10^n is now 1 ulp in the decimal representation V. // The rounding procedure works with diyfp's with an implicit // exponent of e. // // 10^n = (10^n * 2^-e) * 2^e = ulp * 2^e // const std::uint64_t ten_n = std::uint64_t{pow10} << -one.e; grisu2_round(buffer, length, dist, delta, rest, ten_n); return; } pow10 /= 10; // // pow10 = 10^(n-1) <= p1 < 10^n // Invariants restored. } // 2) // // The digits of the integral part have been generated: // // M+ = d[k-1]...d[1]d[0] + p2 * 2^e // = buffer + p2 * 2^e // // Now generate the digits of the fractional part p2 * 2^e. // // Note: // No decimal point is generated: the exponent is adjusted instead. // // p2 actually represents the fraction // // p2 * 2^e // = p2 / 2^-e // = d[-1] / 10^1 + d[-2] / 10^2 + ... // // Now generate the digits d[-m] of p1 from left to right (m = 1,2,...) // // p2 * 2^e = d[-1]d[-2]...d[-m] * 10^-m // + 10^-m * (d[-m-1] / 10^1 + d[-m-2] / 10^2 + ...) // // using // // 10^m * p2 = ((10^m * p2) div 2^-e) * 2^-e + ((10^m * p2) mod 2^-e) // = ( d) * 2^-e + ( r) // // or // 10^m * p2 * 2^e = d + r * 2^e // // i.e. // // M+ = buffer + p2 * 2^e // = buffer + 10^-m * (d + r * 2^e) // = (buffer * 10^m + d) * 10^-m + 10^-m * r * 2^e // // and stop as soon as 10^-m * r * 2^e <= delta * 2^e JSON_ASSERT(p2 > delta); int m = 0; for (;;) { // Invariant: // M+ = buffer * 10^-m + 10^-m * (d[-m-1] / 10 + d[-m-2] / 10^2 + ...) * 2^e // = buffer * 10^-m + 10^-m * (p2 ) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * (10 * p2) ) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + (10*p2 mod 2^-e)) * 2^e // JSON_ASSERT(p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10); p2 *= 10; const std::uint64_t d = p2 >> -one.e; // d = (10 * p2) div 2^-e const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e // // M+ = buffer * 10^-m + 10^-m * (1/10 * (d * 2^-e + r) * 2^e // = buffer * 10^-m + 10^-m * (1/10 * (d + r * 2^e)) // = (buffer * 10 + d) * 10^(-m-1) + 10^(-m-1) * r * 2^e // JSON_ASSERT(d <= 9); buffer[length++] = static_cast<char>('0' + d); // buffer := buffer * 10 + d // // M+ = buffer * 10^(-m-1) + 10^(-m-1) * r * 2^e // p2 = r; m++; // // M+ = buffer * 10^-m + 10^-m * p2 * 2^e // Invariant restored. // Check if enough digits have been generated. // // 10^-m * p2 * 2^e <= delta * 2^e // p2 * 2^e <= 10^m * delta * 2^e // p2 <= 10^m * delta delta *= 10; dist *= 10; if (p2 <= delta) { break; } } // V = buffer * 10^-m, with M- <= V <= M+. decimal_exponent -= m; // 1 ulp in the decimal representation is now 10^-m. // Since delta and dist are now scaled by 10^m, we need to do the // same with ulp in order to keep the units in sync. // // 10^m * 10^-m = 1 = 2^-e * 2^e = ten_m * 2^e // const std::uint64_t ten_m = one.f; grisu2_round(buffer, length, dist, delta, p2, ten_m); // By construction this algorithm generates the shortest possible decimal // number (Loitsch, Theorem 6.2) which rounds back to w. // For an input number of precision p, at least // // N = 1 + ceil(p * log_10(2)) // // decimal digits are sufficient to identify all binary floating-point // numbers (Matula, "In-and-Out conversions"). // This implies that the algorithm does not produce more than N decimal // digits. // // N = 17 for p = 53 (IEEE double precision) // N = 9 for p = 24 (IEEE single precision) }
O1
cpp
nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, 0x10(%rsp) movq %rcx, 0x38(%rsp) movl %r8d, 0x40(%rsp) movl 0x98(%rsp), %eax cmpl $-0x3d, %eax jle 0x506b1 movq %rsi, 0x18(%rsp) movq %rdi, 0x20(%rsp) cmpl $-0x1f, %eax jge 0x506cd leaq 0x90(%rsp), %rbx leaq 0x80(%rsp), %r15 leaq 0x38(%rsp), %rsi movq %rbx, %rdi callq 0x50722 movq %rax, %r12 movq %rbx, %rdi movq %r15, %rsi callq 0x50722 xorl %r11d, %r11d subl 0x8(%rbx), %r11d movl $0x1, %esi movl %r11d, %ecx shlq %cl, %rsi movq (%rbx), %r13 movq %r13, %rdx shrq %cl, %rdx testl %edx, %edx je 0x506e9 movq %rax, %r15 movq %rsi, 0x28(%rsp) leaq -0x1(%rsi), %rax cmpl $0x3b9ac9ff, %edx # imm = 0x3B9AC9FF movq 0x20(%rsp), %rdi movq 0x18(%rsp), %r10 movq %rax, 0x8(%rsp) jbe 0x50476 movl $0xa, %r14d movl $0x3b9aca00, %r8d # imm = 0x3B9ACA00 jmp 0x50524 cmpl $0x5f5e0ff, %edx # imm = 0x5F5E0FF jbe 0x5048f movl $0x9, %r14d movl $0x5f5e100, %r8d # imm = 0x5F5E100 jmp 0x50524 cmpl $0x98967f, %edx # imm = 0x98967F jbe 0x504a5 movl $0x8, %r14d movl $0x989680, %r8d # imm = 0x989680 jmp 0x50524 cmpl $0xf423f, %edx # imm = 0xF423F jbe 0x504bb movl $0x7, %r14d movl $0xf4240, %r8d # imm = 0xF4240 jmp 0x50524 cmpl $0x1869f, %edx # imm = 0x1869F jbe 0x504d1 movl $0x6, %r14d movl $0x186a0, %r8d # imm = 0x186A0 jmp 0x50524 cmpl $0x270f, %edx # imm = 0x270F jbe 0x504e7 movl $0x5, %r14d movl $0x2710, %r8d # imm = 0x2710 jmp 0x50524 cmpl $0x3e7, %edx # imm = 0x3E7 jbe 0x504fd movl $0x4, %r14d movl $0x3e8, %r8d # imm = 0x3E8 jmp 0x50524 cmpl $0x63, %edx jbe 0x50510 movl $0x3, %r14d movl $0x64, %r8d jmp 0x50524 xorl %r14d, %r14d cmpl $0xa, %edx setae %r14b leal (%r14,%r14,8), %r8d incl %r8d incl %r14d andq 0x8(%rsp), %r13 testl %r14d, %r14d jle 0x505cc movl %edx, %eax xorl %edx, %edx divl %r8d cmpl $0xa, %eax jae 0x50690 orb $0x30, %al movslq (%r10), %rsi leal 0x1(%rsi), %ecx movl %ecx, (%r10) movl %edx, %ebp movl %r11d, %ecx shlq %cl, %rbp movb %al, (%rdi,%rsi) addq %r13, %rbp movl %r8d, %r9d cmpq %r12, %rbp jbe 0x50575 movl $0xcccccccd, %eax # imm = 0xCCCCCCCD imulq %rax, %r9 shrq $0x23, %r9 movl %r9d, %r8d jmp 0x505be movq 0x10(%rsp), %rcx movl (%rcx), %eax addl %r14d, %eax decl %eax movl %eax, (%rcx) movl %r11d, %ecx shlq %cl, %r9 movq %rdx, 0x30(%rsp) movl (%r10), %esi movq %r15, %rdx movq %r12, %rcx movl %r8d, 0x4(%rsp) movq %rbp, %r8 movq %r11, %rbx callq 0x5076c movl 0x4(%rsp), %r8d movq 0x30(%rsp), %rdx movq %rbx, %r11 movq 0x18(%rsp), %r10 movq 0x20(%rsp), %rdi decl %r14d cmpq %r12, %rbp ja 0x50529 jmp 0x50649 cmpq %r12, %r13 jbe 0x50705 xorl %eax, %eax movabsq $0x199999999999999a, %rdx # imm = 0x199999999999999A movq 0x8(%rsp), %r9 cmpq %rdx, %r13 jae 0x50658 addq %r13, %r13 leaq (%r13,%r13,4), %r13 movq %r13, %rsi movl %r11d, %ecx shrq %cl, %rsi cmpq $0xa, %rsi jae 0x50674 andq %r9, %r13 orb $0x30, %sil movslq (%r10), %rcx leal 0x1(%rcx), %r8d movl %r8d, (%r10) movb %sil, (%rdi,%rcx) addq %r12, %r12 leaq (%r12,%r12,4), %r12 addq %r15, %r15 leaq (%r15,%r15,4), %r15 decl %eax cmpq %r12, %r13 ja 0x505e6 movq 0x10(%rsp), %rcx addl %eax, (%rcx) movl (%r10), %esi movq %r15, %rdx movq %r12, %rcx movq %r13, %r8 movq 0x28(%rsp), %r9 callq 0x5076c addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq leaq 0x6a13b(%rip), %rdi # 0xba79a leaq 0x67b1c(%rip), %rdx # 0xb8182 leaq 0x6a9d8(%rip), %rcx # 0xbb045 movl $0x4505, %esi # imm = 0x4505 jmp 0x506aa leaq 0x6a11f(%rip), %rdi # 0xba79a leaq 0x67b00(%rip), %rdx # 0xb8182 leaq 0x6a9aa(%rip), %rcx # 0xbb033 movl $0x450e, %esi # imm = 0x450E jmp 0x506aa leaq 0x6a103(%rip), %rdi # 0xba79a leaq 0x67ae4(%rip), %rdx # 0xb8182 leaq 0x6a98e(%rip), %rcx # 0xbb033 movl $0x44a3, %esi # imm = 0x44A3 xorl %eax, %eax callq 0x19b30 leaq 0x6a0e2(%rip), %rdi # 0xba79a leaq 0x67ac3(%rip), %rdx # 0xb8182 leaq 0x6a940(%rip), %rcx # 0xbb006 movl $0x4469, %esi # imm = 0x4469 jmp 0x506aa leaq 0x6a0c6(%rip), %rdi # 0xba79a leaq 0x67aa7(%rip), %rdx # 0xb8182 leaq 0x6a937(%rip), %rcx # 0xbb019 movl $0x446a, %esi # imm = 0x446A jmp 0x506aa leaq 0x6a0aa(%rip), %rdi # 0xba79a leaq 0x67a8b(%rip), %rdx # 0xb8182 leaq 0x6a92e(%rip), %rcx # 0xbb02c movl $0x447f, %esi # imm = 0x447F jmp 0x506aa leaq 0x6a08e(%rip), %rdi # 0xba79a leaq 0x67a6f(%rip), %rdx # 0xb8182 leaq 0x6a920(%rip), %rcx # 0xbb03a movl $0x44fa, %esi # imm = 0x44FA jmp 0x506aa nop
_ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl16grisu2_digit_genEPcRiS4_NS2_5diyfpES5_S5_: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov [rsp+78h+var_68], rdx mov [rsp+78h+var_40], rcx mov [rsp+78h+var_38], r8d mov eax, [rsp+78h+arg_18] cmp eax, 0FFFFFFC3h jle loc_506B1 mov [rsp+78h+var_60], rsi mov [rsp+78h+var_58], rdi cmp eax, 0FFFFFFE1h jge loc_506CD lea rbx, [rsp+78h+arg_10] lea r15, [rsp+78h+arg_0] lea rsi, [rsp+78h+var_40] mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3subERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) mov r12, rax mov rdi, rbx mov rsi, r15 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl5diyfp3subERKS3_S5_; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&,nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp const&) xor r11d, r11d sub r11d, [rbx+8] mov esi, 1 mov ecx, r11d shl rsi, cl mov r13, [rbx] mov rdx, r13 shr rdx, cl test edx, edx jz loc_506E9 mov r15, rax mov [rsp+78h+var_50], rsi lea rax, [rsi-1] cmp edx, 3B9AC9FFh mov rdi, [rsp+78h+var_58]; this mov r10, [rsp+78h+var_60] mov [rsp+78h+var_70], rax jbe short loc_50476 mov r14d, 0Ah mov r8d, 3B9ACA00h jmp loc_50524 loc_50476: cmp edx, 5F5E0FFh jbe short loc_5048F mov r14d, 9 mov r8d, 5F5E100h jmp loc_50524 loc_5048F: cmp edx, 98967Fh jbe short loc_504A5 mov r14d, 8 mov r8d, 989680h jmp short loc_50524 loc_504A5: cmp edx, 0F423Fh jbe short loc_504BB mov r14d, 7 mov r8d, 0F4240h jmp short loc_50524 loc_504BB: cmp edx, 1869Fh jbe short loc_504D1 mov r14d, 6 mov r8d, 186A0h jmp short loc_50524 loc_504D1: cmp edx, 270Fh jbe short loc_504E7 mov r14d, 5 mov r8d, 2710h jmp short loc_50524 loc_504E7: cmp edx, 3E7h jbe short loc_504FD mov r14d, 4 mov r8d, 3E8h jmp short loc_50524 loc_504FD: cmp edx, 63h ; 'c' jbe short loc_50510 mov r14d, 3 mov r8d, 64h ; 'd' jmp short loc_50524 loc_50510: xor r14d, r14d cmp edx, 0Ah setnb r14b lea r8d, [r14+r14*8] inc r8d inc r14d loc_50524: and r13, [rsp+78h+var_70] loc_50529: test r14d, r14d jle loc_505CC mov eax, edx xor edx, edx div r8d cmp eax, 0Ah jnb loc_50690 or al, 30h movsxd rsi, dword ptr [r10] lea ecx, [rsi+1] mov [r10], ecx mov ebp, edx mov ecx, r11d shl rbp, cl mov [rdi+rsi], al add rbp, r13 mov r9d, r8d cmp rbp, r12 jbe short loc_50575 mov eax, 0CCCCCCCDh imul r9, rax shr r9, 23h mov r8d, r9d jmp short loc_505BE loc_50575: mov rcx, [rsp+78h+var_68] mov eax, [rcx] add eax, r14d dec eax mov [rcx], eax mov ecx, r11d shl r9, cl; unsigned __int64 mov [rsp+78h+var_48], rdx mov esi, [r10]; char * mov rdx, r15; int mov rcx, r12; unsigned __int64 mov [rsp+78h+var_74], r8d mov r8, rbp; unsigned __int64 mov rbx, r11 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char *,int,ulong,ulong,ulong,ulong) mov r8d, [rsp+78h+var_74] mov rdx, [rsp+78h+var_48] mov r11, rbx mov r10, [rsp+78h+var_60] mov rdi, [rsp+78h+var_58] loc_505BE: dec r14d cmp rbp, r12 ja loc_50529 jmp short loc_50649 loc_505CC: cmp r13, r12 jbe loc_50705 xor eax, eax mov rdx, 199999999999999Ah mov r9, [rsp+78h+var_70] loc_505E6: cmp r13, rdx jnb short loc_50658 add r13, r13 lea r13, [r13+r13*4+0] mov rsi, r13 mov ecx, r11d shr rsi, cl cmp rsi, 0Ah jnb short loc_50674 and r13, r9 or sil, 30h movsxd rcx, dword ptr [r10] lea r8d, [rcx+1] mov [r10], r8d mov [rdi+rcx], sil add r12, r12 lea r12, [r12+r12*4] add r15, r15 lea r15, [r15+r15*4] dec eax cmp r13, r12 ja short loc_505E6 mov rcx, [rsp+78h+var_68] add [rcx], eax mov esi, [r10]; char * mov rdx, r15; int mov rcx, r12; unsigned __int64 mov r8, r13; unsigned __int64 mov r9, [rsp+78h+var_50]; unsigned __int64 call _ZN8nlohmann16json_abi_v3_11_36detail9dtoa_impl12grisu2_roundEPcimmmm; nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(char *,int,ulong,ulong,ulong,ulong) loc_50649: add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_50658: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP2StdNumericLi; "p2 <= (std::numeric_limits<std::uint64_"... mov esi, 4505h jmp short loc_506AA loc_50674: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aD9; "d <= 9" mov esi, 450Eh jmp short loc_506AA loc_50690: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aD9; "d <= 9" mov esi, 44A3h loc_506AA: xor eax, eax call _ggml_abort loc_506B1: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMPlusEKalpha; "M_plus.e >= kAlpha" mov esi, 4469h jmp short loc_506AA loc_506CD: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aMPlusEKgamma; "M_plus.e <= kGamma" mov esi, 446Ah jmp short loc_506AA loc_506E9: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP10; "p1 > 0" mov esi, 447Fh jmp short loc_506AA loc_50705: lea rdi, aWorkspaceLlm4b_2; "/workspace/llm4binary/github/2025_star3"... lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aP2Delta; "p2 > delta" mov esi, 44FAh jmp short loc_506AA
long long nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen( nlohmann::json_abi_v3_11_3::detail::dtoa_impl *a1, unsigned int *a2, _DWORD *a3, long long a4, int a5, long long a6, char a7, int a8, unsigned long long a9, int a10) { unsigned long long v10; // r12 int v11; // eax long long v12; // r11 unsigned long long v13; // rdx int v14; // r15d unsigned int *v15; // r10 int v16; // r14d unsigned int v17; // r8d BOOL v18; // r14d unsigned long long v19; // r13 unsigned int v20; // eax unsigned int v21; // eax long long v22; // rsi unsigned long long v23; // rbp long long result; // rax long long v25; // rbx int v26; // eax unsigned long long v27; // r13 unsigned long long v28; // rsi long long v29; // rcx unsigned long long v30; // [rsp+0h] [rbp-78h] long long v31; // [rsp+8h] [rbp-70h] nlohmann::json_abi_v3_11_3::detail::dtoa_impl *v34; // [rsp+20h] [rbp-58h] long long v35; // [rsp+28h] [rbp-50h] int v36; // [rsp+30h] [rbp-48h] long long v37; // [rsp+38h] [rbp-40h] BYREF int v38; // [rsp+40h] [rbp-38h] v37 = a4; v38 = a5; if ( a10 <= -61 ) goto LABEL_38; v34 = a1; if ( a10 >= -31 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17514LL, "GGML_ASSERT(%s) failed", "M_plus.e <= kGamma"); goto LABEL_38; } v10 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(&a9, &v37); v11 = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp::sub(&a9, &a7); v12 = (unsigned int)-a10; v13 = a9 >> -(char)a10; if ( !(_DWORD)v13 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17535LL, "GGML_ASSERT(%s) failed", "p1 > 0"); goto LABEL_38; } v14 = v11; v35 = 1LL << -(char)a10; v15 = a2; v31 = v35 - 1; if ( (unsigned int)v13 <= 0x3B9AC9FF ) { if ( (unsigned int)v13 <= 0x5F5E0FF ) { if ( (unsigned int)v13 <= 0x98967F ) { if ( (unsigned int)v13 <= 0xF423F ) { if ( (unsigned int)v13 <= 0x1869F ) { if ( (unsigned int)v13 <= 0x270F ) { if ( (unsigned int)v13 <= 0x3E7 ) { if ( (unsigned int)v13 <= 0x63 ) { v18 = (unsigned int)v13 >= 0xA; v17 = 9 * v18 + 1; v16 = v18 + 1; } else { v16 = 3; v17 = 100; } } else { v16 = 4; v17 = 1000; } } else { v16 = 5; v17 = 10000; } } else { v16 = 6; v17 = 100000; } } else { v16 = 7; v17 = 1000000; } } else { v16 = 8; v17 = 10000000; } } else { v16 = 9; v17 = 100000000; } } else { v16 = 10; v17 = 1000000000; } v19 = v31 & a9; do { if ( v16 <= 0 ) { if ( v19 <= v10 ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17658LL, "GGML_ASSERT(%s) failed", "p2 > delta"); goto LABEL_38; } v26 = 0; while ( v19 < 0x199999999999999ALL ) { v27 = 10 * v19; v28 = v27 >> v12; if ( v27 >> v12 >= 0xA ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17678LL, "GGML_ASSERT(%s) failed", "d <= 9"); goto LABEL_38; } v19 = v31 & v27; v29 = (int)*v15; *v15 = v29 + 1; *((_BYTE *)a1 + v29) = v28 | 0x30; v10 *= 10LL; v14 *= 10; --v26; if ( v19 <= v10 ) { *a3 += v26; return nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round(a1, (char *)*v15, v14, v10, v19, v35, v30); } } ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17669LL, "GGML_ASSERT(%s) failed", "p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10"); while ( 1 ) LABEL_38: ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17513LL, "GGML_ASSERT(%s) failed", "M_plus.e >= kAlpha"); } v20 = v13; LODWORD(v13) = (unsigned int)v13 % v17; v21 = v20 / v17; if ( v21 >= 0xA ) { ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp", 17571LL, "GGML_ASSERT(%s) failed", "d <= 9"); goto LABEL_38; } v22 = (int)*v15; *v15 = v22 + 1; *((_BYTE *)a1 + v22) = v21 | 0x30; v23 = v19 + ((unsigned long long)(unsigned int)v13 << v12); if ( v23 <= v10 ) { *a3 = v16 + *a3 - 1; v36 = v13; HIDWORD(v30) = v17; v25 = v12; result = nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_round( a1, (char *)*v15, v14, v10, v23, (unsigned long long)v17 << v12, v30); v17 = HIDWORD(v30); LODWORD(v13) = v36; v12 = v25; v15 = a2; a1 = v34; } else { result = 3435973837LL; v17 /= 0xAu; } --v16; } while ( v23 > v10 ); return result; }
grisu2_digit_gen: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV qword ptr [RSP + 0x10],RDX MOV qword ptr [RSP + 0x38],RCX MOV dword ptr [RSP + 0x40],R8D MOV EAX,dword ptr [RSP + 0x98] CMP EAX,-0x3d JLE 0x001506b1 MOV qword ptr [RSP + 0x18],RSI MOV qword ptr [RSP + 0x20],RDI CMP EAX,-0x1f JGE 0x001506cd LEA RBX,[RSP + 0x90] LEA R15,[RSP + 0x80] LEA RSI,[RSP + 0x38] MOV RDI,RBX CALL 0x00150722 MOV R12,RAX MOV RDI,RBX MOV RSI,R15 CALL 0x00150722 XOR R11D,R11D SUB R11D,dword ptr [RBX + 0x8] MOV ESI,0x1 MOV ECX,R11D SHL RSI,CL MOV R13,qword ptr [RBX] MOV RDX,R13 SHR RDX,CL TEST EDX,EDX JZ 0x001506e9 MOV R15,RAX MOV qword ptr [RSP + 0x28],RSI LEA RAX,[RSI + -0x1] CMP EDX,0x3b9ac9ff MOV RDI,qword ptr [RSP + 0x20] MOV R10,qword ptr [RSP + 0x18] MOV qword ptr [RSP + 0x8],RAX JBE 0x00150476 MOV R14D,0xa MOV R8D,0x3b9aca00 JMP 0x00150524 LAB_00150476: CMP EDX,0x5f5e0ff JBE 0x0015048f MOV R14D,0x9 MOV R8D,0x5f5e100 JMP 0x00150524 LAB_0015048f: CMP EDX,0x98967f JBE 0x001504a5 MOV R14D,0x8 MOV R8D,0x989680 JMP 0x00150524 LAB_001504a5: CMP EDX,0xf423f JBE 0x001504bb MOV R14D,0x7 MOV R8D,0xf4240 JMP 0x00150524 LAB_001504bb: CMP EDX,0x1869f JBE 0x001504d1 MOV R14D,0x6 MOV R8D,0x186a0 JMP 0x00150524 LAB_001504d1: CMP EDX,0x270f JBE 0x001504e7 MOV R14D,0x5 MOV R8D,0x2710 JMP 0x00150524 LAB_001504e7: CMP EDX,0x3e7 JBE 0x001504fd MOV R14D,0x4 MOV R8D,0x3e8 JMP 0x00150524 LAB_001504fd: CMP EDX,0x63 JBE 0x00150510 MOV R14D,0x3 MOV R8D,0x64 JMP 0x00150524 LAB_00150510: XOR R14D,R14D CMP EDX,0xa SETNC R14B LEA R8D,[R14 + R14*0x8] INC R8D INC R14D LAB_00150524: AND R13,qword ptr [RSP + 0x8] LAB_00150529: TEST R14D,R14D JLE 0x001505cc MOV EAX,EDX XOR EDX,EDX DIV R8D CMP EAX,0xa JNC 0x00150690 OR AL,0x30 MOVSXD RSI,dword ptr [R10] LEA ECX,[RSI + 0x1] MOV dword ptr [R10],ECX MOV EBP,EDX MOV ECX,R11D SHL RBP,CL MOV byte ptr [RDI + RSI*0x1],AL ADD RBP,R13 MOV R9D,R8D CMP RBP,R12 JBE 0x00150575 MOV EAX,0xcccccccd IMUL R9,RAX SHR R9,0x23 MOV R8D,R9D JMP 0x001505be LAB_00150575: MOV RCX,qword ptr [RSP + 0x10] MOV EAX,dword ptr [RCX] ADD EAX,R14D DEC EAX MOV dword ptr [RCX],EAX MOV ECX,R11D SHL R9,CL MOV qword ptr [RSP + 0x30],RDX MOV ESI,dword ptr [R10] MOV RDX,R15 MOV RCX,R12 MOV dword ptr [RSP + 0x4],R8D MOV R8,RBP MOV RBX,R11 CALL 0x0015076c MOV R8D,dword ptr [RSP + 0x4] MOV RDX,qword ptr [RSP + 0x30] MOV R11,RBX MOV R10,qword ptr [RSP + 0x18] MOV RDI,qword ptr [RSP + 0x20] LAB_001505be: DEC R14D CMP RBP,R12 JA 0x00150529 JMP 0x00150649 LAB_001505cc: CMP R13,R12 JBE 0x00150705 XOR EAX,EAX MOV RDX,0x199999999999999a MOV R9,qword ptr [RSP + 0x8] LAB_001505e6: CMP R13,RDX JNC 0x00150658 ADD R13,R13 LEA R13,[R13 + R13*0x4] MOV RSI,R13 MOV ECX,R11D SHR RSI,CL CMP RSI,0xa JNC 0x00150674 AND R13,R9 OR SIL,0x30 MOVSXD RCX,dword ptr [R10] LEA R8D,[RCX + 0x1] MOV dword ptr [R10],R8D MOV byte ptr [RDI + RCX*0x1],SIL ADD R12,R12 LEA R12,[R12 + R12*0x4] ADD R15,R15 LEA R15,[R15 + R15*0x4] DEC EAX CMP R13,R12 JA 0x001505e6 MOV RCX,qword ptr [RSP + 0x10] ADD dword ptr [RCX],EAX MOV ESI,dword ptr [R10] MOV RDX,R15 MOV RCX,R12 MOV R8,R13 MOV R9,qword ptr [RSP + 0x28] CALL 0x0015076c LAB_00150649: ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_00150658: LEA RDI,[0x1ba79a] LEA RDX,[0x1b8182] LEA RCX,[0x1bb045] MOV ESI,0x4505 JMP 0x001506aa LAB_00150674: LEA RDI,[0x1ba79a] LEA RDX,[0x1b8182] LEA RCX,[0x1bb033] MOV ESI,0x450e JMP 0x001506aa LAB_00150690: LEA RDI,[0x1ba79a] LEA RDX,[0x1b8182] LEA RCX,[0x1bb033] MOV ESI,0x44a3 LAB_001506aa: XOR EAX,EAX CALL 0x00119b30 LAB_001506b1: LEA RDI,[0x1ba79a] LEA RDX,[0x1b8182] LEA RCX,[0x1bb006] MOV ESI,0x4469 JMP 0x001506aa LAB_001506cd: LEA RDI,[0x1ba79a] LEA RDX,[0x1b8182] LEA RCX,[0x1bb019] MOV ESI,0x446a JMP 0x001506aa LAB_001506e9: LEA RDI,[0x1ba79a] LEA RDX,[0x1b8182] LEA RCX,[0x1bb02c] MOV ESI,0x447f JMP 0x001506aa LAB_00150705: LEA RDI,[0x1ba79a] LEA RDX,[0x1b8182] LEA RCX,[0x1bb03a] MOV ESI,0x44fa JMP 0x001506aa
/* nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen(char*, int&, int&, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp, nlohmann::json_abi_v3_11_3::detail::dtoa_impl::diyfp) */ void nlohmann::json_abi_v3_11_3::detail::dtoa_impl::grisu2_digit_gen (char *param_1,int *param_2,int *param_3,int8 param_4,int4 param_5) { ulong uVar1; int iVar2; ulong uVar3; ulong uVar4; byte bVar5; char *pcVar6; uint uVar7; ulong uVar8; ulong uVar9; ulong uVar10; int8 uVar11; uint uVar12; ulong uVar13; int iVar14; ulong in_stack_00000018; int in_stack_00000020; int8 local_40; int4 local_38; local_40 = param_4; local_38 = param_5; if (in_stack_00000020 < -0x3c) { pcVar6 = "M_plus.e >= kAlpha"; uVar11 = 0x4469; } else if (in_stack_00000020 < -0x1f) { uVar3 = diyfp::sub((diyfp *)&stack0x00000018,(diyfp *)&local_40); uVar4 = diyfp::sub((diyfp *)&stack0x00000018,&stack0x00000008); bVar5 = -(char)in_stack_00000020; uVar10 = 1L << (bVar5 & 0x3f); uVar8 = in_stack_00000018 >> (bVar5 & 0x3f); uVar7 = (uint)uVar8; if (uVar7 == 0) { pcVar6 = "p1 > 0"; uVar11 = 0x447f; } else { uVar1 = uVar10 - 1; if (uVar7 < 1000000000) { if (uVar7 < 100000000) { if (uVar7 < 10000000) { if (uVar7 < 1000000) { if (uVar7 < 100000) { if (uVar7 < 10000) { if (uVar7 < 1000) { if (uVar7 < 100) { uVar12 = (uint)(9 < uVar7) * 9 + 1; iVar14 = (9 < uVar7) + 1; } else { iVar14 = 3; uVar12 = 100; } } else { iVar14 = 4; uVar12 = 1000; } } else { iVar14 = 5; uVar12 = 10000; } } else { iVar14 = 6; uVar12 = 100000; } } else { iVar14 = 7; uVar12 = 1000000; } } else { iVar14 = 8; uVar12 = 10000000; } } else { iVar14 = 9; uVar12 = 100000000; } } else { iVar14 = 10; uVar12 = 1000000000; } uVar13 = in_stack_00000018 & uVar1; while (0 < iVar14) { uVar9 = (uVar8 & 0xffffffff) / (ulong)uVar12; uVar8 = (uVar8 & 0xffffffff) % (ulong)uVar12; if (9 < (uint)uVar9) { pcVar6 = "d <= 9"; uVar11 = 0x44a3; goto LAB_001506aa; } iVar2 = *param_2; *param_2 = iVar2 + 1; param_1[iVar2] = (byte)uVar9 | 0x30; uVar9 = (uVar8 << (bVar5 & 0x3f)) + uVar13; if (uVar3 < uVar9) { uVar12 = uVar12 / 10; } else { *param_3 = *param_3 + iVar14 + -1; grisu2_round(param_1,*param_2,uVar4,uVar3,uVar9,(ulong)uVar12 << (bVar5 & 0x3f)); } iVar14 = iVar14 + -1; if (uVar9 <= uVar3) { return; } } if (uVar3 < uVar13) { iVar14 = 0; while( true ) { if (0x1999999999999999 < uVar13) { pcVar6 = "p2 <= (std::numeric_limits<std::uint64_t>::max)() / 10"; uVar11 = 0x4505; goto LAB_001506aa; } uVar8 = uVar13 * 10 >> (bVar5 & 0x3f); if (9 < uVar8) break; uVar13 = uVar13 * 10 & uVar1; iVar2 = *param_2; *param_2 = iVar2 + 1; param_1[iVar2] = (byte)uVar8 | 0x30; uVar3 = uVar3 * 10; uVar4 = uVar4 * 10; iVar14 = iVar14 + -1; if (uVar13 <= uVar3) { *param_3 = *param_3 + iVar14; grisu2_round(param_1,*param_2,uVar4,uVar3,uVar13,uVar10); return; } } pcVar6 = "d <= 9"; uVar11 = 0x450e; } else { pcVar6 = "p2 > delta"; uVar11 = 0x44fa; } } } else { pcVar6 = "M_plus.e <= kGamma"; uVar11 = 0x446a; } LAB_001506aa: /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/common/json.hpp",uVar11, "GGML_ASSERT(%s) failed",pcVar6); }
7,960
wt_thd_will_wait_for
eloqsql/mysys/waiting_threads.c
int wt_thd_will_wait_for(WT_THD *thd, WT_THD *blocker, const WT_RESOURCE_ID *resid) { uint i; WT_RESOURCE *rc; DBUG_ENTER("wt_thd_will_wait_for"); DBUG_PRINT("wt", ("enter: thd=%s, blocker=%s, resid=%lu", thd->name, blocker->name, (ulong)resid->value)); if (fix_thd_pins(thd)) DBUG_RETURN(WT_DEADLOCK); if (thd->waiting_for == 0) { uint keylen; const void *key; /* XXX if (restype->make_key) key= restype->make_key(resid, &keylen); else */ { key= resid; keylen= sizeof_WT_RESOURCE_ID; } DBUG_PRINT("wt", ("first blocker")); retry: while ((rc= lf_hash_search(&reshash, thd->pins, key, keylen)) == 0) { DBUG_PRINT("wt", ("failed to find rc in hash, inserting")); if (lf_hash_insert(&reshash, thd->pins, resid) == -1) /* if OOM */ DBUG_RETURN(WT_DEADLOCK); /* Two cases: either lf_hash_insert() failed - because another thread has just inserted a resource with the same id - and we need to retry. Or lf_hash_insert() succeeded, and then we need to repeat lf_hash_search() to find a real address of the newly inserted element. That is, we don't care what lf_hash_insert() has returned. And we need to repeat the loop anyway. */ } if (rc == MY_ERRPTR) DBUG_RETURN(WT_DEADLOCK); DBUG_PRINT("wt", ("found in hash rc=%p", rc)); rc_wrlock(rc); if (rc->state != ACTIVE) { DBUG_PRINT("wt", ("but it's not active, retrying")); /* Somebody has freed the element while we weren't looking */ rc_unlock(rc); lf_hash_search_unpin(thd->pins); goto retry; } lf_hash_search_unpin(thd->pins); /* the element cannot go away anymore */ thd->waiting_for= rc; rc->waiter_count++; thd->killed= 0; } else { DBUG_ASSERT(thd->waiting_for->id.type == resid->type); DBUG_ASSERT(resid->type->compare(&thd->waiting_for->id, resid) == 0); DBUG_PRINT("wt", ("adding another blocker")); /* we can safely access the resource here, it's in the hash as it has non-zero waiter_count */ rc= thd->waiting_for; rc_wrlock(rc); DBUG_ASSERT(rc->waiter_count); DBUG_ASSERT(rc->state == ACTIVE); if (thd->killed) { stop_waiting_locked(thd); DBUG_RETURN(WT_DEADLOCK); } } /* Another thread could be waiting on this resource for this very 'blocker'. In this case we should not add it to the list for the second time. */ for (i= 0; i < rc->owners.elements; i++) if (*dynamic_element(&rc->owners, i, WT_THD**) == blocker) break; if (i >= rc->owners.elements) { if (push_dynamic(&blocker->my_resources, (void*)&rc)) { stop_waiting_locked(thd); DBUG_RETURN(WT_DEADLOCK); /* deadlock and OOM use the same error code */ } if (push_dynamic(&rc->owners, (void*)&blocker)) { pop_dynamic(&blocker->my_resources); stop_waiting_locked(thd); DBUG_RETURN(WT_DEADLOCK); } } rc_unlock(rc); if (deadlock(thd, blocker, 1, *thd->deadlock_search_depth_short) != WT_OK) { stop_waiting(thd); DBUG_RETURN(WT_DEADLOCK); } DBUG_RETURN(WT_OK); }
O3
c
wt_thd_will_wait_for: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x18, %rsp movq %rdx, %r12 movq %rsi, %r14 movq %rdi, %rbx movq %rsi, -0x38(%rbp) cmpq $0x0, 0x30(%rdi) je 0xa6dcb movq 0x28(%rbx), %r15 testq %r15, %r15 je 0xa6c71 movq %r15, -0x30(%rbp) leaq 0x18(%r15), %rdi callq 0xa4445 cmpb $0x0, 0x60(%rbx) jne 0xa6d39 jmp 0xa6d06 movq %r14, -0x40(%rbp) leaq 0xb61e54(%rip), %r13 # 0xc08ad0 movq 0x30(%rbx), %rsi movq %r13, %rdi movq %r12, %rdx movl $0x10, %ecx callq 0x2fc5f movl $0xffffffff, %r14d # imm = 0xFFFFFFFF testq %rax, %rax je 0xa6cd6 movq %rax, %r15 cmpq $0x1, %rax je 0xa6d56 movq %r15, -0x30(%rbp) movq %r15, %r14 addq $0x18, %r14 movq %r14, %rdi callq 0xa4445 cmpl $0x0, 0x14(%r15) je 0xa6cec movq %r14, %rdi callq 0xa44e6 movq 0x30(%rbx), %rax xorl %ecx, %ecx xchgq %rcx, 0x10(%rax) jmp 0xa6c7c movq 0x30(%rbx), %rsi movq %r13, %rdi movq %r12, %rdx callq 0x2f400 cmpl $-0x1, %eax jne 0xa6c7c jmp 0xa6d56 movq 0x30(%rbx), %rax xorl %ecx, %ecx xchgq %rcx, 0x10(%rax) movq %r15, 0x28(%rbx) incl 0x10(%r15) movb $0x0, 0x60(%rbx) movq -0x40(%rbp), %r14 movl 0xe8(%r15), %eax testq %rax, %rax je 0xa6d29 movq 0xe0(%r15), %rcx xorl %edx, %edx cmpq %r14, (%rcx,%rdx,8) je 0xa6d95 incq %rdx cmpq %rdx, %rax jne 0xa6d1b leaq -0x30(%rbp), %rsi movq %r14, %rdi callq 0x91bc6 testb %al, %al je 0xa6d68 movq 0x28(%rbx), %rsi decl 0x10(%rsi) movq $0x0, 0x28(%rbx) movq %rbx, %rdi callq 0xa72c5 movl $0xffffffff, %r14d # imm = 0xFFFFFFFF movl %r14d, %eax addq $0x18, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movl $0xe0, %edi addq -0x30(%rbp), %rdi leaq -0x38(%rbp), %rsi callq 0x91bc6 testb %al, %al je 0xa6d91 movq -0x38(%rbp), %rdi callq 0x91cbb movq %rbx, %rdi callq 0xa6de9 jmp 0xa6d50 movq -0x30(%rbp), %r15 addq $0x18, %r15 movq %r15, %rdi callq 0xa44e6 movq -0x38(%rbp), %rsi movq 0x40(%rbx), %rax movl (%rax), %ecx movq %rbx, %rdi movl $0x1, %edx callq 0xa6e02 testl %eax, %eax je 0xa6dc6 movq %rbx, %rdi callq 0xa6f3a jmp 0xa6d50 xorl %r14d, %r14d jmp 0xa6d56 leaq 0xb61d26(%rip), %rdi # 0xc08af8 callq 0x2f225 movq %rax, 0x30(%rbx) testq %rax, %rax jne 0xa6c4c jmp 0xa6d50
wt_thd_will_wait_for: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 18h mov r12, rdx mov r14, rsi mov rbx, rdi mov [rbp+var_38], rsi cmp qword ptr [rdi+30h], 0 jz loc_A6DCB loc_A6C4C: mov r15, [rbx+28h] test r15, r15 jz short loc_A6C71 mov [rbp+var_30], r15 lea rdi, [r15+18h] call my_rw_wrlock cmp byte ptr [rbx+60h], 0 jnz loc_A6D39 jmp loc_A6D06 loc_A6C71: mov [rbp+var_40], r14 lea r13, reshash loc_A6C7C: mov rsi, [rbx+30h] mov rdi, r13 mov rdx, r12 mov ecx, 10h call lf_hash_search mov r14d, 0FFFFFFFFh test rax, rax jz short loc_A6CD6 mov r15, rax cmp rax, 1 jz loc_A6D56 mov [rbp+var_30], r15 mov r14, r15 add r14, 18h mov rdi, r14 call my_rw_wrlock cmp dword ptr [r15+14h], 0 jz short loc_A6CEC mov rdi, r14 call my_rw_unlock mov rax, [rbx+30h] xor ecx, ecx xchg rcx, [rax+10h] jmp short loc_A6C7C loc_A6CD6: mov rsi, [rbx+30h] mov rdi, r13 mov rdx, r12 call lf_hash_insert cmp eax, 0FFFFFFFFh jnz short loc_A6C7C jmp short loc_A6D56 loc_A6CEC: mov rax, [rbx+30h] xor ecx, ecx xchg rcx, [rax+10h] mov [rbx+28h], r15 inc dword ptr [r15+10h] mov byte ptr [rbx+60h], 0 mov r14, [rbp+var_40] loc_A6D06: mov eax, [r15+0E8h] test rax, rax jz short loc_A6D29 mov rcx, [r15+0E0h] xor edx, edx loc_A6D1B: cmp [rcx+rdx*8], r14 jz short loc_A6D95 inc rdx cmp rax, rdx jnz short loc_A6D1B loc_A6D29: lea rsi, [rbp+var_30] mov rdi, r14 call insert_dynamic test al, al jz short loc_A6D68 loc_A6D39: mov rsi, [rbx+28h] dec dword ptr [rsi+10h] mov qword ptr [rbx+28h], 0 mov rdi, rbx call unlock_lock_and_free_resource loc_A6D50: mov r14d, 0FFFFFFFFh loc_A6D56: mov eax, r14d add rsp, 18h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_A6D68: mov edi, 0E0h add rdi, [rbp+var_30] lea rsi, [rbp+var_38] call insert_dynamic test al, al jz short loc_A6D91 mov rdi, [rbp+var_38] call pop_dynamic mov rdi, rbx call stop_waiting_locked jmp short loc_A6D50 loc_A6D91: mov r15, [rbp+var_30] loc_A6D95: add r15, 18h mov rdi, r15 call my_rw_unlock mov rsi, [rbp+var_38] mov rax, [rbx+40h] mov ecx, [rax] mov rdi, rbx mov edx, 1 call deadlock test eax, eax jz short loc_A6DC6 mov rdi, rbx call stop_waiting jmp short loc_A6D50 loc_A6DC6: xor r14d, r14d jmp short loc_A6D56 loc_A6DCB: lea rdi, unk_C08AF8 call lf_pinbox_get_pins mov [rbx+30h], rax test rax, rax jnz loc_A6C4C jmp loc_A6D50
long long wt_thd_will_wait_for(long long a1, long long a2, long long a3) { long long v4; // r14 long long v5; // r15 long long v6; // rax unsigned int v7; // r14d long long v8; // rdx long long pins; // rax long long v11; // [rsp+8h] [rbp-38h] BYREF long long v12[6]; // [rsp+10h] [rbp-30h] BYREF v4 = a2; v11 = a2; if ( !*(_QWORD *)(a1 + 48) ) { pins = lf_pinbox_get_pins((long long)&unk_C08AF8); *(_QWORD *)(a1 + 48) = pins; if ( !pins ) return (unsigned int)-1; } v5 = *(_QWORD *)(a1 + 40); if ( v5 ) { v12[0] = *(_QWORD *)(a1 + 40); my_rw_wrlock(v5 + 24); if ( *(_BYTE *)(a1 + 96) ) goto LABEL_17; } else { while ( 1 ) { while ( 1 ) { v6 = lf_hash_search((long long)&reshash, *(volatile long long **)(a1 + 48), a3, 0x10u); v7 = -1; if ( v6 ) break; if ( (unsigned int)lf_hash_insert((long long)&reshash, *(_QWORD *)(a1 + 48), a3) == -1 ) return v7; } v5 = v6; if ( v6 == 1 ) return v7; v12[0] = v6; my_rw_wrlock(v6 + 24); if ( !*(_DWORD *)(v5 + 20) ) break; my_rw_unlock(v5 + 24); _InterlockedExchange64((volatile long long *)(*(_QWORD *)(a1 + 48) + 16LL), 0LL); } _InterlockedExchange64((volatile long long *)(*(_QWORD *)(a1 + 48) + 16LL), 0LL); *(_QWORD *)(a1 + 40) = v5; ++*(_DWORD *)(v5 + 16); *(_BYTE *)(a1 + 96) = 0; v4 = a2; } if ( !*(_DWORD *)(v5 + 232) ) { LABEL_16: if ( !(unsigned __int8)insert_dynamic(v4, (long long)v12) ) { if ( (unsigned __int8)insert_dynamic(v12[0] + 224, (long long)&v11) ) { pop_dynamic(v11); stop_waiting_locked(a1); return (unsigned int)-1; } v5 = v12[0]; goto LABEL_23; } LABEL_17: --*(_DWORD *)(*(_QWORD *)(a1 + 40) + 16LL); *(_QWORD *)(a1 + 40) = 0LL; unlock_lock_and_free_resource(a1); return (unsigned int)-1; } v8 = 0LL; while ( *(_QWORD *)(*(_QWORD *)(v5 + 224) + 8 * v8) != v4 ) { if ( *(_DWORD *)(v5 + 232) == ++v8 ) goto LABEL_16; } LABEL_23: my_rw_unlock(v5 + 24); if ( !(unsigned int)deadlock(a1, v11, 1LL, **(unsigned int **)(a1 + 64)) ) return 0; stop_waiting(a1); return (unsigned int)-1; }
wt_thd_will_wait_for: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x18 MOV R12,RDX MOV R14,RSI MOV RBX,RDI MOV qword ptr [RBP + -0x38],RSI CMP qword ptr [RDI + 0x30],0x0 JZ 0x001a6dcb LAB_001a6c4c: MOV R15,qword ptr [RBX + 0x28] TEST R15,R15 JZ 0x001a6c71 MOV qword ptr [RBP + -0x30],R15 LEA RDI,[R15 + 0x18] CALL 0x001a4445 CMP byte ptr [RBX + 0x60],0x0 JNZ 0x001a6d39 JMP 0x001a6d06 LAB_001a6c71: MOV qword ptr [RBP + -0x40],R14 LEA R13,[0xd08ad0] LAB_001a6c7c: MOV RSI,qword ptr [RBX + 0x30] MOV RDI,R13 MOV RDX,R12 MOV ECX,0x10 CALL 0x0012fc5f MOV R14D,0xffffffff TEST RAX,RAX JZ 0x001a6cd6 MOV R15,RAX CMP RAX,0x1 JZ 0x001a6d56 MOV qword ptr [RBP + -0x30],R15 MOV R14,R15 ADD R14,0x18 MOV RDI,R14 CALL 0x001a4445 CMP dword ptr [R15 + 0x14],0x0 JZ 0x001a6cec MOV RDI,R14 CALL 0x001a44e6 MOV RAX,qword ptr [RBX + 0x30] XOR ECX,ECX XCHG qword ptr [RAX + 0x10],RCX JMP 0x001a6c7c LAB_001a6cd6: MOV RSI,qword ptr [RBX + 0x30] MOV RDI,R13 MOV RDX,R12 CALL 0x0012f400 CMP EAX,-0x1 JNZ 0x001a6c7c JMP 0x001a6d56 LAB_001a6cec: MOV RAX,qword ptr [RBX + 0x30] XOR ECX,ECX XCHG qword ptr [RAX + 0x10],RCX MOV qword ptr [RBX + 0x28],R15 INC dword ptr [R15 + 0x10] MOV byte ptr [RBX + 0x60],0x0 MOV R14,qword ptr [RBP + -0x40] LAB_001a6d06: MOV EAX,dword ptr [R15 + 0xe8] TEST RAX,RAX JZ 0x001a6d29 MOV RCX,qword ptr [R15 + 0xe0] XOR EDX,EDX LAB_001a6d1b: CMP qword ptr [RCX + RDX*0x8],R14 JZ 0x001a6d95 INC RDX CMP RAX,RDX JNZ 0x001a6d1b LAB_001a6d29: LEA RSI,[RBP + -0x30] MOV RDI,R14 CALL 0x00191bc6 TEST AL,AL JZ 0x001a6d68 LAB_001a6d39: MOV RSI,qword ptr [RBX + 0x28] DEC dword ptr [RSI + 0x10] MOV qword ptr [RBX + 0x28],0x0 MOV RDI,RBX CALL 0x001a72c5 LAB_001a6d50: MOV R14D,0xffffffff LAB_001a6d56: MOV EAX,R14D ADD RSP,0x18 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_001a6d68: MOV EDI,0xe0 ADD RDI,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x38] CALL 0x00191bc6 TEST AL,AL JZ 0x001a6d91 MOV RDI,qword ptr [RBP + -0x38] CALL 0x00191cbb MOV RDI,RBX CALL 0x001a6de9 JMP 0x001a6d50 LAB_001a6d91: MOV R15,qword ptr [RBP + -0x30] LAB_001a6d95: ADD R15,0x18 MOV RDI,R15 CALL 0x001a44e6 MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBX + 0x40] MOV ECX,dword ptr [RAX] MOV RDI,RBX MOV EDX,0x1 CALL 0x001a6e02 TEST EAX,EAX JZ 0x001a6dc6 MOV RDI,RBX CALL 0x001a6f3a JMP 0x001a6d50 LAB_001a6dc6: XOR R14D,R14D JMP 0x001a6d56 LAB_001a6dcb: LEA RDI,[0xd08af8] CALL 0x0012f225 MOV qword ptr [RBX + 0x30],RAX TEST RAX,RAX JNZ 0x001a6c4c JMP 0x001a6d50
int8 wt_thd_will_wait_for(long param_1,long param_2,int8 param_3) { int *piVar1; char cVar2; int iVar3; long lVar4; ulong uVar5; long local_40; long local_38; local_40 = param_2; if (*(long *)(param_1 + 0x30) == 0) { lVar4 = lf_pinbox_get_pins(0xd08af8); *(long *)(param_1 + 0x30) = lVar4; if (lVar4 == 0) { return 0xffffffff; } } lVar4 = *(long *)(param_1 + 0x28); if (lVar4 == 0) { while( true ) { while (lVar4 = lf_hash_search(reshash,*(int8 *)(param_1 + 0x30),param_3), lVar4 == 0) { iVar3 = lf_hash_insert(reshash,*(int8 *)(param_1 + 0x30),param_3); if (iVar3 == -1) { return 0xffffffff; } } if (lVar4 == 1) { return 0xffffffff; } local_38 = lVar4; my_rw_wrlock(lVar4 + 0x18); if (*(int *)(lVar4 + 0x14) == 0) break; my_rw_unlock(lVar4 + 0x18); LOCK(); *(int8 *)(*(long *)(param_1 + 0x30) + 0x10) = 0; UNLOCK(); } LOCK(); *(int8 *)(*(long *)(param_1 + 0x30) + 0x10) = 0; UNLOCK(); *(long *)(param_1 + 0x28) = lVar4; *(int *)(lVar4 + 0x10) = *(int *)(lVar4 + 0x10) + 1; *(int1 *)(param_1 + 0x60) = 0; } else { local_38 = lVar4; my_rw_wrlock(lVar4 + 0x18); if (*(char *)(param_1 + 0x60) != '\0') goto LAB_001a6d39; } if ((ulong)*(uint *)(lVar4 + 0xe8) != 0) { uVar5 = 0; do { if (*(long *)(*(long *)(lVar4 + 0xe0) + uVar5 * 8) == param_2) goto LAB_001a6d95; uVar5 = uVar5 + 1; } while (*(uint *)(lVar4 + 0xe8) != uVar5); } cVar2 = insert_dynamic(param_2,&local_38); if (cVar2 == '\0') { cVar2 = insert_dynamic(local_38 + 0xe0,&local_40); lVar4 = local_38; if (cVar2 != '\0') { pop_dynamic(local_40); stop_waiting_locked(param_1); return 0xffffffff; } LAB_001a6d95: my_rw_unlock(lVar4 + 0x18); iVar3 = deadlock(param_1,local_40,1,**(int4 **)(param_1 + 0x40)); if (iVar3 != 0) { stop_waiting(param_1); return 0xffffffff; } return 0; } LAB_001a6d39: piVar1 = (int *)(*(long *)(param_1 + 0x28) + 0x10); *piVar1 = *piVar1 + -1; *(int8 *)(param_1 + 0x28) = 0; unlock_lock_and_free_resource(param_1); return 0xffffffff; }
7,961
nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
monkey531[P]llama/common/json.hpp
reference operator[](typename object_t::key_type key) { // implicitly convert null value to an empty object if (is_null()) { m_data.m_type = value_t::object; m_data.m_value.object = create<object_t>(); assert_invariant(); } // operator[] only works for objects if (JSON_HEDLEY_LIKELY(is_object())) { auto result = m_data.m_value.object->emplace(std::move(key), nullptr); return set_parent(result.first->second); } JSON_THROW(type_error::create(305, detail::concat("cannot use operator[] with a string argument with ", type_name()), this)); }
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>::operator[](std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>): pushq %rbp pushq %r15 pushq %r14 pushq %rbx subq $0x28, %rsp movq %rsi, %rbx movq %rdi, %r14 cmpb $0x0, (%rdi) jne 0xac506 movb $0x1, (%r14) movl $0x20, %edi callq 0x1b8a0 xorps %xmm0, %xmm0 movups %xmm0, (%rax) movq $0x0, 0x10(%rax) movq %rax, 0x8(%r14) movq %r14, %rdi movl $0x1, %esi callq 0x5869e cmpb $0x1, (%r14) jne 0xac571 movq 0x8(%r14), %r14 movq %rsp, %r15 movb $0x0, (%r15) movq $0x0, 0x8(%r15) movq %r15, %rdi movl $0x1, %esi callq 0x5869e movq %r15, %rdi movl $0x1, %esi callq 0x5869e movq %r14, %rdi movq %rbx, %rsi movq %r15, %rdx callq 0x5f54a movq %rax, %rbx movq %rsp, %r14 movq %r14, %rdi xorl %esi, %esi callq 0x5869e movq %r14, %rdi callq 0x5de8a addq $0x20, %rbx movq %rbx, %rax addq $0x28, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq movl $0x20, %edi callq 0x1b440 movq %rax, %rbx movq %r14, %rdi callq 0x5eed4 leaq 0x20(%rsp), %rdx movq %rax, (%rdx) leaq 0x4885f(%rip), %rsi # 0xf4df4 movq %rsp, %rdi callq 0xac620 movb $0x1, %bpl movq %rsp, %rdx movq %rbx, %rdi movl $0x131, %esi # imm = 0x131 movq %r14, %rcx callq 0x5ec7c xorl %ebp, %ebp leaq 0x8193c(%rip), %rsi # 0x12def8 leaq -0x515ad(%rip), %rdx # 0x5b016 movq %rbx, %rdi callq 0x1bf00 movq %rax, %r14 movq %rsp, %rbx movq %rbx, %rdi xorl %esi, %esi callq 0x5869e movq %rbx, %rdi callq 0x5de8a jmp 0xac618 movq %rax, %r14 leaq 0x10(%rsp), %rax movq -0x10(%rax), %rdi cmpq %rax, %rdi je 0xac60b movq 0x10(%rsp), %rsi incq %rsi callq 0x1b8c0 jmp 0xac60b movq %rax, %r14 movb $0x1, %bpl testb %bpl, %bpl je 0xac618 movq %rbx, %rdi callq 0x1b660 movq %r14, %rdi callq 0x1bf90
_ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEixES9_: push rbp; char push r15; int push r14; __int64 push rbx; int sub rsp, 28h mov rbx, rsi mov r14, rdi cmp byte ptr [rdi], 0 jnz short loc_AC506 mov byte ptr [r14], 1 mov edi, 20h ; ' '; unsigned __int64 call __Znwm; operator new(ulong) xorps xmm0, xmm0 movups xmmword ptr [rax], xmm0 mov qword ptr [rax+10h], 0 mov [r14+8], rax 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) loc_AC506: cmp byte ptr [r14], 1 jnz short loc_AC571 mov r14, [r14+8] mov r15, rsp mov byte ptr [r15], 0 mov qword ptr [r15+8], 0 mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r15 mov esi, 1 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 mov rsi, rbx mov rdx, r15 call _ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE7emplaceERSH_OSD_; nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>>::emplace(std::string const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>&&) mov rbx, rax mov r14, rsp mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov rdi, r14 call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE4dataD2Ev; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::data::~data() add rbx, 20h ; ' ' mov rax, rbx add rsp, 28h pop rbx pop r14 pop r15 pop rbp retn loc_AC571: mov edi, 20h ; ' '; thrown_size call ___cxa_allocate_exception mov rbx, rax mov rdi, r14 call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE9type_nameEv; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::type_name(void) lea rdx, [rsp+48h+var_28] mov [rdx], rax lea rsi, aCannotUseOpera_0; "cannot use operator[] with a string arg"... mov rdi, rsp call _ZN8nlohmann16json_abi_v3_11_36detail6concatINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEJRA51_KcPS9_EEET_DpOT0_; nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>(char const(&)[51],char const* &&) mov bpl, 1 mov rdx, rsp mov rdi, rbx; this mov esi, 131h; int mov rcx, r14 call _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ xor ebp, ebp lea rsi, _ZTIN8nlohmann16json_abi_v3_11_36detail10type_errorE; lptinfo lea rdx, _ZN8nlohmann16json_abi_v3_11_36detail9exceptionD2Ev; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rbx, rsp 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() jmp short loc_AC618 mov r14, rax lea rax, [rsp+48h+var_38] mov rdi, [rax-10h]; void * cmp rdi, rax jz short loc_AC60B mov rsi, [rsp+48h+var_38] inc rsi; unsigned __int64 call __ZdlPvm; operator delete(void *,ulong) jmp short loc_AC60B mov r14, rax mov bpl, 1 loc_AC60B: test bpl, bpl jz short loc_AC618 mov rdi, rbx; void * call ___cxa_free_exception loc_AC618: mov rdi, r14 call __Unwind_Resume
long long nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::operator[]( long long a1, long long *a2) { long long v2; // rax _QWORD *v3; // r14 long long v4; // rbx nlohmann::json_abi_v3_11_3::detail::exception *exception; // rbx _QWORD v7[9]; // [rsp+0h] [rbp-48h] BYREF if ( !*(_BYTE *)a1 ) { *(_BYTE *)a1 = 1; v2 = operator new(0x20uLL); *(_OWORD *)v2 = 0LL; *(_QWORD *)(v2 + 16) = 0LL; *(_QWORD *)(a1 + 8) = v2; 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); } if ( *(_BYTE *)a1 != 1 ) { exception = (nlohmann::json_abi_v3_11_3::detail::exception *)__cxa_allocate_exception(0x20uLL); v7[4] = nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::type_name((unsigned __int8 *)a1); nlohmann::json_abi_v3_11_3::detail::concat<std::string,char const(&)[51],char const*>( v7, "cannot use operator[] with a string argument with "); ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_( exception, 305, v7); __cxa_throw( exception, (struct type_info *)&`typeinfo for'nlohmann::json_abi_v3_11_3::detail::type_error, (void (*)(void *))nlohmann::json_abi_v3_11_3::detail::exception::~exception); } v3 = *(_QWORD **)(a1 + 8); LOBYTE(v7[0]) = 0; v7[1] = 0LL; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::assert_invariant((char *)v7); 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 *)v7); v4 = nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::emplace( v3, a2, (long long)v7); 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 *)v7); nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::data::~data(v7); return v4 + 32; }
operator[]: PUSH RBP PUSH R15 PUSH R14 PUSH RBX SUB RSP,0x28 MOV RBX,RSI MOV R14,RDI CMP byte ptr [RDI],0x0 JNZ 0x001ac506 MOV byte ptr [R14],0x1 MOV EDI,0x20 CALL 0x0011b8a0 XORPS XMM0,XMM0 MOVUPS xmmword ptr [RAX],XMM0 MOV qword ptr [RAX + 0x10],0x0 MOV qword ptr [R14 + 0x8],RAX MOV RDI,R14 MOV ESI,0x1 CALL 0x0015869e LAB_001ac506: CMP byte ptr [R14],0x1 JNZ 0x001ac571 MOV R14,qword ptr [R14 + 0x8] MOV R15,RSP MOV byte ptr [R15],0x0 MOV qword ptr [R15 + 0x8],0x0 MOV RDI,R15 MOV ESI,0x1 CALL 0x0015869e MOV RDI,R15 MOV ESI,0x1 CALL 0x0015869e LAB_001ac539: MOV RDI,R14 MOV RSI,RBX MOV RDX,R15 CALL 0x0015f54a LAB_001ac547: MOV RBX,RAX MOV R14,RSP MOV RDI,R14 XOR ESI,ESI CALL 0x0015869e MOV RDI,R14 CALL 0x0015de8a ADD RBX,0x20 MOV RAX,RBX ADD RSP,0x28 POP RBX POP R14 POP R15 POP RBP RET LAB_001ac571: MOV EDI,0x20 CALL 0x0011b440 MOV RBX,RAX MOV RDI,R14 CALL 0x0015eed4 LEA RDX,[RSP + 0x20] MOV qword ptr [RDX],RAX LAB_001ac58e: LEA RSI,[0x1f4df4] MOV RDI,RSP CALL 0x001ac620 MOV BPL,0x1 LAB_001ac5a0: MOV RDX,RSP MOV RDI,RBX MOV ESI,0x131 MOV RCX,R14 CALL 0x0015ec7c XOR EBP,EBP LEA RSI,[0x22def8] LEA RDX,[0x15b016] MOV RDI,RBX CALL 0x0011bf00
/* nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>::operator[](std::__cxx11::string) */ long __thiscall nlohmann::json_abi_v3_11_3:: basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::operator[](basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *this,string *param_2) { ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *this_00; int8 *puVar1; long lVar2; int8 uVar3; bool bVar4; basic_json local_48 [8]; int8 local_40; char *local_28; if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x0) { *this = (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1; puVar1 = (int8 *)operator_new(0x20); *puVar1 = 0; puVar1[1] = 0; puVar1[2] = 0; *(int8 **)(this + 8) = puVar1; assert_invariant(SUB81(this,0)); } if (*this == (basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> )0x1) { this_00 = *(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> **)(this + 8); local_48[0] = (basic_json)0x0; local_40 = 0; bVar4 = SUB81(local_48,0); assert_invariant(bVar4); assert_invariant(bVar4); /* try { // try from 001ac539 to 001ac546 has its CatchHandler @ 001ac5cb */ lVar2 = ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::emplace(this_00,param_2,local_48); assert_invariant(bVar4); data::~data((data *)local_48); return lVar2 + 0x20; } uVar3 = __cxa_allocate_exception(0x20); local_28 = (char *)type_name(this); /* try { // try from 001ac58e to 001ac59c has its CatchHandler @ 001ac605 */ detail::concat<std::__cxx11::string,char_const(&)[51],char_const*> ((detail *)local_48,"cannot use operator[] with a string argument with ",&local_28); /* try { // try from 001ac5a0 to 001ac5ca has its CatchHandler @ 001ac5e5 */ _ZN8nlohmann16json_abi_v3_11_36detail10type_error6createIPNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES6_IhSaIhEEvEETnNSt9enable_ifIXsr21is_basic_json_contextIT_EE5valueEiE4typeELi0EEES2_iRKSC_SJ_ (uVar3,0x131,local_48,this); /* WARNING: Subroutine does not return */ __cxa_throw(uVar3,&detail::type_error::typeinfo,detail::exception::~exception); }
7,962
google::protobuf::io::ConcatenatingInputStream::Next(void const**, int*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl.cc
bool ConcatenatingInputStream::Next(const void** data, int* size) { while (stream_count_ > 0) { if (streams_[0]->Next(data, size)) return true; // That stream is done. Advance to the next one. bytes_retired_ += streams_[0]->ByteCount(); ++streams_; --stream_count_; } // No more streams. return false; }
O0
cpp
google::protobuf::io::ConcatenatingInputStream::Next(void const**, int*): subq $0x28, %rsp movq %rdi, 0x18(%rsp) movq %rsi, 0x10(%rsp) movq %rdx, 0x8(%rsp) movq 0x18(%rsp), %rax movq %rax, (%rsp) movq (%rsp), %rax cmpl $0x0, 0x10(%rax) jle 0x1efc75 movq (%rsp), %rax movq 0x8(%rax), %rax movq (%rax), %rdi movq 0x10(%rsp), %rsi movq 0x8(%rsp), %rdx movq (%rdi), %rax callq *0x10(%rax) testb $0x1, %al jne 0x1efc37 jmp 0x1efc3e movb $0x1, 0x27(%rsp) jmp 0x1efc7a movq (%rsp), %rax movq 0x8(%rax), %rax movq (%rax), %rdi movq (%rdi), %rax callq *0x28(%rax) movq %rax, %rcx movq (%rsp), %rax addq 0x18(%rax), %rcx movq %rcx, 0x18(%rax) movq 0x8(%rax), %rcx addq $0x8, %rcx movq %rcx, 0x8(%rax) movl 0x10(%rax), %ecx addl $-0x1, %ecx movl %ecx, 0x10(%rax) jmp 0x1efc0c movb $0x0, 0x27(%rsp) movb 0x27(%rsp), %al andb $0x1, %al addq $0x28, %rsp retq nopw %cs:(%rax,%rax)
_ZN6google8protobuf2io24ConcatenatingInputStream4NextEPPKvPi: sub rsp, 28h mov [rsp+28h+var_10], rdi mov [rsp+28h+var_18], rsi mov [rsp+28h+var_20], rdx mov rax, [rsp+28h+var_10] mov [rsp+28h+var_28], rax loc_1EFC0C: mov rax, [rsp+28h+var_28] cmp dword ptr [rax+10h], 0 jle short loc_1EFC75 mov rax, [rsp+28h+var_28] mov rax, [rax+8] mov rdi, [rax] mov rsi, [rsp+28h+var_18] mov rdx, [rsp+28h+var_20] mov rax, [rdi] call qword ptr [rax+10h] test al, 1 jnz short loc_1EFC37 jmp short loc_1EFC3E loc_1EFC37: mov [rsp+28h+var_1], 1 jmp short loc_1EFC7A loc_1EFC3E: mov rax, [rsp+28h+var_28] mov rax, [rax+8] mov rdi, [rax] mov rax, [rdi] call qword ptr [rax+28h] mov rcx, rax mov rax, [rsp+28h+var_28] add rcx, [rax+18h] mov [rax+18h], rcx mov rcx, [rax+8] add rcx, 8 mov [rax+8], rcx mov ecx, [rax+10h] add ecx, 0FFFFFFFFh mov [rax+10h], ecx jmp short loc_1EFC0C loc_1EFC75: mov [rsp+28h+var_1], 0 loc_1EFC7A: mov al, [rsp+28h+var_1] and al, 1 add rsp, 28h retn
char google::protobuf::io::ConcatenatingInputStream::Next( google::protobuf::io::ConcatenatingInputStream *this, const void **a2, int *a3) { while ( *((int *)this + 4) > 0 ) { if ( ((*(long long ( **)(_QWORD, const void **, int *))(***((_QWORD ***)this + 1) + 16LL))( **((_QWORD **)this + 1), a2, a3) & 1) != 0 ) return 1; *((_QWORD *)this + 3) += (*(long long ( **)(_QWORD))(***((_QWORD ***)this + 1) + 40LL))(**((_QWORD **)this + 1)); *((_QWORD *)this + 1) += 8LL; --*((_DWORD *)this + 4); } return 0; }
7,963
google::protobuf::io::ConcatenatingInputStream::Next(void const**, int*)
aimrt_mujoco_sim/_deps/protobuf-src/src/google/protobuf/io/zero_copy_stream_impl.cc
bool ConcatenatingInputStream::Next(const void** data, int* size) { while (stream_count_ > 0) { if (streams_[0]->Next(data, size)) return true; // That stream is done. Advance to the next one. bytes_retired_ += streams_[0]->ByteCount(); ++streams_; --stream_count_; } // No more streams. return false; }
O3
cpp
google::protobuf::io::ConcatenatingInputStream::Next(void const**, int*): pushq %rbp pushq %r15 pushq %r14 pushq %rbx pushq %rax cmpl $0x0, 0x10(%rdi) jle 0xfc034 movq %rdx, %rbx movq %rsi, %r14 movq %rdi, %r15 movq 0x8(%rdi), %rax movq (%rax), %rdi movq (%rdi), %rax movq %r14, %rsi movq %rbx, %rdx callq *0x10(%rax) movl %eax, %ebp testb %al, %al jne 0xfc036 movq 0x8(%r15), %rax movq (%rax), %rdi movq (%rdi), %rax callq *0x28(%rax) addq %rax, 0x18(%r15) movq 0x8(%r15), %rax addq $0x8, %rax movq %rax, 0x8(%r15) movl 0x10(%r15), %ecx leal -0x1(%rcx), %edx movl %edx, 0x10(%r15) cmpl $0x1, %ecx jg 0xfbff0 jmp 0xfc036 xorl %ebp, %ebp movl %ebp, %eax addq $0x8, %rsp popq %rbx popq %r14 popq %r15 popq %rbp retq nop
_ZN6google8protobuf2io24ConcatenatingInputStream4NextEPPKvPi: push rbp push r15 push r14 push rbx push rax cmp dword ptr [rdi+10h], 0 jle short loc_FC034 mov rbx, rdx mov r14, rsi mov r15, rdi mov rax, [rdi+8] loc_FBFF0: mov rdi, [rax] mov rax, [rdi] mov rsi, r14 mov rdx, rbx call qword ptr [rax+10h] mov ebp, eax test al, al jnz short loc_FC036 mov rax, [r15+8] mov rdi, [rax] mov rax, [rdi] call qword ptr [rax+28h] add [r15+18h], rax mov rax, [r15+8] add rax, 8 mov [r15+8], rax mov ecx, [r15+10h] lea edx, [rcx-1] mov [r15+10h], edx cmp ecx, 1 jg short loc_FBFF0 jmp short loc_FC036 loc_FC034: xor ebp, ebp loc_FC036: mov eax, ebp add rsp, 8 pop rbx pop r14 pop r15 pop rbp retn
long long google::protobuf::io::ConcatenatingInputStream::Next( google::protobuf::io::ConcatenatingInputStream *this, const void **a2, int *a3) { _QWORD *v4; // rax unsigned int v5; // ebp int v6; // ecx if ( *((int *)this + 4) <= 0 ) { return 0; } else { v4 = (_QWORD *)*((_QWORD *)this + 1); do { v5 = (*(long long ( **)(_QWORD, const void **, int *))(*(_QWORD *)*v4 + 16LL))(*v4, a2, a3); if ( (_BYTE)v5 ) break; *((_QWORD *)this + 3) += (*(long long ( **)(_QWORD))(***((_QWORD ***)this + 1) + 40LL))(**((_QWORD **)this + 1)); v4 = (_QWORD *)(*((_QWORD *)this + 1) + 8LL); *((_QWORD *)this + 1) = v4; v6 = *((_DWORD *)this + 4); *((_DWORD *)this + 4) = v6 - 1; } while ( v6 > 1 ); } return v5; }
Next: PUSH RBP PUSH R15 PUSH R14 PUSH RBX PUSH RAX CMP dword ptr [RDI + 0x10],0x0 JLE 0x001fc034 MOV RBX,RDX MOV R14,RSI MOV R15,RDI MOV RAX,qword ptr [RDI + 0x8] LAB_001fbff0: MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RDI] MOV RSI,R14 MOV RDX,RBX CALL qword ptr [RAX + 0x10] MOV EBP,EAX TEST AL,AL JNZ 0x001fc036 MOV RAX,qword ptr [R15 + 0x8] MOV RDI,qword ptr [RAX] MOV RAX,qword ptr [RDI] CALL qword ptr [RAX + 0x28] ADD qword ptr [R15 + 0x18],RAX MOV RAX,qword ptr [R15 + 0x8] ADD RAX,0x8 MOV qword ptr [R15 + 0x8],RAX MOV ECX,dword ptr [R15 + 0x10] LEA EDX,[RCX + -0x1] MOV dword ptr [R15 + 0x10],EDX CMP ECX,0x1 JG 0x001fbff0 JMP 0x001fc036 LAB_001fc034: XOR EBP,EBP LAB_001fc036: MOV EAX,EBP ADD RSP,0x8 POP RBX POP R14 POP R15 POP RBP RET
/* google::protobuf::io::ConcatenatingInputStream::Next(void const**, int*) */ int4 __thiscall google::protobuf::io::ConcatenatingInputStream::Next (ConcatenatingInputStream *this,void **param_1,int *param_2) { int iVar1; int4 uVar2; long lVar3; int8 *puVar4; if (*(int *)(this + 0x10) < 1) { uVar2 = 0; } else { puVar4 = *(int8 **)(this + 8); do { uVar2 = (**(code **)(*(long *)*puVar4 + 0x10))((long *)*puVar4,param_1,param_2); if ((char)uVar2 != '\0') { return uVar2; } lVar3 = (**(code **)(*(long *)**(int8 **)(this + 8) + 0x28))(); *(long *)(this + 0x18) = *(long *)(this + 0x18) + lVar3; puVar4 = (int8 *)(*(long *)(this + 8) + 8); *(int8 **)(this + 8) = puVar4; iVar1 = *(int *)(this + 0x10); *(int *)(this + 0x10) = iVar1 + -1; } while (1 < iVar1); } return uVar2; }
7,964
Catch::BinaryExpr<unsigned long, int>::streamReconstructedExpression(std::ostream&) const
11AgReS1SoR11[P]Graph/build_O2/_deps/catch2-src/src/catch2/../catch2/internal/catch_decomposer.hpp
void streamReconstructedExpression( std::ostream &os ) const override { formatReconstructedExpression ( os, Catch::Detail::stringify( m_lhs ), m_op, Catch::Detail::stringify( m_rhs ) ); }
O2
cpp
Catch::BinaryExpr<unsigned long, int>::streamReconstructedExpression(std::ostream&) const: pushq %r15 pushq %r14 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rsi, %rbx movq %rdi, %r12 leaq 0xc(%rdi), %rsi leaq 0x28(%rsp), %rdi callq 0x154ba movq 0x10(%r12), %r14 movq 0x18(%r12), %r15 addq $0x20, %r12 leaq 0x8(%rsp), %rdi movq %r12, %rsi callq 0x154ba leaq 0x28(%rsp), %rsi leaq 0x8(%rsp), %r8 movq %rbx, %rdi movq %r14, %rdx movq %r15, %rcx callq 0x26f48 leaq 0x8(%rsp), %rdi callq 0x12240 leaq 0x28(%rsp), %rdi callq 0x12240 addq $0x48, %rsp popq %rbx popq %r12 popq %r14 popq %r15 retq movq %rax, %rbx leaq 0x8(%rsp), %rdi callq 0x12240 jmp 0x15e18 movq %rax, %rbx leaq 0x28(%rsp), %rdi callq 0x12240 movq %rbx, %rdi callq 0x129c0
_ZNK5Catch10BinaryExprIiiE29streamReconstructedExpressionERSo: push r15 push r14 push r12 push rbx sub rsp, 48h mov rbx, rsi mov r12, rdi lea rsi, [rdi+0Ch] lea rdi, [rsp+68h+var_40] call _ZN5Catch6Detail9stringifyIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; Catch::Detail::stringify<int>(int const&) mov r14, [r12+10h] mov r15, [r12+18h] add r12, 20h ; ' ' lea rdi, [rsp+68h+var_60] mov rsi, r12 call _ZN5Catch6Detail9stringifyIiEENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKT_; Catch::Detail::stringify<int>(int const&) lea rsi, [rsp+68h+var_40] lea r8, [rsp+68h+var_60] mov rdi, rbx mov rdx, r14 mov rcx, r15 call _ZN5Catch29formatReconstructedExpressionERSoRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS_9StringRefES8_; Catch::formatReconstructedExpression(std::ostream &,std::string const&,Catch::StringRef,std::string const&) lea rdi, [rsp+68h+var_60] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() lea rdi, [rsp+68h+var_40] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() add rsp, 48h pop rbx pop r12 pop r14 pop r15 retn mov rbx, rax lea rdi, [rsp+arg_0] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_15E18 mov rbx, rax loc_15E18: lea rdi, [rsp+arg_20] call __ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, rbx call __Unwind_Resume
long long Catch::BinaryExpr<int,int>::streamReconstructedExpression(long long a1, long long a2) { long long v2; // r14 long long v3; // r15 _BYTE v5[32]; // [rsp+8h] [rbp-60h] BYREF _BYTE v6[64]; // [rsp+28h] [rbp-40h] BYREF Catch::Detail::stringify<int>((long long)v6, (unsigned int *)(a1 + 12)); v2 = *(_QWORD *)(a1 + 16); v3 = *(_QWORD *)(a1 + 24); Catch::Detail::stringify<int>((long long)v5, (unsigned int *)(a1 + 32)); Catch::formatReconstructedExpression(a2, v6, v2, v3, v5); std::string::~string(v5); return std::string::~string(v6); }
streamReconstructedExpression: PUSH R15 PUSH R14 PUSH R12 PUSH RBX SUB RSP,0x48 MOV RBX,RSI MOV R12,RDI LEA RSI,[RDI + 0xc] LEA RDI,[RSP + 0x28] CALL 0x001154ba MOV R14,qword ptr [R12 + 0x10] MOV R15,qword ptr [R12 + 0x18] ADD R12,0x20 LAB_00115dc1: LEA RDI,[RSP + 0x8] MOV RSI,R12 CALL 0x001154ba LAB_00115dce: LEA RSI,[RSP + 0x28] LEA R8,[RSP + 0x8] MOV RDI,RBX MOV RDX,R14 MOV RCX,R15 CALL 0x00126f48 LAB_00115de6: LEA RDI,[RSP + 0x8] CALL 0x00112240 LEA RDI,[RSP + 0x28] CALL 0x00112240 ADD RSP,0x48 POP RBX POP R12 POP R14 POP R15 RET
/* Catch::BinaryExpr<int, int>::streamReconstructedExpression(std::ostream&) const */ void __thiscall Catch::BinaryExpr<int,int>::streamReconstructedExpression (BinaryExpr<int,int> *this,ostream *param_1) { int8 uVar1; int8 uVar2; Detail local_60 [32]; Detail local_40 [32]; Detail::stringify<int>(local_40,(int *)(this + 0xc)); uVar1 = *(int8 *)(this + 0x10); uVar2 = *(int8 *)(this + 0x18); /* try { // try from 00115dc1 to 00115dcd has its CatchHandler @ 00115e15 */ Detail::stringify<int>(local_60,(int *)(this + 0x20)); /* try { // try from 00115dce to 00115de5 has its CatchHandler @ 00115e06 */ formatReconstructedExpression((Catch *)param_1,local_40,uVar1,uVar2,local_60); std::__cxx11::string::~string((string *)local_60); std::__cxx11::string::~string((string *)local_40); return; }
7,965
nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::moved_or_copied() const
monkey531[P]llama/common/json.hpp
value_type moved_or_copied() const { if (value_ref == nullptr) { return std::move(owned_value); } return *value_ref; }
O3
cpp
nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>::moved_or_copied() const: pushq %r14 pushq %rbx pushq %rax movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rsi), %rsi testq %rsi, %rsi je 0xa0577 movq %rbx, %rdi callq 0x5c9f8 jmp 0xa05a1 movups (%r14), %xmm0 movups %xmm0, (%rbx) movq %r14, %rdi xorl %esi, %esi callq 0x579d6 movb $0x0, (%r14) movq $0x0, 0x8(%r14) movq %rbx, %rdi movl $0x1, %esi callq 0x579d6 movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r14 retq
_ZNK8nlohmann16json_abi_v3_11_36detail8json_refINS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEvEEE15moved_or_copiedEv: push r14 push rbx push rax mov r14, rsi mov rbx, rdi mov rsi, [rsi+10h] test rsi, rsi jz short loc_A0577 mov rdi, rbx call _ZN8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEC2ERKSD_; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::basic_json(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) jmp short loc_A05A1 loc_A0577: movups xmm0, xmmword ptr [r14] movups xmmword ptr [rbx], xmm0 mov rdi, r14 xor esi, esi call _ZNK8nlohmann16json_abi_v3_11_310basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvE16assert_invariantEb; nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>::assert_invariant(bool) mov byte ptr [r14], 0 mov qword ptr [r14+8], 0 mov rdi, 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) loc_A05A1: mov rax, rbx add rsp, 8 pop rbx pop r14 retn
unsigned __int8 * nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>::moved_or_copied( unsigned __int8 *a1, long long a2) { unsigned __int8 *v3; // rsi v3 = *(unsigned __int8 **)(a2 + 16); if ( v3 ) { nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>::basic_json( a1, v3); } else { *(_OWORD *)a1 = *(_OWORD *)a2; 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 *)a2); *(_BYTE *)a2 = 0; *(_QWORD *)(a2 + 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); } return a1; }
moved_or_copied: PUSH R14 PUSH RBX PUSH RAX MOV R14,RSI MOV RBX,RDI MOV RSI,qword ptr [RSI + 0x10] TEST RSI,RSI JZ 0x001a0577 MOV RDI,RBX CALL 0x0015c9f8 JMP 0x001a05a1 LAB_001a0577: MOVUPS XMM0,xmmword ptr [R14] MOVUPS xmmword ptr [RBX],XMM0 MOV RDI,R14 XOR ESI,ESI CALL 0x001579d6 MOV byte ptr [R14],0x0 MOV qword ptr [R14 + 0x8],0x0 MOV RDI,RBX MOV ESI,0x1 CALL 0x001579d6 LAB_001a05a1: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R14 RET
/* nlohmann::json_abi_v3_11_3::detail::json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> >::moved_or_copied() const */ void nlohmann::json_abi_v3_11_3::detail:: json_ref<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>> ::moved_or_copied(void) { int8 uVar1; int8 *in_RSI; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> *in_RDI; if ((basic_json *)in_RSI[2] == (basic_json *)0x0) { uVar1 = in_RSI[1]; *(int8 *)in_RDI = *in_RSI; *(int8 *)(in_RDI + 8) = uVar1; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(in_RSI,0)); *(int1 *)in_RSI = 0; in_RSI[1] = 0; basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void> ::assert_invariant(SUB81(in_RDI,0)); } else { basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,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(in_RDI,(basic_json *)in_RSI[2]); } return; }
7,966
tcp_create_packet
xtate/src/templ/templ-tcp.c
size_t tcp_create_packet(ipaddress ip_them, unsigned port_them, ipaddress ip_me, unsigned port_me, unsigned seqno, unsigned ackno, unsigned flags, unsigned ttl, unsigned win, const unsigned char *payload, size_t payload_length, unsigned char *px, size_t px_length) { /*use different template according to flags*/ if (flags == TCP_FLAG_SYN) { return tcp_create_by_template(&global_tmplset->pkts[TmplType_TCP_SYN], ip_them, port_them, ip_me, port_me, seqno, ackno, flags, ttl, win, payload, payload_length, px, px_length); } else if (flags & TCP_FLAG_RST) { return tcp_create_by_template(&global_tmplset->pkts[TmplType_TCP_RST], ip_them, port_them, ip_me, port_me, seqno, ackno, flags, ttl, win, payload, payload_length, px, px_length); } else { return tcp_create_by_template(&global_tmplset->pkts[TmplType_TCP], ip_them, port_them, ip_me, port_me, seqno, ackno, flags, ttl, win, payload, payload_length, px, px_length); } }
O3
c
tcp_create_packet: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x68, %rsp movl %r8d, %eax movl %ecx, %r8d movl %edx, %ecx movl %esi, %edx movl %edi, %esi movq 0xf0(%rsp), %r15 movq 0xe8(%rsp), %r14 movq 0xe0(%rsp), %rbx movq 0xd8(%rsp), %r11 movl 0xd0(%rsp), %r10d leaq 0xb8(%rsp), %r13 leaq 0xa0(%rsp), %r12 cmpl $0x2, %eax jne 0x4bf2c leaq 0x157357(%rip), %rax # 0x1a3230 movq (%rax), %rdi addq $0x58, %rdi movq 0x10(%r13), %rax movq %rax, 0x28(%rsp) movups (%r13), %xmm0 movups %xmm0, 0x18(%rsp) movq 0x10(%r12), %rax movq %rax, 0x10(%rsp) movups (%r12), %xmm0 movups %xmm0, (%rsp) movq %r15, 0x58(%rsp) movq %r14, 0x50(%rsp) movq %rbx, 0x48(%rsp) movq %r11, 0x40(%rsp) movl %r10d, 0x38(%rsp) movl %r9d, 0x30(%rsp) movl $0x2, %r9d jmp 0x4bf8e leaq 0x1572fd(%rip), %rdi # 0x1a3230 movq (%rdi), %rdi testb $0x4, %al jne 0x4bf40 addq $0x10, %rdi jmp 0x4bf47 addq $0xa0, %rdi movq 0x10(%r13), %rbp movq %rbp, 0x28(%rsp) movups (%r13), %xmm0 movups %xmm0, 0x18(%rsp) movq 0x10(%r12), %r13 movq %r13, 0x10(%rsp) movups (%r12), %xmm0 movups %xmm0, (%rsp) movq %r15, 0x58(%rsp) movq %r14, 0x50(%rsp) movq %rbx, 0x48(%rsp) movq %r11, 0x40(%rsp) movl %r10d, 0x38(%rsp) movl %r9d, 0x30(%rsp) movl %eax, %r9d callq 0x4bacf addq $0x68, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
tcp_create_packet: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 68h mov eax, r8d mov r8d, ecx mov ecx, edx mov edx, esi mov esi, edi mov r15, [rsp+98h+arg_50] mov r14, [rsp+98h+arg_48] mov rbx, [rsp+98h+arg_40] mov r11, [rsp+98h+arg_38] mov r10d, [rsp+98h+arg_30] lea r13, [rsp+98h+arg_18] lea r12, [rsp+98h+arg_0] cmp eax, 2 jnz short loc_4BF2C lea rax, global_tmplset mov rdi, [rax] add rdi, 58h ; 'X' mov rax, [r13+10h] mov [rsp+98h+var_70], rax movups xmm0, xmmword ptr [r13+0] movups [rsp+98h+var_80], xmm0 mov rax, [r12+10h] mov [rsp+98h+var_88], rax movups xmm0, xmmword ptr [r12] movups [rsp+98h+var_98], xmm0 mov [rsp+98h+var_40], r15 mov [rsp+98h+var_48], r14 mov [rsp+98h+var_50], rbx mov [rsp+98h+var_58], r11 mov [rsp+98h+var_60], r10d mov [rsp+98h+var_68], r9d mov r9d, 2 jmp short loc_4BF8E loc_4BF2C: lea rdi, global_tmplset mov rdi, [rdi] test al, 4 jnz short loc_4BF40 add rdi, 10h jmp short loc_4BF47 loc_4BF40: add rdi, 0A0h loc_4BF47: mov rbp, [r13+10h] mov [rsp+98h+var_70], rbp movups xmm0, xmmword ptr [r13+0] movups [rsp+98h+var_80], xmm0 mov r13, [r12+10h] mov [rsp+98h+var_88], r13 movups xmm0, xmmword ptr [r12] movups [rsp+98h+var_98], xmm0 mov [rsp+98h+var_40], r15 mov [rsp+98h+var_48], r14 mov [rsp+98h+var_50], rbx mov [rsp+98h+var_58], r11 mov [rsp+98h+var_60], r10d mov [rsp+98h+var_68], r9d mov r9d, eax loc_4BF8E: call tcp_create_by_template add rsp, 68h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long tcp_create_packet( __int16 a1, __int16 a2, int a3, int a4, int a5, int a6, unsigned long long a7, unsigned long long a8, char a9, unsigned long long a10, unsigned long long a11, int a12, int a13, long long a14, long long a15, long long a16, unsigned long long a17) { unsigned int *v23; // rdi if ( a5 == 2 ) return tcp_create_by_template( (unsigned int *)(global_tmplset + 88), a1, a2, a3, a4, 2, a7, a8, a9, a10, a11, a12, a6, a13, a14, a15, a16, a17); if ( (a5 & 4) != 0 ) v23 = (unsigned int *)(global_tmplset + 160); else v23 = (unsigned int *)(global_tmplset + 16); return tcp_create_by_template(v23, a1, a2, a3, a4, a5, a7, a8, a9, a10, a11, a12, a6, a13, a14, a15, a16, a17); }
tcp_create_packet: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x68 MOV EAX,R8D MOV R8D,ECX MOV ECX,EDX MOV EDX,ESI MOV ESI,EDI MOV R15,qword ptr [RSP + 0xf0] MOV R14,qword ptr [RSP + 0xe8] MOV RBX,qword ptr [RSP + 0xe0] MOV R11,qword ptr [RSP + 0xd8] MOV R10D,dword ptr [RSP + 0xd0] LEA R13,[RSP + 0xb8] LEA R12,[RSP + 0xa0] CMP EAX,0x2 JNZ 0x0014bf2c LEA RAX,[0x2a3230] MOV RDI,qword ptr [RAX] ADD RDI,0x58 MOV RAX,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x28],RAX MOVUPS XMM0,xmmword ptr [R13] MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV RAX,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x10],RAX MOVUPS XMM0,xmmword ptr [R12] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x58],R15 MOV qword ptr [RSP + 0x50],R14 MOV qword ptr [RSP + 0x48],RBX MOV qword ptr [RSP + 0x40],R11 MOV dword ptr [RSP + 0x38],R10D MOV dword ptr [RSP + 0x30],R9D MOV R9D,0x2 JMP 0x0014bf8e LAB_0014bf2c: LEA RDI,[0x2a3230] MOV RDI,qword ptr [RDI] TEST AL,0x4 JNZ 0x0014bf40 ADD RDI,0x10 JMP 0x0014bf47 LAB_0014bf40: ADD RDI,0xa0 LAB_0014bf47: MOV RBP,qword ptr [R13 + 0x10] MOV qword ptr [RSP + 0x28],RBP MOVUPS XMM0,xmmword ptr [R13] MOVUPS xmmword ptr [RSP + 0x18],XMM0 MOV R13,qword ptr [R12 + 0x10] MOV qword ptr [RSP + 0x10],R13 MOVUPS XMM0,xmmword ptr [R12] MOVUPS xmmword ptr [RSP],XMM0 MOV qword ptr [RSP + 0x58],R15 MOV qword ptr [RSP + 0x50],R14 MOV qword ptr [RSP + 0x48],RBX MOV qword ptr [RSP + 0x40],R11 MOV dword ptr [RSP + 0x38],R10D MOV dword ptr [RSP + 0x30],R9D MOV R9D,EAX LAB_0014bf8e: CALL 0x0014bacf ADD RSP,0x68 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
void tcp_create_packet(int4 param_1,int4 param_2,int4 param_3,int4 param_4, uint param_5,int4 param_6,int4 param_7,int4 param_8, int8 param_9,int8 param_10,int8 param_11,int8 param_12 ,int4 param_13,int8 param_14,int8 param_15, int8 param_16,int8 param_17) { long lVar1; if (param_5 == 2) { lVar1 = global_tmplset + 0x58; param_5 = 2; } else if ((param_5 & 4) == 0) { lVar1 = global_tmplset + 0x10; } else { lVar1 = global_tmplset + 0xa0; } tcp_create_by_template (lVar1,param_1,param_2,param_3,param_4,param_5,param_7,param_8,param_9,param_10,param_11 ,param_12,param_6,param_13,param_14,param_15,param_16,param_17); return; }
7,967
stbi__gif_parse_colortable(stbi__context*, unsigned char (*) [4], int, int)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static void stbi__gif_parse_colortable(stbi__context *s, stbi_uc pal[256][4], int num_entries, int transp) { int i; for (i=0; i < num_entries; ++i) { pal[i][2] = stbi__get8(s); pal[i][1] = stbi__get8(s); pal[i][0] = stbi__get8(s); pal[i][3] = transp == i ? 0 : 255; } }
O2
c
stbi__gif_parse_colortable(stbi__context*, unsigned char (*) [4], int, int): pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx movl %edx, %ebx movq %rsi, %r14 movq %rdi, %r15 movl %ecx, %r12d xorl %r13d, %r13d testl %edx, %edx cmovlel %r13d, %ebx cmpq %r13, %rbx je 0x3fcac movq %r15, %rdi callq 0x3d20c movb %al, 0x2(%r14,%r13,4) movq %r15, %rdi callq 0x3d20c movb %al, 0x1(%r14,%r13,4) movq %r15, %rdi callq 0x3d20c movb %al, (%r14,%r13,4) cmpq %r13, %r12 setne %al negb %al movb %al, 0x3(%r14,%r13,4) incq %r13 jmp 0x3fc6f popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
_ZL26stbi__gif_parse_colortableP13stbi__contextPA4_hii: push r15 push r14 push r13 push r12 push rbx mov ebx, edx mov r14, rsi mov r15, rdi mov r12d, ecx xor r13d, r13d test edx, edx cmovle ebx, r13d loc_3FC6F: cmp rbx, r13 jz short loc_3FCAC mov rdi, r15 call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov [r14+r13*4+2], al mov rdi, r15 call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov [r14+r13*4+1], al mov rdi, r15 call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov [r14+r13*4], al cmp r12, r13 setnz al neg al mov [r14+r13*4+3], al inc r13 jmp short loc_3FC6F loc_3FCAC: pop rbx pop r12 pop r13 pop r14 pop r15 retn
void stbi__gif_parse_colortable(long long a1, long long a2, int a3, unsigned int a4) { long long v4; // rbx long long v5; // r12 long long v6; // r13 v4 = (unsigned int)a3; v5 = a4; v6 = 0LL; if ( a3 <= 0 ) v4 = 0LL; while ( v4 != v6 ) { *(_BYTE *)(a2 + 4 * v6 + 2) = stbi__get8(a1); *(_BYTE *)(a2 + 4 * v6 + 1) = stbi__get8(a1); *(_BYTE *)(a2 + 4 * v6) = stbi__get8(a1); *(_BYTE *)(a2 + 4 * v6 + 3) = -(v5 != v6); ++v6; } }
stbi__gif_parse_colortable: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX MOV EBX,EDX MOV R14,RSI MOV R15,RDI MOV R12D,ECX XOR R13D,R13D TEST EDX,EDX CMOVLE EBX,R13D LAB_0013fc6f: CMP RBX,R13 JZ 0x0013fcac MOV RDI,R15 CALL 0x0013d20c MOV byte ptr [R14 + R13*0x4 + 0x2],AL MOV RDI,R15 CALL 0x0013d20c MOV byte ptr [R14 + R13*0x4 + 0x1],AL MOV RDI,R15 CALL 0x0013d20c MOV byte ptr [R14 + R13*0x4],AL CMP R12,R13 SETNZ AL NEG AL MOV byte ptr [R14 + R13*0x4 + 0x3],AL INC R13 JMP 0x0013fc6f LAB_0013fcac: POP RBX POP R12 POP R13 POP R14 POP R15 RET
/* stbi__gif_parse_colortable(stbi__context*, unsigned char (*) [4], int, int) */ void stbi__gif_parse_colortable (stbi__context *param_1,unsigned_char *param_2,int param_3,int param_4) { unsigned_char uVar1; ulong uVar2; ulong uVar3; uVar3 = 0; uVar2 = (ulong)(uint)param_3; if (param_3 < 1) { uVar2 = uVar3; } for (; uVar2 != uVar3; uVar3 = uVar3 + 1) { uVar1 = (unsigned_char)stbi__get8(param_1); param_2[uVar3 * 4 + 2] = uVar1; uVar1 = (unsigned_char)stbi__get8(param_1); param_2[uVar3 * 4 + 1] = uVar1; uVar1 = (unsigned_char)stbi__get8(param_1); param_2[uVar3 * 4] = uVar1; param_2[uVar3 * 4 + 3] = (unsigned_char)-((uint)param_4 != uVar3); } return; }
7,968
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::insert(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&)
monkey531[P]llama/common/json.hpp
std::pair<iterator, bool> insert( const value_type& value ) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, value.first)) { return {it, false}; } } Container::push_back(value); return {--this->end(), true}; }
O3
cpp
nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>>>::insert(std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>> const&): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, %r15 movq %rdi, %r14 movq (%rdi), %rbx movq 0x8(%rdi), %rbp cmpq %rbp, %rbx je 0xb8bee movq (%r15), %r12 movq 0x8(%r15), %r13 cmpq %r13, 0x8(%rbx) jne 0xb8be5 testq %r13, %r13 je 0xb8c05 movq (%rbx), %rdi movq %r12, %rsi movq %r13, %rdx callq 0x1a940 testl %eax, %eax je 0xb8c05 addq $0x30, %rbx cmpq %rbp, %rbx jne 0xb8bc8 movq %r14, %rdi movq %r15, %rsi callq 0xb8c1a movq 0x8(%r14), %rbx addq $-0x30, %rbx movb $0x1, %dl jmp 0xb8c07 xorl %edx, %edx movq %rbx, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEENS0_10basic_jsonIS1_St6vectorS7_blmdSaNS0_14adl_serializerES9_IhSaIhEEvEESt4lessIvESaISt4pairIKS7_SD_EEE6insertERKSI_: push rbp push r15 push r14 push r13 push r12 push rbx push rax mov r15, rsi mov r14, rdi mov rbx, [rdi] mov rbp, [rdi+8] cmp rbx, rbp jz short loc_B8BEE mov r12, [r15] mov r13, [r15+8] loc_B8BC8: cmp [rbx+8], r13 jnz short loc_B8BE5 test r13, r13 jz short loc_B8C05 mov rdi, [rbx] mov rsi, r12 mov rdx, r13 call _bcmp test eax, eax jz short loc_B8C05 loc_B8BE5: add rbx, 30h ; '0' cmp rbx, rbp jnz short loc_B8BC8 loc_B8BEE: mov rdi, r14 mov rsi, r15 call _ZNSt6vectorISt4pairIKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEN8nlohmann16json_abi_v3_11_310basic_jsonINS9_11ordered_mapES_S6_blmdSaNS9_14adl_serializerES_IhSaIhEEvEEESaISG_EE9push_backERKSG_; std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>>>::push_back(std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void>> const&) mov rbx, [r14+8] add rbx, 0FFFFFFFFFFFFFFD0h mov dl, 1 jmp short loc_B8C07 loc_B8C05: xor edx, edx loc_B8C07: mov rax, rbx add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long nlohmann::json_abi_v3_11_3::ordered_map<std::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>,std::less<void>,std::allocator<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>>::insert( _QWORD *a1, long long *a2) { _QWORD *v2; // rbx _QWORD *v3; // rbp long long v4; // r12 long long v5; // r13 v2 = (_QWORD *)*a1; v3 = (_QWORD *)a1[1]; if ( (_QWORD *)*a1 == v3 ) { LABEL_7: std::vector<std::pair<std::string const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned char>,void>>>::push_back( a1, a2); return a1[1] - 48LL; } else { v4 = *a2; v5 = a2[1]; while ( v2[1] != v5 || v5 && (unsigned int)bcmp(*v2, v4) ) { v2 += 6; if ( v2 == v3 ) goto LABEL_7; } } return (long long)v2; }
insert: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV R15,RSI MOV R14,RDI MOV RBX,qword ptr [RDI] MOV RBP,qword ptr [RDI + 0x8] CMP RBX,RBP JZ 0x001b8bee MOV R12,qword ptr [R15] MOV R13,qword ptr [R15 + 0x8] LAB_001b8bc8: CMP qword ptr [RBX + 0x8],R13 JNZ 0x001b8be5 TEST R13,R13 JZ 0x001b8c05 MOV RDI,qword ptr [RBX] MOV RSI,R12 MOV RDX,R13 CALL 0x0011a940 TEST EAX,EAX JZ 0x001b8c05 LAB_001b8be5: ADD RBX,0x30 CMP RBX,RBP JNZ 0x001b8bc8 LAB_001b8bee: MOV RDI,R14 MOV RSI,R15 CALL 0x001b8c1a MOV RBX,qword ptr [R14 + 0x8] ADD RBX,-0x30 MOV DL,0x1 JMP 0x001b8c07 LAB_001b8c05: XOR EDX,EDX LAB_001b8c07: MOV RAX,RBX ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
/* nlohmann::json_abi_v3_11_3::ordered_map<std::__cxx11::string, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, std::less<void>, std::allocator<std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > > >::insert(std::pair<std::__cxx11::string const, nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> > const&) */ int1 [16] __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::insert(ordered_map<std::__cxx11::string,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,std::less<void>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *this,pair *param_1) { int8 *puVar1; void *__s2; size_t __n; int iVar2; int8 extraout_RDX; int8 uVar3; int8 *puVar4; int1 auVar5 [16]; puVar4 = *(int8 **)this; puVar1 = *(int8 **)(this + 8); if (puVar4 != puVar1) { __s2 = *(void **)param_1; __n = *(size_t *)(param_1 + 8); do { if (puVar4[1] == __n) { if (__n != 0) { iVar2 = bcmp((void *)*puVar4,__s2,__n); if (iVar2 != 0) goto LAB_001b8be5; } uVar3 = 0; goto LAB_001b8c07; } LAB_001b8be5: puVar4 = puVar4 + 6; } while (puVar4 != puVar1); } std:: vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> ::push_back((vector<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<std::__cxx11::string_const,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>>> *)this,param_1); puVar4 = (int8 *)(*(long *)(this + 8) + -0x30); uVar3 = CONCAT71((int7)((ulong)extraout_RDX >> 8),1); LAB_001b8c07: auVar5._8_8_ = uVar3; auVar5._0_8_ = puVar4; return auVar5; }
7,969
my_service_thread_sleep
eloqsql/storage/maria/ma_servicethread.c
my_bool my_service_thread_sleep(MA_SERVICE_THREAD_CONTROL *control, ulonglong sleep_time) { struct timespec abstime; my_bool res= FALSE; DBUG_ENTER("my_service_thread_sleep"); DBUG_PRINT("init", ("control %p", control)); mysql_mutex_lock(control->LOCK_control); if (control->killed) { mysql_mutex_unlock(control->LOCK_control); DBUG_RETURN(TRUE); } #if 0 /* good for testing, to do a lot of checkpoints, finds a lot of bugs */ mysql_mutex_unlock(&control->LOCK_control); my_sleep(100000); /* a tenth of a second */ mysql_mutex_lock(&control->LOCK_control); #else /* To have a killable sleep, we use timedwait like our SQL GET_LOCK() */ DBUG_PRINT("info", ("sleeping %llu nano seconds", sleep_time)); if (sleep_time) { set_timespec_nsec(abstime, sleep_time); mysql_cond_timedwait(control->COND_control, control->LOCK_control, &abstime); } #endif if (control->killed) res= TRUE; mysql_mutex_unlock(control->LOCK_control); DBUG_RETURN(res); }
O3
c
my_service_thread_sleep: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx subq $0x10, %rsp movq %rsi, %r14 movq %rdi, %rbx movq 0x10(%rdi), %rdi cmpq $0x0, 0x40(%rdi) jne 0x73294 callq 0x291d0 cmpb $0x0, 0x8(%rbx) je 0x73215 movq 0x10(%rbx), %rbx movq 0x40(%rbx), %rdi testq %rdi, %rdi jne 0x732aa movq %rbx, %rdi callq 0x291a0 movb $0x1, %r14b jmp 0x73288 testq %r14, %r14 je 0x7326b callq 0xa1448 imulq $0x3e8, %rax, %rcx # imm = 0x3E8 addq %r14, %rcx movq %rcx, %rax shrq $0x9, %rax movabsq $0x44b82fa09b5a53, %rdx # imm = 0x44B82FA09B5A53 mulq %rdx shrq $0xb, %rdx movq %rdx, -0x20(%rbp) imulq $0x3b9aca00, %rdx, %rax # imm = 0x3B9ACA00 subq %rax, %rcx movq %rcx, -0x18(%rbp) movq 0x10(%rbx), %rsi movq 0x18(%rbx), %rdi cmpq $0x0, 0x30(%rdi) jne 0x732d1 leaq -0x20(%rbp), %rdx callq 0x295f0 cmpb $0x0, 0x8(%rbx) setne %r14b movq 0x10(%rbx), %rbx movq 0x40(%rbx), %rdi testq %rdi, %rdi jne 0x732bf movq %rbx, %rdi callq 0x291a0 movl %r14d, %eax addq $0x10, %rsp popq %rbx popq %r14 popq %rbp retq leaq 0x699f1(%rip), %rsi # 0xdcc8c movl $0x63, %edx callq 0x2ee0b jmp 0x731f1 leaq 0x315d9f(%rip), %rax # 0x389050 movq (%rax), %rax callq *0x160(%rax) jmp 0x73208 leaq 0x315d8a(%rip), %rax # 0x389050 movq (%rax), %rax callq *0x160(%rax) jmp 0x73280 leaq 0x699b4(%rip), %rcx # 0xdcc8c leaq -0x20(%rbp), %rdx movl $0x74, %r8d callq 0x2f18c jmp 0x7326b nopl (%rax)
my_service_thread_sleep: push rbp mov rbp, rsp push r14 push rbx sub rsp, 10h mov r14, rsi mov rbx, rdi mov rdi, [rdi+10h] cmp qword ptr [rdi+40h], 0 jnz loc_73294 call _pthread_mutex_lock loc_731F1: cmp byte ptr [rbx+8], 0 jz short loc_73215 mov rbx, [rbx+10h] mov rdi, [rbx+40h] test rdi, rdi jnz loc_732AA loc_73208: mov rdi, rbx call _pthread_mutex_unlock mov r14b, 1 jmp short loc_73288 loc_73215: test r14, r14 jz short loc_7326B call my_hrtime imul rcx, rax, 3E8h add rcx, r14 mov rax, rcx shr rax, 9 mov rdx, 44B82FA09B5A53h mul rdx shr rdx, 0Bh mov [rbp+var_20], rdx imul rax, rdx, 3B9ACA00h sub rcx, rax mov [rbp+var_18], rcx mov rsi, [rbx+10h] mov rdi, [rbx+18h] cmp qword ptr [rdi+30h], 0 jnz short loc_732D1 lea rdx, [rbp+var_20] call _pthread_cond_timedwait loc_7326B: cmp byte ptr [rbx+8], 0 setnz r14b mov rbx, [rbx+10h] mov rdi, [rbx+40h] test rdi, rdi jnz short loc_732BF loc_73280: mov rdi, rbx call _pthread_mutex_unlock loc_73288: mov eax, r14d add rsp, 10h pop rbx pop r14 pop rbp retn loc_73294: lea rsi, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"... mov edx, 63h ; 'c' call psi_mutex_lock jmp loc_731F1 loc_732AA: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp loc_73208 loc_732BF: lea rax, PSI_server mov rax, [rax] call qword ptr [rax+160h] jmp short loc_73280 loc_732D1: lea rcx, aWorkspaceLlm4b_38; "/workspace/llm4binary/github2025/eloqsq"... lea rdx, [rbp+var_20] mov r8d, 74h ; 't' call psi_cond_timedwait jmp short loc_7326B
long long my_service_thread_sleep(long long a1, const char *a2) { const char *v2; // r14 long long v4; // rdi long long v5; // rbx const char *v6; // rcx long long v7; // rsi long long v8; // rdi long long v9; // rbx _QWORD v11[4]; // [rsp+0h] [rbp-20h] BYREF v2 = a2; v4 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(v4 + 64) ) { a2 = "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c"; psi_mutex_lock(v4, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c", 0x63u); } else { pthread_mutex_lock(v4); } if ( *(_BYTE *)(a1 + 8) ) { v5 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(v5 + 64) ) PSI_server[44](); pthread_mutex_unlock(v5); LOBYTE(v2) = 1; } else { if ( v2 ) { v6 = &v2[1000 * my_hrtime(v4, a2)]; v11[0] = (unsigned long long)v6 / 0x3B9ACA00; v11[1] = (unsigned long long)v6 % 0x3B9ACA00; v7 = *(_QWORD *)(a1 + 16); v8 = *(_QWORD *)(a1 + 24); if ( *(_QWORD *)(v8 + 48) ) psi_cond_timedwait( v8, v7, (long long)v11, (long long)"/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c", 0x74u); else pthread_cond_timedwait(v8, v7, v11); } LOBYTE(v2) = *(_BYTE *)(a1 + 8) != 0; v9 = *(_QWORD *)(a1 + 16); if ( *(_QWORD *)(v9 + 64) ) PSI_server[44](); pthread_mutex_unlock(v9); } return (unsigned int)v2; }
my_service_thread_sleep: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX SUB RSP,0x10 MOV R14,RSI MOV RBX,RDI MOV RDI,qword ptr [RDI + 0x10] CMP qword ptr [RDI + 0x40],0x0 JNZ 0x00173294 CALL 0x001291d0 LAB_001731f1: CMP byte ptr [RBX + 0x8],0x0 JZ 0x00173215 MOV RBX,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JNZ 0x001732aa LAB_00173208: MOV RDI,RBX CALL 0x001291a0 MOV R14B,0x1 JMP 0x00173288 LAB_00173215: TEST R14,R14 JZ 0x0017326b CALL 0x001a1448 IMUL RCX,RAX,0x3e8 ADD RCX,R14 MOV RAX,RCX SHR RAX,0x9 MOV RDX,0x44b82fa09b5a53 MUL RDX SHR RDX,0xb MOV qword ptr [RBP + -0x20],RDX IMUL RAX,RDX,0x3b9aca00 SUB RCX,RAX MOV qword ptr [RBP + -0x18],RCX MOV RSI,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RBX + 0x18] CMP qword ptr [RDI + 0x30],0x0 JNZ 0x001732d1 LEA RDX,[RBP + -0x20] CALL 0x001295f0 LAB_0017326b: CMP byte ptr [RBX + 0x8],0x0 SETNZ R14B MOV RBX,qword ptr [RBX + 0x10] MOV RDI,qword ptr [RBX + 0x40] TEST RDI,RDI JNZ 0x001732bf LAB_00173280: MOV RDI,RBX CALL 0x001291a0 LAB_00173288: MOV EAX,R14D ADD RSP,0x10 POP RBX POP R14 POP RBP RET LAB_00173294: LEA RSI,[0x1dcc8c] MOV EDX,0x63 CALL 0x0012ee0b JMP 0x001731f1 LAB_001732aa: LEA RAX,[0x489050] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00173208 LAB_001732bf: LEA RAX,[0x489050] MOV RAX,qword ptr [RAX] CALL qword ptr [RAX + 0x160] JMP 0x00173280 LAB_001732d1: LEA RCX,[0x1dcc8c] LEA RDX,[RBP + -0x20] MOV R8D,0x74 CALL 0x0012f18c JMP 0x0017326b
ulong my_service_thread_sleep(long param_1,long param_2) { pthread_mutex_t *ppVar1; pthread_cond_t *__cond; long lVar2; int7 uVar4; ulong uVar3; timespec local_28; ppVar1 = *(pthread_mutex_t **)(param_1 + 0x10); if (*(long *)((long)ppVar1 + 0x40) == 0) { pthread_mutex_lock(ppVar1); } else { psi_mutex_lock(ppVar1, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c",99); } uVar4 = (int7)((ulong)param_2 >> 8); if (*(char *)(param_1 + 8) == '\0') { if (param_2 != 0) { lVar2 = my_hrtime(); local_28.tv_nsec = lVar2 * 1000 + param_2; local_28.tv_sec = (ulong)local_28.tv_nsec / 1000000000; local_28.tv_nsec = (ulong)local_28.tv_nsec % 1000000000; __cond = *(pthread_cond_t **)(param_1 + 0x18); if (__cond[1].__align == 0) { pthread_cond_timedwait(__cond,*(pthread_mutex_t **)(param_1 + 0x10),&local_28); } else { psi_cond_timedwait(__cond,*(pthread_mutex_t **)(param_1 + 0x10),&local_28, "/workspace/llm4binary/github2025/eloqsql/storage/maria/ma_servicethread.c" ,0x74); } } uVar3 = CONCAT71(uVar4,*(char *)(param_1 + 8) != '\0'); ppVar1 = *(pthread_mutex_t **)(param_1 + 0x10); if (*(long *)((long)ppVar1 + 0x40) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(ppVar1); } else { ppVar1 = *(pthread_mutex_t **)(param_1 + 0x10); if (*(long *)((long)ppVar1 + 0x40) != 0) { (**(code **)(PSI_server + 0x160))(); } pthread_mutex_unlock(ppVar1); uVar3 = CONCAT71(uVar4,1); } return uVar3 & 0xffffffff; }
7,970
my_uca_alloc_contractions
eloqsql/strings/ctype-uca.c
static my_bool my_uca_alloc_contractions(MY_CONTRACTIONS *contractions, MY_CHARSET_LOADER *loader, size_t n) { size_t size= n * sizeof(MY_CONTRACTION); if (!(contractions->item= (loader->once_alloc)(size)) || !(contractions->flags= (char *) (loader->once_alloc)(MY_UCA_CNT_FLAG_SIZE))) return 1; memset(contractions->item, 0, size); memset(contractions->flags, 0, MY_UCA_CNT_FLAG_SIZE); return 0; }
O0
c
my_uca_alloc_contractions: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movq %rdi, -0x10(%rbp) movq %rsi, -0x18(%rbp) movq %rdx, -0x20(%rbp) imulq $0x58, -0x20(%rbp), %rax movq %rax, -0x28(%rbp) movq -0x18(%rbp), %rax movq 0x80(%rax), %rax movq -0x28(%rbp), %rdi callq *%rax movq -0x10(%rbp), %rcx movq %rax, 0x8(%rcx) cmpq $0x0, %rax je 0x9fbd9 movq -0x18(%rbp), %rax movl $0x1000, %edi # imm = 0x1000 callq *0x80(%rax) movq -0x10(%rbp), %rcx movq %rax, 0x10(%rcx) cmpq $0x0, %rax jne 0x9fbdf movb $0x1, -0x1(%rbp) jmp 0x9fc0a movq -0x10(%rbp), %rax movq 0x8(%rax), %rdi movq -0x28(%rbp), %rdx xorl %esi, %esi callq 0x362e0 movq -0x10(%rbp), %rax movq 0x10(%rax), %rdi xorl %esi, %esi movl $0x1000, %edx # imm = 0x1000 callq 0x362e0 movb $0x0, -0x1(%rbp) movb -0x1(%rbp), %al addq $0x30, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
my_uca_alloc_contractions: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_10], rdi mov [rbp+var_18], rsi mov [rbp+var_20], rdx imul rax, [rbp+var_20], 58h ; 'X' mov [rbp+var_28], rax mov rax, [rbp+var_18] mov rax, [rax+80h] mov rdi, [rbp+var_28] call rax mov rcx, [rbp+var_10] mov [rcx+8], rax cmp rax, 0 jz short loc_9FBD9 mov rax, [rbp+var_18] mov edi, 1000h call qword ptr [rax+80h] mov rcx, [rbp+var_10] mov [rcx+10h], rax cmp rax, 0 jnz short loc_9FBDF loc_9FBD9: mov [rbp+var_1], 1 jmp short loc_9FC0A loc_9FBDF: mov rax, [rbp+var_10] mov rdi, [rax+8] mov rdx, [rbp+var_28] xor esi, esi call _memset mov rax, [rbp+var_10] mov rdi, [rax+10h] xor esi, esi mov edx, 1000h call _memset mov [rbp+var_1], 0 loc_9FC0A: mov al, [rbp+var_1] add rsp, 30h pop rbp retn
char my_uca_alloc_contractions(long long a1, long long a2, long long a3) { long long v3; // rax long long v4; // rax long long v6; // [rsp+8h] [rbp-28h] v6 = 88 * a3; v3 = (*(long long ( **)(long long))(a2 + 128))(88 * a3); *(_QWORD *)(a1 + 8) = v3; if ( !v3 ) return 1; v4 = (*(long long ( **)(long long))(a2 + 128))(4096LL); *(_QWORD *)(a1 + 16) = v4; if ( !v4 ) return 1; memset(*(_QWORD *)(a1 + 8), 0LL, v6); memset(*(_QWORD *)(a1 + 16), 0LL, 4096LL); return 0; }
my_uca_alloc_contractions: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV qword ptr [RBP + -0x10],RDI MOV qword ptr [RBP + -0x18],RSI MOV qword ptr [RBP + -0x20],RDX IMUL RAX,qword ptr [RBP + -0x20],0x58 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x18] MOV RAX,qword ptr [RAX + 0x80] MOV RDI,qword ptr [RBP + -0x28] CALL RAX MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x8],RAX CMP RAX,0x0 JZ 0x0019fbd9 MOV RAX,qword ptr [RBP + -0x18] MOV EDI,0x1000 CALL qword ptr [RAX + 0x80] MOV RCX,qword ptr [RBP + -0x10] MOV qword ptr [RCX + 0x10],RAX CMP RAX,0x0 JNZ 0x0019fbdf LAB_0019fbd9: MOV byte ptr [RBP + -0x1],0x1 JMP 0x0019fc0a LAB_0019fbdf: MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x8] MOV RDX,qword ptr [RBP + -0x28] XOR ESI,ESI CALL 0x001362e0 MOV RAX,qword ptr [RBP + -0x10] MOV RDI,qword ptr [RAX + 0x10] XOR ESI,ESI MOV EDX,0x1000 CALL 0x001362e0 MOV byte ptr [RBP + -0x1],0x0 LAB_0019fc0a: MOV AL,byte ptr [RBP + -0x1] ADD RSP,0x30 POP RBP RET
int1 my_uca_alloc_contractions(long param_1,long param_2,long param_3) { long lVar1; lVar1 = (**(code **)(param_2 + 0x80))(param_3 * 0x58); *(long *)(param_1 + 8) = lVar1; if (lVar1 != 0) { lVar1 = (**(code **)(param_2 + 0x80))(0x1000); *(long *)(param_1 + 0x10) = lVar1; if (lVar1 != 0) { memset(*(void **)(param_1 + 8),0,param_3 * 0x58); memset(*(void **)(param_1 + 0x10),0,0x1000); return 0; } } return 1; }
7,971
ggml_compute_forward_sum_rows_f32
monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c
static void ggml_compute_forward_sum_rows_f32( const struct ggml_compute_params * params, struct ggml_tensor * dst) { const struct ggml_tensor * src0 = dst->src[0]; if (params->ith != 0) { return; } GGML_ASSERT(src0->nb[0] == sizeof(float)); GGML_ASSERT(dst->nb[0] == sizeof(float)); GGML_TENSOR_UNARY_OP_LOCALS GGML_ASSERT(ne0 == 1); GGML_ASSERT(ne1 == ne01); GGML_ASSERT(ne2 == ne02); GGML_ASSERT(ne3 == ne03); for (int64_t i3 = 0; i3 < ne03; i3++) { for (int64_t i2 = 0; i2 < ne02; i2++) { for (int64_t i1 = 0; i1 < ne01; i1++) { float * src_row = (float *) ((char *) src0->data + i1*nb01 + i2*nb02 + i3*nb03); float * dst_row = (float *) ((char *) dst->data + i1*nb1 + i2*nb2 + i3*nb3); float row_sum = 0; ggml_vec_sum_f32(ne00, &row_sum, src_row); dst_row[0] = row_sum; } } } }
O0
c
ggml_compute_forward_sum_rows_f32: subq $0xc8, %rsp movq %rdi, 0xc0(%rsp) movq %rsi, 0xb8(%rsp) movq 0xb8(%rsp), %rax movq 0x98(%rax), %rax movq %rax, 0xb0(%rsp) movq 0xc0(%rsp), %rax cmpl $0x0, (%rax) je 0x28270 jmp 0x285ed movq 0xb0(%rsp), %rax cmpq $0x4, 0x30(%rax) je 0x282a0 leaq 0x898d4(%rip), %rdi # 0xb1b5a movl $0x162f, %esi # imm = 0x162F leaq 0x8991f(%rip), %rdx # 0xb1bb1 leaq 0x8a23a(%rip), %rcx # 0xb24d3 movb $0x0, %al callq 0xd030 movq 0xb8(%rsp), %rax cmpq $0x4, 0x30(%rax) je 0x282d0 leaq 0x898a4(%rip), %rdi # 0xb1b5a movl $0x1630, %esi # imm = 0x1630 leaq 0x898ef(%rip), %rdx # 0xb1bb1 leaq 0x8a1ee(%rip), %rcx # 0xb24b7 movb $0x0, %al callq 0xd030 movq 0xb0(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0xa8(%rsp) movq 0xb0(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0xa0(%rsp) movq 0xb0(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x98(%rsp) movq 0xb0(%rsp), %rax movq 0x28(%rax), %rax movq %rax, 0x90(%rsp) movq 0xb0(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x88(%rsp) movq 0xb0(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0x80(%rsp) movq 0xb0(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x78(%rsp) movq 0xb0(%rsp), %rax movq 0x48(%rax), %rax movq %rax, 0x70(%rsp) movq 0xb8(%rsp), %rax movq 0x10(%rax), %rax movq %rax, 0x68(%rsp) movq 0xb8(%rsp), %rax movq 0x18(%rax), %rax movq %rax, 0x60(%rsp) movq 0xb8(%rsp), %rax movq 0x20(%rax), %rax movq %rax, 0x58(%rsp) movq 0xb8(%rsp), %rax movq 0x28(%rax), %rax movq %rax, 0x50(%rsp) movq 0xb8(%rsp), %rax movq 0x30(%rax), %rax movq %rax, 0x48(%rsp) movq 0xb8(%rsp), %rax movq 0x38(%rax), %rax movq %rax, 0x40(%rsp) movq 0xb8(%rsp), %rax movq 0x40(%rax), %rax movq %rax, 0x38(%rsp) movq 0xb8(%rsp), %rax movq 0x48(%rax), %rax movq %rax, 0x30(%rsp) cmpq $0x1, 0x68(%rsp) je 0x2841b leaq 0x89759(%rip), %rdi # 0xb1b5a movl $0x1634, %esi # imm = 0x1634 leaq 0x897a4(%rip), %rdx # 0xb1bb1 leaq 0x8a0dc(%rip), %rcx # 0xb24f0 movb $0x0, %al callq 0xd030 movq 0x60(%rsp), %rax cmpq 0xa0(%rsp), %rax je 0x2844b leaq 0x89729(%rip), %rdi # 0xb1b5a movl $0x1635, %esi # imm = 0x1635 leaq 0x89774(%rip), %rdx # 0xb1bb1 leaq 0x8a0b5(%rip), %rcx # 0xb24f9 movb $0x0, %al callq 0xd030 movq 0x58(%rsp), %rax cmpq 0x98(%rsp), %rax je 0x2847b leaq 0x896f9(%rip), %rdi # 0xb1b5a movl $0x1636, %esi # imm = 0x1636 leaq 0x89744(%rip), %rdx # 0xb1bb1 leaq 0x8a091(%rip), %rcx # 0xb2505 movb $0x0, %al callq 0xd030 movq 0x50(%rsp), %rax cmpq 0x90(%rsp), %rax je 0x284ab leaq 0x896c9(%rip), %rdi # 0xb1b5a movl $0x1637, %esi # imm = 0x1637 leaq 0x89714(%rip), %rdx # 0xb1bb1 leaq 0x8a06d(%rip), %rcx # 0xb2511 movb $0x0, %al callq 0xd030 movq $0x0, 0x28(%rsp) movq 0x28(%rsp), %rax cmpq 0x90(%rsp), %rax jge 0x285ed movq $0x0, 0x20(%rsp) movq 0x20(%rsp), %rax cmpq 0x98(%rsp), %rax jge 0x285d8 movq $0x0, 0x18(%rsp) movq 0x18(%rsp), %rax cmpq 0xa0(%rsp), %rax jge 0x285c3 movq 0xb0(%rsp), %rax movq 0xf8(%rax), %rax movq 0x18(%rsp), %rcx imulq 0x80(%rsp), %rcx addq %rcx, %rax movq 0x20(%rsp), %rcx imulq 0x78(%rsp), %rcx addq %rcx, %rax movq 0x28(%rsp), %rcx imulq 0x70(%rsp), %rcx addq %rcx, %rax movq %rax, 0x10(%rsp) movq 0xb8(%rsp), %rax movq 0xf8(%rax), %rax movq 0x18(%rsp), %rcx imulq 0x40(%rsp), %rcx addq %rcx, %rax movq 0x20(%rsp), %rcx imulq 0x38(%rsp), %rcx addq %rcx, %rax movq 0x28(%rsp), %rcx imulq 0x30(%rsp), %rcx addq %rcx, %rax movq %rax, 0x8(%rsp) vpxor %xmm0, %xmm0, %xmm0 vmovss %xmm0, 0x4(%rsp) movq 0xa8(%rsp), %rax movl %eax, %edi movq 0x10(%rsp), %rdx leaq 0x4(%rsp), %rsi callq 0x28600 vmovss 0x4(%rsp), %xmm0 movq 0x8(%rsp), %rax vmovss %xmm0, (%rax) movq 0x18(%rsp), %rax addq $0x1, %rax movq %rax, 0x18(%rsp) jmp 0x284ec jmp 0x285c5 movq 0x20(%rsp), %rax addq $0x1, %rax movq %rax, 0x20(%rsp) jmp 0x284d0 jmp 0x285da movq 0x28(%rsp), %rax addq $0x1, %rax movq %rax, 0x28(%rsp) jmp 0x284b4 addq $0xc8, %rsp retq nopw %cs:(%rax,%rax)
ggml_compute_forward_sum_rows_f32: sub rsp, 0C8h mov [rsp+0C8h+var_8], rdi mov [rsp+0C8h+var_10], rsi mov rax, [rsp+0C8h+var_10] mov rax, [rax+98h] mov [rsp+0C8h+var_18], rax mov rax, [rsp+0C8h+var_8] cmp dword ptr [rax], 0 jz short loc_28270 jmp loc_285ED loc_28270: mov rax, [rsp+0C8h+var_18] cmp qword ptr [rax+30h], 4 jz short loc_282A0 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 162Fh lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aSrc0Nb0SizeofF; "src0->nb[0] == sizeof(float)" mov al, 0 call _ggml_abort loc_282A0: mov rax, [rsp+0C8h+var_10] cmp qword ptr [rax+30h], 4 jz short loc_282D0 lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1630h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aDstNb0SizeofFl; "dst->nb[0] == sizeof(float)" mov al, 0 call _ggml_abort loc_282D0: mov rax, [rsp+0C8h+var_18] mov rax, [rax+10h] mov [rsp+0C8h+var_20], rax mov rax, [rsp+0C8h+var_18] mov rax, [rax+18h] mov [rsp+0C8h+var_28], rax mov rax, [rsp+0C8h+var_18] mov rax, [rax+20h] mov [rsp+0C8h+var_30], rax mov rax, [rsp+0C8h+var_18] mov rax, [rax+28h] mov [rsp+0C8h+var_38], rax mov rax, [rsp+0C8h+var_18] mov rax, [rax+30h] mov [rsp+0C8h+var_40], rax mov rax, [rsp+0C8h+var_18] mov rax, [rax+38h] mov [rsp+0C8h+var_48], rax mov rax, [rsp+0C8h+var_18] mov rax, [rax+40h] mov [rsp+0C8h+var_50], rax mov rax, [rsp+0C8h+var_18] mov rax, [rax+48h] mov [rsp+0C8h+var_58], rax mov rax, [rsp+0C8h+var_10] mov rax, [rax+10h] mov [rsp+0C8h+var_60], rax mov rax, [rsp+0C8h+var_10] mov rax, [rax+18h] mov [rsp+0C8h+var_68], rax mov rax, [rsp+0C8h+var_10] mov rax, [rax+20h] mov [rsp+0C8h+var_70], rax mov rax, [rsp+0C8h+var_10] mov rax, [rax+28h] mov [rsp+0C8h+var_78], rax mov rax, [rsp+0C8h+var_10] mov rax, [rax+30h] mov [rsp+0C8h+var_80], rax mov rax, [rsp+0C8h+var_10] mov rax, [rax+38h] mov [rsp+0C8h+var_88], rax mov rax, [rsp+0C8h+var_10] mov rax, [rax+40h] mov [rsp+0C8h+var_90], rax mov rax, [rsp+0C8h+var_10] mov rax, [rax+48h] mov [rsp+0C8h+var_98], rax cmp [rsp+0C8h+var_60], 1 jz short loc_2841B lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1634h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNe01; "ne0 == 1" mov al, 0 call _ggml_abort loc_2841B: mov rax, [rsp+0C8h+var_68] cmp rax, [rsp+0C8h+var_28] jz short loc_2844B lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1635h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNe1Ne01; "ne1 == ne01" mov al, 0 call _ggml_abort loc_2844B: mov rax, [rsp+0C8h+var_70] cmp rax, [rsp+0C8h+var_30] jz short loc_2847B lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1636h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNe2Ne02; "ne2 == ne02" mov al, 0 call _ggml_abort loc_2847B: mov rax, [rsp+0C8h+var_78] cmp rax, [rsp+0C8h+var_38] jz short loc_284AB lea rdi, aWorkspaceLlm4b_0; "/workspace/llm4binary/github/2025_star3"... mov esi, 1637h lea rdx, aGgmlAssertSFai; "GGML_ASSERT(%s) failed" lea rcx, aNe3Ne03; "ne3 == ne03" mov al, 0 call _ggml_abort loc_284AB: mov [rsp+0C8h+var_A0], 0 loc_284B4: mov rax, [rsp+0C8h+var_A0] cmp rax, [rsp+0C8h+var_38] jge loc_285ED mov [rsp+0C8h+var_A8], 0 loc_284D0: mov rax, [rsp+0C8h+var_A8] cmp rax, [rsp+0C8h+var_30] jge loc_285D8 mov [rsp+0C8h+var_B0], 0 loc_284EC: mov rax, [rsp+0C8h+var_B0] cmp rax, [rsp+0C8h+var_28] jge loc_285C3 mov rax, [rsp+0C8h+var_18] mov rax, [rax+0F8h] mov rcx, [rsp+0C8h+var_B0] imul rcx, [rsp+0C8h+var_48] add rax, rcx mov rcx, [rsp+0C8h+var_A8] imul rcx, [rsp+0C8h+var_50] add rax, rcx mov rcx, [rsp+0C8h+var_A0] imul rcx, [rsp+0C8h+var_58] add rax, rcx mov [rsp+0C8h+var_B8], rax mov rax, [rsp+0C8h+var_10] mov rax, [rax+0F8h] mov rcx, [rsp+0C8h+var_B0] imul rcx, [rsp+0C8h+var_88] add rax, rcx mov rcx, [rsp+0C8h+var_A8] imul rcx, [rsp+0C8h+var_90] add rax, rcx mov rcx, [rsp+0C8h+var_A0] imul rcx, [rsp+0C8h+var_98] add rax, rcx mov [rsp+0C8h+var_C0], rax vpxor xmm0, xmm0, xmm0 vmovss [rsp+0C8h+var_C4], xmm0 mov rax, [rsp+0C8h+var_20] mov edi, eax mov rdx, [rsp+0C8h+var_B8] lea rsi, [rsp+0C8h+var_C4] call ggml_vec_sum_f32 vmovss xmm0, [rsp+0C8h+var_C4] mov rax, [rsp+0C8h+var_C0] vmovss dword ptr [rax], xmm0 mov rax, [rsp+0C8h+var_B0] add rax, 1 mov [rsp+0C8h+var_B0], rax jmp loc_284EC loc_285C3: jmp short $+2 loc_285C5: mov rax, [rsp+0C8h+var_A8] add rax, 1 mov [rsp+0C8h+var_A8], rax jmp loc_284D0 loc_285D8: jmp short $+2 loc_285DA: mov rax, [rsp+0C8h+var_A0] add rax, 1 mov [rsp+0C8h+var_A0], rax jmp loc_284B4 loc_285ED: add rsp, 0C8h retn
_DWORD * ggml_compute_forward_sum_rows_f32(_DWORD *a1, _QWORD *a2, __m128 _XMM0) { _DWORD *result; // rax int v6; // [rsp+4h] [rbp-C4h] BYREF long long v7; // [rsp+8h] [rbp-C0h] long long v8; // [rsp+10h] [rbp-B8h] long long k; // [rsp+18h] [rbp-B0h] long long j; // [rsp+20h] [rbp-A8h] long long i; // [rsp+28h] [rbp-A0h] long long v12; // [rsp+30h] [rbp-98h] long long v13; // [rsp+38h] [rbp-90h] long long v14; // [rsp+40h] [rbp-88h] long long v15; // [rsp+48h] [rbp-80h] long long v16; // [rsp+50h] [rbp-78h] long long v17; // [rsp+58h] [rbp-70h] long long v18; // [rsp+60h] [rbp-68h] long long v19; // [rsp+68h] [rbp-60h] long long v20; // [rsp+70h] [rbp-58h] long long v21; // [rsp+78h] [rbp-50h] long long v22; // [rsp+80h] [rbp-48h] long long v23; // [rsp+88h] [rbp-40h] long long v24; // [rsp+90h] [rbp-38h] long long v25; // [rsp+98h] [rbp-30h] long long v26; // [rsp+A0h] [rbp-28h] long long v27; // [rsp+A8h] [rbp-20h] _QWORD *v28; // [rsp+B0h] [rbp-18h] _QWORD *v29; // [rsp+B8h] [rbp-10h] _DWORD *v30; // [rsp+C0h] [rbp-8h] v30 = a1; v29 = a2; v28 = (_QWORD *)a2[19]; result = a1; if ( !*a1 ) { if ( v28[6] != 4LL ) *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 5679LL, "GGML_ASSERT(%s) failed", "src0->nb[0] == sizeof(float)"); if ( v29[6] != 4LL ) *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 5680LL, "GGML_ASSERT(%s) failed", "dst->nb[0] == sizeof(float)"); v27 = v28[2]; v26 = v28[3]; v25 = v28[4]; v24 = v28[5]; v23 = v28[6]; v22 = v28[7]; v21 = v28[8]; v20 = v28[9]; v19 = v29[2]; v18 = v29[3]; v17 = v29[4]; v16 = v29[5]; v15 = v29[6]; v14 = v29[7]; v13 = v29[8]; v12 = v29[9]; if ( v19 != 1 ) *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 5684LL, "GGML_ASSERT(%s) failed", "ne0 == 1"); if ( v18 != v26 ) *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 5685LL, "GGML_ASSERT(%s) failed", "ne1 == ne01"); if ( v17 != v25 ) *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 5686LL, "GGML_ASSERT(%s) failed", "ne2 == ne02"); if ( v16 != v24 ) *(double *)_XMM0.m128_u64 = ggml_abort( "/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c", 5687LL, "GGML_ASSERT(%s) failed", "ne3 == ne03"); for ( i = 0LL; ; ++i ) { result = (_DWORD *)i; if ( i >= v24 ) break; for ( j = 0LL; j < v25; ++j ) { for ( k = 0LL; k < v26; ++k ) { v8 = v20 * i + v21 * j + v22 * k + v28[31]; v7 = v12 * i + v13 * j + v14 * k + v29[31]; __asm { vpxor xmm0, xmm0, xmm0 vmovss [rsp+0C8h+var_C4], xmm0 } ggml_vec_sum_f32((unsigned int)v27, &v6, v8); __asm { vmovss xmm0, [rsp+0C8h+var_C4] } _RAX = v7; __asm { vmovss dword ptr [rax], xmm0 } } } } } return result; }
ggml_compute_forward_sum_rows_f32: SUB RSP,0xc8 MOV qword ptr [RSP + 0xc0],RDI MOV qword ptr [RSP + 0xb8],RSI MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX + 0x98] MOV qword ptr [RSP + 0xb0],RAX MOV RAX,qword ptr [RSP + 0xc0] CMP dword ptr [RAX],0x0 JZ 0x00128270 JMP 0x001285ed LAB_00128270: MOV RAX,qword ptr [RSP + 0xb0] CMP qword ptr [RAX + 0x30],0x4 JZ 0x001282a0 LEA RDI,[0x1b1b5a] MOV ESI,0x162f LEA RDX,[0x1b1bb1] LEA RCX,[0x1b24d3] MOV AL,0x0 CALL 0x0010d030 LAB_001282a0: MOV RAX,qword ptr [RSP + 0xb8] CMP qword ptr [RAX + 0x30],0x4 JZ 0x001282d0 LEA RDI,[0x1b1b5a] MOV ESI,0x1630 LEA RDX,[0x1b1bb1] LEA RCX,[0x1b24b7] MOV AL,0x0 CALL 0x0010d030 LAB_001282d0: MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0xa8],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0xa0],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x98],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0x90],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x88],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x80],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x78],RAX MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX + 0x10] MOV qword ptr [RSP + 0x68],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX + 0x18] MOV qword ptr [RSP + 0x60],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX + 0x20] MOV qword ptr [RSP + 0x58],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0x50],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x48],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x40],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x38],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX + 0x48] MOV qword ptr [RSP + 0x30],RAX CMP qword ptr [RSP + 0x68],0x1 JZ 0x0012841b LEA RDI,[0x1b1b5a] MOV ESI,0x1634 LEA RDX,[0x1b1bb1] LEA RCX,[0x1b24f0] MOV AL,0x0 CALL 0x0010d030 LAB_0012841b: MOV RAX,qword ptr [RSP + 0x60] CMP RAX,qword ptr [RSP + 0xa0] JZ 0x0012844b LEA RDI,[0x1b1b5a] MOV ESI,0x1635 LEA RDX,[0x1b1bb1] LEA RCX,[0x1b24f9] MOV AL,0x0 CALL 0x0010d030 LAB_0012844b: MOV RAX,qword ptr [RSP + 0x58] CMP RAX,qword ptr [RSP + 0x98] JZ 0x0012847b LEA RDI,[0x1b1b5a] MOV ESI,0x1636 LEA RDX,[0x1b1bb1] LEA RCX,[0x1b2505] MOV AL,0x0 CALL 0x0010d030 LAB_0012847b: MOV RAX,qword ptr [RSP + 0x50] CMP RAX,qword ptr [RSP + 0x90] JZ 0x001284ab LEA RDI,[0x1b1b5a] MOV ESI,0x1637 LEA RDX,[0x1b1bb1] LEA RCX,[0x1b2511] MOV AL,0x0 CALL 0x0010d030 LAB_001284ab: MOV qword ptr [RSP + 0x28],0x0 LAB_001284b4: MOV RAX,qword ptr [RSP + 0x28] CMP RAX,qword ptr [RSP + 0x90] JGE 0x001285ed MOV qword ptr [RSP + 0x20],0x0 LAB_001284d0: MOV RAX,qword ptr [RSP + 0x20] CMP RAX,qword ptr [RSP + 0x98] JGE 0x001285d8 MOV qword ptr [RSP + 0x18],0x0 LAB_001284ec: MOV RAX,qword ptr [RSP + 0x18] CMP RAX,qword ptr [RSP + 0xa0] JGE 0x001285c3 MOV RAX,qword ptr [RSP + 0xb0] MOV RAX,qword ptr [RAX + 0xf8] MOV RCX,qword ptr [RSP + 0x18] IMUL RCX,qword ptr [RSP + 0x80] ADD RAX,RCX MOV RCX,qword ptr [RSP + 0x20] IMUL RCX,qword ptr [RSP + 0x78] ADD RAX,RCX MOV RCX,qword ptr [RSP + 0x28] IMUL RCX,qword ptr [RSP + 0x70] ADD RAX,RCX MOV qword ptr [RSP + 0x10],RAX MOV RAX,qword ptr [RSP + 0xb8] MOV RAX,qword ptr [RAX + 0xf8] MOV RCX,qword ptr [RSP + 0x18] IMUL RCX,qword ptr [RSP + 0x40] ADD RAX,RCX MOV RCX,qword ptr [RSP + 0x20] IMUL RCX,qword ptr [RSP + 0x38] ADD RAX,RCX MOV RCX,qword ptr [RSP + 0x28] IMUL RCX,qword ptr [RSP + 0x30] ADD RAX,RCX MOV qword ptr [RSP + 0x8],RAX VPXOR XMM0,XMM0,XMM0 VMOVSS dword ptr [RSP + 0x4],XMM0 MOV RAX,qword ptr [RSP + 0xa8] MOV EDI,EAX MOV RDX,qword ptr [RSP + 0x10] LEA RSI,[RSP + 0x4] CALL 0x00128600 VMOVSS XMM0,dword ptr [RSP + 0x4] MOV RAX,qword ptr [RSP + 0x8] VMOVSS dword ptr [RAX],XMM0 MOV RAX,qword ptr [RSP + 0x18] ADD RAX,0x1 MOV qword ptr [RSP + 0x18],RAX JMP 0x001284ec LAB_001285c3: JMP 0x001285c5 LAB_001285c5: MOV RAX,qword ptr [RSP + 0x20] ADD RAX,0x1 MOV qword ptr [RSP + 0x20],RAX JMP 0x001284d0 LAB_001285d8: JMP 0x001285da LAB_001285da: MOV RAX,qword ptr [RSP + 0x28] ADD RAX,0x1 MOV qword ptr [RSP + 0x28],RAX JMP 0x001284b4 LAB_001285ed: ADD RSP,0xc8 RET
void ggml_compute_forward_sum_rows_f32(int *param_1,long param_2) { int4 local_c4; int4 *local_c0; long local_b8; long local_b0; long local_a8; long local_a0; long local_98; long local_90; long local_88; int8 local_80; long local_78; long local_70; long local_68; long local_60; long local_58; long local_50; long local_48; int8 local_40; long local_38; long local_30; long local_28; ulong local_20; long local_18; long local_10; int *local_8; local_18 = *(long *)(param_2 + 0x98); if (*param_1 == 0) { local_10 = param_2; local_8 = param_1; if (*(long *)(local_18 + 0x30) != 4) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x162f,"GGML_ASSERT(%s) failed","src0->nb[0] == sizeof(float)"); } if (*(long *)(param_2 + 0x30) != 4) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1630,"GGML_ASSERT(%s) failed","dst->nb[0] == sizeof(float)"); } local_20 = *(ulong *)(local_18 + 0x10); local_28 = *(long *)(local_18 + 0x18); local_30 = *(long *)(local_18 + 0x20); local_38 = *(long *)(local_18 + 0x28); local_40 = *(int8 *)(local_18 + 0x30); local_48 = *(long *)(local_18 + 0x38); local_50 = *(long *)(local_18 + 0x40); local_58 = *(long *)(local_18 + 0x48); local_60 = *(long *)(param_2 + 0x10); local_68 = *(long *)(param_2 + 0x18); local_70 = *(long *)(param_2 + 0x20); local_78 = *(long *)(param_2 + 0x28); local_80 = *(int8 *)(param_2 + 0x30); local_88 = *(long *)(param_2 + 0x38); local_90 = *(long *)(param_2 + 0x40); local_98 = *(long *)(param_2 + 0x48); if (local_60 != 1) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1634,"GGML_ASSERT(%s) failed","ne0 == 1"); } if (local_68 != local_28) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1635,"GGML_ASSERT(%s) failed","ne1 == ne01"); } if (local_70 != local_30) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1636,"GGML_ASSERT(%s) failed","ne2 == ne02"); } if (local_78 != local_38) { /* WARNING: Subroutine does not return */ ggml_abort("/workspace/llm4binary/github/2025_star3/monkey531[P]llama/ggml/src/ggml-cpu/ggml-cpu.c" ,0x1637,"GGML_ASSERT(%s) failed","ne3 == ne03"); } local_60 = 1; for (local_a0 = 0; local_a0 < local_38; local_a0 = local_a0 + 1) { for (local_a8 = 0; local_a8 < local_30; local_a8 = local_a8 + 1) { for (local_b0 = 0; local_b0 < local_28; local_b0 = local_b0 + 1) { local_b8 = *(long *)(local_18 + 0xf8) + local_b0 * local_48 + local_a8 * local_50 + local_a0 * local_58; local_c0 = (int4 *) (*(long *)(local_10 + 0xf8) + local_b0 * local_88 + local_a8 * local_90 + local_a0 * local_98); local_c4 = 0; ggml_vec_sum_f32(local_20 & 0xffffffff,&local_c4,local_b8); *local_c0 = local_c4; } } } } return; }
7,972
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&)
monkey531[P]llama/common/json.hpp
T& at(const key_type& key) { for (auto it = this->begin(); it != this->end(); ++it) { if (m_compare(it->first, key)) { return it->second; } } JSON_THROW(std::out_of_range("key not found")); }
O2
cpp
nlohmann::json_abi_v3_11_3::ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>, minja::Value, std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void>>, std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const, minja::Value>>>::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>, void> const&): pushq %r15 pushq %r14 pushq %rbx movq %rsi, %r14 movq %rdi, %r15 movq (%rdi), %rbx cmpq 0x8(%r15), %rbx je 0x72d96 movq %rbx, %rdi movq %r14, %rsi callq 0x6cd5e testb %al, %al jne 0x72d89 addq $0x60, %rbx jmp 0x72d6e addq $0x10, %rbx movq %rbx, %rax popq %rbx popq %r14 popq %r15 retq pushq $0x10 popq %rdi callq 0x24470 movq %rax, %rbx leaq 0x46866(%rip), %rsi # 0xb960e movq %rax, %rdi callq 0x24100 movq 0x91201(%rip), %rsi # 0x103fb8 movq 0x911da(%rip), %rdx # 0x103f98 movq %rbx, %rdi callq 0x24f50 movq %rax, %r14 movq %rbx, %rdi callq 0x246b0 movq %r14, %rdi callq 0x24fe0 nop
_ZN8nlohmann16json_abi_v3_11_311ordered_mapINS0_10basic_jsonIS1_St6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEEN5minja5ValueESt4lessISD_ESaISt4pairIKSD_SF_EEE2atERSJ_: push r15 push r14 push rbx mov r14, rsi mov r15, rdi mov rbx, [rdi] loc_72D6E: cmp rbx, [r15+8] jz short loc_72D96 mov rdi, rbx mov rsi, r14 call _ZN8nlohmann16json_abi_v3_11_3eqERKNS0_10basic_jsonINS0_11ordered_mapESt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES3_IhSaIhEEvEESF_; nlohmann::json_abi_v3_11_3::operator==(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&,nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::string,bool,long,ulong,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<uchar>,void> const&) test al, al jnz short loc_72D89 add rbx, 60h ; '`' jmp short loc_72D6E loc_72D89: add rbx, 10h mov rax, rbx pop rbx pop r14 pop r15 retn loc_72D96: push 10h pop rdi; thrown_size call ___cxa_allocate_exception mov rbx, rax lea rsi, aKeyNotFound; "key not found" mov rdi, rax; this call __ZNSt12out_of_rangeC1EPKc; std::out_of_range::out_of_range(char const*) mov rsi, cs:_ZTISt12out_of_range_ptr; lptinfo mov rdx, cs:_ZNSt12out_of_rangeD1Ev_ptr; void (*)(void *) mov rdi, rbx; void * call ___cxa_throw mov r14, rax mov rdi, rbx; void * call ___cxa_free_exception mov rdi, r14 call __Unwind_Resume
char * 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>>>::at( char **a1, char *a2, __m128d a3) { char *i; // rbx std::out_of_range *exception; // rbx for ( i = *a1; ; i += 96 ) { if ( i == a1[1] ) { exception = (std::out_of_range *)__cxa_allocate_exception(0x10uLL); std::out_of_range::out_of_range(exception, "key not found"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::out_of_range, (void (*)(void *))&std::out_of_range::~out_of_range); } if ( nlohmann::json_abi_v3_11_3::operator==(i, a2, a3) ) break; } return i + 16; }
at: PUSH R15 PUSH R14 PUSH RBX MOV R14,RSI MOV R15,RDI MOV RBX,qword ptr [RDI] LAB_00172d6e: CMP RBX,qword ptr [R15 + 0x8] JZ 0x00172d96 MOV RDI,RBX MOV RSI,R14 CALL 0x0016cd5e TEST AL,AL JNZ 0x00172d89 ADD RBX,0x60 JMP 0x00172d6e LAB_00172d89: ADD RBX,0x10 MOV RAX,RBX POP RBX POP R14 POP R15 RET LAB_00172d96: PUSH 0x10 POP RDI CALL 0x00124470 MOV RBX,RAX LAB_00172da1: LEA RSI,[0x1b960e] MOV RDI,RAX CALL 0x00124100 LAB_00172db0: MOV RSI,qword ptr [0x00203fb8] MOV RDX,qword ptr [0x00203f98] MOV RDI,RBX CALL 0x00124f50
/* 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> > >::at(nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void> const&) */ basic_json * __thiscall nlohmann::json_abi_v3_11_3:: ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> ::at(ordered_map<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>,minja::Value,std::less<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>>,std::allocator<std::pair<nlohmann::json_abi_v3_11_3::basic_json<nlohmann::json_abi_v3_11_3::ordered_map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_3::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>,void>const,minja::Value>>> *this,basic_json *param_1) { char cVar1; out_of_range *this_00; basic_json *pbVar2; pbVar2 = *(basic_json **)this; while( true ) { if (pbVar2 == *(basic_json **)(this + 8)) { this_00 = (out_of_range *)__cxa_allocate_exception(0x10); /* try { // try from 00172da1 to 00172daf has its CatchHandler @ 00172dc6 */ std::out_of_range::out_of_range(this_00,"key not found"); /* WARNING: Subroutine does not return */ __cxa_throw(this_00,PTR_typeinfo_00203fb8,PTR__out_of_range_00203f98); } cVar1 = json_abi_v3_11_3::operator==(pbVar2,param_1); if (cVar1 != '\0') break; pbVar2 = pbVar2 + 0x60; } return pbVar2 + 0x10; }
7,973
testing::internal::FormatDeathTestOutput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
AlayaLite/build_O0/_deps/googletest-src/googletest/src/gtest-death-test.cc
static ::std::string FormatDeathTestOutput(const ::std::string& output) { ::std::string ret; for (size_t at = 0;;) { const size_t line_end = output.find('\n', at); ret += "[ DEATH ] "; if (line_end == ::std::string::npos) { ret += output.substr(at); break; } ret += output.substr(at, line_end + 1 - at); at = line_end + 1; } return ret; }
O0
cpp
testing::internal::FormatDeathTestOutput(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0x88, %rsp movq %rdi, (%rsp) movq %rdi, %rax movq %rax, 0x8(%rsp) movq %rdi, 0x80(%rsp) movq %rsi, 0x78(%rsp) movb $0x0, 0x77(%rsp) callq 0x20ad0 movq $0x0, 0x68(%rsp) movq 0x78(%rsp), %rdi movq 0x68(%rsp), %rdx movl $0xa, %esi callq 0xe5390 movq (%rsp), %rdi movq %rax, 0x60(%rsp) leaq 0x61ec0(%rip), %rsi # 0x1142b7 callq 0xe6e40 jmp 0xb23fe cmpq $-0x1, 0x60(%rsp) jne 0xb2472 movq 0x78(%rsp), %rsi movq 0x68(%rsp), %rdx leaq 0x30(%rsp), %rdi movq $-0x1, %rcx callq 0x392f0 jmp 0xb2423 movq (%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0xed0e0 jmp 0xb2433 leaq 0x30(%rsp), %rdi callq 0x1aac0 jmp 0xb24da movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) jmp 0xb24fc movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x30(%rsp), %rdi callq 0x1aac0 jmp 0xb24fc movq 0x78(%rsp), %rsi movq 0x68(%rsp), %rdx movq 0x60(%rsp), %rcx subq %rdx, %rcx incq %rcx leaq 0x10(%rsp), %rdi callq 0x392f0 jmp 0xb2493 movq (%rsp), %rdi leaq 0x10(%rsp), %rsi callq 0xed0e0 jmp 0xb24a3 leaq 0x10(%rsp), %rdi callq 0x1aac0 movq 0x60(%rsp), %rax addq $0x1, %rax movq %rax, 0x68(%rsp) jmp 0xb23d3 movq %rax, %rcx movl %edx, %eax movq %rcx, 0x58(%rsp) movl %eax, 0x54(%rsp) leaq 0x10(%rsp), %rdi callq 0x1aac0 jmp 0xb24fc movb $0x1, 0x77(%rsp) testb $0x1, 0x77(%rsp) jne 0xb24ef movq (%rsp), %rdi callq 0x1aac0 movq 0x8(%rsp), %rax addq $0x88, %rsp retq movq (%rsp), %rdi callq 0x1aac0 movq 0x58(%rsp), %rdi callq 0x14c80 nop
_ZN7testing8internalL21FormatDeathTestOutputERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 88h mov [rsp+88h+var_88], rdi mov rax, rdi mov [rsp+88h+var_80], rax mov [rsp+88h+var_8], rdi mov [rsp+88h+var_10], rsi mov [rsp+88h+var_11], 0 call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev; std::string::basic_string(void) mov [rsp+88h+var_20], 0 loc_B23D3: mov rdi, [rsp+88h+var_10] mov rdx, [rsp+88h+var_20] mov esi, 0Ah call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEcm; std::string::find(char,ulong) mov rdi, [rsp+88h+var_88] mov [rsp+88h+var_28], rax lea rsi, aDeath; "[ DEATH ] " call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLEPKc; std::string::operator+=(char const*) jmp short $+2 loc_B23FE: cmp [rsp+88h+var_28], 0FFFFFFFFFFFFFFFFh jnz short loc_B2472 mov rsi, [rsp+88h+var_10] mov rdx, [rsp+88h+var_20] lea rdi, [rsp+88h+var_58] mov rcx, 0FFFFFFFFFFFFFFFFh call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) jmp short $+2 loc_B2423: mov rdi, [rsp+88h+var_88] lea rsi, [rsp+88h+var_58] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_B2433: lea rdi, [rsp+88h+var_58]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_B24DA mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax jmp loc_B24FC mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax lea rdi, [rsp+arg_28]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp loc_B24FC loc_B2472: mov rsi, [rsp+88h+var_10] mov rdx, [rsp+88h+var_20] mov rcx, [rsp+88h+var_28] sub rcx, rdx inc rcx lea rdi, [rsp+88h+var_78] call _ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE6substrEmm; std::string::substr(ulong,ulong) jmp short $+2 loc_B2493: mov rdi, [rsp+88h+var_88] lea rsi, [rsp+88h+var_78] call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEpLERKS4_; std::string::operator+=(std::string const&) jmp short $+2 loc_B24A3: lea rdi, [rsp+88h+var_78]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rax, [rsp+88h+var_28] add rax, 1 mov [rsp+88h+var_20], rax jmp loc_B23D3 mov rcx, rax mov eax, edx mov [rsp+arg_50], rcx mov [rsp+arg_4C], eax lea rdi, [rsp+arg_8]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() jmp short loc_B24FC loc_B24DA: mov [rsp+88h+var_11], 1 test [rsp+88h+var_11], 1 jnz short loc_B24EF mov rdi, [rsp+88h+var_88]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() loc_B24EF: mov rax, [rsp+88h+var_80] add rsp, 88h retn loc_B24FC: mov rdi, [rsp+0]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev; std::string::~string() mov rdi, [rsp+arg_50] call __Unwind_Resume
_QWORD * testing::internal::FormatDeathTestOutput(_QWORD *a1, long long a2) { _BYTE v3[32]; // [rsp+10h] [rbp-78h] BYREF _BYTE v4[48]; // [rsp+30h] [rbp-58h] BYREF long long v5; // [rsp+60h] [rbp-28h] long long i; // [rsp+68h] [rbp-20h] char v7; // [rsp+77h] [rbp-11h] long long v8; // [rsp+78h] [rbp-10h] _QWORD *v9; // [rsp+80h] [rbp-8h] v9 = a1; v8 = a2; v7 = 0; std::string::basic_string(a1); for ( i = 0LL; ; i = v5 + 1 ) { v5 = std::string::find(v8, 10LL, i); std::string::operator+=(a1, "[ DEATH ] "); if ( v5 == -1 ) break; std::string::substr(v3, v8, i, v5 - i + 1); std::string::operator+=(a1, v3); std::string::~string(v3); } std::string::substr(v4, v8, i, -1LL); std::string::operator+=(a1, v4); std::string::~string(v4); v7 = 1; return a1; }
FormatDeathTestOutput: SUB RSP,0x88 MOV qword ptr [RSP],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x8],RAX MOV qword ptr [RSP + 0x80],RDI MOV qword ptr [RSP + 0x78],RSI MOV byte ptr [RSP + 0x77],0x0 CALL 0x00120ad0 MOV qword ptr [RSP + 0x68],0x0 LAB_001b23d3: MOV RDI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x68] MOV ESI,0xa CALL 0x001e5390 MOV RDI,qword ptr [RSP] MOV qword ptr [RSP + 0x60],RAX LAB_001b23f0: LEA RSI,[0x2142b7] CALL 0x001e6e40 JMP 0x001b23fe LAB_001b23fe: CMP qword ptr [RSP + 0x60],-0x1 JNZ 0x001b2472 MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x68] LEA RDI,[RSP + 0x30] MOV RCX,-0x1 CALL 0x001392f0 JMP 0x001b2423 LAB_001b2423: MOV RDI,qword ptr [RSP] LEA RSI,[RSP + 0x30] CALL 0x001ed0e0 JMP 0x001b2433 LAB_001b2433: LEA RDI,[RSP + 0x30] CALL 0x0011aac0 JMP 0x001b24da LAB_001b2472: MOV RSI,qword ptr [RSP + 0x78] MOV RDX,qword ptr [RSP + 0x68] MOV RCX,qword ptr [RSP + 0x60] SUB RCX,RDX INC RCX LAB_001b2487: LEA RDI,[RSP + 0x10] CALL 0x001392f0 JMP 0x001b2493 LAB_001b2493: MOV RDI,qword ptr [RSP] LEA RSI,[RSP + 0x10] CALL 0x001ed0e0 LAB_001b24a1: JMP 0x001b24a3 LAB_001b24a3: LEA RDI,[RSP + 0x10] CALL 0x0011aac0 MOV RAX,qword ptr [RSP + 0x60] ADD RAX,0x1 MOV qword ptr [RSP + 0x68],RAX JMP 0x001b23d3 LAB_001b24da: MOV byte ptr [RSP + 0x77],0x1 TEST byte ptr [RSP + 0x77],0x1 JNZ 0x001b24ef MOV RDI,qword ptr [RSP] CALL 0x0011aac0 LAB_001b24ef: MOV RAX,qword ptr [RSP + 0x8] ADD RSP,0x88 RET
/* WARNING: Removing unreachable block (ram,0x001b24e6) */ /* testing::internal::FormatDeathTestOutput(std::__cxx11::string const&) */ internal * __thiscall testing::internal::FormatDeathTestOutput(internal *this,string *param_1) { string local_78 [32]; string local_58 [48]; long local_28; ulong local_20; int1 local_11; string *local_10; internal *local_8; local_11 = 0; local_10 = param_1; local_8 = this; std::__cxx11::string::string((string *)this); local_20 = 0; while( true ) { local_28 = std::__cxx11::string::find(local_10,'\n',local_20); /* try { // try from 001b23f0 to 001b2420 has its CatchHandler @ 001b2442 */ std::__cxx11::string::operator+=((string *)this,"[ DEATH ] "); if (local_28 == -1) break; /* try { // try from 001b2487 to 001b2490 has its CatchHandler @ 001b2442 */ std::__cxx11::string::substr((ulong)local_78,(ulong)local_10); /* try { // try from 001b2493 to 001b24a0 has its CatchHandler @ 001b24c0 */ std::__cxx11::string::operator+=((string *)this,local_78); std::__cxx11::string::~string(local_78); local_20 = local_28 + 1; } std::__cxx11::string::substr((ulong)local_58,(ulong)local_10); /* try { // try from 001b2423 to 001b2430 has its CatchHandler @ 001b2455 */ std::__cxx11::string::operator+=((string *)this,local_58); std::__cxx11::string::~string(local_58); return this; }
7,974
ma_keylength
eloqsql/storage/maria/ma_search.c
uint _ma_keylength(MARIA_KEYDEF *keyinfo, const uchar *key) { reg1 HA_KEYSEG *keyseg; const uchar *start; if (! (keyinfo->flag & (HA_VAR_LENGTH_KEY | HA_BINARY_PACK_KEY))) return (keyinfo->keylength); start= key; for (keyseg=keyinfo->seg ; keyseg->type ; keyseg++) { if (keyseg->flag & HA_NULL_PART) if (!*key++) continue; if (keyseg->flag & (HA_SPACE_PACK | HA_BLOB_PART | HA_VAR_LENGTH_PART)) { uint length; get_key_length(length,key); key+=length; } else key+= keyseg->length; } return((uint) (key-start)+keyseg->length); }
O3
c
ma_keylength: testb $0x28, 0xa2(%rdi) je 0x6e026 pushq %rbp movq %rsp, %rbp movq 0xc0(%rdi), %rax cmpb $0x0, 0x18(%rax) je 0x6e02e movq %rsi, %rcx movzwl 0x12(%rax), %edx testb $0x10, %dl je 0x6dfe3 cmpb $0x0, (%rcx) leaq 0x1(%rcx), %rcx je 0x6e017 testb $0x29, %dl je 0x6dffb movzbl (%rcx), %edx cmpq $0xff, %rdx je 0x6e001 movl $0x1, %edi jmp 0x6e011 movzwl 0x14(%rax), %edx jmp 0x6e014 movzwl 0x1(%rcx), %edx rolw $0x8, %dx movzwl %dx, %edx movl $0x3, %edi addq %rdi, %rcx addq %rdx, %rcx leaq 0x20(%rax), %rdx cmpb $0x0, 0x38(%rax) movq %rdx, %rax jne 0x6dfd1 jmp 0x6e034 movzwl 0xaa(%rdi), %eax retq movq %rsi, %rcx movq %rax, %rdx subl %esi, %ecx movzwl 0x14(%rdx), %eax addl %ecx, %eax popq %rbp retq
_ma_keylength: test byte ptr [rdi+0A2h], 28h jz short loc_6E026 push rbp mov rbp, rsp mov rax, [rdi+0C0h] cmp byte ptr [rax+18h], 0 jz short loc_6E02E mov rcx, rsi loc_6DFD1: movzx edx, word ptr [rax+12h] test dl, 10h jz short loc_6DFE3 cmp byte ptr [rcx], 0 lea rcx, [rcx+1] jz short loc_6E017 loc_6DFE3: test dl, 29h jz short loc_6DFFB movzx edx, byte ptr [rcx] cmp rdx, 0FFh jz short loc_6E001 mov edi, 1 jmp short loc_6E011 loc_6DFFB: movzx edx, word ptr [rax+14h] jmp short loc_6E014 loc_6E001: movzx edx, word ptr [rcx+1] rol dx, 8 movzx edx, dx mov edi, 3 loc_6E011: add rcx, rdi loc_6E014: add rcx, rdx loc_6E017: lea rdx, [rax+20h] cmp byte ptr [rax+38h], 0 mov rax, rdx jnz short loc_6DFD1 jmp short loc_6E034 loc_6E026: movzx eax, word ptr [rdi+0AAh] retn loc_6E02E: mov rcx, rsi mov rdx, rax loc_6E034: sub ecx, esi movzx eax, word ptr [rdx+14h] add eax, ecx pop rbp retn
long long ma_keylength(long long a1, unsigned __int8 *a2) { long long v2; // rax unsigned __int8 *v3; // rcx __int16 v4; // dx bool v5; // zf long long v6; // rdx long long v7; // rdi long long v8; // rdx if ( (*(_BYTE *)(a1 + 162) & 0x28) == 0 ) return *(unsigned __int16 *)(a1 + 170); v2 = *(_QWORD *)(a1 + 192); if ( *(_BYTE *)(v2 + 24) ) { v3 = a2; do { v4 = *(_WORD *)(v2 + 18); if ( (v4 & 0x10) == 0 || (v5 = *v3 == 0, ++v3, !v5) ) { if ( (v4 & 0x29) != 0 ) { v6 = *v3; if ( v6 == 255 ) { v6 = (unsigned __int16)__ROL2__(*(_WORD *)(v3 + 1), 8); v7 = 3LL; } else { v7 = 1LL; } v3 += v7; } else { v6 = *(unsigned __int16 *)(v2 + 20); } v3 += v6; } v8 = v2 + 32; v5 = *(_BYTE *)(v2 + 56) == 0; v2 += 32LL; } while ( !v5 ); } else { LODWORD(v3) = (_DWORD)a2; v8 = *(_QWORD *)(a1 + 192); } return (_DWORD)v3 - (_DWORD)a2 + (unsigned int)*(unsigned __int16 *)(v8 + 20); }
_ma_keylength: TEST byte ptr [RDI + 0xa2],0x28 JZ 0x0016e026 PUSH RBP MOV RBP,RSP MOV RAX,qword ptr [RDI + 0xc0] CMP byte ptr [RAX + 0x18],0x0 JZ 0x0016e02e MOV RCX,RSI LAB_0016dfd1: MOVZX EDX,word ptr [RAX + 0x12] TEST DL,0x10 JZ 0x0016dfe3 CMP byte ptr [RCX],0x0 LEA RCX,[RCX + 0x1] JZ 0x0016e017 LAB_0016dfe3: TEST DL,0x29 JZ 0x0016dffb MOVZX EDX,byte ptr [RCX] CMP RDX,0xff JZ 0x0016e001 MOV EDI,0x1 JMP 0x0016e011 LAB_0016dffb: MOVZX EDX,word ptr [RAX + 0x14] JMP 0x0016e014 LAB_0016e001: MOVZX EDX,word ptr [RCX + 0x1] ROL DX,0x8 MOVZX EDX,DX MOV EDI,0x3 LAB_0016e011: ADD RCX,RDI LAB_0016e014: ADD RCX,RDX LAB_0016e017: LEA RDX,[RAX + 0x20] CMP byte ptr [RAX + 0x38],0x0 MOV RAX,RDX JNZ 0x0016dfd1 JMP 0x0016e034 LAB_0016e026: MOVZX EAX,word ptr [RDI + 0xaa] RET LAB_0016e02e: MOV RCX,RSI MOV RDX,RAX LAB_0016e034: SUB ECX,ESI MOVZX EAX,word ptr [RDX + 0x14] ADD EAX,ECX POP RBP RET
uint _ma_keylength(long param_1,byte *param_2) { char cVar1; byte bVar2; long lVar3; ulong uVar4; int iVar5; long lVar6; iVar5 = (int)param_2; if ((*(byte *)(param_1 + 0xa2) & 0x28) == 0) { return (uint)*(ushort *)(param_1 + 0xaa); } cVar1 = *(char *)(*(long *)(param_1 + 0xc0) + 0x18); lVar3 = *(long *)(param_1 + 0xc0); while (cVar1 != '\0') { if (((*(ushort *)(lVar3 + 0x12) & 0x10) == 0) || (bVar2 = *param_2, param_2 = param_2 + 1, bVar2 != 0)) { if ((*(ushort *)(lVar3 + 0x12) & 0x29) == 0) { uVar4 = (ulong)*(ushort *)(lVar3 + 0x14); } else { uVar4 = (ulong)*param_2; if (uVar4 == 0xff) { uVar4 = (ulong)(ushort)(*(ushort *)(param_2 + 1) << 8 | *(ushort *)(param_2 + 1) >> 8); lVar6 = 3; } else { lVar6 = 1; } param_2 = param_2 + lVar6; } param_2 = param_2 + uVar4; } cVar1 = *(char *)(lVar3 + 0x38); lVar3 = lVar3 + 0x20; } return (uint)*(ushort *)(lVar3 + 0x14) + ((int)param_2 - iVar5); }
7,975
spdlog::details::elapsed_formatter<spdlog::details::null_scoped_padder, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&)
AlayaLite/build_O0/_deps/spdlog-src/include/spdlog/pattern_formatter-inl.h
void format(const details::log_msg &msg, const std::tm &, memory_buf_t &dest) override { auto delta = (std::max)(msg.time - last_message_time_, log_clock::duration::zero()); auto delta_units = std::chrono::duration_cast<DurationUnits>(delta); last_message_time_ = msg.time; auto delta_count = static_cast<size_t>(delta_units.count()); auto n_digits = static_cast<size_t>(ScopedPadder::count_digits(delta_count)); ScopedPadder p(n_digits, padinfo_, dest); fmt_helper::append_int(delta_count, dest); }
O0
c
spdlog::details::elapsed_formatter<spdlog::details::null_scoped_padder, std::chrono::duration<long, std::ratio<1l, 1000000000l>>>::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char>>&): subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq %rdx, 0x50(%rsp) movq %rcx, 0x48(%rsp) movq 0x60(%rsp), %rsi movq %rsi, 0x8(%rsp) movq 0x58(%rsp), %rdi addq $0x18, %rdi addq $0x18, %rsi callq 0x21fd0 movq %rax, 0x38(%rsp) callq 0x88940 movq %rax, 0x30(%rsp) leaq 0x38(%rsp), %rdi leaq 0x30(%rsp), %rsi callq 0xa2e00 movq (%rax), %rax movq %rax, 0x40(%rsp) leaq 0x40(%rsp), %rdi callq 0x8fc20 movq %rax, %rcx movq 0x8(%rsp), %rax movq %rcx, 0x28(%rsp) movq 0x58(%rsp), %rcx movq 0x18(%rcx), %rcx movq %rcx, 0x18(%rax) leaq 0x28(%rsp), %rdi callq 0x88b90 movq %rax, 0x20(%rsp) movq 0x20(%rsp), %rdi callq 0xa8f70 movq 0x8(%rsp), %rdx movl %eax, %eax movq %rax, 0x18(%rsp) movq 0x18(%rsp), %rsi addq $0x8, %rdx movq 0x48(%rsp), %rcx leaq 0x17(%rsp), %rdi callq 0x8eaa0 movq 0x20(%rsp), %rdi movq 0x48(%rsp), %rsi callq 0x96cb0 addq $0x68, %rsp retq nop
_ZN6spdlog7details17elapsed_formatterINS0_18null_scoped_padderENSt6chrono8durationIlSt5ratioILl1ELl1000EEEEE6formatERKNS0_7log_msgERK2tmRN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov [rsp+68h+var_18], rdx mov [rsp+68h+var_20], rcx mov rsi, [rsp+68h+var_8] mov [rsp+68h+var_60], rsi mov rdi, [rsp+68h+var_10] add rdi, 18h add rsi, 18h call _ZNSt6chronomiINS_3_V212system_clockENS_8durationIlSt5ratioILl1ELl1000000000EEEES6_EENSt11common_typeIJT0_T1_EE4typeERKNS_10time_pointIT_S8_EERKNSC_ISD_S9_EE; std::chrono::operator-<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,std::chrono::duration<long,std::ratio<1l,1000000000l>>>(std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&,std::chrono::time_point<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>> const&) mov [rsp+68h+var_30], rax call _ZNSt6chrono8durationIlSt5ratioILl1ELl1000000000EEE4zeroEv; std::chrono::duration<long,std::ratio<1l,1000000000l>>::zero(void) mov [rsp+68h+var_38], rax lea rdi, [rsp+68h+var_30] lea rsi, [rsp+68h+var_38] call _ZSt3maxINSt6chrono8durationIlSt5ratioILl1ELl1000000000EEEEERKT_S7_S7_; std::max<std::chrono::duration<long,std::ratio<1l,1000000000l>>>(std::chrono::duration<long,std::ratio<1l,1000000000l>> const&,std::chrono::duration<long,std::ratio<1l,1000000000l>> const&) mov rax, [rax] mov [rsp+68h+var_28], rax lea rdi, [rsp+68h+var_28] call _ZNSt6chrono13duration_castINS_8durationIlSt5ratioILl1ELl1000EEEElS2_ILl1ELl1000000000EEEENSt9enable_ifIXsr13__is_durationIT_EE5valueES7_E4typeERKNS1_IT0_T1_EE mov rcx, rax mov rax, [rsp+68h+var_60] mov [rsp+68h+var_40], rcx mov rcx, [rsp+68h+var_10] mov rcx, [rcx+18h] mov [rax+18h], rcx lea rdi, [rsp+68h+var_40] call _ZNKSt6chrono8durationIlSt5ratioILl1ELl1000EEE5countEv; std::chrono::duration<long,std::ratio<1l,1000l>>::count(void) mov [rsp+68h+var_48], rax mov rdi, [rsp+68h+var_48] call _ZN6spdlog7details18null_scoped_padder12count_digitsImEEjT_; spdlog::details::null_scoped_padder::count_digits<ulong>(ulong) mov rdx, [rsp+68h+var_60] mov eax, eax mov [rsp+68h+var_50], rax mov rsi, [rsp+68h+var_50] add rdx, 8 mov rcx, [rsp+68h+var_20] lea rdi, [rsp+68h+var_51] call _ZN6spdlog7details18null_scoped_padderC2EmRKNS0_12padding_infoERN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::null_scoped_padder::null_scoped_padder(ulong,spdlog::details::padding_info const&,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) mov rdi, [rsp+68h+var_48] mov rsi, [rsp+68h+var_20] call _ZN6spdlog7details10fmt_helper10append_intImEEvT_RN3fmt3v1019basic_memory_bufferIcLm250ESaIcEEE; spdlog::details::fmt_helper::append_int<ulong>(ulong,fmt::v10::basic_memory_buffer<char,250ul,std::allocator<char>> &) add rsp, 68h retn
long long spdlog::details::elapsed_formatter<spdlog::details::null_scoped_padder,std::chrono::duration<long,std::ratio<1l,1000l>>>::format( long long a1, long long a2, long long a3, _QWORD *a4) { unsigned long long v5; // [rsp+20h] [rbp-48h] long long v6; // [rsp+28h] [rbp-40h] BYREF long long v7; // [rsp+30h] [rbp-38h] BYREF long long v8; // [rsp+38h] [rbp-30h] BYREF long long v9; // [rsp+40h] [rbp-28h] BYREF _QWORD *v10; // [rsp+48h] [rbp-20h] long long v11; // [rsp+50h] [rbp-18h] long long v12; // [rsp+58h] [rbp-10h] long long v13; // [rsp+60h] [rbp-8h] v13 = a1; v12 = a2; v11 = a3; v10 = a4; v8 = std::chrono::operator-<std::chrono::_V2::system_clock,std::chrono::duration<long,std::ratio<1l,1000000000l>>,std::chrono::duration<long,std::ratio<1l,1000000000l>>>( a2 + 24, a1 + 24); v7 = std::chrono::duration<long,std::ratio<1l,1000000000l>>::zero(); v9 = *(_QWORD *)std::max<std::chrono::duration<long,std::ratio<1l,1000000000l>>>((long long)&v8, (long long)&v7); v6 = std::chrono::duration_cast<std::chrono::duration<long,std::ratio<1l,1000l>>,long,std::ratio<1l,1000000000l>>((long long)&v9); *(_QWORD *)(a1 + 24) = *(_QWORD *)(v12 + 24); v5 = std::chrono::duration<long,std::ratio<1l,1000l>>::count((long long)&v6); spdlog::details::null_scoped_padder::count_digits<unsigned long>(); spdlog::details::null_scoped_padder::null_scoped_padder(); return spdlog::details::fmt_helper::append_int<unsigned long>(v5, v10); }
format: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV qword ptr [RSP + 0x50],RDX MOV qword ptr [RSP + 0x48],RCX MOV RSI,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x8],RSI MOV RDI,qword ptr [RSP + 0x58] ADD RDI,0x18 ADD RSI,0x18 CALL 0x00121fd0 MOV qword ptr [RSP + 0x38],RAX CALL 0x00188940 MOV qword ptr [RSP + 0x30],RAX LEA RDI,[RSP + 0x38] LEA RSI,[RSP + 0x30] CALL 0x001a2e00 MOV RAX,qword ptr [RAX] MOV qword ptr [RSP + 0x40],RAX LEA RDI,[RSP + 0x40] CALL 0x0018fc20 MOV RCX,RAX MOV RAX,qword ptr [RSP + 0x8] MOV qword ptr [RSP + 0x28],RCX MOV RCX,qword ptr [RSP + 0x58] MOV RCX,qword ptr [RCX + 0x18] MOV qword ptr [RAX + 0x18],RCX LEA RDI,[RSP + 0x28] CALL 0x00188b90 MOV qword ptr [RSP + 0x20],RAX MOV RDI,qword ptr [RSP + 0x20] CALL 0x001a8f70 MOV RDX,qword ptr [RSP + 0x8] MOV EAX,EAX MOV qword ptr [RSP + 0x18],RAX MOV RSI,qword ptr [RSP + 0x18] ADD RDX,0x8 MOV RCX,qword ptr [RSP + 0x48] LEA RDI,[RSP + 0x17] CALL 0x0018eaa0 MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [RSP + 0x48] CALL 0x00196cb0 ADD RSP,0x68 RET
/* spdlog::details::elapsed_formatter<spdlog::details::null_scoped_padder, std::chrono::duration<long, std::ratio<1l, 1000l> > >::format(spdlog::details::log_msg const&, tm const&, fmt::v10::basic_memory_buffer<char, 250ul, std::allocator<char> >&) */ void __thiscall spdlog::details:: elapsed_formatter<spdlog::details::null_scoped_padder,std::chrono::duration<long,std::ratio<1l,1000l>>> ::format(elapsed_formatter<spdlog::details::null_scoped_padder,std::chrono::duration<long,std::ratio<1l,1000l>>> *this,log_msg *param_1,tm *param_2,basic_memory_buffer *param_3) { uint uVar1; duration *pdVar2; null_scoped_padder local_51; ulong local_50; ulong local_48; int8 local_40; int8 local_38; int8 local_30; int8 local_28; basic_memory_buffer *local_20; tm *local_18; log_msg *local_10; elapsed_formatter<spdlog::details::null_scoped_padder,std::chrono::duration<long,std::ratio<1l,1000l>>> *local_8; local_20 = param_3; local_18 = param_2; local_10 = param_1; local_8 = this; local_30 = std::chrono::operator-((time_point *)(param_1 + 0x18),(time_point *)(this + 0x18)); local_38 = std::chrono::duration<long,std::ratio<1l,1000000000l>>::zero(); pdVar2 = std::max<std::chrono::duration<long,std::ratio<1l,1000000000l>>> ((duration *)&local_30,(duration *)&local_38); local_28 = *(int8 *)pdVar2; local_40 = std::chrono:: duration_cast<std::chrono::duration<long,std::ratio<1l,1000l>>,long,std::ratio<1l,1000000000l>> ((duration *)&local_28); *(int8 *)(this + 0x18) = *(int8 *)(local_10 + 0x18); local_48 = std::chrono::duration<long,std::ratio<1l,1000l>>::count ((duration<long,std::ratio<1l,1000l>> *)&local_40); uVar1 = null_scoped_padder::count_digits<unsigned_long>(local_48); local_50 = (ulong)uVar1; null_scoped_padder::null_scoped_padder(&local_51,local_50,(padding_info *)(this + 8),local_20); fmt_helper::append_int<unsigned_long>(local_48,local_20); return; }
7,976
Catch::Clara::Detail::convertInto(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>>&)
AlayaLite/build_O3/_deps/libcoro-src/test/catch_amalgamated.cpp
ParserResult convertInto( std::string const& source, std::string& target ) { target = source; return ParserResult::ok( ParseResultType::Matched ); }
O3
cpp
Catch::Clara::Detail::convertInto(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>>&): pushq %rbx movq %rdi, %rbx movq %rdx, %rdi callq 0x81d42 xorl %eax, %eax movq %rax, 0x8(%rbx) leaq 0xd6f66(%rip), %rcx # 0x130650 addq $0x10, %rcx movq %rcx, (%rbx) leaq 0x20(%rbx), %rcx movq %rcx, 0x10(%rbx) movq %rax, 0x18(%rbx) movb $0x0, 0x20(%rbx) movq %rbx, %rax popq %rbx retq
_ZN5Catch5Clara6Detail11convertIntoERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS7_: push rbx mov rbx, rdi mov rdi, rdx call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_; std::string::_M_assign(std::string const&) xor eax, eax mov [rbx+8], rax lea rcx, _ZTVN5Catch5Clara6Detail11BasicResultINS0_15ParseResultTypeEEE; `vtable for'Catch::Clara::Detail::BasicResult<Catch::Clara::ParseResultType> add rcx, 10h mov [rbx], rcx lea rcx, [rbx+20h] mov [rbx+10h], rcx mov [rbx+18h], rax mov byte ptr [rbx+20h], 0 mov rax, rbx pop rbx retn
long long Catch::Clara::Detail::convertInto(long long a1, long long a2, long long a3) { std::string::_M_assign(a3, a2); *(_QWORD *)(a1 + 8) = 0LL; *(_QWORD *)a1 = &`vtable for'Catch::Clara::Detail::BasicResult<Catch::Clara::ParseResultType> + 2; *(_QWORD *)(a1 + 16) = a1 + 32; *(_QWORD *)(a1 + 24) = 0LL; *(_BYTE *)(a1 + 32) = 0; return a1; }
convertInto: PUSH RBX MOV RBX,RDI MOV RDI,RDX CALL 0x00181d42 XOR EAX,EAX MOV qword ptr [RBX + 0x8],RAX LEA RCX,[0x230650] ADD RCX,0x10 MOV qword ptr [RBX],RCX LEA RCX,[RBX + 0x20] MOV qword ptr [RBX + 0x10],RCX MOV qword ptr [RBX + 0x18],RAX MOV byte ptr [RBX + 0x20],0x0 MOV RAX,RBX POP RBX RET
/* Catch::Clara::Detail::convertInto(std::__cxx11::string const&, std::__cxx11::string&) */ Detail * __thiscall Catch::Clara::Detail::convertInto(Detail *this,string *param_1,string *param_2) { std::__cxx11::string::_M_assign(param_2,param_1); *(int8 *)(this + 8) = 0; *(int ***)this = &PTR__BasicResult_00230660; *(Detail **)(this + 0x10) = this + 0x20; *(int8 *)(this + 0x18) = 0; this[0x20] = (Detail)0x0; return this; }
7,977
ggml_log_internal
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
void ggml_log_internal(enum ggml_log_level level, const char * format, ...) { va_list args; va_start(args, format); ggml_log_internal_v(level, format, args); va_end(args); }
O2
c
ggml_log_internal: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x170, %rsp # imm = 0x170 movq %rsi, %r14 leaq 0xc0(%rsp), %rsi movq %rdx, 0x10(%rsi) movq %rcx, 0x18(%rsi) movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x2064b movaps %xmm0, 0xf0(%rsp) movaps %xmm1, 0x100(%rsp) movaps %xmm2, 0x110(%rsp) movaps %xmm3, 0x120(%rsp) movaps %xmm4, 0x130(%rsp) movaps %xmm5, 0x140(%rsp) movaps %xmm6, 0x150(%rsp) movaps %xmm7, 0x160(%rsp) movq %rsi, 0x10(%rsp) leaq 0x1a0(%rsp), %rax movq %rax, 0x8(%rsp) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rsp) testq %r14, %r14 je 0x20702 movl %edi, %ebx movq %rsp, %rcx movq 0x10(%rcx), %rax movq %rax, 0x30(%rsp) movaps (%rcx), %xmm0 movaps %xmm0, 0x20(%rsp) leaq 0x40(%rsp), %rdi movl $0x80, %esi movq %r14, %rdx callq 0x1df60 cmpl $0x7f, %eax jg 0x206b7 movq 0x94348(%rip), %rdx # 0xb49f0 leaq 0x40(%rsp), %rsi movl %ebx, %edi callq *0x5427b(%rip) # 0x74930 jmp 0x20702 movl %eax, %r15d leal 0x1(%r15), %r12d pushq $0x1 popq %rsi movq %r12, %rdi callq 0x1e010 movq %rax, %r13 leaq 0x20(%rsp), %rcx movq %rax, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x1df60 movl %r15d, %eax movb $0x0, (%r13,%rax) movq 0x94301(%rip), %rdx # 0xb49f0 movl %ebx, %edi movq %r13, %rsi callq *0x54236(%rip) # 0x74930 movq %r13, %rdi callq 0x1ed30 addq $0x170, %rsp # imm = 0x170 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
ggml_log_internal: push r15 push r14 push r13 push r12 push rbx sub rsp, 170h mov r14, rsi lea rsi, [rsp+198h+var_D8] mov [rsi+10h], rdx mov [rsi+18h], rcx mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_2064B movaps [rsp+198h+var_A8], xmm0 movaps [rsp+198h+var_98], xmm1 movaps [rsp+198h+var_88], xmm2 movaps [rsp+198h+var_78], xmm3 movaps [rsp+198h+var_68], xmm4 movaps [rsp+198h+var_58], xmm5 movaps [rsp+198h+var_48], xmm6 movaps [rsp+198h+var_38], xmm7 loc_2064B: mov [rsp+198h+var_188], rsi lea rax, [rsp+198h+arg_0] mov [rsp+198h+var_190], rax mov rax, 3000000010h mov [rsp+198h+var_198], rax test r14, r14 jz loc_20702 mov ebx, edi mov rcx, rsp mov rax, [rcx+10h] mov [rsp+198h+var_168], rax movaps xmm0, xmmword ptr [rcx] movaps [rsp+198h+var_178], xmm0 lea rdi, [rsp+198h+var_158] mov esi, 80h mov rdx, r14 call _vsnprintf cmp eax, 7Fh jg short loc_206B7 mov rdx, cs:g_logger_state_1 lea rsi, [rsp+198h+var_158] mov edi, ebx call cs:g_logger_state_0 jmp short loc_20702 loc_206B7: mov r15d, eax lea r12d, [r15+1] push 1 pop rsi mov rdi, r12 call _calloc mov r13, rax lea rcx, [rsp+198h+var_178] mov rdi, rax mov rsi, r12 mov rdx, r14 call _vsnprintf mov eax, r15d mov byte ptr [r13+rax+0], 0 mov rdx, cs:g_logger_state_1 mov edi, ebx mov rsi, r13 call cs:g_logger_state_0 mov rdi, r13 call _free loc_20702: add rsp, 170h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long ggml_log_internal( __m128 a1, __m128 a2, __m128 a3, __m128 a4, __m128 a5, __m128 a6, __m128 a7, __m128 a8, long long a9, long long a10, long long a11, long long a12, long long a13, long long a14) { long long result; // rax int v15; // eax unsigned int v16; // r15d long long v17; // r12 long long v18; // r13 _BYTE v19[128]; // [rsp+40h] [rbp-158h] BYREF long long v20; // [rsp+D0h] [rbp-C8h] long long v21; // [rsp+D8h] [rbp-C0h] long long v22; // [rsp+E0h] [rbp-B8h] long long v23; // [rsp+E8h] [rbp-B0h] __m128 v24; // [rsp+F0h] [rbp-A8h] __m128 v25; // [rsp+100h] [rbp-98h] __m128 v26; // [rsp+110h] [rbp-88h] __m128 v27; // [rsp+120h] [rbp-78h] __m128 v28; // [rsp+130h] [rbp-68h] __m128 v29; // [rsp+140h] [rbp-58h] __m128 v30; // [rsp+150h] [rbp-48h] __m128 v31; // [rsp+160h] [rbp-38h] v24 = a1; v25 = a2; v26 = a3; v27 = a4; v28 = a5; v29 = a6; v30 = a7; v31 = a8; v20 = a11; v21 = a12; v22 = a13; v23 = a14; result = 0x3000000010LL; if ( a10 ) { v15 = vsnprintf(v19, 128LL, a10); if ( v15 > 127 ) { v16 = v15; v17 = (unsigned int)(v15 + 1); v18 = calloc(v17, 1LL); vsnprintf(v18, v17, a10); *(_BYTE *)(v18 + v16) = 0; g_logger_state_0(); return free(v18, v18); } else { return g_logger_state_0(); } } return result; }
ggml_log_internal: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x170 MOV R14,RSI LEA RSI,[RSP + 0xc0] MOV qword ptr [RSI + 0x10],RDX MOV qword ptr [RSI + 0x18],RCX MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x0012064b MOVAPS xmmword ptr [RSP + 0xf0],XMM0 MOVAPS xmmword ptr [RSP + 0x100],XMM1 MOVAPS xmmword ptr [RSP + 0x110],XMM2 MOVAPS xmmword ptr [RSP + 0x120],XMM3 MOVAPS xmmword ptr [RSP + 0x130],XMM4 MOVAPS xmmword ptr [RSP + 0x140],XMM5 MOVAPS xmmword ptr [RSP + 0x150],XMM6 MOVAPS xmmword ptr [RSP + 0x160],XMM7 LAB_0012064b: MOV qword ptr [RSP + 0x10],RSI LEA RAX,[RSP + 0x1a0] MOV qword ptr [RSP + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RSP],RAX TEST R14,R14 JZ 0x00120702 MOV EBX,EDI MOV RCX,RSP MOV RAX,qword ptr [RCX + 0x10] MOV qword ptr [RSP + 0x30],RAX MOVAPS XMM0,xmmword ptr [RCX] MOVAPS xmmword ptr [RSP + 0x20],XMM0 LEA RDI,[RSP + 0x40] MOV ESI,0x80 MOV RDX,R14 CALL 0x0011df60 CMP EAX,0x7f JG 0x001206b7 MOV RDX,qword ptr [0x001b49f0] LEA RSI,[RSP + 0x40] MOV EDI,EBX CALL qword ptr [0x00174930] JMP 0x00120702 LAB_001206b7: MOV R15D,EAX LEA R12D,[R15 + 0x1] PUSH 0x1 POP RSI MOV RDI,R12 CALL 0x0011e010 MOV R13,RAX LEA RCX,[RSP + 0x20] MOV RDI,RAX MOV RSI,R12 MOV RDX,R14 CALL 0x0011df60 MOV EAX,R15D MOV byte ptr [R13 + RAX*0x1],0x0 MOV RDX,qword ptr [0x001b49f0] MOV EDI,EBX MOV RSI,R13 CALL qword ptr [0x00174930] MOV RDI,R13 CALL 0x0011ed30 LAB_00120702: ADD RSP,0x170 POP RBX POP R12 POP R13 POP R14 POP R15 RET
void ggml_log_internal(int4 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int4 param_9,char *param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; uint uVar1; char *__s; int8 local_198; int1 *puStack_190; int1 *local_188; int8 local_178; int1 *puStack_170; int1 *local_168; char local_158 [128]; int1 local_d8 [16]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int4 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; local_188 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } puStack_190 = &stack0x00000008; local_198 = 0x3000000010; if (param_10 != (char *)0x0) { local_178 = 0x3000000010; puStack_170 = puStack_190; local_168 = local_188; local_c8 = param_11; local_c0 = param_12; local_b8 = param_13; local_b0 = param_14; uVar1 = vsnprintf(local_158,0x80,param_10,&local_198); if ((int)uVar1 < 0x80) { (*(code *)g_logger_state_0)(param_9,local_158,g_logger_state_1); } else { __s = (char *)calloc((ulong)(uVar1 + 1),1); vsnprintf(__s,(ulong)(uVar1 + 1),param_10,&local_178); __s[uVar1] = '\0'; (*(code *)g_logger_state_0)(param_9,__s,g_logger_state_1); free(__s); } } return; }
7,978
ggml_log_internal
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml.c
void ggml_log_internal(enum ggml_log_level level, const char * format, ...) { va_list args; va_start(args, format); ggml_log_internal_v(level, format, args); va_end(args); }
O3
c
ggml_log_internal: pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x170, %rsp # imm = 0x170 movq %rsi, %r14 leaq 0xc0(%rsp), %rsi movq %rdx, 0x10(%rsi) movq %rcx, 0x18(%rsi) movq %r8, 0x20(%rsi) movq %r9, 0x28(%rsi) testb %al, %al je 0x1983f movaps %xmm0, 0xf0(%rsp) movaps %xmm1, 0x100(%rsp) movaps %xmm2, 0x110(%rsp) movaps %xmm3, 0x120(%rsp) movaps %xmm4, 0x130(%rsp) movaps %xmm5, 0x140(%rsp) movaps %xmm6, 0x150(%rsp) movaps %xmm7, 0x160(%rsp) movq %rsi, 0x10(%rsp) leaq 0x1a0(%rsp), %rax movq %rax, 0x8(%rsp) movabsq $0x3000000010, %rax # imm = 0x3000000010 movq %rax, (%rsp) testq %r14, %r14 je 0x198f8 movl %edi, %ebx movq %rsp, %rcx movq 0x10(%rcx), %rax movq %rax, 0x30(%rsp) movaps (%rcx), %xmm0 movaps %xmm0, 0x20(%rsp) leaq 0x40(%rsp), %rdi movl $0x80, %esi movq %r14, %rdx callq 0x16ac0 cmpl $0x7f, %eax jg 0x198ab movq 0x95964(%rip), %rdx # 0xaf200 leaq 0x40(%rsp), %rsi movl %ebx, %edi callq *0x55897(%rip) # 0x6f140 jmp 0x198f8 movl %eax, %r15d leal 0x1(%r15), %r12d movl $0x1, %esi movq %r12, %rdi callq 0x16b60 movq %rax, %r13 leaq 0x20(%rsp), %rcx movq %rax, %rdi movq %r12, %rsi movq %r14, %rdx callq 0x16ac0 movl %r15d, %eax movb $0x0, (%r13,%rax) movq 0x9591b(%rip), %rdx # 0xaf200 movl %ebx, %edi movq %r13, %rsi callq *0x55850(%rip) # 0x6f140 movq %r13, %rdi callq 0x17420 addq $0x170, %rsp # imm = 0x170 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 retq
ggml_log_internal: push r15 push r14 push r13 push r12 push rbx sub rsp, 170h mov r14, rsi lea rsi, [rsp+198h+var_D8] mov [rsi+10h], rdx mov [rsi+18h], rcx mov [rsi+20h], r8 mov [rsi+28h], r9 test al, al jz short loc_1983F movaps [rsp+198h+var_A8], xmm0 movaps [rsp+198h+var_98], xmm1 movaps [rsp+198h+var_88], xmm2 movaps [rsp+198h+var_78], xmm3 movaps [rsp+198h+var_68], xmm4 movaps [rsp+198h+var_58], xmm5 movaps [rsp+198h+var_48], xmm6 movaps [rsp+198h+var_38], xmm7 loc_1983F: mov [rsp+198h+var_188], rsi lea rax, [rsp+198h+arg_0] mov [rsp+198h+var_190], rax mov rax, 3000000010h mov [rsp+198h+var_198], rax test r14, r14 jz loc_198F8 mov ebx, edi mov rcx, rsp mov rax, [rcx+10h] mov [rsp+198h+var_168], rax movaps xmm0, xmmword ptr [rcx] movaps [rsp+198h+var_178], xmm0 lea rdi, [rsp+198h+var_158] mov esi, 80h mov rdx, r14 call _vsnprintf cmp eax, 7Fh jg short loc_198AB mov rdx, cs:g_logger_state_1 lea rsi, [rsp+198h+var_158] mov edi, ebx call cs:g_logger_state_0 jmp short loc_198F8 loc_198AB: mov r15d, eax lea r12d, [r15+1] mov esi, 1 mov rdi, r12 call _calloc mov r13, rax lea rcx, [rsp+198h+var_178] mov rdi, rax mov rsi, r12 mov rdx, r14 call _vsnprintf mov eax, r15d mov byte ptr [r13+rax+0], 0 mov rdx, cs:g_logger_state_1 mov edi, ebx mov rsi, r13 call cs:g_logger_state_0 mov rdi, r13 call _free loc_198F8: add rsp, 170h pop rbx pop r12 pop r13 pop r14 pop r15 retn
long long ggml_log_internal( unsigned int 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) { long long result; // rax int v15; // eax unsigned int v16; // r15d long long v17; // r12 long long v18; // r13 _BYTE v19[128]; // [rsp+40h] [rbp-158h] BYREF long long v20; // [rsp+D0h] [rbp-C8h] long long v21; // [rsp+D8h] [rbp-C0h] long long v22; // [rsp+E0h] [rbp-B8h] long long v23; // [rsp+E8h] [rbp-B0h] __m128 v24; // [rsp+F0h] [rbp-A8h] __m128 v25; // [rsp+100h] [rbp-98h] __m128 v26; // [rsp+110h] [rbp-88h] __m128 v27; // [rsp+120h] [rbp-78h] __m128 v28; // [rsp+130h] [rbp-68h] __m128 v29; // [rsp+140h] [rbp-58h] __m128 v30; // [rsp+150h] [rbp-48h] __m128 v31; // [rsp+160h] [rbp-38h] v24 = a7; v25 = a8; v26 = a9; v27 = a10; v28 = a11; v29 = a12; v30 = a13; v31 = a14; v20 = a3; v21 = a4; v22 = a5; v23 = a6; result = 0x3000000010LL; if ( a2 ) { v15 = vsnprintf(v19, 128LL, a2); if ( v15 > 127 ) { v16 = v15; v17 = (unsigned int)(v15 + 1); v18 = calloc(v17, 1LL); vsnprintf(v18, v17, a2); *(_BYTE *)(v18 + v16) = 0; g_logger_state_0(a1, v18); return free(v18); } else { return g_logger_state_0(a1, (long long)v19); } } return result; }
ggml_log_internal: PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x170 MOV R14,RSI LEA RSI,[RSP + 0xc0] MOV qword ptr [RSI + 0x10],RDX MOV qword ptr [RSI + 0x18],RCX MOV qword ptr [RSI + 0x20],R8 MOV qword ptr [RSI + 0x28],R9 TEST AL,AL JZ 0x0011983f MOVAPS xmmword ptr [RSP + 0xf0],XMM0 MOVAPS xmmword ptr [RSP + 0x100],XMM1 MOVAPS xmmword ptr [RSP + 0x110],XMM2 MOVAPS xmmword ptr [RSP + 0x120],XMM3 MOVAPS xmmword ptr [RSP + 0x130],XMM4 MOVAPS xmmword ptr [RSP + 0x140],XMM5 MOVAPS xmmword ptr [RSP + 0x150],XMM6 MOVAPS xmmword ptr [RSP + 0x160],XMM7 LAB_0011983f: MOV qword ptr [RSP + 0x10],RSI LEA RAX,[RSP + 0x1a0] MOV qword ptr [RSP + 0x8],RAX MOV RAX,0x3000000010 MOV qword ptr [RSP],RAX TEST R14,R14 JZ 0x001198f8 MOV EBX,EDI MOV RCX,RSP MOV RAX,qword ptr [RCX + 0x10] MOV qword ptr [RSP + 0x30],RAX MOVAPS XMM0,xmmword ptr [RCX] MOVAPS xmmword ptr [RSP + 0x20],XMM0 LEA RDI,[RSP + 0x40] MOV ESI,0x80 MOV RDX,R14 CALL 0x00116ac0 CMP EAX,0x7f JG 0x001198ab MOV RDX,qword ptr [0x001af200] LEA RSI,[RSP + 0x40] MOV EDI,EBX CALL qword ptr [0x0016f140] JMP 0x001198f8 LAB_001198ab: MOV R15D,EAX LEA R12D,[R15 + 0x1] MOV ESI,0x1 MOV RDI,R12 CALL 0x00116b60 MOV R13,RAX LEA RCX,[RSP + 0x20] MOV RDI,RAX MOV RSI,R12 MOV RDX,R14 CALL 0x00116ac0 MOV EAX,R15D MOV byte ptr [R13 + RAX*0x1],0x0 MOV RDX,qword ptr [0x001af200] MOV EDI,EBX MOV RSI,R13 CALL qword ptr [0x0016f140] MOV RDI,R13 CALL 0x00117420 LAB_001198f8: ADD RSP,0x170 POP RBX POP R12 POP R13 POP R14 POP R15 RET
void ggml_log_internal(int4 param_1,int8 param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6,int8 param_7,int8 param_8, int4 param_9,char *param_10,int8 param_11,int8 param_12, int8 param_13,int8 param_14) { char in_AL; uint uVar1; char *__s; int8 local_198; int1 *puStack_190; int1 *local_188; int8 local_178; int1 *puStack_170; int1 *local_168; char local_158 [128]; int1 local_d8 [16]; int8 local_c8; int8 local_c0; int8 local_b8; int8 local_b0; int4 local_a8; int8 local_98; int8 local_88; int8 local_78; int8 local_68; int8 local_58; int8 local_48; int8 local_38; local_188 = local_d8; if (in_AL != '\0') { local_a8 = param_1; local_98 = param_2; local_88 = param_3; local_78 = param_4; local_68 = param_5; local_58 = param_6; local_48 = param_7; local_38 = param_8; } puStack_190 = &stack0x00000008; local_198 = 0x3000000010; if (param_10 != (char *)0x0) { local_178 = 0x3000000010; puStack_170 = puStack_190; local_168 = local_188; local_c8 = param_11; local_c0 = param_12; local_b8 = param_13; local_b0 = param_14; uVar1 = vsnprintf(local_158,0x80,param_10,&local_198); if ((int)uVar1 < 0x80) { (*(code *)g_logger_state_0)(param_9,local_158,g_logger_state_1); } else { __s = (char *)calloc((ulong)(uVar1 + 1),1); vsnprintf(__s,(ulong)(uVar1 + 1),param_10,&local_178); __s[uVar1] = '\0'; (*(code *)g_logger_state_0)(param_9,__s,g_logger_state_1); free(__s); } } return; }
7,979
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>, nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::unget()
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
void unget() { next_unget = true; --position.chars_read_total; // in case we "unget" a newline, we have to also decrement the lines_read if (position.chars_read_current_line == 0) { if (position.lines_read > 0) { --position.lines_read; } } else { --position.chars_read_current_line; } if (JSON_HEDLEY_LIKELY(current != std::char_traits<char_type>::eof())) { JSON_ASSERT(!token_string.empty()); token_string.pop_back(); } }
O0
cpp
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>, nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::unget(): subq $0x18, %rsp movq %rdi, 0x10(%rsp) movq 0x10(%rsp), %rax movq %rax, 0x8(%rsp) movb $0x1, 0x18(%rax) movq 0x20(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x20(%rax) cmpq $0x0, 0x28(%rax) jne 0xd4a59 movq 0x8(%rsp), %rax cmpq $0x0, 0x30(%rax) jbe 0xd4a57 movq 0x8(%rsp), %rax movq 0x30(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x30(%rax) jmp 0xd4a6a movq 0x8(%rsp), %rax movq 0x28(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x28(%rax) movq 0x8(%rsp), %rax movl 0x14(%rax), %eax movl %eax, 0x4(%rsp) callq 0xd3350 movl %eax, %ecx movl 0x4(%rsp), %eax cmpl %ecx, %eax setne %al xorb $-0x1, %al xorb $-0x1, %al testb $0x1, %al jne 0xd4a90 jmp 0xd4a9e movq 0x8(%rsp), %rdi addq $0x38, %rdi callq 0xd4bb0 addq $0x18, %rsp retq nopw %cs:(%rax,%rax) nopl (%rax)
_ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE5ungetEv: sub rsp, 18h mov [rsp+18h+var_8], rdi mov rax, [rsp+18h+var_8] mov [rsp+18h+var_10], rax mov byte ptr [rax+18h], 1 mov rcx, [rax+20h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+20h], rcx cmp qword ptr [rax+28h], 0 jnz short loc_D4A59 mov rax, [rsp+18h+var_10] cmp qword ptr [rax+30h], 0 jbe short loc_D4A57 mov rax, [rsp+18h+var_10] mov rcx, [rax+30h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+30h], rcx loc_D4A57: jmp short loc_D4A6A loc_D4A59: mov rax, [rsp+18h+var_10] mov rcx, [rax+28h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+28h], rcx loc_D4A6A: mov rax, [rsp+18h+var_10] mov eax, [rax+14h] mov [rsp+18h+var_14], eax call _ZNSt11char_traitsIcE3eofEv; std::char_traits<char>::eof(void) mov ecx, eax mov eax, [rsp+18h+var_14] cmp eax, ecx setnz al xor al, 0FFh xor al, 0FFh test al, 1 jnz short loc_D4A90 jmp short loc_D4A9E loc_D4A90: mov rdi, [rsp+18h+var_10] add rdi, 38h ; '8' call _ZNSt6vectorIcSaIcEE8pop_backEv; std::vector<char>::pop_back(void) loc_D4A9E: add rsp, 18h retn
char nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::unget( long long a1) { int v1; // ecx char result; // al int v3; // [rsp+4h] [rbp-14h] *(_BYTE *)(a1 + 24) = 1; --*(_QWORD *)(a1 + 32); if ( *(_QWORD *)(a1 + 40) ) { --*(_QWORD *)(a1 + 40); } else if ( *(_QWORD *)(a1 + 48) ) { --*(_QWORD *)(a1 + 48); } v3 = *(_DWORD *)(a1 + 20); v1 = std::char_traits<char>::eof(); result = v3 != v1; if ( v3 != v1 ) return std::vector<char>::pop_back(a1 + 56); return result; }
unget: SUB RSP,0x18 MOV qword ptr [RSP + 0x10],RDI MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x8],RAX MOV byte ptr [RAX + 0x18],0x1 MOV RCX,qword ptr [RAX + 0x20] ADD RCX,-0x1 MOV qword ptr [RAX + 0x20],RCX CMP qword ptr [RAX + 0x28],0x0 JNZ 0x001d4a59 MOV RAX,qword ptr [RSP + 0x8] CMP qword ptr [RAX + 0x30],0x0 JBE 0x001d4a57 MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX + 0x30] ADD RCX,-0x1 MOV qword ptr [RAX + 0x30],RCX LAB_001d4a57: JMP 0x001d4a6a LAB_001d4a59: MOV RAX,qword ptr [RSP + 0x8] MOV RCX,qword ptr [RAX + 0x28] ADD RCX,-0x1 MOV qword ptr [RAX + 0x28],RCX LAB_001d4a6a: MOV RAX,qword ptr [RSP + 0x8] MOV EAX,dword ptr [RAX + 0x14] MOV dword ptr [RSP + 0x4],EAX CALL 0x001d3350 MOV ECX,EAX MOV EAX,dword ptr [RSP + 0x4] CMP EAX,ECX SETNZ AL XOR AL,0xff XOR AL,0xff TEST AL,0x1 JNZ 0x001d4a90 JMP 0x001d4a9e LAB_001d4a90: MOV RDI,qword ptr [RSP + 0x8] ADD RDI,0x38 CALL 0x001d4bb0 LAB_001d4a9e: ADD RSP,0x18 RET
/* nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::string, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> > >, nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*> >::unget() */ void __thiscall nlohmann::json_abi_v3_11_2::detail:: lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char_const*>> ::unget(lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char_const*>> *this) { int iVar1; int iVar2; this[0x18] = (lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::__cxx11::string,bool,long,unsigned_long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned_char,std::allocator<unsigned_char>>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char_const*>> )0x1; *(long *)(this + 0x20) = *(long *)(this + 0x20) + -1; if (*(long *)(this + 0x28) == 0) { if (*(long *)(this + 0x30) != 0) { *(long *)(this + 0x30) = *(long *)(this + 0x30) + -1; } } else { *(long *)(this + 0x28) = *(long *)(this + 0x28) + -1; } iVar1 = *(int *)(this + 0x14); iVar2 = std::char_traits<char>::eof(); if (iVar1 != iVar2) { std::vector<char,std::allocator<char>>::pop_back ((vector<char,std::allocator<char>> *)(this + 0x38)); } return; }
7,980
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>, nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::unget()
7CodeWizard[P]stablediffusion/thirdparty/json.hpp
void unget() { next_unget = true; --position.chars_read_total; // in case we "unget" a newline, we have to also decrement the lines_read if (position.chars_read_current_line == 0) { if (position.lines_read > 0) { --position.lines_read; } } else { --position.chars_read_current_line; } if (JSON_HEDLEY_LIKELY(current != std::char_traits<char_type>::eof())) { JSON_ASSERT(!token_string.empty()); token_string.pop_back(); } }
O1
cpp
nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::json_abi_v3_11_2::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char>>>, nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::unget(): movb $0x1, 0x18(%rdi) decq 0x20(%rdi) movq 0x28(%rdi), %rax testq %rax, %rax je 0xbb39 leaq 0x28(%rdi), %rcx jmp 0xbb46 movq 0x30(%rdi), %rax testq %rax, %rax je 0xbb4c leaq 0x30(%rdi), %rcx decq %rax movq %rax, (%rcx) cmpl $-0x1, 0x14(%rdi) je 0xbb56 decq 0x40(%rdi) retq nop
_ZN8nlohmann16json_abi_v3_11_26detail5lexerINS0_10basic_jsonISt3mapSt6vectorNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEblmdSaNS0_14adl_serializerES5_IhSaIhEEEENS1_22iterator_input_adapterIPKcEEE5ungetEv: mov byte ptr [rdi+18h], 1 dec qword ptr [rdi+20h] mov rax, [rdi+28h] test rax, rax jz short loc_BB39 lea rcx, [rdi+28h] jmp short loc_BB46 loc_BB39: mov rax, [rdi+30h] test rax, rax jz short loc_BB4C lea rcx, [rdi+30h] loc_BB46: dec rax mov [rcx], rax loc_BB4C: cmp dword ptr [rdi+14h], 0FFFFFFFFh jz short locret_BB56 dec qword ptr [rdi+40h] locret_BB56: retn
long long nlohmann::json_abi_v3_11_2::detail::lexer<nlohmann::json_abi_v3_11_2::basic_json<std::map,std::vector,std::string,bool,long,unsigned long,double,std::allocator,nlohmann::json_abi_v3_11_2::adl_serializer,std::vector<unsigned char>>,nlohmann::json_abi_v3_11_2::detail::iterator_input_adapter<char const*>>::unget( long long a1) { long long result; // rax _QWORD *v2; // rcx *(_BYTE *)(a1 + 24) = 1; --*(_QWORD *)(a1 + 32); result = *(_QWORD *)(a1 + 40); if ( result ) { v2 = (_QWORD *)(a1 + 40); } else { result = *(_QWORD *)(a1 + 48); if ( !result ) goto LABEL_6; v2 = (_QWORD *)(a1 + 48); } *v2 = --result; LABEL_6: if ( *(_DWORD *)(a1 + 20) != -1 ) --*(_QWORD *)(a1 + 64); return result; }
7,981
aes_crypt_xts_wrap
msxemulator/build_O3/_deps/pico_sdk-src/lib/mbedtls/library/cipher_wrap.c
static int aes_crypt_xts_wrap(void *ctx, mbedtls_operation_t operation, size_t length, const unsigned char data_unit[16], const unsigned char *input, unsigned char *output) { mbedtls_aes_xts_context *xts_ctx = ctx; int mode; switch (operation) { case MBEDTLS_ENCRYPT: mode = MBEDTLS_AES_ENCRYPT; break; case MBEDTLS_DECRYPT: mode = MBEDTLS_AES_DECRYPT; break; default: return MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA; } return mbedtls_aes_crypt_xts(xts_ctx, mode, length, data_unit, input, output); }
O3
c
aes_crypt_xts_wrap: cmpl $0x1, %esi jbe 0x7ca09 movl $0xffff9f00, %eax # imm = 0xFFFF9F00 retq
aes_crypt_xts_wrap: cmp esi, 1 jbe mbedtls_aes_crypt_xts mov eax, 0FFFF9F00h retn
long long aes_crypt_xts_wrap( long long a1, unsigned int a2, unsigned long long a3, _DWORD *a4, __m128 *a5, __m128 *a6) { if ( a2 <= 1 ) return mbedtls_aes_crypt_xts(a1, a2, a3, a4, a5, a6); else return 4294942464LL; }
aes_crypt_xts_wrap: CMP ESI,0x1 JBE 0x0017ca09 MOV EAX,0xffff9f00 RET
int8 aes_crypt_xts_wrap(long param_1,uint param_2,ulong param_3,int8 param_4,uint *param_5, uint *param_6) { uint uVar1; uint uVar2; int8 uVar3; long lVar4; ulong uVar5; ulong uVar6; uint *puVar7; uint uVar8; ulong uVar9; uint *puVar10; uint uStack_78; uint uStack_74; uint uStack_70; uint uStack_6c; long lStack_60; uint uStack_58; uint uStack_54; uint uStack_50; uint uStack_4c; uint uStack_48; uint uStack_44; uint uStack_40; uint uStack_3c; if (1 < param_2) { return 0xffff9f00; } uVar3 = 0xffffffde; if ((0xffffffffff00000e < param_3 - 0x1000001) && (uVar3 = mbedtls_aes_crypt_ecb(param_1 + 0x120,1,param_4,&uStack_58), (int)uVar3 == 0)) { uVar8 = (uint)param_3 & 0xf; uVar9 = (ulong)uVar8; param_3 = param_3 >> 4; lStack_60 = param_1; do { puVar7 = param_6; param_3 = param_3 - 1; if (param_3 == 0 && (param_2 == 0 && uVar9 != 0)) { uStack_48 = uStack_58; uStack_44 = uStack_54; uStack_40 = uStack_50; uStack_3c = uStack_4c; mbedtls_gf128mul_x_ble(&uStack_58,&uStack_58); } uStack_78 = *param_5 ^ uStack_58; uStack_74 = param_5[1] ^ uStack_54; uStack_70 = param_5[2] ^ uStack_50; uStack_6c = param_5[3] ^ uStack_4c; uVar3 = mbedtls_aes_crypt_ecb(lStack_60,param_2,&uStack_78); if ((int)uVar3 != 0) { return uVar3; } *puVar7 = uStack_58 ^ uStack_78; puVar7[1] = uStack_54 ^ uStack_74; puVar7[2] = uStack_50 ^ uStack_70; puVar7[3] = uStack_4c ^ uStack_6c; mbedtls_gf128mul_x_ble(&uStack_58,&uStack_58); param_5 = param_5 + 4; param_6 = puVar7 + 4; } while (param_3 != 0); if (uVar9 != 0) { puVar10 = &uStack_58; if (param_2 == 0) { puVar10 = &uStack_48; } uVar6 = 0; do { uVar5 = uVar6; *(int1 *)((long)(puVar7 + 4) + uVar5) = *(int1 *)((long)puVar7 + uVar5); *(byte *)((long)&uStack_78 + uVar5) = *(byte *)((long)puVar10 + uVar5) ^ *(byte *)((long)param_5 + uVar5); uVar6 = uVar5 + 1; } while (uVar9 != uVar6); if (uVar5 < 0xf) { lVar4 = (uVar6 - uVar8 * 2) + 0x10; do { *(byte *)((long)&uStack_78 + uVar9) = *(byte *)((long)puVar10 + uVar9) ^ *(byte *)((long)puVar7 + uVar9); uVar9 = uVar9 + 1; lVar4 = lVar4 + -1; } while (lVar4 != 0); } uVar3 = mbedtls_aes_crypt_ecb(lStack_60,param_2,&uStack_78); if ((int)uVar3 != 0) { return uVar3; } uVar8 = puVar10[1]; uVar1 = puVar10[2]; uVar2 = puVar10[3]; *puVar7 = *puVar10 ^ uStack_78; puVar7[1] = uVar8 ^ uStack_74; puVar7[2] = uVar1 ^ uStack_70; puVar7[3] = uVar2 ^ uStack_6c; } uVar3 = 0; } return uVar3; }
7,982
ma_ft_update
eloqsql/storage/maria/ma_ft_update.c
int _ma_ft_update(MARIA_HA *info, uint keynr, uchar *keybuf, const uchar *oldrec, const uchar *newrec, my_off_t pos) { int error= -1; FT_WORD *oldlist,*newlist, *old_word, *new_word; CHARSET_INFO *cs=info->s->keyinfo[keynr].seg->charset; int cmp, cmp2; DBUG_ENTER("_ma_ft_update"); if (!(old_word=oldlist=_ma_ft_parserecord(info, keynr, oldrec, &info->ft_memroot)) || !(new_word=newlist=_ma_ft_parserecord(info, keynr, newrec, &info->ft_memroot))) goto err; error=0; while(old_word->pos && new_word->pos) { cmp= ha_compare_text(cs, (uchar*) old_word->pos,old_word->len, (uchar*) new_word->pos,new_word->len,0); cmp2= cmp ? 0 : (fabs(old_word->weight - new_word->weight) > 1.e-5); if (cmp < 0 || cmp2) { MARIA_KEY key; _ma_ft_make_key(info, &key, keynr, keybuf, old_word, pos); if (_ma_ck_delete(info, &key)) { error= -1; goto err; } } if (cmp > 0 || cmp2) { MARIA_KEY key; _ma_ft_make_key(info, &key, keynr, keybuf, new_word,pos); if ((error= _ma_ck_write(info, &key))) goto err; } if (cmp<=0) old_word++; if (cmp>=0) new_word++; } if (old_word->pos) error= _ma_ft_erase(info,keynr,keybuf,old_word,pos); else if (new_word->pos) error= _ma_ft_store(info,keynr,keybuf,new_word,pos); err: free_root(&info->ft_memroot, MYF(MY_MARK_BLOCKS_FREE)); DBUG_RETURN(error); }
O0
c
ma_ft_update: pushq %rbp movq %rsp, %rbp subq $0xc0, %rsp movq %rdi, -0x8(%rbp) movl %esi, -0xc(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq %r8, -0x28(%rbp) movq %r9, -0x30(%rbp) movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF movq -0x8(%rbp), %rax movq (%rax), %rax movq 0x570(%rax), %rax movl -0xc(%rbp), %ecx imulq $0x118, %rcx, %rcx # imm = 0x118 addq %rcx, %rax movq 0xc0(%rax), %rax movq (%rax), %rax movq %rax, -0x60(%rbp) movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x20(%rbp), %rdx movq -0x8(%rbp), %rcx addq $0x328, %rcx # imm = 0x328 callq 0x8c7d0 movq %rax, -0x40(%rbp) movq %rax, -0x50(%rbp) cmpq $0x0, %rax je 0x8ca34 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x28(%rbp), %rdx movq -0x8(%rbp), %rcx addq $0x328, %rcx # imm = 0x328 callq 0x8c7d0 movq %rax, -0x48(%rbp) movq %rax, -0x58(%rbp) cmpq $0x0, %rax jne 0x8ca39 jmp 0x8cc02 movl $0x0, -0x34(%rbp) movq -0x50(%rbp), %rcx xorl %eax, %eax cmpq $0x0, (%rcx) movb %al, -0xa9(%rbp) je 0x8ca63 movq -0x58(%rbp), %rax cmpq $0x0, (%rax) setne %al movb %al, -0xa9(%rbp) movb -0xa9(%rbp), %al testb $0x1, %al jne 0x8ca72 jmp 0x8cbb2 movq -0x60(%rbp), %rdi movq -0x50(%rbp), %rax movq (%rax), %rsi movq -0x50(%rbp), %rax movl 0x8(%rax), %eax movl %eax, %edx movq -0x58(%rbp), %rax movq (%rax), %rcx movq -0x58(%rbp), %rax movl 0x8(%rax), %eax movl %eax, %r8d xorl %r9d, %r9d callq 0xf0480 movl %eax, -0x64(%rbp) cmpl $0x0, -0x64(%rbp) je 0x8cab2 xorl %eax, %eax movl %eax, -0xb0(%rbp) jmp 0x8cae9 movq -0x50(%rbp), %rax movsd 0x10(%rax), %xmm0 movq -0x58(%rbp), %rax subsd 0x10(%rax), %xmm0 movaps 0xcc5e5(%rip), %xmm1 # 0x1590b0 pand %xmm1, %xmm0 movsd 0xcc191(%rip), %xmm1 # 0x158c68 ucomisd %xmm1, %xmm0 seta %al andb $0x1, %al movzbl %al, %eax movl %eax, -0xb0(%rbp) movl -0xb0(%rbp), %eax movl %eax, -0x68(%rbp) cmpl $0x0, -0x64(%rbp) jl 0x8cafe cmpl $0x0, -0x68(%rbp) je 0x8cb3f movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx movq -0x18(%rbp), %rcx movq -0x50(%rbp), %r8 movq -0x30(%rbp), %r9 leaq -0x88(%rbp), %rsi callq 0x8cc30 movq -0x8(%rbp), %rdi leaq -0x88(%rbp), %rsi callq 0x87870 cmpb $0x0, %al je 0x8cb3d movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF jmp 0x8cc02 jmp 0x8cb3f cmpl $0x0, -0x64(%rbp) jg 0x8cb4b cmpl $0x0, -0x68(%rbp) je 0x8cb89 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %edx movq -0x18(%rbp), %rcx movq -0x58(%rbp), %r8 movq -0x30(%rbp), %r9 leaq -0xa8(%rbp), %rsi callq 0x8cc30 movq -0x8(%rbp), %rdi leaq -0xa8(%rbp), %rsi callq 0x825a0 movsbl %al, %eax movl %eax, -0x34(%rbp) cmpl $0x0, %eax je 0x8cb87 jmp 0x8cc02 jmp 0x8cb89 cmpl $0x0, -0x64(%rbp) jg 0x8cb9b movq -0x50(%rbp), %rax addq $0x18, %rax movq %rax, -0x50(%rbp) cmpl $0x0, -0x64(%rbp) jl 0x8cbad movq -0x58(%rbp), %rax addq $0x18, %rax movq %rax, -0x58(%rbp) jmp 0x8ca40 movq -0x50(%rbp), %rax cmpq $0x0, (%rax) je 0x8cbd9 movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x50(%rbp), %rcx movq -0x30(%rbp), %r8 callq 0x8cda0 movl %eax, -0x34(%rbp) jmp 0x8cc00 movq -0x58(%rbp), %rax cmpq $0x0, (%rax) je 0x8cbfe movq -0x8(%rbp), %rdi movl -0xc(%rbp), %esi movq -0x18(%rbp), %rdx movq -0x58(%rbp), %rcx movq -0x30(%rbp), %r8 callq 0x8ce30 movl %eax, -0x34(%rbp) jmp 0x8cc00 jmp 0x8cc02 movq -0x8(%rbp), %rdi addq $0x328, %rdi # imm = 0x328 movl $0x2, %esi callq 0xed9e0 movl -0x34(%rbp), %eax movl %eax, -0xb4(%rbp) movl -0xb4(%rbp), %eax addq $0xc0, %rsp popq %rbp retq nop
_ma_ft_update: push rbp mov rbp, rsp sub rsp, 0C0h mov [rbp+var_8], rdi mov [rbp+var_C], esi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov [rbp+var_28], r8 mov [rbp+var_30], r9 mov [rbp+var_34], 0FFFFFFFFh mov rax, [rbp+var_8] mov rax, [rax] mov rax, [rax+570h] mov ecx, [rbp+var_C] imul rcx, 118h add rax, rcx mov rax, [rax+0C0h] mov rax, [rax] mov [rbp+var_60], rax mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_20] mov rcx, [rbp+var_8] add rcx, 328h call _ma_ft_parserecord mov [rbp+var_40], rax mov [rbp+var_50], rax cmp rax, 0 jz short loc_8CA34 mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_28] mov rcx, [rbp+var_8] add rcx, 328h call _ma_ft_parserecord mov [rbp+var_48], rax mov [rbp+var_58], rax cmp rax, 0 jnz short loc_8CA39 loc_8CA34: jmp loc_8CC02 loc_8CA39: mov [rbp+var_34], 0 loc_8CA40: mov rcx, [rbp+var_50] xor eax, eax cmp qword ptr [rcx], 0 mov [rbp+var_A9], al jz short loc_8CA63 mov rax, [rbp+var_58] cmp qword ptr [rax], 0 setnz al mov [rbp+var_A9], al loc_8CA63: mov al, [rbp+var_A9] test al, 1 jnz short loc_8CA72 jmp loc_8CBB2 loc_8CA72: mov rdi, [rbp+var_60] mov rax, [rbp+var_50] mov rsi, [rax] mov rax, [rbp+var_50] mov eax, [rax+8] mov edx, eax mov rax, [rbp+var_58] mov rcx, [rax] mov rax, [rbp+var_58] mov eax, [rax+8] mov r8d, eax xor r9d, r9d call ha_compare_text mov [rbp+var_64], eax cmp [rbp+var_64], 0 jz short loc_8CAB2 xor eax, eax mov [rbp+var_B0], eax jmp short loc_8CAE9 loc_8CAB2: mov rax, [rbp+var_50] movsd xmm0, qword ptr [rax+10h] mov rax, [rbp+var_58] subsd xmm0, qword ptr [rax+10h] movaps xmm1, cs:xmmword_1590B0 pand xmm0, xmm1 movsd xmm1, cs:qword_158C68 ucomisd xmm0, xmm1 setnbe al and al, 1 movzx eax, al mov [rbp+var_B0], eax loc_8CAE9: mov eax, [rbp+var_B0] mov [rbp+var_68], eax cmp [rbp+var_64], 0 jl short loc_8CAFE cmp [rbp+var_68], 0 jz short loc_8CB3F loc_8CAFE: mov rdi, [rbp+var_8] mov edx, [rbp+var_C] mov rcx, [rbp+var_18] mov r8, [rbp+var_50] mov r9, [rbp+var_30] lea rsi, [rbp+var_88] call _ma_ft_make_key mov rdi, [rbp+var_8] lea rsi, [rbp+var_88] call _ma_ck_delete cmp al, 0 jz short loc_8CB3D mov [rbp+var_34], 0FFFFFFFFh jmp loc_8CC02 loc_8CB3D: jmp short $+2 loc_8CB3F: cmp [rbp+var_64], 0 jg short loc_8CB4B cmp [rbp+var_68], 0 jz short loc_8CB89 loc_8CB4B: mov rdi, [rbp+var_8] mov edx, [rbp+var_C] mov rcx, [rbp+var_18] mov r8, [rbp+var_58] mov r9, [rbp+var_30] lea rsi, [rbp+var_A8] call _ma_ft_make_key mov rdi, [rbp+var_8] lea rsi, [rbp+var_A8] call _ma_ck_write movsx eax, al mov [rbp+var_34], eax cmp eax, 0 jz short loc_8CB87 jmp short loc_8CC02 loc_8CB87: jmp short $+2 loc_8CB89: cmp [rbp+var_64], 0 jg short loc_8CB9B mov rax, [rbp+var_50] add rax, 18h mov [rbp+var_50], rax loc_8CB9B: cmp [rbp+var_64], 0 jl short loc_8CBAD mov rax, [rbp+var_58] add rax, 18h mov [rbp+var_58], rax loc_8CBAD: jmp loc_8CA40 loc_8CBB2: mov rax, [rbp+var_50] cmp qword ptr [rax], 0 jz short loc_8CBD9 mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov rcx, [rbp+var_50] mov r8, [rbp+var_30] call _ma_ft_erase mov [rbp+var_34], eax jmp short loc_8CC00 loc_8CBD9: mov rax, [rbp+var_58] cmp qword ptr [rax], 0 jz short loc_8CBFE mov rdi, [rbp+var_8] mov esi, [rbp+var_C] mov rdx, [rbp+var_18] mov rcx, [rbp+var_58] mov r8, [rbp+var_30] call _ma_ft_store mov [rbp+var_34], eax loc_8CBFE: jmp short $+2 loc_8CC00: jmp short $+2 loc_8CC02: mov rdi, [rbp+var_8] add rdi, 328h mov esi, 2 call free_root mov eax, [rbp+var_34] mov [rbp+var_B4], eax mov eax, [rbp+var_B4] add rsp, 0C0h pop rbp retn
long long ma_ft_update(long long *a1, unsigned int a2, long long a3, long long a4, long long a5, long long a6) { __m128i v6; // xmm0 char v7; // al BOOL v9; // [rsp+10h] [rbp-B0h] bool v10; // [rsp+17h] [rbp-A9h] _BYTE v11[32]; // [rsp+18h] [rbp-A8h] BYREF long long v12[4]; // [rsp+38h] [rbp-88h] BYREF BOOL v13; // [rsp+58h] [rbp-68h] int v14; // [rsp+5Ch] [rbp-64h] long long v15; // [rsp+60h] [rbp-60h] long long v16; // [rsp+68h] [rbp-58h] long long v17; // [rsp+70h] [rbp-50h] long long v18; // [rsp+78h] [rbp-48h] long long v19; // [rsp+80h] [rbp-40h] unsigned int v20; // [rsp+8Ch] [rbp-34h] long long v21; // [rsp+90h] [rbp-30h] long long v22; // [rsp+98h] [rbp-28h] long long v23; // [rsp+A0h] [rbp-20h] long long v24; // [rsp+A8h] [rbp-18h] unsigned int v25; // [rsp+B4h] [rbp-Ch] long long *v26; // [rsp+B8h] [rbp-8h] v26 = a1; v25 = a2; v24 = a3; v23 = a4; v22 = a5; v21 = a6; v20 = -1; v15 = **(_QWORD **)(280LL * a2 + *(_QWORD *)(*a1 + 1392) + 192); v19 = ma_ft_parserecord(a1, a2, a4, (long long)(a1 + 101)); v17 = v19; if ( v19 ) { v18 = ma_ft_parserecord(v26, v25, v22, (long long)(v26 + 101)); v16 = v18; if ( v18 ) { v20 = 0; while ( 1 ) { v10 = 0; if ( *(_QWORD *)v17 ) v10 = *(_QWORD *)v16 != 0LL; if ( !v10 ) break; v14 = ha_compare_text( v15, *(_QWORD *)v17, *(unsigned int *)(v17 + 8), *(_QWORD *)v16, *(unsigned int *)(v16 + 8), 0LL); if ( v14 ) { v9 = 0; } else { v6 = (__m128i)*(unsigned long long *)(v17 + 16); *(double *)v6.m128i_i64 = *(double *)v6.m128i_i64 - *(double *)(v16 + 16); v9 = *(double *)_mm_and_si128(v6, (__m128i)xmmword_1590B0).m128i_i64 > 0.00001; } v13 = v9; if ( v14 < 0 || v13 ) { ma_ft_make_key(v26, v12, v25, v24, v17, v21); if ( ma_ck_delete(v26, v12) ) { v20 = -1; goto LABEL_27; } } if ( v14 > 0 || v13 ) { ma_ft_make_key(v26, v11, v25, v24, v16, v21); v7 = ma_ck_write((long long)v26, (long long)v11); v20 = v7; if ( v7 ) goto LABEL_27; } if ( v14 <= 0 ) v17 += 24LL; if ( v14 >= 0 ) v16 += 24LL; } if ( *(_QWORD *)v17 ) { v20 = ma_ft_erase(v26, v25, v24, v17, v21); } else if ( *(_QWORD *)v16 ) { v20 = ma_ft_store(v26, v25, v24, v16, v21); } } } LABEL_27: free_root(v26 + 101, 2LL); return v20; }
_ma_ft_update: PUSH RBP MOV RBP,RSP SUB RSP,0xc0 MOV qword ptr [RBP + -0x8],RDI MOV dword ptr [RBP + -0xc],ESI 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 dword ptr [RBP + -0x34],0xffffffff MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX] MOV RAX,qword ptr [RAX + 0x570] MOV ECX,dword ptr [RBP + -0xc] IMUL RCX,RCX,0x118 ADD RAX,RCX MOV RAX,qword ptr [RAX + 0xc0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x60],RAX MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x20] MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x328 CALL 0x0018c7d0 MOV qword ptr [RBP + -0x40],RAX MOV qword ptr [RBP + -0x50],RAX CMP RAX,0x0 JZ 0x0018ca34 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x8] ADD RCX,0x328 CALL 0x0018c7d0 MOV qword ptr [RBP + -0x48],RAX MOV qword ptr [RBP + -0x58],RAX CMP RAX,0x0 JNZ 0x0018ca39 LAB_0018ca34: JMP 0x0018cc02 LAB_0018ca39: MOV dword ptr [RBP + -0x34],0x0 LAB_0018ca40: MOV RCX,qword ptr [RBP + -0x50] XOR EAX,EAX CMP qword ptr [RCX],0x0 MOV byte ptr [RBP + -0xa9],AL JZ 0x0018ca63 MOV RAX,qword ptr [RBP + -0x58] CMP qword ptr [RAX],0x0 SETNZ AL MOV byte ptr [RBP + -0xa9],AL LAB_0018ca63: MOV AL,byte ptr [RBP + -0xa9] TEST AL,0x1 JNZ 0x0018ca72 JMP 0x0018cbb2 LAB_0018ca72: MOV RDI,qword ptr [RBP + -0x60] MOV RAX,qword ptr [RBP + -0x50] MOV RSI,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x50] MOV EAX,dword ptr [RAX + 0x8] MOV EDX,EAX MOV RAX,qword ptr [RBP + -0x58] MOV RCX,qword ptr [RAX] MOV RAX,qword ptr [RBP + -0x58] MOV EAX,dword ptr [RAX + 0x8] MOV R8D,EAX XOR R9D,R9D CALL 0x001f0480 MOV dword ptr [RBP + -0x64],EAX CMP dword ptr [RBP + -0x64],0x0 JZ 0x0018cab2 XOR EAX,EAX MOV dword ptr [RBP + -0xb0],EAX JMP 0x0018cae9 LAB_0018cab2: MOV RAX,qword ptr [RBP + -0x50] MOVSD XMM0,qword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x58] SUBSD XMM0,qword ptr [RAX + 0x10] MOVAPS XMM1,xmmword ptr [0x002590b0] PAND XMM0,XMM1 MOVSD XMM1,qword ptr [0x00258c68] UCOMISD XMM0,XMM1 SETA AL AND AL,0x1 MOVZX EAX,AL MOV dword ptr [RBP + -0xb0],EAX LAB_0018cae9: MOV EAX,dword ptr [RBP + -0xb0] MOV dword ptr [RBP + -0x68],EAX CMP dword ptr [RBP + -0x64],0x0 JL 0x0018cafe CMP dword ptr [RBP + -0x68],0x0 JZ 0x0018cb3f LAB_0018cafe: MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x50] MOV R9,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0x88] CALL 0x0018cc30 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0x88] CALL 0x00187870 CMP AL,0x0 JZ 0x0018cb3d MOV dword ptr [RBP + -0x34],0xffffffff JMP 0x0018cc02 LAB_0018cb3d: JMP 0x0018cb3f LAB_0018cb3f: CMP dword ptr [RBP + -0x64],0x0 JG 0x0018cb4b CMP dword ptr [RBP + -0x68],0x0 JZ 0x0018cb89 LAB_0018cb4b: MOV RDI,qword ptr [RBP + -0x8] MOV EDX,dword ptr [RBP + -0xc] MOV RCX,qword ptr [RBP + -0x18] MOV R8,qword ptr [RBP + -0x58] MOV R9,qword ptr [RBP + -0x30] LEA RSI,[RBP + -0xa8] CALL 0x0018cc30 MOV RDI,qword ptr [RBP + -0x8] LEA RSI,[RBP + -0xa8] CALL 0x001825a0 MOVSX EAX,AL MOV dword ptr [RBP + -0x34],EAX CMP EAX,0x0 JZ 0x0018cb87 JMP 0x0018cc02 LAB_0018cb87: JMP 0x0018cb89 LAB_0018cb89: CMP dword ptr [RBP + -0x64],0x0 JG 0x0018cb9b MOV RAX,qword ptr [RBP + -0x50] ADD RAX,0x18 MOV qword ptr [RBP + -0x50],RAX LAB_0018cb9b: CMP dword ptr [RBP + -0x64],0x0 JL 0x0018cbad MOV RAX,qword ptr [RBP + -0x58] ADD RAX,0x18 MOV qword ptr [RBP + -0x58],RAX LAB_0018cbad: JMP 0x0018ca40 LAB_0018cbb2: MOV RAX,qword ptr [RBP + -0x50] CMP qword ptr [RAX],0x0 JZ 0x0018cbd9 MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x50] MOV R8,qword ptr [RBP + -0x30] CALL 0x0018cda0 MOV dword ptr [RBP + -0x34],EAX JMP 0x0018cc00 LAB_0018cbd9: MOV RAX,qword ptr [RBP + -0x58] CMP qword ptr [RAX],0x0 JZ 0x0018cbfe MOV RDI,qword ptr [RBP + -0x8] MOV ESI,dword ptr [RBP + -0xc] MOV RDX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x58] MOV R8,qword ptr [RBP + -0x30] CALL 0x0018ce30 MOV dword ptr [RBP + -0x34],EAX LAB_0018cbfe: JMP 0x0018cc00 LAB_0018cc00: JMP 0x0018cc02 LAB_0018cc02: MOV RDI,qword ptr [RBP + -0x8] ADD RDI,0x328 MOV ESI,0x2 CALL 0x001ed9e0 MOV EAX,dword ptr [RBP + -0x34] MOV dword ptr [RBP + -0xb4],EAX MOV EAX,dword ptr [RBP + -0xb4] ADD RSP,0xc0 POP RBP RET
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */ int _ma_ft_update(long *param_1,uint param_2,int8 param_3,int8 param_4, int8 param_5,int8 param_6) { char cVar1; bool bVar2; uint local_b8; int1 local_b0 [32]; int1 local_90 [32]; uint local_70; int local_6c; int8 local_68; long *local_60; long *local_58; long *local_50; long *local_48; int local_3c; int8 local_38; int8 local_30; int8 local_28; int8 local_20; uint local_14; long *local_10; local_3c = -1; local_68 = **(int8 **)(*(long *)(*param_1 + 0x570) + (ulong)param_2 * 0x118 + 0xc0); local_38 = param_6; local_30 = param_5; local_28 = param_4; local_20 = param_3; local_14 = param_2; local_10 = param_1; local_58 = (long *)_ma_ft_parserecord(param_1,param_2,param_4,param_1 + 0x65); local_48 = local_58; if ((local_58 != (long *)0x0) && (local_60 = (long *)_ma_ft_parserecord(local_10,local_14,local_30,local_10 + 0x65), local_50 = local_60, local_60 != (long *)0x0)) { local_3c = 0; while( true ) { bVar2 = false; if (*local_58 != 0) { bVar2 = *local_60 != 0; } if (!bVar2) break; local_6c = ha_compare_text(local_68,*local_58,(int)local_58[1],*local_60,(int)local_60[1],0); if (local_6c == 0) { local_b8 = (uint)(DAT_00258c68 < (double)((ulong)((double)local_58[2] - (double)local_60[2]) & _DAT_002590b0 )); } else { local_b8 = 0; } local_70 = local_b8; if ((local_6c < 0) || (local_b8 != 0)) { _ma_ft_make_key(local_10,local_90,local_14,local_20,local_58); cVar1 = _ma_ck_delete(local_10,local_90); if (cVar1 != '\0') { local_3c = -1; goto LAB_0018cc02; } } if ((0 < local_6c) || (local_70 != 0)) { _ma_ft_make_key(local_10,local_b0,local_14,local_20,local_60); cVar1 = _ma_ck_write(local_10,local_b0); local_3c = (int)cVar1; if (local_3c != 0) goto LAB_0018cc02; } if (local_6c < 1) { local_58 = local_58 + 3; } if (-1 < local_6c) { local_60 = local_60 + 3; } } if (*local_58 == 0) { if (*local_60 != 0) { local_3c = _ma_ft_store(local_10,local_14,local_20,local_60,local_38); } } else { local_3c = _ma_ft_erase(local_10,local_14,local_20,local_58,local_38); } } LAB_0018cc02: free_root(local_10 + 0x65,2); return local_3c; }
7,983
line_by_Px2
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/pairing.c
static void line_by_Px2(vec384fp6 line, const POINTonE1_affine *Px2) { mul_fp(line[1][0], line[1][0], Px2->X); /* "b01" *= -2*P->X */ mul_fp(line[1][1], line[1][1], Px2->X); mul_fp(line[2][0], line[2][0], Px2->Y); /* "b11" *= 2*P->Y */ mul_fp(line[2][1], line[2][1], Px2->Y); }
O3
c
line_by_Px2: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r12 pushq %rbx movq %rsi, %rbx movq %rdi, %r14 addq $0x60, %rdi leaq 0x178ed(%rip), %r15 # 0x3fb10 movabsq $-0x760c000300030003, %r12 # imm = 0x89F3FFFCFFFCFFFD movq %rdi, %rsi movq %rbx, %rdx movq %r15, %rcx movq %r12, %r8 callq 0x344a0 leaq 0x90(%r14), %rdi movq %rdi, %rsi movq %rbx, %rdx movq %r15, %rcx movq %r12, %r8 callq 0x344a0 leaq 0xc0(%r14), %rdi addq $0x30, %rbx movq %rdi, %rsi movq %rbx, %rdx movq %r15, %rcx movq %r12, %r8 callq 0x344a0 addq $0xf0, %r14 movq %r14, %rdi movq %r14, %rsi movq %rbx, %rdx movq %r15, %rcx movq %r12, %r8 popq %rbx popq %r12 popq %r14 popq %r15 popq %rbp jmp 0x344a0
line_by_Px2: push rbp mov rbp, rsp push r15 push r14 push r12 push rbx mov rbx, rsi mov r14, rdi add rdi, 60h ; '`' lea r15, BLS12_381_P mov r12, 89F3FFFCFFFCFFFDh mov rsi, rdi mov rdx, rbx mov rcx, r15 mov r8, r12 call mul_mont_384 lea rdi, [r14+90h] mov rsi, rdi mov rdx, rbx mov rcx, r15 mov r8, r12 call mul_mont_384 lea rdi, [r14+0C0h] add rbx, 30h ; '0' mov rsi, rdi mov rdx, rbx mov rcx, r15 mov r8, r12 call mul_mont_384 add r14, 0F0h mov rdi, r14 mov rsi, r14 mov rdx, rbx mov rcx, r15 mov r8, r12 pop rbx pop r12 pop r14 pop r15 pop rbp jmp mul_mont_384
long long line_by_Px2(long long a1, long long a2) { mul_mont_384(a1 + 96, a1 + 96, a2, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(a1 + 144, a1 + 144, a2, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); mul_mont_384(a1 + 192, a1 + 192, a2 + 48, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); return mul_mont_384(a1 + 240, a1 + 240, a2 + 48, &BLS12_381_P, 0x89F3FFFCFFFCFFFDLL); }
line_by_Px2: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R12 PUSH RBX MOV RBX,RSI MOV R14,RDI ADD RDI,0x60 LEA R15,[0x13fb10] MOV R12,-0x760c000300030003 MOV RSI,RDI MOV RDX,RBX MOV RCX,R15 MOV R8,R12 CALL 0x001344a0 LEA RDI,[R14 + 0x90] MOV RSI,RDI MOV RDX,RBX MOV RCX,R15 MOV R8,R12 CALL 0x001344a0 LEA RDI,[R14 + 0xc0] ADD RBX,0x30 MOV RSI,RDI MOV RDX,RBX MOV RCX,R15 MOV R8,R12 CALL 0x001344a0 ADD R14,0xf0 MOV RDI,R14 MOV RSI,R14 MOV RDX,RBX MOV RCX,R15 MOV R8,R12 POP RBX POP R12 POP R14 POP R15 POP RBP JMP 0x001344a0
void line_by_Px2(long param_1,long param_2) { mul_mont_384(param_1 + 0x60,param_1 + 0x60,param_2,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(param_1 + 0x90,param_1 + 0x90,param_2,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(param_1 + 0xc0,param_1 + 0xc0,param_2 + 0x30,BLS12_381_P,0x89f3fffcfffcfffd); mul_mont_384(param_1 + 0xf0,param_1 + 0xf0,param_2 + 0x30,BLS12_381_P,0x89f3fffcfffcfffd); return; }
7,984
my_strxfrm_desc_and_reverse
eloqsql/strings/ctype-simple.c
void my_strxfrm_desc_and_reverse(uchar *str, uchar *strend, uint flags, uint level) { if (flags & (MY_STRXFRM_DESC_LEVEL1 << level)) { if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level)) { for (strend--; str <= strend;) { uchar tmp= *str; *str++= ~*strend; *strend--= ~tmp; } } else { for (; str < strend; str++) *str= ~*str; } } else if (flags & (MY_STRXFRM_REVERSE_LEVEL1 << level)) { for (strend--; str < strend;) { uchar tmp= *str; *str++= *strend; *strend--= tmp; } } }
O3
c
my_strxfrm_desc_and_reverse: pushq %rbp movq %rsp, %rbp movl %edx, %r8d shrl %cl, %r8d movl $0x10000, %eax # imm = 0x10000 shll %cl, %eax btl $0x8, %r8d jae 0x387fc testl %edx, %eax je 0x3882f decq %rsi cmpq %rdi, %rsi jb 0x3883e incq %rdi movb -0x1(%rdi), %al movb (%rsi), %cl notb %cl movb %cl, -0x1(%rdi) notb %al movb %al, (%rsi) decq %rsi leaq 0x1(%rdi), %rax cmpq %rsi, %rdi movq %rax, %rdi jbe 0x387dd jmp 0x3883e testl %edx, %eax setne %al decq %rsi cmpq %rdi, %rsi seta %cl andb %al, %cl cmpb $0x1, %cl jne 0x3883e incq %rdi movb -0x1(%rdi), %al movb (%rsi), %cl movb %cl, -0x1(%rdi) movb %al, (%rsi) decq %rsi leaq 0x1(%rdi), %rax cmpq %rsi, %rdi movq %rax, %rdi jb 0x38814 jmp 0x3883e cmpq %rsi, %rdi jae 0x3883e notb (%rdi) incq %rdi cmpq %rsi, %rdi jne 0x38834 popq %rbp retq
my_strxfrm_desc_and_reverse: push rbp mov rbp, rsp mov r8d, edx shr r8d, cl mov eax, offset stru_10000 shl eax, cl bt r8d, 8 jnb short loc_387FC test eax, edx jz short loc_3882F dec rsi cmp rsi, rdi jb short loc_3883E inc rdi loc_387DD: mov al, [rdi-1] mov cl, [rsi] not cl mov [rdi-1], cl not al mov [rsi], al dec rsi lea rax, [rdi+1] cmp rdi, rsi mov rdi, rax jbe short loc_387DD jmp short loc_3883E loc_387FC: test eax, edx setnz al dec rsi cmp rsi, rdi setnbe cl and cl, al cmp cl, 1 jnz short loc_3883E inc rdi loc_38814: mov al, [rdi-1] mov cl, [rsi] mov [rdi-1], cl mov [rsi], al dec rsi lea rax, [rdi+1] cmp rdi, rsi mov rdi, rax jb short loc_38814 jmp short loc_3883E loc_3882F: cmp rdi, rsi jnb short loc_3883E loc_38834: not byte ptr [rdi] inc rdi cmp rdi, rsi jnz short loc_38834 loc_3883E: pop rbp retn
char my_strxfrm_desc_and_reverse(_BYTE *a1, _BYTE *a2, unsigned int a3, char a4) { int v4; // eax _BYTE *v5; // rsi _BYTE *v6; // rdi char v7; // al _BYTE *v9; // rsi _BYTE *v10; // rdi char v11; // al v4 = (_DWORD)&stru_10000 << a4; if ( ((a3 >> a4) & 0x100) != 0 ) { if ( (a3 & v4) != 0 ) { v5 = a2 - 1; if ( v5 >= a1 ) { v6 = a1 + 1; do { v7 = *(v6 - 1); *(v6 - 1) = ~*v5; *v5-- = ~v7; LOBYTE(v4) = (_BYTE)v6 + 1; } while ( v6++ <= v5 ); } } else if ( a1 < a2 ) { do { *a1 = ~*a1; ++a1; } while ( a1 != a2 ); } } else { LOBYTE(v4) = (a3 & v4) != 0; v9 = a2 - 1; if ( ((unsigned __int8)v4 & (v9 > a1)) == 1 ) { v10 = a1 + 1; do { v11 = *(v10 - 1); *(v10 - 1) = *v9; *v9-- = v11; LOBYTE(v4) = (_BYTE)v10 + 1; } while ( v10++ < v9 ); } } return v4; }
my_strxfrm_desc_and_reverse: PUSH RBP MOV RBP,RSP MOV R8D,EDX SHR R8D,CL MOV EAX,0x10000 SHL EAX,CL BT R8D,0x8 JNC 0x001387fc TEST EAX,EDX JZ 0x0013882f DEC RSI CMP RSI,RDI JC 0x0013883e INC RDI LAB_001387dd: MOV AL,byte ptr [RDI + -0x1] MOV CL,byte ptr [RSI] NOT CL MOV byte ptr [RDI + -0x1],CL NOT AL MOV byte ptr [RSI],AL DEC RSI LEA RAX,[RDI + 0x1] CMP RDI,RSI MOV RDI,RAX JBE 0x001387dd JMP 0x0013883e LAB_001387fc: TEST EAX,EDX SETNZ AL DEC RSI CMP RSI,RDI SETA CL AND CL,AL CMP CL,0x1 JNZ 0x0013883e INC RDI LAB_00138814: MOV AL,byte ptr [RDI + -0x1] MOV CL,byte ptr [RSI] MOV byte ptr [RDI + -0x1],CL MOV byte ptr [RSI],AL DEC RSI LEA RAX,[RDI + 0x1] CMP RDI,RSI MOV RDI,RAX JC 0x00138814 JMP 0x0013883e LAB_0013882f: CMP RDI,RSI JNC 0x0013883e LAB_00138834: NOT byte ptr [RDI] INC RDI CMP RDI,RSI JNZ 0x00138834 LAB_0013883e: POP RBP RET
void my_strxfrm_desc_and_reverse(byte *param_1,byte *param_2,uint param_3,byte param_4) { byte bVar1; uint uVar2; byte *pbVar3; bool bVar4; uVar2 = 0x10000 << (param_4 & 0x1f); if (((param_3 >> (param_4 & 0x1f)) >> 8 & 1) == 0) { param_2 = param_2 + -1; if (param_1 < param_2 && (uVar2 & param_3) != 0) { pbVar3 = param_1 + 1; do { bVar1 = pbVar3[-1]; pbVar3[-1] = *param_2; *param_2 = bVar1; param_2 = param_2 + -1; bVar4 = pbVar3 < param_2; pbVar3 = pbVar3 + 1; } while (bVar4); } } else if ((uVar2 & param_3) == 0) { if (param_1 < param_2) { do { *param_1 = ~*param_1; param_1 = param_1 + 1; } while (param_1 != param_2); } } else { param_2 = param_2 + -1; if (param_1 <= param_2) { pbVar3 = param_1 + 1; do { bVar1 = pbVar3[-1]; pbVar3[-1] = ~*param_2; *param_2 = ~bVar1; param_2 = param_2 + -1; bVar4 = pbVar3 <= param_2; pbVar3 = pbVar3 + 1; } while (bVar4); } } return; }
7,985
js_map_forEach
bluesky950520[P]quickjs/quickjs.c
static JSValue js_map_forEach(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) { JSMapState *s = JS_GetOpaque2(ctx, this_val, JS_CLASS_MAP + magic); JSValue func, this_arg; JSValue ret, args[3]; struct list_head *el; JSMapRecord *mr; if (!s) return JS_EXCEPTION; func = argv[0]; if (argc > 1) this_arg = argv[1]; else this_arg = JS_UNDEFINED; if (check_function(ctx, func)) return JS_EXCEPTION; /* Note: the list can be modified while traversing it, but the current element is locked */ el = s->records.next; while (el != &s->records) { mr = list_entry(el, JSMapRecord, link); if (!mr->empty) { mr->ref_count++; /* must duplicate in case the record is deleted */ args[1] = js_dup(mr->key); if (magic) args[0] = args[1]; else args[0] = js_dup(mr->value); args[2] = this_val; ret = JS_Call(ctx, func, this_arg, 3, args); JS_FreeValue(ctx, args[0]); if (!magic) JS_FreeValue(ctx, args[1]); el = el->next; map_decref_record(ctx->rt, mr); if (JS_IsException(ret)) return ret; JS_FreeValue(ctx, ret); } else { el = el->next; } } return JS_UNDEFINED; }
O1
c
js_map_forEach: pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0xa8, %rsp movq %r8, %rbx movl %ecx, %r14d movq %rdi, %r13 movq %r9, 0x48(%rsp) leal 0x23(%r9), %ecx movq %rsi, 0x98(%rsp) movq %rdx, 0xa0(%rsp) callq 0x269a1 movl $0x6, %r12d testq %rax, %rax je 0x4f1d4 movq %rax, %rbp movq (%rbx), %r15 movq 0x8(%rbx), %rdx cmpl $0x2, %r14d jl 0x4f1ac movq 0x10(%rbx), %rax movq 0x18(%rbx), %rcx movq %rcx, 0x40(%rsp) movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 andq %rax, %rcx movq %rcx, 0x28(%rsp) movl %eax, %r14d jmp 0x4f1c2 movl $0x3, %eax movq %rax, 0x40(%rsp) xorl %r14d, %r14d movq $0x0, 0x28(%rsp) movq %r13, %rdi movq %r15, %rsi movq %rdx, %rbx callq 0x4099d testl %eax, %eax je 0x4f1f0 xorl %eax, %eax xorl %edx, %edx orq %rdx, %rax movq %r12, %rdx addq $0xa8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %rbx, 0x88(%rsp) movq %r15, 0x90(%rsp) movq %rbp, %rax addq $0x8, %rbp movq 0x10(%rax), %r15 cmpq %rbp, %r15 je 0x4f36e orq %r14, 0x28(%rsp) cmpl $0x0, -0xc(%r15) je 0x4f229 movq 0x8(%r15), %rbx jmp 0x4f353 incl -0x10(%r15) movq 0x20(%r15), %rax movq 0x28(%r15), %rcx movq %rax, 0x30(%rsp) cmpl $-0x9, %ecx jb 0x4f246 movq 0x30(%rsp), %rdx incl (%rdx) movq %rax, 0x60(%rsp) movq %rcx, 0x68(%rsp) cmpl $0x0, 0x48(%rsp) je 0x4f266 leaq 0x60(%rsp), %rax movaps (%rax), %xmm0 movaps %xmm0, 0x50(%rsp) jmp 0x4f289 movq 0x30(%r15), %rax movq 0x38(%r15), %rcx movq %rax, 0x30(%rsp) cmpl $-0x9, %ecx jb 0x4f27f movq 0x30(%rsp), %rdx incl (%rdx) movq %rax, 0x50(%rsp) movq %rcx, 0x58(%rsp) movq 0x98(%rsp), %rax movq %rax, 0x70(%rsp) movq 0xa0(%rsp), %rax movq %rax, 0x78(%rsp) movl $0x0, 0x30(%rsp) movq $0x3, 0x38(%rsp) movups 0x30(%rsp), %xmm0 movups %xmm0, (%rsp) leaq 0x50(%rsp), %rax movq %rax, 0x10(%rsp) movl $0x2, 0x18(%rsp) movq %r13, %rdi movq 0x90(%rsp), %rsi movq 0x88(%rsp), %rdx movq 0x28(%rsp), %rcx movq 0x40(%rsp), %r8 movl $0x3, %r9d callq 0x278b6 movq %rax, %r14 movq %rdx, %r12 movq 0x50(%rsp), %rsi movq 0x58(%rsp), %rdx movq 0x18(%r13), %rdi callq 0x1ccb2 cmpl $0x0, 0x48(%rsp) jne 0x4f32a movq 0x60(%rsp), %rsi movq 0x68(%rsp), %rdx movq 0x18(%r13), %rdi callq 0x1ccb2 movq 0x8(%r15), %rbx addq $-0x10, %r15 movq 0x18(%r13), %rdi movq %r15, %rsi callq 0x3a863 cmpl $0x6, %r12d je 0x4f37d movq 0x18(%r13), %rdi movq %r14, %rsi movq %r12, %rdx callq 0x1ccb2 movq %rbx, %r15 cmpq %rbp, %rbx jne 0x4f219 xorl %edx, %edx movl $0x3, %r12d xorl %eax, %eax jmp 0x4f1d8 xorl %eax, %eax xorl %edx, %edx movl $0x3, %r12d jmp 0x4f1d8 movabsq $-0x100000000, %rcx # imm = 0xFFFFFFFF00000000 movq %r14, %rdx andq %rcx, %rdx movl %r14d, %eax jmp 0x4f1d8
js_map_forEach: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 0A8h mov rbx, r8 mov r14d, ecx mov r13, rdi mov [rsp+0D8h+var_90], r9 lea ecx, [r9+23h] mov [rsp+0D8h+var_40], rsi mov [rsp+0D8h+var_38], rdx call JS_GetOpaque2 mov r12d, 6 test rax, rax jz short loc_4F1D4 mov rbp, rax mov r15, [rbx] mov rdx, [rbx+8] cmp r14d, 2 jl short loc_4F1AC mov rax, [rbx+10h] mov rcx, [rbx+18h] mov [rsp+0D8h+var_98], rcx mov rcx, 0FFFFFFFF00000000h and rcx, rax mov [rsp+0D8h+var_B0], rcx mov r14d, eax jmp short loc_4F1C2 loc_4F1AC: mov eax, 3 mov [rsp+0D8h+var_98], rax xor r14d, r14d mov [rsp+0D8h+var_B0], 0 loc_4F1C2: mov rdi, r13 mov rsi, r15 mov rbx, rdx call check_function test eax, eax jz short loc_4F1F0 loc_4F1D4: xor eax, eax xor edx, edx loc_4F1D8: or rax, rdx mov rdx, r12 add rsp, 0A8h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_4F1F0: mov [rsp+0D8h+var_50], rbx mov [rsp+0D8h+var_48], r15 mov rax, rbp add rbp, 8 mov r15, [rax+10h] cmp r15, rbp jz loc_4F36E or [rsp+0D8h+var_B0], r14 loc_4F219: cmp dword ptr [r15-0Ch], 0 jz short loc_4F229 mov rbx, [r15+8] jmp loc_4F353 loc_4F229: inc dword ptr [r15-10h] mov rax, [r15+20h] mov rcx, [r15+28h] mov qword ptr [rsp+0D8h+var_A8], rax cmp ecx, 0FFFFFFF7h jb short loc_4F246 mov rdx, qword ptr [rsp+0D8h+var_A8] inc dword ptr [rdx] loc_4F246: mov [rsp+0D8h+var_78], rax mov [rsp+0D8h+var_70], rcx cmp dword ptr [rsp+0D8h+var_90], 0 jz short loc_4F266 lea rax, [rsp+0D8h+var_78] movaps xmm0, xmmword ptr [rax] movaps [rsp+0D8h+var_88], xmm0 jmp short loc_4F289 loc_4F266: mov rax, [r15+30h] mov rcx, [r15+38h] mov qword ptr [rsp+0D8h+var_A8], rax cmp ecx, 0FFFFFFF7h jb short loc_4F27F mov rdx, qword ptr [rsp+0D8h+var_A8] inc dword ptr [rdx] loc_4F27F: mov qword ptr [rsp+0D8h+var_88], rax mov qword ptr [rsp+0D8h+var_88+8], rcx loc_4F289: mov rax, [rsp+0D8h+var_40] mov [rsp+0D8h+var_68], rax mov rax, [rsp+0D8h+var_38] mov [rsp+0D8h+var_60], rax mov dword ptr [rsp+0D8h+var_A8], 0 mov qword ptr [rsp+0D8h+var_A8+8], 3 movups xmm0, [rsp+0D8h+var_A8] movups [rsp+0D8h+var_D8], xmm0 lea rax, [rsp+0D8h+var_88] mov [rsp+0D8h+var_C8], rax mov [rsp+0D8h+var_C0], 2 mov rdi, r13 mov rsi, [rsp+0D8h+var_48] mov rdx, [rsp+0D8h+var_50] mov rcx, [rsp+0D8h+var_B0] mov r8, [rsp+0D8h+var_98] mov r9d, 3 call JS_CallInternal mov r14, rax mov r12, rdx mov rsi, qword ptr [rsp+0D8h+var_88] mov rdx, qword ptr [rsp+0D8h+var_88+8] mov rdi, [r13+18h] call JS_FreeValueRT cmp dword ptr [rsp+0D8h+var_90], 0 jnz short loc_4F32A mov rsi, [rsp+0D8h+var_78] mov rdx, [rsp+0D8h+var_70] mov rdi, [r13+18h] call JS_FreeValueRT loc_4F32A: mov rbx, [r15+8] add r15, 0FFFFFFFFFFFFFFF0h mov rdi, [r13+18h] mov rsi, r15 call map_decref_record cmp r12d, 6 jz short loc_4F37D mov rdi, [r13+18h] mov rsi, r14 mov rdx, r12 call JS_FreeValueRT loc_4F353: mov r15, rbx cmp rbx, rbp jnz loc_4F219 xor edx, edx mov r12d, 3 xor eax, eax jmp loc_4F1D8 loc_4F36E: xor eax, eax xor edx, edx mov r12d, 3 jmp loc_4F1D8 loc_4F37D: mov rcx, 0FFFFFFFF00000000h mov rdx, r14 and rdx, rcx mov eax, r14d jmp loc_4F1D8
unsigned long long js_map_forEach( long long a1, long long a2, long long a3, int a4, long long *a5, int a6, __m128 a7, __m128 a8, __m128 a9, __m128 a10, double a11, double a12, __m128 a13, __m128 a14) { long long Opaque2; // rax double v17; // xmm4_8 double v18; // xmm5_8 long long v19; // rbp long long v20; // r15 long long v21; // rdx long long v22; // rax long long v23; // r14 long long v24; // rbx __m128 v25; // xmm4 __m128 v26; // xmm5 long long v27; // rax unsigned long long v28; // rdx long long v30; // rax _QWORD *v31; // rbp _QWORD *v32; // r15 _QWORD *v33; // rbx _DWORD *v34; // rax long long v35; // rcx _DWORD *v36; // rax long long v37; // rcx unsigned long long v38; // r14 long long v39; // rdx long long v40; // r12 unsigned long long v41; // [rsp+28h] [rbp-B0h] long long v42; // [rsp+28h] [rbp-B0h] __m128 v43; // [rsp+30h] [rbp-A8h] long long v44; // [rsp+40h] [rbp-98h] __int128 v46; // [rsp+50h] [rbp-88h] BYREF __int128 v47; // [rsp+60h] [rbp-78h] long long v48; // [rsp+70h] [rbp-68h] long long v49; // [rsp+78h] [rbp-60h] long long v50; // [rsp+88h] [rbp-50h] long long v51; // [rsp+90h] [rbp-48h] long long v52; // [rsp+98h] [rbp-40h] long long v53; // [rsp+A0h] [rbp-38h] v52 = a2; v53 = a3; Opaque2 = JS_GetOpaque2(a1, a2, a3, a6 + 35); if ( !Opaque2 ) goto LABEL_6; v19 = Opaque2; v20 = *a5; v21 = a5[1]; if ( a4 < 2 ) { v44 = 3LL; v23 = 0LL; v41 = 0LL; } else { v22 = a5[2]; v44 = a5[3]; v41 = v22 & 0xFFFFFFFF00000000LL; v23 = (unsigned int)v22; } v24 = a5[1]; if ( !(unsigned int)check_function(a1, v20, v21, a7, a8, a9, a10, v17, v18, a13, a14) ) { v50 = v24; v51 = v20; v30 = v19; v31 = (_QWORD *)(v19 + 8); v32 = *(_QWORD **)(v30 + 16); if ( v32 != v31 ) { v42 = v23 | v41; while ( 1 ) { if ( *((_DWORD *)v32 - 3) ) { v33 = (_QWORD *)v32[1]; } else { ++*((_DWORD *)v32 - 4); v34 = (_DWORD *)v32[4]; v35 = v32[5]; v43.m128_i32[1] = HIDWORD(v34); if ( (unsigned int)v35 >= 0xFFFFFFF7 ) ++*v34; *(_QWORD *)&v47 = v34; *((_QWORD *)&v47 + 1) = v35; if ( a6 ) { v46 = v47; } else { v36 = (_DWORD *)v32[6]; v37 = v32[7]; v43.m128_i32[1] = HIDWORD(v36); if ( (unsigned int)v37 >= 0xFFFFFFF7 ) ++*v36; *(_QWORD *)&v46 = v36; *((_QWORD *)&v46 + 1) = v37; } v48 = v52; v49 = v53; v43.m128_i32[0] = 0; v43.m128_u64[1] = 3LL; v38 = JS_CallInternal( a1, v51, v50, v42, v44, 3LL, v43, a8, a9, a10, v25, v26, a13, a14, v43.m128_i8[0], 3, (long long)&v46, 2u); v40 = v39; JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v46, *((long long *)&v46 + 1)); if ( !a6 ) JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v47, *((long long *)&v47 + 1)); v33 = (_QWORD *)v32[1]; map_decref_record(*(_QWORD *)(a1 + 24), (long long)(v32 - 2)); if ( (_DWORD)v40 == 6 ) { v28 = v38 & 0xFFFFFFFF00000000LL; v27 = (unsigned int)v38; return v28 | v27; } JS_FreeValueRT(*(_QWORD *)(a1 + 24), (_DWORD *)v38, v40); } v32 = v33; if ( v33 == v31 ) { v28 = 0LL; v27 = 0LL; return v28 | v27; } } } v27 = 0LL; v28 = 0LL; } else { LABEL_6: v27 = 0LL; v28 = 0LL; } return v28 | v27; }
js_map_forEach: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0xa8 MOV RBX,R8 MOV R14D,ECX MOV R13,RDI MOV qword ptr [RSP + 0x48],R9 LEA ECX,[R9 + 0x23] MOV qword ptr [RSP + 0x98],RSI MOV qword ptr [RSP + 0xa0],RDX CALL 0x001269a1 MOV R12D,0x6 TEST RAX,RAX JZ 0x0014f1d4 MOV RBP,RAX MOV R15,qword ptr [RBX] MOV RDX,qword ptr [RBX + 0x8] CMP R14D,0x2 JL 0x0014f1ac MOV RAX,qword ptr [RBX + 0x10] MOV RCX,qword ptr [RBX + 0x18] MOV qword ptr [RSP + 0x40],RCX MOV RCX,-0x100000000 AND RCX,RAX MOV qword ptr [RSP + 0x28],RCX MOV R14D,EAX JMP 0x0014f1c2 LAB_0014f1ac: MOV EAX,0x3 MOV qword ptr [RSP + 0x40],RAX XOR R14D,R14D MOV qword ptr [RSP + 0x28],0x0 LAB_0014f1c2: MOV RDI,R13 MOV RSI,R15 MOV RBX,RDX CALL 0x0014099d TEST EAX,EAX JZ 0x0014f1f0 LAB_0014f1d4: XOR EAX,EAX XOR EDX,EDX LAB_0014f1d8: OR RAX,RDX MOV RDX,R12 ADD RSP,0xa8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0014f1f0: MOV qword ptr [RSP + 0x88],RBX MOV qword ptr [RSP + 0x90],R15 MOV RAX,RBP ADD RBP,0x8 MOV R15,qword ptr [RAX + 0x10] CMP R15,RBP JZ 0x0014f36e OR qword ptr [RSP + 0x28],R14 LAB_0014f219: CMP dword ptr [R15 + -0xc],0x0 JZ 0x0014f229 MOV RBX,qword ptr [R15 + 0x8] JMP 0x0014f353 LAB_0014f229: INC dword ptr [R15 + -0x10] MOV RAX,qword ptr [R15 + 0x20] MOV RCX,qword ptr [R15 + 0x28] MOV qword ptr [RSP + 0x30],RAX CMP ECX,-0x9 JC 0x0014f246 MOV RDX,qword ptr [RSP + 0x30] INC dword ptr [RDX] LAB_0014f246: MOV qword ptr [RSP + 0x60],RAX MOV qword ptr [RSP + 0x68],RCX CMP dword ptr [RSP + 0x48],0x0 JZ 0x0014f266 LEA RAX,[RSP + 0x60] MOVAPS XMM0,xmmword ptr [RAX] MOVAPS xmmword ptr [RSP + 0x50],XMM0 JMP 0x0014f289 LAB_0014f266: MOV RAX,qword ptr [R15 + 0x30] MOV RCX,qword ptr [R15 + 0x38] MOV qword ptr [RSP + 0x30],RAX CMP ECX,-0x9 JC 0x0014f27f MOV RDX,qword ptr [RSP + 0x30] INC dword ptr [RDX] LAB_0014f27f: MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x58],RCX LAB_0014f289: MOV RAX,qword ptr [RSP + 0x98] MOV qword ptr [RSP + 0x70],RAX MOV RAX,qword ptr [RSP + 0xa0] MOV qword ptr [RSP + 0x78],RAX MOV dword ptr [RSP + 0x30],0x0 MOV qword ptr [RSP + 0x38],0x3 MOVUPS XMM0,xmmword ptr [RSP + 0x30] MOVUPS xmmword ptr [RSP],XMM0 LEA RAX,[RSP + 0x50] MOV qword ptr [RSP + 0x10],RAX MOV dword ptr [RSP + 0x18],0x2 MOV RDI,R13 MOV RSI,qword ptr [RSP + 0x90] MOV RDX,qword ptr [RSP + 0x88] MOV RCX,qword ptr [RSP + 0x28] MOV R8,qword ptr [RSP + 0x40] MOV R9D,0x3 CALL 0x001278b6 MOV R14,RAX MOV R12,RDX MOV RSI,qword ptr [RSP + 0x50] MOV RDX,qword ptr [RSP + 0x58] MOV RDI,qword ptr [R13 + 0x18] CALL 0x0011ccb2 CMP dword ptr [RSP + 0x48],0x0 JNZ 0x0014f32a MOV RSI,qword ptr [RSP + 0x60] MOV RDX,qword ptr [RSP + 0x68] MOV RDI,qword ptr [R13 + 0x18] CALL 0x0011ccb2 LAB_0014f32a: MOV RBX,qword ptr [R15 + 0x8] ADD R15,-0x10 MOV RDI,qword ptr [R13 + 0x18] MOV RSI,R15 CALL 0x0013a863 CMP R12D,0x6 JZ 0x0014f37d MOV RDI,qword ptr [R13 + 0x18] MOV RSI,R14 MOV RDX,R12 CALL 0x0011ccb2 LAB_0014f353: MOV R15,RBX CMP RBX,RBP JNZ 0x0014f219 XOR EDX,EDX MOV R12D,0x3 XOR EAX,EAX JMP 0x0014f1d8 LAB_0014f36e: XOR EAX,EAX XOR EDX,EDX MOV R12D,0x3 JMP 0x0014f1d8 LAB_0014f37d: MOV RCX,-0x100000000 MOV RDX,R14 AND RDX,RCX MOV EAX,R14D JMP 0x0014f1d8
int1 [16] js_map_forEach(long param_1,int8 param_2,int8 param_3,int param_4,int8 *param_5, int param_6) { int8 uVar1; int8 uVar2; int iVar3; long lVar4; ulong uVar5; ulong uVar6; long lVar7; int8 uVar8; long lVar9; int1 auVar10 [16]; ulong local_b0; int8 local_98; int *local_88; int8 uStack_80; int *local_78; int8 uStack_70; int8 local_68; int8 local_60; int8 local_50; int8 local_48; int8 local_40; int8 local_38; local_40 = param_2; local_38 = param_3; lVar4 = JS_GetOpaque2(); uVar8 = 6; if (lVar4 != 0) { uVar1 = *param_5; uVar2 = param_5[1]; if (param_4 < 2) { local_98 = 3; uVar6 = 0; local_b0 = 0; } else { local_98 = param_5[3]; local_b0 = param_5[2] & 0xffffffff00000000; uVar6 = param_5[2] & 0xffffffff; } iVar3 = check_function(param_1,uVar1); if (iVar3 == 0) { if (*(long *)(lVar4 + 0x10) == lVar4 + 8) { uVar5 = 0; uVar6 = 0; uVar8 = 3; } else { lVar9 = *(long *)(lVar4 + 0x10); local_50 = uVar2; local_48 = uVar1; do { if (*(int *)(lVar9 + -0xc) == 0) { *(int *)(lVar9 + -0x10) = *(int *)(lVar9 + -0x10) + 1; local_78 = *(int **)(lVar9 + 0x20); uStack_70 = *(int8 *)(lVar9 + 0x28); if (0xfffffff6 < (uint)uStack_70) { *local_78 = *local_78 + 1; } local_88 = local_78; uStack_80 = uStack_70; if (param_6 == 0) { local_88 = *(int **)(lVar9 + 0x30); uStack_80 = *(int8 *)(lVar9 + 0x38); if (0xfffffff6 < (uint)uStack_80) { *local_88 = *local_88 + 1; } } local_68 = local_40; local_60 = local_38; auVar10 = JS_CallInternal(param_1,local_48,local_50,local_b0 | uVar6,local_98,3,0,3, &local_88,2); uVar8 = auVar10._8_8_; uVar5 = auVar10._0_8_; JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_88,uStack_80); if (param_6 == 0) { JS_FreeValueRT(*(int8 *)(param_1 + 0x18),local_78,uStack_70); } lVar7 = *(long *)(lVar9 + 8); map_decref_record(*(int8 *)(param_1 + 0x18),lVar9 + -0x10); if (auVar10._8_4_ == 6) { uVar6 = uVar5 & 0xffffffff00000000; uVar5 = uVar5 & 0xffffffff; goto LAB_0014f1d8; } JS_FreeValueRT(*(int8 *)(param_1 + 0x18),uVar5,uVar8); } else { lVar7 = *(long *)(lVar9 + 8); } lVar9 = lVar7; } while (lVar7 != lVar4 + 8); uVar6 = 0; uVar8 = 3; uVar5 = 0; } goto LAB_0014f1d8; } } uVar5 = 0; uVar6 = 0; LAB_0014f1d8: auVar10._0_8_ = uVar5 | uVar6; auVar10._8_8_ = uVar8; return auVar10; }
7,986
diagnostic_context_print
tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c
void diagnostic_context_print(DiagnosticContext* context) { assert(context != NULL); const char* reset_color = "\033[0m"; // Print verbosity level in debug mode if (context->verbosity == VERBOSITY_DEBUG) { printf("Diagnostic verbosity: DEBUG\n"); } // Print each diagnostic for (size_t i = 0; i < context->diagnostics.count; i++) { const Diagnostic* diagnostic = &context->diagnostics.items[i]; // Skip info messages in normal mode if (diagnostic->severity == DIAGNOSTIC_INFO && context->verbosity == VERBOSITY_NORMAL) { continue; } // Get severity name and color const char* severity_name = get_severity_name(diagnostic->severity); const char* severity_color = get_severity_color(diagnostic->severity); // Print location if (diagnostic->location.file) { printf("%s:%d:%d: ", diagnostic->location.file, diagnostic->location.line, diagnostic->location.column); } // Print severity printf("%s%s%s", severity_color, severity_name, reset_color); // Print error code if (diagnostic->code) { printf("[%s]: ", diagnostic->code); } else { printf(": "); } // Print message printf("%s\n", diagnostic->message); // In debug mode, print additional information about the diagnostic if (context->verbosity == VERBOSITY_DEBUG) { printf(" - Severity: %d\n", diagnostic->severity); printf(" - Location: file=%s, line=%d, column=%d, length=%d\n", diagnostic->location.file ? diagnostic->location.file : "(null)", diagnostic->location.line, diagnostic->location.column, diagnostic->location.length); } } // Print summary in verbose or debug mode if (context->verbosity >= VERBOSITY_VERBOSE) { printf("\nDiagnostic summary:\n"); printf(" - Total messages: %zu\n", context->diagnostics.count); printf(" - Error messages: %zu\n", context->error_count); } }
O0
c
diagnostic_context_print: pushq %rbp movq %rsp, %rbp subq $0x40, %rsp movq %rdi, -0x8(%rbp) cmpq $0x0, -0x8(%rbp) je 0x2e25 jmp 0x2e44 leaq 0x12cd(%rip), %rdi # 0x40f9 leaq 0x1db9(%rip), %rsi # 0x4bec movl $0xa1, %edx leaq 0x1fb8(%rip), %rcx # 0x4df7 callq 0x1070 leaq 0x1fdf(%rip), %rax # 0x4e2a movq %rax, -0x10(%rbp) movq -0x8(%rbp), %rax cmpl $0x2, 0x28(%rax) jne 0x2e67 leaq 0x1fcf(%rip), %rdi # 0x4e2f movb $0x0, %al callq 0x1060 movq $0x0, -0x18(%rbp) movq -0x18(%rbp), %rax movq -0x8(%rbp), %rcx cmpq 0x10(%rcx), %rax jae 0x2fda movq -0x8(%rbp), %rax movq 0x8(%rax), %rax imulq $0x30, -0x18(%rbp), %rcx addq %rcx, %rax movq %rax, -0x20(%rbp) movq -0x20(%rbp), %rax cmpl $0x0, (%rax) jne 0x2ead movq -0x8(%rbp), %rax cmpl $0x0, 0x28(%rax) jne 0x2ead jmp 0x2fc9 movq -0x20(%rbp), %rax movl (%rax), %edi callq 0x3030 movq %rax, -0x28(%rbp) movq -0x20(%rbp), %rax movl (%rax), %edi callq 0x30a0 movq %rax, -0x30(%rbp) movq -0x20(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x2efa movq -0x20(%rbp), %rax movq 0x8(%rax), %rsi movq -0x20(%rbp), %rax movl 0x10(%rax), %edx movq -0x20(%rbp), %rax movl 0x14(%rax), %ecx leaq 0x1f59(%rip), %rdi # 0x4e4c movb $0x0, %al callq 0x1060 movq -0x30(%rbp), %rsi movq -0x28(%rbp), %rdx movq -0x10(%rbp), %rcx leaq 0x1f4a(%rip), %rdi # 0x4e57 movb $0x0, %al callq 0x1060 movq -0x20(%rbp), %rax cmpq $0x0, 0x28(%rax) je 0x2f37 movq -0x20(%rbp), %rax movq 0x28(%rax), %rsi leaq 0x1f30(%rip), %rdi # 0x4e5e movb $0x0, %al callq 0x1060 jmp 0x2f45 leaq 0x1f24(%rip), %rdi # 0x4e62 movb $0x0, %al callq 0x1060 movq -0x20(%rbp), %rax movq 0x20(%rax), %rsi leaq 0x1f11(%rip), %rdi # 0x4e65 movb $0x0, %al callq 0x1060 movq -0x8(%rbp), %rax cmpl $0x2, 0x28(%rax) jne 0x2fc7 movq -0x20(%rbp), %rax movl (%rax), %esi leaq 0x1ef7(%rip), %rdi # 0x4e69 movb $0x0, %al callq 0x1060 movq -0x20(%rbp), %rax cmpq $0x0, 0x8(%rax) je 0x2f92 movq -0x20(%rbp), %rax movq 0x8(%rax), %rax movq %rax, -0x38(%rbp) jmp 0x2f9f leaq 0x1f18(%rip), %rax # 0x4eb1 movq %rax, -0x38(%rbp) jmp 0x2f9f movq -0x38(%rbp), %rsi movq -0x20(%rbp), %rax movl 0x10(%rax), %edx movq -0x20(%rbp), %rax movl 0x14(%rax), %ecx movq -0x20(%rbp), %rax movl 0x18(%rax), %r8d leaq 0x1ebb(%rip), %rdi # 0x4e7b movb $0x0, %al callq 0x1060 jmp 0x2fc9 movq -0x18(%rbp), %rax addq $0x1, %rax movq %rax, -0x18(%rbp) jmp 0x2e6f movq -0x8(%rbp), %rax cmpl $0x1, 0x28(%rax) jb 0x301e leaq 0x1ecd(%rip), %rdi # 0x4eb8 movb $0x0, %al callq 0x1060 movq -0x8(%rbp), %rax movq 0x10(%rax), %rsi leaq 0x1ecd(%rip), %rdi # 0x4ece movb $0x0, %al callq 0x1060 movq -0x8(%rbp), %rax movq 0x20(%rax), %rsi leaq 0x1ed0(%rip), %rdi # 0x4ee7 movb $0x0, %al callq 0x1060 addq $0x40, %rsp popq %rbp retq nopw %cs:(%rax,%rax)
diagnostic_context_print: push rbp mov rbp, rsp sub rsp, 40h mov [rbp+var_8], rdi cmp [rbp+var_8], 0 jz short loc_2E25 jmp short loc_2E44 loc_2E25: lea rdi, aContextNull; "context != NULL" lea rsi, aWorkspaceLlm4b_1; "/workspace/llm4binary/github/2025_star3"... mov edx, 0A1h lea rcx, aVoidDiagnostic_0; "void diagnostic_context_print(Diagnosti"... call ___assert_fail loc_2E44: lea rax, a0m; "\x1B[0m" mov [rbp+var_10], rax mov rax, [rbp+var_8] cmp dword ptr [rax+28h], 2 jnz short loc_2E67 lea rdi, aDiagnosticVerb; "Diagnostic verbosity: DEBUG\n" mov al, 0 call _printf loc_2E67: mov [rbp+var_18], 0 loc_2E6F: mov rax, [rbp+var_18] mov rcx, [rbp+var_8] cmp rax, [rcx+10h] jnb loc_2FDA mov rax, [rbp+var_8] mov rax, [rax+8] imul rcx, [rbp+var_18], 30h ; '0' add rax, rcx mov [rbp+var_20], rax mov rax, [rbp+var_20] cmp dword ptr [rax], 0 jnz short loc_2EAD mov rax, [rbp+var_8] cmp dword ptr [rax+28h], 0 jnz short loc_2EAD jmp loc_2FC9 loc_2EAD: mov rax, [rbp+var_20] mov edi, [rax] call get_severity_name mov [rbp+var_28], rax mov rax, [rbp+var_20] mov edi, [rax] call get_severity_color mov [rbp+var_30], rax mov rax, [rbp+var_20] cmp qword ptr [rax+8], 0 jz short loc_2EFA mov rax, [rbp+var_20] mov rsi, [rax+8] mov rax, [rbp+var_20] mov edx, [rax+10h] mov rax, [rbp+var_20] mov ecx, [rax+14h] lea rdi, aSDD; "%s:%d:%d: " mov al, 0 call _printf loc_2EFA: mov rsi, [rbp+var_30] mov rdx, [rbp+var_28] mov rcx, [rbp+var_10] lea rdi, aSSS; "%s%s%s" mov al, 0 call _printf mov rax, [rbp+var_20] cmp qword ptr [rax+28h], 0 jz short loc_2F37 mov rax, [rbp+var_20] mov rsi, [rax+28h] lea rdi, aS; "[%s]: " mov al, 0 call _printf jmp short loc_2F45 loc_2F37: lea rdi, aS+4; ": " mov al, 0 call _printf loc_2F45: mov rax, [rbp+var_20] mov rsi, [rax+20h] lea rdi, aS_0; "%s\n" mov al, 0 call _printf mov rax, [rbp+var_8] cmp dword ptr [rax+28h], 2 jnz short loc_2FC7 mov rax, [rbp+var_20] mov esi, [rax] lea rdi, aSeverityD; " - Severity: %d\n" mov al, 0 call _printf mov rax, [rbp+var_20] cmp qword ptr [rax+8], 0 jz short loc_2F92 mov rax, [rbp+var_20] mov rax, [rax+8] mov [rbp+var_38], rax jmp short loc_2F9F loc_2F92: lea rax, aNull; "(null)" mov [rbp+var_38], rax jmp short $+2 loc_2F9F: mov rsi, [rbp+var_38] mov rax, [rbp+var_20] mov edx, [rax+10h] mov rax, [rbp+var_20] mov ecx, [rax+14h] mov rax, [rbp+var_20] mov r8d, [rax+18h] lea rdi, aLocationFileSL; " - Location: file=%s, line=%d, column="... mov al, 0 call _printf loc_2FC7: jmp short $+2 loc_2FC9: mov rax, [rbp+var_18] add rax, 1 mov [rbp+var_18], rax jmp loc_2E6F loc_2FDA: mov rax, [rbp+var_8] cmp dword ptr [rax+28h], 1 jb short loc_301E lea rdi, aDiagnosticSumm; "\nDiagnostic summary:\n" mov al, 0 call _printf mov rax, [rbp+var_8] mov rsi, [rax+10h] lea rdi, aTotalMessagesZ; " - Total messages: %zu\n" mov al, 0 call _printf mov rax, [rbp+var_8] mov rsi, [rax+20h] lea rdi, aErrorMessagesZ; " - Error messages: %zu\n" mov al, 0 call _printf loc_301E: add rsp, 40h pop rbp retn
long long diagnostic_context_print(long long a1) { long long result; // rax const char *severity_color; // [rsp+10h] [rbp-30h] const char *severity_name; // [rsp+18h] [rbp-28h] const char **v4; // [rsp+20h] [rbp-20h] unsigned long long i; // [rsp+28h] [rbp-18h] if ( !a1 ) __assert_fail( "context != NULL", "/workspace/llm4binary/github/2025_star3/tsotchke[P]eshkol/src/core/diagnostics/diagnostics.c", 161LL, "void diagnostic_context_print(DiagnosticContext *)"); if ( *(_DWORD *)(a1 + 40) == 2 ) printf("Diagnostic verbosity: DEBUG\n"); for ( i = 0LL; i < *(_QWORD *)(a1 + 16); ++i ) { v4 = (const char **)(48 * i + *(_QWORD *)(a1 + 8)); if ( *(_DWORD *)v4 || *(_DWORD *)(a1 + 40) ) { severity_name = (const char *)get_severity_name(*(unsigned int *)v4); severity_color = (const char *)get_severity_color(*(unsigned int *)v4); if ( v4[1] ) printf("%s:%d:%d: ", v4[1], *((_DWORD *)v4 + 4), *((_DWORD *)v4 + 5)); printf("%s%s%s", severity_color, severity_name, "\x1B[0m"); if ( v4[5] ) printf("[%s]: ", v4[5]); else printf(": "); printf("%s\n", v4[4]); if ( *(_DWORD *)(a1 + 40) == 2 ) { printf(" - Severity: %d\n", *(_DWORD *)v4); if ( v4[1] ) printf( " - Location: file=%s, line=%d, column=%d, length=%d\n", v4[1], *((_DWORD *)v4 + 4), *((_DWORD *)v4 + 5), *((_DWORD *)v4 + 6)); else printf( " - Location: file=%s, line=%d, column=%d, length=%d\n", "(null)", *((_DWORD *)v4 + 4), *((_DWORD *)v4 + 5), *((_DWORD *)v4 + 6)); } } } result = a1; if ( *(_DWORD *)(a1 + 40) ) { printf("\nDiagnostic summary:\n"); printf(" - Total messages: %zu\n", *(_QWORD *)(a1 + 16)); return printf(" - Error messages: %zu\n", *(_QWORD *)(a1 + 32)); } return result; }
diagnostic_context_print: PUSH RBP MOV RBP,RSP SUB RSP,0x40 MOV qword ptr [RBP + -0x8],RDI CMP qword ptr [RBP + -0x8],0x0 JZ 0x00102e25 JMP 0x00102e44 LAB_00102e25: LEA RDI,[0x1040e7] LEA RSI,[0x104bc8] MOV EDX,0xa1 LEA RCX,[0x104dc1] CALL 0x00101070 LAB_00102e44: LEA RAX,[0x104df4] MOV qword ptr [RBP + -0x10],RAX MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x28],0x2 JNZ 0x00102e67 LEA RDI,[0x104df9] MOV AL,0x0 CALL 0x00101060 LAB_00102e67: MOV qword ptr [RBP + -0x18],0x0 LAB_00102e6f: MOV RAX,qword ptr [RBP + -0x18] MOV RCX,qword ptr [RBP + -0x8] CMP RAX,qword ptr [RCX + 0x10] JNC 0x00102fda MOV RAX,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RAX + 0x8] IMUL RCX,qword ptr [RBP + -0x18],0x30 ADD RAX,RCX MOV qword ptr [RBP + -0x20],RAX MOV RAX,qword ptr [RBP + -0x20] CMP dword ptr [RAX],0x0 JNZ 0x00102ead MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x28],0x0 JNZ 0x00102ead JMP 0x00102fc9 LAB_00102ead: MOV RAX,qword ptr [RBP + -0x20] MOV EDI,dword ptr [RAX] CALL 0x00103030 MOV qword ptr [RBP + -0x28],RAX MOV RAX,qword ptr [RBP + -0x20] MOV EDI,dword ptr [RAX] CALL 0x001030a0 MOV qword ptr [RBP + -0x30],RAX MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00102efa MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x8] MOV RAX,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x14] LEA RDI,[0x104e16] MOV AL,0x0 CALL 0x00101060 LAB_00102efa: MOV RSI,qword ptr [RBP + -0x30] MOV RDX,qword ptr [RBP + -0x28] MOV RCX,qword ptr [RBP + -0x10] LEA RDI,[0x104e21] MOV AL,0x0 CALL 0x00101060 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x28],0x0 JZ 0x00102f37 MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x28] LEA RDI,[0x104e28] MOV AL,0x0 CALL 0x00101060 JMP 0x00102f45 LAB_00102f37: LEA RDI,[0x104e2c] MOV AL,0x0 CALL 0x00101060 LAB_00102f45: MOV RAX,qword ptr [RBP + -0x20] MOV RSI,qword ptr [RAX + 0x20] LEA RDI,[0x104e2f] MOV AL,0x0 CALL 0x00101060 MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x28],0x2 JNZ 0x00102fc7 MOV RAX,qword ptr [RBP + -0x20] MOV ESI,dword ptr [RAX] LEA RDI,[0x104e33] MOV AL,0x0 CALL 0x00101060 MOV RAX,qword ptr [RBP + -0x20] CMP qword ptr [RAX + 0x8],0x0 JZ 0x00102f92 MOV RAX,qword ptr [RBP + -0x20] MOV RAX,qword ptr [RAX + 0x8] MOV qword ptr [RBP + -0x38],RAX JMP 0x00102f9f LAB_00102f92: LEA RAX,[0x104e7b] MOV qword ptr [RBP + -0x38],RAX JMP 0x00102f9f LAB_00102f9f: MOV RSI,qword ptr [RBP + -0x38] MOV RAX,qword ptr [RBP + -0x20] MOV EDX,dword ptr [RAX + 0x10] MOV RAX,qword ptr [RBP + -0x20] MOV ECX,dword ptr [RAX + 0x14] MOV RAX,qword ptr [RBP + -0x20] MOV R8D,dword ptr [RAX + 0x18] LEA RDI,[0x104e45] MOV AL,0x0 CALL 0x00101060 LAB_00102fc7: JMP 0x00102fc9 LAB_00102fc9: MOV RAX,qword ptr [RBP + -0x18] ADD RAX,0x1 MOV qword ptr [RBP + -0x18],RAX JMP 0x00102e6f LAB_00102fda: MOV RAX,qword ptr [RBP + -0x8] CMP dword ptr [RAX + 0x28],0x1 JC 0x0010301e LEA RDI,[0x104e82] MOV AL,0x0 CALL 0x00101060 MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x10] LEA RDI,[0x104e98] MOV AL,0x0 CALL 0x00101060 MOV RAX,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RAX + 0x20] LEA RDI,[0x104eb1] MOV AL,0x0 CALL 0x00101060 LAB_0010301e: ADD RSP,0x40 POP RBP RET
void diagnostic_context_print(long param_1) { uint *puVar1; int8 uVar2; int8 uVar3; char *local_40; ulong local_20; if (param_1 == 0) { /* WARNING: Subroutine does not return */ __assert_fail("context != NULL", "/workspace/llm4binary/github2025/eshkol/src/core/diagnostics/diagnostics.c",0xa1, "void diagnostic_context_print(DiagnosticContext *)"); } if (*(int *)(param_1 + 0x28) == 2) { printf("Diagnostic verbosity: DEBUG\n"); } for (local_20 = 0; local_20 < *(ulong *)(param_1 + 0x10); local_20 = local_20 + 1) { puVar1 = (uint *)(*(long *)(param_1 + 8) + local_20 * 0x30); if ((*puVar1 != 0) || (*(int *)(param_1 + 0x28) != 0)) { uVar2 = get_severity_name(*puVar1); uVar3 = get_severity_color(*puVar1); if (*(long *)(puVar1 + 2) != 0) { printf("%s:%d:%d: ",*(int8 *)(puVar1 + 2),(ulong)puVar1[4],(ulong)puVar1[5]); } printf("%s%s%s",uVar3,uVar2,&DAT_00104df4); if (*(long *)(puVar1 + 10) == 0) { printf(": "); } else { printf("[%s]: ",*(int8 *)(puVar1 + 10)); } printf("%s\n",*(int8 *)(puVar1 + 8)); if (*(int *)(param_1 + 0x28) == 2) { printf(" - Severity: %d\n",(ulong)*puVar1); if (*(long *)(puVar1 + 2) == 0) { local_40 = "(null)"; } else { local_40 = *(char **)(puVar1 + 2); } printf(" - Location: file=%s, line=%d, column=%d, length=%d\n",local_40,(ulong)puVar1[4], (ulong)puVar1[5],(ulong)puVar1[6]); } } } if (*(int *)(param_1 + 0x28) != 0) { printf("\nDiagnostic summary:\n"); printf(" - Total messages: %zu\n",*(int8 *)(param_1 + 0x10)); printf(" - Error messages: %zu\n",*(int8 *)(param_1 + 0x20)); } return; }
7,987
vemit_tap
eloqsql/libmariadb/unittest/mytap/tap.c
static void vemit_tap(int pass, char const *fmt, va_list ap) { fprintf(tapout, "%sok %d%s", pass ? "" : "not ", ++g_test.last, (fmt && *fmt) ? " - " : ""); if (fmt && *fmt) vfprintf(tapout, fmt, ap); }
O0
c
vemit_tap: pushq %rbp movq %rsp, %rbp subq $0x30, %rsp movl %edi, -0x4(%rbp) movq %rsi, -0x10(%rbp) movq %rdx, -0x18(%rbp) movq 0x49706(%rip), %rax # 0x62fc0 movq (%rax), %rax movq %rax, -0x30(%rbp) movl -0x4(%rbp), %edx leaq 0x36f83(%rip), %rax # 0x5084e leaq 0x360c3(%rip), %rcx # 0x4f995 cmpl $0x0, %edx cmovneq %rcx, %rax movq %rax, -0x28(%rbp) movl 0x4bdf5(%rip), %eax # 0x656d8 addl $0x1, %eax movl %eax, -0x20(%rbp) movl %eax, 0x4bde9(%rip) # 0x656d8 xorl %eax, %eax cmpq $0x0, -0x10(%rbp) movb %al, -0x19(%rbp) je 0x1990b movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax setne %al movb %al, -0x19(%rbp) movl -0x20(%rbp), %ecx movq -0x28(%rbp), %rdx movq -0x30(%rbp), %rdi movb -0x19(%rbp), %sil leaq 0x36074(%rip), %r8 # 0x4f995 leaq 0x36f2b(%rip), %rax # 0x50853 testb $0x1, %sil cmovneq %rax, %r8 leaq 0x36f0d(%rip), %rsi # 0x50844 movb $0x0, %al callq 0x13650 cmpq $0x0, -0x10(%rbp) je 0x19968 movq -0x10(%rbp), %rax movsbl (%rax), %eax cmpl $0x0, %eax je 0x19968 movq 0x49668(%rip), %rax # 0x62fc0 movq (%rax), %rdi movq -0x10(%rbp), %rsi movq -0x18(%rbp), %rdx callq 0x135d0 addq $0x30, %rsp popq %rbp retq nop
vemit_tap: push rbp mov rbp, rsp sub rsp, 30h mov [rbp+var_4], edi mov [rbp+var_10], rsi mov [rbp+var_18], rdx mov rax, cs:stdout_ptr mov rax, [rax] mov [rbp+var_30], rax mov edx, [rbp+var_4] lea rax, aNot; "not " lea rcx, aExecuteTestWit+29h; "" cmp edx, 0 cmovnz rax, rcx mov [rbp+var_28], rax mov eax, cs:dword_656D8 add eax, 1 mov [rbp+var_20], eax mov cs:dword_656D8, eax xor eax, eax cmp [rbp+var_10], 0 mov [rbp+var_19], al jz short loc_1990B mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 0 setnz al mov [rbp+var_19], al loc_1990B: mov ecx, [rbp+var_20] mov rdx, [rbp+var_28] mov rdi, [rbp+var_30] mov sil, [rbp+var_19] lea r8, aExecuteTestWit+29h; "" lea rax, asc_50853; " - " test sil, 1 cmovnz r8, rax lea rsi, aSokDS; "%sok %d%s" mov al, 0 call _fprintf cmp [rbp+var_10], 0 jz short loc_19968 mov rax, [rbp+var_10] movsx eax, byte ptr [rax] cmp eax, 0 jz short loc_19968 mov rax, cs:stdout_ptr mov rdi, [rax] mov rsi, [rbp+var_10] mov rdx, [rbp+var_18] call _vfprintf loc_19968: add rsp, 30h pop rbp retn
long long vemit_tap(int a1, _BYTE *a2, long long a3) { const char *v3; // rax const char *v4; // r8 long long result; // rax int v6; // [rsp+10h] [rbp-20h] bool v7; // [rsp+17h] [rbp-19h] v3 = "not "; if ( a1 ) v3 = ""; v6 = ++dword_656D8; v7 = 0; if ( a2 ) v7 = *a2 != 0; v4 = ""; if ( v7 ) v4 = " - "; result = fprintf(stdout, "%sok %d%s", v3, v6, v4); if ( a2 ) { result = (unsigned int)(char)*a2; if ( *a2 ) return vfprintf(stdout, a2, a3); } return result; }
vemit_tap: PUSH RBP MOV RBP,RSP SUB RSP,0x30 MOV dword ptr [RBP + -0x4],EDI MOV qword ptr [RBP + -0x10],RSI MOV qword ptr [RBP + -0x18],RDX MOV RAX,qword ptr [0x00162fc0] MOV RAX,qword ptr [RAX] MOV qword ptr [RBP + -0x30],RAX MOV EDX,dword ptr [RBP + -0x4] LEA RAX,[0x15084e] LEA RCX,[0x14f995] CMP EDX,0x0 CMOVNZ RAX,RCX MOV qword ptr [RBP + -0x28],RAX MOV EAX,dword ptr [0x001656d8] ADD EAX,0x1 MOV dword ptr [RBP + -0x20],EAX MOV dword ptr [0x001656d8],EAX XOR EAX,EAX CMP qword ptr [RBP + -0x10],0x0 MOV byte ptr [RBP + -0x19],AL JZ 0x0011990b MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 SETNZ AL MOV byte ptr [RBP + -0x19],AL LAB_0011990b: MOV ECX,dword ptr [RBP + -0x20] MOV RDX,qword ptr [RBP + -0x28] MOV RDI,qword ptr [RBP + -0x30] MOV SIL,byte ptr [RBP + -0x19] LEA R8,[0x14f995] LEA RAX,[0x150853] TEST SIL,0x1 CMOVNZ R8,RAX LEA RSI,[0x150844] MOV AL,0x0 CALL 0x00113650 CMP qword ptr [RBP + -0x10],0x0 JZ 0x00119968 MOV RAX,qword ptr [RBP + -0x10] MOVSX EAX,byte ptr [RAX] CMP EAX,0x0 JZ 0x00119968 MOV RAX,qword ptr [0x00162fc0] MOV RDI,qword ptr [RAX] MOV RSI,qword ptr [RBP + -0x10] MOV RDX,qword ptr [RBP + -0x18] CALL 0x001135d0 LAB_00119968: ADD RSP,0x30 POP RBP RET
void vemit_tap(int param_1,char *param_2,__gnuc_va_list param_3) { char *pcVar1; char *pcVar2; bool bVar3; pcVar1 = "not "; if (param_1 != 0) { pcVar1 = ""; } DAT_001656d8 = DAT_001656d8 + 1; bVar3 = false; if (param_2 != (char *)0x0) { bVar3 = *param_2 != '\0'; } pcVar2 = ""; if (bVar3) { pcVar2 = " - "; } fprintf(*(FILE **)PTR_stdout_00162fc0,"%sok %d%s",pcVar1,(ulong)DAT_001656d8,pcVar2); if ((param_2 != (char *)0x0) && (*param_2 != '\0')) { vfprintf(*(FILE **)PTR_stdout_00162fc0,param_2,param_3); } return; }
7,988
nglog::tools::GetStackTrace(void**, int, int)
ng-log[P]ng-log/src/stacktrace_generic-inl.h
int GetStackTrace(void** result, int max_depth, int skip_count) { static const int kStackLength = 64; void* stack[kStackLength]; int size; size = backtrace(stack, kStackLength); skip_count++; // we want to skip the current frame as well int result_count = size - skip_count; if (result_count < 0) { result_count = 0; } if (result_count > max_depth) { result_count = max_depth; } for (int i = 0; i < result_count; i++) { result[i] = stack[i + skip_count]; } return result_count; }
O2
c
nglog::tools::GetStackTrace(void**, int, int): pushq %rbp pushq %r14 pushq %rbx subq $0x200, %rsp # imm = 0x200 movl %edx, %ebx movl %esi, %ebp movq %rdi, %r14 movq %rsp, %rdi pushq $0x40 popq %rsi callq 0x78a0 movslq %ebx, %rdx notl %ebx addl %eax, %ebx xorl %eax, %eax testl %ebx, %ebx cmovlel %eax, %ebx cmpl %ebp, %ebx cmovgel %ebp, %ebx testl %ebx, %ebx movl $0x0, %ecx cmovgl %ebx, %ecx leaq (%rsp,%rdx,8), %rdx addq $0x8, %rdx cmpq %rax, %rcx je 0x1bbc0 movq (%rdx,%rax,8), %rsi movq %rsi, (%r14,%rax,8) incq %rax jmp 0x1bbae movl %ebx, %eax addq $0x200, %rsp # imm = 0x200 popq %rbx popq %r14 popq %rbp retq nop
_ZN5nglog5tools13GetStackTraceEPPvii: push rbp push r14 push rbx sub rsp, 200h mov ebx, edx mov ebp, esi mov r14, rdi mov rdi, rsp push 40h ; '@' pop rsi call _backtrace movsxd rdx, ebx not ebx add ebx, eax xor eax, eax test ebx, ebx cmovle ebx, eax cmp ebx, ebp cmovge ebx, ebp test ebx, ebx mov ecx, 0 cmovg ecx, ebx lea rdx, [rsp+rdx*8+218h+var_218] add rdx, 8 loc_1BBAE: cmp rcx, rax jz short loc_1BBC0 mov rsi, [rdx+rax*8] mov [r14+rax*8], rsi inc rax jmp short loc_1BBAE loc_1BBC0: mov eax, ebx add rsp, 200h pop rbx pop r14 pop rbp retn
long long nglog::tools::GetStackTrace(nglog::tools *this, void **a2, int a3) { int v4; // eax long long v5; // rdx int v6; // ebx long long v7; // rax long long v8; // rcx _QWORD *v9; // rdx _QWORD v11[67]; // [rsp+0h] [rbp-218h] BYREF v4 = backtrace(v11, 64LL); v5 = a3; v6 = v4 + ~a3; v7 = 0LL; if ( v6 <= 0 ) v6 = 0; if ( v6 >= (int)a2 ) v6 = (int)a2; v8 = 0LL; if ( v6 > 0 ) v8 = (unsigned int)v6; v9 = &v11[v5 + 1]; while ( v8 != v7 ) { *((_QWORD *)this + v7) = v9[v7]; ++v7; } return (unsigned int)v6; }
GetStackTrace: PUSH RBP PUSH R14 PUSH RBX SUB RSP,0x200 MOV EBX,EDX MOV EBP,ESI MOV R14,RDI MOV RDI,RSP PUSH 0x40 POP RSI CALL 0x001078a0 MOVSXD RDX,EBX NOT EBX ADD EBX,EAX XOR EAX,EAX TEST EBX,EBX CMOVLE EBX,EAX CMP EBX,EBP CMOVGE EBX,EBP TEST EBX,EBX MOV ECX,0x0 CMOVG ECX,EBX LEA RDX,[RSP + RDX*0x8] ADD RDX,0x8 LAB_0011bbae: CMP RCX,RAX JZ 0x0011bbc0 MOV RSI,qword ptr [RDX + RAX*0x8] MOV qword ptr [R14 + RAX*0x8],RSI INC RAX JMP 0x0011bbae LAB_0011bbc0: MOV EAX,EBX ADD RSP,0x200 POP RBX POP R14 POP RBP RET
/* nglog::tools::GetStackTrace(void**, int, int) */ uint nglog::tools::GetStackTrace(void **param_1,int param_2,int param_3) { int iVar1; ulong uVar2; ulong uVar3; uint uVar4; int1 auStack_218 [8]; int8 auStack_210 [63]; iVar1 = backtrace(auStack_218,0x40); uVar4 = ~param_3 + iVar1; uVar2 = 0; if ((int)uVar4 < 1) { uVar4 = 0; } if (param_2 <= (int)uVar4) { uVar4 = param_2; } uVar3 = 0; if (0 < (int)uVar4) { uVar3 = (ulong)uVar4; } for (; uVar3 != uVar2; uVar2 = uVar2 + 1) { param_1[uVar2] = (void *)auStack_210[(long)param_3 + uVar2]; } return uVar4; }
7,989
init_one_value
eloqsql/mysys/my_getopt.c
static void init_one_value(const struct my_option *option, void *variable, longlong value) { DBUG_ENTER("init_one_value"); switch ((option->var_type & GET_TYPE_MASK)) { case GET_BOOL: *((my_bool*) variable)= (my_bool) value; break; case GET_INT: *((int*) variable)= (int) getopt_ll_limit_value((int) value, option, NULL); break; case GET_ENUM: *((ulong*) variable)= (ulong) value; break; case GET_UINT: *((uint*) variable)= (uint) getopt_ull_limit_value((uint) value, option, NULL); break; case GET_LONG: *((long*) variable)= (long) getopt_ll_limit_value((long) value, option, NULL); break; case GET_ULONG: *((ulong*) variable)= (ulong) getopt_ull_limit_value((ulong) value, option, NULL); break; case GET_LL: *((longlong*) variable)= (longlong) getopt_ll_limit_value((longlong) value, option, NULL); break; case GET_ULL: *((ulonglong*) variable)= (ulonglong) getopt_ull_limit_value((ulonglong) value, option, NULL); break; case GET_SET: case GET_FLAGSET: *((ulonglong*) variable)= (ulonglong) value; break; case GET_BIT: { ulonglong bit= (option->block_size >= 0 ? option->block_size : -option->block_size); if (option->block_size < 0) value= !value; if (value) (*(ulonglong*)variable)|= bit; else (*(ulonglong*)variable)&= ~bit; break; } case GET_DOUBLE: *((double*) variable)= getopt_ulonglong2double(value); break; case GET_STR: /* Do not clear variable value if it has no default value. The default value may already be set. NOTE: To avoid compiler warnings, we first cast longlong to intptr, so that the value has the same size as a pointer. */ if ((char*) (intptr) value) *((char**) variable)= (char*) (intptr) value; break; case GET_STR_ALLOC: /* Do not clear variable value if it has no default value. The default value may already be set. NOTE: To avoid compiler warnings, we first cast longlong to intptr, so that the value has the same size as a pointer. */ if ((char*) (intptr) value) { char **pstr= (char **) variable; my_free(*pstr); *pstr= my_strdup(key_memory_defaults, (char*) (intptr) value, MYF(MY_WME)); } break; default: /* dummy default to avoid compiler warnings */ break; } DBUG_VOID_RETURN; }
O3
c
init_one_value: pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq 0x30(%rdi), %rax andl $0x3f, %eax addq $-0x2, %rax cmpq $0xe, %rax ja 0x2e287 movq %rdx, %r14 movq %rsi, %rbx movq %rdi, %rsi leaq 0x3b7d4(%rip), %rcx # 0x699b0 movslq (%rcx,%rax,4), %rax addq %rcx, %rax jmpq *%rax movq %r14, (%rbx) jmp 0x2e287 movq %r14, %rdi xorl %edx, %edx callq 0x2e773 jmp 0x2e284 movq %r14, %rdi xorl %edx, %edx callq 0x2e894 jmp 0x2e284 movq 0x60(%rsi), %rcx movq %rcx, %rax negq %rax cmovsq %rcx, %rax xorl %edx, %edx testq %r14, %r14 sete %dl testq %rcx, %rcx cmovnsq %r14, %rdx testq %rdx, %rdx je 0x2e27e orq (%rbx), %rax jmp 0x2e284 movb %r14b, (%rbx) jmp 0x2e287 movl %r14d, %edi xorl %edx, %edx callq 0x2e894 jmp 0x2e26f testq %r14, %r14 je 0x2e287 movq (%rbx), %rdi callq 0x30306 leaq 0x34b764(%rip), %rax # 0x3799b8 movl (%rax), %edi movl $0x10, %edx movq %r14, %rsi callq 0x3039c jmp 0x2e284 movslq %r14d, %rdi xorl %edx, %edx callq 0x2e773 movl %eax, (%rbx) jmp 0x2e287 testq %r14, %r14 jne 0x2e1e5 jmp 0x2e287 notq %rax andq (%rbx), %rax movq %rax, (%rbx) popq %rbx popq %r14 popq %rbp retq
init_one_value: push rbp mov rbp, rsp push r14 push rbx mov rax, [rdi+30h] and eax, 3Fh add rax, 0FFFFFFFFFFFFFFFEh; switch 15 cases cmp rax, 0Eh ja def_2E1E3; jumptable 000000000002E1E3 default case, case 11 mov r14, rdx mov rbx, rsi mov rsi, rdi lea rcx, jpt_2E1E3 movsxd rax, ds:(jpt_2E1E3 - 699B0h)[rcx+rax*4] add rax, rcx jmp rax; switch jump loc_2E1E5: mov [rbx], r14; jumptable 000000000002E1E3 cases 12-15 jmp def_2E1E3; jumptable 000000000002E1E3 default case, case 11 loc_2E1ED: mov rdi, r14; jumptable 000000000002E1E3 cases 5,7 xor edx, edx call getopt_ll_limit_value jmp loc_2E284 loc_2E1FC: mov rdi, r14; jumptable 000000000002E1E3 cases 6,8 xor edx, edx call getopt_ull_limit_value jmp short loc_2E284 loc_2E208: mov rcx, [rsi+60h]; jumptable 000000000002E1E3 case 16 mov rax, rcx neg rax cmovs rax, rcx xor edx, edx test r14, r14 setz dl test rcx, rcx cmovns rdx, r14 test rdx, rdx jz short loc_2E27E or rax, [rbx] jmp short loc_2E284 loc_2E22F: mov [rbx], r14b; jumptable 000000000002E1E3 case 2 jmp short def_2E1E3; jumptable 000000000002E1E3 default case, case 11 loc_2E234: mov edi, r14d; jumptable 000000000002E1E3 case 4 xor edx, edx call getopt_ull_limit_value jmp short loc_2E26F loc_2E240: test r14, r14; jumptable 000000000002E1E3 case 10 jz short def_2E1E3; jumptable 000000000002E1E3 default case, case 11 mov rdi, [rbx] call my_free lea rax, key_memory_defaults mov edi, [rax] mov edx, 10h mov rsi, r14 call my_strdup jmp short loc_2E284 loc_2E265: movsxd rdi, r14d; jumptable 000000000002E1E3 case 3 xor edx, edx call getopt_ll_limit_value loc_2E26F: mov [rbx], eax jmp short def_2E1E3; jumptable 000000000002E1E3 default case, case 11 loc_2E273: test r14, r14; jumptable 000000000002E1E3 case 9 jnz loc_2E1E5; jumptable 000000000002E1E3 cases 12-15 jmp short def_2E1E3; jumptable 000000000002E1E3 default case, case 11 loc_2E27E: not rax and rax, [rbx] loc_2E284: mov [rbx], rax def_2E1E3: pop rbx; jumptable 000000000002E1E3 default case, case 11 pop r14 pop rbp retn
long long init_one_value(long long a1, long long *a2, _BOOL8 a3) { long long result; // rax long long v5; // rax _BOOL8 v6; // rdx result = (*(_QWORD *)(a1 + 48) & 0x3FLL) - 2; switch ( *(_QWORD *)(a1 + 48) & 0x3FLL ) { case 2LL: *(_BYTE *)a2 = a3; return result; case 3LL: result = getopt_ll_limit_value(a3, a1, 0LL); goto LABEL_16; case 4LL: result = getopt_ull_limit_value(a3, a1, 0LL); LABEL_16: *(_DWORD *)a2 = result; return result; case 5LL: case 7LL: result = getopt_ll_limit_value(a3, a1, 0LL); goto LABEL_20; case 6LL: case 8LL: result = getopt_ull_limit_value(a3, a1, 0LL); goto LABEL_20; case 9LL: if ( !a3 ) return result; goto LABEL_2; case 0xALL: if ( !a3 ) return result; my_free(*a2); result = my_strdup(key_memory_defaults, a3, 16LL); goto LABEL_20; case 0xCLL: case 0xDLL: case 0xELL: case 0xFLL: LABEL_2: *a2 = a3; return result; case 0x10LL: v5 = -*(_QWORD *)(a1 + 96); if ( *(long long *)(a1 + 96) > 0 ) v5 = *(_QWORD *)(a1 + 96); v6 = !a3; if ( *(long long *)(a1 + 96) >= 0 ) v6 = a3; if ( v6 ) result = *a2 | v5; else result = *a2 & ~v5; LABEL_20: *a2 = result; break; default: return result; } return result; }
init_one_value: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RAX,qword ptr [RDI + 0x30] AND EAX,0x3f ADD RAX,-0x2 CMP RAX,0xe JA 0x0012e287 MOV R14,RDX MOV RBX,RSI MOV RSI,RDI LEA RCX,[0x1699b0] MOVSXD RAX,dword ptr [RCX + RAX*0x4] ADD RAX,RCX switchD: JMP RAX caseD_c: MOV qword ptr [RBX],R14 JMP 0x0012e287 caseD_5: MOV RDI,R14 XOR EDX,EDX CALL 0x0012e773 JMP 0x0012e284 caseD_6: MOV RDI,R14 XOR EDX,EDX CALL 0x0012e894 JMP 0x0012e284 caseD_10: MOV RCX,qword ptr [RSI + 0x60] MOV RAX,RCX NEG RAX CMOVS RAX,RCX XOR EDX,EDX TEST R14,R14 SETZ DL TEST RCX,RCX CMOVNS RDX,R14 TEST RDX,RDX JZ 0x0012e27e OR RAX,qword ptr [RBX] JMP 0x0012e284 caseD_2: MOV byte ptr [RBX],R14B JMP 0x0012e287 caseD_4: MOV EDI,R14D XOR EDX,EDX CALL 0x0012e894 JMP 0x0012e26f caseD_a: TEST R14,R14 JZ 0x0012e287 MOV RDI,qword ptr [RBX] CALL 0x00130306 LEA RAX,[0x4799b8] MOV EDI,dword ptr [RAX] MOV EDX,0x10 MOV RSI,R14 CALL 0x0013039c JMP 0x0012e284 caseD_3: MOVSXD RDI,R14D XOR EDX,EDX CALL 0x0012e773 LAB_0012e26f: MOV dword ptr [RBX],EAX JMP 0x0012e287 caseD_9: TEST R14,R14 JNZ 0x0012e1e5 JMP 0x0012e287 LAB_0012e27e: NOT RAX AND RAX,qword ptr [RBX] LAB_0012e284: MOV qword ptr [RBX],RAX caseD_b: POP RBX POP R14 POP RBP RET
void init_one_value(long param_1,ulong *param_2,ulong param_3) { ulong uVar1; int4 uVar2; ulong uVar3; ulong uVar4; switch((uint)*(int8 *)(param_1 + 0x30) & 0x3f) { case 2: *(char *)param_2 = (char)param_3; return; case 3: uVar2 = getopt_ll_limit_value((long)(int)param_3,param_1,0); goto LAB_0012e26f; case 4: uVar2 = getopt_ull_limit_value(param_3 & 0xffffffff,param_1,0); LAB_0012e26f: *(int4 *)param_2 = uVar2; return; case 5: case 7: uVar3 = getopt_ll_limit_value(param_3,param_1,0); break; case 6: case 8: uVar3 = getopt_ull_limit_value(param_3,param_1,0); break; case 9: if (param_3 == 0) { return; } case 0xc: case 0xd: case 0xe: case 0xf: *param_2 = param_3; return; case 10: if (param_3 == 0) { return; } my_free(*param_2); uVar3 = my_strdup(key_memory_defaults,param_3,0x10); break; default: goto switchD_0012e1e3_caseD_b; case 0x10: uVar1 = *(ulong *)(param_1 + 0x60); uVar3 = -uVar1; if (0 < (long)uVar1) { uVar3 = uVar1; } uVar4 = (ulong)(param_3 == 0); if (-1 < (long)uVar1) { uVar4 = param_3; } if (uVar4 == 0) { uVar3 = ~uVar3 & *param_2; } else { uVar3 = uVar3 | *param_2; } } *param_2 = uVar3; switchD_0012e1e3_caseD_b: return; }
7,990
ggml_vec_sum_f32
Yangxiaoz[P]GGML-Tutorial/ggml/src/ggml-cpu/ggml-cpu.c
inline static void ggml_vec_sum_f32(const int n, float * s, const float * x) { #ifndef GGML_USE_ACCELERATE ggml_float sum = 0.0; for (int i = 0; i < n; ++i) { sum += (ggml_float)x[i]; } *s = sum; #else vDSP_sve(x, 1, s, n); #endif }
O2
c
ggml_vec_sum_f32: movl %edi, %eax sarl $0x1f, %eax andnl %edi, %eax, %eax vxorps %xmm0, %xmm0, %xmm0 xorl %ecx, %ecx cmpq %rcx, %rax je 0x23bb6 vcvtss2sd (%rdx,%rcx,4), %xmm2, %xmm1 vaddsd %xmm1, %xmm0, %xmm0 incq %rcx jmp 0x23ba3 vcvtsd2ss %xmm0, %xmm0, %xmm0 vmovss %xmm0, (%rsi) retq
ggml_vec_sum_f32: mov eax, edi sar eax, 1Fh andn eax, eax, edi vxorps xmm0, xmm0, xmm0 xor ecx, ecx loc_23BA3: cmp rax, rcx jz short loc_23BB6 vcvtss2sd xmm1, xmm2, dword ptr [rdx+rcx*4] vaddsd xmm0, xmm0, xmm1 inc rcx jmp short loc_23BA3 loc_23BB6: vcvtsd2ss xmm0, xmm0, xmm0 vmovss dword ptr [rsi], xmm0 retn
long long ggml_vec_sum_f32(int a1, long long _RSI, __m128 _XMM0, double a4, __m128 _XMM2) { long long result; // rax long long i; // rcx result = a1 & (unsigned int)~(a1 >> 31); __asm { vxorps xmm0, xmm0, xmm0 } for ( i = 0LL; result != i; ++i ) { __asm { vcvtss2sd xmm1, xmm2, dword ptr [rdx+rcx*4] vaddsd xmm0, xmm0, xmm1 } } __asm { vcvtsd2ss xmm0, xmm0, xmm0 vmovss dword ptr [rsi], xmm0 } return result; }
ggml_vec_sum_f32: MOV EAX,EDI SAR EAX,0x1f ANDN EAX,EAX,EDI VXORPS XMM0,XMM0,XMM0 XOR ECX,ECX LAB_00123ba3: CMP RAX,RCX JZ 0x00123bb6 VCVTSS2SD XMM1,XMM2,dword ptr [RDX + RCX*0x4] VADDSD XMM0,XMM0,XMM1 INC RCX JMP 0x00123ba3 LAB_00123bb6: VCVTSD2SS XMM0,XMM0,XMM0 VMOVSS dword ptr [RSI],XMM0 RET
void ggml_vec_sum_f32(uint param_1,float *param_2,long param_3) { float fVar1; ulong uVar2; fVar1 = 0.0; for (uVar2 = 0; (~((int)param_1 >> 0x1f) & param_1) != uVar2; uVar2 = uVar2 + 1) { fVar1 = fVar1 + *(float *)(param_3 + uVar2 * 4); } *param_2 = fVar1; return; }
7,991
mysql_cset_escape_slashes
eloqsql/libmariadb/libmariadb/ma_charset.c
size_t mysql_cset_escape_slashes(const MARIADB_CHARSET_INFO * cset, char *newstr, const char * escapestr, size_t escapestr_len ) { const char *newstr_s = newstr; const char *newstr_e = newstr + 2 * escapestr_len; const char *end = escapestr + escapestr_len; my_bool escape_overflow = FALSE; for (;escapestr < end; escapestr++) { char esc = '\0'; unsigned int len = 0; /* check unicode characters */ if (cset->char_maxlen > 1 && (len = cset->mb_valid(escapestr, end))) { /* check possible overflow */ if ((newstr + len) > newstr_e) { escape_overflow = TRUE; break; } /* copy mb char without escaping it */ while (len--) { *newstr++ = *escapestr++; } escapestr--; continue; } if (cset->char_maxlen > 1 && cset->mb_charlen(*escapestr) > 1) { esc = *escapestr; } else { switch (*escapestr) { case 0: esc = '0'; break; case '\n': esc = 'n'; break; case '\r': esc = 'r'; break; case '\\': case '\'': case '"': esc = *escapestr; break; case '\032': esc = 'Z'; break; } } if (esc) { if (newstr + 2 > newstr_e) { escape_overflow = TRUE; break; } /* copy escaped character */ *newstr++ = '\\'; *newstr++ = esc; } else { if (newstr + 1 > newstr_e) { escape_overflow = TRUE; break; } /* copy non escaped character */ *newstr++ = *escapestr; } } *newstr = '\0'; if (escape_overflow) { return((size_t)~0); } return((size_t)(newstr - newstr_s)); }
O3
c
mysql_cset_escape_slashes: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx pushq %rax movq %rsi, -0x30(%rbp) movq %rsi, %rax testq %rcx, %rcx jle 0x3722c movq %rcx, %r14 movq %rdx, %r12 movq %rdi, %r15 movq -0x30(%rbp), %rbx leaq (%rbx,%rcx,2), %r13 addq %rdx, %r14 cmpl $0x2, 0x34(%r15) jb 0x371be movq %r12, %rdi movq %r14, %rsi callq *0x40(%r15) testl %eax, %eax je 0x3719d movl %eax, %ecx movl %eax, %eax addq %rbx, %rax cmpq %r13, %rax ja 0x37235 decq %r12 movq %r12, %rdx leaq 0x1(%rdx), %r12 leaq 0x1(%rbx), %rax movb 0x1(%rdx), %dl movb %dl, (%rbx) movq %r12, %rdx movq %rax, %rbx decl %ecx jne 0x37181 jmp 0x3721d cmpl $0x2, 0x34(%r15) jb 0x371be movsbl (%r12), %edi callq *0x38(%r15) cmpl $0x1, %eax jbe 0x371be movb (%r12), %cl testb %cl, %cl jne 0x3720e xorl %ecx, %ecx jmp 0x371f7 movb (%r12), %cl movzbl %cl, %eax cmpl $0x19, %eax jle 0x371db cmpl $0x26, %eax jg 0x371ed cmpl $0x1a, %eax je 0x37208 cmpl $0x22, %eax je 0x3720e jmp 0x371f7 testl %eax, %eax je 0x37204 cmpl $0xa, %eax je 0x3720c cmpl $0xd, %eax jne 0x371f7 movb $0x72, %cl jmp 0x3720e cmpl $0x27, %eax je 0x3720e cmpl $0x5c, %eax je 0x3720e leaq 0x1(%rbx), %rax cmpq %r13, %rax ja 0x37235 movb %cl, (%rbx) jmp 0x3721d movb $0x30, %cl jmp 0x3720e movb $0x5a, %cl jmp 0x3720e movb $0x6e, %cl leaq 0x2(%rbx), %rax cmpq %r13, %rax ja 0x37235 movb $0x5c, (%rbx) movb %cl, 0x1(%rbx) incq %r12 movq %rax, %rbx cmpq %r14, %r12 jb 0x37156 movb $0x0, (%rax) subq -0x30(%rbp), %rax jmp 0x3723f movb $0x0, (%rbx) movq $-0x1, %rax addq $0x8, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
mysql_cset_escape_slashes: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx push rax mov [rbp+var_30], rsi mov rax, rsi test rcx, rcx jle loc_3722C mov r14, rcx mov r12, rdx mov r15, rdi mov rbx, [rbp+var_30] lea r13, [rbx+rcx*2] add r14, rdx loc_37156: cmp dword ptr [r15+34h], 2 jb short loc_371BE mov rdi, r12 mov rsi, r14 call qword ptr [r15+40h] test eax, eax jz short loc_3719D mov ecx, eax mov eax, eax add rax, rbx cmp rax, r13 ja loc_37235 dec r12 mov rdx, r12 loc_37181: lea r12, [rdx+1] lea rax, [rbx+1] mov dl, [rdx+1] mov [rbx], dl mov rdx, r12 mov rbx, rax dec ecx jnz short loc_37181 jmp loc_3721D loc_3719D: cmp dword ptr [r15+34h], 2 jb short loc_371BE movsx edi, byte ptr [r12] call qword ptr [r15+38h] cmp eax, 1 jbe short loc_371BE mov cl, [r12] test cl, cl jnz short loc_3720E xor ecx, ecx jmp short loc_371F7 loc_371BE: mov cl, [r12] movzx eax, cl cmp eax, 19h jle short loc_371DB cmp eax, 26h ; '&' jg short loc_371ED cmp eax, 1Ah jz short loc_37208 cmp eax, 22h ; '"' jz short loc_3720E jmp short loc_371F7 loc_371DB: test eax, eax jz short loc_37204 cmp eax, 0Ah jz short loc_3720C cmp eax, 0Dh jnz short loc_371F7 mov cl, 72h ; 'r' jmp short loc_3720E loc_371ED: cmp eax, 27h ; ''' jz short loc_3720E cmp eax, 5Ch ; '\' jz short loc_3720E loc_371F7: lea rax, [rbx+1] cmp rax, r13 ja short loc_37235 mov [rbx], cl jmp short loc_3721D loc_37204: mov cl, 30h ; '0' jmp short loc_3720E loc_37208: mov cl, 5Ah ; 'Z' jmp short loc_3720E loc_3720C: mov cl, 6Eh ; 'n' loc_3720E: lea rax, [rbx+2] cmp rax, r13 ja short loc_37235 mov byte ptr [rbx], 5Ch ; '\' mov [rbx+1], cl loc_3721D: inc r12 mov rbx, rax cmp r12, r14 jb loc_37156 loc_3722C: mov byte ptr [rax], 0 sub rax, [rbp+var_30] jmp short loc_3723F loc_37235: mov byte ptr [rbx], 0 mov rax, 0FFFFFFFFFFFFFFFFh loc_3723F: add rsp, 8 pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long mysql_cset_escape_slashes(long long a1, char *a2, char *a3, long long a4) { char *v4; // rax char *v5; // r12 char *v6; // rbx unsigned long long v7; // r13 unsigned long long v8; // r14 int v9; // eax int v10; // ecx char *v11; // rdx char v12; // cl unsigned int v13; // eax v4 = a2; if ( a4 <= 0 ) { LABEL_32: *v4 = 0; return v4 - a2; } v5 = a3; v6 = a2; v7 = (unsigned long long)&a2[2 * a4]; v8 = (unsigned long long)&a3[a4]; while ( *(_DWORD *)(a1 + 52) >= 2u ) { v9 = (*(long long ( **)(char *, unsigned long long))(a1 + 64))(v5, v8); if ( v9 ) { v10 = v9; if ( (unsigned long long)&v6[v9] > v7 ) goto LABEL_33; v11 = v5 - 1; do { v5 = v11 + 1; v4 = v6 + 1; *v6++ = *++v11; --v10; } while ( v10 ); goto LABEL_31; } if ( *(_DWORD *)(a1 + 52) < 2u || (*(unsigned int ( **)(_QWORD))(a1 + 56))((unsigned int)*v5) <= 1 ) break; v12 = *v5; if ( *v5 ) goto LABEL_29; v12 = 0; LABEL_24: v4 = v6 + 1; if ( (unsigned long long)(v6 + 1) > v7 ) goto LABEL_33; *v6 = v12; LABEL_31: ++v5; v6 = v4; if ( (unsigned long long)v5 >= v8 ) goto LABEL_32; } v12 = *v5; v13 = (unsigned __int8)*v5; if ( v13 > 0x19 ) { if ( (unsigned __int8)*v5 > 0x26u ) { if ( v13 == 39 || v13 == 92 ) goto LABEL_29; } else { if ( v13 == 26 ) { v12 = 90; goto LABEL_29; } if ( v13 == 34 ) goto LABEL_29; } goto LABEL_24; } if ( !*v5 ) { v12 = 48; goto LABEL_29; } if ( v13 != 10 ) { if ( v13 == 13 ) { v12 = 114; goto LABEL_29; } goto LABEL_24; } v12 = 110; LABEL_29: v4 = v6 + 2; if ( (unsigned long long)(v6 + 2) <= v7 ) { *v6 = 92; v6[1] = v12; goto LABEL_31; } LABEL_33: *v6 = 0; return -1LL; }
mysql_cset_escape_slashes: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX PUSH RAX MOV qword ptr [RBP + -0x30],RSI MOV RAX,RSI TEST RCX,RCX JLE 0x0013722c MOV R14,RCX MOV R12,RDX MOV R15,RDI MOV RBX,qword ptr [RBP + -0x30] LEA R13,[RBX + RCX*0x2] ADD R14,RDX LAB_00137156: CMP dword ptr [R15 + 0x34],0x2 JC 0x001371be MOV RDI,R12 MOV RSI,R14 CALL qword ptr [R15 + 0x40] TEST EAX,EAX JZ 0x0013719d MOV ECX,EAX MOV EAX,EAX ADD RAX,RBX CMP RAX,R13 JA 0x00137235 DEC R12 MOV RDX,R12 LAB_00137181: LEA R12,[RDX + 0x1] LEA RAX,[RBX + 0x1] MOV DL,byte ptr [RDX + 0x1] MOV byte ptr [RBX],DL MOV RDX,R12 MOV RBX,RAX DEC ECX JNZ 0x00137181 JMP 0x0013721d LAB_0013719d: CMP dword ptr [R15 + 0x34],0x2 JC 0x001371be MOVSX EDI,byte ptr [R12] CALL qword ptr [R15 + 0x38] CMP EAX,0x1 JBE 0x001371be MOV CL,byte ptr [R12] TEST CL,CL JNZ 0x0013720e XOR ECX,ECX JMP 0x001371f7 LAB_001371be: MOV CL,byte ptr [R12] MOVZX EAX,CL CMP EAX,0x19 JLE 0x001371db CMP EAX,0x26 JG 0x001371ed CMP EAX,0x1a JZ 0x00137208 CMP EAX,0x22 JZ 0x0013720e JMP 0x001371f7 LAB_001371db: TEST EAX,EAX JZ 0x00137204 CMP EAX,0xa JZ 0x0013720c CMP EAX,0xd JNZ 0x001371f7 MOV CL,0x72 JMP 0x0013720e LAB_001371ed: CMP EAX,0x27 JZ 0x0013720e CMP EAX,0x5c JZ 0x0013720e LAB_001371f7: LEA RAX,[RBX + 0x1] CMP RAX,R13 JA 0x00137235 MOV byte ptr [RBX],CL JMP 0x0013721d LAB_00137204: MOV CL,0x30 JMP 0x0013720e LAB_00137208: MOV CL,0x5a JMP 0x0013720e LAB_0013720c: MOV CL,0x6e LAB_0013720e: LEA RAX,[RBX + 0x2] CMP RAX,R13 JA 0x00137235 MOV byte ptr [RBX],0x5c MOV byte ptr [RBX + 0x1],CL LAB_0013721d: INC R12 MOV RBX,RAX CMP R12,R14 JC 0x00137156 LAB_0013722c: MOV byte ptr [RAX],0x0 SUB RAX,qword ptr [RBP + -0x30] JMP 0x0013723f LAB_00137235: MOV byte ptr [RBX],0x0 MOV RAX,-0x1 LAB_0013723f: ADD RSP,0x8 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
long mysql_cset_escape_slashes(long param_1,byte *param_2,byte *param_3,long param_4) { byte *pbVar1; uint uVar2; byte *pbVar3; byte bVar4; byte *pbVar5; byte *pbVar6; byte *pbVar7; pbVar3 = param_2; if (0 < param_4) { pbVar1 = param_2 + param_4 * 2; pbVar7 = param_3 + param_4; pbVar6 = param_2; do { if (*(uint *)(param_1 + 0x34) < 2) { LAB_001371be: bVar4 = *param_3; if (bVar4 < 0x1a) { if (bVar4 == 0) { bVar4 = 0x30; } else if (bVar4 == 10) { bVar4 = 0x6e; } else { if (bVar4 != 0xd) goto LAB_001371f7; bVar4 = 0x72; } } else if (bVar4 < 0x27) { if (bVar4 == 0x1a) { bVar4 = 0x5a; } else if (bVar4 != 0x22) goto LAB_001371f7; } else if ((bVar4 != 0x27) && (bVar4 != 0x5c)) { LAB_001371f7: pbVar3 = pbVar6 + 1; if (pbVar1 < pbVar3) goto LAB_00137235; *pbVar6 = bVar4; goto LAB_0013721d; } LAB_0013720e: pbVar3 = pbVar6 + 2; if (pbVar1 < pbVar3) { LAB_00137235: *pbVar6 = 0; return -1; } *pbVar6 = 0x5c; pbVar6[1] = bVar4; } else { uVar2 = (**(code **)(param_1 + 0x40))(param_3,pbVar7); if (uVar2 == 0) { if ((*(uint *)(param_1 + 0x34) < 2) || (uVar2 = (**(code **)(param_1 + 0x38))((int)(char)*param_3), uVar2 < 2)) goto LAB_001371be; bVar4 = *param_3; if (bVar4 == 0) { bVar4 = 0; goto LAB_001371f7; } goto LAB_0013720e; } if (pbVar1 < pbVar6 + uVar2) goto LAB_00137235; pbVar5 = param_3 + -1; do { param_3 = pbVar5 + 1; pbVar3 = pbVar6 + 1; *pbVar6 = pbVar5[1]; uVar2 = uVar2 - 1; pbVar5 = param_3; pbVar6 = pbVar3; } while (uVar2 != 0); } LAB_0013721d: param_3 = param_3 + 1; pbVar6 = pbVar3; } while (param_3 < pbVar7); } *pbVar3 = 0; return (long)pbVar3 - (long)param_2; }
7,992
pre_ec_mul
corpus-core[P]colibri-stateless/src/chains/eth/precompiles/precompiles_ec.c
pre_result_t pre_ec_mul(bytes_t input, buffer_t* output, uint64_t* gas_used) { *gas_used = 40000; // Gas cost of EC multiplication // Implementation similar to pre_ec_add but using scalar multiplication // For a complete implementation, would implement scalar multiplication algorithm output->data.len = 0; buffer_grow(output, 64); memset(output->data.data, 0, 64); return PRE_ERROR; // Indicating that the implementation is incomplete }
O0
c
pre_ec_mul: pushq %rbp movq %rsp, %rbp subq $0x20, %rsp movl %edi, -0x10(%rbp) movq %rsi, -0x8(%rbp) movq %rdx, -0x18(%rbp) movq %rcx, -0x20(%rbp) movq -0x20(%rbp), %rax movq $0x9c40, (%rax) # imm = 0x9C40 movq -0x18(%rbp), %rax movl $0x0, (%rax) movq -0x18(%rbp), %rdi movl $0x40, %esi callq 0x9c950 movq -0x18(%rbp), %rax movq 0x8(%rax), %rdi xorl %esi, %esi movl $0x40, %edx callq 0x23140 movl $0x1, %eax addq $0x20, %rsp popq %rbp retq nopl (%rax)
pre_ec_mul: push rbp mov rbp, rsp sub rsp, 20h mov [rbp+var_10], edi mov [rbp+var_8], rsi mov [rbp+var_18], rdx mov [rbp+var_20], rcx mov rax, [rbp+var_20] mov qword ptr [rax], 9C40h mov rax, [rbp+var_18] mov dword ptr [rax], 0 mov rdi, [rbp+var_18] mov esi, 40h ; '@' call buffer_grow mov rax, [rbp+var_18] mov rdi, [rax+8] xor esi, esi mov edx, 40h ; '@' call _memset mov eax, 1 add rsp, 20h pop rbp retn
long long pre_ec_mul(long long a1, long long a2, long long a3, _QWORD *a4) { *a4 = 40000LL; *(_DWORD *)a3 = 0; buffer_grow(a3, 64LL); memset(*(_QWORD *)(a3 + 8), 0LL, 64LL); return 1LL; }
pre_ec_mul: PUSH RBP MOV RBP,RSP SUB RSP,0x20 MOV dword ptr [RBP + -0x10],EDI MOV qword ptr [RBP + -0x8],RSI MOV qword ptr [RBP + -0x18],RDX MOV qword ptr [RBP + -0x20],RCX MOV RAX,qword ptr [RBP + -0x20] MOV qword ptr [RAX],0x9c40 MOV RAX,qword ptr [RBP + -0x18] MOV dword ptr [RAX],0x0 MOV RDI,qword ptr [RBP + -0x18] MOV ESI,0x40 CALL 0x0019c950 MOV RAX,qword ptr [RBP + -0x18] MOV RDI,qword ptr [RAX + 0x8] XOR ESI,ESI MOV EDX,0x40 CALL 0x00123140 MOV EAX,0x1 ADD RSP,0x20 POP RBP RET
int8 pre_ec_mul(int8 param_1,int8 param_2,int4 *param_3,int8 *param_4) { *param_4 = 40000; *param_3 = 0; buffer_grow(param_3); memset(*(void **)(param_3 + 2),0,0x40); return 1; }
7,993
LefDefParser::defiGroup::print(_IO_FILE*) const
Efficient-TDP/thirdparty/Limbo/limbo/thirdparty/lefdef/5.8/def/def/defiGroup.cpp
void defiGroup::print(FILE* f) const { int i; fprintf(f, "Group '%s'\n", name()); if (hasRegionName()) { fprintf(f, " region name '%s'\n", regionName()); } if (hasRegionBox()) { int size = numRects_; int* xl = xl_; int* yl = yl_; int* xh = xh_; int* yh = yh_; for (i = 0; i < size; i++) fprintf(f, " region box %d,%d %d,%d\n", xl[i], yl[i], xh[i], yh[i]); } if (hasMaxX()) { fprintf(f, " max x %d\n", maxX()); } if (hasMaxY()) { fprintf(f, " max y %d\n", maxY()); } if (hasPerim()) { fprintf(f, " perim %d\n", perim()); } }
O0
cpp
LefDefParser::defiGroup::print(_IO_FILE*) const: subq $0x68, %rsp movq %rdi, 0x60(%rsp) movq %rsi, 0x58(%rsp) movq 0x60(%rsp), %rdi movq %rdi, 0x28(%rsp) movq 0x58(%rsp), %rax movq %rax, 0x20(%rsp) callq 0x4a690 movq 0x20(%rsp), %rdi movq %rax, %rdx leaq 0x281d6(%rip), %rsi # 0x7293c movb $0x0, %al callq 0x7300 movq 0x28(%rsp), %rdi callq 0x4a720 cmpl $0x0, %eax je 0x4a7a6 movq 0x28(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, 0x18(%rsp) callq 0x4a680 movq 0x18(%rsp), %rdi movq %rax, %rdx leaq 0x281a9(%rip), %rsi # 0x72948 movb $0x0, %al callq 0x7300 movq 0x28(%rsp), %rdi callq 0x4a700 cmpl $0x0, %eax je 0x4a853 movq 0x28(%rsp), %rax movl 0x20(%rax), %ecx movl %ecx, 0x50(%rsp) movq 0x28(%rax), %rcx movq %rcx, 0x48(%rsp) movq 0x30(%rax), %rcx movq %rcx, 0x40(%rsp) movq 0x38(%rax), %rcx movq %rcx, 0x38(%rsp) movq 0x40(%rax), %rax movq %rax, 0x30(%rsp) movl $0x0, 0x54(%rsp) movl 0x54(%rsp), %eax cmpl 0x50(%rsp), %eax jge 0x4a851 movq 0x58(%rsp), %rdi movq 0x48(%rsp), %rax movslq 0x54(%rsp), %rcx movl (%rax,%rcx,4), %edx movq 0x40(%rsp), %rax movslq 0x54(%rsp), %rcx movl (%rax,%rcx,4), %ecx movq 0x38(%rsp), %rax movslq 0x54(%rsp), %rsi movl (%rax,%rsi,4), %r8d movq 0x30(%rsp), %rax movslq 0x54(%rsp), %rsi movl (%rax,%rsi,4), %r9d leaq 0x2811f(%rip), %rsi # 0x7295c movb $0x0, %al callq 0x7300 movl 0x54(%rsp), %eax addl $0x1, %eax movl %eax, 0x54(%rsp) jmp 0x4a7f1 jmp 0x4a853 movq 0x28(%rsp), %rdi callq 0x4a6d0 cmpl $0x0, %eax je 0x4a88b movq 0x28(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, 0x10(%rsp) callq 0x4a6b0 movq 0x10(%rsp), %rdi movl %eax, %edx leaq 0x280f2(%rip), %rsi # 0x72976 movb $0x0, %al callq 0x7300 movq 0x28(%rsp), %rdi callq 0x4a6e0 cmpl $0x0, %eax je 0x4a8c3 movq 0x28(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, 0x8(%rsp) callq 0x4a6c0 movq 0x8(%rsp), %rdi movl %eax, %edx leaq 0x280c6(%rip), %rsi # 0x72982 movb $0x0, %al callq 0x7300 movq 0x28(%rsp), %rdi callq 0x4a6f0 cmpl $0x0, %eax je 0x4a8f9 movq 0x28(%rsp), %rdi movq 0x58(%rsp), %rax movq %rax, (%rsp) callq 0x4a6a0 movq (%rsp), %rdi movl %eax, %edx leaq 0x2809c(%rip), %rsi # 0x7298e movb $0x0, %al callq 0x7300 addq $0x68, %rsp retq nop
_ZNK12LefDefParser9defiGroup5printEP8_IO_FILE: sub rsp, 68h mov [rsp+68h+var_8], rdi mov [rsp+68h+var_10], rsi mov rdi, [rsp+68h+var_8]; this mov [rsp+68h+var_40], rdi mov rax, [rsp+68h+var_10] mov [rsp+68h+var_48], rax call _ZNK12LefDefParser9defiGroup4nameEv; LefDefParser::defiGroup::name(void) mov rdi, [rsp+68h+var_48] mov rdx, rax lea rsi, aGroupS; "Group '%s'\n" mov al, 0 call _fprintf mov rdi, [rsp+68h+var_40]; this call _ZNK12LefDefParser9defiGroup13hasRegionNameEv; LefDefParser::defiGroup::hasRegionName(void) cmp eax, 0 jz short loc_4A7A6 mov rdi, [rsp+68h+var_40]; this mov rax, [rsp+68h+var_10] mov [rsp+68h+var_50], rax call _ZNK12LefDefParser9defiGroup10regionNameEv; LefDefParser::defiGroup::regionName(void) mov rdi, [rsp+68h+var_50] mov rdx, rax lea rsi, aRegionNameS; " region name '%s'\n" mov al, 0 call _fprintf loc_4A7A6: mov rdi, [rsp+68h+var_40]; this call _ZNK12LefDefParser9defiGroup12hasRegionBoxEv; LefDefParser::defiGroup::hasRegionBox(void) cmp eax, 0 jz loc_4A853 mov rax, [rsp+68h+var_40] mov ecx, [rax+20h] mov [rsp+68h+var_18], ecx mov rcx, [rax+28h] mov [rsp+68h+var_20], rcx mov rcx, [rax+30h] mov [rsp+68h+var_28], rcx mov rcx, [rax+38h] mov [rsp+68h+var_30], rcx mov rax, [rax+40h] mov [rsp+68h+var_38], rax mov [rsp+68h+var_14], 0 loc_4A7F1: mov eax, [rsp+68h+var_14] cmp eax, [rsp+68h+var_18] jge short loc_4A851 mov rdi, [rsp+68h+var_10] mov rax, [rsp+68h+var_20] movsxd rcx, [rsp+68h+var_14] mov edx, [rax+rcx*4] mov rax, [rsp+68h+var_28] movsxd rcx, [rsp+68h+var_14] mov ecx, [rax+rcx*4] mov rax, [rsp+68h+var_30] movsxd rsi, [rsp+68h+var_14] mov r8d, [rax+rsi*4] mov rax, [rsp+68h+var_38] movsxd rsi, [rsp+68h+var_14] mov r9d, [rax+rsi*4] lea rsi, aRegionBoxDDDD; " region box %d,%d %d,%d\n" mov al, 0 call _fprintf mov eax, [rsp+68h+var_14] add eax, 1 mov [rsp+68h+var_14], eax jmp short loc_4A7F1 loc_4A851: jmp short $+2 loc_4A853: mov rdi, [rsp+68h+var_40]; this call _ZNK12LefDefParser9defiGroup7hasMaxXEv; LefDefParser::defiGroup::hasMaxX(void) cmp eax, 0 jz short loc_4A88B mov rdi, [rsp+68h+var_40]; this mov rax, [rsp+68h+var_10] mov [rsp+68h+var_58], rax call _ZNK12LefDefParser9defiGroup4maxXEv; LefDefParser::defiGroup::maxX(void) mov rdi, [rsp+68h+var_58] mov edx, eax lea rsi, aMaxXD; " max x %d\n" mov al, 0 call _fprintf loc_4A88B: mov rdi, [rsp+68h+var_40]; this call _ZNK12LefDefParser9defiGroup7hasMaxYEv; LefDefParser::defiGroup::hasMaxY(void) cmp eax, 0 jz short loc_4A8C3 mov rdi, [rsp+68h+var_40]; this mov rax, [rsp+68h+var_10] mov [rsp+68h+var_60], rax call _ZNK12LefDefParser9defiGroup4maxYEv; LefDefParser::defiGroup::maxY(void) mov rdi, [rsp+68h+var_60] mov edx, eax lea rsi, aMaxYD; " max y %d\n" mov al, 0 call _fprintf loc_4A8C3: mov rdi, [rsp+68h+var_40]; this call _ZNK12LefDefParser9defiGroup8hasPerimEv; LefDefParser::defiGroup::hasPerim(void) cmp eax, 0 jz short loc_4A8F9 mov rdi, [rsp+68h+var_40]; this mov rax, [rsp+68h+var_10] mov [rsp+68h+var_68], rax call _ZNK12LefDefParser9defiGroup5perimEv; LefDefParser::defiGroup::perim(void) mov rdi, [rsp+68h+var_68] mov edx, eax lea rsi, aPerimD; " perim %d\n" mov al, 0 call _fprintf loc_4A8F9: add rsp, 68h retn
long long LefDefParser::defiGroup::print(long long a1, long long a2) { const char *v2; // rax const char *v3; // rax int v4; // eax int v5; // eax long long result; // rax int v7; // eax long long v8; // [rsp+30h] [rbp-38h] long long v9; // [rsp+38h] [rbp-30h] long long v10; // [rsp+40h] [rbp-28h] long long v11; // [rsp+48h] [rbp-20h] int v12; // [rsp+50h] [rbp-18h] int i; // [rsp+54h] [rbp-14h] v2 = (const char *)LefDefParser::defiGroup::name((LefDefParser::defiGroup *)a1); fprintf(a2, "Group '%s'\n", v2); if ( (unsigned int)LefDefParser::defiGroup::hasRegionName((LefDefParser::defiGroup *)a1) ) { v3 = (const char *)LefDefParser::defiGroup::regionName((LefDefParser::defiGroup *)a1); fprintf(a2, " region name '%s'\n", v3); } if ( LefDefParser::defiGroup::hasRegionBox((LefDefParser::defiGroup *)a1) ) { v12 = *(_DWORD *)(a1 + 32); v11 = *(_QWORD *)(a1 + 40); v10 = *(_QWORD *)(a1 + 48); v9 = *(_QWORD *)(a1 + 56); v8 = *(_QWORD *)(a1 + 64); for ( i = 0; i < v12; ++i ) fprintf( a2, " region box %d,%d %d,%d\n", *(_DWORD *)(v11 + 4LL * i), *(_DWORD *)(v10 + 4LL * i), *(_DWORD *)(v9 + 4LL * i), *(_DWORD *)(v8 + 4LL * i)); } if ( (unsigned int)LefDefParser::defiGroup::hasMaxX((LefDefParser::defiGroup *)a1) ) { v4 = LefDefParser::defiGroup::maxX((LefDefParser::defiGroup *)a1); fprintf(a2, " max x %d\n", v4); } if ( (unsigned int)LefDefParser::defiGroup::hasMaxY((LefDefParser::defiGroup *)a1) ) { v5 = LefDefParser::defiGroup::maxY((LefDefParser::defiGroup *)a1); fprintf(a2, " max y %d\n", v5); } result = LefDefParser::defiGroup::hasPerim((LefDefParser::defiGroup *)a1); if ( (_DWORD)result ) { v7 = LefDefParser::defiGroup::perim((LefDefParser::defiGroup *)a1); return fprintf(a2, " perim %d\n", v7); } return result; }
print: SUB RSP,0x68 MOV qword ptr [RSP + 0x60],RDI MOV qword ptr [RSP + 0x58],RSI MOV RDI,qword ptr [RSP + 0x60] MOV qword ptr [RSP + 0x28],RDI MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x20],RAX CALL 0x0014a690 MOV RDI,qword ptr [RSP + 0x20] MOV RDX,RAX LEA RSI,[0x17293c] MOV AL,0x0 CALL 0x00107300 MOV RDI,qword ptr [RSP + 0x28] CALL 0x0014a720 CMP EAX,0x0 JZ 0x0014a7a6 MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x18],RAX CALL 0x0014a680 MOV RDI,qword ptr [RSP + 0x18] MOV RDX,RAX LEA RSI,[0x172948] MOV AL,0x0 CALL 0x00107300 LAB_0014a7a6: MOV RDI,qword ptr [RSP + 0x28] CALL 0x0014a700 CMP EAX,0x0 JZ 0x0014a853 MOV RAX,qword ptr [RSP + 0x28] MOV ECX,dword ptr [RAX + 0x20] MOV dword ptr [RSP + 0x50],ECX MOV RCX,qword ptr [RAX + 0x28] MOV qword ptr [RSP + 0x48],RCX MOV RCX,qword ptr [RAX + 0x30] MOV qword ptr [RSP + 0x40],RCX MOV RCX,qword ptr [RAX + 0x38] MOV qword ptr [RSP + 0x38],RCX MOV RAX,qword ptr [RAX + 0x40] MOV qword ptr [RSP + 0x30],RAX MOV dword ptr [RSP + 0x54],0x0 LAB_0014a7f1: MOV EAX,dword ptr [RSP + 0x54] CMP EAX,dword ptr [RSP + 0x50] JGE 0x0014a851 MOV RDI,qword ptr [RSP + 0x58] MOV RAX,qword ptr [RSP + 0x48] MOVSXD RCX,dword ptr [RSP + 0x54] MOV EDX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x40] MOVSXD RCX,dword ptr [RSP + 0x54] MOV ECX,dword ptr [RAX + RCX*0x4] MOV RAX,qword ptr [RSP + 0x38] MOVSXD RSI,dword ptr [RSP + 0x54] MOV R8D,dword ptr [RAX + RSI*0x4] MOV RAX,qword ptr [RSP + 0x30] MOVSXD RSI,dword ptr [RSP + 0x54] MOV R9D,dword ptr [RAX + RSI*0x4] LEA RSI,[0x17295c] MOV AL,0x0 CALL 0x00107300 MOV EAX,dword ptr [RSP + 0x54] ADD EAX,0x1 MOV dword ptr [RSP + 0x54],EAX JMP 0x0014a7f1 LAB_0014a851: JMP 0x0014a853 LAB_0014a853: MOV RDI,qword ptr [RSP + 0x28] CALL 0x0014a6d0 CMP EAX,0x0 JZ 0x0014a88b MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x10],RAX CALL 0x0014a6b0 MOV RDI,qword ptr [RSP + 0x10] MOV EDX,EAX LEA RSI,[0x172976] MOV AL,0x0 CALL 0x00107300 LAB_0014a88b: MOV RDI,qword ptr [RSP + 0x28] CALL 0x0014a6e0 CMP EAX,0x0 JZ 0x0014a8c3 MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP + 0x8],RAX CALL 0x0014a6c0 MOV RDI,qword ptr [RSP + 0x8] MOV EDX,EAX LEA RSI,[0x172982] MOV AL,0x0 CALL 0x00107300 LAB_0014a8c3: MOV RDI,qword ptr [RSP + 0x28] CALL 0x0014a6f0 CMP EAX,0x0 JZ 0x0014a8f9 MOV RDI,qword ptr [RSP + 0x28] MOV RAX,qword ptr [RSP + 0x58] MOV qword ptr [RSP],RAX CALL 0x0014a6a0 MOV RDI,qword ptr [RSP] MOV EDX,EAX LEA RSI,[0x17298e] MOV AL,0x0 CALL 0x00107300 LAB_0014a8f9: ADD RSP,0x68 RET
/* LefDefParser::defiGroup::print(_IO_FILE*) const */ void __thiscall LefDefParser::defiGroup::print(defiGroup *this,_IO_FILE *param_1) { long lVar1; long lVar2; long lVar3; long lVar4; int iVar5; uint uVar6; int8 uVar7; int local_14; uVar7 = name(this); fprintf(param_1,"Group \'%s\'\n",uVar7); iVar5 = hasRegionName(this); if (iVar5 != 0) { uVar7 = regionName(this); fprintf(param_1," region name \'%s\'\n",uVar7); } iVar5 = hasRegionBox(this); if (iVar5 != 0) { iVar5 = *(int *)(this + 0x20); lVar1 = *(long *)(this + 0x28); lVar2 = *(long *)(this + 0x30); lVar3 = *(long *)(this + 0x38); lVar4 = *(long *)(this + 0x40); for (local_14 = 0; local_14 < iVar5; local_14 = local_14 + 1) { fprintf(param_1," region box %d,%d %d,%d\n",(ulong)*(uint *)(lVar1 + (long)local_14 * 4), (ulong)*(uint *)(lVar2 + (long)local_14 * 4), (ulong)*(uint *)(lVar3 + (long)local_14 * 4), (ulong)*(uint *)(lVar4 + (long)local_14 * 4)); } } iVar5 = hasMaxX(this); if (iVar5 != 0) { uVar6 = maxX(this); fprintf(param_1," max x %d\n",(ulong)uVar6); } iVar5 = hasMaxY(this); if (iVar5 != 0) { uVar6 = maxY(this); fprintf(param_1," max y %d\n",(ulong)uVar6); } iVar5 = hasPerim(this); if (iVar5 != 0) { uVar6 = perim(this); fprintf(param_1," perim %d\n",(ulong)uVar6); } return; }
7,994
my_wc_mb_gb2312
eloqsql/strings/ctype-gb2312.c
static int my_wc_mb_gb2312(CHARSET_INFO *cs __attribute__((unused)), my_wc_t wc, uchar *s, uchar *e) { int code; if (s >= e) return MY_CS_TOOSMALL; if ((uint) wc < 0x80) { s[0]= (uchar) wc; return 1; } if (!(code=func_uni_gb2312_onechar(wc))) return MY_CS_ILUNI; if (s+2>e) return MY_CS_TOOSMALL2; code|=0x8080; s[0]=code>>8; s[1]=code&0xFF; return 2; }
O3
c
my_wc_mb_gb2312: movl $0xffffff9b, %eax # imm = 0xFFFFFF9B cmpq %rcx, %rdx jae 0x347f4 cmpl $0x7f, %esi ja 0x347f5 movb %sil, (%rdx) movl $0x1, %eax retq leal -0xa4(%rsi), %eax cmpl $0x138, %eax # imm = 0x138 ja 0x34810 movl %eax, %eax leaq 0x13a375(%rip), %rsi # 0x16eb80 jmp 0x348eb leal -0x2c7(%rsi), %eax cmpl $0x18a, %eax # imm = 0x18A ja 0x3482b movl %eax, %eax leaq 0x13a5da(%rip), %rsi # 0x16ee00 jmp 0x348eb leal -0x2015(%rsi), %eax cmpl $0x2fd, %eax # imm = 0x2FD ja 0x34846 movl %eax, %eax leaq 0x13a8df(%rip), %rsi # 0x16f120 jmp 0x348eb leal -0x2460(%rsi), %eax cmpl $0x1e2, %eax # imm = 0x1E2 ja 0x34861 movl %eax, %eax leaq 0x13aec4(%rip), %rsi # 0x16f720 jmp 0x348eb leal -0x3000(%rsi), %eax cmpl $0x129, %eax # imm = 0x129 ja 0x34879 movl %eax, %eax leaq 0x13b279(%rip), %rsi # 0x16faf0 jmp 0x348eb leal -0x3220(%rsi), %eax cmpl $0x9, %eax ja 0x3488f movl %eax, %eax leaq 0x13b4c3(%rip), %rsi # 0x16fd50 jmp 0x348eb leal -0x4e00(%rsi), %eax cmpl $0x4d54, %eax # imm = 0x4D54 ja 0x348a7 movl %eax, %eax leaq 0x13b4cb(%rip), %rsi # 0x16fd70 jmp 0x348eb leal -0x9c7c(%rsi), %eax cmpl $0x66, %eax ja 0x348bd movl %eax, %eax leaq 0x144f65(%rip), %rsi # 0x179820 jmp 0x348eb leal -0x9e1f(%rsi), %eax cmpl $0x181, %eax # imm = 0x181 ja 0x348d5 movl %eax, %eax leaq 0x14501d(%rip), %rsi # 0x1798f0 jmp 0x348eb leal -0xff01(%rsi), %eax cmpl $0xe4, %eax ja 0x34921 movl %eax, %eax leaq 0x145315(%rip), %rsi # 0x179c00 leaq (%rsi,%rax,2), %rax pushq %rbp movq %rsp, %rbp movzwl (%rax), %esi testw %si, %si je 0x3491d leaq 0x2(%rdx), %rdi movl $0xffffff9a, %eax # imm = 0xFFFFFF9A cmpq %rcx, %rdi ja 0x3491f orl $0x8080, %esi # imm = 0x8080 rolw $0x8, %si movw %si, (%rdx) movl $0x2, %eax jmp 0x3491f xorl %eax, %eax popq %rbp retq xorl %eax, %eax retq
my_wc_mb_gb2312: mov eax, 0FFFFFF9Bh cmp rdx, rcx jnb short locret_347F4 cmp esi, 7Fh ja short loc_347F5 mov [rdx], sil mov eax, 1 locret_347F4: retn loc_347F5: lea eax, [rsi-0A4h] cmp eax, 138h ja short loc_34810 mov eax, eax lea rsi, tab_uni_gb23120 jmp loc_348EB loc_34810: lea eax, [rsi-2C7h] cmp eax, 18Ah ja short loc_3482B mov eax, eax lea rsi, tab_uni_gb23121 jmp loc_348EB loc_3482B: lea eax, [rsi-2015h] cmp eax, 2FDh ja short loc_34846 mov eax, eax lea rsi, tab_uni_gb23122; "*!,!" jmp loc_348EB loc_34846: lea eax, [rsi-2460h] cmp eax, 1E2h ja short loc_34861 mov eax, eax lea rsi, tab_uni_gb23123; "Y\"Z\"[\"\\\"]\"^\"_\"`\"a\"b\"" jmp loc_348EB loc_34861: lea eax, [rsi-3000h] cmp eax, 129h ja short loc_34879 mov eax, eax lea rsi, tab_uni_gb23124; "!!\"!#!(!" jmp short loc_348EB loc_34879: lea eax, [rsi-3220h] cmp eax, 9 ja short loc_3488F mov eax, eax lea rsi, tab_uni_gb23125; "e\"f\"g\"h\"i\"j\"k\"l\"m\"n\"" jmp short loc_348EB loc_3488F: lea eax, [rsi-4E00h] cmp eax, 4D54h ja short loc_348A7 mov eax, eax lea rsi, tab_uni_gb23126; ";R!6" jmp short loc_348EB loc_348A7: lea eax, [rsi-9C7Ch] cmp eax, 66h ; 'f' ja short loc_348BD mov eax, eax lea rsi, tab_uni_gb23127 jmp short loc_348EB loc_348BD: lea eax, [rsi-9E1Fh] cmp eax, 181h ja short loc_348D5 mov eax, eax lea rsi, tab_uni_gb23128; "qD/p&<0pyC" jmp short loc_348EB loc_348D5: lea eax, [rsi-0FF01h] cmp eax, 0E4h ja short loc_34921 mov eax, eax lea rsi, tab_uni_gb23129; "!#\"###g!%#&#'#(#)#*#+#,#-#.#/#0#1#2#3#"... loc_348EB: lea rax, [rsi+rax*2] push rbp mov rbp, rsp movzx esi, word ptr [rax] test si, si jz short loc_3491D lea rdi, [rdx+2] mov eax, 0FFFFFF9Ah cmp rdi, rcx ja short loc_3491F or esi, 8080h rol si, 8 mov [rdx], si mov eax, 2 jmp short loc_3491F loc_3491D: xor eax, eax loc_3491F: pop rbp retn loc_34921: xor eax, eax retn
long long my_wc_mb_gb2312(long long a1, unsigned int a2, _WORD *a3, unsigned long long a4) { long long result; // rax long long v5; // rax const char *v6; // rsi __int16 v7; // si result = 4294967195LL; if ( (unsigned long long)a3 < a4 ) { if ( a2 > 0x7F ) { LODWORD(v5) = a2 - 164; if ( a2 - 164 > 0x138 ) { LODWORD(v5) = a2 - 711; if ( a2 - 711 > 0x18A ) { LODWORD(v5) = a2 - 8213; if ( a2 - 8213 > 0x2FD ) { LODWORD(v5) = a2 - 9312; if ( a2 - 9312 > 0x1E2 ) { LODWORD(v5) = a2 - 12288; if ( a2 - 12288 > 0x129 ) { LODWORD(v5) = a2 - 12832; if ( a2 - 12832 > 9 ) { LODWORD(v5) = a2 - 19968; if ( a2 - 19968 > 0x4D54 ) { LODWORD(v5) = a2 - 40060; if ( a2 - 40060 > 0x66 ) { LODWORD(v5) = a2 - 40479; if ( a2 - 40479 > 0x181 ) { LODWORD(v5) = a2 - 65281; if ( a2 - 65281 > 0xE4 ) return 0LL; v5 = (unsigned int)v5; v6 = "!#\"###g!%#&#'#(#)#*#+#,#-#.#/#0#1#2#3#4#5#6#7#8#9#:#;#<#=#>#?#@#A#B#C#D#E#F#G#H#I#J#K#L#M#" "N#O#P#Q#R#S#T#U#V#W#X#Y#Z#[#\\#]#^#_#`#a#b#c#d#e#f#g#h#i#j#k#l#m#n#o#p#q#r#s#t#u#v#w#x#y#z#{#|#}#+!"; } else { v5 = (unsigned int)v5; v6 = "qD/p&<0pyC"; } } else { v5 = (unsigned int)v5; v6 = (const char *)&tab_uni_gb23127; } } else { v5 = (unsigned int)v5; v6 = ";R!6"; } } else { v5 = (unsigned int)v5; v6 = "e\"f\"g\"h\"i\"j\"k\"l\"m\"n\""; } } else { v5 = (unsigned int)v5; v6 = "!!\"!#!(!"; } } else { v5 = (unsigned int)v5; v6 = "Y\"Z\"[\"\\\"]\"^\"_\"`\"a\"b\""; } } else { v5 = (unsigned int)v5; v6 = "*!,!"; } } else { v5 = (unsigned int)v5; v6 = (const char *)&tab_uni_gb23121; } } else { v5 = (unsigned int)v5; v6 = (const char *)&tab_uni_gb23120; } v7 = *(_WORD *)&v6[2 * v5]; if ( v7 ) { result = 4294967194LL; if ( (unsigned long long)(a3 + 1) <= a4 ) { *a3 = __ROL2__(v7 | 0x8080, 8); return 2LL; } } else { return 0LL; } } else { *(_BYTE *)a3 = a2; return 1LL; } } return result; }
my_wc_mb_gb2312: MOV EAX,0xffffff9b CMP RDX,RCX JNC 0x001347f4 CMP ESI,0x7f JA 0x001347f5 MOV byte ptr [RDX],SIL MOV EAX,0x1 LAB_001347f4: RET LAB_001347f5: LEA EAX,[RSI + -0xa4] CMP EAX,0x138 JA 0x00134810 MOV EAX,EAX LEA RSI,[0x26eb80] JMP 0x001348eb LAB_00134810: LEA EAX,[RSI + -0x2c7] CMP EAX,0x18a JA 0x0013482b MOV EAX,EAX LEA RSI,[0x26ee00] JMP 0x001348eb LAB_0013482b: LEA EAX,[RSI + -0x2015] CMP EAX,0x2fd JA 0x00134846 MOV EAX,EAX LEA RSI,[0x26f120] JMP 0x001348eb LAB_00134846: LEA EAX,[RSI + -0x2460] CMP EAX,0x1e2 JA 0x00134861 MOV EAX,EAX LEA RSI,[0x26f720] JMP 0x001348eb LAB_00134861: LEA EAX,[RSI + -0x3000] CMP EAX,0x129 JA 0x00134879 MOV EAX,EAX LEA RSI,[0x26faf0] JMP 0x001348eb LAB_00134879: LEA EAX,[RSI + -0x3220] CMP EAX,0x9 JA 0x0013488f MOV EAX,EAX LEA RSI,[0x26fd50] JMP 0x001348eb LAB_0013488f: LEA EAX,[RSI + -0x4e00] CMP EAX,0x4d54 JA 0x001348a7 MOV EAX,EAX LEA RSI,[0x26fd70] JMP 0x001348eb LAB_001348a7: LEA EAX,[RSI + -0x9c7c] CMP EAX,0x66 JA 0x001348bd MOV EAX,EAX LEA RSI,[0x279820] JMP 0x001348eb LAB_001348bd: LEA EAX,[RSI + -0x9e1f] CMP EAX,0x181 JA 0x001348d5 MOV EAX,EAX LEA RSI,[0x2798f0] JMP 0x001348eb LAB_001348d5: LEA EAX,[RSI + -0xff01] CMP EAX,0xe4 JA 0x00134921 MOV EAX,EAX LEA RSI,[0x279c00] LAB_001348eb: LEA RAX,[RSI + RAX*0x2] PUSH RBP MOV RBP,RSP MOVZX ESI,word ptr [RAX] TEST SI,SI JZ 0x0013491d LEA RDI,[RDX + 0x2] MOV EAX,0xffffff9a CMP RDI,RCX JA 0x0013491f OR ESI,0x8080 ROL SI,0x8 MOV word ptr [RDX],SI MOV EAX,0x2 JMP 0x0013491f LAB_0013491d: XOR EAX,EAX LAB_0013491f: POP RBP RET LAB_00134921: XOR EAX,EAX RET
int8 my_wc_mb_gb2312(int8 param_1,uint param_2,ushort *param_3,ushort *param_4) { int8 uVar1; ulong uVar2; ushort uVar3; int1 *puVar4; uVar1 = 0xffffff9b; if (param_3 < param_4) { if (0x7f < param_2) { if (param_2 - 0xa4 < 0x139) { uVar2 = (ulong)(param_2 - 0xa4); puVar4 = tab_uni_gb23120; } else if (param_2 - 0x2c7 < 0x18b) { uVar2 = (ulong)(param_2 - 0x2c7); puVar4 = tab_uni_gb23121; } else if (param_2 - 0x2015 < 0x2fe) { uVar2 = (ulong)(param_2 - 0x2015); puVar4 = tab_uni_gb23122; } else if (param_2 - 0x2460 < 0x1e3) { uVar2 = (ulong)(param_2 - 0x2460); puVar4 = tab_uni_gb23123; } else if (param_2 - 0x3000 < 0x12a) { uVar2 = (ulong)(param_2 - 0x3000); puVar4 = tab_uni_gb23124; } else if (param_2 - 0x3220 < 10) { uVar2 = (ulong)(param_2 - 0x3220); puVar4 = tab_uni_gb23125; } else if (param_2 - 0x4e00 < 0x4d55) { uVar2 = (ulong)(param_2 - 0x4e00); puVar4 = &tab_uni_gb23126; } else if (param_2 - 0x9c7c < 0x67) { uVar2 = (ulong)(param_2 - 0x9c7c); puVar4 = tab_uni_gb23127; } else if (param_2 - 0x9e1f < 0x182) { uVar2 = (ulong)(param_2 - 0x9e1f); puVar4 = tab_uni_gb23128; } else { uVar2 = (ulong)(param_2 - 0xff01); if (0xe4 < param_2 - 0xff01) { return 0; } puVar4 = tab_uni_gb23129; } if (*(ushort *)(puVar4 + uVar2 * 2) == 0) { uVar1 = 0; } else { uVar1 = 0xffffff9a; if (param_3 + 1 <= param_4) { uVar3 = *(ushort *)(puVar4 + uVar2 * 2) | 0x8080; *param_3 = uVar3 << 8 | uVar3 >> 8; uVar1 = 2; } } return uVar1; } *(char *)param_3 = (char)param_2; uVar1 = 1; } return uVar1; }
7,995
stbi__hdr_load(stbi__context*, int*, int*, int*, int, stbi__result_info*)
monkey531[P]llama/examples/llava/../../common/stb_image.h
static float *stbi__hdr_load(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri) { char buffer[STBI__HDR_BUFLEN]; char *token; int valid = 0; int width, height; stbi_uc *scanline; float *hdr_data; int len; unsigned char count, value; int i, j, k, c1,c2, z; const char *headerToken; STBI_NOTUSED(ri); // Check identifier headerToken = stbi__hdr_gettoken(s,buffer); if (strcmp(headerToken, "#?RADIANCE") != 0 && strcmp(headerToken, "#?RGBE") != 0) return stbi__errpf("not HDR", "Corrupt HDR image"); // Parse header for(;;) { token = stbi__hdr_gettoken(s,buffer); if (token[0] == 0) break; if (strcmp(token, "FORMAT=32-bit_rle_rgbe") == 0) valid = 1; } if (!valid) return stbi__errpf("unsupported format", "Unsupported HDR format"); // Parse width and height // can't use sscanf() if we're not using stdio! token = stbi__hdr_gettoken(s,buffer); if (strncmp(token, "-Y ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); token += 3; height = (int) strtol(token, &token, 10); while (*token == ' ') ++token; if (strncmp(token, "+X ", 3)) return stbi__errpf("unsupported data layout", "Unsupported HDR format"); token += 3; width = (int) strtol(token, NULL, 10); if (height > STBI_MAX_DIMENSIONS) return stbi__errpf("too large","Very large image (corrupt?)"); if (width > STBI_MAX_DIMENSIONS) return stbi__errpf("too large","Very large image (corrupt?)"); *x = width; *y = height; if (comp) *comp = 3; if (req_comp == 0) req_comp = 3; if (!stbi__mad4sizes_valid(width, height, req_comp, sizeof(float), 0)) return stbi__errpf("too large", "HDR image is too large"); // Read data hdr_data = (float *) stbi__malloc_mad4(width, height, req_comp, sizeof(float), 0); if (!hdr_data) return stbi__errpf("outofmem", "Out of memory"); // Load image data // image data is stored as some number of sca if ( width < 8 || width >= 32768) { // Read flat data for (j=0; j < height; ++j) { for (i=0; i < width; ++i) { stbi_uc rgbe[4]; main_decode_loop: stbi__getn(s, rgbe, 4); stbi__hdr_convert(hdr_data + j * width * req_comp + i * req_comp, rgbe, req_comp); } } } else { // Read RLE-encoded data scanline = NULL; for (j = 0; j < height; ++j) { c1 = stbi__get8(s); c2 = stbi__get8(s); len = stbi__get8(s); if (c1 != 2 || c2 != 2 || (len & 0x80)) { // not run-length encoded, so we have to actually use THIS data as a decoded // pixel (note this can't be a valid pixel--one of RGB must be >= 128) stbi_uc rgbe[4]; rgbe[0] = (stbi_uc) c1; rgbe[1] = (stbi_uc) c2; rgbe[2] = (stbi_uc) len; rgbe[3] = (stbi_uc) stbi__get8(s); stbi__hdr_convert(hdr_data, rgbe, req_comp); i = 1; j = 0; STBI_FREE(scanline); goto main_decode_loop; // yes, this makes no sense } len <<= 8; len |= stbi__get8(s); if (len != width) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("invalid decoded scanline length", "corrupt HDR"); } if (scanline == NULL) { scanline = (stbi_uc *) stbi__malloc_mad2(width, 4, 0); if (!scanline) { STBI_FREE(hdr_data); return stbi__errpf("outofmem", "Out of memory"); } } for (k = 0; k < 4; ++k) { int nleft; i = 0; while ((nleft = width - i) > 0) { count = stbi__get8(s); if (count > 128) { // Run value = stbi__get8(s); count -= 128; if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } for (z = 0; z < count; ++z) scanline[i++ * 4 + k] = value; } else { // Dump if ((count == 0) || (count > nleft)) { STBI_FREE(hdr_data); STBI_FREE(scanline); return stbi__errpf("corrupt", "bad RLE data in HDR"); } for (z = 0; z < count; ++z) scanline[i++ * 4 + k] = stbi__get8(s); } } } for (i=0; i < width; ++i) stbi__hdr_convert(hdr_data+(j*width + i)*req_comp, scanline + i*4, req_comp); } if (scanline) STBI_FREE(scanline); } return hdr_data; }
O2
c
stbi__hdr_load(stbi__context*, int*, int*, int*, int, stbi__result_info*): pushq %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x478, %rsp # imm = 0x478 movl %r8d, %ebp movq %rcx, %r15 movq %rdx, %r12 movq %rsi, %r13 movq %rdi, %rbx leaq 0x70(%rsp), %r14 movq %r14, %rsi callq 0x42047 leaq 0x8bb4e(%rip), %rsi # 0xc880a pushq $0xb popq %rdx movq %r14, %rdi callq 0x26cd0 testl %eax, %eax je 0x3ccfb leaq 0x8bb43(%rip), %rsi # 0xc8815 leaq 0x70(%rsp), %rdi pushq $0x7 popq %rdx callq 0x26cd0 testl %eax, %eax je 0x3ccfb movq %fs:0x0, %rax leaq 0x8bb26(%rip), %rcx # 0xc881c jmp 0x3d069 movq %r13, (%rsp) movq %r12, 0x8(%rsp) movq %r15, 0x18(%rsp) movl %ebp, 0x10(%rsp) xorl %r12d, %r12d leaq 0x70(%rsp), %r14 leaq 0x8bb08(%rip), %r15 # 0xc8824 pushq $0x17 popq %r13 pushq $0x1 popq %rbp movq %rbx, %rdi movq %r14, %rsi callq 0x42047 cmpb $0x0, 0x70(%rsp) je 0x3cd4b movq %r14, %rdi movq %r15, %rsi movq %r13, %rdx callq 0x26cd0 testl %eax, %eax cmovel %ebp, %r12d jmp 0x3cd23 testl %r12d, %r12d je 0x3d056 leaq 0x70(%rsp), %r14 movq %rbx, %rdi movq %r14, %rsi callq 0x42047 leaq 0x8bae3(%rip), %rsi # 0xc884e pushq $0x3 popq %rdx movq %r14, %rdi callq 0x26cd0 testl %eax, %eax jne 0x3d041 leaq 0x73(%rsp), %rdi leaq 0x60(%rsp), %r15 movq %rdi, (%r15) pushq $0xa popq %rdx movq %r15, %rsi callq 0x279c0 movq %rax, %r13 movq (%r15), %rdi addq $0x2, %rdi movb -0x2(%rdi), %al incq %rdi cmpb $0x20, %al je 0x3cda0 cmpb $0x2b, %al jne 0x3d041 cmpb $0x58, -0x2(%rdi) jne 0x3d041 cmpb $0x20, -0x1(%rdi) jne 0x3d041 movq %rdi, 0x60(%rsp) pushq $0xa popq %rdx xorl %esi, %esi callq 0x279c0 cmpl $0x1000001, %r13d # imm = 0x1000001 jge 0x3d088 movq %rax, %r12 cmpl $0x1000001, %r12d # imm = 0x1000001 jge 0x3d088 movq (%rsp), %rax movl %r12d, (%rax) movq 0x8(%rsp), %rax movl %r13d, (%rax) movq 0x18(%rsp), %rax testq %rax, %rax je 0x3ce11 movl $0x3, (%rax) movl 0x10(%rsp), %eax testl %eax, %eax pushq $0x3 popq %r14 cmovnel %eax, %r14d pushq $0x4 popq %rcx movl %r12d, %edi movl %r13d, %esi movl %r14d, %edx callq 0x41eac testl %eax, %eax je 0x3d088 pushq $0x4 popq %rcx movl %r12d, %edi movl %r13d, %esi movl %r14d, %edx callq 0x41f1a testq %rax, %rax je 0x3d13a movq %rax, %r15 movl %r14d, 0x8(%rsp) leal -0x8000(%r12), %eax xorl %r14d, %r14d cmpl $0xffff8008, %eax # imm = 0xFFFF8008 movq %r12, 0x10(%rsp) jb 0x3d155 movslq 0x8(%rsp), %rax xorl %ecx, %ecx testl %r13d, %r13d movl $0x0, %edx cmovgl %r13d, %edx movl %r12d, %esi movq %rax, %rdi imulq %rsi, %rdi shlq $0x2, %rsi movq %rsi, 0x58(%rsp) shlq $0x2, %rdi movq %rdi, 0x30(%rsp) shlq $0x2, %rax movq %rax, 0x50(%rsp) movq %r15, 0x20(%rsp) movq $0x0, (%rsp) movq %rdx, 0x38(%rsp) cmpq %rdx, %rcx je 0x3d0c3 movq %rcx, 0x40(%rsp) movq %rbx, %rdi callq 0x3d20c movl %eax, %r14d movq %rbx, %rdi callq 0x3d20c movl %eax, %r12d movq %rbx, %rdi callq 0x3d20c cmpb $0x2, %r14b jne 0x3d0ce cmpb $0x2, %r12b jne 0x3d0ce testb %al, %al js 0x3d0ce movzbl %al, %r14d shll $0x8, %r14d movq %rbx, %rdi callq 0x3d20c movzbl %al, %eax orl %r14d, %eax movq 0x10(%rsp), %rdi cmpl %edi, %eax jne 0x3d109 movq (%rsp), %rax testq %rax, %rax jne 0x3cf46 pushq $0x4 popq %rsi xorl %edx, %edx callq 0x3ef6e testq %rax, %rax je 0x3d132 movq %r13, 0x28(%rsp) movq %rax, (%rsp) movq %rax, %r12 xorl %eax, %eax movq %rax, 0x48(%rsp) cmpq $0x4, %rax je 0x3cfed xorl %r13d, %r13d movq 0x10(%rsp), %rax subl %r13d, %eax jle 0x3cfdd movl %eax, 0x18(%rsp) movq %rbx, %rdi callq 0x3d20c movzbl %al, %r14d cmpb $-0x7f, %r14b jb 0x3cfaf movq %rbx, %rdi callq 0x3d20c andl $0x7f, %r14d cmpl %r14d, 0x18(%rsp) jb 0x3d09d movslq %r13d, %r13 subl $0x1, %r14d jb 0x3cf66 movb %al, (%r12,%r13,4) incq %r13 jmp 0x3cfa0 testl %r14d, %r14d je 0x3d09d cmpl %r14d, 0x18(%rsp) jb 0x3d09d movslq %r13d, %r13 subl $0x1, %r14d jb 0x3cf66 movq %rbx, %rdi callq 0x3d20c movb %al, (%r12,%r13,4) incq %r13 jmp 0x3cfc6 movq 0x48(%rsp), %rax incq %rax incq %r12 jmp 0x3cf54 movq 0x20(%rsp), %r12 xorl %r14d, %r14d movq (%rsp), %r13 cmpq %r14, 0x58(%rsp) je 0x3d01b leaq (%r14,%r13), %rsi movq %r12, %rdi movl 0x8(%rsp), %edx callq 0x420b4 addq $0x4, %r14 addq 0x50(%rsp), %r12 jmp 0x3cff9 movq 0x40(%rsp), %rcx incq %rcx movq 0x20(%rsp), %rax addq 0x30(%rsp), %rax movq %rax, 0x20(%rsp) movq 0x28(%rsp), %r13 movq 0x38(%rsp), %rdx jmp 0x3cebf movq %fs:0x0, %rax leaq 0x8b7fe(%rip), %rcx # 0xc8852 jmp 0x3d069 movq %fs:0x0, %rax leaq 0x8b7d2(%rip), %rcx # 0xc883b movq %rcx, -0x20(%rax) xorl %r15d, %r15d movq %r15, %rax addq $0x478, %rsp # imm = 0x478 popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq movq %fs:0x0, %rax leaq 0x8b329(%rip), %rcx # 0xc83c4 jmp 0x3d069 movq %r15, %rdi callq 0x26ea0 movq (%rsp), %rdi callq 0x26ea0 movq %fs:0x0, %rax leaq 0x8b7f9(%rip), %rcx # 0xc88ba jmp 0x3d069 movq (%rsp), %rdi callq 0x26ea0 jmp 0x3d073 leaq 0x68(%rsp), %rcx movb %r14b, (%rcx) movb %r12b, 0x1(%rcx) movb %al, 0x2(%rcx) movq %rcx, %r14 movq %rbx, %rdi callq 0x3d20c movb %al, 0x3(%r14) movq %r15, %rdi movq %r14, %rsi movl 0x8(%rsp), %edx callq 0x420b4 movq (%rsp), %rdi callq 0x26ea0 xorl %r14d, %r14d jmp 0x3d168 movq %r15, %rdi callq 0x26ea0 movq (%rsp), %rdi callq 0x26ea0 movq %fs:0x0, %rax leaq 0x8b73d(%rip), %rcx # 0xc886a jmp 0x3d069 movq %r15, %rdi callq 0x26ea0 movq %fs:0x0, %rax leaq 0x8b356(%rip), %rcx # 0xc84a3 jmp 0x3d069 incl %r14d movl $0x0, %ebp cmpl %r13d, %r14d jge 0x3d073 cmpl %r12d, %ebp jge 0x3d152 leaq 0x6c(%rsp), %r12 pushq $0x4 popq %rdx movq %rbx, %rdi movq %r12, %rsi callq 0x3e843 movl 0x8(%rsp), %edx movl %edx, %eax movq 0x10(%rsp), %r8 imull %r8d, %eax imull %r14d, %eax cltq leaq (%r15,%rax,4), %rax movl %ebp, %ecx imull %edx, %ecx movslq %ecx, %rcx leaq (%rax,%rcx,4), %rdi movq %r12, %rsi movq %r8, %r12 callq 0x420b4 incl %ebp jmp 0x3d163
_ZL14stbi__hdr_loadP13stbi__contextPiS1_S1_iP17stbi__result_info: push rbp push r15 push r14 push r13 push r12 push rbx sub rsp, 478h mov ebp, r8d mov r15, rcx mov r12, rdx mov r13, rsi mov rbx, rdi lea r14, [rsp+4A8h+var_438] mov rsi, r14 call _ZL18stbi__hdr_gettokenP13stbi__contextPc; stbi__hdr_gettoken(stbi__context *,char *) lea rsi, aRadiance_0; "#?RADIANCE" push 0Bh pop rdx mov rdi, r14 call _bcmp test eax, eax jz short loc_3CCFB lea rsi, aRgbe_0; "#?RGBE" lea rdi, [rsp+4A8h+var_438] push 7 pop rdx call _bcmp test eax, eax jz short loc_3CCFB mov rax, fs:0 lea rcx, aNotHdr; "not HDR" jmp loc_3D069 loc_3CCFB: mov [rsp+4A8h+var_4A8], r13 mov qword ptr [rsp+4A8h+var_4A0], r12 mov [rsp+4A8h+var_490], r15 mov [rsp+4A8h+var_498], ebp xor r12d, r12d lea r14, [rsp+4A8h+var_438] lea r15, aFormat32BitRle; "FORMAT=32-bit_rle_rgbe" push 17h pop r13 push 1 pop rbp loc_3CD23: mov rdi, rbx mov rsi, r14 call _ZL18stbi__hdr_gettokenP13stbi__contextPc; stbi__hdr_gettoken(stbi__context *,char *) cmp [rsp+4A8h+var_438], 0 jz short loc_3CD4B mov rdi, r14 mov rsi, r15 mov rdx, r13 call _bcmp test eax, eax cmovz r12d, ebp jmp short loc_3CD23 loc_3CD4B: test r12d, r12d jz loc_3D056 lea r14, [rsp+4A8h+var_438] mov rdi, rbx mov rsi, r14 call _ZL18stbi__hdr_gettokenP13stbi__contextPc; stbi__hdr_gettoken(stbi__context *,char *) lea rsi, aY; "-Y " push 3 pop rdx mov rdi, r14 call _bcmp test eax, eax jnz loc_3D041 lea rdi, [rsp+4A8h+var_435] lea r15, [rsp+4A8h+var_448] mov [r15], rdi push 0Ah pop rdx mov rsi, r15 call strtol mov r13, rax mov rdi, [r15] add rdi, 2 loc_3CDA0: mov al, [rdi-2] inc rdi cmp al, 20h ; ' ' jz short loc_3CDA0 cmp al, 2Bh ; '+' jnz loc_3D041 cmp byte ptr [rdi-2], 58h ; 'X' jnz loc_3D041 cmp byte ptr [rdi-1], 20h ; ' ' jnz loc_3D041 mov [rsp+4A8h+var_448], rdi push 0Ah pop rdx xor esi, esi call strtol cmp r13d, 1000001h jge loc_3D088 mov r12, rax cmp r12d, 1000001h jge loc_3D088 mov rax, [rsp+4A8h+var_4A8] mov [rax], r12d mov rax, qword ptr [rsp+4A8h+var_4A0] mov [rax], r13d mov rax, [rsp+4A8h+var_490] test rax, rax jz short loc_3CE11 mov dword ptr [rax], 3 loc_3CE11: mov eax, [rsp+4A8h+var_498] test eax, eax push 3 pop r14 cmovnz r14d, eax push 4 pop rcx; int mov edi, r12d; int mov esi, r13d; int mov edx, r14d; int call _ZL21stbi__mad4sizes_validiiiii; stbi__mad4sizes_valid(int,int,int,int,int) test eax, eax jz loc_3D088 push 4 pop rcx; int mov edi, r12d; int mov esi, r13d; int mov edx, r14d; int call _ZL17stbi__malloc_mad4iiiii; stbi__malloc_mad4(int,int,int,int,int) test rax, rax jz loc_3D13A mov r15, rax mov [rsp+4A8h+var_4A0], r14d lea eax, [r12-8000h] xor r14d, r14d cmp eax, 0FFFF8008h mov qword ptr [rsp+4A8h+var_498], r12 jb loc_3D155 movsxd rax, [rsp+4A8h+var_4A0] xor ecx, ecx test r13d, r13d mov edx, 0 cmovg edx, r13d mov esi, r12d mov rdi, rax imul rdi, rsi shl rsi, 2 mov [rsp+4A8h+var_450], rsi shl rdi, 2 mov [rsp+4A8h+var_478], rdi shl rax, 2 mov [rsp+4A8h+var_458], rax mov [rsp+4A8h+var_488], r15 mov [rsp+4A8h+var_4A8], 0 mov [rsp+4A8h+var_470], rdx loc_3CEBF: cmp rcx, rdx jz loc_3D0C3 mov [rsp+4A8h+var_468], rcx mov rdi, rbx call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov r14d, eax mov rdi, rbx call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov r12d, eax mov rdi, rbx call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) cmp r14b, 2 jnz loc_3D0CE cmp r12b, 2 jnz loc_3D0CE test al, al js loc_3D0CE movzx r14d, al shl r14d, 8 mov rdi, rbx call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx eax, al or eax, r14d mov rdi, qword ptr [rsp+4A8h+var_498]; int cmp eax, edi jnz loc_3D109 mov rax, [rsp+4A8h+var_4A8] test rax, rax jnz short loc_3CF46 push 4 pop rsi; int xor edx, edx; int call _ZL17stbi__malloc_mad2iii; stbi__malloc_mad2(int,int,int) test rax, rax jz loc_3D132 loc_3CF46: mov [rsp+4A8h+var_480], r13 mov [rsp+4A8h+var_4A8], rax mov r12, rax xor eax, eax loc_3CF54: mov [rsp+4A8h+var_460], rax cmp rax, 4 jz loc_3CFED xor r13d, r13d loc_3CF66: mov rax, qword ptr [rsp+4A8h+var_498] sub eax, r13d jle short loc_3CFDD mov dword ptr [rsp+4A8h+var_490], eax mov rdi, rbx call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) movzx r14d, al cmp r14b, 81h jb short loc_3CFAF mov rdi, rbx call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) and r14d, 7Fh cmp dword ptr [rsp+4A8h+var_490], r14d jb loc_3D09D movsxd r13, r13d loc_3CFA0: sub r14d, 1 jb short loc_3CF66 mov [r12+r13*4], al inc r13 jmp short loc_3CFA0 loc_3CFAF: test r14d, r14d jz loc_3D09D cmp dword ptr [rsp+4A8h+var_490], r14d jb loc_3D09D movsxd r13, r13d loc_3CFC6: sub r14d, 1 jb short loc_3CF66 mov rdi, rbx call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov [r12+r13*4], al inc r13 jmp short loc_3CFC6 loc_3CFDD: mov rax, [rsp+4A8h+var_460] inc rax inc r12 jmp loc_3CF54 loc_3CFED: mov r12, [rsp+4A8h+var_488] xor r14d, r14d mov r13, [rsp+4A8h+var_4A8] loc_3CFF9: cmp [rsp+4A8h+var_450], r14 jz short loc_3D01B lea rsi, [r14+r13]; unsigned __int8 * mov rdi, r12; float * mov edx, [rsp+4A8h+var_4A0]; int call _ZL17stbi__hdr_convertPfPhi; stbi__hdr_convert(float *,uchar *,int) add r14, 4 add r12, [rsp+4A8h+var_458] jmp short loc_3CFF9 loc_3D01B: mov rcx, [rsp+4A8h+var_468] inc rcx mov rax, [rsp+4A8h+var_488] add rax, [rsp+4A8h+var_478] mov [rsp+4A8h+var_488], rax mov r13, [rsp+4A8h+var_480] mov rdx, [rsp+4A8h+var_470] jmp loc_3CEBF loc_3D041: mov rax, fs:0 lea rcx, aUnsupportedDat; "unsupported data layout" jmp short loc_3D069 loc_3D056: mov rax, fs:0 lea rcx, aUnsupportedFor; "unsupported format" loc_3D069: mov [rax-20h], rcx xor r15d, r15d loc_3D073: mov rax, r15 add rsp, 478h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn loc_3D088: mov rax, fs:0 lea rcx, aTooLarge; "too large" jmp short loc_3D069 loc_3D09D: mov rdi, r15 call _free mov rdi, [rsp+4A8h+var_4A8] call _free mov rax, fs:0 lea rcx, aZlibCorrupt+5; "corrupt" jmp short loc_3D069 loc_3D0C3: mov rdi, [rsp+4A8h+var_4A8] call _free jmp short loc_3D073 loc_3D0CE: lea rcx, [rsp+4A8h+var_440] mov [rcx], r14b mov [rcx+1], r12b mov [rcx+2], al mov r14, rcx mov rdi, rbx call _ZL10stbi__get8P13stbi__context; stbi__get8(stbi__context *) mov [r14+3], al mov rdi, r15; float * mov rsi, r14; unsigned __int8 * mov edx, [rsp+4A8h+var_4A0]; int call _ZL17stbi__hdr_convertPfPhi; stbi__hdr_convert(float *,uchar *,int) mov rdi, [rsp+4A8h+var_4A8] call _free xor r14d, r14d jmp short loc_3D168 loc_3D109: mov rdi, r15 call _free mov rdi, [rsp+4A8h+var_4A8] call _free mov rax, fs:0 lea rcx, aInvalidDecoded; "invalid decoded scanline length" jmp loc_3D069 loc_3D132: mov rdi, r15 call _free loc_3D13A: mov rax, fs:0 lea rcx, aOutofmem; "outofmem" jmp loc_3D069 loc_3D152: inc r14d loc_3D155: mov ebp, 0 cmp r14d, r13d jge loc_3D073 loc_3D163: cmp ebp, r12d jge short loc_3D152 loc_3D168: lea r12, [rsp+4A8h+var_43C] push 4 pop rdx mov rdi, rbx mov rsi, r12 call _ZL10stbi__getnP13stbi__contextPhi; stbi__getn(stbi__context *,uchar *,int) mov edx, [rsp+4A8h+var_4A0]; int mov eax, edx mov r8, qword ptr [rsp+4A8h+var_498] imul eax, r8d imul eax, r14d cdqe lea rax, [r15+rax*4] mov ecx, ebp imul ecx, edx movsxd rcx, ecx lea rdi, [rax+rcx*4]; float * mov rsi, r12; unsigned __int8 * mov r12, r8 call _ZL17stbi__hdr_convertPfPhi; stbi__hdr_convert(float *,uchar *,int) inc ebp jmp short loc_3D163
float * stbi__hdr_load(long long a1, int *a2, _DWORD *a3, _DWORD *a4, int a5) { unsigned long long v9; // rax char *v10; // rcx int v11; // r12d int v12; // ebp long long v13; // r13 _BYTE *v14; // rdi char v15; // al int v16; // eax int v17; // r8d unsigned int v18; // r12d int v19; // r14d int v20; // r8d long long v21; // rax float *v22; // r15 int v23; // r14d long long v24; // rcx long long v25; // rdx unsigned __int8 v26; // r14 unsigned __int8 v27; // r12 char v28; // al long long v29; // rax long long v30; // r12 long long v31; // rax long long k; // r13 unsigned __int8 v33; // al int v34; // r14d char v35; // al unsigned int v36; // r14d bool v37; // cf float *v38; // r12 long long j; // r14 long long v41; // [rsp+0h] [rbp-4A8h] _DWORD *v42; // [rsp+8h] [rbp-4A0h] int v43; // [rsp+8h] [rbp-4A0h] int v44; // [rsp+10h] [rbp-498h] int v45; // [rsp+10h] [rbp-498h] unsigned int v46; // [rsp+18h] [rbp-490h] float *v47; // [rsp+20h] [rbp-488h] long long v48; // [rsp+28h] [rbp-480h] long long v49; // [rsp+30h] [rbp-478h] long long i; // [rsp+38h] [rbp-470h] long long v51; // [rsp+40h] [rbp-468h] long long v52; // [rsp+48h] [rbp-460h] long long v53; // [rsp+58h] [rbp-450h] _BYTE *v54; // [rsp+60h] [rbp-448h] BYREF unsigned __int8 v55[4]; // [rsp+68h] [rbp-440h] BYREF unsigned __int8 v56[4]; // [rsp+6Ch] [rbp-43Ch] BYREF _BYTE v57[3]; // [rsp+70h] [rbp-438h] BYREF _BYTE v58[1077]; // [rsp+73h] [rbp-435h] BYREF stbi__hdr_gettoken(a1, v57); if ( (unsigned int)bcmp(v57, "#?RADIANCE", 11LL) && (unsigned int)bcmp(v57, "#?RGBE", 7LL) ) { v9 = __readfsqword(0); v10 = "not HDR"; } else { v42 = a3; v44 = a5; v11 = 0; v12 = 1; while ( 1 ) { stbi__hdr_gettoken(a1, v57); if ( !v57[0] ) break; if ( !(unsigned int)bcmp(v57, "FORMAT=32-bit_rle_rgbe", 23LL) ) v11 = 1; } if ( v11 ) { stbi__hdr_gettoken(a1, v57); if ( (unsigned int)bcmp(v57, "-Y ", 3LL) ) goto LABEL_54; v54 = v58; v13 = strtol(v58, &v54, 10LL); v14 = v54 + 2; do { v15 = *(v14 - 2); ++v14; } while ( v15 == 32 ); if ( v15 == 43 && *(v14 - 2) == 88 && *(v14 - 1) == 32 ) { v54 = v14; v16 = strtol(v14, 0LL, 10LL); if ( (int)v13 >= 16777217 ) goto LABEL_58; v18 = v16; if ( v16 >= 16777217 ) goto LABEL_58; *a2 = v16; *v42 = v13; if ( a4 ) *a4 = 3; v19 = 3; if ( v44 ) v19 = v44; if ( (unsigned int)stbi__mad4sizes_valid(v16, v13, v19, 4, v17) ) { v21 = stbi__malloc_mad4(v18, v13, v19, 4, v20); if ( v21 ) { v22 = (float *)v21; v43 = v19; v23 = 0; v45 = v18; if ( v18 - 0x8000 < 0xFFFF8008 ) goto LABEL_66; v24 = 0LL; v25 = 0LL; if ( (int)v13 > 0 ) v25 = (unsigned int)v13; v53 = 4LL * v18; v49 = 4 * v18 * (long long)v43; v47 = (float *)v21; v41 = 0LL; for ( i = v25; ; v25 = i ) { if ( v24 == v25 ) { free(v41); return v22; } v51 = v24; v26 = stbi__get8(a1); v27 = stbi__get8(a1); v28 = stbi__get8(a1); if ( v26 != 2 || v27 != 2 || v28 < 0 ) { v55[0] = v26; v55[1] = v27; v55[2] = v28; v55[3] = stbi__get8(a1); stbi__hdr_convert(v22, v55, v43); free(v41); v23 = 0; while ( 1 ) { stbi__getn(a1, v56, 4LL); v18 = v45; stbi__hdr_convert(&v22[v23 * v45 * v43 + v43 * v12++], v56, v43); while ( v12 >= (int)v18 ) { ++v23; LABEL_66: v12 = 0; if ( v23 >= (int)v13 ) return v22; } } } if ( (((unsigned __int8)v28 << 8) | (unsigned __int8)stbi__get8(a1)) != v45 ) { free(v22); free(v41); v9 = __readfsqword(0); v10 = "invalid decoded scanline length"; goto LABEL_56; } v29 = v41; if ( !v41 ) { v29 = stbi__malloc_mad2(v45, 4, 0); if ( !v29 ) { free(v22); goto LABEL_64; } } v48 = v13; v41 = v29; v30 = v29; v31 = 0LL; LABEL_36: v52 = v31; if ( v31 != 4 ) break; v38 = v47; for ( j = 0LL; v53 != j; j += 4LL ) { stbi__hdr_convert(v38, (unsigned __int8 *)(j + v41), v43); v38 += v43; } v24 = v51 + 1; v47 = (float *)((char *)v47 + v49); v13 = v48; } LODWORD(k) = 0; while ( 1 ) { while ( 1 ) { if ( v45 <= (int)k ) { v31 = v52 + 1; ++v30; goto LABEL_36; } v46 = v45 - k; v33 = stbi__get8(a1); v34 = v33; if ( v33 < 0x81u ) break; v35 = stbi__get8(a1); v36 = v34 & 0x7F; if ( v46 < v36 ) goto LABEL_59; for ( k = (int)k; ; ++k ) { v37 = v36-- == 0; if ( v37 ) break; *(_BYTE *)(v30 + 4 * k) = v35; } } if ( !v33 || v46 < v33 ) break; for ( k = (int)k; ; ++k ) { v37 = v34-- == 0; if ( v37 ) break; *(_BYTE *)(v30 + 4 * k) = stbi__get8(a1); } } LABEL_59: free(v22); free(v41); v9 = __readfsqword(0); v10 = "corrupt"; } else { LABEL_64: v9 = __readfsqword(0); v10 = "outofmem"; } } else { LABEL_58: v9 = __readfsqword(0); v10 = "too large"; } } else { LABEL_54: v9 = __readfsqword(0); v10 = "unsupported data layout"; } } else { v9 = __readfsqword(0); v10 = "unsupported format"; } } LABEL_56: *(_QWORD *)(v9 - 32) = v10; return 0LL; }
stbi__hdr_load: PUSH RBP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x478 MOV EBP,R8D MOV R15,RCX MOV R12,RDX MOV R13,RSI MOV RBX,RDI LEA R14,[RSP + 0x70] MOV RSI,R14 CALL 0x00142047 LEA RSI,[0x1c880a] PUSH 0xb POP RDX MOV RDI,R14 CALL 0x00126cd0 TEST EAX,EAX JZ 0x0013ccfb LEA RSI,[0x1c8815] LEA RDI,[RSP + 0x70] PUSH 0x7 POP RDX CALL 0x00126cd0 TEST EAX,EAX JZ 0x0013ccfb MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x1c881c] JMP 0x0013d069 LAB_0013ccfb: MOV qword ptr [RSP],R13 MOV qword ptr [RSP + 0x8],R12 MOV qword ptr [RSP + 0x18],R15 MOV dword ptr [RSP + 0x10],EBP XOR R12D,R12D LEA R14,[RSP + 0x70] LEA R15,[0x1c8824] PUSH 0x17 POP R13 PUSH 0x1 POP RBP LAB_0013cd23: MOV RDI,RBX MOV RSI,R14 CALL 0x00142047 CMP byte ptr [RSP + 0x70],0x0 JZ 0x0013cd4b MOV RDI,R14 MOV RSI,R15 MOV RDX,R13 CALL 0x00126cd0 TEST EAX,EAX CMOVZ R12D,EBP JMP 0x0013cd23 LAB_0013cd4b: TEST R12D,R12D JZ 0x0013d056 LEA R14,[RSP + 0x70] MOV RDI,RBX MOV RSI,R14 CALL 0x00142047 LEA RSI,[0x1c884e] PUSH 0x3 POP RDX MOV RDI,R14 CALL 0x00126cd0 TEST EAX,EAX JNZ 0x0013d041 LEA RDI,[RSP + 0x73] LEA R15,[RSP + 0x60] MOV qword ptr [R15],RDI PUSH 0xa POP RDX MOV RSI,R15 CALL 0x001279c0 MOV R13,RAX MOV RDI,qword ptr [R15] ADD RDI,0x2 LAB_0013cda0: MOV AL,byte ptr [RDI + -0x2] INC RDI CMP AL,0x20 JZ 0x0013cda0 CMP AL,0x2b JNZ 0x0013d041 CMP byte ptr [RDI + -0x2],0x58 JNZ 0x0013d041 CMP byte ptr [RDI + -0x1],0x20 JNZ 0x0013d041 MOV qword ptr [RSP + 0x60],RDI PUSH 0xa POP RDX XOR ESI,ESI CALL 0x001279c0 CMP R13D,0x1000001 JGE 0x0013d088 MOV R12,RAX CMP R12D,0x1000001 JGE 0x0013d088 MOV RAX,qword ptr [RSP] MOV dword ptr [RAX],R12D MOV RAX,qword ptr [RSP + 0x8] MOV dword ptr [RAX],R13D MOV RAX,qword ptr [RSP + 0x18] TEST RAX,RAX JZ 0x0013ce11 MOV dword ptr [RAX],0x3 LAB_0013ce11: MOV EAX,dword ptr [RSP + 0x10] TEST EAX,EAX PUSH 0x3 POP R14 CMOVNZ R14D,EAX PUSH 0x4 POP RCX MOV EDI,R12D MOV ESI,R13D MOV EDX,R14D CALL 0x00141eac TEST EAX,EAX JZ 0x0013d088 PUSH 0x4 POP RCX MOV EDI,R12D MOV ESI,R13D MOV EDX,R14D CALL 0x00141f1a TEST RAX,RAX JZ 0x0013d13a MOV R15,RAX MOV dword ptr [RSP + 0x8],R14D LEA EAX,[R12 + -0x8000] XOR R14D,R14D CMP EAX,0xffff8008 MOV qword ptr [RSP + 0x10],R12 JC 0x0013d155 MOVSXD RAX,dword ptr [RSP + 0x8] XOR ECX,ECX TEST R13D,R13D MOV EDX,0x0 CMOVG EDX,R13D MOV ESI,R12D MOV RDI,RAX IMUL RDI,RSI SHL RSI,0x2 MOV qword ptr [RSP + 0x58],RSI SHL RDI,0x2 MOV qword ptr [RSP + 0x30],RDI SHL RAX,0x2 MOV qword ptr [RSP + 0x50],RAX MOV qword ptr [RSP + 0x20],R15 MOV qword ptr [RSP],0x0 MOV qword ptr [RSP + 0x38],RDX LAB_0013cebf: CMP RCX,RDX JZ 0x0013d0c3 MOV qword ptr [RSP + 0x40],RCX MOV RDI,RBX CALL 0x0013d20c MOV R14D,EAX MOV RDI,RBX CALL 0x0013d20c MOV R12D,EAX MOV RDI,RBX CALL 0x0013d20c CMP R14B,0x2 JNZ 0x0013d0ce CMP R12B,0x2 JNZ 0x0013d0ce TEST AL,AL JS 0x0013d0ce MOVZX R14D,AL SHL R14D,0x8 MOV RDI,RBX CALL 0x0013d20c MOVZX EAX,AL OR EAX,R14D MOV RDI,qword ptr [RSP + 0x10] CMP EAX,EDI JNZ 0x0013d109 MOV RAX,qword ptr [RSP] TEST RAX,RAX JNZ 0x0013cf46 PUSH 0x4 POP RSI XOR EDX,EDX CALL 0x0013ef6e TEST RAX,RAX JZ 0x0013d132 LAB_0013cf46: MOV qword ptr [RSP + 0x28],R13 MOV qword ptr [RSP],RAX MOV R12,RAX XOR EAX,EAX LAB_0013cf54: MOV qword ptr [RSP + 0x48],RAX CMP RAX,0x4 JZ 0x0013cfed XOR R13D,R13D LAB_0013cf66: MOV RAX,qword ptr [RSP + 0x10] SUB EAX,R13D JLE 0x0013cfdd MOV dword ptr [RSP + 0x18],EAX MOV RDI,RBX CALL 0x0013d20c MOVZX R14D,AL CMP R14B,0x81 JC 0x0013cfaf MOV RDI,RBX CALL 0x0013d20c AND R14D,0x7f CMP dword ptr [RSP + 0x18],R14D JC 0x0013d09d MOVSXD R13,R13D LAB_0013cfa0: SUB R14D,0x1 JC 0x0013cf66 MOV byte ptr [R12 + R13*0x4],AL INC R13 JMP 0x0013cfa0 LAB_0013cfaf: TEST R14D,R14D JZ 0x0013d09d CMP dword ptr [RSP + 0x18],R14D JC 0x0013d09d MOVSXD R13,R13D LAB_0013cfc6: SUB R14D,0x1 JC 0x0013cf66 MOV RDI,RBX CALL 0x0013d20c MOV byte ptr [R12 + R13*0x4],AL INC R13 JMP 0x0013cfc6 LAB_0013cfdd: MOV RAX,qword ptr [RSP + 0x48] INC RAX INC R12 JMP 0x0013cf54 LAB_0013cfed: MOV R12,qword ptr [RSP + 0x20] XOR R14D,R14D MOV R13,qword ptr [RSP] LAB_0013cff9: CMP qword ptr [RSP + 0x58],R14 JZ 0x0013d01b LEA RSI,[R14 + R13*0x1] MOV RDI,R12 MOV EDX,dword ptr [RSP + 0x8] CALL 0x001420b4 ADD R14,0x4 ADD R12,qword ptr [RSP + 0x50] JMP 0x0013cff9 LAB_0013d01b: MOV RCX,qword ptr [RSP + 0x40] INC RCX MOV RAX,qword ptr [RSP + 0x20] ADD RAX,qword ptr [RSP + 0x30] MOV qword ptr [RSP + 0x20],RAX MOV R13,qword ptr [RSP + 0x28] MOV RDX,qword ptr [RSP + 0x38] JMP 0x0013cebf LAB_0013d041: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x1c8852] JMP 0x0013d069 LAB_0013d056: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x1c883b] LAB_0013d069: MOV qword ptr [RAX + -0x20],RCX XOR R15D,R15D LAB_0013d073: MOV RAX,R15 ADD RSP,0x478 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET LAB_0013d088: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x1c83c4] JMP 0x0013d069 LAB_0013d09d: MOV RDI,R15 CALL 0x00126ea0 MOV RDI,qword ptr [RSP] CALL 0x00126ea0 MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x1c88ba] JMP 0x0013d069 LAB_0013d0c3: MOV RDI,qword ptr [RSP] CALL 0x00126ea0 JMP 0x0013d073 LAB_0013d0ce: LEA RCX,[RSP + 0x68] MOV byte ptr [RCX],R14B MOV byte ptr [RCX + 0x1],R12B MOV byte ptr [RCX + 0x2],AL MOV R14,RCX MOV RDI,RBX CALL 0x0013d20c MOV byte ptr [R14 + 0x3],AL MOV RDI,R15 MOV RSI,R14 MOV EDX,dword ptr [RSP + 0x8] CALL 0x001420b4 MOV RDI,qword ptr [RSP] CALL 0x00126ea0 XOR R14D,R14D JMP 0x0013d168 LAB_0013d109: MOV RDI,R15 CALL 0x00126ea0 MOV RDI,qword ptr [RSP] CALL 0x00126ea0 MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x1c886a] JMP 0x0013d069 LAB_0013d132: MOV RDI,R15 CALL 0x00126ea0 LAB_0013d13a: MOV RAX,qword ptr FS:[0x0] LEA RCX,[0x1c84a3] JMP 0x0013d069 LAB_0013d152: INC R14D LAB_0013d155: MOV EBP,0x0 CMP R14D,R13D JGE 0x0013d073 LAB_0013d163: CMP EBP,R12D JGE 0x0013d152 LAB_0013d168: LEA R12,[RSP + 0x6c] PUSH 0x4 POP RDX MOV RDI,RBX MOV RSI,R12 CALL 0x0013e843 MOV EDX,dword ptr [RSP + 0x8] MOV EAX,EDX MOV R8,qword ptr [RSP + 0x10] IMUL EAX,R8D IMUL EAX,R14D CDQE LEA RAX,[R15 + RAX*0x4] MOV ECX,EBP IMUL ECX,EDX MOVSXD RCX,ECX LEA RDI,[RAX + RCX*0x4] MOV RSI,R12 MOV R12,R8 CALL 0x001420b4 INC EBP JMP 0x0013d163
/* stbi__hdr_load(stbi__context*, int*, int*, int*, int, stbi__result_info*) */ float * stbi__hdr_load(stbi__context *param_1,int *param_2,int *param_3,int *param_4,int param_5, stbi__result_info *param_6) { uchar uVar1; char cVar2; char cVar3; int1 uVar4; byte bVar5; int iVar6; int iVar7; int iVar8; int iVar9; ulong uVar10; ulong uVar11; float *__ptr; long lVar12; char *pcVar13; ulong uVar14; ulong uVar15; uint uVar16; void *pvVar17; float *pfVar18; long lVar19; int iVar20; uint uVar21; uint uVar22; long *in_FS_OFFSET; bool bVar23; void *local_4a8; float *local_488; char *local_448; uchar local_440; char local_43f; char local_43e; int1 local_43d; uchar local_43c [4]; char local_438 [3]; char local_435 [1029]; uVar10 = (ulong)(uint)param_5; stbi__hdr_gettoken(param_1,local_438); iVar6 = bcmp(local_438,"#?RADIANCE",0xb); if ((iVar6 == 0) || (iVar6 = bcmp(local_438,"#?RGBE",7), iVar6 == 0)) { bVar23 = false; iVar6 = 1; while( true ) { stbi__hdr_gettoken(param_1,local_438); iVar7 = (int)uVar10; if (local_438[0] == '\0') break; iVar7 = bcmp(local_438,"FORMAT=32-bit_rle_rgbe",0x17); if (iVar7 == 0) { bVar23 = true; } } if (bVar23) { stbi__hdr_gettoken(param_1,local_438); iVar8 = bcmp(local_438,&DAT_001c884e,3); if (iVar8 == 0) { local_448 = local_435; uVar10 = strtol(local_448,&local_448,10); local_448 = local_448 + 2; do { pcVar13 = local_448; local_448 = pcVar13 + 1; } while (pcVar13[-2] == ' '); if (((pcVar13[-2] == '+') && (pcVar13[-1] == 'X')) && (*pcVar13 == ' ')) { uVar11 = strtol(local_448,(char **)0x0,10); iVar8 = (int)uVar10; if ((iVar8 < 0x1000001) && (uVar16 = (uint)uVar11, (int)uVar16 < 0x1000001)) { *param_2 = uVar16; *param_3 = iVar8; if (param_4 != (int *)0x0) { *param_4 = 3; } iVar20 = 3; if (param_5 != 0) { iVar20 = param_5; } iVar9 = stbi__mad4sizes_valid(uVar16,iVar8,iVar20,4,iVar7); if (iVar9 != 0) { __ptr = (float *)stbi__malloc_mad4(uVar16,iVar8,iVar20,4,iVar7); if (__ptr == (float *)0x0) { LAB_0013d13a: lVar12 = *in_FS_OFFSET; pcVar13 = "outofmem"; } else { iVar7 = 0; if (uVar16 - 0x8000 < 0xffff8008) goto LAB_0013d155; uVar14 = 0; uVar15 = 0; if (0 < iVar8) { uVar15 = uVar10 & 0xffffffff; } local_4a8 = (void *)0x0; local_488 = __ptr; while( true ) { if (uVar14 == uVar15) { free(local_4a8); return __ptr; } uVar1 = stbi__get8(param_1); cVar2 = stbi__get8(param_1); cVar3 = stbi__get8(param_1); if (((uVar1 != '\x02') || (cVar2 != '\x02')) || (cVar3 < '\0')) { local_440 = uVar1; local_43f = cVar2; local_43e = cVar3; local_43d = stbi__get8(param_1); stbi__hdr_convert(__ptr,&local_440,iVar20); free(local_4a8); iVar7 = 0; do { stbi__getn(param_1,local_43c,4); stbi__hdr_convert(__ptr + (long)(int)(iVar20 * uVar16 * iVar7) + (long)(iVar6 * iVar20),local_43c,iVar20); iVar6 = iVar6 + 1; while ((int)uVar16 <= iVar6) { iVar7 = iVar7 + 1; LAB_0013d155: iVar6 = 0; if (iVar8 <= iVar7) { return __ptr; } } } while( true ); } uVar4 = stbi__get8(param_1); if (CONCAT11(cVar3,uVar4) != uVar16) break; if ((local_4a8 == (void *)0x0) && (local_4a8 = (void *)stbi__malloc_mad2(uVar16,4,0), local_4a8 == (void *)0x0)) { free(__ptr); goto LAB_0013d13a; } pvVar17 = local_4a8; for (lVar12 = 0; lVar12 != 4; lVar12 = lVar12 + 1) { lVar19 = 0; while( true ) { iVar7 = (int)lVar19; if ((int)uVar16 <= iVar7) break; bVar5 = stbi__get8(param_1); uVar22 = (uint)bVar5; uVar21 = (uint)bVar5; if (bVar5 < 0x81) { if ((uVar21 == 0) || (uVar16 - iVar7 < uVar21)) goto LAB_0013d09d; lVar19 = (long)iVar7; while (bVar23 = uVar22 != 0, uVar22 = uVar22 - 1, bVar23) { uVar4 = stbi__get8(param_1); *(int1 *)((long)pvVar17 + lVar19 * 4) = uVar4; lVar19 = lVar19 + 1; } } else { uVar4 = stbi__get8(param_1); uVar21 = uVar21 & 0x7f; if (uVar16 - iVar7 < uVar21) { LAB_0013d09d: free(__ptr); free(local_4a8); lVar12 = *in_FS_OFFSET; pcVar13 = "corrupt"; goto LAB_0013d069; } lVar19 = (long)iVar7; while (bVar23 = uVar21 != 0, uVar21 = uVar21 - 1, bVar23) { *(int1 *)((long)pvVar17 + lVar19 * 4) = uVar4; lVar19 = lVar19 + 1; } } } pvVar17 = (void *)((long)pvVar17 + 1); } pfVar18 = local_488; for (lVar12 = 0; (uVar11 & 0xffffffff) << 2 != lVar12; lVar12 = lVar12 + 4) { stbi__hdr_convert(pfVar18,(uchar *)(lVar12 + (long)local_4a8),iVar20); pfVar18 = pfVar18 + iVar20; } uVar14 = uVar14 + 1; local_488 = local_488 + (long)iVar20 * (uVar11 & 0xffffffff); } free(__ptr); free(local_4a8); lVar12 = *in_FS_OFFSET; pcVar13 = "invalid decoded scanline length"; } goto LAB_0013d069; } } lVar12 = *in_FS_OFFSET; pcVar13 = "too large"; goto LAB_0013d069; } } lVar12 = *in_FS_OFFSET; pcVar13 = "unsupported data layout"; } else { lVar12 = *in_FS_OFFSET; pcVar13 = "unsupported format"; } } else { lVar12 = *in_FS_OFFSET; pcVar13 = "not HDR"; } LAB_0013d069: *(char **)(lVar12 + -0x20) = pcVar13; return (float *)0x0; }
7,996
blst_scalar_from_be_bytes
corpus-core[P]colibri-stateless/build_O3/_deps/blst-src/src/exports.c
int blst_scalar_from_be_bytes(pow256 out, const unsigned char *bytes, size_t n) { size_t rem = (n - 1) % 32 + 1; struct { vec256 out, digit; } t; limb_t ret; vec_zero(t.out, sizeof(t.out)); limbs_from_be_bytes(t.out, bytes, rem); mul_mont_sparse_256(t.out, BLS12_381_rRR, t.out, BLS12_381_r, r0); while (n -= rem) { limbs_from_be_bytes(t.digit, bytes += rem, 32); add_mod_256(t.out, t.out, t.digit, BLS12_381_r); mul_mont_sparse_256(t.out, BLS12_381_rRR, t.out, BLS12_381_r, r0); rem = 32; } from_mont_256(t.out, t.out, BLS12_381_r, r0); ret = vec_is_zero(t.out, sizeof(t.out)); le_bytes_from_limbs(out, t.out, 32); vec_zero(&t, sizeof(t)); return (int)(ret^1); }
O3
c
blst_scalar_from_be_bytes: pushq %rbp movq %rsp, %rbp pushq %r15 pushq %r14 pushq %r13 pushq %r12 pushq %rbx subq $0x48, %rsp movq %rdx, %r14 movq %rsi, %r15 movq %rdi, %rbx leal -0x1(%rdx), %eax andl $0x1f, %eax xorl %ecx, %ecx movq $0x0, -0x68(%rbp,%rcx,8) incq %rcx cmpq $0x4, %rcx jne 0x253b6 leaq 0x1(%rax), %r13 leaq -0x68(%rbp), %rcx xorl %ecx, %ecx movq %r15, %rdx shlq $0x8, %rcx movzbl (%rdx), %esi incq %rdx orq %rsi, %rcx movq %rax, %rsi andq $-0x8, %rsi movq %rcx, -0x68(%rbp,%rsi) addq $-0x1, %rax jb 0x253d5 movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF leaq 0x1a9bb(%rip), %rsi # 0x3fdc0 leaq 0x1a4a4(%rip), %rcx # 0x3f8b0 leaq -0x68(%rbp), %rdi movq %rdi, %rdx callq 0x35640 subq %r13, %r14 je 0x25491 leaq -0x68(%rbp), %r12 addq %r13, %r15 movl $0x1f, %eax xorl %ecx, %ecx movq %r15, %rdx shlq $0x8, %rcx movzbl (%rdx), %esi incq %rdx orq %rsi, %rcx movq %rax, %rsi andq $-0x8, %rsi movq %rcx, -0x48(%rbp,%rsi) addq $-0x1, %rax jb 0x2542e movq %r12, %rdi movq %r12, %rsi leaq -0x48(%rbp), %rdx leaq 0x1a452(%rip), %r13 # 0x3f8b0 movq %r13, %rcx callq 0x35d40 movq %r12, %rdi leaq 0x1a950(%rip), %rsi # 0x3fdc0 movq %r12, %rdx movq %r13, %rcx movabsq $-0x100000001, %r8 # imm = 0xFFFFFFFEFFFFFFFF callq 0x35640 movl $0x20, %r13d addq $-0x20, %r14 jne 0x25421 leaq 0x1a418(%rip), %rdx # 0x3f8b0 leaq -0x68(%rbp), %r14 movq %r14, %rdi movq %r14, %rsi movabsq $-0x100000001, %rcx # imm = 0xFFFFFFFEFFFFFFFF callq 0x35a60 movl $0x20, %esi movq %r14, %rdi callq 0x2ff40 cmpq %rbx, %r14 je 0x254e9 xorl %ecx, %ecx movq -0x68(%rbp,%rcx,8), %rsi xorl %edx, %edx movb %sil, (%rbx,%rdx) incq %rdx shrq $0x8, %rsi cmpq $0x8, %rdx jne 0x254cc incq %rcx addq %rdx, %rbx cmpq $0x4, %rcx jne 0x254c5 xorl %ecx, %ecx movq $0x0, -0x68(%rbp,%rcx,8) incq %rcx cmpq $0x8, %rcx jne 0x254eb leaq -0x68(%rbp), %rcx xorl $0x1, %eax addq $0x48, %rsp popq %rbx popq %r12 popq %r13 popq %r14 popq %r15 popq %rbp retq
blst_scalar_from_be_bytes: push rbp mov rbp, rsp push r15 push r14 push r13 push r12 push rbx sub rsp, 48h mov r14, rdx mov r15, rsi mov rbx, rdi lea eax, [rdx-1] and eax, 1Fh xor ecx, ecx loc_253B6: mov [rbp+rcx*8+var_68], 0 inc rcx cmp rcx, 4 jnz short loc_253B6 lea r13, [rax+1] lea rcx, [rbp+var_68] xor ecx, ecx mov rdx, r15 loc_253D5: shl rcx, 8 movzx esi, byte ptr [rdx] inc rdx or rcx, rsi mov rsi, rax and rsi, 0FFFFFFFFFFFFFFF8h mov [rbp+rsi+var_68], rcx add rax, 0FFFFFFFFFFFFFFFFh jb short loc_253D5 mov r8, 0FFFFFFFEFFFFFFFFh lea rsi, BLS12_381_rRR lea rcx, BLS12_381_r lea rdi, [rbp+var_68] mov rdx, rdi call mul_mont_sparse_256 sub r14, r13 jz short loc_25491 lea r12, [rbp+var_68] loc_25421: add r15, r13 mov eax, 1Fh xor ecx, ecx mov rdx, r15 loc_2542E: shl rcx, 8 movzx esi, byte ptr [rdx] inc rdx or rcx, rsi mov rsi, rax and rsi, 0FFFFFFFFFFFFFFF8h mov [rbp+rsi+var_48], rcx add rax, 0FFFFFFFFFFFFFFFFh jb short loc_2542E mov rdi, r12 mov rsi, r12 lea rdx, [rbp+var_48] lea r13, BLS12_381_r mov rcx, r13 call add_mod_256 mov rdi, r12 lea rsi, BLS12_381_rRR mov rdx, r12 mov rcx, r13 mov r8, 0FFFFFFFEFFFFFFFFh call mul_mont_sparse_256 mov r13d, 20h ; ' ' add r14, 0FFFFFFFFFFFFFFE0h jnz short loc_25421 loc_25491: lea rdx, BLS12_381_r lea r14, [rbp+var_68] mov rdi, r14 mov rsi, r14 mov rcx, 0FFFFFFFEFFFFFFFFh call from_mont_256 mov esi, 20h ; ' ' mov rdi, r14 call vec_is_zero_16x cmp r14, rbx jz short loc_254E9 xor ecx, ecx loc_254C5: mov rsi, [rbp+rcx*8+var_68] xor edx, edx loc_254CC: mov [rbx+rdx], sil inc rdx shr rsi, 8 cmp rdx, 8 jnz short loc_254CC inc rcx add rbx, rdx cmp rcx, 4 jnz short loc_254C5 loc_254E9: xor ecx, ecx loc_254EB: mov [rbp+rcx*8+var_68], 0 inc rcx cmp rcx, 8 jnz short loc_254EB lea rcx, [rbp+var_68] xor eax, 1 add rsp, 48h pop rbx pop r12 pop r13 pop r14 pop r15 pop rbp retn
long long blst_scalar_from_be_bytes(_QWORD *a1, unsigned __int8 *a2, long long a3) { unsigned __int8 *v4; // r15 _QWORD *v5; // rbx long long v6; // rax long long i; // rcx long long v8; // r13 long long v9; // rcx unsigned __int8 *v10; // rdx long long v11; // rsi bool v12; // cf long long j; // r14 long long v14; // rax long long v15; // rcx unsigned __int8 *v16; // rdx long long v17; // rsi int is_zero_16x; // eax long long k; // rcx unsigned long long v20; // rsi long long m; // rdx long long n; // rcx _QWORD v24[4]; // [rsp+8h] [rbp-68h] BYREF _QWORD v25[9]; // [rsp+28h] [rbp-48h] BYREF v4 = a2; v5 = a1; v6 = ((_BYTE)a3 - 1) & 0x1F; for ( i = 0LL; i != 4; ++i ) v24[i] = 0LL; v8 = v6 + 1; v9 = 0LL; v10 = a2; do { v11 = *v10++; v9 = v11 | (v9 << 8); *(_QWORD *)((char *)v24 + (v6 & 0xFFFFFFFFFFFFFFF8LL)) = v9; v12 = v6-- != 0; } while ( v12 ); mul_mont_sparse_256(v24, &BLS12_381_rRR, v24, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); for ( j = a3 - v8; j; j -= 32LL ) { v4 += v8; v14 = 31LL; v15 = 0LL; v16 = v4; do { v17 = *v16++; v15 = v17 | (v15 << 8); *(_QWORD *)((char *)v25 + (v14 & 0xFFFFFFFFFFFFFFF8LL)) = v15; v12 = v14-- != 0; } while ( v12 ); add_mod_256(v24, v24, v25, &BLS12_381_r); mul_mont_sparse_256(v24, &BLS12_381_rRR, v24, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); v8 = 32LL; } from_mont_256(v24, v24, &BLS12_381_r, 0xFFFFFFFEFFFFFFFFLL); is_zero_16x = vec_is_zero_16x(v24, 32LL); if ( v24 != a1 ) { for ( k = 0LL; k != 4; ++k ) { v20 = v24[k]; for ( m = 0LL; m != 8; ++m ) { *((_BYTE *)v5 + m) = v20; v20 >>= 8; } ++v5; } } for ( n = 0LL; n != 8; ++n ) v24[n] = 0LL; return is_zero_16x ^ 1u; }
blst_scalar_from_be_bytes: PUSH RBP MOV RBP,RSP PUSH R15 PUSH R14 PUSH R13 PUSH R12 PUSH RBX SUB RSP,0x48 MOV R14,RDX MOV R15,RSI MOV RBX,RDI LEA EAX,[RDX + -0x1] AND EAX,0x1f XOR ECX,ECX LAB_001253b6: MOV qword ptr [RBP + RCX*0x8 + -0x68],0x0 INC RCX CMP RCX,0x4 JNZ 0x001253b6 LEA R13,[RAX + 0x1] LEA RCX,[RBP + -0x68] XOR ECX,ECX MOV RDX,R15 LAB_001253d5: SHL RCX,0x8 MOVZX ESI,byte ptr [RDX] INC RDX OR RCX,RSI MOV RSI,RAX AND RSI,-0x8 MOV qword ptr [RBP + RSI*0x1 + -0x68],RCX ADD RAX,-0x1 JC 0x001253d5 MOV R8,-0x100000001 LEA RSI,[0x13fdc0] LEA RCX,[0x13f8b0] LEA RDI,[RBP + -0x68] MOV RDX,RDI CALL 0x00135640 SUB R14,R13 JZ 0x00125491 LEA R12,[RBP + -0x68] LAB_00125421: ADD R15,R13 MOV EAX,0x1f XOR ECX,ECX MOV RDX,R15 LAB_0012542e: SHL RCX,0x8 MOVZX ESI,byte ptr [RDX] INC RDX OR RCX,RSI MOV RSI,RAX AND RSI,-0x8 MOV qword ptr [RBP + RSI*0x1 + -0x48],RCX ADD RAX,-0x1 JC 0x0012542e MOV RDI,R12 MOV RSI,R12 LEA RDX,[RBP + -0x48] LEA R13,[0x13f8b0] MOV RCX,R13 CALL 0x00135d40 MOV RDI,R12 LEA RSI,[0x13fdc0] MOV RDX,R12 MOV RCX,R13 MOV R8,-0x100000001 CALL 0x00135640 MOV R13D,0x20 ADD R14,-0x20 JNZ 0x00125421 LAB_00125491: LEA RDX,[0x13f8b0] LEA R14,[RBP + -0x68] MOV RDI,R14 MOV RSI,R14 MOV RCX,-0x100000001 CALL 0x00135a60 MOV ESI,0x20 MOV RDI,R14 CALL 0x0012ff40 CMP R14,RBX JZ 0x001254e9 XOR ECX,ECX LAB_001254c5: MOV RSI,qword ptr [RBP + RCX*0x8 + -0x68] XOR EDX,EDX LAB_001254cc: MOV byte ptr [RBX + RDX*0x1],SIL INC RDX SHR RSI,0x8 CMP RDX,0x8 JNZ 0x001254cc INC RCX ADD RBX,RDX CMP RCX,0x4 JNZ 0x001254c5 LAB_001254e9: XOR ECX,ECX LAB_001254eb: MOV qword ptr [RBP + RCX*0x8 + -0x68],0x0 INC RCX CMP RCX,0x8 JNZ 0x001254eb LEA RCX,[RBP + -0x68] XOR EAX,0x1 ADD RSP,0x48 POP RBX POP R12 POP R13 POP R14 POP R15 POP RBP RET
uint blst_scalar_from_be_bytes(ulong *param_1,byte *param_2,long param_3) { byte bVar1; uint uVar2; ulong uVar3; long lVar4; ulong uVar5; byte *pbVar6; long lVar7; bool bVar8; ulong local_70 [8]; uVar3 = (ulong)((int)param_3 - 1U & 0x1f); lVar4 = 0; do { local_70[lVar4] = 0; lVar4 = lVar4 + 1; } while (lVar4 != 4); lVar4 = uVar3 + 1; uVar5 = 0; pbVar6 = param_2; do { bVar1 = *pbVar6; pbVar6 = pbVar6 + 1; uVar5 = uVar5 << 8 | (ulong)bVar1; *(ulong *)((long)local_70 + (uVar3 & 0xfffffffffffffff8)) = uVar5; bVar8 = uVar3 != 0; uVar3 = uVar3 - 1; } while (bVar8); mul_mont_sparse_256(local_70,BLS12_381_rRR,local_70,BLS12_381_r,0xfffffffeffffffff); param_3 = param_3 - lVar4; if (param_3 != 0) { do { param_2 = param_2 + lVar4; uVar3 = 0x1f; uVar5 = 0; pbVar6 = param_2; do { bVar1 = *pbVar6; pbVar6 = pbVar6 + 1; uVar5 = uVar5 << 8 | (ulong)bVar1; *(ulong *)((long)local_70 + (uVar3 & 0xfffffffffffffff8) + 0x20) = uVar5; bVar8 = uVar3 != 0; uVar3 = uVar3 - 1; } while (bVar8); add_mod_256(local_70,local_70,local_70 + 4,BLS12_381_r); mul_mont_sparse_256(local_70,BLS12_381_rRR,local_70,BLS12_381_r,0xfffffffeffffffff); lVar4 = 0x20; param_3 = param_3 + -0x20; } while (param_3 != 0); } from_mont_256(local_70,local_70,BLS12_381_r); uVar2 = vec_is_zero_16x(local_70,0x20); if (local_70 != param_1) { lVar4 = 0; do { uVar3 = local_70[lVar4]; lVar7 = 0; do { *(char *)((long)param_1 + lVar7) = (char)uVar3; lVar7 = lVar7 + 1; uVar3 = uVar3 >> 8; } while (lVar7 != 8); lVar4 = lVar4 + 1; param_1 = param_1 + 1; } while (lVar4 != 4); } lVar4 = 0; do { local_70[lVar4] = 0; lVar4 = lVar4 + 1; } while (lVar4 != 8); return uVar2 ^ 1; }
7,997
free_block
eloqsql/mysys/mf_keycache.c
static void free_block(SIMPLE_KEY_CACHE_CB *keycache, BLOCK_LINK *block) { KEYCACHE_THREAD_TRACE("free block"); KEYCACHE_DBUG_PRINT("free_block", ("block %u to be freed, hash_link %p status: %u", BLOCK_NUMBER(block), block->hash_link, block->status)); /* Assert that the block is not free already. And that it is in a clean state. Note that the block might just be assigned to a hash_link and not yet read (BLOCK_READ may not be set here). In this case a reader is registered in the hash_link and free_block() will wait for it below. */ DBUG_ASSERT((block->status & BLOCK_IN_USE) && !(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH | BLOCK_REASSIGNED | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_FOR_UPDATE))); /* Assert that the block is in a file_blocks chain. */ DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); /* Assert that the block is not in the LRU ring. */ DBUG_ASSERT(!block->next_used && !block->prev_used); /* IMHO the below condition (if()) makes no sense. I can't see how it could be possible that free_block() is entered with a NULL hash_link pointer. The only place where it can become NULL is in free_block() (or before its first use ever, but for those blocks free_block() is not called). I don't remove the conditional as it cannot harm, but place an DBUG_ASSERT to confirm my hypothesis. Eventually the condition (if()) can be removed. */ DBUG_ASSERT(block->hash_link && block->hash_link->block == block); if (block->hash_link) { /* While waiting for readers to finish, new readers might request the block. But since we set block->status|= BLOCK_REASSIGNED, they will wait on block->wqueue[COND_FOR_SAVED]. They must be signalled later. */ block->status|= BLOCK_REASSIGNED; wait_for_readers(keycache, block); /* The block must not have been freed by another thread. Repeat some checks. An additional requirement is that it must be read now (BLOCK_READ). */ DBUG_ASSERT(block->hash_link && block->hash_link->block == block); DBUG_ASSERT((block->status & (BLOCK_READ | BLOCK_IN_USE | BLOCK_REASSIGNED)) && !(block->status & (BLOCK_IN_EVICTION | BLOCK_IN_SWITCH | BLOCK_IN_FLUSH | BLOCK_CHANGED | BLOCK_FOR_UPDATE))); DBUG_ASSERT(block->prev_changed && *block->prev_changed == block); DBUG_ASSERT(!block->prev_used); /* Unset BLOCK_REASSIGNED again. If we hand the block to an evicting thread (through unreg_request() below), other threads must not see this flag. They could become confused. */ block->status&= ~BLOCK_REASSIGNED; /* Do not release the hash_link until the block is off all lists. At least not if we hand it over for eviction in unreg_request(). */ } /* Unregister the block request and link the block into the LRU ring. This enables eviction for the block. If the LRU ring was empty and threads are waiting for a block, then the block wil be handed over for eviction immediately. Otherwise we will unlink it from the LRU ring again, without releasing the lock in between. So decrementing the request counter and updating statistics are the only relevant operation in this case. Assert that there are no other requests registered. */ DBUG_ASSERT(block->requests == 1); unreg_request(keycache, block, 0); /* Note that even without releasing the cache lock it is possible that the block is immediately selected for eviction by link_block() and thus not added to the LRU ring. In this case we must not touch the block any more. */ if (block->status & BLOCK_IN_EVICTION) return; /* Error blocks are not put into the LRU ring. */ if (!(block->status & BLOCK_ERROR)) { /* Here the block must be in the LRU ring. Unlink it again. */ DBUG_ASSERT(block->next_used && block->prev_used && *block->prev_used == block); unlink_block(keycache, block); } if (block->temperature == BLOCK_WARM) keycache->warm_blocks--; block->temperature= BLOCK_COLD; /* Remove from file_blocks hash. */ unlink_changed(block); /* Remove reference to block from hash table. */ unlink_hash(keycache, block->hash_link); block->hash_link= NULL; block->status= 0; block->length= 0; block->offset= keycache->key_cache_block_size; KEYCACHE_THREAD_TRACE("free block"); KEYCACHE_DBUG_PRINT("free_block", ("block is freed")); /* Enforced by unlink_changed(), but just to be sure. */ DBUG_ASSERT(!block->next_changed && !block->prev_changed); /* Enforced by unlink_block(): not in LRU ring nor in free_block_list. */ DBUG_ASSERT(!block->next_used && !block->prev_used); /* Insert the free block in the free list. */ block->next_used= keycache->free_block_list; keycache->free_block_list= block; /* Keep track of the number of currently unused blocks. */ keycache->blocks_unused++; /* All pending requests for this page must be resubmitted. */ release_whole_queue(&block->wqueue[COND_FOR_SAVED]); }
O0
c
free_block: pushq %rbp movq %rsp, %rbp subq $0x10, %rsp movq %rdi, -0x8(%rbp) movq %rsi, -0x10(%rbp) jmp 0xebf12 jmp 0xebf14 jmp 0xebf16 jmp 0xebf18 jmp 0xebf1a jmp 0xebf1c jmp 0xebf1e jmp 0xebf20 jmp 0xebf22 movq -0x10(%rbp), %rax cmpq $0x0, 0x20(%rax) je 0xebf62 movq -0x10(%rbp), %rax movl 0x50(%rax), %ecx orl $0x8, %ecx movl %ecx, 0x50(%rax) movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xed000 jmp 0xebf49 jmp 0xebf4b jmp 0xebf4d jmp 0xebf4f jmp 0xebf51 jmp 0xebf53 jmp 0xebf55 movq -0x10(%rbp), %rax movl 0x50(%rax), %ecx andl $-0x9, %ecx movl %ecx, 0x50(%rax) jmp 0xebf64 jmp 0xebf66 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi xorl %edx, %edx callq 0xebd70 movq -0x10(%rbp), %rax movl 0x50(%rax), %eax andl $0x80, %eax cmpl $0x0, %eax je 0xebf8b jmp 0xec066 movq -0x10(%rbp), %rax movl 0x50(%rax), %eax andl $0x1, %eax cmpl $0x0, %eax jne 0xebfab jmp 0xebf9c jmp 0xebf9e movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rsi callq 0xed230 movq -0x10(%rbp), %rax cmpl $0x1, 0x54(%rax) jne 0xebfc5 movq -0x8(%rbp), %rax movq 0x68(%rax), %rcx addq $-0x1, %rcx movq %rcx, 0x68(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x54(%rax) movq -0x10(%rbp), %rdi callq 0xed0a0 movq -0x8(%rbp), %rdi movq -0x10(%rbp), %rax movq 0x20(%rax), %rsi callq 0xecc00 movq -0x10(%rbp), %rax movq $0x0, 0x20(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x50(%rax) movq -0x10(%rbp), %rax movl $0x0, 0x4c(%rax) movq -0x8(%rbp), %rax movl 0x18(%rax), %ecx movq -0x10(%rbp), %rax movl %ecx, 0x48(%rax) jmp 0xec01c jmp 0xec01e jmp 0xec020 jmp 0xec022 jmp 0xec024 movq -0x8(%rbp), %rax movq 0x98(%rax), %rcx movq -0x10(%rbp), %rax movq %rcx, (%rax) movq -0x10(%rbp), %rcx movq -0x8(%rbp), %rax movq %rcx, 0x98(%rax) movq -0x8(%rbp), %rax movq 0x58(%rax), %rcx addq $0x1, %rcx movq %rcx, 0x58(%rax) movq -0x10(%rbp), %rdi addq $0x28, %rdi addq $0x8, %rdi callq 0xecf70 addq $0x10, %rsp popq %rbp retq nopl (%rax)
free_block_0: push rbp mov rbp, rsp sub rsp, 10h mov [rbp+var_8], rdi mov [rbp+var_10], rsi jmp short $+2 loc_EBF12: jmp short $+2 loc_EBF14: jmp short $+2 loc_EBF16: jmp short $+2 loc_EBF18: jmp short $+2 loc_EBF1A: jmp short $+2 loc_EBF1C: jmp short $+2 loc_EBF1E: jmp short $+2 loc_EBF20: jmp short $+2 loc_EBF22: mov rax, [rbp+var_10] cmp qword ptr [rax+20h], 0 jz short loc_EBF62 mov rax, [rbp+var_10] mov ecx, [rax+50h] or ecx, 8 mov [rax+50h], ecx mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call wait_for_readers_0 jmp short $+2 loc_EBF49: jmp short $+2 loc_EBF4B: jmp short $+2 loc_EBF4D: jmp short $+2 loc_EBF4F: jmp short $+2 loc_EBF51: jmp short $+2 loc_EBF53: jmp short $+2 loc_EBF55: mov rax, [rbp+var_10] mov ecx, [rax+50h] and ecx, 0FFFFFFF7h mov [rax+50h], ecx loc_EBF62: jmp short $+2 loc_EBF64: jmp short $+2 loc_EBF66: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] xor edx, edx call unreg_request_0 mov rax, [rbp+var_10] mov eax, [rax+50h] and eax, 80h cmp eax, 0 jz short loc_EBF8B jmp loc_EC066 loc_EBF8B: mov rax, [rbp+var_10] mov eax, [rax+50h] and eax, 1 cmp eax, 0 jnz short loc_EBFAB jmp short $+2 loc_EBF9C: jmp short $+2 loc_EBF9E: mov rdi, [rbp+var_8] mov rsi, [rbp+var_10] call unlink_block_0 loc_EBFAB: mov rax, [rbp+var_10] cmp dword ptr [rax+54h], 1 jnz short loc_EBFC5 mov rax, [rbp+var_8] mov rcx, [rax+68h] add rcx, 0FFFFFFFFFFFFFFFFh mov [rax+68h], rcx loc_EBFC5: mov rax, [rbp+var_10] mov dword ptr [rax+54h], 0 mov rdi, [rbp+var_10] call unlink_changed_0 mov rdi, [rbp+var_8] mov rax, [rbp+var_10] mov rsi, [rax+20h] call unlink_hash_0 mov rax, [rbp+var_10] mov qword ptr [rax+20h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+50h], 0 mov rax, [rbp+var_10] mov dword ptr [rax+4Ch], 0 mov rax, [rbp+var_8] mov ecx, [rax+18h] mov rax, [rbp+var_10] mov [rax+48h], ecx jmp short $+2 loc_EC01C: jmp short $+2 loc_EC01E: jmp short $+2 loc_EC020: jmp short $+2 loc_EC022: jmp short $+2 loc_EC024: mov rax, [rbp+var_8] mov rcx, [rax+98h] mov rax, [rbp+var_10] mov [rax], rcx mov rcx, [rbp+var_10] mov rax, [rbp+var_8] mov [rax+98h], rcx mov rax, [rbp+var_8] mov rcx, [rax+58h] add rcx, 1 mov [rax+58h], rcx mov rdi, [rbp+var_10] add rdi, 28h ; '(' add rdi, 8 call release_whole_queue loc_EC066: add rsp, 10h pop rbp retn
long long free_block_0(long long a1, long long a2) { long long result; // rax if ( *(_QWORD *)(a2 + 32) ) { *(_DWORD *)(a2 + 80) |= 8u; wait_for_readers_0(a1, a2); *(_DWORD *)(a2 + 80) &= ~8u; } unreg_request_0((_QWORD *)a1, a2, 0); result = *(_DWORD *)(a2 + 80) & 0x80; if ( !(_DWORD)result ) { if ( (*(_DWORD *)(a2 + 80) & 1) == 0 ) unlink_block_0(a1, a2); if ( *(_DWORD *)(a2 + 84) == 1 ) --*(_QWORD *)(a1 + 104); *(_DWORD *)(a2 + 84) = 0; unlink_changed_0(a2); unlink_hash_0(a1, *(_QWORD *)(a2 + 32)); *(_QWORD *)(a2 + 32) = 0LL; *(_DWORD *)(a2 + 80) = 0; *(_DWORD *)(a2 + 76) = 0; *(_DWORD *)(a2 + 72) = *(_DWORD *)(a1 + 24); *(_QWORD *)a2 = *(_QWORD *)(a1 + 152); *(_QWORD *)(a1 + 152) = a2; ++*(_QWORD *)(a1 + 88); return release_whole_queue(a2 + 48); } return result; }
free_block: PUSH RBP MOV RBP,RSP SUB RSP,0x10 MOV qword ptr [RBP + -0x8],RDI MOV qword ptr [RBP + -0x10],RSI JMP 0x001ebf12 LAB_001ebf12: JMP 0x001ebf14 LAB_001ebf14: JMP 0x001ebf16 LAB_001ebf16: JMP 0x001ebf18 LAB_001ebf18: JMP 0x001ebf1a LAB_001ebf1a: JMP 0x001ebf1c LAB_001ebf1c: JMP 0x001ebf1e LAB_001ebf1e: JMP 0x001ebf20 LAB_001ebf20: JMP 0x001ebf22 LAB_001ebf22: MOV RAX,qword ptr [RBP + -0x10] CMP qword ptr [RAX + 0x20],0x0 JZ 0x001ebf62 MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x50] OR ECX,0x8 MOV dword ptr [RAX + 0x50],ECX MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001ed000 JMP 0x001ebf49 LAB_001ebf49: JMP 0x001ebf4b LAB_001ebf4b: JMP 0x001ebf4d LAB_001ebf4d: JMP 0x001ebf4f LAB_001ebf4f: JMP 0x001ebf51 LAB_001ebf51: JMP 0x001ebf53 LAB_001ebf53: JMP 0x001ebf55 LAB_001ebf55: MOV RAX,qword ptr [RBP + -0x10] MOV ECX,dword ptr [RAX + 0x50] AND ECX,0xfffffff7 MOV dword ptr [RAX + 0x50],ECX LAB_001ebf62: JMP 0x001ebf64 LAB_001ebf64: JMP 0x001ebf66 LAB_001ebf66: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] XOR EDX,EDX CALL 0x001ebd70 MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x50] AND EAX,0x80 CMP EAX,0x0 JZ 0x001ebf8b JMP 0x001ec066 LAB_001ebf8b: MOV RAX,qword ptr [RBP + -0x10] MOV EAX,dword ptr [RAX + 0x50] AND EAX,0x1 CMP EAX,0x0 JNZ 0x001ebfab JMP 0x001ebf9c LAB_001ebf9c: JMP 0x001ebf9e LAB_001ebf9e: MOV RDI,qword ptr [RBP + -0x8] MOV RSI,qword ptr [RBP + -0x10] CALL 0x001ed230 LAB_001ebfab: MOV RAX,qword ptr [RBP + -0x10] CMP dword ptr [RAX + 0x54],0x1 JNZ 0x001ebfc5 MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x68] ADD RCX,-0x1 MOV qword ptr [RAX + 0x68],RCX LAB_001ebfc5: MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x54],0x0 MOV RDI,qword ptr [RBP + -0x10] CALL 0x001ed0a0 MOV RDI,qword ptr [RBP + -0x8] MOV RAX,qword ptr [RBP + -0x10] MOV RSI,qword ptr [RAX + 0x20] CALL 0x001ecc00 MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX + 0x20],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x50],0x0 MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x4c],0x0 MOV RAX,qword ptr [RBP + -0x8] MOV ECX,dword ptr [RAX + 0x18] MOV RAX,qword ptr [RBP + -0x10] MOV dword ptr [RAX + 0x48],ECX JMP 0x001ec01c LAB_001ec01c: JMP 0x001ec01e LAB_001ec01e: JMP 0x001ec020 LAB_001ec020: JMP 0x001ec022 LAB_001ec022: JMP 0x001ec024 LAB_001ec024: MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x98] MOV RAX,qword ptr [RBP + -0x10] MOV qword ptr [RAX],RCX MOV RCX,qword ptr [RBP + -0x10] MOV RAX,qword ptr [RBP + -0x8] MOV qword ptr [RAX + 0x98],RCX MOV RAX,qword ptr [RBP + -0x8] MOV RCX,qword ptr [RAX + 0x58] ADD RCX,0x1 MOV qword ptr [RAX + 0x58],RCX MOV RDI,qword ptr [RBP + -0x10] ADD RDI,0x28 ADD RDI,0x8 CALL 0x001ecf70 LAB_001ec066: ADD RSP,0x10 POP RBP RET
void free_block(long param_1,int8 *param_2) { if (param_2[4] != 0) { *(uint *)(param_2 + 10) = *(uint *)(param_2 + 10) | 8; wait_for_readers(param_1,param_2); *(uint *)(param_2 + 10) = *(uint *)(param_2 + 10) & 0xfffffff7; } unreg_request(param_1,param_2,0); if ((*(uint *)(param_2 + 10) & 0x80) == 0) { if ((*(uint *)(param_2 + 10) & 1) == 0) { unlink_block(param_1,param_2); } if (*(int *)((long)param_2 + 0x54) == 1) { *(long *)(param_1 + 0x68) = *(long *)(param_1 + 0x68) + -1; } *(int4 *)((long)param_2 + 0x54) = 0; unlink_changed(param_2); unlink_hash(param_1,param_2[4]); param_2[4] = 0; *(int4 *)(param_2 + 10) = 0; *(int4 *)((long)param_2 + 0x4c) = 0; *(int4 *)(param_2 + 9) = *(int4 *)(param_1 + 0x18); *param_2 = *(int8 *)(param_1 + 0x98); *(int8 **)(param_1 + 0x98) = param_2; *(long *)(param_1 + 0x58) = *(long *)(param_1 + 0x58) + 1; release_whole_queue(param_2 + 6); } return; }
7,998
parse_device_list(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
monkey531[P]llama/common/arg.cpp
static std::vector<ggml_backend_dev_t> parse_device_list(const std::string & value) { std::vector<ggml_backend_dev_t> devices; auto dev_names = string_split<std::string>(value, ','); if (dev_names.empty()) { throw std::invalid_argument("no devices specified"); } if (dev_names.size() == 1 && dev_names[0] == "none") { devices.push_back(nullptr); } else { for (const auto & device : dev_names) { auto * dev = ggml_backend_dev_by_name(device.c_str()); if (!dev || ggml_backend_dev_type(dev) != GGML_BACKEND_DEVICE_TYPE_GPU) { throw std::invalid_argument(string_format("invalid device: %s", device.c_str())); } devices.push_back(dev); } devices.push_back(nullptr); } return devices; }
O0
cpp
parse_device_list(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&): subq $0xd8, %rsp movq %rdi, 0x28(%rsp) movq %rdi, %rax movq %rax, 0x30(%rsp) movq %rdi, 0xd0(%rsp) movq %rsi, 0xc8(%rsp) movb $0x0, 0xc7(%rsp) callq 0x64b90 movq 0xc8(%rsp), %rsi leaq 0xa8(%rsp), %rdi movl $0x2c, %edx callq 0x86950 jmp 0x8ad7d leaq 0xa8(%rsp), %rdi callq 0x91070 testb $0x1, %al jne 0x8ad93 jmp 0x8ae28 movl $0x10, %edi callq 0x5a6b0 movq %rax, %rdi movq %rdi, %rax movq %rax, 0x20(%rsp) leaq 0x186f60(%rip), %rsi # 0x211d0f callq 0x5a310 jmp 0x8adb6 movq 0x20(%rsp), %rdi movq 0x21b156(%rip), %rsi # 0x2a5f18 movq 0x21b147(%rip), %rdx # 0x2a5f10 callq 0x5ab40 jmp 0x8b089 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) jmp 0x8b072 movq 0x20(%rsp), %rdi movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) callq 0x5b020 jmp 0x8b04c movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) jmp 0x8b04c leaq 0xa8(%rsp), %rdi callq 0x91b00 cmpq $0x1, %rax jne 0x8ae90 xorl %eax, %eax movl %eax, %esi leaq 0xa8(%rsp), %rdi callq 0x91270 movq %rax, %rdi leaq 0x181e01(%rip), %rsi # 0x20cc57 callq 0x91240 movb %al, 0x1f(%rsp) jmp 0x8ae61 movb 0x1f(%rsp), %al testb $0x1, %al jne 0x8ae6b jmp 0x8ae90 movq 0x28(%rsp), %rdi movq $0x0, 0x90(%rsp) leaq 0x90(%rsp), %rsi callq 0xc2140 jmp 0x8ae8b jmp 0x8b02b leaq 0xa8(%rsp), %rax movq %rax, 0x88(%rsp) movq 0x88(%rsp), %rdi callq 0x910f0 movq %rax, 0x80(%rsp) movq 0x88(%rsp), %rdi callq 0x91120 movq %rax, 0x78(%rsp) leaq 0x80(%rsp), %rdi leaq 0x78(%rsp), %rsi callq 0x960c0 testb $0x1, %al jne 0x8aee2 jmp 0x8b00f leaq 0x80(%rsp), %rdi callq 0x96100 movq %rax, 0x70(%rsp) movq 0x70(%rsp), %rdi callq 0x5a1b0 movq %rax, %rdi callq 0x5a3c0 movq %rax, 0x10(%rsp) jmp 0x8af0d movq 0x10(%rsp), %rax movq %rax, 0x68(%rsp) cmpq $0x0, 0x68(%rsp) je 0x8af3c movq 0x68(%rsp), %rdi callq 0x5aa50 movl %eax, 0xc(%rsp) jmp 0x8af2f movl 0xc(%rsp), %eax cmpl $0x1, %eax je 0x8afea movb $0x1, 0x47(%rsp) movl $0x10, %edi callq 0x5a6b0 movq %rax, (%rsp) movq 0x70(%rsp), %rdi callq 0x5a1b0 movq %rax, %rdx leaq 0x186dc1(%rip), %rsi # 0x211d24 xorl %eax, %eax leaq 0x48(%rsp), %rdi callq 0xef5d0 jmp 0x8af71 movq (%rsp), %rdi leaq 0x48(%rsp), %rsi callq 0x5aa70 jmp 0x8af81 movq (%rsp), %rdi movb $0x0, 0x47(%rsp) movq 0x21af87(%rip), %rsi # 0x2a5f18 movq 0x21af78(%rip), %rdx # 0x2a5f10 callq 0x5ab40 jmp 0x8b089 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) jmp 0x8afd6 movq %rax, %rcx movl %edx, %eax movq %rcx, 0xa0(%rsp) movl %eax, 0x9c(%rsp) leaq 0x48(%rsp), %rdi callq 0x5b648 testb $0x1, 0x47(%rsp) jne 0x8afdf jmp 0x8afe8 movq (%rsp), %rdi callq 0x5b020 jmp 0x8b04c movq 0x28(%rsp), %rdi leaq 0x68(%rsp), %rsi callq 0xc2170 jmp 0x8affb jmp 0x8affd leaq 0x80(%rsp), %rdi callq 0x96110 jmp 0x8aec7 movq 0x28(%rsp), %rdi movq $0x0, 0x38(%rsp) leaq 0x38(%rsp), %rsi callq 0xc2140 jmp 0x8b029 jmp 0x8b02b movb $0x1, 0xc7(%rsp) leaq 0xa8(%rsp), %rdi callq 0x65630 testb $0x1, 0xc7(%rsp) jne 0x8b065 jmp 0x8b05b leaq 0xa8(%rsp), %rdi callq 0x65630 jmp 0x8b072 movq 0x28(%rsp), %rdi callq 0x65900 movq 0x30(%rsp), %rax addq $0xd8, %rsp retq movq 0x28(%rsp), %rdi callq 0x65900 movq 0xa0(%rsp), %rdi callq 0x5ac00 nopl (%rax)
_ZL17parse_device_listRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE: sub rsp, 0D8h mov [rsp+0D8h+var_B0], rdi mov rax, rdi mov [rsp+0D8h+var_A8], rax mov [rsp+0D8h+var_8], rdi mov [rsp+0D8h+var_10], rsi mov [rsp+0D8h+var_11], 0 call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EEC2Ev; std::vector<ggml_backend_device *>::vector(void) mov rsi, [rsp+0D8h+var_10] lea rdi, [rsp+0D8h+var_30] mov edx, 2Ch ; ',' call _ZL12string_splitINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEESt6vectorIT_SaIS7_EERKS5_c; string_split<std::string>(std::string const&,char) jmp short $+2 loc_8AD7D: lea rdi, [rsp+0D8h+var_30] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5emptyEv; std::vector<std::string>::empty(void) test al, 1 jnz short loc_8AD93 jmp loc_8AE28 loc_8AD93: mov edi, 10h; thrown_size call ___cxa_allocate_exception mov rdi, rax; this mov rax, rdi mov [rsp+0D8h+var_B8], rax lea rsi, aNoDevicesSpeci; "no devices specified" call __ZNSt16invalid_argumentC1EPKc; std::invalid_argument::invalid_argument(char const*) jmp short $+2 loc_8ADB6: mov rdi, [rsp+0D8h+var_B8]; void * mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_8B089 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax jmp loc_8B072 mov rdi, [rsp+arg_18]; void * mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax call ___cxa_free_exception jmp loc_8B04C mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax jmp loc_8B04C loc_8AE28: lea rdi, [rsp+0D8h+var_30] call _ZNKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE4sizeEv; std::vector<std::string>::size(void) cmp rax, 1 jnz short loc_8AE90 xor eax, eax mov esi, eax lea rdi, [rsp+0D8h+var_30] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EEixEm; std::vector<std::string>::operator[](ulong) mov rdi, rax lea rsi, aNone; "none" call _ZSteqIcSt11char_traitsIcESaIcEEbRKNSt7__cxx1112basic_stringIT_T0_T1_EEPKS5_; std::operator==<char>(std::string const&,char const*) mov [rsp+0D8h+var_B9], al jmp short $+2 loc_8AE61: mov al, [rsp+0D8h+var_B9] test al, 1 jnz short loc_8AE6B jmp short loc_8AE90 loc_8AE6B: mov rdi, [rsp+0D8h+var_B0] mov [rsp+0D8h+var_48], 0 lea rsi, [rsp+0D8h+var_48] call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE9push_backEOS1_; std::vector<ggml_backend_device *>::push_back(ggml_backend_device *&&) jmp short $+2 loc_8AE8B: jmp loc_8B02B loc_8AE90: lea rax, [rsp+0D8h+var_30] mov [rsp+0D8h+var_50], rax mov rdi, [rsp+0D8h+var_50] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE5beginEv; std::vector<std::string>::begin(void) mov [rsp+0D8h+var_58], rax mov rdi, [rsp+0D8h+var_50] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EE3endEv; std::vector<std::string>::end(void) mov [rsp+0D8h+var_60], rax loc_8AEC7: lea rdi, [rsp+0D8h+var_58] lea rsi, [rsp+0D8h+var_60] call _ZN9__gnu_cxxneIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEEbRKNS_17__normal_iteratorIT_T0_EESG_; __gnu_cxx::operator!=<std::string *,std::vector<std::string>>(__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&,__gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>> const&) test al, 1 jnz short loc_8AEE2 jmp loc_8B00F loc_8AEE2: lea rdi, [rsp+0D8h+var_58] call _ZNK9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEdeEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(void) mov [rsp+0D8h+var_68], rax mov rdi, [rsp+0D8h+var_68] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdi, rax call _ggml_backend_dev_by_name mov [rsp+0D8h+var_C8], rax jmp short $+2 loc_8AF0D: mov rax, [rsp+0D8h+var_C8] mov [rsp+0D8h+var_70], rax cmp [rsp+0D8h+var_70], 0 jz short loc_8AF3C mov rdi, [rsp+0D8h+var_70] call _ggml_backend_dev_type mov [rsp+0D8h+var_CC], eax jmp short $+2 loc_8AF2F: mov eax, [rsp+0D8h+var_CC] cmp eax, 1 jz loc_8AFEA loc_8AF3C: mov [rsp+0D8h+var_91], 1 mov edi, 10h; thrown_size call ___cxa_allocate_exception mov [rsp+0D8h+var_D8], rax mov rdi, [rsp+0D8h+var_68] call __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5c_strEv; std::string::c_str(void) mov rdx, rax lea rsi, aInvalidDeviceS; "invalid device: %s" xor eax, eax lea rdi, [rsp+0D8h+var_90] call _Z13string_formatB5cxx11PKcz; string_format(char const*,...) jmp short $+2 loc_8AF71: mov rdi, [rsp+0D8h+var_D8] lea rsi, [rsp+0D8h+var_90] call __ZNSt16invalid_argumentC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE; std::invalid_argument::invalid_argument(std::string const&) jmp short $+2 loc_8AF81: mov rdi, [rsp+0D8h+var_D8]; void * mov [rsp+0D8h+var_91], 0 mov rsi, cs:lptinfo; lptinfo mov rdx, cs:_ZNSt16invalid_argumentD1Ev_ptr; void (*)(void *) call ___cxa_throw jmp loc_8B089 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax jmp short loc_8AFD6 mov rcx, rax mov eax, edx mov [rsp+arg_98], rcx mov [rsp+arg_94], eax lea rdi, [rsp+arg_40]; void * call _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED1Ev; std::string::~string() loc_8AFD6: test [rsp+arg_3F], 1 jnz short loc_8AFDF jmp short loc_8AFE8 loc_8AFDF: mov rdi, [rsp+0]; void * call ___cxa_free_exception loc_8AFE8: jmp short loc_8B04C loc_8AFEA: mov rdi, [rsp+0D8h+var_B0] lea rsi, [rsp+0D8h+var_70] call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE9push_backERKS1_; std::vector<ggml_backend_device *>::push_back(ggml_backend_device * const&) jmp short $+2 loc_8AFFB: jmp short $+2 loc_8AFFD: lea rdi, [rsp+0D8h+var_58] call _ZN9__gnu_cxx17__normal_iteratorIPNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESt6vectorIS6_SaIS6_EEEppEv; __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(void) jmp loc_8AEC7 loc_8B00F: mov rdi, [rsp+0D8h+var_B0] mov [rsp+0D8h+var_A0], 0 lea rsi, [rsp+0D8h+var_A0] call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EE9push_backEOS1_; std::vector<ggml_backend_device *>::push_back(ggml_backend_device *&&) jmp short $+2 loc_8B029: jmp short $+2 loc_8B02B: mov [rsp+0D8h+var_11], 1 lea rdi, [rsp+0D8h+var_30] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() test [rsp+0D8h+var_11], 1 jnz short loc_8B065 jmp short loc_8B05B loc_8B04C: lea rdi, [rsp+arg_A0] call _ZNSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS5_EED2Ev; std::vector<std::string>::~vector() jmp short loc_8B072 loc_8B05B: mov rdi, [rsp+0D8h+var_B0] call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EED2Ev; std::vector<ggml_backend_device *>::~vector() loc_8B065: mov rax, [rsp+0D8h+var_A8] add rsp, 0D8h retn loc_8B072: mov rdi, [rsp+arg_20] call _ZNSt6vectorIP19ggml_backend_deviceSaIS1_EED2Ev; std::vector<ggml_backend_device *>::~vector() mov rdi, [rsp+arg_98] call __Unwind_Resume loc_8B089: nop dword ptr [rax+00000000h]
long long * parse_device_list(long long *a1, long long a2) { long long v2; // rax long long v3; // rax int v4; // eax int v5; // ecx int v6; // r8d int v7; // r9d void *v9; // [rsp+0h] [rbp-D8h] std::invalid_argument *exception; // [rsp+20h] [rbp-B8h] long long v11; // [rsp+38h] [rbp-A0h] BYREF char v12; // [rsp+47h] [rbp-91h] _BYTE v13[32]; // [rsp+48h] [rbp-90h] BYREF long long v14; // [rsp+68h] [rbp-70h] BYREF long long v15; // [rsp+70h] [rbp-68h] long long v16; // [rsp+78h] [rbp-60h] BYREF _QWORD v17[2]; // [rsp+80h] [rbp-58h] BYREF _QWORD v18[3]; // [rsp+90h] [rbp-48h] BYREF long long v19[3]; // [rsp+A8h] [rbp-30h] BYREF char v20; // [rsp+C7h] [rbp-11h] long long v21; // [rsp+C8h] [rbp-10h] long long *v22; // [rsp+D0h] [rbp-8h] v22 = a1; v21 = a2; v20 = 0; std::vector<ggml_backend_device *>::vector((long long)a1); string_split<std::string>((long long)v19, a2, 44); if ( (std::vector<std::string>::empty(v19) & 1) != 0 ) { exception = (std::invalid_argument *)__cxa_allocate_exception(0x10uLL); std::invalid_argument::invalid_argument(exception, "no devices specified"); __cxa_throw( exception, (struct type_info *)&`typeinfo for'std::invalid_argument, (void (*)(void *))&std::invalid_argument::~invalid_argument); } if ( std::vector<std::string>::size(v19) == 1 && (v2 = std::vector<std::string>::operator[](v19, 0LL), (std::operator==<char>(v2, "none") & 1) != 0) ) { v18[0] = 0LL; std::vector<ggml_backend_device *>::push_back(a1, v18); } else { v17[1] = v19; v17[0] = std::vector<std::string>::begin(v19); v16 = std::vector<std::string>::end(v19); while ( (__gnu_cxx::operator!=<std::string *,std::vector<std::string>>(v17, &v16) & 1) != 0 ) { v15 = __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator*(v17); v3 = std::string::c_str(v15); v14 = ggml_backend_dev_by_name(v3); if ( !v14 || (unsigned int)ggml_backend_dev_type(v14) != 1 ) { v9 = __cxa_allocate_exception(0x10uLL); v4 = std::string::c_str(v15); string_format[abi:cxx11]((unsigned int)v13, (unsigned int)"invalid device: %s", v4, v5, v6, v7); std::invalid_argument::invalid_argument(v9, v13); v12 = 0; __cxa_throw( v9, (struct type_info *)&`typeinfo for'std::invalid_argument, (void (*)(void *))&std::invalid_argument::~invalid_argument); } std::vector<ggml_backend_device *>::push_back(a1, &v14); __gnu_cxx::__normal_iterator<std::string *,std::vector<std::string>>::operator++(v17); } v11 = 0LL; std::vector<ggml_backend_device *>::push_back(a1, &v11); } v20 = 1; std::vector<std::string>::~vector(v19); if ( (v20 & 1) == 0 ) std::vector<ggml_backend_device *>::~vector(a1); return a1; }
parse_device_list: SUB RSP,0xd8 MOV qword ptr [RSP + 0x28],RDI MOV RAX,RDI MOV qword ptr [RSP + 0x30],RAX MOV qword ptr [RSP + 0xd0],RDI MOV qword ptr [RSP + 0xc8],RSI MOV byte ptr [RSP + 0xc7],0x0 CALL 0x00164b90 MOV RSI,qword ptr [RSP + 0xc8] LAB_0018ad69: LEA RDI,[RSP + 0xa8] MOV EDX,0x2c CALL 0x00186950 LAB_0018ad7b: JMP 0x0018ad7d LAB_0018ad7d: LEA RDI,[RSP + 0xa8] CALL 0x00191070 TEST AL,0x1 JNZ 0x0018ad93 JMP 0x0018ae28 LAB_0018ad93: MOV EDI,0x10 CALL 0x0015a6b0 MOV RDI,RAX MOV RAX,RDI MOV qword ptr [RSP + 0x20],RAX LAB_0018ada8: LEA RSI,[0x311d0f] CALL 0x0015a310 JMP 0x0018adb6 LAB_0018adb6: MOV RDI,qword ptr [RSP + 0x20] MOV RSI,qword ptr [0x003a5f18] MOV RDX,qword ptr [0x003a5f10] CALL 0x0015ab40 LAB_0018ae28: LEA RDI,[RSP + 0xa8] CALL 0x00191b00 CMP RAX,0x1 JNZ 0x0018ae90 XOR EAX,EAX MOV ESI,EAX LEA RDI,[RSP + 0xa8] CALL 0x00191270 MOV RDI,RAX LAB_0018ae4f: LEA RSI,[0x30cc57] CALL 0x00191240 MOV byte ptr [RSP + 0x1f],AL JMP 0x0018ae61 LAB_0018ae61: MOV AL,byte ptr [RSP + 0x1f] TEST AL,0x1 JNZ 0x0018ae6b JMP 0x0018ae90 LAB_0018ae6b: MOV RDI,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x90],0x0 LEA RSI,[RSP + 0x90] CALL 0x001c2140 JMP 0x0018ae8b LAB_0018ae8b: JMP 0x0018b02b LAB_0018ae90: LEA RAX,[RSP + 0xa8] MOV qword ptr [RSP + 0x88],RAX MOV RDI,qword ptr [RSP + 0x88] CALL 0x001910f0 MOV qword ptr [RSP + 0x80],RAX MOV RDI,qword ptr [RSP + 0x88] CALL 0x00191120 MOV qword ptr [RSP + 0x78],RAX LAB_0018aec7: LEA RDI,[RSP + 0x80] LEA RSI,[RSP + 0x78] CALL 0x001960c0 TEST AL,0x1 JNZ 0x0018aee2 JMP 0x0018b00f LAB_0018aee2: LEA RDI,[RSP + 0x80] CALL 0x00196100 MOV qword ptr [RSP + 0x70],RAX MOV RDI,qword ptr [RSP + 0x70] CALL 0x0015a1b0 MOV RDI,RAX CALL 0x0015a3c0 MOV qword ptr [RSP + 0x10],RAX JMP 0x0018af0d LAB_0018af0d: MOV RAX,qword ptr [RSP + 0x10] MOV qword ptr [RSP + 0x68],RAX CMP qword ptr [RSP + 0x68],0x0 JZ 0x0018af3c MOV RDI,qword ptr [RSP + 0x68] CALL 0x0015aa50 LAB_0018af29: MOV dword ptr [RSP + 0xc],EAX JMP 0x0018af2f LAB_0018af2f: MOV EAX,dword ptr [RSP + 0xc] CMP EAX,0x1 JZ 0x0018afea LAB_0018af3c: MOV byte ptr [RSP + 0x47],0x1 MOV EDI,0x10 CALL 0x0015a6b0 MOV qword ptr [RSP],RAX MOV RDI,qword ptr [RSP + 0x70] CALL 0x0015a1b0 MOV RDX,RAX LAB_0018af5c: LEA RSI,[0x311d24] XOR EAX,EAX LEA RDI,[RSP + 0x48] CALL 0x001ef5d0 JMP 0x0018af71 LAB_0018af71: MOV RDI,qword ptr [RSP] LEA RSI,[RSP + 0x48] CALL 0x0015aa70 JMP 0x0018af81 LAB_0018af81: MOV RDI,qword ptr [RSP] MOV byte ptr [RSP + 0x47],0x0 MOV RSI,qword ptr [0x003a5f18] MOV RDX,qword ptr [0x003a5f10] CALL 0x0015ab40 LAB_0018afea: MOV RDI,qword ptr [RSP + 0x28] LEA RSI,[RSP + 0x68] CALL 0x001c2170 JMP 0x0018affb LAB_0018affb: JMP 0x0018affd LAB_0018affd: LEA RDI,[RSP + 0x80] CALL 0x00196110 JMP 0x0018aec7 LAB_0018b00f: MOV RDI,qword ptr [RSP + 0x28] MOV qword ptr [RSP + 0x38],0x0 LEA RSI,[RSP + 0x38] CALL 0x001c2140 LAB_0018b027: JMP 0x0018b029 LAB_0018b029: JMP 0x0018b02b LAB_0018b02b: MOV byte ptr [RSP + 0xc7],0x1 LEA RDI,[RSP + 0xa8] CALL 0x00165630 TEST byte ptr [RSP + 0xc7],0x1 JNZ 0x0018b065 JMP 0x0018b05b LAB_0018b05b: MOV RDI,qword ptr [RSP + 0x28] CALL 0x00165900 LAB_0018b065: MOV RAX,qword ptr [RSP + 0x30] ADD RSP,0xd8 RET
/* parse_device_list(std::__cxx11::string const&) */ string * parse_device_list(string *param_1) { bool bVar1; int iVar2; ulong uVar3; long lVar4; string *psVar5; int8 uVar6; invalid_argument *piVar7; char in_SIL; ggml_backend_device *local_a0; int1 local_91; string local_90 [32]; ggml_backend_device *local_70; int8 local_68; int8 local_60; int8 local_58; vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *local_50; ggml_backend_device *local_48 [3]; string local_30 [31]; byte local_11; char local_10; string *local_8; local_11 = 0; local_8 = param_1; local_10 = in_SIL; std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::vector ((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1); /* try { // try from 0018ad69 to 0018ad7a has its CatchHandler @ 0018add3 */ string_split<std::__cxx11::string>(local_30,local_10); uVar3 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::empty ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_30); if ((uVar3 & 1) != 0) { piVar7 = (invalid_argument *)__cxa_allocate_exception(0x10); /* try { // try from 0018ada8 to 0018adb3 has its CatchHandler @ 0018adec */ std::invalid_argument::invalid_argument(piVar7,"no devices specified"); /* try { // try from 0018adb6 to 0018adcd has its CatchHandler @ 0018ae0f */ /* WARNING: Subroutine does not return */ __cxa_throw(piVar7,PTR_typeinfo_003a5f18,PTR__invalid_argument_003a5f10); } lVar4 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::size ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_30); if (lVar4 == 1) { psVar5 = (string *) std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::operator[] ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *) local_30,0); /* try { // try from 0018ae4f to 0018af28 has its CatchHandler @ 0018ae0f */ bVar1 = std::operator==(psVar5,"none"); if (bVar1) { local_48[0] = (ggml_backend_device *)0x0; std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::push_back ((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1, local_48); goto LAB_0018b02b; } } local_50 = (vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_30; local_58 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::begin(local_50) ; local_60 = std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::end(local_50); while (bVar1 = __gnu_cxx::operator!= ((__normal_iterator *)&local_58,(__normal_iterator *)&local_60), bVar1) { local_68 = __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator*((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_58); uVar6 = std::__cxx11::string::c_str(); local_70 = (ggml_backend_device *)ggml_backend_dev_by_name(uVar6); if ((local_70 == (ggml_backend_device *)0x0) || (iVar2 = ggml_backend_dev_type(local_70), iVar2 != 1)) { local_91 = 1; piVar7 = (invalid_argument *)__cxa_allocate_exception(0x10); uVar6 = std::__cxx11::string::c_str(); /* try { // try from 0018af5c to 0018af6e has its CatchHandler @ 0018afa2 */ string_format_abi_cxx11_((char *)local_90,"invalid device: %s",uVar6); /* try { // try from 0018af71 to 0018af9c has its CatchHandler @ 0018afb8 */ std::invalid_argument::invalid_argument(piVar7,local_90); local_91 = 0; /* WARNING: Subroutine does not return */ __cxa_throw(piVar7,PTR_typeinfo_003a5f18,PTR__invalid_argument_003a5f10); } /* try { // try from 0018afea to 0018b026 has its CatchHandler @ 0018ae0f */ std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::push_back ((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1, &local_70); __gnu_cxx:: __normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> ::operator++((__normal_iterator<std::__cxx11::string*,std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>> *)&local_58); } local_a0 = (ggml_backend_device *)0x0; std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::push_back ((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1,&local_a0) ; LAB_0018b02b: local_11 = 1; std::vector<std::__cxx11::string,std::allocator<std::__cxx11::string>>::~vector ((vector<std::__cxx11::string,std::allocator<std::__cxx11::string>> *)local_30); if ((local_11 & 1) == 0) { std::vector<ggml_backend_device*,std::allocator<ggml_backend_device*>>::~vector ((vector<ggml_backend_device*,std::allocator<ggml_backend_device*>> *)param_1); } return param_1; }
7,999
aggregate_thread_stages(PFS_thread*, PFS_account*, PFS_user*, PFS_host*)
eloqsql/storage/perfschema/pfs_instr.cc
void aggregate_thread_stages(PFS_thread *thread, PFS_account *safe_account, PFS_user *safe_user, PFS_host *safe_host) { if (thread->read_instr_class_stages_stats() == NULL) return; if (likely(safe_account != NULL)) { /* Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME to EVENTS_STAGES_SUMMARY_BY_ACCOUNT_BY_EVENT_NAME. */ aggregate_all_stages(thread->write_instr_class_stages_stats(), safe_account->write_instr_class_stages_stats()); return; } if ((safe_user != NULL) && (safe_host != NULL)) { /* Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME to: - EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME - EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME in parallel. */ aggregate_all_stages(thread->write_instr_class_stages_stats(), safe_user->write_instr_class_stages_stats(), safe_host->write_instr_class_stages_stats()); return; } if (safe_user != NULL) { /* Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME to: - EVENTS_STAGES_SUMMARY_BY_USER_BY_EVENT_NAME - EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME in parallel. */ aggregate_all_stages(thread->write_instr_class_stages_stats(), safe_user->write_instr_class_stages_stats(), global_instr_class_stages_array); return; } if (safe_host != NULL) { /* Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME to EVENTS_STAGES_SUMMARY_BY_HOST_BY_EVENT_NAME, directly. */ aggregate_all_stages(thread->write_instr_class_stages_stats(), safe_host->write_instr_class_stages_stats()); return; } /* Aggregate EVENTS_STAGES_SUMMARY_BY_THREAD_BY_EVENT_NAME to EVENTS_STAGES_SUMMARY_GLOBAL_BY_EVENT_NAME. */ aggregate_all_stages(thread->write_instr_class_stages_stats(), global_instr_class_stages_array); }
O3
cpp
aggregate_thread_stages(PFS_thread*, PFS_account*, PFS_user*, PFS_host*): pushq %rbp movq %rsp, %rbp pushq %r14 pushq %rbx movq 0x10(%rdi), %rbx testq %rbx, %rbx setne %al andb 0x1(%rdi), %al cmpb $0x1, %al jne 0x31f15 movq %rsi, %r14 testq %rsi, %rsi je 0x31f07 testb $0x1, 0x1(%r14) jne 0x31ef7 movq %r14, %rdi callq 0x401ea movb $0x1, 0x1(%r14) movq 0x10(%r14), %rsi movq %rbx, %rdi popq %rbx popq %r14 popq %rbp jmp 0x316e8 movq %rdx, %rdi movq %rcx, %rsi movq %rbx, %rdx callq 0x2736b popq %rbx popq %r14 popq %rbp retq
_Z23aggregate_thread_stagesP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host: push rbp mov rbp, rsp push r14 push rbx mov rbx, [rdi+10h] test rbx, rbx setnz al and al, [rdi+1] cmp al, 1 jnz short loc_31F15 mov r14, rsi test rsi, rsi jz short loc_31F07 test byte ptr [r14+1], 1 jnz short loc_31EF7 mov rdi, r14; this call _ZN20PFS_connection_slice18reset_stages_statsEv; PFS_connection_slice::reset_stages_stats(void) mov byte ptr [r14+1], 1 loc_31EF7: mov rsi, [r14+10h] mov rdi, rbx pop rbx pop r14 pop rbp jmp _Z20aggregate_all_stagesP14PFS_stage_statS0_; aggregate_all_stages(PFS_stage_stat *,PFS_stage_stat *) loc_31F07: mov rdi, rdx; this mov rsi, rcx; PFS_connection_slice * mov rdx, rbx call _Z23aggregate_thread_stagesP10PFS_threadP11PFS_accountP8PFS_userP8PFS_host_cold_1; aggregate_thread_stages(PFS_thread *,PFS_account *,PFS_user *,PFS_host *) [clone] loc_31F15: pop rbx pop r14 pop rbp retn
char aggregate_thread_stages(PFS_thread *a1, PFS_account *a2, PFS_user *a3, PFS_host *a4) { _QWORD *v4; // rbx char result; // al v4 = (_QWORD *)*((_QWORD *)a1 + 2); result = *((_BYTE *)a1 + 1) & (v4 != 0LL); if ( result == 1 ) { if ( a2 ) { if ( (*((_BYTE *)a2 + 1) & 1) == 0 ) { PFS_connection_slice::reset_stages_stats(a2); *((_BYTE *)a2 + 1) = 1; } return aggregate_all_stages(v4, *((_QWORD *)a2 + 2)); } else { return aggregate_thread_stages(a3, a4, (long long)v4); } } return result; }
aggregate_thread_stages: PUSH RBP MOV RBP,RSP PUSH R14 PUSH RBX MOV RBX,qword ptr [RDI + 0x10] TEST RBX,RBX SETNZ AL AND AL,byte ptr [RDI + 0x1] CMP AL,0x1 JNZ 0x00131f15 MOV R14,RSI TEST RSI,RSI JZ 0x00131f07 TEST byte ptr [R14 + 0x1],0x1 JNZ 0x00131ef7 MOV RDI,R14 CALL 0x001401ea MOV byte ptr [R14 + 0x1],0x1 LAB_00131ef7: MOV RSI,qword ptr [R14 + 0x10] MOV RDI,RBX POP RBX POP R14 POP RBP JMP 0x001316e8 LAB_00131f07: MOV RDI,RDX MOV RSI,RCX MOV RDX,RBX CALL 0x0012736b LAB_00131f15: POP RBX POP R14 POP RBP RET
/* aggregate_thread_stages(PFS_thread*, PFS_account*, PFS_user*, PFS_host*) */ void aggregate_thread_stages (PFS_thread *param_1,PFS_account *param_2,PFS_user *param_3,PFS_host *param_4) { PFS_stage_stat *pPVar1; pPVar1 = *(PFS_stage_stat **)(param_1 + 0x10); if ((pPVar1 != (PFS_stage_stat *)0x0 & (byte)param_1[1]) == 1) { if (param_2 != (PFS_account *)0x0) { if (((byte)param_2[1] & 1) == 0) { PFS_connection_slice::reset_stages_stats((PFS_connection_slice *)param_2); param_2[1] = (PFS_account)0x1; } aggregate_all_stages(pPVar1,*(PFS_stage_stat **)(param_2 + 0x10)); return; } aggregate_thread_stages((PFS_thread *)param_3,(PFS_account *)param_4,(PFS_user *)pPVar1,param_4) ; } return; }